@routa/ui-vue 0.1.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/LICENSE +21 -0
- package/README.md +52 -0
- package/base.css +1 -0
- package/dist/autocomplete/AutoComplete.vue.d.ts +336 -0
- package/dist/autocomplete/index.d.ts +298 -0
- package/dist/autocomplete/index.js +4 -0
- package/dist/autocomplete/index.mjs +321 -0
- package/dist/autocomplete/types.d.ts +58 -0
- package/dist/avatar/Avatar.vue.d.ts +36 -0
- package/dist/avatar/AvatarGroup.vue.d.ts +7 -0
- package/dist/avatar/index.d.ts +7 -0
- package/dist/avatar/index.js +3 -0
- package/dist/avatar/index.mjs +192 -0
- package/dist/avatar/types.d.ts +111 -0
- package/dist/badge/Badge.vue.d.ts +25 -0
- package/dist/badge/index.d.ts +5 -0
- package/dist/badge/index.js +2 -0
- package/dist/badge/index.mjs +72 -0
- package/dist/badge/types.d.ts +86 -0
- package/dist/breadcrumb/Breadcrumb.vue.d.ts +38 -0
- package/dist/breadcrumb/BreadcrumbItem.vue.d.ts +48 -0
- package/dist/breadcrumb/index.d.ts +7 -0
- package/dist/breadcrumb/index.js +2 -0
- package/dist/breadcrumb/index.mjs +87 -0
- package/dist/breadcrumb/types.d.ts +28 -0
- package/dist/button/Button.vue.d.ts +27 -0
- package/dist/button/index.d.ts +5 -0
- package/dist/button/index.js +2 -0
- package/dist/button/index.mjs +10 -0
- package/dist/button/types.d.ts +14 -0
- package/dist/card/Card.vue.d.ts +49 -0
- package/dist/card/index.d.ts +72 -0
- package/dist/card/index.js +2 -0
- package/dist/card/index.mjs +60 -0
- package/dist/card/types.d.ts +16 -0
- package/dist/carousel/Carousel.vue.d.ts +134 -0
- package/dist/carousel/CarouselItem.vue.d.ts +23 -0
- package/dist/carousel/index.d.ts +250 -0
- package/dist/carousel/index.js +2 -0
- package/dist/carousel/index.mjs +354 -0
- package/dist/carousel/types.d.ts +97 -0
- package/dist/cascader/Cascader.vue.d.ts +109 -0
- package/dist/cascader/CascaderPanel.vue.d.ts +55 -0
- package/dist/cascader/index.d.ts +110 -0
- package/dist/cascader/index.js +5 -0
- package/dist/cascader/index.mjs +370 -0
- package/dist/cascader/types.d.ts +54 -0
- package/dist/checkbox/Checkbox.vue.d.ts +99 -0
- package/dist/checkbox/CheckboxGroup.vue.d.ts +59 -0
- package/dist/checkbox/constants.d.ts +2 -0
- package/dist/checkbox/index.d.ts +9 -0
- package/dist/checkbox/index.js +2 -0
- package/dist/checkbox/index.mjs +70 -0
- package/dist/checkbox/types.d.ts +64 -0
- package/dist/chunks/Button.vue_vue_type_script_setup_true_lang-BthtEkGw.mjs +170 -0
- package/dist/chunks/Button.vue_vue_type_script_setup_true_lang-Do1NtIFC.js +1 -0
- package/dist/chunks/Checkbox.vue_vue_type_script_setup_true_lang-DxecbRJE.js +1 -0
- package/dist/chunks/Checkbox.vue_vue_type_script_setup_true_lang-fOXXjwnz.mjs +289 -0
- package/dist/chunks/Icon.vue_vue_type_script_setup_true_lang-LQ-KuJ6a.mjs +57 -0
- package/dist/chunks/Icon.vue_vue_type_script_setup_true_lang-YDWguTmi.js +1 -0
- package/dist/chunks/Input.vue_vue_type_script_setup_true_lang-8x2HE2Cj.js +1 -0
- package/dist/chunks/Input.vue_vue_type_script_setup_true_lang-PeDZ7smO.mjs +391 -0
- package/dist/chunks/Popover.vue_vue_type_script_setup_true_lang-CVWbekIQ.mjs +176 -0
- package/dist/chunks/Popover.vue_vue_type_script_setup_true_lang-TF9OnqB0.js +1 -0
- package/dist/chunks/Scrollbar.vue_vue_type_script_setup_true_lang-CtBz7Ha9.js +1 -0
- package/dist/chunks/Scrollbar.vue_vue_type_script_setup_true_lang-kKvR0Hz3.mjs +124 -0
- package/dist/chunks/TimePanel.vue_vue_type_script_setup_true_lang-BNTM3OeU.js +1 -0
- package/dist/chunks/TimePanel.vue_vue_type_script_setup_true_lang-BxuIhLsF.mjs +170 -0
- package/dist/chunks/_plugin-vue_export-helper-BHFhmbuH.js +1 -0
- package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.mjs +9 -0
- package/dist/chunks/auto-update-6n8Xn1EH.js +1 -0
- package/dist/chunks/auto-update-Dw-2qIsQ.mjs +59 -0
- package/dist/chunks/color-BBpRjg5d.mjs +32 -0
- package/dist/chunks/color-m1q_rZ68.js +1 -0
- package/dist/chunks/context-BEsW77hb.js +1 -0
- package/dist/chunks/context-BlK-PJ3n.mjs +5 -0
- package/dist/chunks/controller-37WpkEdZ.js +1 -0
- package/dist/chunks/controller-3cWaJJMW.mjs +318 -0
- package/dist/chunks/controller-BQhkT8pi.mjs +95 -0
- package/dist/chunks/controller-BnNZOOMj.js +1 -0
- package/dist/chunks/controller-CV-a983I.js +1 -0
- package/dist/chunks/controller-D1BTHmfO.js +1 -0
- package/dist/chunks/controller-DZp6lWY1.mjs +96 -0
- package/dist/chunks/controller-DdEBnv9V.mjs +82 -0
- package/dist/chunks/id-CfLxBW9l.js +1 -0
- package/dist/chunks/id-VS2potoV.mjs +7 -0
- package/dist/chunks/index-B0yEC3RG.mjs +136 -0
- package/dist/chunks/index-B4GP5rXr.mjs +170 -0
- package/dist/chunks/index-DWAWrVaT.js +1 -0
- package/dist/chunks/index-RYR-1S7A.js +1 -0
- package/dist/chunks/install-DJNxamQ0.mjs +10 -0
- package/dist/chunks/install-gnn2dOg9.js +1 -0
- package/dist/chunks/manager-BUdQK4AD.mjs +156 -0
- package/dist/chunks/manager-C-VTKQvg.mjs +85 -0
- package/dist/chunks/manager-C0AUxQ1I.js +2 -0
- package/dist/chunks/manager-d-AJMlyO.js +1 -0
- package/dist/chunks/modal-BiivqQQz.mjs +86 -0
- package/dist/chunks/modal-CRbFkVcm.js +1 -0
- package/dist/chunks/responsive-BYScjISa.js +1 -0
- package/dist/chunks/responsive-jCVnPx1a.mjs +49 -0
- package/dist/chunks/style-C-58-Hx4.mjs +7 -0
- package/dist/chunks/style-CjCLKeeU.js +1 -0
- package/dist/chunks/types-CXAGM03M.mjs +92 -0
- package/dist/chunks/types-DS78vyi2.js +1 -0
- package/dist/chunks/use-form-item-CloIcyon.js +1 -0
- package/dist/chunks/use-form-item-CqDbWCiU.mjs +16 -0
- package/dist/chunks/use-id-BycaM3-h.js +1 -0
- package/dist/chunks/use-id-D3casveg.mjs +9 -0
- package/dist/chunks/use-signals-Bz1smiXh.js +1 -0
- package/dist/chunks/use-signals-CE1T2jXK.mjs +50 -0
- package/dist/chunks/useCanvasRenderer-BPTNzGy0.mjs +87 -0
- package/dist/chunks/useCanvasRenderer-D77k3JCQ.js +1 -0
- package/dist/chunks/useResizeObserver-Cki4q_CI.mjs +60 -0
- package/dist/chunks/useResizeObserver-DMkB1OF3.js +1 -0
- package/dist/chunks/z-index-CNZLw1v7.js +1 -0
- package/dist/chunks/z-index-D9ecXoNe.mjs +14 -0
- package/dist/collapse/Collapse.vue.d.ts +30 -0
- package/dist/collapse/CollapseItem.vue.d.ts +20 -0
- package/dist/collapse/index.d.ts +8 -0
- package/dist/collapse/index.js +3 -0
- package/dist/collapse/index.mjs +144 -0
- package/dist/collapse/types.d.ts +54 -0
- package/dist/color-picker/AlphaSlider.vue.d.ts +38 -0
- package/dist/color-picker/ColorPicker.vue.d.ts +57 -0
- package/dist/color-picker/HueSlider.vue.d.ts +28 -0
- package/dist/color-picker/SaturationPanel.vue.d.ts +46 -0
- package/dist/color-picker/index.d.ts +56 -0
- package/dist/color-picker/index.js +6 -0
- package/dist/color-picker/index.mjs +481 -0
- package/dist/config-provider/ConfigProvider.vue.d.ts +64 -0
- package/dist/config-provider/context.d.ts +888 -0
- package/dist/config-provider/index.d.ts +97 -0
- package/dist/config-provider/index.js +1 -0
- package/dist/config-provider/index.mjs +396 -0
- package/dist/config-provider/resolver.d.ts +2 -0
- package/dist/config-provider/runtime.d.ts +5 -0
- package/dist/config-provider/teleport.d.ts +6 -0
- package/dist/config-provider/types.d.ts +131 -0
- package/dist/context-menu/ContextMenu.vue.d.ts +87 -0
- package/dist/context-menu/index.d.ts +5 -0
- package/dist/context-menu/index.js +3 -0
- package/dist/context-menu/index.mjs +215 -0
- package/dist/context-menu/types.d.ts +34 -0
- package/dist/date-picker/Calendar.vue.d.ts +22 -0
- package/dist/date-picker/DatePicker.vue.d.ts +31 -0
- package/dist/date-picker/DateRangePicker.vue.d.ts +26 -0
- package/dist/date-picker/DateTimePicker.vue.d.ts +27 -0
- package/dist/date-picker/DateTimeRangePicker.vue.d.ts +27 -0
- package/dist/date-picker/index.d.ts +13 -0
- package/dist/date-picker/index.js +6 -0
- package/dist/date-picker/index.mjs +1229 -0
- package/dist/date-picker/utils.d.ts +3 -0
- package/dist/dialog/Dialog.vue.d.ts +97 -0
- package/dist/dialog/index.d.ts +5 -0
- package/dist/dialog/index.js +2 -0
- package/dist/dialog/index.mjs +161 -0
- package/dist/dialog/types.d.ts +38 -0
- package/dist/divider/Divider.vue.d.ts +74 -0
- package/dist/divider/index.d.ts +5 -0
- package/dist/divider/index.js +2 -0
- package/dist/divider/index.mjs +96 -0
- package/dist/divider/types.d.ts +57 -0
- package/dist/drawer/Drawer.vue.d.ts +106 -0
- package/dist/drawer/index.d.ts +5 -0
- package/dist/drawer/index.js +2 -0
- package/dist/drawer/index.mjs +168 -0
- package/dist/drawer/types.d.ts +42 -0
- package/dist/dropdown/Dropdown.vue.d.ts +109 -0
- package/dist/dropdown/DropdownItem.vue.d.ts +60 -0
- package/dist/dropdown/index.d.ts +7 -0
- package/dist/dropdown/index.js +3 -0
- package/dist/dropdown/index.mjs +310 -0
- package/dist/dropdown/types.d.ts +87 -0
- package/dist/empty/Empty.vue.d.ts +47 -0
- package/dist/empty/index.d.ts +70 -0
- package/dist/empty/index.js +2 -0
- package/dist/empty/index.mjs +50 -0
- package/dist/empty/types.d.ts +16 -0
- package/dist/feedback-runtime/manager.d.ts +109 -0
- package/dist/feedback-runtime/mount.d.ts +5 -0
- package/dist/feedback-runtime/types.d.ts +27 -0
- package/dist/form/Form.vue.d.ts +37 -0
- package/dist/form/FormItem.vue.d.ts +32 -0
- package/dist/form/FormSchemaFields.vue.d.ts +7 -0
- package/dist/form/context.d.ts +33 -0
- package/dist/form/index.d.ts +6 -0
- package/dist/form/index.js +2 -0
- package/dist/form/index.mjs +389 -0
- package/dist/grid/Col.vue.d.ts +101 -0
- package/dist/grid/Row.vue.d.ts +56 -0
- package/dist/grid/index.d.ts +7 -0
- package/dist/grid/index.js +2 -0
- package/dist/grid/index.mjs +182 -0
- package/dist/grid/responsive.d.ts +9 -0
- package/dist/grid/types.d.ts +85 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/index.mjs +9 -0
- package/dist/hooks/use-form-item.d.ts +13 -0
- package/dist/hooks/use-id.d.ts +5 -0
- package/dist/hooks/useCanvasRenderer.d.ts +10 -0
- package/dist/hooks/useImageLoader.d.ts +20 -0
- package/dist/hooks/useResizeObserver.d.ts +17 -0
- package/dist/icon/Icon.vue.d.ts +20 -0
- package/dist/icon/index.d.ts +5 -0
- package/dist/icon/index.js +2 -0
- package/dist/icon/index.mjs +10 -0
- package/dist/icon/types.d.ts +45 -0
- package/dist/image/Image.vue.d.ts +38 -0
- package/dist/image/index.d.ts +5 -0
- package/dist/image/index.js +2 -0
- package/dist/image/index.mjs +128 -0
- package/dist/image/types.d.ts +10 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.js +1 -0
- package/dist/index.mjs +362 -0
- package/dist/input/Input.vue.d.ts +47 -0
- package/dist/input/index.d.ts +5 -0
- package/dist/input/index.js +2 -0
- package/dist/input/index.mjs +10 -0
- package/dist/input/types.d.ts +51 -0
- package/dist/input-number/InputNumber.vue.d.ts +119 -0
- package/dist/input-number/index.d.ts +5 -0
- package/dist/input-number/index.js +2 -0
- package/dist/input-number/index.mjs +312 -0
- package/dist/input-number/types.d.ts +58 -0
- package/dist/layout/Content.vue.d.ts +29 -0
- package/dist/layout/Footer.vue.d.ts +29 -0
- package/dist/layout/Header.vue.d.ts +29 -0
- package/dist/layout/Layout.vue.d.ts +32 -0
- package/dist/layout/Sider.vue.d.ts +59 -0
- package/dist/layout/index.d.ts +13 -0
- package/dist/layout/index.js +2 -0
- package/dist/layout/index.mjs +154 -0
- package/dist/layout/types.d.ts +51 -0
- package/dist/layout-system/responsive.d.ts +4 -0
- package/dist/layout-system/types.d.ts +3 -0
- package/dist/loading/Loading.vue.d.ts +57 -0
- package/dist/loading/LoadingMask.vue.d.ts +8 -0
- package/dist/loading/directive.d.ts +5 -0
- package/dist/loading/index.d.ts +7 -0
- package/dist/loading/index.js +2 -0
- package/dist/loading/index.mjs +275 -0
- package/dist/loading/types.d.ts +23 -0
- package/dist/mentions/Mentions.vue.d.ts +337 -0
- package/dist/mentions/index.d.ts +296 -0
- package/dist/mentions/index.js +5 -0
- package/dist/mentions/index.mjs +357 -0
- package/dist/mentions/types.d.ts +55 -0
- package/dist/menu/Menu.vue.d.ts +120 -0
- package/dist/menu/MenuDivider.vue.d.ts +2 -0
- package/dist/menu/MenuGroup.vue.d.ts +29 -0
- package/dist/menu/MenuItem.vue.d.ts +48 -0
- package/dist/menu/MenuNodeRenderer.vue.d.ts +6 -0
- package/dist/menu/SubMenu.vue.d.ts +57 -0
- package/dist/menu/index.d.ts +13 -0
- package/dist/menu/index.js +2 -0
- package/dist/menu/index.mjs +772 -0
- package/dist/menu/types.d.ts +126 -0
- package/dist/message/MessageHost.vue.d.ts +15 -0
- package/dist/message/MessageItem.vue.d.ts +15 -0
- package/dist/message/index.d.ts +10 -0
- package/dist/message/index.js +2 -0
- package/dist/message/index.mjs +199 -0
- package/dist/message/runtime.d.ts +149 -0
- package/dist/message/types.d.ts +12 -0
- package/dist/notification/NotificationHost.vue.d.ts +15 -0
- package/dist/notification/NotificationItem.vue.d.ts +15 -0
- package/dist/notification/index.d.ts +10 -0
- package/dist/notification/index.js +2 -0
- package/dist/notification/index.mjs +207 -0
- package/dist/notification/runtime.d.ts +155 -0
- package/dist/notification/types.d.ts +12 -0
- package/dist/otp-input/OTPInput.vue.d.ts +84 -0
- package/dist/otp-input/index.d.ts +5 -0
- package/dist/otp-input/index.js +2 -0
- package/dist/otp-input/index.mjs +216 -0
- package/dist/otp-input/types.d.ts +41 -0
- package/dist/pagination/Pagination.vue.d.ts +101 -0
- package/dist/pagination/index.d.ts +102 -0
- package/dist/pagination/index.js +2 -0
- package/dist/pagination/index.mjs +260 -0
- package/dist/pagination/types.d.ts +48 -0
- package/dist/popover/Popover.vue.d.ts +136 -0
- package/dist/popover/index.d.ts +5 -0
- package/dist/popover/index.js +2 -0
- package/dist/popover/index.mjs +13 -0
- package/dist/popover/types.d.ts +49 -0
- package/dist/radio/Radio.vue.d.ts +30 -0
- package/dist/radio/RadioGroup.vue.d.ts +26 -0
- package/dist/radio/constants.d.ts +3 -0
- package/dist/radio/index.d.ts +7 -0
- package/dist/radio/index.js +2 -0
- package/dist/radio/index.mjs +273 -0
- package/dist/radio/types.d.ts +45 -0
- package/dist/rate/Rate.vue.d.ts +139 -0
- package/dist/rate/index.d.ts +140 -0
- package/dist/rate/index.js +3 -0
- package/dist/rate/index.mjs +276 -0
- package/dist/rate/types.d.ts +66 -0
- package/dist/rich-text/RichText.vue.d.ts +25 -0
- package/dist/rich-text/index.d.ts +17 -0
- package/dist/rich-text/index.js +2 -0
- package/dist/rich-text/index.mjs +312 -0
- package/dist/scrollbar/Scrollbar.vue.d.ts +37 -0
- package/dist/scrollbar/index.d.ts +5 -0
- package/dist/scrollbar/index.js +2 -0
- package/dist/scrollbar/index.mjs +10 -0
- package/dist/scrollbar/types.d.ts +17 -0
- package/dist/select/Option.vue.d.ts +45 -0
- package/dist/select/Select.vue.d.ts +136 -0
- package/dist/select/index.d.ts +9 -0
- package/dist/select/index.js +3 -0
- package/dist/select/index.mjs +656 -0
- package/dist/select/types.d.ts +92 -0
- package/dist/slider/Slider.vue.d.ts +123 -0
- package/dist/slider/index.d.ts +5 -0
- package/dist/slider/index.js +2 -0
- package/dist/slider/index.mjs +326 -0
- package/dist/slider/types.d.ts +57 -0
- package/dist/space/Space.vue.d.ts +75 -0
- package/dist/space/index.d.ts +5 -0
- package/dist/space/index.js +2 -0
- package/dist/space/index.mjs +104 -0
- package/dist/space/types.d.ts +34 -0
- package/dist/splitter/Splitter.vue.d.ts +52 -0
- package/dist/splitter/SplitterPane.vue.d.ts +38 -0
- package/dist/splitter/index.d.ts +7 -0
- package/dist/splitter/index.js +2 -0
- package/dist/splitter/index.mjs +252 -0
- package/dist/splitter/types.d.ts +41 -0
- package/dist/splitter/utils.d.ts +6 -0
- package/dist/style/Button.css +1 -0
- package/dist/style/Checkbox.css +1 -0
- package/dist/style/Icon.css +1 -0
- package/dist/style/Input.css +1 -0
- package/dist/style/Popover.css +1 -0
- package/dist/style/Scrollbar.css +1 -0
- package/dist/style/TimePanel.css +1 -0
- package/dist/style/autocomplete.css +1 -0
- package/dist/style/avatar.css +1 -0
- package/dist/style/badge.css +1 -0
- package/dist/style/base.css +1 -0
- package/dist/style/breadcrumb.css +1 -0
- package/dist/style/card.css +1 -0
- package/dist/style/carousel.css +1 -0
- package/dist/style/cascader.css +1 -0
- package/dist/style/collapse.css +1 -0
- package/dist/style/color-picker.css +1 -0
- package/dist/style/context-menu.css +1 -0
- package/dist/style/date-picker.css +1 -0
- package/dist/style/dialog.css +1 -0
- package/dist/style/divider.css +1 -0
- package/dist/style/drawer.css +1 -0
- package/dist/style/empty.css +1 -0
- package/dist/style/form.css +1 -0
- package/dist/style/grid.css +1 -0
- package/dist/style/image.css +1 -0
- package/dist/style/index.css +1 -0
- package/dist/style/input-number.css +1 -0
- package/dist/style/layout.css +1 -0
- package/dist/style/loading.css +1 -0
- package/dist/style/mentions.css +1 -0
- package/dist/style/menu.css +1 -0
- package/dist/style/message.css +1 -0
- package/dist/style/notification.css +1 -0
- package/dist/style/otp-input.css +1 -0
- package/dist/style/pagination.css +1 -0
- package/dist/style/radio.css +1 -0
- package/dist/style/rate.css +1 -0
- package/dist/style/rich-text.css +1 -0
- package/dist/style/select.css +1 -0
- package/dist/style/slider.css +1 -0
- package/dist/style/space.css +1 -0
- package/dist/style/splitter.css +1 -0
- package/dist/style/switch.css +1 -0
- package/dist/style/table.css +1 -0
- package/dist/style/tabs.css +1 -0
- package/dist/style/tag.css +1 -0
- package/dist/style/tooltip.css +1 -0
- package/dist/style/transfer.css +1 -0
- package/dist/style/tree-select.css +1 -0
- package/dist/style/tree.css +1 -0
- package/dist/style/upload.css +1 -0
- package/dist/style/watermark.css +1 -0
- package/dist/switch/Switch.vue.d.ts +95 -0
- package/dist/switch/index.d.ts +5 -0
- package/dist/switch/index.js +2 -0
- package/dist/switch/index.mjs +285 -0
- package/dist/switch/types.d.ts +81 -0
- package/dist/table/Table.vue.d.ts +102 -0
- package/dist/table/index.d.ts +5 -0
- package/dist/table/index.js +2 -0
- package/dist/table/index.mjs +263 -0
- package/dist/table/types.d.ts +64 -0
- package/dist/tabs/TabPane.vue.d.ts +55 -0
- package/dist/tabs/Tabs.vue.d.ts +92 -0
- package/dist/tabs/index.d.ts +7 -0
- package/dist/tabs/index.js +2 -0
- package/dist/tabs/index.mjs +266 -0
- package/dist/tabs/types.d.ts +78 -0
- package/dist/tag/Tag.vue.d.ts +38 -0
- package/dist/tag/index.d.ts +5 -0
- package/dist/tag/index.js +2 -0
- package/dist/tag/index.mjs +123 -0
- package/dist/tag/types.d.ts +83 -0
- package/dist/time-picker/TimePanel.vue.d.ts +19 -0
- package/dist/time-picker/TimePicker.vue.d.ts +15 -0
- package/dist/time-picker/index.d.ts +6 -0
- package/dist/time-picker/index.js +4 -0
- package/dist/time-picker/index.mjs +91 -0
- package/dist/tooltip/Tooltip.vue.d.ts +99 -0
- package/dist/tooltip/index.d.ts +5 -0
- package/dist/tooltip/index.js +2 -0
- package/dist/tooltip/index.mjs +186 -0
- package/dist/tooltip/types.d.ts +37 -0
- package/dist/transfer/Transfer.vue.d.ts +104 -0
- package/dist/transfer/TransferPanel.vue.d.ts +90 -0
- package/dist/transfer/index.d.ts +167 -0
- package/dist/transfer/index.js +7 -0
- package/dist/transfer/index.mjs +343 -0
- package/dist/tree/Tree.vue.d.ts +237 -0
- package/dist/tree/TreeRow.vue.d.ts +24 -0
- package/dist/tree/TreeView.vue.d.ts +24 -0
- package/dist/tree/context.d.ts +3 -0
- package/dist/tree/index.d.ts +431 -0
- package/dist/tree/index.js +2 -0
- package/dist/tree/index.mjs +548 -0
- package/dist/tree/types.d.ts +127 -0
- package/dist/tree/use-tree-foundation.d.ts +37 -0
- package/dist/tree-select/TreeNode.vue.d.ts +7 -0
- package/dist/tree-select/TreeSelect.vue.d.ts +210 -0
- package/dist/tree-select/index.d.ts +7 -0
- package/dist/tree-select/index.js +3 -0
- package/dist/tree-select/index.mjs +799 -0
- package/dist/tree-select/types.d.ts +111 -0
- package/dist/upload/Upload.vue.d.ts +50 -0
- package/dist/upload/index.d.ts +67 -0
- package/dist/upload/index.js +3 -0
- package/dist/upload/index.mjs +271 -0
- package/dist/utils/install.d.ts +3 -0
- package/dist/utils/style.d.ts +1 -0
- package/dist/watermark/Watermark.vue.d.ts +98 -0
- package/dist/watermark/index.d.ts +5 -0
- package/dist/watermark/index.js +2 -0
- package/dist/watermark/index.mjs +183 -0
- package/dist/watermark/types.d.ts +85 -0
- package/package.json +69 -0
- package/src/autocomplete/style/index.css +80 -0
- package/src/avatar/style/index.css +105 -0
- package/src/badge/style/index.css +232 -0
- package/src/base.css +4 -0
- package/src/breadcrumb/style/index.css +75 -0
- package/src/button/style/index.css +242 -0
- package/src/card/style/index.css +60 -0
- package/src/carousel/style/index.css +195 -0
- package/src/cascader/style/index.css +153 -0
- package/src/checkbox/style/index.css +165 -0
- package/src/collapse/style/index.css +166 -0
- package/src/color-picker/style/index.css +132 -0
- package/src/context-menu/style/index.css +21 -0
- package/src/date-picker/style/index.css +372 -0
- package/src/dialog/style/index.css +141 -0
- package/src/divider/style/index.css +112 -0
- package/src/drawer/style/index.css +211 -0
- package/src/dropdown/style/index.css +118 -0
- package/src/empty/style/index.css +87 -0
- package/src/form/style/index.css +148 -0
- package/src/grid/style/index.css +16 -0
- package/src/icon/style/index.css +28 -0
- package/src/image/style/index.css +114 -0
- package/src/input/style/index.css +217 -0
- package/src/input-number/style/index.css +166 -0
- package/src/layout/style/index.css +37 -0
- package/src/loading/style/index.css +58 -0
- package/src/mentions/style/index.css +83 -0
- package/src/menu/style/index.css +300 -0
- package/src/message/style/index.css +109 -0
- package/src/notification/style/index.css +116 -0
- package/src/otp-input/style/index.css +96 -0
- package/src/pagination/style/index.css +96 -0
- package/src/popover/style/index.css +47 -0
- package/src/radio/style/index.css +185 -0
- package/src/rate/style/index.css +89 -0
- package/src/rich-text/style/index.css +154 -0
- package/src/scrollbar/style/index.css +57 -0
- package/src/select/style/index.css +262 -0
- package/src/slider/style/index.css +181 -0
- package/src/space/style/index.css +31 -0
- package/src/splitter/style/index.css +76 -0
- package/src/style.css +1 -0
- package/src/styles/reset.css +29 -0
- package/src/switch/style/index.css +164 -0
- package/src/table/style/index.css +108 -0
- package/src/tabs/style/index.css +270 -0
- package/src/tag/style/index.css +207 -0
- package/src/time-picker/style/index.css +135 -0
- package/src/tooltip/style/index.css +50 -0
- package/src/transfer/style/index.css +181 -0
- package/src/tree/style/index.css +246 -0
- package/src/tree-select/style/index.css +346 -0
- package/src/upload/style/index.css +166 -0
- package/src/watermark/style/index.css +15 -0
- package/style.css +1 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export type CheckboxSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export declare const checkboxProps: {
|
|
4
|
+
readonly modelValue: {
|
|
5
|
+
readonly type: PropType<boolean | string | number>;
|
|
6
|
+
readonly default: undefined;
|
|
7
|
+
};
|
|
8
|
+
readonly label: {
|
|
9
|
+
readonly type: StringConstructor;
|
|
10
|
+
readonly default: "";
|
|
11
|
+
};
|
|
12
|
+
readonly value: {
|
|
13
|
+
readonly type: PropType<any>;
|
|
14
|
+
readonly default: undefined;
|
|
15
|
+
};
|
|
16
|
+
readonly name: {
|
|
17
|
+
readonly type: StringConstructor;
|
|
18
|
+
readonly default: "";
|
|
19
|
+
};
|
|
20
|
+
readonly disabled: {
|
|
21
|
+
readonly type: BooleanConstructor;
|
|
22
|
+
readonly default: false;
|
|
23
|
+
};
|
|
24
|
+
readonly indeterminate: {
|
|
25
|
+
readonly type: BooleanConstructor;
|
|
26
|
+
readonly default: false;
|
|
27
|
+
};
|
|
28
|
+
readonly size: {
|
|
29
|
+
readonly type: PropType<CheckboxSize>;
|
|
30
|
+
};
|
|
31
|
+
readonly border: {
|
|
32
|
+
readonly type: BooleanConstructor;
|
|
33
|
+
readonly default: false;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export type CheckboxProps = ExtractPropTypes<typeof checkboxProps>;
|
|
37
|
+
export declare const checkboxEmits: {
|
|
38
|
+
'update:modelValue': (_val: boolean | string | number) => boolean;
|
|
39
|
+
change: (_val: boolean | string | number) => boolean;
|
|
40
|
+
};
|
|
41
|
+
export type CheckboxEmits = typeof checkboxEmits;
|
|
42
|
+
export declare const checkboxGroupProps: {
|
|
43
|
+
readonly modelValue: {
|
|
44
|
+
readonly type: PropType<any[]>;
|
|
45
|
+
readonly default: () => never[];
|
|
46
|
+
};
|
|
47
|
+
readonly disabled: {
|
|
48
|
+
readonly type: BooleanConstructor;
|
|
49
|
+
readonly default: false;
|
|
50
|
+
};
|
|
51
|
+
readonly size: {
|
|
52
|
+
readonly type: PropType<CheckboxSize>;
|
|
53
|
+
};
|
|
54
|
+
readonly name: {
|
|
55
|
+
readonly type: StringConstructor;
|
|
56
|
+
readonly default: "";
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export type CheckboxGroupProps = ExtractPropTypes<typeof checkboxGroupProps>;
|
|
60
|
+
export declare const checkboxGroupEmits: {
|
|
61
|
+
'update:modelValue': (_val: any[]) => boolean;
|
|
62
|
+
change: (_val: any[]) => boolean;
|
|
63
|
+
};
|
|
64
|
+
export type CheckboxGroupEmits = typeof checkboxGroupEmits;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { defineComponent as z, useSlots as B, useAttrs as P, toValue as d, computed as f, onMounted as x, openBlock as r, createElementBlock as u, normalizeProps as I, guardReactiveProps as S, createVNode as A, Transition as T, withCtx as V, unref as w, createCommentVNode as b, renderSlot as v, createTextVNode as D, toDisplayString as N } from "vue";
|
|
2
|
+
import { s as k, e as C } from "./index-B0yEC3RG.mjs";
|
|
3
|
+
import { g as F, a as R } from "./color-BBpRjg5d.mjs";
|
|
4
|
+
import "./manager-BUdQK4AD.mjs";
|
|
5
|
+
import { u as E } from "./use-signals-CE1T2jXK.mjs";
|
|
6
|
+
function L(l = {}) {
|
|
7
|
+
const e = k(typeof l.disabled == "function" ? l.disabled() : l.disabled ?? !1), o = k(typeof l.loading == "function" ? l.loading() : l.loading ?? !1);
|
|
8
|
+
return typeof l.disabled == "function" && C(() => {
|
|
9
|
+
e.value = l.disabled();
|
|
10
|
+
}), typeof l.loading == "function" && C(() => {
|
|
11
|
+
o.value = l.loading();
|
|
12
|
+
}), {
|
|
13
|
+
/** 响应式状态 */
|
|
14
|
+
state: {
|
|
15
|
+
get disabled() {
|
|
16
|
+
return e.value;
|
|
17
|
+
},
|
|
18
|
+
set disabled(a) {
|
|
19
|
+
e.value = a;
|
|
20
|
+
},
|
|
21
|
+
get loading() {
|
|
22
|
+
return o.value;
|
|
23
|
+
},
|
|
24
|
+
set loading(a) {
|
|
25
|
+
o.value = a;
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
/** 处理后的交互逻辑 */
|
|
29
|
+
props: {
|
|
30
|
+
onClick: async (a) => {
|
|
31
|
+
var c;
|
|
32
|
+
if (e.value || o.value) {
|
|
33
|
+
a.preventDefault();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const i = (c = l.onClick) == null ? void 0 : c.call(l, a);
|
|
37
|
+
if (i instanceof Promise) {
|
|
38
|
+
o.value = !0;
|
|
39
|
+
try {
|
|
40
|
+
await i;
|
|
41
|
+
} finally {
|
|
42
|
+
o.value = !1;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
get role() {
|
|
47
|
+
return "button";
|
|
48
|
+
},
|
|
49
|
+
get disabled() {
|
|
50
|
+
return e.value || o.value;
|
|
51
|
+
},
|
|
52
|
+
get tabIndex() {
|
|
53
|
+
return e.value || o.value ? -1 : 0;
|
|
54
|
+
},
|
|
55
|
+
get "aria-disabled"() {
|
|
56
|
+
return e.value || o.value ? "true" : "false";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const M = {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: "l-button__loader"
|
|
64
|
+
}, O = {
|
|
65
|
+
key: 0,
|
|
66
|
+
class: "l-button__icon-prefix"
|
|
67
|
+
}, j = {
|
|
68
|
+
key: 1,
|
|
69
|
+
class: "l-button__content"
|
|
70
|
+
}, q = {
|
|
71
|
+
key: 2,
|
|
72
|
+
class: "l-button__icon-suffix"
|
|
73
|
+
}, U = /* @__PURE__ */ z({
|
|
74
|
+
name: "Button",
|
|
75
|
+
inheritAttrs: !1,
|
|
76
|
+
__name: "Button",
|
|
77
|
+
props: {
|
|
78
|
+
onClick: {},
|
|
79
|
+
type: { default: "default" },
|
|
80
|
+
nativeType: { default: "button" },
|
|
81
|
+
variant: { default: "solid" },
|
|
82
|
+
size: { default: "md" },
|
|
83
|
+
label: {},
|
|
84
|
+
color: {},
|
|
85
|
+
shape: { default: "default" },
|
|
86
|
+
block: { type: Boolean },
|
|
87
|
+
disabled: { type: [Boolean, Function] },
|
|
88
|
+
loading: { type: [Boolean, Function] }
|
|
89
|
+
},
|
|
90
|
+
setup(l) {
|
|
91
|
+
const e = l, o = B(), s = P(), a = L({
|
|
92
|
+
disabled: d(e.disabled) ?? !1,
|
|
93
|
+
loading: d(e.loading) ?? !1,
|
|
94
|
+
onClick: (t) => {
|
|
95
|
+
const n = e.onClick || s.onClick;
|
|
96
|
+
if (typeof n == "function")
|
|
97
|
+
return n(t);
|
|
98
|
+
if (Array.isArray(n)) {
|
|
99
|
+
let m;
|
|
100
|
+
for (const g of n)
|
|
101
|
+
if (typeof g == "function") {
|
|
102
|
+
const h = g(t);
|
|
103
|
+
h instanceof Promise && (m = h);
|
|
104
|
+
}
|
|
105
|
+
return m;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}), { loading: i, disabled: c } = E(a, {
|
|
109
|
+
disabled: () => d(e.disabled) ?? !1,
|
|
110
|
+
loading: () => d(e.loading) ?? !1
|
|
111
|
+
}), y = f(() => !e.label && !o.default), p = f(() => ["sm", "md", "lg"].includes(e.size) ? e.size : "custom"), _ = f(() => ({
|
|
112
|
+
type: e.nativeType,
|
|
113
|
+
// 原生 button 类型,使用独�?prop 避免�?UI type 冲突
|
|
114
|
+
...s,
|
|
115
|
+
...a.props,
|
|
116
|
+
"aria-busy": i.value ? !0 : void 0,
|
|
117
|
+
class: [
|
|
118
|
+
s.class,
|
|
119
|
+
"l-button",
|
|
120
|
+
`l-button--type-${e.type}`,
|
|
121
|
+
`l-button--variant-${e.variant}`,
|
|
122
|
+
`l-button--${p.value}`,
|
|
123
|
+
`l-button--shape-${e.shape}`,
|
|
124
|
+
{
|
|
125
|
+
"is-loading": i.value,
|
|
126
|
+
"is-disabled": c.value,
|
|
127
|
+
"l-button--block": e.block,
|
|
128
|
+
"l-button--icon-only": y.value
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
style: [s.style, $.value]
|
|
132
|
+
})), $ = f(() => {
|
|
133
|
+
const t = {};
|
|
134
|
+
if (p.value === "custom" && e.size && (t["--l-button-custom-size"] = typeof e.size == "number" ? `${e.size}px` : e.size), e.color) {
|
|
135
|
+
t["--l-button-custom-color"] = e.color, t["--l-button-theme-color"] = e.color, t["--l-button-theme-content"] = F(e.color);
|
|
136
|
+
const n = e.variant === "solid" ? R(e.color) : null;
|
|
137
|
+
n && (t["--l-button-hover-bg"] = n.hover, t["--l-button-active-bg"] = n.active);
|
|
138
|
+
}
|
|
139
|
+
return t;
|
|
140
|
+
});
|
|
141
|
+
return x(() => {
|
|
142
|
+
y.value && !s["aria-label"] && !s["aria-labelledby"] && console.warn(
|
|
143
|
+
"[Routa] Icon-only button should have an aria-label or aria-labelledby for accessibility."
|
|
144
|
+
);
|
|
145
|
+
}), (t, n) => (r(), u("button", I(S(_.value)), [
|
|
146
|
+
A(T, { name: "l-fade" }, {
|
|
147
|
+
default: V(() => [
|
|
148
|
+
w(i) ? (r(), u("span", M)) : b("", !0)
|
|
149
|
+
]),
|
|
150
|
+
_: 1
|
|
151
|
+
}),
|
|
152
|
+
t.$slots.icon || t.$slots.prefix ? (r(), u("span", O, [
|
|
153
|
+
v(t.$slots, "prefix", {}, () => [
|
|
154
|
+
v(t.$slots, "icon")
|
|
155
|
+
])
|
|
156
|
+
])) : b("", !0),
|
|
157
|
+
y.value ? b("", !0) : (r(), u("span", j, [
|
|
158
|
+
v(t.$slots, "default", {}, () => [
|
|
159
|
+
D(N(l.label), 1)
|
|
160
|
+
])
|
|
161
|
+
])),
|
|
162
|
+
t.$slots.suffix ? (r(), u("span", q, [
|
|
163
|
+
v(t.$slots, "suffix")
|
|
164
|
+
])) : b("", !0)
|
|
165
|
+
], 16));
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
export {
|
|
169
|
+
U as _
|
|
170
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),c=require("./index-DWAWrVaT.js"),y=require("./color-m1q_rZ68.js");require("./manager-C0AUxQ1I.js");const k=require("./use-signals-Bz1smiXh.js");function C(o={}){const t=c.signal(typeof o.disabled=="function"?o.disabled():o.disabled??!1),a=c.signal(typeof o.loading=="function"?o.loading():o.loading??!1);return typeof o.disabled=="function"&&c.effect(()=>{t.value=o.disabled()}),typeof o.loading=="function"&&c.effect(()=>{a.value=o.loading()}),{state:{get disabled(){return t.value},set disabled(n){t.value=n},get loading(){return a.value},set loading(n){a.value=n}},props:{onClick:async n=>{var u;if(t.value||a.value){n.preventDefault();return}const i=(u=o.onClick)==null?void 0:u.call(o,n);if(i instanceof Promise){a.value=!0;try{await i}finally{a.value=!1}}},get role(){return"button"},get disabled(){return t.value||a.value},get tabIndex(){return t.value||a.value?-1:0},get"aria-disabled"(){return t.value||a.value?"true":"false"}}}}const h={key:0,class:"l-button__loader"},B={key:0,class:"l-button__icon-prefix"},_={key:1,class:"l-button__content"},$={key:2,class:"l-button__icon-suffix"},z=e.defineComponent({name:"Button",inheritAttrs:!1,__name:"Button",props:{onClick:{},type:{default:"default"},nativeType:{default:"button"},variant:{default:"solid"},size:{default:"md"},label:{},color:{},shape:{default:"default"},block:{type:Boolean},disabled:{type:[Boolean,Function]},loading:{type:[Boolean,Function]}},setup(o){const t=o,a=e.useSlots(),r=e.useAttrs(),n=C({disabled:e.toValue(t.disabled)??!1,loading:e.toValue(t.loading)??!1,onClick:l=>{const s=t.onClick||r.onClick;if(typeof s=="function")return s(l);if(Array.isArray(s)){let b;for(const v of s)if(typeof v=="function"){const m=v(l);m instanceof Promise&&(b=m)}return b}}}),{loading:i,disabled:u}=k.useController(n,{disabled:()=>e.toValue(t.disabled)??!1,loading:()=>e.toValue(t.loading)??!1}),d=e.computed(()=>!t.label&&!a.default),f=e.computed(()=>["sm","md","lg"].includes(t.size)?t.size:"custom"),p=e.computed(()=>({type:t.nativeType,...r,...n.props,"aria-busy":i.value?!0:void 0,class:[r.class,"l-button",`l-button--type-${t.type}`,`l-button--variant-${t.variant}`,`l-button--${f.value}`,`l-button--shape-${t.shape}`,{"is-loading":i.value,"is-disabled":u.value,"l-button--block":t.block,"l-button--icon-only":d.value}],style:[r.style,g.value]})),g=e.computed(()=>{const l={};if(f.value==="custom"&&t.size&&(l["--l-button-custom-size"]=typeof t.size=="number"?`${t.size}px`:t.size),t.color){l["--l-button-custom-color"]=t.color,l["--l-button-theme-color"]=t.color,l["--l-button-theme-content"]=y.getContrastColor(t.color);const s=t.variant==="solid"?y.getSolidInteractiveColors(t.color):null;s&&(l["--l-button-hover-bg"]=s.hover,l["--l-button-active-bg"]=s.active)}return l});return e.onMounted(()=>{d.value&&!r["aria-label"]&&!r["aria-labelledby"]&&console.warn("[Routa] Icon-only button should have an aria-label or aria-labelledby for accessibility.")}),(l,s)=>(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.guardReactiveProps(p.value)),[e.createVNode(e.Transition,{name:"l-fade"},{default:e.withCtx(()=>[e.unref(i)?(e.openBlock(),e.createElementBlock("span",h)):e.createCommentVNode("",!0)]),_:1}),l.$slots.icon||l.$slots.prefix?(e.openBlock(),e.createElementBlock("span",B,[e.renderSlot(l.$slots,"prefix",{},()=>[e.renderSlot(l.$slots,"icon")])])):e.createCommentVNode("",!0),d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",_,[e.renderSlot(l.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(o.label),1)])])),l.$slots.suffix?(e.openBlock(),e.createElementBlock("span",$,[e.renderSlot(l.$slots,"suffix")])):e.createCommentVNode("",!0)],16))}});exports._sfc_main=z;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("vue");require("./manager-C0AUxQ1I.js");const t=require("./index-DWAWrVaT.js"),z=require("./use-signals-Bz1smiXh.js"),q=require("./use-form-item-CloIcyon.js"),w=require("./use-id-BycaM3-h.js");function D(e={}){const u=t.signal(typeof e.checked=="function"?e.checked():e.checked??!1),n=t.signal(typeof e.indeterminate=="function"?e.indeterminate():e.indeterminate??!1),c=t.signal(typeof e.disabled=="function"?e.disabled():e.disabled??!1),v=t.signal(typeof e.name=="function"?e.name():e.name??""),r=t.signal(!1),s=t.signal(!1);return typeof e.checked=="function"&&t.effect(()=>{u.value=e.checked()}),typeof e.indeterminate=="function"&&t.effect(()=>{n.value=e.indeterminate()}),typeof e.disabled=="function"&&t.effect(()=>{c.value=e.disabled()}),typeof e.name=="function"&&t.effect(()=>{v.value=e.name()}),{state:{get checked(){return u.value},set checked(l){u.value=l},get indeterminate(){return n.value},set indeterminate(l){n.value=l},get disabled(){return c.value},set disabled(l){c.value=l},get focused(){return r.value},get hovered(){return s.value},get name(){return v.value},set name(l){v.value=l}},props:{get checked(){return u.value},get disabled(){return c.value},get name(){return v.value},type:"checkbox",onChange:l=>{var k;if(c.value)return;const i=l.target.checked;u.value=i,n.value=!1,(k=e.onChange)==null||k.call(e,i)},onFocus:l=>{var o;r.value=!0,(o=e.onFocus)==null||o.call(e,l)},onBlur:l=>{var o;r.value=!1,(o=e.onBlur)==null||o.call(e,l)},onMouseEnter:()=>{s.value=!0},onMouseLeave:()=>{s.value=!1}},actions:{toggle:l=>{var o;if(!c.value){const i=l!==void 0?l:!u.value;u.value=i,n.value=!1,(o=e.onChange)==null||o.call(e,i)}}}}}function I(e={}){const u=t.signal(typeof e.modelValue=="function"?e.modelValue():e.modelValue??[]),n=t.signal(typeof e.disabled=="function"?e.disabled():e.disabled??!1),c=t.signal(typeof e.name=="function"?e.name():e.name??`l-checkbox-group-${Math.random().toString(36).slice(2,7)}`);return typeof e.modelValue=="function"&&t.effect(()=>{u.value=e.modelValue()}),typeof e.disabled=="function"&&t.effect(()=>{n.value=e.disabled()}),typeof e.name=="function"&&t.effect(()=>{c.value=e.name()}),{state:{get modelValue(){return u.value},set modelValue(r){u.value=r},get disabled(){return n.value},set disabled(r){n.value=r},get name(){return c.value},set name(r){c.value=r}},actions:{toggleValue:r=>{var g;if(n.value)return;const s=[...u.value],b=s.indexOf(r);b>-1?s.splice(b,1):s.push(r),u.value=s,(g=e.onChange)==null||g.call(e,s)}}}}const _=Symbol("checkboxGroupKey"),E={modelValue:{type:[Boolean,Number,String],default:void 0},label:{type:String,default:""},value:{type:[String,Number,Boolean,Object],default:void 0},name:{type:String,default:""},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},size:{type:String},border:{type:Boolean,default:!1}},S={"update:modelValue":e=>!0,change:e=>!0},L={modelValue:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},size:{type:String},name:{type:String,default:""}},P={"update:modelValue":e=>!0,change:e=>!0},$={class:"l-checkbox__input-wrapper"},j=["id","name","disabled","checked","indeterminate","aria-checked"],A={key:0,class:"l-checkbox__label"},K=a.defineComponent({name:"Checkbox",__name:"Checkbox",props:E,emits:S,setup(e,{emit:u}){const n=e,c=u,{formItem:v,size:r,disabled:s,inputId:b}=q.useFormItem(n),g=w.useId("checkbox"),x=(b==null?void 0:b.value)||g,l=a.inject(_,null),o=a.ref(null),i=a.computed(()=>!!l),k=a.computed(()=>(i.value?l.disabled.value:s.value)||n.disabled),N=a.computed(()=>(i.value?l.size:r.value)||"md"),C=a.computed(()=>(i.value?l.name.value:n.name)||""),V=a.computed(()=>{if(i.value){const d=l.modelValue.value;return Array.isArray(d)&&d.includes(n.value)}return n.modelValue===!0}),f=D({checked:()=>V.value,indeterminate:()=>n.indeterminate,disabled:()=>k.value,name:()=>C.value,onChange:d=>{i.value?l.toggleValue(n.value):(c("update:modelValue",d),c("change",d),v==null||v.validate("change").catch(()=>{}))}}),{checked:p,indeterminate:y,disabled:B,focused:G}=z.useController(f,{checked:()=>V.value,indeterminate:()=>n.indeterminate,disabled:()=>k.value}),F=a.computed(()=>["l-checkbox",`l-checkbox--${N.value}`,{"is-checked":p.value,"is-indeterminate":y.value,"is-disabled":B.value,"is-focused":G.value,"is-bordered":n.border}]),M=d=>{f.props.onChange(d)};return(d,m)=>(a.openBlock(),a.createElementBlock("label",{class:a.normalizeClass(F.value),onMouseenter:m[2]||(m[2]=(...h)=>a.unref(f).props.onMouseEnter&&a.unref(f).props.onMouseEnter(...h)),onMouseleave:m[3]||(m[3]=(...h)=>a.unref(f).props.onMouseLeave&&a.unref(f).props.onMouseLeave(...h))},[a.createElementVNode("span",$,[a.createElementVNode("input",{ref_key:"inputRef",ref:o,id:a.unref(x),type:"checkbox",class:"l-checkbox__original",name:C.value,disabled:a.unref(B),checked:a.unref(p),indeterminate:a.unref(y),"aria-checked":a.unref(y)?"mixed":a.unref(p)?"true":"false",onChange:M,onFocus:m[0]||(m[0]=(...h)=>a.unref(f).props.onFocus&&a.unref(f).props.onFocus(...h)),onBlur:m[1]||(m[1]=(...h)=>a.unref(f).props.onBlur&&a.unref(f).props.onBlur(...h))},null,40,j),m[4]||(m[4]=a.createElementVNode("span",{class:"l-checkbox__inner"},[a.createElementVNode("svg",{class:"l-checkbox__checkmark",viewBox:"0 0 1024 1024"},[a.createElementVNode("path",{d:"M896 256L384 768 128 512",fill:"none",stroke:"currentColor","stroke-width":"120","stroke-linecap":"round","stroke-linejoin":"round"})])],-1))]),d.$slots.default||d.label?(a.openBlock(),a.createElementBlock("span",A,[a.renderSlot(d.$slots,"default",{},()=>[a.createTextVNode(a.toDisplayString(d.label),1)])])):a.createCommentVNode("",!0)],34))}});exports._sfc_main=K;exports.checkboxEmits=S;exports.checkboxGroupEmits=P;exports.checkboxGroupKey=_;exports.checkboxGroupProps=L;exports.checkboxProps=E;exports.createCheckboxGroupController=I;
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
import { defineComponent as D, inject as L, ref as $, computed as k, openBlock as F, createElementBlock as N, unref as u, normalizeClass as j, createElementVNode as x, renderSlot as A, createTextVNode as I, toDisplayString as K, createCommentVNode as O } from "vue";
|
|
2
|
+
import "./manager-BUdQK4AD.mjs";
|
|
3
|
+
import { s as v, e as g } from "./index-B0yEC3RG.mjs";
|
|
4
|
+
import { u as P } from "./use-signals-CE1T2jXK.mjs";
|
|
5
|
+
import { u as R } from "./use-form-item-CqDbWCiU.mjs";
|
|
6
|
+
import { u as H } from "./use-id-D3casveg.mjs";
|
|
7
|
+
function T(e = {}) {
|
|
8
|
+
const t = v(typeof e.checked == "function" ? e.checked() : e.checked ?? !1), l = v(typeof e.indeterminate == "function" ? e.indeterminate() : e.indeterminate ?? !1), r = v(typeof e.disabled == "function" ? e.disabled() : e.disabled ?? !1), m = v(typeof e.name == "function" ? e.name() : e.name ?? ""), n = v(!1), d = v(!1);
|
|
9
|
+
return typeof e.checked == "function" && g(() => {
|
|
10
|
+
t.value = e.checked();
|
|
11
|
+
}), typeof e.indeterminate == "function" && g(() => {
|
|
12
|
+
l.value = e.indeterminate();
|
|
13
|
+
}), typeof e.disabled == "function" && g(() => {
|
|
14
|
+
r.value = e.disabled();
|
|
15
|
+
}), typeof e.name == "function" && g(() => {
|
|
16
|
+
m.value = e.name();
|
|
17
|
+
}), {
|
|
18
|
+
state: {
|
|
19
|
+
get checked() {
|
|
20
|
+
return t.value;
|
|
21
|
+
},
|
|
22
|
+
set checked(a) {
|
|
23
|
+
t.value = a;
|
|
24
|
+
},
|
|
25
|
+
get indeterminate() {
|
|
26
|
+
return l.value;
|
|
27
|
+
},
|
|
28
|
+
set indeterminate(a) {
|
|
29
|
+
l.value = a;
|
|
30
|
+
},
|
|
31
|
+
get disabled() {
|
|
32
|
+
return r.value;
|
|
33
|
+
},
|
|
34
|
+
set disabled(a) {
|
|
35
|
+
r.value = a;
|
|
36
|
+
},
|
|
37
|
+
get focused() {
|
|
38
|
+
return n.value;
|
|
39
|
+
},
|
|
40
|
+
get hovered() {
|
|
41
|
+
return d.value;
|
|
42
|
+
},
|
|
43
|
+
get name() {
|
|
44
|
+
return m.value;
|
|
45
|
+
},
|
|
46
|
+
set name(a) {
|
|
47
|
+
m.value = a;
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
props: {
|
|
51
|
+
get checked() {
|
|
52
|
+
return t.value;
|
|
53
|
+
},
|
|
54
|
+
get disabled() {
|
|
55
|
+
return r.value;
|
|
56
|
+
},
|
|
57
|
+
get name() {
|
|
58
|
+
return m.value;
|
|
59
|
+
},
|
|
60
|
+
type: "checkbox",
|
|
61
|
+
onChange: (a) => {
|
|
62
|
+
var p;
|
|
63
|
+
if (r.value) return;
|
|
64
|
+
const o = a.target.checked;
|
|
65
|
+
t.value = o, l.value = !1, (p = e.onChange) == null || p.call(e, o);
|
|
66
|
+
},
|
|
67
|
+
onFocus: (a) => {
|
|
68
|
+
var s;
|
|
69
|
+
n.value = !0, (s = e.onFocus) == null || s.call(e, a);
|
|
70
|
+
},
|
|
71
|
+
onBlur: (a) => {
|
|
72
|
+
var s;
|
|
73
|
+
n.value = !1, (s = e.onBlur) == null || s.call(e, a);
|
|
74
|
+
},
|
|
75
|
+
onMouseEnter: () => {
|
|
76
|
+
d.value = !0;
|
|
77
|
+
},
|
|
78
|
+
onMouseLeave: () => {
|
|
79
|
+
d.value = !1;
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
actions: {
|
|
83
|
+
toggle: (a) => {
|
|
84
|
+
var s;
|
|
85
|
+
if (!r.value) {
|
|
86
|
+
const o = a !== void 0 ? a : !t.value;
|
|
87
|
+
t.value = o, l.value = !1, (s = e.onChange) == null || s.call(e, o);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
function ne(e = {}) {
|
|
94
|
+
const t = v(typeof e.modelValue == "function" ? e.modelValue() : e.modelValue ?? []), l = v(typeof e.disabled == "function" ? e.disabled() : e.disabled ?? !1), r = v(typeof e.name == "function" ? e.name() : e.name ?? `l-checkbox-group-${Math.random().toString(36).slice(2, 7)}`);
|
|
95
|
+
return typeof e.modelValue == "function" && g(() => {
|
|
96
|
+
t.value = e.modelValue();
|
|
97
|
+
}), typeof e.disabled == "function" && g(() => {
|
|
98
|
+
l.value = e.disabled();
|
|
99
|
+
}), typeof e.name == "function" && g(() => {
|
|
100
|
+
r.value = e.name();
|
|
101
|
+
}), {
|
|
102
|
+
state: {
|
|
103
|
+
get modelValue() {
|
|
104
|
+
return t.value;
|
|
105
|
+
},
|
|
106
|
+
set modelValue(n) {
|
|
107
|
+
t.value = n;
|
|
108
|
+
},
|
|
109
|
+
get disabled() {
|
|
110
|
+
return l.value;
|
|
111
|
+
},
|
|
112
|
+
set disabled(n) {
|
|
113
|
+
l.value = n;
|
|
114
|
+
},
|
|
115
|
+
get name() {
|
|
116
|
+
return r.value;
|
|
117
|
+
},
|
|
118
|
+
set name(n) {
|
|
119
|
+
r.value = n;
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
actions: {
|
|
123
|
+
toggleValue: (n) => {
|
|
124
|
+
var y;
|
|
125
|
+
if (l.value) return;
|
|
126
|
+
const d = [...t.value], b = d.indexOf(n);
|
|
127
|
+
b > -1 ? d.splice(b, 1) : d.push(n), t.value = d, (y = e.onChange) == null || y.call(e, d);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
const q = Symbol("checkboxGroupKey"), J = {
|
|
133
|
+
modelValue: {
|
|
134
|
+
type: [Boolean, Number, String],
|
|
135
|
+
default: void 0
|
|
136
|
+
},
|
|
137
|
+
label: {
|
|
138
|
+
type: String,
|
|
139
|
+
default: ""
|
|
140
|
+
},
|
|
141
|
+
value: {
|
|
142
|
+
type: [String, Number, Boolean, Object],
|
|
143
|
+
default: void 0
|
|
144
|
+
},
|
|
145
|
+
name: {
|
|
146
|
+
type: String,
|
|
147
|
+
default: ""
|
|
148
|
+
},
|
|
149
|
+
disabled: {
|
|
150
|
+
type: Boolean,
|
|
151
|
+
default: !1
|
|
152
|
+
},
|
|
153
|
+
indeterminate: {
|
|
154
|
+
type: Boolean,
|
|
155
|
+
default: !1
|
|
156
|
+
},
|
|
157
|
+
size: {
|
|
158
|
+
type: String
|
|
159
|
+
},
|
|
160
|
+
border: {
|
|
161
|
+
type: Boolean,
|
|
162
|
+
default: !1
|
|
163
|
+
}
|
|
164
|
+
}, Q = {
|
|
165
|
+
"update:modelValue": (e) => !0,
|
|
166
|
+
change: (e) => !0
|
|
167
|
+
}, ue = {
|
|
168
|
+
modelValue: {
|
|
169
|
+
type: Array,
|
|
170
|
+
default: () => []
|
|
171
|
+
},
|
|
172
|
+
disabled: {
|
|
173
|
+
type: Boolean,
|
|
174
|
+
default: !1
|
|
175
|
+
},
|
|
176
|
+
size: {
|
|
177
|
+
type: String
|
|
178
|
+
},
|
|
179
|
+
name: {
|
|
180
|
+
type: String,
|
|
181
|
+
default: ""
|
|
182
|
+
}
|
|
183
|
+
}, re = {
|
|
184
|
+
"update:modelValue": (e) => !0,
|
|
185
|
+
change: (e) => !0
|
|
186
|
+
}, U = { class: "l-checkbox__input-wrapper" }, W = ["id", "name", "disabled", "checked", "indeterminate", "aria-checked"], X = {
|
|
187
|
+
key: 0,
|
|
188
|
+
class: "l-checkbox__label"
|
|
189
|
+
}, ce = /* @__PURE__ */ D({
|
|
190
|
+
name: "Checkbox",
|
|
191
|
+
__name: "Checkbox",
|
|
192
|
+
props: J,
|
|
193
|
+
emits: Q,
|
|
194
|
+
setup(e, { emit: t }) {
|
|
195
|
+
const l = e, r = t, { formItem: m, size: n, disabled: d, inputId: b } = R(l), y = H("checkbox"), B = (b == null ? void 0 : b.value) || y, a = L(q, null), s = $(null), o = k(() => !!a), p = k(() => (o.value ? a.disabled.value : d.value) || l.disabled), z = k(() => (o.value ? a.size : n.value) || "md"), _ = k(() => (o.value ? a.name.value : l.name) || ""), S = k(() => {
|
|
196
|
+
if (o.value) {
|
|
197
|
+
const c = a.modelValue.value;
|
|
198
|
+
return Array.isArray(c) && c.includes(l.value);
|
|
199
|
+
}
|
|
200
|
+
return l.modelValue === !0;
|
|
201
|
+
}), i = T({
|
|
202
|
+
checked: () => S.value,
|
|
203
|
+
indeterminate: () => l.indeterminate,
|
|
204
|
+
disabled: () => p.value,
|
|
205
|
+
name: () => _.value,
|
|
206
|
+
onChange: (c) => {
|
|
207
|
+
o.value ? a.toggleValue(l.value) : (r("update:modelValue", c), r("change", c), m == null || m.validate("change").catch(() => {
|
|
208
|
+
}));
|
|
209
|
+
}
|
|
210
|
+
}), {
|
|
211
|
+
checked: C,
|
|
212
|
+
indeterminate: V,
|
|
213
|
+
disabled: M,
|
|
214
|
+
focused: E
|
|
215
|
+
} = P(i, {
|
|
216
|
+
checked: () => S.value,
|
|
217
|
+
indeterminate: () => l.indeterminate,
|
|
218
|
+
disabled: () => p.value
|
|
219
|
+
}), G = k(() => [
|
|
220
|
+
"l-checkbox",
|
|
221
|
+
`l-checkbox--${z.value}`,
|
|
222
|
+
{
|
|
223
|
+
"is-checked": C.value,
|
|
224
|
+
"is-indeterminate": V.value,
|
|
225
|
+
"is-disabled": M.value,
|
|
226
|
+
"is-focused": E.value,
|
|
227
|
+
"is-bordered": l.border
|
|
228
|
+
}
|
|
229
|
+
]), w = (c) => {
|
|
230
|
+
i.props.onChange(c);
|
|
231
|
+
};
|
|
232
|
+
return (c, f) => (F(), N("label", {
|
|
233
|
+
class: j(G.value),
|
|
234
|
+
onMouseenter: f[2] || (f[2] = //@ts-ignore
|
|
235
|
+
(...h) => u(i).props.onMouseEnter && u(i).props.onMouseEnter(...h)),
|
|
236
|
+
onMouseleave: f[3] || (f[3] = //@ts-ignore
|
|
237
|
+
(...h) => u(i).props.onMouseLeave && u(i).props.onMouseLeave(...h))
|
|
238
|
+
}, [
|
|
239
|
+
x("span", U, [
|
|
240
|
+
x("input", {
|
|
241
|
+
ref_key: "inputRef",
|
|
242
|
+
ref: s,
|
|
243
|
+
id: u(B),
|
|
244
|
+
type: "checkbox",
|
|
245
|
+
class: "l-checkbox__original",
|
|
246
|
+
name: _.value,
|
|
247
|
+
disabled: u(M),
|
|
248
|
+
checked: u(C),
|
|
249
|
+
indeterminate: u(V),
|
|
250
|
+
"aria-checked": u(V) ? "mixed" : u(C) ? "true" : "false",
|
|
251
|
+
onChange: w,
|
|
252
|
+
onFocus: f[0] || (f[0] = //@ts-ignore
|
|
253
|
+
(...h) => u(i).props.onFocus && u(i).props.onFocus(...h)),
|
|
254
|
+
onBlur: f[1] || (f[1] = //@ts-ignore
|
|
255
|
+
(...h) => u(i).props.onBlur && u(i).props.onBlur(...h))
|
|
256
|
+
}, null, 40, W),
|
|
257
|
+
f[4] || (f[4] = x("span", { class: "l-checkbox__inner" }, [
|
|
258
|
+
x("svg", {
|
|
259
|
+
class: "l-checkbox__checkmark",
|
|
260
|
+
viewBox: "0 0 1024 1024"
|
|
261
|
+
}, [
|
|
262
|
+
x("path", {
|
|
263
|
+
d: "M896 256L384 768 128 512",
|
|
264
|
+
fill: "none",
|
|
265
|
+
stroke: "currentColor",
|
|
266
|
+
"stroke-width": "120",
|
|
267
|
+
"stroke-linecap": "round",
|
|
268
|
+
"stroke-linejoin": "round"
|
|
269
|
+
})
|
|
270
|
+
])
|
|
271
|
+
], -1))
|
|
272
|
+
]),
|
|
273
|
+
c.$slots.default || c.label ? (F(), N("span", X, [
|
|
274
|
+
A(c.$slots, "default", {}, () => [
|
|
275
|
+
I(K(c.label), 1)
|
|
276
|
+
])
|
|
277
|
+
])) : O("", !0)
|
|
278
|
+
], 34));
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
export {
|
|
282
|
+
ce as _,
|
|
283
|
+
re as a,
|
|
284
|
+
q as b,
|
|
285
|
+
Q as c,
|
|
286
|
+
ue as d,
|
|
287
|
+
J as e,
|
|
288
|
+
ne as f
|
|
289
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { defineComponent as p, computed as i, openBlock as t, createElementBlock as r, mergeProps as y, createBlock as c, resolveDynamicComponent as d, unref as g, normalizeClass as v, renderSlot as k } from "vue";
|
|
2
|
+
import { Icon as $ } from "@iconify/vue";
|
|
3
|
+
const h = ["aria-hidden"], b = ["src"], C = /* @__PURE__ */ p({
|
|
4
|
+
name: "Icon",
|
|
5
|
+
__name: "Icon",
|
|
6
|
+
props: {
|
|
7
|
+
name: {},
|
|
8
|
+
icon: {},
|
|
9
|
+
size: { default: "1em" },
|
|
10
|
+
color: {},
|
|
11
|
+
rotate: {},
|
|
12
|
+
spin: { type: Boolean },
|
|
13
|
+
component: {},
|
|
14
|
+
class: {},
|
|
15
|
+
style: {}
|
|
16
|
+
},
|
|
17
|
+
setup(o) {
|
|
18
|
+
const e = o, m = (n) => /^(https?:|data:|\/|(?:\.\.?\/)+).*\.(?:svg|png|jpg|jpeg|gif|webp)$/i.test(n), s = i(() => e.component ? "component" : e.icon ? "iconify" : e.name ? m(e.name) ? "svg" : e.name.includes(":") ? "iconify" : "font" : "none"), u = i(() => {
|
|
19
|
+
const n = e.size;
|
|
20
|
+
let a = n;
|
|
21
|
+
!isNaN(Number(n)) && String(n).trim() !== "" && (a = `${n}px`);
|
|
22
|
+
const l = {
|
|
23
|
+
fontSize: a,
|
|
24
|
+
color: e.color,
|
|
25
|
+
...e.style
|
|
26
|
+
};
|
|
27
|
+
return e.rotate && (l.transform = `rotate(${e.rotate}deg)`), l;
|
|
28
|
+
}), f = i(() => [
|
|
29
|
+
"l-icon",
|
|
30
|
+
{
|
|
31
|
+
"l-icon--spin": e.spin
|
|
32
|
+
},
|
|
33
|
+
e.class
|
|
34
|
+
]);
|
|
35
|
+
return (n, a) => (t(), r("span", y({
|
|
36
|
+
class: f.value,
|
|
37
|
+
style: u.value,
|
|
38
|
+
"aria-hidden": !n.$attrs["aria-label"] && !n.$attrs["aria-labelledby"] ? "true" : void 0
|
|
39
|
+
}, n.$attrs), [
|
|
40
|
+
s.value === "component" ? (t(), c(d(o.component), { key: 0 })) : s.value === "iconify" ? (t(), c(g($), {
|
|
41
|
+
key: 1,
|
|
42
|
+
icon: o.icon || o.name
|
|
43
|
+
}, null, 8, ["icon"])) : s.value === "svg" ? (t(), r("img", {
|
|
44
|
+
key: 2,
|
|
45
|
+
src: o.name,
|
|
46
|
+
class: "l-icon__svg",
|
|
47
|
+
alt: ""
|
|
48
|
+
}, null, 8, b)) : s.value === "font" ? (t(), r("i", {
|
|
49
|
+
key: 3,
|
|
50
|
+
class: v(o.name)
|
|
51
|
+
}, null, 2)) : k(n.$slots, "default", { key: 4 })
|
|
52
|
+
], 16, h));
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
export {
|
|
56
|
+
C as _
|
|
57
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),u=require("@iconify/vue"),m=["aria-hidden"],p=["src"],f=e.defineComponent({name:"Icon",__name:"Icon",props:{name:{},icon:{},size:{default:"1em"},color:{},rotate:{},spin:{type:Boolean},component:{},class:{},style:{}},setup(t){const n=t,a=o=>/^(https?:|data:|\/|(?:\.\.?\/)+).*\.(?:svg|png|jpg|jpeg|gif|webp)$/i.test(o),c=e.computed(()=>n.component?"component":n.icon?"iconify":n.name?a(n.name)?"svg":n.name.includes(":")?"iconify":"font":"none"),i=e.computed(()=>{const o=n.size;let s=o;!isNaN(Number(o))&&String(o).trim()!==""&&(s=`${o}px`);const l={fontSize:s,color:n.color,...n.style};return n.rotate&&(l.transform=`rotate(${n.rotate}deg)`),l}),r=e.computed(()=>["l-icon",{"l-icon--spin":n.spin},n.class]);return(o,s)=>(e.openBlock(),e.createElementBlock("span",e.mergeProps({class:r.value,style:i.value,"aria-hidden":!o.$attrs["aria-label"]&&!o.$attrs["aria-labelledby"]?"true":void 0},o.$attrs),[c.value==="component"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.component),{key:0})):c.value==="iconify"?(e.openBlock(),e.createBlock(e.unref(u.Icon),{key:1,icon:t.icon||t.name},null,8,["icon"])):c.value==="svg"?(e.openBlock(),e.createElementBlock("img",{key:2,src:t.name,class:"l-icon__svg",alt:""},null,8,p)):c.value==="font"?(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(t.name)},null,2)):e.renderSlot(o.$slots,"default",{key:4})],16,m))}});exports._sfc_main=f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue");require("./manager-C0AUxQ1I.js");const i=require("./index-DWAWrVaT.js"),q=require("./use-signals-Bz1smiXh.js"),D=require("./use-form-item-CloIcyon.js"),j=require("./use-id-BycaM3-h.js");function R(l={}){const p=i.signal(typeof l.value=="function"?l.value():l.value??""),y=i.signal(typeof l.disabled=="function"?l.disabled():l.disabled??!1),n=i.signal(typeof l.readonly=="function"?l.readonly():l.readonly??!1),c=i.signal(typeof l.type=="function"?l.type():l.type??"text"),v=i.signal(!1),f=i.signal(!1),u=i.signal(!1);typeof l.value=="function"&&i.effect(()=>{p.value=l.value()}),typeof l.disabled=="function"&&i.effect(()=>{y.value=l.disabled()}),typeof l.readonly=="function"&&i.effect(()=>{n.value=l.readonly()}),typeof l.type=="function"&&i.effect(()=>{c.value=l.type()});const o=i.computed(()=>p.value.length);return{state:{get value(){return p.value},set value(a){p.value=a},get disabled(){return y.value},set disabled(a){y.value=a},get readonly(){return n.value},set readonly(a){n.value=a},get type(){return c.value},set type(a){c.value=a},get focused(){return v.value},set focused(a){v.value=a},get hovered(){return f.value},set hovered(a){f.value=a},get passwordVisible(){return u.value},set passwordVisible(a){u.value=a},get wordCount(){return o.value}},props:{get value(){return p.value},get disabled(){return y.value},get readOnly(){return n.value},get type(){return c.value==="password"?u.value?"text":"password":c.value},onInput:a=>{var m;const s=a.target.value;p.value=s,(m=l.onInput)==null||m.call(l,s)},onChange:a=>{var s;const r=a.target;(s=l.onChange)==null||s.call(l,r.value)},onFocus:a=>{var r;v.value=!0,(r=l.onFocus)==null||r.call(l,a)},onBlur:a=>{var r;v.value=!1,(r=l.onBlur)==null||r.call(l,a)},onMouseEnter:()=>{f.value=!0},onMouseLeave:()=>{f.value=!1}},actions:{clear:()=>{var a,r,s;p.value="",(a=l.onInput)==null||a.call(l,""),(r=l.onChange)==null||r.call(l,""),(s=l.onClear)==null||s.call(l)},togglePasswordVisibility:()=>{u.value=!u.value}}}}const T={key:0,class:"l-input-group__prepend"},K={key:0,class:"l-input__prefix"},W=["value"],A=["value"],O={key:3,class:"l-input__suffix"},H={class:"l-input__suffix-inner"},G=["aria-label","aria-pressed"],J={key:0,viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Q={key:1,viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},U=["id"],X={class:"l-input__count-current"},Y={key:0,class:"l-input__count-separator"},Z={key:1,class:"l-input__count-total"},ee={key:1,class:"l-input-group__append"},le=e.defineComponent({inheritAttrs:!1,__name:"Input",props:{modelValue:{},type:{default:"text"},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},clearable:{type:Boolean},showPassword:{type:Boolean},size:{},maxLength:{},minLength:{},showWordLimit:{type:Boolean},rows:{},autosize:{type:[Boolean,Object]},prefixIcon:{},suffixIcon:{},autofocus:{type:Boolean},autocomplete:{default:"off"},name:{},id:{}},emits:["update:modelValue","input","change","focus","blur","clear"],setup(l,{expose:p,emit:y}){const n=l,c=y,v=e.useSlots(),f=e.useAttrs(),u=e.ref(null),{formItem:o,size:x,disabled:w,readonly:b,inputId:g}=D.useFormItem(n),V=j.useId("input"),h=e.computed(()=>n.id||(g==null?void 0:g.value)||V),a=R({value:()=>String(n.modelValue??""),disabled:()=>n.disabled??w.value,readonly:()=>n.readonly??b.value,type:()=>n.type,onInput:t=>{c("update:modelValue",t),c("input",t),o==null||o.validate("input")},onChange:t=>{c("change",t),o==null||o.validate("change")},onFocus:t=>c("focus",t),onBlur:t=>{c("blur",t),o==null||o.validate("blur")},onClear:()=>c("clear")}),{value:r,disabled:s,readonly:m,type:C,focused:E,hovered:S,passwordVisible:k,wordCount:$}=q.useController(a,{value:()=>String(n.modelValue??""),disabled:()=>n.disabled??w.value,readonly:()=>n.readonly??b.value,type:()=>n.type}),N=e.computed(()=>n.type==="textarea"),z=e.computed(()=>n.size||x.value),_=e.computed(()=>n.clearable&&!s.value&&!m.value&&r.value!==""&&(E.value||S.value)),I=e.computed(()=>n.showPassword&&n.type==="password"&&!s.value&&!m.value&&r.value!==""),F=e.computed(()=>["l-input",`l-input--${z.value}`,{"is-disabled":s.value,"is-readonly":m.value,"is-focused":E.value,"l-input--textarea":N.value,"l-input--prefix":!!(v.prefix||n.prefixIcon),"l-input--suffix":!!(v.suffix||n.suffixIcon||n.clearable||n.showPassword),"l-input--group":!!(v.prepend||v.append)},f.class]),P=e.computed(()=>{const t=C.value==="password"&&k.value;return{...f,class:"l-input__inner",placeholder:n.placeholder,maxlength:n.maxLength,minlength:n.minLength,autocomplete:n.autocomplete,name:n.name,id:h.value,rows:n.rows,"aria-labelledby":o==null?void 0:o.labelId,"aria-describedby":[n.showWordLimit?`${h.value}-count`:"",o==null?void 0:o.errorId].filter(Boolean).join(" ")||void 0,...a.props,disabled:s.value,readonly:m.value,type:t?"text":C.value}}),M=t=>{var d;t.preventDefault(),t.stopPropagation(),a.actions.clear(),(d=u.value)==null||d.focus()},L=t=>{t.preventDefault(),t.stopPropagation(),a.actions.togglePasswordVisibility()};return e.onMounted(()=>{var t;n.autofocus&&((t=u.value)==null||t.focus())}),p({input:u,focus:()=>{var t;return(t=u.value)==null?void 0:t.focus()},blur:()=>{var t;return(t=u.value)==null?void 0:t.blur()},select:()=>{var t;return(t=u.value)==null?void 0:t.select()}}),(t,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(F.value),style:e.normalizeStyle(e.unref(f).style)},[t.$slots.prepend?(e.openBlock(),e.createElementBlock("div",T,[e.renderSlot(t.$slots,"prepend")])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"l-input__wrapper",onMouseenter:d[0]||(d[0]=(...B)=>e.unref(a).props.onMouseEnter&&e.unref(a).props.onMouseEnter(...B)),onMouseleave:d[1]||(d[1]=(...B)=>e.unref(a).props.onMouseLeave&&e.unref(a).props.onMouseLeave(...B))},[t.$slots.prefix||l.prefixIcon?(e.openBlock(),e.createElementBlock("span",K,[e.renderSlot(t.$slots,"prefix",{},()=>[l.prefixIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(l.prefixIcon)},null,2)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),N.value?(e.openBlock(),e.createElementBlock("textarea",e.mergeProps({key:1,ref_key:"inputRef",ref:u},P.value,{value:e.unref(r)}),null,16,W)):(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:2,ref_key:"inputRef",ref:u},P.value,{value:e.unref(r)}),null,16,A)),t.$slots.suffix||l.suffixIcon||l.clearable||l.showPassword||l.showWordLimit?(e.openBlock(),e.createElementBlock("span",O,[e.createElementVNode("span",H,[!_.value&&!I.value?e.renderSlot(t.$slots,"suffix",{key:0},()=>[l.suffixIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(l.suffixIcon)},null,2)):e.createCommentVNode("",!0)]):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"l-fade"},{default:e.withCtx(()=>[_.value?(e.openBlock(),e.createElementBlock("span",{key:0,class:"l-input__clear",role:"button",tabindex:"0","aria-label":"清空内容",onMousedown:M,onKeydown:e.withKeys(M,["enter","space"])},[...d[2]||(d[2]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),e.createElementVNode("path",{d:"m15 9-6 6"}),e.createElementVNode("path",{d:"m9 9 6 6"})],-1)])],32)):e.createCommentVNode("",!0)]),_:1}),I.value?(e.openBlock(),e.createElementBlock("span",{key:1,class:"l-input__password-toggle",role:"button",tabindex:"0","aria-label":e.unref(k)?"隐藏密码":"显示密码","aria-pressed":e.unref(k),onMousedown:L,onKeydown:e.withKeys(L,["enter","space"])},[e.unref(k)?(e.openBlock(),e.createElementBlock("svg",J,[...d[3]||(d[3]=[e.createElementVNode("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"12",r:"3"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",Q,[...d[4]||(d[4]=[e.createElementVNode("path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"},null,-1),e.createElementVNode("path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"},null,-1),e.createElementVNode("path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"},null,-1),e.createElementVNode("line",{x1:"3",x2:"21",y1:"3",y2:"21"},null,-1)])]))],40,G)):e.createCommentVNode("",!0),l.showWordLimit?(e.openBlock(),e.createElementBlock("span",{key:2,id:`${h.value}-count`,class:"l-input__count"},[e.createElementVNode("span",X,e.toDisplayString(e.unref($)),1),l.maxLength?(e.openBlock(),e.createElementBlock("span",Y,"/")):e.createCommentVNode("",!0),l.maxLength?(e.openBlock(),e.createElementBlock("span",Z,e.toDisplayString(l.maxLength),1)):e.createCommentVNode("",!0)],8,U)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)],32),t.$slots.append?(e.openBlock(),e.createElementBlock("div",ee,[e.renderSlot(t.$slots,"append")])):e.createCommentVNode("",!0)],6))}});exports._sfc_main=le;
|