@jonmilner/ui 0.11.5 → 0.11.7
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/RadioGroup/RadioGroup.css +2 -0
- package/dist/RadioGroup/RadioGroup.css.mjs +16 -0
- package/dist/RadioGroup/index.d.mts +25 -0
- package/dist/RadioGroup/index.mjs +95 -0
- package/dist/SearchField/SearchField.css +1 -1
- package/dist/Stack/Stack.css +1 -1
- package/dist/Switch/Switch.css +1 -1
- 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/Checkbox.md +1 -1
- package/dist/docs/Chip.md +1 -1
- package/dist/docs/Field.md +1 -1
- package/dist/docs/Icon.md +2 -0
- package/dist/docs/Menu.md +1 -1
- package/dist/docs/MultiSelect.md +1 -1
- package/dist/docs/RadioGroup.md +121 -0
- package/dist/docs/Switch.md +1 -1
- package/dist/docs/Table.md +43 -1
- package/dist/docs/Tabs.md +1 -1
- package/dist/docs/llms.txt +1 -0
- package/dist/docs/manifest.json +105 -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 +15 -14
- 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
|
@@ -1,2 +1,2 @@
|
|
|
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;
|
|
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.radio-group, components.search-field, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.visually-hidden, components.table;
|
|
2
2
|
@layer components.textarea{._1kwv2lp0{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}._1kwv2lp1{appearance:none;border-width:var(--space-1);border-style:solid;border-color:var(--color-border-strong);border-radius:var(--radius-med);background-color:var(--color-bg);inline-size:100%;min-inline-size:0;color:var(--color-fg);resize:block;padding-block:0}._1kwv2lp1::placeholder{color:var(--color-fg-muted);opacity:1}._1kwv2lp1:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._1kwv2lp1:disabled{background-color:var(--color-bg-muted);color:var(--color-fg-muted);cursor:not-allowed;resize:none;border-style:dashed}._1kwv2lp1[aria-invalid=true]{border-color:var(--color-danger)}._1kwv2lp2{min-block-size:var(--size-xs);padding-block:calc((var(--size-xs) - 2 * var(--space-1) - var(--font-size-xs) * var(--line-height-med)) / 2);padding-inline:var(--space-6)}._1kwv2lp3{min-block-size:var(--size-sm);padding-block:calc((var(--size-sm) - 2 * var(--space-1) - var(--font-size-sm) * var(--line-height-med)) / 2);padding-inline:var(--space-8)}._1kwv2lp4{min-block-size:var(--size-med);padding-block:calc((var(--size-med) - 2 * var(--space-1) - var(--font-size-med) * var(--line-height-med)) / 2);padding-inline:var(--space-12)}@media (pointer:coarse){._1kwv2lp1{font-size:var(--font-size-med)}._1kwv2lp2{min-block-size:max(var(--size-xs), calc(2 * var(--space-1) + var(--font-size-med) * var(--line-height-med)));padding-block:max(var(--space-0), calc((var(--size-xs) - 2 * var(--space-1) - var(--font-size-med) * var(--line-height-med)) / 2))}._1kwv2lp3{min-block-size:max(var(--size-sm), calc(2 * var(--space-1) + var(--font-size-med) * var(--line-height-med)));padding-block:max(var(--space-0), calc((var(--size-sm) - 2 * var(--space-1) - var(--font-size-med) * var(--line-height-med)) / 2))}._1kwv2lp4{min-block-size:max(var(--size-med), calc(2 * var(--space-1) + var(--font-size-med) * var(--line-height-med)));padding-block:max(var(--space-0), calc((var(--size-med) - 2 * var(--space-1) - var(--font-size-med) * var(--line-height-med)) / 2))}}@media (forced-colors:active){._1kwv2lp1:disabled{color:graytext;border-color:graytext}}}
|
package/dist/Toast/Toast.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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;
|
|
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.radio-group, components.search-field, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.visually-hidden, components.table;
|
|
2
2
|
@layer components.toast{.hcnvsc1{inline-size:min(100% - 2 * var(--space-16), 6 * var(--space-64));inset-block-end:var(--space-16);inset-inline-end:var(--space-16);container:hcnvsc0/inline-size}.hcnvsc1:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.hcnvsc2{gap:var(--space-8);margin:calc(-1 * var(--space-16));padding:var(--space-16);overscroll-behavior:contain;flex-direction:column;max-block-size:100dvh;margin-inline-start:calc(-1 * var(--space-24));padding-inline-start:var(--space-24);display:flex;overflow:hidden auto}.hcnvsc2:empty{padding:0}.hcnvsc2:has([data-swiping],[data-swipe-direction=down]){overflow-y:hidden}.hcnvsc3{border:var(--space-1) solid var(--color-border);transform:translate(var(--toast-swipe-movement-x,0), var(--toast-swipe-movement-y,0));transition:opacity var(--duration-med) var(--easing-standard), translate var(--duration-med) var(--easing-enter), transform var(--duration-med) var(--easing-enter)}.hcnvsc3:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.hcnvsc3[data-starting-style],.hcnvsc3[data-ending-style]{opacity:0;translate:0 var(--distance-med)}.hcnvsc3[data-swiping]{transition:none}.hcnvsc3[data-limited]{display:none}.hcnvsc4{overflow-wrap:anywhere}.hcnvsca{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}@container hcnvsc0 (inline-size<16rem){.hcnvsc3{flex-wrap:wrap}.hcnvsc4{flex-basis:100%;order:1}.hcnvsc5{margin-inline-start:auto}}}
|
|
@@ -1,2 +1,2 @@
|
|
|
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;
|
|
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.radio-group, components.search-field, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.visually-hidden, components.table;
|
|
2
2
|
@layer components.visually-hidden{._1qk18b30{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}}
|
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.switch, 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.radio-group, 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/Checkbox.md
CHANGED
|
@@ -12,7 +12,7 @@ A two-state choice, with a third mixed state for a "select all" over a partly se
|
|
|
12
12
|
## When not to use
|
|
13
13
|
|
|
14
14
|
- A setting that applies the moment it flips: use `Switch`.
|
|
15
|
-
- One choice out of
|
|
15
|
+
- One choice out of a few: use `RadioGroup`.
|
|
16
16
|
- Picking several options from a long list in a popup: use `MultiSelect`.
|
|
17
17
|
|
|
18
18
|
## Rules
|
package/dist/docs/Chip.md
CHANGED
|
@@ -17,7 +17,7 @@ A toggle that filters content or picks an option: "Unread", "Starred", "Medium".
|
|
|
17
17
|
- A one-off action: use `Button`.
|
|
18
18
|
- A setting that applies the moment it changes: use `Switch`.
|
|
19
19
|
- Switching between views of the same content: use `Tabs`.
|
|
20
|
-
- A form field with a required single answer:
|
|
20
|
+
- A form field with a required single answer: use `RadioGroup`; a `ChipGroup` can be cleared.
|
|
21
21
|
- Picking several values from a list too long to show: use `MultiSelect`.
|
|
22
22
|
|
|
23
23
|
## Rules
|
package/dist/docs/Field.md
CHANGED
|
@@ -13,7 +13,7 @@ Wires one form control to its label, description and error: ids, `htmlFor`, `ari
|
|
|
13
13
|
|
|
14
14
|
- An error about the whole form (a failed save, a network error): put it in a reserved slot at the form level, not on one field.
|
|
15
15
|
- The result of submitting the form ("Profile saved"): use `Toast`; the field's message is for that one input.
|
|
16
|
-
- A group of controls with one legend: a public `Fieldset` is not planned (ADR 0133). For checkboxes, write a native `fieldset` and `legend` with one Field per Checkbox. For one choice among a few, `RadioGroup`
|
|
16
|
+
- A group of controls with one legend: a public `Fieldset` is not planned (ADR 0133). For checkboxes, write a native `fieldset` and `legend` with one Field per Checkbox. For one choice among a few, `RadioGroup` carries its own legend.
|
|
17
17
|
- A single line of text, several lines, a search, a colour or a choice from a list: use `TextField`, `Textarea`, `SearchField`, `ColorField` or `MultiSelect`, which build on this Field.
|
|
18
18
|
|
|
19
19
|
## Rules
|
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`)
|
package/dist/docs/Menu.md
CHANGED
|
@@ -12,7 +12,7 @@ A list of actions that opens from a button: a row's "Edit, Duplicate, Delete", a
|
|
|
12
12
|
|
|
13
13
|
## When not to use
|
|
14
14
|
|
|
15
|
-
- Picking a value for a form field: a single `Select`
|
|
15
|
+
- Picking a value for a form field: a single `Select` or `RadioGroup` (a few options, all shown); for several values from a long list, use `MultiSelect`.
|
|
16
16
|
- Navigation between pages: a menu that is only links is still navigation, so show the links on the page or in a nav. Link items are for a menu that mixes actions and links.
|
|
17
17
|
- One or two actions: show them as buttons.
|
|
18
18
|
- Content a user reads, or anything interactive inside the list (fields, toggles): use a popover or a dialog.
|
package/dist/docs/MultiSelect.md
CHANGED
|
@@ -14,7 +14,7 @@ A form field for picking any number of values from a list too long to show at on
|
|
|
14
14
|
- A few options, all visible on the page: use `ChipGroup multiple`.
|
|
15
15
|
- A short list shown inline, each with its own label: use a group of `Checkbox`es, one `Field` each, in a native `fieldset` with a `legend`.
|
|
16
16
|
- Actions: use `Menu`; a multi-select picks values and runs nothing.
|
|
17
|
-
- One choice out of several: use
|
|
17
|
+
- One choice out of several: use `RadioGroup` for a few, a single select for a long list.
|
|
18
18
|
- Search, filtering or async options: wait for `Select` and `Combobox` (planned).
|
|
19
19
|
- Users who need to see every selected value at once: use `Chip` or `ChipGroup`, or show the selection beside the field.
|
|
20
20
|
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# RadioGroup
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
One choice among a few options, all shown at once. A form field built on Base UI `RadioGroup` and `Radio` (ADR 0003, 0046) inside a `Fieldset`: a `radiogroup` named by its legend, with a `radio` per option. Each option is a 24 by 24 CSS px target (WCAG 2.2) with the shared focus ring; the 16px circle inside shows a dot when checked. It composes `Field` for the group's description and error and for each option's label and description (ADR 0026, 0133).
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
- A required or defaulted single answer with two to five options, where the user should compare them before choosing ("Plan: Free, Team, Enterprise").
|
|
10
|
+
- A setting in a form that takes effect on submit and has a few mutually exclusive values.
|
|
11
|
+
|
|
12
|
+
## When not to use
|
|
13
|
+
|
|
14
|
+
- Many options, or little room: use `Select`.
|
|
15
|
+
- Several options may be on at once: use `Checkbox`, one `Field` each in a native `fieldset`; for a long list in a popup, `MultiSelect`; for a compact row of toggles, `ChipGroup multiple`.
|
|
16
|
+
- An immediate on/off setting: use `Switch`.
|
|
17
|
+
- Switching between views of the same content: use `Tabs`.
|
|
18
|
+
- Options that can be left unchosen after the first pick: a radio cannot be cleared; use `Select` with an empty option or `ChipGroup`.
|
|
19
|
+
|
|
20
|
+
## Rules
|
|
21
|
+
|
|
22
|
+
- Pass `label`: it is the group's legend and its accessible name. `options` is data, not children: each is `{ value, label, description?, disabled? }`.
|
|
23
|
+
- `name` submits the checked option as `name=value`; with none checked, nothing is submitted. Put `name` on the RadioGroup.
|
|
24
|
+
- `value` with `onValueChange` controls it; `defaultValue` leaves it uncontrolled. A controlled `value` of `null` checks none, so start or reset a form with `null`, not `undefined`. `onValueChange` receives the value string only.
|
|
25
|
+
- To start with nothing checked, leave `defaultValue` unset. Pair that with `required` and `error` when an answer is mandatory.
|
|
26
|
+
- `description` is help for the whole group, under the options. An option's own `description` sits under its label.
|
|
27
|
+
- `error` with a non-empty message marks the group invalid (`aria-invalid` on the group) and shows the message in `Field.Error`; the ring of each radio, checked or not, thickens and turns `danger`. Pass the server's message through it (ADR 0133).
|
|
28
|
+
- `disabled` disables the whole group and mutes the legend; an option's `disabled` disables that radio only, which the arrow keys skip.
|
|
29
|
+
- `orientation` is `vertical` (default) or `horizontal`; horizontal puts the options in a row that wraps.
|
|
30
|
+
- `size` (`sm`, `med`, `lg`, default `med`) sets the option labels' text to 12, 14 and 16px. The circle stays 16px in its 24px target at every size (ADR 0124).
|
|
31
|
+
- Style props, `className` and `style` go to the `Field` root. The module has no hooks, so a server component can render it; `onValueChange` is a function, so set it from a client component.
|
|
32
|
+
- Style states off the ARIA attributes (`[aria-checked='true']`, `[aria-disabled='true']`, `[aria-invalid='true']`), not Base UI's `data-*` attributes.
|
|
33
|
+
|
|
34
|
+
## Do
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
<RadioGroup
|
|
38
|
+
name="plan"
|
|
39
|
+
label="Plan"
|
|
40
|
+
description="You can change it later."
|
|
41
|
+
defaultValue="team"
|
|
42
|
+
options={[
|
|
43
|
+
{ value: "free", label: "Free" },
|
|
44
|
+
{ value: "team", label: "Team", description: "Up to 10 members" },
|
|
45
|
+
{ value: "enterprise", label: "Enterprise", disabled: true },
|
|
46
|
+
]}
|
|
47
|
+
error={errors?.plan}
|
|
48
|
+
/>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
<RadioGroup
|
|
53
|
+
label="Run when"
|
|
54
|
+
orientation="horizontal"
|
|
55
|
+
value={mode}
|
|
56
|
+
onValueChange={setMode}
|
|
57
|
+
options={[
|
|
58
|
+
{ value: "now", label: "Now" },
|
|
59
|
+
{ value: "later", label: "Later" },
|
|
60
|
+
]}
|
|
61
|
+
/>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Don't
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
// Eleven options: use Select.
|
|
68
|
+
<RadioGroup label="Country" options={countries} />
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
// Not exclusive: use a Checkbox per option.
|
|
73
|
+
<RadioGroup
|
|
74
|
+
label="Notify me by"
|
|
75
|
+
options={[
|
|
76
|
+
{ value: "email", label: "Email" },
|
|
77
|
+
{ value: "sms", label: "SMS" },
|
|
78
|
+
]}
|
|
79
|
+
/>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
// A single option is not a choice: use a Checkbox.
|
|
84
|
+
<RadioGroup label="Accept the terms" options={[{ value: "yes", label: "Yes" }]} />
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Accessibility
|
|
88
|
+
|
|
89
|
+
- A `radiogroup` named by its `fieldset` legend (`label`); each option is a `radio` with `aria-checked`, named by its own label.
|
|
90
|
+
- Arrow keys move to the next or previous radio and check it; Tab enters the group at the checked radio, or the first when none is checked, and leaves it in one press. Space checks the focused radio.
|
|
91
|
+
- A disabled option is skipped by the arrow keys and announced as disabled; `aria-required` follows `required`.
|
|
92
|
+
- An option's description joins that radio's `aria-describedby`. The group's description and the error join it too, and `error` sets `aria-invalid`. The error slot is the field's one live region (ADR 0097).
|
|
93
|
+
- The target is 24 by 24 CSS px at every size; the focus ring wraps the target, not the circle.
|
|
94
|
+
- The ring and the checked dot pass 3:1 against the surface in light and dark. Checked is a dot as well as an `accent` ring, invalid a thicker ring, disabled a dashed one, so no state is color alone.
|
|
95
|
+
- Under forced colors the ring and dot keep their roles' system colors and the focus ring is `Highlight`.
|
|
96
|
+
- Under reduced motion the dot crossfades in without scaling.
|
|
97
|
+
|
|
98
|
+
## Props
|
|
99
|
+
|
|
100
|
+
Generated from the TypeScript types.
|
|
101
|
+
|
|
102
|
+
### RadioGroup
|
|
103
|
+
|
|
104
|
+
| Prop | Type | Required | Description |
|
|
105
|
+
| --- | --- | --- | --- |
|
|
106
|
+
| `className` | `string` | no | |
|
|
107
|
+
| `defaultValue` | `string` | no | |
|
|
108
|
+
| `description` | `ReactNode` | no | |
|
|
109
|
+
| `disabled` | `boolean` | no | |
|
|
110
|
+
| `error` | `ReactNode` | no | |
|
|
111
|
+
| `label` | `ReactNode` | yes | |
|
|
112
|
+
| `name` | `string` | no | |
|
|
113
|
+
| `onValueChange` | `((value: string) => void)` | no | |
|
|
114
|
+
| `options` | `readonly RadioGroupOption[]` | yes | |
|
|
115
|
+
| `orientation` | `"horizontal" \| "vertical"` | no | |
|
|
116
|
+
| `required` | `boolean` | no | |
|
|
117
|
+
| `size` | `"lg" \| "med" \| "sm"` | no | |
|
|
118
|
+
| `style` | `CSSProperties` | no | |
|
|
119
|
+
| `value` | `string` | no | |
|
|
120
|
+
|
|
121
|
+
Also accepts the style props (see `manifest.json` `styleProps`).
|
package/dist/docs/Switch.md
CHANGED
|
@@ -13,7 +13,7 @@ Turns one setting on or off, and the change applies the moment it flips. Built o
|
|
|
13
13
|
|
|
14
14
|
- A choice sent when the form is submitted ("Accept the terms"), or picking items from a list: use `Checkbox`.
|
|
15
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
|
|
16
|
+
- Two options that are not on and off ("Monthly" or "Yearly"): use `RadioGroup`.
|
|
17
17
|
|
|
18
18
|
## Rules
|
|
19
19
|
|
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/Tabs.md
CHANGED
|
@@ -13,7 +13,7 @@ Switches between views that share one place on the page. The parts are `Tabs` (t
|
|
|
13
13
|
|
|
14
14
|
- Moving between pages or routes: use links (`Clickable as="a"`) in a `nav`. Tabs do not change the URL and the panels are not separate pages.
|
|
15
15
|
- A sequence the user must go through in order: use a stepper.
|
|
16
|
-
- Two or three options that set a value in a form: use
|
|
16
|
+
- Two or three options that set a value in a form: use `RadioGroup`.
|
|
17
17
|
- Content that should be readable at once, or compared side by side: show it all, or use sections with headings.
|
|
18
18
|
|
|
19
19
|
## Rules
|
package/dist/docs/llms.txt
CHANGED
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
- [Inline](Inline.md): A horizontal row of children that wraps onto new lines, with even space between them on both axes. `Inline` is a `Box` with `display="flex"`, `flexDirection="row"`, `flexWrap="wrap"` and `alignItems="center"` as default style props, spaced by a required `gap`. Children render as they are: no wrapper per child.
|
|
29
29
|
- [Menu](Menu.md): A list of actions that opens from a button: a row's "Edit, Duplicate, Delete", a toolbar's overflow. It may mix in links ("Open invoice", "Download PDF") as `Menu.LinkItem`, real anchors that keep the browser's link behavior. Built on Base UI's Menu, which owns the keyboard and focus: arrow keys, Home and End move through the items, typing jumps to a matching item, Esc and an outside click close it, and focus returns to the trigger. The parts add the look: a raised surface with a border and shadow, a highlighted item, a zoom-and-fade that is a plain fade under reduced motion.
|
|
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
|
+
- [RadioGroup](RadioGroup.md): One choice among a few options, all shown at once. A form field built on Base UI `RadioGroup` and `Radio` (ADR 0003, 0046) inside a `Fieldset`: a `radiogroup` named by its legend, with a `radio` per option. Each option is a 24 by 24 CSS px target (WCAG 2.2) with the shared focus ring; the 16px circle inside shows a dot when checked. It composes `Field` for the group's description and error and for each option's label and description (ADR 0026, 0133).
|
|
31
32
|
- [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
33
|
- [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
34
|
- [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.
|
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.7",
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
7
7
|
"name": "AlertDialog",
|
|
@@ -1705,6 +1705,93 @@
|
|
|
1705
1705
|
"parts": [],
|
|
1706
1706
|
"exports": []
|
|
1707
1707
|
},
|
|
1708
|
+
{
|
|
1709
|
+
"name": "RadioGroup",
|
|
1710
|
+
"styleProps": true,
|
|
1711
|
+
"props": [
|
|
1712
|
+
{
|
|
1713
|
+
"name": "className",
|
|
1714
|
+
"type": "string",
|
|
1715
|
+
"required": false
|
|
1716
|
+
},
|
|
1717
|
+
{
|
|
1718
|
+
"name": "defaultValue",
|
|
1719
|
+
"type": "string",
|
|
1720
|
+
"required": false
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
"name": "description",
|
|
1724
|
+
"type": "ReactNode",
|
|
1725
|
+
"required": false
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
"name": "disabled",
|
|
1729
|
+
"type": "boolean",
|
|
1730
|
+
"required": false
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
"name": "error",
|
|
1734
|
+
"type": "ReactNode",
|
|
1735
|
+
"required": false
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
"name": "label",
|
|
1739
|
+
"type": "ReactNode",
|
|
1740
|
+
"required": true
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
"name": "name",
|
|
1744
|
+
"type": "string",
|
|
1745
|
+
"required": false
|
|
1746
|
+
},
|
|
1747
|
+
{
|
|
1748
|
+
"name": "onValueChange",
|
|
1749
|
+
"type": "((value: string) => void)",
|
|
1750
|
+
"required": false
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
"name": "options",
|
|
1754
|
+
"type": "readonly RadioGroupOption[]",
|
|
1755
|
+
"required": true
|
|
1756
|
+
},
|
|
1757
|
+
{
|
|
1758
|
+
"name": "orientation",
|
|
1759
|
+
"type": "\"horizontal\" | \"vertical\"",
|
|
1760
|
+
"required": false,
|
|
1761
|
+
"values": [
|
|
1762
|
+
"horizontal",
|
|
1763
|
+
"vertical"
|
|
1764
|
+
]
|
|
1765
|
+
},
|
|
1766
|
+
{
|
|
1767
|
+
"name": "required",
|
|
1768
|
+
"type": "boolean",
|
|
1769
|
+
"required": false
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
"name": "size",
|
|
1773
|
+
"type": "\"lg\" | \"med\" | \"sm\"",
|
|
1774
|
+
"required": false,
|
|
1775
|
+
"values": [
|
|
1776
|
+
"lg",
|
|
1777
|
+
"med",
|
|
1778
|
+
"sm"
|
|
1779
|
+
]
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
"name": "style",
|
|
1783
|
+
"type": "CSSProperties",
|
|
1784
|
+
"required": false
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
"name": "value",
|
|
1788
|
+
"type": "string",
|
|
1789
|
+
"required": false
|
|
1790
|
+
}
|
|
1791
|
+
],
|
|
1792
|
+
"parts": [],
|
|
1793
|
+
"exports": []
|
|
1794
|
+
},
|
|
1708
1795
|
{
|
|
1709
1796
|
"name": "SearchField",
|
|
1710
1797
|
"styleProps": true,
|
|
@@ -2096,6 +2183,11 @@
|
|
|
2096
2183
|
"type": "boolean",
|
|
2097
2184
|
"required": false
|
|
2098
2185
|
},
|
|
2186
|
+
{
|
|
2187
|
+
"name": "onSort",
|
|
2188
|
+
"type": "((() => void) & (() => void))",
|
|
2189
|
+
"required": false
|
|
2190
|
+
},
|
|
2099
2191
|
{
|
|
2100
2192
|
"name": "size",
|
|
2101
2193
|
"type": "\"2xl\" | \"3xl\" | \"4xl\" | \"lg\" | \"med\" | \"sm\" | \"xl\" | \"xs\"",
|
|
@@ -2111,6 +2203,16 @@
|
|
|
2111
2203
|
"xs"
|
|
2112
2204
|
]
|
|
2113
2205
|
},
|
|
2206
|
+
{
|
|
2207
|
+
"name": "sort",
|
|
2208
|
+
"type": "\"ascending\" | \"descending\" | \"none\"",
|
|
2209
|
+
"required": false,
|
|
2210
|
+
"values": [
|
|
2211
|
+
"ascending",
|
|
2212
|
+
"descending",
|
|
2213
|
+
"none"
|
|
2214
|
+
]
|
|
2215
|
+
},
|
|
2114
2216
|
{
|
|
2115
2217
|
"name": "weight",
|
|
2116
2218
|
"type": "\"bold\" | \"medium\" | \"regular\" | \"semibold\"",
|
|
@@ -3425,8 +3527,10 @@
|
|
|
3425
3527
|
}
|
|
3426
3528
|
],
|
|
3427
3529
|
"icons": [
|
|
3530
|
+
"ArrowDownIcon",
|
|
3428
3531
|
"ArrowLeftIcon",
|
|
3429
3532
|
"ArrowRightIcon",
|
|
3533
|
+
"ArrowUpIcon",
|
|
3430
3534
|
"CheckIcon",
|
|
3431
3535
|
"ChevronDownIcon",
|
|
3432
3536
|
"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 };
|