horizon-design 1.0.0 → 2.0.1
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/README.md +153 -105
- package/dist/components/accordion/AccordionItem.svelte +3 -2
- package/dist/components/accordion/AccordionItem.svelte.d.ts +4 -1
- package/dist/components/angle-slider/AngleSlider.svelte +8 -4
- package/dist/components/angle-slider/AngleSlider.svelte.d.ts +5 -1
- package/dist/components/asset-card/AssetCard.svelte +23 -10
- package/dist/components/asset-card/AssetCard.svelte.d.ts +11 -5
- package/dist/components/avatar/Avatar.svelte +8 -2
- package/dist/components/avatar/Avatar.svelte.d.ts +1 -1
- package/dist/components/button/Button.svelte +1 -1
- package/dist/components/button/Button.svelte.d.ts +1 -1
- package/dist/components/button/button-variants.d.ts +2 -0
- package/dist/components/button/button-variants.js +2 -0
- package/dist/components/calendar/Calendar.svelte +22 -167
- package/dist/components/calendar/Calendar.svelte.d.ts +9 -3
- package/dist/components/calendar/CalendarViews.svelte +204 -0
- package/dist/components/calendar/CalendarViews.svelte.d.ts +24 -0
- package/dist/components/calendar/trigger-ids.d.ts +14 -0
- package/dist/components/calendar/trigger-ids.js +7 -0
- package/dist/components/card/Card.svelte +8 -2
- package/dist/components/card/Card.svelte.d.ts +4 -1
- package/dist/components/carousel/Carousel.svelte +57 -19
- package/dist/components/carousel/Carousel.svelte.d.ts +5 -2
- package/dist/components/checkbox/Checkbox.svelte +7 -7
- package/dist/components/checkbox/Checkbox.svelte.d.ts +1 -1
- package/dist/components/circular-progress/CircularProgress.svelte +3 -9
- package/dist/components/circular-progress/CircularProgress.svelte.d.ts +1 -1
- package/dist/components/circular-slider/CircularSlider.svelte +5 -11
- package/dist/components/circular-slider/CircularSlider.svelte.d.ts +1 -1
- package/dist/components/clipboard/Clipboard.svelte +30 -13
- package/dist/components/clipboard/Clipboard.svelte.d.ts +6 -2
- package/dist/components/collapsible/Collapsible.svelte +10 -3
- package/dist/components/collapsible/Collapsible.svelte.d.ts +7 -2
- package/dist/components/color-picker/ColorPicker.svelte +105 -28
- package/dist/components/color-picker/ColorPicker.svelte.d.ts +20 -5
- package/dist/components/color-picker/formats.d.ts +23 -0
- package/dist/components/color-picker/formats.js +52 -0
- package/dist/components/color-picker/index.d.ts +3 -1
- package/dist/components/color-picker/index.js +2 -1
- package/dist/components/combobox/Combobox.svelte +28 -4
- package/dist/components/combobox/Combobox.svelte.d.ts +9 -1
- package/dist/components/date-picker/DatePicker.svelte +46 -139
- package/dist/components/date-picker/DatePicker.svelte.d.ts +12 -2
- package/dist/components/dialog/Dialog.svelte +28 -10
- package/dist/components/dialog/Dialog.svelte.d.ts +6 -3
- package/dist/components/dialog/DialogClose.svelte +48 -21
- package/dist/components/dialog/DialogClose.svelte.d.ts +16 -6
- package/dist/components/dialog/context.d.ts +9 -0
- package/dist/components/dialog/context.js +16 -0
- package/dist/components/drawer/Drawer.svelte +25 -10
- package/dist/components/drawer/Drawer.svelte.d.ts +5 -3
- package/dist/components/editable/Editable.svelte +3 -0
- package/dist/components/file-upload/FileUpload.svelte +8 -6
- package/dist/components/file-upload/FileUpload.svelte.d.ts +4 -3
- package/dist/components/floating-panel/FloatingPanel.svelte +16 -9
- package/dist/components/floating-panel/FloatingPanel.svelte.d.ts +3 -2
- package/dist/components/frame/Frame.svelte +10 -6
- package/dist/components/frame/Frame.svelte.d.ts +2 -1
- package/dist/components/game-card/GameCard.svelte +28 -10
- package/dist/components/game-card/GameCard.svelte.d.ts +7 -6
- package/dist/components/game-hero/GameHero.svelte +1 -1
- package/dist/components/game-hero/GameHero.svelte.d.ts +1 -1
- package/dist/components/icon-button/IconButton.svelte +60 -0
- package/dist/components/icon-button/IconButton.svelte.d.ts +31 -0
- package/dist/components/icon-button/index.d.ts +5 -0
- package/dist/components/icon-button/index.js +5 -0
- package/dist/components/item/Item.svelte +34 -11
- package/dist/components/item/Item.svelte.d.ts +11 -2
- package/dist/components/kbd/Kbd.svelte +34 -4
- package/dist/components/kbd/Kbd.svelte.d.ts +16 -2
- package/dist/components/listbox/Listbox.svelte +6 -3
- package/dist/components/listbox/Listbox.svelte.d.ts +4 -1
- package/dist/components/menu/Menu.svelte +33 -5
- package/dist/components/menu/Menu.svelte.d.ts +12 -2
- package/dist/components/native-select/NativeSelect.svelte +3 -2
- package/dist/components/native-select/NativeSelect.svelte.d.ts +2 -1
- package/dist/components/notification-center/NotificationCenter.svelte +1 -1
- package/dist/components/number-input/NumberInput.svelte +39 -13
- package/dist/components/number-input/NumberInput.svelte.d.ts +5 -3
- package/dist/components/pagination/Pagination.svelte +4 -3
- package/dist/components/pagination/Pagination.svelte.d.ts +2 -1
- package/dist/components/pagination/PaginationNextTrigger.svelte +30 -11
- package/dist/components/pagination/PaginationNextTrigger.svelte.d.ts +9 -1
- package/dist/components/pagination/PaginationPrevTrigger.svelte +30 -11
- package/dist/components/pagination/PaginationPrevTrigger.svelte.d.ts +9 -1
- package/dist/components/pin-input/PinInput.svelte +3 -2
- package/dist/components/pin-input/PinInput.svelte.d.ts +2 -1
- package/dist/components/popover/Popover.svelte +34 -6
- package/dist/components/popover/Popover.svelte.d.ts +11 -3
- package/dist/components/popover/PopoverClose.svelte +24 -9
- package/dist/components/popover/PopoverClose.svelte.d.ts +6 -1
- package/dist/components/progress/Progress.svelte +3 -3
- package/dist/components/radio-group/RadioGroup.svelte +43 -34
- package/dist/components/radio-group/RadioGroup.svelte.d.ts +3 -1
- package/dist/components/rating-group/RatingGroup.svelte +7 -2
- package/dist/components/rating-group/RatingGroup.svelte.d.ts +1 -0
- package/dist/components/ring/Ring.svelte +42 -0
- package/dist/components/ring/Ring.svelte.d.ts +16 -0
- package/dist/components/scroll-area/ScrollArea.svelte +30 -10
- package/dist/components/scroll-area/ScrollArea.svelte.d.ts +9 -1
- package/dist/components/segment-group/SegmentGroup.svelte +38 -17
- package/dist/components/segment-group/SegmentGroup.svelte.d.ts +9 -4
- package/dist/components/select/Select.svelte +2 -2
- package/dist/components/select/Select.svelte.d.ts +1 -1
- package/dist/components/sheet/Sheet.svelte +54 -15
- package/dist/components/sheet/Sheet.svelte.d.ts +15 -6
- package/dist/components/sidebar/Sidebar.svelte +18 -3
- package/dist/components/sidebar/Sidebar.svelte.d.ts +9 -3
- package/dist/components/sidebar/SidebarItem.svelte +53 -26
- package/dist/components/sidebar/SidebarItem.svelte.d.ts +8 -4
- package/dist/components/sidebar/SidebarSection.svelte +1 -1
- package/dist/components/sidebar/context.d.ts +9 -0
- package/dist/components/sidebar/context.js +15 -0
- package/dist/components/signature-pad/SignaturePad.svelte +3 -2
- package/dist/components/signature-pad/SignaturePad.svelte.d.ts +2 -1
- package/dist/components/slider/Slider.svelte +21 -10
- package/dist/components/slider/Slider.svelte.d.ts +3 -1
- package/dist/components/splitter/Splitter.svelte +8 -2
- package/dist/components/splitter/Splitter.svelte.d.ts +2 -1
- package/dist/components/switch/Switch.svelte +26 -41
- package/dist/components/switch/Switch.svelte.d.ts +2 -2
- package/dist/components/table/Table.svelte +21 -26
- package/dist/components/table/Table.svelte.d.ts +41 -22
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/index.js +1 -1
- package/dist/components/tag-picker/TagPicker.svelte +3 -5
- package/dist/components/tag-picker/TagPicker.svelte.d.ts +1 -1
- package/dist/components/textarea/Textarea.svelte +8 -2
- package/dist/components/textarea/Textarea.svelte.d.ts +4 -1
- package/dist/components/theme-switch/ThemeSwitch.svelte +64 -18
- package/dist/components/theme-switch/ThemeSwitch.svelte.d.ts +6 -3
- package/dist/components/thumb-card/ThumbCard.svelte +19 -6
- package/dist/components/thumb-card/ThumbCard.svelte.d.ts +9 -2
- package/dist/components/timer/Timer.svelte +26 -15
- package/dist/components/timer/Timer.svelte.d.ts +3 -2
- package/dist/components/toast/Toast.svelte +15 -8
- package/dist/components/toast/Toast.svelte.d.ts +3 -2
- package/dist/components/toast/Toaster.svelte +1 -1
- package/dist/components/toast/Toaster.svelte.d.ts +1 -1
- package/dist/components/toggle/Toggle.svelte +4 -2
- package/dist/components/toggle/Toggle.svelte.d.ts +4 -2
- package/dist/components/toggle-group/ToggleGroup.svelte +61 -14
- package/dist/components/toggle-group/ToggleGroup.svelte.d.ts +13 -5
- package/dist/components/toggle-tooltip/ToggleTooltip.svelte +26 -29
- package/dist/components/toggle-tooltip/ToggleTooltip.svelte.d.ts +4 -3
- package/dist/components/tooltip/Tooltip.svelte +31 -5
- package/dist/components/tooltip/Tooltip.svelte.d.ts +10 -2
- package/dist/components/tour/Tour.svelte +21 -13
- package/dist/components/tour/Tour.svelte.d.ts +3 -3
- package/dist/components/virtual-tree/VirtualTree.svelte +7 -6
- package/dist/components/virtual-tree/VirtualTree.svelte.d.ts +3 -2
- package/dist/editor/horizon-layout/HorizonLayout.svelte +8 -7
- package/dist/editor/horizon-layout/HorizonLayout.svelte.d.ts +2 -2
- package/dist/editor/inspector-panel/InspectorPanel.svelte +60 -9
- package/dist/editor/inspector-panel/InspectorPanel.svelte.d.ts +19 -1
- package/dist/generated/theme.css +16 -11
- package/dist/generated/tokens.d.ts +1 -1
- package/dist/generated/tokens.js +13 -11
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/motion/sliding-indicator.d.ts +28 -0
- package/dist/motion/sliding-indicator.js +54 -0
- package/dist/platform.d.ts +21 -0
- package/dist/platform.js +19 -0
- package/dist/theme.svelte.d.ts +3 -3
- package/dist/theme.svelte.js +7 -7
- package/package.json +12 -12
- package/dist/components/tabs/Tabs.svelte +0 -119
- package/dist/components/tabs/Tabs.svelte.d.ts +0 -31
- package/dist/components/tabs/index.d.ts +0 -5
- package/dist/components/tabs/index.js +0 -5
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ them.
|
|
|
13
13
|
|
|
14
14
|
| Import | What it holds |
|
|
15
15
|
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
-
| `horizon-design` | The general kit: every component below but the Editor's, `theme` and `THEME_STORAGE_KEY`, `slidePage` and `prefersReducedMotion`, `cn`, and Ark's `createTreeCollection` for `VirtualTree`.
|
|
16
|
+
| `horizon-design` | The general kit: every component below but the Editor's, `theme` and `THEME_STORAGE_KEY`, `slidePage` and `prefersReducedMotion`, `cn`, `isApplePlatform`, and Ark's `createTreeCollection` for `VirtualTree`. |
|
|
17
17
|
| `horizon-design/editor` | The Editor window's components: `HierarchyView`, `InspectorPanel`, `FileTree` (with Ark's `createTreeCollection` and `createFileTreeCollection`), `HorizonLayout` (with everything horizon-layout exports), `createMonacoTheme`. |
|
|
18
18
|
| `horizon-design/tokens` | `tokenValues`: every colour token of each theme as OKLCH and as sRGB hex, plain TypeScript with no Svelte. |
|
|
19
19
|
| `horizon-design/horizon-design.css` | The stylesheet: fonts, theme tokens, the Tailwind theme, base styles, page motion. |
|
|
@@ -50,7 +50,7 @@ Import the stylesheet after Tailwind, in the app's root CSS:
|
|
|
50
50
|
|
|
51
51
|
The stylesheet tells Tailwind to scan the library's components itself.
|
|
52
52
|
|
|
53
|
-
Then
|
|
53
|
+
Then initialize the theme once, in the root layout (`theme.initialize` returns the function that removes
|
|
54
54
|
its listeners, which `onMount` calls when the layout unmounts):
|
|
55
55
|
|
|
56
56
|
```svelte
|
|
@@ -58,7 +58,7 @@ its listeners, which `onMount` calls when the layout unmounts):
|
|
|
58
58
|
import { onMount } from 'svelte';
|
|
59
59
|
import { theme } from 'horizon-design';
|
|
60
60
|
|
|
61
|
-
onMount(() => theme.
|
|
61
|
+
onMount(() => theme.initialize());
|
|
62
62
|
</script>
|
|
63
63
|
```
|
|
64
64
|
|
|
@@ -97,7 +97,7 @@ the same, and never write a colour literal.
|
|
|
97
97
|
| Text | `fg`, `fg-2`, `muted`, `faint` |
|
|
98
98
|
| Actions and status | `primary`, `primary-hover`, `on-primary`, `danger`, `on-danger`, `success`, `warning`, `info`, `accent`, each with `-subtle` (a tinted fill) and `-border` |
|
|
99
99
|
| Editor | `server`, `local` (the two object modes), `grid-line`, the code colours `code-keyword`, `code-function`, `code-string`, `code-number`, `code-type`, `code-comment`, `code-attribute`, `code-line` |
|
|
100
|
-
| Fixed in both themes | `paper` (switch and slider thumbs, QR codes), `on-art` and `art-scrim` (text and pills over game art), `avatar-1` to `avatar-5`
|
|
100
|
+
| Fixed in both themes | `paper` (switch and slider thumbs, QR codes), `on-art`, `art-scrim` and `art-scrim-hover` (text and pills over game art), `avatar-1` to `avatar-5` |
|
|
101
101
|
| Overlays | `scrim` |
|
|
102
102
|
|
|
103
103
|
- **Theme:** dark is the default; `data-theme="light"` on `<html>` (or on any element, for a
|
|
@@ -146,12 +146,12 @@ import { theme, slidePage } from 'horizon-design';
|
|
|
146
146
|
theme.mode; // 'system' | 'dark' | 'light': the choice (reactive, read-only: change it with theme.set)
|
|
147
147
|
theme.resolved; // 'dark' | 'light': the theme in effect, following the OS while the mode is system (reactive)
|
|
148
148
|
theme.set('light'); // saves the mode and crossfades the whole page into it; resolves once the crossfade ends
|
|
149
|
-
theme.
|
|
149
|
+
theme.initialize({ blockContextMenu: true }); // applies the theme, follows the OS, blocks the browser's context menu only when asked; returns the function that stops it
|
|
150
150
|
```
|
|
151
151
|
|
|
152
152
|
The mode is saved in `localStorage` under `THEME_STORAGE_KEY`. Without storage (disabled, or
|
|
153
153
|
server rendering) the mode starts as system, and a choice lasts until the page is closed; on the
|
|
154
|
-
server, where there is no OS theme, `resolved` is dark. Calling `theme.
|
|
154
|
+
server, where there is no OS theme, `resolved` is dark. Calling `theme.initialize` again replaces the
|
|
155
155
|
listeners of the previous call.
|
|
156
156
|
|
|
157
157
|
Switching themes crossfades the whole page, and navigating slides the screen in the direction of
|
|
@@ -191,7 +191,7 @@ each with the keys it shows; `Calendar`, `Carousel` and `DatePicker` add the rol
|
|
|
191
191
|
announced as (`tableRoleDescription`; `roleDescription` and `slideRoleDescription`;
|
|
192
192
|
`contentRoleDescription` and `tableRoleDescription`). The other Ark components take props of their own instead: `Tour`'s
|
|
193
193
|
`closeLabel` and `progressText`, `Marquee`'s `label` and `roleDescription`, `SignaturePad`'s
|
|
194
|
-
`label`, `roleDescription` and `clearLabel`, `FileUpload`'s `prompt`, `VirtualTree`'s `label` and `rename.label`, `FileTree`'s `label`, `HierarchyView`'s `label` and `renameLabel` and the
|
|
194
|
+
`label`, `roleDescription` and `clearLabel`, `FileUpload`'s `prompt` and `hint`, `VirtualTree`'s `label` and `rename.label`, `FileTree`'s `label`, `HierarchyView`'s `label` and `renameLabel` and the
|
|
195
195
|
`closeLabel` of `Toaster`, `ToastItem` and `FloatingPanel` replace the names Ark gives in English,
|
|
196
196
|
and `ColorPicker`'s `labels` (each control, the area's role and the values its area and sliders
|
|
197
197
|
announce) and `Timer`'s `labels` (its buttons) name the controls Ark leaves unnamed.
|
|
@@ -206,7 +206,7 @@ Like a desktop app's, interface text isn't selectable: the base styles set `user
|
|
|
206
206
|
`<body>`. The base styles turn selection back on in what the user types (`<input>`, `<textarea>`,
|
|
207
207
|
editable `contenteditable` elements, so `Input`, `Textarea`, `Editable`, `PinInput`,
|
|
208
208
|
`NumberInput` and the other fields), and the components that show text to read or to copy turn it
|
|
209
|
-
on with `select-text`: `Prose
|
|
209
|
+
on with `select-text`: `Prose`, the value of `Clipboard` and `ColorPicker`'s list of values.
|
|
210
210
|
|
|
211
211
|
Anywhere else that needs it, opt in with Tailwind's `select-text` class on the element:
|
|
212
212
|
documentation and other reading text, code (a Monaco editor's host element, a code block), and
|
|
@@ -270,93 +270,94 @@ variants).
|
|
|
270
270
|
|
|
271
271
|
### Actions
|
|
272
272
|
|
|
273
|
-
| Component | What it is
|
|
274
|
-
| ------------------------------------------------------------------------------- |
|
|
275
|
-
| [`ActionBar`](https://play-horizon.github.io/horizon-design/action-bar) | A floating bar of actions at the bottom of the window, for the current selection; `ActionBarSeparator` divides its groups.
|
|
276
|
-
| [`Button`](https://play-horizon.github.io/horizon-design/button) | A button: `variant` sets its look and `size` its height (`icon-*` for a square icon-only button, which needs an `aria-label`); `loading` shows a spinner and disables it. `buttonVariants` gives its classes to other elements, such as an overlay's trigger.
|
|
277
|
-
| [`ButtonGroup`](https://play-horizon.github.io/horizon-design/button-group) | Groups buttons into one connected row or column (`orientation`).
|
|
278
|
-
| [`Clipboard`](https://play-horizon.github.io/horizon-design/clipboard) | Copies `value` to the clipboard, showing it, selectable, with a copy button that confirms the copy (Ark Clipboard); Ark `translations` (`triggerLabel`), required, name the button.
|
|
279
|
-
| [`
|
|
280
|
-
| [`
|
|
281
|
-
| [`
|
|
282
|
-
| [`
|
|
283
|
-
| [`
|
|
284
|
-
| [`
|
|
273
|
+
| Component | What it is |
|
|
274
|
+
| ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
275
|
+
| [`ActionBar`](https://play-horizon.github.io/horizon-design/action-bar) | A floating bar of actions at the bottom of the window, for the current selection; `ActionBarSeparator` divides its groups. |
|
|
276
|
+
| [`Button`](https://play-horizon.github.io/horizon-design/button) | A button: `variant` sets its look (`art` for an action over game art, such as a game page's Back) and `size` its height (`icon-*` for a square icon-only button, which needs an `aria-label`; `IconButton` adds the tooltip); `loading` shows a spinner and disables it. `buttonVariants` gives its classes to other elements, such as an overlay's trigger. |
|
|
277
|
+
| [`ButtonGroup`](https://play-horizon.github.io/horizon-design/button-group) | Groups buttons into one connected row or column (`orientation`). |
|
|
278
|
+
| [`Clipboard`](https://play-horizon.github.io/horizon-design/clipboard) | Copies `value` to the clipboard, showing it, selectable, with a copy button that confirms the copy (Ark Clipboard); Ark `translations` (`triggerLabel`), required, name the button, as its accessible name and its tooltip. |
|
|
279
|
+
| [`IconButton`](https://play-horizon.github.io/horizon-design/icon-button) | An icon-only button with a tooltip that names it: `label`, required, is both the tooltip's text and the button's accessible name; `variant` as `Button`'s, `size` its square size. Every icon-only button should be one (or carry a `Tooltip` with the same name). |
|
|
280
|
+
| [`SegmentGroup`](https://play-horizon.github.io/horizon-design/segment-group) | A segmented control (Ark SegmentGroup): the `default` variant raises the chosen segment on a sunken track, such as a view switch; `underline` draws a bar under the chosen label, for the views of a page (the app renders the view of `value`). The segment or bar slides to the choice; `value` binds it, an item can be `disabled`, and an `aria-label` names the group. |
|
|
281
|
+
| [`Swap`](https://play-horizon.github.io/horizon-design/swap) | Swaps between two contents with an animation, such as a play and a pause icon (Ark Swap): `on` while `swap` is true, `off` while it is false. |
|
|
282
|
+
| [`Toggle`](https://play-horizon.github.io/horizon-design/toggle) | A button that stays pressed or not (Ark Toggle); `pressed` binds its state. An icon-only toggle takes an `aria-label` and a `Tooltip` with the same text, or is a `ToggleTooltip`. |
|
|
283
|
+
| [`ToggleGroup`](https://play-horizon.github.io/horizon-design/toggle-group) | A row of toggles of which one or several stay pressed (Ark ToggleGroup): with one choice, a raised highlight slides to the pressed item; with `multiple`, each pressed item is raised. `value` binds the pressed items, an `aria-label` names the group, and an icon-only item takes a `label`, also its tooltip. |
|
|
284
|
+
| [`ToggleTooltip`](https://play-horizon.github.io/horizon-design/toggle-tooltip) | An icon toggle, such as a toolbar's Bold, with a tooltip that names it: `label`, required, is both the tooltip's text and the toggle's accessible name, and `pressed` binds its state. A press shrinks it for a moment, and the pressed state is tinted primary, unlike a hover. |
|
|
285
|
+
| [`VoteButtons`](https://play-horizon.github.io/horizon-design/vote-buttons) | Up and down votes, side by side on a segmented track, each with its count (`upCount`, `downCount`, formatted); `vote` binds the account's vote, and `labels` names the group and the buttons. |
|
|
285
286
|
|
|
286
287
|
### Forms
|
|
287
288
|
|
|
288
|
-
| Component | What it is
|
|
289
|
-
| --------------------------------------------------------------------------------- |
|
|
290
|
-
| [`AngleSlider`](https://play-horizon.github.io/horizon-design/angle-slider) | A circular control that picks an angle in degrees from 0 to 359, 0 at the top and clockwise (Ark AngleSlider); `label`, required, is its accessible name, `valueText`, required, formats the angle shown and announced (such as `45°`), and `value` binds the angle.
|
|
291
|
-
| [`Calendar`](https://play-horizon.github.io/horizon-design/calendar) | A month calendar to pick a date or a range, inline (Ark DatePicker without its field); Ark `translations`, required, name its days and controls and the roles of its tables.
|
|
292
|
-
| [`Checkbox`](https://play-horizon.github.io/horizon-design/checkbox) | A checkbox with its label (`label` or `children`, Ark Checkbox); `checked` binds true, false or indeterminate.
|
|
293
|
-
| [`CircularSlider`](https://play-horizon.github.io/horizon-design/circular-slider) | A circular control that picks a value from 0 to 359 along a ring that fills clockwise from the top up to its thumb (Ark AngleSlider), with the value in its centre; `label`, required, is its accessible name, `valueText`, required, formats the value shown and announced (such as `120°`), and `value` binds the value.
|
|
294
|
-
| [`ColorPicker`](https://play-horizon.github.io/horizon-design/color-picker) | Picks a colour: a hex field and a swatch trigger opening an area, hue and alpha sliders and fields (Ark ColorPicker); `value` binds the colour (from `parseColor`), `labels`, required, names every control, the area's role and the values the area and sliders announce
|
|
295
|
-
| [`Combobox`](https://play-horizon.github.io/horizon-design/combobox) | A text field that filters a list of options to choose from (Ark Combobox); `label`, required, names the field, `emptyText`, required, shows when none matches, and Ark `translations` (`triggerLabel`), required, name its open button; Ark announces the options found to screen readers only when `translations` gives the messages (`resultsCount`, `noResults`, `loading`).
|
|
296
|
-
| [`DatePicker`](https://play-horizon.github.io/horizon-design/date-picker) | A date field with a calendar popover (Ark DatePicker); `label`, required, names the field, `value` binds the chosen dates, `placeholder` shows while none is chosen, and Ark `translations`, required, name its controls and the roles of its popover and tables.
|
|
297
|
-
| [`Editable`](https://play-horizon.github.io/horizon-design/editable) | Text that turns into a field when edited, then back (Ark Editable); `value` binds the text, and Ark `translations` (`input`, `edit`), required, name the field (when there is no `label`, which names it otherwise) and the text.
|
|
298
|
-
| [`FacetedSearch`](https://play-horizon.github.io/horizon-design/faceted-search) | Search with facets, for Discover and the store: a search field and an optional sort at the top, the facets in a column at the side (each a group of checkboxes, with optional counts), and the results, which the app renders in `children`. `query`, `selected` and `sort` bind, `onChange` reports each change, and `searchLabel`, `sortLabel` and `clearLabel` are required.
|
|
299
|
-
| [`Field`](https://play-horizon.github.io/horizon-design/field) | A form field: its label, the control, a help text and an error message (`label`, `helperText`, `errorText`), wired together for assistive technology (Ark Field).
|
|
300
|
-
| [`FileUpload`](https://play-horizon.github.io/horizon-design/file-upload) | A dropzone that takes files by drop or by browsing (Ark FileUpload); `prompt`, required, is its text and
|
|
301
|
-
| [`Hint`](https://play-horizon.github.io/horizon-design/hint) | A short help text under a field, which the field's `aria-describedby` points at through the hint's `id`; inside a `Field`, its `helperText` takes its place.
|
|
302
|
-
| [`ImageCropper`](https://play-horizon.github.io/horizon-design/image-cropper) | Crops an image (`src`) to a frame that can be moved and resized (Ark ImageCropper), for avatars and thumbnails; Ark `translations`, all required, name and describe it for assistive technology.
|
|
303
|
-
| [`Input`](https://play-horizon.github.io/horizon-design/input) | A text input on a sunken field, with optional icons or controls at its start and end (`start`, `end`); `value` binds its text and `invalid` marks it invalid. Inside a `Field`, it takes the field's label, description and error.
|
|
304
|
-
| [`InputGroup`](https://play-horizon.github.io/horizon-design/input-group) | An `Input` with `InputAddon`s (text or an icon, such as `https://`) attached to its sides, joined into one field.
|
|
305
|
-
| [`Listbox`](https://play-horizon.github.io/horizon-design/listbox) | A list of options to choose one or several from (Ark Listbox); `label`, required, names it, and `value` binds the chosen options.
|
|
306
|
-
| [`NativeSelect`](https://play-horizon.github.io/horizon-design/native-select) | The browser's own select, styled like the other fields; `value` binds the chosen option,
|
|
307
|
-
| [`NumberInput`](https://play-horizon.github.io/horizon-design/number-input) | A number field with increment and decrement buttons (Ark NumberInput); `value` binds the field's text, and `translations` (`incrementLabel`, `decrementLabel`, `roleDescription`), required, name the buttons and the field's role.
|
|
308
|
-
| [`PinInput`](https://play-horizon.github.io/horizon-design/pin-input) | A row of `count` one-character fields for a code, such as the sign-up code (Ark PinInput); `value` binds the characters,
|
|
309
|
-
| [`RadioGroup`](https://play-horizon.github.io/horizon-design/radio-group) | A group of radio buttons to choose one option (Ark RadioGroup), from `items` or Ark's `RadioGroup.Item` parts; `value` binds the chosen option, and `label` or an `aria-label` names the group.
|
|
310
|
-
| [`RatingGroup`](https://play-horizon.github.io/horizon-design/rating-group) | A row of `count` stars to give a rating (Ark RatingGroup); `value` binds the rating, `label`, required, names the group, and `translations` (`ratingValueText`, `roleDescription`), required, name each star and its role.
|
|
311
|
-
| [`Select`](https://play-horizon.github.io/horizon-design/select) | A select field with a dropdown list of options (Ark Select); `value` binds the chosen values, `label`, required, names the field, and `placeholder` shows while none is chosen.
|
|
312
|
-
| [`SignaturePad`](https://play-horizon.github.io/horizon-design/signature-pad) | A pad to draw a signature or a sketch (Ark SignaturePad), with a clear button once something is drawn; `label`, `roleDescription` and `clearLabel`, required, name the pad, its role and the button.
|
|
313
|
-
| [`Slider`](https://play-horizon.github.io/horizon-design/slider) | A slider to pick a value, or a range with one thumb per value (Ark Slider); `value` binds the values,
|
|
314
|
-
| [`Switch`](https://play-horizon.github.io/horizon-design/switch) | An on/off switch with its label (`label` or `children`, Ark Switch); `checked` binds its state.
|
|
315
|
-
| [`TagPicker`](https://play-horizon.github.io/horizon-design/tag-picker) | Chooses tags from a fixed list (the platform's tag lists are never free text): every tag is a toggle chip, the chosen ones
|
|
316
|
-
| [`Textarea`](https://play-horizon.github.io/horizon-design/textarea) | A multi-line text field on a sunken field; `value` binds its text. Inside a `Field`, it takes the field's label, description and error.
|
|
289
|
+
| Component | What it is |
|
|
290
|
+
| --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
291
|
+
| [`AngleSlider`](https://play-horizon.github.io/horizon-design/angle-slider) | A circular control that picks an angle in degrees from 0 to 359, 0 at the top and clockwise (Ark AngleSlider); `label`, required, is its accessible name, `valueText`, required, formats the angle shown and announced (such as `45°`), and `value` binds the angle. |
|
|
292
|
+
| [`Calendar`](https://play-horizon.github.io/horizon-design/calendar) | A month calendar to pick a date or a range, inline (Ark DatePicker without its field); Ark `translations`, required, name its days and controls (the arrows show theirs in a tooltip) and the roles of its tables. The day view always shows six weeks, and the month and year views keep its size. |
|
|
293
|
+
| [`Checkbox`](https://play-horizon.github.io/horizon-design/checkbox) | A checkbox with its label (`label` or `children`, Ark Checkbox); `checked` binds true, false or indeterminate (a bar as thick as the check). |
|
|
294
|
+
| [`CircularSlider`](https://play-horizon.github.io/horizon-design/circular-slider) | A circular control that picks a value from 0 to 359 along a ring that fills clockwise from the top, with a round start, up to its thumb (Ark AngleSlider), with the value in its centre; `label`, required, is its accessible name, `valueText`, required, formats the value shown and announced (such as `120°`), and `value` binds the value. |
|
|
295
|
+
| [`ColorPicker`](https://play-horizon.github.io/horizon-design/color-picker) | Picks a colour: a hex field and a swatch trigger opening an area, hue and alpha sliders and fields (Ark ColorPicker). The hex fields show 8 digits (`FF` alpha when opaque) and take 3, 4, 6 or 8; `formats` (`hexa`, `rgba`, `hsla`, `hsba`; the first three by default) writes the colour under the controls; `swatches`, preset colours on one line, none by default. `value` binds the colour (from `parseColor`), and `labels`, required, names every control (the trigger also in its tooltip), the list of formats, the area's role and the values the area and sliders announce. |
|
|
296
|
+
| [`Combobox`](https://play-horizon.github.io/horizon-design/combobox) | A text field that filters a list of options to choose from (Ark Combobox); `label`, required, names the field, `emptyText`, required, shows when none matches, and Ark `translations` (`triggerLabel`), required, name its open button (also its tooltip); `openOnClick` opens the options as soon as the field is pressed, ready for typing; Ark announces the options found to screen readers only when `translations` gives the messages (`resultsCount`, `noResults`, `loading`). |
|
|
297
|
+
| [`DatePicker`](https://play-horizon.github.io/horizon-design/date-picker) | A date field with a calendar popover (Ark DatePicker); `label`, required, names the field, `value` binds the chosen dates, `placeholder` shows while none is chosen, and Ark `translations`, required, name its controls (the icon buttons show theirs in a tooltip) and the roles of its popover and tables; its calendar is `Calendar`'s, and `openOnClick` opens it as soon as the field is pressed. |
|
|
298
|
+
| [`Editable`](https://play-horizon.github.io/horizon-design/editable) | Text that turns into a field when edited, then back (Ark Editable); `value` binds the text, and Ark `translations` (`input`, `edit`), required, name the field (when there is no `label`, which names it otherwise) and the text. |
|
|
299
|
+
| [`FacetedSearch`](https://play-horizon.github.io/horizon-design/faceted-search) | Search with facets, for Discover and the store: a search field and an optional sort at the top, the facets in a column at the side (each a group of checkboxes, with optional counts), and the results, which the app renders in `children`. `query`, `selected` and `sort` bind, `onChange` reports each change, and `searchLabel`, `sortLabel` and `clearLabel` are required. |
|
|
300
|
+
| [`Field`](https://play-horizon.github.io/horizon-design/field) | A form field: its label, the control, a help text and an error message (`label`, `helperText`, `errorText`), wired together for assistive technology (Ark Field). |
|
|
301
|
+
| [`FileUpload`](https://play-horizon.github.io/horizon-design/file-upload) | A dropzone that takes files by drop or by browsing (Ark FileUpload); `prompt`, required, is its text and `hint` a second line, which together name it; a `disabled` dropzone is dimmed. |
|
|
302
|
+
| [`Hint`](https://play-horizon.github.io/horizon-design/hint) | A short help text under a field, which the field's `aria-describedby` points at through the hint's `id`; inside a `Field`, its `helperText` takes its place. |
|
|
303
|
+
| [`ImageCropper`](https://play-horizon.github.io/horizon-design/image-cropper) | Crops an image (`src`) to a frame that can be moved and resized (Ark ImageCropper), for avatars and thumbnails; Ark `translations`, all required, name and describe it for assistive technology. |
|
|
304
|
+
| [`Input`](https://play-horizon.github.io/horizon-design/input) | A text input on a sunken field, with optional icons or controls at its start and end (`start`, `end`); `value` binds its text and `invalid` marks it invalid. Inside a `Field`, it takes the field's label, description and error. |
|
|
305
|
+
| [`InputGroup`](https://play-horizon.github.io/horizon-design/input-group) | An `Input` with `InputAddon`s (text or an icon, such as `https://`) attached to its sides, joined into one field. |
|
|
306
|
+
| [`Listbox`](https://play-horizon.github.io/horizon-design/listbox) | A list of options to choose one or several from (Ark Listbox); `label`, required, names it, and `value` binds the chosen options. An option with `disabled` can't be chosen, and Ark's horizontal `orientation` lays the options out in a row. |
|
|
307
|
+
| [`NativeSelect`](https://play-horizon.github.io/horizon-design/native-select) | The browser's own select, styled like the other fields; `value` binds the chosen option, a `<label for>` or an `aria-label` names it, and `aria-invalid` turns its border danger. |
|
|
308
|
+
| [`NumberInput`](https://play-horizon.github.io/horizon-design/number-input) | A number field with increment and decrement buttons (Ark NumberInput); `value` binds the field's text, and `translations` (`incrementLabel`, `decrementLabel`, `roleDescription`), required, name the buttons, shown as their tooltips too, and the field's role. Ark's `invalid` turns the border danger. |
|
|
309
|
+
| [`PinInput`](https://play-horizon.github.io/horizon-design/pin-input) | A row of `count` one-character fields for a code, such as the sign-up code (Ark PinInput); `value` binds the characters, Ark `translations.inputLabel` names each field, and Ark's `invalid` turns the borders danger. |
|
|
310
|
+
| [`RadioGroup`](https://play-horizon.github.io/horizon-design/radio-group) | A group of radio buttons to choose one option (Ark RadioGroup), from `items` or Ark's `RadioGroup.Item` parts; `value` binds the chosen option, and `label` or an `aria-label` names the group. Ark's `orientation="horizontal"` lays the options out in a row, and `invalid` turns the circles danger. |
|
|
311
|
+
| [`RatingGroup`](https://play-horizon.github.io/horizon-design/rating-group) | A row of `count` stars to give a rating (Ark RatingGroup); `value` binds the rating, `label`, required, names the group, and `translations` (`ratingValueText`, `roleDescription`), required, name each star and its role. With Ark's `allowHalf`, a half rating fills half a star. |
|
|
312
|
+
| [`Select`](https://play-horizon.github.io/horizon-design/select) | A select field with a dropdown list of options (Ark Select); `value` binds the chosen values, `label`, required, names the field, and `placeholder` shows while none is chosen. Ark's `invalid` turns its border danger. |
|
|
313
|
+
| [`SignaturePad`](https://play-horizon.github.io/horizon-design/signature-pad) | A pad to draw a signature or a sketch (Ark SignaturePad), with a clear button once something is drawn; `label`, `roleDescription` and `clearLabel`, required, name the pad, its role and the button. |
|
|
314
|
+
| [`Slider`](https://play-horizon.github.io/horizon-design/slider) | A slider to pick a value, or a range with one thumb per value (Ark Slider); `value` binds the values, `label` (or Ark's `aria-label`) names the thumbs, and Ark's `orientation="vertical"` stands it up. |
|
|
315
|
+
| [`Switch`](https://play-horizon.github.io/horizon-design/switch) | An on/off switch with its label (`label` or `children`, Ark Switch); `checked` binds its state. `checkedContent` and `uncheckedContent` put an icon on the thumb, sized and centred by the switch; the thumb travels with the same gap at both ends at every `size`. |
|
|
316
|
+
| [`TagPicker`](https://play-horizon.github.io/horizon-design/tag-picker) | Chooses tags from a fixed list (the platform's tag lists are never free text): every tag is a toggle chip, the chosen ones shown by their colour only. `value` binds the chosen ids, in the order chosen, `max` caps how many, and `label`, required, names the group. |
|
|
317
|
+
| [`Textarea`](https://play-horizon.github.io/horizon-design/textarea) | A multi-line text field on a sunken field; `value` binds its text, and `invalid` (or an invalid `Field`) turns it danger. Inside a `Field`, it takes the field's label, description and error. |
|
|
317
318
|
|
|
318
319
|
### Display
|
|
319
320
|
|
|
320
|
-
| Component | What it is
|
|
321
|
-
| ---------------------------------------------------------------------------- |
|
|
322
|
-
| [`Announcement`](https://play-horizon.github.io/horizon-design/announcement) | A small pill that announces something new, with an optional icon and a tag.
|
|
323
|
-
| [`AspectRatio`](https://play-horizon.github.io/horizon-design/aspect-ratio) | Keeps its content at a fixed width-to-height ratio (`ratio`, such as `16 / 9`).
|
|
324
|
-
| [`AssetCard`](https://play-horizon.github.io/horizon-design/asset-card) | An asset in a list (a store listing, an entry of My assets or of a game's assets): its square thumbnail, its `name
|
|
325
|
-
| [`Avatar`](https://play-horizon.github.io/horizon-design/avatar) | A person's avatar: their image, or their initials (`fallback`) on a coloured disc while it loads or when there is none. `alt`, the person's name, names it; without it, it is decorative.
|
|
326
|
-
| [`AvatarStack`](https://play-horizon.github.io/horizon-design/avatar-stack) | A row of overlapping avatars, such as who is editing a game now: up to `max` people, then a chip whose text `overflowText` gives; `label`, required, names the group.
|
|
327
|
-
| [`Badge`](https://play-horizon.github.io/horizon-design/badge) | A small label: a status, a count, a tag or a restriction badge; `variant` sets its colour and `size` its height.
|
|
328
|
-
| [`Card`](https://play-horizon.github.io/horizon-design/card) | A surface that groups related content: an optional title and description, the content, and an optional footer.
|
|
329
|
-
| [`Carousel`](https://play-horizon.github.io/horizon-design/carousel) | A horizontal slideshow of `slides` with previous and next controls and indicators (Ark Carousel); `label`, required, names it, and Ark `translations`, required, name the slides and the controls and the roles of the carousel and its slides.
|
|
330
|
-
| [`DataList`](https://play-horizon.github.io/horizon-design/data-list) | A list of label and value pairs (`items`), such as the details of a game.
|
|
331
|
-
| [`Frame`](https://play-horizon.github.io/horizon-design/frame) | A window-like frame around content, such as a code sample or a screenshot; with a `title`, a title bar shows it
|
|
332
|
-
| [`GameCard`](https://play-horizon.github.io/horizon-design/game-card) | A game in a list
|
|
333
|
-
| [`GameHero`](https://play-horizon.github.io/horizon-design/game-hero) | The top of a game page: the game's 16:9 thumbnail as a banner that fades into the page, with the square icon, the name, a `byline` (the creator) and the game's `tags` over its bottom, and a `top` slot at its top left (Back).
|
|
334
|
-
| [`Item`](https://play-horizon.github.io/horizon-design/item) | A row of a list, laying out what it is given (media, a title, a description, actions) in a line.
|
|
335
|
-
| [`Kbd`](https://play-horizon.github.io/horizon-design/kbd) | A keyboard key or shortcut, such as `Ctrl K`, drawn as a raised key.
|
|
336
|
-
| [`Marquee`](https://play-horizon.github.io/horizon-design/marquee) | Content (`MarqueeItem`s) that scrolls continuously, pausing while hovered or focused and still under reduced motion (Ark Marquee); `label` and `roleDescription`, required, name the region and its role.
|
|
337
|
-
| [`PlayerCount`](https://play-horizon.github.io/horizon-design/player-count) | How many people are playing a game now: a live dot and the count. `count` (formatted) and `label` (`playing now`) are required; `variant` is `inline` or an `overlay` pill on game art.
|
|
338
|
-
| [`Prose`](https://play-horizon.github.io/horizon-design/prose) | Typography for long-form text, such as rendered Markdown; its text is selectable.
|
|
339
|
-
| [`QrCode`](https://play-horizon.github.io/horizon-design/qr-code) | A QR code of `value` on the fixed `paper` background, so scanners read it in both themes (Ark QrCode); `label`, required, names the image.
|
|
340
|
-
| [`ScrollArea`](https://play-horizon.github.io/horizon-design/scroll-area) | A scrolling region with a thin, themed vertical scrollbar, shown only while the content overflows (Ark ScrollArea); the region needs a height.
|
|
341
|
-
| [`Separator`](https://play-horizon.github.io/horizon-design/separator) | A horizontal or vertical divider, hidden from assistive technology unless `decorative` is false.
|
|
342
|
-
| [`Status`](https://play-horizon.github.io/horizon-design/status) | A small dot that shows a status: online (or running), away, busy (or failing) or offline, with a soft ring in its colour; `label` names it, and without it the dot is decorative.
|
|
343
|
-
| [`Table`](https://play-horizon.github.io/horizon-design/table) | A data table from `columns` and `rows
|
|
344
|
-
| [`ThemeSwitch`](https://play-horizon.github.io/horizon-design/theme-switch) | The theme switch: three icon buttons (system, dark, light) on a sunken pill,
|
|
345
|
-
| [`ThumbCard`](https://play-horizon.github.io/horizon-design/thumb-card) | A card showing a preview (its content) with a `label` under it
|
|
346
|
-
| [`Timer`](https://play-horizon.github.io/horizon-design/timer) | A countdown or a stopwatch (Ark Timer), with the days before the hours from one day on (`01:02:00:00`), and start, pause, resume and reset buttons that `labels`, required, names.
|
|
321
|
+
| Component | What it is |
|
|
322
|
+
| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
323
|
+
| [`Announcement`](https://play-horizon.github.io/horizon-design/announcement) | A small pill that announces something new, with an optional icon and a tag. |
|
|
324
|
+
| [`AspectRatio`](https://play-horizon.github.io/horizon-design/aspect-ratio) | Keeps its content at a fixed width-to-height ratio (`ratio`, such as `16 / 9`). |
|
|
325
|
+
| [`AssetCard`](https://play-horizon.github.io/horizon-design/asset-card) | An asset in a list (a store listing, an entry of My assets or of a game's assets): its square thumbnail, its `name`, its `kind`, a `meta` line (votes, the rig profile) and `actions` (Add to my assets). It is a link with `href`, a button with `onclick`, a toggle pressed while `selected` with `selectable` (for pickers), and a plain display with none of them. `name` and `kind`, translated, are required. |
|
|
326
|
+
| [`Avatar`](https://play-horizon.github.io/horizon-design/avatar) | A person's avatar: their image, or their initials (`fallback`) on a coloured disc while it loads or when there is none, the same size either way. `alt`, the person's name, names it; without it, it is decorative. |
|
|
327
|
+
| [`AvatarStack`](https://play-horizon.github.io/horizon-design/avatar-stack) | A row of overlapping avatars, such as who is editing a game now: up to `max` people, then a chip whose text `overflowText` gives; `label`, required, names the group. |
|
|
328
|
+
| [`Badge`](https://play-horizon.github.io/horizon-design/badge) | A small label: a status, a count, a tag or a restriction badge; `variant` sets its colour and `size` its height. |
|
|
329
|
+
| [`Card`](https://play-horizon.github.io/horizon-design/card) | A surface that groups related content: an optional title and description, the content, and an optional footer. The title is a heading of `headingLevel` (3 by default, 2 right under the page's title). |
|
|
330
|
+
| [`Carousel`](https://play-horizon.github.io/horizon-design/carousel) | A horizontal slideshow of `slides` with previous and next controls and indicators (Ark Carousel); `label`, required, names it, and Ark `translations`, required, name the slides and the controls and the roles of the carousel and its slides. The arrows and dots show their names in tooltips. |
|
|
331
|
+
| [`DataList`](https://play-horizon.github.io/horizon-design/data-list) | A list of label and value pairs (`items`), such as the details of a game. |
|
|
332
|
+
| [`Frame`](https://play-horizon.github.io/horizon-design/frame) | A window-like frame around content, such as a code sample or a screenshot; with a `title`, a title bar shows it, with three window controls at its end. |
|
|
333
|
+
| [`GameCard`](https://play-horizon.github.io/horizon-design/game-card) | A game in a list, its 16:9 thumbnail and its name: a link with `href`, a button with `onclick`, either covering the whole card; a plain display with neither. The `feature` variant is the larger Continue playing card, with the icon and an `action` (Play). |
|
|
334
|
+
| [`GameHero`](https://play-horizon.github.io/horizon-design/game-hero) | The top of a game page: the game's 16:9 thumbnail as a banner that fades into the page, with the square icon, the name, a `byline` (the creator) and the game's `tags` over its bottom, and a `top` slot at its top left (Back, a `Button` of the `art` variant). |
|
|
335
|
+
| [`Item`](https://play-horizon.github.io/horizon-design/item) | A row of a list, laying out what it is given (media, a title, a description, actions) in a line: a link with `href`, a button with `onclick` (its content then holds no other control), a plain row with neither. |
|
|
336
|
+
| [`Kbd`](https://play-horizon.github.io/horizon-design/kbd) | A keyboard key or shortcut, such as `Ctrl K`, drawn as a raised key. With `command` (its names, translated), the platform's command key: ⌘ on Apple's platforms, Ctrl elsewhere, from the user agent once mounted, without changing size. `isApplePlatform` tells the app which key its shortcuts use. |
|
|
337
|
+
| [`Marquee`](https://play-horizon.github.io/horizon-design/marquee) | Content (`MarqueeItem`s) that scrolls continuously, pausing while hovered or focused and still under reduced motion (Ark Marquee); `label` and `roleDescription`, required, name the region and its role. |
|
|
338
|
+
| [`PlayerCount`](https://play-horizon.github.io/horizon-design/player-count) | How many people are playing a game now: a live dot and the count. `count` (formatted) and `label` (`playing now`) are required; `variant` is `inline` or an `overlay` pill on game art. |
|
|
339
|
+
| [`Prose`](https://play-horizon.github.io/horizon-design/prose) | Typography for long-form text, such as rendered Markdown; its text is selectable. |
|
|
340
|
+
| [`QrCode`](https://play-horizon.github.io/horizon-design/qr-code) | A QR code of `value` on the fixed `paper` background, so scanners read it in both themes (Ark QrCode); `label`, required, names the image. |
|
|
341
|
+
| [`ScrollArea`](https://play-horizon.github.io/horizon-design/scroll-area) | A scrolling region with a thin, themed vertical scrollbar, shown only while the content overflows and kept 8 px from the region's top and bottom (Ark ScrollArea); the region needs a height and a `label`, required, which names it, and takes the keyboard focus while it scrolls, so the arrow keys scroll it. |
|
|
342
|
+
| [`Separator`](https://play-horizon.github.io/horizon-design/separator) | A horizontal or vertical divider, hidden from assistive technology unless `decorative` is false. |
|
|
343
|
+
| [`Status`](https://play-horizon.github.io/horizon-design/status) | A small dot that shows a status: online (or running), away, busy (or failing) or offline, with a soft ring in its colour; `label` names it, and without it the dot is decorative. |
|
|
344
|
+
| [`Table`](https://play-horizon.github.io/horizon-design/table) | A data table from `columns` and `rows`: a column shows each row's field named by its `key`, or renders its `cell` snippet with the row; `rowKey`, required, gives each row's stable key. |
|
|
345
|
+
| [`ThemeSwitch`](https://play-horizon.github.io/horizon-design/theme-switch) | The theme switch: three icon buttons (system, dark, light) on a sunken pill, which call `theme.set`, with a raised highlight that slides to the chosen one; `labels`, required, names the group and each mode, also in each button's tooltip (`tooltipSide` places them). |
|
|
346
|
+
| [`ThumbCard`](https://play-horizon.github.io/horizon-design/thumb-card) | A card showing a preview (its content) with a `label` under it: a link with `href`, a button with `onclick`, either covering the whole card; a plain display with neither. |
|
|
347
|
+
| [`Timer`](https://play-horizon.github.io/horizon-design/timer) | A countdown or a stopwatch (Ark Timer), with the days before the hours from one day on (`01:02:00:00`), and start, pause, resume and reset buttons that `labels`, required, names (also in their tooltips). It starts paused unless `autoStart`. |
|
|
347
348
|
|
|
348
349
|
### Feedback
|
|
349
350
|
|
|
350
351
|
| Component | What it is |
|
|
351
352
|
| ----------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
352
353
|
| [`Alert`](https://play-horizon.github.io/horizon-design/alert) | An inline message (a banner): a neutral, info, success, warning or error tint, an icon, a title and a description. |
|
|
353
|
-
| [`CircularProgress`](https://play-horizon.github.io/horizon-design/circular-progress) | A ring that fills with progress (`value` out of `max`), with an optional value in its centre; `label`, required, names the progress bar, and `valueText` (formatted, such as `72%`) is shown and announced.
|
|
354
|
+
| [`CircularProgress`](https://play-horizon.github.io/horizon-design/circular-progress) | A ring that fills with progress (`value` out of `max`), with round ends and an optional value in its centre; `label`, required, names the progress bar, and `valueText` (formatted, such as `72%`) is shown and announced. |
|
|
354
355
|
| [`NotificationCenter`](https://play-horizon.github.io/horizon-design/notification-center) | The notification centre: a heading with "Mark all as read", then the account's notifications, newest first, each with its image (a game's icon), its text, its time and, while unread, a dot. `heading`, `emptyText`, `markAllLabel` and `unreadLabel` are required, and `actions` renders a notification's buttons. |
|
|
355
356
|
| [`Progress`](https://play-horizon.github.io/horizon-design/progress) | A horizontal progress bar of `value`, required, with an optional label and value (Ark Progress); `label` names the bar. |
|
|
356
357
|
| [`Skeleton`](https://play-horizon.github.io/horizon-design/skeleton) | A placeholder block that pulses while content loads (pages show skeletons, not spinners). |
|
|
357
358
|
| [`Spinner`](https://play-horizon.github.io/horizon-design/spinner) | A spinning loading indicator, for an action in progress inside a control (a button); `label` shows beside it and is announced, an `aria-label` is only announced, and with neither it is decorative. |
|
|
358
|
-
| [`Toaster`](https://play-horizon.github.io/horizon-design/toast) | Shows the toasts of a toaster made with `createToaster`, stacked at the window's edge, in a live region; `label` and `closeLabel`, required, name the region and each toast's close button.
|
|
359
|
-
| [`ToastItem`](https://play-horizon.github.io/horizon-design/toast) | One toast message: an info, success, warning or error tint (or, while loading, a neutral one with a spinner), a title, a description and a close button named by `closeLabel`, required.
|
|
359
|
+
| [`Toaster`](https://play-horizon.github.io/horizon-design/toast) | Shows the toasts of a toaster made with `createToaster`, stacked at the window's edge, in a live region; `label` and `closeLabel`, required, name the region and each toast's close button, whose tooltip says the same. |
|
|
360
|
+
| [`ToastItem`](https://play-horizon.github.io/horizon-design/toast) | One toast message: an info, success, warning or error tint (or, while loading, a neutral one with a spinner), a title, a description and a close button named by `closeLabel`, required, which is also its tooltip. |
|
|
360
361
|
|
|
361
362
|
### Navigation
|
|
362
363
|
|
|
@@ -365,48 +366,47 @@ variants).
|
|
|
365
366
|
| [`Accordion`](https://play-horizon.github.io/horizon-design/accordion) | A vertical stack of collapsible sections (Ark Accordion); `AccordionItem` is one section, with its `value` and its `trigger`, and `value` binds the open sections. |
|
|
366
367
|
| [`BottomNavigation`](https://play-horizon.github.io/horizon-design/bottom-navigation) | A bar of navigation `items` fixed to the bottom of a narrow screen; `label`, required, names it among the page's landmarks. |
|
|
367
368
|
| [`Breadcrumb`](https://play-horizon.github.io/horizon-design/breadcrumb) | The trail of pages leading to the current one, each a link but the last; `label`, required, names the trail. |
|
|
368
|
-
| [`Collapsible`](https://play-horizon.github.io/horizon-design/collapsible) | Content that a trigger shows and hides (Ark Collapsible); `open` binds whether it shows.
|
|
369
|
+
| [`Collapsible`](https://play-horizon.github.io/horizon-design/collapsible) | Content that a trigger shows and hides (Ark Collapsible); `open` binds whether it shows, and `disabled` turns the trigger off. |
|
|
369
370
|
| [`CommandPalette`](https://play-horizon.github.io/horizon-design/command-palette) | The command palette: a dialog at the top of the window with a search field and every command that matches what is typed (each word whole, ignoring case and accents, through Ark's `useFilter`), ranked by [fuzzysort](https://github.com/farzher/fuzzysort), label matches first, each with its shortcut. The field and the virtualised list are an Ark combobox: Up, Down, Home and End move through the commands that can run, Enter runs one, Escape closes. `open` binds, `onRun` runs the chosen command once the palette has finished closing, so the command can move the focus, and `label` and `emptyText` are required. |
|
|
370
371
|
| [`LinkOverlay`](https://play-horizon.github.io/horizon-design/link-overlay) | The link of a `LinkBox`, stretched over the whole box so a click anywhere follows it, while the box's other links and controls stay usable. |
|
|
371
|
-
| [`Pagination`](https://play-horizon.github.io/horizon-design/pagination) | Page links with previous and next for `count` items, required (Ark Pagination); `page` binds the current page, and Ark `translations` name its controls. `children` replaces the built-in controls with the parts `PaginationPrevTrigger
|
|
372
|
-
| [`Sidebar`](https://play-horizon.github.io/horizon-design/sidebar) | An app's navigation sidebar: a sunken column with an optional header (the brand), the navigation itself (`SidebarSection` and `SidebarItem`) and an optional footer (the account); `collapsed` narrows it to its icons.
|
|
372
|
+
| [`Pagination`](https://play-horizon.github.io/horizon-design/pagination) | Page links with previous and next for `count` items, required (Ark Pagination); `page` binds the current page, and Ark `translations` name its controls; the built-in arrows show their names as tooltips. `children` replaces the built-in controls with the parts `PaginationPrevTrigger` and `PaginationNextTrigger` (an icon-only one takes a `label`, its tooltip), `PaginationItem`, `PaginationEllipsis` and `PaginationContext`, which reads its state. |
|
|
373
|
+
| [`Sidebar`](https://play-horizon.github.io/horizon-design/sidebar) | An app's navigation sidebar: a sunken column with an optional header (the brand), the navigation itself (`SidebarSection` and `SidebarItem`, named by `label`) and an optional footer (the account); `collapsed` narrows it to its icons, and each item then shows its text as a tooltip. |
|
|
373
374
|
| [`SkipNav`](https://play-horizon.github.io/horizon-design/skip-nav) | A link, shown on keyboard focus, that skips to the page's main content. |
|
|
374
375
|
| [`Steps`](https://play-horizon.github.io/horizon-design/steps) | A multi-step flow (Ark Steps): the `steps` (each an `id`, a `title` and its `content`), the current step's content, and back and next buttons named by `prevLabel` and `nextLabel`, required; `step` binds the current step. |
|
|
375
|
-
| [`Tabs`](https://play-horizon.github.io/horizon-design/tabs) | Tabs and their panels (Ark Tabs), a segmented or an underlined tab list; each tab is a `value`, a `label` and its `content`, and `value` binds the selected tab. |
|
|
376
376
|
|
|
377
377
|
### Overlays
|
|
378
378
|
|
|
379
|
-
| Component | What it is
|
|
380
|
-
| ------------------------------------------------------------------------------- |
|
|
381
|
-
| [`AlertDialog`](https://play-horizon.github.io/horizon-design/alert-dialog) | A confirmation dialog for a destructive or irreversible action: a title, a description, Cancel and the confirming action, named by `cancelLabel` and `actionLabel`, required. Cancel takes the focus; the confirming button calls `onAction`, required, and closes it; `open` binds.
|
|
382
|
-
| [`ContextMenu`](https://play-horizon.github.io/horizon-design/context-menu) | A menu opened by a right click or a long press on its content (Ark Menu): its `groups` (each with an `id`, an optional title that names it, and its `items` to choose, each with an `id`), a line between groups, and Ark's `onSelect` reports the chosen item's `id`; `frosted` for a translucent surface.
|
|
383
|
-
| [`Dialog`](https://play-horizon.github.io/horizon-design/dialog) | A modal dialog (Ark Dialog): a title, a description, the content and a footer, on the raised surface over a scrim; `closeLabel`, required, names its close button, `open` binds, and `DialogClose` closes it from inside; `frosted` for a translucent surface.
|
|
384
|
-
| [`Drawer`](https://play-horizon.github.io/horizon-design/drawer) | A panel that slides in from the end edge of the window and is swiped back toward it to dismiss it (Ark Drawer), with a title, content and footer; `title`, required, names it, `closeLabel`, required, names its close button, `open` binds, and `DrawerClose` closes it from inside.
|
|
385
|
-
| [`FloatingPanel`](https://play-horizon.github.io/horizon-design/floating-panel) | A panel that floats over the window, dragged by its header and resized by its edges and corners (Ark FloatingPanel); `title`, required, names it, `closeLabel`, required, names its close button, and `open` binds.
|
|
386
|
-
| [`HoverCard`](https://play-horizon.github.io/horizon-design/hover-card) | A card that shows on hover or focus of its trigger (Ark HoverCard), such as the docs card of a function; `frosted` for a translucent surface.
|
|
387
|
-
| [`Menu`](https://play-horizon.github.io/horizon-design/menu) | A dropdown menu opened by its trigger (Ark Menu): `MenuItem`s (each a `value`, which Ark's `onSelect` reports), `MenuGroup`s named by a `MenuGroupLabel`, and `MenuSeparator`s; `open` binds, `frosted`
|
|
388
|
-
| [`Popover`](https://play-horizon.github.io/horizon-design/popover) | A non-modal panel anchored to its trigger (Ark Popover), with a title, content and footer; `open` binds, and `PopoverClose`, named by its required `label`, closes it from inside; `frosted` for a translucent surface.
|
|
389
|
-
| [`Sheet`](https://play-horizon.github.io/horizon-design/sheet) | A modal panel that slides in from one `side` of the window (Ark Dialog); `closeLabel`, required, names its close button, and `open` binds; `frosted` for a translucent surface.
|
|
390
|
-
| [`Tooltip`](https://play-horizon.github.io/horizon-design/tooltip) | A short label (`content`) shown on hover or keyboard focus of its trigger (Ark Tooltip): a button holding `children`, or the app's own element through `trigger
|
|
391
|
-
| [`Tour`](https://play-horizon.github.io/horizon-design/tour) | A guided tour of the interface, step by step, with the step's target spotlit (Ark Tour); the app passes the `steps` and their action labels translated, and `closeLabel` and `progressText`, required.
|
|
379
|
+
| Component | What it is |
|
|
380
|
+
| ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
381
|
+
| [`AlertDialog`](https://play-horizon.github.io/horizon-design/alert-dialog) | A confirmation dialog for a destructive or irreversible action: a title, a description, Cancel and the confirming action, named by `cancelLabel` and `actionLabel`, required. Cancel takes the focus; the confirming button calls `onAction`, required, and closes it; `open` binds. |
|
|
382
|
+
| [`ContextMenu`](https://play-horizon.github.io/horizon-design/context-menu) | A menu opened by a right click or a long press on its content (Ark Menu): its `groups` (each with an `id`, an optional title that names it, and its `items` to choose, each with an `id`), a line between groups, and Ark's `onSelect` reports the chosen item's `id`; `frosted` for a translucent surface. |
|
|
383
|
+
| [`Dialog`](https://play-horizon.github.io/horizon-design/dialog) | A modal dialog (Ark Dialog): a title, a description, the content and a footer, on the raised surface over a scrim; `closeLabel`, required, names its close button and is its tooltip, `open` binds, and `DialogClose` closes it from inside (without children, a close icon whose `label`, required, is its name and tooltip); `frosted` for a translucent surface. |
|
|
384
|
+
| [`Drawer`](https://play-horizon.github.io/horizon-design/drawer) | A panel that slides in from the end edge of the window and is swiped back toward it to dismiss it (Ark Drawer), with a title, content and footer; `title`, required, names it, `closeLabel`, required, names its close button and is its tooltip, `open` binds, and `DrawerClose` closes it from inside. |
|
|
385
|
+
| [`FloatingPanel`](https://play-horizon.github.io/horizon-design/floating-panel) | A panel that floats over the window, dragged by its header and resized by its edges and corners (Ark FloatingPanel); `title`, required, names it, `closeLabel`, required, names its close button and is its tooltip, and `open` binds. |
|
|
386
|
+
| [`HoverCard`](https://play-horizon.github.io/horizon-design/hover-card) | A card that shows on hover or focus of its trigger (Ark HoverCard), such as the docs card of a function; `frosted` for a translucent surface. |
|
|
387
|
+
| [`Menu`](https://play-horizon.github.io/horizon-design/menu) | A dropdown menu opened by its trigger (Ark Menu): `MenuItem`s (each a `value`, which Ark's `onSelect` reports), `MenuGroup`s named by a `MenuGroupLabel`, and `MenuSeparator`s; `open` binds, a trigger that shows only an icon takes a `triggerLabel` (its accessible name and tooltip), and `frosted` gives a translucent surface. |
|
|
388
|
+
| [`Popover`](https://play-horizon.github.io/horizon-design/popover) | A non-modal panel anchored to its trigger (Ark Popover), with a title, content and footer; `open` binds, a trigger that shows only an icon takes a `triggerLabel` (its accessible name and tooltip), and `PopoverClose`, named by its required `label`, closes it from inside (`iconOnly` shows the label as a tooltip); `frosted` for a translucent surface. |
|
|
389
|
+
| [`Sheet`](https://play-horizon.github.io/horizon-design/sheet) | A modal panel that slides in from one `side` of the window (Ark Dialog); `closeLabel`, required, names its close button and is its tooltip, a trigger that shows only an icon takes a `triggerLabel` (its accessible name and tooltip), and `open` binds; `frosted` for a translucent surface. |
|
|
390
|
+
| [`Tooltip`](https://play-horizon.github.io/horizon-design/tooltip) | A short label (`content`) shown on hover or keyboard focus of its trigger (Ark Tooltip), above every other layer: a button holding `children`, or the app's own element through `trigger`, which receives no `data-scope`, `data-part` or `data-state`; when that element is another component's trigger, `triggerId` is the id that component gives it (through its Ark `ids`). It describes the trigger, so an icon-only trigger still needs an `aria-label`. |
|
|
391
|
+
| [`Tour`](https://play-horizon.github.io/horizon-design/tour) | A guided tour of the interface, step by step, with the step's target spotlit (Ark Tour); the app passes the `steps` and their action labels translated, and `closeLabel` (the close button's name and tooltip) and `progressText`, required. |
|
|
392
392
|
|
|
393
393
|
### Layout
|
|
394
394
|
|
|
395
395
|
| Component | What it is |
|
|
396
396
|
| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
397
397
|
| [`Float`](https://play-horizon.github.io/horizon-design/float) | Pins its content at a corner or the bottom centre of the window (`position`), over the page, such as floating action buttons; several children stack in a column. |
|
|
398
|
-
| [`Splitter`](https://play-horizon.github.io/horizon-design/splitter) | Resizable panels (Ark Splitter): `SplitterPanel`s, each with its `id` from `panels`, and a `SplitterResizeTrigger` between each two, named by its `label`, required.
|
|
398
|
+
| [`Splitter`](https://play-horizon.github.io/horizon-design/splitter) | Resizable panels (Ark Splitter), in a row or, with `orientation="vertical"`, a column: `SplitterPanel`s, each with its `id` from `panels`, and a `SplitterResizeTrigger` between each two, named by its `label`, required. |
|
|
399
399
|
| [`VirtualList`](https://play-horizon.github.io/horizon-design/virtual-list) | A scrolling list that renders only the rows in view (plus `overscan` rows on each side), so a list of any length costs the same as one screenful; `items`, `itemHeight`, `key` and `row` are required, and `scrollToIndex` brings a row into view, and `keepIndex` keeps a row (such as the active one) rendered while it is out of view. |
|
|
400
400
|
| [`VirtualTree`](https://play-horizon.github.io/horizon-design/virtual-tree) | A virtualised tree (WAI-ARIA tree view, on Ark TreeView): only the rows in view are rendered, so a hierarchy of any size stays fast, with Ark's keyboard, multiple selection and renaming, and its own type-to-find, which takes names with spaces. `collection` (from `createTreeCollection`), `label` and `row` are required; `expandedValue`, `selectedValue` and `focusedValue` bind, `rename` enables F2 renaming, and `focus`, `visibleValues` and `startRenaming` bring a row into view and focus it, list the rows on screen, and open the rename field. |
|
|
401
401
|
|
|
402
402
|
### Editor
|
|
403
403
|
|
|
404
|
-
| Component | What it is
|
|
405
|
-
| --------------------------------------------------------------------------------- |
|
|
406
|
-
| [`FileTree`](https://play-horizon.github.io/horizon-design/file-tree) | A tree of files and folders on `VirtualTree` (only the rows in view are rendered) from a `collection`, with expandable folders and custom icons; only files are selected. `label`, required, names it, and `selectedValue`, `expandedValue` and `focusedValue` bind.
|
|
407
|
-
| [`HierarchyView`](https://play-horizon.github.io/horizon-design/hierarchy-view) | The Editor's hierarchy of a scene's objects, on `VirtualTree`: keyboard navigation, multiple selection, renaming, deletion, and drag and drop ([pragmatic-drag-and-drop](#drag-and-drop)) to reparent and reorder, which reports each change of `data` through `onDataChange`. `label`, `renameLabel` and `dragLabel` are required; `nodeWithName` writes a renamed node when `nodeToString` reads a field other than `name`, and `selectedValue` and `expandedValue` bind.
|
|
408
|
-
| [`HorizonLayout`](https://play-horizon.github.io/horizon-design/horizon-layout) | The Editor window's docking layout: horizon-layout 2.0.2 styled with horizon-design, taking every prop of its `HorizonLayout`, with docked panes that meet on a single line, floating panels raised over them, and a button that restores a maximised view; `config` binds, `views` holds the views, horizon-layout's `translations`, required and complete, name the split handles, the tab lists and the floating panels, and `restoreLabel`, required, names the restore button. |
|
|
409
|
-
| [`InspectorPanel`](https://play-horizon.github.io/horizon-design/inspector-panel) | The Editor's inspector: a column of collapsible cards (a component each) that can be reordered by drag ([pragmatic-drag-and-drop](#drag-and-drop)) or keyboard; `cards` and `expandedIds` bind
|
|
404
|
+
| Component | What it is |
|
|
405
|
+
| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
406
|
+
| [`FileTree`](https://play-horizon.github.io/horizon-design/file-tree) | A tree of files and folders on `VirtualTree` (only the rows in view are rendered) from a `collection`, with expandable folders and custom icons; only files are selected. `label`, required, names it, and `selectedValue`, `expandedValue` and `focusedValue` bind. |
|
|
407
|
+
| [`HierarchyView`](https://play-horizon.github.io/horizon-design/hierarchy-view) | The Editor's hierarchy of a scene's objects, on `VirtualTree`: keyboard navigation, multiple selection, renaming, deletion, and drag and drop ([pragmatic-drag-and-drop](#drag-and-drop)) to reparent and reorder, which reports each change of `data` through `onDataChange`. `label`, `renameLabel` and `dragLabel` are required; `nodeWithName` writes a renamed node when `nodeToString` reads a field other than `name`, and `selectedValue` and `expandedValue` bind. |
|
|
408
|
+
| [`HorizonLayout`](https://play-horizon.github.io/horizon-design/horizon-layout) | The Editor window's docking layout: horizon-layout 2.0.2 styled with horizon-design, taking every prop of its `HorizonLayout`, with docked panes that meet on a single line, floating panels raised over them, and a button that restores a maximised view; `config` binds, `views` holds the views, horizon-layout's `translations`, required and complete, name the split handles, the tab lists and the floating panels, and `restoreLabel`, required, names the restore button and is its tooltip. |
|
|
409
|
+
| [`InspectorPanel`](https://play-horizon.github.io/horizon-design/inspector-panel) | The Editor's inspector: a column of collapsible cards (a component each) that can be reordered by drag ([pragmatic-drag-and-drop](#drag-and-drop)) or keyboard; `cards` and `expandedIds` bind, and `onRemove` with `removeLabel` adds a remove button (with its tooltip) to each card not marked `removable: false`. |
|
|
410
410
|
|
|
411
411
|
## Drag and drop
|
|
412
412
|
|
|
@@ -418,9 +418,57 @@ package computes exactly the instructions a hierarchy needs (reorder above or be
|
|
|
418
418
|
reparent by indent level) and a list's closest edge. `@dnd-kit/svelte` was the alternative; its
|
|
419
419
|
Svelte port is younger and less proven. The keyboard does the same moves (Shift+arrows).
|
|
420
420
|
|
|
421
|
+
## Upgrading from 1.0.0
|
|
422
|
+
|
|
423
|
+
2.0.0 changes what code written for 1.0.0 may rely on:
|
|
424
|
+
|
|
425
|
+
- **`Tabs` is removed.** Use `SegmentGroup` with `variant="underline"`, and render the view of its
|
|
426
|
+
`value` below it: `<SegmentGroup variant="underline" items={…} bind:value />` then
|
|
427
|
+
`{#if value === 'overview'}…{/if}`. Its items are `{ value, label, disabled? }` (a tab's
|
|
428
|
+
`content` snippet has no counterpart), and it is a radio group for assistive technology, not a tab
|
|
429
|
+
list.
|
|
430
|
+
- **Names are spelled out**: `theme.init()` is `theme.initialize()`, and its options type
|
|
431
|
+
`ThemeInitOptions` is `ThemeInitializeOptions`.
|
|
432
|
+
- **`AssetCard`, `Item` and `ThumbCard` are interactive only with an action.** Without `href` or
|
|
433
|
+
`onclick` they are plain displays: no hover, no pointer, no focus. An `AssetCard` with `onclick`
|
|
434
|
+
is a button; it is a toggle (with `aria-pressed` and the chosen look of `selected`) only with
|
|
435
|
+
the new `selectable` prop, so a picker adds `selectable`. An `Item` with `onclick` is now a
|
|
436
|
+
`<button>` (and with `href` an `<a>`): its content must hold no other control.
|
|
437
|
+
- **`ColorPicker`**: `labels.formats`, required, names the list of the colour's values now shown
|
|
438
|
+
under the controls (`formats={[]}` hides it). The hex fields show 8 digits (`#RRGGBBAA`).
|
|
439
|
+
- **`Calendar` and `DatePicker`** always show six weeks. The view switch's name is now the visible
|
|
440
|
+
month, year or decade, then `translations.viewTrigger`'s text (`"March 2026, show the month
|
|
441
|
+
view"`): write that text to follow the date.
|
|
442
|
+
- **`ThemeSwitch`** names each mode in a `Tooltip` instead of a `title` attribute.
|
|
443
|
+
- **`DatePicker`'s** calendar has `Calendar`'s 36 px cells (they were 32 px). `Calendar`'s size
|
|
444
|
+
follows `--cell-size`, set through its `class` as in 1.0; a `w-full` class no longer stretches it.
|
|
445
|
+
- **`ScrollArea`** requires `label`, which names its viewport, a region: the viewport takes the
|
|
446
|
+
keyboard focus while its content overflows (so the keyboard can scroll it), and a test that tabs
|
|
447
|
+
across a scrolling region meets one more stop.
|
|
448
|
+
- **Every icon-only button of the kit** shows its accessible name in a tooltip (the close buttons of
|
|
449
|
+
`Dialog`, `Drawer`, `Sheet`, `FloatingPanel`, `Toast` and `Tour`, the arrows and dots of
|
|
450
|
+
`Carousel` and the arrows of `Calendar`, `DatePicker` and `Pagination`, the buttons of `Timer`,
|
|
451
|
+
`NumberInput`, `Clipboard`, `Combobox`, `ColorPicker`, `ThemeSwitch`, a collapsed `Sidebar`'s
|
|
452
|
+
items, `ToggleGroup`'s icon items and `HorizonLayout`'s restore button): a test that counts the
|
|
453
|
+
elements of role `tooltip` finds them.
|
|
454
|
+
- **`Table`**: a column renders its `cell` snippet with the row (`cell: Snippet<[Row]>`), in place
|
|
455
|
+
of the per-row snippet cells, and `columns` and `rows` are required; `Table` is generic over the row type, and `TableColumn<Row>` types a column.
|
|
456
|
+
- **`DialogClose`** without children (the close icon) requires its `label`, which is also its
|
|
457
|
+
tooltip.
|
|
458
|
+
- **`Tooltip`**: the props its `trigger` snippet receives no longer carry `data-scope`, `data-part`
|
|
459
|
+
and `data-state`; give `triggerId` when the element is another component's trigger (with the same
|
|
460
|
+
id in that component's `ids`). Its content now sits above every layer (dialogs, toasts, the tour).
|
|
461
|
+
- **`FileUpload`**: the dropzone is named by `prompt` and `hint` together, and the file input is no
|
|
462
|
+
longer inside it: a test that finds the dropzone by `prompt` alone, or the input inside the
|
|
463
|
+
dropzone, needs updating.
|
|
464
|
+
- **Tokens**: the light theme's `warning` is a gold (`oklch(0.51 0.104 84)`, it was
|
|
465
|
+
`oklch(0.54 0.116 70)`) and its `warning-subtle` and `warning-border` follow; the five avatar
|
|
466
|
+
tones are darker (white initials keep 4.5:1); `art-scrim-hover` is new. Code that copied a hex
|
|
467
|
+
from `horizon-design/tokens` gets the new values.
|
|
468
|
+
|
|
421
469
|
## Developing
|
|
422
470
|
|
|
423
|
-
Requirements: Node
|
|
471
|
+
Requirements: Node 26 and pnpm 12 (`.node-version`, `packageManager`).
|
|
424
472
|
|
|
425
473
|
```sh
|
|
426
474
|
pnpm install
|
|
@@ -439,7 +487,7 @@ pnpm build # the docs site (build/) and the package (dist/)
|
|
|
439
487
|
- `src/lib/theme.svelte.ts` and `src/lib/motion/`: the theme controller and page motion.
|
|
440
488
|
- `scripts/tokens/`: the token source and the generator, which converts OKLCH to hex with [colorjs.io](https://colorjs.io) when the library is built.
|
|
441
489
|
- `src/routes/`: the docs site, one page per component (`sections/<Name>.svelte`), listed in
|
|
442
|
-
`src/routes/
|
|
490
|
+
`src/routes/navigation.ts`.
|
|
443
491
|
|
|
444
492
|
Every new component gets a docs page with live examples and component tests. Publishing: a push
|
|
445
493
|
to `main` that bumps the version publishes to npm and deploys the docs site.
|