@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,92 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType, InjectionKey, Ref } from 'vue';
|
|
2
|
+
export declare const selectProps: {
|
|
3
|
+
readonly modelValue: {
|
|
4
|
+
readonly type: PropType<any | any[]>;
|
|
5
|
+
readonly default: null;
|
|
6
|
+
};
|
|
7
|
+
readonly multiple: {
|
|
8
|
+
readonly type: BooleanConstructor;
|
|
9
|
+
readonly default: false;
|
|
10
|
+
};
|
|
11
|
+
readonly disabled: {
|
|
12
|
+
readonly type: BooleanConstructor;
|
|
13
|
+
readonly default: false;
|
|
14
|
+
};
|
|
15
|
+
readonly clearable: {
|
|
16
|
+
readonly type: BooleanConstructor;
|
|
17
|
+
readonly default: false;
|
|
18
|
+
};
|
|
19
|
+
readonly filterable: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: false;
|
|
22
|
+
};
|
|
23
|
+
readonly placeholder: {
|
|
24
|
+
readonly type: StringConstructor;
|
|
25
|
+
readonly default: "请选择";
|
|
26
|
+
};
|
|
27
|
+
readonly size: {
|
|
28
|
+
readonly type: PropType<"sm" | "md" | "lg">;
|
|
29
|
+
};
|
|
30
|
+
readonly noDataText: {
|
|
31
|
+
readonly type: StringConstructor;
|
|
32
|
+
readonly default: "无数据";
|
|
33
|
+
};
|
|
34
|
+
readonly loading: {
|
|
35
|
+
readonly type: BooleanConstructor;
|
|
36
|
+
readonly default: false;
|
|
37
|
+
};
|
|
38
|
+
readonly remote: {
|
|
39
|
+
readonly type: BooleanConstructor;
|
|
40
|
+
readonly default: false;
|
|
41
|
+
};
|
|
42
|
+
readonly loadingText: {
|
|
43
|
+
readonly type: StringConstructor;
|
|
44
|
+
readonly default: "加载中...";
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type SelectProps = ExtractPropTypes<typeof selectProps>;
|
|
48
|
+
export declare const selectEmits: {
|
|
49
|
+
'update:modelValue': (_val: any | any[]) => boolean;
|
|
50
|
+
change: (_val: any | any[]) => boolean;
|
|
51
|
+
clear: () => boolean;
|
|
52
|
+
'visible-change': (_visible: boolean) => boolean;
|
|
53
|
+
'remove-tag': (_val: any) => boolean;
|
|
54
|
+
search: (_query: string) => boolean;
|
|
55
|
+
};
|
|
56
|
+
export type SelectEmits = typeof selectEmits;
|
|
57
|
+
export declare const optionProps: {
|
|
58
|
+
readonly value: {
|
|
59
|
+
readonly type: PropType<any>;
|
|
60
|
+
readonly required: true;
|
|
61
|
+
};
|
|
62
|
+
readonly label: {
|
|
63
|
+
readonly type: StringConstructor;
|
|
64
|
+
readonly required: true;
|
|
65
|
+
};
|
|
66
|
+
readonly disabled: {
|
|
67
|
+
readonly type: BooleanConstructor;
|
|
68
|
+
readonly default: false;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export type OptionProps = ExtractPropTypes<typeof optionProps>;
|
|
72
|
+
export interface SelectContext {
|
|
73
|
+
props: SelectProps;
|
|
74
|
+
value: Ref<any | any[]>;
|
|
75
|
+
select: (val: any) => void;
|
|
76
|
+
hoveredValue: any;
|
|
77
|
+
filterText: Ref<string>;
|
|
78
|
+
focusedIndex: Ref<number>;
|
|
79
|
+
activeOptionId: import('vue').ComputedRef<string | undefined>;
|
|
80
|
+
listboxId: string;
|
|
81
|
+
getOptionId: (val: any) => string;
|
|
82
|
+
registerOption: (option: {
|
|
83
|
+
value: any;
|
|
84
|
+
label: string;
|
|
85
|
+
disabled: boolean;
|
|
86
|
+
visible: boolean;
|
|
87
|
+
}) => void;
|
|
88
|
+
unregisterOption: (val: any) => void;
|
|
89
|
+
updateOptionVisibility: (val: any, visible: boolean) => void;
|
|
90
|
+
updateOptionDisabled: (val: any, disabled: boolean) => void;
|
|
91
|
+
}
|
|
92
|
+
export declare const SelectKey: InjectionKey<SelectContext>;
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
readonly modelValue: {
|
|
3
|
+
readonly type: import('vue').PropType<number | number[]>;
|
|
4
|
+
readonly default: 0;
|
|
5
|
+
};
|
|
6
|
+
readonly min: {
|
|
7
|
+
readonly type: NumberConstructor;
|
|
8
|
+
readonly default: 0;
|
|
9
|
+
};
|
|
10
|
+
readonly max: {
|
|
11
|
+
readonly type: NumberConstructor;
|
|
12
|
+
readonly default: 100;
|
|
13
|
+
};
|
|
14
|
+
readonly step: {
|
|
15
|
+
readonly type: NumberConstructor;
|
|
16
|
+
readonly default: 1;
|
|
17
|
+
};
|
|
18
|
+
readonly disabled: {
|
|
19
|
+
readonly type: BooleanConstructor;
|
|
20
|
+
readonly default: false;
|
|
21
|
+
};
|
|
22
|
+
readonly range: {
|
|
23
|
+
readonly type: BooleanConstructor;
|
|
24
|
+
readonly default: false;
|
|
25
|
+
};
|
|
26
|
+
readonly vertical: {
|
|
27
|
+
readonly type: BooleanConstructor;
|
|
28
|
+
readonly default: false;
|
|
29
|
+
};
|
|
30
|
+
readonly showTooltip: {
|
|
31
|
+
readonly type: BooleanConstructor;
|
|
32
|
+
readonly default: true;
|
|
33
|
+
};
|
|
34
|
+
readonly formatTooltip: {
|
|
35
|
+
readonly type: import('vue').PropType<(val: number) => string | number>;
|
|
36
|
+
readonly default: (val: number) => number;
|
|
37
|
+
};
|
|
38
|
+
readonly marks: {
|
|
39
|
+
readonly type: import('vue').PropType<Record<number, string | {
|
|
40
|
+
style?: any;
|
|
41
|
+
label: string;
|
|
42
|
+
}>>;
|
|
43
|
+
readonly default: () => {};
|
|
44
|
+
};
|
|
45
|
+
readonly height: {
|
|
46
|
+
readonly type: StringConstructor;
|
|
47
|
+
readonly default: "200px";
|
|
48
|
+
};
|
|
49
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
50
|
+
change: (_val: number | number[]) => void;
|
|
51
|
+
input: (_val: number | number[]) => void;
|
|
52
|
+
"update:modelValue": (_val: number | number[]) => void;
|
|
53
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
54
|
+
readonly modelValue: {
|
|
55
|
+
readonly type: import('vue').PropType<number | number[]>;
|
|
56
|
+
readonly default: 0;
|
|
57
|
+
};
|
|
58
|
+
readonly min: {
|
|
59
|
+
readonly type: NumberConstructor;
|
|
60
|
+
readonly default: 0;
|
|
61
|
+
};
|
|
62
|
+
readonly max: {
|
|
63
|
+
readonly type: NumberConstructor;
|
|
64
|
+
readonly default: 100;
|
|
65
|
+
};
|
|
66
|
+
readonly step: {
|
|
67
|
+
readonly type: NumberConstructor;
|
|
68
|
+
readonly default: 1;
|
|
69
|
+
};
|
|
70
|
+
readonly disabled: {
|
|
71
|
+
readonly type: BooleanConstructor;
|
|
72
|
+
readonly default: false;
|
|
73
|
+
};
|
|
74
|
+
readonly range: {
|
|
75
|
+
readonly type: BooleanConstructor;
|
|
76
|
+
readonly default: false;
|
|
77
|
+
};
|
|
78
|
+
readonly vertical: {
|
|
79
|
+
readonly type: BooleanConstructor;
|
|
80
|
+
readonly default: false;
|
|
81
|
+
};
|
|
82
|
+
readonly showTooltip: {
|
|
83
|
+
readonly type: BooleanConstructor;
|
|
84
|
+
readonly default: true;
|
|
85
|
+
};
|
|
86
|
+
readonly formatTooltip: {
|
|
87
|
+
readonly type: import('vue').PropType<(val: number) => string | number>;
|
|
88
|
+
readonly default: (val: number) => number;
|
|
89
|
+
};
|
|
90
|
+
readonly marks: {
|
|
91
|
+
readonly type: import('vue').PropType<Record<number, string | {
|
|
92
|
+
style?: any;
|
|
93
|
+
label: string;
|
|
94
|
+
}>>;
|
|
95
|
+
readonly default: () => {};
|
|
96
|
+
};
|
|
97
|
+
readonly height: {
|
|
98
|
+
readonly type: StringConstructor;
|
|
99
|
+
readonly default: "200px";
|
|
100
|
+
};
|
|
101
|
+
}>> & Readonly<{
|
|
102
|
+
onChange?: ((_val: number | number[]) => any) | undefined;
|
|
103
|
+
onInput?: ((_val: number | number[]) => any) | undefined;
|
|
104
|
+
"onUpdate:modelValue"?: ((_val: number | number[]) => any) | undefined;
|
|
105
|
+
}>, {
|
|
106
|
+
readonly disabled: boolean;
|
|
107
|
+
readonly range: boolean;
|
|
108
|
+
readonly vertical: boolean;
|
|
109
|
+
readonly modelValue: number | number[];
|
|
110
|
+
readonly height: string;
|
|
111
|
+
readonly min: number;
|
|
112
|
+
readonly max: number;
|
|
113
|
+
readonly step: number;
|
|
114
|
+
readonly showTooltip: boolean;
|
|
115
|
+
readonly formatTooltip: (val: number) => string | number;
|
|
116
|
+
readonly marks: Record<number, string | {
|
|
117
|
+
style?: any;
|
|
118
|
+
label: string;
|
|
119
|
+
}>;
|
|
120
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
121
|
+
runwayRef: HTMLDivElement;
|
|
122
|
+
}, HTMLDivElement>;
|
|
123
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
require('../style/slider.css');
|
|
2
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../chunks/manager-C0AUxQ1I.js");const w=require("../chunks/index-DWAWrVaT.js"),q=require("../chunks/use-id-BycaM3-h.js"),j=require("../chunks/use-signals-Bz1smiXh.js"),O=require("../chunks/use-form-item-CloIcyon.js");function R(s={}){const u=s.min??0,l=s.max??100,c=s.step??1,k=s.range??!1,B=()=>typeof s.value=="function"?s.value():s.value??(k?[u,l]:u),V=B(),d=w.signal(Array.isArray(V)?[...V]:V),p=w.signal(typeof s.disabled=="function"?s.disabled():s.disabled??!1),S=w.signal(!1),v=w.signal(null);typeof s.disabled=="function"&&w.effect(()=>{p.value=s.disabled()});const f=t=>{let n=Math.max(u,Math.min(l,t));if(c>0){const i=(n-u)%c;n=i>=c/2?n-i+c:n-i}return parseFloat(n.toFixed(10))},M=t=>Array.isArray(t)?t.map(f).sort((n,i)=>n-i):f(t),y=(t,n)=>Array.isArray(t)&&Array.isArray(n)?t.length===n.length&&t.every((i,h)=>Object.is(i,n[h])):Object.is(t,n),A=t=>{const n=M(t);y(n,d.value)||(d.value=n)};typeof s.value=="function"&&w.effect(()=>{const t=M(B()),n=w.untracked(()=>d.value);y(t,n)||(d.value=t)});const E=(t,n=!1)=>{var b,a;if(p.value)return;const i=M(t);!y(i,d.value)&&(d.value=i,(b=s.onInput)==null||b.call(s,i),n&&((a=s.onChange)==null||a.call(s,i)))},g=t=>(t-u)/(l-u)*100,_=w.computed(()=>{const t=d.value;return Array.isArray(t)?t.map(g):[g(t)]});return{state:{get value(){return d.value},set value(t){A(t)},get percents(){return _.value},get disabled(){return p.value},set disabled(t){p.value=t},get isDragging(){return S.value},get activeThumbIndex(){return v.value}},actions:{updateValue:E,getValueFromPosition:(t,n)=>{let i;return s.vertical?i=(n.bottom-t.y)/n.height:i=(t.x-n.left)/n.width,u+i*(l-u)},setDragging:(t,n=null)=>{S.value=t,v.value=n},handleKeyDown:(t,n=0)=>{if(p.value)return;const i=h=>{const b=d.value;if(Array.isArray(b)){const a=[...b];a[n]+=h,E(a,!0)}else E(b+h,!0)};switch(t.key){case"ArrowUp":case"ArrowRight":t.preventDefault(),i(c);break;case"ArrowDown":case"ArrowLeft":t.preventDefault(),i(-c);break;case"PageUp":t.preventDefault(),i(c*10||(l-u)/10);break;case"PageDown":t.preventDefault(),i(-(c*10||(l-u)/10));break;case"Home":t.preventDefault(),E(k?n===0?[u,d.value[1]]:[d.value[0],u]:u,!0);break;case"End":t.preventDefault(),E(k?n===0?[l,d.value[1]]:[d.value[0],l]:l,!0);break}}},props:{min:u,max:l,step:c,disabled:p.value}}}const N={modelValue:{type:[Number,Array],default:0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},disabled:{type:Boolean,default:!1},range:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!0},formatTooltip:{type:Function,default:s=>s},marks:{type:Object,default:()=>({})},height:{type:String,default:"200px"}},P={"update:modelValue":s=>!0,change:s=>!0,input:s=>!0},x=["id","aria-valuemin","aria-valuemax","aria-valuenow","aria-disabled","aria-label","onMousedown","onTouchstart","onKeydown"],U={key:0,class:"l-slider__tooltip"},X=["id","aria-valuemin","aria-valuemax","aria-valuenow","aria-disabled"],Y={key:0,class:"l-slider__tooltip"},H={key:2,class:"l-slider__marks"},G=e.defineComponent({name:"Slider",__name:"Slider",props:N,emits:P,setup(s,{emit:u}){const l=s,c=u,{formItem:k,disabled:B,inputId:V}=O.useFormItem(l),d=q.useId("slider"),p=(V==null?void 0:V.value)||d,S=e.ref(null),v=R({value:l.modelValue,min:l.min,max:l.max,step:l.step,disabled:B.value,range:l.range,vertical:l.vertical,onInput:a=>{c("update:modelValue",a),c("input",a)},onChange:a=>{c("change",a)}}),{value:f,percents:M,disabled:y,isDragging:A,activeThumbIndex:E}=j.useController(v,{value:()=>l.modelValue,disabled:()=>B.value}),g=(a,r=null)=>{if(y.value||!S.value)return;const o=S.value.getBoundingClientRect(),m="touches"in a?a.touches[0]:a,D=m.clientX,$=m.clientY,C=v.actions.getValueFromPosition({x:D,y:$},o);if(r===null&&l.range){const T=f.value,I=Math.abs(C-T[0]),K=Math.abs(C-T[1]);r=I<K?0:1}else r===null&&(r=0);if(v.actions.setDragging(!0,r),l.range){const T=[...f.value];T[r]=C,v.actions.updateValue(T)}else v.actions.updateValue(C)},_=a=>{A.value&&g(a,E.value)},L=()=>{A.value&&(v.actions.setDragging(!1,null),c("change",f.value),k==null||k.validate("change").catch(()=>{}))};e.onMounted(()=>{window.addEventListener("mousemove",_),window.addEventListener("mouseup",L),window.addEventListener("touchmove",_,{passive:!1}),window.addEventListener("touchend",L)}),e.onUnmounted(()=>{window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",L),window.removeEventListener("touchmove",_),window.removeEventListener("touchend",L)});const F=e.computed(()=>["l-slider",{"is-disabled":y.value,"is-dragging":A.value,"l-slider--vertical":l.vertical}]),t=e.computed(()=>({"--l-slider-height":l.vertical?l.height:void 0})),n=e.computed(()=>{const a=M.value;if(l.range){const r=Math.min(a[0],a[1]),o=Math.abs(a[1]-a[0]);return l.vertical?{bottom:`${r}%`,height:`${o}%`}:{left:`${r}%`,width:`${o}%`}}return l.vertical?{height:`${a[0]}%`}:{width:`${a[0]}%`}}),i=a=>{const r=M.value[a];return l.vertical?{bottom:`${r}%`}:{left:`${r}%`}},h=e.computed(()=>Object.entries(l.marks).map(([a,r])=>{const o=parseFloat(a);return{position:o,label:typeof r=="string"?r:r.label,style:typeof r=="string"?{}:r.style,isEndpoint:o===l.min||o===l.max}})),b=a=>{const r=(a-l.min)/(l.max-l.min)*100;return l.vertical?{bottom:`${r}%`}:{left:`${r}%`}};return(a,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(F.value),style:e.normalizeStyle(t.value),onMousedown:r[3]||(r[3]=o=>g(o,null)),onTouchstart:r[4]||(r[4]=o=>g(o,null))},[e.createElementVNode("div",{ref_key:"runwayRef",ref:S,class:"l-slider__runway"},[e.createElementVNode("div",{class:"l-slider__bar",style:e.normalizeStyle(n.value)},null,4),a.range?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(2,(o,m)=>e.createElementVNode("div",{key:m,id:m===0?e.unref(p):void 0,class:"l-slider__thumb",style:e.normalizeStyle(i(m)),tabindex:"0",role:"slider","aria-valuemin":a.min,"aria-valuemax":a.max,"aria-valuenow":e.unref(f)[m],"aria-disabled":e.unref(y)?"true":"false","aria-label":m===0?"Start":"End",onMousedown:e.withModifiers(D=>g(D,m),["stop"]),onTouchstart:e.withModifiers(D=>g(D,m),["stop"]),onKeydown:D=>e.unref(v).actions.handleKeyDown(D,m)},[a.showTooltip?(e.openBlock(),e.createElementBlock("div",U,e.toDisplayString(a.formatTooltip(e.unref(f)[m])),1)):e.createCommentVNode("",!0)],44,x)),64)):(e.openBlock(),e.createElementBlock("div",{key:1,id:e.unref(p),class:"l-slider__thumb",style:e.normalizeStyle(i(0)),tabindex:"0",role:"slider","aria-valuemin":a.min,"aria-valuemax":a.max,"aria-valuenow":e.unref(f),"aria-disabled":e.unref(y)?"true":"false",onMousedown:r[0]||(r[0]=e.withModifiers(o=>g(o,0),["stop"])),onTouchstart:r[1]||(r[1]=e.withModifiers(o=>g(o,0),["stop"])),onKeydown:r[2]||(r[2]=o=>e.unref(v).actions.handleKeyDown(o,0))},[a.showTooltip?(e.openBlock(),e.createElementBlock("div",Y,e.toDisplayString(a.formatTooltip(e.unref(f))),1)):e.createCommentVNode("",!0)],44,X)),h.value.length>0?(e.openBlock(),e.createElementBlock("div",H,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,o=>(e.openBlock(),e.createElementBlock("div",{key:o.position,class:e.normalizeClass(["l-slider__mark-stop",{"is-endpoint":o.isEndpoint}]),style:e.normalizeStyle(b(o.position))},[e.createElementVNode("div",{class:"l-slider__mark-text",style:e.normalizeStyle(o.style)},e.toDisplayString(o.label),5)],6))),128))])):e.createCommentVNode("",!0)],512)],38))}}),z=G;z.install=s=>{s.component("LSlider",z)};exports.LSlider=z;exports.default=z;exports.sliderEmits=P;exports.sliderProps=N;
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import '../style/slider.css';
|
|
2
|
+
import { defineComponent as J, ref as Q, onMounted as W, onUnmounted as Z, computed as B, openBlock as w, createElementBlock as V, normalizeStyle as L, normalizeClass as x, createElementVNode as I, Fragment as O, renderList as U, unref as p, withModifiers as K, toDisplayString as z, createCommentVNode as R } from "vue";
|
|
3
|
+
import "../chunks/manager-BUdQK4AD.mjs";
|
|
4
|
+
import { s as N, e as X, u as ee, c as ae } from "../chunks/index-B0yEC3RG.mjs";
|
|
5
|
+
import { u as te } from "../chunks/use-id-D3casveg.mjs";
|
|
6
|
+
import { u as le } from "../chunks/use-signals-CE1T2jXK.mjs";
|
|
7
|
+
import { u as ne } from "../chunks/use-form-item-CqDbWCiU.mjs";
|
|
8
|
+
function re(r = {}) {
|
|
9
|
+
const i = r.min ?? 0, t = r.max ?? 100, d = r.step ?? 1, k = r.range ?? !1, S = () => typeof r.value == "function" ? r.value() : r.value ?? (k ? [i, t] : i), D = S(), u = N(Array.isArray(D) ? [...D] : D), g = N(typeof r.disabled == "function" ? r.disabled() : r.disabled ?? !1), M = N(!1), m = N(null);
|
|
10
|
+
typeof r.disabled == "function" && X(() => {
|
|
11
|
+
g.value = r.disabled();
|
|
12
|
+
});
|
|
13
|
+
const v = (e) => {
|
|
14
|
+
let l = Math.max(i, Math.min(t, e));
|
|
15
|
+
if (d > 0) {
|
|
16
|
+
const o = (l - i) % d;
|
|
17
|
+
l = o >= d / 2 ? l - o + d : l - o;
|
|
18
|
+
}
|
|
19
|
+
return parseFloat(l.toFixed(10));
|
|
20
|
+
}, E = (e) => Array.isArray(e) ? e.map(v).sort((l, o) => l - o) : v(e), y = (e, l) => Array.isArray(e) && Array.isArray(l) ? e.length === l.length && e.every((o, h) => Object.is(o, l[h])) : Object.is(e, l), C = (e) => {
|
|
21
|
+
const l = E(e);
|
|
22
|
+
y(l, u.value) || (u.value = l);
|
|
23
|
+
};
|
|
24
|
+
typeof r.value == "function" && X(() => {
|
|
25
|
+
const e = E(S()), l = ee(() => u.value);
|
|
26
|
+
y(e, l) || (u.value = e);
|
|
27
|
+
});
|
|
28
|
+
const _ = (e, l = !1) => {
|
|
29
|
+
var b, a;
|
|
30
|
+
if (g.value) return;
|
|
31
|
+
const o = E(e);
|
|
32
|
+
!y(o, u.value) && (u.value = o, (b = r.onInput) == null || b.call(r, o), l && ((a = r.onChange) == null || a.call(r, o)));
|
|
33
|
+
}, f = (e) => (e - i) / (t - i) * 100, T = ae(() => {
|
|
34
|
+
const e = u.value;
|
|
35
|
+
return Array.isArray(e) ? e.map(f) : [f(e)];
|
|
36
|
+
});
|
|
37
|
+
return {
|
|
38
|
+
state: {
|
|
39
|
+
get value() {
|
|
40
|
+
return u.value;
|
|
41
|
+
},
|
|
42
|
+
set value(e) {
|
|
43
|
+
C(e);
|
|
44
|
+
},
|
|
45
|
+
get percents() {
|
|
46
|
+
return T.value;
|
|
47
|
+
},
|
|
48
|
+
get disabled() {
|
|
49
|
+
return g.value;
|
|
50
|
+
},
|
|
51
|
+
set disabled(e) {
|
|
52
|
+
g.value = e;
|
|
53
|
+
},
|
|
54
|
+
get isDragging() {
|
|
55
|
+
return M.value;
|
|
56
|
+
},
|
|
57
|
+
get activeThumbIndex() {
|
|
58
|
+
return m.value;
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
actions: {
|
|
62
|
+
updateValue: _,
|
|
63
|
+
getValueFromPosition: (e, l) => {
|
|
64
|
+
let o;
|
|
65
|
+
return r.vertical ? o = (l.bottom - e.y) / l.height : o = (e.x - l.left) / l.width, i + o * (t - i);
|
|
66
|
+
},
|
|
67
|
+
setDragging: (e, l = null) => {
|
|
68
|
+
M.value = e, m.value = l;
|
|
69
|
+
},
|
|
70
|
+
handleKeyDown: (e, l = 0) => {
|
|
71
|
+
if (g.value) return;
|
|
72
|
+
const o = (h) => {
|
|
73
|
+
const b = u.value;
|
|
74
|
+
if (Array.isArray(b)) {
|
|
75
|
+
const a = [...b];
|
|
76
|
+
a[l] += h, _(a, !0);
|
|
77
|
+
} else
|
|
78
|
+
_(b + h, !0);
|
|
79
|
+
};
|
|
80
|
+
switch (e.key) {
|
|
81
|
+
case "ArrowUp":
|
|
82
|
+
case "ArrowRight":
|
|
83
|
+
e.preventDefault(), o(d);
|
|
84
|
+
break;
|
|
85
|
+
case "ArrowDown":
|
|
86
|
+
case "ArrowLeft":
|
|
87
|
+
e.preventDefault(), o(-d);
|
|
88
|
+
break;
|
|
89
|
+
case "PageUp":
|
|
90
|
+
e.preventDefault(), o(d * 10 || (t - i) / 10);
|
|
91
|
+
break;
|
|
92
|
+
case "PageDown":
|
|
93
|
+
e.preventDefault(), o(-(d * 10 || (t - i) / 10));
|
|
94
|
+
break;
|
|
95
|
+
case "Home":
|
|
96
|
+
e.preventDefault(), _(k ? l === 0 ? [i, u.value[1]] : [u.value[0], i] : i, !0);
|
|
97
|
+
break;
|
|
98
|
+
case "End":
|
|
99
|
+
e.preventDefault(), _(k ? l === 0 ? [t, u.value[1]] : [u.value[0], t] : t, !0);
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
props: {
|
|
105
|
+
min: i,
|
|
106
|
+
max: t,
|
|
107
|
+
step: d,
|
|
108
|
+
disabled: g.value
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
const se = {
|
|
113
|
+
modelValue: {
|
|
114
|
+
type: [Number, Array],
|
|
115
|
+
default: 0
|
|
116
|
+
},
|
|
117
|
+
min: {
|
|
118
|
+
type: Number,
|
|
119
|
+
default: 0
|
|
120
|
+
},
|
|
121
|
+
max: {
|
|
122
|
+
type: Number,
|
|
123
|
+
default: 100
|
|
124
|
+
},
|
|
125
|
+
step: {
|
|
126
|
+
type: Number,
|
|
127
|
+
default: 1
|
|
128
|
+
},
|
|
129
|
+
disabled: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
default: !1
|
|
132
|
+
},
|
|
133
|
+
range: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
default: !1
|
|
136
|
+
},
|
|
137
|
+
vertical: {
|
|
138
|
+
type: Boolean,
|
|
139
|
+
default: !1
|
|
140
|
+
},
|
|
141
|
+
showTooltip: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
default: !0
|
|
144
|
+
},
|
|
145
|
+
formatTooltip: {
|
|
146
|
+
type: Function,
|
|
147
|
+
default: (r) => r
|
|
148
|
+
},
|
|
149
|
+
marks: {
|
|
150
|
+
type: Object,
|
|
151
|
+
default: () => ({})
|
|
152
|
+
},
|
|
153
|
+
height: {
|
|
154
|
+
type: String,
|
|
155
|
+
default: "200px"
|
|
156
|
+
}
|
|
157
|
+
}, oe = {
|
|
158
|
+
"update:modelValue": (r) => !0,
|
|
159
|
+
change: (r) => !0,
|
|
160
|
+
input: (r) => !0
|
|
161
|
+
}, ie = ["id", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-disabled", "aria-label", "onMousedown", "onTouchstart", "onKeydown"], ue = {
|
|
162
|
+
key: 0,
|
|
163
|
+
class: "l-slider__tooltip"
|
|
164
|
+
}, de = ["id", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-disabled"], ce = {
|
|
165
|
+
key: 0,
|
|
166
|
+
class: "l-slider__tooltip"
|
|
167
|
+
}, me = {
|
|
168
|
+
key: 2,
|
|
169
|
+
class: "l-slider__marks"
|
|
170
|
+
}, ve = /* @__PURE__ */ J({
|
|
171
|
+
name: "Slider",
|
|
172
|
+
__name: "Slider",
|
|
173
|
+
props: se,
|
|
174
|
+
emits: oe,
|
|
175
|
+
setup(r, { emit: i }) {
|
|
176
|
+
const t = r, d = i, { formItem: k, disabled: S, inputId: D } = ne(t), u = te("slider"), g = (D == null ? void 0 : D.value) || u, M = Q(null), m = re({
|
|
177
|
+
value: t.modelValue,
|
|
178
|
+
min: t.min,
|
|
179
|
+
max: t.max,
|
|
180
|
+
step: t.step,
|
|
181
|
+
disabled: S.value,
|
|
182
|
+
range: t.range,
|
|
183
|
+
vertical: t.vertical,
|
|
184
|
+
onInput: (a) => {
|
|
185
|
+
d("update:modelValue", a), d("input", a);
|
|
186
|
+
},
|
|
187
|
+
onChange: (a) => {
|
|
188
|
+
d("change", a);
|
|
189
|
+
}
|
|
190
|
+
}), {
|
|
191
|
+
value: v,
|
|
192
|
+
percents: E,
|
|
193
|
+
disabled: y,
|
|
194
|
+
isDragging: C,
|
|
195
|
+
activeThumbIndex: _
|
|
196
|
+
} = le(m, {
|
|
197
|
+
value: () => t.modelValue,
|
|
198
|
+
disabled: () => S.value
|
|
199
|
+
}), f = (a, n = null) => {
|
|
200
|
+
if (y.value || !M.value) return;
|
|
201
|
+
const s = M.value.getBoundingClientRect(), c = "touches" in a ? a.touches[0] : a, A = c.clientX, H = c.clientY, P = m.actions.getValueFromPosition({ x: A, y: H }, s);
|
|
202
|
+
if (n === null && t.range) {
|
|
203
|
+
const F = v.value, q = Math.abs(P - F[0]), G = Math.abs(P - F[1]);
|
|
204
|
+
n = q < G ? 0 : 1;
|
|
205
|
+
} else n === null && (n = 0);
|
|
206
|
+
if (m.actions.setDragging(!0, n), t.range) {
|
|
207
|
+
const F = [...v.value];
|
|
208
|
+
F[n] = P, m.actions.updateValue(F);
|
|
209
|
+
} else
|
|
210
|
+
m.actions.updateValue(P);
|
|
211
|
+
}, T = (a) => {
|
|
212
|
+
C.value && f(a, _.value);
|
|
213
|
+
}, $ = () => {
|
|
214
|
+
C.value && (m.actions.setDragging(!1, null), d("change", v.value), k == null || k.validate("change").catch(() => {
|
|
215
|
+
}));
|
|
216
|
+
};
|
|
217
|
+
W(() => {
|
|
218
|
+
window.addEventListener("mousemove", T), window.addEventListener("mouseup", $), window.addEventListener("touchmove", T, { passive: !1 }), window.addEventListener("touchend", $);
|
|
219
|
+
}), Z(() => {
|
|
220
|
+
window.removeEventListener("mousemove", T), window.removeEventListener("mouseup", $), window.removeEventListener("touchmove", T), window.removeEventListener("touchend", $);
|
|
221
|
+
});
|
|
222
|
+
const j = B(() => [
|
|
223
|
+
"l-slider",
|
|
224
|
+
{
|
|
225
|
+
"is-disabled": y.value,
|
|
226
|
+
"is-dragging": C.value,
|
|
227
|
+
"l-slider--vertical": t.vertical
|
|
228
|
+
}
|
|
229
|
+
]), e = B(() => ({
|
|
230
|
+
"--l-slider-height": t.vertical ? t.height : void 0
|
|
231
|
+
})), l = B(() => {
|
|
232
|
+
const a = E.value;
|
|
233
|
+
if (t.range) {
|
|
234
|
+
const n = Math.min(a[0], a[1]), s = Math.abs(a[1] - a[0]);
|
|
235
|
+
return t.vertical ? { bottom: `${n}%`, height: `${s}%` } : { left: `${n}%`, width: `${s}%` };
|
|
236
|
+
}
|
|
237
|
+
return t.vertical ? { height: `${a[0]}%` } : { width: `${a[0]}%` };
|
|
238
|
+
}), o = (a) => {
|
|
239
|
+
const n = E.value[a];
|
|
240
|
+
return t.vertical ? { bottom: `${n}%` } : { left: `${n}%` };
|
|
241
|
+
}, h = B(() => Object.entries(t.marks).map(([a, n]) => {
|
|
242
|
+
const s = parseFloat(a);
|
|
243
|
+
return {
|
|
244
|
+
position: s,
|
|
245
|
+
label: typeof n == "string" ? n : n.label,
|
|
246
|
+
style: typeof n == "string" ? {} : n.style,
|
|
247
|
+
isEndpoint: s === t.min || s === t.max
|
|
248
|
+
};
|
|
249
|
+
})), b = (a) => {
|
|
250
|
+
const n = (a - t.min) / (t.max - t.min) * 100;
|
|
251
|
+
return t.vertical ? { bottom: `${n}%` } : { left: `${n}%` };
|
|
252
|
+
};
|
|
253
|
+
return (a, n) => (w(), V("div", {
|
|
254
|
+
class: x(j.value),
|
|
255
|
+
style: L(e.value),
|
|
256
|
+
onMousedown: n[3] || (n[3] = (s) => f(s, null)),
|
|
257
|
+
onTouchstart: n[4] || (n[4] = (s) => f(s, null))
|
|
258
|
+
}, [
|
|
259
|
+
I("div", {
|
|
260
|
+
ref_key: "runwayRef",
|
|
261
|
+
ref: M,
|
|
262
|
+
class: "l-slider__runway"
|
|
263
|
+
}, [
|
|
264
|
+
I("div", {
|
|
265
|
+
class: "l-slider__bar",
|
|
266
|
+
style: L(l.value)
|
|
267
|
+
}, null, 4),
|
|
268
|
+
a.range ? (w(), V(O, { key: 0 }, U(2, (s, c) => I("div", {
|
|
269
|
+
key: c,
|
|
270
|
+
id: c === 0 ? p(g) : void 0,
|
|
271
|
+
class: "l-slider__thumb",
|
|
272
|
+
style: L(o(c)),
|
|
273
|
+
tabindex: "0",
|
|
274
|
+
role: "slider",
|
|
275
|
+
"aria-valuemin": a.min,
|
|
276
|
+
"aria-valuemax": a.max,
|
|
277
|
+
"aria-valuenow": p(v)[c],
|
|
278
|
+
"aria-disabled": p(y) ? "true" : "false",
|
|
279
|
+
"aria-label": c === 0 ? "Start" : "End",
|
|
280
|
+
onMousedown: K((A) => f(A, c), ["stop"]),
|
|
281
|
+
onTouchstart: K((A) => f(A, c), ["stop"]),
|
|
282
|
+
onKeydown: (A) => p(m).actions.handleKeyDown(A, c)
|
|
283
|
+
}, [
|
|
284
|
+
a.showTooltip ? (w(), V("div", ue, z(a.formatTooltip(p(v)[c])), 1)) : R("", !0)
|
|
285
|
+
], 44, ie)), 64)) : (w(), V("div", {
|
|
286
|
+
key: 1,
|
|
287
|
+
id: p(g),
|
|
288
|
+
class: "l-slider__thumb",
|
|
289
|
+
style: L(o(0)),
|
|
290
|
+
tabindex: "0",
|
|
291
|
+
role: "slider",
|
|
292
|
+
"aria-valuemin": a.min,
|
|
293
|
+
"aria-valuemax": a.max,
|
|
294
|
+
"aria-valuenow": p(v),
|
|
295
|
+
"aria-disabled": p(y) ? "true" : "false",
|
|
296
|
+
onMousedown: n[0] || (n[0] = K((s) => f(s, 0), ["stop"])),
|
|
297
|
+
onTouchstart: n[1] || (n[1] = K((s) => f(s, 0), ["stop"])),
|
|
298
|
+
onKeydown: n[2] || (n[2] = (s) => p(m).actions.handleKeyDown(s, 0))
|
|
299
|
+
}, [
|
|
300
|
+
a.showTooltip ? (w(), V("div", ce, z(a.formatTooltip(p(v))), 1)) : R("", !0)
|
|
301
|
+
], 44, de)),
|
|
302
|
+
h.value.length > 0 ? (w(), V("div", me, [
|
|
303
|
+
(w(!0), V(O, null, U(h.value, (s) => (w(), V("div", {
|
|
304
|
+
key: s.position,
|
|
305
|
+
class: x(["l-slider__mark-stop", { "is-endpoint": s.isEndpoint }]),
|
|
306
|
+
style: L(b(s.position))
|
|
307
|
+
}, [
|
|
308
|
+
I("div", {
|
|
309
|
+
class: "l-slider__mark-text",
|
|
310
|
+
style: L(s.style)
|
|
311
|
+
}, z(s.label), 5)
|
|
312
|
+
], 6))), 128))
|
|
313
|
+
])) : R("", !0)
|
|
314
|
+
], 512)
|
|
315
|
+
], 38));
|
|
316
|
+
}
|
|
317
|
+
}), Y = ve;
|
|
318
|
+
Y.install = (r) => {
|
|
319
|
+
r.component("LSlider", Y);
|
|
320
|
+
};
|
|
321
|
+
export {
|
|
322
|
+
Y as LSlider,
|
|
323
|
+
Y as default,
|
|
324
|
+
oe as sliderEmits,
|
|
325
|
+
se as sliderProps
|
|
326
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ExtractPropTypes, PropType } from 'vue';
|
|
2
|
+
export declare const sliderProps: {
|
|
3
|
+
readonly modelValue: {
|
|
4
|
+
readonly type: PropType<number | number[]>;
|
|
5
|
+
readonly default: 0;
|
|
6
|
+
};
|
|
7
|
+
readonly min: {
|
|
8
|
+
readonly type: NumberConstructor;
|
|
9
|
+
readonly default: 0;
|
|
10
|
+
};
|
|
11
|
+
readonly max: {
|
|
12
|
+
readonly type: NumberConstructor;
|
|
13
|
+
readonly default: 100;
|
|
14
|
+
};
|
|
15
|
+
readonly step: {
|
|
16
|
+
readonly type: NumberConstructor;
|
|
17
|
+
readonly default: 1;
|
|
18
|
+
};
|
|
19
|
+
readonly disabled: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: false;
|
|
22
|
+
};
|
|
23
|
+
readonly range: {
|
|
24
|
+
readonly type: BooleanConstructor;
|
|
25
|
+
readonly default: false;
|
|
26
|
+
};
|
|
27
|
+
readonly vertical: {
|
|
28
|
+
readonly type: BooleanConstructor;
|
|
29
|
+
readonly default: false;
|
|
30
|
+
};
|
|
31
|
+
readonly showTooltip: {
|
|
32
|
+
readonly type: BooleanConstructor;
|
|
33
|
+
readonly default: true;
|
|
34
|
+
};
|
|
35
|
+
readonly formatTooltip: {
|
|
36
|
+
readonly type: PropType<(val: number) => string | number>;
|
|
37
|
+
readonly default: (val: number) => number;
|
|
38
|
+
};
|
|
39
|
+
readonly marks: {
|
|
40
|
+
readonly type: PropType<Record<number, string | {
|
|
41
|
+
style?: any;
|
|
42
|
+
label: string;
|
|
43
|
+
}>>;
|
|
44
|
+
readonly default: () => {};
|
|
45
|
+
};
|
|
46
|
+
readonly height: {
|
|
47
|
+
readonly type: StringConstructor;
|
|
48
|
+
readonly default: "200px";
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
export type SliderProps = ExtractPropTypes<typeof sliderProps>;
|
|
52
|
+
export declare const sliderEmits: {
|
|
53
|
+
'update:modelValue': (_val: number | number[]) => boolean;
|
|
54
|
+
change: (_val: number | number[]) => boolean;
|
|
55
|
+
input: (_val: number | number[]) => boolean;
|
|
56
|
+
};
|
|
57
|
+
export type SliderEmits = typeof sliderEmits;
|