@jonmilner/ui 0.11.4 → 0.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Avatar/Avatar.css +1 -1
- package/dist/Badge/Badge.css +1 -1
- package/dist/Box/Box.css +1 -1
- package/dist/Button/Button.css +1 -1
- package/dist/Checkbox/Checkbox.css +1 -1
- package/dist/Chip/Chip.css +1 -1
- package/dist/Clickable/Clickable.css +1 -1
- package/dist/ColorField/ColorField.css +1 -1
- package/dist/Dialog/Dialog.css +1 -1
- package/dist/Field/Field.css +1 -1
- package/dist/Heading/Heading.css +1 -1
- package/dist/Icon/Icon.css +1 -1
- package/dist/IconButton/IconButton.css +1 -1
- package/dist/Inline/Inline.css +1 -1
- package/dist/Menu/Menu.css +1 -1
- package/dist/MultiSelect/MultiSelect.css +1 -1
- package/dist/SearchField/SearchField.css +1 -1
- package/dist/Stack/Stack.css +1 -1
- package/dist/Switch/Switch.css +2 -0
- package/dist/Switch/Switch.css.mjs +7 -0
- package/dist/Switch/index.d.mts +29 -0
- package/dist/Switch/index.mjs +59 -0
- package/dist/Table/Table.css +2 -2
- package/dist/Table/Table.css.mjs +2 -2
- package/dist/Table/index.d.mts +14 -2
- package/dist/Table/index.mjs +73 -61
- package/dist/Tabs/Tabs.css +1 -1
- package/dist/Tag/Tag.css +1 -1
- package/dist/Text/Text.css +1 -1
- package/dist/TextField/TextField.css +1 -1
- package/dist/Textarea/Textarea.css +1 -1
- package/dist/Toast/Toast.css +1 -1
- package/dist/VisuallyHidden/VisuallyHidden.css +1 -1
- package/dist/base.css +1 -1
- package/dist/docs/Button.md +1 -1
- package/dist/docs/Checkbox.md +1 -1
- package/dist/docs/Chip.md +1 -0
- package/dist/docs/Field.md +2 -2
- package/dist/docs/Icon.md +2 -0
- package/dist/docs/Switch.md +119 -0
- package/dist/docs/Table.md +43 -1
- package/dist/docs/llms.txt +1 -0
- package/dist/docs/manifest.json +111 -1
- package/dist/icons/ArrowDownIcon.d.mts +2 -0
- package/dist/icons/ArrowDownIcon.mjs +10 -0
- package/dist/icons/ArrowUpIcon.d.mts +2 -0
- package/dist/icons/ArrowUpIcon.mjs +10 -0
- package/dist/icons/index.d.mts +4 -2
- package/dist/icons/index.mjs +26 -24
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +12 -11
- package/dist/styles/atoms.css +1 -1
- package/dist/styles/layers.css +1 -1
- package/dist/styles/responsive.css +1 -1
- package/package.json +5 -1
package/dist/base.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.avatar, components.badge, components.button, components.chip, components.field, components.color-field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.visually-hidden, components.table;
|
|
1
|
+
@layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.stack, components.text, components.avatar, components.badge, components.button, components.chip, components.field, components.color-field, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.search-field, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.visually-hidden, components.table;
|
|
2
2
|
@layer tokens{:root{--space-0:0rem;--space-1:.0625rem;--space-2:.125rem;--space-4:.25rem;--space-6:.375rem;--space-8:.5rem;--space-12:.75rem;--space-16:1rem;--space-20:1.25rem;--space-24:1.5rem;--space-32:2rem;--space-40:2.5rem;--space-48:3rem;--space-64:4rem;--space-80:5rem;--space-96:6rem;--size-xs:1.5rem;--size-sm:2rem;--size-med:2.5rem;--size-lg:3rem;--size-xl:3.5rem;--container-prose:40rem;--container-page:64rem;--container-wide:80rem;--radius-none:0;--radius-sm:.25rem;--radius-med:.5rem;--radius-lg:.75rem;--radius-xl:1rem;--radius-full:9999px;--font-size-xs:.75rem;--font-size-sm:.875rem;--font-size-med:1rem;--font-size-lg:1.125rem;--font-size-xl:1.25rem;--font-size-2xl:1.5rem;--font-size-3xl:1.875rem;--font-size-4xl:2.25rem;--font-weight-regular:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--line-height-sm:1.25;--line-height-med:1.5;--line-height-lg:1.75;--z-index-base:0;--z-index-raised:1;--z-index-dropdown:1000;--z-index-sticky:1100;--z-index-overlay:1200;--z-index-modal:1300;--z-index-popover:1400;--z-index-toast:1500;--z-index-tooltip:1600;--duration-fast:.12s;--duration-med:.2s;--duration-slow:.32s;--easing-standard:cubic-bezier(.2, 0, 0, 1);--easing-enter:cubic-bezier(0, 0, 0, 1);--easing-exit:cubic-bezier(.3, 0, 1, 1);--distance-sm:.25rem;--distance-med:.5rem;--distance-lg:1rem;--scale-sm:.02;--scale-med:.05;--scale-lg:.1}[data-brand]{--shadow-sm:0 1px 2px color-mix(in srgb, var(--color-shadow) 12%, transparent);--shadow-med:0 2px 8px color-mix(in srgb, var(--color-shadow) 14%, transparent), 0 1px 2px color-mix(in srgb, var(--color-shadow) 8%, transparent);--shadow-lg:0 8px 24px color-mix(in srgb, var(--color-shadow) 16%, transparent), 0 2px 6px color-mix(in srgb, var(--color-shadow) 8%, transparent)}[data-brand][data-mode=light]{color-scheme:light}[data-brand][data-mode=dark]{--shadow-sm:0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent), 0 1px 2px color-mix(in srgb, var(--color-shadow) 40%, transparent);--shadow-med:0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent), 0 2px 8px color-mix(in srgb, var(--color-shadow) 48%, transparent), 0 1px 2px color-mix(in srgb, var(--color-shadow) 32%, transparent);--shadow-lg:0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent), 0 8px 24px color-mix(in srgb, var(--color-shadow) 56%, transparent), 0 2px 6px color-mix(in srgb, var(--color-shadow) 32%, transparent);color-scheme:dark}[data-brand][data-mode=system]{color-scheme:light dark}:dir(ltr){--dir:1}:dir(rtl){--dir:-1}@media (prefers-color-scheme:dark){[data-brand][data-mode=system]{--shadow-sm:0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent), 0 1px 2px color-mix(in srgb, var(--color-shadow) 40%, transparent);--shadow-med:0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent), 0 2px 8px color-mix(in srgb, var(--color-shadow) 48%, transparent), 0 1px 2px color-mix(in srgb, var(--color-shadow) 32%, transparent);--shadow-lg:0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent), 0 8px 24px color-mix(in srgb, var(--color-shadow) 56%, transparent), 0 2px 6px color-mix(in srgb, var(--color-shadow) 32%, transparent)}}@media (prefers-reduced-motion:reduce){:root{--distance-sm:0rem;--distance-med:0rem;--distance-lg:0rem;--scale-sm:0;--scale-med:0;--scale-lg:0;--duration-fast:.12s;--duration-med:.12s;--duration-slow:.12s}}}
|
|
3
3
|
|
|
4
4
|
@font-face{src:local(Arial),local(ArialMT);font-weight:400;font-style:normal;size-adjust:101.568%;ascent-override:95.3892%;descent-override:23.7511%;line-gap-override:0%;font-family:Inter Fallback Arial}@font-face{src:local(Arial Bold),local(Arial-BoldMT);font-weight:700;font-style:normal;size-adjust:101.637%;ascent-override:95.3241%;descent-override:23.7349%;line-gap-override:0%;font-family:Inter Fallback Arial}@font-face{src:local(Arial Italic),local(Arial-ItalicMT);font-weight:400;font-style:italic;size-adjust:101.637%;ascent-override:95.3241%;descent-override:23.7349%;line-gap-override:0%;font-family:Inter Fallback Arial}@font-face{src:local(Arial Bold Italic),local(Arial-BoldItalicMT);font-weight:700;font-style:italic;size-adjust:101.706%;ascent-override:95.2591%;descent-override:23.7187%;line-gap-override:0%;font-family:Inter Fallback Arial}@font-face{src:local(Menlo Regular),local(Menlo-Regular);font-weight:400;font-style:normal;size-adjust:100.137%;ascent-override:101.871%;descent-override:29.9621%;line-gap-override:0%;font-family:JetBrains Mono Fallback Menlo}@font-face{src:local(Menlo Bold),local(Menlo-Bold);font-weight:700;font-style:normal;size-adjust:100.003%;ascent-override:102.007%;descent-override:30.0022%;line-gap-override:0%;font-family:JetBrains Mono Fallback Menlo}@font-face{src:local(Menlo Italic),local(Menlo-Italic);font-weight:400;font-style:italic;size-adjust:100.137%;ascent-override:101.871%;descent-override:29.9621%;line-gap-override:0%;font-family:JetBrains Mono Fallback Menlo}@font-face{src:local(Menlo Bold Italic),local(Menlo-BoldItalic);font-weight:700;font-style:italic;size-adjust:100.003%;ascent-override:102.007%;descent-override:30.0022%;line-gap-override:0%;font-family:JetBrains Mono Fallback Menlo}@font-face{src:local(Consolas);font-weight:400;font-style:normal;size-adjust:114.387%;ascent-override:89.1798%;descent-override:26.2293%;line-gap-override:0%;font-family:JetBrains Mono Fallback Consolas}@font-face{src:local(Consolas Bold),local(Consolas-Bold);font-weight:700;font-style:normal;size-adjust:114.387%;ascent-override:89.1798%;descent-override:26.2293%;line-gap-override:0%;font-family:JetBrains Mono Fallback Consolas}@font-face{src:local(Consolas Italic),local(Consolas-Italic);font-weight:400;font-style:italic;size-adjust:114.387%;ascent-override:89.1798%;descent-override:26.2293%;line-gap-override:0%;font-family:JetBrains Mono Fallback Consolas}@font-face{src:local(Consolas Bold Italic),local(Consolas-BoldItalic);font-weight:700;font-style:italic;size-adjust:114.387%;ascent-override:89.1798%;descent-override:26.2293%;line-gap-override:0%;font-family:JetBrains Mono Fallback Consolas}@font-face{src:local(Courier New),local(CourierNewPSMT);font-weight:400;font-style:normal;size-adjust:127.781%;ascent-override:79.8319%;descent-override:23.48%;line-gap-override:0%;font-family:JetBrains Mono Fallback Courier New}@font-face{src:local(Courier New Bold),local(CourierNewPS-BoldMT);font-weight:700;font-style:normal;size-adjust:123.353%;ascent-override:82.6977%;descent-override:24.3229%;line-gap-override:0%;font-family:JetBrains Mono Fallback Courier New}@font-face{src:local(Courier New Italic),local(CourierNewPS-ItalicMT);font-weight:400;font-style:italic;size-adjust:127.781%;ascent-override:79.8319%;descent-override:23.48%;line-gap-override:0%;font-family:JetBrains Mono Fallback Courier New}@font-face{src:local(Courier New Bold Italic),local(CourierNewPS-BoldItalicMT);font-weight:700;font-style:italic;size-adjust:123.353%;ascent-override:82.6977%;descent-override:24.3229%;line-gap-override:0%;font-family:JetBrains Mono Fallback Courier New}@layer tokens{[data-brand=default]{--color-bg:light-dark(oklch(100% 0 0),oklch(14.5% .006 265));--color-bg-muted:light-dark(oklch(96.8% .004 265),oklch(27% .01 265));--color-bg-raised:light-dark(oklch(100% 0 0),oklch(20.5% .008 265));--color-fg:light-dark(oklch(14.5% .006 265),oklch(98.5% .002 265));--color-fg-muted:light-dark(oklch(44.5% .014 265),oklch(71% .012 265));--color-border:light-dark(oklch(92.5% .006 265),oklch(27% .01 265));--color-border-strong:oklch(55.5% .014 265);--color-accent:light-dark(oklch(54.6% .19 258),oklch(70.7% .14 258));--color-accent-fg:light-dark(oklch(100% 0 0),oklch(14.5% .006 265));--color-accent-fill:light-dark(oklch(54.6% .19 258),oklch(48.8% .18 258));--color-accent-fill-fg:oklch(100% 0 0);--color-danger:light-dark(oklch(56% .2 25),oklch(70.4% .17 25));--color-danger-fg:light-dark(oklch(100% 0 0),oklch(14.5% .006 265));--color-success:light-dark(oklch(52% .135 150),oklch(76% .15 150));--color-success-fg:light-dark(oklch(100% 0 0),oklch(14.5% .006 265));--color-warning:light-dark(oklch(53% .11 75),oklch(81% .145 75));--color-warning-fg:light-dark(oklch(100% 0 0),oklch(14.5% .006 265));--color-done:light-dark(oklch(55% .2 295),oklch(72% .15 295));--color-done-fg:light-dark(oklch(100% 0 0),oklch(14.5% .006 265));--color-neutral-subtle:light-dark(oklch(96.8% .004 265),oklch(27% .01 265));--color-neutral-subtle-fg:light-dark(oklch(37% .013 265),oklch(92.5% .006 265));--color-accent-subtle:light-dark(oklch(93.2% .032 258),oklch(28.2% .09 258));--color-accent-subtle-fg:light-dark(oklch(48.8% .18 258),oklch(80.9% .095 258));--color-success-subtle:light-dark(oklch(94.5% .04 150),oklch(26% .06 150));--color-success-subtle-fg:light-dark(oklch(46.5% .12 150),oklch(84% .115 150));--color-warning-subtle:light-dark(oklch(95.5% .03 75),oklch(27% .05 75));--color-warning-subtle-fg:light-dark(oklch(47.5% .1 75),oklch(86% .105 75));--color-danger-subtle:light-dark(oklch(93.6% .032 25),oklch(25.8% .085 25));--color-danger-subtle-fg:light-dark(oklch(50.5% .19 25),oklch(80.8% .105 25));--color-done-subtle:light-dark(oklch(93.8% .032 295),oklch(28% .095 295));--color-done-subtle-fg:light-dark(oklch(49% .19 295),oklch(81.5% .1 295));--color-focus:light-dark(oklch(54.6% .19 258),oklch(70.7% .14 258));--color-shadow:light-dark(oklch(14.5% .006 265),oklch(0% 0 0));--font-body:"Inter", "Inter Fallback Arial", sans-serif;--font-heading:"Inter", "Inter Fallback Arial", sans-serif;--font-display:"Inter", "Inter Fallback Arial", sans-serif;--font-label:"Inter", "Inter Fallback Arial", sans-serif;--font-mono:"JetBrains Mono", "JetBrains Mono Fallback Menlo", "JetBrains Mono Fallback Consolas", "JetBrains Mono Fallback Courier New", monospace;--font-trim-body-cap:.36377;--font-trim-body-baseline:.36377;--font-trim-heading-cap:.36377;--font-trim-heading-baseline:.36377;--font-trim-display-cap:.36377;--font-trim-display-baseline:.36377;--font-trim-label-cap:.36377;--font-trim-label-baseline:.36377;--font-trim-mono-cap:.37;--font-trim-mono-baseline:.36}@media (forced-colors:active){[data-brand][data-brand]{--color-bg:Canvas;--color-bg-muted:Canvas;--color-bg-raised:Canvas;--color-fg:CanvasText;--color-fg-muted:CanvasText;--color-border:CanvasText;--color-border-strong:CanvasText;--color-accent:LinkText;--color-accent-fg:Canvas;--color-accent-fill:LinkText;--color-accent-fill-fg:Canvas;--color-danger:CanvasText;--color-danger-fg:Canvas;--color-success:CanvasText;--color-success-fg:Canvas;--color-warning:CanvasText;--color-warning-fg:Canvas;--color-done:CanvasText;--color-done-fg:Canvas;--color-neutral-subtle:Canvas;--color-neutral-subtle-fg:CanvasText;--color-accent-subtle:Canvas;--color-accent-subtle-fg:CanvasText;--color-success-subtle:Canvas;--color-success-subtle-fg:CanvasText;--color-warning-subtle:Canvas;--color-warning-subtle-fg:CanvasText;--color-danger-subtle:Canvas;--color-danger-subtle-fg:CanvasText;--color-done-subtle:Canvas;--color-done-subtle-fg:CanvasText;--color-focus:Highlight;--color-shadow:CanvasText}}}
|
package/dist/docs/Button.md
CHANGED
|
@@ -13,7 +13,7 @@ The labelled action: a `<button type="button">` with the house look, or a link s
|
|
|
13
13
|
|
|
14
14
|
- An icon with no visible label: use `IconButton`.
|
|
15
15
|
- A link inside running text: use a plain `<a>` (or the link component).
|
|
16
|
-
- A toggle, a choice between options, or a menu trigger: use the component for that widget (Checkbox, Tabs, Menu), which handles its keyboard and state.
|
|
16
|
+
- A toggle, a choice between options, or a menu trigger: use the component for that widget (Checkbox, Switch, Tabs, Menu), which handles its keyboard and state.
|
|
17
17
|
- A one-off pressable area, such as a whole card: use `Clickable`.
|
|
18
18
|
|
|
19
19
|
## Rules
|
package/dist/docs/Checkbox.md
CHANGED
|
@@ -11,7 +11,7 @@ A two-state choice, with a third mixed state for a "select all" over a partly se
|
|
|
11
11
|
|
|
12
12
|
## When not to use
|
|
13
13
|
|
|
14
|
-
- A setting that applies the moment it flips: `Switch
|
|
14
|
+
- A setting that applies the moment it flips: use `Switch`.
|
|
15
15
|
- One choice out of several: `RadioGroup` is planned.
|
|
16
16
|
- Picking several options from a long list in a popup: use `MultiSelect`.
|
|
17
17
|
|
package/dist/docs/Chip.md
CHANGED
|
@@ -15,6 +15,7 @@ A toggle that filters content or picks an option: "Unread", "Starred", "Medium".
|
|
|
15
15
|
- A status or fact: use `Badge`.
|
|
16
16
|
- A category or topic label on content: use `Tag` (#101).
|
|
17
17
|
- A one-off action: use `Button`.
|
|
18
|
+
- A setting that applies the moment it changes: use `Switch`.
|
|
18
19
|
- Switching between views of the same content: use `Tabs`.
|
|
19
20
|
- A form field with a required single answer: a radio group (not yet in the library); a `ChipGroup` can be cleared.
|
|
20
21
|
- Picking several values from a list too long to show: use `MultiSelect`.
|
package/dist/docs/Field.md
CHANGED
|
@@ -6,7 +6,7 @@ Wires one form control to its label, description and error: ids, `htmlFor`, `ari
|
|
|
6
6
|
|
|
7
7
|
## When to use
|
|
8
8
|
|
|
9
|
-
- Any form control that needs a visible label, help text or an error, including a control a component builds (Checkbox, MultiSelect build on Field rather than their own wiring).
|
|
9
|
+
- Any form control that needs a visible label, help text or an error, including a control a component builds (Checkbox, MultiSelect, Switch build on Field rather than their own wiring).
|
|
10
10
|
- Showing a server validation error next to its control. The app's action or submit handler returns it; set `invalid` and put the message in `Field.Error` (a props control such as `TextField` takes it as `error` instead; ADR 0133).
|
|
11
11
|
|
|
12
12
|
## When not to use
|
|
@@ -22,7 +22,7 @@ Wires one form control to its label, description and error: ids, `htmlFor`, `ari
|
|
|
22
22
|
- Mark the field with `invalid` whenever you pass an error message; the message alone does not set `aria-invalid`.
|
|
23
23
|
- `Field.Error` always renders a slot one line tall, so a one-line error appears without moving anything. A longer message wraps inside the field (even an unbroken URL) and pushes only what is below. Keep messages to one line where you can.
|
|
24
24
|
- `Field.Error` with children shows them; with `match` set to a validity key (`"valueMissing"`), only when that check fails. Without children, it shows the control's native validation message while the control is invalid.
|
|
25
|
-
- `Field.Label` renders a `label`. Keep it for `Field.Control` and for `Checkbox`, whose hidden input the label points at: clicking it toggles the
|
|
25
|
+
- `Field.Label` renders a `label`. Keep it for `Field.Control` and for `Checkbox` and `Switch`, whose hidden input the label points at: clicking it toggles the control, as on a native checkbox. For a Base UI control with no input at all, set `nativeLabel={false}`; it renders a `span` that names the control (`aria-labelledby`); clicking it focuses the control.
|
|
26
26
|
- `disabled` on Field disables the control and mutes the label. A message in `Field.Error` still shows while disabled; clear it if the field is locked.
|
|
27
27
|
- `name`, `validate`, `validationMode`, `dirty` and `touched` pass through to Base UI's `Field.Root`. `validate` and event handlers are functions, so set them from a client component.
|
|
28
28
|
- Every part takes style props; the root's `display`, `flexDirection` and `gap` (`"8"`) are defaults you can replace. The label, description and error also take Text's `size`, `font`, `weight`, `leading` and `truncate` over their defaults (`sm`; the label in the `label` font at `medium`). `className` is a string and `style` an object (not Base UI's state functions), and the consumer's come last.
|
package/dist/docs/Icon.md
CHANGED
|
@@ -72,8 +72,10 @@ Generated from `src/icons/svg/` and exported from `@jonmilner/ui/icons`; each ta
|
|
|
72
72
|
|
|
73
73
|
<!-- icons:start -->
|
|
74
74
|
|
|
75
|
+
- `ArrowDownIcon` (`arrow-down.svg`)
|
|
75
76
|
- `ArrowLeftIcon` (`arrow-left.svg`)
|
|
76
77
|
- `ArrowRightIcon` (`arrow-right.svg`)
|
|
78
|
+
- `ArrowUpIcon` (`arrow-up.svg`)
|
|
77
79
|
- `CheckIcon` (`check.svg`)
|
|
78
80
|
- `ChevronDownIcon` (`chevron-down.svg`)
|
|
79
81
|
- `ChevronRightIcon` (`chevron-right.svg`)
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# Switch
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Turns one setting on or off, and the change applies the moment it flips. Built on Base UI `Switch` (ADR 0003, 0137): a `span` with `role="switch"` and `aria-checked`, plus a hidden checkbox input that submits with a form. The span is a 24 px target with the shared focus ring around a pill track: off is an outlined track with the thumb at the start, on a filled `accent` track with the thumb at the end. It composes `Field` for its label, description and error (ADR 0026), with the label after the switch.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- A setting saved as soon as it changes: "Auto-merge", "Email notifications", "Dark mode".
|
|
10
|
+
- A row in a settings list, where each setting stands alone.
|
|
11
|
+
|
|
12
|
+
## When not to use
|
|
13
|
+
|
|
14
|
+
- A choice sent when the form is submitted ("Accept the terms"), or picking items from a list: use `Checkbox`.
|
|
15
|
+
- A toggle in a toolbar, like bold or a filter: use `Button` or `Chip` with `aria-pressed`.
|
|
16
|
+
- Two options that are not on and off ("Monthly" or "Yearly"): `RadioGroup` is planned.
|
|
17
|
+
|
|
18
|
+
## Rules
|
|
19
|
+
|
|
20
|
+
- Name it with `label` (or `label` with `hideLabel`) or with `aria-label` when the context shows the setting, as in a table row. The type requires exactly one. The label names the setting, never its state: "Auto-merge", not "On".
|
|
21
|
+
- `checked` with `onCheckedChange` controls it; `defaultChecked` leaves it uncontrolled. `onCheckedChange` gets the new state only.
|
|
22
|
+
- Apply the change in `onCheckedChange`. While it is being saved, pass `busy`: the switch sets `aria-busy`, turns read-only, dims and shows the progress cursor, and keeps focus so the user does not lose their place. Clear `busy` when the save settles, failed or not (a `finally`), or the switch stays locked; on failure, put `checked` back and show `error`. A `readOnly` or `disabled` switch ignores `busy`.
|
|
23
|
+
- Click, a click on the label, Space and Enter all toggle it. Enter does not submit the form, unlike on a checkbox.
|
|
24
|
+
- `description` and `error` render below the row through `Field`; a non-empty `error` marks it invalid (`aria-invalid`, a thicker `danger` border) and joins its `aria-describedby`.
|
|
25
|
+
- `disabled` takes it out of the tab order and dashes the border. `readOnly` keeps it focusable and announced (`aria-readonly`) but unchangeable and dots the border; say nearby why it cannot change.
|
|
26
|
+
- `name` submits `value` (default `"on"`) while on; off submits nothing unless you set `uncheckedValue`.
|
|
27
|
+
- One size: the target is 24 px, the track 38 by 22. Style props, `className` and `style` go to the `Field` around the row and its messages, not to the switch.
|
|
28
|
+
- The module has no hooks, so a server component can render it. `onCheckedChange` is a function: set it from a client component.
|
|
29
|
+
|
|
30
|
+
## Do
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
<Switch
|
|
34
|
+
label="Auto-merge"
|
|
35
|
+
description="Merge the pull request once its checks pass."
|
|
36
|
+
checked={autoMerge}
|
|
37
|
+
busy={saving}
|
|
38
|
+
error={saveError}
|
|
39
|
+
onCheckedChange={async (next) => {
|
|
40
|
+
setAutoMerge(next);
|
|
41
|
+
setSaveError(undefined);
|
|
42
|
+
setSaving(true);
|
|
43
|
+
try {
|
|
44
|
+
await saveAutoMerge(next);
|
|
45
|
+
} catch {
|
|
46
|
+
setAutoMerge(!next);
|
|
47
|
+
setSaveError("Couldn't save. Try again.");
|
|
48
|
+
} finally {
|
|
49
|
+
setSaving(false);
|
|
50
|
+
}
|
|
51
|
+
}}
|
|
52
|
+
/>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```tsx
|
|
56
|
+
// The row's heading names the setting.
|
|
57
|
+
<Switch
|
|
58
|
+
aria-label={`Notifications for ${repo.name}`}
|
|
59
|
+
checked={repo.notify}
|
|
60
|
+
onCheckedChange={(next) => setNotify(repo.id, next)}
|
|
61
|
+
/>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Don't
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
// The label names the state, so the switch reads "On, switch, on".
|
|
68
|
+
<Switch label={enabled ? "On" : "Off"} checked={enabled} onCheckedChange={setEnabled} />
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
// Disabling while saving drops focus mid-request: pass `busy`.
|
|
73
|
+
<Switch label="Auto-merge" checked={autoMerge} disabled={saving} onCheckedChange={save} />
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
// A choice that waits for the form's submit button is a checkbox.
|
|
78
|
+
<form>
|
|
79
|
+
<Switch label="Accept the terms" name="terms" />
|
|
80
|
+
<Button type="submit">Sign up</Button>
|
|
81
|
+
</form>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Accessibility
|
|
85
|
+
|
|
86
|
+
- Role `switch` with `aria-checked` `"true"` or `"false"`; `aria-disabled`, `aria-readonly`, `aria-required` and `aria-busy` follow the props, and `aria-invalid` the `error`.
|
|
87
|
+
- The label, description and error reach it through `aria-labelledby` and `aria-describedby`, which Base UI adds after hydration; server HTML has the label's `for`, so a click on the label toggles the switch.
|
|
88
|
+
- On and off differ in the thumb's position as well as the fill, so the state is never color alone. Invalid is a thicker border, disabled a dashed one, read-only a dotted one. The off track's border is `borderStrong` and its thumb `fgMuted`, the on track `accent` with an `accentFg` thumb: 3:1 or more on every surface, in both modes.
|
|
89
|
+
- The thumb slides `distance.lg` as it crossfades; under reduced motion the distance is zero and only the crossfade runs.
|
|
90
|
+
- Under forced colors the track maps to system colors: off a `CanvasText` border and thumb on `Canvas`, on a `LinkText` fill with a `Canvas` thumb, and a `Highlight` focus ring.
|
|
91
|
+
- Busy is momentary, like disabled, so the track's half-opacity dim is outside the 3:1 rule (the focus ring is not dimmed); `aria-busy` tells assistive tech, and the switch keeps focus and its name.
|
|
92
|
+
|
|
93
|
+
## Props
|
|
94
|
+
|
|
95
|
+
Generated from the TypeScript types.
|
|
96
|
+
|
|
97
|
+
### Switch
|
|
98
|
+
|
|
99
|
+
| Prop | Type | Required | Description |
|
|
100
|
+
| --- | --- | --- | --- |
|
|
101
|
+
| `aria-label` | `string` | no | |
|
|
102
|
+
| `busy` | `boolean` | no | |
|
|
103
|
+
| `checked` | `boolean` | no | |
|
|
104
|
+
| `className` | `string` | no | |
|
|
105
|
+
| `defaultChecked` | `boolean` | no | |
|
|
106
|
+
| `description` | `ReactNode` | no | |
|
|
107
|
+
| `disabled` | `boolean` | no | |
|
|
108
|
+
| `error` | `ReactNode` | no | |
|
|
109
|
+
| `hideLabel` | `boolean` | no | |
|
|
110
|
+
| `label` | `ReactNode` | no | |
|
|
111
|
+
| `name` | `string` | no | |
|
|
112
|
+
| `onCheckedChange` | `((checked: boolean) => void)` | no | |
|
|
113
|
+
| `readOnly` | `boolean` | no | |
|
|
114
|
+
| `required` | `boolean` | no | |
|
|
115
|
+
| `style` | `CSSProperties` | no | |
|
|
116
|
+
| `uncheckedValue` | `string` | no | |
|
|
117
|
+
| `value` | `string` | no | |
|
|
118
|
+
|
|
119
|
+
Also accepts the style props (see `manifest.json` `styleProps`).
|
package/dist/docs/Table.md
CHANGED
|
@@ -8,6 +8,7 @@ Records in rows that share named columns, so a reader can scan and compare them:
|
|
|
8
8
|
|
|
9
9
|
- A list of records with the same fields, where a reader compares one row against another: amounts, dates, statuses.
|
|
10
10
|
- Figures that should line up down a column: set `numeric` on the column's cells.
|
|
11
|
+
- Columns a reader sorts: set `sort` and `onSort` on their headers.
|
|
11
12
|
|
|
12
13
|
## When not to use
|
|
13
14
|
|
|
@@ -18,6 +19,7 @@ Records in rows that share named columns, so a reader can scan and compare them:
|
|
|
18
19
|
- A phone layout of one card per row: that is the app's layout; Table stays a table.
|
|
19
20
|
- After a row is removed, focus is the app's to move (to the next row's control, or a heading); Table does not restore it.
|
|
20
21
|
- A sticky header, edge shadows, virtualisation or column resizing: not supported.
|
|
22
|
+
- Sorting the rows themselves, or by several columns at once: the app sorts its data; a header only shows the order and reports the press.
|
|
21
23
|
|
|
22
24
|
## Rules
|
|
23
25
|
|
|
@@ -30,7 +32,9 @@ Records in rows that share named columns, so a reader can scan and compare them:
|
|
|
30
32
|
- Body rows take a light hover tint only where hover is real (`(hover: hover)`); it never means anything, it only helps the eye follow a row. On a `bgMuted` surface, colored text in a cell (`color="danger"`) falls under 4.5:1 under the tint: put a status there in a `Badge`.
|
|
31
33
|
- `layout`: `auto` (default) sizes columns from their content; `fixed` sizes them from the first row and the columns' widths, so it is faster on a long table and its columns stay put. Set a width with `inlineSize` on `Table.Column` inside `Table.ColumnGroup`: a size step, a container width, `auto`, `full` or `fit`. A width no token gives goes in `className`, the documented exception.
|
|
32
34
|
- The table is `inlineSize="full"` by default. Cells have `8` block and `12` inline padding as default style props, and a `border` rule below each. Every part takes `className`, `style`, `ref` and the style props; the consumer's win.
|
|
33
|
-
-
|
|
35
|
+
- `sort` (`"ascending"`, `"descending"` or `"none"`) and `onSort` on a `HeaderCell` make its column sortable: its label goes in a button, with an up or down arrow after it for the current order (an unsorted column keeps the arrow's room, unseen), and the sorted column's label turns `fg`. Pressing it calls `onSort`; the app re-sorts its rows and passes the new `sort`, and picks the press order (a new column ascending, the same one flipped). Pass `"none"` on each sortable column that is not the sorted one. `sort` and `onSort` go together, and `hideLabel` cannot join them: the label is the button's name.
|
|
36
|
+
- `sort` sets `aria-sort` on the header, only while the column is ascending or descending. A header sorted some other way (a link, the server) passes `aria-sort` itself and leaves `sort` unset.
|
|
37
|
+
- No part has hooks, so a server component can render the whole table. `onSort` is a function, so a sortable table renders from a client component.
|
|
34
38
|
|
|
35
39
|
## Do
|
|
36
40
|
|
|
@@ -80,6 +84,34 @@ Records in rows that share named columns, so a reader can scan and compare them:
|
|
|
80
84
|
</Table>
|
|
81
85
|
```
|
|
82
86
|
|
|
87
|
+
```tsx
|
|
88
|
+
// The app owns the order; each sortable header shows it and asks to change it.
|
|
89
|
+
const [sort, setSort] = useState<{ key: "payee" | "amount"; dir: "ascending" | "descending" }>({
|
|
90
|
+
key: "payee",
|
|
91
|
+
dir: "ascending",
|
|
92
|
+
});
|
|
93
|
+
const header = (key: "payee" | "amount") => ({
|
|
94
|
+
sort: sort.key === key ? sort.dir : ("none" as const),
|
|
95
|
+
onSort: () =>
|
|
96
|
+
setSort((current) => ({
|
|
97
|
+
key,
|
|
98
|
+
dir: current.key === key && current.dir === "ascending" ? "descending" : "ascending",
|
|
99
|
+
})),
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
<Table caption="Recent transactions">
|
|
103
|
+
<Table.Head>
|
|
104
|
+
<Table.Row>
|
|
105
|
+
<Table.HeaderCell {...header("payee")}>Payee</Table.HeaderCell>
|
|
106
|
+
<Table.HeaderCell numeric {...header("amount")}>
|
|
107
|
+
Amount
|
|
108
|
+
</Table.HeaderCell>
|
|
109
|
+
</Table.Row>
|
|
110
|
+
</Table.Head>
|
|
111
|
+
<Table.Body>{sortedRows}</Table.Body>
|
|
112
|
+
</Table>;
|
|
113
|
+
```
|
|
114
|
+
|
|
83
115
|
## Don't
|
|
84
116
|
|
|
85
117
|
```tsx
|
|
@@ -95,6 +127,13 @@ Records in rows that share named columns, so a reader can scan and compare them:
|
|
|
95
127
|
</Table.Row>
|
|
96
128
|
```
|
|
97
129
|
|
|
130
|
+
```tsx
|
|
131
|
+
// A click on the th: no keyboard reaches it, and nothing says it sorts. Use sort and onSort.
|
|
132
|
+
<Table.HeaderCell aria-sort="ascending" onClick={toggle}>
|
|
133
|
+
Amount
|
|
134
|
+
</Table.HeaderCell>
|
|
135
|
+
```
|
|
136
|
+
|
|
98
137
|
```tsx
|
|
99
138
|
// An empty body: say there is nothing, instead.
|
|
100
139
|
<Table caption="Invoices">
|
|
@@ -106,6 +145,7 @@ Records in rows that share named columns, so a reader can scan and compare them:
|
|
|
106
145
|
|
|
107
146
|
- Native table semantics: rows, column and row headers are announced, and screen readers' table navigation works. Column headers are `scope="col"`; set `scope="row"` on a row's first cell when it names the row.
|
|
108
147
|
- A `caption`, `aria-label` or `aria-labelledby` names the table (WCAG 1.3.1).
|
|
148
|
+
- A sortable header is a native `button` named by its label, in the tab order, pressed with Enter, Space or a click; its arrow is hidden from assistive tech, and the `th`'s `aria-sort` announces the order (WAI-ARIA sortable table pattern).
|
|
109
149
|
- Controls in cells are in the tab order, in reading order. Give each a name that says its row ("Select Ada Lovelace", "Actions for City Water").
|
|
110
150
|
- A pending row's `aria-busy` tells assistive tech it is changing; a toned row's meaning is in its text (WCAG 1.4.1).
|
|
111
151
|
- The text on each tone fill, and on the hover tint over each surface and fill (colored text roles over `bg` and `bgRaised` only), is checked for 4.5:1 in `contrast/mixes.ts`.
|
|
@@ -177,7 +217,9 @@ Also accepts the style props (see `manifest.json` `styleProps`).
|
|
|
177
217
|
| `hideLabel` | `boolean` | no | |
|
|
178
218
|
| `leading` | `"lg" \| "med" \| "sm"` | no | |
|
|
179
219
|
| `numeric` | `boolean` | no | |
|
|
220
|
+
| `onSort` | `((() => void) & (() => void))` | no | |
|
|
180
221
|
| `size` | `"2xl" \| "3xl" \| "4xl" \| "lg" \| "med" \| "sm" \| "xl" \| "xs"` | no | |
|
|
222
|
+
| `sort` | `"ascending" \| "descending" \| "none"` | no | |
|
|
181
223
|
| `weight` | `"bold" \| "medium" \| "regular" \| "semibold"` | no | |
|
|
182
224
|
| `wrap` | `"nowrap" \| "pre" \| "pre-wrap"` | no | |
|
|
183
225
|
|
package/dist/docs/llms.txt
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
- [MultiSelect](MultiSelect.md): A form field for picking any number of values from a list too long to show at once. A trigger styled as Button's secondary look opens a listbox of options; each selected option shows a check mark, and the trigger summarises the selection as the joined labels, or a count ("3 selected") once the labels would not fit. Built on Base UI's `Select` in multiple mode (ADR 0003), which owns the keyboard and focus: arrow keys, Home and End move through the options, typing jumps to a match, Esc and an outside click close it, and focus returns to the trigger. It composes `Field` for its label, description and error (ADR 0026).
|
|
31
31
|
- [SearchField](SearchField.md): A form field for a search query: an `<input type="search">` (role `searchbox`) with a search icon at its inline start and, while it holds a value, a clear button at its inline end. Escape empties a field that has a value, and the clear button empties it and puts focus back in the input, so a keyboard user never loses their place (ADR 0087). Built on Base UI's `Input` (ADR 0003); it composes `Field` for its label, description and error (ADR 0026). Three sizes at Button's heights (`sm`, `med`, `lg`: 24, 32 and 40 px, ADR 0124); the clear button is 24px, or 32px in `lg`.
|
|
32
32
|
- [Stack](Stack.md): A vertical column of children with even space between them. `Stack` is a `Box` with `display="flex"` and `flexDirection="column"` as default style props, spaced by a required `gap`. Children render as they are: no wrapper per child.
|
|
33
|
+
- [Switch](Switch.md): Turns one setting on or off, and the change applies the moment it flips. Built on Base UI `Switch` (ADR 0003, 0137): a `span` with `role="switch"` and `aria-checked`, plus a hidden checkbox input that submits with a form. The span is a 24 px target with the shared focus ring around a pill track: off is an outlined track with the thumb at the start, on a filled `accent` track with the thumb at the end. It composes `Field` for its label, description and error (ADR 0026), with the label after the switch.
|
|
33
34
|
- [Table](Table.md): Records in rows that share named columns, so a reader can scan and compare them: transactions, members, invoices. A native `table` with parts for each element (`Table.Head`, `Table.Body`, `Table.Foot`, `Table.Row`, `Table.HeaderCell`, `Table.Cell`, `Table.ColumnGroup`, `Table.Column`). It has no `grid` role and no roving focus: a link, `Checkbox` or `Menu` in a cell keeps the page's tab order, and a screen reader's table commands work as on any table.
|
|
34
35
|
- [Tabs](Tabs.md): Switches between views that share one place on the page. The parts are `Tabs` (the root, a flex column; a row when vertical), `Tabs.List` (the `tablist`), `Tabs.Tab` (a `tab` button on `Clickable`) and `Tabs.Panel` (the `tabpanel`). Built on Base UI `Tabs` (ADR 0003, 0046): it owns the selection, one tab stop with arrow-key roving, `aria-selected`, and the ids that tie each tab to its panel. The selected tab shows an accent bar that fades and grows in (ADR 0049).
|
|
35
36
|
- [Tag](Tag.md): A label that puts content in a category: a topic, a label, a user-made category. A `span` with a subtle tone fill (gray by default) and an `lg` radius (half a one-line tag's height, so one line reads as a pill and wrapped lines stay inside the fill) around a `Text` in the `label` font. It can be read-only, a link, or removable.
|
package/dist/docs/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./manifest.schema.json",
|
|
3
3
|
"package": "@jonmilner/ui",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.6",
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
7
7
|
"name": "AlertDialog",
|
|
@@ -1836,6 +1836,99 @@
|
|
|
1836
1836
|
"parts": [],
|
|
1837
1837
|
"exports": []
|
|
1838
1838
|
},
|
|
1839
|
+
{
|
|
1840
|
+
"name": "Switch",
|
|
1841
|
+
"styleProps": true,
|
|
1842
|
+
"props": [
|
|
1843
|
+
{
|
|
1844
|
+
"name": "aria-label",
|
|
1845
|
+
"type": "string",
|
|
1846
|
+
"required": false
|
|
1847
|
+
},
|
|
1848
|
+
{
|
|
1849
|
+
"name": "busy",
|
|
1850
|
+
"type": "boolean",
|
|
1851
|
+
"required": false
|
|
1852
|
+
},
|
|
1853
|
+
{
|
|
1854
|
+
"name": "checked",
|
|
1855
|
+
"type": "boolean",
|
|
1856
|
+
"required": false
|
|
1857
|
+
},
|
|
1858
|
+
{
|
|
1859
|
+
"name": "className",
|
|
1860
|
+
"type": "string",
|
|
1861
|
+
"required": false
|
|
1862
|
+
},
|
|
1863
|
+
{
|
|
1864
|
+
"name": "defaultChecked",
|
|
1865
|
+
"type": "boolean",
|
|
1866
|
+
"required": false
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
"name": "description",
|
|
1870
|
+
"type": "ReactNode",
|
|
1871
|
+
"required": false
|
|
1872
|
+
},
|
|
1873
|
+
{
|
|
1874
|
+
"name": "disabled",
|
|
1875
|
+
"type": "boolean",
|
|
1876
|
+
"required": false
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
"name": "error",
|
|
1880
|
+
"type": "ReactNode",
|
|
1881
|
+
"required": false
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
"name": "hideLabel",
|
|
1885
|
+
"type": "boolean",
|
|
1886
|
+
"required": false
|
|
1887
|
+
},
|
|
1888
|
+
{
|
|
1889
|
+
"name": "label",
|
|
1890
|
+
"type": "ReactNode",
|
|
1891
|
+
"required": false
|
|
1892
|
+
},
|
|
1893
|
+
{
|
|
1894
|
+
"name": "name",
|
|
1895
|
+
"type": "string",
|
|
1896
|
+
"required": false
|
|
1897
|
+
},
|
|
1898
|
+
{
|
|
1899
|
+
"name": "onCheckedChange",
|
|
1900
|
+
"type": "((checked: boolean) => void)",
|
|
1901
|
+
"required": false
|
|
1902
|
+
},
|
|
1903
|
+
{
|
|
1904
|
+
"name": "readOnly",
|
|
1905
|
+
"type": "boolean",
|
|
1906
|
+
"required": false
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
"name": "required",
|
|
1910
|
+
"type": "boolean",
|
|
1911
|
+
"required": false
|
|
1912
|
+
},
|
|
1913
|
+
{
|
|
1914
|
+
"name": "style",
|
|
1915
|
+
"type": "CSSProperties",
|
|
1916
|
+
"required": false
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
"name": "uncheckedValue",
|
|
1920
|
+
"type": "string",
|
|
1921
|
+
"required": false
|
|
1922
|
+
},
|
|
1923
|
+
{
|
|
1924
|
+
"name": "value",
|
|
1925
|
+
"type": "string",
|
|
1926
|
+
"required": false
|
|
1927
|
+
}
|
|
1928
|
+
],
|
|
1929
|
+
"parts": [],
|
|
1930
|
+
"exports": []
|
|
1931
|
+
},
|
|
1839
1932
|
{
|
|
1840
1933
|
"name": "Table",
|
|
1841
1934
|
"styleProps": true,
|
|
@@ -2003,6 +2096,11 @@
|
|
|
2003
2096
|
"type": "boolean",
|
|
2004
2097
|
"required": false
|
|
2005
2098
|
},
|
|
2099
|
+
{
|
|
2100
|
+
"name": "onSort",
|
|
2101
|
+
"type": "((() => void) & (() => void))",
|
|
2102
|
+
"required": false
|
|
2103
|
+
},
|
|
2006
2104
|
{
|
|
2007
2105
|
"name": "size",
|
|
2008
2106
|
"type": "\"2xl\" | \"3xl\" | \"4xl\" | \"lg\" | \"med\" | \"sm\" | \"xl\" | \"xs\"",
|
|
@@ -2018,6 +2116,16 @@
|
|
|
2018
2116
|
"xs"
|
|
2019
2117
|
]
|
|
2020
2118
|
},
|
|
2119
|
+
{
|
|
2120
|
+
"name": "sort",
|
|
2121
|
+
"type": "\"ascending\" | \"descending\" | \"none\"",
|
|
2122
|
+
"required": false,
|
|
2123
|
+
"values": [
|
|
2124
|
+
"ascending",
|
|
2125
|
+
"descending",
|
|
2126
|
+
"none"
|
|
2127
|
+
]
|
|
2128
|
+
},
|
|
2021
2129
|
{
|
|
2022
2130
|
"name": "weight",
|
|
2023
2131
|
"type": "\"bold\" | \"medium\" | \"regular\" | \"semibold\"",
|
|
@@ -3332,8 +3440,10 @@
|
|
|
3332
3440
|
}
|
|
3333
3441
|
],
|
|
3334
3442
|
"icons": [
|
|
3443
|
+
"ArrowDownIcon",
|
|
3335
3444
|
"ArrowLeftIcon",
|
|
3336
3445
|
"ArrowRightIcon",
|
|
3446
|
+
"ArrowUpIcon",
|
|
3337
3447
|
"CheckIcon",
|
|
3338
3448
|
"ChevronDownIcon",
|
|
3339
3449
|
"ChevronRightIcon",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Icon as e } from "../Icon/index.mjs";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
// src/icons/ArrowDownIcon.tsx
|
|
4
|
+
function n(n) {
|
|
5
|
+
return /* @__PURE__ */ t(e, {
|
|
6
|
+
...n,
|
|
7
|
+
children: /* @__PURE__ */ t("path", { d: "M12 5v14M19 12l-7 7-7-7" })
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export { n as ArrowDownIcon };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Icon as e } from "../Icon/index.mjs";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
// src/icons/ArrowUpIcon.tsx
|
|
4
|
+
function n(n) {
|
|
5
|
+
return /* @__PURE__ */ t(e, {
|
|
6
|
+
...n,
|
|
7
|
+
children: /* @__PURE__ */ t("path", { d: "m5 12 7-7 7 7M12 19V5" })
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export { n as ArrowUpIcon };
|
package/dist/icons/index.d.mts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { CircleAlertIcon } from "./CircleAlertIcon.mjs";
|
|
2
2
|
import { CircleCheckIcon } from "./CircleCheckIcon.mjs";
|
|
3
3
|
import { InfoIcon } from "./InfoIcon.mjs";
|
|
4
|
+
import { ArrowDownIcon } from "./ArrowDownIcon.mjs";
|
|
4
5
|
import { ArrowLeftIcon } from "./ArrowLeftIcon.mjs";
|
|
5
6
|
import { ArrowRightIcon } from "./ArrowRightIcon.mjs";
|
|
7
|
+
import { ArrowUpIcon } from "./ArrowUpIcon.mjs";
|
|
6
8
|
import { CheckIcon } from "./CheckIcon.mjs";
|
|
7
9
|
import { ChevronDownIcon } from "./ChevronDownIcon.mjs";
|
|
8
10
|
import { ChevronRightIcon } from "./ChevronRightIcon.mjs";
|
|
@@ -25,6 +27,6 @@ import { SearchIcon } from "./SearchIcon.mjs";
|
|
|
25
27
|
import { SettingsIcon } from "./SettingsIcon.mjs";
|
|
26
28
|
import { Trash2Icon } from "./Trash2Icon.mjs";
|
|
27
29
|
import { XIcon } from "./XIcon.mjs";
|
|
28
|
-
export declare const iconNames: readonly ["ArrowLeftIcon", "ArrowRightIcon", "CheckIcon", "ChevronDownIcon", "ChevronRightIcon", "CircleAlertIcon", "CircleCheckIcon", "CircleDotIcon", "CircleSlashIcon", "EllipsisIcon", "GitMergeIcon", "GitPullRequestClosedIcon", "GitPullRequestDraftIcon", "GitPullRequestIcon", "InboxIcon", "InfoIcon", "LoaderCircleIcon", "LockOpenIcon", "PencilIcon", "PlayIcon", "PlusIcon", "RefreshCwIcon", "ReplyIcon", "SearchIcon", "SettingsIcon", "Trash2Icon", "XIcon"];
|
|
30
|
+
export declare const iconNames: readonly ["ArrowDownIcon", "ArrowLeftIcon", "ArrowRightIcon", "ArrowUpIcon", "CheckIcon", "ChevronDownIcon", "ChevronRightIcon", "CircleAlertIcon", "CircleCheckIcon", "CircleDotIcon", "CircleSlashIcon", "EllipsisIcon", "GitMergeIcon", "GitPullRequestClosedIcon", "GitPullRequestDraftIcon", "GitPullRequestIcon", "InboxIcon", "InfoIcon", "LoaderCircleIcon", "LockOpenIcon", "PencilIcon", "PlayIcon", "PlusIcon", "RefreshCwIcon", "ReplyIcon", "SearchIcon", "SettingsIcon", "Trash2Icon", "XIcon"];
|
|
29
31
|
export type IconName = (typeof iconNames)[number];
|
|
30
|
-
export { ArrowLeftIcon, ArrowRightIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, CircleAlertIcon, CircleCheckIcon, CircleDotIcon, CircleSlashIcon, EllipsisIcon, GitMergeIcon, GitPullRequestClosedIcon, GitPullRequestDraftIcon, GitPullRequestIcon, InboxIcon, InfoIcon, LoaderCircleIcon, LockOpenIcon, PencilIcon, PlayIcon, PlusIcon, RefreshCwIcon, ReplyIcon, SearchIcon, SettingsIcon, Trash2Icon, XIcon };
|
|
32
|
+
export { ArrowDownIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, CheckIcon, ChevronDownIcon, ChevronRightIcon, CircleAlertIcon, CircleCheckIcon, CircleDotIcon, CircleSlashIcon, EllipsisIcon, GitMergeIcon, GitPullRequestClosedIcon, GitPullRequestDraftIcon, GitPullRequestIcon, InboxIcon, InfoIcon, LoaderCircleIcon, LockOpenIcon, PencilIcon, PlayIcon, PlusIcon, RefreshCwIcon, ReplyIcon, SearchIcon, SettingsIcon, Trash2Icon, XIcon };
|
package/dist/icons/index.mjs
CHANGED
|
@@ -3,28 +3,30 @@ import { CircleAlertIcon as t } from "./CircleAlertIcon.mjs";
|
|
|
3
3
|
import { ChevronDownIcon as n } from "./ChevronDownIcon.mjs";
|
|
4
4
|
import { SearchIcon as r } from "./SearchIcon.mjs";
|
|
5
5
|
import { XIcon as i } from "./XIcon.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
6
|
+
import { ArrowDownIcon as a } from "./ArrowDownIcon.mjs";
|
|
7
|
+
import { ArrowUpIcon as o } from "./ArrowUpIcon.mjs";
|
|
8
|
+
import { CircleCheckIcon as s } from "./CircleCheckIcon.mjs";
|
|
9
|
+
import { InfoIcon as c } from "./InfoIcon.mjs";
|
|
10
|
+
import { ArrowLeftIcon as l } from "./ArrowLeftIcon.mjs";
|
|
11
|
+
import { ArrowRightIcon as u } from "./ArrowRightIcon.mjs";
|
|
12
|
+
import { ChevronRightIcon as d } from "./ChevronRightIcon.mjs";
|
|
13
|
+
import { CircleDotIcon as f } from "./CircleDotIcon.mjs";
|
|
14
|
+
import { CircleSlashIcon as p } from "./CircleSlashIcon.mjs";
|
|
15
|
+
import { EllipsisIcon as m } from "./EllipsisIcon.mjs";
|
|
16
|
+
import { GitMergeIcon as h } from "./GitMergeIcon.mjs";
|
|
17
|
+
import { GitPullRequestClosedIcon as g } from "./GitPullRequestClosedIcon.mjs";
|
|
18
|
+
import { GitPullRequestDraftIcon as _ } from "./GitPullRequestDraftIcon.mjs";
|
|
19
|
+
import { GitPullRequestIcon as v } from "./GitPullRequestIcon.mjs";
|
|
20
|
+
import { InboxIcon as y } from "./InboxIcon.mjs";
|
|
21
|
+
import { LoaderCircleIcon as b } from "./LoaderCircleIcon.mjs";
|
|
22
|
+
import { LockOpenIcon as x } from "./LockOpenIcon.mjs";
|
|
23
|
+
import { PencilIcon as S } from "./PencilIcon.mjs";
|
|
24
|
+
import { PlayIcon as C } from "./PlayIcon.mjs";
|
|
25
|
+
import { PlusIcon as w } from "./PlusIcon.mjs";
|
|
26
|
+
import { RefreshCwIcon as T } from "./RefreshCwIcon.mjs";
|
|
27
|
+
import { ReplyIcon as E } from "./ReplyIcon.mjs";
|
|
28
|
+
import { SettingsIcon as D } from "./SettingsIcon.mjs";
|
|
29
|
+
import { Trash2Icon as O } from "./Trash2Icon.mjs";
|
|
28
30
|
// src/icons/index.ts
|
|
29
|
-
var
|
|
30
|
-
export {
|
|
31
|
+
var k = /* @__PURE__ */ "ArrowDownIcon.ArrowLeftIcon.ArrowRightIcon.ArrowUpIcon.CheckIcon.ChevronDownIcon.ChevronRightIcon.CircleAlertIcon.CircleCheckIcon.CircleDotIcon.CircleSlashIcon.EllipsisIcon.GitMergeIcon.GitPullRequestClosedIcon.GitPullRequestDraftIcon.GitPullRequestIcon.InboxIcon.InfoIcon.LoaderCircleIcon.LockOpenIcon.PencilIcon.PlayIcon.PlusIcon.RefreshCwIcon.ReplyIcon.SearchIcon.SettingsIcon.Trash2Icon.XIcon".split(".");
|
|
32
|
+
export { a as ArrowDownIcon, l as ArrowLeftIcon, u as ArrowRightIcon, o as ArrowUpIcon, e as CheckIcon, n as ChevronDownIcon, d as ChevronRightIcon, t as CircleAlertIcon, s as CircleCheckIcon, f as CircleDotIcon, p as CircleSlashIcon, m as EllipsisIcon, h as GitMergeIcon, g as GitPullRequestClosedIcon, _ as GitPullRequestDraftIcon, v as GitPullRequestIcon, y as InboxIcon, c as InfoIcon, b as LoaderCircleIcon, x as LockOpenIcon, S as PencilIcon, C as PlayIcon, w as PlusIcon, T as RefreshCwIcon, E as ReplyIcon, r as SearchIcon, D as SettingsIcon, O as Trash2Icon, i as XIcon, k as iconNames };
|
package/dist/index.d.mts
CHANGED
|
@@ -23,7 +23,8 @@ import { MenuTriggerProps } from "./Menu/client.mjs";
|
|
|
23
23
|
import { Menu, MenuGroupProps, MenuItemProps, MenuLinkItemProps, MenuPopupProps, MenuProps, MenuSeparatorProps } from "./Menu/index.mjs";
|
|
24
24
|
import { MultiSelect, MultiSelectOption, MultiSelectProps } from "./MultiSelect/index.mjs";
|
|
25
25
|
import { Stack, StackProps } from "./Stack/index.mjs";
|
|
26
|
-
import {
|
|
26
|
+
import { Switch, SwitchProps } from "./Switch/index.mjs";
|
|
27
|
+
import { Table, TableBodyProps, TableCellProps, TableColumnGroupProps, TableColumnProps, TableFootProps, TableHeadProps, TableHeaderCellProps, TableProps, TableRowProps, TableSortDirection } from "./Table/index.mjs";
|
|
27
28
|
import { Tabs, TabsListProps, TabsPanelProps, TabsProps, TabsTabProps } from "./Tabs/index.mjs";
|
|
28
29
|
import { Tag, TagProps } from "./Tag/index.mjs";
|
|
29
30
|
import { TextField, TextFieldInputProps, TextFieldProps } from "./TextField/index.mjs";
|
|
@@ -33,4 +34,4 @@ import { Toast } from "./Toast/index.mjs";
|
|
|
33
34
|
import { VisuallyHidden, VisuallyHiddenProps } from "./VisuallyHidden/index.mjs";
|
|
34
35
|
import { Theme, defineTheme } from "./theme/define-theme.mjs";
|
|
35
36
|
import { ThemeProvider, ThemeProviderProps } from "./theme/ThemeProvider.mjs";
|
|
36
|
-
export { AlertDialog, type AlertDialogProps, type AlertDialogTriggerProps, Avatar, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, Clickable, type ClickableProps, ColorField, type ColorFieldInputProps, type ColorFieldProps, Dialog, type DialogActionsProps, type DialogBodyProps, type DialogCloseProps, type DialogPopupProps, type DialogProps, type DialogTriggerProps, Field, type FieldDescriptionProps, type FieldErrorProps, type FieldLabelProps, type FieldProps, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, type IconButtonProps, type IconProps, Inline, type InlineProps, Menu, type MenuGroupProps, type MenuItemProps, type MenuLinkItemProps, type MenuPopupProps, type MenuProps, type MenuSeparatorProps, type MenuTriggerProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, SearchField, type SearchFieldInputProps, type SearchFieldProps, Stack, type StackProps, type StyleProps, Table, type TableBodyProps, type TableCellProps, type TableColumnGroupProps, type TableColumnProps, type TableFootProps, type TableHeadProps, type TableHeaderCellProps, type TableProps, type TableRowProps, Tabs, type TabsListProps, type TabsPanelProps, type TabsProps, type TabsTabProps, Tag, type TagProps, Text, TextField, type TextFieldInputProps, type TextFieldProps, type TextProps, Textarea, type TextareaInputProps, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, Toast, type ToastOptions, type ToastProviderProps, type ToastVariant, VisuallyHidden, type VisuallyHiddenProps, defineTheme, useToast };
|
|
37
|
+
export { AlertDialog, type AlertDialogProps, type AlertDialogTriggerProps, Avatar, type AvatarProps, Badge, type BadgeProps, Box, type BoxProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chip, ChipGroup, type ChipGroupProps, type ChipProps, Clickable, type ClickableProps, ColorField, type ColorFieldInputProps, type ColorFieldProps, Dialog, type DialogActionsProps, type DialogBodyProps, type DialogCloseProps, type DialogPopupProps, type DialogProps, type DialogTriggerProps, Field, type FieldDescriptionProps, type FieldErrorProps, type FieldLabelProps, type FieldProps, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, type IconButtonProps, type IconProps, Inline, type InlineProps, Menu, type MenuGroupProps, type MenuItemProps, type MenuLinkItemProps, type MenuPopupProps, type MenuProps, type MenuSeparatorProps, type MenuTriggerProps, MultiSelect, type MultiSelectOption, type MultiSelectProps, SearchField, type SearchFieldInputProps, type SearchFieldProps, Stack, type StackProps, type StyleProps, Switch, type SwitchProps, Table, type TableBodyProps, type TableCellProps, type TableColumnGroupProps, type TableColumnProps, type TableFootProps, type TableHeadProps, type TableHeaderCellProps, type TableProps, type TableRowProps, type TableSortDirection, Tabs, type TabsListProps, type TabsPanelProps, type TabsProps, type TabsTabProps, Tag, type TagProps, Text, TextField, type TextFieldInputProps, type TextFieldProps, type TextProps, Textarea, type TextareaInputProps, type TextareaProps, type Theme, ThemeProvider, type ThemeProviderProps, Toast, type ToastOptions, type ToastProviderProps, type ToastVariant, VisuallyHidden, type VisuallyHiddenProps, defineTheme, useToast };
|