@indielayer/ui 1.0.10 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/_virtual/_plugin-vue_export-helper.js +9 -0
- package/lib/common/icons.js +18 -0
- package/lib/common/utils.d.ts +4 -0
- package/lib/common/utils.js +25 -0
- package/lib/components/alert/Alert.theme.d.ts +10 -8
- package/lib/components/alert/Alert.theme.js +41 -0
- package/lib/components/alert/Alert.vue.d.ts +22 -5
- package/lib/components/alert/Alert.vue.js +9 -0
- package/lib/components/alert/Alert.vue2.js +62 -0
- package/lib/components/alert/Alert.vue3.js +8 -0
- package/lib/components/alert/index.d.ts +3 -0
- package/lib/components/avatar/Avatar.theme.d.ts +13 -7
- package/lib/components/avatar/Avatar.theme.js +25 -0
- package/lib/components/avatar/Avatar.vue.d.ts +24 -2
- package/lib/components/avatar/Avatar.vue.js +9 -0
- package/lib/components/avatar/Avatar.vue2.js +76 -0
- package/lib/components/avatar/Avatar.vue3.js +7 -0
- package/lib/components/avatar/index.d.ts +3 -0
- package/lib/components/badge/Badge.theme.d.ts +10 -8
- package/lib/components/badge/Badge.theme.js +12 -0
- package/lib/components/badge/Badge.vue.d.ts +45 -8
- package/lib/components/badge/Badge.vue.js +94 -0
- package/lib/components/badge/Badge.vue2.js +4 -0
- package/lib/components/badge/index.d.ts +3 -0
- package/lib/components/breadcrumbs/Breadcrumbs.theme.d.ts +10 -8
- package/lib/components/breadcrumbs/Breadcrumbs.theme.js +10 -0
- package/lib/components/breadcrumbs/Breadcrumbs.vue.d.ts +19 -5
- package/lib/components/breadcrumbs/Breadcrumbs.vue.js +79 -0
- package/lib/components/breadcrumbs/Breadcrumbs.vue2.js +4 -0
- package/lib/components/breadcrumbs/index.d.ts +3 -0
- package/lib/components/button/Button.theme.d.ts +12 -9
- package/lib/components/button/Button.theme.js +138 -0
- package/lib/components/button/Button.vue.d.ts +41 -7
- package/lib/components/button/Button.vue.js +9 -0
- package/lib/components/button/Button.vue2.js +115 -0
- package/lib/components/button/Button.vue3.js +8 -0
- package/lib/components/button/ButtonGroup.theme.d.ts +12 -5
- package/lib/components/button/ButtonGroup.theme.js +8 -0
- package/lib/components/button/ButtonGroup.vue.d.ts +36 -5
- package/lib/components/button/ButtonGroup.vue.js +9 -0
- package/lib/components/button/ButtonGroup.vue2.js +54 -0
- package/lib/components/button/ButtonGroup.vue3.js +7 -0
- package/lib/components/button/index.d.ts +6 -0
- package/lib/components/card/Card.theme.d.ts +10 -7
- package/lib/components/card/Card.theme.js +8 -0
- package/lib/components/card/Card.vue.d.ts +9 -0
- package/lib/components/card/Card.vue.js +31 -0
- package/lib/components/card/Card.vue2.js +4 -0
- package/lib/components/card/index.d.ts +3 -0
- package/lib/components/checkbox/Checkbox.theme.d.ts +13 -10
- package/lib/components/checkbox/Checkbox.theme.js +52 -0
- package/lib/components/checkbox/Checkbox.vue.d.ts +35 -4
- package/lib/components/checkbox/Checkbox.vue.js +9 -0
- package/lib/components/checkbox/Checkbox.vue2.js +108 -0
- package/lib/components/checkbox/Checkbox.vue3.js +6 -0
- package/lib/components/checkbox/index.d.ts +3 -0
- package/lib/components/collapse/Collapse.theme.d.ts +10 -9
- package/lib/components/collapse/Collapse.theme.js +10 -0
- package/lib/components/collapse/Collapse.vue.d.ts +17 -1
- package/lib/components/collapse/Collapse.vue.js +132 -0
- package/lib/components/collapse/Collapse.vue2.js +4 -0
- package/lib/components/collapse/index.d.ts +3 -0
- package/lib/components/container/Container.theme.d.ts +10 -6
- package/lib/components/container/Container.theme.js +8 -0
- package/lib/components/container/Container.vue.d.ts +8 -0
- package/lib/components/container/Container.vue.js +30 -0
- package/lib/components/container/Container.vue2.js +4 -0
- package/lib/components/container/index.d.ts +3 -0
- package/lib/components/divider/Divider.theme.d.ts +10 -9
- package/lib/components/divider/Divider.theme.js +10 -0
- package/lib/components/divider/Divider.vue.d.ts +6 -0
- package/lib/components/divider/Divider.vue.js +53 -0
- package/lib/components/divider/Divider.vue2.js +4 -0
- package/lib/components/divider/index.d.ts +3 -0
- package/lib/components/drawer/Drawer.theme.d.ts +10 -7
- package/lib/components/drawer/Drawer.theme.js +9 -0
- package/lib/components/drawer/Drawer.vue.d.ts +39 -12
- package/lib/components/drawer/Drawer.vue.js +171 -0
- package/lib/components/drawer/Drawer.vue2.js +4 -0
- package/lib/components/drawer/index.d.ts +3 -0
- package/lib/components/form/Form.theme.d.ts +10 -6
- package/lib/components/form/Form.theme.js +8 -0
- package/lib/components/form/Form.vue.d.ts +25 -4
- package/lib/components/form/Form.vue.js +79 -0
- package/lib/components/form/Form.vue2.js +4 -0
- package/lib/components/form/index.d.ts +3 -0
- package/lib/components/helpers/InputError.js +18 -0
- package/lib/components/icon/Icon.theme.d.ts +10 -7
- package/lib/components/icon/Icon.theme.js +11 -0
- package/lib/components/icon/Icon.vue.d.ts +21 -3
- package/lib/components/icon/Icon.vue.js +74 -0
- package/lib/components/icon/Icon.vue2.js +4 -0
- package/lib/components/icon/index.d.ts +3 -0
- package/lib/components/image/Image.theme.d.ts +10 -6
- package/lib/components/image/Image.theme.js +8 -0
- package/lib/components/image/Image.vue.d.ts +5 -0
- package/lib/components/image/Image.vue.js +32 -0
- package/lib/components/image/Image.vue2.js +4 -0
- package/lib/components/image/index.d.ts +3 -0
- package/lib/components/index.d.ts +35 -45
- package/lib/components/index.js +92 -0
- package/lib/components/input/Input.theme.d.ts +12 -10
- package/lib/components/input/Input.theme.js +21 -0
- package/lib/components/input/Input.vue.d.ts +70 -19
- package/lib/components/input/Input.vue.js +140 -0
- package/lib/components/input/Input.vue2.js +4 -0
- package/lib/components/input/index.d.ts +3 -0
- package/lib/components/link/Link.theme.d.ts +10 -8
- package/lib/components/link/Link.theme.js +25 -0
- package/lib/components/link/Link.vue.d.ts +17 -1
- package/lib/components/link/Link.vue.js +9 -0
- package/lib/components/link/Link.vue2.js +48 -0
- package/lib/components/link/Link.vue3.js +8 -0
- package/lib/components/link/index.d.ts +3 -0
- package/lib/components/menu/Menu.theme.d.ts +10 -6
- package/lib/components/menu/Menu.theme.js +8 -0
- package/lib/components/menu/Menu.vue.d.ts +61 -8
- package/lib/components/menu/Menu.vue.js +133 -0
- package/lib/components/menu/Menu.vue2.js +4 -0
- package/lib/components/menu/MenuItem.theme.d.ts +13 -7
- package/lib/components/menu/MenuItem.theme.js +86 -0
- package/lib/components/menu/MenuItem.vue.d.ts +55 -15
- package/lib/components/menu/MenuItem.vue.js +9 -0
- package/lib/components/menu/MenuItem.vue2.js +143 -0
- package/lib/components/menu/MenuItem.vue3.js +7 -0
- package/lib/components/menu/index.d.ts +6 -0
- package/lib/components/modal/Modal.theme.d.ts +10 -13
- package/lib/components/modal/Modal.theme.js +17 -0
- package/lib/components/modal/Modal.vue.d.ts +13 -1
- package/lib/components/modal/Modal.vue.js +127 -0
- package/lib/components/modal/Modal.vue2.js +4 -0
- package/lib/components/modal/index.d.ts +3 -0
- package/lib/components/notifications/Notifications.theme.d.ts +10 -8
- package/lib/components/notifications/Notifications.theme.js +10 -0
- package/lib/components/notifications/Notifications.vue.d.ts +46 -13
- package/lib/components/notifications/Notifications.vue.js +234 -0
- package/lib/components/notifications/Notifications.vue2.js +4 -0
- package/lib/components/notifications/index.d.ts +3 -0
- package/lib/components/pagination/Pagination.theme.d.ts +10 -9
- package/lib/components/pagination/Pagination.theme.js +13 -0
- package/lib/components/pagination/Pagination.vue.d.ts +27 -4
- package/lib/components/pagination/Pagination.vue.js +131 -0
- package/lib/components/pagination/Pagination.vue2.js +4 -0
- package/lib/components/pagination/PaginationItem.theme.d.ts +10 -7
- package/lib/components/pagination/PaginationItem.theme.js +8 -0
- package/lib/components/pagination/PaginationItem.vue.d.ts +16 -1
- package/lib/components/pagination/PaginationItem.vue.js +48 -0
- package/lib/components/pagination/PaginationItem.vue2.js +4 -0
- package/lib/components/pagination/index.d.ts +6 -0
- package/lib/components/popover/Popover.theme.d.ts +10 -7
- package/lib/components/popover/Popover.theme.js +9 -0
- package/lib/components/popover/Popover.vue.d.ts +40 -10
- package/lib/components/popover/Popover.vue.js +9 -0
- package/lib/components/popover/Popover.vue2.js +106 -0
- package/lib/components/popover/Popover.vue3.js +15 -0
- package/lib/components/popover/PopoverContainer.theme.d.ts +10 -6
- package/lib/components/popover/PopoverContainer.theme.js +8 -0
- package/lib/components/popover/PopoverContainer.vue.d.ts +8 -0
- package/lib/components/popover/PopoverContainer.vue.js +30 -0
- package/lib/components/popover/PopoverContainer.vue2.js +4 -0
- package/lib/components/popover/index.d.ts +6 -0
- package/lib/components/progress/Progress.theme.d.ts +10 -12
- package/lib/components/progress/Progress.theme.js +18 -0
- package/lib/components/progress/Progress.vue.d.ts +19 -0
- package/lib/components/progress/Progress.vue.js +51 -0
- package/lib/components/progress/Progress.vue2.js +4 -0
- package/lib/components/progress/index.d.ts +3 -0
- package/lib/components/radio/Radio.theme.d.ts +13 -11
- package/lib/components/radio/Radio.theme.js +67 -0
- package/lib/components/radio/Radio.vue.d.ts +38 -6
- package/lib/components/radio/Radio.vue.js +9 -0
- package/lib/components/radio/Radio.vue2.js +117 -0
- package/lib/components/radio/Radio.vue3.js +10 -0
- package/lib/components/radio/index.d.ts +3 -0
- package/lib/components/scroll/Scroll.theme.d.ts +10 -6
- package/lib/components/scroll/Scroll.theme.js +8 -0
- package/lib/components/scroll/Scroll.vue.d.ts +12 -1
- package/lib/components/scroll/Scroll.vue.js +9 -0
- package/lib/components/scroll/Scroll.vue2.js +64 -0
- package/lib/components/scroll/Scroll.vue3.js +17 -0
- package/lib/components/scroll/index.d.ts +3 -0
- package/lib/components/select/Select.theme.d.ts +13 -12
- package/lib/components/select/Select.theme.js +23 -0
- package/lib/components/select/Select.vue.d.ts +33 -4
- package/lib/components/select/Select.vue.js +269 -0
- package/lib/components/select/Select.vue2.js +4 -0
- package/lib/components/select/index.d.ts +3 -0
- package/lib/components/skeleton/Skeleton.theme.d.ts +10 -6
- package/lib/components/skeleton/Skeleton.theme.js +8 -0
- package/lib/components/skeleton/Skeleton.vue.d.ts +8 -0
- package/lib/components/skeleton/Skeleton.vue.js +30 -0
- package/lib/components/skeleton/Skeleton.vue2.js +4 -0
- package/lib/components/skeleton/index.d.ts +3 -0
- package/lib/components/slider/Slider.theme.d.ts +10 -10
- package/lib/components/slider/Slider.theme.js +20 -0
- package/lib/components/slider/Slider.vue.d.ts +40 -4
- package/lib/components/slider/Slider.vue.js +148 -0
- package/lib/components/slider/Slider.vue2.js +4 -0
- package/lib/components/slider/index.d.ts +2 -0
- package/lib/components/spacer/Spacer.js +12 -0
- package/lib/components/spacer/index.d.ts +1 -0
- package/lib/components/spinner/Spinner.vue.d.ts +13 -0
- package/lib/components/spinner/Spinner.vue.js +28 -0
- package/lib/components/spinner/Spinner.vue2.js +4 -0
- package/lib/components/spinner/index.d.ts +2 -0
- package/lib/components/tab/Tab.theme.d.ts +12 -9
- package/lib/components/tab/Tab.theme.js +13 -0
- package/lib/components/tab/Tab.vue.d.ts +31 -9
- package/lib/components/tab/Tab.vue.js +129 -0
- package/lib/components/tab/Tab.vue2.js +4 -0
- package/lib/components/tab/TabGroup.theme.d.ts +10 -10
- package/lib/components/tab/TabGroup.theme.js +27 -0
- package/lib/components/tab/TabGroup.vue.d.ts +53 -8
- package/lib/components/tab/TabGroup.vue.js +133 -0
- package/lib/components/tab/TabGroup.vue2.js +4 -0
- package/lib/components/tab/index.d.ts +4 -0
- package/lib/components/table/Table.theme.d.ts +10 -8
- package/lib/components/table/Table.theme.js +12 -0
- package/lib/components/table/Table.vue.d.ts +268 -57
- package/lib/components/table/Table.vue.js +147 -0
- package/lib/components/table/Table.vue2.js +4 -0
- package/lib/components/table/TableBody.js +15 -0
- package/lib/components/table/TableCell.theme.d.ts +10 -7
- package/lib/components/table/TableCell.theme.js +11 -0
- package/lib/components/table/TableCell.vue.d.ts +27 -5
- package/lib/components/table/TableCell.vue.js +43 -0
- package/lib/components/table/TableCell.vue2.js +4 -0
- package/lib/components/table/TableHead.js +19 -0
- package/lib/components/table/TableHeader.vue.d.ts +26 -8
- package/lib/components/table/TableHeader.vue.js +78 -0
- package/lib/components/table/TableHeader.vue2.js +4 -0
- package/lib/components/table/TableRow.vue.js +32 -0
- package/lib/components/table/TableRow.vue2.js +4 -0
- package/lib/components/table/index.d.ts +9 -0
- package/lib/components/tag/Tag.theme.d.ts +10 -9
- package/lib/components/tag/Tag.theme.js +23 -0
- package/lib/components/tag/Tag.vue.d.ts +23 -3
- package/lib/components/tag/Tag.vue.js +61 -0
- package/lib/components/tag/Tag.vue2.js +4 -0
- package/lib/components/tag/index.d.ts +2 -0
- package/lib/components/textarea/Textarea.theme.d.ts +13 -9
- package/lib/components/textarea/Textarea.theme.js +16 -0
- package/lib/components/textarea/Textarea.vue.d.ts +56 -14
- package/lib/components/textarea/Textarea.vue.js +110 -0
- package/lib/components/textarea/Textarea.vue2.js +4 -0
- package/lib/components/textarea/index.d.ts +2 -0
- package/lib/components/toggle/Toggle.theme.d.ts +10 -11
- package/lib/components/toggle/Toggle.theme.js +29 -0
- package/lib/components/toggle/Toggle.vue.d.ts +36 -4
- package/lib/components/toggle/Toggle.vue.js +110 -0
- package/lib/components/toggle/Toggle.vue2.js +4 -0
- package/lib/components/toggle/index.d.ts +2 -0
- package/lib/components/tooltip/Tooltip.vue.d.ts +3 -0
- package/lib/components/tooltip/Tooltip.vue.js +27 -0
- package/lib/components/tooltip/Tooltip.vue2.js +4 -0
- package/lib/components/tooltip/index.d.ts +2 -0
- package/lib/composables/colors-utils.js +19 -0
- package/lib/composables/colors.d.ts +2 -1
- package/lib/composables/colors.js +52 -0
- package/lib/composables/common.d.ts +1 -1
- package/lib/composables/common.js +17 -0
- package/lib/composables/css.js +26 -0
- package/lib/composables/inputtable.d.ts +4 -4
- package/lib/composables/inputtable.js +78 -0
- package/lib/composables/interactive.js +17 -0
- package/lib/composables/keys.d.ts +6 -3
- package/lib/composables/keys.js +10 -0
- package/lib/composables/notifications.js +9 -0
- package/lib/composables/theme.d.ts +13 -7
- package/lib/composables/theme.js +59 -0
- package/lib/create.js +19 -0
- package/lib/index.js +121 -0
- package/lib/index.umd.js +1 -0
- package/lib/install.js +10 -0
- package/lib/node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.4/node_modules/@vueuse/core/index.js +379 -0
- package/lib/node_modules/.pnpm/@vueuse_shared@10.2.0_vue@3.3.4/node_modules/@vueuse/shared/index.js +90 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +4 -0
- package/package.json +10 -9
- package/src/common/utils.ts +25 -2
- package/src/components/alert/Alert.theme.ts +15 -6
- package/src/components/alert/Alert.vue +24 -12
- package/src/components/alert/index.ts +3 -0
- package/src/components/avatar/Avatar.theme.ts +16 -4
- package/src/components/avatar/Avatar.vue +18 -14
- package/src/components/avatar/index.ts +3 -0
- package/src/components/badge/Badge.theme.ts +13 -3
- package/src/components/badge/Badge.vue +30 -15
- package/src/components/badge/index.ts +3 -0
- package/src/components/breadcrumbs/Breadcrumbs.theme.ts +12 -2
- package/src/components/breadcrumbs/Breadcrumbs.vue +24 -21
- package/src/components/breadcrumbs/index.ts +3 -0
- package/src/components/button/Button.theme.ts +18 -8
- package/src/components/button/Button.vue +28 -18
- package/src/components/button/ButtonGroup.theme.ts +14 -1
- package/src/components/button/ButtonGroup.vue +29 -15
- package/src/components/button/index.ts +7 -0
- package/src/components/card/Card.theme.ts +13 -3
- package/src/components/card/Card.vue +12 -7
- package/src/components/card/index.ts +3 -0
- package/src/components/checkbox/Checkbox.theme.ts +19 -7
- package/src/components/checkbox/Checkbox.vue +20 -11
- package/src/components/checkbox/index.ts +3 -0
- package/src/components/collapse/Collapse.theme.ts +13 -3
- package/src/components/collapse/Collapse.vue +16 -12
- package/src/components/collapse/index.ts +3 -0
- package/src/components/container/Container.theme.ts +12 -2
- package/src/components/container/Container.vue +11 -6
- package/src/components/container/index.ts +3 -0
- package/src/components/divider/Divider.theme.ts +13 -3
- package/src/components/divider/Divider.vue +9 -4
- package/src/components/divider/index.ts +3 -0
- package/src/components/drawer/Drawer.theme.ts +12 -2
- package/src/components/drawer/Drawer.vue +27 -18
- package/src/components/drawer/index.ts +3 -0
- package/src/components/form/Form.theme.ts +12 -2
- package/src/components/form/Form.vue +38 -28
- package/src/components/form/index.ts +3 -0
- package/src/components/helpers/InputError.tsx +2 -2
- package/src/components/icon/Icon.theme.ts +13 -3
- package/src/components/icon/Icon.vue +24 -15
- package/src/components/icon/__tests__/Icon.spec.ts +5 -1
- package/src/components/icon/index.ts +3 -0
- package/src/components/image/Image.theme.ts +12 -2
- package/src/components/image/Image.vue +8 -4
- package/src/components/image/index.ts +3 -0
- package/src/components/index.ts +35 -45
- package/src/components/input/Input.theme.ts +17 -6
- package/src/components/input/Input.vue +31 -20
- package/src/components/input/index.ts +3 -0
- package/src/components/link/Link.theme.ts +13 -3
- package/src/components/link/Link.vue +16 -11
- package/src/components/link/index.ts +3 -0
- package/src/components/menu/Menu.theme.ts +12 -2
- package/src/components/menu/Menu.vue +59 -23
- package/src/components/menu/MenuItem.theme.ts +17 -5
- package/src/components/menu/MenuItem.vue +56 -48
- package/src/components/menu/index.ts +7 -0
- package/src/components/modal/Modal.theme.ts +13 -3
- package/src/components/modal/Modal.vue +22 -11
- package/src/components/modal/index.ts +3 -0
- package/src/components/notifications/Notifications.theme.ts +12 -2
- package/src/components/notifications/Notifications.vue +53 -49
- package/src/components/notifications/index.ts +9 -0
- package/src/components/pagination/Pagination.theme.ts +15 -5
- package/src/components/pagination/Pagination.vue +24 -18
- package/src/components/pagination/PaginationItem.theme.ts +13 -3
- package/src/components/pagination/PaginationItem.vue +14 -10
- package/src/components/pagination/index.ts +7 -0
- package/src/components/popover/Popover.theme.ts +12 -2
- package/src/components/popover/Popover.vue +27 -21
- package/src/components/popover/PopoverContainer.theme.ts +12 -2
- package/src/components/popover/PopoverContainer.vue +11 -6
- package/src/components/popover/index.ts +7 -0
- package/src/components/progress/Progress.theme.ts +14 -4
- package/src/components/progress/Progress.vue +16 -16
- package/src/components/progress/index.ts +3 -0
- package/src/components/radio/Radio.theme.ts +19 -7
- package/src/components/radio/Radio.vue +21 -12
- package/src/components/radio/index.ts +3 -0
- package/src/components/scroll/Scroll.theme.ts +12 -2
- package/src/components/scroll/Scroll.vue +14 -10
- package/src/components/scroll/index.ts +3 -0
- package/src/components/select/Select.theme.ts +20 -6
- package/src/components/select/Select.vue +28 -19
- package/src/components/select/index.ts +3 -0
- package/src/components/skeleton/Skeleton.theme.ts +12 -2
- package/src/components/skeleton/Skeleton.vue +11 -6
- package/src/components/skeleton/index.ts +3 -0
- package/src/components/slider/Slider.theme.ts +14 -4
- package/src/components/slider/Slider.vue +24 -16
- package/src/components/slider/index.ts +2 -0
- package/src/components/spacer/index.ts +1 -0
- package/src/components/spinner/Spinner.vue +18 -8
- package/src/components/spinner/index.ts +2 -0
- package/src/components/tab/Tab.theme.ts +15 -3
- package/src/components/tab/Tab.vue +85 -68
- package/src/components/tab/TabGroup.theme.ts +15 -5
- package/src/components/tab/TabGroup.vue +67 -22
- package/src/components/tab/index.ts +5 -0
- package/src/components/table/Table.theme.ts +14 -4
- package/src/components/table/Table.vue +41 -31
- package/src/components/table/TableCell.theme.ts +13 -3
- package/src/components/table/TableCell.vue +22 -16
- package/src/components/table/TableHeader.vue +20 -17
- package/src/components/table/index.ts +10 -0
- package/src/components/tag/Tag.theme.ts +14 -4
- package/src/components/tag/Tag.vue +22 -13
- package/src/components/tag/index.ts +2 -0
- package/src/components/textarea/Textarea.theme.ts +18 -30
- package/src/components/textarea/Textarea.vue +28 -19
- package/src/components/textarea/index.ts +2 -0
- package/src/components/toggle/Toggle.theme.ts +16 -6
- package/src/components/toggle/Toggle.vue +21 -12
- package/src/components/toggle/index.ts +2 -0
- package/src/components/tooltip/Tooltip.vue +5 -0
- package/src/components/tooltip/index.ts +2 -0
- package/src/composables/colors-utils.ts +1 -78
- package/src/composables/colors.ts +6 -4
- package/src/composables/common.ts +1 -1
- package/src/composables/inputtable.ts +4 -4
- package/src/composables/keys.ts +6 -3
- package/src/composables/theme.ts +26 -23
- package/src/create.ts +1 -2
- package/src/version.ts +1 -1
- package/volar.d.ts +1 -1
- package/lib/components/tooltip/Tooltip.theme.d.ts +0 -11
- package/lib/index.cjs.js +0 -1
- package/lib/index.es.js +0 -5187
- package/src/components/tooltip/Tooltip.theme.ts +0 -51
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { defineComponent as T, ref as f, watch as P, openBlock as i, createBlock as v, resolveDynamicComponent as V, normalizeStyle as z, unref as s, normalizeClass as l, withCtx as m, createElementVNode as r, renderSlot as d, createElementBlock as h, createCommentVNode as y, createVNode as A, Transition as D, withDirectives as H, vShow as I } from "vue";
|
|
2
|
+
import { useTheme as M } from "../../composables/theme.js";
|
|
3
|
+
import { useColors as X } from "../../composables/colors.js";
|
|
4
|
+
import j from "../icon/Icon.vue.js";
|
|
5
|
+
import q from "./Collapse.theme.js";
|
|
6
|
+
const F = { class: "flex-1 overflow-hidden" }, G = {
|
|
7
|
+
key: 1,
|
|
8
|
+
viewBox: "0 0 24 24",
|
|
9
|
+
stroke: "currentColor",
|
|
10
|
+
fill: "none",
|
|
11
|
+
role: "presentation",
|
|
12
|
+
class: "stroke-2 w-5 h-5"
|
|
13
|
+
}, J = /* @__PURE__ */ r("path", { d: "M19 9l-7 7-7-7" }, null, -1), K = [
|
|
14
|
+
J
|
|
15
|
+
], O = {
|
|
16
|
+
...X.props(),
|
|
17
|
+
tag: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "div"
|
|
20
|
+
},
|
|
21
|
+
disabled: Boolean,
|
|
22
|
+
expanded: Boolean,
|
|
23
|
+
showIcon: Boolean,
|
|
24
|
+
icon: String
|
|
25
|
+
}, Q = { name: "XCollapse" }, ee = /* @__PURE__ */ T({
|
|
26
|
+
...Q,
|
|
27
|
+
props: O,
|
|
28
|
+
emits: ["expand"],
|
|
29
|
+
setup(g, { expose: x, emit: k }) {
|
|
30
|
+
const a = g, t = f(!a.expanded), o = f(!0);
|
|
31
|
+
P(() => a.expanded, () => {
|
|
32
|
+
t.value = !a.expanded;
|
|
33
|
+
});
|
|
34
|
+
function w(e) {
|
|
35
|
+
o.value && (e.style.height = "0px");
|
|
36
|
+
}
|
|
37
|
+
function _(e, n) {
|
|
38
|
+
o.value ? (e.addEventListener("transitionend", n), setTimeout(() => {
|
|
39
|
+
e.style.height = `${e.scrollHeight}px`;
|
|
40
|
+
}, 1)) : n();
|
|
41
|
+
}
|
|
42
|
+
function B(e) {
|
|
43
|
+
o.value ? e.style.removeProperty("height") : o.value = !0;
|
|
44
|
+
}
|
|
45
|
+
function C(e) {
|
|
46
|
+
o.value && (e.style.height = `${e.scrollHeight}px`);
|
|
47
|
+
}
|
|
48
|
+
function E(e, n) {
|
|
49
|
+
o.value ? (e.addEventListener("transitionend", n), setTimeout(() => {
|
|
50
|
+
e.style.height = "0px";
|
|
51
|
+
}, 1)) : n();
|
|
52
|
+
}
|
|
53
|
+
function $(e) {
|
|
54
|
+
o.value ? e.style.removeProperty("height") : o.value = !0;
|
|
55
|
+
}
|
|
56
|
+
function c(e = !0) {
|
|
57
|
+
o.value = e, t.value = !1;
|
|
58
|
+
}
|
|
59
|
+
function b(e = !0) {
|
|
60
|
+
o.value = e, t.value = !0;
|
|
61
|
+
}
|
|
62
|
+
function p() {
|
|
63
|
+
a.disabled || (t.value = !t.value);
|
|
64
|
+
}
|
|
65
|
+
function L(e = !0) {
|
|
66
|
+
c(e), k("expand");
|
|
67
|
+
}
|
|
68
|
+
const { styles: S, classes: u, className: N } = M("collapse", q, a);
|
|
69
|
+
return x({ toggle: p, open: c, close: b }), (e, n) => (i(), v(V(e.tag), {
|
|
70
|
+
style: z(s(S)),
|
|
71
|
+
class: l(s(N)),
|
|
72
|
+
"aria-disabled": e.disabled,
|
|
73
|
+
"aria-expanded": t.value ? "false" : "true"
|
|
74
|
+
}, {
|
|
75
|
+
default: m(() => [
|
|
76
|
+
r("div", {
|
|
77
|
+
class: l(s(u).wrapper),
|
|
78
|
+
onClick: p
|
|
79
|
+
}, [
|
|
80
|
+
r("div", F, [
|
|
81
|
+
d(e.$slots, "default", { collapsed: t.value })
|
|
82
|
+
]),
|
|
83
|
+
e.showIcon ? (i(), h("div", {
|
|
84
|
+
key: 0,
|
|
85
|
+
class: l(s(u).icon)
|
|
86
|
+
}, [
|
|
87
|
+
r("span", {
|
|
88
|
+
class: l(["flex transform transition-transform duration-150", [
|
|
89
|
+
{
|
|
90
|
+
"rotate-180": !t.value,
|
|
91
|
+
"text-gray-300": e.disabled
|
|
92
|
+
}
|
|
93
|
+
]])
|
|
94
|
+
}, [
|
|
95
|
+
e.icon ? (i(), v(j, {
|
|
96
|
+
key: 0,
|
|
97
|
+
icon: e.icon
|
|
98
|
+
}, null, 8, ["icon"])) : (i(), h("svg", G, K))
|
|
99
|
+
], 2)
|
|
100
|
+
], 2)) : y("", !0)
|
|
101
|
+
], 2),
|
|
102
|
+
e.$slots.summary ? d(e.$slots, "summary", { key: 0 }) : y("", !0),
|
|
103
|
+
A(D, {
|
|
104
|
+
onBeforeEnter: w,
|
|
105
|
+
onEnter: _,
|
|
106
|
+
onAfterEnter: B,
|
|
107
|
+
onBeforeLeave: C,
|
|
108
|
+
onLeave: E,
|
|
109
|
+
onAfterLeave: $
|
|
110
|
+
}, {
|
|
111
|
+
default: m(() => [
|
|
112
|
+
H(r("div", {
|
|
113
|
+
class: l(s(u).content)
|
|
114
|
+
}, [
|
|
115
|
+
d(e.$slots, "content", {
|
|
116
|
+
expand: L,
|
|
117
|
+
collapsed: t.value
|
|
118
|
+
})
|
|
119
|
+
], 2), [
|
|
120
|
+
[I, !t.value]
|
|
121
|
+
])
|
|
122
|
+
]),
|
|
123
|
+
_: 3
|
|
124
|
+
})
|
|
125
|
+
]),
|
|
126
|
+
_: 3
|
|
127
|
+
}, 8, ["style", "class", "aria-disabled", "aria-expanded"]));
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
export {
|
|
131
|
+
ee as default
|
|
132
|
+
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { ContainerProps } from './Container.vue';
|
|
3
|
+
type InternalClasses = 'wrapper';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<ContainerProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface ContainerTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<ContainerProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
declare const containerProps: {
|
|
3
|
+
tag: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export type ContainerProps = ExtractPublicPropTypes<typeof containerProps>;
|
|
1
9
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
10
|
tag: {
|
|
3
11
|
type: StringConstructor;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as l, openBlock as c, createBlock as m, resolveDynamicComponent as p, normalizeStyle as i, unref as e, normalizeClass as f, withCtx as u, renderSlot as d } from "vue";
|
|
2
|
+
import { useTheme as _ } from "../../composables/theme.js";
|
|
3
|
+
import y from "./Container.theme.js";
|
|
4
|
+
const C = {
|
|
5
|
+
tag: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "div"
|
|
8
|
+
}
|
|
9
|
+
}, h = { name: "XContainer" }, w = /* @__PURE__ */ l({
|
|
10
|
+
...h,
|
|
11
|
+
props: C,
|
|
12
|
+
setup(o) {
|
|
13
|
+
const s = o, { styles: n, classes: r, className: a } = _("container", y, s);
|
|
14
|
+
return (t, g) => (c(), m(p(t.tag), {
|
|
15
|
+
style: i(e(n)),
|
|
16
|
+
class: f([
|
|
17
|
+
e(a),
|
|
18
|
+
e(r).wrapper
|
|
19
|
+
])
|
|
20
|
+
}, {
|
|
21
|
+
default: u(() => [
|
|
22
|
+
d(t.$slots, "default")
|
|
23
|
+
]),
|
|
24
|
+
_: 3
|
|
25
|
+
}, 8, ["style", "class"]));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
w as default
|
|
30
|
+
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { DividerProps } from './Divider.vue';
|
|
3
|
+
type InternalClasses = 'wrapper' | 'label' | 'line';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<DividerProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface DividerTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<DividerProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: ({ props: e }) => `flex justify-center items-center ${e.vertical ? "h-full flex-col" : "w-full"}`,
|
|
4
|
+
label: "font-medium text-sm text-gray-600 dark:text-gray-300",
|
|
5
|
+
line: "bg-gray-200 dark:bg-slate-700 flex-grow"
|
|
6
|
+
}
|
|
7
|
+
}, l = t;
|
|
8
|
+
export {
|
|
9
|
+
l as default
|
|
10
|
+
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
declare const dividerProps: {
|
|
3
|
+
label: StringConstructor;
|
|
4
|
+
vertical: BooleanConstructor;
|
|
5
|
+
};
|
|
6
|
+
export type DividerProps = ExtractPublicPropTypes<typeof dividerProps>;
|
|
1
7
|
declare const _default: import("vue").DefineComponent<{
|
|
2
8
|
label: StringConstructor;
|
|
3
9
|
vertical: BooleanConstructor;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { defineComponent as p, openBlock as o, createElementBlock as s, normalizeStyle as r, unref as t, normalizeClass as a, createElementVNode as i, toDisplayString as u, createCommentVNode as v } from "vue";
|
|
2
|
+
import { useTheme as h } from "../../composables/theme.js";
|
|
3
|
+
import y from "./Divider.theme.js";
|
|
4
|
+
const f = ["textContent"], g = {
|
|
5
|
+
label: String,
|
|
6
|
+
vertical: Boolean
|
|
7
|
+
}, C = { name: "XDivider" }, B = /* @__PURE__ */ p({
|
|
8
|
+
...C,
|
|
9
|
+
props: g,
|
|
10
|
+
setup(n) {
|
|
11
|
+
const m = n, { styles: c, classes: l, className: d } = h("divider", y, m);
|
|
12
|
+
return (e, b) => (o(), s("div", {
|
|
13
|
+
style: r(t(c)),
|
|
14
|
+
class: a([
|
|
15
|
+
t(d),
|
|
16
|
+
t(l).wrapper
|
|
17
|
+
])
|
|
18
|
+
}, [
|
|
19
|
+
i("div", {
|
|
20
|
+
class: a(t(l).line),
|
|
21
|
+
style: r([
|
|
22
|
+
{
|
|
23
|
+
width: e.vertical ? "1px" : "auto",
|
|
24
|
+
height: e.vertical ? "auto" : "1px"
|
|
25
|
+
}
|
|
26
|
+
])
|
|
27
|
+
}, null, 6),
|
|
28
|
+
e.label ? (o(), s("div", {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: a(["font-medium text-sm text-gray-600 dark:text-gray-300", [
|
|
31
|
+
t(l).label,
|
|
32
|
+
{
|
|
33
|
+
"my-2": e.vertical,
|
|
34
|
+
"mx-4": !e.vertical
|
|
35
|
+
}
|
|
36
|
+
]]),
|
|
37
|
+
textContent: u(e.label)
|
|
38
|
+
}, null, 10, f)) : v("", !0),
|
|
39
|
+
i("div", {
|
|
40
|
+
class: a(t(l).line),
|
|
41
|
+
style: r([
|
|
42
|
+
{
|
|
43
|
+
width: e.vertical ? "1px" : "auto",
|
|
44
|
+
height: e.vertical ? "auto" : "1px"
|
|
45
|
+
}
|
|
46
|
+
])
|
|
47
|
+
}, null, 6)
|
|
48
|
+
], 6));
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
export {
|
|
52
|
+
B as default
|
|
53
|
+
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { DrawerProps } from './Drawer.vue';
|
|
3
|
+
type InternalClasses = 'wrapper' | 'backdrop';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<DrawerProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface DrawerTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<DrawerProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|
|
@@ -1,8 +1,35 @@
|
|
|
1
|
-
import { type PropType } from 'vue';
|
|
1
|
+
import { type PropType, type ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
declare const drawerPosition: readonly ["left", "right", "top", "bottom"];
|
|
3
|
+
declare const drawerProps: {
|
|
4
|
+
modelValue: BooleanConstructor;
|
|
5
|
+
position: {
|
|
6
|
+
type: PropType<"left" | "right" | "top" | "bottom">;
|
|
7
|
+
default: string;
|
|
8
|
+
};
|
|
9
|
+
teleportTo: {
|
|
10
|
+
type: PropType<string | HTMLElement>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
width: {
|
|
14
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
15
|
+
default: number;
|
|
16
|
+
};
|
|
17
|
+
height: {
|
|
18
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
19
|
+
default: number;
|
|
20
|
+
};
|
|
21
|
+
breakpoint: (StringConstructor | NumberConstructor)[];
|
|
22
|
+
backdrop: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type DrawerPosition = typeof drawerPosition[number];
|
|
28
|
+
export type DrawerProps = ExtractPublicPropTypes<typeof drawerProps>;
|
|
2
29
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
30
|
modelValue: BooleanConstructor;
|
|
4
31
|
position: {
|
|
5
|
-
type: PropType<"
|
|
32
|
+
type: PropType<"left" | "right" | "top" | "bottom">;
|
|
6
33
|
default: string;
|
|
7
34
|
};
|
|
8
35
|
teleportTo: {
|
|
@@ -10,14 +37,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
10
37
|
default: string;
|
|
11
38
|
};
|
|
12
39
|
width: {
|
|
13
|
-
type: (
|
|
40
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
14
41
|
default: number;
|
|
15
42
|
};
|
|
16
43
|
height: {
|
|
17
|
-
type: (
|
|
44
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
18
45
|
default: number;
|
|
19
46
|
};
|
|
20
|
-
breakpoint: (
|
|
47
|
+
breakpoint: (StringConstructor | NumberConstructor)[];
|
|
21
48
|
backdrop: {
|
|
22
49
|
type: BooleanConstructor;
|
|
23
50
|
default: boolean;
|
|
@@ -28,7 +55,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
28
55
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
29
56
|
modelValue: BooleanConstructor;
|
|
30
57
|
position: {
|
|
31
|
-
type: PropType<"
|
|
58
|
+
type: PropType<"left" | "right" | "top" | "bottom">;
|
|
32
59
|
default: string;
|
|
33
60
|
};
|
|
34
61
|
teleportTo: {
|
|
@@ -36,14 +63,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
36
63
|
default: string;
|
|
37
64
|
};
|
|
38
65
|
width: {
|
|
39
|
-
type: (
|
|
66
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
40
67
|
default: number;
|
|
41
68
|
};
|
|
42
69
|
height: {
|
|
43
|
-
type: (
|
|
70
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
44
71
|
default: number;
|
|
45
72
|
};
|
|
46
|
-
breakpoint: (
|
|
73
|
+
breakpoint: (StringConstructor | NumberConstructor)[];
|
|
47
74
|
backdrop: {
|
|
48
75
|
type: BooleanConstructor;
|
|
49
76
|
default: boolean;
|
|
@@ -51,12 +78,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
51
78
|
}>> & {
|
|
52
79
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
53
80
|
}, {
|
|
81
|
+
modelValue: boolean;
|
|
54
82
|
height: string | number;
|
|
55
83
|
width: string | number;
|
|
56
|
-
position: "
|
|
57
|
-
modelValue: boolean;
|
|
58
|
-
teleportTo: string | HTMLElement;
|
|
84
|
+
position: "left" | "right" | "top" | "bottom";
|
|
59
85
|
backdrop: boolean;
|
|
86
|
+
teleportTo: string | HTMLElement;
|
|
60
87
|
}, {}>, {
|
|
61
88
|
header?(_: {}): any;
|
|
62
89
|
default?(_: {}): any;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { defineComponent as P, ref as a, watchEffect as X, watch as j, computed as v, onMounted as K, openBlock as y, createBlock as M, Teleport as O, createVNode as w, Transition as q, withCtx as g, withDirectives as F, createElementVNode as k, normalizeClass as $, unref as n, createElementBlock as G, createCommentVNode as x, normalizeStyle as H, renderSlot as f, vShow as I } from "vue";
|
|
2
|
+
import { useBreakpoints as J, breakpointsTailwind as Q, useEventListener as S, useSwipe as U } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.4/node_modules/@vueuse/core/index.js";
|
|
3
|
+
import { useTheme as W } from "../../composables/theme.js";
|
|
4
|
+
import Y from "../scroll/Scroll.vue.js";
|
|
5
|
+
import Z from "./Drawer.theme.js";
|
|
6
|
+
const ee = {
|
|
7
|
+
key: 0,
|
|
8
|
+
ref: "swipeRef",
|
|
9
|
+
class: "flex flex-col max-h-full"
|
|
10
|
+
}, te = ["left", "right", "top", "bottom"], oe = {
|
|
11
|
+
modelValue: Boolean,
|
|
12
|
+
position: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "left"
|
|
15
|
+
},
|
|
16
|
+
teleportTo: {
|
|
17
|
+
type: [String, Object],
|
|
18
|
+
default: "body"
|
|
19
|
+
},
|
|
20
|
+
width: {
|
|
21
|
+
type: [String, Number],
|
|
22
|
+
default: 320
|
|
23
|
+
},
|
|
24
|
+
height: {
|
|
25
|
+
type: [String, Number],
|
|
26
|
+
default: 320
|
|
27
|
+
},
|
|
28
|
+
breakpoint: [String, Number],
|
|
29
|
+
backdrop: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !0
|
|
32
|
+
}
|
|
33
|
+
}, ie = {
|
|
34
|
+
name: "XDrawer",
|
|
35
|
+
inheritAttrs: !1,
|
|
36
|
+
validators: {
|
|
37
|
+
position: te
|
|
38
|
+
}
|
|
39
|
+
}, fe = /* @__PURE__ */ P({
|
|
40
|
+
...ie,
|
|
41
|
+
props: oe,
|
|
42
|
+
emits: ["update:modelValue"],
|
|
43
|
+
setup(E, { expose: L, emit: u }) {
|
|
44
|
+
const t = E, i = a(!0), s = a(t.modelValue), r = a(null), d = a(null), c = a(!1), h = typeof t.breakpoint == "string", p = J(h ? Q : { md: t.breakpoint || 768 }).smaller(h ? t.breakpoint : "md");
|
|
45
|
+
X(() => {
|
|
46
|
+
t.breakpoint && (p.value ? (i.value = !0, l()) : (i.value = !1, m()));
|
|
47
|
+
}), S(r, "pointerdown", l), j(() => t.modelValue, (e) => {
|
|
48
|
+
s.value = e;
|
|
49
|
+
}), typeof window < "u" && S(document, "keydown", B);
|
|
50
|
+
function B(e) {
|
|
51
|
+
e.key === "Escape" && s.value && l();
|
|
52
|
+
}
|
|
53
|
+
U(d, {
|
|
54
|
+
// passive: false,
|
|
55
|
+
// onSwipe(e: TouchEvent) {
|
|
56
|
+
// if (lengthX.value < 0) {
|
|
57
|
+
// const length = Math.abs(lengthX.value)
|
|
58
|
+
// left.value = `${length}px`
|
|
59
|
+
// } else {
|
|
60
|
+
// left.value = '0'
|
|
61
|
+
// }
|
|
62
|
+
// },
|
|
63
|
+
// onSwipeEnd(e: TouchEvent, direction: UseSwipeDirection) {
|
|
64
|
+
// if (lengthX.value < 0 && props.width && (Math.abs(lengthX.value) / props.width) >= 0.5) {
|
|
65
|
+
// left.value = '100%'
|
|
66
|
+
// } else {
|
|
67
|
+
// left.value = '0'
|
|
68
|
+
// }
|
|
69
|
+
// },
|
|
70
|
+
onSwipeEnd(e, o) {
|
|
71
|
+
i.value && (t.position === "left" && o === "left" || t.position === "right" && o === "right" || t.position === "top" && o === "up" || t.position === "bottom" && o === "down") && l();
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
const T = v(() => {
|
|
75
|
+
const e = {};
|
|
76
|
+
return t.position === "left" || t.position === "right" ? e.width = `${t.width}px` : (t.position === "top" || t.position === "bottom") && (e.height = `${t.height}px`), e;
|
|
77
|
+
}), V = v(() => {
|
|
78
|
+
const e = [];
|
|
79
|
+
return i.value && (e.push("absolute shadow-lg"), t.position === "top" ? e.push("top-0 inset-x-0") : t.position === "bottom" ? e.push("bottom-0 inset-x-0") : t.position === "left" ? e.push("left-0 inset-y-0") : t.position === "right" && e.push("right-0 inset-y-0")), e;
|
|
80
|
+
});
|
|
81
|
+
function N(e) {
|
|
82
|
+
e.classList.add("inset-0"), t.position === "top" ? e.style.top = `-${t.height}px` : t.position === "bottom" ? e.style.bottom = `-${t.height}px` : t.position === "left" ? e.style.left = `-${t.width}px` : t.position === "right" && (e.style.right = `-${t.width}px`);
|
|
83
|
+
}
|
|
84
|
+
function _(e, o) {
|
|
85
|
+
if (!i.value) {
|
|
86
|
+
o();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
e.addEventListener("transitionend", o), setTimeout(() => {
|
|
90
|
+
t.backdrop && e.classList.add("bg-gray-500/30"), t.position === "top" ? e.style.top = "0" : t.position === "bottom" ? e.style.bottom = "0" : t.position === "left" ? e.style.left = "0" : t.position === "right" && (e.style.right = "0");
|
|
91
|
+
}, 1);
|
|
92
|
+
}
|
|
93
|
+
function C(e) {
|
|
94
|
+
}
|
|
95
|
+
function R(e, o) {
|
|
96
|
+
e.addEventListener("transitionend", o), setTimeout(() => {
|
|
97
|
+
t.backdrop && e.classList.remove("bg-gray-500/30"), t.position === "top" ? e.style.top = `-${t.height}px` : t.position === "bottom" ? e.style.bottom = `-${t.height}px` : t.position === "left" ? e.style.left = `-${t.width}px` : t.position === "right" && (e.style.right = `-${t.width}px`);
|
|
98
|
+
}, 1);
|
|
99
|
+
}
|
|
100
|
+
function z(e) {
|
|
101
|
+
e.classList.remove("inset-0");
|
|
102
|
+
}
|
|
103
|
+
function l(e) {
|
|
104
|
+
e && e.target !== r.value || (s.value = !1, u("update:modelValue", !1));
|
|
105
|
+
}
|
|
106
|
+
function m() {
|
|
107
|
+
s.value = !0, u("update:modelValue", !0);
|
|
108
|
+
}
|
|
109
|
+
K(() => {
|
|
110
|
+
c.value = !0;
|
|
111
|
+
});
|
|
112
|
+
const { styles: D, classes: b, className: A } = W("drawer", Z, t);
|
|
113
|
+
return L({ open: m, close: l }), (e, o) => c.value ? (y(), M(O, {
|
|
114
|
+
key: 0,
|
|
115
|
+
to: e.teleportTo,
|
|
116
|
+
disabled: !i.value
|
|
117
|
+
}, [
|
|
118
|
+
w(q, {
|
|
119
|
+
css: !1,
|
|
120
|
+
onBeforeEnter: N,
|
|
121
|
+
onEnter: _,
|
|
122
|
+
onBeforeLeave: C,
|
|
123
|
+
onLeave: R,
|
|
124
|
+
onAfterLeave: z
|
|
125
|
+
}, {
|
|
126
|
+
default: g(() => [
|
|
127
|
+
F(k("div", {
|
|
128
|
+
ref_key: "backdropRef",
|
|
129
|
+
ref: r,
|
|
130
|
+
class: $([
|
|
131
|
+
e.$attrs.class,
|
|
132
|
+
n(b).backdrop,
|
|
133
|
+
i.value || !e.breakpoint ? "absolute z-40" : ""
|
|
134
|
+
])
|
|
135
|
+
}, [
|
|
136
|
+
i.value && s.value ? (y(), G("div", ee, null, 512)) : x("", !0),
|
|
137
|
+
k("div", {
|
|
138
|
+
ref_key: "drawerRef",
|
|
139
|
+
ref: d,
|
|
140
|
+
class: $([
|
|
141
|
+
n(A),
|
|
142
|
+
V.value,
|
|
143
|
+
n(b).wrapper
|
|
144
|
+
]),
|
|
145
|
+
style: H([T.value, n(D)])
|
|
146
|
+
}, [
|
|
147
|
+
f(e.$slots, "header"),
|
|
148
|
+
w(Y, {
|
|
149
|
+
scrollbar: !1,
|
|
150
|
+
vertical: "",
|
|
151
|
+
class: "flex-1"
|
|
152
|
+
}, {
|
|
153
|
+
default: g(() => [
|
|
154
|
+
f(e.$slots, "default")
|
|
155
|
+
]),
|
|
156
|
+
_: 3
|
|
157
|
+
}),
|
|
158
|
+
f(e.$slots, "footer")
|
|
159
|
+
], 6)
|
|
160
|
+
], 2), [
|
|
161
|
+
[I, e.breakpoint ? s.value && n(p) || !n(p) : s.value]
|
|
162
|
+
])
|
|
163
|
+
]),
|
|
164
|
+
_: 3
|
|
165
|
+
})
|
|
166
|
+
], 8, ["to", "disabled"])) : x("", !0);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
export {
|
|
170
|
+
fe as default
|
|
171
|
+
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { FormProps } from './Form.vue';
|
|
3
|
+
type InternalClasses = 'wrapper';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<FormProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface FormTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<FormProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|