@lumiose/ui 0.1.0 → 0.1.2

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.
Files changed (62) hide show
  1. package/README.md +2 -2
  2. package/dist/accordion/accordion.tsx +3 -2
  3. package/dist/autocomplete/autocomplete.tsx +6 -5
  4. package/dist/avatar/avatar.tsx +4 -3
  5. package/dist/batched.ts +11 -0
  6. package/dist/checkbox/checkbox.tsx +4 -3
  7. package/dist/checkbox-group/checkbox-group.tsx +3 -2
  8. package/dist/collapsible/collapsible.tsx +3 -2
  9. package/dist/combobox/combobox.tsx +6 -5
  10. package/dist/context-menu/context-menu.tsx +4 -3
  11. package/dist/dialog/dialog.tsx +2 -1
  12. package/dist/field/field.tsx +11 -10
  13. package/dist/form/reset.ts +4 -2
  14. package/dist/input/input.tsx +4 -1
  15. package/dist/menu/menu.tsx +9 -8
  16. package/dist/navigation-menu/navigation-menu.tsx +4 -3
  17. package/dist/number-field/number-field.tsx +4 -3
  18. package/dist/otp-field/otp-field.tsx +9 -8
  19. package/dist/popover/popover-hover.script.ts +27 -0
  20. package/dist/popover/popover.script.ts +19 -25
  21. package/dist/popover/popover.tsx +8 -3
  22. package/dist/preview-card/preview-card.tsx +2 -1
  23. package/dist/radio-group/radio-group.tsx +3 -2
  24. package/dist/select/select.script.ts +26 -0
  25. package/dist/select/select.tsx +36 -10
  26. package/dist/slider/slider.tsx +4 -3
  27. package/dist/switch/switch.tsx +4 -3
  28. package/dist/tabs/tabs.tsx +3 -2
  29. package/dist/toast/toast.tsx +3 -2
  30. package/dist/toggle/toggle.tsx +6 -5
  31. package/dist/toggle-group/toggle-group.script.ts +12 -4
  32. package/dist/toggle-group/toggle-group.tsx +16 -4
  33. package/dist/tooltip/tooltip.tsx +4 -1
  34. package/docs/README.md +9 -6
  35. package/docs/accordion.md +3 -2
  36. package/docs/autocomplete.md +2 -2
  37. package/docs/avatar.md +2 -2
  38. package/docs/checkbox-group.md +1 -1
  39. package/docs/checkbox.md +1 -1
  40. package/docs/collapsible.md +4 -3
  41. package/docs/combobox.md +4 -3
  42. package/docs/context-menu.md +3 -3
  43. package/docs/dialog.md +1 -1
  44. package/docs/drawer.md +3 -2
  45. package/docs/field.md +2 -2
  46. package/docs/installation.md +3 -3
  47. package/docs/llms-full.txt +107 -72
  48. package/docs/llms.txt +14 -14
  49. package/docs/menu.md +4 -3
  50. package/docs/menubar.md +3 -3
  51. package/docs/navigation-menu.md +4 -3
  52. package/docs/otp-field.md +2 -2
  53. package/docs/popover.md +7 -4
  54. package/docs/preview-card.md +4 -3
  55. package/docs/radio-group.md +1 -1
  56. package/docs/select.md +25 -10
  57. package/docs/tabs.md +1 -1
  58. package/docs/toast.md +2 -2
  59. package/docs/toggle-group.md +10 -4
  60. package/docs/toolbar.md +2 -2
  61. package/docs/tooltip.md +4 -3
  62. package/package.json +1 -1
package/docs/llms.txt CHANGED
@@ -16,38 +16,38 @@ props, events and styling hooks. The Lumiose docs: `node_modules/lumiose/docs/ll
16
16
  ## Components
17
17
 
18
18
  - [Accordion](accordion.md): A stack of items whose triggers show and hide their panels, after the WAI-ARIA accordion pattern: each item is a native `<details>`, one open at a time through the browser's exclusive group (`name`) or several, so it works in server HTML with no JavaScript and find-in-page opens the item it lands in. `<lu-accordion>`, a 1 kB light-DOM element, adds the arrow keys and Base UI's animation hooks. `bind:value` (or `value` and `onValueChange`) keeps a signal in sync.
19
- - [Autocomplete](autocomplete.md): A text input with suggestions, for text that may be anything (a search, a tag, an address): the WAI-ARIA combobox pattern with list autocomplete, after Base UI's Autocomplete. Unlike a Combobox, the text is the value: the input has the name and submits what is typed, and choosing a suggestion only fills it in. It runs on the Combobox's element (`<lu-combobox free>`, 5.0 kB) and parts, on server-rendered pages and in islands; `bind:value` keeps a signal in sync. Filtering, inline completion, groups, an empty state and a status.
19
+ - [Autocomplete](autocomplete.md): A text input with suggestions, for text that may be anything (a search, a tag, an address): the WAI-ARIA combobox pattern with list autocomplete, after Base UI's Autocomplete. Unlike a Combobox, the text is the value: the input has the name and submits what is typed, and choosing a suggestion only fills it in. It runs on the Combobox's element (`<lu-combobox free>`, 5.8 kB) and parts, on server-rendered pages and in islands; `bind:value` keeps a signal in sync. Filtering, inline completion, groups, an empty state and a status.
20
20
  - [Avatar](avatar.md): A person's picture with a fallback, such as their initials, after Base UI's Avatar: the image loads in the server HTML and shows once it has loaded, the fallback shows until then, after an optional delay, and when the image fails. Both sit in one cell, so neither moves the other. A 0.5 kB script follows the image's loading status; without JavaScript an avatar with an image shows the image alone.
21
21
  - [Button](button.md): A native `<button>`, after Base UI's Button. It is `type="button"` unless you say otherwise, so it submits a form only when asked to. Disabled it leaves the tab order; with `focusableWhenDisabled` it stays focusable as `aria-disabled="true"` (a loading state keeps focus where it was) and a tiny script cancels its clicks.
22
22
  - [Checkbox](checkbox.md): A native `<input type="checkbox">`, after Base UI's Checkbox: Space and a label click toggle it, the form submits its value when checked, reset and `required` work, in server HTML and without JavaScript. `indeterminate`, `readOnly`, the parent checkbox of a Checkbox Group and `bind:checked` come on top, with a 1.0 kB script shared with Radio Group and Switch.
23
23
  - [Checkbox Group](checkbox-group.md): A group of checkboxes with one value, the list of the checked ones, after Base UI's CheckboxGroup: a native `<fieldset>` whose checkboxes share a name, so the form submits each checked value and a disabled group disables them all, without JavaScript. A parent checkbox checks them all and shows checked, mixed or unchecked as they are; `bind:value` keeps a signal in sync.
24
- - [Collapsible](collapsible.md): A panel that its trigger shows and hides: a native `<details>` whose `<summary>` is the trigger, so it works in server HTML with no JavaScript, keeps the browser's keyboard handling, and opens when find-in-page or a link lands inside it. A 0.7 kB script adds Base UI's animation hooks. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
25
- - [Combobox](combobox.md): A text input that filters a list of options, for picking one value or several from many: the WAI-ARIA combobox pattern with list autocomplete, after Base UI's Combobox. The input shows the option's label and the form gets its value. `<lu-combobox>`, a 5.4 kB form-associated light-DOM element, runs it on server-rendered pages and in islands; `bind:value` and `bind:open` keep signals in sync. Groups, an empty state, a status, a clear button, multiple values with chips, validation and async options.
26
- - [Context Menu](context-menu.md): A menu opened at the pointer by a right-click in its trigger area, a long press on a touch screen, or Shift+F10 and the ContextMenu key: Menu's popup and items, with Menu's keys, typeahead, submenus and dismissal. A 0.6 kB script on top of Menu's (4.6 kB together) opens it; without JavaScript the browser shows its own menu. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
24
+ - [Collapsible](collapsible.md): A panel that its trigger shows and hides: a native `<details>` whose `<summary>` is the trigger, so it works in server HTML with no JavaScript, keeps the browser's keyboard handling, and opens when find-in-page or a link lands inside it. A 0.9 kB script adds Base UI's animation hooks. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
25
+ - [Combobox](combobox.md): A text input that filters a list of options, for picking one value or several from many: the WAI-ARIA combobox pattern with list autocomplete, after Base UI's Combobox. The input shows the option's label and the form gets its value. `<lu-combobox>`, a 5.8 kB form-associated light-DOM element, runs it on server-rendered pages and in islands; `bind:value` and `bind:open` keep signals in sync. Groups, an empty state, a status, a clear button, multiple values with chips, validation and async options.
26
+ - [Context Menu](context-menu.md): A menu opened at the pointer by a right-click in its trigger area, a long press on a touch screen, or Shift+F10 and the ContextMenu key: Menu's popup and items, with Menu's keys, typeahead, submenus and dismissal. A 0.9 kB script on top of Menu's (5.4 kB together) opens it; without JavaScript the browser shows its own menu. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
27
27
  - [Dialog](dialog.md): A modal dialog, or an alert dialog that needs an answer: a native `<dialog>` opened and closed by invoker commands, so it works in server HTML with no JavaScript, and a 1.5 kB script closes the native element's gaps where JavaScript runs. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
28
28
  - [Drawer](drawer.md): A panel that slides in from an edge of the window and that a swipe toward that edge closes: a Dialog (a native modal `<dialog>` opened by an invoker command, so it works in server HTML with no JavaScript) against the edge its `swipeDirection` names. A 1 kB script adds the swipe, with the close buttons, Escape and a click on the backdrop as its alternatives. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
29
29
  - [Field](field.md): A form field: a label, a native control, a description and its errors, wired with `for`, `aria-describedby` and `aria-invalid`, after Base UI's Field. Validation is the browser's constraint validation (`required`, `type`, `pattern`, `minlength`…); a 1.7 kB script shows it in the field's Error parts at the right time, instead of the browser's bubble, and focuses the first invalid field on submit. A Form's server errors render in the HTML, so they work without JavaScript. In an island, `validate` adds checks of your own, async ones included, and `Field.Validity` renders from the field's validity.
30
30
  - [Fieldset](fieldset.md): A group of related fields with a caption: a native `<fieldset>` and `<legend>`, after Base UI's Fieldset. The browser names the group by its legend and disables every control inside a disabled fieldset, with no JavaScript and no CSS of its own. The legend also names a Checkbox Group or a Radio Group.
31
31
  - [Form](form.md): A native `<form>` that hands its fields the server's errors, after Base UI's Form. Pass the data a form action gives `fail()` as `errors`, and each Field shows the message for its `name`, in the HTML the server renders back (no JavaScript needed) or, with `submit()`, in an island. Submission, validation and the first invalid field's focus are the platform's and Field's.
32
32
  - [Input](input.md): A native `<input>`, after Base UI's Input: every type, constraint and autofill the browser has, plus `onValueChange` and `bind:value`. Inside a Field (as `Field.Control`) it takes the field's id, name and ARIA references. No script, no CSS of its own.
33
- - [Menu](menu.md): A menu of commands, links, checkbox and radio items and submenus, opened by a button: the trigger's `popovertarget` opens it and CSS anchor positioning places it, so it works in server HTML with no JavaScript, and a 4.0 kB script adds the APG Menu Button keyboard contract where JavaScript runs. `bind:open`, `bind:checked` and `bind:value` keep signals in sync in islands.
34
- - [Menubar](menubar.md): A bar of menus, such as an app's File, Edit and View, after Base UI's Menubar and the WAI-ARIA menubar pattern: `Menu.Root`s inside `<lu-menubar role="menubar">`, whose triggers are the bar's items. Menu's popups, items, submenus and dismissal; the bar is one tab stop, the arrow keys move between its items and between open menus, and once a menu is open, hovering another item opens its menu instead. A 0.7 kB script on top of Menu's (4.7 kB together); without JavaScript each trigger opens its menu.
33
+ - [Menu](menu.md): A menu of commands, links, checkbox and radio items and submenus, opened by a button: the trigger's `popovertarget` opens it and CSS anchor positioning places it, so it works in server HTML with no JavaScript, and a 4.4 kB script adds the APG Menu Button keyboard contract where JavaScript runs. `bind:open`, `bind:checked` and `bind:value` keep signals in sync in islands.
34
+ - [Menubar](menubar.md): A bar of menus, such as an app's File, Edit and View, after Base UI's Menubar and the WAI-ARIA menubar pattern: `Menu.Root`s inside `<lu-menubar role="menubar">`, whose triggers are the bar's items. Menu's popups, items, submenus and dismissal; the bar is one tab stop, the arrow keys move between its items and between open menus, and once a menu is open, hovering another item opens its menu instead. A 1.1 kB script on top of Menu's (5.5 kB together); without JavaScript each trigger opens its menu.
35
35
  - [Meter](meter.md): A measurement within a known range (storage used, a password's strength, a rating), after Base UI's Meter: a native `<meter>` (with its value, range and `aria-valuetext`), labelled, with the value as text (a percentage of the range by default, or your `Intl.NumberFormat` options). No script.
36
- - [Navigation Menu](navigation-menu.md): A site's navigation whose items open panels of links, after Base UI's NavigationMenu and the WAI-ARIA disclosure navigation pattern: a `<nav>` landmark around a list, each trigger opening its content through `popovertarget` (a native popover placed under it by CSS anchor positioning), so the links work and the panels open on a click, one at a time, in server HTML with no JavaScript. A 3.5 kB script adds hover intent, the arrow keys, closing when focus leaves and the direction a panel comes in from. `bind:value` (or `value` and `onValueChange`) keeps the open item in a signal.
36
+ - [Navigation Menu](navigation-menu.md): A site's navigation whose items open panels of links, after Base UI's NavigationMenu and the WAI-ARIA disclosure navigation pattern: a `<nav>` landmark around a list, each trigger opening its content through `popovertarget` (a native popover placed under it by CSS anchor positioning), so the links work and the panels open on a click, one at a time, in server HTML with no JavaScript. A 4.0 kB script adds hover intent, the arrow keys, closing when focus leaves and the direction a panel comes in from. `bind:value` (or `value` and `onValueChange`) keeps the open item in a signal.
37
37
  - [Number Field](number-field.md): A number input with buttons to step it, after Base UI's NumberField and the APG spinbutton. Without `format` it is a native `<input type="number">`, which steps, validates and submits without JavaScript; with `format` (`Intl.NumberFormat` options: a currency, a percentage, grouping) it shows the formatted number, reads what is typed back in the same locale, and a hidden input submits the number. `<lu-number-field>`'s 2.6 kB script adds Page Up and Page Down, Home and End, press-and-hold buttons, a scrub area, the wheel when asked, and commit-time clamping. `bind:value` keeps a signal in sync.
38
- - [OTP Field](otp-field.md): A one-time code input, after Base UI's OTPField: one native `<input>` shown as one slot per character. SMS autofill (`autocomplete="one-time-code"`), paste, Backspace, the arrow keys, `maxlength`, `pattern`, `required` and the form's value are the platform's, without JavaScript too, and assistive technology meets one labelled text field. `<lu-otp-field>`'s 1.5 kB script lays the input over the slots, keeps the code to the allowed characters, and reports completion. `bind:value` keeps a signal in sync.
39
- - [Popover](popover.md): A popup anchored to its trigger: a native `popover` opened and closed by the trigger's `popovertarget`, placed with CSS anchor positioning, so it works in server HTML with no JavaScript. A 3.3 kB script moves focus into it and back, dismisses it as Base UI does (not on a right-click), keeps `aria-expanded` current and places it in browsers without anchor positioning. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands. A trigger can open it on hover (`openOnHover`), and a `modal` popover is a modal `<dialog>` that makes the page behind it inert.
40
- - [Preview Card](preview-card.md): A card that previews a link's destination while the pointer or keyboard focus rests on the link, after Base UI's PreviewCard. The trigger is the link itself, which works as a link without JavaScript; the card is a manual popover placed with Popover's placement and opened with its hover timing by a 2.8 kB script. It is hoverable, persistent and dismissible (WCAG 1.4.13). `bind:open` keeps a signal in sync.
38
+ - [OTP Field](otp-field.md): A one-time code input, after Base UI's OTPField: one native `<input>` shown as one slot per character. SMS autofill (`autocomplete="one-time-code"`), paste, Backspace, the arrow keys, `maxlength`, `pattern`, `required` and the form's value are the platform's, without JavaScript too, and assistive technology meets one labelled text field. `<lu-otp-field>`'s 1.6 kB script lays the input over the slots, keeps the code to the allowed characters, and reports completion. `bind:value` keeps a signal in sync.
39
+ - [Popover](popover.md): A popup anchored to its trigger: a native `popover` opened and closed by the trigger's `popovertarget`, placed with CSS anchor positioning, so it works in server HTML with no JavaScript. A 3.2 kB script moves focus into it and back, dismisses it as Base UI does (not on a right-click), keeps `aria-expanded` current and places it in browsers without anchor positioning. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands. A trigger can open it on hover (`openOnHover`), and a `modal` popover is a modal `<dialog>` that makes the page behind it inert.
40
+ - [Preview Card](preview-card.md): A card that previews a link's destination while the pointer or keyboard focus rests on the link, after Base UI's PreviewCard. The trigger is the link itself, which works as a link without JavaScript; the card is a manual popover placed with Popover's placement and opened with its hover timing by a 3.4 kB script. It is hoverable, persistent and dismissible (WCAG 1.4.13). `bind:open` keeps a signal in sync.
41
41
  - [Progress](progress.md): A task's progress, after Base UI's Progress: a native `<progress>` (the progress bar for assistive technology, with its value and `aria-valuetext`), labelled, with the value as text (a percentage by default, or your `Intl.NumberFormat` options). With no value it is indeterminate. No script.
42
42
  - [Radio](radio-group.md): A group of radios with one value, after Base UI's RadioGroup and Radio: native radios in a `<fieldset role="radiogroup">`. The browser gives the group one tab stop, arrow keys that move and select (skipping disabled radios), `required`, submission and reset, in server HTML and without JavaScript; a legend names the group. `bind:value` keeps a signal in sync.
43
43
  - [Scroll Area](scroll-area.md): A scrolling region with custom scrollbars laid over native scrolling, after Base UI's ScrollArea. The viewport scrolls natively (the wheel, touch, the keyboard, find-in-page), is focusable while it overflows, and traps nothing; without JavaScript its native scrollbars show. `<lu-scroll-area>`'s 1.6 kB script hides them and draws its own, which show on hover, while scrolling and while focused, take a thumb drag and a track press, and expose the overflow as data attributes and CSS variables.
44
- - [Select](select.md): A native `<select>` for picking one value from a list: it works with no JavaScript, submits with its form and keeps the platform's keyboard, typeahead and mobile pickers. Where the browser has customizable select (`appearance: base-select`, Chrome 135, Safari 26), `Select.Trigger` and `Select.Value` shape the button, the picker is styleable and options may hold more than text; elsewhere it is the classic select. No script; `bind:value` keeps a signal in sync in islands.
44
+ - [Select](select.md): A native `<select>` for picking one value from a list: it works with no JavaScript, submits with its form and keeps the platform's keyboard, typeahead and mobile pickers. Where the browser has customizable select (`appearance: base-select`, Chrome 135, Safari 26), `Select.Trigger` and `Select.Value` shape the button, the picker is styleable and options may hold more than text; elsewhere it is the classic select. No script, but a tiny one for items with a `label`; `bind:value` keeps a signal in sync in islands.
45
45
  - [Separator](separator.md): A native `<hr>` between groups of content, after Base UI's Separator: announced as a separator, horizontal by default, or vertical between the items of a row with `aria-orientation="vertical"`. No script.
46
46
  - [Slider](slider.md): A value picked within a range by dragging or with the keys, or a range with two thumbs, after Base UI's Slider. Each thumb is a native `<input type="range">`, so it drags, takes the arrow keys, Home and End, follows the text direction and submits with its form, in server HTML and without JavaScript. `<lu-slider>` adds Page Up and Page Down, keeps a range's thumbs in order, moves the nearest thumb on a press on the track and keeps the value text current. `bind:value` keeps a signal in sync.
47
47
  - [Switch](switch.md): On or off, for a setting: a native `<input type="checkbox" role="switch">`, after Base UI's Switch. Space and a label click toggle it, the form submits its value when on, `required` and reset work, in server HTML and without JavaScript, and assistive technology announces a switch. `bind:checked` keeps a signal in sync.
48
48
  - [Tabs](tabs.md): A tab list and the panel of the selected tab, after the WAI-ARIA tabs pattern: the server HTML holds the whole state (roles, `aria-selected`, the roving tab stop, the hidden panels), and `<lu-tabs>`, a 1.2 kB light-DOM element, adds the arrow keys and the selection. Manual or automatic activation, horizontal or vertical, right-to-left aware, with an optional indicator that slides to the selected tab; `bind:value` (or `value` and `onValueChange`) keeps a signal in sync.
49
- - [Toast](toast.md): Short notices in a region of their own, after Base UI's toast: server HTML renders them (a form action's result), and islands add, update and close them through a toast manager. `<lu-toast-viewport>`, a 2.6 kB light-DOM element, puts them in the top layer, times them (pausing on hover and focus), limits how many show, closes them on a swipe, Escape or their close button, focuses the region on F6, and makes screen readers announce them.
49
+ - [Toast](toast.md): Short notices in a region of their own, after Base UI's toast: server HTML renders them (a form action's result), and islands add, update and close them through a toast manager. `<lu-toast-viewport>`, a 2.8 kB light-DOM element, puts them in the top layer, times them (pausing on hover and focus), limits how many show, closes them on a swipe, Escape or their close button, focuses the region on F6, and makes screen readers announce them.
50
50
  - [Toggle](toggle.md): A two-state button (bold, mute, pin), after Base UI's Toggle: a native `<button type="button" aria-pressed>`. Its label stays the same; `aria-pressed` tells pressed from not. On its own the component presses it, in an island, and `bind:pressed` keeps a signal in sync; inside a Toggle Group the group presses it, on server pages too.
51
51
  - [Toggle Group](toggle-group.md): A set of Toggles with one value, after Base UI's ToggleGroup: text alignment (one pressed at a time) or text style (several). `<lu-toggle-group role="group">` presses its toggles and gives the group one tab stop that the arrow keys, Home and End move, following the orientation and the direction, on server pages and in islands. `bind:value` keeps a signal in sync.
52
- - [Toolbar](toolbar.md): A set of controls with one tab stop, after Base UI's Toolbar and the APG toolbar pattern: `<lu-toolbar role="toolbar">` moves focus between its items with the arrow keys, Home and End, following the orientation and the text direction. Its items are native: buttons that stay focusable when disabled, links, inputs, and the toggles of a Toggle Group inside it. In the server HTML every item is a tab stop, so each is reachable without JavaScript; a 1.1 kB script makes them one tab stop and moves it.
53
- - [Tooltip](tooltip.md): A short tip next to its trigger, on hover or keyboard focus: a native `popover="hint"` with `role="tooltip"`, placed with CSS anchor positioning. The trigger is described by the tip in server HTML, so screen readers announce it without hovering; a 2.0 kB script opens and closes it as Base UI's tooltip does. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
52
+ - [Toolbar](toolbar.md): A set of controls with one tab stop, after Base UI's Toolbar and the APG toolbar pattern: `<lu-toolbar role="toolbar">` moves focus between its items with the arrow keys, Home and End, following the orientation and the text direction. Its items are native: buttons that stay focusable when disabled, links, inputs, and the toggles of a Toggle Group inside it. In the server HTML every item is a tab stop, so each is reachable without JavaScript; a 1.2 kB script makes them one tab stop and moves it.
53
+ - [Tooltip](tooltip.md): A short tip next to its trigger, on hover or keyboard focus: a native `popover="hint"` with `role="tooltip"`, placed with CSS anchor positioning. The trigger is described by the tip in server HTML, so screen readers announce it without hovering; a 2.1 kB script opens and closes it as Base UI's tooltip does. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
package/docs/menu.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Menu
2
2
 
3
- > A menu of commands, links, checkbox and radio items and submenus, opened by a button: the trigger's `popovertarget` opens it and CSS anchor positioning places it, so it works in server HTML with no JavaScript, and a 4.0 kB script adds the APG Menu Button keyboard contract where JavaScript runs. `bind:open`, `bind:checked` and `bind:value` keep signals in sync in islands.
3
+ > A menu of commands, links, checkbox and radio items and submenus, opened by a button: the trigger's `popovertarget` opens it and CSS anchor positioning places it, so it works in server HTML with no JavaScript, and a 4.4 kB script adds the APG Menu Button keyboard contract where JavaScript runs. `bind:open`, `bind:checked` and `bind:value` keep signals in sync in islands.
4
4
 
5
5
  ```ts
6
6
  import { Menu } from "@lumiose/ui"; // or "@lumiose/ui/menu"
@@ -321,8 +321,9 @@ submenu closes it, but the browser leaves focus on the page rather than on the s
321
321
  Tab starts over from the top (the script returns focus to the trigger). `open`, `onOpenChange` and
322
322
  the `bind:` props need the component to run in the browser, in an island.
323
323
 
324
- The keyboard contract comes from a small script: a page that renders a `Menu` loads it once, as a
325
- 4.0 kB (brotli) module without the Lumiose runtime, and islands bundle it. It defines `lu-menu`,
324
+ The keyboard contract comes from a small script: a page that renders a `Menu` loads it once, with
325
+ the dismissal and placement modules it shares with Popover and Combobox: 4.4 kB (brotli) without
326
+ the Lumiose runtime, and an island loads the same modules. It defines `lu-menu`,
326
327
  which upgrades every menu on the page in place, and adds what the native popover lacks: focus on
327
328
  open and its return on close, the arrows, Home, End and typeahead, Escape one level at a time, Tab,
328
329
  submenus, checkbox and radio items, disabled items, `data-highlighted`, and the pointer behaviour
package/docs/menubar.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Menubar
2
2
 
3
- > A bar of menus, such as an app's File, Edit and View, after Base UI's Menubar and the WAI-ARIA menubar pattern: `Menu.Root`s inside `<lu-menubar role="menubar">`, whose triggers are the bar's items. Menu's popups, items, submenus and dismissal; the bar is one tab stop, the arrow keys move between its items and between open menus, and once a menu is open, hovering another item opens its menu instead. A 0.7 kB script on top of Menu's (4.7 kB together); without JavaScript each trigger opens its menu.
3
+ > A bar of menus, such as an app's File, Edit and View, after Base UI's Menubar and the WAI-ARIA menubar pattern: `Menu.Root`s inside `<lu-menubar role="menubar">`, whose triggers are the bar's items. Menu's popups, items, submenus and dismissal; the bar is one tab stop, the arrow keys move between its items and between open menus, and once a menu is open, hovering another item opens its menu instead. A 1.1 kB script on top of Menu's (5.5 kB together); without JavaScript each trigger opens its menu.
4
4
 
5
5
  ```ts
6
6
  import { Menu, Menubar } from "@lumiose/ui"; // or "@lumiose/ui/menu" and "@lumiose/ui/menubar"
@@ -169,8 +169,8 @@ flex row (a column when vertical); each `<lu-menu>` adds no box.
169
169
  Each trigger opens its menu through `popovertarget`, and the browser light-dismisses it: without
170
170
  JavaScript every trigger is a tab stop, and the menus open with Enter, Space or a click.
171
171
 
172
- A page that renders a `Menubar` loads Menu's script and a 0.7 kB (brotli) one of its own, 4.7 kB
173
- together, without the Lumiose runtime; islands bundle them. The menubar's script makes the bar one
172
+ A page that renders a `Menubar` loads Menu's script and a 1.1 kB (brotli) one of its own, 5.5 kB
173
+ together, without the Lumiose runtime; an island loads the same modules. The menubar's script makes the bar one
174
174
  tab stop once the page has loaded, and adds the arrow keys between items and menus and the hover
175
175
  switching. Each menu stays Menu's: its keys, items, submenus and dismissal.
176
176
 
@@ -1,6 +1,6 @@
1
1
  # Navigation Menu
2
2
 
3
- > A site's navigation whose items open panels of links, after Base UI's NavigationMenu and the WAI-ARIA disclosure navigation pattern: a `<nav>` landmark around a list, each trigger opening its content through `popovertarget` (a native popover placed under it by CSS anchor positioning), so the links work and the panels open on a click, one at a time, in server HTML with no JavaScript. A 3.5 kB script adds hover intent, the arrow keys, closing when focus leaves and the direction a panel comes in from. `bind:value` (or `value` and `onValueChange`) keeps the open item in a signal.
3
+ > A site's navigation whose items open panels of links, after Base UI's NavigationMenu and the WAI-ARIA disclosure navigation pattern: a `<nav>` landmark around a list, each trigger opening its content through `popovertarget` (a native popover placed under it by CSS anchor positioning), so the links work and the panels open on a click, one at a time, in server HTML with no JavaScript. A 4.0 kB script adds hover intent, the arrow keys, closing when focus leaves and the direction a panel comes in from. `bind:value` (or `value` and `onValueChange`) keeps the open item in a signal.
4
4
 
5
5
  ```ts
6
6
  import { NavigationMenu } from "@lumiose/ui"; // or "@lumiose/ui/navigation-menu"
@@ -235,8 +235,9 @@ The `<nav>`, its links and the triggers are HTML: each trigger opens its content
235
235
  `popovertarget`, one at a time (an auto popover closes the others), and Escape or a click outside
236
236
  closes it. `value`, `onValueChange` and `bind:value` need the component to run in an island.
237
237
 
238
- A page that renders a `NavigationMenu` loads a 3.5 kB (brotli) script (its dismissal module is
239
- Menu's and Popover's too), without the Lumiose runtime; islands bundle it. `<lu-navigation-menu>`
238
+ A page that renders a `NavigationMenu` loads its script, with the dismissal and placement modules
239
+ it shares with Menu and Popover: 4.0 kB (brotli) without the Lumiose runtime; an island loads the
240
+ same modules. `<lu-navigation-menu>`
240
241
  takes over the trigger's click (so a click keeps a content opened by hover open), opens contents on
241
242
  hover, adds the arrow keys, closes a content when focus leaves its item, dismisses contents as Menu
242
243
  and Popover do (a press of the main button outside, an Escape, another layer opening), keeps
package/docs/otp-field.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OTP Field
2
2
 
3
- > A one-time code input, after Base UI's OTPField: one native `<input>` shown as one slot per character. SMS autofill (`autocomplete="one-time-code"`), paste, Backspace, the arrow keys, `maxlength`, `pattern`, `required` and the form's value are the platform's, without JavaScript too, and assistive technology meets one labelled text field. `<lu-otp-field>`'s 1.5 kB script lays the input over the slots, keeps the code to the allowed characters, and reports completion. `bind:value` keeps a signal in sync.
3
+ > A one-time code input, after Base UI's OTPField: one native `<input>` shown as one slot per character. SMS autofill (`autocomplete="one-time-code"`), paste, Backspace, the arrow keys, `maxlength`, `pattern`, `required` and the form's value are the platform's, without JavaScript too, and assistive technology meets one labelled text field. `<lu-otp-field>`'s 1.6 kB script lays the input over the slots, keeps the code to the allowed characters, and reports completion. `bind:value` keeps a signal in sync.
4
4
 
5
5
  ```ts
6
6
  import { OTPField } from "@lumiose/ui"; // or "@lumiose/ui/otp-field"
@@ -139,7 +139,7 @@ auto-submits.
139
139
  ## Without JavaScript, and the element's script
140
140
 
141
141
  The input is a native text field: autofill, typing, paste, `pattern` and `required` validation and
142
- submission work with no script, and the slots stay hidden. `<lu-otp-field>`'s script (1.5 kB
142
+ submission work with no script, and the slots stay hidden. `<lu-otp-field>`'s script (1.6 kB
143
143
  brotli) shows the slots, cleans the value as it changes (firing `valueinvalid` for refused input),
144
144
  fires `valuecomplete`, auto-submits, and follows a form reset.
145
145
 
package/docs/popover.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Popover
2
2
 
3
- > A popup anchored to its trigger: a native `popover` opened and closed by the trigger's `popovertarget`, placed with CSS anchor positioning, so it works in server HTML with no JavaScript. A 3.3 kB script moves focus into it and back, dismisses it as Base UI does (not on a right-click), keeps `aria-expanded` current and places it in browsers without anchor positioning. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands. A trigger can open it on hover (`openOnHover`), and a `modal` popover is a modal `<dialog>` that makes the page behind it inert.
3
+ > A popup anchored to its trigger: a native `popover` opened and closed by the trigger's `popovertarget`, placed with CSS anchor positioning, so it works in server HTML with no JavaScript. A 3.2 kB script moves focus into it and back, dismisses it as Base UI does (not on a right-click), keeps `aria-expanded` current and places it in browsers without anchor positioning. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands. A trigger can open it on hover (`openOnHover`), and a `modal` popover is a modal `<dialog>` that makes the page behind it inert.
4
4
 
5
5
  ```ts
6
6
  import { Popover } from "@lumiose/ui"; // or "@lumiose/ui/popover"
@@ -233,11 +233,14 @@ The trigger, the close buttons, Escape, the click outside and the placement are
233
233
  features: a popover in a server-rendered page works before any script loads, and with none. So
234
234
  does a modal popover, through invoker commands and `closedby` (where a browser lacks them,
235
235
  [Dialog](dialog.md)'s script, which a modal popover loads, stands in). Opening on hover needs the
236
- script.
236
+ scripts.
237
237
  `open`, `onOpenChange` and `bind:open` need the component to run in an island.
238
238
 
239
- A page that renders a `Popover` loads a 3.3 kB (brotli) module once, without the Lumiose runtime;
240
- islands bundle it. It covers every Popover on the page:
239
+ A page that renders a `Popover` loads its script once, with the dismissal and placement modules it
240
+ shares with Menu, Combobox and Tooltip: 3.2 kB (brotli) without the Lumiose runtime. A trigger
241
+ with `openOnHover` adds 1.0 kB, the hover timing it shares with
242
+ [Preview Card](preview-card.md); a page without one goes without it. An island loads the same
243
+ modules. The scripts cover every Popover on the page:
241
244
 
242
245
  - focus on open (the first focusable element, or the popup) and its return on close;
243
246
  - dismissal, shared with [Menu](menu.md) and [Combobox](combobox.md): a trigger's click makes the
@@ -1,6 +1,6 @@
1
1
  # Preview Card
2
2
 
3
- > A card that previews a link's destination while the pointer or keyboard focus rests on the link, after Base UI's PreviewCard. The trigger is the link itself, which works as a link without JavaScript; the card is a manual popover placed with [Popover](popover.md)'s placement and opened with its hover timing by a 2.8 kB script. It is hoverable, persistent and dismissible (WCAG 1.4.13). `bind:open` keeps a signal in sync.
3
+ > A card that previews a link's destination while the pointer or keyboard focus rests on the link, after Base UI's PreviewCard. The trigger is the link itself, which works as a link without JavaScript; the card is a manual popover placed with [Popover](popover.md)'s placement and opened with its hover timing by a 3.4 kB script. It is hoverable, persistent and dismissible (WCAG 1.4.13). `bind:open` keeps a signal in sync.
4
4
 
5
5
  ```ts
6
6
  import { PreviewCard } from "@lumiose/ui"; // or "@lumiose/ui/preview-card"
@@ -114,8 +114,9 @@ the link, with a fade (none where motion is reduced).
114
114
 
115
115
  ## Without JavaScript, and the client script
116
116
 
117
- The link is a plain link and the card never opens. A page that renders a `PreviewCard` loads a
118
- 2.8 kB (brotli) module once (with the hover timing it shares with Popover): hover and focus with
117
+ The link is a plain link and the card never opens. A page that renders a `PreviewCard` loads its
118
+ script once, with the hover timing, dismissal and placement modules it shares with Popover: 3.4 kB
119
+ (brotli) without the Lumiose runtime; an island loads the same modules. It runs hover and focus with
119
120
  their delays, dismissal, `data-popup-open`, and the placement in browsers without CSS anchor
120
121
  positioning.
121
122
 
@@ -3,7 +3,7 @@
3
3
  > A group of radios with one value, after Base UI's RadioGroup and Radio: native radios in a `<fieldset role="radiogroup">`. The browser gives the group one tab stop, arrow keys that move and select (skipping disabled radios), `required`, submission and reset, in server HTML and without JavaScript; a legend names the group. `bind:value` keeps a signal in sync.
4
4
 
5
5
  ```ts
6
- import { Radio, RadioGroup, Fieldset } from "@lumiose/ui"; // or "@lumiose/ui/radio-group"
6
+ import { Radio, RadioGroup, Fieldset } from "@lumiose/ui"; // or "@lumiose/ui/radio-group" and "@lumiose/ui/fieldset"
7
7
  import "@lumiose/ui/themes/default.css"; // optional: the default theme
8
8
  ```
9
9
 
package/docs/select.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Select
2
2
 
3
- > A native `<select>` for picking one value from a list: it works with no JavaScript, submits with its form and keeps the platform's keyboard, typeahead and mobile pickers. Where the browser has customizable select (`appearance: base-select`, Chrome 135, Safari 26), `Select.Trigger` and `Select.Value` shape the button, the picker is styleable and options may hold more than text; elsewhere it is the classic select. No script; `bind:value` keeps a signal in sync in islands.
3
+ > A native `<select>` for picking one value from a list: it works with no JavaScript, submits with its form and keeps the platform's keyboard, typeahead and mobile pickers. Where the browser has customizable select (`appearance: base-select`, Chrome 135, Safari 26), `Select.Trigger` and `Select.Value` shape the button, the picker is styleable and options may hold more than text; elsewhere it is the classic select. No script, but a tiny one for items with a `label`; `bind:value` keeps a signal in sync in islands.
4
4
 
5
5
  ```ts
6
6
  import { Select } from "@lumiose/ui"; // or "@lumiose/ui/select"
@@ -56,11 +56,17 @@ handlers. Name it with a `<label for>` pointing at its `id`, or `aria-label`, or
56
56
 
57
57
  ### Select.Item
58
58
 
59
- | Prop | Type | Default | |
60
- | ---------- | --------- | ------- | --------------------------------------------------------------------------------------------------------------------- |
61
- | `value` | `string` | | Required: the value the select takes, and submits, when selected. |
62
- | `disabled` | `boolean` | `false` | The option cannot be selected; the arrow keys skip it. |
63
- | `label` | `string` | | The option's text for typeahead and the classic select, when its content starts with an icon or holds more than text. |
59
+ | Prop | Type | Default | |
60
+ | ---------- | --------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
61
+ | `value` | `string` | | Required: the value the select takes, and submits, when selected. |
62
+ | `disabled` | `boolean` | `false` | The option cannot be selected; the arrow keys skip it. |
63
+ | `label` | `string` | | The option's name, for typeahead, assistive technology and the classic select, when its content starts with an icon or holds more than text. |
64
+
65
+ A customizable select's picker shows each item's content, with or without `label`. The classic
66
+ select, which shows text only, shows the `label`. An item with a `label` renders the `<option>`'s
67
+ `label` and `aria-label`, and a hidden copy of it first in its content (`<span hidden
68
+ data-label>`), which typeahead matches: so `option.text`, and `<selectedcontent>`'s
69
+ `textContent`, start with the label, while the rendered text does not.
64
70
 
65
71
  ### Select.Group
66
72
 
@@ -75,7 +81,7 @@ handlers. Name it with a `<label for>` pointing at its `id`, or `aria-label`, or
75
81
 
76
82
  **Differences from Base UI's Select.** Select is the native control, chosen over the listbox
77
83
  pattern because it works without JavaScript, carries forms, autofill, validation and the mobile
78
- pickers, and ships no script. So it has no `open`, `onOpenChange` or `modal` (the platform fires no
84
+ pickers, and needs no script. So it has no `open`, `onOpenChange` or `modal` (the platform fires no
79
85
  event when the picker opens; style `:open` instead), no `Label` (use `<label for>`), no `multiple`
80
86
  (use [Combobox](combobox.md) with `multiple`), no `alignItemWithTrigger` (the picker opens below the
81
87
  control and flips), no `Portal`, `Positioner`, `Popup`, `List`, `Icon`, `ItemText`,
@@ -204,7 +210,7 @@ A click on a `<label for>` focuses the select without opening it. A click on the
204
210
  picker; a click on an option selects it; a click outside closes the picker. Other browsers keep
205
211
  their own select keyboard and pickers, which differ by platform.
206
212
 
207
- ## Without JavaScript
213
+ ## Without JavaScript, and the client script
208
214
 
209
215
  Select needs none: it is a native control, in server HTML and with JavaScript off, on every
210
216
  browser. It submits under its `name`, is validated (`required`), resets with its form, takes the
@@ -212,6 +218,15 @@ browser's autofill and is disabled by a disabled `<fieldset>`. `value`, `onValue
212
218
  `bind:value` need the component to run in the browser, in an island; there `value` sets the
213
219
  control's value when it changes, and its `change` event calls `onValueChange`.
214
220
 
221
+ Items with a `label` are the exception. A customizable select's picker shows an `<option>`'s
222
+ `label` attribute instead of its content, through the browser's own style, which no CSS
223
+ overrides. So a page whose selects have such items loads a 0.2 kB (brotli) script once, without
224
+ the Lumiose runtime (an island loads the same module). When a customizable select is pressed or
225
+ takes focus, before its picker opens, the script removes the attribute from its items: the picker
226
+ shows their content, typeahead matches the label's hidden copy, and `aria-label` keeps their name.
227
+ A classic select keeps the attribute, which it shows. Without the script, the customizable
228
+ picker shows the labels alone.
229
+
215
230
  ## Browser support
216
231
 
217
232
  - **Customizable select** (`appearance: base-select`, `::picker(select)`, `<selectedcontent>`, a
@@ -222,8 +237,8 @@ control's value when it changes, and its `change` event calls `onValueChange`.
222
237
  `Trigger`). Older browsers without customizable select drop them from server HTML, so an
223
238
  island's select falls back to rendering on the client there
224
239
  ([LUM4006](https://itsjavi.com/lumiose/docs/errors/LUM4006/)).
225
- - **Typeahead** matches an option's text, or its `label`: give options that start with an icon a
226
- `label`.
240
+ - **Typeahead** matches an option's text, or its `label`: give options whose content starts with
241
+ an icon (an emoji, a symbol) a `label`.
227
242
  - **`:open`** comes with customizable select.
228
243
 
229
244
  ## Related
package/docs/tabs.md CHANGED
@@ -235,7 +235,7 @@ The [WAI-ARIA tabs pattern](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/):
235
235
  The server HTML is complete: the selected tab, its panel and the tab stop are right before any
236
236
  script loads, and the panels of the other tabs are `hidden`. Selecting another tab needs
237
237
  `<lu-tabs>`' script, a 1.2 kB (brotli) module that a page rendering `Tabs` loads once, without
238
- the Lumiose runtime; islands bundle it. A `Tabs.Indicator` is placed by CSS alone until then; the
238
+ the Lumiose runtime; an island loads the same module. A `Tabs.Indicator` is placed by CSS alone until then; the
239
239
  script makes it follow a new selection. `value`, `onValueChange` and `bind:value` need the
240
240
  component to run in an island.
241
241
 
package/docs/toast.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Toast
2
2
 
3
- > Short notices in a region of their own, after Base UI's toast: server HTML renders them (a form action's result), and islands add, update and close them through a toast manager. `<lu-toast-viewport>`, a 2.6 kB light-DOM element, puts them in the top layer, times them (pausing on hover and focus), limits how many show, closes them on a swipe, Escape or their close button, focuses the region on F6, and makes screen readers announce them.
3
+ > Short notices in a region of their own, after Base UI's toast: server HTML renders them (a form action's result), and islands add, update and close them through a toast manager. `<lu-toast-viewport>`, a 2.8 kB light-DOM element, puts them in the top layer, times them (pausing on hover and focus), limits how many show, closes them on a swipe, Escape or their close button, focuses the region on F6, and makes screen readers announce them.
4
4
 
5
5
  ```ts
6
6
  import { Toast } from "@lumiose/ui"; // or "@lumiose/ui/toast"
@@ -284,7 +284,7 @@ and back when it closes or leaves the page.
284
284
 
285
285
  What is server-rendered and what needs the client:
286
286
 
287
- | Server HTML | The element's script (2.6 kB, loaded once per page) |
287
+ | Server HTML | The element's script (2.8 kB, loaded once per page, as an island loads it) |
288
288
  | ----------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
289
289
  | The region and the toasts a page renders, with their text, roles and buttons. | The top layer (a manual popover), so toasts sit above dialogs and survive other popovers' light dismiss. |
290
290
  | Toasts show at the window's bottom end (`toast.css`). | Timers, pausing, the limit, closing (button, Escape, swipe), F6, focus when a toast goes. |
@@ -3,7 +3,7 @@
3
3
  > A set of [Toggles](toggle.md) with one value, after Base UI's ToggleGroup: text alignment (one pressed at a time) or text style (several). `<lu-toggle-group role="group">` presses its toggles and gives the group one tab stop that the arrow keys, Home and End move, following the orientation and the direction, on server pages and in islands. `bind:value` keeps a signal in sync.
4
4
 
5
5
  ```ts
6
- import { Toggle, ToggleGroup } from "@lumiose/ui"; // or "@lumiose/ui/toggle-group"
6
+ import { Toggle, ToggleGroup } from "@lumiose/ui"; // or "@lumiose/ui/toggle" and "@lumiose/ui/toggle-group"
7
7
  import "@lumiose/ui/themes/default.css"; // optional: the default theme
8
8
  ```
9
9
 
@@ -27,7 +27,7 @@ import "@lumiose/ui/themes/default.css"; // optional: the default theme
27
27
 
28
28
  | Prop | Type | Default | |
29
29
  | --------------- | ------------------------------ | -------------- | -------------------------------------------------------------------------- |
30
- | `value` | `string[]` | | Presses these toggles when it changes. Pair it with `onValueChange`. |
30
+ | `value` | `string[]` | | The pressed toggles. Pair it with `onValueChange`, which updates it. |
31
31
  | `defaultValue` | `string[]` | `[]` | The toggles pressed at first. |
32
32
  | `onValueChange` | `(value: string[]) => void` | | Called after the user presses or releases a toggle. |
33
33
  | `bind:value` | `Signal<string[]>` | | Stands in for `value` and `onValueChange`. |
@@ -39,6 +39,11 @@ import "@lumiose/ui/themes/default.css"; // optional: the default theme
39
39
  Every other prop passes through to `<lu-toggle-group>`: `aria-label`, `aria-labelledby`, `id`,
40
40
  `class`. Name the group with one of the first two.
41
41
 
42
+ With `value`, the group is controlled: after the user presses or releases a toggle, the toggles
43
+ show `value` again, so a press shows only once `onValueChange` has updated `value` with it. One
44
+ that leaves `value` as it was keeps the toggles as they were: an `onValueChange` that ignores an
45
+ empty array keeps one toggle pressed. Setting `value` to the toggles already pressed does nothing.
46
+
42
47
  Each toggle's `value` is its identity in the group; its `onPressedChange` still fires. A
43
48
  `pressedchange` event (`detail.pressed`) bubbles from a toggle before it changes, and
44
49
  `event.preventDefault()` cancels the change.
@@ -49,7 +54,8 @@ Each toggle's `value` is its identity in the group; its `onPressedChange` still
49
54
  ## Example
50
55
 
51
56
  ```tsx check
52
- import { Toggle, ToggleGroup } from "@lumiose/ui";
57
+ import { Toggle } from "@lumiose/ui/toggle";
58
+ import { ToggleGroup } from "@lumiose/ui/toggle-group";
53
59
  import { signal } from "lumiose";
54
60
 
55
61
  export function TextAlignment() {
@@ -102,7 +108,7 @@ and single tab stop take over: the toggles are toolbar items.
102
108
  ## Without JavaScript, and the element's script
103
109
 
104
110
  The server HTML has each toggle's `aria-pressed` and the tab stop. `<lu-toggle-group>`'s script
105
- (0.9 kB brotli) presses the toggles and moves focus, on server pages and in islands; when the tab
111
+ (1.0 kB brotli) presses the toggles and moves focus, on server pages and in islands; when the tab
106
112
  stop's toggle goes or is disabled, or a disabled group is enabled, the first pressed (else enabled)
107
113
  toggle takes the tab stop. With no script
108
114
  at all the toggles show their state but do not change. For values a form submits, use a
package/docs/toolbar.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Toolbar
2
2
 
3
- > A set of controls with one tab stop, after Base UI's Toolbar and the APG toolbar pattern: `<lu-toolbar role="toolbar">` moves focus between its items with the arrow keys, Home and End, following the orientation and the text direction. Its items are native: buttons that stay focusable when disabled, links, inputs, and the toggles of a [Toggle Group](toggle-group.md) inside it. In the server HTML every item is a tab stop, so each is reachable without JavaScript; a 1.1 kB script makes them one tab stop and moves it.
3
+ > A set of controls with one tab stop, after Base UI's Toolbar and the APG toolbar pattern: `<lu-toolbar role="toolbar">` moves focus between its items with the arrow keys, Home and End, following the orientation and the text direction. Its items are native: buttons that stay focusable when disabled, links, inputs, and the toggles of a [Toggle Group](toggle-group.md) inside it. In the server HTML every item is a tab stop, so each is reachable without JavaScript; a 1.2 kB script makes them one tab stop and moves it.
4
4
 
5
5
  ```ts
6
6
  import { Toolbar } from "@lumiose/ui"; // or "@lumiose/ui/toolbar"
@@ -122,7 +122,7 @@ its text selected, as in Base UI. Base UI advises at most one input, last.
122
122
  ## Without JavaScript, and the element's script
123
123
 
124
124
  The server HTML is a labelled toolbar whose items are all tab stops, so Tab reaches each one
125
- without JavaScript or before the script runs. `<lu-toolbar>`'s script (1.1 kB brotli with Button's)
125
+ without JavaScript or before the script runs. `<lu-toolbar>`'s script (1.2 kB brotli with Button's)
126
126
  makes the toolbar one tab stop, moves focus with the keys and keeps the tab stop on the last focused
127
127
  item.
128
128
 
package/docs/tooltip.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Tooltip
2
2
 
3
- > A short tip next to its trigger, on hover or keyboard focus: a native `popover="hint"` with `role="tooltip"`, placed with CSS anchor positioning. The trigger is described by the tip in server HTML, so screen readers announce it without hovering; a 2.0 kB script opens and closes it as Base UI's tooltip does. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
3
+ > A short tip next to its trigger, on hover or keyboard focus: a native `popover="hint"` with `role="tooltip"`, placed with CSS anchor positioning. The trigger is described by the tip in server HTML, so screen readers announce it without hovering; a 2.1 kB script opens and closes it as Base UI's tooltip does. `bind:open` (or `open` and `onOpenChange`) keeps a signal in sync in islands.
4
4
 
5
5
  ```ts
6
6
  import { Tooltip } from "@lumiose/ui"; // or "@lumiose/ui/tooltip"
@@ -111,8 +111,9 @@ A tooltip inside a popover keeps the popover open, and one inside a dialog belon
111
111
  ## Without JavaScript, and the client script
112
112
 
113
113
  Without JavaScript the tip never shows, but the trigger keeps its description: screen readers
114
- announce it. A page that renders a `Tooltip` loads a 2.0 kB (brotli) module once, without the
115
- Lumiose runtime; islands bundle it. It opens and closes every tooltip on the page, and places them
114
+ announce it. A page that renders a `Tooltip` loads its script once, with the placement module it
115
+ shares with Popover and Menu: 2.1 kB (brotli) without the Lumiose runtime; an island loads the
116
+ same modules. It opens and closes every tooltip on the page, and places them
116
117
  in browsers without CSS anchor positioning.
117
118
 
118
119
  ## Browser support
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumiose/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Accessible, unstyled UI primitives for Lumiose: native elements first (dialog, popover, invoker commands, anchor positioning), light-DOM custom elements only where the platform falls short.",
5
5
  "license": "MIT",
6
6
  "repository": {