@comfyorg/design-system 1.0.1 → 1.2.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 +89 -9
- package/dist/badge/Badge.vue.d.ts +49 -0
- package/dist/badge/Badge.vue.js +2 -0
- package/dist/badge/CreditBadge.vue.d.ts +7 -0
- package/dist/badge/CreditBadge.vue.js +35 -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 +2 -0
- package/dist/button-group/ButtonGroup.vue.d.ts +18 -0
- package/dist/button-group/ButtonGroup.vue.js +37 -0
- package/dist/button-group/IconGroup.vue.d.ts +16 -0
- package/dist/button-group/IconGroup.vue.js +15 -0
- package/dist/card/Card.vue.d.ts +19 -0
- package/dist/card/Card.vue.js +2 -0
- package/dist/card/CardFooter.vue.d.ts +17 -0
- package/dist/card/CardFooter.vue.js +2 -0
- package/dist/card/CardHeader.vue.d.ts +17 -0
- package/dist/card/CardHeader.vue.js +2 -0
- package/dist/card/CoachmarkCard.vue.d.ts +24 -0
- package/dist/card/CoachmarkCard.vue.js +57 -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 +180 -0
- package/dist/chart/useChart.d.ts +4 -0
- package/dist/checkbox/Checkbox.vue.d.ts +25 -0
- package/dist/checkbox/Checkbox.vue.js +49 -0
- package/dist/chip/TagRemoveButton.vue.d.ts +18 -0
- package/dist/chip/TagRemoveButton.vue.js +2 -0
- package/dist/common/CanvasBanner.vue.d.ts +23 -0
- package/dist/common/CanvasBanner.vue.js +23 -0
- package/dist/common/ContentDivider.vue.d.ts +7 -0
- package/dist/common/ContentDivider.vue.js +22 -0
- package/dist/common/CustomFormValue.vue.d.ts +6 -0
- package/dist/common/CustomFormValue.vue.js +28 -0
- package/dist/common/DotSpinner.vue.d.ts +7 -0
- package/dist/common/DotSpinner.vue.js +34 -0
- package/dist/common/EditableText.vue.d.ts +16 -0
- package/dist/common/EditableText.vue.js +73 -0
- package/dist/common/LoadingOverlay.vue.d.ts +18 -0
- package/dist/common/LoadingOverlay.vue.js +41 -0
- package/dist/common/MarkdownText.vue.d.ts +6 -0
- package/dist/common/MarkdownText.vue.js +93 -0
- package/dist/common/MarqueeLine.vue.d.ts +13 -0
- package/dist/common/MarqueeLine.vue.js +12 -0
- package/dist/common/OverlayIcon.vue.d.ts +13 -0
- package/dist/common/OverlayIcon.vue.js +2 -0
- package/dist/common/SanitizedHtml.vue.d.ts +8 -0
- package/dist/common/SanitizedHtml.vue.js +60 -0
- package/dist/common/TextDivider.vue.d.ts +8 -0
- package/dist/common/TextDivider.vue.js +36 -0
- package/dist/common/TextTicker.vue.d.ts +17 -0
- package/dist/common/TextTicker.vue.js +53 -0
- package/dist/common/TextTickerMultiLine.vue.d.ts +6 -0
- package/dist/common/TextTickerMultiLine.vue.js +54 -0
- package/dist/common/VerticalDivider.vue.d.ts +3 -0
- package/dist/common/VerticalDivider.vue.js +15 -0
- package/dist/common/VideoCompareSlider.vue.d.ts +24 -0
- package/dist/common/VideoCompareSlider.vue.js +141 -0
- package/dist/common/ViewportWidgetShell.vue.d.ts +27 -0
- package/dist/common/ViewportWidgetShell.vue.js +58 -0
- package/dist/common/VirtualGrid.vue.d.ts +38 -0
- package/dist/common/VirtualGrid.vue.js +107 -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 +18 -0
- package/dist/composables/usePopoverSizing.d.ts +12 -0
- package/dist/composables/usePopoverSizing.js +18 -0
- package/dist/confirm/ConfirmBody.vue.d.ts +8 -0
- package/dist/confirm/ConfirmBody.vue.js +27 -0
- package/dist/confirm/ConfirmHeader.vue.d.ts +7 -0
- package/dist/confirm/ConfirmHeader.vue.js +27 -0
- package/dist/content-card/CardBottom.vue.d.ts +16 -0
- package/dist/content-card/CardBottom.vue.js +19 -0
- package/dist/content-card/CardContainer.vue.d.ts +26 -0
- package/dist/content-card/CardContainer.vue.js +61 -0
- package/dist/content-card/CardTop.vue.d.ts +36 -0
- package/dist/content-card/CardTop.vue.js +72 -0
- package/dist/dialog/Dialog.vue.d.ts +21 -0
- package/dist/dialog/Dialog.vue.js +25 -0
- package/dist/dialog/DialogClose.vue.d.ts +13 -0
- package/dist/dialog/DialogClose.vue.js +24 -0
- package/dist/dialog/DialogContent.vue.d.ts +36 -0
- package/dist/dialog/DialogContent.vue.js +73 -0
- package/dist/dialog/DialogDescription.vue.d.ts +18 -0
- package/dist/dialog/DialogDescription.vue.js +33 -0
- package/dist/dialog/DialogFooter.vue.d.ts +17 -0
- package/dist/dialog/DialogFooter.vue.js +24 -0
- package/dist/dialog/DialogHeader.vue.d.ts +17 -0
- package/dist/dialog/DialogHeader.vue.js +24 -0
- package/dist/dialog/DialogMaximize.vue.d.ts +10 -0
- package/dist/dialog/DialogMaximize.vue.js +27 -0
- package/dist/dialog/DialogOverlay.vue.d.ts +8 -0
- package/dist/dialog/DialogOverlay.vue.js +35 -0
- package/dist/dialog/DialogPanel.vue.d.ts +18 -0
- package/dist/dialog/DialogPanel.vue.js +55 -0
- package/dist/dialog/DialogPortal.vue.d.ts +14 -0
- package/dist/dialog/DialogPortal.vue.js +38 -0
- package/dist/dialog/DialogTitle.vue.d.ts +18 -0
- package/dist/dialog/DialogTitle.vue.js +2 -0
- package/dist/dialog/dialog.variants.d.ts +16 -0
- package/dist/dialog/dialog.variants.js +39 -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 +42 -0
- package/dist/field/FieldDescription.vue.d.ts +17 -0
- package/dist/field/FieldDescription.vue.js +24 -0
- package/dist/field/FieldError.vue.d.ts +21 -0
- package/dist/field/FieldError.vue.js +39 -0
- package/dist/field/FieldGroup.vue.d.ts +17 -0
- package/dist/field/FieldGroup.vue.js +24 -0
- package/dist/field/FieldLabel.vue.d.ts +17 -0
- package/dist/field/FieldLabel.vue.js +28 -0
- package/dist/field/ModelInfoField.vue.d.ts +18 -0
- package/dist/field/ModelInfoField.vue.js +18 -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 +26 -0
- package/dist/hover-card/HoverCardContent.vue.d.ts +18 -0
- package/dist/hover-card/HoverCardContent.vue.js +68 -0
- package/dist/hover-card/HoverCardTrigger.vue.d.ts +14 -0
- package/dist/hover-card/HoverCardTrigger.vue.js +23 -0
- package/dist/icon/ComfyLogo.vue.d.ts +9 -0
- package/dist/icon/ComfyLogo.vue.js +33 -0
- package/dist/icon/PuzzleIcon.vue.d.ts +8 -0
- package/dist/icon/PuzzleIcon.vue.js +40 -0
- package/dist/icon/TinyChevronIcon.vue.d.ts +6 -0
- package/dist/icon/TinyChevronIcon.vue.js +31 -0
- package/dist/icon/VerifiedIcon.vue.d.ts +8 -0
- package/dist/icon/VerifiedIcon.vue.js +32 -0
- package/dist/input/Input.vue.d.ts +21 -0
- package/dist/input/Input.vue.js +2 -0
- package/dist/input/PasswordInput.vue.d.ts +18 -0
- package/dist/input/PasswordInput.vue.js +68 -0
- package/dist/input-group/InputGroup.vue.d.ts +17 -0
- package/dist/input-group/InputGroup.vue.js +2 -0
- package/dist/input-group/InputGroupAddon.vue.d.ts +19 -0
- package/dist/input-group/InputGroupAddon.vue.js +2 -0
- package/dist/input-group/InputGroupButton.vue.d.ts +21 -0
- package/dist/input-group/InputGroupButton.vue.js +2 -0
- package/dist/input-group/InputGroupInput.vue.d.ts +15 -0
- package/dist/input-group/InputGroupInput.vue.js +2 -0
- package/dist/input-group/inputGroup.variants.d.ts +21 -0
- package/dist/input-group/inputGroup.variants.js +22 -0
- package/dist/knob/Knob.vue.d.ts +19 -0
- package/dist/knob/Knob.vue.js +124 -0
- package/dist/label/Label.vue.d.ts +18 -0
- package/dist/label/Label.vue.js +2 -0
- package/dist/media/AudioPreview.vue.d.ts +6 -0
- package/dist/media/AudioPreview.vue.js +28 -0
- package/dist/media/MediaTitle.vue.d.ts +6 -0
- package/dist/media/MediaTitle.vue.js +19 -0
- package/dist/media/VideoPlayOverlay.vue.d.ts +8 -0
- package/dist/media/VideoPlayOverlay.vue.js +28 -0
- package/dist/media/VideoPreview.vue.d.ts +7 -0
- package/dist/media/VideoPreview.vue.js +32 -0
- package/dist/media/ZoomPane.vue.d.ts +17 -0
- package/dist/media/ZoomPane.vue.js +62 -0
- package/dist/menu/ContextMenu.vue.d.ts +31 -0
- package/dist/menu/ContextMenu.vue.js +52 -0
- package/dist/menu/ContextMenuContent.vue.d.ts +32 -0
- package/dist/menu/ContextMenuContent.vue.js +2 -0
- package/dist/menu/Menu.vue.d.ts +41 -0
- package/dist/menu/Menu.vue.js +79 -0
- package/dist/menu/MenuAction.vue.d.ts +26 -0
- package/dist/menu/MenuAction.vue.js +2 -0
- package/dist/menu/MenuContent.vue.d.ts +35 -0
- package/dist/menu/MenuContent.vue.js +2 -0
- package/dist/menu/MenuItem.vue.d.ts +22 -0
- package/dist/menu/MenuItem.vue.js +35 -0
- package/dist/menu/MenuItemContent.vue.d.ts +8 -0
- package/dist/menu/MenuItemContent.vue.js +2 -0
- package/dist/menu/MenuItems.vue.d.ts +32 -0
- package/dist/menu/MenuItems.vue.js +2 -0
- package/dist/menu/MenuRadioGroup.vue.d.ts +26 -0
- package/dist/menu/MenuRadioGroup.vue.js +2 -0
- package/dist/menu/MenuRadioItem.vue.d.ts +22 -0
- package/dist/menu/MenuRadioItem.vue.js +2 -0
- package/dist/menu/MenuSeparator.vue.d.ts +8 -0
- package/dist/menu/MenuSeparator.vue.js +2 -0
- package/dist/menu/MenuSub.vue.d.ts +20 -0
- package/dist/menu/MenuSub.vue.js +2 -0
- package/dist/menu/MenuSubContent.vue.d.ts +36 -0
- package/dist/menu/MenuSubContent.vue.js +2 -0
- package/dist/menu/MenuSubTrigger.vue.d.ts +18 -0
- package/dist/menu/MenuSubTrigger.vue.js +2 -0
- package/dist/menu/MenuSubmenu.vue.d.ts +21 -0
- package/dist/menu/MenuSubmenu.vue.js +2 -0
- package/dist/menu/menuAnchor.d.ts +4 -0
- package/dist/menu/menuAnchor.js +15 -0
- package/dist/menu/menuStyles.d.ts +4 -0
- package/dist/menu/menuStyles.js +7 -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 +56 -0
- package/dist/message/Message.vue.d.ts +50 -0
- package/dist/message/Message.vue.js +75 -0
- package/dist/message/message.variants.d.ts +11 -0
- package/dist/message/message.variants.js +15 -0
- package/dist/multi-select/MultiSelect.vue.d.ts +170 -0
- package/dist/multi-select/MultiSelect.vue.js +137 -0
- package/dist/multi-select/MultiSelectContent.vue.d.ts +32 -0
- package/dist/multi-select/MultiSelectContent.vue.js +2 -0
- package/dist/multi-select/MultiSelectTrigger.vue.d.ts +24 -0
- package/dist/multi-select/MultiSelectTrigger.vue.js +2 -0
- package/dist/multi-select/types.d.ts +35 -0
- package/dist/multi-select/types.js +0 -0
- package/dist/navigation/NavTitle.vue.d.ts +12 -0
- package/dist/navigation/NavTitle.vue.js +42 -0
- package/dist/navigation/SidebarTopArea.vue.d.ts +15 -0
- package/dist/navigation/SidebarTopArea.vue.js +16 -0
- package/dist/number-field/NumberField.vue.d.ts +26 -0
- package/dist/number-field/NumberField.vue.js +75 -0
- package/dist/number-field/NumberFieldDecrement.vue.d.ts +18 -0
- package/dist/number-field/NumberFieldDecrement.vue.js +35 -0
- package/dist/number-field/NumberFieldIncrement.vue.d.ts +18 -0
- package/dist/number-field/NumberFieldIncrement.vue.js +35 -0
- package/dist/number-field/NumberFieldInput.vue.d.ts +7 -0
- package/dist/number-field/NumberFieldInput.vue.js +25 -0
- package/dist/number-field/PropertyNumberField.vue.d.ts +14 -0
- package/dist/number-field/PropertyNumberField.vue.js +56 -0
- package/dist/pagination/Pagination.vue.d.ts +22 -0
- package/dist/pagination/Pagination.vue.js +140 -0
- package/dist/popover/PopoverContent.vue.d.ts +33 -0
- package/dist/popover/PopoverContent.vue.js +91 -0
- package/dist/popover/usePopoverViewportDismiss.d.ts +2 -0
- package/dist/popover/usePopoverViewportDismiss.js +13 -0
- package/dist/radio-group/RadioGroup.vue.d.ts +22 -0
- package/dist/radio-group/RadioGroup.vue.js +45 -0
- package/dist/radio-group/RadioGroupItem.vue.d.ts +22 -0
- package/dist/radio-group/RadioGroupItem.vue.js +42 -0
- package/dist/search-input/AsyncSearchInput.vue.d.ts +27 -0
- package/dist/search-input/AsyncSearchInput.vue.js +104 -0
- package/dist/search-input/SearchAutocomplete.vue.d.ts +53 -0
- package/dist/search-input/SearchAutocomplete.vue.js +234 -0
- package/dist/search-input/SearchInput.vue.d.ts +46 -0
- package/dist/search-input/SearchInput.vue.js +127 -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 +48 -0
- package/dist/select/Select.vue.d.ts +21 -0
- package/dist/select/Select.vue.js +2 -0
- package/dist/select/SelectContent.vue.d.ts +29 -0
- package/dist/select/SelectContent.vue.js +2 -0
- package/dist/select/SelectItem.vue.d.ts +18 -0
- package/dist/select/SelectItem.vue.js +2 -0
- package/dist/select/SelectScrollDownButton.vue.d.ts +18 -0
- package/dist/select/SelectScrollDownButton.vue.js +2 -0
- package/dist/select/SelectScrollUpButton.vue.d.ts +18 -0
- package/dist/select/SelectScrollUpButton.vue.js +2 -0
- package/dist/select/SelectTrigger.vue.d.ts +22 -0
- package/dist/select/SelectTrigger.vue.js +2 -0
- package/dist/select/SelectValue.vue.d.ts +14 -0
- package/dist/select/SelectValue.vue.js +2 -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 +15 -0
- package/dist/shared/Badge-D3uWa3yk.js +92 -0
- package/dist/shared/Button-CilmsOkY.js +141 -0
- package/dist/shared/Card-l7baUdn0.js +34 -0
- package/dist/shared/CardFooter-BM6EmVi7.js +21 -0
- package/dist/shared/CardHeader-B5To28Jp.js +21 -0
- package/dist/shared/ContextMenuContent-CNQHJQ81.js +64 -0
- package/dist/shared/DialogTitle-CfkkTGuU.js +43 -0
- package/dist/shared/Input-39RLwDr2.js +38 -0
- package/dist/shared/InputGroup-kjQKkhyB.js +25 -0
- package/dist/shared/InputGroupAddon-DLDRT0CQ.js +38 -0
- package/dist/shared/InputGroupButton-BoEp2apg.js +41 -0
- package/dist/shared/InputGroupInput-E2MlEVUU.js +32 -0
- package/dist/shared/Label-Cx_lFofI.js +36 -0
- package/dist/shared/MenuAction-BdghJ23k.js +124 -0
- package/dist/shared/MenuContent-ChqlM3xA.js +80 -0
- package/dist/shared/MenuItemContent--dPNoBmU.js +69 -0
- package/dist/shared/MenuItems-BJKetPV-.js +69 -0
- package/dist/shared/MenuRadioGroup-Bpjt9sHI.js +65 -0
- package/dist/shared/MenuRadioItem-h7hh_RGU.js +36 -0
- package/dist/shared/MenuSeparator-Dm6CkPqB.js +28 -0
- package/dist/shared/MenuSub-Dbnj2w-X.js +23 -0
- package/dist/shared/MenuSubContent-M-g3fllh.js +69 -0
- package/dist/shared/MenuSubTrigger-D6-3s2NL.js +35 -0
- package/dist/shared/MenuSubmenu-QHWMyfKF.js +43 -0
- package/dist/shared/MultiSelectContent-c1D5avjh.js +162 -0
- package/dist/shared/MultiSelectTrigger-lmuXqETa.js +52 -0
- package/dist/shared/OverlayIcon-DntJI-mm.js +45 -0
- package/dist/shared/SearchableSingleSelect-Dnti1kqJ.js +184 -0
- package/dist/shared/Select-CP3OZjtL.js +33 -0
- package/dist/shared/SelectContent-C8aNlcFf.js +91 -0
- package/dist/shared/SelectItem-tU4CIa5J.js +42 -0
- package/dist/shared/SelectScrollDownButton-Dvig5MVc.js +30 -0
- package/dist/shared/SelectScrollUpButton-lv-npT6v.js +30 -0
- package/dist/shared/SelectTrigger-CCDiZW91.js +47 -0
- package/dist/shared/SelectValue-DFZFSiQp.js +23 -0
- package/dist/shared/Switch-DsCzHpDU.js +63 -0
- package/dist/shared/TableHead-OxGist4m.js +24 -0
- package/dist/shared/TagRemoveButton-BiCdscIC.js +38 -0
- package/dist/shared/TextTooltip-ClHQl84h.js +29 -0
- package/dist/shared/Tooltip-DbXyHv20.js +34 -0
- package/dist/shared/TooltipContent-Bju-U7gc.js +91 -0
- package/dist/shared/TooltipTrigger-CVwISmWo.js +65 -0
- package/dist/shared/_plugin-vue_export-helper-BOaGB7Aw.js +8 -0
- package/dist/shared/searchInput.variants-NOge_52E.js +47 -0
- package/dist/shared/select.variants-BPn5Z7N1.js +40 -0
- package/dist/shared/src-CnJ6AzLP.js +12 -0
- package/dist/shared/tabKeys-BISOrxWu.js +4 -0
- package/dist/shared/tabs.variants-XUREdHry.js +23 -0
- package/dist/shared/tag.variants-CCqCn8Jc.js +34 -0
- package/dist/shared/tagsInputContext-QXu7RrG5.js +5 -0
- package/dist/shared/toggleGroup.variants-CvjZDHMw.js +39 -0
- package/dist/shared/tooltipContext-BL5JtM0i.js +4 -0
- package/dist/single-select/SearchableSingleSelect.vue.d.ts +39 -0
- package/dist/single-select/SearchableSingleSelect.vue.js +2 -0
- package/dist/single-select/SingleSelect.vue.d.ts +38 -0
- package/dist/single-select/SingleSelect.vue.js +187 -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 +24 -0
- package/dist/slider/Slider.vue.d.ts +16 -0
- package/dist/slider/Slider.vue.js +88 -0
- package/dist/spinner/Spinner.vue.d.ts +7 -0
- package/dist/spinner/Spinner.vue.js +41 -0
- package/dist/splitter/SplitterGroup.vue.d.ts +23 -0
- package/dist/splitter/SplitterGroup.vue.js +40 -0
- package/dist/splitter/SplitterPanel.vue.d.ts +26 -0
- package/dist/splitter/SplitterPanel.vue.js +45 -0
- package/dist/splitter/SplitterResizeHandle.vue.d.ts +22 -0
- package/dist/splitter/SplitterResizeHandle.vue.js +37 -0
- package/dist/switch/Switch.vue.d.ts +17 -0
- package/dist/switch/Switch.vue.js +2 -0
- package/dist/tab/Tab.vue.d.ts +24 -0
- package/dist/tab/Tab.vue.js +76 -0
- package/dist/tab/TabList.vue.d.ts +26 -0
- package/dist/tab/TabList.vue.js +31 -0
- package/dist/tab/TabPanel.vue.d.ts +23 -0
- package/dist/tab/TabPanel.vue.js +28 -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 +23 -0
- package/dist/table/TableBody.vue.d.ts +17 -0
- package/dist/table/TableBody.vue.js +21 -0
- package/dist/table/TableCell.vue.d.ts +17 -0
- package/dist/table/TableCell.vue.js +21 -0
- package/dist/table/TableHead.vue.d.ts +17 -0
- package/dist/table/TableHead.vue.js +2 -0
- package/dist/table/TableHeader.vue.d.ts +17 -0
- package/dist/table/TableHeader.vue.js +21 -0
- package/dist/table/TableRow.vue.d.ts +17 -0
- package/dist/table/TableRow.vue.js +21 -0
- package/dist/table/TableSortHead.vue.d.ts +26 -0
- package/dist/table/TableSortHead.vue.js +47 -0
- package/dist/table/tableUtils.d.ts +3 -0
- package/dist/table/tableUtils.js +19 -0
- package/dist/tabs/Tabs.vue.d.ts +22 -0
- package/dist/tabs/Tabs.vue.js +43 -0
- package/dist/tabs/TabsContent.vue.d.ts +18 -0
- package/dist/tabs/TabsContent.vue.js +37 -0
- package/dist/tabs/TabsList.vue.d.ts +20 -0
- package/dist/tabs/TabsList.vue.js +38 -0
- package/dist/tabs/TabsTrigger.vue.d.ts +20 -0
- package/dist/tabs/TabsTrigger.vue.js +39 -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 +98 -0
- package/dist/tags-input/TagsInputInput.vue.d.ts +9 -0
- package/dist/tags-input/TagsInputInput.vue.js +56 -0
- package/dist/tags-input/TagsInputItem.vue.d.ts +18 -0
- package/dist/tags-input/TagsInputItem.vue.js +34 -0
- package/dist/tags-input/TagsInputItemDelete.vue.d.ts +18 -0
- package/dist/tags-input/TagsInputItemDelete.vue.js +35 -0
- package/dist/tags-input/TagsInputItemText.vue.d.ts +8 -0
- package/dist/tags-input/TagsInputItemText.vue.js +28 -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 +33 -0
- package/dist/toast/ToastClose.vue.d.ts +8 -0
- package/dist/toast/ToastClose.vue.js +42 -0
- package/dist/toast/ToastDescription.vue.d.ts +18 -0
- package/dist/toast/ToastDescription.vue.js +31 -0
- package/dist/toast/ToastDock.vue.d.ts +13 -0
- package/dist/toast/ToastDock.vue.js +29 -0
- package/dist/toast/ToastPanel.vue.d.ts +30 -0
- package/dist/toast/ToastPanel.vue.js +47 -0
- package/dist/toast/ToastRoot.vue.d.ts +100 -0
- package/dist/toast/ToastRoot.vue.js +55 -0
- package/dist/toast/ToastTitle.vue.d.ts +18 -0
- package/dist/toast/ToastTitle.vue.js +31 -0
- package/dist/toast/ToastViewport.vue.d.ts +9 -0
- package/dist/toast/ToastViewport.vue.js +33 -0
- package/dist/toggle-group/ToggleGroup.vue.d.ts +25 -0
- package/dist/toggle-group/ToggleGroup.vue.js +61 -0
- package/dist/toggle-group/ToggleGroupItem.vue.d.ts +21 -0
- package/dist/toggle-group/ToggleGroupItem.vue.js +45 -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 +2 -0
- package/dist/tooltip/Tooltip.vue.d.ts +23 -0
- package/dist/tooltip/Tooltip.vue.js +2 -0
- package/dist/tooltip/TooltipContent.vue.d.ts +24 -0
- package/dist/tooltip/TooltipContent.vue.js +2 -0
- package/dist/tooltip/TooltipProvider.vue.d.ts +15 -0
- package/dist/tooltip/TooltipProvider.vue.js +39 -0
- package/dist/tooltip/TooltipTrigger.vue.d.ts +14 -0
- package/dist/tooltip/TooltipTrigger.vue.js +2 -0
- package/dist/tooltip/tooltipConfig.d.ts +5 -0
- package/dist/tooltip/tooltipConfig.js +8 -0
- package/dist/tooltip/tooltipContext.d.ts +2 -0
- package/dist/transition/TransitionCollapse.vue.d.ts +21 -0
- package/dist/transition/TransitionCollapse.vue.js +110 -0
- package/dist/tree/Tree.vue.d.ts +32 -0
- package/dist/tree/Tree.vue.js +55 -0
- package/dist/tree/TreeItem.vue.d.ts +29 -0
- package/dist/tree/TreeItem.vue.js +82 -0
- package/dist/tree/treeStyles.d.ts +4 -0
- package/dist/tree/treeStyles.js +7 -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 +167 -7
- 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 +180 -0
- package/src/css/_palette.css +43 -0
- package/src/css/base.css +0 -6
- 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/style.css +109 -1698
- package/src/icons/README.md +33 -26
- package/src/icons/astroid-filled.svg +3 -0
- package/src/icons/claude.svg +1 -1
- package/src/icons/comfy-cloud.svg +4 -0
- package/src/icons/comfy-logo.svg +2 -2
- package/src/select.variants.ts +53 -0
- package/src/tag.variants.ts +38 -0
- package/src/workspaceAvatar.ts +54 -0
- package/src/icons/credits.svg +0 -3
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { t as cn } from "../shared/src-CnJ6AzLP.js";
|
|
2
|
+
import { usePopoverViewportDismiss } from "./usePopoverViewportDismiss.js";
|
|
3
|
+
import { computed, createBlock, createPropsRestProxy, createVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
4
|
+
import { PopoverContent, PopoverPortal, injectPopoverRootContext, useForwardPropsEmits } from "reka-ui";
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/components/popover/PopoverContent.vue
|
|
7
|
+
var PopoverContent_default = /* @__PURE__ */ defineComponent({
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
__name: "PopoverContent",
|
|
10
|
+
props: {
|
|
11
|
+
forceMount: { type: Boolean },
|
|
12
|
+
memoDependencies: {},
|
|
13
|
+
side: {},
|
|
14
|
+
sideOffset: { default: 4 },
|
|
15
|
+
sideFlip: { type: Boolean },
|
|
16
|
+
align: { default: "center" },
|
|
17
|
+
alignOffset: {},
|
|
18
|
+
alignFlip: { type: Boolean },
|
|
19
|
+
avoidCollisions: { type: Boolean },
|
|
20
|
+
collisionBoundary: {},
|
|
21
|
+
collisionPadding: { default: 8 },
|
|
22
|
+
arrowPadding: {},
|
|
23
|
+
hideShiftedArrow: { type: Boolean },
|
|
24
|
+
sticky: {},
|
|
25
|
+
hideWhenDetached: { type: Boolean },
|
|
26
|
+
positionStrategy: {},
|
|
27
|
+
updatePositionStrategy: {},
|
|
28
|
+
disableUpdateOnLayoutShift: { type: Boolean },
|
|
29
|
+
prioritizePosition: { type: Boolean },
|
|
30
|
+
reference: {},
|
|
31
|
+
dir: {},
|
|
32
|
+
asChild: { type: Boolean },
|
|
33
|
+
as: {},
|
|
34
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
35
|
+
class: { type: [
|
|
36
|
+
Boolean,
|
|
37
|
+
null,
|
|
38
|
+
String,
|
|
39
|
+
Object,
|
|
40
|
+
Array
|
|
41
|
+
] },
|
|
42
|
+
dismissOnViewportChange: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: false
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
emits: [
|
|
48
|
+
"escapeKeyDown",
|
|
49
|
+
"pointerDownOutside",
|
|
50
|
+
"focusOutside",
|
|
51
|
+
"interactOutside",
|
|
52
|
+
"openAutoFocus",
|
|
53
|
+
"closeAutoFocus"
|
|
54
|
+
],
|
|
55
|
+
setup(__props, { emit: __emit }) {
|
|
56
|
+
const restProps = createPropsRestProxy(__props, [
|
|
57
|
+
"align",
|
|
58
|
+
"sideOffset",
|
|
59
|
+
"collisionPadding",
|
|
60
|
+
"class",
|
|
61
|
+
"dismissOnViewportChange"
|
|
62
|
+
]);
|
|
63
|
+
const emits = __emit;
|
|
64
|
+
const delegatedProps = computed(() => ({
|
|
65
|
+
align: __props.align,
|
|
66
|
+
sideOffset: __props.sideOffset,
|
|
67
|
+
collisionPadding: __props.collisionPadding,
|
|
68
|
+
...restProps
|
|
69
|
+
}));
|
|
70
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
71
|
+
const rootContext = injectPopoverRootContext();
|
|
72
|
+
usePopoverViewportDismiss(computed({
|
|
73
|
+
get: () => __props.dismissOnViewportChange && rootContext.open.value,
|
|
74
|
+
set: (open) => rootContext.onOpenChange(open)
|
|
75
|
+
}), rootContext.triggerElement);
|
|
76
|
+
return (_ctx, _cache) => {
|
|
77
|
+
return openBlock(), createBlock(unref(PopoverPortal), { key: Number(restProps.forceMount || unref(rootContext).open.value) }, {
|
|
78
|
+
default: withCtx(() => [createVNode(unref(PopoverContent), mergeProps({ "data-slot": "popover-content" }, {
|
|
79
|
+
...unref(forwarded),
|
|
80
|
+
..._ctx.$attrs
|
|
81
|
+
}, { class: unref(cn)("z-overlay w-72 origin-(--reka-popover-content-transform-origin) rounded-md border bg-background p-4 text-foreground shadow-md outline-none", "overflow-auto [:where(&)]:max-h-(--reka-popover-content-available-height) [:where(&)]:max-w-(--reka-popover-content-available-width)", "data-[state=closed]:animate-out data-[state=open]:animate-in", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95", "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2", "data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", __props.class) }), {
|
|
82
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
83
|
+
_: 3
|
|
84
|
+
}, 16, ["class"])]),
|
|
85
|
+
_: 3
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
//#endregion
|
|
91
|
+
export { PopoverContent_default as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { toValue } from "vue";
|
|
2
|
+
import { useEventListener } from "@vueuse/core";
|
|
3
|
+
//#region src/components/popover/usePopoverViewportDismiss.ts
|
|
4
|
+
function usePopoverViewportDismiss(open, anchor) {
|
|
5
|
+
useEventListener(() => open.value ? window : void 0, "resize", () => {
|
|
6
|
+
open.value = false;
|
|
7
|
+
});
|
|
8
|
+
useEventListener(() => open.value ? window : void 0, "scroll", (event) => {
|
|
9
|
+
if (event.target === document || event.target instanceof Window || event.target instanceof Element && event.target.contains(toValue(anchor) ?? null)) open.value = false;
|
|
10
|
+
}, { capture: true });
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { usePopoverViewportDismiss };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RadioGroupRootProps } from 'reka-ui';
|
|
2
|
+
import { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = RadioGroupRootProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_8: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (payload: import('reka-ui').AcceptableValue) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((payload: import('reka-ui').AcceptableValue) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { t as cn } from "../shared/src-CnJ6AzLP.js";
|
|
2
|
+
import { createBlock, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
3
|
+
import { RadioGroupRoot, useForwardPropsEmits } from "reka-ui";
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/components/radio-group/RadioGroup.vue
|
|
7
|
+
var RadioGroup_default = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "RadioGroup",
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: {},
|
|
11
|
+
defaultValue: {},
|
|
12
|
+
disabled: { type: Boolean },
|
|
13
|
+
orientation: {},
|
|
14
|
+
dir: {},
|
|
15
|
+
loop: { type: Boolean },
|
|
16
|
+
asChild: { type: Boolean },
|
|
17
|
+
as: {},
|
|
18
|
+
name: {},
|
|
19
|
+
required: { type: Boolean },
|
|
20
|
+
class: { type: [
|
|
21
|
+
Boolean,
|
|
22
|
+
null,
|
|
23
|
+
String,
|
|
24
|
+
Object,
|
|
25
|
+
Array
|
|
26
|
+
] }
|
|
27
|
+
},
|
|
28
|
+
emits: ["update:modelValue"],
|
|
29
|
+
setup(__props, { emit: __emit }) {
|
|
30
|
+
const props = __props;
|
|
31
|
+
const emits = __emit;
|
|
32
|
+
const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
return openBlock(), createBlock(unref(RadioGroupRoot), mergeProps(unref(forwarded), {
|
|
35
|
+
"data-slot": "radio-group",
|
|
36
|
+
class: unref(cn)("flex gap-2", props.class)
|
|
37
|
+
}), {
|
|
38
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
39
|
+
_: 3
|
|
40
|
+
}, 16, ["class"]);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
//#endregion
|
|
45
|
+
export { RadioGroup_default as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RadioGroupItemProps } from 'reka-ui';
|
|
2
|
+
import { HTMLAttributes } from 'vue';
|
|
3
|
+
type __VLS_Props = RadioGroupItemProps & {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
};
|
|
6
|
+
declare var __VLS_8: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_8) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
select: (event: import('reka-ui').RadioGroupItemSelectEvent) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onSelect?: ((event: import('reka-ui').RadioGroupItemSelectEvent) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { t as cn } from "../shared/src-CnJ6AzLP.js";
|
|
2
|
+
import { createBlock, createVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
3
|
+
import { RadioGroupIndicator, RadioGroupItem, useForwardPropsEmits } from "reka-ui";
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core";
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/components/radio-group/RadioGroupItem.vue
|
|
7
|
+
var RadioGroupItem_default = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "RadioGroupItem",
|
|
9
|
+
props: {
|
|
10
|
+
id: {},
|
|
11
|
+
value: {},
|
|
12
|
+
disabled: { type: Boolean },
|
|
13
|
+
asChild: { type: Boolean },
|
|
14
|
+
as: {},
|
|
15
|
+
name: {},
|
|
16
|
+
required: { type: Boolean },
|
|
17
|
+
class: { type: [
|
|
18
|
+
Boolean,
|
|
19
|
+
null,
|
|
20
|
+
String,
|
|
21
|
+
Object,
|
|
22
|
+
Array
|
|
23
|
+
] }
|
|
24
|
+
},
|
|
25
|
+
emits: ["select"],
|
|
26
|
+
setup(__props, { emit: __emit }) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const emits = __emit;
|
|
29
|
+
const forwarded = useForwardPropsEmits(reactiveOmit(props, "class"), emits);
|
|
30
|
+
return (_ctx, _cache) => {
|
|
31
|
+
return openBlock(), createBlock(unref(RadioGroupItem), mergeProps(unref(forwarded), {
|
|
32
|
+
"data-slot": "radio-group-item",
|
|
33
|
+
class: unref(cn)("inline-flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-full border bg-transparent outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary", props.class)
|
|
34
|
+
}), {
|
|
35
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, () => [createVNode(unref(RadioGroupIndicator), { class: "size-2 rounded-full bg-primary" })])]),
|
|
36
|
+
_: 3
|
|
37
|
+
}, 16, ["class"]);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
//#endregion
|
|
42
|
+
export { RadioGroupItem_default as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HTMLAttributes, MaybeRefOrGetter } from 'vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
accessibleLabel: string;
|
|
4
|
+
clearLabel: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
searcher?: (query: string, onCleanup: (cleanupFn: () => void) => void) => Promise<void>;
|
|
7
|
+
updateKey?: MaybeRefOrGetter<unknown>;
|
|
8
|
+
autofocus?: boolean;
|
|
9
|
+
debounceMs?: number;
|
|
10
|
+
debounceMaxWaitMs?: number;
|
|
11
|
+
class?: HTMLAttributes['class'];
|
|
12
|
+
};
|
|
13
|
+
type __VLS_ModelProps = {
|
|
14
|
+
modelValue?: string;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
17
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
18
|
+
focus: () => void | undefined;
|
|
19
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
"update:modelValue": (value: string) => any;
|
|
21
|
+
enter: (event: KeyboardEvent) => any;
|
|
22
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
23
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
24
|
+
onEnter?: ((event: KeyboardEvent) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { t as cn } from "../shared/src-CnJ6AzLP.js";
|
|
2
|
+
import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeModels, nextTick, normalizeClass, onMounted, openBlock, ref, toRef, toValue, unref, useModel, vModelText, watch, withDirectives, withKeys } from "vue";
|
|
3
|
+
import { refDebounced } from "@vueuse/core";
|
|
4
|
+
//#region src/components/search-input/AsyncSearchInput.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var _hoisted_1 = [
|
|
6
|
+
"placeholder",
|
|
7
|
+
"aria-label",
|
|
8
|
+
"autofocus"
|
|
9
|
+
];
|
|
10
|
+
var _hoisted_2 = ["aria-label"];
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/components/search-input/AsyncSearchInput.vue
|
|
13
|
+
var AsyncSearchInput_default = /* @__PURE__ */ defineComponent({
|
|
14
|
+
__name: "AsyncSearchInput",
|
|
15
|
+
props: /*@__PURE__*/ mergeModels({
|
|
16
|
+
accessibleLabel: {},
|
|
17
|
+
clearLabel: {},
|
|
18
|
+
placeholder: {},
|
|
19
|
+
searcher: {
|
|
20
|
+
type: Function,
|
|
21
|
+
default: async () => {}
|
|
22
|
+
},
|
|
23
|
+
updateKey: {},
|
|
24
|
+
autofocus: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
debounceMs: { default: 250 },
|
|
29
|
+
debounceMaxWaitMs: { default: 1e3 },
|
|
30
|
+
class: { type: [
|
|
31
|
+
Boolean,
|
|
32
|
+
null,
|
|
33
|
+
String,
|
|
34
|
+
Object,
|
|
35
|
+
Array
|
|
36
|
+
] }
|
|
37
|
+
}, {
|
|
38
|
+
"modelValue": { default: "" },
|
|
39
|
+
"modelModifiers": {}
|
|
40
|
+
}),
|
|
41
|
+
emits: /*@__PURE__*/ mergeModels(["enter"], ["update:modelValue"]),
|
|
42
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
43
|
+
const emit = __emit;
|
|
44
|
+
const searchQuery = useModel(__props, "modelValue");
|
|
45
|
+
const inputRef = ref();
|
|
46
|
+
onMounted(() => {
|
|
47
|
+
if (!__props.autofocus) return;
|
|
48
|
+
nextTick(() => inputRef.value?.focus());
|
|
49
|
+
});
|
|
50
|
+
__expose({ focus: () => inputRef.value?.focus() });
|
|
51
|
+
const isQuerying = ref(false);
|
|
52
|
+
const debouncedSearchQuery = refDebounced(searchQuery, __props.debounceMs, { maxWait: __props.debounceMaxWaitMs });
|
|
53
|
+
watch(searchQuery, (value) => {
|
|
54
|
+
isQuerying.value = value !== debouncedSearchQuery.value;
|
|
55
|
+
});
|
|
56
|
+
const updateKeyRef = toRef(() => toValue(__props.updateKey));
|
|
57
|
+
watch([debouncedSearchQuery, updateKeyRef], (_, __, onCleanup) => {
|
|
58
|
+
let isCleanup = false;
|
|
59
|
+
let cleanupFn;
|
|
60
|
+
onCleanup(() => {
|
|
61
|
+
isCleanup = true;
|
|
62
|
+
cleanupFn?.();
|
|
63
|
+
});
|
|
64
|
+
__props.searcher(debouncedSearchQuery.value, (cb) => cleanupFn = cb).catch((error) => {
|
|
65
|
+
console.error("[AsyncSearchInput] searcher failed", error);
|
|
66
|
+
}).finally(() => {
|
|
67
|
+
if (!isCleanup) isQuerying.value = false;
|
|
68
|
+
});
|
|
69
|
+
}, { immediate: true });
|
|
70
|
+
function handleFocus(event) {
|
|
71
|
+
const target = event.target;
|
|
72
|
+
if (target instanceof HTMLInputElement) target.select();
|
|
73
|
+
}
|
|
74
|
+
function handleKeydownEnter(event) {
|
|
75
|
+
if (event.isComposing) return;
|
|
76
|
+
emit("enter", event);
|
|
77
|
+
}
|
|
78
|
+
return (_ctx, _cache) => {
|
|
79
|
+
return openBlock(), createElementBlock("label", { class: normalizeClass(unref(cn)("group", "rounded-lg bg-secondary transition-all duration-150", "flex flex-1 items-center", "border-0 text-foreground", "focus-within:ring focus-within:ring-ring", __props.class)) }, [
|
|
80
|
+
createElementVNode("i", { class: normalizeClass(unref(cn)("ml-2 transition-colors duration-150", isQuerying.value ? "icon-[lucide--loader-circle] animate-spin" : "icon-[lucide--search]", searchQuery.value?.trim() !== "" ? "text-foreground" : "text-muted-foreground group-focus-within:text-foreground group-hover:text-foreground")) }, null, 2),
|
|
81
|
+
withDirectives(createElementVNode("input", {
|
|
82
|
+
ref_key: "inputRef",
|
|
83
|
+
ref: inputRef,
|
|
84
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchQuery.value = $event),
|
|
85
|
+
type: "text",
|
|
86
|
+
class: "mx-2 my-1.5 h-5 w-full min-w-0 border-0 bg-transparent text-sm ring-0 outline-0",
|
|
87
|
+
placeholder: __props.placeholder,
|
|
88
|
+
"aria-label": __props.accessibleLabel,
|
|
89
|
+
autofocus: __props.autofocus,
|
|
90
|
+
onFocus: handleFocus,
|
|
91
|
+
onKeydown: withKeys(handleKeydownEnter, ["enter"])
|
|
92
|
+
}, null, 40, _hoisted_1), [[vModelText, searchQuery.value]]),
|
|
93
|
+
searchQuery.value.trim().length > 0 ? (openBlock(), createElementBlock("button", {
|
|
94
|
+
key: 0,
|
|
95
|
+
class: "m-0 flex shrink-0 items-center justify-center border-0 bg-transparent p-0 pr-3 pl-1 text-muted-foreground ring-0 outline-0 transition-all duration-150 hover:scale-108 hover:text-foreground",
|
|
96
|
+
"aria-label": __props.clearLabel,
|
|
97
|
+
onClick: _cache[1] || (_cache[1] = ($event) => searchQuery.value = "")
|
|
98
|
+
}, [createElementVNode("i", { class: normalizeClass(unref(cn)("icon-[lucide--delete] cursor-pointer")) }, null, 2)], 8, _hoisted_2)) : createCommentVNode("", true)
|
|
99
|
+
], 2);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
//#endregion
|
|
104
|
+
export { AsyncSearchInput_default as default };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { HTMLAttributes, StyleValue } from 'vue';
|
|
2
|
+
import { SearchInputVariants } from './searchInput.variants';
|
|
3
|
+
declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<({
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
accessibleLabel: string;
|
|
7
|
+
clearLabel: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
autofocus?: boolean;
|
|
10
|
+
inputId?: string;
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
openOnFocus?: boolean;
|
|
14
|
+
updateModelOnSelect?: boolean;
|
|
15
|
+
size?: SearchInputVariants["size"];
|
|
16
|
+
suggestions?: T[];
|
|
17
|
+
optionLabel?: keyof T & string;
|
|
18
|
+
optionKey?: keyof T & string;
|
|
19
|
+
class?: HTMLAttributes["class"];
|
|
20
|
+
anchorClass?: HTMLAttributes["class"];
|
|
21
|
+
contentStyle?: StyleValue;
|
|
22
|
+
} & {
|
|
23
|
+
modelValue: string;
|
|
24
|
+
}) & {
|
|
25
|
+
onSelect?: ((item: T) => any) | undefined;
|
|
26
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
27
|
+
onHighlight?: ((item: T | undefined) => any) | undefined;
|
|
28
|
+
}> & (typeof globalThis extends {
|
|
29
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
30
|
+
} ? P : {});
|
|
31
|
+
expose: (exposed: import('vue').ShallowUnwrapRef<{
|
|
32
|
+
focus: () => void;
|
|
33
|
+
open: () => void;
|
|
34
|
+
}>) => void;
|
|
35
|
+
attrs: any;
|
|
36
|
+
slots: {
|
|
37
|
+
leading?: (props: {}) => any;
|
|
38
|
+
} & {
|
|
39
|
+
suggestion?: (props: {
|
|
40
|
+
suggestion: T;
|
|
41
|
+
}) => any;
|
|
42
|
+
};
|
|
43
|
+
emit: (((evt: "select", item: T) => void) & ((evt: "highlight", item: T | undefined) => void)) & ((event: "update:modelValue", value: string) => void);
|
|
44
|
+
}>) => import('vue').VNode & {
|
|
45
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
46
|
+
};
|
|
47
|
+
declare const _default: typeof __VLS_export;
|
|
48
|
+
export default _default;
|
|
49
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
50
|
+
[K in keyof T]: T[K];
|
|
51
|
+
} : {
|
|
52
|
+
[K in keyof T as K]: T[K];
|
|
53
|
+
}) & {};
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { t as cn } from "../shared/src-CnJ6AzLP.js";
|
|
2
|
+
import { t as Button_default } from "../shared/Button-CilmsOkY.js";
|
|
3
|
+
import { n as searchInputVariants, t as searchInputSizeConfig } from "../shared/searchInput.variants-NOge_52E.js";
|
|
4
|
+
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, nextTick, normalizeClass, normalizeStyle, openBlock, ref, renderList, renderSlot, toDisplayString, unref, useModel, useTemplateRef, watch, withCtx, withKeys, withModifiers } from "vue";
|
|
5
|
+
import { ComboboxAnchor, ComboboxContent, ComboboxInput, ComboboxItem, ComboboxPortal, ComboboxRoot } from "reka-ui";
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/components/search-input/SearchAutocomplete.vue
|
|
8
|
+
var SearchAutocomplete_default = /* @__PURE__ */ defineComponent({
|
|
9
|
+
__name: "SearchAutocomplete",
|
|
10
|
+
props: /*@__PURE__*/ mergeModels({
|
|
11
|
+
placeholder: {},
|
|
12
|
+
accessibleLabel: {},
|
|
13
|
+
clearLabel: {},
|
|
14
|
+
icon: { default: "icon-[lucide--search]" },
|
|
15
|
+
autofocus: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: false
|
|
18
|
+
},
|
|
19
|
+
inputId: {},
|
|
20
|
+
loading: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
disabled: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
openOnFocus: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
updateModelOnSelect: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: true
|
|
35
|
+
},
|
|
36
|
+
size: { default: "md" },
|
|
37
|
+
suggestions: { default: () => [] },
|
|
38
|
+
optionLabel: {},
|
|
39
|
+
optionKey: {},
|
|
40
|
+
class: { type: [
|
|
41
|
+
Boolean,
|
|
42
|
+
null,
|
|
43
|
+
String,
|
|
44
|
+
Object,
|
|
45
|
+
Array
|
|
46
|
+
] },
|
|
47
|
+
anchorClass: { type: [
|
|
48
|
+
Boolean,
|
|
49
|
+
null,
|
|
50
|
+
String,
|
|
51
|
+
Object,
|
|
52
|
+
Array
|
|
53
|
+
] },
|
|
54
|
+
contentStyle: { type: [
|
|
55
|
+
Boolean,
|
|
56
|
+
null,
|
|
57
|
+
String,
|
|
58
|
+
Object,
|
|
59
|
+
Array
|
|
60
|
+
] }
|
|
61
|
+
}, {
|
|
62
|
+
"modelValue": { required: true },
|
|
63
|
+
"modelModifiers": {}
|
|
64
|
+
}),
|
|
65
|
+
emits: /*@__PURE__*/ mergeModels(["select", "highlight"], ["update:modelValue"]),
|
|
66
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
67
|
+
const emit = __emit;
|
|
68
|
+
const sizeConfig = computed(() => searchInputSizeConfig[__props.size]);
|
|
69
|
+
const modelValue = useModel(__props, "modelValue");
|
|
70
|
+
const comboboxRef = useTemplateRef("comboboxRef");
|
|
71
|
+
const inputRef = ref(null);
|
|
72
|
+
const isOpen = ref(false);
|
|
73
|
+
const isComposing = ref(false);
|
|
74
|
+
function focus() {
|
|
75
|
+
inputRef.value?.$el?.focus();
|
|
76
|
+
}
|
|
77
|
+
function open() {
|
|
78
|
+
isOpen.value = true;
|
|
79
|
+
}
|
|
80
|
+
__expose({
|
|
81
|
+
focus,
|
|
82
|
+
open
|
|
83
|
+
});
|
|
84
|
+
function clearSearch() {
|
|
85
|
+
modelValue.value = "";
|
|
86
|
+
focus();
|
|
87
|
+
}
|
|
88
|
+
function getItemProperty(item, key) {
|
|
89
|
+
if (typeof item === "object" && item !== null) return String(item[key]);
|
|
90
|
+
return String(item);
|
|
91
|
+
}
|
|
92
|
+
function suggestionLabel(item) {
|
|
93
|
+
if (__props.optionLabel) return getItemProperty(item, __props.optionLabel);
|
|
94
|
+
return String(item);
|
|
95
|
+
}
|
|
96
|
+
function suggestionKey(item, index) {
|
|
97
|
+
if (__props.optionKey) return getItemProperty(item, __props.optionKey);
|
|
98
|
+
return `${suggestionLabel(item)}-${index}`;
|
|
99
|
+
}
|
|
100
|
+
function suggestionValue(item) {
|
|
101
|
+
return suggestionLabel(item);
|
|
102
|
+
}
|
|
103
|
+
function onSelectSuggestion(item) {
|
|
104
|
+
if (__props.updateModelOnSelect) modelValue.value = suggestionLabel(item);
|
|
105
|
+
isOpen.value = false;
|
|
106
|
+
emit("select", item);
|
|
107
|
+
}
|
|
108
|
+
function onHighlight(payload) {
|
|
109
|
+
const index = Number(payload?.ref.dataset.suggestionIndex);
|
|
110
|
+
emit("highlight", Number.isInteger(index) ? __props.suggestions[index] : void 0);
|
|
111
|
+
}
|
|
112
|
+
function keepShiftSelectionNative(e) {
|
|
113
|
+
if (e.target !== inputRef.value?.$el) return;
|
|
114
|
+
if (e.shiftKey && (e.key === "Home" || e.key === "End")) e.stopPropagation();
|
|
115
|
+
}
|
|
116
|
+
function onEnterKey(e) {
|
|
117
|
+
if (isComposing.value) {
|
|
118
|
+
e.preventDefault();
|
|
119
|
+
e.stopPropagation();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
watch(() => __props.suggestions, async (items) => {
|
|
123
|
+
isOpen.value = items.length > 0 && (__props.openOnFocus || !!modelValue.value);
|
|
124
|
+
if (isOpen.value) {
|
|
125
|
+
await nextTick();
|
|
126
|
+
comboboxRef.value?.highlightFirstItem?.();
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
return (_ctx, _cache) => {
|
|
130
|
+
return openBlock(), createBlock(unref(ComboboxRoot), {
|
|
131
|
+
ref_key: "comboboxRef",
|
|
132
|
+
ref: comboboxRef,
|
|
133
|
+
open: isOpen.value,
|
|
134
|
+
"onUpdate:open": _cache[3] || (_cache[3] = ($event) => isOpen.value = $event),
|
|
135
|
+
"ignore-filter": "",
|
|
136
|
+
"reset-search-term-on-blur": false,
|
|
137
|
+
"reset-search-term-on-select": false,
|
|
138
|
+
disabled: __props.disabled,
|
|
139
|
+
"open-on-focus": __props.openOnFocus,
|
|
140
|
+
"open-on-click": __props.openOnFocus,
|
|
141
|
+
class: normalizeClass(__props.class),
|
|
142
|
+
onHighlight
|
|
143
|
+
}, {
|
|
144
|
+
default: withCtx(() => [createVNode(unref(ComboboxAnchor), {
|
|
145
|
+
class: normalizeClass(unref(cn)(unref(searchInputVariants)({ size: __props.size }), __props.disabled && "pointer-events-none opacity-50", __props.anchorClass)),
|
|
146
|
+
onClick: focus,
|
|
147
|
+
onKeydownCapture: keepShiftSelectionNative
|
|
148
|
+
}, {
|
|
149
|
+
default: withCtx(() => [
|
|
150
|
+
renderSlot(_ctx.$slots, "leading"),
|
|
151
|
+
modelValue.value ? (openBlock(), createBlock(unref(Button_default), {
|
|
152
|
+
key: 0,
|
|
153
|
+
class: normalizeClass(unref(cn)("absolute", sizeConfig.value.clearPos)),
|
|
154
|
+
variant: "textonly",
|
|
155
|
+
size: "icon-sm",
|
|
156
|
+
"aria-label": __props.clearLabel,
|
|
157
|
+
onClick: withModifiers(clearSearch, ["stop"])
|
|
158
|
+
}, {
|
|
159
|
+
default: withCtx(() => [createElementVNode("i", { class: normalizeClass(unref(cn)("icon-[lucide--x]", sizeConfig.value.icon)) }, null, 2)]),
|
|
160
|
+
_: 1
|
|
161
|
+
}, 8, ["class", "aria-label"])) : __props.loading ? (openBlock(), createElementBlock("i", {
|
|
162
|
+
key: 1,
|
|
163
|
+
class: normalizeClass(unref(cn)("pointer-events-none absolute icon-[lucide--loader-circle] animate-spin", sizeConfig.value.iconPos, sizeConfig.value.icon))
|
|
164
|
+
}, null, 2)) : (openBlock(), createElementBlock("i", {
|
|
165
|
+
key: 2,
|
|
166
|
+
class: normalizeClass(unref(cn)("pointer-events-none absolute", sizeConfig.value.iconPos, sizeConfig.value.icon, __props.icon))
|
|
167
|
+
}, null, 2)),
|
|
168
|
+
createVNode(unref(ComboboxInput), {
|
|
169
|
+
id: __props.inputId,
|
|
170
|
+
ref_key: "inputRef",
|
|
171
|
+
ref: inputRef,
|
|
172
|
+
modelValue: modelValue.value,
|
|
173
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => modelValue.value = $event),
|
|
174
|
+
class: normalizeClass(unref(cn)("h-full min-w-0 flex-1 border-none bg-transparent outline-none", sizeConfig.value.inputPl, sizeConfig.value.inputText)),
|
|
175
|
+
placeholder: __props.placeholder,
|
|
176
|
+
"aria-label": __props.accessibleLabel,
|
|
177
|
+
"auto-focus": __props.autofocus,
|
|
178
|
+
onCompositionstart: _cache[1] || (_cache[1] = ($event) => isComposing.value = true),
|
|
179
|
+
onCompositionend: _cache[2] || (_cache[2] = ($event) => isComposing.value = false),
|
|
180
|
+
onKeydown: withKeys(onEnterKey, ["enter"])
|
|
181
|
+
}, null, 8, [
|
|
182
|
+
"id",
|
|
183
|
+
"modelValue",
|
|
184
|
+
"class",
|
|
185
|
+
"placeholder",
|
|
186
|
+
"aria-label",
|
|
187
|
+
"auto-focus"
|
|
188
|
+
])
|
|
189
|
+
]),
|
|
190
|
+
_: 3
|
|
191
|
+
}, 8, ["class"]), (openBlock(), createBlock(unref(ComboboxPortal), { key: Number(isOpen.value) }, {
|
|
192
|
+
default: withCtx(() => [__props.suggestions.length > 0 ? (openBlock(), createBlock(unref(ComboboxContent), {
|
|
193
|
+
key: 0,
|
|
194
|
+
position: "popper",
|
|
195
|
+
"side-offset": 4,
|
|
196
|
+
style: normalizeStyle(__props.contentStyle),
|
|
197
|
+
class: normalizeClass(unref(cn)("z-overlay max-h-60 w-(--reka-combobox-trigger-width) overflow-y-auto", "rounded-lg border bg-background p-1 shadow-lg"))
|
|
198
|
+
}, {
|
|
199
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.suggestions, (suggestion, index) => {
|
|
200
|
+
return openBlock(), createBlock(unref(ComboboxItem), {
|
|
201
|
+
key: suggestionKey(suggestion, index),
|
|
202
|
+
value: suggestionValue(suggestion),
|
|
203
|
+
"data-suggestion-index": index,
|
|
204
|
+
"aria-label": suggestionLabel(suggestion),
|
|
205
|
+
class: normalizeClass(unref(cn)("cursor-pointer rounded-sm px-3 py-2 text-sm outline-none", "data-highlighted:bg-accent")),
|
|
206
|
+
onSelect: withModifiers(($event) => onSelectSuggestion(suggestion), ["prevent"])
|
|
207
|
+
}, {
|
|
208
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "suggestion", { suggestion }, () => [createTextVNode(toDisplayString(suggestionLabel(suggestion)), 1)])]),
|
|
209
|
+
_: 2
|
|
210
|
+
}, 1032, [
|
|
211
|
+
"value",
|
|
212
|
+
"data-suggestion-index",
|
|
213
|
+
"aria-label",
|
|
214
|
+
"class",
|
|
215
|
+
"onSelect"
|
|
216
|
+
]);
|
|
217
|
+
}), 128))]),
|
|
218
|
+
_: 3
|
|
219
|
+
}, 8, ["style", "class"])) : createCommentVNode("", true)]),
|
|
220
|
+
_: 3
|
|
221
|
+
}))]),
|
|
222
|
+
_: 3
|
|
223
|
+
}, 8, [
|
|
224
|
+
"open",
|
|
225
|
+
"disabled",
|
|
226
|
+
"open-on-focus",
|
|
227
|
+
"open-on-click",
|
|
228
|
+
"class"
|
|
229
|
+
]);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
//#endregion
|
|
234
|
+
export { SearchAutocomplete_default as default };
|