@youcan/celeste 0.6.101 → 0.7.0
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/celeste.css +1460 -1460
- package/dist/cjs/chunks/BubbleSelect.cjs +332 -0
- package/dist/cjs/chunks/CollapsibleRoot.cjs +90 -0
- package/dist/cjs/chunks/Collection.cjs +79 -0
- package/dist/cjs/chunks/ComboboxContent.cjs +442 -0
- package/dist/cjs/chunks/ComboboxGroup.cjs +90 -0
- package/dist/cjs/chunks/ComboboxInput.cjs +266 -0
- package/dist/cjs/chunks/ComboboxItem.cjs +195 -0
- package/dist/cjs/chunks/ComboboxLabel.cjs +47 -0
- package/dist/cjs/chunks/ComboboxRoot.cjs +695 -0
- package/dist/cjs/chunks/ComboboxSeparator.cjs +35 -0
- package/dist/cjs/chunks/ConfigProvider.cjs +11 -0
- package/dist/cjs/chunks/DialogClose.cjs +41 -0
- package/dist/cjs/chunks/DialogDescription.cjs +38 -0
- package/dist/cjs/chunks/DialogPortal.cjs +521 -0
- package/dist/cjs/chunks/DialogRoot.cjs +81 -0
- package/dist/cjs/chunks/DialogTitle.cjs +38 -0
- package/dist/cjs/chunks/DialogTrigger.cjs +57 -0
- package/dist/cjs/chunks/DismissableLayer.cjs +292 -0
- package/dist/cjs/chunks/DropdownMenuPortal.cjs +73 -0
- package/dist/cjs/chunks/DropdownMenuRoot.cjs +87 -0
- package/dist/cjs/chunks/FocusScope.cjs +368 -0
- package/dist/cjs/chunks/Label.cjs +42 -0
- package/dist/cjs/chunks/MenuAnchor.cjs +37 -0
- package/dist/cjs/chunks/MenuContentImpl.cjs +371 -0
- package/dist/cjs/chunks/MenuGroup.cjs +44 -0
- package/dist/cjs/chunks/MenuItemImpl.cjs +100 -0
- package/dist/cjs/chunks/MenuRoot.cjs +108 -0
- package/dist/cjs/chunks/MenuSub.cjs +68 -0
- package/dist/cjs/chunks/PaginationRoot.cjs +101 -0
- package/dist/cjs/chunks/PinInputRoot.cjs +153 -0
- package/dist/cjs/chunks/PopoverRoot.cjs +73 -0
- package/dist/cjs/chunks/PopperAnchor.cjs +48 -0
- package/dist/cjs/chunks/PopperArrow.cjs +152 -0
- package/dist/cjs/chunks/PopperContent.cjs +2134 -0
- package/dist/cjs/chunks/PopperRoot.cjs +32 -0
- package/dist/cjs/chunks/Presence.cjs +194 -0
- package/dist/cjs/chunks/Primitive.cjs +80 -0
- package/dist/cjs/chunks/ProgressIndicator.cjs +161 -0
- package/dist/cjs/chunks/RadioGroupRoot.cjs +143 -0
- package/dist/cjs/chunks/RovingFocusGroup.cjs +146 -0
- package/dist/cjs/chunks/RovingFocusItem.cjs +114 -0
- package/dist/cjs/chunks/SelectGroup.cjs +44 -0
- package/dist/cjs/chunks/SelectItemAlignedPosition.cjs +593 -0
- package/dist/cjs/chunks/TabsRoot.cjs +114 -0
- package/dist/cjs/chunks/Teleport.cjs +51 -0
- package/dist/cjs/chunks/ToggleGroupRoot.cjs +188 -0
- package/dist/cjs/chunks/TooltipProvider.cjs +87 -0
- package/dist/cjs/chunks/TooltipRoot.cjs +145 -0
- package/dist/cjs/chunks/VisuallyHidden.cjs +65 -0
- package/dist/cjs/chunks/VisuallyHiddenInput.cjs +146 -0
- package/dist/cjs/chunks/alert.cjs +2 -2
- package/dist/cjs/chunks/alpha-slider.cjs +1 -1
- package/dist/cjs/chunks/badge.cjs +2 -2
- package/dist/cjs/chunks/button.cjs +4 -3
- package/dist/cjs/chunks/checkbox-card.cjs +10 -8
- package/dist/cjs/chunks/checkbox-label.cjs +11 -9
- package/dist/cjs/chunks/checkbox.cjs +234 -9
- package/dist/cjs/chunks/chunk.cjs +50 -0
- package/dist/cjs/chunks/clamp.cjs +75 -0
- package/dist/cjs/chunks/collapsible-content.cjs +105 -2
- package/dist/cjs/chunks/collapsible-trigger.cjs +51 -2
- package/dist/cjs/chunks/collapsible.cjs +6 -3
- package/dist/cjs/chunks/color-area.cjs +4 -4
- package/dist/cjs/chunks/color-picker.cjs +14 -13
- package/dist/cjs/chunks/color-swatch.cjs +3 -3
- package/dist/cjs/chunks/combobox-anchor.cjs +45 -3
- package/dist/cjs/chunks/combobox-empty.cjs +31 -3
- package/dist/cjs/chunks/combobox-group.cjs +6 -4
- package/dist/cjs/chunks/combobox-input.cjs +7 -5
- package/dist/cjs/chunks/combobox-item.cjs +8 -6
- package/dist/cjs/chunks/combobox-list.cjs +105 -7
- package/dist/cjs/chunks/combobox-root.cjs +22 -18
- package/dist/cjs/chunks/combobox-separator.cjs +4 -3
- package/dist/cjs/chunks/combobox-trigger.cjs +64 -4
- package/dist/cjs/chunks/combobox.cjs +38 -30
- package/dist/cjs/chunks/compact-button.cjs +4 -3
- package/dist/cjs/chunks/components.cjs +47 -47
- package/dist/cjs/chunks/content-divider.cjs +87 -2
- package/dist/cjs/chunks/core.cjs +3 -3
- package/dist/cjs/chunks/counter-input.cjs +884 -8
- package/dist/cjs/chunks/createContext.cjs +38 -0
- package/dist/cjs/chunks/digit-input-group.cjs +6 -4
- package/dist/cjs/chunks/digit-input-slot.cjs +243 -4
- package/dist/cjs/chunks/digit-input.cjs +8 -6
- package/dist/cjs/chunks/dist.cjs +524 -12084
- package/dist/cjs/chunks/dropdown-menu-content.cjs +542 -5
- package/dist/cjs/chunks/dropdown-menu-group.cjs +30 -3
- package/dist/cjs/chunks/dropdown-menu-item.cjs +125 -4
- package/dist/cjs/chunks/dropdown-menu-label.cjs +59 -4
- package/dist/cjs/chunks/dropdown-menu-separator.cjs +57 -3
- package/dist/cjs/chunks/dropdown-menu-sub-content.cjs +295 -5
- package/dist/cjs/chunks/dropdown-menu-sub-trigger.cjs +192 -4
- package/dist/cjs/chunks/dropdown-menu-sub.cjs +39 -2
- package/dist/cjs/chunks/dropdown-menu-trigger.cjs +91 -4
- package/dist/cjs/chunks/dropdown-menu.cjs +6 -4
- package/dist/cjs/chunks/extra-settings.cjs +5 -5
- package/dist/cjs/chunks/fancy-button.cjs +4 -3
- package/dist/cjs/chunks/file-upload-area.cjs +2 -2
- package/dist/cjs/chunks/getActiveElement.cjs +14 -0
- package/dist/cjs/chunks/handleAndDispatchCustomEvent.cjs +18 -0
- package/dist/cjs/chunks/hint-text.cjs +2 -2
- package/dist/cjs/chunks/hue-slider.cjs +1 -1
- package/dist/cjs/chunks/isValueEqualOrExist.cjs +24 -0
- package/dist/cjs/chunks/{label.cjs → label2.cjs} +15 -8
- package/dist/cjs/chunks/link-bubble.cjs +7 -7
- package/dist/cjs/chunks/link-button.cjs +4 -3
- package/dist/cjs/chunks/menus.cjs +53 -52
- package/dist/cjs/chunks/modal-body.cjs +1 -1
- package/dist/cjs/chunks/modal-close.cjs +3 -2
- package/dist/cjs/chunks/modal-content.cjs +8 -7
- package/dist/cjs/chunks/modal-footer.cjs +1 -1
- package/dist/cjs/chunks/modal-header.cjs +8 -5
- package/dist/cjs/chunks/modal-trigger.cjs +3 -2
- package/dist/cjs/chunks/modal.cjs +7 -4
- package/dist/cjs/chunks/nullish.cjs +11 -0
- package/dist/cjs/chunks/ohash.D__AXeF1.cjs +114 -0
- package/dist/cjs/chunks/pagination-content.cjs +86 -3
- package/dist/cjs/chunks/pagination-ellipsis.cjs +30 -3
- package/dist/cjs/chunks/pagination-first.cjs +39 -3
- package/dist/cjs/chunks/pagination-item.cjs +51 -2
- package/dist/cjs/chunks/pagination-last.cjs +39 -3
- package/dist/cjs/chunks/pagination-next.cjs +39 -3
- package/dist/cjs/chunks/pagination-previous.cjs +39 -3
- package/dist/cjs/chunks/pagination.cjs +6 -4
- package/dist/cjs/chunks/popover-content.cjs +704 -7
- package/dist/cjs/chunks/popover-trigger.cjs +62 -3
- package/dist/cjs/chunks/popover.cjs +5 -3
- package/dist/cjs/chunks/progress-bar.cjs +7 -5
- package/dist/cjs/chunks/progress-circle.cjs +7 -5
- package/dist/cjs/chunks/radio-group-card.cjs +10 -8
- package/dist/cjs/chunks/radio-group-item.cjs +304 -6
- package/dist/cjs/chunks/radio-group-label.cjs +11 -9
- package/dist/cjs/chunks/radio-group.cjs +7 -5
- package/dist/cjs/chunks/rich-editor.cjs +162 -162
- package/dist/cjs/chunks/scroll-area.cjs +142 -6
- package/dist/cjs/chunks/scroll-bar.cjs +895 -4
- package/dist/cjs/chunks/segmented-control-item.cjs +163 -3
- package/dist/cjs/chunks/segmented-control.cjs +8 -4
- package/dist/cjs/chunks/select-content.cjs +320 -6
- package/dist/cjs/chunks/select-group.cjs +3 -2
- package/dist/cjs/chunks/select-icon.cjs +1 -1
- package/dist/cjs/chunks/select-item.cjs +227 -5
- package/dist/cjs/chunks/select-label.cjs +35 -3
- package/dist/cjs/chunks/select-separator.cjs +28 -3
- package/dist/cjs/chunks/select-trigger.cjs +165 -4
- package/dist/cjs/chunks/select-value.cjs +65 -3
- package/dist/cjs/chunks/select.cjs +9 -4
- package/dist/cjs/chunks/sheet-close.cjs +4 -3
- package/dist/cjs/chunks/sheet-content.cjs +9 -7
- package/dist/cjs/chunks/sheet-description.cjs +4 -3
- package/dist/cjs/chunks/sheet-footer.cjs +2 -2
- package/dist/cjs/chunks/sheet-header.cjs +2 -2
- package/dist/cjs/chunks/sheet-title.cjs +4 -3
- package/dist/cjs/chunks/sheet-trigger.cjs +3 -2
- package/dist/cjs/chunks/sheet.cjs +7 -4
- package/dist/cjs/chunks/sidebar-content.cjs +1 -1
- package/dist/cjs/chunks/sidebar-element.cjs +3 -2
- package/dist/cjs/chunks/sidebar-footer.cjs +1 -1
- package/dist/cjs/chunks/sidebar-group-content.cjs +1 -1
- package/dist/cjs/chunks/sidebar-group-label.cjs +3 -2
- package/dist/cjs/chunks/sidebar-group.cjs +1 -1
- package/dist/cjs/chunks/sidebar-header.cjs +1 -1
- package/dist/cjs/chunks/sidebar-menu-action.cjs +3 -2
- package/dist/cjs/chunks/sidebar-menu-badge.cjs +1 -1
- package/dist/cjs/chunks/sidebar-menu-button.cjs +3 -2
- package/dist/cjs/chunks/sidebar-menu-item.cjs +1 -1
- package/dist/cjs/chunks/sidebar-menu-sub-button.cjs +3 -2
- package/dist/cjs/chunks/sidebar-menu-sub-item.cjs +1 -1
- package/dist/cjs/chunks/sidebar-menu-sub.cjs +1 -1
- package/dist/cjs/chunks/sidebar-menu.cjs +1 -1
- package/dist/cjs/chunks/sidebar-provider.cjs +1 -1
- package/dist/cjs/chunks/sidebar-trigger.cjs +1 -1
- package/dist/cjs/chunks/sidebar.cjs +1 -1
- package/dist/cjs/chunks/slider.cjs +751 -7
- package/dist/cjs/chunks/social-button.cjs +4 -3
- package/dist/cjs/chunks/sonner-alert.cjs +2 -2
- package/dist/cjs/chunks/sonner.cjs +1 -1
- package/dist/cjs/chunks/status-badge.cjs +2 -2
- package/dist/cjs/chunks/switch.cjs +192 -9
- package/dist/cjs/chunks/tab-menu-content.cjs +82 -3
- package/dist/cjs/chunks/tab-menu-item.cjs +89 -4
- package/dist/cjs/chunks/tab-menu-list.cjs +61 -3
- package/dist/cjs/chunks/tab-menu.cjs +7 -4
- package/dist/cjs/chunks/table-body.cjs +2 -2
- package/dist/cjs/chunks/table-caption.cjs +2 -2
- package/dist/cjs/chunks/table-cell.cjs +2 -2
- package/dist/cjs/chunks/table-footer.cjs +2 -2
- package/dist/cjs/chunks/table-head.cjs +2 -2
- package/dist/cjs/chunks/table-header.cjs +1 -1
- package/dist/cjs/chunks/table-row.cjs +2 -2
- package/dist/cjs/chunks/table.cjs +2 -2
- package/dist/cjs/chunks/table2.cjs +2 -2
- package/dist/cjs/chunks/tag.cjs +4 -3
- package/dist/cjs/chunks/text-input-affix.cjs +1 -1
- package/dist/cjs/chunks/text-input-button.cjs +12 -6
- package/dist/cjs/chunks/text-input.cjs +9 -8
- package/dist/cjs/chunks/textarea.cjs +2 -2
- package/dist/cjs/chunks/tooltip-content.cjs +589 -7
- package/dist/cjs/chunks/tooltip-provider.cjs +5 -3
- package/dist/cjs/chunks/tooltip-root.cjs +5 -3
- package/dist/cjs/chunks/tooltip-trigger.cjs +109 -3
- package/dist/cjs/chunks/tooltip.cjs +8 -5
- package/dist/cjs/chunks/use-color-model.cjs +1 -1
- package/dist/cjs/chunks/useArrowNavigation.cjs +65 -0
- package/dist/cjs/chunks/useComposing.cjs +27 -0
- package/dist/cjs/chunks/useDirection.cjs +20 -0
- package/dist/cjs/chunks/useEmitAsProps.cjs +34 -0
- package/dist/cjs/chunks/useFocusGuards.cjs +40 -0
- package/dist/cjs/chunks/useFormControl.cjs +14 -0
- package/dist/cjs/chunks/useForwardExpose.cjs +64 -0
- package/dist/cjs/chunks/useForwardProps.cjs +40 -0
- package/dist/cjs/chunks/useForwardPropsEmits.cjs +20 -0
- package/dist/cjs/chunks/useForwardScopeId.cjs +31 -0
- package/dist/cjs/chunks/useHideOthers.cjs +138 -0
- package/dist/cjs/chunks/useId.cjs +30 -0
- package/dist/cjs/chunks/useKbd.cjs +46 -0
- package/dist/cjs/chunks/useNonce.cjs +15 -0
- package/dist/cjs/chunks/usePrimitiveElement.cjs +18 -0
- package/dist/cjs/chunks/useSize.cjs +55 -0
- package/dist/cjs/chunks/useTypeahead.cjs +69 -0
- package/dist/cjs/chunks/utils.cjs +117 -0
- package/dist/cjs/chunks/utils2.cjs +73 -0
- package/dist/cjs/chunks/utils3.cjs +20 -0
- package/dist/cjs/command-group.cjs +6 -4
- package/dist/cjs/command-input.cjs +9 -6
- package/dist/cjs/command-item.cjs +6 -3
- package/dist/cjs/command-list.cjs +14 -7
- package/dist/cjs/command-root.cjs +20 -16
- package/dist/cjs/command-separator.cjs +4 -3
- package/dist/cjs/config.cjs +2 -2
- package/dist/cjs/index.cjs +47 -47
- package/dist/cjs/label.cjs +1 -1
- package/dist/cjs/use-delegated-props.cjs +1 -1
- package/dist/cjs/use-sidebar.cjs +2 -2
- package/dist/cjs/use-user-select.cjs +1 -1
- package/dist/components/alert/alert.d.ts +17 -14
- package/dist/components/badge/badge.d.ts +2 -2
- package/dist/components/badge/status-badge.d.ts +2 -2
- package/dist/components/button/button.d.ts +11 -8
- package/dist/components/button/compact-button.d.ts +4 -4
- package/dist/components/button/fancy-button.d.ts +11 -8
- package/dist/components/button/link-button.d.ts +11 -8
- package/dist/components/button/social-button.d.ts +2 -2
- package/dist/components/checkbox/checkbox-card.d.ts +1 -1
- package/dist/components/checkbox/checkbox-label.d.ts +1 -1
- package/dist/components/checkbox/checkbox.d.ts +3 -3
- package/dist/components/collapsible/collapsible-content.d.ts +7 -4
- package/dist/components/collapsible/collapsible-trigger.d.ts +7 -4
- package/dist/components/collapsible/collapsible.d.ts +12 -9
- package/dist/components/color-picker/alpha-slider.d.ts +2 -2
- package/dist/components/color-picker/color-area.d.ts +1 -1
- package/dist/components/color-picker/color-picker.d.ts +11 -8
- package/dist/components/color-picker/color-swatch.d.ts +2 -2
- package/dist/components/color-picker/composable/use-color-model.d.ts +1 -1
- package/dist/components/combobox/combobox-anchor.d.ts +1 -1
- package/dist/components/combobox/combobox-empty.d.ts +1 -1
- package/dist/components/combobox/combobox-group.d.ts +1 -1
- package/dist/components/combobox/combobox-input.d.ts +1 -1
- package/dist/components/combobox/combobox-item.d.ts +13 -10
- package/dist/components/combobox/combobox-list.d.ts +8 -8
- package/dist/components/combobox/combobox-root.d.ts +11 -7
- package/dist/components/combobox/combobox-separator.d.ts +1 -1
- package/dist/components/combobox/combobox-trigger.d.ts +9 -6
- package/dist/components/combobox/combobox.d.ts +26 -19
- package/dist/components/content-divider/content-divider.d.ts +3 -3
- package/dist/components/counter-input/counter-input.d.ts +2 -2
- package/dist/components/digit-input/digit-input-group.d.ts +1 -1
- package/dist/components/digit-input/digit-input-slot.d.ts +1 -1
- package/dist/components/digit-input/digit-input.d.ts +25 -24
- package/dist/components/dropdown-menu/dropdown-menu-content.d.ts +7 -7
- package/dist/components/dropdown-menu/dropdown-menu-group.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-item.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-label.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-separator.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-sub-content.d.ts +7 -7
- package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-sub.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-trigger.d.ts +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/components/file-upload/file-upload-area.d.ts +8 -7
- package/dist/components/hint-text/hint-text.d.ts +2 -2
- package/dist/components/label/label.d.ts +3 -5
- package/dist/components/modal/modal-close.d.ts +1 -1
- package/dist/components/modal/modal-content.d.ts +7 -7
- package/dist/components/modal/modal-trigger.d.ts +1 -1
- package/dist/components/modal/modal.d.ts +1 -1
- package/dist/components/pagination/pagination-content.d.ts +14 -11
- package/dist/components/pagination/pagination-ellipsis.d.ts +7 -4
- package/dist/components/pagination/pagination-first.d.ts +7 -4
- package/dist/components/pagination/pagination-item.d.ts +7 -4
- package/dist/components/pagination/pagination-last.d.ts +7 -4
- package/dist/components/pagination/pagination-next.d.ts +7 -4
- package/dist/components/pagination/pagination-previous.d.ts +7 -4
- package/dist/components/pagination/pagination.d.ts +24 -21
- package/dist/components/popover/popover-content.d.ts +22 -19
- package/dist/components/popover/popover-trigger.d.ts +1 -1
- package/dist/components/popover/popover.d.ts +1 -1
- package/dist/components/progress/progress-bar.d.ts +1 -1
- package/dist/components/progress/progress-circle.d.ts +1 -1
- package/dist/components/radio-group/radio-group-card.d.ts +1 -1
- package/dist/components/radio-group/radio-group-item.d.ts +1 -1
- package/dist/components/radio-group/radio-group-label.d.ts +1 -1
- package/dist/components/radio-group/radio-group.d.ts +3 -3
- package/dist/components/scroll-area/scroll-area.d.ts +1 -1
- package/dist/components/scroll-area/scroll-bar.d.ts +1 -1
- package/dist/components/segmented-control/segmented-control-item.d.ts +1 -1
- package/dist/components/segmented-control/segmented-control.d.ts +3 -3
- package/dist/components/select/select-content.d.ts +3 -3
- package/dist/components/select/select-group.d.ts +1 -1
- package/dist/components/select/select-item.d.ts +1 -1
- package/dist/components/select/select-label.d.ts +1 -1
- package/dist/components/select/select-separator.d.ts +1 -1
- package/dist/components/select/select-trigger.d.ts +1 -1
- package/dist/components/select/select-value.d.ts +1 -1
- package/dist/components/select/select.d.ts +3 -3
- package/dist/components/sheet/sheet-close.d.ts +7 -4
- package/dist/components/sheet/sheet-content.d.ts +16 -13
- package/dist/components/sheet/sheet-description.d.ts +7 -4
- package/dist/components/sheet/sheet-footer.d.ts +6 -3
- package/dist/components/sheet/sheet-header.d.ts +6 -3
- package/dist/components/sheet/sheet-title.d.ts +7 -4
- package/dist/components/sheet/sheet-trigger.d.ts +7 -4
- package/dist/components/sheet/sheet.d.ts +1 -1
- package/dist/components/sidebar/sidebar-element.d.ts +9 -6
- package/dist/components/sidebar/sidebar-footer.d.ts +6 -3
- package/dist/components/sidebar/sidebar-group-label.d.ts +1 -1
- package/dist/components/sidebar/sidebar-header.d.ts +6 -3
- package/dist/components/sidebar/sidebar-menu-action.d.ts +9 -6
- package/dist/components/sidebar/sidebar-menu-badge.d.ts +2 -2
- package/dist/components/sidebar/sidebar-menu-button.d.ts +2 -2
- package/dist/components/sidebar/sidebar-menu-sub-button.d.ts +11 -8
- package/dist/components/sidebar/sidebar-separator.d.ts +1 -1
- package/dist/components/sidebar/sidebar.d.ts +11 -8
- package/dist/components/slider/slider.d.ts +1 -1
- package/dist/components/sonner/sonner.d.ts +1 -1
- package/dist/components/switch/switch.d.ts +3 -3
- package/dist/components/tab-menu/tab-menu-content.d.ts +1 -1
- package/dist/components/tab-menu/tab-menu-item.d.ts +1 -1
- package/dist/components/tab-menu/tab-menu-list.d.ts +1 -1
- package/dist/components/tab-menu/tab-menu.d.ts +3 -3
- package/dist/components/table/table-body.d.ts +6 -3
- package/dist/components/table/table-caption.d.ts +6 -3
- package/dist/components/table/table-cell.d.ts +8 -5
- package/dist/components/table/table-empty.d.ts +8 -5
- package/dist/components/table/table-footer.d.ts +6 -3
- package/dist/components/table/table-head.d.ts +8 -5
- package/dist/components/table/table-header.d.ts +6 -3
- package/dist/components/table/table-row.d.ts +8 -5
- package/dist/components/table/table.d.ts +6 -3
- package/dist/components/tag/tag.d.ts +11 -8
- package/dist/components/text-input/text-input-button.d.ts +1 -1
- package/dist/components/text-input/text-input.d.ts +24 -20
- package/dist/components/textarea/textarea.d.ts +9 -8
- package/dist/components/tooltip/tooltip-content.d.ts +10 -7
- package/dist/components/tooltip/tooltip-provider.d.ts +9 -6
- package/dist/components/tooltip/tooltip-root.d.ts +10 -7
- package/dist/components/tooltip/tooltip-trigger.d.ts +7 -4
- package/dist/components/tooltip/tooltip.d.ts +10 -7
- package/dist/es/chunks/BubbleSelect.js +290 -0
- package/dist/es/chunks/CollapsibleRoot.js +78 -0
- package/dist/es/chunks/Collection.js +73 -0
- package/dist/es/chunks/ComboboxContent.js +436 -0
- package/dist/es/chunks/ComboboxGroup.js +78 -0
- package/dist/es/chunks/ComboboxInput.js +260 -0
- package/dist/es/chunks/ComboboxItem.js +189 -0
- package/dist/es/chunks/ComboboxLabel.js +41 -0
- package/dist/es/chunks/ComboboxRoot.js +671 -0
- package/dist/es/chunks/ComboboxSeparator.js +29 -0
- package/dist/es/chunks/ConfigProvider.js +6 -0
- package/dist/es/chunks/DialogClose.js +35 -0
- package/dist/es/chunks/DialogDescription.js +32 -0
- package/dist/es/chunks/DialogPortal.js +503 -0
- package/dist/es/chunks/DialogRoot.js +69 -0
- package/dist/es/chunks/DialogTitle.js +32 -0
- package/dist/es/chunks/DialogTrigger.js +51 -0
- package/dist/es/chunks/DismissableLayer.js +280 -0
- package/dist/es/chunks/DropdownMenuPortal.js +67 -0
- package/dist/es/chunks/DropdownMenuRoot.js +75 -0
- package/dist/es/chunks/FocusScope.js +356 -0
- package/dist/es/chunks/Label.js +36 -0
- package/dist/es/chunks/MenuAnchor.js +31 -0
- package/dist/es/chunks/MenuContentImpl.js +359 -0
- package/dist/es/chunks/MenuGroup.js +32 -0
- package/dist/es/chunks/MenuItemImpl.js +94 -0
- package/dist/es/chunks/MenuRoot.js +84 -0
- package/dist/es/chunks/MenuSub.js +56 -0
- package/dist/es/chunks/PaginationRoot.js +89 -0
- package/dist/es/chunks/PinInputRoot.js +141 -0
- package/dist/es/chunks/PopoverRoot.js +61 -0
- package/dist/es/chunks/PopperAnchor.js +42 -0
- package/dist/es/chunks/PopperArrow.js +146 -0
- package/dist/es/chunks/PopperContent.js +2089 -0
- package/dist/es/chunks/PopperRoot.js +20 -0
- package/dist/es/chunks/Presence.js +182 -0
- package/dist/es/chunks/Primitive.js +62 -0
- package/dist/es/chunks/ProgressIndicator.js +149 -0
- package/dist/es/chunks/RadioGroupRoot.js +131 -0
- package/dist/es/chunks/RovingFocusGroup.js +134 -0
- package/dist/es/chunks/RovingFocusItem.js +108 -0
- package/dist/es/chunks/SelectGroup.js +32 -0
- package/dist/es/chunks/SelectItemAlignedPosition.js +563 -0
- package/dist/es/chunks/TabsRoot.js +102 -0
- package/dist/es/chunks/Teleport.js +45 -0
- package/dist/es/chunks/ToggleGroupRoot.js +176 -0
- package/dist/es/chunks/TooltipProvider.js +75 -0
- package/dist/es/chunks/TooltipRoot.js +127 -0
- package/dist/es/chunks/VisuallyHidden.js +59 -0
- package/dist/es/chunks/VisuallyHiddenInput.js +140 -0
- package/dist/es/chunks/alert.js +1 -1
- package/dist/es/chunks/badge.js +1 -1
- package/dist/es/chunks/button.js +3 -3
- package/dist/es/chunks/checkbox-card.js +9 -8
- package/dist/es/chunks/checkbox-label.js +10 -9
- package/dist/es/chunks/checkbox.js +234 -10
- package/dist/es/chunks/clamp.js +64 -0
- package/dist/es/chunks/collapsible-content.js +105 -3
- package/dist/es/chunks/collapsible-trigger.js +50 -2
- package/dist/es/chunks/collapsible.js +5 -3
- package/dist/es/chunks/color-area.js +3 -3
- package/dist/es/chunks/color-picker.js +13 -13
- package/dist/es/chunks/color-swatch.js +2 -2
- package/dist/es/chunks/combobox-anchor.js +45 -4
- package/dist/es/chunks/combobox-empty.js +30 -4
- package/dist/es/chunks/combobox-group.js +5 -4
- package/dist/es/chunks/combobox-input.js +6 -5
- package/dist/es/chunks/combobox-item.js +7 -6
- package/dist/es/chunks/combobox-list.js +104 -8
- package/dist/es/chunks/combobox-root.js +21 -18
- package/dist/es/chunks/combobox-separator.js +3 -3
- package/dist/es/chunks/combobox-trigger.js +63 -5
- package/dist/es/chunks/combobox.js +38 -31
- package/dist/es/chunks/compact-button.js +3 -3
- package/dist/es/chunks/components.js +46 -46
- package/dist/es/chunks/content-divider.js +87 -3
- package/dist/es/chunks/core.js +2 -2
- package/dist/es/chunks/counter-input.js +884 -9
- package/dist/es/chunks/createContext.js +32 -0
- package/dist/es/chunks/digit-input-group.js +5 -4
- package/dist/es/chunks/digit-input-slot.js +242 -5
- package/dist/es/chunks/digit-input.js +7 -6
- package/dist/es/chunks/dist.js +486 -11478
- package/dist/es/chunks/dropdown-menu-content.js +541 -6
- package/dist/es/chunks/dropdown-menu-group.js +29 -4
- package/dist/es/chunks/dropdown-menu-item.js +125 -5
- package/dist/es/chunks/dropdown-menu-label.js +58 -5
- package/dist/es/chunks/dropdown-menu-separator.js +56 -4
- package/dist/es/chunks/dropdown-menu-sub-content.js +294 -6
- package/dist/es/chunks/dropdown-menu-sub-trigger.js +192 -5
- package/dist/es/chunks/dropdown-menu-sub.js +40 -4
- package/dist/es/chunks/dropdown-menu-trigger.js +90 -5
- package/dist/es/chunks/dropdown-menu.js +5 -4
- package/dist/es/chunks/extra-settings.js +4 -4
- package/dist/es/chunks/fancy-button.js +3 -3
- package/dist/es/chunks/file-upload-area.js +1 -1
- package/dist/es/chunks/getActiveElement.js +9 -0
- package/dist/es/chunks/handleAndDispatchCustomEvent.js +13 -0
- package/dist/es/chunks/hint-text.js +1 -1
- package/dist/es/chunks/isValueEqualOrExist.js +19 -0
- package/dist/es/chunks/{label.js → label2.js} +15 -9
- package/dist/es/chunks/link-bubble.js +6 -6
- package/dist/es/chunks/link-button.js +3 -3
- package/dist/es/chunks/menus.js +2 -2
- package/dist/es/chunks/modal-close.js +2 -2
- package/dist/es/chunks/modal-content.js +7 -7
- package/dist/es/chunks/modal-header.js +7 -5
- package/dist/es/chunks/modal-trigger.js +2 -2
- package/dist/es/chunks/modal.js +6 -4
- package/dist/es/chunks/nullish.js +6 -0
- package/dist/es/chunks/ohash.D__AXeF1.js +109 -0
- package/dist/es/chunks/pagination-content.js +85 -4
- package/dist/es/chunks/pagination-ellipsis.js +29 -4
- package/dist/es/chunks/pagination-first.js +39 -4
- package/dist/es/chunks/pagination-item.js +51 -3
- package/dist/es/chunks/pagination-last.js +39 -4
- package/dist/es/chunks/pagination-next.js +39 -4
- package/dist/es/chunks/pagination-previous.js +39 -4
- package/dist/es/chunks/pagination.js +5 -4
- package/dist/es/chunks/popover-content.js +704 -8
- package/dist/es/chunks/popover-trigger.js +61 -4
- package/dist/es/chunks/popover.js +4 -3
- package/dist/es/chunks/progress-bar.js +6 -5
- package/dist/es/chunks/progress-circle.js +6 -5
- package/dist/es/chunks/radio-group-card.js +9 -8
- package/dist/es/chunks/radio-group-item.js +304 -7
- package/dist/es/chunks/radio-group-label.js +10 -9
- package/dist/es/chunks/radio-group.js +6 -5
- package/dist/es/chunks/rich-editor.js +5 -5
- package/dist/es/chunks/scroll-area.js +141 -7
- package/dist/es/chunks/scroll-bar.js +883 -6
- package/dist/es/chunks/segmented-control-item.js +162 -4
- package/dist/es/chunks/segmented-control.js +7 -4
- package/dist/es/chunks/select-content.js +319 -7
- package/dist/es/chunks/select-group.js +2 -2
- package/dist/es/chunks/select-item.js +226 -6
- package/dist/es/chunks/select-label.js +33 -3
- package/dist/es/chunks/select-separator.js +27 -4
- package/dist/es/chunks/select-trigger.js +164 -5
- package/dist/es/chunks/select-value.js +64 -4
- package/dist/es/chunks/select.js +8 -4
- package/dist/es/chunks/sheet-close.js +3 -3
- package/dist/es/chunks/sheet-content.js +8 -7
- package/dist/es/chunks/sheet-description.js +3 -3
- package/dist/es/chunks/sheet-footer.js +1 -1
- package/dist/es/chunks/sheet-header.js +1 -1
- package/dist/es/chunks/sheet-title.js +3 -3
- package/dist/es/chunks/sheet-trigger.js +2 -2
- package/dist/es/chunks/sheet.js +6 -4
- package/dist/es/chunks/sidebar-element.js +2 -2
- package/dist/es/chunks/sidebar-group-label.js +2 -2
- package/dist/es/chunks/sidebar-menu-action.js +2 -2
- package/dist/es/chunks/sidebar-menu-button.js +2 -2
- package/dist/es/chunks/sidebar-menu-sub-button.js +2 -2
- package/dist/es/chunks/slider.js +751 -8
- package/dist/es/chunks/social-button.js +3 -3
- package/dist/es/chunks/sonner-alert.js +1 -1
- package/dist/es/chunks/status-badge.js +1 -1
- package/dist/es/chunks/switch.js +192 -10
- package/dist/es/chunks/tab-menu-content.js +81 -4
- package/dist/es/chunks/tab-menu-item.js +89 -5
- package/dist/es/chunks/tab-menu-list.js +60 -4
- package/dist/es/chunks/tab-menu.js +6 -4
- package/dist/es/chunks/table-body.js +1 -1
- package/dist/es/chunks/table-caption.js +1 -1
- package/dist/es/chunks/table-cell.js +1 -1
- package/dist/es/chunks/table-footer.js +1 -1
- package/dist/es/chunks/table-head.js +1 -1
- package/dist/es/chunks/table-row.js +1 -1
- package/dist/es/chunks/table.js +1 -1
- package/dist/es/chunks/table2.js +1 -1
- package/dist/es/chunks/tag.js +3 -3
- package/dist/es/chunks/text-input-button.js +11 -5
- package/dist/es/chunks/text-input.js +8 -8
- package/dist/es/chunks/textarea.js +1 -1
- package/dist/es/chunks/tooltip-content.js +589 -8
- package/dist/es/chunks/tooltip-provider.js +4 -3
- package/dist/es/chunks/tooltip-root.js +4 -3
- package/dist/es/chunks/tooltip-trigger.js +109 -4
- package/dist/es/chunks/tooltip.js +7 -5
- package/dist/es/chunks/useArrowNavigation.js +60 -0
- package/dist/es/chunks/useComposing.js +21 -0
- package/dist/es/chunks/useDirection.js +14 -0
- package/dist/es/chunks/useEmitAsProps.js +28 -0
- package/dist/es/chunks/useFocusGuards.js +34 -0
- package/dist/es/chunks/useFormControl.js +8 -0
- package/dist/es/chunks/useForwardExpose.js +58 -0
- package/dist/es/chunks/useForwardProps.js +34 -0
- package/dist/es/chunks/useForwardPropsEmits.js +14 -0
- package/dist/es/chunks/useForwardScopeId.js +25 -0
- package/dist/es/chunks/useHideOthers.js +132 -0
- package/dist/es/chunks/useId.js +23 -0
- package/dist/es/chunks/useKbd.js +41 -0
- package/dist/es/chunks/useNonce.js +9 -0
- package/dist/es/chunks/usePrimitiveElement.js +12 -0
- package/dist/es/chunks/useSize.js +49 -0
- package/dist/es/chunks/useTypeahead.js +64 -0
- package/dist/es/chunks/utils.js +58 -0
- package/dist/es/chunks/utils2.js +44 -0
- package/dist/es/chunks/utils3.js +9 -0
- package/dist/es/command-group.js +5 -4
- package/dist/es/command-input.js +8 -6
- package/dist/es/command-item.js +5 -3
- package/dist/es/command-list.js +13 -7
- package/dist/es/command-root.js +19 -16
- package/dist/es/command-separator.js +3 -3
- package/dist/es/config.js +1 -1
- package/dist/es/index.js +46 -46
- package/dist/es/label.js +1 -1
- package/dist/es/use-sidebar.js +2 -2
- package/dist/utils/sonner.d.ts +1 -1
- package/package.json +11 -11
- package/src/components/alert/alert.vue +8 -10
- package/src/components/badge/badge.vue +7 -9
- package/src/components/badge/status-badge.vue +10 -11
- package/src/components/button/button.vue +9 -10
- package/src/components/button/compact-button.vue +8 -9
- package/src/components/button/fancy-button.vue +10 -11
- package/src/components/button/link-button.vue +8 -9
- package/src/components/button/social-button.vue +5 -7
- package/src/components/checkbox/checkbox-card.vue +2 -2
- package/src/components/checkbox/checkbox-label.vue +2 -1
- package/src/components/checkbox/checkbox.vue +2 -2
- package/src/components/checkbox/stories/checkbox.stories.ts +4 -5
- package/src/components/collapsible/collapsible-content.vue +4 -6
- package/src/components/collapsible/collapsible-trigger.vue +4 -6
- package/src/components/collapsible/collapsible.vue +4 -6
- package/src/components/color-picker/alpha-slider.vue +8 -10
- package/src/components/color-picker/color-area.vue +8 -10
- package/src/components/color-picker/color-picker.vue +43 -43
- package/src/components/color-picker/color-swatch.vue +11 -13
- package/src/components/color-picker/composable/use-color-model.ts +2 -1
- package/src/components/color-picker/composable/use-user-select.ts +2 -1
- package/src/components/combobox/combobox-anchor.vue +4 -3
- package/src/components/combobox/combobox-empty.vue +4 -3
- package/src/components/combobox/combobox-group.vue +5 -4
- package/src/components/combobox/combobox-input.vue +6 -3
- package/src/components/combobox/combobox-item.vue +19 -20
- package/src/components/combobox/combobox-list.vue +7 -6
- package/src/components/combobox/combobox-root.vue +2 -1
- package/src/components/combobox/combobox-separator.vue +4 -3
- package/src/components/combobox/combobox-trigger.vue +25 -23
- package/src/components/combobox/combobox.vue +38 -32
- package/src/components/command/command-group.vue +4 -3
- package/src/components/command/command-input.vue +4 -2
- package/src/components/command/command-item.vue +4 -3
- package/src/components/command/command-list.vue +5 -6
- package/src/components/command/command-root.vue +4 -3
- package/src/components/command/command-separator.vue +4 -3
- package/src/components/content-divider/content-divider.vue +7 -9
- package/src/components/counter-input/counter-input.vue +2 -1
- package/src/components/digit-input/digit-input-group.vue +2 -1
- package/src/components/digit-input/digit-input-slot.vue +2 -1
- package/src/components/digit-input/digit-input.vue +8 -5
- package/src/components/digit-input/stories/digit-input.stories.ts +13 -3
- package/src/components/dropdown-menu/dropdown-menu-content.vue +4 -4
- package/src/components/dropdown-menu/dropdown-menu-group.vue +2 -1
- package/src/components/dropdown-menu/dropdown-menu-item.vue +2 -1
- package/src/components/dropdown-menu/dropdown-menu-label.vue +2 -1
- package/src/components/dropdown-menu/dropdown-menu-separator.vue +3 -2
- package/src/components/dropdown-menu/dropdown-menu-sub-content.vue +4 -4
- package/src/components/dropdown-menu/dropdown-menu-sub-trigger.vue +3 -2
- package/src/components/dropdown-menu/dropdown-menu-sub.vue +3 -3
- package/src/components/dropdown-menu/dropdown-menu-trigger.vue +2 -1
- package/src/components/dropdown-menu/dropdown-menu.vue +2 -2
- package/src/components/file-upload/file-upload-area.vue +26 -27
- package/src/components/file-upload/stories/file-upload-area.stories.ts +2 -1
- package/src/components/hint-text/hint-text.vue +4 -6
- package/src/components/label/label.vue +9 -7
- package/src/components/modal/modal-close.vue +2 -1
- package/src/components/modal/modal-content.vue +2 -2
- package/src/components/modal/modal-header.vue +1 -1
- package/src/components/modal/modal-trigger.vue +2 -2
- package/src/components/modal/modal.vue +2 -2
- package/src/components/pagination/pagination-content.vue +6 -7
- package/src/components/pagination/pagination-ellipsis.vue +6 -7
- package/src/components/pagination/pagination-first.vue +6 -7
- package/src/components/pagination/pagination-item.vue +6 -7
- package/src/components/pagination/pagination-last.vue +6 -7
- package/src/components/pagination/pagination-next.vue +6 -7
- package/src/components/pagination/pagination-previous.vue +7 -8
- package/src/components/pagination/pagination.vue +7 -8
- package/src/components/popover/popover-content.vue +19 -20
- package/src/components/popover/popover-trigger.vue +2 -1
- package/src/components/popover/popover.vue +2 -2
- package/src/components/popover/stories/popover.stories.ts +1 -1
- package/src/components/progress/progress-bar.vue +5 -3
- package/src/components/progress/progress-circle.vue +3 -2
- package/src/components/radio-group/radio-group-card.vue +2 -2
- package/src/components/radio-group/radio-group-item.vue +2 -1
- package/src/components/radio-group/radio-group-label.vue +2 -1
- package/src/components/radio-group/radio-group.vue +2 -1
- package/src/components/rich-editor/config.ts +1 -1
- package/src/components/rich-editor/extra-settings.vue +1 -1
- package/src/components/rich-editor/link-bubble.vue +1 -1
- package/src/components/rich-editor/rich-editor.vue +3 -2
- package/src/components/scroll-area/scroll-area.vue +3 -2
- package/src/components/scroll-area/scroll-bar.vue +2 -1
- package/src/components/segmented-control/segmented-control-item.vue +2 -1
- package/src/components/segmented-control/segmented-control.vue +2 -1
- package/src/components/select/select-content.vue +4 -3
- package/src/components/select/select-group.vue +2 -1
- package/src/components/select/select-item.vue +2 -1
- package/src/components/select/select-label.vue +2 -1
- package/src/components/select/select-separator.vue +2 -1
- package/src/components/select/select-trigger.vue +2 -1
- package/src/components/select/select-value.vue +2 -1
- package/src/components/select/select.vue +2 -1
- package/src/components/sheet/sheet-close.vue +4 -6
- package/src/components/sheet/sheet-content.vue +7 -9
- package/src/components/sheet/sheet-description.vue +6 -8
- package/src/components/sheet/sheet-footer.vue +2 -4
- package/src/components/sheet/sheet-header.vue +2 -4
- package/src/components/sheet/sheet-title.vue +6 -8
- package/src/components/sheet/sheet-trigger.vue +4 -6
- package/src/components/sheet/sheet.vue +2 -2
- package/src/components/sidebar/sidebar-element.vue +6 -8
- package/src/components/sidebar/sidebar-footer.vue +2 -4
- package/src/components/sidebar/sidebar-group-label.vue +2 -2
- package/src/components/sidebar/sidebar-header.vue +2 -4
- package/src/components/sidebar/sidebar-menu-action.vue +6 -8
- package/src/components/sidebar/sidebar-menu-badge.vue +6 -8
- package/src/components/sidebar/sidebar-menu-button.vue +2 -2
- package/src/components/sidebar/sidebar-menu-sub-button.vue +8 -10
- package/src/components/sidebar/sidebar-separator.vue +2 -4
- package/src/components/sidebar/sidebar.vue +6 -8
- package/src/components/slider/slider.vue +2 -1
- package/src/components/sonner/sonner-alert.vue +2 -1
- package/src/components/sonner/sonner.vue +4 -5
- package/src/components/switch/stories/switch.stories.ts +3 -3
- package/src/components/switch/switch.vue +2 -1
- package/src/components/tab-menu/tab-menu-content.vue +2 -1
- package/src/components/tab-menu/tab-menu-item.vue +2 -1
- package/src/components/tab-menu/tab-menu-list.vue +2 -1
- package/src/components/tab-menu/tab-menu.vue +2 -2
- package/src/components/table/table-body.vue +2 -4
- package/src/components/table/table-caption.vue +2 -4
- package/src/components/table/table-cell.vue +5 -7
- package/src/components/table/table-empty.vue +5 -7
- package/src/components/table/table-footer.vue +2 -4
- package/src/components/table/table-head.vue +5 -7
- package/src/components/table/table-header.vue +2 -4
- package/src/components/table/table-row.vue +5 -7
- package/src/components/table/table.vue +2 -4
- package/src/components/tag/tag.vue +10 -11
- package/src/components/text-input/text-input-button.vue +3 -2
- package/src/components/text-input/text-input.vue +9 -10
- package/src/components/textarea/textarea.vue +8 -10
- package/src/components/tooltip/tooltip-content.vue +14 -15
- package/src/components/tooltip/tooltip-provider.vue +4 -5
- package/src/components/tooltip/tooltip-root.vue +4 -5
- package/src/components/tooltip/tooltip-trigger.vue +4 -5
- package/src/components/tooltip/tooltip.vue +12 -14
- package/src/composables/use-delegated-props.ts +2 -1
- package/src/composables/use-sidebar.ts +1 -1
- package/src/utils/sonner.ts +2 -1
package/dist/es/chunks/slider.js
CHANGED
|
@@ -1,13 +1,753 @@
|
|
|
1
|
-
import { Ft as rg, I as Se, It as sg, Ot as og, wt as lg } from "./dist.js";
|
|
2
1
|
import { t as clsx } from "./clsx.js";
|
|
2
|
+
import { t as clamp } from "./clamp.js";
|
|
3
|
+
import { t as createContext } from "./createContext.js";
|
|
4
|
+
import { a as useMounted, s as useVModel } from "./dist.js";
|
|
5
|
+
import { t as Primitive } from "./Primitive.js";
|
|
6
|
+
import { t as useDirection } from "./useDirection.js";
|
|
7
|
+
import { t as useFormControl } from "./useFormControl.js";
|
|
8
|
+
import { t as useForwardExpose } from "./useForwardExpose.js";
|
|
9
|
+
import { t as useForwardPropsEmits } from "./useForwardPropsEmits.js";
|
|
10
|
+
import { t as useSize } from "./useSize.js";
|
|
11
|
+
import { t as useCollection } from "./Collection.js";
|
|
12
|
+
import { t as VisuallyHiddenInput_default } from "./VisuallyHiddenInput.js";
|
|
3
13
|
import { useDelegatedProps } from "../use-delegated-props.js";
|
|
4
|
-
import { Fragment, createBlock, createElementBlock, createVNode, defineComponent, mergeProps, openBlock, renderList, unref, withCtx } from "vue";
|
|
14
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createVNode, defineComponent, mergeProps, normalizeStyle, onMounted, onUnmounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toRaw, toRefs, unref, withCtx } from "vue";
|
|
15
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@5.9.3_/node_modules/reka-ui/dist/Slider/utils.js
|
|
16
|
+
function getNextSortedValues(prevValues = [], nextValue, atIndex) {
|
|
17
|
+
const nextValues = [...prevValues];
|
|
18
|
+
nextValues[atIndex] = nextValue;
|
|
19
|
+
return nextValues.sort((a, b) => a - b);
|
|
20
|
+
}
|
|
21
|
+
function convertValueToPercentage(value, min, max) {
|
|
22
|
+
return clamp(100 / (max - min) * (value - min), 0, 100);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Returns a label for each thumb when there are two or more thumbs
|
|
26
|
+
*/
|
|
27
|
+
function getLabel(index, totalValues) {
|
|
28
|
+
if (totalValues > 2) return `Value ${index + 1} of ${totalValues}`;
|
|
29
|
+
else if (totalValues === 2) return ["Minimum", "Maximum"][index];
|
|
30
|
+
else return void 0;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Given a `values` array and a `nextValue`, determine which value in
|
|
34
|
+
* the array is closest to `nextValue` and return its index.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* // returns 1
|
|
38
|
+
* getClosestValueIndex([10, 30], 25);
|
|
39
|
+
*/
|
|
40
|
+
function getClosestValueIndex(values, nextValue) {
|
|
41
|
+
if (values.length === 1) return 0;
|
|
42
|
+
const distances = values.map((value) => Math.abs(value - nextValue));
|
|
43
|
+
const closestDistance = Math.min(...distances);
|
|
44
|
+
return distances.indexOf(closestDistance);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Offsets the thumb centre point while sliding to ensure it remains
|
|
48
|
+
* within the bounds of the slider when reaching the edges
|
|
49
|
+
*/
|
|
50
|
+
function getThumbInBoundsOffset(width, left, direction) {
|
|
51
|
+
const halfWidth = width / 2;
|
|
52
|
+
return (halfWidth - linearScale([0, 50], [0, halfWidth])(left) * direction) * direction;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Gets an array of steps between each value.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* // returns [1, 9]
|
|
59
|
+
* getStepsBetweenValues([10, 11, 20]);
|
|
60
|
+
*/
|
|
61
|
+
function getStepsBetweenValues(values) {
|
|
62
|
+
return values.slice(0, -1).map((value, index) => values[index + 1] - value);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Verifies the minimum steps between all values is greater than or equal
|
|
66
|
+
* to the expected minimum steps.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* // returns false
|
|
70
|
+
* hasMinStepsBetweenValues([1,2,3], 2);
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* // returns true
|
|
74
|
+
* hasMinStepsBetweenValues([1,2,3], 1);
|
|
75
|
+
*/
|
|
76
|
+
function hasMinStepsBetweenValues(values, minStepsBetweenValues) {
|
|
77
|
+
if (minStepsBetweenValues > 0) {
|
|
78
|
+
const stepsBetweenValues = getStepsBetweenValues(values);
|
|
79
|
+
return Math.min(...stepsBetweenValues) >= minStepsBetweenValues;
|
|
80
|
+
}
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
function linearScale(input, output) {
|
|
84
|
+
return (value) => {
|
|
85
|
+
if (input[0] === input[1] || output[0] === output[1]) return output[0];
|
|
86
|
+
const ratio = (output[1] - output[0]) / (input[1] - input[0]);
|
|
87
|
+
return output[0] + ratio * (value - input[0]);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function getDecimalCount(value) {
|
|
91
|
+
return (String(value).split(".")[1] || "").length;
|
|
92
|
+
}
|
|
93
|
+
function roundValue(value, decimalCount) {
|
|
94
|
+
const rounder = 10 ** decimalCount;
|
|
95
|
+
return Math.round(value * rounder) / rounder;
|
|
96
|
+
}
|
|
97
|
+
var PAGE_KEYS = ["PageUp", "PageDown"];
|
|
98
|
+
var ARROW_KEYS = [
|
|
99
|
+
"ArrowUp",
|
|
100
|
+
"ArrowDown",
|
|
101
|
+
"ArrowLeft",
|
|
102
|
+
"ArrowRight"
|
|
103
|
+
];
|
|
104
|
+
var BACK_KEYS = {
|
|
105
|
+
"from-left": [
|
|
106
|
+
"Home",
|
|
107
|
+
"PageDown",
|
|
108
|
+
"ArrowDown",
|
|
109
|
+
"ArrowLeft"
|
|
110
|
+
],
|
|
111
|
+
"from-right": [
|
|
112
|
+
"Home",
|
|
113
|
+
"PageDown",
|
|
114
|
+
"ArrowDown",
|
|
115
|
+
"ArrowRight"
|
|
116
|
+
],
|
|
117
|
+
"from-bottom": [
|
|
118
|
+
"Home",
|
|
119
|
+
"PageDown",
|
|
120
|
+
"ArrowDown",
|
|
121
|
+
"ArrowLeft"
|
|
122
|
+
],
|
|
123
|
+
"from-top": [
|
|
124
|
+
"Home",
|
|
125
|
+
"PageUp",
|
|
126
|
+
"ArrowUp",
|
|
127
|
+
"ArrowLeft"
|
|
128
|
+
]
|
|
129
|
+
};
|
|
130
|
+
var [injectSliderOrientationContext, provideSliderOrientationContext] = /* @__PURE__ */ createContext(["SliderVertical", "SliderHorizontal"]);
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@5.9.3_/node_modules/reka-ui/dist/Slider/SliderHorizontal.js
|
|
133
|
+
var SliderHorizontal_default = /* @__PURE__ */ defineComponent({
|
|
134
|
+
__name: "SliderHorizontal",
|
|
135
|
+
props: {
|
|
136
|
+
dir: {
|
|
137
|
+
type: String,
|
|
138
|
+
required: false
|
|
139
|
+
},
|
|
140
|
+
min: {
|
|
141
|
+
type: Number,
|
|
142
|
+
required: true
|
|
143
|
+
},
|
|
144
|
+
max: {
|
|
145
|
+
type: Number,
|
|
146
|
+
required: true
|
|
147
|
+
},
|
|
148
|
+
inverted: {
|
|
149
|
+
type: Boolean,
|
|
150
|
+
required: true
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
emits: [
|
|
154
|
+
"slideEnd",
|
|
155
|
+
"slideStart",
|
|
156
|
+
"slideMove",
|
|
157
|
+
"homeKeyDown",
|
|
158
|
+
"endKeyDown",
|
|
159
|
+
"stepKeyDown"
|
|
160
|
+
],
|
|
161
|
+
setup(__props, { emit: __emit }) {
|
|
162
|
+
const props = __props;
|
|
163
|
+
const emits = __emit;
|
|
164
|
+
const { max, min, dir, inverted } = toRefs(props);
|
|
165
|
+
const { forwardRef, currentElement: sliderElement } = useForwardExpose();
|
|
166
|
+
const rootContext = injectSliderRootContext();
|
|
167
|
+
const offsetPosition = ref();
|
|
168
|
+
const rectRef = ref();
|
|
169
|
+
const isSlidingFromLeft = computed(() => dir?.value !== "rtl" && !inverted.value || dir?.value !== "ltr" && inverted.value);
|
|
170
|
+
function getValueFromPointerEvent(event, slideStart) {
|
|
171
|
+
const rect = rectRef.value || sliderElement.value.getBoundingClientRect();
|
|
172
|
+
const thumb = [...rootContext.thumbElements.value][rootContext.valueIndexToChangeRef.value];
|
|
173
|
+
const thumbWidth = rootContext.thumbAlignment.value === "contain" ? thumb.clientWidth : 0;
|
|
174
|
+
if (!offsetPosition.value && !slideStart && rootContext.thumbAlignment.value === "contain") offsetPosition.value = event.clientX - thumb.getBoundingClientRect().left;
|
|
175
|
+
const value = linearScale([0, rect.width - thumbWidth], isSlidingFromLeft.value ? [min.value, max.value] : [max.value, min.value]);
|
|
176
|
+
rectRef.value = rect;
|
|
177
|
+
return value(slideStart ? event.clientX - rect.left - thumbWidth / 2 : event.clientX - rect.left - (offsetPosition.value ?? 0));
|
|
178
|
+
}
|
|
179
|
+
provideSliderOrientationContext({
|
|
180
|
+
startEdge: computed(() => isSlidingFromLeft.value ? "left" : "right"),
|
|
181
|
+
endEdge: computed(() => isSlidingFromLeft.value ? "right" : "left"),
|
|
182
|
+
direction: computed(() => isSlidingFromLeft.value ? 1 : -1),
|
|
183
|
+
size: "width"
|
|
184
|
+
});
|
|
185
|
+
return (_ctx, _cache) => {
|
|
186
|
+
return openBlock(), createBlock(SliderImpl_default, {
|
|
187
|
+
ref: unref(forwardRef),
|
|
188
|
+
dir: unref(dir),
|
|
189
|
+
"data-orientation": "horizontal",
|
|
190
|
+
style: normalizeStyle({ ["--reka-slider-thumb-transform"]: !isSlidingFromLeft.value && unref(rootContext).thumbAlignment.value === "overflow" ? "translateX(50%)" : "translateX(-50%)" }),
|
|
191
|
+
onSlideStart: _cache[0] || (_cache[0] = (event) => {
|
|
192
|
+
emits("slideStart", getValueFromPointerEvent(event, true));
|
|
193
|
+
}),
|
|
194
|
+
onSlideMove: _cache[1] || (_cache[1] = (event) => {
|
|
195
|
+
emits("slideMove", getValueFromPointerEvent(event));
|
|
196
|
+
}),
|
|
197
|
+
onSlideEnd: _cache[2] || (_cache[2] = () => {
|
|
198
|
+
rectRef.value = void 0;
|
|
199
|
+
offsetPosition.value = void 0;
|
|
200
|
+
emits("slideEnd");
|
|
201
|
+
}),
|
|
202
|
+
onStepKeyDown: _cache[3] || (_cache[3] = (event) => {
|
|
203
|
+
const slideDirection = isSlidingFromLeft.value ? "from-left" : "from-right";
|
|
204
|
+
emits("stepKeyDown", event, unref(BACK_KEYS)[slideDirection].includes(event.key) ? -1 : 1);
|
|
205
|
+
}),
|
|
206
|
+
onEndKeyDown: _cache[4] || (_cache[4] = ($event) => emits("endKeyDown", $event)),
|
|
207
|
+
onHomeKeyDown: _cache[5] || (_cache[5] = ($event) => emits("homeKeyDown", $event))
|
|
208
|
+
}, {
|
|
209
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
210
|
+
_: 3
|
|
211
|
+
}, 8, ["dir", "style"]);
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@5.9.3_/node_modules/reka-ui/dist/Slider/SliderVertical.js
|
|
217
|
+
var SliderVertical_default = /* @__PURE__ */ defineComponent({
|
|
218
|
+
__name: "SliderVertical",
|
|
219
|
+
props: {
|
|
220
|
+
min: {
|
|
221
|
+
type: Number,
|
|
222
|
+
required: true
|
|
223
|
+
},
|
|
224
|
+
max: {
|
|
225
|
+
type: Number,
|
|
226
|
+
required: true
|
|
227
|
+
},
|
|
228
|
+
inverted: {
|
|
229
|
+
type: Boolean,
|
|
230
|
+
required: true
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
emits: [
|
|
234
|
+
"slideEnd",
|
|
235
|
+
"slideStart",
|
|
236
|
+
"slideMove",
|
|
237
|
+
"homeKeyDown",
|
|
238
|
+
"endKeyDown",
|
|
239
|
+
"stepKeyDown"
|
|
240
|
+
],
|
|
241
|
+
setup(__props, { emit: __emit }) {
|
|
242
|
+
const props = __props;
|
|
243
|
+
const emits = __emit;
|
|
244
|
+
const { max, min, inverted } = toRefs(props);
|
|
245
|
+
const rootContext = injectSliderRootContext();
|
|
246
|
+
const { forwardRef, currentElement: sliderElement } = useForwardExpose();
|
|
247
|
+
const offsetPosition = ref();
|
|
248
|
+
const rectRef = ref();
|
|
249
|
+
const isSlidingFromBottom = computed(() => !inverted.value);
|
|
250
|
+
function getValueFromPointerEvent(event, slideStart) {
|
|
251
|
+
const rect = rectRef.value || sliderElement.value.getBoundingClientRect();
|
|
252
|
+
const thumb = [...rootContext.thumbElements.value][rootContext.valueIndexToChangeRef.value];
|
|
253
|
+
const thumbHeight = rootContext.thumbAlignment.value === "contain" ? thumb.clientHeight : 0;
|
|
254
|
+
if (!offsetPosition.value && !slideStart && rootContext.thumbAlignment.value === "contain") offsetPosition.value = event.clientY - thumb.getBoundingClientRect().top;
|
|
255
|
+
const value = linearScale([0, rect.height - thumbHeight], isSlidingFromBottom.value ? [max.value, min.value] : [min.value, max.value]);
|
|
256
|
+
const position = slideStart ? event.clientY - rect.top - thumbHeight / 2 : event.clientY - rect.top - (offsetPosition.value ?? 0);
|
|
257
|
+
rectRef.value = rect;
|
|
258
|
+
return value(position);
|
|
259
|
+
}
|
|
260
|
+
provideSliderOrientationContext({
|
|
261
|
+
startEdge: computed(() => isSlidingFromBottom.value ? "bottom" : "top"),
|
|
262
|
+
endEdge: computed(() => isSlidingFromBottom.value ? "top" : "bottom"),
|
|
263
|
+
direction: computed(() => isSlidingFromBottom.value ? 1 : -1),
|
|
264
|
+
size: "height"
|
|
265
|
+
});
|
|
266
|
+
return (_ctx, _cache) => {
|
|
267
|
+
return openBlock(), createBlock(SliderImpl_default, {
|
|
268
|
+
ref: unref(forwardRef),
|
|
269
|
+
"data-orientation": "vertical",
|
|
270
|
+
style: normalizeStyle({ ["--reka-slider-thumb-transform"]: !isSlidingFromBottom.value && unref(rootContext).thumbAlignment.value === "overflow" ? "translateY(-50%)" : "translateY(50%)" }),
|
|
271
|
+
onSlideStart: _cache[0] || (_cache[0] = (event) => {
|
|
272
|
+
emits("slideStart", getValueFromPointerEvent(event, true));
|
|
273
|
+
}),
|
|
274
|
+
onSlideMove: _cache[1] || (_cache[1] = (event) => {
|
|
275
|
+
emits("slideMove", getValueFromPointerEvent(event));
|
|
276
|
+
}),
|
|
277
|
+
onSlideEnd: _cache[2] || (_cache[2] = () => {
|
|
278
|
+
rectRef.value = void 0;
|
|
279
|
+
offsetPosition.value = void 0;
|
|
280
|
+
emits("slideEnd");
|
|
281
|
+
}),
|
|
282
|
+
onStepKeyDown: _cache[3] || (_cache[3] = (event) => {
|
|
283
|
+
const slideDirection = isSlidingFromBottom.value ? "from-bottom" : "from-top";
|
|
284
|
+
emits("stepKeyDown", event, unref(BACK_KEYS)[slideDirection].includes(event.key) ? -1 : 1);
|
|
285
|
+
}),
|
|
286
|
+
onEndKeyDown: _cache[4] || (_cache[4] = ($event) => emits("endKeyDown", $event)),
|
|
287
|
+
onHomeKeyDown: _cache[5] || (_cache[5] = ($event) => emits("homeKeyDown", $event))
|
|
288
|
+
}, {
|
|
289
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
290
|
+
_: 3
|
|
291
|
+
}, 8, ["style"]);
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
//#endregion
|
|
296
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@5.9.3_/node_modules/reka-ui/dist/Slider/SliderRoot.js
|
|
297
|
+
var [injectSliderRootContext, provideSliderRootContext] = /* @__PURE__ */ createContext("SliderRoot");
|
|
298
|
+
var SliderRoot_default = /* @__PURE__ */ defineComponent({
|
|
299
|
+
inheritAttrs: false,
|
|
300
|
+
__name: "SliderRoot",
|
|
301
|
+
props: {
|
|
302
|
+
defaultValue: {
|
|
303
|
+
type: Array,
|
|
304
|
+
required: false,
|
|
305
|
+
default: () => [0]
|
|
306
|
+
},
|
|
307
|
+
modelValue: {
|
|
308
|
+
type: [Array, null],
|
|
309
|
+
required: false
|
|
310
|
+
},
|
|
311
|
+
disabled: {
|
|
312
|
+
type: Boolean,
|
|
313
|
+
required: false,
|
|
314
|
+
default: false
|
|
315
|
+
},
|
|
316
|
+
orientation: {
|
|
317
|
+
type: String,
|
|
318
|
+
required: false,
|
|
319
|
+
default: "horizontal"
|
|
320
|
+
},
|
|
321
|
+
dir: {
|
|
322
|
+
type: String,
|
|
323
|
+
required: false
|
|
324
|
+
},
|
|
325
|
+
inverted: {
|
|
326
|
+
type: Boolean,
|
|
327
|
+
required: false,
|
|
328
|
+
default: false
|
|
329
|
+
},
|
|
330
|
+
min: {
|
|
331
|
+
type: Number,
|
|
332
|
+
required: false,
|
|
333
|
+
default: 0
|
|
334
|
+
},
|
|
335
|
+
max: {
|
|
336
|
+
type: Number,
|
|
337
|
+
required: false,
|
|
338
|
+
default: 100
|
|
339
|
+
},
|
|
340
|
+
step: {
|
|
341
|
+
type: Number,
|
|
342
|
+
required: false,
|
|
343
|
+
default: 1
|
|
344
|
+
},
|
|
345
|
+
minStepsBetweenThumbs: {
|
|
346
|
+
type: Number,
|
|
347
|
+
required: false,
|
|
348
|
+
default: 0
|
|
349
|
+
},
|
|
350
|
+
thumbAlignment: {
|
|
351
|
+
type: String,
|
|
352
|
+
required: false,
|
|
353
|
+
default: "contain"
|
|
354
|
+
},
|
|
355
|
+
asChild: {
|
|
356
|
+
type: Boolean,
|
|
357
|
+
required: false
|
|
358
|
+
},
|
|
359
|
+
as: {
|
|
360
|
+
type: null,
|
|
361
|
+
required: false,
|
|
362
|
+
default: "span"
|
|
363
|
+
},
|
|
364
|
+
name: {
|
|
365
|
+
type: String,
|
|
366
|
+
required: false
|
|
367
|
+
},
|
|
368
|
+
required: {
|
|
369
|
+
type: Boolean,
|
|
370
|
+
required: false
|
|
371
|
+
}
|
|
372
|
+
},
|
|
373
|
+
emits: ["update:modelValue", "valueCommit"],
|
|
374
|
+
setup(__props, { emit: __emit }) {
|
|
375
|
+
const props = __props;
|
|
376
|
+
const emits = __emit;
|
|
377
|
+
const { min, max, step, minStepsBetweenThumbs, orientation, disabled, thumbAlignment, dir: propDir } = toRefs(props);
|
|
378
|
+
const dir = useDirection(propDir);
|
|
379
|
+
const { forwardRef, currentElement } = useForwardExpose();
|
|
380
|
+
const isFormControl = useFormControl(currentElement);
|
|
381
|
+
const { CollectionSlot } = useCollection({ isProvider: true });
|
|
382
|
+
const modelValue = useVModel(props, "modelValue", emits, {
|
|
383
|
+
defaultValue: props.defaultValue,
|
|
384
|
+
passive: props.modelValue === void 0
|
|
385
|
+
});
|
|
386
|
+
const currentModelValue = computed(() => Array.isArray(modelValue.value) ? [...modelValue.value] : []);
|
|
387
|
+
const valueIndexToChangeRef = ref(0);
|
|
388
|
+
const valuesBeforeSlideStartRef = ref(currentModelValue.value);
|
|
389
|
+
function handleSlideStart(value) {
|
|
390
|
+
updateValues(value, getClosestValueIndex(currentModelValue.value, value));
|
|
391
|
+
}
|
|
392
|
+
function handleSlideMove(value) {
|
|
393
|
+
updateValues(value, valueIndexToChangeRef.value);
|
|
394
|
+
}
|
|
395
|
+
function handleSlideEnd() {
|
|
396
|
+
const prevValue = valuesBeforeSlideStartRef.value[valueIndexToChangeRef.value];
|
|
397
|
+
if (currentModelValue.value[valueIndexToChangeRef.value] !== prevValue) emits("valueCommit", toRaw(currentModelValue.value));
|
|
398
|
+
}
|
|
399
|
+
function updateValues(value, atIndex, { commit } = { commit: false }) {
|
|
400
|
+
const decimalCount = getDecimalCount(step.value);
|
|
401
|
+
const nextValue = clamp(roundValue(Math.round((value - min.value) / step.value) * step.value + min.value, decimalCount), min.value, max.value);
|
|
402
|
+
const nextValues = getNextSortedValues(currentModelValue.value, nextValue, atIndex);
|
|
403
|
+
if (hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs.value * step.value)) {
|
|
404
|
+
valueIndexToChangeRef.value = nextValues.indexOf(nextValue);
|
|
405
|
+
const hasChanged = String(nextValues) !== String(modelValue.value);
|
|
406
|
+
if (hasChanged && commit) emits("valueCommit", nextValues);
|
|
407
|
+
if (hasChanged) {
|
|
408
|
+
thumbElements.value[valueIndexToChangeRef.value]?.focus();
|
|
409
|
+
modelValue.value = nextValues;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
const thumbElements = ref([]);
|
|
414
|
+
provideSliderRootContext({
|
|
415
|
+
modelValue,
|
|
416
|
+
currentModelValue,
|
|
417
|
+
valueIndexToChangeRef,
|
|
418
|
+
thumbElements,
|
|
419
|
+
orientation,
|
|
420
|
+
min,
|
|
421
|
+
max,
|
|
422
|
+
disabled,
|
|
423
|
+
thumbAlignment
|
|
424
|
+
});
|
|
425
|
+
return (_ctx, _cache) => {
|
|
426
|
+
return openBlock(), createBlock(unref(CollectionSlot), null, {
|
|
427
|
+
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(unref(orientation) === "horizontal" ? SliderHorizontal_default : SliderVertical_default), mergeProps(_ctx.$attrs, {
|
|
428
|
+
ref: unref(forwardRef),
|
|
429
|
+
"as-child": _ctx.asChild,
|
|
430
|
+
as: _ctx.as,
|
|
431
|
+
min: unref(min),
|
|
432
|
+
max: unref(max),
|
|
433
|
+
dir: unref(dir),
|
|
434
|
+
inverted: _ctx.inverted,
|
|
435
|
+
"aria-disabled": unref(disabled),
|
|
436
|
+
"data-disabled": unref(disabled) ? "" : void 0,
|
|
437
|
+
onPointerdown: _cache[0] || (_cache[0] = () => {
|
|
438
|
+
if (!unref(disabled)) valuesBeforeSlideStartRef.value = currentModelValue.value;
|
|
439
|
+
}),
|
|
440
|
+
onSlideStart: _cache[1] || (_cache[1] = ($event) => !unref(disabled) && handleSlideStart($event)),
|
|
441
|
+
onSlideMove: _cache[2] || (_cache[2] = ($event) => !unref(disabled) && handleSlideMove($event)),
|
|
442
|
+
onSlideEnd: _cache[3] || (_cache[3] = ($event) => !unref(disabled) && handleSlideEnd()),
|
|
443
|
+
onHomeKeyDown: _cache[4] || (_cache[4] = ($event) => !unref(disabled) && updateValues(unref(min), 0, { commit: true })),
|
|
444
|
+
onEndKeyDown: _cache[5] || (_cache[5] = ($event) => !unref(disabled) && updateValues(unref(max), currentModelValue.value.length - 1, { commit: true })),
|
|
445
|
+
onStepKeyDown: _cache[6] || (_cache[6] = (event, direction) => {
|
|
446
|
+
if (!unref(disabled)) {
|
|
447
|
+
const multiplier = unref(PAGE_KEYS).includes(event.key) || event.shiftKey && unref(ARROW_KEYS).includes(event.key) ? 10 : 1;
|
|
448
|
+
const atIndex = valueIndexToChangeRef.value;
|
|
449
|
+
const value = currentModelValue.value[atIndex];
|
|
450
|
+
updateValues(value + unref(step) * multiplier * direction, atIndex, { commit: true });
|
|
451
|
+
}
|
|
452
|
+
})
|
|
453
|
+
}), {
|
|
454
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", { modelValue: unref(modelValue) }), unref(isFormControl) && _ctx.name ? (openBlock(), createBlock(unref(VisuallyHiddenInput_default), {
|
|
455
|
+
key: 0,
|
|
456
|
+
type: "number",
|
|
457
|
+
value: unref(modelValue),
|
|
458
|
+
name: _ctx.name,
|
|
459
|
+
required: _ctx.required,
|
|
460
|
+
disabled: unref(disabled),
|
|
461
|
+
step: unref(step)
|
|
462
|
+
}, null, 8, [
|
|
463
|
+
"value",
|
|
464
|
+
"name",
|
|
465
|
+
"required",
|
|
466
|
+
"disabled",
|
|
467
|
+
"step"
|
|
468
|
+
])) : createCommentVNode("v-if", true)]),
|
|
469
|
+
_: 3
|
|
470
|
+
}, 16, [
|
|
471
|
+
"as-child",
|
|
472
|
+
"as",
|
|
473
|
+
"min",
|
|
474
|
+
"max",
|
|
475
|
+
"dir",
|
|
476
|
+
"inverted",
|
|
477
|
+
"aria-disabled",
|
|
478
|
+
"data-disabled"
|
|
479
|
+
]))]),
|
|
480
|
+
_: 3
|
|
481
|
+
});
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
});
|
|
485
|
+
//#endregion
|
|
486
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@5.9.3_/node_modules/reka-ui/dist/Slider/SliderImpl.js
|
|
487
|
+
var SliderImpl_default = /* @__PURE__ */ defineComponent({
|
|
488
|
+
__name: "SliderImpl",
|
|
489
|
+
props: {
|
|
490
|
+
asChild: {
|
|
491
|
+
type: Boolean,
|
|
492
|
+
required: false
|
|
493
|
+
},
|
|
494
|
+
as: {
|
|
495
|
+
type: null,
|
|
496
|
+
required: false,
|
|
497
|
+
default: "span"
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
emits: [
|
|
501
|
+
"slideStart",
|
|
502
|
+
"slideMove",
|
|
503
|
+
"slideEnd",
|
|
504
|
+
"homeKeyDown",
|
|
505
|
+
"endKeyDown",
|
|
506
|
+
"stepKeyDown"
|
|
507
|
+
],
|
|
508
|
+
setup(__props, { emit: __emit }) {
|
|
509
|
+
const props = __props;
|
|
510
|
+
const emits = __emit;
|
|
511
|
+
const rootContext = injectSliderRootContext();
|
|
512
|
+
return (_ctx, _cache) => {
|
|
513
|
+
return openBlock(), createBlock(unref(Primitive), mergeProps({ "data-slider-impl": "" }, props, {
|
|
514
|
+
onKeydown: _cache[0] || (_cache[0] = (event) => {
|
|
515
|
+
if (event.key === "Home") {
|
|
516
|
+
emits("homeKeyDown", event);
|
|
517
|
+
event.preventDefault();
|
|
518
|
+
} else if (event.key === "End") {
|
|
519
|
+
emits("endKeyDown", event);
|
|
520
|
+
event.preventDefault();
|
|
521
|
+
} else if (unref(PAGE_KEYS).concat(unref(ARROW_KEYS)).includes(event.key)) {
|
|
522
|
+
emits("stepKeyDown", event);
|
|
523
|
+
event.preventDefault();
|
|
524
|
+
}
|
|
525
|
+
}),
|
|
526
|
+
onPointerdown: _cache[1] || (_cache[1] = (event) => {
|
|
527
|
+
const target = event.target;
|
|
528
|
+
target.setPointerCapture(event.pointerId);
|
|
529
|
+
event.preventDefault();
|
|
530
|
+
if (unref(rootContext).thumbElements.value.includes(target)) target.focus();
|
|
531
|
+
else emits("slideStart", event);
|
|
532
|
+
}),
|
|
533
|
+
onPointermove: _cache[2] || (_cache[2] = (event) => {
|
|
534
|
+
if (event.target.hasPointerCapture(event.pointerId)) emits("slideMove", event);
|
|
535
|
+
}),
|
|
536
|
+
onPointerup: _cache[3] || (_cache[3] = (event) => {
|
|
537
|
+
const target = event.target;
|
|
538
|
+
if (target.hasPointerCapture(event.pointerId)) {
|
|
539
|
+
target.releasePointerCapture(event.pointerId);
|
|
540
|
+
emits("slideEnd", event);
|
|
541
|
+
}
|
|
542
|
+
})
|
|
543
|
+
}), {
|
|
544
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
545
|
+
_: 3
|
|
546
|
+
}, 16);
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
//#endregion
|
|
551
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@5.9.3_/node_modules/reka-ui/dist/Slider/SliderRange.js
|
|
552
|
+
var SliderRange_default = /* @__PURE__ */ defineComponent({
|
|
553
|
+
__name: "SliderRange",
|
|
554
|
+
props: {
|
|
555
|
+
asChild: {
|
|
556
|
+
type: Boolean,
|
|
557
|
+
required: false
|
|
558
|
+
},
|
|
559
|
+
as: {
|
|
560
|
+
type: null,
|
|
561
|
+
required: false,
|
|
562
|
+
default: "span"
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
setup(__props) {
|
|
566
|
+
const rootContext = injectSliderRootContext();
|
|
567
|
+
const orientation = injectSliderOrientationContext();
|
|
568
|
+
useForwardExpose();
|
|
569
|
+
const percentages = computed(() => rootContext.currentModelValue.value.map((value) => convertValueToPercentage(value, rootContext.min.value, rootContext.max.value)));
|
|
570
|
+
const offsetStart = computed(() => rootContext.currentModelValue.value.length > 1 ? Math.min(...percentages.value) : 0);
|
|
571
|
+
const offsetEnd = computed(() => 100 - Math.max(...percentages.value, 0));
|
|
572
|
+
return (_ctx, _cache) => {
|
|
573
|
+
return openBlock(), createBlock(unref(Primitive), {
|
|
574
|
+
"data-disabled": unref(rootContext).disabled.value ? "" : void 0,
|
|
575
|
+
"data-orientation": unref(rootContext).orientation.value,
|
|
576
|
+
"as-child": _ctx.asChild,
|
|
577
|
+
as: _ctx.as,
|
|
578
|
+
style: normalizeStyle({
|
|
579
|
+
[unref(orientation).startEdge.value]: `${offsetStart.value}%`,
|
|
580
|
+
[unref(orientation).endEdge.value]: `${offsetEnd.value}%`
|
|
581
|
+
})
|
|
582
|
+
}, {
|
|
583
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
584
|
+
_: 3
|
|
585
|
+
}, 8, [
|
|
586
|
+
"data-disabled",
|
|
587
|
+
"data-orientation",
|
|
588
|
+
"as-child",
|
|
589
|
+
"as",
|
|
590
|
+
"style"
|
|
591
|
+
]);
|
|
592
|
+
};
|
|
593
|
+
}
|
|
594
|
+
});
|
|
595
|
+
//#endregion
|
|
596
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@5.9.3_/node_modules/reka-ui/dist/Slider/SliderThumbImpl.js
|
|
597
|
+
var SliderThumbImpl_default = /* @__PURE__ */ defineComponent({
|
|
598
|
+
inheritAttrs: false,
|
|
599
|
+
__name: "SliderThumbImpl",
|
|
600
|
+
props: {
|
|
601
|
+
index: {
|
|
602
|
+
type: Number,
|
|
603
|
+
required: true
|
|
604
|
+
},
|
|
605
|
+
asChild: {
|
|
606
|
+
type: Boolean,
|
|
607
|
+
required: false
|
|
608
|
+
},
|
|
609
|
+
as: {
|
|
610
|
+
type: null,
|
|
611
|
+
required: false
|
|
612
|
+
}
|
|
613
|
+
},
|
|
614
|
+
setup(__props) {
|
|
615
|
+
const props = __props;
|
|
616
|
+
const rootContext = injectSliderRootContext();
|
|
617
|
+
const orientation = injectSliderOrientationContext();
|
|
618
|
+
const { forwardRef, currentElement: thumbElement } = useForwardExpose();
|
|
619
|
+
const { CollectionItem } = useCollection();
|
|
620
|
+
const value = computed(() => rootContext.modelValue?.value?.[props.index]);
|
|
621
|
+
const percent = computed(() => value.value === void 0 ? 0 : convertValueToPercentage(value.value, rootContext.min.value ?? 0, rootContext.max.value ?? 100));
|
|
622
|
+
const label = computed(() => getLabel(props.index, rootContext.modelValue?.value?.length ?? 0));
|
|
623
|
+
const size = useSize(thumbElement);
|
|
624
|
+
const orientationSize = computed(() => size[orientation.size].value);
|
|
625
|
+
const thumbInBoundsOffset = computed(() => {
|
|
626
|
+
if (rootContext.thumbAlignment.value === "overflow" || !orientationSize.value) return 0;
|
|
627
|
+
else return getThumbInBoundsOffset(orientationSize.value, percent.value, orientation.direction.value);
|
|
628
|
+
});
|
|
629
|
+
const isMounted = useMounted();
|
|
630
|
+
onMounted(() => {
|
|
631
|
+
rootContext.thumbElements.value.push(thumbElement.value);
|
|
632
|
+
});
|
|
633
|
+
onUnmounted(() => {
|
|
634
|
+
const i = rootContext.thumbElements.value.findIndex((i$1) => i$1 === thumbElement.value) ?? -1;
|
|
635
|
+
rootContext.thumbElements.value.splice(i, 1);
|
|
636
|
+
});
|
|
637
|
+
return (_ctx, _cache) => {
|
|
638
|
+
return openBlock(), createBlock(unref(CollectionItem), null, {
|
|
639
|
+
default: withCtx(() => [createVNode(unref(Primitive), mergeProps(_ctx.$attrs, {
|
|
640
|
+
ref: unref(forwardRef),
|
|
641
|
+
role: "slider",
|
|
642
|
+
tabindex: unref(rootContext).disabled.value ? void 0 : 0,
|
|
643
|
+
"aria-label": _ctx.$attrs["aria-label"] || label.value,
|
|
644
|
+
"data-disabled": unref(rootContext).disabled.value ? "" : void 0,
|
|
645
|
+
"data-orientation": unref(rootContext).orientation.value,
|
|
646
|
+
"aria-valuenow": value.value,
|
|
647
|
+
"aria-valuemin": unref(rootContext).min.value,
|
|
648
|
+
"aria-valuemax": unref(rootContext).max.value,
|
|
649
|
+
"aria-orientation": unref(rootContext).orientation.value,
|
|
650
|
+
"as-child": _ctx.asChild,
|
|
651
|
+
as: _ctx.as,
|
|
652
|
+
style: {
|
|
653
|
+
transform: "var(--reka-slider-thumb-transform)",
|
|
654
|
+
position: "absolute",
|
|
655
|
+
[unref(orientation).startEdge.value]: `calc(${percent.value}% + ${thumbInBoundsOffset.value}px)`,
|
|
656
|
+
display: !unref(isMounted) && value.value === void 0 ? "none" : void 0
|
|
657
|
+
},
|
|
658
|
+
onFocus: _cache[0] || (_cache[0] = () => {
|
|
659
|
+
unref(rootContext).valueIndexToChangeRef.value = _ctx.index;
|
|
660
|
+
})
|
|
661
|
+
}), {
|
|
662
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
663
|
+
_: 3
|
|
664
|
+
}, 16, [
|
|
665
|
+
"tabindex",
|
|
666
|
+
"aria-label",
|
|
667
|
+
"data-disabled",
|
|
668
|
+
"data-orientation",
|
|
669
|
+
"aria-valuenow",
|
|
670
|
+
"aria-valuemin",
|
|
671
|
+
"aria-valuemax",
|
|
672
|
+
"aria-orientation",
|
|
673
|
+
"as-child",
|
|
674
|
+
"as",
|
|
675
|
+
"style"
|
|
676
|
+
])]),
|
|
677
|
+
_: 3
|
|
678
|
+
});
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
});
|
|
682
|
+
//#endregion
|
|
683
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@5.9.3_/node_modules/reka-ui/dist/Slider/SliderThumb.js
|
|
684
|
+
var SliderThumb_default = /* @__PURE__ */ defineComponent({
|
|
685
|
+
__name: "SliderThumb",
|
|
686
|
+
props: {
|
|
687
|
+
asChild: {
|
|
688
|
+
type: Boolean,
|
|
689
|
+
required: false
|
|
690
|
+
},
|
|
691
|
+
as: {
|
|
692
|
+
type: null,
|
|
693
|
+
required: false,
|
|
694
|
+
default: "span"
|
|
695
|
+
}
|
|
696
|
+
},
|
|
697
|
+
setup(__props) {
|
|
698
|
+
const props = __props;
|
|
699
|
+
const { getItems } = useCollection();
|
|
700
|
+
const { forwardRef, currentElement: thumbElement } = useForwardExpose();
|
|
701
|
+
const index = computed(() => thumbElement.value ? getItems(true).findIndex((i) => i.ref === thumbElement.value) : -1);
|
|
702
|
+
return (_ctx, _cache) => {
|
|
703
|
+
return openBlock(), createBlock(SliderThumbImpl_default, mergeProps({ ref: unref(forwardRef) }, props, { index: index.value }), {
|
|
704
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
705
|
+
_: 3
|
|
706
|
+
}, 16, ["index"]);
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
});
|
|
710
|
+
//#endregion
|
|
711
|
+
//#region ../../node_modules/.pnpm/reka-ui@2.10.1_vue@3.5.13_typescript@5.9.3_/node_modules/reka-ui/dist/Slider/SliderTrack.js
|
|
712
|
+
var SliderTrack_default = /* @__PURE__ */ defineComponent({
|
|
713
|
+
__name: "SliderTrack",
|
|
714
|
+
props: {
|
|
715
|
+
asChild: {
|
|
716
|
+
type: Boolean,
|
|
717
|
+
required: false
|
|
718
|
+
},
|
|
719
|
+
as: {
|
|
720
|
+
type: null,
|
|
721
|
+
required: false,
|
|
722
|
+
default: "span"
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
setup(__props) {
|
|
726
|
+
const rootContext = injectSliderRootContext();
|
|
727
|
+
useForwardExpose();
|
|
728
|
+
return (_ctx, _cache) => {
|
|
729
|
+
return openBlock(), createBlock(unref(Primitive), {
|
|
730
|
+
"as-child": _ctx.asChild,
|
|
731
|
+
as: _ctx.as,
|
|
732
|
+
"data-disabled": unref(rootContext).disabled.value ? "" : void 0,
|
|
733
|
+
"data-orientation": unref(rootContext).orientation.value
|
|
734
|
+
}, {
|
|
735
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
736
|
+
_: 3
|
|
737
|
+
}, 8, [
|
|
738
|
+
"as-child",
|
|
739
|
+
"as",
|
|
740
|
+
"data-disabled",
|
|
741
|
+
"data-orientation"
|
|
742
|
+
]);
|
|
743
|
+
};
|
|
744
|
+
}
|
|
745
|
+
});
|
|
5
746
|
//#endregion
|
|
6
747
|
//#region src/components/slider/slider.vue
|
|
7
748
|
var slider_default = /* @__PURE__ */ defineComponent({
|
|
8
749
|
__name: "slider",
|
|
9
750
|
props: {
|
|
10
|
-
name: {},
|
|
11
751
|
defaultValue: {},
|
|
12
752
|
modelValue: {},
|
|
13
753
|
disabled: { type: Boolean },
|
|
@@ -17,22 +757,25 @@ var slider_default = /* @__PURE__ */ defineComponent({
|
|
|
17
757
|
max: {},
|
|
18
758
|
step: {},
|
|
19
759
|
minStepsBetweenThumbs: {},
|
|
760
|
+
thumbAlignment: {},
|
|
20
761
|
asChild: { type: Boolean },
|
|
21
762
|
as: {},
|
|
763
|
+
name: {},
|
|
764
|
+
required: { type: Boolean },
|
|
22
765
|
class: {}
|
|
23
766
|
},
|
|
24
767
|
emits: ["update:modelValue", "valueCommit"],
|
|
25
768
|
setup(__props, { emit: __emit }) {
|
|
26
769
|
const props = __props;
|
|
27
770
|
const emits = __emit;
|
|
28
|
-
const forwarded =
|
|
771
|
+
const forwarded = useForwardPropsEmits(useDelegatedProps(props, "class"), emits);
|
|
29
772
|
return (_ctx, _cache) => {
|
|
30
|
-
return openBlock(), createBlock(unref(
|
|
31
|
-
default: withCtx(() => [createVNode(unref(
|
|
32
|
-
default: withCtx(() => [createVNode(unref(
|
|
773
|
+
return openBlock(), createBlock(unref(SliderRoot_default), mergeProps(unref(forwarded), { class: unref(clsx)("celeste-slider", props.class) }), {
|
|
774
|
+
default: withCtx(() => [createVNode(unref(SliderTrack_default), { class: "celeste-slider-track" }, {
|
|
775
|
+
default: withCtx(() => [createVNode(unref(SliderRange_default), { class: "celeste-slider-range" })]),
|
|
33
776
|
_: 1
|
|
34
777
|
}), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.modelValue, (_, key) => {
|
|
35
|
-
return openBlock(), createBlock(unref(
|
|
778
|
+
return openBlock(), createBlock(unref(SliderThumb_default), {
|
|
36
779
|
key,
|
|
37
780
|
class: "celeste-slider-thumb"
|
|
38
781
|
});
|