bits-ui 1.0.0-next.11 → 1.0.0-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bits/accordion/accordion.svelte.d.ts +2 -2
- package/dist/bits/accordion/accordion.svelte.js +2 -3
- package/dist/bits/accordion/components/accordion-content.svelte +2 -3
- package/dist/bits/accordion/components/accordion-header.svelte +1 -2
- package/dist/bits/accordion/components/accordion-item.svelte +1 -2
- package/dist/bits/accordion/components/accordion-trigger.svelte +1 -2
- package/dist/bits/accordion/components/accordion.svelte +2 -3
- package/dist/bits/accordion/types.d.ts +8 -8
- package/dist/bits/alert-dialog/components/alert-dialog-action.svelte +1 -2
- package/dist/bits/alert-dialog/components/alert-dialog-cancel.svelte +1 -2
- package/dist/bits/alert-dialog/components/alert-dialog-content.svelte +3 -4
- package/dist/bits/alert-dialog/components/alert-dialog.svelte +1 -1
- package/dist/bits/alert-dialog/types.d.ts +1 -1
- package/dist/bits/aspect-ratio/aspect-ratio.svelte.js +1 -1
- package/dist/bits/aspect-ratio/components/aspect-ratio.svelte +1 -2
- package/dist/bits/aspect-ratio/types.d.ts +2 -2
- package/dist/bits/avatar/avatar.svelte.d.ts +1 -1
- package/dist/bits/avatar/avatar.svelte.js +1 -1
- package/dist/bits/avatar/components/avatar-fallback.svelte +1 -2
- package/dist/bits/avatar/components/avatar-image.svelte +1 -2
- package/dist/bits/avatar/components/avatar.svelte +1 -2
- package/dist/bits/avatar/types.d.ts +4 -4
- package/dist/bits/calendar/calendar.svelte.d.ts +7 -7
- package/dist/bits/calendar/calendar.svelte.js +1 -1
- package/dist/bits/calendar/components/calendar-cell.svelte +1 -2
- package/dist/bits/calendar/components/calendar-day.svelte +1 -2
- package/dist/bits/calendar/components/calendar-grid-body.svelte +1 -2
- package/dist/bits/calendar/components/calendar-grid-head.svelte +1 -2
- package/dist/bits/calendar/components/calendar-grid-row.svelte +1 -2
- package/dist/bits/calendar/components/calendar-grid.svelte +1 -2
- package/dist/bits/calendar/components/calendar-head-cell.svelte +1 -2
- package/dist/bits/calendar/components/calendar-header.svelte +1 -2
- package/dist/bits/calendar/components/calendar-heading.svelte +1 -2
- package/dist/bits/calendar/components/calendar-next-button.svelte +1 -2
- package/dist/bits/calendar/components/calendar-prev-button.svelte +1 -2
- package/dist/bits/calendar/components/calendar.svelte +2 -3
- package/dist/bits/calendar/types.d.ts +15 -15
- package/dist/bits/checkbox/checkbox.svelte.d.ts +2 -2
- package/dist/bits/checkbox/checkbox.svelte.js +1 -2
- package/dist/bits/checkbox/components/checkbox.svelte +1 -2
- package/dist/bits/checkbox/types.d.ts +2 -2
- package/dist/bits/collapsible/collapsible.svelte.d.ts +1 -1
- package/dist/bits/collapsible/collapsible.svelte.js +2 -3
- package/dist/bits/collapsible/components/collapsible-content.svelte +2 -3
- package/dist/bits/collapsible/components/collapsible-content.svelte.d.ts +3 -3
- package/dist/bits/collapsible/components/collapsible-trigger.svelte +1 -2
- package/dist/bits/collapsible/components/collapsible.svelte +2 -3
- package/dist/bits/collapsible/types.d.ts +6 -6
- package/dist/bits/combobox/components/combobox-input.svelte +1 -2
- package/dist/bits/combobox/components/combobox-trigger.svelte +1 -2
- package/dist/bits/combobox/components/combobox.svelte +1 -1
- package/dist/bits/combobox/components/combobox.svelte.d.ts +1 -1
- package/dist/bits/combobox/types.d.ts +2 -2
- package/dist/bits/command/command.svelte.d.ts +4 -4
- package/dist/bits/command/command.svelte.js +5 -8
- package/dist/bits/command/components/_command-label.svelte +2 -2
- package/dist/bits/command/components/_command-label.svelte.d.ts +2 -2
- package/dist/bits/command/components/command-empty.svelte +1 -2
- package/dist/bits/command/components/command-group-heading.svelte +1 -2
- package/dist/bits/command/components/command-group-items.svelte +1 -2
- package/dist/bits/command/components/command-group.svelte +1 -2
- package/dist/bits/command/components/command-input.svelte +1 -2
- package/dist/bits/command/components/command-item.svelte +2 -3
- package/dist/bits/command/components/command-link-item.svelte +2 -3
- package/dist/bits/command/components/command-list.svelte +1 -2
- package/dist/bits/command/components/command-loading.svelte +1 -2
- package/dist/bits/command/components/command-separator.svelte +1 -2
- package/dist/bits/command/components/command.svelte +2 -3
- package/dist/bits/command/types.d.ts +13 -13
- package/dist/bits/context-menu/components/context-menu-content-static.svelte +3 -4
- package/dist/bits/context-menu/components/context-menu-content.svelte +3 -4
- package/dist/bits/context-menu/components/context-menu-trigger.svelte +1 -2
- package/dist/bits/context-menu/components/context-menu.svelte +1 -1
- package/dist/bits/context-menu/types.d.ts +2 -2
- package/dist/bits/date-field/components/date-field-input.svelte +1 -2
- package/dist/bits/date-field/components/date-field-label.svelte +1 -2
- package/dist/bits/date-field/components/date-field-segment.svelte +1 -2
- package/dist/bits/date-field/components/date-field.svelte +1 -1
- package/dist/bits/date-field/date-field.svelte.d.ts +29 -29
- package/dist/bits/date-field/date-field.svelte.js +1 -3
- package/dist/bits/date-field/types.d.ts +4 -4
- package/dist/bits/date-picker/components/date-picker-calendar.svelte +1 -2
- package/dist/bits/date-picker/components/date-picker-content-static.svelte +1 -1
- package/dist/bits/date-picker/components/date-picker-content.svelte +1 -1
- package/dist/bits/date-picker/components/date-picker-trigger.svelte +1 -1
- package/dist/bits/date-picker/components/date-picker.svelte +1 -1
- package/dist/bits/date-picker/types.d.ts +2 -2
- package/dist/bits/date-range-field/components/date-range-field-input.svelte +1 -2
- package/dist/bits/date-range-field/components/date-range-field-label.svelte +1 -2
- package/dist/bits/date-range-field/components/date-range-field.svelte +2 -3
- package/dist/bits/date-range-field/date-range-field.svelte.js +1 -3
- package/dist/bits/date-range-field/types.d.ts +4 -4
- package/dist/bits/date-range-picker/components/date-range-picker-calendar.svelte +1 -2
- package/dist/bits/date-range-picker/components/date-range-picker-trigger.svelte +1 -1
- package/dist/bits/date-range-picker/components/date-range-picker.svelte +2 -3
- package/dist/bits/date-range-picker/types.d.ts +3 -3
- package/dist/bits/dialog/components/dialog-close.svelte +1 -2
- package/dist/bits/dialog/components/dialog-content.svelte +3 -4
- package/dist/bits/dialog/components/dialog-description.svelte +1 -2
- package/dist/bits/dialog/components/dialog-overlay.svelte +1 -2
- package/dist/bits/dialog/components/dialog-title.svelte +1 -2
- package/dist/bits/dialog/components/dialog-trigger.svelte +1 -2
- package/dist/bits/dialog/components/dialog.svelte +1 -1
- package/dist/bits/dialog/dialog.svelte.d.ts +1 -1
- package/dist/bits/dialog/dialog.svelte.js +7 -7
- package/dist/bits/dialog/types.d.ts +8 -8
- package/dist/bits/dropdown-menu/components/dropdown-menu-content-static.svelte +3 -4
- package/dist/bits/dropdown-menu/components/dropdown-menu-content.svelte +3 -4
- package/dist/bits/label/components/label.svelte +1 -2
- package/dist/bits/label/label.svelte.js +1 -1
- package/dist/bits/label/types.d.ts +2 -2
- package/dist/bits/link-preview/components/link-preview-content-static.svelte +1 -2
- package/dist/bits/link-preview/components/link-preview-content.svelte +2 -3
- package/dist/bits/link-preview/components/link-preview-trigger.svelte +1 -2
- package/dist/bits/link-preview/components/link-preview.svelte +1 -1
- package/dist/bits/link-preview/link-preview.svelte.d.ts +1 -1
- package/dist/bits/link-preview/link-preview.svelte.js +1 -5
- package/dist/bits/link-preview/types.d.ts +6 -6
- package/dist/bits/listbox/components/listbox-content-static.svelte +3 -4
- package/dist/bits/listbox/components/listbox-content.svelte +3 -4
- package/dist/bits/listbox/components/listbox-group-heading.svelte +1 -2
- package/dist/bits/listbox/components/listbox-group.svelte +1 -2
- package/dist/bits/listbox/components/listbox-item.svelte +2 -3
- package/dist/bits/listbox/components/listbox-scroll-down-button.svelte +1 -2
- package/dist/bits/listbox/components/listbox-scroll-up-button.svelte +1 -2
- package/dist/bits/listbox/components/listbox-trigger.svelte +1 -2
- package/dist/bits/listbox/components/listbox-viewport.svelte +1 -2
- package/dist/bits/listbox/components/listbox.svelte +1 -1
- package/dist/bits/listbox/components/listbox.svelte.d.ts +1 -1
- package/dist/bits/listbox/listbox.svelte.d.ts +1 -1
- package/dist/bits/listbox/listbox.svelte.js +5 -8
- package/dist/bits/listbox/types.d.ts +16 -16
- package/dist/bits/menu/components/menu-arrow.svelte +1 -1
- package/dist/bits/menu/components/menu-checkbox-item.svelte +2 -3
- package/dist/bits/menu/components/menu-content-static.svelte +3 -4
- package/dist/bits/menu/components/menu-content.svelte +3 -4
- package/dist/bits/menu/components/menu-group-heading.svelte +1 -2
- package/dist/bits/menu/components/menu-group.svelte +1 -2
- package/dist/bits/menu/components/menu-item.svelte +2 -3
- package/dist/bits/menu/components/menu-radio-group.svelte +2 -3
- package/dist/bits/menu/components/menu-radio-item.svelte +2 -3
- package/dist/bits/menu/components/menu-separator.svelte +1 -2
- package/dist/bits/menu/components/menu-sub-content-static.svelte +3 -5
- package/dist/bits/menu/components/menu-sub-content.svelte +3 -5
- package/dist/bits/menu/components/menu-sub-trigger.svelte +1 -2
- package/dist/bits/menu/components/menu-sub.svelte +1 -1
- package/dist/bits/menu/components/menu-trigger.svelte +1 -2
- package/dist/bits/menu/components/menu.svelte +1 -1
- package/dist/bits/menu/menu.svelte.d.ts +9 -9
- package/dist/bits/menu/menu.svelte.js +4 -9
- package/dist/bits/menu/types.d.ts +18 -18
- package/dist/bits/menubar/components/menubar-content-static.svelte +1 -2
- package/dist/bits/menubar/components/menubar-content.svelte +1 -2
- package/dist/bits/menubar/components/menubar-trigger.svelte +1 -2
- package/dist/bits/menubar/components/menubar.svelte +2 -3
- package/dist/bits/menubar/menubar.svelte.d.ts +1 -1
- package/dist/bits/menubar/menubar.svelte.js +2 -4
- package/dist/bits/menubar/types.d.ts +3 -3
- package/dist/bits/navigation-menu/components/navigation-menu-content.svelte +1 -2
- package/dist/bits/navigation-menu/components/navigation-menu-indicator.svelte +1 -2
- package/dist/bits/navigation-menu/components/navigation-menu-item.svelte +1 -2
- package/dist/bits/navigation-menu/components/navigation-menu-link.svelte +2 -3
- package/dist/bits/navigation-menu/components/navigation-menu-list.svelte +1 -2
- package/dist/bits/navigation-menu/components/navigation-menu-trigger.svelte +1 -2
- package/dist/bits/navigation-menu/components/navigation-menu-viewport.svelte +1 -2
- package/dist/bits/navigation-menu/components/navigation-menu.svelte +2 -3
- package/dist/bits/navigation-menu/navigation-menu.svelte.d.ts +2 -2
- package/dist/bits/navigation-menu/navigation-menu.svelte.js +6 -8
- package/dist/bits/navigation-menu/types.d.ts +10 -10
- package/dist/bits/pagination/components/pagination-next-button.svelte +1 -2
- package/dist/bits/pagination/components/pagination-page.svelte +1 -2
- package/dist/bits/pagination/components/pagination-prev-button.svelte +1 -2
- package/dist/bits/pagination/components/pagination.svelte +2 -3
- package/dist/bits/pagination/components/pagination.svelte.d.ts +1 -1
- package/dist/bits/pagination/pagination.svelte.js +1 -1
- package/dist/bits/pagination/types.d.ts +5 -5
- package/dist/bits/pin-input/components/pin-input-cell.svelte +1 -2
- package/dist/bits/pin-input/components/pin-input.svelte +2 -3
- package/dist/bits/pin-input/pin-input.svelte.d.ts +3 -3
- package/dist/bits/pin-input/pin-input.svelte.js +2 -3
- package/dist/bits/pin-input/types.d.ts +3 -3
- package/dist/bits/popover/components/popover-close.svelte +1 -2
- package/dist/bits/popover/components/popover-content-static.svelte +2 -3
- package/dist/bits/popover/components/popover-content.svelte +2 -3
- package/dist/bits/popover/components/popover-trigger.svelte +1 -2
- package/dist/bits/popover/components/popover.svelte +1 -1
- package/dist/bits/popover/popover.svelte.d.ts +1 -1
- package/dist/bits/popover/popover.svelte.js +3 -3
- package/dist/bits/popover/types.d.ts +8 -8
- package/dist/bits/progress/components/progress.svelte +1 -2
- package/dist/bits/progress/progress.svelte.js +1 -1
- package/dist/bits/progress/types.d.ts +2 -2
- package/dist/bits/radio-group/components/radio-group-item.svelte +1 -2
- package/dist/bits/radio-group/components/radio-group.svelte +2 -3
- package/dist/bits/radio-group/radio-group.svelte.d.ts +2 -2
- package/dist/bits/radio-group/radio-group.svelte.js +2 -3
- package/dist/bits/radio-group/types.d.ts +3 -3
- package/dist/bits/range-calendar/components/range-calendar-cell.svelte +1 -2
- package/dist/bits/range-calendar/components/range-calendar-day.svelte +1 -2
- package/dist/bits/range-calendar/components/range-calendar.svelte +2 -3
- package/dist/bits/range-calendar/range-calendar.svelte.d.ts +3 -3
- package/dist/bits/range-calendar/range-calendar.svelte.js +1 -1
- package/dist/bits/range-calendar/types.d.ts +2 -2
- package/dist/bits/scroll-area/components/scroll-area-corner-impl.svelte +1 -2
- package/dist/bits/scroll-area/components/scroll-area-scrollbar-auto.svelte +1 -1
- package/dist/bits/scroll-area/components/scroll-area-scrollbar-hover.svelte +1 -1
- package/dist/bits/scroll-area/components/scroll-area-scrollbar-scroll.svelte +1 -1
- package/dist/bits/scroll-area/components/scroll-area-scrollbar-shared.svelte +1 -1
- package/dist/bits/scroll-area/components/scroll-area-scrollbar-x.svelte +1 -2
- package/dist/bits/scroll-area/components/scroll-area-scrollbar-y.svelte +1 -2
- package/dist/bits/scroll-area/components/scroll-area-thumb-impl.svelte +1 -2
- package/dist/bits/scroll-area/components/scroll-area-viewport.svelte +1 -2
- package/dist/bits/scroll-area/components/scroll-area.svelte +1 -2
- package/dist/bits/scroll-area/scroll-area.svelte.d.ts +2 -2
- package/dist/bits/scroll-area/scroll-area.svelte.js +4 -7
- package/dist/bits/scroll-area/types.d.ts +6 -6
- package/dist/bits/select/components/select-arrow.svelte +1 -2
- package/dist/bits/select/components/select-content-floating.svelte +1 -1
- package/dist/bits/select/components/select-content-floating.svelte.d.ts +1 -1
- package/dist/bits/select/components/select-content-impl.svelte +2 -2
- package/dist/bits/select/components/select-content-impl.svelte.d.ts +5 -5
- package/dist/bits/select/components/select-content-item-aligned.svelte +3 -4
- package/dist/bits/select/components/select-content-item-aligned.svelte.d.ts +2 -2
- package/dist/bits/select/components/select-group-heading.svelte +1 -2
- package/dist/bits/select/components/select-group.svelte +1 -2
- package/dist/bits/select/components/select-icon.svelte +1 -2
- package/dist/bits/select/components/select-item-text.svelte +1 -2
- package/dist/bits/select/components/select-item.svelte +1 -2
- package/dist/bits/select/components/select-native.svelte +1 -1
- package/dist/bits/select/components/select-scroll-down-button-mounted.svelte.d.ts +2 -2
- package/dist/bits/select/components/select-scroll-down-button.svelte +1 -2
- package/dist/bits/select/components/select-scroll-up-button-mounted.svelte.d.ts +2 -2
- package/dist/bits/select/components/select-scroll-up-button.svelte +1 -2
- package/dist/bits/select/components/select-separator.svelte +1 -2
- package/dist/bits/select/components/select-trigger.svelte +1 -2
- package/dist/bits/select/components/select-value.svelte +1 -1
- package/dist/bits/select/components/select-viewport.svelte +1 -2
- package/dist/bits/select/components/select.svelte +1 -1
- package/dist/bits/select/components/select.svelte.d.ts +1 -1
- package/dist/bits/select/select.svelte.d.ts +4 -4
- package/dist/bits/select/select.svelte.js +5 -8
- package/dist/bits/select/types.d.ts +14 -14
- package/dist/bits/separator/components/separator.svelte +1 -2
- package/dist/bits/separator/separator.svelte.js +1 -1
- package/dist/bits/separator/types.d.ts +2 -2
- package/dist/bits/slider/components/slider-range.svelte +1 -2
- package/dist/bits/slider/components/slider-thumb.svelte +1 -2
- package/dist/bits/slider/components/slider-tick.svelte +1 -2
- package/dist/bits/slider/components/slider.svelte +2 -3
- package/dist/bits/slider/slider.svelte.d.ts +2 -2
- package/dist/bits/slider/slider.svelte.js +1 -2
- package/dist/bits/slider/types.d.ts +5 -5
- package/dist/bits/switch/components/switch-thumb.svelte +1 -2
- package/dist/bits/switch/components/switch.svelte +2 -3
- package/dist/bits/switch/switch.svelte.d.ts +2 -2
- package/dist/bits/switch/switch.svelte.js +1 -2
- package/dist/bits/switch/types.d.ts +3 -3
- package/dist/bits/tabs/components/tabs-content.svelte +1 -2
- package/dist/bits/tabs/components/tabs-list.svelte +1 -2
- package/dist/bits/tabs/components/tabs-trigger.svelte +1 -2
- package/dist/bits/tabs/components/tabs.svelte +2 -3
- package/dist/bits/tabs/tabs.svelte.d.ts +1 -1
- package/dist/bits/tabs/tabs.svelte.js +1 -1
- package/dist/bits/tabs/types.d.ts +5 -5
- package/dist/bits/toggle/components/toggle.svelte +2 -3
- package/dist/bits/toggle/toggle.svelte.d.ts +1 -1
- package/dist/bits/toggle/toggle.svelte.js +1 -1
- package/dist/bits/toggle/types.d.ts +2 -2
- package/dist/bits/toggle-group/components/toggle-group-item.svelte +1 -2
- package/dist/bits/toggle-group/components/toggle-group.svelte +2 -2
- package/dist/bits/toggle-group/toggle-group.svelte.d.ts +3 -3
- package/dist/bits/toggle-group/toggle-group.svelte.js +1 -1
- package/dist/bits/toggle-group/types.d.ts +5 -5
- package/dist/bits/toolbar/components/toolbar-button.svelte +1 -2
- package/dist/bits/toolbar/components/toolbar-group-item.svelte +1 -2
- package/dist/bits/toolbar/components/toolbar-group.svelte +2 -2
- package/dist/bits/toolbar/components/toolbar-link.svelte +1 -2
- package/dist/bits/toolbar/components/toolbar.svelte +1 -2
- package/dist/bits/toolbar/toolbar.svelte.d.ts +2 -2
- package/dist/bits/toolbar/toolbar.svelte.js +1 -2
- package/dist/bits/toolbar/types.d.ts +5 -5
- package/dist/bits/tooltip/components/tooltip-content-static.svelte +2 -3
- package/dist/bits/tooltip/components/tooltip-content.svelte +2 -3
- package/dist/bits/tooltip/components/tooltip-trigger.svelte +1 -2
- package/dist/bits/tooltip/components/tooltip.svelte +1 -1
- package/dist/bits/tooltip/tooltip.svelte.js +2 -3
- package/dist/bits/tooltip/types.d.ts +7 -7
- package/dist/bits/utilities/arrow/arrow.svelte +1 -1
- package/dist/bits/utilities/arrow/types.d.ts +2 -2
- package/dist/bits/utilities/dismissible-layer/useDismissibleLayer.svelte.js +2 -7
- package/dist/bits/utilities/escape-layer/useEscapeLayer.svelte.js +1 -1
- package/dist/bits/utilities/floating-layer/components/floating-layer-arrow.svelte +1 -2
- package/dist/bits/utilities/floating-layer/components/floating-layer-content.svelte +1 -2
- package/dist/bits/utilities/floating-layer/useFloatingLayer.svelte.d.ts +10 -10
- package/dist/bits/utilities/floating-layer/useFloatingLayer.svelte.js +4 -7
- package/dist/bits/utilities/focus-scope/focus-scope.svelte +1 -1
- package/dist/bits/utilities/focus-scope/useFocusScope.svelte.js +2 -5
- package/dist/bits/utilities/mounted.svelte +1 -1
- package/dist/bits/utilities/popper-layer/popper-layer.svelte +1 -1
- package/dist/bits/utilities/presence-layer/usePresence.svelte.d.ts +1 -1
- package/dist/bits/utilities/presence-layer/usePresence.svelte.js +1 -1
- package/dist/bits/utilities/text-selection-layer/useTextSelectionLayer.svelte.js +2 -5
- package/dist/bits/utilities/visually-hidden/types.d.ts +2 -2
- package/dist/bits/utilities/visually-hidden/visually-hidden.svelte +1 -1
- package/dist/internal/create-event-hook.svelte.js +1 -1
- package/dist/internal/date-time/announcer.js +2 -2
- package/dist/internal/date-time/calendar-helpers.svelte.d.ts +1 -1
- package/dist/internal/date-time/calendar-helpers.svelte.js +1 -2
- package/dist/internal/date-time/field/helpers.js +1 -1
- package/dist/internal/types.d.ts +28 -0
- package/dist/internal/use-body-scroll-lock.svelte.js +1 -2
- package/dist/internal/use-grace-area.svelte.d.ts +1 -1
- package/dist/internal/use-grace-area.svelte.js +1 -1
- package/dist/internal/use-roving-focus.svelte.d.ts +1 -1
- package/dist/internal/use-roving-focus.svelte.js +7 -1
- package/dist/internal/use-size.svelte.d.ts +1 -1
- package/dist/internal/use-size.svelte.js +1 -1
- package/dist/internal/use-timeout-fn.svelte.js +1 -2
- package/dist/shared/attributes.d.ts +28 -28
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +1 -1
- package/package.json +2 -4
- package/dist/bits/listbox/components/listbox-label.svelte +0 -33
- package/dist/bits/listbox/components/listbox-label.svelte.d.ts +0 -18
- package/dist/internal/after-sleep.d.ts +0 -4
- package/dist/internal/after-sleep.js +0 -6
- package/dist/internal/after-tick.d.ts +0 -5
- package/dist/internal/after-tick.js +0 -7
- package/dist/internal/callbacks.d.ts +0 -11
- package/dist/internal/callbacks.js +0 -21
- package/dist/internal/compose-handlers.d.ts +0 -8
- package/dist/internal/compose-handlers.js +0 -21
- package/dist/internal/css-to-style-obj.d.ts +0 -2
- package/dist/internal/css-to-style-obj.js +0 -23
- package/dist/internal/execute-callbacks.d.ts +0 -7
- package/dist/internal/execute-callbacks.js +0 -15
- package/dist/internal/merge-props.d.ts +0 -22
- package/dist/internal/merge-props.js +0 -98
- package/dist/internal/on-destroy-effect.svelte.d.ts +0 -1
- package/dist/internal/on-destroy-effect.svelte.js +0 -7
- package/dist/internal/strings.d.ts +0 -3
- package/dist/internal/strings.js +0 -70
- package/dist/internal/style-to-css.d.ts +0 -1
- package/dist/internal/style-to-css.js +0 -23
- package/dist/internal/style.d.ts +0 -4
- package/dist/internal/style.js +0 -17
- package/dist/internal/use-ref-by-id.svelte.d.ts +0 -28
- package/dist/internal/use-ref-by-id.svelte.js +0 -27
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { Snippet } from "svelte";
|
|
3
3
|
import type { HTMLSelectAttributes } from "svelte/elements";
|
|
4
|
+
import { mergeProps } from "svelte-toolbelt";
|
|
4
5
|
import { VisuallyHidden } from "../../utilities/visually-hidden/index.js";
|
|
5
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
6
|
|
|
7
7
|
type Props = {
|
|
8
8
|
autofocus?: boolean;
|
|
@@ -12,14 +12,14 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
12
12
|
};
|
|
13
13
|
z_$$bindings?: Bindings;
|
|
14
14
|
}
|
|
15
|
-
declare const SelectScrollDownButtonMounted: $$__sveltets_2_IsomorphicComponent<Omit<{}, "
|
|
15
|
+
declare const SelectScrollDownButtonMounted: $$__sveltets_2_IsomorphicComponent<Omit<{}, "children" | "child"> & {
|
|
16
16
|
child?: import("svelte").Snippet<[{
|
|
17
17
|
props: Record<string, unknown>;
|
|
18
18
|
}]> | undefined;
|
|
19
19
|
children?: import("svelte").Snippet<[]> | undefined;
|
|
20
20
|
style?: import("../../../index.js").StyleProperties | string | null | undefined;
|
|
21
21
|
ref?: HTMLElement | null | undefined;
|
|
22
|
-
} & import("../../../index.js").Without<import("../../../index.js").
|
|
22
|
+
} & import("../../../index.js").Without<import("../../../index.js").BitsPrimitiveDivAttributes, import("../types.js").SelectScrollDownButtonPropsWithoutHTML> & {
|
|
23
23
|
mounted: WritableBox<boolean>;
|
|
24
24
|
style: string;
|
|
25
25
|
}, {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { SelectScrollUpButtonProps } from "../types.js";
|
|
4
4
|
import { useSelectScrollDownButton } from "../select.svelte.js";
|
|
5
5
|
import SelectScrollDownButtonMounted from "./select-scroll-down-button-mounted.svelte";
|
|
6
6
|
import { useId } from "../../../internal/use-id.js";
|
|
7
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
8
7
|
|
|
9
8
|
let { id = useId(), ref = $bindable(null), ...restProps }: SelectScrollUpButtonProps = $props();
|
|
10
9
|
|
|
@@ -12,14 +12,14 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
12
12
|
};
|
|
13
13
|
z_$$bindings?: Bindings;
|
|
14
14
|
}
|
|
15
|
-
declare const SelectScrollUpButtonMounted: $$__sveltets_2_IsomorphicComponent<Omit<{}, "
|
|
15
|
+
declare const SelectScrollUpButtonMounted: $$__sveltets_2_IsomorphicComponent<Omit<{}, "children" | "child"> & {
|
|
16
16
|
child?: import("svelte").Snippet<[{
|
|
17
17
|
props: Record<string, unknown>;
|
|
18
18
|
}]> | undefined;
|
|
19
19
|
children?: import("svelte").Snippet<[]> | undefined;
|
|
20
20
|
style?: import("../../../index.js").StyleProperties | string | null | undefined;
|
|
21
21
|
ref?: HTMLElement | null | undefined;
|
|
22
|
-
} & import("../../../index.js").Without<import("../../../index.js").
|
|
22
|
+
} & import("../../../index.js").Without<import("../../../index.js").BitsPrimitiveDivAttributes, import("../types.js").SelectScrollUpButtonPropsWithoutHTML> & {
|
|
23
23
|
mounted: WritableBox<boolean>;
|
|
24
24
|
style: string;
|
|
25
25
|
}, {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { SelectScrollUpButtonProps } from "../types.js";
|
|
4
4
|
import { useSelectScrollUpButton } from "../select.svelte.js";
|
|
5
5
|
import SelectScrollUpButtonMounted from "./select-scroll-up-button-mounted.svelte";
|
|
6
6
|
import { useId } from "../../../internal/use-id.js";
|
|
7
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
8
7
|
|
|
9
8
|
let { id = useId(), ref = $bindable(null), ...restProps }: SelectScrollUpButtonProps = $props();
|
|
10
9
|
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { SelectSeparatorProps } from "../types.js";
|
|
4
4
|
import { useSelectSeparator } from "../select.svelte.js";
|
|
5
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
5
|
import { useId } from "../../../internal/use-id.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { SelectTriggerProps } from "../types.js";
|
|
4
4
|
import { useSelectTrigger } from "../select.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
import FloatingLayerAnchor from "../../utilities/floating-layer/components/floating-layer-anchor.svelte";
|
|
8
7
|
|
|
9
8
|
let {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { mergeProps } from "svelte-toolbelt";
|
|
2
3
|
import type { SelectValueProps } from "../types.js";
|
|
3
4
|
import { useSelectValue } from "../select.svelte.js";
|
|
4
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
5
5
|
|
|
6
6
|
let {
|
|
7
7
|
placeholder = "",
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { SelectViewportProps } from "../types.js";
|
|
4
4
|
import { useSelectViewport } from "../select.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
9
8
|
id = useId(),
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { useSelectRoot } from "../select.svelte.js";
|
|
5
5
|
import SelectNative from "./select-native.svelte";
|
|
6
6
|
import FloatingLayer from "../../utilities/floating-layer/components/floating-layer.svelte";
|
|
7
|
-
import { noop } from "../../../internal/
|
|
7
|
+
import { noop } from "../../../internal/noop.js";
|
|
8
8
|
|
|
9
9
|
let {
|
|
10
10
|
open = $bindable(false),
|
|
@@ -13,6 +13,6 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
13
13
|
}
|
|
14
14
|
declare const Select: $$__sveltets_2_IsomorphicComponent<import("../types.js").SelectRootPropsWithoutHTML, {
|
|
15
15
|
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, "
|
|
16
|
+
}, {}, {}, "value" | "open">;
|
|
17
17
|
type Select = InstanceType<typeof Select>;
|
|
18
18
|
export default Select;
|
|
@@ -73,8 +73,8 @@ declare class SelectTriggerState {
|
|
|
73
73
|
readonly role: "combobox";
|
|
74
74
|
readonly type: "button";
|
|
75
75
|
readonly "aria-controls": string | undefined;
|
|
76
|
-
readonly "aria-expanded": "
|
|
77
|
-
readonly "aria-required": "
|
|
76
|
+
readonly "aria-expanded": "true" | "false";
|
|
77
|
+
readonly "aria-required": "true" | "false";
|
|
78
78
|
readonly "aria-autocomplete": "none";
|
|
79
79
|
readonly dir: Direction;
|
|
80
80
|
readonly "data-state": "open" | "closed";
|
|
@@ -177,9 +177,9 @@ declare class SelectItemState {
|
|
|
177
177
|
readonly role: "option";
|
|
178
178
|
readonly "aria-labelledby": string | undefined;
|
|
179
179
|
readonly "data-highlighted": "" | undefined;
|
|
180
|
-
readonly "aria-selected": "
|
|
180
|
+
readonly "aria-selected": "true" | "false";
|
|
181
181
|
readonly "data-state": "checked" | "unchecked";
|
|
182
|
-
readonly "aria-disabled": "
|
|
182
|
+
readonly "aria-disabled": "true" | "false";
|
|
183
183
|
readonly "data-disabled": "" | undefined;
|
|
184
184
|
readonly "data-selected": "" | undefined;
|
|
185
185
|
readonly "data-value": string;
|
|
@@ -3,21 +3,18 @@
|
|
|
3
3
|
* https://github.com/radix-ui/primitives/blob/main/packages/react/select/src/Select.tsx
|
|
4
4
|
* Credit to the Radix UI team for the original implementation.
|
|
5
5
|
*/
|
|
6
|
-
import { box } from "svelte-toolbelt";
|
|
6
|
+
import { afterSleep, afterTick, box, useRefById, } from "svelte-toolbelt";
|
|
7
7
|
import { SvelteMap } from "svelte/reactivity";
|
|
8
8
|
import { untrack } from "svelte";
|
|
9
9
|
import { useId } from "../../internal/use-id.js";
|
|
10
10
|
import { createContext } from "../../internal/create-context.js";
|
|
11
11
|
import { useFormControl } from "../../internal/use-form-control.svelte.js";
|
|
12
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
13
12
|
import { useTypeahead } from "../../internal/use-typeahead.svelte.js";
|
|
14
13
|
import { getAriaDisabled, getAriaExpanded, getAriaHidden, getAriaRequired, getAriaSelected, getDataChecked, getDataDisabled, getDataOpenClosed, } from "../../internal/attrs.js";
|
|
15
14
|
import { kbd } from "../../internal/kbd.js";
|
|
16
|
-
import { afterTick } from "../../internal/after-tick.js";
|
|
17
15
|
import { clamp } from "../../internal/clamp.js";
|
|
18
|
-
import { noop } from "../../internal/
|
|
16
|
+
import { noop } from "../../internal/noop.js";
|
|
19
17
|
import { addEventListener } from "../../internal/events.js";
|
|
20
|
-
import { afterSleep } from "../../internal/after-sleep.js";
|
|
21
18
|
export const OPEN_KEYS = [kbd.SPACE, kbd.ENTER, kbd.ARROW_UP, kbd.ARROW_DOWN];
|
|
22
19
|
export const SELECTION_KEYS = [" ", kbd.ENTER];
|
|
23
20
|
export const CONTENT_MARGIN = 10;
|
|
@@ -270,7 +267,7 @@ export class SelectContentState {
|
|
|
270
267
|
useRefById({
|
|
271
268
|
id: this.id,
|
|
272
269
|
ref: this.ref,
|
|
273
|
-
|
|
270
|
+
deps: () => this.root.open.current,
|
|
274
271
|
onRefChange: (node) => {
|
|
275
272
|
this.root.contentNode = node;
|
|
276
273
|
this.root.contentId = node?.id;
|
|
@@ -798,7 +795,7 @@ class SelectViewportState {
|
|
|
798
795
|
onRefChange: (node) => {
|
|
799
796
|
this.content.viewportNode = node;
|
|
800
797
|
},
|
|
801
|
-
|
|
798
|
+
deps: () => this.content.root.open.current,
|
|
802
799
|
});
|
|
803
800
|
}
|
|
804
801
|
#onscroll = (e) => {
|
|
@@ -860,7 +857,7 @@ class SelectScrollButtonImplState {
|
|
|
860
857
|
useRefById({
|
|
861
858
|
id: this.id,
|
|
862
859
|
ref: this.ref,
|
|
863
|
-
|
|
860
|
+
deps: () => this.mounted.current,
|
|
864
861
|
});
|
|
865
862
|
$effect(() => {
|
|
866
863
|
if (this.mounted.current) {
|
|
@@ -3,7 +3,7 @@ import type { Expand } from "svelte-toolbelt";
|
|
|
3
3
|
import type { PopperLayerProps } from "../utilities/popper-layer/types.js";
|
|
4
4
|
import type { ArrowProps, ArrowPropsWithoutHTML } from "../utilities/arrow/types.js";
|
|
5
5
|
import type { OnChangeFn, WithChild, WithChildren, Without } from "../../internal/types.js";
|
|
6
|
-
import type {
|
|
6
|
+
import type { BitsPrimitiveButtonAttributes, BitsPrimitiveDivAttributes, BitsPrimitiveSpanAttributes } from "../../shared/attributes.js";
|
|
7
7
|
import type { Direction } from "../../shared/index.js";
|
|
8
8
|
import type { PortalProps } from "../utilities/portal/index.js";
|
|
9
9
|
export type SelectRootPropsWithoutHTML = WithChildren<{
|
|
@@ -82,14 +82,14 @@ export type SelectContentImplPropsWithoutHTML = Expand<WithChild<Omit<PopperLaye
|
|
|
82
82
|
*/
|
|
83
83
|
position?: "item-aligned" | "floating";
|
|
84
84
|
} & _SharedSelectContentProps>>;
|
|
85
|
-
export type SelectContentImplProps = SelectContentImplPropsWithoutHTML & Without<
|
|
85
|
+
export type SelectContentImplProps = SelectContentImplPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, SelectContentImplPropsWithoutHTML>;
|
|
86
86
|
export type SelectContentPropsWithoutHTML = SelectContentImplPropsWithoutHTML & {
|
|
87
87
|
/**
|
|
88
88
|
* Whether to force mount the content for use with certain animation libraries.
|
|
89
89
|
*/
|
|
90
90
|
forceMount?: boolean;
|
|
91
91
|
};
|
|
92
|
-
export type SelectContentProps = SelectContentPropsWithoutHTML & Without<
|
|
92
|
+
export type SelectContentProps = SelectContentPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, SelectContentPropsWithoutHTML>;
|
|
93
93
|
export type SelectItemSnippetProps = {
|
|
94
94
|
selected: boolean;
|
|
95
95
|
};
|
|
@@ -112,7 +112,7 @@ export type SelectItemPropsWithoutHTML = WithChild<{
|
|
|
112
112
|
*/
|
|
113
113
|
textValue?: string;
|
|
114
114
|
}, SelectItemSnippetProps>;
|
|
115
|
-
export type SelectItemProps = SelectItemPropsWithoutHTML & Without<
|
|
115
|
+
export type SelectItemProps = SelectItemPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, SelectItemPropsWithoutHTML>;
|
|
116
116
|
export type SelectTriggerPropsWithoutHTML = WithChild<{
|
|
117
117
|
/**
|
|
118
118
|
* Whether the trigger is disabled.
|
|
@@ -121,31 +121,31 @@ export type SelectTriggerPropsWithoutHTML = WithChild<{
|
|
|
121
121
|
*/
|
|
122
122
|
disabled?: boolean | null | undefined;
|
|
123
123
|
}>;
|
|
124
|
-
export type SelectTriggerProps = SelectTriggerPropsWithoutHTML & Without<
|
|
124
|
+
export type SelectTriggerProps = SelectTriggerPropsWithoutHTML & Without<BitsPrimitiveButtonAttributes, SelectTriggerPropsWithoutHTML>;
|
|
125
125
|
export type SelectValuePropsWithoutHTML = WithChild<{
|
|
126
126
|
/**
|
|
127
127
|
* The content to render inside the `Select.Value` when no `value` is set.
|
|
128
128
|
*/
|
|
129
129
|
placeholder?: string;
|
|
130
130
|
}>;
|
|
131
|
-
export type SelectValueProps = SelectValuePropsWithoutHTML & Without<Omit<
|
|
131
|
+
export type SelectValueProps = SelectValuePropsWithoutHTML & Without<Omit<BitsPrimitiveSpanAttributes, "id">, SelectValuePropsWithoutHTML>;
|
|
132
132
|
export type SelectItemTextPropsWithoutHTML = WithChild;
|
|
133
|
-
export type SelectItemTextProps = SelectItemTextPropsWithoutHTML & Without<
|
|
133
|
+
export type SelectItemTextProps = SelectItemTextPropsWithoutHTML & Without<BitsPrimitiveSpanAttributes, SelectItemTextPropsWithoutHTML>;
|
|
134
134
|
export type SelectViewportPropsWithoutHTML = WithChild;
|
|
135
|
-
export type SelectViewportProps = SelectViewportPropsWithoutHTML & Without<
|
|
135
|
+
export type SelectViewportProps = SelectViewportPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, SelectViewportPropsWithoutHTML>;
|
|
136
136
|
export type SelectPortalPropsWithoutHTML = PortalProps;
|
|
137
137
|
export type SelectPortalProps = SelectPortalPropsWithoutHTML;
|
|
138
138
|
export type SelectScrollUpButtonPropsWithoutHTML = WithChild;
|
|
139
|
-
export type SelectScrollUpButtonProps = SelectScrollUpButtonPropsWithoutHTML & Without<
|
|
139
|
+
export type SelectScrollUpButtonProps = SelectScrollUpButtonPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, SelectScrollUpButtonPropsWithoutHTML>;
|
|
140
140
|
export type SelectScrollDownButtonPropsWithoutHTML = WithChild;
|
|
141
|
-
export type SelectScrollDownButtonProps = SelectScrollDownButtonPropsWithoutHTML & Without<
|
|
141
|
+
export type SelectScrollDownButtonProps = SelectScrollDownButtonPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, SelectScrollDownButtonPropsWithoutHTML>;
|
|
142
142
|
export type SelectIconPropsWithoutHTML = WithChild;
|
|
143
|
-
export type SelectIconProps = SelectIconPropsWithoutHTML & Without<
|
|
143
|
+
export type SelectIconProps = SelectIconPropsWithoutHTML & Without<BitsPrimitiveSpanAttributes, SelectIconPropsWithoutHTML>;
|
|
144
144
|
export type SelectGroupPropsWithoutHTML = WithChild;
|
|
145
|
-
export type SelectGroupProps = SelectGroupPropsWithoutHTML & Without<
|
|
145
|
+
export type SelectGroupProps = SelectGroupPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, SelectGroupPropsWithoutHTML>;
|
|
146
146
|
export type SelectGroupHeadingPropsWithoutHTML = WithChild;
|
|
147
|
-
export type SelectGroupHeadingProps = SelectGroupHeadingPropsWithoutHTML & Without<
|
|
147
|
+
export type SelectGroupHeadingProps = SelectGroupHeadingPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, SelectGroupHeadingPropsWithoutHTML>;
|
|
148
148
|
export type SelectSeparatorPropsWithoutHTML = WithChild;
|
|
149
|
-
export type SelectSeparatorProps = SelectSeparatorPropsWithoutHTML & Without<
|
|
149
|
+
export type SelectSeparatorProps = SelectSeparatorPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, SelectSeparatorPropsWithoutHTML>;
|
|
150
150
|
export type SelectArrowPropsWithoutHTML = ArrowPropsWithoutHTML;
|
|
151
151
|
export type SelectArrowProps = ArrowProps;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import { useSeparatorRoot } from "../separator.svelte.js";
|
|
4
4
|
import type { SeparatorRootProps } from "../types.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
9
8
|
id = useId(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { useRefById } from "svelte-toolbelt";
|
|
1
2
|
import { getAriaHidden, getAriaOrientation, getDataOrientation } from "../../internal/attrs.js";
|
|
2
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
3
3
|
const ROOT_ATTR = "data-separator-root";
|
|
4
4
|
class SeparatorRootState {
|
|
5
5
|
#id;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { WithChild, Without } from "../../internal/types.js";
|
|
2
2
|
import type { Orientation } from "../../shared/index.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { BitsPrimitiveDivAttributes } from "../../shared/attributes.js";
|
|
4
4
|
export type SeparatorRootPropsWithoutHTML = WithChild<{
|
|
5
5
|
/**
|
|
6
6
|
* The orientation of the separator.
|
|
@@ -15,4 +15,4 @@ export type SeparatorRootPropsWithoutHTML = WithChild<{
|
|
|
15
15
|
*/
|
|
16
16
|
decorative?: boolean;
|
|
17
17
|
}>;
|
|
18
|
-
export type SeparatorRootProps = SeparatorRootPropsWithoutHTML & Without<
|
|
18
|
+
export type SeparatorRootProps = SeparatorRootPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, SeparatorRootPropsWithoutHTML>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { SliderRangeProps } from "../types.js";
|
|
4
4
|
import { useSliderRange } from "../slider.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
9
8
|
children,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { SliderThumbProps } from "../types.js";
|
|
4
4
|
import { useSliderThumb } from "../slider.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
9
8
|
children,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { SliderTickProps } from "../types.js";
|
|
4
4
|
import { useSliderTick } from "../slider.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
9
8
|
children,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { SliderRootProps } from "../types.js";
|
|
4
4
|
import { useSliderRoot } from "../slider.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { noop } from "../../../internal/
|
|
7
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
|
+
import { noop } from "../../../internal/noop.js";
|
|
8
7
|
|
|
9
8
|
let {
|
|
10
9
|
children,
|
|
@@ -58,7 +58,7 @@ declare class SliderRootState {
|
|
|
58
58
|
readonly "aria-valuemin": number;
|
|
59
59
|
readonly "aria-valuemax": number;
|
|
60
60
|
readonly "aria-valuenow": number | undefined;
|
|
61
|
-
readonly "aria-disabled": "
|
|
61
|
+
readonly "aria-disabled": "true" | "false";
|
|
62
62
|
readonly "aria-orientation": "horizontal" | "vertical";
|
|
63
63
|
readonly "data-value": number | undefined;
|
|
64
64
|
readonly tabindex: 0 | -1;
|
|
@@ -1771,7 +1771,7 @@ declare class SliderThumbState {
|
|
|
1771
1771
|
readonly "aria-valuemin": number;
|
|
1772
1772
|
readonly "aria-valuemax": number;
|
|
1773
1773
|
readonly "aria-valuenow": number | undefined;
|
|
1774
|
-
readonly "aria-disabled": "
|
|
1774
|
+
readonly "aria-disabled": "true" | "false";
|
|
1775
1775
|
readonly "aria-orientation": "horizontal" | "vertical";
|
|
1776
1776
|
readonly "data-value": number | undefined;
|
|
1777
1777
|
readonly tabindex: 0 | -1;
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
* Abdelrahman (https://github.com/abdel-17)
|
|
4
4
|
*/
|
|
5
5
|
import { untrack } from "svelte";
|
|
6
|
+
import { executeCallbacks, useRefById } from "svelte-toolbelt";
|
|
6
7
|
import { getRangeStyles, getThumbStyles, getTickStyles } from "./helpers.js";
|
|
7
8
|
import { getAriaDisabled, getAriaOrientation, getDataDisabled, getDataOrientation, } from "../../internal/attrs.js";
|
|
8
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
9
9
|
import { kbd } from "../../internal/kbd.js";
|
|
10
10
|
import { isElementOrSVGElement } from "../../internal/is.js";
|
|
11
11
|
import { isValidIndex } from "../../internal/arrays.js";
|
|
12
12
|
import { addEventListener } from "../../internal/events.js";
|
|
13
|
-
import { executeCallbacks } from "../../internal/execute-callbacks.js";
|
|
14
13
|
import { createContext } from "../../internal/create-context.js";
|
|
15
14
|
import { snapValueToStep } from "../../internal/math.js";
|
|
16
15
|
const SLIDER_ROOT_ATTR = "data-slider-root";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OnChangeFn, WithChild, Without } from "../../internal/types.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { BitsPrimitiveSpanAttributes } from "../../shared/attributes.js";
|
|
3
3
|
import type { Direction, Orientation } from "../../shared/index.js";
|
|
4
4
|
export type SliderRootSnippetProps = {
|
|
5
5
|
ticks: number[];
|
|
@@ -77,9 +77,9 @@ export type SliderRootPropsWithoutHTML = WithChild<{
|
|
|
77
77
|
*/
|
|
78
78
|
controlledValue?: boolean;
|
|
79
79
|
}, SliderRootSnippetProps>;
|
|
80
|
-
export type SliderRootProps = SliderRootPropsWithoutHTML & Without<
|
|
80
|
+
export type SliderRootProps = SliderRootPropsWithoutHTML & Without<BitsPrimitiveSpanAttributes, SliderRootPropsWithoutHTML>;
|
|
81
81
|
export type SliderRangePropsWithoutHTML = WithChild;
|
|
82
|
-
export type SliderRangeProps = SliderRangePropsWithoutHTML & Without<
|
|
82
|
+
export type SliderRangeProps = SliderRangePropsWithoutHTML & Without<BitsPrimitiveSpanAttributes, SliderRangePropsWithoutHTML>;
|
|
83
83
|
export type SliderThumbPropsWithoutHTML = WithChild<{
|
|
84
84
|
/**
|
|
85
85
|
* Whether the thumb is disabled or not.
|
|
@@ -93,7 +93,7 @@ export type SliderThumbPropsWithoutHTML = WithChild<{
|
|
|
93
93
|
*/
|
|
94
94
|
index: number;
|
|
95
95
|
}>;
|
|
96
|
-
export type SliderThumbProps = SliderThumbPropsWithoutHTML & Without<
|
|
96
|
+
export type SliderThumbProps = SliderThumbPropsWithoutHTML & Without<BitsPrimitiveSpanAttributes, SliderThumbPropsWithoutHTML>;
|
|
97
97
|
export type SliderTickPropsWithoutHTML = WithChild<{
|
|
98
98
|
/**
|
|
99
99
|
* The index of the tick in the array of ticks provided by the `children` snippet prop of the
|
|
@@ -101,4 +101,4 @@ export type SliderTickPropsWithoutHTML = WithChild<{
|
|
|
101
101
|
*/
|
|
102
102
|
index: number;
|
|
103
103
|
}>;
|
|
104
|
-
export type SliderTickProps = SliderTickPropsWithoutHTML & Without<
|
|
104
|
+
export type SliderTickProps = SliderTickPropsWithoutHTML & Without<BitsPrimitiveSpanAttributes, SliderTickPropsWithoutHTML>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { SwitchThumbProps } from "../types.js";
|
|
4
4
|
import { useSwitchThumb } from "../switch.svelte.js";
|
|
5
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
5
|
import { useId } from "../../../internal/use-id.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { SwitchRootProps } from "../types.js";
|
|
4
4
|
import { useSwitchRoot } from "../switch.svelte.js";
|
|
5
5
|
import SwitchInput from "./switch-input.svelte";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
import { useId } from "../../../internal/use-id.js";
|
|
8
|
-
import { noop } from "../../../internal/
|
|
7
|
+
import { noop } from "../../../internal/noop.js";
|
|
9
8
|
|
|
10
9
|
let {
|
|
11
10
|
child,
|
|
@@ -25,8 +25,8 @@ declare class SwitchRootState {
|
|
|
25
25
|
readonly id: string;
|
|
26
26
|
readonly role: "switch";
|
|
27
27
|
readonly disabled: true | undefined;
|
|
28
|
-
readonly "aria-checked": "
|
|
29
|
-
readonly "aria-required": "
|
|
28
|
+
readonly "aria-checked": "true" | "false" | "mixed";
|
|
29
|
+
readonly "aria-required": "true" | "false";
|
|
30
30
|
readonly "data-switch-root": "";
|
|
31
31
|
readonly onclick: () => void;
|
|
32
32
|
readonly onkeydown: (e: KeyboardEvent) => void;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import { srOnlyStyles, styleToString, useRefById } from "svelte-toolbelt";
|
|
1
2
|
import { getAriaChecked, getAriaHidden, getAriaRequired, getDataChecked, getDataDisabled, getDataRequired, getDisabled, } from "../../internal/attrs.js";
|
|
2
3
|
import { kbd } from "../../internal/kbd.js";
|
|
3
4
|
import { createContext } from "../../internal/create-context.js";
|
|
4
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
5
|
-
import { srOnlyStyles, styleToString } from "../../internal/style.js";
|
|
6
5
|
const ROOT_ATTR = "data-switch-root";
|
|
7
6
|
const THUMB_ATTR = "data-switch-thumb";
|
|
8
7
|
class SwitchRootState {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OnChangeFn, WithChild, Without } from "../../internal/types.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { BitsPrimitiveButtonAttributes, BitsPrimitiveSpanAttributes } from "../../shared/attributes.js";
|
|
3
3
|
type SwitchRootSnippetProps = {
|
|
4
4
|
checked: boolean;
|
|
5
5
|
};
|
|
@@ -49,8 +49,8 @@ export type SwitchRootPropsWithoutHTML = WithChild<{
|
|
|
49
49
|
*/
|
|
50
50
|
controlledChecked?: boolean;
|
|
51
51
|
}, SwitchRootSnippetProps>;
|
|
52
|
-
export type SwitchRootProps = SwitchRootPropsWithoutHTML & Without<
|
|
52
|
+
export type SwitchRootProps = SwitchRootPropsWithoutHTML & Without<BitsPrimitiveButtonAttributes, SwitchRootPropsWithoutHTML>;
|
|
53
53
|
export type SwitchThumbSnippetProps = SwitchRootSnippetProps;
|
|
54
54
|
export type SwitchThumbPropsWithoutHTML = WithChild<{}, SwitchThumbSnippetProps>;
|
|
55
|
-
export type SwitchThumbProps = SwitchThumbPropsWithoutHTML & Without<
|
|
55
|
+
export type SwitchThumbProps = SwitchThumbPropsWithoutHTML & Without<BitsPrimitiveSpanAttributes, SwitchThumbPropsWithoutHTML>;
|
|
56
56
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { TabsContentProps } from "../types.js";
|
|
4
4
|
import { useTabsContent } from "../tabs.svelte.js";
|
|
5
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
5
|
import { useId } from "../../../internal/use-id.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { TabsListProps } from "../types.js";
|
|
4
4
|
import { useTabsList } from "../tabs.svelte.js";
|
|
5
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
5
|
import { useId } from "../../../internal/use-id.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { TabsTriggerProps } from "../types.js";
|
|
4
4
|
import { useTabsTrigger } from "../tabs.svelte.js";
|
|
5
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
5
|
import { useId } from "../../../internal/use-id.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { TabsRootProps } from "../types.js";
|
|
4
4
|
import { useTabsRoot } from "../tabs.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import {
|
|
7
|
-
import { noop } from "../../../internal/callbacks.js";
|
|
6
|
+
import { noop } from "../../../internal/noop.js";
|
|
8
7
|
|
|
9
8
|
let {
|
|
10
9
|
id = useId(),
|
|
@@ -62,7 +62,7 @@ declare class TabsTriggerState {
|
|
|
62
62
|
readonly "data-value": string;
|
|
63
63
|
readonly "data-orientation": "horizontal" | "vertical";
|
|
64
64
|
readonly "data-disabled": "" | undefined;
|
|
65
|
-
readonly "aria-selected": "
|
|
65
|
+
readonly "aria-selected": "true" | "false";
|
|
66
66
|
readonly "aria-controls": string | undefined;
|
|
67
67
|
readonly "data-tabs-trigger": "";
|
|
68
68
|
readonly disabled: true | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { untrack } from "svelte";
|
|
2
2
|
import { SvelteMap } from "svelte/reactivity";
|
|
3
|
+
import { useRefById } from "svelte-toolbelt";
|
|
3
4
|
import { getAriaOrientation, getAriaSelected, getDataDisabled, getDataOrientation, getDisabled, getHidden, } from "../../internal/attrs.js";
|
|
4
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
5
5
|
import { kbd } from "../../internal/kbd.js";
|
|
6
6
|
import { useRovingFocus, } from "../../internal/use-roving-focus.svelte.js";
|
|
7
7
|
import { createContext } from "../../internal/create-context.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { OnChangeFn, WithChild, Without } from "../../internal/types.js";
|
|
2
2
|
import type { Orientation } from "../../index.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { BitsPrimitiveButtonAttributes, BitsPrimitiveDivAttributes } from "../../shared/attributes.js";
|
|
4
4
|
export type TabsActivationMode = "manual" | "automatic";
|
|
5
5
|
export type TabsRootPropsWithoutHTML = WithChild<{
|
|
6
6
|
/**
|
|
@@ -47,9 +47,9 @@ export type TabsRootPropsWithoutHTML = WithChild<{
|
|
|
47
47
|
*/
|
|
48
48
|
controlledValue?: boolean;
|
|
49
49
|
}>;
|
|
50
|
-
export type TabsRootProps = TabsRootPropsWithoutHTML & Without<
|
|
50
|
+
export type TabsRootProps = TabsRootPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, TabsRootPropsWithoutHTML>;
|
|
51
51
|
export type TabsListPropsWithoutHTML = WithChild;
|
|
52
|
-
export type TabsListProps = TabsListPropsWithoutHTML & Without<
|
|
52
|
+
export type TabsListProps = TabsListPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, TabsListPropsWithoutHTML>;
|
|
53
53
|
export type TabsTriggerPropsWithoutHTML = WithChild<{
|
|
54
54
|
/**
|
|
55
55
|
* The value of the tab associated with this trigger.
|
|
@@ -62,11 +62,11 @@ export type TabsTriggerPropsWithoutHTML = WithChild<{
|
|
|
62
62
|
*/
|
|
63
63
|
disabled?: boolean | null | undefined;
|
|
64
64
|
}>;
|
|
65
|
-
export type TabsTriggerProps = TabsTriggerPropsWithoutHTML & Without<
|
|
65
|
+
export type TabsTriggerProps = TabsTriggerPropsWithoutHTML & Without<BitsPrimitiveButtonAttributes, TabsTriggerPropsWithoutHTML>;
|
|
66
66
|
export type TabsContentPropsWithoutHTML = WithChild<{
|
|
67
67
|
/**
|
|
68
68
|
* The value of the tab associated with this content.
|
|
69
69
|
*/
|
|
70
70
|
value: string;
|
|
71
71
|
}>;
|
|
72
|
-
export type TabsContentProps = TabsContentPropsWithoutHTML & Without<
|
|
72
|
+
export type TabsContentProps = TabsContentPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, TabsContentPropsWithoutHTML>;
|