@comfyorg/design-system 1.1.0 → 1.3.0-alpha.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/README.md +113 -10
- package/dist/accordion/PropertiesAccordionItem.vue.d.ts +34 -0
- package/dist/accordion/PropertiesAccordionItem.vue.js +62 -0
- package/dist/badge/Badge.vue.d.ts +49 -0
- package/dist/badge/Badge.vue.js +1 -0
- package/dist/badge/CreditBadge.vue.d.ts +6 -0
- package/dist/badge/CreditBadge.vue.js +21 -0
- package/dist/badge/badge.variants.d.ts +12 -0
- package/dist/button/Button.vue.d.ts +31 -0
- package/dist/button/Button.vue.js +1 -0
- package/dist/button-group/ButtonGroup.vue.d.ts +18 -0
- package/dist/button-group/ButtonGroup.vue.js +35 -0
- package/dist/button-group/IconGroup.vue.d.ts +16 -0
- package/dist/button-group/IconGroup.vue.js +13 -0
- package/dist/card/Card.vue.d.ts +19 -0
- package/dist/card/Card.vue.js +1 -0
- package/dist/card/CardFooter.vue.d.ts +17 -0
- package/dist/card/CardFooter.vue.js +1 -0
- package/dist/card/CardHeader.vue.d.ts +17 -0
- package/dist/card/CardHeader.vue.js +1 -0
- package/dist/card/CoachmarkCard.vue.d.ts +24 -0
- package/dist/card/CoachmarkCard.vue.js +55 -0
- package/dist/card/card.variants.d.ts +11 -0
- package/dist/chart/Chart.vue.d.ts +12 -0
- package/dist/chart/Chart.vue.js +177 -0
- package/dist/chart/__tests__/chartTestUtils.d.ts +3 -0
- package/dist/chart/useChart.d.ts +4 -0
- package/dist/checkbox/Checkbox.vue.d.ts +25 -0
- package/dist/checkbox/Checkbox.vue.js +47 -0
- package/dist/chip/Tag.vue.d.ts +61 -0
- package/dist/chip/Tag.vue.js +71 -0
- package/dist/chip/TagRemoveButton.vue.d.ts +18 -0
- package/dist/chip/TagRemoveButton.vue.js +1 -0
- package/dist/color-picker/ColorPicker.vue.d.ts +23 -0
- package/dist/color-picker/ColorPicker.vue.js +139 -0
- package/dist/color-picker/ColorPickerPanel.vue.d.ts +27 -0
- package/dist/color-picker/ColorPickerPanel.vue.js +1 -0
- package/dist/color-picker/ColorPickerSaturationValue.vue.d.ts +17 -0
- package/dist/color-picker/ColorPickerSaturationValue.vue.js +1 -0
- package/dist/color-picker/ColorPickerSlider.vue.d.ts +17 -0
- package/dist/color-picker/ColorPickerSlider.vue.js +1 -0
- package/dist/color-picker/types.d.ts +22 -0
- package/dist/color-picker/types.js +0 -0
- package/dist/color-picker/useColorPicker.d.ts +33 -0
- package/dist/common/CanvasBanner.vue.d.ts +23 -0
- package/dist/common/CanvasBanner.vue.js +21 -0
- package/dist/common/ContentDivider.vue.d.ts +7 -0
- package/dist/common/ContentDivider.vue.js +20 -0
- package/dist/common/CustomFormValue.vue.d.ts +6 -0
- package/dist/common/CustomFormValue.vue.js +26 -0
- package/dist/common/DotSpinner.vue.d.ts +7 -0
- package/dist/common/DotSpinner.vue.js +32 -0
- package/dist/common/EditableText.vue.d.ts +16 -0
- package/dist/common/EditableText.vue.js +71 -0
- package/dist/common/HighlightedText.vue.d.ts +8 -0
- package/dist/common/HighlightedText.vue.js +49 -0
- package/dist/common/LoadingOverlay.vue.d.ts +18 -0
- package/dist/common/LoadingOverlay.vue.js +39 -0
- package/dist/common/MarkdownText.vue.d.ts +6 -0
- package/dist/common/MarkdownText.vue.js +91 -0
- package/dist/common/MarqueeLine.vue.d.ts +13 -0
- package/dist/common/MarqueeLine.vue.js +11 -0
- package/dist/common/NoResultsPlaceholder.vue.d.ts +28 -0
- package/dist/common/NoResultsPlaceholder.vue.js +49 -0
- package/dist/common/NotificationPopup.vue.d.ts +28 -0
- package/dist/common/NotificationPopup.vue.js +63 -0
- package/dist/common/OverlayIcon.vue.d.ts +13 -0
- package/dist/common/OverlayIcon.vue.js +1 -0
- package/dist/common/SanitizedHtml.vue.d.ts +8 -0
- package/dist/common/SanitizedHtml.vue.js +58 -0
- package/dist/common/TextDivider.vue.d.ts +8 -0
- package/dist/common/TextDivider.vue.js +34 -0
- package/dist/common/TextTicker.vue.d.ts +17 -0
- package/dist/common/TextTicker.vue.js +51 -0
- package/dist/common/TextTickerMultiLine.vue.d.ts +6 -0
- package/dist/common/TextTickerMultiLine.vue.js +51 -0
- package/dist/common/UserAvatar.vue.d.ts +9 -0
- package/dist/common/UserAvatar.vue.js +45 -0
- package/dist/common/VerticalDivider.vue.d.ts +3 -0
- package/dist/common/VerticalDivider.vue.js +14 -0
- package/dist/common/VideoCompareSlider.vue.d.ts +24 -0
- package/dist/common/VideoCompareSlider.vue.js +139 -0
- package/dist/common/ViewportWidgetShell.vue.d.ts +27 -0
- package/dist/common/ViewportWidgetShell.vue.js +56 -0
- package/dist/common/VirtualGrid.vue.d.ts +38 -0
- package/dist/common/VirtualGrid.vue.js +105 -0
- package/dist/common/highlightQuery.d.ts +6 -0
- package/dist/common/textTickerUtils.d.ts +1 -0
- package/dist/components.css +44 -0
- package/dist/composables/useAttrsClass.d.ts +12 -0
- package/dist/composables/useAttrsClass.js +17 -0
- package/dist/composables/usePopoverSizing.d.ts +12 -0
- package/dist/composables/usePopoverSizing.js +17 -0
- package/dist/confirm/ConfirmBody.vue.d.ts +8 -0
- package/dist/confirm/ConfirmBody.vue.js +25 -0
- package/dist/confirm/ConfirmFooter.vue.d.ts +18 -0
- package/dist/confirm/ConfirmFooter.vue.js +53 -0
- package/dist/confirm/ConfirmHeader.vue.d.ts +7 -0
- package/dist/confirm/ConfirmHeader.vue.js +25 -0
- package/dist/content-card/CardBottom.vue.d.ts +16 -0
- package/dist/content-card/CardBottom.vue.js +17 -0
- package/dist/content-card/CardContainer.vue.d.ts +26 -0
- package/dist/content-card/CardContainer.vue.js +59 -0
- package/dist/content-card/CardTop.vue.d.ts +36 -0
- package/dist/content-card/CardTop.vue.js +70 -0
- package/dist/dialog/Dialog.vue.d.ts +21 -0
- package/dist/dialog/Dialog.vue.js +23 -0
- package/dist/dialog/DialogClose.vue.d.ts +13 -0
- package/dist/dialog/DialogClose.vue.js +1 -0
- package/dist/dialog/DialogContent.vue.d.ts +36 -0
- package/dist/dialog/DialogContent.vue.js +1 -0
- package/dist/dialog/DialogDescription.vue.d.ts +18 -0
- package/dist/dialog/DialogDescription.vue.js +31 -0
- package/dist/dialog/DialogFooter.vue.d.ts +17 -0
- package/dist/dialog/DialogFooter.vue.js +22 -0
- package/dist/dialog/DialogHeader.vue.d.ts +17 -0
- package/dist/dialog/DialogHeader.vue.js +22 -0
- package/dist/dialog/DialogMaximize.vue.d.ts +10 -0
- package/dist/dialog/DialogMaximize.vue.js +25 -0
- package/dist/dialog/DialogOverlay.vue.d.ts +8 -0
- package/dist/dialog/DialogOverlay.vue.js +1 -0
- package/dist/dialog/DialogPanel.vue.d.ts +18 -0
- package/dist/dialog/DialogPanel.vue.js +53 -0
- package/dist/dialog/DialogPortal.vue.d.ts +14 -0
- package/dist/dialog/DialogPortal.vue.js +1 -0
- package/dist/dialog/DialogTitle.vue.d.ts +18 -0
- package/dist/dialog/DialogTitle.vue.js +1 -0
- package/dist/dialog/Dialogue.vue.d.ts +22 -0
- package/dist/dialog/Dialogue.vue.js +56 -0
- package/dist/dialog/dialog.variants.d.ts +16 -0
- package/dist/dialog/dialog.variants.js +38 -0
- package/dist/dialog/types.d.ts +6 -0
- package/dist/dialog/types.js +0 -0
- package/dist/field/Field.vue.d.ts +19 -0
- package/dist/field/Field.vue.js +39 -0
- package/dist/field/FieldDescription.vue.d.ts +17 -0
- package/dist/field/FieldDescription.vue.js +22 -0
- package/dist/field/FieldError.vue.d.ts +21 -0
- package/dist/field/FieldError.vue.js +37 -0
- package/dist/field/FieldGroup.vue.d.ts +17 -0
- package/dist/field/FieldGroup.vue.js +22 -0
- package/dist/field/FieldLabel.vue.d.ts +17 -0
- package/dist/field/FieldLabel.vue.js +26 -0
- package/dist/field/FieldSwitch.vue.d.ts +16 -0
- package/dist/field/FieldSwitch.vue.js +43 -0
- package/dist/field/LayoutField.vue.d.ts +18 -0
- package/dist/field/LayoutField.vue.js +1 -0
- package/dist/field/ModelInfoField.vue.d.ts +18 -0
- package/dist/field/ModelInfoField.vue.js +16 -0
- package/dist/field/field.variants.d.ts +11 -0
- package/dist/hover-card/HoverCard.vue.d.ts +18 -0
- package/dist/hover-card/HoverCard.vue.js +24 -0
- package/dist/hover-card/HoverCardContent.vue.d.ts +18 -0
- package/dist/hover-card/HoverCardContent.vue.js +66 -0
- package/dist/hover-card/HoverCardTrigger.vue.d.ts +14 -0
- package/dist/hover-card/HoverCardTrigger.vue.js +21 -0
- package/dist/icon/ComfyLogo.vue.d.ts +9 -0
- package/dist/icon/ComfyLogo.vue.js +31 -0
- package/dist/icon/PuzzleIcon.vue.d.ts +8 -0
- package/dist/icon/PuzzleIcon.vue.js +38 -0
- package/dist/icon/TinyChevronIcon.vue.d.ts +6 -0
- package/dist/icon/TinyChevronIcon.vue.js +29 -0
- package/dist/icon/VerifiedIcon.vue.d.ts +8 -0
- package/dist/icon/VerifiedIcon.vue.js +30 -0
- package/dist/input/Input.vue.d.ts +21 -0
- package/dist/input/Input.vue.js +1 -0
- package/dist/input/PasswordInput.vue.d.ts +18 -0
- package/dist/input/PasswordInput.vue.js +66 -0
- package/dist/input-group/InputGroup.vue.d.ts +17 -0
- package/dist/input-group/InputGroup.vue.js +1 -0
- package/dist/input-group/InputGroupAddon.vue.d.ts +19 -0
- package/dist/input-group/InputGroupAddon.vue.js +1 -0
- package/dist/input-group/InputGroupButton.vue.d.ts +21 -0
- package/dist/input-group/InputGroupButton.vue.js +1 -0
- package/dist/input-group/InputGroupInput.vue.d.ts +15 -0
- package/dist/input-group/InputGroupInput.vue.js +1 -0
- package/dist/input-group/inputGroup.variants.d.ts +21 -0
- package/dist/input-group/inputGroup.variants.js +21 -0
- package/dist/knob/Knob.vue.d.ts +19 -0
- package/dist/knob/Knob.vue.js +122 -0
- package/dist/label/Label.vue.d.ts +18 -0
- package/dist/label/Label.vue.js +1 -0
- package/dist/layout/BaseModalLayout.vue.d.ts +67 -0
- package/dist/layout/BaseModalLayout.vue.js +198 -0
- package/dist/media/AudioPreview.vue.d.ts +6 -0
- package/dist/media/AudioPreview.vue.js +26 -0
- package/dist/media/ImageLightbox.vue.d.ts +17 -0
- package/dist/media/ImageLightbox.vue.js +76 -0
- package/dist/media/MediaTitle.vue.d.ts +6 -0
- package/dist/media/MediaTitle.vue.js +17 -0
- package/dist/media/Video.vue.d.ts +28 -0
- package/dist/media/Video.vue.js +100 -0
- package/dist/media/VideoPlayOverlay.vue.d.ts +8 -0
- package/dist/media/VideoPlayOverlay.vue.js +26 -0
- package/dist/media/VideoPreview.vue.d.ts +7 -0
- package/dist/media/VideoPreview.vue.js +30 -0
- package/dist/media/ZoomPane.vue.d.ts +17 -0
- package/dist/media/ZoomPane.vue.js +60 -0
- package/dist/menu/ContextMenu.vue.d.ts +31 -0
- package/dist/menu/ContextMenu.vue.js +50 -0
- package/dist/menu/ContextMenuContent.vue.d.ts +32 -0
- package/dist/menu/ContextMenuContent.vue.js +1 -0
- package/dist/menu/Menu.vue.d.ts +41 -0
- package/dist/menu/Menu.vue.js +77 -0
- package/dist/menu/MenuAction.vue.d.ts +26 -0
- package/dist/menu/MenuAction.vue.js +1 -0
- package/dist/menu/MenuContent.vue.d.ts +35 -0
- package/dist/menu/MenuContent.vue.js +1 -0
- package/dist/menu/MenuItem.vue.d.ts +22 -0
- package/dist/menu/MenuItem.vue.js +33 -0
- package/dist/menu/MenuItemContent.vue.d.ts +8 -0
- package/dist/menu/MenuItemContent.vue.js +1 -0
- package/dist/menu/MenuItems.vue.d.ts +32 -0
- package/dist/menu/MenuItems.vue.js +1 -0
- package/dist/menu/MenuRadioGroup.vue.d.ts +26 -0
- package/dist/menu/MenuRadioGroup.vue.js +1 -0
- package/dist/menu/MenuRadioItem.vue.d.ts +22 -0
- package/dist/menu/MenuRadioItem.vue.js +1 -0
- package/dist/menu/MenuSeparator.vue.d.ts +8 -0
- package/dist/menu/MenuSeparator.vue.js +1 -0
- package/dist/menu/MenuSub.vue.d.ts +20 -0
- package/dist/menu/MenuSub.vue.js +1 -0
- package/dist/menu/MenuSubContent.vue.d.ts +36 -0
- package/dist/menu/MenuSubContent.vue.js +1 -0
- package/dist/menu/MenuSubTrigger.vue.d.ts +18 -0
- package/dist/menu/MenuSubTrigger.vue.js +1 -0
- package/dist/menu/MenuSubmenu.vue.d.ts +21 -0
- package/dist/menu/MenuSubmenu.vue.js +1 -0
- package/dist/menu/menuAnchor.d.ts +4 -0
- package/dist/menu/menuAnchor.js +14 -0
- package/dist/menu/menuStyles.d.ts +4 -0
- package/dist/menu/menuStyles.js +6 -0
- package/dist/menu/mouseDownUtil.d.ts +3 -0
- package/dist/menu/types.d.ts +69 -0
- package/dist/menu/types.js +0 -0
- package/dist/menu/usePointMenu.d.ts +19 -0
- package/dist/menu/usePointMenu.js +55 -0
- package/dist/message/Message.vue.d.ts +50 -0
- package/dist/message/Message.vue.js +73 -0
- package/dist/message/message.variants.d.ts +11 -0
- package/dist/message/message.variants.js +14 -0
- package/dist/multi-select/MultiSelect.vue.d.ts +170 -0
- package/dist/multi-select/MultiSelect.vue.js +135 -0
- package/dist/multi-select/MultiSelectContent.vue.d.ts +32 -0
- package/dist/multi-select/MultiSelectContent.vue.js +1 -0
- package/dist/multi-select/MultiSelectTrigger.vue.d.ts +24 -0
- package/dist/multi-select/MultiSelectTrigger.vue.js +1 -0
- package/dist/multi-select/types.d.ts +35 -0
- package/dist/multi-select/types.js +0 -0
- package/dist/navigation/LeftSidePanel.vue.d.ts +12 -0
- package/dist/navigation/LeftSidePanel.vue.js +82 -0
- package/dist/navigation/NavIcon.vue.d.ts +7 -0
- package/dist/navigation/NavIcon.vue.js +1 -0
- package/dist/navigation/NavItem.vue.d.ts +21 -0
- package/dist/navigation/NavItem.vue.js +1 -0
- package/dist/navigation/NavTitle.vue.d.ts +12 -0
- package/dist/navigation/NavTitle.vue.js +1 -0
- package/dist/navigation/SidebarTopArea.vue.d.ts +15 -0
- package/dist/navigation/SidebarTopArea.vue.js +15 -0
- package/dist/navigation/types.d.ts +13 -0
- package/dist/navigation/types.js +0 -0
- package/dist/number-field/NumberField.vue.d.ts +26 -0
- package/dist/number-field/NumberField.vue.js +73 -0
- package/dist/number-field/NumberFieldDecrement.vue.d.ts +18 -0
- package/dist/number-field/NumberFieldDecrement.vue.js +33 -0
- package/dist/number-field/NumberFieldIncrement.vue.d.ts +18 -0
- package/dist/number-field/NumberFieldIncrement.vue.js +33 -0
- package/dist/number-field/NumberFieldInput.vue.d.ts +7 -0
- package/dist/number-field/NumberFieldInput.vue.js +23 -0
- package/dist/number-field/PropertyNumberField.vue.d.ts +14 -0
- package/dist/number-field/PropertyNumberField.vue.js +54 -0
- package/dist/pagination/Pagination.vue.d.ts +22 -0
- package/dist/pagination/Pagination.vue.js +138 -0
- package/dist/popover/PopoverContent.vue.d.ts +33 -0
- package/dist/popover/PopoverContent.vue.js +1 -0
- package/dist/popover/usePopoverViewportDismiss.d.ts +2 -0
- package/dist/popover/usePopoverViewportDismiss.js +12 -0
- package/dist/radio-group/RadioGroup.vue.d.ts +22 -0
- package/dist/radio-group/RadioGroup.vue.js +43 -0
- package/dist/radio-group/RadioGroupItem.vue.d.ts +22 -0
- package/dist/radio-group/RadioGroupItem.vue.js +40 -0
- package/dist/search-input/AsyncSearchInput.vue.d.ts +27 -0
- package/dist/search-input/AsyncSearchInput.vue.js +102 -0
- package/dist/search-input/SearchAutocomplete.vue.d.ts +53 -0
- package/dist/search-input/SearchAutocomplete.vue.js +232 -0
- package/dist/search-input/SearchInput.vue.d.ts +46 -0
- package/dist/search-input/SearchInput.vue.js +125 -0
- package/dist/search-input/searchInput.variants.d.ts +45 -0
- package/dist/select/DropdownControl.vue.d.ts +16 -0
- package/dist/select/DropdownControl.vue.js +46 -0
- package/dist/select/Select.vue.d.ts +21 -0
- package/dist/select/Select.vue.js +1 -0
- package/dist/select/SelectContent.vue.d.ts +29 -0
- package/dist/select/SelectContent.vue.js +1 -0
- package/dist/select/SelectItem.vue.d.ts +22 -0
- package/dist/select/SelectItem.vue.js +1 -0
- package/dist/select/SelectScrollDownButton.vue.d.ts +18 -0
- package/dist/select/SelectScrollDownButton.vue.js +1 -0
- package/dist/select/SelectScrollUpButton.vue.d.ts +18 -0
- package/dist/select/SelectScrollUpButton.vue.js +1 -0
- package/dist/select/SelectTrigger.vue.d.ts +22 -0
- package/dist/select/SelectTrigger.vue.js +1 -0
- package/dist/select/SelectValue.vue.d.ts +14 -0
- package/dist/select/SelectValue.vue.js +1 -0
- package/dist/select/types.d.ts +4 -0
- package/dist/select/types.js +0 -0
- package/dist/select/useSelectSearch.d.ts +3 -0
- package/dist/select/useSelectSearch.js +14 -0
- package/dist/shared/Badge-DFHO3AFi.js +90 -0
- package/dist/shared/Button-Dj_H5v3V.js +138 -0
- package/dist/shared/Card-BrvqUM49.js +32 -0
- package/dist/shared/CardFooter-BV_I0pM-.js +19 -0
- package/dist/shared/CardHeader-CMutruBx.js +19 -0
- package/dist/shared/ColorPickerPanel-DQGHuvxk.js +239 -0
- package/dist/shared/ColorPickerSaturationValue-B5VDiMcl.js +64 -0
- package/dist/shared/ColorPickerSlider--mnQyzWD.js +305 -0
- package/dist/shared/ContextMenuContent-RNyBBJOX.js +62 -0
- package/dist/shared/DialogClose-CrtPRSNX.js +22 -0
- package/dist/shared/DialogContent-v2s55FXs.js +71 -0
- package/dist/shared/DialogOverlay-C9qv0zme.js +33 -0
- package/dist/shared/DialogPortal-DtCpLgtO.js +36 -0
- package/dist/shared/DialogTitle-Chomvpgq.js +41 -0
- package/dist/shared/Input-DOeNoniw.js +36 -0
- package/dist/shared/InputGroup-BYt6BWpk.js +23 -0
- package/dist/shared/InputGroupAddon-B1cn7czs.js +36 -0
- package/dist/shared/InputGroupButton-tw5AYOoR.js +39 -0
- package/dist/shared/InputGroupInput-C_kkIxvY.js +30 -0
- package/dist/shared/Label-kwhWNR2P.js +34 -0
- package/dist/shared/LayoutField-C8KCaVF0.js +34 -0
- package/dist/shared/MenuAction-0z8BSoX9.js +121 -0
- package/dist/shared/MenuContent--tKCqaIO.js +78 -0
- package/dist/shared/MenuItemContent-Be658c7e.js +67 -0
- package/dist/shared/MenuItems-BZTlERd6.js +67 -0
- package/dist/shared/MenuRadioGroup-B28YS1p1.js +63 -0
- package/dist/shared/MenuRadioItem-D8DFu-KU.js +34 -0
- package/dist/shared/MenuSeparator-DrAiObmE.js +26 -0
- package/dist/shared/MenuSub-DSizq_fV.js +21 -0
- package/dist/shared/MenuSubContent-ghzkX4hX.js +67 -0
- package/dist/shared/MenuSubTrigger-BGRIm_Bf.js +33 -0
- package/dist/shared/MenuSubmenu-CjPf8DXl.js +41 -0
- package/dist/shared/MultiSelectContent-9xyBQKz3.js +160 -0
- package/dist/shared/MultiSelectTrigger-DNySkpH9.js +50 -0
- package/dist/shared/NavIcon-FTJH75HH.js +12 -0
- package/dist/shared/NavItem-sQJ-77Zw.js +77 -0
- package/dist/shared/NavTitle-BM22yfCR.js +40 -0
- package/dist/shared/OverlayIcon-C-din824.js +43 -0
- package/dist/shared/PopoverContent-DNqL6t-O.js +89 -0
- package/dist/shared/SearchableSingleSelect-DQauLQWW.js +182 -0
- package/dist/shared/Select-DtVgv7Po.js +31 -0
- package/dist/shared/SelectContent-Ba1mCDWM.js +89 -0
- package/dist/shared/SelectItem-DaOr3TFS.js +55 -0
- package/dist/shared/SelectScrollDownButton-DYmxtida.js +28 -0
- package/dist/shared/SelectScrollUpButton-DiyvSb9O.js +28 -0
- package/dist/shared/SelectTrigger-BBicbVsI.js +45 -0
- package/dist/shared/SelectValue-BjaQc-WU.js +21 -0
- package/dist/shared/Switch-qavkHWMz.js +61 -0
- package/dist/shared/TableHead-DpsXVMzk.js +22 -0
- package/dist/shared/TagRemoveButton-D919R-To.js +36 -0
- package/dist/shared/TextTooltip-BNlZI515.js +27 -0
- package/dist/shared/Tooltip-4rCebVao.js +32 -0
- package/dist/shared/TooltipContent-0GR7hBNu.js +89 -0
- package/dist/shared/TooltipTrigger-64EIE5f2.js +63 -0
- package/dist/shared/TransitionCollapse-VfBzyj5a.js +108 -0
- package/dist/shared/_plugin-vue_export-helper-DjkACiAr.js +7 -0
- package/dist/shared/searchInput.variants-BdYHNjce.js +46 -0
- package/dist/shared/select.variants-cRXaATWS.js +39 -0
- package/dist/shared/src-DTwuqov4.js +11 -0
- package/dist/shared/tabKeys-CP6c3wTY.js +3 -0
- package/dist/shared/tabs.variants-Cgk7bRhG.js +22 -0
- package/dist/shared/tag.variants-BEXRRbPc.js +33 -0
- package/dist/shared/tagsInputContext-C-X1-iNf.js +4 -0
- package/dist/shared/toggleGroup.variants-BuwGELw0.js +38 -0
- package/dist/shared/tooltipContext-arEyjGQC.js +3 -0
- package/dist/single-select/SearchableSingleSelect.vue.d.ts +39 -0
- package/dist/single-select/SearchableSingleSelect.vue.js +1 -0
- package/dist/single-select/SingleSelect.vue.d.ts +38 -0
- package/dist/single-select/SingleSelect.vue.js +185 -0
- package/dist/single-select/types.d.ts +25 -0
- package/dist/single-select/types.js +0 -0
- package/dist/skeleton/Skeleton.vue.d.ts +7 -0
- package/dist/skeleton/Skeleton.vue.js +22 -0
- package/dist/slider/GradientSlider.vue.d.ts +20 -0
- package/dist/slider/GradientSlider.vue.js +100 -0
- package/dist/slider/Slider.vue.d.ts +16 -0
- package/dist/slider/Slider.vue.js +86 -0
- package/dist/slider/gradients.d.ts +6 -0
- package/dist/spinner/Spinner.vue.d.ts +7 -0
- package/dist/spinner/Spinner.vue.js +39 -0
- package/dist/splitter/SplitterGroup.vue.d.ts +23 -0
- package/dist/splitter/SplitterGroup.vue.js +38 -0
- package/dist/splitter/SplitterPanel.vue.d.ts +26 -0
- package/dist/splitter/SplitterPanel.vue.js +43 -0
- package/dist/splitter/SplitterResizeHandle.vue.d.ts +22 -0
- package/dist/splitter/SplitterResizeHandle.vue.js +35 -0
- package/dist/switch/Switch.vue.d.ts +17 -0
- package/dist/switch/Switch.vue.js +1 -0
- package/dist/tab/Tab.vue.d.ts +24 -0
- package/dist/tab/Tab.vue.js +73 -0
- package/dist/tab/TabList.vue.d.ts +26 -0
- package/dist/tab/TabList.vue.js +29 -0
- package/dist/tab/TabPanel.vue.d.ts +23 -0
- package/dist/tab/TabPanel.vue.js +26 -0
- package/dist/tab/tab.variants.d.ts +9 -0
- package/dist/tab/tabKeys.d.ts +7 -0
- package/dist/table/Table.vue.d.ts +17 -0
- package/dist/table/Table.vue.js +21 -0
- package/dist/table/TableBody.vue.d.ts +17 -0
- package/dist/table/TableBody.vue.js +19 -0
- package/dist/table/TableCell.vue.d.ts +17 -0
- package/dist/table/TableCell.vue.js +19 -0
- package/dist/table/TableHead.vue.d.ts +17 -0
- package/dist/table/TableHead.vue.js +1 -0
- package/dist/table/TableHeader.vue.d.ts +17 -0
- package/dist/table/TableHeader.vue.js +19 -0
- package/dist/table/TableRow.vue.d.ts +17 -0
- package/dist/table/TableRow.vue.js +19 -0
- package/dist/table/TableSortHead.vue.d.ts +26 -0
- package/dist/table/TableSortHead.vue.js +45 -0
- package/dist/table/tableUtils.d.ts +3 -0
- package/dist/table/tableUtils.js +18 -0
- package/dist/tabs/Tabs.vue.d.ts +22 -0
- package/dist/tabs/Tabs.vue.js +41 -0
- package/dist/tabs/TabsContent.vue.d.ts +18 -0
- package/dist/tabs/TabsContent.vue.js +35 -0
- package/dist/tabs/TabsList.vue.d.ts +20 -0
- package/dist/tabs/TabsList.vue.js +36 -0
- package/dist/tabs/TabsTrigger.vue.d.ts +20 -0
- package/dist/tabs/TabsTrigger.vue.js +37 -0
- package/dist/tabs/tabs.variants.d.ts +21 -0
- package/dist/tags-input/TagsInput.vue.d.ts +32 -0
- package/dist/tags-input/TagsInput.vue.js +96 -0
- package/dist/tags-input/TagsInputInput.vue.d.ts +9 -0
- package/dist/tags-input/TagsInputInput.vue.js +54 -0
- package/dist/tags-input/TagsInputItem.vue.d.ts +18 -0
- package/dist/tags-input/TagsInputItem.vue.js +32 -0
- package/dist/tags-input/TagsInputItemDelete.vue.d.ts +18 -0
- package/dist/tags-input/TagsInputItemDelete.vue.js +33 -0
- package/dist/tags-input/TagsInputItemText.vue.d.ts +8 -0
- package/dist/tags-input/TagsInputItemText.vue.js +26 -0
- package/dist/tags-input/tagsInputContext.d.ts +4 -0
- package/dist/textarea/Textarea.vue.d.ts +17 -0
- package/dist/textarea/Textarea.vue.js +31 -0
- package/dist/toast/ToastClose.vue.d.ts +8 -0
- package/dist/toast/ToastClose.vue.js +40 -0
- package/dist/toast/ToastDescription.vue.d.ts +18 -0
- package/dist/toast/ToastDescription.vue.js +29 -0
- package/dist/toast/ToastDock.vue.d.ts +13 -0
- package/dist/toast/ToastDock.vue.js +27 -0
- package/dist/toast/ToastPanel.vue.d.ts +30 -0
- package/dist/toast/ToastPanel.vue.js +45 -0
- package/dist/toast/ToastRoot.vue.d.ts +100 -0
- package/dist/toast/ToastRoot.vue.js +53 -0
- package/dist/toast/ToastTitle.vue.d.ts +18 -0
- package/dist/toast/ToastTitle.vue.js +29 -0
- package/dist/toast/ToastViewport.vue.d.ts +9 -0
- package/dist/toast/ToastViewport.vue.js +31 -0
- package/dist/toggle-group/ToggleGroup.vue.d.ts +25 -0
- package/dist/toggle-group/ToggleGroup.vue.js +59 -0
- package/dist/toggle-group/ToggleGroupItem.vue.d.ts +21 -0
- package/dist/toggle-group/ToggleGroupItem.vue.js +43 -0
- package/dist/toggle-group/toggleGroup.variants.d.ts +24 -0
- package/dist/tooltip/TextTooltip.vue.d.ts +20 -0
- package/dist/tooltip/TextTooltip.vue.js +1 -0
- package/dist/tooltip/Tooltip.vue.d.ts +23 -0
- package/dist/tooltip/Tooltip.vue.js +1 -0
- package/dist/tooltip/TooltipContent.vue.d.ts +24 -0
- package/dist/tooltip/TooltipContent.vue.js +1 -0
- package/dist/tooltip/TooltipProvider.vue.d.ts +15 -0
- package/dist/tooltip/TooltipProvider.vue.js +37 -0
- package/dist/tooltip/TooltipTrigger.vue.d.ts +14 -0
- package/dist/tooltip/TooltipTrigger.vue.js +1 -0
- package/dist/tooltip/tooltipConfig.d.ts +5 -0
- package/dist/tooltip/tooltipConfig.js +7 -0
- package/dist/tooltip/tooltipContext.d.ts +2 -0
- package/dist/transition/TransitionCollapse.vue.d.ts +21 -0
- package/dist/transition/TransitionCollapse.vue.js +1 -0
- package/dist/tree/Tree.vue.d.ts +32 -0
- package/dist/tree/Tree.vue.js +53 -0
- package/dist/tree/TreeItem.vue.d.ts +29 -0
- package/dist/tree/TreeItem.vue.js +80 -0
- package/dist/tree/treeStyles.d.ts +4 -0
- package/dist/tree/treeStyles.js +6 -0
- package/dist-types/button.variants.d.ts +16 -0
- package/dist-types/select.variants.d.ts +24 -0
- package/dist-types/tag.variants.d.ts +21 -0
- package/dist-types/workspaceAvatar.d.ts +5 -0
- package/package.json +186 -8
- package/src/button.variants.ts +84 -0
- package/src/css/_deprecated-aliases.css +12 -0
- package/src/css/_legacy-palette.css +33 -0
- package/src/css/_legacy-ui.css +418 -0
- package/src/css/_markdown.css +227 -0
- package/src/css/_mask-editor.css +179 -0
- package/src/css/_palette.css +40 -4
- package/src/css/base.css +0 -6
- package/src/css/component-support.css +69 -0
- package/src/css/iconSizing.test.ts +80 -0
- package/src/css/iconifyDynamicPlugin.ts +15 -6
- package/src/css/icons.test.ts +17 -0
- package/src/css/lucideStrokePlugin.js +5 -6
- package/src/css/published.css +3 -0
- package/src/css/style.css +5 -1909
- package/src/css/theme.css +243 -0
- package/src/css/themes/void.css +102 -0
- package/src/icons/README.md +61 -97
- package/src/icons/astroid-filled.svg +3 -0
- package/src/icons/claude.svg +1 -1
- package/src/select.variants.ts +53 -0
- package/src/tag.variants.ts +38 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { t as cn } from "./src-DTwuqov4.js";
|
|
2
|
+
import { t as TextTooltip_default } from "./TextTooltip-BNlZI515.js";
|
|
3
|
+
import { Fragment, createBlock, createCommentVNode, createElementBlock, createSlots, createVNode, defineComponent, mergeProps, normalizeClass, openBlock, renderSlot, resolveDynamicComponent, unref, withCtx } from "vue";
|
|
4
|
+
import { Primitive } from "reka-ui";
|
|
5
|
+
import { cva } from "cva";
|
|
6
|
+
// src/button.variants.ts
|
|
7
|
+
var buttonVariants = cva({
|
|
8
|
+
base: "relative inline-flex cursor-pointer touch-manipulation appearance-none items-center justify-center gap-2 rounded-md border-none font-inter text-sm font-medium whitespace-nowrap transition-colors focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([width]):not([height])]:size-4",
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
secondary: "bg-secondary text-foreground hover:bg-accent",
|
|
12
|
+
primary: "bg-primary text-foreground hover:bg-primary/90",
|
|
13
|
+
inverted: "bg-foreground text-background hover:bg-foreground/80",
|
|
14
|
+
destructive: "bg-destructive text-foreground hover:bg-destructive/90",
|
|
15
|
+
textonly: "bg-transparent text-foreground hover:bg-accent",
|
|
16
|
+
"muted-textonly": "bg-transparent text-muted-foreground hover:bg-accent",
|
|
17
|
+
"destructive-textonly": "bg-transparent text-destructive hover:bg-destructive/10",
|
|
18
|
+
outline: "border border-solid bg-transparent text-foreground hover:bg-accent",
|
|
19
|
+
link: "bg-transparent text-muted-foreground hover:text-foreground",
|
|
20
|
+
"overlay-white": "bg-white text-gray-600 hover:bg-white/90",
|
|
21
|
+
base: "bg-background text-foreground hover:bg-accent",
|
|
22
|
+
tertiary: "bg-muted text-foreground hover:bg-muted/80",
|
|
23
|
+
subscribe: "border-transparent bg-credit text-charcoal-800 hover:opacity-80",
|
|
24
|
+
"brand-ghost": "bg-white/8 text-primary-warm-white hover:bg-white/20 focus-visible:ring-2 focus-visible:ring-brand-yellow",
|
|
25
|
+
"brand-solid": "bg-brand-yellow text-primary-comfy-ink hover:bg-brand-yellow/90 focus-visible:ring-2 focus-visible:ring-primary-warm-white",
|
|
26
|
+
"brand-ghost-accent": "bg-white/8 text-primary-warm-white hover:bg-brand-yellow hover:text-primary-comfy-ink focus-visible:ring-2 focus-visible:ring-brand-yellow"
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
sm: "h-6 rounded-sm px-2 py-1 text-xs",
|
|
30
|
+
md: "h-8 rounded-lg p-2 text-xs",
|
|
31
|
+
lg: "h-10 rounded-lg px-4 py-2 text-sm",
|
|
32
|
+
"icon-sm": "size-5 p-0",
|
|
33
|
+
icon: "size-8 rounded-lg",
|
|
34
|
+
"icon-lg": "size-10 rounded-lg",
|
|
35
|
+
link: "gap-1 px-0 py-2 text-sm/5 font-normal hover:underline",
|
|
36
|
+
brand: "h-12 rounded-2xl px-5 font-formula text-sm font-semibold tracking-[0.7px] uppercase lg:h-13 xl:h-14 2xl:h-16",
|
|
37
|
+
"brand-icon": "size-10 rounded-2xl xl:size-12",
|
|
38
|
+
unset: ""
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
variant: "secondary",
|
|
43
|
+
size: "md"
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
// src/components/button/Button.vue?vue&type=script&setup=true&lang.ts
|
|
47
|
+
var _hoisted_1 = {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: "icon-[lucide--loader-circle] animate-spin",
|
|
50
|
+
"aria-hidden": "true"
|
|
51
|
+
};
|
|
52
|
+
var _hoisted_2 = {
|
|
53
|
+
key: 1,
|
|
54
|
+
class: "sr-only"
|
|
55
|
+
};
|
|
56
|
+
var _hoisted_3 = {
|
|
57
|
+
key: 3,
|
|
58
|
+
"aria-hidden": "true",
|
|
59
|
+
class: "pointer-events-none absolute -top-1 -right-1 size-2 rounded-full bg-foreground"
|
|
60
|
+
};
|
|
61
|
+
// src/components/button/Button.vue
|
|
62
|
+
var Button_default = /* @__PURE__ */ defineComponent({
|
|
63
|
+
inheritAttrs: false,
|
|
64
|
+
__name: "Button",
|
|
65
|
+
props: {
|
|
66
|
+
class: {
|
|
67
|
+
type: [
|
|
68
|
+
Boolean,
|
|
69
|
+
null,
|
|
70
|
+
String,
|
|
71
|
+
Object,
|
|
72
|
+
Array
|
|
73
|
+
],
|
|
74
|
+
default: ""
|
|
75
|
+
},
|
|
76
|
+
disabled: {
|
|
77
|
+
type: Boolean,
|
|
78
|
+
default: false
|
|
79
|
+
},
|
|
80
|
+
icon: {},
|
|
81
|
+
indicator: { type: Boolean },
|
|
82
|
+
loading: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
default: false
|
|
85
|
+
},
|
|
86
|
+
size: {},
|
|
87
|
+
tooltip: {},
|
|
88
|
+
tooltipSide: {},
|
|
89
|
+
variant: {},
|
|
90
|
+
asChild: { type: Boolean },
|
|
91
|
+
as: { default: "button" }
|
|
92
|
+
},
|
|
93
|
+
setup(__props) {
|
|
94
|
+
const WithoutTooltip = (_, { slots }) => slots.default?.()[0];
|
|
95
|
+
return (_ctx, _cache) => {
|
|
96
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.tooltip === void 0 ? WithoutTooltip : unref(TextTooltip_default)), {
|
|
97
|
+
text: __props.tooltip,
|
|
98
|
+
side: __props.tooltipSide
|
|
99
|
+
}, createSlots({
|
|
100
|
+
default: withCtx(() => [createVNode(unref(Primitive), mergeProps({
|
|
101
|
+
as: __props.as,
|
|
102
|
+
"as-child": __props.asChild,
|
|
103
|
+
disabled: __props.disabled || __props.loading,
|
|
104
|
+
"aria-busy": __props.loading || void 0,
|
|
105
|
+
"data-variant": __props.variant,
|
|
106
|
+
class: unref(cn)(unref(buttonVariants)({
|
|
107
|
+
variant: __props.variant,
|
|
108
|
+
size: __props.size
|
|
109
|
+
}), __props.class)
|
|
110
|
+
}, _ctx.$attrs), {
|
|
111
|
+
default: withCtx(() => [
|
|
112
|
+
__props.loading ? (openBlock(), createElementBlock("i", _hoisted_1)) : createCommentVNode("", true),
|
|
113
|
+
__props.loading ? (openBlock(), createElementBlock("span", _hoisted_2, [renderSlot(_ctx.$slots, "default")])) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [__props.icon ? (openBlock(), createElementBlock("i", {
|
|
114
|
+
key: 0,
|
|
115
|
+
class: normalizeClass(__props.icon),
|
|
116
|
+
"aria-hidden": "true"
|
|
117
|
+
}, null, 2)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default")], 64)),
|
|
118
|
+
__props.indicator ? (openBlock(), createElementBlock("span", _hoisted_3)) : createCommentVNode("", true)
|
|
119
|
+
]),
|
|
120
|
+
_: 3
|
|
121
|
+
}, 16, [
|
|
122
|
+
"as",
|
|
123
|
+
"as-child",
|
|
124
|
+
"disabled",
|
|
125
|
+
"aria-busy",
|
|
126
|
+
"data-variant",
|
|
127
|
+
"class"
|
|
128
|
+
])]),
|
|
129
|
+
_: 2
|
|
130
|
+
}, [_ctx.$slots.tooltip ? {
|
|
131
|
+
name: "content",
|
|
132
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "tooltip")]),
|
|
133
|
+
key: "0"
|
|
134
|
+
} : void 0]), 1032, ["text", "side"]);
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
export { Button_default as t };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { t as cn } from "./src-DTwuqov4.js";
|
|
2
|
+
import { createElementBlock, defineComponent, normalizeClass, openBlock, renderSlot, unref } from "vue";
|
|
3
|
+
import { cva } from "cva";
|
|
4
|
+
// src/components/card/card.variants.ts
|
|
5
|
+
var cardVariants = cva({
|
|
6
|
+
base: "border",
|
|
7
|
+
variants: { surface: {
|
|
8
|
+
background: "overflow-hidden rounded-2xl bg-background",
|
|
9
|
+
secondary: "rounded-lg bg-secondary"
|
|
10
|
+
} },
|
|
11
|
+
defaultVariants: { surface: "background" }
|
|
12
|
+
});
|
|
13
|
+
// src/components/card/Card.vue
|
|
14
|
+
var Card_default = /* @__PURE__ */ defineComponent({
|
|
15
|
+
__name: "Card",
|
|
16
|
+
props: {
|
|
17
|
+
class: { type: [
|
|
18
|
+
Boolean,
|
|
19
|
+
null,
|
|
20
|
+
String,
|
|
21
|
+
Object,
|
|
22
|
+
Array
|
|
23
|
+
] },
|
|
24
|
+
surface: {}
|
|
25
|
+
},
|
|
26
|
+
setup(__props) {
|
|
27
|
+
return (_ctx, _cache) => {
|
|
28
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(cn)(unref(cardVariants)({ surface: __props.surface }), __props.class)) }, [renderSlot(_ctx.$slots, "default")], 2);
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export { Card_default as t };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as cn } from "./src-DTwuqov4.js";
|
|
2
|
+
import { createElementBlock, defineComponent, normalizeClass, openBlock, renderSlot, unref } from "vue";
|
|
3
|
+
// src/components/card/CardFooter.vue
|
|
4
|
+
var CardFooter_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "CardFooter",
|
|
6
|
+
props: { class: { type: [
|
|
7
|
+
Boolean,
|
|
8
|
+
null,
|
|
9
|
+
String,
|
|
10
|
+
Object,
|
|
11
|
+
Array
|
|
12
|
+
] } },
|
|
13
|
+
setup(__props) {
|
|
14
|
+
return (_ctx, _cache) => {
|
|
15
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(cn)("flex items-center justify-end gap-4 p-4", __props.class)) }, [renderSlot(_ctx.$slots, "default")], 2);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export { CardFooter_default as t };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { t as cn } from "./src-DTwuqov4.js";
|
|
2
|
+
import { createElementBlock, defineComponent, normalizeClass, openBlock, renderSlot, unref } from "vue";
|
|
3
|
+
// src/components/card/CardHeader.vue
|
|
4
|
+
var CardHeader_default = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "CardHeader",
|
|
6
|
+
props: { class: { type: [
|
|
7
|
+
Boolean,
|
|
8
|
+
null,
|
|
9
|
+
String,
|
|
10
|
+
Object,
|
|
11
|
+
Array
|
|
12
|
+
] } },
|
|
13
|
+
setup(__props) {
|
|
14
|
+
return (_ctx, _cache) => {
|
|
15
|
+
return openBlock(), createElementBlock("div", { class: normalizeClass(unref(cn)("flex h-12 shrink-0 items-center justify-between gap-2 border-b px-4", __props.class)) }, [renderSlot(_ctx.$slots, "default")], 2);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
export { CardHeader_default as t };
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { t as Select_default } from "./Select-DtVgv7Po.js";
|
|
2
|
+
import { t as SelectContent_default } from "./SelectContent-Ba1mCDWM.js";
|
|
3
|
+
import { t as SelectItem_default } from "./SelectItem-DaOr3TFS.js";
|
|
4
|
+
import { t as SelectTrigger_default } from "./SelectTrigger-BBicbVsI.js";
|
|
5
|
+
import { t as SelectValue_default } from "./SelectValue-BjaQc-WU.js";
|
|
6
|
+
import { t as ColorPickerSaturationValue_default } from "./ColorPickerSaturationValue-B5VDiMcl.js";
|
|
7
|
+
import { a as normalizeHex, n as hexToHsva, o as rgbToHex, r as hsbToRgb, s as rgbToHsv, t as ColorPickerSlider_default } from "./ColorPickerSlider--mnQyzWD.js";
|
|
8
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, openBlock, reactive, ref, renderList, toDisplayString, unref, useModel, vModelText, watch, withCtx, withDirectives, withKeys } from "vue";
|
|
9
|
+
import { clamp } from "es-toolkit";
|
|
10
|
+
// src/components/color-picker/useColorPicker.ts
|
|
11
|
+
var rgbChannels = [
|
|
12
|
+
{ key: "r" },
|
|
13
|
+
{ key: "g" },
|
|
14
|
+
{ key: "b" }
|
|
15
|
+
];
|
|
16
|
+
function useDraftField(source, apply) {
|
|
17
|
+
const draft = ref(source());
|
|
18
|
+
const isEditing = ref(false);
|
|
19
|
+
watch(source, (value) => {
|
|
20
|
+
if (!isEditing.value) draft.value = value;
|
|
21
|
+
});
|
|
22
|
+
return reactive({
|
|
23
|
+
draft,
|
|
24
|
+
beginEdit: () => {
|
|
25
|
+
isEditing.value = true;
|
|
26
|
+
},
|
|
27
|
+
commit: () => apply(draft.value),
|
|
28
|
+
reset: () => {
|
|
29
|
+
isEditing.value = false;
|
|
30
|
+
draft.value = source();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function useColorPicker(hsva) {
|
|
35
|
+
const rgb = computed(() => hsbToRgb({
|
|
36
|
+
h: hsva.value.h,
|
|
37
|
+
s: hsva.value.s,
|
|
38
|
+
b: hsva.value.v
|
|
39
|
+
}));
|
|
40
|
+
const hexString = computed(() => rgbToHex(rgb.value).toLowerCase());
|
|
41
|
+
return {
|
|
42
|
+
hex: useDraftField(() => hexString.value, (draft) => {
|
|
43
|
+
const normalized = normalizeHex(draft);
|
|
44
|
+
if (!normalized) return;
|
|
45
|
+
const next = hexToHsva(normalized);
|
|
46
|
+
hsva.value = {
|
|
47
|
+
...hsva.value,
|
|
48
|
+
h: next.h,
|
|
49
|
+
s: next.s,
|
|
50
|
+
v: next.v
|
|
51
|
+
};
|
|
52
|
+
}),
|
|
53
|
+
rgb: useDraftField(() => ({ ...rgb.value }), ({ r, g, b }) => {
|
|
54
|
+
if (![
|
|
55
|
+
r,
|
|
56
|
+
g,
|
|
57
|
+
b
|
|
58
|
+
].every(Number.isFinite)) return;
|
|
59
|
+
const hsv = rgbToHsv({
|
|
60
|
+
r: clamp(Math.round(r), 0, 255),
|
|
61
|
+
g: clamp(Math.round(g), 0, 255),
|
|
62
|
+
b: clamp(Math.round(b), 0, 255)
|
|
63
|
+
});
|
|
64
|
+
hsva.value = {
|
|
65
|
+
...hsva.value,
|
|
66
|
+
h: hsv.h,
|
|
67
|
+
s: hsv.s,
|
|
68
|
+
v: hsv.v
|
|
69
|
+
};
|
|
70
|
+
}),
|
|
71
|
+
alpha: useDraftField(() => hsva.value.a, (draft) => {
|
|
72
|
+
if (!Number.isFinite(draft)) return;
|
|
73
|
+
hsva.value = {
|
|
74
|
+
...hsva.value,
|
|
75
|
+
a: clamp(Math.round(draft), 0, 100)
|
|
76
|
+
};
|
|
77
|
+
})
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
// src/components/color-picker/ColorPickerPanel.vue?vue&type=script&setup=true&lang.ts
|
|
81
|
+
var _hoisted_1 = { class: "flex w-[211px] flex-col gap-2 rounded-lg border border-border/50 bg-background p-2 shadow-md" };
|
|
82
|
+
var _hoisted_2 = { class: "flex items-center gap-1" };
|
|
83
|
+
var _hoisted_3 = { class: "flex h-6 min-w-0 flex-1 items-center gap-1 rounded-sm bg-secondary px-1 text-xs text-muted-foreground" };
|
|
84
|
+
var _hoisted_4 = ["aria-label"];
|
|
85
|
+
var _hoisted_5 = ["onUpdate:modelValue", "aria-label"];
|
|
86
|
+
var _hoisted_6 = {
|
|
87
|
+
key: 2,
|
|
88
|
+
class: "flex shrink-0 items-center border-l border-border/50 pl-1"
|
|
89
|
+
};
|
|
90
|
+
var _hoisted_7 = ["aria-label"];
|
|
91
|
+
// src/components/color-picker/ColorPickerPanel.vue
|
|
92
|
+
var ColorPickerPanel_default = /* @__PURE__ */ defineComponent({
|
|
93
|
+
__name: "ColorPickerPanel",
|
|
94
|
+
props: /*@__PURE__*/ mergeModels({
|
|
95
|
+
alpha: {
|
|
96
|
+
type: Boolean,
|
|
97
|
+
default: true
|
|
98
|
+
},
|
|
99
|
+
hexLabel: {},
|
|
100
|
+
rgbaLabel: {},
|
|
101
|
+
hueLabel: {},
|
|
102
|
+
alphaLabel: {},
|
|
103
|
+
redLabel: {},
|
|
104
|
+
greenLabel: {},
|
|
105
|
+
blueLabel: {},
|
|
106
|
+
saturationBrightnessLabel: {},
|
|
107
|
+
formatLabel: {}
|
|
108
|
+
}, {
|
|
109
|
+
"hsva": { required: true },
|
|
110
|
+
"hsvaModifiers": {},
|
|
111
|
+
"displayMode": { required: true },
|
|
112
|
+
"displayModeModifiers": {}
|
|
113
|
+
}),
|
|
114
|
+
emits: ["update:hsva", "update:displayMode"],
|
|
115
|
+
setup(__props) {
|
|
116
|
+
const hsva = useModel(__props, "hsva");
|
|
117
|
+
const displayMode = useModel(__props, "displayMode");
|
|
118
|
+
const channelLabels = computed(() => ({
|
|
119
|
+
r: __props.redLabel,
|
|
120
|
+
g: __props.greenLabel,
|
|
121
|
+
b: __props.blueLabel
|
|
122
|
+
}));
|
|
123
|
+
const { hex, rgb, alpha: alphaField } = useColorPicker(hsva);
|
|
124
|
+
return (_ctx, _cache) => {
|
|
125
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
126
|
+
createVNode(ColorPickerSaturationValue_default, {
|
|
127
|
+
saturation: hsva.value.s,
|
|
128
|
+
"onUpdate:saturation": _cache[0] || (_cache[0] = ($event) => hsva.value.s = $event),
|
|
129
|
+
value: hsva.value.v,
|
|
130
|
+
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => hsva.value.v = $event),
|
|
131
|
+
hue: hsva.value.h,
|
|
132
|
+
"aria-label": __props.saturationBrightnessLabel
|
|
133
|
+
}, null, 8, [
|
|
134
|
+
"saturation",
|
|
135
|
+
"value",
|
|
136
|
+
"hue",
|
|
137
|
+
"aria-label"
|
|
138
|
+
]),
|
|
139
|
+
createVNode(ColorPickerSlider_default, {
|
|
140
|
+
modelValue: hsva.value.h,
|
|
141
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => hsva.value.h = $event),
|
|
142
|
+
type: "hue",
|
|
143
|
+
"aria-label": __props.hueLabel
|
|
144
|
+
}, null, 8, ["modelValue", "aria-label"]),
|
|
145
|
+
__props.alpha ? (openBlock(), createBlock(ColorPickerSlider_default, {
|
|
146
|
+
key: 0,
|
|
147
|
+
modelValue: hsva.value.a,
|
|
148
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => hsva.value.a = $event),
|
|
149
|
+
type: "alpha",
|
|
150
|
+
hue: hsva.value.h,
|
|
151
|
+
saturation: hsva.value.s,
|
|
152
|
+
brightness: hsva.value.v,
|
|
153
|
+
"aria-label": __props.alphaLabel
|
|
154
|
+
}, null, 8, [
|
|
155
|
+
"modelValue",
|
|
156
|
+
"hue",
|
|
157
|
+
"saturation",
|
|
158
|
+
"brightness",
|
|
159
|
+
"aria-label"
|
|
160
|
+
])) : createCommentVNode("", true),
|
|
161
|
+
createElementVNode("div", _hoisted_2, [createVNode(unref(Select_default), {
|
|
162
|
+
modelValue: displayMode.value,
|
|
163
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => displayMode.value = $event)
|
|
164
|
+
}, {
|
|
165
|
+
default: withCtx(() => [createVNode(unref(SelectTrigger_default), {
|
|
166
|
+
"aria-label": __props.formatLabel,
|
|
167
|
+
class: "h-6 w-[58px] shrink-0 gap-0.5 overflow-clip rounded-sm border-0 px-1.5 py-0 text-xs [&>span]:overflow-visible"
|
|
168
|
+
}, {
|
|
169
|
+
default: withCtx(() => [createVNode(unref(SelectValue_default))]),
|
|
170
|
+
_: 1
|
|
171
|
+
}, 8, ["aria-label"]), createVNode(unref(SelectContent_default), { class: "min-w-16 p-1" }, {
|
|
172
|
+
default: withCtx(() => [createVNode(unref(SelectItem_default), {
|
|
173
|
+
value: "hex",
|
|
174
|
+
class: "py-1 text-xs"
|
|
175
|
+
}, {
|
|
176
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.hexLabel), 1)]),
|
|
177
|
+
_: 1
|
|
178
|
+
}), createVNode(unref(SelectItem_default), {
|
|
179
|
+
value: "rgba",
|
|
180
|
+
class: "py-1 text-xs"
|
|
181
|
+
}, {
|
|
182
|
+
default: withCtx(() => [createTextVNode(toDisplayString(__props.rgbaLabel), 1)]),
|
|
183
|
+
_: 1
|
|
184
|
+
})]),
|
|
185
|
+
_: 1
|
|
186
|
+
})]),
|
|
187
|
+
_: 1
|
|
188
|
+
}, 8, ["modelValue"]), createElementVNode("div", _hoisted_3, [displayMode.value === "hex" ? withDirectives((openBlock(), createElementBlock("input", {
|
|
189
|
+
key: 0,
|
|
190
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => unref(hex).draft = $event),
|
|
191
|
+
type: "text",
|
|
192
|
+
spellcheck: "false",
|
|
193
|
+
"aria-label": __props.hexLabel,
|
|
194
|
+
class: "min-w-0 flex-1 appearance-none border-none bg-transparent p-0 text-center outline-none",
|
|
195
|
+
onFocus: _cache[6] || (_cache[6] = (...args) => unref(hex).beginEdit && unref(hex).beginEdit(...args)),
|
|
196
|
+
onInput: _cache[7] || (_cache[7] = (...args) => unref(hex).commit && unref(hex).commit(...args)),
|
|
197
|
+
onKeydown: _cache[8] || (_cache[8] = withKeys((...args) => unref(hex).commit && unref(hex).commit(...args), ["enter"])),
|
|
198
|
+
onBlur: _cache[9] || (_cache[9] = (...args) => unref(hex).reset && unref(hex).reset(...args))
|
|
199
|
+
}, null, 40, _hoisted_4)), [[vModelText, unref(hex).draft]]) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(unref(rgbChannels), (channel) => {
|
|
200
|
+
return withDirectives((openBlock(), createElementBlock("input", {
|
|
201
|
+
key: channel.key,
|
|
202
|
+
"onUpdate:modelValue": ($event) => unref(rgb).draft[channel.key] = $event,
|
|
203
|
+
type: "number",
|
|
204
|
+
min: 0,
|
|
205
|
+
max: 255,
|
|
206
|
+
"aria-label": channelLabels.value[channel.key],
|
|
207
|
+
class: "min-w-0 flex-1 appearance-none border-none bg-transparent p-0 text-center outline-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
208
|
+
onFocus: _cache[10] || (_cache[10] = (...args) => unref(rgb).beginEdit && unref(rgb).beginEdit(...args)),
|
|
209
|
+
onInput: _cache[11] || (_cache[11] = (...args) => unref(rgb).commit && unref(rgb).commit(...args)),
|
|
210
|
+
onKeydown: _cache[12] || (_cache[12] = withKeys((...args) => unref(rgb).commit && unref(rgb).commit(...args), ["enter"])),
|
|
211
|
+
onBlur: _cache[13] || (_cache[13] = (...args) => unref(rgb).reset && unref(rgb).reset(...args))
|
|
212
|
+
}, null, 40, _hoisted_5)), [[
|
|
213
|
+
vModelText,
|
|
214
|
+
unref(rgb).draft[channel.key],
|
|
215
|
+
void 0,
|
|
216
|
+
{ number: true }
|
|
217
|
+
]]);
|
|
218
|
+
}), 128)), __props.alpha ? (openBlock(), createElementBlock("div", _hoisted_6, [withDirectives(createElementVNode("input", {
|
|
219
|
+
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => unref(alphaField).draft = $event),
|
|
220
|
+
type: "number",
|
|
221
|
+
min: 0,
|
|
222
|
+
max: 100,
|
|
223
|
+
"aria-label": __props.alphaLabel,
|
|
224
|
+
class: "w-6 min-w-0 appearance-none border-none bg-transparent p-0 text-right outline-none [&::-webkit-inner-spin-button]:appearance-none",
|
|
225
|
+
onFocus: _cache[15] || (_cache[15] = (...args) => unref(alphaField).beginEdit && unref(alphaField).beginEdit(...args)),
|
|
226
|
+
onInput: _cache[16] || (_cache[16] = (...args) => unref(alphaField).commit && unref(alphaField).commit(...args)),
|
|
227
|
+
onKeydown: _cache[17] || (_cache[17] = withKeys((...args) => unref(alphaField).commit && unref(alphaField).commit(...args), ["enter"])),
|
|
228
|
+
onBlur: _cache[18] || (_cache[18] = (...args) => unref(alphaField).reset && unref(alphaField).reset(...args))
|
|
229
|
+
}, null, 40, _hoisted_7), [[
|
|
230
|
+
vModelText,
|
|
231
|
+
unref(alphaField).draft,
|
|
232
|
+
void 0,
|
|
233
|
+
{ number: true }
|
|
234
|
+
]]), _cache[19] || (_cache[19] = createElementVNode("span", null, "%", -1))])) : createCommentVNode("", true)])])
|
|
235
|
+
]);
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
export { ColorPickerPanel_default as t };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { computed, createElementBlock, createElementVNode, defineComponent, mergeModels, normalizeStyle, openBlock, ref, useModel } from "vue";
|
|
2
|
+
// src/components/color-picker/ColorPickerSaturationValue.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var _hoisted_1 = ["aria-valuetext"];
|
|
4
|
+
// src/components/color-picker/ColorPickerSaturationValue.vue
|
|
5
|
+
var ColorPickerSaturationValue_default = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "ColorPickerSaturationValue",
|
|
7
|
+
props: /*@__PURE__*/ mergeModels({ hue: {} }, {
|
|
8
|
+
"saturation": { required: true },
|
|
9
|
+
"saturationModifiers": {},
|
|
10
|
+
"value": { required: true },
|
|
11
|
+
"valueModifiers": {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:saturation", "update:value"],
|
|
14
|
+
setup(__props) {
|
|
15
|
+
const saturation = useModel(__props, "saturation");
|
|
16
|
+
const value = useModel(__props, "value");
|
|
17
|
+
const containerRef = ref(null);
|
|
18
|
+
const hueBackground = computed(() => `hsl(${__props.hue}, 100%, 50%)`);
|
|
19
|
+
const handleStyle = computed(() => ({
|
|
20
|
+
left: `${saturation.value}%`,
|
|
21
|
+
top: `${100 - value.value}%`
|
|
22
|
+
}));
|
|
23
|
+
function updateFromPointer(e) {
|
|
24
|
+
const el = containerRef.value;
|
|
25
|
+
if (!el) return;
|
|
26
|
+
const rect = el.getBoundingClientRect();
|
|
27
|
+
const x = Math.max(0, Math.min(1, (e.clientX - rect.left) / rect.width));
|
|
28
|
+
const y = Math.max(0, Math.min(1, (e.clientY - rect.top) / rect.height));
|
|
29
|
+
saturation.value = Math.round(x * 100);
|
|
30
|
+
value.value = Math.round((1 - y) * 100);
|
|
31
|
+
}
|
|
32
|
+
function handlePointerDown(e) {
|
|
33
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
34
|
+
updateFromPointer(e);
|
|
35
|
+
}
|
|
36
|
+
function handlePointerMove(e) {
|
|
37
|
+
if (!e.currentTarget.hasPointerCapture(e.pointerId)) return;
|
|
38
|
+
updateFromPointer(e);
|
|
39
|
+
}
|
|
40
|
+
return (_ctx, _cache) => {
|
|
41
|
+
return openBlock(), createElementBlock("div", {
|
|
42
|
+
ref_key: "containerRef",
|
|
43
|
+
ref: containerRef,
|
|
44
|
+
role: "slider",
|
|
45
|
+
"aria-valuetext": `${saturation.value}%, ${value.value}%`,
|
|
46
|
+
class: "relative aspect-square w-full cursor-crosshair rounded-sm",
|
|
47
|
+
style: normalizeStyle({
|
|
48
|
+
backgroundColor: hueBackground.value,
|
|
49
|
+
touchAction: "none"
|
|
50
|
+
}),
|
|
51
|
+
onPointerdown: handlePointerDown,
|
|
52
|
+
onPointermove: handlePointerMove
|
|
53
|
+
}, [
|
|
54
|
+
_cache[0] || (_cache[0] = createElementVNode("div", { class: "absolute inset-0 rounded-sm bg-linear-to-r from-white to-transparent" }, null, -1)),
|
|
55
|
+
_cache[1] || (_cache[1] = createElementVNode("div", { class: "absolute inset-0 rounded-sm bg-linear-to-b from-transparent to-black" }, null, -1)),
|
|
56
|
+
createElementVNode("div", {
|
|
57
|
+
class: "pointer-events-none absolute size-3.5 -translate-1/2 rounded-full border-2 border-white shadow-[0_0_2px_rgba(0,0,0,0.6)]",
|
|
58
|
+
style: normalizeStyle(handleStyle.value)
|
|
59
|
+
}, null, 4)
|
|
60
|
+
], 44, _hoisted_1);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
export { ColorPickerSaturationValue_default as t };
|