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,5 +1,5 @@
|
|
|
1
|
+
import { useRefById } from "svelte-toolbelt";
|
|
1
2
|
import { getAriaExpanded, getDataOpenClosed } from "../../internal/attrs.js";
|
|
2
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
3
3
|
import { createContext } from "../../internal/create-context.js";
|
|
4
4
|
function createAttrs(variant) {
|
|
5
5
|
return {
|
|
@@ -88,7 +88,7 @@ class DialogCloseState {
|
|
|
88
88
|
useRefById({
|
|
89
89
|
id: this.#id,
|
|
90
90
|
ref: this.#ref,
|
|
91
|
-
|
|
91
|
+
deps: () => this.#root.open.current,
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
#onclick = () => {
|
|
@@ -138,7 +138,7 @@ class DialogTitleState {
|
|
|
138
138
|
this.#root.titleNode = node;
|
|
139
139
|
this.#root.titleId = node?.id;
|
|
140
140
|
},
|
|
141
|
-
|
|
141
|
+
deps: () => this.#root.open.current,
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
props = $derived.by(() => ({
|
|
@@ -160,7 +160,7 @@ class DialogDescriptionState {
|
|
|
160
160
|
useRefById({
|
|
161
161
|
id: this.#id,
|
|
162
162
|
ref: this.#ref,
|
|
163
|
-
|
|
163
|
+
deps: () => this.#root.open.current,
|
|
164
164
|
onRefChange: (node) => {
|
|
165
165
|
this.#root.descriptionNode = node;
|
|
166
166
|
this.#root.descriptionId = node?.id;
|
|
@@ -184,7 +184,7 @@ class DialogContentState {
|
|
|
184
184
|
useRefById({
|
|
185
185
|
id: this.#id,
|
|
186
186
|
ref: this.#ref,
|
|
187
|
-
|
|
187
|
+
deps: () => this.root.open.current,
|
|
188
188
|
onRefChange: (node) => {
|
|
189
189
|
this.root.contentNode = node;
|
|
190
190
|
this.root.contentId = node?.id;
|
|
@@ -212,7 +212,7 @@ class DialogOverlayState {
|
|
|
212
212
|
useRefById({
|
|
213
213
|
id: this.#id,
|
|
214
214
|
ref: this.#ref,
|
|
215
|
-
|
|
215
|
+
deps: () => this.root.open.current,
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
snippetProps = $derived.by(() => ({ open: this.root.open.current }));
|
|
@@ -233,7 +233,7 @@ class AlertDialogCancelState {
|
|
|
233
233
|
useRefById({
|
|
234
234
|
id: this.#id,
|
|
235
235
|
ref: this.#ref,
|
|
236
|
-
|
|
236
|
+
deps: () => this.#root.open.current,
|
|
237
237
|
onRefChange: (node) => {
|
|
238
238
|
this.#root.cancelNode = node;
|
|
239
239
|
},
|
|
@@ -3,8 +3,8 @@ import type { DismissibleLayerProps } from "../utilities/dismissible-layer/types
|
|
|
3
3
|
import type { PresenceLayerProps } from "../utilities/presence-layer/types.js";
|
|
4
4
|
import type { FocusScopeProps } from "../utilities/focus-scope/types.js";
|
|
5
5
|
import type { TextSelectionLayerProps } from "../utilities/text-selection-layer/types.js";
|
|
6
|
-
import type { OnChangeFn, WithChild, WithChildren, Without } from "../../internal/types.js";
|
|
7
|
-
import type {
|
|
6
|
+
import type { OnChangeFn, WithChild, WithChildNoChildrenSnippetProps, WithChildren, Without } from "../../internal/types.js";
|
|
7
|
+
import type { BitsPrimitiveButtonAttributes, BitsPrimitiveDivAttributes } from "../../shared/attributes.js";
|
|
8
8
|
import type { PortalProps } from "../utilities/portal/index.js";
|
|
9
9
|
export type DialogRootPropsWithoutHTML = WithChildren<{
|
|
10
10
|
/**
|
|
@@ -28,27 +28,27 @@ export type DialogRootProps = DialogRootPropsWithoutHTML;
|
|
|
28
28
|
export type DialogContentSnippetProps = {
|
|
29
29
|
open: boolean;
|
|
30
30
|
};
|
|
31
|
-
export type DialogContentPropsWithoutHTML =
|
|
31
|
+
export type DialogContentPropsWithoutHTML = WithChildNoChildrenSnippetProps<Omit<EscapeLayerProps & Omit<DismissibleLayerProps, "onInteractOutsideStart"> & PresenceLayerProps & FocusScopeProps & TextSelectionLayerProps & {
|
|
32
32
|
preventScroll?: boolean;
|
|
33
33
|
}, "loop">, DialogContentSnippetProps>;
|
|
34
|
-
export type DialogContentProps = DialogContentPropsWithoutHTML & Without<
|
|
34
|
+
export type DialogContentProps = DialogContentPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, DialogContentPropsWithoutHTML>;
|
|
35
35
|
export type DialogOverlaySnippetProps = {
|
|
36
36
|
open: boolean;
|
|
37
37
|
};
|
|
38
38
|
export type DialogOverlayPropsWithoutHTML = WithChild<PresenceLayerProps, DialogOverlaySnippetProps>;
|
|
39
|
-
export type DialogOverlayProps = DialogOverlayPropsWithoutHTML & Without<
|
|
39
|
+
export type DialogOverlayProps = DialogOverlayPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, DialogOverlayPropsWithoutHTML>;
|
|
40
40
|
export type DialogPortalPropsWithoutHTML = PortalProps;
|
|
41
41
|
export type DialogPortalProps = DialogPortalPropsWithoutHTML;
|
|
42
42
|
export type DialogTriggerPropsWithoutHTML = WithChild;
|
|
43
|
-
export type DialogTriggerProps = DialogTriggerPropsWithoutHTML & Without<
|
|
43
|
+
export type DialogTriggerProps = DialogTriggerPropsWithoutHTML & Without<BitsPrimitiveButtonAttributes, DialogTriggerPropsWithoutHTML>;
|
|
44
44
|
export type DialogTitlePropsWithoutHTML = WithChild<{
|
|
45
45
|
/**
|
|
46
46
|
* The heading level of the dialog title.
|
|
47
47
|
*/
|
|
48
48
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
49
49
|
}>;
|
|
50
|
-
export type DialogTitleProps = DialogTitlePropsWithoutHTML & Without<
|
|
50
|
+
export type DialogTitleProps = DialogTitlePropsWithoutHTML & Without<BitsPrimitiveDivAttributes, DialogTitlePropsWithoutHTML>;
|
|
51
51
|
export type DialogClosePropsWithoutHTML = DialogTriggerPropsWithoutHTML;
|
|
52
52
|
export type DialogCloseProps = DialogTriggerProps;
|
|
53
53
|
export type DialogDescriptionPropsWithoutHTML = WithChild;
|
|
54
|
-
export type DialogDescriptionProps = DialogDescriptionPropsWithoutHTML & Without<
|
|
54
|
+
export type DialogDescriptionProps = DialogDescriptionPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, DialogDescriptionPropsWithoutHTML>;
|
|
@@ -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 { DropdownMenuContentStaticProps } from "../types.js";
|
|
4
4
|
import { useMenuContent } from "../../menu/menu.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
|
import PopperLayer from "../../utilities/popper-layer/popper-layer.svelte";
|
|
9
8
|
import Mounted from "../../utilities/mounted.svelte";
|
|
10
9
|
|
|
@@ -62,7 +61,7 @@
|
|
|
62
61
|
{@render child({ props: finalProps, ...contentState.snippetProps })}
|
|
63
62
|
{:else}
|
|
64
63
|
<div {...finalProps}>
|
|
65
|
-
{@render children?.(
|
|
64
|
+
{@render children?.()}
|
|
66
65
|
</div>
|
|
67
66
|
{/if}
|
|
68
67
|
<Mounted bind:isMounted />
|
|
@@ -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 { DropdownMenuContentProps } from "../types.js";
|
|
4
4
|
import { useMenuContent } from "../../menu/menu.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
|
import PopperLayer from "../../utilities/popper-layer/popper-layer.svelte";
|
|
9
8
|
import Mounted from "../../utilities/mounted.svelte";
|
|
10
9
|
import { getFloatingContentCSSVars } from "../../../internal/floating-svelte/floating-utils.svelte.js";
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
{@render child({ props: finalProps, ...contentState.snippetProps })}
|
|
65
64
|
{:else}
|
|
66
65
|
<div {...finalProps}>
|
|
67
|
-
{@render children?.(
|
|
66
|
+
{@render children?.()}
|
|
68
67
|
</div>
|
|
69
68
|
{/if}
|
|
70
69
|
<Mounted bind:isMounted />
|
|
@@ -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 { LabelRootProps } from "../types.js";
|
|
4
4
|
import { setLabelRootState } from "../label.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,4 +1,4 @@
|
|
|
1
1
|
import type { WithChild, Without } from "../../internal/types.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { BitsPrimitiveLabelAttributes } from "../../shared/attributes.js";
|
|
3
3
|
export type LabelRootPropsWithoutHTML = WithChild;
|
|
4
|
-
export type LabelRootProps = LabelRootPropsWithoutHTML & Without<
|
|
4
|
+
export type LabelRootProps = LabelRootPropsWithoutHTML & Without<BitsPrimitiveLabelAttributes, LabelRootPropsWithoutHTML>;
|
|
@@ -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 { LinkPreviewContentStaticProps } from "../types.js";
|
|
4
4
|
import { useLinkPreviewContent } from "../link-preview.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
import PopperLayer from "../../utilities/popper-layer/popper-layer.svelte";
|
|
8
7
|
|
|
9
8
|
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 { LinkPreviewContentProps } from "../types.js";
|
|
4
4
|
import { useLinkPreviewContent } from "../link-preview.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
import PopperLayer from "../../utilities/popper-layer/popper-layer.svelte";
|
|
8
7
|
import { getFloatingContentCSSVars } from "../../../internal/floating-svelte/floating-utils.svelte.js";
|
|
9
8
|
|
|
@@ -76,7 +75,7 @@
|
|
|
76
75
|
{@render child({ props: mergedProps, ...contentState.snippetProps })}
|
|
77
76
|
{:else}
|
|
78
77
|
<div {...mergedProps}>
|
|
79
|
-
{@render children?.(
|
|
78
|
+
{@render children?.()}
|
|
80
79
|
</div>
|
|
81
80
|
{/if}
|
|
82
81
|
{/snippet}
|
|
@@ -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 { LinkPreviewTriggerProps } from "../types.js";
|
|
4
4
|
import { useLinkPreviewTrigger } from "../link-preview.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
import { FloatingLayer } from "../../utilities/floating-layer/index.js";
|
|
8
7
|
|
|
9
8
|
let {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { box } from "svelte-toolbelt";
|
|
3
3
|
import type { LinkPreviewRootProps } from "../types.js";
|
|
4
4
|
import { useLinkPreviewRoot } from "../link-preview.svelte.js";
|
|
5
|
-
import { noop } from "../../../internal/
|
|
5
|
+
import { noop } from "../../../internal/noop.js";
|
|
6
6
|
import { FloatingLayer } from "../../utilities/floating-layer/index.js";
|
|
7
7
|
|
|
8
8
|
let {
|
|
@@ -31,7 +31,7 @@ declare class LinkPreviewTriggerState {
|
|
|
31
31
|
props: {
|
|
32
32
|
readonly id: string;
|
|
33
33
|
readonly "aria-haspopup": "dialog";
|
|
34
|
-
readonly "aria-expanded": "
|
|
34
|
+
readonly "aria-expanded": "true" | "false";
|
|
35
35
|
readonly "data-state": "open" | "closed";
|
|
36
36
|
readonly "aria-controls": string | undefined;
|
|
37
37
|
readonly role: "button";
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { untrack } from "svelte";
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { afterSleep, box, onDestroyEffect, useRefById } from "svelte-toolbelt";
|
|
3
3
|
import { getAriaExpanded, getDataOpenClosed } from "../../internal/attrs.js";
|
|
4
4
|
import { addEventListener } from "../../internal/events.js";
|
|
5
5
|
import { isElement, isFocusVisible, isTouch } from "../../internal/is.js";
|
|
6
|
-
import { sleep } from "../../internal/sleep.js";
|
|
7
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
8
6
|
import { getTabbableCandidates } from "../../internal/focus.js";
|
|
9
7
|
import { createContext } from "../../internal/create-context.js";
|
|
10
8
|
import { useGraceArea } from "../../internal/use-grace-area.svelte.js";
|
|
11
|
-
import { onDestroyEffect } from "../../internal/on-destroy-effect.svelte.js";
|
|
12
|
-
import { afterSleep } from "../../internal/after-sleep.js";
|
|
13
9
|
const CONTENT_ATTR = "data-link-preview-content";
|
|
14
10
|
const TRIGGER_ATTR = "data-link-preview-trigger";
|
|
15
11
|
class LinkPreviewRootState {
|
|
@@ -3,8 +3,8 @@ import type { DismissibleLayerProps } from "../utilities/dismissible-layer/types
|
|
|
3
3
|
import type { EscapeLayerProps } from "../utilities/escape-layer/types.js";
|
|
4
4
|
import type { FloatingLayerContentProps } from "../utilities/floating-layer/types.js";
|
|
5
5
|
import type { PortalProps } from "../utilities/portal/types.js";
|
|
6
|
-
import type {
|
|
7
|
-
import type { OnChangeFn, WithChild, WithChildren, Without } from "../../internal/types.js";
|
|
6
|
+
import type { BitsPrimitiveAnchorAttributes, BitsPrimitiveDivAttributes } from "../../shared/attributes.js";
|
|
7
|
+
import type { OnChangeFn, WithChild, WithChildNoChildrenSnippetProps, WithChildren, Without } from "../../internal/types.js";
|
|
8
8
|
export type LinkPreviewRootPropsWithoutHTML = WithChildren<{
|
|
9
9
|
/**
|
|
10
10
|
* The open state of the link preview.
|
|
@@ -58,7 +58,7 @@ export type LinkPreviewContentSnippetProps = {
|
|
|
58
58
|
*/
|
|
59
59
|
open: boolean;
|
|
60
60
|
};
|
|
61
|
-
export type LinkPreviewContentPropsWithoutHTML =
|
|
61
|
+
export type LinkPreviewContentPropsWithoutHTML = WithChildNoChildrenSnippetProps<Pick<FloatingLayerContentProps, "side" | "sideOffset" | "align" | "alignOffset" | "avoidCollisions" | "collisionBoundary" | "collisionPadding" | "arrowPadding" | "sticky" | "hideWhenDetached" | "dir"> & Omit<DismissibleLayerProps, "onInteractOutsideStart"> & EscapeLayerProps & {
|
|
62
62
|
/**
|
|
63
63
|
* When `true`, the link preview content will be forced to mount in the DOM.
|
|
64
64
|
*
|
|
@@ -66,7 +66,7 @@ export type LinkPreviewContentPropsWithoutHTML = WithChild<Pick<FloatingLayerCon
|
|
|
66
66
|
*/
|
|
67
67
|
forceMount?: boolean;
|
|
68
68
|
}, LinkPreviewContentSnippetProps>;
|
|
69
|
-
export type LinkPreviewContentProps = LinkPreviewContentPropsWithoutHTML & Without<
|
|
69
|
+
export type LinkPreviewContentProps = LinkPreviewContentPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, LinkPreviewContentPropsWithoutHTML>;
|
|
70
70
|
export type LinkPreviewContentStaticPropsWithoutHTML = WithChild<Pick<FloatingLayerContentProps, "dir"> & Omit<DismissibleLayerProps, "onInteractOutsideStart"> & EscapeLayerProps & {
|
|
71
71
|
/**
|
|
72
72
|
* When `true`, the link preview content will be forced to mount in the DOM.
|
|
@@ -75,10 +75,10 @@ export type LinkPreviewContentStaticPropsWithoutHTML = WithChild<Pick<FloatingLa
|
|
|
75
75
|
*/
|
|
76
76
|
forceMount?: boolean;
|
|
77
77
|
}, LinkPreviewContentSnippetProps>;
|
|
78
|
-
export type LinkPreviewContentStaticProps = LinkPreviewContentStaticPropsWithoutHTML & Without<
|
|
78
|
+
export type LinkPreviewContentStaticProps = LinkPreviewContentStaticPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, LinkPreviewContentStaticPropsWithoutHTML>;
|
|
79
79
|
export type LinkPreviewArrowPropsWithoutHTML = ArrowPropsWithoutHTML;
|
|
80
80
|
export type LinkPreviewArrowProps = ArrowProps;
|
|
81
81
|
export type LinkPreviewPortalPropsWithoutHTML = PortalProps;
|
|
82
82
|
export type LinkPreviewPortalProps = LinkPreviewPortalPropsWithoutHTML;
|
|
83
83
|
export type LinkPreviewTriggerPropsWithoutHTML = WithChild;
|
|
84
|
-
export type LinkPreviewTriggerProps = LinkPreviewTriggerPropsWithoutHTML & Without<
|
|
84
|
+
export type LinkPreviewTriggerProps = LinkPreviewTriggerPropsWithoutHTML & Without<BitsPrimitiveAnchorAttributes, LinkPreviewTriggerPropsWithoutHTML>;
|
|
@@ -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 { ListboxContentStaticProps } from "../types.js";
|
|
4
4
|
import { useListboxContent } from "../listbox.svelte.js";
|
|
5
5
|
import PopperLayer from "../../utilities/popper-layer/popper-layer.svelte";
|
|
6
6
|
import { useId } from "../../../internal/use-id.js";
|
|
7
|
-
import {
|
|
8
|
-
import { noop } from "../../../internal/callbacks.js";
|
|
7
|
+
import { noop } from "../../../internal/noop.js";
|
|
9
8
|
|
|
10
9
|
let {
|
|
11
10
|
id = useId(),
|
|
@@ -62,7 +61,7 @@
|
|
|
62
61
|
{@render child({ props: finalProps, ...contentState.snippetProps })}
|
|
63
62
|
{:else}
|
|
64
63
|
<div {...finalProps}>
|
|
65
|
-
{@render children?.(
|
|
64
|
+
{@render children?.()}
|
|
66
65
|
</div>
|
|
67
66
|
{/if}
|
|
68
67
|
{/snippet}
|
|
@@ -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 { ListboxContentProps } from "../types.js";
|
|
4
4
|
import { useListboxContent } from "../listbox.svelte.js";
|
|
5
5
|
import PopperLayer from "../../utilities/popper-layer/popper-layer.svelte";
|
|
6
6
|
import { useId } from "../../../internal/use-id.js";
|
|
7
|
-
import {
|
|
8
|
-
import { noop } from "../../../internal/callbacks.js";
|
|
7
|
+
import { noop } from "../../../internal/noop.js";
|
|
9
8
|
|
|
10
9
|
let {
|
|
11
10
|
id = useId(),
|
|
@@ -70,7 +69,7 @@
|
|
|
70
69
|
{@render child({ props: finalProps, ...contentState.snippetProps })}
|
|
71
70
|
{:else}
|
|
72
71
|
<div {...finalProps}>
|
|
73
|
-
{@render children?.(
|
|
72
|
+
{@render children?.()}
|
|
74
73
|
</div>
|
|
75
74
|
{/if}
|
|
76
75
|
{/snippet}
|
|
@@ -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 { ListboxGroupHeadingProps } from "../types.js";
|
|
4
4
|
import { useListboxGroupHeading } from "../listbox.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(),
|
|
@@ -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 { useListboxGroup } from "../listbox.svelte.js";
|
|
4
4
|
import type { ListboxGroupProps } 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,10 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import { useListboxItem } from "../listbox.svelte.js";
|
|
4
4
|
import type { ListboxItemProps } from "../types.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(),
|
|
@@ -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 { ListboxScrollDownButtonProps } from "../types.js";
|
|
4
4
|
import { useListboxScrollDownButton } from "../listbox.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
import { Mounted } from "../../utilities/index.js";
|
|
8
7
|
|
|
9
8
|
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 { ListboxScrollUpButtonProps } from "../types.js";
|
|
4
4
|
import { useListboxScrollUpButton } from "../listbox.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
import { Mounted } from "../../utilities/index.js";
|
|
8
7
|
|
|
9
8
|
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 { useListboxTrigger } from "../listbox.svelte.js";
|
|
4
4
|
import type { ListboxTriggerProps } from "../types.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
import { FloatingLayer } from "../../utilities/floating-layer/index.js";
|
|
8
7
|
|
|
9
8
|
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 { ListboxViewportProps } from "../types.js";
|
|
4
4
|
import { useListboxViewport } from "../listbox.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(),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useListboxRoot } from "../listbox.svelte.js";
|
|
4
4
|
import type { ListboxRootProps } from "../types.js";
|
|
5
5
|
import ListboxHiddenInput from "./listbox-hidden-input.svelte";
|
|
6
|
-
import { noop } from "../../../internal/
|
|
6
|
+
import { noop } from "../../../internal/noop.js";
|
|
7
7
|
import FloatingLayer from "../../utilities/floating-layer/components/floating-layer.svelte";
|
|
8
8
|
|
|
9
9
|
let {
|
|
@@ -13,6 +13,6 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
13
13
|
}
|
|
14
14
|
declare const Listbox: $$__sveltets_2_IsomorphicComponent<import("../types.js").ListboxRootPropsWithoutHTML, {
|
|
15
15
|
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, "
|
|
16
|
+
}, {}, {}, "value" | "open">;
|
|
17
17
|
type Listbox = InstanceType<typeof Listbox>;
|
|
18
18
|
export default Listbox;
|
|
@@ -87,7 +87,7 @@ declare class ListboxInputState {
|
|
|
87
87
|
readonly disabled: true | undefined;
|
|
88
88
|
readonly "aria-activedescendant": string | undefined;
|
|
89
89
|
readonly "aria-autocomplete": "list";
|
|
90
|
-
readonly "aria-expanded": "
|
|
90
|
+
readonly "aria-expanded": "true" | "false";
|
|
91
91
|
readonly "data-state": "open" | "closed";
|
|
92
92
|
readonly "data-disabled": "" | undefined;
|
|
93
93
|
readonly onkeydown: (e: KeyboardEvent) => Promise<void>;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { Previous } from "runed";
|
|
2
2
|
import { untrack } from "svelte";
|
|
3
|
-
import { styleToString } from "svelte-toolbelt";
|
|
4
|
-
import { afterTick } from "../../internal/after-tick.js";
|
|
3
|
+
import { afterTick, srOnlyStyles, styleToString, useRefById } from "svelte-toolbelt";
|
|
5
4
|
import { backward, forward, next, prev } from "../../internal/arrays.js";
|
|
6
5
|
import { getAriaExpanded, getAriaHidden, getDataDisabled, getDataOpenClosed, getDisabled, getRequired, } from "../../internal/attrs.js";
|
|
7
6
|
import { createContext } from "../../internal/create-context.js";
|
|
8
7
|
import { kbd } from "../../internal/kbd.js";
|
|
9
|
-
import {
|
|
10
|
-
import { noop } from "../../internal/callbacks.js";
|
|
8
|
+
import { noop } from "../../internal/noop.js";
|
|
11
9
|
import { addEventListener } from "../../internal/events.js";
|
|
12
10
|
import { useTypeahead } from "../../internal/use-typeahead.svelte.js";
|
|
13
|
-
import { srOnlyStyles } from "../../internal/style.js";
|
|
14
11
|
// prettier-ignore
|
|
15
12
|
export const INTERACTION_KEYS = [kbd.ARROW_LEFT, kbd.ESCAPE, kbd.ARROW_RIGHT, kbd.SHIFT, kbd.CAPS_LOCK, kbd.CONTROL, kbd.ALT, kbd.META, kbd.ENTER, kbd.F1, kbd.F2, kbd.F3, kbd.F4, kbd.F5, kbd.F6, kbd.F7, kbd.F8, kbd.F9, kbd.F10, kbd.F11, kbd.F12];
|
|
16
13
|
export const FIRST_KEYS = [kbd.ARROW_DOWN, kbd.PAGE_UP, kbd.HOME];
|
|
@@ -523,7 +520,7 @@ class ListboxContentState {
|
|
|
523
520
|
onRefChange: (node) => {
|
|
524
521
|
this.root.contentNode = node;
|
|
525
522
|
},
|
|
526
|
-
|
|
523
|
+
deps: () => this.root.open.current,
|
|
527
524
|
});
|
|
528
525
|
$effect(() => {
|
|
529
526
|
return () => {
|
|
@@ -732,7 +729,7 @@ class ListboxViewportState {
|
|
|
732
729
|
onRefChange: (node) => {
|
|
733
730
|
this.content.viewportNode = node;
|
|
734
731
|
},
|
|
735
|
-
|
|
732
|
+
deps: () => this.root.open.current,
|
|
736
733
|
});
|
|
737
734
|
}
|
|
738
735
|
props = $derived.by(() => ({
|
|
@@ -766,7 +763,7 @@ class ListboxScrollButtonImplState {
|
|
|
766
763
|
useRefById({
|
|
767
764
|
id: this.id,
|
|
768
765
|
ref: this.ref,
|
|
769
|
-
|
|
766
|
+
deps: () => this.mounted.current,
|
|
770
767
|
});
|
|
771
768
|
$effect(() => {
|
|
772
769
|
if (!this.mounted.current)
|
|
@@ -2,8 +2,8 @@ import type { Expand } from "svelte-toolbelt";
|
|
|
2
2
|
import type { PortalProps } from "../utilities/portal/types.js";
|
|
3
3
|
import type { PopperLayerProps, PopperLayerStaticProps } from "../utilities/popper-layer/types.js";
|
|
4
4
|
import type { ArrowProps, ArrowPropsWithoutHTML } from "../utilities/arrow/types.js";
|
|
5
|
-
import type {
|
|
6
|
-
import type { OnChangeFn, WithChild, WithChildren, Without } from "../../internal/types.js";
|
|
5
|
+
import type { BitsPrimitiveButtonAttributes, BitsPrimitiveDivAttributes } from "../../shared/attributes.js";
|
|
6
|
+
import type { OnChangeFn, WithChild, WithChildNoChildrenSnippetProps, WithChildren, Without } from "../../internal/types.js";
|
|
7
7
|
export type ListboxBaseRootPropsWithoutHTML = WithChildren<{
|
|
8
8
|
/**
|
|
9
9
|
* Whether the combobox is disabled.
|
|
@@ -98,8 +98,8 @@ export type ListboxMultipleRootPropsWithoutHTML = {
|
|
|
98
98
|
*/
|
|
99
99
|
type: "multiple";
|
|
100
100
|
};
|
|
101
|
-
export type ListboxSingleRootProps = ListboxBaseRootPropsWithoutHTML & ListboxSingleRootPropsWithoutHTML & Without<
|
|
102
|
-
export type ListboxMultipleRootProps = ListboxBaseRootPropsWithoutHTML & ListboxMultipleRootPropsWithoutHTML & Without<
|
|
101
|
+
export type ListboxSingleRootProps = ListboxBaseRootPropsWithoutHTML & ListboxSingleRootPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ListboxSingleRootPropsWithoutHTML | ListboxBaseRootPropsWithoutHTML>;
|
|
102
|
+
export type ListboxMultipleRootProps = ListboxBaseRootPropsWithoutHTML & ListboxMultipleRootPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ListboxMultipleRootPropsWithoutHTML | ListboxBaseRootPropsWithoutHTML>;
|
|
103
103
|
export type ListboxRootPropsWithoutHTML = ListboxBaseRootPropsWithoutHTML & (ListboxSingleRootPropsWithoutHTML | ListboxMultipleRootPropsWithoutHTML);
|
|
104
104
|
export type ListboxRootProps = ListboxRootPropsWithoutHTML;
|
|
105
105
|
export type _SharedListboxContentProps = {
|
|
@@ -117,12 +117,12 @@ export type ListboxContentSnippetProps = {
|
|
|
117
117
|
*/
|
|
118
118
|
open: boolean;
|
|
119
119
|
};
|
|
120
|
-
export type ListboxContentPropsWithoutHTML = Expand<
|
|
121
|
-
export type ListboxContentProps = ListboxContentPropsWithoutHTML & Without<
|
|
122
|
-
export type ListboxContentStaticPropsWithoutHTML = Expand<
|
|
123
|
-
export type ListboxContentStaticProps = ListboxContentStaticPropsWithoutHTML & Without<
|
|
120
|
+
export type ListboxContentPropsWithoutHTML = Expand<WithChildNoChildrenSnippetProps<Omit<PopperLayerProps, "content" | "onOpenAutoFocus" | "trapFocus"> & _SharedListboxContentProps, ListboxContentSnippetProps>>;
|
|
121
|
+
export type ListboxContentProps = ListboxContentPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ListboxContentPropsWithoutHTML>;
|
|
122
|
+
export type ListboxContentStaticPropsWithoutHTML = Expand<WithChildNoChildrenSnippetProps<Omit<PopperLayerStaticProps, "content" | "onOpenAutoFocus" | "trapFocus"> & _SharedListboxContentProps, ListboxContentSnippetProps>>;
|
|
123
|
+
export type ListboxContentStaticProps = ListboxContentStaticPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ListboxContentStaticPropsWithoutHTML>;
|
|
124
124
|
export type ListboxTriggerPropsWithoutHTML = WithChild;
|
|
125
|
-
export type ListboxTriggerProps = ListboxTriggerPropsWithoutHTML & Without<
|
|
125
|
+
export type ListboxTriggerProps = ListboxTriggerPropsWithoutHTML & Without<BitsPrimitiveButtonAttributes, ListboxTriggerPropsWithoutHTML>;
|
|
126
126
|
export type ListboxItemSnippetProps = {
|
|
127
127
|
selected: boolean;
|
|
128
128
|
highlighted: boolean;
|
|
@@ -158,20 +158,20 @@ export type ListboxItemPropsWithoutHTML = WithChild<{
|
|
|
158
158
|
*/
|
|
159
159
|
onUnhighlight?: () => void;
|
|
160
160
|
}, ListboxItemSnippetProps>;
|
|
161
|
-
export type ListboxItemProps = ListboxItemPropsWithoutHTML & Without<
|
|
161
|
+
export type ListboxItemProps = ListboxItemPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ListboxItemPropsWithoutHTML>;
|
|
162
162
|
export type ListboxGroupPropsWithoutHTML = WithChild;
|
|
163
|
-
export type ListboxGroupProps = ListboxGroupPropsWithoutHTML & Without<
|
|
163
|
+
export type ListboxGroupProps = ListboxGroupPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ListboxGroupPropsWithoutHTML>;
|
|
164
164
|
export type ListboxGroupHeadingPropsWithoutHTML = WithChild;
|
|
165
|
-
export type ListboxGroupHeadingProps = ListboxGroupHeadingPropsWithoutHTML & Without<
|
|
165
|
+
export type ListboxGroupHeadingProps = ListboxGroupHeadingPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ListboxGroupHeadingPropsWithoutHTML>;
|
|
166
166
|
export type ListboxSeparatorPropsWithoutHTML = WithChild;
|
|
167
|
-
export type ListboxSeparatorProps = ListboxSeparatorPropsWithoutHTML & Without<
|
|
167
|
+
export type ListboxSeparatorProps = ListboxSeparatorPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ListboxSeparatorPropsWithoutHTML>;
|
|
168
168
|
export type ListboxPortalPropsWithoutHTML = PortalProps;
|
|
169
169
|
export type ListboxPortalProps = ListboxPortalPropsWithoutHTML;
|
|
170
170
|
export type ListboxArrowPropsWithoutHTML = ArrowPropsWithoutHTML;
|
|
171
171
|
export type ListboxArrowProps = ArrowProps;
|
|
172
172
|
export type ListboxViewportPropsWithoutHTML = WithChild;
|
|
173
|
-
export type ListboxViewportProps = ListboxViewportPropsWithoutHTML & Without<
|
|
173
|
+
export type ListboxViewportProps = ListboxViewportPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ListboxViewportPropsWithoutHTML>;
|
|
174
174
|
export type ListboxScrollUpButtonPropsWithoutHTML = WithChild;
|
|
175
|
-
export type ListboxScrollUpButtonProps = ListboxScrollUpButtonPropsWithoutHTML & Without<
|
|
175
|
+
export type ListboxScrollUpButtonProps = ListboxScrollUpButtonPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ListboxScrollUpButtonPropsWithoutHTML>;
|
|
176
176
|
export type ListboxScrollDownButtonPropsWithoutHTML = WithChild;
|
|
177
|
-
export type ListboxScrollDownButtonProps = ListboxScrollDownButtonPropsWithoutHTML & Without<
|
|
177
|
+
export type ListboxScrollDownButtonProps = ListboxScrollDownButtonPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ListboxScrollDownButtonPropsWithoutHTML>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { mergeProps } from "svelte-toolbelt";
|
|
2
3
|
import type { MenuArrowProps } from "../types.js";
|
|
3
4
|
import { useMenuArrow } from "../menu.svelte.js";
|
|
4
5
|
import FloatingLayerArrow from "../../utilities/floating-layer/components/floating-layer-arrow.svelte";
|
|
5
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
6
|
|
|
7
7
|
let { ref = $bindable(null), ...restProps }: MenuArrowProps = $props();
|
|
8
8
|
|
|
@@ -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 { MenuCheckboxItemProps } from "../types.js";
|
|
4
4
|
import { useMenuCheckboxItem } from "../menu.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
|
child,
|