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 { MenuContentStaticProps } from "../types.js";
|
|
4
4
|
import { useMenuContent } 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
|
import PopperLayer from "../../utilities/popper-layer/popper-layer.svelte";
|
|
9
8
|
import { isElement } from "../../../internal/is.js";
|
|
10
9
|
import type { InteractOutsideEvent } from "../../utilities/dismissible-layer/types.js";
|
|
@@ -80,7 +79,7 @@
|
|
|
80
79
|
{@render child({ props: finalProps, ...contentState.snippetProps })}
|
|
81
80
|
{:else}
|
|
82
81
|
<div {...finalProps}>
|
|
83
|
-
{@render children?.(
|
|
82
|
+
{@render children?.()}
|
|
84
83
|
</div>
|
|
85
84
|
{/if}
|
|
86
85
|
<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 { MenuContentProps } from "../types.js";
|
|
4
4
|
import { useMenuContent } 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
|
import PopperLayer from "../../utilities/popper-layer/popper-layer.svelte";
|
|
9
8
|
import { isElement } from "../../../internal/is.js";
|
|
10
9
|
import type { InteractOutsideEvent } from "../../utilities/dismissible-layer/types.js";
|
|
@@ -81,7 +80,7 @@
|
|
|
81
80
|
{@render child({ props: finalProps, ...contentState.snippetProps })}
|
|
82
81
|
{:else}
|
|
83
82
|
<div {...finalProps}>
|
|
84
|
-
{@render children?.(
|
|
83
|
+
{@render children?.()}
|
|
85
84
|
</div>
|
|
86
85
|
{/if}
|
|
87
86
|
<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 { MenuGroupHeadingProps } from "../types.js";
|
|
4
4
|
import { useMenuGroupHeading } from "../menu.svelte.js";
|
|
5
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
5
|
import { useId } from "../../../internal/use-id.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { MenuGroupProps } from "../types.js";
|
|
4
4
|
import { useMenuGroup } from "../menu.svelte.js";
|
|
5
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
5
|
import { useId } from "../../../internal/use-id.js";
|
|
7
6
|
|
|
8
7
|
let {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { MenuItemProps } from "../types.js";
|
|
4
4
|
import { useMenuItem } from "../menu.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { noop } from "../../../internal/
|
|
7
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
|
+
import { noop } from "../../../internal/noop.js";
|
|
8
7
|
|
|
9
8
|
let {
|
|
10
9
|
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 { MenuRadioGroupProps } from "../types.js";
|
|
4
4
|
import { useMenuRadioGroup } from "../menu.svelte.js";
|
|
5
|
-
import { noop } from "../../../internal/
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
5
|
+
import { noop } from "../../../internal/noop.js";
|
|
7
6
|
import { useId } from "../../../internal/use-id.js";
|
|
8
7
|
|
|
9
8
|
let {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { MenuRadioItemProps } from "../types.js";
|
|
4
4
|
import { useMenuRadioItem } from "../menu.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { noop } from "../../../internal/
|
|
7
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
|
+
import { noop } from "../../../internal/noop.js";
|
|
8
7
|
|
|
9
8
|
let {
|
|
10
9
|
children,
|
|
@@ -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 { MenuSeparatorProps } from "../types.js";
|
|
4
4
|
import { useMenuSeparator } from "../menu.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,14 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { afterTick, box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { MenuSubContentProps } from "../types.js";
|
|
4
4
|
import { useMenuContent } from "../menu.svelte.js";
|
|
5
5
|
import { SUB_CLOSE_KEYS } from "../utils.js";
|
|
6
6
|
import { useId } from "../../../internal/use-id.js";
|
|
7
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
8
7
|
import PopperLayer from "../../utilities/popper-layer/popper-layer.svelte";
|
|
9
|
-
import { noop } from "../../../internal/
|
|
8
|
+
import { noop } from "../../../internal/noop.js";
|
|
10
9
|
import { isHTMLElement } from "../../../internal/is.js";
|
|
11
|
-
import { afterTick } from "../../../internal/after-tick.js";
|
|
12
10
|
import Mounted from "../../utilities/mounted.svelte";
|
|
13
11
|
import { getFloatingContentCSSVars } from "../../../internal/floating-svelte/floating-utils.svelte.js";
|
|
14
12
|
|
|
@@ -126,7 +124,7 @@
|
|
|
126
124
|
{@render child({ props: finalProps, ...subContentState.snippetProps })}
|
|
127
125
|
{:else}
|
|
128
126
|
<div {...finalProps}>
|
|
129
|
-
{@render children?.(
|
|
127
|
+
{@render children?.()}
|
|
130
128
|
</div>
|
|
131
129
|
{/if}
|
|
132
130
|
<Mounted bind:isMounted />
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { afterTick, box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { MenuSubContentProps } from "../types.js";
|
|
4
4
|
import { useMenuContent } from "../menu.svelte.js";
|
|
5
5
|
import { SUB_CLOSE_KEYS } from "../utils.js";
|
|
6
6
|
import { useId } from "../../../internal/use-id.js";
|
|
7
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
8
7
|
import PopperLayer from "../../utilities/popper-layer/popper-layer.svelte";
|
|
9
|
-
import { noop } from "../../../internal/
|
|
8
|
+
import { noop } from "../../../internal/noop.js";
|
|
10
9
|
import { isHTMLElement } from "../../../internal/is.js";
|
|
11
|
-
import { afterTick } from "../../../internal/after-tick.js";
|
|
12
10
|
import Mounted from "../../utilities/mounted.svelte";
|
|
13
11
|
import { getFloatingContentCSSVars } from "../../../internal/floating-svelte/floating-utils.svelte.js";
|
|
14
12
|
|
|
@@ -128,7 +126,7 @@
|
|
|
128
126
|
{@render child({ props: finalProps, ...subContentState.snippetProps })}
|
|
129
127
|
{:else}
|
|
130
128
|
<div {...finalProps}>
|
|
131
|
-
{@render children?.(
|
|
129
|
+
{@render children?.()}
|
|
132
130
|
</div>
|
|
133
131
|
{/if}
|
|
134
132
|
<Mounted bind:isMounted />
|
|
@@ -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 { MenuItemProps } from "../types.js";
|
|
4
4
|
import { useMenuSubTrigger } from "../menu.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
|
let {
|
|
9
8
|
id = useId(),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import type { MenuSubProps } from "../types.js";
|
|
4
4
|
import { useMenuSubmenu } from "../menu.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
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { MenuTriggerProps } from "../types.js";
|
|
4
4
|
import { useMenuDropdownTrigger } from "../menu.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 {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { box } from "svelte-toolbelt";
|
|
3
3
|
import type { MenuRootProps } from "../types.js";
|
|
4
4
|
import { useMenuMenu, useMenuRoot } from "../menu.svelte.js";
|
|
5
|
-
import { noop } from "../../../internal/
|
|
5
|
+
import { noop } from "../../../internal/noop.js";
|
|
6
6
|
import FloatingLayer from "../../utilities/floating-layer/components/floating-layer.svelte";
|
|
7
7
|
|
|
8
8
|
let {
|
|
@@ -100,7 +100,7 @@ declare class MenuItemSharedState {
|
|
|
100
100
|
readonly id: string;
|
|
101
101
|
readonly tabindex: -1;
|
|
102
102
|
readonly role: "menuitem";
|
|
103
|
-
readonly "aria-disabled": "
|
|
103
|
+
readonly "aria-disabled": "true" | "false";
|
|
104
104
|
readonly "data-disabled": "" | undefined;
|
|
105
105
|
readonly "data-highlighted": "" | undefined;
|
|
106
106
|
readonly onpointermove: (e: PointerEvent) => void;
|
|
@@ -121,7 +121,7 @@ declare class MenuItemState {
|
|
|
121
121
|
readonly id: string;
|
|
122
122
|
readonly tabindex: -1;
|
|
123
123
|
readonly role: "menuitem";
|
|
124
|
-
readonly "aria-disabled": "
|
|
124
|
+
readonly "aria-disabled": "true" | "false";
|
|
125
125
|
readonly "data-disabled": "" | undefined;
|
|
126
126
|
readonly "data-highlighted": "" | undefined;
|
|
127
127
|
readonly onpointermove: (e: PointerEvent) => void;
|
|
@@ -145,7 +145,7 @@ declare class MenuSubTriggerState {
|
|
|
145
145
|
readonly id: string;
|
|
146
146
|
readonly tabindex: -1;
|
|
147
147
|
readonly role: "menuitem";
|
|
148
|
-
readonly "aria-disabled": "
|
|
148
|
+
readonly "aria-disabled": "true" | "false";
|
|
149
149
|
readonly "data-disabled": "" | undefined;
|
|
150
150
|
readonly "data-highlighted": "" | undefined;
|
|
151
151
|
readonly onpointermove: (e: PointerEvent) => void;
|
|
@@ -155,7 +155,7 @@ declare class MenuSubTriggerState {
|
|
|
155
155
|
} & {
|
|
156
156
|
[x: string]: string | ((e: PointerEvent) => void) | ((e: KeyboardEvent) => void) | undefined;
|
|
157
157
|
"aria-haspopup": string;
|
|
158
|
-
"aria-expanded": "
|
|
158
|
+
"aria-expanded": "true" | "false";
|
|
159
159
|
"data-state": "open" | "closed";
|
|
160
160
|
"aria-controls": string | undefined;
|
|
161
161
|
onclick: (e: MouseEvent) => void;
|
|
@@ -176,11 +176,11 @@ declare class MenuCheckboxItemState {
|
|
|
176
176
|
props: {
|
|
177
177
|
readonly [x: string]: string | -1 | ((e: PointerEvent) => void) | undefined;
|
|
178
178
|
readonly role: "menuitemcheckbox";
|
|
179
|
-
readonly "aria-checked": "
|
|
179
|
+
readonly "aria-checked": "true" | "false" | "mixed";
|
|
180
180
|
readonly "data-state": "checked" | "indeterminate" | "unchecked";
|
|
181
181
|
readonly id: string;
|
|
182
182
|
readonly tabindex: -1;
|
|
183
|
-
readonly "aria-disabled": "
|
|
183
|
+
readonly "aria-disabled": "true" | "false";
|
|
184
184
|
readonly "data-disabled": "" | undefined;
|
|
185
185
|
readonly "data-highlighted": "" | undefined;
|
|
186
186
|
readonly onpointermove: (e: PointerEvent) => void;
|
|
@@ -268,11 +268,11 @@ declare class MenuRadioItemState {
|
|
|
268
268
|
selectValue: () => void;
|
|
269
269
|
props: {
|
|
270
270
|
readonly role: "menuitemradio";
|
|
271
|
-
readonly "aria-checked": "
|
|
271
|
+
readonly "aria-checked": "true" | "false" | "mixed";
|
|
272
272
|
readonly "data-state": "checked" | "indeterminate" | "unchecked";
|
|
273
273
|
readonly id: string;
|
|
274
274
|
readonly tabindex: -1;
|
|
275
|
-
readonly "aria-disabled": "
|
|
275
|
+
readonly "aria-disabled": "true" | "false";
|
|
276
276
|
readonly "data-disabled": "" | undefined;
|
|
277
277
|
readonly "data-highlighted": "" | undefined;
|
|
278
278
|
readonly onpointermove: (e: PointerEvent) => void;
|
|
@@ -300,7 +300,7 @@ declare class DropdownMenuTriggerState {
|
|
|
300
300
|
readonly id: string;
|
|
301
301
|
readonly disabled: boolean;
|
|
302
302
|
readonly "aria-haspopup": "menu";
|
|
303
|
-
readonly "aria-expanded": "
|
|
303
|
+
readonly "aria-expanded": "true" | "false";
|
|
304
304
|
readonly "aria-controls": string | undefined;
|
|
305
305
|
readonly "data-disabled": "" | undefined;
|
|
306
306
|
readonly "data-state": "open" | "closed";
|
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
import { box } from "svelte-toolbelt";
|
|
1
|
+
import { afterTick, box, executeCallbacks, mergeProps, onDestroyEffect, useRefById, } from "svelte-toolbelt";
|
|
2
2
|
import { tick, untrack } from "svelte";
|
|
3
3
|
import { IsFocusWithin } from "runed";
|
|
4
4
|
import { FIRST_LAST_KEYS, LAST_KEYS, SELECTION_KEYS, SUB_OPEN_KEYS, getCheckedState, isMouseEvent, } from "./utils.js";
|
|
5
5
|
import { focusFirst } from "../../internal/focus.js";
|
|
6
6
|
import { addEventListener } from "../../internal/events.js";
|
|
7
|
-
import { executeCallbacks } from "../../internal/execute-callbacks.js";
|
|
8
7
|
import { useTypeahead } from "../../internal/use-typeahead.svelte.js";
|
|
9
8
|
import { isElement, isElementOrSVGElement, isHTMLElement } from "../../internal/is.js";
|
|
10
9
|
import { useRovingFocus } from "../../internal/use-roving-focus.svelte.js";
|
|
11
10
|
import { kbd } from "../../internal/kbd.js";
|
|
12
11
|
import { getAriaChecked, getAriaDisabled, getAriaExpanded, getAriaOrientation, getDataDisabled, getDataOpenClosed, } from "../../internal/attrs.js";
|
|
13
|
-
import { mergeProps } from "../../internal/merge-props.js";
|
|
14
12
|
import { createContext } from "../../internal/create-context.js";
|
|
15
|
-
import { afterTick } from "../../internal/after-tick.js";
|
|
16
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
17
13
|
import { isPointerInGraceArea, makeHullFromElements } from "../../internal/polygon.js";
|
|
18
|
-
import { onDestroyEffect } from "../../internal/on-destroy-effect.svelte.js";
|
|
19
14
|
export const CONTEXT_MENU_TRIGGER_ATTR = "data-context-menu-trigger";
|
|
20
15
|
const [setMenuRootContext, getMenuRootContext] = createContext("Menu.Root");
|
|
21
16
|
const [setMenuMenuContext, getMenuMenuContext] = createContext(["Menu.Root", "Menu.Sub"], "MenuContext");
|
|
@@ -111,7 +106,7 @@ class MenuContentState {
|
|
|
111
106
|
useRefById({
|
|
112
107
|
id: this.#id,
|
|
113
108
|
ref: this.contentRef,
|
|
114
|
-
|
|
109
|
+
deps: () => this.parentMenu.open.current,
|
|
115
110
|
onRefChange: (node) => {
|
|
116
111
|
if (this.parentMenu.contentNode !== node) {
|
|
117
112
|
this.parentMenu.contentNode = node;
|
|
@@ -281,7 +276,7 @@ class MenuItemSharedState {
|
|
|
281
276
|
useRefById({
|
|
282
277
|
id: this.id,
|
|
283
278
|
ref: this.ref,
|
|
284
|
-
|
|
279
|
+
deps: () => this.content.isMounted.current,
|
|
285
280
|
});
|
|
286
281
|
}
|
|
287
282
|
#onpointermove = (e) => {
|
|
@@ -744,7 +739,7 @@ class ContextMenuTriggerState {
|
|
|
744
739
|
onRefChange: (node) => {
|
|
745
740
|
this.#parentMenu.triggerNode = node;
|
|
746
741
|
},
|
|
747
|
-
|
|
742
|
+
deps: () => this.#parentMenu.open.current,
|
|
748
743
|
});
|
|
749
744
|
$effect(() => {
|
|
750
745
|
this.#point;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Expand } from "svelte-toolbelt";
|
|
2
2
|
import type { PopperLayerProps, PopperLayerStaticProps } from "../utilities/popper-layer/types.js";
|
|
3
3
|
import type { ArrowProps, ArrowPropsWithoutHTML } from "../utilities/arrow/types.js";
|
|
4
|
-
import type { OnChangeFn, WithChild, WithChildren, Without } from "../../internal/types.js";
|
|
5
|
-
import type {
|
|
4
|
+
import type { OnChangeFn, WithChild, WithChildNoChildrenSnippetProps, WithChildren, Without } from "../../internal/types.js";
|
|
5
|
+
import type { BitsPrimitiveButtonAttributes, BitsPrimitiveDivAttributes } from "../../shared/attributes.js";
|
|
6
6
|
import type { Direction } from "../../shared/index.js";
|
|
7
7
|
import type { PortalProps } from "../utilities/portal/types.js";
|
|
8
8
|
export type MenuRootPropsWithoutHTML = WithChildren<{
|
|
@@ -45,10 +45,10 @@ export type MenuContentSnippetProps = {
|
|
|
45
45
|
*/
|
|
46
46
|
open: boolean;
|
|
47
47
|
};
|
|
48
|
-
export type MenuContentPropsWithoutHTML = Expand<
|
|
49
|
-
export type MenuContentProps = MenuContentPropsWithoutHTML & Without<
|
|
50
|
-
export type MenuContentStaticPropsWithoutHTML = Expand<
|
|
51
|
-
export type MenuContentStaticProps = MenuContentStaticPropsWithoutHTML & Without<
|
|
48
|
+
export type MenuContentPropsWithoutHTML = Expand<WithChildNoChildrenSnippetProps<Omit<PopperLayerProps, "content"> & _SharedMenuContentProps, MenuContentSnippetProps>>;
|
|
49
|
+
export type MenuContentProps = MenuContentPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MenuContentPropsWithoutHTML>;
|
|
50
|
+
export type MenuContentStaticPropsWithoutHTML = Expand<WithChildNoChildrenSnippetProps<Omit<PopperLayerStaticProps, "content"> & _SharedMenuContentProps, MenuContentSnippetProps>>;
|
|
51
|
+
export type MenuContentStaticProps = MenuContentStaticPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MenuContentStaticPropsWithoutHTML>;
|
|
52
52
|
export type MenuItemPropsWithoutHTML<U extends Record<PropertyKey, unknown> = {
|
|
53
53
|
_default: never;
|
|
54
54
|
}> = WithChild<{
|
|
@@ -73,7 +73,7 @@ export type MenuItemPropsWithoutHTML<U extends Record<PropertyKey, unknown> = {
|
|
|
73
73
|
*/
|
|
74
74
|
onSelect?: (event: Event) => void;
|
|
75
75
|
}, U>;
|
|
76
|
-
export type MenuItemProps = MenuItemPropsWithoutHTML & Without<
|
|
76
|
+
export type MenuItemProps = MenuItemPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MenuItemPropsWithoutHTML>;
|
|
77
77
|
export type MenuCheckboxItemSnippetProps = {
|
|
78
78
|
checked: boolean | "indeterminate";
|
|
79
79
|
};
|
|
@@ -98,7 +98,7 @@ export type MenuCheckboxItemPropsWithoutHTML = MenuItemPropsWithoutHTML<MenuChec
|
|
|
98
98
|
*/
|
|
99
99
|
controlledChecked?: boolean;
|
|
100
100
|
};
|
|
101
|
-
export type MenuCheckboxItemProps = MenuCheckboxItemPropsWithoutHTML & Without<
|
|
101
|
+
export type MenuCheckboxItemProps = MenuCheckboxItemPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MenuCheckboxItemPropsWithoutHTML>;
|
|
102
102
|
export type MenuTriggerPropsWithoutHTML = WithChild<{
|
|
103
103
|
/**
|
|
104
104
|
* Whether the trigger is disabled.
|
|
@@ -107,7 +107,7 @@ export type MenuTriggerPropsWithoutHTML = WithChild<{
|
|
|
107
107
|
*/
|
|
108
108
|
disabled?: boolean | null | undefined;
|
|
109
109
|
}>;
|
|
110
|
-
export type MenuTriggerProps = MenuTriggerPropsWithoutHTML & Without<
|
|
110
|
+
export type MenuTriggerProps = MenuTriggerPropsWithoutHTML & Without<BitsPrimitiveButtonAttributes, MenuTriggerPropsWithoutHTML>;
|
|
111
111
|
export type MenuSubPropsWithoutHTML = WithChildren<{
|
|
112
112
|
/**
|
|
113
113
|
* The open state of the menu.
|
|
@@ -127,20 +127,20 @@ export type MenuSubPropsWithoutHTML = WithChildren<{
|
|
|
127
127
|
controlledOpen?: boolean;
|
|
128
128
|
}>;
|
|
129
129
|
export type MenuSubProps = MenuSubPropsWithoutHTML;
|
|
130
|
-
export type MenuSubContentPropsWithoutHTML = Expand<
|
|
131
|
-
export type MenuSubContentProps = MenuSubContentPropsWithoutHTML & Without<
|
|
132
|
-
export type MenuSubContentStaticPropsWithoutHTML = Expand<
|
|
133
|
-
export type MenuSubContentStaticProps = MenuSubContentStaticPropsWithoutHTML & Without<
|
|
130
|
+
export type MenuSubContentPropsWithoutHTML = Expand<WithChildNoChildrenSnippetProps<Omit<PopperLayerProps, "content" | "preventScroll"> & _SharedMenuContentProps, MenuContentSnippetProps>>;
|
|
131
|
+
export type MenuSubContentProps = MenuSubContentPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MenuSubContentPropsWithoutHTML>;
|
|
132
|
+
export type MenuSubContentStaticPropsWithoutHTML = Expand<WithChildNoChildrenSnippetProps<Omit<PopperLayerStaticProps, "content" | "preventScroll"> & _SharedMenuContentProps, MenuContentSnippetProps>>;
|
|
133
|
+
export type MenuSubContentStaticProps = MenuSubContentStaticPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MenuSubContentStaticPropsWithoutHTML>;
|
|
134
134
|
export type MenuSubTriggerPropsWithoutHTML = MenuItemPropsWithoutHTML;
|
|
135
135
|
export type MenuSubTriggerProps = MenuItemProps;
|
|
136
136
|
export type MenuSeparatorPropsWithoutHTML = WithChild;
|
|
137
|
-
export type MenuSeparatorProps = MenuSeparatorPropsWithoutHTML & Without<
|
|
137
|
+
export type MenuSeparatorProps = MenuSeparatorPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MenuSeparatorPropsWithoutHTML>;
|
|
138
138
|
export type MenuArrowPropsWithoutHTML = ArrowPropsWithoutHTML;
|
|
139
139
|
export type MenuArrowProps = ArrowProps;
|
|
140
140
|
export type MenuGroupPropsWithoutHTML = WithChild;
|
|
141
|
-
export type MenuGroupProps = MenuGroupPropsWithoutHTML & Without<
|
|
141
|
+
export type MenuGroupProps = MenuGroupPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MenuGroupPropsWithoutHTML>;
|
|
142
142
|
export type MenuGroupHeadingPropsWithoutHTML = WithChild;
|
|
143
|
-
export type MenuGroupHeadingProps = MenuGroupHeadingPropsWithoutHTML & Without<
|
|
143
|
+
export type MenuGroupHeadingProps = MenuGroupHeadingPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MenuGroupHeadingPropsWithoutHTML>;
|
|
144
144
|
export type MenuRadioGroupPropsWithoutHTML = WithChild<{
|
|
145
145
|
/**
|
|
146
146
|
* The value of the selected radio item.
|
|
@@ -161,7 +161,7 @@ export type MenuRadioGroupPropsWithoutHTML = WithChild<{
|
|
|
161
161
|
*/
|
|
162
162
|
controlledValue?: boolean;
|
|
163
163
|
}>;
|
|
164
|
-
export type MenuRadioGroupProps = MenuRadioGroupPropsWithoutHTML & Without<
|
|
164
|
+
export type MenuRadioGroupProps = MenuRadioGroupPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MenuRadioGroupPropsWithoutHTML>;
|
|
165
165
|
export type MenuRadioItemSnippetProps = {
|
|
166
166
|
checked: boolean;
|
|
167
167
|
};
|
|
@@ -171,6 +171,6 @@ export type MenuRadioItemPropsWithoutHTML = MenuItemPropsWithoutHTML<MenuRadioIt
|
|
|
171
171
|
*/
|
|
172
172
|
value: string;
|
|
173
173
|
};
|
|
174
|
-
export type MenuRadioItemProps = MenuRadioItemPropsWithoutHTML & Without<
|
|
174
|
+
export type MenuRadioItemProps = MenuRadioItemPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MenuRadioItemPropsWithoutHTML>;
|
|
175
175
|
export type MenuPortalPropsWithoutHTML = PortalProps;
|
|
176
176
|
export type MenuPortalProps = MenuPortalPropsWithoutHTML;
|
|
@@ -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 { MenubarContentStaticProps } from "../types.js";
|
|
4
4
|
import { useMenubarContent } from "../menubar.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
import MenuContentStatic from "../../menu/components/menu-content-static.svelte";
|
|
8
7
|
|
|
9
8
|
let {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { box } from "svelte-toolbelt";
|
|
2
|
+
import { box, mergeProps } from "svelte-toolbelt";
|
|
3
3
|
import type { MenubarContentProps } from "../types.js";
|
|
4
4
|
import { useMenubarContent } from "../menubar.svelte.js";
|
|
5
5
|
import MenuContent from "../../menu/components/menu-content.svelte";
|
|
6
6
|
import { useId } from "../../../internal/use-id.js";
|
|
7
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
8
7
|
|
|
9
8
|
let {
|
|
10
9
|
ref = $bindable(null),
|
|
@@ -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 { MenubarTriggerProps } from "../types.js";
|
|
4
4
|
import { useMenubarTrigger } from "../menubar.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
|
import { useMenuDropdownTrigger } from "../../menu/menu.svelte.js";
|
|
9
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 { MenubarRootProps } from "../types.js";
|
|
4
4
|
import { useMenubarRoot } from "../menubar.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import {
|
|
7
|
-
import { noop } from "../../../internal/callbacks.js";
|
|
6
|
+
import { noop } from "../../../internal/noop.js";
|
|
8
7
|
|
|
9
8
|
let {
|
|
10
9
|
id = useId(),
|
|
@@ -65,7 +65,7 @@ declare class MenubarTriggerState {
|
|
|
65
65
|
readonly role: "menuitem";
|
|
66
66
|
readonly id: string;
|
|
67
67
|
readonly "aria-haspopup": "menu";
|
|
68
|
-
readonly "aria-expanded": "
|
|
68
|
+
readonly "aria-expanded": "true" | "false";
|
|
69
69
|
readonly "aria-controls": string | undefined;
|
|
70
70
|
readonly "data-highlighted": "" | undefined;
|
|
71
71
|
readonly "data-state": "open" | "closed";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { box } from "svelte-toolbelt";
|
|
1
|
+
import { afterTick, box, useRefById } from "svelte-toolbelt";
|
|
2
2
|
import { untrack } from "svelte";
|
|
3
3
|
import { useRovingFocus, } from "../../internal/use-roving-focus.svelte.js";
|
|
4
4
|
import { createContext } from "../../internal/create-context.js";
|
|
@@ -6,8 +6,6 @@ import { getAriaExpanded, getDataDisabled, getDataOpenClosed } from "../../inter
|
|
|
6
6
|
import { kbd } from "../../internal/kbd.js";
|
|
7
7
|
import { wrapArray } from "../../internal/use-typeahead.svelte.js";
|
|
8
8
|
import { isBrowser } from "../../internal/is.js";
|
|
9
|
-
import { afterTick } from "../../internal/after-tick.js";
|
|
10
|
-
import { useRefById } from "../../internal/use-ref-by-id.svelte.js";
|
|
11
9
|
const ROOT_ATTR = "data-menubar-root";
|
|
12
10
|
const TRIGGER_ATTR = "data-menubar-trigger";
|
|
13
11
|
class MenubarRootState {
|
|
@@ -220,7 +218,7 @@ class MenubarContentState {
|
|
|
220
218
|
onRefChange: (node) => {
|
|
221
219
|
this.menu.contentNode = node;
|
|
222
220
|
},
|
|
223
|
-
|
|
221
|
+
deps: () => this.menu.open,
|
|
224
222
|
});
|
|
225
223
|
}
|
|
226
224
|
onCloseAutoFocus = (e) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ArrowPropsWithoutHTML } from "../utilities/arrow/types.js";
|
|
2
2
|
import type { MenuArrowProps } from "../menu/types.js";
|
|
3
3
|
import type { OnChangeFn, WithChild, WithChildren, Without } from "../../internal/types.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { BitsPrimitiveButtonAttributes, BitsPrimitiveDivAttributes } from "../../shared/attributes.js";
|
|
5
5
|
import type { Direction } from "../../shared/index.js";
|
|
6
6
|
export type MenubarRootPropsWithoutHTML = WithChild<{
|
|
7
7
|
/**
|
|
@@ -30,7 +30,7 @@ export type MenubarRootPropsWithoutHTML = WithChild<{
|
|
|
30
30
|
*/
|
|
31
31
|
controlledValue?: boolean;
|
|
32
32
|
}>;
|
|
33
|
-
export type MenubarRootProps = MenubarRootPropsWithoutHTML & Without<
|
|
33
|
+
export type MenubarRootProps = MenubarRootPropsWithoutHTML & Without<BitsPrimitiveDivAttributes, MenubarRootPropsWithoutHTML>;
|
|
34
34
|
export type MenubarMenuPropsWithoutHTML = WithChildren<{
|
|
35
35
|
/**
|
|
36
36
|
* The `value` assigned to the menu. Used to programmatically control the menu's open state
|
|
@@ -47,7 +47,7 @@ export type MenubarTriggerPropsWithoutHTML = WithChild<{
|
|
|
47
47
|
*/
|
|
48
48
|
disabled?: boolean | null | undefined;
|
|
49
49
|
}>;
|
|
50
|
-
export type MenubarTriggerProps = MenubarTriggerPropsWithoutHTML & Without<
|
|
50
|
+
export type MenubarTriggerProps = MenubarTriggerPropsWithoutHTML & Without<BitsPrimitiveButtonAttributes, MenubarTriggerPropsWithoutHTML>;
|
|
51
51
|
export type { MenuContentPropsWithoutHTML as MenubarContentPropsWithoutHTML, MenuContentProps as MenubarContentProps, MenuContentStaticPropsWithoutHTML as MenubarContentStaticPropsWithoutHTML, MenuContentStaticProps as MenubarContentStaticProps, MenuItemPropsWithoutHTML as MenubarItemPropsWithoutHTML, MenuItemProps as MenubarItemProps, MenuGroupPropsWithoutHTML as MenubarGroupPropsWithoutHTML, MenuGroupProps as MenubarGroupProps, MenuGroupHeadingPropsWithoutHTML as MenubarGroupHeadingPropsWithoutHTML, MenuGroupHeadingProps as MenubarGroupHeadingProps, MenuCheckboxItemPropsWithoutHTML as MenubarCheckboxItemPropsWithoutHTML, MenuCheckboxItemProps as MenubarCheckboxItemProps, MenuRadioGroupPropsWithoutHTML as MenubarRadioGroupPropsWithoutHTML, MenuRadioGroupProps as MenubarRadioGroupProps, MenuRadioItemPropsWithoutHTML as MenubarRadioItemPropsWithoutHTML, MenuRadioItemProps as MenubarRadioItemProps, MenuSeparatorPropsWithoutHTML as MenubarSeparatorPropsWithoutHTML, MenuSeparatorProps as MenubarSeparatorProps, MenuSubContentPropsWithoutHTML as MenubarSubContentPropsWithoutHTML, MenuSubContentProps as MenubarSubContentProps, MenuSubContentStaticPropsWithoutHTML as MenubarSubContentStaticPropsWithoutHTML, MenuSubContentStaticProps as MenubarSubContentStaticProps, MenuSubTriggerPropsWithoutHTML as MenubarSubTriggerPropsWithoutHTML, MenuSubTriggerProps as MenubarSubTriggerProps, MenuSubPropsWithoutHTML as MenubarSubPropsWithoutHTML, MenuPortalPropsWithoutHTML as MenubarPortalPropsWithoutHTML, MenuPortalProps as MenubarPortalProps, } from "../menu/types.js";
|
|
52
52
|
export type MenubarArrowPropsWithoutHTML = ArrowPropsWithoutHTML;
|
|
53
53
|
export type MenubarArrowProps = MenuArrowProps;
|
|
@@ -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 { NavigationMenuContentProps } from "../types.js";
|
|
4
4
|
import { useNavigationMenuContent } from "../navigation-menu.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
import Portal from "../../utilities/portal/portal.svelte";
|
|
8
7
|
import PresenceLayer from "../../utilities/presence-layer/presence-layer.svelte";
|
|
9
8
|
import DismissibleLayer from "../../utilities/dismissible-layer/dismissible-layer.svelte";
|
|
@@ -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 { NavigationMenuIndicatorProps } from "../types.js";
|
|
4
4
|
import { useNavigationMenuIndicator } from "../navigation-menu.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
7
6
|
import PresenceLayer from "../../utilities/presence-layer/presence-layer.svelte";
|
|
8
7
|
import Portal from "../../utilities/portal/portal.svelte";
|
|
9
8
|
|
|
@@ -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 { NavigationMenuItemProps } from "../types.js";
|
|
4
4
|
import { useNavigationMenuItem } from "../navigation-menu.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,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 { NavigationMenuLinkProps } from "../types.js";
|
|
4
4
|
import { useNavigationMenuLink } from "../navigation-menu.svelte.js";
|
|
5
5
|
import { useId } from "../../../internal/use-id.js";
|
|
6
|
-
import { noop } from "../../../internal/
|
|
7
|
-
import { mergeProps } from "../../../internal/merge-props.js";
|
|
6
|
+
import { noop } from "../../../internal/noop.js";
|
|
8
7
|
|
|
9
8
|
let {
|
|
10
9
|
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 { NavigationMenuListProps } from "../types.js";
|
|
4
4
|
import { useNavigationMenuList } from "../navigation-menu.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(),
|