@indielayer/ui 1.0.9 → 1.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 +1 -1
- package/README.md +2 -2
- package/{src/exports/nuxt.js → exports/nuxt.mjs} +1 -1
- package/{lib → exports}/nuxt.plugin.js +1 -1
- 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 +33 -7
- 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 +32 -3
- 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 +54 -9
- 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 +20 -6
- 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 +49 -8
- 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 +44 -6
- 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 +17 -1
- 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 +46 -7
- 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 +32 -2
- 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 +16 -1
- 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 +7 -1
- 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 +50 -14
- 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 +34 -6
- 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.d.ts +2 -2
- 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 +22 -4
- 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 +6 -1
- 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 +73 -22
- 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 +25 -2
- 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 +62 -9
- 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 +63 -14
- 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 +24 -2
- 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 +56 -16
- 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 +28 -5
- 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 +17 -2
- 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 +48 -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 +16 -1
- 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 -10
- package/lib/components/progress/Progress.theme.js +18 -0
- package/lib/components/progress/Progress.vue.d.ts +21 -2
- 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 +48 -9
- 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 +20 -2
- 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 +44 -8
- 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 +9 -1
- 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 +55 -7
- 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.d.ts +1 -1
- 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 +14 -1
- 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 +44 -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 +61 -9
- 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 +269 -51
- package/lib/components/table/Table.vue.js +147 -0
- package/lib/components/table/Table.vue2.js +4 -0
- package/lib/components/table/TableBody.d.ts +1 -1
- 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 +35 -6
- package/lib/components/table/TableCell.vue.js +43 -0
- package/lib/components/table/TableCell.vue2.js +4 -0
- package/lib/components/table/TableHead.d.ts +1 -1
- package/lib/components/table/TableHead.js +19 -0
- package/lib/components/table/TableHeader.vue.d.ts +34 -9
- package/lib/components/table/TableHeader.vue.js +78 -0
- package/lib/components/table/TableHeader.vue2.js +4 -0
- package/lib/components/table/TableRow.vue.d.ts +8 -1
- 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 +31 -4
- 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 +59 -17
- 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 +39 -7
- 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 +12 -1
- 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 +6 -4
- 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.d.ts +1 -1
- 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.d.ts +1 -1
- 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.d.ts +1 -1
- 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 +54 -54
- package/src/common/utils.ts +25 -2
- package/src/components/alert/Alert.theme.ts +15 -6
- package/src/components/alert/Alert.vue +26 -13
- package/src/components/alert/index.ts +3 -0
- package/src/components/avatar/Avatar.theme.ts +16 -4
- package/src/components/avatar/Avatar.vue +20 -15
- 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 +23 -19
- package/src/components/button/Button.vue +30 -19
- package/src/components/button/ButtonGroup.theme.ts +14 -1
- package/src/components/button/ButtonGroup.vue +33 -19
- 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 +21 -12
- package/src/components/checkbox/index.ts +3 -0
- package/src/components/collapse/Collapse.theme.ts +13 -3
- package/src/components/collapse/Collapse.vue +28 -24
- 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 +50 -41
- package/src/components/drawer/index.ts +3 -0
- package/src/components/form/Form.theme.ts +12 -2
- package/src/components/form/Form.vue +40 -31
- 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 +33 -22
- package/src/components/input/index.ts +3 -0
- package/src/components/link/Link.theme.ts +13 -3
- package/src/components/link/Link.vue +20 -12
- 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 +65 -52
- package/src/components/menu/index.ts +7 -0
- package/src/components/modal/Modal.theme.ts +13 -3
- package/src/components/modal/Modal.vue +23 -12
- 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 +56 -46
- 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 +24 -14
- package/src/components/radio/index.ts +3 -0
- package/src/components/scroll/Scroll.theme.ts +12 -2
- package/src/components/scroll/Scroll.vue +37 -26
- package/src/components/scroll/index.ts +3 -0
- package/src/components/select/Select.theme.ts +20 -6
- package/src/components/select/Select.vue +28 -20
- 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/TableRow.vue +1 -1
- 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 +4 -346
- package/src/composables/colors.ts +21 -17
- package/src/composables/common.ts +1 -1
- package/src/composables/css.ts +4 -4
- package/src/composables/inputtable.ts +8 -8
- package/src/composables/interactive.ts +2 -2
- package/src/composables/keys.ts +6 -3
- package/src/composables/theme.ts +30 -27
- package/src/create.ts +6 -7
- package/src/version.ts +1 -1
- package/volar.d.ts +0 -2
- package/lib/components/tooltip/Tooltip.theme.d.ts +0 -11
- package/lib/index.cjs.js +0 -1
- package/lib/index.es.js +0 -7184
- package/lib/nuxt.js +0 -33
- package/src/components/tooltip/Tooltip.theme.ts +0 -51
- package/src/exports/nuxt.plugin.js +0 -8
- package/src/exports/tailwind.preset.js +0 -55
- /package/{lib → exports}/tailwind.preset.js +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { defineComponent as h, computed as v, ref as E, watch as X, openBlock as o, createElementBlock as n, normalizeStyle as D, unref as t, normalizeClass as c, Fragment as u, createVNode as r, createElementVNode as g, withKeys as F, toDisplayString as L, createBlock as m, createCommentVNode as d, renderList as P } from "vue";
|
|
2
|
+
import { useTheme as Q } from "../../composables/theme.js";
|
|
3
|
+
import { useCommon as C } from "../../composables/common.js";
|
|
4
|
+
import { prevIcon as T, nextIcon as U, dotsIcon as y } from "../../common/icons.js";
|
|
5
|
+
import b from "../icon/Icon.vue.js";
|
|
6
|
+
import j from "../input/Input.vue.js";
|
|
7
|
+
import I from "../button/Button.vue.js";
|
|
8
|
+
import f from "./PaginationItem.vue.js";
|
|
9
|
+
import A from "./Pagination.theme.js";
|
|
10
|
+
const G = { class: "mx-9 flex items-center" }, H = /* @__PURE__ */ g("span", { class: "text-gray-600 mr-2" }, "Page", -1), J = { class: "text-gray-600 ml-2" }, M = ["onClick"], O = ["simple", "quick", "dots"], R = {
|
|
11
|
+
...C.props(),
|
|
12
|
+
links: Boolean,
|
|
13
|
+
totalPages: {
|
|
14
|
+
type: Number,
|
|
15
|
+
default: 1
|
|
16
|
+
},
|
|
17
|
+
modelValue: {
|
|
18
|
+
type: Number,
|
|
19
|
+
default: 1
|
|
20
|
+
},
|
|
21
|
+
variant: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: "simple"
|
|
24
|
+
}
|
|
25
|
+
}, W = {
|
|
26
|
+
name: "XPagination",
|
|
27
|
+
validators: {
|
|
28
|
+
...C.validators(),
|
|
29
|
+
variant: O
|
|
30
|
+
}
|
|
31
|
+
}, te = /* @__PURE__ */ h({
|
|
32
|
+
...W,
|
|
33
|
+
props: R,
|
|
34
|
+
emits: ["update:modelValue"],
|
|
35
|
+
setup($, { emit: p }) {
|
|
36
|
+
const l = $, w = v(() => l.totalPages === 3 ? [2] : l.totalPages > 2 ? l.modelValue === 1 || l.modelValue === 2 ? [2, 3] : l.modelValue === l.totalPages || l.modelValue === l.totalPages - 1 ? [l.totalPages - 2, l.totalPages - 1] : [l.modelValue - 1, l.modelValue, l.modelValue + 1] : []), i = E(l.modelValue + "");
|
|
37
|
+
function B() {
|
|
38
|
+
const e = parseInt(i.value);
|
|
39
|
+
e >= 0 && e <= l.totalPages ? p("update:modelValue", e) : i.value = l.modelValue + "";
|
|
40
|
+
}
|
|
41
|
+
X(() => l.modelValue, (e) => {
|
|
42
|
+
i.value = l.modelValue + "";
|
|
43
|
+
});
|
|
44
|
+
function N() {
|
|
45
|
+
l.modelValue > 1 && p("update:modelValue", l.modelValue - 1);
|
|
46
|
+
}
|
|
47
|
+
function q() {
|
|
48
|
+
l.modelValue < l.totalPages && p("update:modelValue", l.modelValue + 1);
|
|
49
|
+
}
|
|
50
|
+
const V = v(() => l.size === "xs" ? "xs" : l.size === "sm" ? "sm" : l.size === "lg" ? "md" : l.size === "xl" ? "lg" : "sm"), { styles: S, classes: k, className: K } = Q("pagination", A, l);
|
|
51
|
+
return (e, s) => (o(), n("ul", {
|
|
52
|
+
style: D(t(S)),
|
|
53
|
+
class: c([
|
|
54
|
+
t(K),
|
|
55
|
+
t(k).wrapper
|
|
56
|
+
])
|
|
57
|
+
}, [
|
|
58
|
+
e.variant === "quick" ? (o(), n(u, { key: 0 }, [
|
|
59
|
+
r(I, {
|
|
60
|
+
"icon-left": t(T),
|
|
61
|
+
size: V.value,
|
|
62
|
+
disabled: e.modelValue <= 1,
|
|
63
|
+
onClick: N
|
|
64
|
+
}, null, 8, ["icon-left", "size", "disabled"]),
|
|
65
|
+
g("div", G, [
|
|
66
|
+
H,
|
|
67
|
+
r(j, {
|
|
68
|
+
modelValue: i.value,
|
|
69
|
+
"onUpdate:modelValue": s[0] || (s[0] = (a) => i.value = a),
|
|
70
|
+
size: e.size,
|
|
71
|
+
class: "w-[2.75rem] text-center",
|
|
72
|
+
onKeydown: F(B, ["enter"])
|
|
73
|
+
}, null, 8, ["modelValue", "size", "onKeydown"]),
|
|
74
|
+
g("span", J, "of " + L(e.totalPages), 1)
|
|
75
|
+
]),
|
|
76
|
+
r(I, {
|
|
77
|
+
"icon-left": t(U),
|
|
78
|
+
size: V.value,
|
|
79
|
+
disabled: e.modelValue >= e.totalPages,
|
|
80
|
+
onClick: q
|
|
81
|
+
}, null, 8, ["icon-left", "size", "disabled"])
|
|
82
|
+
], 64)) : e.variant === "simple" ? (o(), n(u, { key: 1 }, [
|
|
83
|
+
r(f, {
|
|
84
|
+
value: 1,
|
|
85
|
+
links: e.links,
|
|
86
|
+
size: e.size,
|
|
87
|
+
selected: e.modelValue === 1,
|
|
88
|
+
onInput: s[1] || (s[1] = (a) => e.$emit("update:modelValue", a))
|
|
89
|
+
}, null, 8, ["links", "size", "selected"]),
|
|
90
|
+
e.totalPages > 3 && e.modelValue > 3 ? (o(), m(b, {
|
|
91
|
+
key: 0,
|
|
92
|
+
class: "mx-1",
|
|
93
|
+
icon: t(y),
|
|
94
|
+
size: e.size
|
|
95
|
+
}, null, 8, ["icon", "size"])) : d("", !0),
|
|
96
|
+
(o(!0), n(u, null, P(w.value, (a) => (o(), m(f, {
|
|
97
|
+
key: a,
|
|
98
|
+
value: a,
|
|
99
|
+
links: e.links,
|
|
100
|
+
size: e.size,
|
|
101
|
+
selected: e.modelValue === a,
|
|
102
|
+
onInput: s[2] || (s[2] = (z) => e.$emit("update:modelValue", z))
|
|
103
|
+
}, null, 8, ["value", "links", "size", "selected"]))), 128)),
|
|
104
|
+
e.totalPages > 3 && e.modelValue < e.totalPages - 2 ? (o(), m(b, {
|
|
105
|
+
key: 1,
|
|
106
|
+
class: "mx-1",
|
|
107
|
+
icon: t(y),
|
|
108
|
+
size: e.size
|
|
109
|
+
}, null, 8, ["icon", "size"])) : d("", !0),
|
|
110
|
+
e.totalPages > 1 ? (o(), m(f, {
|
|
111
|
+
key: 2,
|
|
112
|
+
value: e.totalPages,
|
|
113
|
+
links: e.links,
|
|
114
|
+
size: e.size,
|
|
115
|
+
selected: e.modelValue === e.totalPages,
|
|
116
|
+
onInput: s[3] || (s[3] = (a) => e.$emit("update:modelValue", a))
|
|
117
|
+
}, null, 8, ["value", "links", "size", "selected"])) : d("", !0)
|
|
118
|
+
], 64)) : e.variant === "dots" ? (o(!0), n(u, { key: 2 }, P(e.totalPages, (a) => (o(), n("li", {
|
|
119
|
+
key: a,
|
|
120
|
+
class: c(["rounded-full cursor-pointer", [
|
|
121
|
+
t(k).dots,
|
|
122
|
+
a === e.modelValue ? "bg-[color:var(--x-pagination-bg)]" : "bg-gray-100 hover:bg-gray-200"
|
|
123
|
+
]]),
|
|
124
|
+
onClick: (z) => e.$emit("update:modelValue", a)
|
|
125
|
+
}, null, 10, M))), 128)) : d("", !0)
|
|
126
|
+
], 6));
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
export {
|
|
130
|
+
te as default
|
|
131
|
+
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { PaginationItemProps } from './PaginationItem.vue';
|
|
3
|
+
type InternalClasses = 'wrapper';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<PaginationItemProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface PaginationItemTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<PaginationItemProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
const n = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: ({ props: e }) => e.size === "xs" ? "!leading-none !p-1 min-w-[1.375rem]" : e.size === "sm" ? "!leading-none !p-2 min-w-[2rem]" : e.size === "lg" ? "!leading-none !p-3 min-w-[2.75rem]" : e.size === "xl" ? "!leading-none !p-4 min-w-[3.375rem]" : "!leading-none !p-2 min-w-[2.125rem]"
|
|
4
|
+
}
|
|
5
|
+
}, i = n;
|
|
6
|
+
export {
|
|
7
|
+
i as default
|
|
8
|
+
};
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
import type { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
declare const paginationItemProps: {
|
|
3
|
+
value: {
|
|
4
|
+
type: NumberConstructor;
|
|
5
|
+
default: number;
|
|
6
|
+
};
|
|
7
|
+
selected: BooleanConstructor;
|
|
8
|
+
links: BooleanConstructor;
|
|
9
|
+
size: {
|
|
10
|
+
readonly type: import("vue").PropType<import("../../composables/common").Size>;
|
|
11
|
+
readonly default: "md";
|
|
12
|
+
readonly validator: (value: string) => boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type PaginationItemProps = ExtractPublicPropTypes<typeof paginationItemProps>;
|
|
1
16
|
declare const _default: import("vue").DefineComponent<{
|
|
2
17
|
value: {
|
|
3
18
|
type: NumberConstructor;
|
|
@@ -25,9 +40,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
40
|
}>> & {
|
|
26
41
|
onInput?: ((...args: any[]) => any) | undefined;
|
|
27
42
|
}, {
|
|
28
|
-
size: import("../../composables/common").Size;
|
|
29
43
|
value: number;
|
|
44
|
+
size: import("../../composables/common").Size;
|
|
30
45
|
selected: boolean;
|
|
31
46
|
links: boolean;
|
|
32
|
-
}>;
|
|
47
|
+
}, {}>;
|
|
33
48
|
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as m, openBlock as p, createElementBlock as u, createVNode as d, normalizeStyle as c, unref as o, normalizeClass as f, withCtx as v, createTextVNode as y, toDisplayString as g } from "vue";
|
|
2
|
+
import { useTheme as k } from "../../composables/theme.js";
|
|
3
|
+
import { useCommon as l } from "../../composables/common.js";
|
|
4
|
+
import z from "../button/Button.vue.js";
|
|
5
|
+
import B from "./PaginationItem.theme.js";
|
|
6
|
+
const C = {
|
|
7
|
+
...l.props(),
|
|
8
|
+
value: {
|
|
9
|
+
type: Number,
|
|
10
|
+
default: 0
|
|
11
|
+
},
|
|
12
|
+
selected: Boolean,
|
|
13
|
+
links: Boolean
|
|
14
|
+
}, N = {
|
|
15
|
+
name: "XPaginationItem",
|
|
16
|
+
validators: {
|
|
17
|
+
...l.validators()
|
|
18
|
+
}
|
|
19
|
+
}, V = /* @__PURE__ */ m({
|
|
20
|
+
...N,
|
|
21
|
+
props: C,
|
|
22
|
+
emits: ["input"],
|
|
23
|
+
setup(s, { emit: $ }) {
|
|
24
|
+
const i = s, { styles: n, classes: a, className: r } = k("pagination-item", B, i);
|
|
25
|
+
return (e, t) => (p(), u("li", null, [
|
|
26
|
+
d(z, {
|
|
27
|
+
to: e.links ? `?page=${e.value}` : void 0,
|
|
28
|
+
size: e.size,
|
|
29
|
+
style: c(o(n)),
|
|
30
|
+
class: f([
|
|
31
|
+
o(r),
|
|
32
|
+
o(a).wrapper
|
|
33
|
+
]),
|
|
34
|
+
outlined: !e.selected,
|
|
35
|
+
color: e.selected ? "primary" : void 0,
|
|
36
|
+
onClick: t[0] || (t[0] = (h) => e.selected ? null : e.$emit("input", e.value))
|
|
37
|
+
}, {
|
|
38
|
+
default: v(() => [
|
|
39
|
+
y(g(e.value), 1)
|
|
40
|
+
]),
|
|
41
|
+
_: 1
|
|
42
|
+
}, 8, ["to", "size", "style", "class", "outlined", "color"])
|
|
43
|
+
]));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
V as default
|
|
48
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as XPagination } from './Pagination.vue';
|
|
2
|
+
export type { PaginationProps, PaginationVariant } from './Pagination.vue';
|
|
3
|
+
export type { PaginationTheme } from './Pagination.theme';
|
|
4
|
+
export { default as XPaginationItem } from './PaginationItem.vue';
|
|
5
|
+
export type { PaginationItemProps } from './PaginationItem.vue';
|
|
6
|
+
export type { PaginationItemTheme } from './PaginationItem.theme';
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { PopoverProps } from './Popover.vue';
|
|
3
|
+
type InternalClasses = 'wrapper' | 'content';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<PopoverProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface PopoverTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<PopoverProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|
|
@@ -1,12 +1,42 @@
|
|
|
1
|
-
import { type PropType } from 'vue';
|
|
2
|
-
declare const
|
|
1
|
+
import { type PropType, type ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
declare const validators: {
|
|
3
|
+
align: readonly ["bottom", "center", "left", "right", "top"];
|
|
4
|
+
position: readonly ["bottom", "left", "right", "top"];
|
|
5
|
+
};
|
|
6
|
+
declare const popoverProps: {
|
|
3
7
|
align: {
|
|
4
|
-
type: PropType<"
|
|
8
|
+
type: PropType<"left" | "right" | "top" | "bottom" | "center">;
|
|
5
9
|
default: string;
|
|
6
10
|
validator: (value: string) => boolean;
|
|
7
11
|
};
|
|
8
12
|
position: {
|
|
9
|
-
type: PropType<"
|
|
13
|
+
type: PropType<"left" | "right" | "top" | "bottom">;
|
|
14
|
+
default: string;
|
|
15
|
+
validator: (value: string) => boolean;
|
|
16
|
+
};
|
|
17
|
+
dismissOnClick: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
default: boolean;
|
|
20
|
+
};
|
|
21
|
+
autoAlign: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
disabled: BooleanConstructor;
|
|
26
|
+
hover: BooleanConstructor;
|
|
27
|
+
block: BooleanConstructor;
|
|
28
|
+
};
|
|
29
|
+
export type PopoverAlign = typeof validators.align[number];
|
|
30
|
+
export type PopoverPosition = typeof validators.position[number];
|
|
31
|
+
export type PopoverProps = ExtractPublicPropTypes<typeof popoverProps>;
|
|
32
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
33
|
+
align: {
|
|
34
|
+
type: PropType<"left" | "right" | "top" | "bottom" | "center">;
|
|
35
|
+
default: string;
|
|
36
|
+
validator: (value: string) => boolean;
|
|
37
|
+
};
|
|
38
|
+
position: {
|
|
39
|
+
type: PropType<"left" | "right" | "top" | "bottom">;
|
|
10
40
|
default: string;
|
|
11
41
|
validator: (value: string) => boolean;
|
|
12
42
|
};
|
|
@@ -26,14 +56,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
26
56
|
close: () => void;
|
|
27
57
|
toggle: () => void;
|
|
28
58
|
isOpen: import("vue").Ref<boolean>;
|
|
29
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "toggle" | "open")[], "
|
|
59
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "toggle" | "open")[], "close" | "toggle" | "open", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
60
|
align: {
|
|
31
|
-
type: PropType<"
|
|
61
|
+
type: PropType<"left" | "right" | "top" | "bottom" | "center">;
|
|
32
62
|
default: string;
|
|
33
63
|
validator: (value: string) => boolean;
|
|
34
64
|
};
|
|
35
65
|
position: {
|
|
36
|
-
type: PropType<"
|
|
66
|
+
type: PropType<"left" | "right" | "top" | "bottom">;
|
|
37
67
|
default: string;
|
|
38
68
|
validator: (value: string) => boolean;
|
|
39
69
|
};
|
|
@@ -54,11 +84,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
54
84
|
onOpen?: ((...args: any[]) => any) | undefined;
|
|
55
85
|
}, {
|
|
56
86
|
hover: boolean;
|
|
57
|
-
position: "top" | "bottom" | "left" | "right";
|
|
58
|
-
align: "top" | "bottom" | "left" | "right" | "center";
|
|
59
|
-
block: boolean;
|
|
60
87
|
disabled: boolean;
|
|
88
|
+
block: boolean;
|
|
89
|
+
align: "left" | "right" | "top" | "bottom" | "center";
|
|
90
|
+
position: "left" | "right" | "top" | "bottom";
|
|
61
91
|
dismissOnClick: boolean;
|
|
62
92
|
autoAlign: boolean;
|
|
93
|
+
}, {}>, {
|
|
94
|
+
default?(_: {}): any;
|
|
95
|
+
content?(_: {}): any;
|
|
63
96
|
}>;
|
|
64
97
|
export default _default;
|
|
98
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
99
|
+
new (): {
|
|
100
|
+
$slots: S;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { defineComponent as L, ref as u, watch as N, useCssModule as P, computed as W, openBlock as A, createElementBlock as M, normalizeClass as B, unref as s, normalizeStyle as V, createElementVNode as $, renderSlot as w } from "vue";
|
|
2
|
+
import { onClickOutside as X, useEventListener as R } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.4/node_modules/@vueuse/core/index.js";
|
|
3
|
+
import { useTheme as j } from "../../composables/theme.js";
|
|
4
|
+
import q from "./Popover.theme.js";
|
|
5
|
+
const b = {
|
|
6
|
+
align: ["bottom", "center", "left", "right", "top"],
|
|
7
|
+
position: ["bottom", "left", "right", "top"]
|
|
8
|
+
}, D = {
|
|
9
|
+
align: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "center",
|
|
12
|
+
validator: (f) => b.align.includes(f)
|
|
13
|
+
},
|
|
14
|
+
position: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "bottom",
|
|
17
|
+
validator: (f) => b.position.includes(f)
|
|
18
|
+
},
|
|
19
|
+
dismissOnClick: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: !0
|
|
22
|
+
},
|
|
23
|
+
autoAlign: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !0
|
|
26
|
+
},
|
|
27
|
+
disabled: Boolean,
|
|
28
|
+
hover: Boolean,
|
|
29
|
+
block: Boolean
|
|
30
|
+
}, F = {
|
|
31
|
+
name: "XPopover",
|
|
32
|
+
validators: b
|
|
33
|
+
}, Q = /* @__PURE__ */ L({
|
|
34
|
+
...F,
|
|
35
|
+
props: D,
|
|
36
|
+
emits: ["open", "close", "toggle"],
|
|
37
|
+
setup(f, { expose: E, emit: p }) {
|
|
38
|
+
const l = f, r = u(null), c = u(null), i = u(!1);
|
|
39
|
+
let a;
|
|
40
|
+
N(i, (e) => {
|
|
41
|
+
l.hover || (e ? y() : k(), a && (a(), a = void 0), e && setTimeout(() => {
|
|
42
|
+
a = X(r, g);
|
|
43
|
+
}));
|
|
44
|
+
});
|
|
45
|
+
const n = P(), m = u(!1), d = u(!1), v = u(!1), h = u(!1), S = W(() => {
|
|
46
|
+
const e = [];
|
|
47
|
+
let o = l.align, t = l.position;
|
|
48
|
+
return v.value && (t === "top" ? t = "bottom" : (t === "left" || t === "right") && (o = "top")), h.value && (t === "bottom" ? t = "top" : (t === "left" || t === "right") && (o = "bottom")), m.value && (t === "left" ? t = "right" : (t === "top" || t === "bottom") && (o = "left")), d.value && (t === "right" ? t = "left" : (t === "top" || t === "bottom") && (o = "right")), t === "top" && e.push(`bottom-full ${n["popover-top"]}`), t === "bottom" && e.push(`top-full bottom-0 ${n["popover-bottom"]}`), t === "right" && e.push(`left-full ${n["popover-right"]}`), t === "left" && e.push(`right-full left-auto ${n["popover-left"]}`), o === "left" && ["bottom", "top"].includes(t) && e.push("left-0 right-auto"), o === "center" && ["bottom", "top"].includes(t) && e.push("left-1/2 right-auto -translate-x-1/2"), o === "right" && ["bottom", "top"].includes(t) && e.push("right-0 left-auto"), o === "top" && ["left", "right"].includes(t) && e.push("top-0 bottom-auto"), o === "center" && ["left", "right"].includes(t) && e.push("-translate-y-1/2 top-1/2 bottom-auto"), o === "bottom" && ["left", "right"].includes(t) && e.push("bottom-0"), l.block && e.push("min-w-full"), e;
|
|
49
|
+
});
|
|
50
|
+
l.hover && (R(r, "mouseenter", y), R(r, "mouseleave", k));
|
|
51
|
+
function k() {
|
|
52
|
+
m.value = !1, d.value = !1, v.value = !1, h.value = !1;
|
|
53
|
+
}
|
|
54
|
+
function y() {
|
|
55
|
+
if (!c.value)
|
|
56
|
+
return;
|
|
57
|
+
const e = c.value.getBoundingClientRect();
|
|
58
|
+
m.value = e.left < 0, d.value = e.right > (window.innerWidth || document.documentElement.clientWidth), v.value = e.top < 0, h.value = e.bottom > (window.innerHeight || document.documentElement.clientHeight);
|
|
59
|
+
}
|
|
60
|
+
function g() {
|
|
61
|
+
l.disabled || (i.value = !1, p("close"));
|
|
62
|
+
}
|
|
63
|
+
function z() {
|
|
64
|
+
l.disabled || (i.value = !0, p("open"));
|
|
65
|
+
}
|
|
66
|
+
function C() {
|
|
67
|
+
l.disabled || (i.value = !i.value, p("toggle", i.value));
|
|
68
|
+
}
|
|
69
|
+
const { styles: T, classes: O, className: H } = j("popover", q, l);
|
|
70
|
+
return E({ open: z, close: g, toggle: C, isOpen: i }), (e, o) => (A(), M("div", {
|
|
71
|
+
ref_key: "elRef",
|
|
72
|
+
ref: r,
|
|
73
|
+
class: B(["inline-block relative", [
|
|
74
|
+
s(H),
|
|
75
|
+
s(O).wrapper,
|
|
76
|
+
s(n).popover,
|
|
77
|
+
[e.hover ? s(n).hover : ""],
|
|
78
|
+
[i.value ? s(n)["is-open"] : ""],
|
|
79
|
+
{ "w-full": e.block }
|
|
80
|
+
]]),
|
|
81
|
+
style: V(s(T))
|
|
82
|
+
}, [
|
|
83
|
+
$("div", {
|
|
84
|
+
class: "flex",
|
|
85
|
+
onClick: o[0] || (o[0] = (t) => e.hover ? null : C())
|
|
86
|
+
}, [
|
|
87
|
+
w(e.$slots, "default")
|
|
88
|
+
]),
|
|
89
|
+
$("div", {
|
|
90
|
+
ref_key: "contentRef",
|
|
91
|
+
ref: c,
|
|
92
|
+
class: B(["absolute transform transition-transform z-40 h-fit", [
|
|
93
|
+
s(n)["popover-content"],
|
|
94
|
+
S.value,
|
|
95
|
+
s(O).content
|
|
96
|
+
]]),
|
|
97
|
+
onClick: o[1] || (o[1] = (t) => e.dismissOnClick ? g() : null)
|
|
98
|
+
}, [
|
|
99
|
+
w(e.$slots, "content")
|
|
100
|
+
], 2)
|
|
101
|
+
], 6));
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
export {
|
|
105
|
+
Q as default
|
|
106
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
const o = "_popover_fiql7_2", p = "_hover_fiql7_26", e = {
|
|
2
|
+
popover: o,
|
|
3
|
+
"popover-content": "_popover-content_fiql7_3",
|
|
4
|
+
"popover-top": "_popover-top_fiql7_9",
|
|
5
|
+
"popover-right": "_popover-right_fiql7_13",
|
|
6
|
+
"popover-bottom": "_popover-bottom_fiql7_17",
|
|
7
|
+
"popover-left": "_popover-left_fiql7_21",
|
|
8
|
+
"is-open": "_is-open_fiql7_25",
|
|
9
|
+
hover: p
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
e as default,
|
|
13
|
+
p as hover,
|
|
14
|
+
o as popover
|
|
15
|
+
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
export
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { PopoverContainerProps } from './PopoverContainer.vue';
|
|
3
|
+
type InternalClasses = 'wrapper';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<PopoverContainerProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface PopoverContainerTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<PopoverContainerProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
declare const popoverContainerProps: {
|
|
3
|
+
tag: {
|
|
4
|
+
default: string;
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
export type PopoverContainerProps = ExtractPublicPropTypes<typeof popoverContainerProps>;
|
|
9
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
10
|
tag: {
|
|
3
11
|
default: string;
|
|
4
12
|
type: StringConstructor;
|
|
@@ -10,5 +18,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10
18
|
};
|
|
11
19
|
}>>, {
|
|
12
20
|
tag: string;
|
|
21
|
+
}, {}>, {
|
|
22
|
+
default?(_: {}): any;
|
|
13
23
|
}>;
|
|
14
24
|
export default _default;
|
|
25
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as l, openBlock as p, createBlock as c, resolveDynamicComponent as m, 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 "./PopoverContainer.theme.js";
|
|
4
|
+
const C = {
|
|
5
|
+
tag: {
|
|
6
|
+
default: "div",
|
|
7
|
+
type: String
|
|
8
|
+
}
|
|
9
|
+
}, v = { name: "XPopoverContainer" }, w = /* @__PURE__ */ l({
|
|
10
|
+
...v,
|
|
11
|
+
props: C,
|
|
12
|
+
setup(t) {
|
|
13
|
+
const r = t, { styles: s, classes: n, className: a } = _("popover-container", y, r);
|
|
14
|
+
return (o, h) => (p(), c(m(o.tag), {
|
|
15
|
+
style: i(e(s)),
|
|
16
|
+
class: f([
|
|
17
|
+
e(a),
|
|
18
|
+
e(n).wrapper
|
|
19
|
+
])
|
|
20
|
+
}, {
|
|
21
|
+
default: u(() => [
|
|
22
|
+
d(o.$slots, "default")
|
|
23
|
+
]),
|
|
24
|
+
_: 3
|
|
25
|
+
}, 8, ["style", "class"]));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
w as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as XPopover } from './Popover.vue';
|
|
2
|
+
export type { PopoverProps, PopoverAlign, PopoverPosition } from './Popover.vue';
|
|
3
|
+
export type { PopoverTheme } from './Popover.theme';
|
|
4
|
+
export { default as XPopoverContainer } from './PopoverContainer.vue';
|
|
5
|
+
export type { PopoverContainerProps } from './PopoverContainer.vue';
|
|
6
|
+
export type { PopoverContainerTheme } from './PopoverContainer.theme';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export default
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { ProgressProps } from './Progress.vue';
|
|
3
|
+
type InternalClasses = 'wrapper' | 'list' | 'item';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<ProgressProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface ProgressTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<ProgressProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const l = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: ({ props: e }) => `relative rounded bg-gray-100 dark:bg-gray-700 overflow-hidden pointer-events-none ${e.thick ? "h-1.5" : "h-1"}`,
|
|
4
|
+
list: "flex flex-col items-end w-full sm:w-[520px] px-4",
|
|
5
|
+
item: "w-full flex items-center rounded-md px-4 py-3 bg-gray-800 dark:bg-gray-50 text-white dark:text-gray-900"
|
|
6
|
+
},
|
|
7
|
+
styles: ({ props: e, colors: s, css: a }) => {
|
|
8
|
+
const t = s.getPalette(e.color), r = [];
|
|
9
|
+
return r.push(a.variables({
|
|
10
|
+
bg: t[500]
|
|
11
|
+
})), e.gradient && r.push({
|
|
12
|
+
"--tw-gradient-stops": `${t[100]}, ${t[800]}`
|
|
13
|
+
}), r;
|
|
14
|
+
}
|
|
15
|
+
}, n = l;
|
|
16
|
+
export {
|
|
17
|
+
n as default
|
|
18
|
+
};
|