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,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 { ToggleRootProps } from "../types.js";
|
|
4
4
|
import { useToggleRoot } from "../toggle.svelte.js";
|
|
5
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
5
|
import { useId } from "../../../internal/use-id.js";
|
|
7
|
-
import { noop } from "../../../internal/
|
|
6
|
+
import { noop } from "../../../internal/noop.js";
|
|
8
7
|
|
|
9
8
|
let {
|
|
10
9
|
ref = $bindable(null),
|
|
@@ -12,7 +12,7 @@ declare class ToggleRootState {
|
|
|
12
12
|
props: {
|
|
13
13
|
readonly "data-toggle-root": "";
|
|
14
14
|
readonly "data-disabled": "" | undefined;
|
|
15
|
-
readonly "aria-pressed": "
|
|
15
|
+
readonly "aria-pressed": "true" | "false";
|
|
16
16
|
readonly "data-state": "on" | "off";
|
|
17
17
|
readonly disabled: true | undefined;
|
|
18
18
|
readonly onclick: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { useRefById } from "svelte-toolbelt";
|
|
1
2
|
import { getAriaPressed, getDataDisabled, getDisabled } from "../../internal/attrs.js";
|
|
2
3
|
import { kbd } from "../../internal/kbd.js";
|
|
3
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
4
4
|
const ROOT_ATTR = "data-toggle-root";
|
|
5
5
|
class ToggleRootState {
|
|
6
6
|
#id;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OnChangeFn, WithChild, Without } from "../../internal/types.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { BitsPrimitiveButtonAttributes } from "../../shared/attributes.js";
|
|
3
3
|
export type ToggleRootSnippetProps = {
|
|
4
4
|
pressed: boolean;
|
|
5
5
|
};
|
|
@@ -30,4 +30,4 @@ export type ToggleRootPropsWithoutHTML = WithChild<{
|
|
|
30
30
|
*/
|
|
31
31
|
controlledPressed?: boolean;
|
|
32
32
|
}, ToggleRootSnippetProps>;
|
|
33
|
-
export type ToggleRootProps = ToggleRootPropsWithoutHTML & Without<
|
|
33
|
+
export type ToggleRootProps = ToggleRootPropsWithoutHTML & Without<BitsPrimitiveButtonAttributes, ToggleRootPropsWithoutHTML>;
|
|
@@ -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 { ToggleGroupItemProps } from "../types.js";
|
|
4
4
|
import { useToggleGroupItem } from "../toggle-group.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,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { type WritableBox, box } from "svelte-toolbelt";
|
|
3
|
+
import { mergeProps } from "svelte-toolbelt";
|
|
3
4
|
import type { ToggleGroupRootProps } from "../types.js";
|
|
4
5
|
import { useToggleGroupRoot } from "../toggle-group.svelte.js";
|
|
5
6
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import {
|
|
7
|
-
import { noop } from "../../../internal/callbacks.js";
|
|
7
|
+
import { noop } from "../../../internal/noop.js";
|
|
8
8
|
|
|
9
9
|
let {
|
|
10
10
|
id = useId(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type WritableBox } from "svelte-toolbelt";
|
|
2
2
|
import type { ReadableBoxedValues, WritableBoxedValues } from "../../internal/box.svelte.js";
|
|
3
3
|
import type { Orientation } from "../../shared/index.js";
|
|
4
4
|
import { type UseRovingFocusReturn } from "../../internal/use-roving-focus.svelte.js";
|
|
@@ -68,8 +68,8 @@ declare class ToggleGroupItemState {
|
|
|
68
68
|
readonly "data-disabled": "" | undefined;
|
|
69
69
|
readonly "data-state": "on" | "off";
|
|
70
70
|
readonly "data-value": string;
|
|
71
|
-
readonly "aria-pressed": "
|
|
72
|
-
readonly "aria-checked": "
|
|
71
|
+
readonly "aria-pressed": "true" | "false" | undefined;
|
|
72
|
+
readonly "aria-checked": "true" | "false" | "mixed" | undefined;
|
|
73
73
|
readonly disabled: true | undefined;
|
|
74
74
|
readonly "data-toggle-group-item": "";
|
|
75
75
|
readonly onclick: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { useRefById } from "svelte-toolbelt";
|
|
1
2
|
import { getAriaChecked, getAriaPressed, getDataDisabled, getDataOrientation, getDisabled, } from "../../internal/attrs.js";
|
|
2
3
|
import { kbd } from "../../internal/kbd.js";
|
|
3
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
4
4
|
import { useRovingFocus, } from "../../internal/use-roving-focus.svelte.js";
|
|
5
5
|
import { createContext } from "../../internal/create-context.js";
|
|
6
6
|
const ROOT_ATTR = "data-toggle-group-root";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { OnChangeFn, WithChild, Without } from "../../internal/types.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { BitsPrimitiveButtonAttributes, BitsPrimitiveDivAttributes } from "../../shared/attributes.js";
|
|
3
3
|
import type { Orientation } from "../../index.js";
|
|
4
4
|
export type BaseToggleGroupRootProps = {
|
|
5
5
|
/**
|
|
@@ -42,15 +42,15 @@ export type SingleToggleGroupRootPropsWithoutHTML = WithChild<BaseToggleGroupRoo
|
|
|
42
42
|
value?: string;
|
|
43
43
|
onValueChange?: OnChangeFn<string>;
|
|
44
44
|
}>;
|
|
45
|
-
export type SingleToggleGroupRootProps = SingleToggleGroupRootPropsWithoutHTML & Without<
|
|
45
|
+
export type SingleToggleGroupRootProps = SingleToggleGroupRootPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, SingleToggleGroupRootPropsWithoutHTML>;
|
|
46
46
|
export type MultipleToggleGroupRootPropsWithoutHTML = WithChild<BaseToggleGroupRootProps> & {
|
|
47
47
|
type: "multiple";
|
|
48
48
|
value?: string[];
|
|
49
49
|
onValueChange?: OnChangeFn<string[]>;
|
|
50
50
|
};
|
|
51
|
-
export type MultipleToggleGroupRootProps = MultipleToggleGroupRootPropsWithoutHTML & Without<
|
|
51
|
+
export type MultipleToggleGroupRootProps = MultipleToggleGroupRootPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MultipleToggleGroupRootPropsWithoutHTML>;
|
|
52
52
|
export type ToggleGroupRootPropsWithoutHTML = SingleToggleGroupRootPropsWithoutHTML | MultipleToggleGroupRootPropsWithoutHTML;
|
|
53
|
-
export type ToggleGroupRootProps = ToggleGroupRootPropsWithoutHTML & Without<
|
|
53
|
+
export type ToggleGroupRootProps = ToggleGroupRootPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ToggleGroupRootPropsWithoutHTML>;
|
|
54
54
|
export type ToggleGroupItemSnippetProps = {
|
|
55
55
|
pressed: boolean;
|
|
56
56
|
};
|
|
@@ -66,4 +66,4 @@ export type ToggleGroupItemPropsWithoutHTML = WithChild<{
|
|
|
66
66
|
*/
|
|
67
67
|
value: string;
|
|
68
68
|
}, ToggleGroupItemSnippetProps>;
|
|
69
|
-
export type ToggleGroupItemProps = ToggleGroupItemPropsWithoutHTML & Without<
|
|
69
|
+
export type ToggleGroupItemProps = ToggleGroupItemPropsWithoutHTML & Without<BitsPrimitiveButtonAttributes, ToggleGroupItemPropsWithoutHTML>;
|
|
@@ -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 { ToolbarButtonProps } from "../types.js";
|
|
4
4
|
import { useToolbarButton } from "../toolbar.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
|
child,
|
|
@@ -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 { ToolbarGroupItemProps } from "../types.js";
|
|
4
4
|
import { useToolbarGroupItem } from "../toolbar.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
|
child,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { type WritableBox, box } from "svelte-toolbelt";
|
|
3
|
+
import { mergeProps } from "svelte-toolbelt";
|
|
3
4
|
import type { ToolbarGroupProps } from "../types.js";
|
|
4
5
|
import { useToolbarGroup } from "../toolbar.svelte.js";
|
|
5
6
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import {
|
|
7
|
-
import { noop } from "../../../internal/callbacks.js";
|
|
7
|
+
import { noop } from "../../../internal/noop.js";
|
|
8
8
|
|
|
9
9
|
let {
|
|
10
10
|
id = useId(),
|
|
@@ -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 { useToolbarLink } from "../toolbar.svelte.js";
|
|
4
4
|
import type { ToolbarLinkProps } from "../types.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 { ToolbarRootProps } from "../types.js";
|
|
4
4
|
import { useToolbarRoot } from "../toolbar.svelte.js";
|
|
5
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
5
|
import { useId } from "../../../internal/use-id.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
@@ -77,8 +77,8 @@ declare class ToolbarGroupItemState {
|
|
|
77
77
|
readonly "data-disabled": "" | undefined;
|
|
78
78
|
readonly "data-state": "on" | "off";
|
|
79
79
|
readonly "data-value": string;
|
|
80
|
-
readonly "aria-pressed": "
|
|
81
|
-
readonly "aria-checked": "
|
|
80
|
+
readonly "aria-pressed": "true" | "false" | undefined;
|
|
81
|
+
readonly "aria-checked": "true" | "false" | "mixed" | undefined;
|
|
82
82
|
readonly "data-toolbar-item": "";
|
|
83
83
|
readonly "data-toolbar-group-item": "";
|
|
84
84
|
readonly disabled: true | undefined;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useRefById } from "svelte-toolbelt";
|
|
2
2
|
import { getAriaChecked, getAriaPressed, getDataDisabled, getDataOrientation, getDisabled, } from "../../internal/attrs.js";
|
|
3
3
|
import { kbd } from "../../internal/kbd.js";
|
|
4
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
5
4
|
import { useRovingFocus, } from "../../internal/use-roving-focus.svelte.js";
|
|
6
5
|
import { createContext } from "../../internal/create-context.js";
|
|
7
6
|
const ROOT_ATTR = "data-toolbar-root";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ToggleGroupItemProps, ToggleGroupItemPropsWithoutHTML, ToggleGroupRootPropsWithoutHTML } from "../toggle-group/types.js";
|
|
2
2
|
import type { Orientation } from "../../shared/index.js";
|
|
3
3
|
import type { WithChild, Without } from "../../internal/types.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { BitsPrimitiveAnchorAttributes, BitsPrimitiveButtonAttributes, BitsPrimitiveDivAttributes } from "../../shared/attributes.js";
|
|
5
5
|
export type ToolbarRootPropsWithoutHTML = WithChild<{
|
|
6
6
|
/**
|
|
7
7
|
* The orientation of the toolbar. This determines how keyboard navigation
|
|
@@ -18,9 +18,9 @@ export type ToolbarRootPropsWithoutHTML = WithChild<{
|
|
|
18
18
|
*/
|
|
19
19
|
loop?: boolean;
|
|
20
20
|
}>;
|
|
21
|
-
export type ToolbarRootProps = ToolbarRootPropsWithoutHTML & Without<
|
|
21
|
+
export type ToolbarRootProps = ToolbarRootPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ToolbarRootPropsWithoutHTML>;
|
|
22
22
|
export type ToolbarGroupPropsWithoutHTML = Omit<ToggleGroupRootPropsWithoutHTML, "orientation" | "loop" | "rovingFocus">;
|
|
23
|
-
export type ToolbarGroupProps = ToolbarGroupPropsWithoutHTML & Without<
|
|
23
|
+
export type ToolbarGroupProps = ToolbarGroupPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, ToolbarGroupPropsWithoutHTML>;
|
|
24
24
|
export type ToolbarGroupItemPropsWithoutHTML = ToggleGroupItemPropsWithoutHTML;
|
|
25
25
|
export type ToolbarGroupItemProps = ToggleGroupItemProps;
|
|
26
26
|
export type ToolbarButtonPropsWithoutHTML = WithChild<{
|
|
@@ -29,6 +29,6 @@ export type ToolbarButtonPropsWithoutHTML = WithChild<{
|
|
|
29
29
|
*/
|
|
30
30
|
disabled?: boolean | null | undefined;
|
|
31
31
|
}>;
|
|
32
|
-
export type ToolbarButtonProps = ToolbarButtonPropsWithoutHTML & Without<
|
|
32
|
+
export type ToolbarButtonProps = ToolbarButtonPropsWithoutHTML & Without<BitsPrimitiveButtonAttributes, ToolbarButtonPropsWithoutHTML>;
|
|
33
33
|
export type ToolbarLinkPropsWithoutHTML = WithChild;
|
|
34
|
-
export type ToolbarLinkProps = ToolbarLinkPropsWithoutHTML & Without<
|
|
34
|
+
export type ToolbarLinkProps = ToolbarLinkPropsWithoutHTML & Without<BitsPrimitiveAnchorAttributes, ToolbarLinkPropsWithoutHTML>;
|
|
@@ -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 { TooltipContentStaticProps } from "../types.js";
|
|
4
4
|
import { useTooltipContent } from "../tooltip.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 {
|
|
@@ -55,7 +54,7 @@
|
|
|
55
54
|
{@render child({ props: mergedProps, ...contentState.snippetProps })}
|
|
56
55
|
{:else}
|
|
57
56
|
<div {...mergedProps}>
|
|
58
|
-
{@render children?.(
|
|
57
|
+
{@render children?.()}
|
|
59
58
|
</div>
|
|
60
59
|
{/if}
|
|
61
60
|
{/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 { TooltipContentProps } from "../types.js";
|
|
4
4
|
import { useTooltipContent } from "../tooltip.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 { TooltipTriggerProps } from "../types.js";
|
|
4
4
|
import { useTooltipTrigger } from "../tooltip.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 {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import type { TooltipRootProps } from "../types.js";
|
|
4
4
|
import { useTooltipRoot } from "../tooltip.svelte.js";
|
|
5
5
|
import FloatingLayer from "../../utilities/floating-layer/components/floating-layer.svelte";
|
|
6
|
-
import { noop } from "../../../internal/
|
|
6
|
+
import { noop } from "../../../internal/noop.js";
|
|
7
7
|
|
|
8
8
|
let {
|
|
9
9
|
open = $bindable(false),
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { box } from "svelte-toolbelt";
|
|
1
|
+
import { box, useRefById } from "svelte-toolbelt";
|
|
2
2
|
import { useEventListener } from "runed";
|
|
3
3
|
import { untrack } from "svelte";
|
|
4
4
|
import { TOOLTIP_OPEN_EVENT } from "./utils.js";
|
|
5
5
|
import { useTimeoutFn } from "../../internal/use-timeout-fn.svelte.js";
|
|
6
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
7
6
|
import { isElement, isFocusVisible } from "../../internal/is.js";
|
|
8
7
|
import { useGraceArea } from "../../internal/use-grace-area.svelte.js";
|
|
9
8
|
import { createContext } from "../../internal/create-context.js";
|
|
@@ -231,7 +230,7 @@ class TooltipContentState {
|
|
|
231
230
|
onRefChange: (node) => {
|
|
232
231
|
this.root.contentNode = node;
|
|
233
232
|
},
|
|
234
|
-
|
|
233
|
+
deps: () => this.root.open.current,
|
|
235
234
|
});
|
|
236
235
|
$effect(() => {
|
|
237
236
|
if (!this.root.open.current)
|
|
@@ -2,8 +2,8 @@ import type { FloatingLayerContentProps } from "../utilities/floating-layer/type
|
|
|
2
2
|
import type { ArrowProps, ArrowPropsWithoutHTML } from "../utilities/arrow/types.js";
|
|
3
3
|
import type { DismissibleLayerProps } from "../utilities/dismissible-layer/types.js";
|
|
4
4
|
import type { EscapeLayerProps } from "../utilities/escape-layer/types.js";
|
|
5
|
-
import type { OnChangeFn, WithChild, WithChildren, Without } from "../../internal/types.js";
|
|
6
|
-
import type {
|
|
5
|
+
import type { OnChangeFn, WithChild, WithChildNoChildrenSnippetProps, WithChildren, Without } from "../../internal/types.js";
|
|
6
|
+
import type { BitsPrimitiveButtonAttributes, BitsPrimitiveDivAttributes } from "../../shared/attributes.js";
|
|
7
7
|
import type { PortalProps } from "../utilities/portal/types.js";
|
|
8
8
|
export type TooltipProviderPropsWithoutHTML = WithChildren<{
|
|
9
9
|
/**
|
|
@@ -104,7 +104,7 @@ export type TooltipContentSnippetProps = {
|
|
|
104
104
|
*/
|
|
105
105
|
open: boolean;
|
|
106
106
|
};
|
|
107
|
-
export type TooltipContentPropsWithoutHTML =
|
|
107
|
+
export type TooltipContentPropsWithoutHTML = WithChildNoChildrenSnippetProps<Pick<FloatingLayerContentProps, "side" | "sideOffset" | "align" | "alignOffset" | "avoidCollisions" | "collisionBoundary" | "collisionPadding" | "arrowPadding" | "sticky" | "hideWhenDetached" | "dir"> & Omit<DismissibleLayerProps, "onInteractOutsideStart"> & EscapeLayerProps & {
|
|
108
108
|
/**
|
|
109
109
|
* When `true`, the tooltip will be forced to mount in the DOM.
|
|
110
110
|
*
|
|
@@ -112,8 +112,8 @@ export type TooltipContentPropsWithoutHTML = WithChild<Pick<FloatingLayerContent
|
|
|
112
112
|
*/
|
|
113
113
|
forceMount?: boolean;
|
|
114
114
|
}, TooltipContentSnippetProps>;
|
|
115
|
-
export type TooltipContentProps = TooltipContentPropsWithoutHTML & Without<
|
|
116
|
-
export type TooltipContentStaticPropsWithoutHTML =
|
|
115
|
+
export type TooltipContentProps = TooltipContentPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, TooltipContentPropsWithoutHTML>;
|
|
116
|
+
export type TooltipContentStaticPropsWithoutHTML = WithChildNoChildrenSnippetProps<Pick<FloatingLayerContentProps, "dir"> & Omit<DismissibleLayerProps, "onInteractOutsideStart"> & EscapeLayerProps & {
|
|
117
117
|
/**
|
|
118
118
|
* When `true`, the tooltip will be forced to mount in the DOM.
|
|
119
119
|
*
|
|
@@ -121,7 +121,7 @@ export type TooltipContentStaticPropsWithoutHTML = WithChild<Pick<FloatingLayerC
|
|
|
121
121
|
*/
|
|
122
122
|
forceMount?: boolean;
|
|
123
123
|
}, TooltipContentSnippetProps>;
|
|
124
|
-
export type TooltipContentStaticProps = TooltipContentStaticPropsWithoutHTML & Without<
|
|
124
|
+
export type TooltipContentStaticProps = TooltipContentStaticPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, TooltipContentStaticPropsWithoutHTML>;
|
|
125
125
|
export type TooltipArrowPropsWithoutHTML = ArrowPropsWithoutHTML;
|
|
126
126
|
export type TooltipArrowProps = ArrowProps;
|
|
127
127
|
export type TooltipPortalPropsWithoutHTML = PortalProps;
|
|
@@ -134,4 +134,4 @@ export type TooltipTriggerPropsWithoutHTML = WithChild<{
|
|
|
134
134
|
*/
|
|
135
135
|
disabled?: boolean | null | undefined;
|
|
136
136
|
}>;
|
|
137
|
-
export type TooltipTriggerProps = TooltipTriggerPropsWithoutHTML & Without<
|
|
137
|
+
export type TooltipTriggerProps = TooltipTriggerPropsWithoutHTML & Without<BitsPrimitiveButtonAttributes, TooltipTriggerPropsWithoutHTML>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WithChild } from "../../../internal/types.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { BitsPrimitiveSpanAttributes } from "../../../shared/attributes.js";
|
|
3
3
|
export type ArrowPropsWithoutHTML = WithChild<{
|
|
4
4
|
/**
|
|
5
5
|
* The width of the arrow in pixels.
|
|
@@ -14,4 +14,4 @@ export type ArrowPropsWithoutHTML = WithChild<{
|
|
|
14
14
|
*/
|
|
15
15
|
height?: number;
|
|
16
16
|
}>;
|
|
17
|
-
export type ArrowProps = ArrowPropsWithoutHTML &
|
|
17
|
+
export type ArrowProps = ArrowPropsWithoutHTML & BitsPrimitiveSpanAttributes;
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import { untrack } from "svelte";
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
3
|
-
import { composeHandlers } from "../../../internal/compose-handlers.js";
|
|
2
|
+
import { afterTick, box, composeHandlers, executeCallbacks, onDestroyEffect, useRefById, } from "svelte-toolbelt";
|
|
4
3
|
import { addEventListener } from "../../../internal/events.js";
|
|
5
|
-
import { afterTick } from "../../../internal/after-tick.js";
|
|
6
4
|
import { debounce } from "../../../internal/debounce.js";
|
|
7
|
-
import { executeCallbacks } from "../../../internal/execute-callbacks.js";
|
|
8
5
|
import { noop } from "../../../internal/noop.js";
|
|
9
|
-
import { useRefById } from "../../../internal/use-ref-by-id.svelte.js";
|
|
10
6
|
import { getOwnerDocument, isOrContainsTarget } from "../../../internal/elements.js";
|
|
11
7
|
import { isElement } from "../../../internal/is.js";
|
|
12
|
-
import { onDestroyEffect } from "../../../internal/on-destroy-effect.svelte.js";
|
|
13
8
|
const layers = new Map();
|
|
14
9
|
const interactOutsideStartEvents = [
|
|
15
10
|
"pointerdown",
|
|
@@ -48,7 +43,7 @@ export class DismissibleLayerState {
|
|
|
48
43
|
useRefById({
|
|
49
44
|
id: props.id,
|
|
50
45
|
ref: this.node,
|
|
51
|
-
|
|
46
|
+
deps: () => this.#enabled.current,
|
|
52
47
|
onRefChange: (node) => {
|
|
53
48
|
this.currNode = node;
|
|
54
49
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { untrack } from "svelte";
|
|
2
2
|
import { addEventListener } from "../../../internal/events.js";
|
|
3
3
|
import { kbd } from "../../../internal/kbd.js";
|
|
4
|
-
import { noop } from "../../../internal/
|
|
4
|
+
import { noop } from "../../../internal/noop.js";
|
|
5
5
|
const layers = new Map();
|
|
6
6
|
export class EscapeLayerState {
|
|
7
7
|
#onEscapeProp;
|
|
@@ -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 { useFloatingArrowState } from "../useFloatingLayer.svelte.js";
|
|
4
4
|
import { Arrow, type ArrowProps } from "../../arrow/index.js";
|
|
5
|
-
import { mergeProps } from "../../../../internal/merge-props.js";
|
|
6
5
|
import { useId } from "../../../../internal/use-id.js";
|
|
7
6
|
|
|
8
7
|
let { id = useId(), ref = $bindable(null), ...restProps }: ArrowProps = $props();
|
|
@@ -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 { useFloatingContentState } from "../useFloatingLayer.svelte.js";
|
|
4
4
|
import type { ContentImplProps } from "./index.js";
|
|
5
|
-
import { mergeProps } from "../../../../internal/merge-props.js";
|
|
6
5
|
import { useId } from "../../../../internal/use-id.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
@@ -49,19 +49,19 @@ declare class FloatingContentState {
|
|
|
49
49
|
enabled: FloatingContentStateProps["enabled"];
|
|
50
50
|
hasExplicitBoundaries: boolean;
|
|
51
51
|
detectOverflowOptions: {
|
|
52
|
-
padding: number | Partial<Record<"
|
|
52
|
+
padding: number | Partial<Record<"top" | "right" | "bottom" | "left", number>>;
|
|
53
53
|
boundary: Element[];
|
|
54
54
|
altBoundary: boolean;
|
|
55
55
|
};
|
|
56
56
|
middleware: Middleware[];
|
|
57
57
|
floating: UseFloatingReturn;
|
|
58
|
-
placedSide: "
|
|
59
|
-
placedAlign: "
|
|
58
|
+
placedSide: "top" | "right" | "bottom" | "left";
|
|
59
|
+
placedAlign: "end" | "center" | "start";
|
|
60
60
|
arrowX: number;
|
|
61
61
|
arrowY: number;
|
|
62
62
|
cannotCenterArrow: boolean;
|
|
63
63
|
contentZIndex: string | undefined;
|
|
64
|
-
arrowBaseSide: "
|
|
64
|
+
arrowBaseSide: "top" | "right" | "bottom" | "left";
|
|
65
65
|
wrapperProps: {
|
|
66
66
|
readonly id: string;
|
|
67
67
|
readonly "data-bits-floating-content-wrapper": "";
|
|
@@ -340,7 +340,7 @@ declare class FloatingContentState {
|
|
|
340
340
|
readonly perspective?: import("csstype").Property.Perspective<0 | (string & {})> | undefined;
|
|
341
341
|
readonly perspectiveOrigin?: import("csstype").Property.PerspectiveOrigin<0 | (string & {})> | undefined;
|
|
342
342
|
readonly pointerEvents?: import("csstype").Property.PointerEvents | undefined;
|
|
343
|
-
position: "absolute" | "
|
|
343
|
+
position: "inherit" | "absolute" | "fixed" | "sticky" | "-moz-initial" | "initial" | "revert" | "revert-layer" | "unset" | "-webkit-sticky" | "relative" | "static";
|
|
344
344
|
readonly printColorAdjust?: import("csstype").Property.PrintColorAdjust | undefined;
|
|
345
345
|
readonly quotes?: import("csstype").Property.Quotes | undefined;
|
|
346
346
|
readonly resize?: import("csstype").Property.Resize | undefined;
|
|
@@ -901,8 +901,8 @@ declare class FloatingContentState {
|
|
|
901
901
|
readonly dir: Direction;
|
|
902
902
|
};
|
|
903
903
|
props: {
|
|
904
|
-
readonly "data-side": "
|
|
905
|
-
readonly "data-align": "
|
|
904
|
+
readonly "data-side": "top" | "right" | "bottom" | "left";
|
|
905
|
+
readonly "data-align": "end" | "center" | "start";
|
|
906
906
|
readonly style: string;
|
|
907
907
|
};
|
|
908
908
|
arrowStyle: {
|
|
@@ -931,7 +931,7 @@ declare class FloatingArrowState {
|
|
|
931
931
|
transform: string;
|
|
932
932
|
visibility: string | undefined;
|
|
933
933
|
};
|
|
934
|
-
readonly "data-side": "
|
|
934
|
+
readonly "data-side": "top" | "right" | "bottom" | "left";
|
|
935
935
|
};
|
|
936
936
|
}
|
|
937
937
|
type FloatingAnchorStateProps = ReadableBoxedValues<{
|
|
@@ -946,6 +946,6 @@ export declare function useFloatingRootState(): FloatingRootState;
|
|
|
946
946
|
export declare function useFloatingContentState(props: FloatingContentStateProps): FloatingContentState;
|
|
947
947
|
export declare function useFloatingArrowState(props: FloatingArrowStateProps): FloatingArrowState;
|
|
948
948
|
export declare function useFloatingAnchorState(props: FloatingAnchorStateProps): FloatingAnchorState;
|
|
949
|
-
export declare function getSideFromPlacement(placement: Placement): "
|
|
950
|
-
export declare function getAlignFromPlacement(placement: Placement): "
|
|
949
|
+
export declare function getSideFromPlacement(placement: Placement): "top" | "right" | "bottom" | "left";
|
|
950
|
+
export declare function getAlignFromPlacement(placement: Placement): "end" | "center" | "start";
|
|
951
951
|
export {};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import { untrack } from "svelte";
|
|
2
2
|
import { arrow, autoUpdate, flip, hide, limitShift, offset, shift, size, } from "@floating-ui/dom";
|
|
3
|
-
import { box } from "svelte-toolbelt";
|
|
3
|
+
import { box, cssToStyleObj, styleToString, useRefById } from "svelte-toolbelt";
|
|
4
4
|
import { ElementSize } from "runed";
|
|
5
|
-
import { useRefById } from "../../../internal/use-ref-by-id.svelte.js";
|
|
6
5
|
import { isNotNull } from "../../../internal/is.js";
|
|
7
|
-
import { styleToString } from "../../../internal/style.js";
|
|
8
6
|
import { useId } from "../../../internal/use-id.js";
|
|
9
7
|
import { useFloating } from "../../../internal/floating-svelte/use-floating.svelte.js";
|
|
10
8
|
import { createContext } from "../../../internal/create-context.js";
|
|
11
|
-
import { cssToStyleObj } from "../../../internal/css-to-style-obj.js";
|
|
12
9
|
export const SIDE_OPTIONS = ["top", "right", "bottom", "left"];
|
|
13
10
|
export const ALIGN_OPTIONS = ["start", "center", "end"];
|
|
14
11
|
const OPPOSITE_SIDE = {
|
|
@@ -212,12 +209,12 @@ class FloatingContentState {
|
|
|
212
209
|
useRefById({
|
|
213
210
|
id: this.wrapperId,
|
|
214
211
|
ref: this.wrapperRef,
|
|
215
|
-
|
|
212
|
+
deps: () => this.enabled.current,
|
|
216
213
|
});
|
|
217
214
|
useRefById({
|
|
218
215
|
id: this.id,
|
|
219
216
|
ref: this.contentRef,
|
|
220
|
-
|
|
217
|
+
deps: () => this.enabled.current,
|
|
221
218
|
});
|
|
222
219
|
this.floating = useFloating({
|
|
223
220
|
strategy: () => this.#strategy.current,
|
|
@@ -264,7 +261,7 @@ class FloatingArrowState {
|
|
|
264
261
|
onRefChange: (node) => {
|
|
265
262
|
this.#content.arrowRef.current = node;
|
|
266
263
|
},
|
|
267
|
-
|
|
264
|
+
deps: () => this.#content.enabled.current,
|
|
268
265
|
});
|
|
269
266
|
}
|
|
270
267
|
props = $derived.by(() => ({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { box } from "svelte-toolbelt";
|
|
3
3
|
import type { FocusScopeImplProps } from "./types.js";
|
|
4
4
|
import { useFocusScope } from "./useFocusScope.svelte.js";
|
|
5
|
-
import { noop } from "../../../internal/
|
|
5
|
+
import { noop } from "../../../internal/noop.js";
|
|
6
6
|
|
|
7
7
|
let {
|
|
8
8
|
id,
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { untrack } from "svelte";
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { afterTick, box, executeCallbacks, useRefById } from "svelte-toolbelt";
|
|
3
3
|
import { createFocusScopeAPI, createFocusScopeStack, removeLinks, } from "./focus-scope-stack.svelte.js";
|
|
4
4
|
import { focus, focusFirst, getTabbableCandidates, getTabbableEdges } from "../../../internal/focus.js";
|
|
5
5
|
import { addEventListener } from "../../../internal/events.js";
|
|
6
|
-
import { useRefById } from "../../../internal/use-ref-by-id.svelte.js";
|
|
7
6
|
import { isHTMLElement } from "../../../internal/is.js";
|
|
8
|
-
import { executeCallbacks } from "../../../internal/callbacks.js";
|
|
9
7
|
import { kbd } from "../../../internal/kbd.js";
|
|
10
|
-
import { afterTick } from "../../../internal/after-tick.js";
|
|
11
8
|
const AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
12
9
|
const AUTOFOCUS_ON_DESTROY = "focusScope.autoFocusOnDestroy";
|
|
13
10
|
const EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
@@ -18,7 +15,7 @@ export function useFocusScope({ id, loop, enabled, onOpenAutoFocus, onCloseAutoF
|
|
|
18
15
|
useRefById({
|
|
19
16
|
id,
|
|
20
17
|
ref,
|
|
21
|
-
|
|
18
|
+
deps: () => enabled.current,
|
|
22
19
|
});
|
|
23
20
|
let lastFocusedElement = $state(null);
|
|
24
21
|
$effect(() => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { mergeProps } from "svelte-toolbelt";
|
|
2
3
|
import ScrollLock from "../scroll-lock/scroll-lock.svelte";
|
|
3
4
|
import type { PopperLayerImplProps } from "./types.js";
|
|
4
5
|
import PopperContent from "./popper-content.svelte";
|
|
@@ -7,7 +8,6 @@
|
|
|
7
8
|
import TextSelectionLayer from "../text-selection-layer/text-selection-layer.svelte";
|
|
8
9
|
import PresenceLayer from "../presence-layer/presence-layer.svelte";
|
|
9
10
|
import FocusScope from "../focus-scope/focus-scope.svelte";
|
|
10
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
11
11
|
|
|
12
12
|
let {
|
|
13
13
|
popper,
|