@human-kit/ui 1.0.0-beta.0 → 1.0.0-beta.10
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 +29 -16
- package/dist/FOCUS_STATE_CONTRACT.md +18 -4
- package/dist/FOCUS_STATE_REVIEW_TEMPLATE.md +8 -8
- package/dist/accordion/README.md +3 -3
- package/dist/accordion/root/accordion-root.svelte +15 -3
- package/dist/accordion/root/context.svelte.js +4 -4
- package/dist/accordion/types.d.ts +40 -19
- package/dist/autocomplete/README.md +6 -7
- package/dist/autocomplete/empty/autocomplete-empty.svelte +1 -1
- package/dist/autocomplete/empty/autocomplete-empty.svelte.d.ts +1 -1
- package/dist/autocomplete/input/autocomplete-input.svelte +3 -3
- package/dist/autocomplete/input/autocomplete-input.svelte.d.ts +3 -3
- package/dist/autocomplete/item/autocomplete-item.svelte +10 -0
- package/dist/autocomplete/item-indicator/autocomplete-item-indicator.svelte +2 -2
- package/dist/autocomplete/item-indicator/autocomplete-item-indicator.svelte.d.ts +2 -2
- package/dist/autocomplete/list/autocomplete-list.svelte +2 -2
- package/dist/autocomplete/list/autocomplete-list.svelte.d.ts +11 -3
- package/dist/autocomplete/root/autocomplete.svelte +7 -7
- package/dist/autocomplete/root/autocomplete.svelte.d.ts +7 -7
- package/dist/autocomplete/status/autocomplete-status.svelte +1 -1
- package/dist/autocomplete/status/autocomplete-status.svelte.d.ts +1 -1
- package/dist/avatar/README.md +52 -0
- package/dist/avatar/count/avatar-count.svelte +56 -0
- package/dist/avatar/count/avatar-count.svelte.d.ts +4 -0
- package/dist/avatar/fallback/avatar-fallback.svelte +67 -0
- package/dist/avatar/fallback/avatar-fallback.svelte.d.ts +4 -0
- package/dist/avatar/group/avatar-group.svelte +65 -0
- package/dist/avatar/group/avatar-group.svelte.d.ts +4 -0
- package/dist/avatar/group/context.d.ts +15 -0
- package/dist/avatar/group/context.js +15 -0
- package/dist/avatar/image/avatar-image.svelte +104 -0
- package/dist/avatar/image/avatar-image.svelte.d.ts +4 -0
- package/dist/avatar/index.d.ts +22 -0
- package/dist/avatar/index.js +10 -0
- package/dist/avatar/index.parts.d.ts +5 -0
- package/dist/avatar/index.parts.js +5 -0
- package/dist/avatar/root/avatar-root.svelte +79 -0
- package/dist/avatar/root/avatar-root.svelte.d.ts +4 -0
- package/dist/avatar/root/context.d.ts +14 -0
- package/dist/avatar/root/context.js +15 -0
- package/dist/avatar/types.d.ts +84 -0
- package/dist/avatar/types.js +1 -0
- package/dist/breadcrumbs/README.md +65 -0
- package/dist/breadcrumbs/ellipsis/breadcrumbs-ellipsis.svelte +62 -0
- package/dist/breadcrumbs/ellipsis/breadcrumbs-ellipsis.svelte.d.ts +4 -0
- package/dist/breadcrumbs/index.d.ts +23 -0
- package/dist/breadcrumbs/index.js +10 -0
- package/dist/breadcrumbs/index.parts.d.ts +6 -0
- package/dist/breadcrumbs/index.parts.js +6 -0
- package/dist/breadcrumbs/item/breadcrumbs-item.svelte +42 -0
- package/dist/breadcrumbs/item/breadcrumbs-item.svelte.d.ts +4 -0
- package/dist/breadcrumbs/link/breadcrumbs-link.svelte +47 -0
- package/dist/breadcrumbs/link/breadcrumbs-link.svelte.d.ts +4 -0
- package/dist/breadcrumbs/list/breadcrumbs-list.svelte +31 -0
- package/dist/breadcrumbs/list/breadcrumbs-list.svelte.d.ts +4 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.svelte +112 -0
- package/dist/breadcrumbs/root/breadcrumbs-root.svelte.d.ts +4 -0
- package/dist/breadcrumbs/root/context.d.ts +19 -0
- package/dist/breadcrumbs/root/context.js +15 -0
- package/dist/breadcrumbs/separator/breadcrumbs-separator.svelte +35 -0
- package/dist/breadcrumbs/separator/breadcrumbs-separator.svelte.d.ts +4 -0
- package/dist/breadcrumbs/types.d.ts +80 -0
- package/dist/breadcrumbs/types.js +1 -0
- package/dist/button/README.md +1 -1
- package/dist/button/root/button-root.svelte +37 -7
- package/dist/button/root/button-root.svelte.d.ts +19 -4
- package/dist/calendar/README.md +3 -3
- package/dist/calendar/body-cell/calendar-body-cell.svelte +7 -0
- package/dist/calendar/grid-header/calendar-grid-header.svelte +3 -4
- package/dist/calendar/grid-header/calendar-grid-header.svelte.d.ts +3 -4
- package/dist/calendar/root/calendar-root.svelte +8 -2
- package/dist/calendar/root/calendar-root.svelte.d.ts +8 -2
- package/dist/calendar/root/context.svelte.js +8 -2
- package/dist/calendar/trigger-next/README.md +1 -1
- package/dist/calendar/trigger-previous/README.md +1 -1
- package/dist/checkbox/README.md +1 -1
- package/dist/checkbox/indicator/README.md +1 -1
- package/dist/checkbox/indicator/checkbox-indicator.svelte +1 -0
- package/dist/checkbox/indicator/checkbox-indicator.svelte.d.ts +1 -0
- package/dist/checkbox/root/README.md +2 -2
- package/dist/checkbox/root/checkbox-root.svelte +133 -38
- package/dist/checkbox/root/checkbox-root.svelte.d.ts +21 -1
- package/dist/checkbox-group/README.md +95 -0
- package/dist/checkbox-group/index.d.ts +15 -0
- package/dist/checkbox-group/index.js +6 -0
- package/dist/checkbox-group/index.parts.d.ts +4 -0
- package/dist/checkbox-group/index.parts.js +7 -0
- package/dist/checkbox-group/label/checkbox-group-label.svelte +36 -0
- package/dist/checkbox-group/label/checkbox-group-label.svelte.d.ts +4 -0
- package/dist/checkbox-group/root/checkbox-group-root.svelte +118 -0
- package/dist/checkbox-group/root/checkbox-group-root.svelte.d.ts +4 -0
- package/dist/checkbox-group/root/context.svelte.d.ts +52 -0
- package/dist/checkbox-group/root/context.svelte.js +251 -0
- package/dist/checkbox-group/types.d.ts +57 -0
- package/dist/checkbox-group/types.js +1 -0
- package/dist/clock/README.md +3 -3
- package/dist/clock/axis/README.md +1 -1
- package/dist/clock/root/README.md +1 -1
- package/dist/clock/root/create-time-selection-state.svelte.d.ts +5 -0
- package/dist/clock/root/create-time-selection-state.svelte.js +113 -10
- package/dist/clock/root/wheel-options.d.ts +7 -3
- package/dist/clock/root/wheel-options.js +7 -15
- package/dist/clock/wheel-column/clock-wheel-column.svelte +10 -2
- package/dist/clock/wheel-column/clock-wheel-column.svelte.d.ts +2 -1
- package/dist/collapsible/README.md +3 -3
- package/dist/collapsible/root/collapsible-root.svelte +9 -4
- package/dist/collapsible/types.d.ts +13 -1
- package/dist/combobox/README.md +2 -2
- package/dist/combobox/button/README.md +6 -6
- package/dist/combobox/input/README.md +1 -1
- package/dist/combobox/input/combobox-input.svelte +15 -4
- package/dist/combobox/input/combobox-input.svelte.d.ts +3 -3
- package/dist/combobox/item/combobox-listboxitem.svelte +4 -2
- package/dist/combobox/item/combobox-listboxitem.svelte.d.ts +4 -2
- package/dist/combobox/item-indicator/README.md +1 -1
- package/dist/combobox/item-indicator/combobox-item-indicator.svelte +2 -2
- package/dist/combobox/item-indicator/combobox-item-indicator.svelte.d.ts +2 -2
- package/dist/combobox/list/combobox-listbox.svelte +98 -3
- package/dist/combobox/list/combobox-listbox.svelte.d.ts +28 -3
- package/dist/combobox/popover/README.md +1 -1
- package/dist/combobox/popover/combobox-popover.svelte +4 -56
- package/dist/combobox/root/README.md +24 -24
- package/dist/combobox/root/combobox.svelte +138 -56
- package/dist/combobox/root/combobox.svelte.d.ts +31 -11
- package/dist/combobox/root/context.d.ts +12 -0
- package/dist/combobox/status/README.md +3 -3
- package/dist/combobox/status/combobox-status.svelte +1 -1
- package/dist/combobox/status/combobox-status.svelte.d.ts +1 -1
- package/dist/combobox/tag/README.md +1 -1
- package/dist/combobox/tag/combobox-tag.svelte +1 -1
- package/dist/combobox/tag/combobox-tag.svelte.d.ts +1 -1
- package/dist/combobox/tag-remove/README.md +1 -1
- package/dist/combobox/tag-remove/combobox-tag-remove.svelte +14 -3
- package/dist/combobox/tag-remove/combobox-tag-remove.svelte.d.ts +7 -1
- package/dist/combobox/tags/README.md +1 -1
- package/dist/combobox/tags/combobox-tags.svelte +15 -12
- package/dist/combobox/tags/combobox-tags.svelte.d.ts +12 -10
- package/dist/combobox/trigger/README.md +7 -7
- package/dist/combobox/trigger/combobox-trigger.svelte +4 -1
- package/dist/datepicker/README.md +5 -4
- package/dist/datepicker/input/date-picker-input.svelte +3 -4
- package/dist/datepicker/input/date-picker-input.svelte.d.ts +3 -4
- package/dist/datepicker/root/date-picker-root.svelte +38 -2
- package/dist/datepicker/root/date-picker-root.svelte.d.ts +2 -0
- package/dist/datepicker/root/draft-evaluation.d.ts +7 -0
- package/dist/datepicker/root/draft-evaluation.js +2 -2
- package/dist/datepicker/trigger/README.md +1 -1
- package/dist/daterangepicker/README.md +3 -3
- package/dist/daterangepicker/input/date-range-picker-input.svelte +3 -4
- package/dist/daterangepicker/input/date-range-picker-input.svelte.d.ts +3 -4
- package/dist/daterangepicker/root/date-range-picker-root.svelte +19 -1
- package/dist/daterangepicker/root/date-range-picker-root.svelte.d.ts +2 -0
- package/dist/dialog/README.md +10 -2
- package/dist/dialog/close/dialog-close.svelte +57 -0
- package/dist/dialog/close/dialog-close.svelte.d.ts +19 -0
- package/dist/dialog/content/dialog-content.svelte +6 -4
- package/dist/dialog/content/dialog-content.svelte.d.ts +4 -4
- package/dist/dialog/description/dialog-description.svelte +46 -0
- package/dist/dialog/description/dialog-description.svelte.d.ts +20 -0
- package/dist/dialog/index.d.ts +9 -0
- package/dist/dialog/index.js +3 -0
- package/dist/dialog/index.parts.d.ts +3 -0
- package/dist/dialog/index.parts.js +3 -0
- package/dist/dialog/overlay/dialog-overlay.svelte +1 -1
- package/dist/dialog/overlay/dialog-overlay.svelte.d.ts +1 -1
- package/dist/dialog/portal/dialog-portal.svelte +1 -1
- package/dist/dialog/portal/dialog-portal.svelte.d.ts +1 -1
- package/dist/dialog/root/README.md +1 -1
- package/dist/dialog/root/context.d.ts +8 -0
- package/dist/dialog/root/dialog-root.svelte +100 -20
- package/dist/dialog/root/dialog-root.svelte.d.ts +15 -6
- package/dist/dialog/root/dialog-stack.d.ts +6 -22
- package/dist/dialog/root/dialog-stack.js +4 -33
- package/dist/dialog/title/dialog-title.svelte +43 -0
- package/dist/dialog/title/dialog-title.svelte.d.ts +21 -0
- package/dist/dialog/trigger/README.md +1 -1
- package/dist/drawer/README.md +111 -0
- package/dist/drawer/body/drawer-body.svelte +47 -0
- package/dist/drawer/body/drawer-body.svelte.d.ts +32 -0
- package/dist/drawer/close/drawer-close.svelte +52 -0
- package/dist/drawer/close/drawer-close.svelte.d.ts +20 -0
- package/dist/drawer/content/drawer-content.svelte +600 -0
- package/dist/drawer/content/drawer-content.svelte.d.ts +31 -0
- package/dist/drawer/description/drawer-description.svelte +40 -0
- package/dist/drawer/description/drawer-description.svelte.d.ts +20 -0
- package/dist/drawer/indent/drawer-indent-background.svelte +36 -0
- package/dist/drawer/indent/drawer-indent-background.svelte.d.ts +17 -0
- package/dist/drawer/indent/drawer-indent.svelte +59 -0
- package/dist/drawer/indent/drawer-indent.svelte.d.ts +32 -0
- package/dist/drawer/index.d.ts +49 -0
- package/dist/drawer/index.js +25 -0
- package/dist/drawer/index.parts.d.ts +14 -0
- package/dist/drawer/index.parts.js +15 -0
- package/dist/drawer/overlay/drawer-overlay.svelte +67 -0
- package/dist/drawer/overlay/drawer-overlay.svelte.d.ts +12 -0
- package/dist/drawer/portal/drawer-portal.svelte +57 -0
- package/dist/drawer/portal/drawer-portal.svelte.d.ts +13 -0
- package/dist/drawer/root/context.d.ts +81 -0
- package/dist/drawer/root/context.js +20 -0
- package/dist/drawer/root/drawer-root.svelte +348 -0
- package/dist/drawer/root/drawer-root.svelte.d.ts +79 -0
- package/dist/drawer/root/drawer-stack.svelte.d.ts +73 -0
- package/dist/drawer/root/drawer-stack.svelte.js +113 -0
- package/dist/drawer/root/handle.svelte.d.ts +39 -0
- package/dist/drawer/root/handle.svelte.js +64 -0
- package/dist/drawer/root/keyboard-context.d.ts +13 -0
- package/dist/drawer/root/keyboard-context.js +8 -0
- package/dist/drawer/root/presence-context.d.ts +22 -0
- package/dist/drawer/root/presence-context.js +8 -0
- package/dist/drawer/root/snap-points.d.ts +68 -0
- package/dist/drawer/root/snap-points.js +120 -0
- package/dist/drawer/root/starting-style.svelte.d.ts +18 -0
- package/dist/drawer/root/starting-style.svelte.js +38 -0
- package/dist/drawer/root/types.d.ts +36 -0
- package/dist/drawer/root/types.js +1 -0
- package/dist/drawer/root/viewport-context.d.ts +2 -0
- package/dist/drawer/root/viewport-context.js +16 -0
- package/dist/drawer/swipe-area/drawer-swipe-area.svelte +143 -0
- package/dist/drawer/swipe-area/drawer-swipe-area.svelte.d.ts +22 -0
- package/dist/drawer/title/drawer-title.svelte +37 -0
- package/dist/drawer/title/drawer-title.svelte.d.ts +21 -0
- package/dist/drawer/trigger/drawer-trigger.svelte +90 -0
- package/dist/drawer/trigger/drawer-trigger.svelte.d.ts +41 -0
- package/dist/drawer/viewport/drawer-viewport.svelte +69 -0
- package/dist/drawer/viewport/drawer-viewport.svelte.d.ts +15 -0
- package/dist/drawer/virtual-keyboard/drawer-virtual-keyboard-provider.svelte +88 -0
- package/dist/drawer/virtual-keyboard/drawer-virtual-keyboard-provider.svelte.d.ts +29 -0
- package/dist/dropzone/README.md +4 -6
- package/dist/hooks/use-virtual-focus.svelte.d.ts +9 -0
- package/dist/hooks/use-virtual-focus.svelte.js +7 -1
- package/dist/index.d.ts +24 -0
- package/dist/index.js +23 -0
- package/dist/input/input.svelte +6 -6
- package/dist/input/input.svelte.d.ts +6 -6
- package/dist/internal/environment.d.ts +11 -0
- package/dist/internal/environment.js +14 -0
- package/dist/internal/localized-strings.d.ts +152 -0
- package/dist/internal/localized-strings.js +152 -0
- package/dist/internal/number-precision.d.ts +9 -0
- package/dist/internal/number-precision.js +27 -0
- package/dist/listbox/README.md +20 -1
- package/dist/listbox/item/listbox-item.svelte +43 -18
- package/dist/listbox/item/listbox-item.svelte.d.ts +24 -15
- package/dist/listbox/root/README.md +1 -1
- package/dist/listbox/root/context.d.ts +56 -1
- package/dist/listbox/root/context.js +118 -1
- package/dist/listbox/root/listbox.svelte +400 -27
- package/dist/listbox/root/listbox.svelte.d.ts +73 -16
- package/dist/locale-provider/README.md +1 -6
- package/dist/menu/README.md +41 -4
- package/dist/menu/content/menu-content.svelte +31 -14
- package/dist/menu/content/menu-content.svelte.d.ts +14 -9
- package/dist/menu/context-trigger/menu-context-trigger.svelte +194 -0
- package/dist/menu/context-trigger/menu-context-trigger.svelte.d.ts +35 -0
- package/dist/menu/group/menu-group-label.svelte +1 -1
- package/dist/menu/group/menu-group-label.svelte.d.ts +1 -1
- package/dist/menu/index.d.ts +4 -1
- package/dist/menu/index.js +1 -0
- package/dist/menu/index.parts.d.ts +1 -0
- package/dist/menu/index.parts.js +1 -0
- package/dist/menu/item/menu-item.svelte +11 -8
- package/dist/menu/item/menu-item.svelte.d.ts +11 -8
- package/dist/menu/overlay/menu-overlay.svelte +2 -2
- package/dist/menu/overlay/menu-overlay.svelte.d.ts +1 -1
- package/dist/menu/root/context.d.ts +24 -3
- package/dist/menu/root/focus-state.d.ts +2 -2
- package/dist/menu/root/focus-state.js +8 -32
- package/dist/menu/root/menu-root.svelte +14 -8
- package/dist/menu/root/menu-root.svelte.d.ts +14 -8
- package/dist/menu/root/menu-state.svelte.d.ts +1 -1
- package/dist/menu/root/menu-state.svelte.js +24 -1
- package/dist/menu/separator/menu-separator.svelte +1 -1
- package/dist/menu/separator/menu-separator.svelte.d.ts +1 -1
- package/dist/menu/submenu/menu-submenu-root.svelte +10 -7
- package/dist/menu/submenu/menu-submenu-root.svelte.d.ts +10 -7
- package/dist/numberfield/root/README.md +1 -1
- package/dist/numberfield/root/number-field-root.svelte +2 -1
- package/dist/numberfield/root/number-utils.js +1 -20
- package/dist/numberfield/scrub-area-cursor/README.md +1 -1
- package/dist/popover/README.md +1 -1
- package/dist/popover/content/popover-content.svelte +22 -16
- package/dist/popover/content/popover-content.svelte.d.ts +19 -14
- package/dist/popover/overlay/popover-overlay.svelte +2 -2
- package/dist/popover/overlay/popover-overlay.svelte.d.ts +1 -1
- package/dist/popover/root/README.md +1 -1
- package/dist/popover/root/focus-state.d.ts +2 -2
- package/dist/popover/root/focus-state.js +7 -34
- package/dist/popover/root/popover-root.svelte +29 -14
- package/dist/popover/root/popover-root.svelte.d.ts +16 -5
- package/dist/popover/trigger/README.md +1 -1
- package/dist/primitives/aria-hide-outside.d.ts +13 -0
- package/dist/primitives/aria-hide-outside.js +7 -1
- package/dist/primitives/contain-wheel.d.ts +9 -0
- package/dist/primitives/contain-wheel.js +41 -0
- package/dist/primitives/floating.d.ts +49 -8
- package/dist/primitives/floating.js +75 -7
- package/dist/primitives/focus-trap.d.ts +2 -0
- package/dist/primitives/focus-trap.js +7 -1
- package/dist/primitives/focus-visible.svelte.d.ts +14 -0
- package/dist/primitives/focus-visible.svelte.js +19 -0
- package/dist/primitives/index.d.ts +3 -0
- package/dist/primitives/index.js +3 -0
- package/dist/primitives/input-modality.d.ts +7 -0
- package/dist/primitives/input-modality.js +32 -5
- package/dist/primitives/keyboard-navigation.d.ts +29 -5
- package/dist/primitives/keyboard-navigation.js +27 -17
- package/dist/primitives/layer-stack.d.ts +29 -0
- package/dist/primitives/layer-stack.js +35 -0
- package/dist/primitives/list-virtualizer.d.ts +75 -0
- package/dist/primitives/list-virtualizer.js +59 -0
- package/dist/primitives/long-press.d.ts +59 -0
- package/dist/primitives/long-press.js +142 -0
- package/dist/primitives/presence.svelte.js +6 -1
- package/dist/primitives/scroll-lock.d.ts +47 -3
- package/dist/primitives/scroll-lock.js +191 -9
- package/dist/primitives/swipe-gesture.d.ts +126 -0
- package/dist/primitives/swipe-gesture.js +351 -0
- package/dist/primitives/text.d.ts +8 -0
- package/dist/primitives/text.js +13 -0
- package/dist/primitives/trigger-focus-state.d.ts +29 -0
- package/dist/primitives/trigger-focus-state.js +57 -0
- package/dist/progress/README.md +54 -0
- package/dist/progress/index.d.ts +21 -0
- package/dist/progress/index.js +9 -0
- package/dist/progress/index.parts.d.ts +5 -0
- package/dist/progress/index.parts.js +5 -0
- package/dist/progress/indicator/progress-indicator.svelte +37 -0
- package/dist/progress/indicator/progress-indicator.svelte.d.ts +4 -0
- package/dist/progress/label/progress-label.svelte +34 -0
- package/dist/progress/label/progress-label.svelte.d.ts +4 -0
- package/dist/progress/root/context.d.ts +26 -0
- package/dist/progress/root/context.js +15 -0
- package/dist/progress/root/progress-root.svelte +136 -0
- package/dist/progress/root/progress-root.svelte.d.ts +4 -0
- package/dist/progress/root/progress-utils.d.ts +12 -0
- package/dist/progress/root/progress-utils.js +41 -0
- package/dist/progress/track/progress-track.svelte +27 -0
- package/dist/progress/track/progress-track.svelte.d.ts +4 -0
- package/dist/progress/types.d.ts +81 -0
- package/dist/progress/types.js +1 -0
- package/dist/progress/value/progress-value.svelte +36 -0
- package/dist/progress/value/progress-value.svelte.d.ts +4 -0
- package/dist/radio-group/README.md +103 -0
- package/dist/radio-group/index.d.ts +18 -0
- package/dist/radio-group/index.js +9 -0
- package/dist/radio-group/index.parts.d.ts +4 -0
- package/dist/radio-group/index.parts.js +4 -0
- package/dist/radio-group/indicator/radio-group-indicator.svelte +43 -0
- package/dist/radio-group/indicator/radio-group-indicator.svelte.d.ts +12 -0
- package/dist/radio-group/item/context.d.ts +18 -0
- package/dist/radio-group/item/context.js +15 -0
- package/dist/radio-group/item/radio-group-item.svelte +377 -0
- package/dist/radio-group/item/radio-group-item.svelte.d.ts +35 -0
- package/dist/radio-group/label/radio-group-label.svelte +37 -0
- package/dist/radio-group/label/radio-group-label.svelte.d.ts +4 -0
- package/dist/radio-group/root/context.svelte.d.ts +57 -0
- package/dist/radio-group/root/context.svelte.js +284 -0
- package/dist/radio-group/root/radio-group-root.svelte +193 -0
- package/dist/radio-group/root/radio-group-root.svelte.d.ts +4 -0
- package/dist/radio-group/types.d.ts +50 -0
- package/dist/radio-group/types.js +1 -0
- package/dist/select/README.md +129 -0
- package/dist/select/index.d.ts +30 -0
- package/dist/select/index.js +16 -0
- package/dist/select/index.parts.d.ts +8 -0
- package/dist/select/index.parts.js +9 -0
- package/dist/select/item/select-item.svelte +68 -0
- package/dist/select/item/select-item.svelte.d.ts +10 -0
- package/dist/select/item-indicator/select-item-indicator.svelte +55 -0
- package/dist/select/item-indicator/select-item-indicator.svelte.d.ts +4 -0
- package/dist/select/label/select-label.svelte +46 -0
- package/dist/select/label/select-label.svelte.d.ts +4 -0
- package/dist/select/list/select-list.svelte +241 -0
- package/dist/select/list/select-list.svelte.d.ts +62 -0
- package/dist/select/popover/select-popover.svelte +80 -0
- package/dist/select/popover/select-popover.svelte.d.ts +9 -0
- package/dist/select/root/context.d.ts +106 -0
- package/dist/select/root/context.js +22 -0
- package/dist/select/root/select-root.svelte +544 -0
- package/dist/select/root/select-root.svelte.d.ts +25 -0
- package/dist/select/trigger/select-trigger.svelte +192 -0
- package/dist/select/trigger/select-trigger.svelte.d.ts +4 -0
- package/dist/select/types.d.ts +133 -0
- package/dist/select/types.js +1 -0
- package/dist/select/value/select-value.svelte +61 -0
- package/dist/select/value/select-value.svelte.d.ts +4 -0
- package/dist/separator/README.md +35 -0
- package/dist/separator/index.d.ts +7 -0
- package/dist/separator/index.js +3 -0
- package/dist/separator/separator.svelte +254 -0
- package/dist/separator/separator.svelte.d.ts +45 -0
- package/dist/separator/types.d.ts +1 -0
- package/dist/separator/types.js +1 -0
- package/dist/slider/README.md +61 -0
- package/dist/slider/fill/slider-fill.svelte +40 -0
- package/dist/slider/fill/slider-fill.svelte.d.ts +4 -0
- package/dist/slider/index.d.ts +9 -0
- package/dist/slider/index.js +8 -0
- package/dist/slider/index.parts.d.ts +6 -0
- package/dist/slider/index.parts.js +6 -0
- package/dist/slider/label/slider-label.svelte +44 -0
- package/dist/slider/label/slider-label.svelte.d.ts +4 -0
- package/dist/slider/output/slider-output.svelte +46 -0
- package/dist/slider/output/slider-output.svelte.d.ts +4 -0
- package/dist/slider/root/context.d.ts +106 -0
- package/dist/slider/root/context.js +15 -0
- package/dist/slider/root/slider-root.svelte +545 -0
- package/dist/slider/root/slider-root.svelte.d.ts +4 -0
- package/dist/slider/root/slider-utils.d.ts +57 -0
- package/dist/slider/root/slider-utils.js +88 -0
- package/dist/slider/thumb/slider-thumb.svelte +276 -0
- package/dist/slider/thumb/slider-thumb.svelte.d.ts +4 -0
- package/dist/slider/track/slider-track.svelte +60 -0
- package/dist/slider/track/slider-track.svelte.d.ts +4 -0
- package/dist/slider/types.d.ts +144 -0
- package/dist/slider/types.js +1 -0
- package/dist/switch/root/README.md +2 -2
- package/dist/switch/root/switch-root.svelte +49 -21
- package/dist/switch/root/switch-root.svelte.d.ts +26 -14
- package/dist/switch/thumb/switch-thumb.svelte +1 -1
- package/dist/switch/thumb/switch-thumb.svelte.d.ts +1 -1
- package/dist/table/README.md +16 -9
- package/dist/table/body/table-body.svelte +84 -9
- package/dist/table/cell/table-cell.svelte +27 -10
- package/dist/table/checkbox/table-checkbox.svelte +3 -0
- package/dist/table/checkbox-indicator/README.md +1 -1
- package/dist/table/column/table-column.svelte +5 -1
- package/dist/table/column-header-cell/table-column-header-cell.svelte +24 -0
- package/dist/table/column-resizer/README.md +2 -2
- package/dist/table/column-resizer/table-column-resizer.svelte +1 -5
- package/dist/table/index.d.ts +1 -1
- package/dist/table/index.js +1 -1
- package/dist/table/interactive-cell/table-interactive-cell.svelte +26 -10
- package/dist/table/root/README.md +1 -1
- package/dist/table/root/context.svelte.d.ts +17 -0
- package/dist/table/root/context.svelte.js +212 -66
- package/dist/table/root/table-root.svelte +36 -6
- package/dist/table/row/table-row.svelte +14 -14
- package/dist/table/sort-trigger/README.md +1 -1
- package/dist/table/sort-trigger/table-sort-trigger.svelte +5 -1
- package/dist/table/types.d.ts +32 -14
- package/dist/tabs/root/tabs-root.svelte +20 -6
- package/dist/tabs/types.d.ts +9 -0
- package/dist/timepicker/README.md +3 -2
- package/dist/timepicker/input/README.md +1 -1
- package/dist/timepicker/input/time-picker-input.svelte +66 -5
- package/dist/timepicker/input/time-picker-input.svelte.d.ts +18 -1
- package/dist/timepicker/root/README.md +1 -1
- package/dist/timepicker/root/time-picker-root.svelte +11 -0
- package/dist/timepicker/root/time-picker-root.svelte.d.ts +2 -0
- package/dist/timepicker/trigger/README.md +1 -1
- package/dist/toast/README.md +75 -0
- package/dist/toast/action/toast-action.svelte +42 -0
- package/dist/toast/action/toast-action.svelte.d.ts +4 -0
- package/dist/toast/close/toast-close.svelte +41 -0
- package/dist/toast/close/toast-close.svelte.d.ts +4 -0
- package/dist/toast/content/toast-content.svelte +24 -0
- package/dist/toast/content/toast-content.svelte.d.ts +4 -0
- package/dist/toast/description/toast-description.svelte +41 -0
- package/dist/toast/description/toast-description.svelte.d.ts +4 -0
- package/dist/toast/index.d.ts +34 -0
- package/dist/toast/index.js +15 -0
- package/dist/toast/index.parts.d.ts +9 -0
- package/dist/toast/index.parts.js +9 -0
- package/dist/toast/positioner/toast-positioner.svelte +75 -0
- package/dist/toast/positioner/toast-positioner.svelte.d.ts +4 -0
- package/dist/toast/provider/context.d.ts +36 -0
- package/dist/toast/provider/context.js +22 -0
- package/dist/toast/provider/toast-manager.svelte.d.ts +113 -0
- package/dist/toast/provider/toast-manager.svelte.js +210 -0
- package/dist/toast/provider/toast-provider.svelte +98 -0
- package/dist/toast/provider/toast-provider.svelte.d.ts +4 -0
- package/dist/toast/root/context.d.ts +18 -0
- package/dist/toast/root/context.js +15 -0
- package/dist/toast/root/toast-root.svelte +296 -0
- package/dist/toast/root/toast-root.svelte.d.ts +4 -0
- package/dist/toast/title/toast-title.svelte +38 -0
- package/dist/toast/title/toast-title.svelte.d.ts +4 -0
- package/dist/toast/types.d.ts +100 -0
- package/dist/toast/types.js +1 -0
- package/dist/toast/viewport/toast-viewport.svelte +389 -0
- package/dist/toast/viewport/toast-viewport.svelte.d.ts +4 -0
- package/dist/toggle/README.md +1 -1
- package/dist/toggle/root/toggle-root.svelte +28 -0
- package/dist/toggle/root/toggle-root.svelte.d.ts +19 -0
- package/dist/toggle-group/README.md +12 -4
- package/dist/toggle-group/index.d.ts +2 -0
- package/dist/toggle-group/index.parts.d.ts +1 -0
- package/dist/toggle-group/index.parts.js +4 -0
- package/dist/toggle-group/root/context.svelte.d.ts +1 -1
- package/dist/toggle-group/root/context.svelte.js +24 -8
- package/dist/toggle-group/root/toggle-group-root.svelte +24 -4
- package/dist/toggle-group/root/toggle-group-teardown-order-child.svelte +13 -0
- package/dist/toggle-group/root/toggle-group-teardown-order-child.svelte.d.ts +7 -0
- package/dist/toggle-group/types.d.ts +9 -0
- package/dist/tooltip/README.md +53 -0
- package/dist/tooltip/arrow/tooltip-arrow.svelte +36 -0
- package/dist/tooltip/arrow/tooltip-arrow.svelte.d.ts +4 -0
- package/dist/tooltip/content/tooltip-content.svelte +148 -0
- package/dist/tooltip/content/tooltip-content.svelte.d.ts +4 -0
- package/dist/tooltip/index.d.ts +8 -0
- package/dist/tooltip/index.js +7 -0
- package/dist/tooltip/index.parts.d.ts +5 -0
- package/dist/tooltip/index.parts.js +5 -0
- package/dist/tooltip/provider/tooltip-provider.svelte +36 -0
- package/dist/tooltip/provider/tooltip-provider.svelte.d.ts +4 -0
- package/dist/tooltip/root/context.d.ts +46 -0
- package/dist/tooltip/root/context.js +22 -0
- package/dist/tooltip/root/safe-polygon.d.ts +26 -0
- package/dist/tooltip/root/safe-polygon.js +66 -0
- package/dist/tooltip/root/tooltip-group.d.ts +26 -0
- package/dist/tooltip/root/tooltip-group.js +41 -0
- package/dist/tooltip/root/tooltip-root.svelte +461 -0
- package/dist/tooltip/root/tooltip-root.svelte.d.ts +4 -0
- package/dist/tooltip/trigger/tooltip-trigger.svelte +52 -0
- package/dist/tooltip/trigger/tooltip-trigger.svelte.d.ts +4 -0
- package/dist/tooltip/types.d.ts +105 -0
- package/dist/tooltip/types.js +1 -0
- package/dist/transfer-list/README.md +110 -0
- package/dist/transfer-list/index.d.ts +33 -0
- package/dist/transfer-list/index.js +18 -0
- package/dist/transfer-list/index.parts.d.ts +9 -0
- package/dist/transfer-list/index.parts.js +10 -0
- package/dist/transfer-list/item/transfer-list-item.svelte +74 -0
- package/dist/transfer-list/item/transfer-list-item.svelte.d.ts +35 -0
- package/dist/transfer-list/list/transfer-list-list.svelte +162 -0
- package/dist/transfer-list/list/transfer-list-list.svelte.d.ts +56 -0
- package/dist/transfer-list/list/transfer-list-source.svelte +13 -0
- package/dist/transfer-list/list/transfer-list-source.svelte.d.ts +36 -0
- package/dist/transfer-list/list/transfer-list-target.svelte +14 -0
- package/dist/transfer-list/list/transfer-list-target.svelte.d.ts +36 -0
- package/dist/transfer-list/move/transfer-list-move-all.svelte +14 -0
- package/dist/transfer-list/move/transfer-list-move-all.svelte.d.ts +10 -0
- package/dist/transfer-list/move/transfer-list-move-button.svelte +103 -0
- package/dist/transfer-list/move/transfer-list-move-button.svelte.d.ts +25 -0
- package/dist/transfer-list/move/transfer-list-move-down.svelte +14 -0
- package/dist/transfer-list/move/transfer-list-move-down.svelte.d.ts +10 -0
- package/dist/transfer-list/move/transfer-list-move-selected.svelte +14 -0
- package/dist/transfer-list/move/transfer-list-move-selected.svelte.d.ts +10 -0
- package/dist/transfer-list/move/transfer-list-move-up.svelte +14 -0
- package/dist/transfer-list/move/transfer-list-move-up.svelte.d.ts +10 -0
- package/dist/transfer-list/move/transfer-list-reorder-button.svelte +83 -0
- package/dist/transfer-list/move/transfer-list-reorder-button.svelte.d.ts +21 -0
- package/dist/transfer-list/root/context.d.ts +70 -0
- package/dist/transfer-list/root/context.js +24 -0
- package/dist/transfer-list/root/transfer-list-root.svelte +345 -0
- package/dist/transfer-list/root/transfer-list-root.svelte.d.ts +68 -0
- package/dist/transfer-list/root/types.d.ts +22 -0
- package/dist/transfer-list/root/types.js +4 -0
- package/dist/transfer-list/status/transfer-list-status.svelte +70 -0
- package/dist/transfer-list/status/transfer-list-status.svelte.d.ts +15 -0
- package/dist/tree/README.md +3 -3
- package/dist/tree/checkbox-indicator/README.md +1 -1
- package/dist/tree/root/README.md +1 -1
- package/dist/tree/root/context.svelte.js +6 -0
- package/dist/tree/root/tree-root.svelte +22 -8
- package/dist/tree/types.d.ts +23 -1
- package/package.json +282 -224
package/README.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# @human-kit/ui
|
|
2
2
|
|
|
3
|
-
Accessible
|
|
3
|
+
Accessible UI components for **Svelte 5**.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
The components use Svelte 5 runes and have full types. The package is native
|
|
6
|
+
ESM, and each component has a subpath export, thus your bundler includes only
|
|
7
|
+
the components that you import.
|
|
8
|
+
|
|
9
|
+
**[Documentation and live demos → ui.human-kit.com](https://ui.human-kit.com)**
|
|
7
10
|
|
|
8
11
|
## Installation
|
|
9
12
|
|
|
@@ -23,7 +26,7 @@ Svelte 5 is a peer dependency:
|
|
|
23
26
|
|
|
24
27
|
## Usage
|
|
25
28
|
|
|
26
|
-
Import from the package
|
|
29
|
+
Import from the root of the package:
|
|
27
30
|
|
|
28
31
|
```svelte
|
|
29
32
|
<script lang="ts">
|
|
@@ -31,7 +34,7 @@ Import from the package root:
|
|
|
31
34
|
</script>
|
|
32
35
|
```
|
|
33
36
|
|
|
34
|
-
|
|
37
|
+
For the smallest bundle, import one component from its subpath:
|
|
35
38
|
|
|
36
39
|
```svelte
|
|
37
40
|
<script lang="ts">
|
|
@@ -43,29 +46,39 @@ Or import a single component via its subpath for the leanest bundle:
|
|
|
43
46
|
|
|
44
47
|
| Category | Components |
|
|
45
48
|
| ----------- | ----------------------------------------------------------------------------- |
|
|
46
|
-
| Overlays | `Dialog`, `Popover`, `Menu`, `Portal`
|
|
49
|
+
| Overlays | `Dialog`, `Drawer`, `Popover`, `Menu`, `Portal` |
|
|
47
50
|
| Forms | `Input`, `TextArea`, `Label`, `Checkbox`, `Switch`, `NumberField`, `Dropzone` |
|
|
48
51
|
| Selection | `ComboBox`, `Autocomplete`, `ListBox`, `Toggle`, `ToggleGroup` |
|
|
49
52
|
| Date & time | `Calendar`, `Clock`, `DatePicker`, `DateRangePicker`, `TimePicker` |
|
|
50
53
|
| Layout | `Accordion`, `Collapsible`, `Tabs`, `Table`, `Tree`, `OverflowRow` |
|
|
51
54
|
| Actions | `Button` |
|
|
52
|
-
| Utilities | `LocaleProvider`, primitives, and the `cn` class
|
|
55
|
+
| Utilities | `LocaleProvider`, primitives, and the `cn` class function |
|
|
56
|
+
|
|
57
|
+
Each component also has a subpath export, for example `@human-kit/ui/calendar`.
|
|
58
|
+
|
|
59
|
+
## Styles
|
|
53
60
|
|
|
54
|
-
|
|
55
|
-
|
|
61
|
+
The components are headless: they have no CSS, and they do not need a CSS
|
|
62
|
+
framework. Each part accepts a `class` attribute. Each part also shows its state
|
|
63
|
+
in `data-*` attributes, for example `data-state`, `data-disabled`,
|
|
64
|
+
`data-focus-visible`, and `data-pressed`. Thus you can write the styles in plain
|
|
65
|
+
CSS, in Tailwind, or in a different tool. Each component page in the
|
|
66
|
+
documentation gives the full list of the data attributes.
|
|
56
67
|
|
|
57
|
-
|
|
68
|
+
```svelte
|
|
69
|
+
<Button.Root class="rounded-md bg-black px-3 py-1.5 text-white data-[pressed]:opacity-80">
|
|
70
|
+
Save
|
|
71
|
+
</Button.Root>
|
|
72
|
+
```
|
|
58
73
|
|
|
59
|
-
|
|
60
|
-
[
|
|
61
|
-
|
|
62
|
-
setup in the consuming app is expected for the default look, and every component
|
|
63
|
-
accepts a `class` prop so you can override or extend styles.
|
|
74
|
+
The library has one dependency at run time:
|
|
75
|
+
[`@floating-ui/dom`](https://floating-ui.com). Only the components that put an
|
|
76
|
+
element against an anchor use it.
|
|
64
77
|
|
|
65
78
|
## Requirements
|
|
66
79
|
|
|
67
80
|
- Svelte `^5.0.0`
|
|
68
|
-
- Node.js 20
|
|
81
|
+
- Node.js version 20 or later
|
|
69
82
|
|
|
70
83
|
## License
|
|
71
84
|
|
|
@@ -35,10 +35,19 @@ Canonical implementation lives in `primitives/input-modality.ts`:
|
|
|
35
35
|
|
|
36
36
|
## Restore focus
|
|
37
37
|
|
|
38
|
-
On overlay/popover close,
|
|
38
|
+
On overlay/popover close, the trigger shows only the focus it holds:
|
|
39
39
|
|
|
40
|
-
- `escape-key`
|
|
41
|
-
|
|
40
|
+
- `escape-key`, `close-press`, `imperative-action` => the focus returns to the trigger:
|
|
41
|
+
`data-focused=true`, and `data-focus-visible=true` when the close came from the keyboard.
|
|
42
|
+
- `outside-press` on a focusable element => the focus stays there, and the trigger shows no
|
|
43
|
+
focus attributes.
|
|
44
|
+
- `outside-press` on nothing focusable (the focus fell to the body) => the focus returns to
|
|
45
|
+
the trigger with the pointer modality: `data-focused=true` and `data-focus-visible` absent.
|
|
46
|
+
Without it a keyboard user has nowhere to continue from.
|
|
47
|
+
Inside a modal popover every outside press is of this kind, because the page is inert.
|
|
48
|
+
- `focus-out`, `scroll` => the focus stays where the user put it.
|
|
49
|
+
|
|
50
|
+
`focusFellToBody()` and `applyTriggerCloseFocusState()` in `primitives/trigger-focus-state.ts` are the shared implementation; Popover and Menu only decide which reasons return the focus.
|
|
42
51
|
|
|
43
52
|
## Recommended Implementation
|
|
44
53
|
|
|
@@ -55,10 +64,15 @@ On overlay/popover close, transient trigger state is allowed:
|
|
|
55
64
|
The following components implement this contract:
|
|
56
65
|
|
|
57
66
|
- **Popover** — trigger + content, restore focus on close.
|
|
58
|
-
- **Dialog** — trigger + overlay/content, nested stack support.
|
|
67
|
+
- **Dialog** — trigger + overlay/content, nested stack support. After an outside press the restore waits a frame, because the press moves the focus to the body after the close.
|
|
68
|
+
- **Drawer** — trigger + overlay/content, shares the modal layer stack with Dialog. Restore also covers the `swipe` close reason (resolves to `pointer`), and retries the trigger focus after `ariaHideOutside` lifts `inert`.
|
|
69
|
+
- **Menu** — trigger + content, restore focus on close (`menu/root/focus-state.ts`). `Menu.ContextTrigger` is the same contract on a surface instead of a button: it registers as the trigger ref, so Escape and item selection restore focus to it. It is a tab stop by default so there is something to restore focus to.
|
|
59
70
|
- **DatePicker** — segment spinbuttons, trigger, popover (calendar).
|
|
60
71
|
- **TimePicker** — segment spinbuttons, trigger, popover (scrollable columns). Follows the same contract as DatePicker.
|
|
61
72
|
- **Calendar** — grid cells with roving tabindex.
|
|
62
73
|
- **ComboBox** — input + listbox with virtual focus.
|
|
63
74
|
- **ListBox** — items with roving tabindex.
|
|
75
|
+
- **TransferList** — two ListBoxes plus move buttons. Focus is placed explicitly after every move, because the rows the user was on stop existing: it stays on the button while that button still has work, and otherwise follows the items to the destination list; a double-clicked row hands focus to whichever row took its place.
|
|
64
76
|
- **NumberField** — spinbutton input, stepper buttons, wheel, and pointer scrub area.
|
|
77
|
+
- **Slider** — one native range input per thumb. The thumb shows `data-focused` and `data-focus-visible` for its input, and the root shows `data-focus-within` and `data-focus-visible`. A press on the track focuses the thumb with the pointer modality, and a key press after it turns the ring on through `watchFocusVisible`.
|
|
78
|
+
- **Tooltip** — never takes the focus, and never moves it. It opens on a focus of the trigger only when `shouldShowFocusVisible` says the focus came from the keyboard, thus a focus that a script gave with the pointer modality opens nothing.
|
|
@@ -20,14 +20,14 @@ Fill this out for PRs that modify interaction, keyboard navigation, overlays, or
|
|
|
20
20
|
|
|
21
21
|
> Mark **OK/NA/FAIL** and add a short note when failing.
|
|
22
22
|
|
|
23
|
-
| Scenario | What to validate
|
|
24
|
-
| ---------------------------------- |
|
|
25
|
-
| Keyboard (Tab/Arrow/Home/End/Page) | `data-*` and ARIA stay in sync with logical focus
|
|
26
|
-
| Pointer (click/mousedown) | do not elevate `data-focus-visible` by default
|
|
27
|
-
| External blur | transient state cleanup (`data-focus-within`, `data-focus-visible`)
|
|
28
|
-
| Close restore (`escape-key`) | trigger: `data-focused=true`, `data-focus-visible=true` (when applicable)
|
|
29
|
-
| Close restore (`outside-press`) | trigger: `data-focused=true`, `data-focus-visible` absent
|
|
30
|
-
| Programmatic focus | does not break invariants or leave stale state
|
|
23
|
+
| Scenario | What to validate | Status | Note |
|
|
24
|
+
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---- |
|
|
25
|
+
| Keyboard (Tab/Arrow/Home/End/Page) | `data-*` and ARIA stay in sync with logical focus | | |
|
|
26
|
+
| Pointer (click/mousedown) | do not elevate `data-focus-visible` by default | | |
|
|
27
|
+
| External blur | transient state cleanup (`data-focus-within`, `data-focus-visible`) | | |
|
|
28
|
+
| Close restore (`escape-key`) | trigger: `data-focused=true`, `data-focus-visible=true` (when applicable) | | |
|
|
29
|
+
| Close restore (`outside-press`) | focusable target: focus stays there, trigger without focus attrs; nothing focusable: focus returns to the trigger, `data-focused=true`, `data-focus-visible` absent | | |
|
|
30
|
+
| Programmatic focus | does not break invariants or leave stale state | | |
|
|
31
31
|
|
|
32
32
|
## 3) Required Invariants
|
|
33
33
|
|
package/dist/accordion/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Description
|
|
4
4
|
|
|
5
|
-
`Accordion` is a headless disclosure
|
|
5
|
+
`Accordion` is a headless disclosure component: a vertical or horizontal stack of sections that open and close. It has roving focus and disabled items. One section can be open, or more than one. You can control the open state, or the component can control it.
|
|
6
6
|
|
|
7
7
|
## Anatomy
|
|
8
8
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
- Provide a unique `value` on every `Accordion.Item`. The matching `Header`, `Trigger` and `Panel` read it from the item context, so you only declare it once.
|
|
36
36
|
- Use `value` / `onChange` for controlled state and `defaultValue` for uncontrolled state. Both are arrays of open item values.
|
|
37
|
-
- Set `selectionMode="multiple"` to
|
|
37
|
+
- Set `selectionMode="multiple"` to let more than one panel stay open. The default is `"single"`.
|
|
38
38
|
- Use `disallowEmptySelection` to keep at least one panel open.
|
|
39
39
|
- Use `disabled` on `Accordion.Item` to disable a single item, or `disabled` on `Accordion.Root` to disable the whole accordion.
|
|
40
40
|
- Use `orientation="horizontal"` to switch the arrow-key navigation axis.
|
|
@@ -48,4 +48,4 @@
|
|
|
48
48
|
- `Accordion.Trigger` renders button semantics with `aria-expanded` and `aria-controls`.
|
|
49
49
|
- `Accordion.Panel` renders `role="region"` and `aria-labelledby` pointing at its trigger, and is `hidden` + `inert` while collapsed. Set `region={false}` on panels of large accordions (the APG recommends avoiding `region` landmarks beyond roughly six panels) so assistive-technology landmark lists are not flooded.
|
|
50
50
|
- Arrow keys move focus between triggers, Home/End jump to the first or last enabled trigger, and focus wraps at the ends unless `loop={false}`.
|
|
51
|
-
- Enter
|
|
51
|
+
- The `Enter` key and the `Space` key open and close the panel with the focus, like a native button.
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
id,
|
|
10
10
|
value = $bindable(),
|
|
11
11
|
defaultValue,
|
|
12
|
+
controlledValue = false,
|
|
12
13
|
onChange,
|
|
13
14
|
selectionMode = 'single',
|
|
14
15
|
disabled: disabledProp = false,
|
|
@@ -22,7 +23,10 @@
|
|
|
22
23
|
...restProps
|
|
23
24
|
}: AccordionRootProps = $props();
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
// Controlled-ness is NOT inferred from `value` being defined: `bind:value={items}` and
|
|
27
|
+
// `value={items}` are indistinguishable at runtime, so inferring it silently broke
|
|
28
|
+
// every `bind:value`. It is opt-in via `controlledValue` instead.
|
|
29
|
+
const isControlled = untrack(() => controlledValue);
|
|
26
30
|
const instanceId = untrack(() => id) ?? generatedId;
|
|
27
31
|
|
|
28
32
|
let rootRef: HTMLDivElement | null = $state(null);
|
|
@@ -31,7 +35,8 @@
|
|
|
31
35
|
createAccordionContext({
|
|
32
36
|
instanceId,
|
|
33
37
|
isControlled,
|
|
34
|
-
|
|
38
|
+
// `value` seeds the initial state whenever it is supplied, bound or not.
|
|
39
|
+
initialValue: untrack(() => value) ?? untrack(() => defaultValue),
|
|
35
40
|
selectionMode: (() => selectionMode)(),
|
|
36
41
|
isDisabled: (() => disabledProp)(),
|
|
37
42
|
orientation: (() => orientation)(),
|
|
@@ -75,8 +80,15 @@
|
|
|
75
80
|
accordion.setLoop(loop);
|
|
76
81
|
});
|
|
77
82
|
|
|
83
|
+
// Whether to adopt an incoming `value` is a separate question from who owns the state,
|
|
84
|
+
// so it is latched at init off the prop rather than off `controlledValue`: a parent
|
|
85
|
+
// that supplies `value` drives the accordion, bound or not. Latched, not reactive —
|
|
86
|
+
// re-checking `value !== undefined` would switch this on the moment our own write-back
|
|
87
|
+
// defines it, and the component would then re-adopt the echo of its own change.
|
|
88
|
+
const adoptsValueProp = untrack(() => value !== undefined);
|
|
89
|
+
|
|
78
90
|
$effect(() => {
|
|
79
|
-
if (!
|
|
91
|
+
if (!adoptsValueProp) return;
|
|
80
92
|
accordion.setOpenValues(value);
|
|
81
93
|
});
|
|
82
94
|
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getContext, setContext } from 'svelte';
|
|
2
|
-
import { SvelteMap } from 'svelte/reactivity';
|
|
2
|
+
import { SvelteMap, SvelteSet } from 'svelte/reactivity';
|
|
3
3
|
import { asCommand } from '../../internal/as-command.js';
|
|
4
4
|
const ACCORDION_CONTEXT_KEY = Symbol('accordion');
|
|
5
5
|
function normalizeIdSegment(value) {
|
|
@@ -9,7 +9,7 @@ function valuesMatch(left, right) {
|
|
|
9
9
|
return Object.is(left, right);
|
|
10
10
|
}
|
|
11
11
|
function normalizeValues(values, selectionMode, order = []) {
|
|
12
|
-
const normalized = new
|
|
12
|
+
const normalized = new SvelteSet();
|
|
13
13
|
if (selectionMode === 'single') {
|
|
14
14
|
const orderedValue = order.find((orderedItem) => (values ?? []).some((candidate) => valuesMatch(candidate, orderedItem)));
|
|
15
15
|
const fallbackValue = (values ?? []).find((candidate) => !order.some((orderedItem) => valuesMatch(candidate, orderedItem)));
|
|
@@ -138,7 +138,7 @@ export function createAccordionContext(options) {
|
|
|
138
138
|
function reconcileOpen(changedValue, changeOptions) {
|
|
139
139
|
if (isControlled)
|
|
140
140
|
return;
|
|
141
|
-
const nextValues = new
|
|
141
|
+
const nextValues = new SvelteSet(openValues);
|
|
142
142
|
let removedValue;
|
|
143
143
|
for (const openValue of openValues) {
|
|
144
144
|
const registeredItem = items.get(openValue);
|
|
@@ -228,7 +228,7 @@ export function createAccordionContext(options) {
|
|
|
228
228
|
if (isItemDisabled(value))
|
|
229
229
|
return null;
|
|
230
230
|
const isValueOpen = openValues.has(value);
|
|
231
|
-
const nextValues = new
|
|
231
|
+
const nextValues = new SvelteSet(openValues);
|
|
232
232
|
if (selectionMode === 'single') {
|
|
233
233
|
if (isValueOpen) {
|
|
234
234
|
if (disallowEmptySelection)
|
|
@@ -3,65 +3,86 @@ import type { HTMLAttributes, HTMLButtonAttributes } from 'svelte/elements';
|
|
|
3
3
|
import type { AccordionContext, AccordionOrientation, AccordionSelectionMode, AccordionValue } from './root/context.svelte';
|
|
4
4
|
export type { AccordionContext, AccordionOrientation, AccordionSelectionMode, AccordionValue } from './root/context.svelte';
|
|
5
5
|
export type AccordionRootProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'class'> & {
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* The list of the values of the open items. By default it goes in the two directions: use
|
|
8
|
+
* `bind:value`.
|
|
9
|
+
*/
|
|
7
10
|
value?: AccordionValue[];
|
|
8
|
-
/**
|
|
11
|
+
/** The values of the items that are open at the start, for when you give no `value`. */
|
|
9
12
|
defaultValue?: AccordionValue[];
|
|
10
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Give your own code full control of the state. The component stops to write back to `value`, and
|
|
15
|
+
* it reports only through `onChange`. Thus the parent can refuse a change: the parent does not
|
|
16
|
+
* send the new value down. The default is off, because `bind:value` is the usual case and it
|
|
17
|
+
* needs the write-back.
|
|
18
|
+
*/
|
|
19
|
+
controlledValue?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The component calls it with the new list of the open item values, after the user opens or
|
|
22
|
+
* closes a panel.
|
|
23
|
+
*/
|
|
11
24
|
onChange?: (value: AccordionValue[]) => void;
|
|
12
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* The number of panels that can be open together: one with `'single'`, or more than one with
|
|
27
|
+
* `'multiple'`.
|
|
28
|
+
*/
|
|
13
29
|
selectionMode?: AccordionSelectionMode;
|
|
14
30
|
/** Disables every item in the accordion. */
|
|
15
31
|
disabled?: boolean;
|
|
16
|
-
/**
|
|
32
|
+
/** The axis of the arrow keys between the triggers. */
|
|
17
33
|
orientation?: AccordionOrientation;
|
|
18
|
-
/** Keeps
|
|
34
|
+
/** Keeps one panel open at all times. */
|
|
19
35
|
disallowEmptySelection?: boolean;
|
|
20
|
-
/**
|
|
36
|
+
/** At the first trigger and at the last trigger, the focus goes to the opposite end. */
|
|
21
37
|
loop?: boolean;
|
|
22
38
|
children?: Snippet;
|
|
23
39
|
class?: string;
|
|
24
40
|
id?: string;
|
|
25
|
-
/**
|
|
41
|
+
/** A bindable reference to the root element. */
|
|
26
42
|
element?: HTMLDivElement | null;
|
|
27
|
-
/**
|
|
43
|
+
/** An accordion context that your own code makes, for a complex composition. */
|
|
28
44
|
context?: AccordionContext;
|
|
29
45
|
};
|
|
30
46
|
export type AccordionItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'class'> & {
|
|
31
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* The unique value of the item. The Header, the Trigger, and the Panel read it from the context.
|
|
49
|
+
*/
|
|
32
50
|
value: AccordionValue;
|
|
33
51
|
/** Disables this item only. */
|
|
34
52
|
disabled?: boolean;
|
|
35
53
|
children?: Snippet;
|
|
36
54
|
class?: string;
|
|
37
|
-
/**
|
|
55
|
+
/** A bindable reference to the item element. */
|
|
38
56
|
element?: HTMLDivElement | null;
|
|
39
57
|
};
|
|
40
58
|
export type AccordionHeaderProps = Omit<HTMLAttributes<HTMLHeadingElement>, 'children' | 'class'> & {
|
|
41
|
-
/**
|
|
59
|
+
/** The heading level of the element, to agree with the headings around it. */
|
|
42
60
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
43
61
|
children?: Snippet;
|
|
44
62
|
class?: string;
|
|
45
|
-
/**
|
|
63
|
+
/** A bindable reference to the heading element. */
|
|
46
64
|
element?: HTMLHeadingElement | null;
|
|
47
65
|
};
|
|
48
66
|
export type AccordionTriggerProps = Omit<HTMLButtonAttributes, 'children' | 'class' | 'type' | 'disabled' | 'role' | 'aria-expanded' | 'aria-controls'> & {
|
|
49
67
|
children?: Snippet;
|
|
50
68
|
class?: string;
|
|
51
|
-
/**
|
|
69
|
+
/** A bindable reference to the trigger button. */
|
|
52
70
|
element?: HTMLButtonElement | null;
|
|
53
71
|
};
|
|
54
72
|
export type AccordionPanelProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'class' | 'role' | 'hidden' | 'aria-labelledby'> & {
|
|
55
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Keep the closed panel in the DOM, and hidden. Without it, the panel leaves the DOM after the
|
|
75
|
+
* exit animation.
|
|
76
|
+
*/
|
|
56
77
|
forceMount?: boolean;
|
|
57
78
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
79
|
+
* Makes the panel a `role="region"` landmark. The default is `true`. In an accordion with many
|
|
80
|
+
* items, set it to `false`. Above approximately six panels, the APG recommends no `region`,
|
|
81
|
+
* because too many landmarks make the landmark list difficult to use.
|
|
61
82
|
*/
|
|
62
83
|
region?: boolean;
|
|
63
84
|
children?: Snippet;
|
|
64
85
|
class?: string;
|
|
65
|
-
/**
|
|
86
|
+
/** A bindable reference to the panel element. */
|
|
66
87
|
element?: HTMLDivElement | null;
|
|
67
88
|
};
|
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## Description
|
|
4
4
|
|
|
5
|
-
`Autocomplete` is
|
|
6
|
-
`ListBox`.
|
|
7
|
-
virtual focus through the list
|
|
8
|
-
in the input.
|
|
5
|
+
`Autocomplete` is a list that the user always sees and can filter: a search input above a
|
|
6
|
+
`ListBox`. When the user types, the component filters the items locally. The arrow keys
|
|
7
|
+
move a virtual focus through the list with `aria-activedescendant`, and the DOM focus
|
|
8
|
+
stays in the input. A `ComboBox` has a popover and an open state. An `Autocomplete` has
|
|
9
|
+
**neither**.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
and `onChange` to `Autocomplete.List`, exactly like a plain `ListBox`. The
|
|
12
|
-
Autocomplete only owns the search query, filtering and virtual focus.
|
|
11
|
+
The inner list holds the selection. Put `selectionMode`, `value`, `defaultValue`, and `onChange` on `Autocomplete.List`, like a plain `ListBox`. The Autocomplete controls only the search text, the filter, and the virtual focus.
|
|
13
12
|
|
|
14
13
|
## Usage guidelines
|
|
15
14
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Autocomplete.Empty - Rendered when no items match the current query.
|
|
8
8
|
*/
|
|
9
9
|
type AutocompleteEmptyProps = {
|
|
10
|
-
/**
|
|
10
|
+
/** The content while the list is empty. The default is "No results". */
|
|
11
11
|
children?: Snippet;
|
|
12
12
|
class?: string;
|
|
13
13
|
} & Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'>;
|
|
@@ -4,7 +4,7 @@ import type { HTMLAttributes } from 'svelte/elements';
|
|
|
4
4
|
* Autocomplete.Empty - Rendered when no items match the current query.
|
|
5
5
|
*/
|
|
6
6
|
type AutocompleteEmptyProps = {
|
|
7
|
-
/**
|
|
7
|
+
/** The content while the list is empty. The default is "No results". */
|
|
8
8
|
children?: Snippet;
|
|
9
9
|
class?: string;
|
|
10
10
|
} & Omit<HTMLAttributes<HTMLDivElement>, 'class' | 'children'>;
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
} from '../../primitives/input-modality';
|
|
9
9
|
|
|
10
10
|
type AutocompleteInputProps = HTMLInputAttributes & {
|
|
11
|
-
/**
|
|
11
|
+
/** The accessible name of the input. */
|
|
12
12
|
'aria-label'?: string;
|
|
13
|
-
/**
|
|
13
|
+
/** The id of the element that gives this input its name. */
|
|
14
14
|
'aria-labelledby'?: string;
|
|
15
|
-
/**
|
|
15
|
+
/** The id of the element that describes this input, for example the instructions. */
|
|
16
16
|
'aria-describedby'?: string;
|
|
17
17
|
class?: string;
|
|
18
18
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
2
2
|
type AutocompleteInputProps = HTMLInputAttributes & {
|
|
3
|
-
/**
|
|
3
|
+
/** The accessible name of the input. */
|
|
4
4
|
'aria-label'?: string;
|
|
5
|
-
/**
|
|
5
|
+
/** The id of the element that gives this input its name. */
|
|
6
6
|
'aria-labelledby'?: string;
|
|
7
|
-
/**
|
|
7
|
+
/** The id of the element that describes this input, for example the instructions. */
|
|
8
8
|
'aria-describedby'?: string;
|
|
9
9
|
class?: string;
|
|
10
10
|
};
|
|
@@ -112,6 +112,15 @@
|
|
|
112
112
|
if (isVisibleRegistered) ctx.unregisterVisibleItem(id);
|
|
113
113
|
});
|
|
114
114
|
|
|
115
|
+
function handleHoverStart(itemId: string | number) {
|
|
116
|
+
// The pointer takes the virtual focus, the same as in a ComboBox. Without
|
|
117
|
+
// this the keys move one row and the pointer marks another, and both read
|
|
118
|
+
// as the current one at the same time — which the item cannot correct on
|
|
119
|
+
// its own, because it only sees its own attributes.
|
|
120
|
+
ctx.setFocusVisible(false);
|
|
121
|
+
ctx.setFocusedItemId(itemId);
|
|
122
|
+
}
|
|
123
|
+
|
|
115
124
|
function handleSelect(itemId: string | number) {
|
|
116
125
|
if (ctx.isReadOnly) return;
|
|
117
126
|
// Selection here is pointer-driven (click); clear the keyboard focus ring.
|
|
@@ -136,6 +145,7 @@
|
|
|
136
145
|
isFocusVisibleOverride={isFocusVisible}
|
|
137
146
|
onItemSelect={handleSelect}
|
|
138
147
|
onResolvedTextValue={handleResolvedTextValue}
|
|
148
|
+
onItemHoverStart={handleHoverStart}
|
|
139
149
|
scrollOnFocus={true}
|
|
140
150
|
isParentDisabled={ctx.isDisabled}
|
|
141
151
|
/>
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* Must be used inside Autocomplete.Item. Only renders when the item is selected.
|
|
14
14
|
*/
|
|
15
15
|
type AutocompleteItemIndicatorProps = {
|
|
16
|
-
/**
|
|
16
|
+
/** The content while the item is selected. The default is a check mark icon. */
|
|
17
17
|
children?: Snippet;
|
|
18
|
-
/**
|
|
18
|
+
/** Keeps the indicator in the DOM, for each selection state. */
|
|
19
19
|
forceMount?: boolean;
|
|
20
20
|
class?: string;
|
|
21
21
|
} & Omit<HTMLAttributes<HTMLSpanElement>, 'class' | 'children'>;
|
|
@@ -5,9 +5,9 @@ import type { HTMLAttributes } from 'svelte/elements';
|
|
|
5
5
|
* Must be used inside Autocomplete.Item. Only renders when the item is selected.
|
|
6
6
|
*/
|
|
7
7
|
type AutocompleteItemIndicatorProps = {
|
|
8
|
-
/**
|
|
8
|
+
/** The content while the item is selected. The default is a check mark icon. */
|
|
9
9
|
children?: Snippet;
|
|
10
|
-
/**
|
|
10
|
+
/** Keeps the indicator in the DOM, for each selection state. */
|
|
11
11
|
forceMount?: boolean;
|
|
12
12
|
class?: string;
|
|
13
13
|
} & Omit<HTMLAttributes<HTMLSpanElement>, 'class' | 'children'>;
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
| 'children'
|
|
23
23
|
| 'emptyPlaceholder'
|
|
24
24
|
> & {
|
|
25
|
-
/**
|
|
25
|
+
/** The items, for a list that the component makes from an array. */
|
|
26
26
|
items?: Iterable<T>;
|
|
27
|
-
/**
|
|
27
|
+
/** The content of the list. From an array of items, it receives one item. */
|
|
28
28
|
children?: Snippet<[T]> | Snippet;
|
|
29
29
|
};
|
|
30
30
|
|
|
@@ -5,25 +5,33 @@ declare function $$render<T extends object = object>(): {
|
|
|
5
5
|
selectionBehavior?: "toggle" | "replace";
|
|
6
6
|
emptyPlaceholder?: string | Snippet;
|
|
7
7
|
items?: Iterable<object> | undefined;
|
|
8
|
+
getItemKey?: ((item: object) => string | number) | undefined;
|
|
8
9
|
disabledKeys?: Iterable<string | number>;
|
|
9
10
|
selectionMode?: "single" | "multiple";
|
|
10
11
|
value?: Iterable<string | number>;
|
|
11
12
|
defaultValue?: Iterable<string | number>;
|
|
13
|
+
controlledValue?: boolean;
|
|
12
14
|
children?: Snippet<[]> | Snippet<[object]> | undefined;
|
|
15
|
+
header?: Snippet;
|
|
13
16
|
class?: string;
|
|
14
17
|
id?: string;
|
|
15
18
|
'aria-label'?: string;
|
|
19
|
+
'aria-labelledby'?: string;
|
|
16
20
|
onChange?: ((value: Set<string | number>) => void) | undefined;
|
|
17
21
|
disableFocusHandling?: boolean;
|
|
18
22
|
loop?: boolean;
|
|
19
23
|
typeahead?: boolean;
|
|
20
|
-
|
|
24
|
+
virtualizer?: {
|
|
25
|
+
rowHeight?: number;
|
|
26
|
+
overscan?: number;
|
|
27
|
+
} | undefined;
|
|
28
|
+
} & Omit<import("svelte/elements").HTMLAttributes<HTMLDivElement>, "children" | "class" | "id" | "role" | "aria-label" | "aria-labelledby" | "onchange"> & {
|
|
21
29
|
context?: ListBoxContext;
|
|
22
30
|
element?: HTMLElement;
|
|
23
31
|
}, "children" | "id" | "element" | "context" | "disableFocusHandling" | "emptyPlaceholder" | "items"> & {
|
|
24
|
-
/**
|
|
32
|
+
/** The items, for a list that the component makes from an array. */
|
|
25
33
|
items?: Iterable<T>;
|
|
26
|
-
/**
|
|
34
|
+
/** The content of the list. From an array of items, it receives one item. */
|
|
27
35
|
children?: Snippet<[T]> | Snippet;
|
|
28
36
|
};
|
|
29
37
|
exports: {};
|
|
@@ -11,22 +11,22 @@
|
|
|
11
11
|
import { useVirtualFocus } from '../../hooks/use-virtual-focus.svelte';
|
|
12
12
|
|
|
13
13
|
type AutocompleteProps = {
|
|
14
|
-
/**
|
|
14
|
+
/** A stable id, from which the component makes its internal ARIA ids. Give one on a server. */
|
|
15
15
|
id?: string;
|
|
16
16
|
disabled?: boolean;
|
|
17
17
|
readonly?: boolean;
|
|
18
|
-
/**
|
|
18
|
+
/** The search text. You can bind it with `bind:inputValue`. */
|
|
19
19
|
inputValue?: string;
|
|
20
|
-
/**
|
|
20
|
+
/** The search text at the start, for when the component controls the state. */
|
|
21
21
|
defaultInputValue?: string;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
23
|
+
* The local filter function. The default compares the text and ignores the letter case. Set it
|
|
24
|
+
* to `null` to stop the local filter, for example when a server sends the filtered results.
|
|
25
25
|
*/
|
|
26
26
|
filter?: AutocompleteFilter | null;
|
|
27
|
-
/**
|
|
27
|
+
/** Highlights the first item that agrees with the search text, each time that text changes. */
|
|
28
28
|
autoHighlight?: boolean;
|
|
29
|
-
/**
|
|
29
|
+
/** The component calls it when the search text changes. */
|
|
30
30
|
onInputChange?: (value: string) => void;
|
|
31
31
|
children?: Snippet;
|
|
32
32
|
class?: string;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { type Snippet } from 'svelte';
|
|
2
2
|
import { type AutocompleteFilter } from './context';
|
|
3
3
|
type AutocompleteProps = {
|
|
4
|
-
/**
|
|
4
|
+
/** A stable id, from which the component makes its internal ARIA ids. Give one on a server. */
|
|
5
5
|
id?: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
readonly?: boolean;
|
|
8
|
-
/**
|
|
8
|
+
/** The search text. You can bind it with `bind:inputValue`. */
|
|
9
9
|
inputValue?: string;
|
|
10
|
-
/**
|
|
10
|
+
/** The search text at the start, for when the component controls the state. */
|
|
11
11
|
defaultInputValue?: string;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
13
|
+
* The local filter function. The default compares the text and ignores the letter case. Set it
|
|
14
|
+
* to `null` to stop the local filter, for example when a server sends the filtered results.
|
|
15
15
|
*/
|
|
16
16
|
filter?: AutocompleteFilter | null;
|
|
17
|
-
/**
|
|
17
|
+
/** Highlights the first item that agrees with the search text, each time that text changes. */
|
|
18
18
|
autoHighlight?: boolean;
|
|
19
|
-
/**
|
|
19
|
+
/** The component calls it when the search text changes. */
|
|
20
20
|
onInputChange?: (value: string) => void;
|
|
21
21
|
children?: Snippet;
|
|
22
22
|
class?: string;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* of available results to screen readers as the query changes.
|
|
7
7
|
*/
|
|
8
8
|
type AutocompleteStatusProps = {
|
|
9
|
-
/**
|
|
9
|
+
/** Makes the announced message from the number of the items that the user sees. */
|
|
10
10
|
formatMessage?: (count: number) => string;
|
|
11
11
|
};
|
|
12
12
|
|