Packages
corex
0.1.0-beta.1
0.1.2
0.1.1
0.1.0
0.1.0-rc.1
0.1.0-rc.0
0.1.0-beta.5
0.1.0-beta.4
0.1.0-beta.3
0.1.0-beta.2
0.1.0-beta.1
0.1.0-alpha.33
0.1.0-alpha.32
0.1.0-alpha.31
0.1.0-alpha.30
0.1.0-alpha.29
0.1.0-alpha.28
0.1.0-alpha.27
0.1.0-alpha.26
0.1.0-alpha.25
0.1.0-alpha.24
0.1.0-alpha.23
0.1.0-alpha.22
0.1.0-alpha.21
0.1.0-alpha.20
0.1.0-alpha.19
0.1.0-alpha.18
0.1.0-alpha.17
0.1.0-alpha.16
0.1.0-alpha.15
0.1.0-alpha.14
0.1.0-alpha.13
0.1.0-alpha.12
0.1.0-alpha.11
0.1.0-alpha.10
0.1.0-alpha.9
0.1.0-alpha.8
0.1.0-alpha.7
0.1.0-alpha.6
0.1.0-alpha.5
0.1.0-alpha.4
0.1.0-alpha.3
0.1.0-alpha.2
0.1.0-alpha.1
Accessible and unstyled UI components library written in Elixir and TypeScript that integrates Zag.js state machines into the Phoenix Framework.
Current section
Files
Jump to
Current section
Files
lib/components/number_input/anatomy.ex
defmodule Corex.NumberInput.Anatomy do
@moduledoc false
defmodule Props do
@moduledoc false
@enforce_keys [:id]
defstruct [
:id,
value: nil,
default_value: nil,
min: nil,
max: nil,
step: 1,
disabled: false,
read_only: false,
invalid: false,
required: false,
allow_mouse_wheel: false,
name: nil,
form: nil,
on_value_change: nil,
on_value_change_client: nil,
dir: "ltr",
orientation: "horizontal"
]
@type t :: %__MODULE__{
id: String.t(),
value: String.t() | nil,
default_value: String.t() | nil,
min: number() | nil,
max: number() | nil,
step: number(),
disabled: boolean(),
read_only: boolean(),
invalid: boolean(),
required: boolean(),
allow_mouse_wheel: boolean(),
name: String.t() | nil,
form: String.t() | nil,
on_value_change: String.t() | nil,
on_value_change_client: String.t() | nil,
dir: String.t(),
orientation: String.t()
}
end
defmodule Root do
@moduledoc false
defstruct [:id, dir: "ltr", orientation: "horizontal"]
@type t :: %__MODULE__{id: String.t(), dir: String.t(), orientation: String.t()}
@ignored_attrs [
"id",
"dir",
"data-orientation",
"data-disabled",
"data-focus",
"data-invalid",
"data-scrubbing"
]
def ignored_attrs, do: @ignored_attrs
end
defmodule Label do
@moduledoc false
defstruct [:id, dir: "ltr", orientation: "horizontal"]
@type t :: %__MODULE__{id: String.t(), dir: String.t(), orientation: String.t()}
@ignored_attrs [
"id",
"dir",
"data-orientation",
"data-disabled",
"data-focus",
"data-invalid",
"data-required",
"data-scrubbing",
"for",
"htmlFor"
]
def ignored_attrs, do: @ignored_attrs
end
defmodule Control do
@moduledoc false
defstruct [:id, dir: "ltr", orientation: "horizontal"]
@type t :: %__MODULE__{id: String.t(), dir: String.t(), orientation: String.t()}
@ignored_attrs [
"id",
"dir",
"data-orientation",
"role",
"aria-disabled",
"data-focus",
"data-disabled",
"data-invalid",
"data-scrubbing",
"aria-invalid"
]
def ignored_attrs, do: @ignored_attrs
end
defmodule ValueText do
@moduledoc false
defstruct [:id]
@type t :: %__MODULE__{id: String.t()}
end
defmodule Input do
@moduledoc false
defstruct [:id, :disabled, dir: "ltr", orientation: "horizontal"]
@type t :: %__MODULE__{
id: String.t(),
disabled: boolean(),
dir: String.t(),
orientation: String.t()
}
@ignored_attrs [
"id",
"dir",
"data-orientation",
"name",
"form",
"role",
"type",
"disabled",
"readonly",
"readOnly",
"required",
"inputmode",
"inputMode",
"pattern",
"data-invalid",
"data-disabled",
"autocomplete",
"autoComplete",
"autoCorrect",
"autocorrect",
"spellcheck",
"spellCheck",
"aria-invalid",
"aria-roledescription",
"aria-valuemin",
"aria-valuemax",
"aria-valuenow",
"aria-valuetext",
"data-scrubbing",
"defaultValue",
"value"
]
def ignored_attrs, do: @ignored_attrs
end
defmodule TriggerGroup do
@moduledoc false
defstruct dir: "ltr", orientation: "horizontal"
@type t :: %__MODULE__{dir: String.t(), orientation: String.t()}
end
defmodule DecrementTrigger do
@moduledoc false
defstruct [:id, :aria_label, dir: "ltr", orientation: "horizontal"]
@type t :: %__MODULE__{
id: String.t(),
aria_label: String.t() | nil,
dir: String.t(),
orientation: String.t()
}
@ignored_attrs [
"id",
"dir",
"data-orientation",
"disabled",
"data-disabled",
"aria-label",
"type",
"tabIndex",
"aria-controls",
"data-scrubbing",
"role"
]
def ignored_attrs, do: @ignored_attrs
end
defmodule IncrementTrigger do
@moduledoc false
defstruct [:id, :aria_label, dir: "ltr", orientation: "horizontal"]
@type t :: %__MODULE__{
id: String.t(),
aria_label: String.t() | nil,
dir: String.t(),
orientation: String.t()
}
@ignored_attrs [
"id",
"dir",
"data-orientation",
"disabled",
"data-disabled",
"aria-label",
"type",
"tabIndex",
"aria-controls",
"data-scrubbing",
"role"
]
def ignored_attrs, do: @ignored_attrs
end
end