@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
package/lib/node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.4/node_modules/@vueuse/core/index.js
ADDED
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
import { noop as j, toValue as L, tryOnScopeDispose as k, isIOS as G, useThrottleFn as Q, isClient as N, increaseWithUnit as U, toRef as J, useDebounceFn as K } from "../../../../@vueuse_shared@10.2.0_vue@3.3.4/node_modules/@vueuse/shared/index.js";
|
|
2
|
+
import { createFilterWrapper as Oe, debounceFilter as ge, throttleFilter as Se } from "../../../../@vueuse_shared@10.2.0_vue@3.3.4/node_modules/@vueuse/shared/index.js";
|
|
3
|
+
import { watch as F, computed as g, ref as T, reactive as D, watchEffect as Z, getCurrentInstance as ee, onMounted as te } from "vue";
|
|
4
|
+
function _(e) {
|
|
5
|
+
var o;
|
|
6
|
+
const r = L(e);
|
|
7
|
+
return (o = r == null ? void 0 : r.$el) != null ? o : r;
|
|
8
|
+
}
|
|
9
|
+
const P = N ? window : void 0;
|
|
10
|
+
function S(...e) {
|
|
11
|
+
let o, r, n, s;
|
|
12
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([r, n, s] = e, o = P) : [o, r, n, s] = e, !o)
|
|
13
|
+
return j;
|
|
14
|
+
Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);
|
|
15
|
+
const v = [], u = () => {
|
|
16
|
+
v.forEach((p) => p()), v.length = 0;
|
|
17
|
+
}, t = (p, m, l, a) => (p.addEventListener(m, l, a), () => p.removeEventListener(m, l, a)), i = F(
|
|
18
|
+
() => [_(o), L(s)],
|
|
19
|
+
([p, m]) => {
|
|
20
|
+
u(), p && v.push(
|
|
21
|
+
...r.flatMap((l) => n.map((a) => t(p, l, a, m)))
|
|
22
|
+
);
|
|
23
|
+
},
|
|
24
|
+
{ immediate: !0, flush: "post" }
|
|
25
|
+
), d = () => {
|
|
26
|
+
i(), u();
|
|
27
|
+
};
|
|
28
|
+
return k(d), d;
|
|
29
|
+
}
|
|
30
|
+
let X = !1;
|
|
31
|
+
function de(e, o, r = {}) {
|
|
32
|
+
const { window: n = P, ignore: s = [], capture: v = !0, detectIframe: u = !1 } = r;
|
|
33
|
+
if (!n)
|
|
34
|
+
return;
|
|
35
|
+
G && !X && (X = !0, Array.from(n.document.body.children).forEach((l) => l.addEventListener("click", j)));
|
|
36
|
+
let t = !0;
|
|
37
|
+
const i = (l) => s.some((a) => {
|
|
38
|
+
if (typeof a == "string")
|
|
39
|
+
return Array.from(n.document.querySelectorAll(a)).some((h) => h === l.target || l.composedPath().includes(h));
|
|
40
|
+
{
|
|
41
|
+
const h = _(a);
|
|
42
|
+
return h && (l.target === h || l.composedPath().includes(h));
|
|
43
|
+
}
|
|
44
|
+
}), p = [
|
|
45
|
+
S(n, "click", (l) => {
|
|
46
|
+
const a = _(e);
|
|
47
|
+
if (!(!a || a === l.target || l.composedPath().includes(a))) {
|
|
48
|
+
if (l.detail === 0 && (t = !i(l)), !t) {
|
|
49
|
+
t = !0;
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
o(l);
|
|
53
|
+
}
|
|
54
|
+
}, { passive: !0, capture: v }),
|
|
55
|
+
S(n, "pointerdown", (l) => {
|
|
56
|
+
const a = _(e);
|
|
57
|
+
a && (t = !l.composedPath().includes(a) && !i(l));
|
|
58
|
+
}, { passive: !0 }),
|
|
59
|
+
u && S(n, "blur", (l) => {
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
var a;
|
|
62
|
+
const h = _(e);
|
|
63
|
+
((a = n.document.activeElement) == null ? void 0 : a.tagName) === "IFRAME" && !(h != null && h.contains(n.document.activeElement)) && o(l);
|
|
64
|
+
}, 0);
|
|
65
|
+
})
|
|
66
|
+
].filter(Boolean);
|
|
67
|
+
return () => p.forEach((l) => l());
|
|
68
|
+
}
|
|
69
|
+
function ne() {
|
|
70
|
+
const e = T(!1);
|
|
71
|
+
return ee() && te(() => {
|
|
72
|
+
e.value = !0;
|
|
73
|
+
}), e;
|
|
74
|
+
}
|
|
75
|
+
function q(e) {
|
|
76
|
+
const o = ne();
|
|
77
|
+
return g(() => (o.value, !!e()));
|
|
78
|
+
}
|
|
79
|
+
function W(e, o = {}) {
|
|
80
|
+
const { window: r = P } = o, n = q(() => r && "matchMedia" in r && typeof r.matchMedia == "function");
|
|
81
|
+
let s;
|
|
82
|
+
const v = T(!1), u = () => {
|
|
83
|
+
s && ("removeEventListener" in s ? s.removeEventListener("change", t) : s.removeListener(t));
|
|
84
|
+
}, t = () => {
|
|
85
|
+
n.value && (u(), s = r.matchMedia(J(e).value), v.value = !!(s != null && s.matches), s && ("addEventListener" in s ? s.addEventListener("change", t) : s.addListener(t)));
|
|
86
|
+
};
|
|
87
|
+
return Z(t), k(() => u()), v;
|
|
88
|
+
}
|
|
89
|
+
const pe = {
|
|
90
|
+
sm: 640,
|
|
91
|
+
md: 768,
|
|
92
|
+
lg: 1024,
|
|
93
|
+
xl: 1280,
|
|
94
|
+
"2xl": 1536
|
|
95
|
+
};
|
|
96
|
+
function ve(e, o = {}) {
|
|
97
|
+
function r(t, i) {
|
|
98
|
+
let d = e[t];
|
|
99
|
+
return i != null && (d = U(d, i)), typeof d == "number" && (d = `${d}px`), d;
|
|
100
|
+
}
|
|
101
|
+
const { window: n = P } = o;
|
|
102
|
+
function s(t) {
|
|
103
|
+
return n ? n.matchMedia(t).matches : !1;
|
|
104
|
+
}
|
|
105
|
+
const v = (t) => W(`(min-width: ${r(t)})`, o), u = Object.keys(e).reduce((t, i) => (Object.defineProperty(t, i, {
|
|
106
|
+
get: () => v(i),
|
|
107
|
+
enumerable: !0,
|
|
108
|
+
configurable: !0
|
|
109
|
+
}), t), {});
|
|
110
|
+
return Object.assign(u, {
|
|
111
|
+
greater(t) {
|
|
112
|
+
return W(`(min-width: ${r(t, 0.1)})`, o);
|
|
113
|
+
},
|
|
114
|
+
greaterOrEqual: v,
|
|
115
|
+
smaller(t) {
|
|
116
|
+
return W(`(max-width: ${r(t, -0.1)})`, o);
|
|
117
|
+
},
|
|
118
|
+
smallerOrEqual(t) {
|
|
119
|
+
return W(`(max-width: ${r(t)})`, o);
|
|
120
|
+
},
|
|
121
|
+
between(t, i) {
|
|
122
|
+
return W(`(min-width: ${r(t)}) and (max-width: ${r(i, -0.1)})`, o);
|
|
123
|
+
},
|
|
124
|
+
isGreater(t) {
|
|
125
|
+
return s(`(min-width: ${r(t, 0.1)})`);
|
|
126
|
+
},
|
|
127
|
+
isGreaterOrEqual(t) {
|
|
128
|
+
return s(`(min-width: ${r(t)})`);
|
|
129
|
+
},
|
|
130
|
+
isSmaller(t) {
|
|
131
|
+
return s(`(max-width: ${r(t, -0.1)})`);
|
|
132
|
+
},
|
|
133
|
+
isSmallerOrEqual(t) {
|
|
134
|
+
return s(`(max-width: ${r(t)})`);
|
|
135
|
+
},
|
|
136
|
+
isInBetween(t, i) {
|
|
137
|
+
return s(`(min-width: ${r(t)}) and (max-width: ${r(i, -0.1)})`);
|
|
138
|
+
},
|
|
139
|
+
current() {
|
|
140
|
+
const t = Object.keys(e).map((i) => [i, v(i)]);
|
|
141
|
+
return g(() => t.filter(([, i]) => i.value).map(([i]) => i));
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
var Y = Object.getOwnPropertySymbols, re = Object.prototype.hasOwnProperty, oe = Object.prototype.propertyIsEnumerable, se = (e, o) => {
|
|
146
|
+
var r = {};
|
|
147
|
+
for (var n in e)
|
|
148
|
+
re.call(e, n) && o.indexOf(n) < 0 && (r[n] = e[n]);
|
|
149
|
+
if (e != null && Y)
|
|
150
|
+
for (var n of Y(e))
|
|
151
|
+
o.indexOf(n) < 0 && oe.call(e, n) && (r[n] = e[n]);
|
|
152
|
+
return r;
|
|
153
|
+
};
|
|
154
|
+
function me(e, o, r = {}) {
|
|
155
|
+
const n = r, { window: s = P } = n, v = se(n, ["window"]);
|
|
156
|
+
let u;
|
|
157
|
+
const t = q(() => s && "MutationObserver" in s), i = () => {
|
|
158
|
+
u && (u.disconnect(), u = void 0);
|
|
159
|
+
}, d = F(
|
|
160
|
+
() => _(e),
|
|
161
|
+
(m) => {
|
|
162
|
+
i(), t.value && s && m && (u = new MutationObserver(o), u.observe(m, v));
|
|
163
|
+
},
|
|
164
|
+
{ immediate: !0 }
|
|
165
|
+
), p = () => {
|
|
166
|
+
i(), d();
|
|
167
|
+
};
|
|
168
|
+
return k(p), {
|
|
169
|
+
isSupported: t,
|
|
170
|
+
stop: p
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
var z = Object.getOwnPropertySymbols, ie = Object.prototype.hasOwnProperty, le = Object.prototype.propertyIsEnumerable, ae = (e, o) => {
|
|
174
|
+
var r = {};
|
|
175
|
+
for (var n in e)
|
|
176
|
+
ie.call(e, n) && o.indexOf(n) < 0 && (r[n] = e[n]);
|
|
177
|
+
if (e != null && z)
|
|
178
|
+
for (var n of z(e))
|
|
179
|
+
o.indexOf(n) < 0 && le.call(e, n) && (r[n] = e[n]);
|
|
180
|
+
return r;
|
|
181
|
+
};
|
|
182
|
+
function he(e, o, r = {}) {
|
|
183
|
+
const n = r, { window: s = P } = n, v = ae(n, ["window"]);
|
|
184
|
+
let u;
|
|
185
|
+
const t = q(() => s && "ResizeObserver" in s), i = () => {
|
|
186
|
+
u && (u.disconnect(), u = void 0);
|
|
187
|
+
}, d = g(
|
|
188
|
+
() => Array.isArray(e) ? e.map((l) => _(l)) : [_(e)]
|
|
189
|
+
), p = F(
|
|
190
|
+
d,
|
|
191
|
+
(l) => {
|
|
192
|
+
if (i(), t.value && s) {
|
|
193
|
+
u = new ResizeObserver(o);
|
|
194
|
+
for (const a of l)
|
|
195
|
+
a && u.observe(a, v);
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
{ immediate: !0, flush: "post", deep: !0 }
|
|
199
|
+
), m = () => {
|
|
200
|
+
i(), p();
|
|
201
|
+
};
|
|
202
|
+
return k(m), {
|
|
203
|
+
isSupported: t,
|
|
204
|
+
stop: m
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
const V = 1;
|
|
208
|
+
function be(e, o = {}) {
|
|
209
|
+
const {
|
|
210
|
+
throttle: r = 0,
|
|
211
|
+
idle: n = 200,
|
|
212
|
+
onStop: s = j,
|
|
213
|
+
onScroll: v = j,
|
|
214
|
+
offset: u = {
|
|
215
|
+
left: 0,
|
|
216
|
+
right: 0,
|
|
217
|
+
top: 0,
|
|
218
|
+
bottom: 0
|
|
219
|
+
},
|
|
220
|
+
eventListenerOptions: t = {
|
|
221
|
+
capture: !1,
|
|
222
|
+
passive: !0
|
|
223
|
+
},
|
|
224
|
+
behavior: i = "auto"
|
|
225
|
+
} = o, d = T(0), p = T(0), m = g({
|
|
226
|
+
get() {
|
|
227
|
+
return d.value;
|
|
228
|
+
},
|
|
229
|
+
set(f) {
|
|
230
|
+
a(f, void 0);
|
|
231
|
+
}
|
|
232
|
+
}), l = g({
|
|
233
|
+
get() {
|
|
234
|
+
return p.value;
|
|
235
|
+
},
|
|
236
|
+
set(f) {
|
|
237
|
+
a(void 0, f);
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
function a(f, y) {
|
|
241
|
+
var x, A, c;
|
|
242
|
+
const w = L(e);
|
|
243
|
+
w && ((c = w instanceof Document ? document.body : w) == null || c.scrollTo({
|
|
244
|
+
top: (x = L(y)) != null ? x : l.value,
|
|
245
|
+
left: (A = L(f)) != null ? A : m.value,
|
|
246
|
+
behavior: L(i)
|
|
247
|
+
}));
|
|
248
|
+
}
|
|
249
|
+
const h = T(!1), b = D({
|
|
250
|
+
left: !0,
|
|
251
|
+
right: !1,
|
|
252
|
+
top: !0,
|
|
253
|
+
bottom: !1
|
|
254
|
+
}), E = D({
|
|
255
|
+
left: !1,
|
|
256
|
+
right: !1,
|
|
257
|
+
top: !1,
|
|
258
|
+
bottom: !1
|
|
259
|
+
}), I = (f) => {
|
|
260
|
+
h.value && (h.value = !1, E.left = !1, E.right = !1, E.top = !1, E.bottom = !1, s(f));
|
|
261
|
+
}, C = K(I, r + n), R = (f) => {
|
|
262
|
+
const y = f === window ? f.document.documentElement : f === document ? f.documentElement : f, { display: x, flexDirection: A } = getComputedStyle(y), c = y.scrollLeft;
|
|
263
|
+
E.left = c < d.value, E.right = c > d.value;
|
|
264
|
+
const w = Math.abs(c) <= 0 + (u.left || 0), $ = Math.abs(c) + y.clientWidth >= y.scrollWidth - (u.right || 0) - V;
|
|
265
|
+
x === "flex" && A === "row-reverse" ? (b.left = $, b.right = w) : (b.left = w, b.right = $), d.value = c;
|
|
266
|
+
let M = y.scrollTop;
|
|
267
|
+
f === document && !M && (M = document.body.scrollTop), E.top = M < p.value, E.bottom = M > p.value;
|
|
268
|
+
const B = Math.abs(M) <= 0 + (u.top || 0), H = Math.abs(M) + y.clientHeight >= y.scrollHeight - (u.bottom || 0) - V;
|
|
269
|
+
x === "flex" && A === "column-reverse" ? (b.top = H, b.bottom = B) : (b.top = B, b.bottom = H), p.value = M;
|
|
270
|
+
}, O = (f) => {
|
|
271
|
+
const y = f.target === document ? f.target.documentElement : f.target;
|
|
272
|
+
R(y), h.value = !0, C(f), v(f);
|
|
273
|
+
};
|
|
274
|
+
return S(
|
|
275
|
+
e,
|
|
276
|
+
"scroll",
|
|
277
|
+
r ? Q(O, r, !0, !1) : O,
|
|
278
|
+
t
|
|
279
|
+
), S(
|
|
280
|
+
e,
|
|
281
|
+
"scrollend",
|
|
282
|
+
I,
|
|
283
|
+
t
|
|
284
|
+
), {
|
|
285
|
+
x: m,
|
|
286
|
+
y: l,
|
|
287
|
+
isScrolling: h,
|
|
288
|
+
arrivedState: b,
|
|
289
|
+
directions: E,
|
|
290
|
+
measure() {
|
|
291
|
+
const f = L(e);
|
|
292
|
+
f && R(f);
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
function we(e, o = {}) {
|
|
297
|
+
const {
|
|
298
|
+
threshold: r = 50,
|
|
299
|
+
onSwipe: n,
|
|
300
|
+
onSwipeEnd: s,
|
|
301
|
+
onSwipeStart: v,
|
|
302
|
+
passive: u = !0,
|
|
303
|
+
window: t = P
|
|
304
|
+
} = o, i = D({ x: 0, y: 0 }), d = D({ x: 0, y: 0 }), p = g(() => i.x - d.x), m = g(() => i.y - d.y), { max: l, abs: a } = Math, h = g(() => l(a(p.value), a(m.value)) >= r), b = T(!1), E = g(() => h.value ? a(p.value) > a(m.value) ? p.value > 0 ? "left" : "right" : m.value > 0 ? "up" : "down" : "none"), I = (c) => [c.touches[0].clientX, c.touches[0].clientY], C = (c, w) => {
|
|
305
|
+
i.x = c, i.y = w;
|
|
306
|
+
}, R = (c, w) => {
|
|
307
|
+
d.x = c, d.y = w;
|
|
308
|
+
};
|
|
309
|
+
let O;
|
|
310
|
+
const f = ue(t == null ? void 0 : t.document);
|
|
311
|
+
u ? O = f ? { passive: !0 } : { capture: !1 } : O = f ? { passive: !1, capture: !0 } : { capture: !0 };
|
|
312
|
+
const y = (c) => {
|
|
313
|
+
b.value && (s == null || s(c, E.value)), b.value = !1;
|
|
314
|
+
}, x = [
|
|
315
|
+
S(e, "touchstart", (c) => {
|
|
316
|
+
if (c.touches.length !== 1)
|
|
317
|
+
return;
|
|
318
|
+
O.capture && !O.passive && c.preventDefault();
|
|
319
|
+
const [w, $] = I(c);
|
|
320
|
+
C(w, $), R(w, $), v == null || v(c);
|
|
321
|
+
}, O),
|
|
322
|
+
S(e, "touchmove", (c) => {
|
|
323
|
+
if (c.touches.length !== 1)
|
|
324
|
+
return;
|
|
325
|
+
const [w, $] = I(c);
|
|
326
|
+
R(w, $), !b.value && h.value && (b.value = !0), b.value && (n == null || n(c));
|
|
327
|
+
}, O),
|
|
328
|
+
S(e, "touchend", y, O),
|
|
329
|
+
S(e, "touchcancel", y, O)
|
|
330
|
+
];
|
|
331
|
+
return {
|
|
332
|
+
isPassiveEventSupported: f,
|
|
333
|
+
isSwiping: b,
|
|
334
|
+
direction: E,
|
|
335
|
+
coordsStart: i,
|
|
336
|
+
coordsEnd: d,
|
|
337
|
+
lengthX: p,
|
|
338
|
+
lengthY: m,
|
|
339
|
+
stop: () => x.forEach((c) => c())
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
function ue(e) {
|
|
343
|
+
if (!e)
|
|
344
|
+
return !1;
|
|
345
|
+
let o = !1;
|
|
346
|
+
const r = {
|
|
347
|
+
get passive() {
|
|
348
|
+
return o = !0, !1;
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
return e.addEventListener("x", j, r), e.removeEventListener("x", j), o;
|
|
352
|
+
}
|
|
353
|
+
export {
|
|
354
|
+
pe as breakpointsTailwind,
|
|
355
|
+
Oe as createFilterWrapper,
|
|
356
|
+
ge as debounceFilter,
|
|
357
|
+
P as defaultWindow,
|
|
358
|
+
U as increaseWithUnit,
|
|
359
|
+
N as isClient,
|
|
360
|
+
G as isIOS,
|
|
361
|
+
j as noop,
|
|
362
|
+
de as onClickOutside,
|
|
363
|
+
Se as throttleFilter,
|
|
364
|
+
J as toRef,
|
|
365
|
+
L as toValue,
|
|
366
|
+
k as tryOnScopeDispose,
|
|
367
|
+
_ as unrefElement,
|
|
368
|
+
ve as useBreakpoints,
|
|
369
|
+
K as useDebounceFn,
|
|
370
|
+
S as useEventListener,
|
|
371
|
+
W as useMediaQuery,
|
|
372
|
+
ne as useMounted,
|
|
373
|
+
me as useMutationObserver,
|
|
374
|
+
he as useResizeObserver,
|
|
375
|
+
be as useScroll,
|
|
376
|
+
q as useSupported,
|
|
377
|
+
we as useSwipe,
|
|
378
|
+
Q as useThrottleFn
|
|
379
|
+
};
|
package/lib/node_modules/.pnpm/@vueuse_shared@10.2.0_vue@3.3.4/node_modules/@vueuse/shared/index.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { getCurrentScope as y, onScopeDispose as x, unref as F, toRef as P, readonly as R, customRef as b, ref as S } from "vue";
|
|
2
|
+
function C(e) {
|
|
3
|
+
return y() ? (x(e), !0) : !1;
|
|
4
|
+
}
|
|
5
|
+
function w(e) {
|
|
6
|
+
return typeof e == "function" ? e() : F(e);
|
|
7
|
+
}
|
|
8
|
+
const N = typeof window < "u", f = () => {
|
|
9
|
+
}, I = /* @__PURE__ */ O();
|
|
10
|
+
function O() {
|
|
11
|
+
var e;
|
|
12
|
+
return N && ((e = window == null ? void 0 : window.navigator) == null ? void 0 : e.userAgent) && /* @__PURE__ */ /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
13
|
+
}
|
|
14
|
+
function v(e, n) {
|
|
15
|
+
function r(...t) {
|
|
16
|
+
return new Promise((i, o) => {
|
|
17
|
+
Promise.resolve(e(() => n.apply(this, t), { fn: n, thisArg: this, args: t })).then(i).catch(o);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return r;
|
|
21
|
+
}
|
|
22
|
+
function g(e, n = {}) {
|
|
23
|
+
let r, t, i = f;
|
|
24
|
+
const o = (u) => {
|
|
25
|
+
clearTimeout(u), i(), i = f;
|
|
26
|
+
};
|
|
27
|
+
return (u) => {
|
|
28
|
+
const l = w(e), s = w(n.maxWait);
|
|
29
|
+
return r && o(r), l <= 0 || s !== void 0 && s <= 0 ? (t && (o(t), t = null), Promise.resolve(u())) : new Promise((a, p) => {
|
|
30
|
+
i = n.rejectOnCancel ? p : a, s && !t && (t = setTimeout(() => {
|
|
31
|
+
r && o(r), t = null, a(u());
|
|
32
|
+
}, s)), r = setTimeout(() => {
|
|
33
|
+
t && o(t), t = null, a(u());
|
|
34
|
+
}, l);
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function j(e, n = !0, r = !0, t = !1) {
|
|
39
|
+
let i = 0, o, c = !0, u = f, l;
|
|
40
|
+
const s = () => {
|
|
41
|
+
o && (clearTimeout(o), o = void 0, u(), u = f);
|
|
42
|
+
};
|
|
43
|
+
return (p) => {
|
|
44
|
+
const m = w(e), h = Date.now() - i, d = () => l = p();
|
|
45
|
+
return s(), m <= 0 ? (i = Date.now(), d()) : (h > m && (r || !c) ? (i = Date.now(), d()) : n && (l = new Promise((T, D) => {
|
|
46
|
+
u = t ? D : T, o = setTimeout(() => {
|
|
47
|
+
i = Date.now(), c = !0, T(d()), s();
|
|
48
|
+
}, Math.max(0, m - h));
|
|
49
|
+
})), !r && !o && (o = setTimeout(() => c = !0, m)), c = !1, l);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function W(e, n) {
|
|
53
|
+
var r;
|
|
54
|
+
if (typeof e == "number")
|
|
55
|
+
return e + n;
|
|
56
|
+
const t = ((r = e.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : r[0]) || "", i = e.slice(t.length), o = Number.parseFloat(t) + n;
|
|
57
|
+
return Number.isNaN(o) ? e : o + i;
|
|
58
|
+
}
|
|
59
|
+
function _(...e) {
|
|
60
|
+
if (e.length !== 1)
|
|
61
|
+
return P(...e);
|
|
62
|
+
const n = e[0];
|
|
63
|
+
return typeof n == "function" ? R(b(() => ({ get: n, set: f }))) : S(n);
|
|
64
|
+
}
|
|
65
|
+
function V(e, n = 200, r = {}) {
|
|
66
|
+
return v(
|
|
67
|
+
g(n, r),
|
|
68
|
+
e
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
function E(e, n = 200, r = !1, t = !0, i = !1) {
|
|
72
|
+
return v(
|
|
73
|
+
j(n, r, t, i),
|
|
74
|
+
e
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
v as createFilterWrapper,
|
|
79
|
+
g as debounceFilter,
|
|
80
|
+
W as increaseWithUnit,
|
|
81
|
+
N as isClient,
|
|
82
|
+
I as isIOS,
|
|
83
|
+
f as noop,
|
|
84
|
+
j as throttleFilter,
|
|
85
|
+
_ as toRef,
|
|
86
|
+
w as toValue,
|
|
87
|
+
C as tryOnScopeDispose,
|
|
88
|
+
V as useDebounceFn,
|
|
89
|
+
E as useThrottleFn
|
|
90
|
+
};
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.0
|
|
1
|
+
declare const _default: "1.1.0";
|
|
2
2
|
export default _default;
|
package/lib/version.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indielayer/ui",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Indielayer UI Components with Tailwind CSS build for Vue 3",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "João Teixeira",
|
|
@@ -21,74 +21,59 @@
|
|
|
21
21
|
"lib",
|
|
22
22
|
"src",
|
|
23
23
|
"*.d.ts",
|
|
24
|
+
"exports",
|
|
24
25
|
"README.md"
|
|
25
26
|
],
|
|
26
|
-
"main": "lib/index.
|
|
27
|
-
"module": "lib/index.
|
|
28
|
-
"
|
|
27
|
+
"main": "lib/index.umd.js",
|
|
28
|
+
"module": "lib/index.js",
|
|
29
|
+
"types": "lib/index.d.ts",
|
|
29
30
|
"exports": {
|
|
30
31
|
".": {
|
|
31
|
-
"import": "./lib/index.
|
|
32
|
-
"require": "./lib/index.
|
|
32
|
+
"import": "./lib/index.js",
|
|
33
|
+
"require": "./lib/index.umd.js",
|
|
34
|
+
"types": "./lib/index.d.ts"
|
|
33
35
|
},
|
|
34
|
-
"./nuxt": "./
|
|
35
|
-
"./
|
|
36
|
-
"./
|
|
37
|
-
"./
|
|
38
|
-
"./
|
|
39
|
-
"./tailwind.preset": "./lib/tailwind.preset.js",
|
|
40
|
-
"./tailwind.preset.js": "./lib/tailwind.preset.js"
|
|
36
|
+
"./nuxt": "./exports/nuxt.mjs",
|
|
37
|
+
"./nuxt.plugin": "./exports/nuxt.plugin.js",
|
|
38
|
+
"./nuxt.plugin.js": "./exports/nuxt.plugin.js",
|
|
39
|
+
"./tailwind.preset": "./exports/tailwind.preset.js",
|
|
40
|
+
"./tailwind.preset.js": "./exports/tailwind.preset.js"
|
|
41
41
|
},
|
|
42
42
|
"sideEffects": false,
|
|
43
|
-
"scripts": {
|
|
44
|
-
"dev": "vite build --watch",
|
|
45
|
-
"dev2": "pnpm build-only && chokidar \"./src/**\" -c \"pnpm build-only\"",
|
|
46
|
-
"build": "pnpm generate && vite build",
|
|
47
|
-
"build-prod": "pnpm build && pnpm gen-types",
|
|
48
|
-
"build-only": "vite build",
|
|
49
|
-
"generate": "pnpm gen-version",
|
|
50
|
-
"gen-types": "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.vitest.json --composite false",
|
|
51
|
-
"gen-version": "node .scripts/gen-version.js",
|
|
52
|
-
"test": "pnpm test:unit",
|
|
53
|
-
"test:unit": "vitest --environment jsdom",
|
|
54
|
-
"test:e2e": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress open'",
|
|
55
|
-
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress run'",
|
|
56
|
-
"typecheck": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
|
|
57
|
-
"prepublish": "pnpm build-prod"
|
|
58
|
-
},
|
|
59
43
|
"peerDependencies": {
|
|
60
44
|
"tailwindcss": "^3.0.0",
|
|
61
45
|
"vue": "^3.0.0"
|
|
62
46
|
},
|
|
63
47
|
"devDependencies": {
|
|
64
|
-
"@cypress/vite-dev-server": "^
|
|
65
|
-
"@cypress/vue": "^
|
|
66
|
-
"@
|
|
67
|
-
"@
|
|
68
|
-
"@
|
|
69
|
-
"@types/
|
|
70
|
-
"@
|
|
71
|
-
"@vitejs/plugin-vue
|
|
72
|
-
"@
|
|
73
|
-
"@vue/
|
|
74
|
-
"@
|
|
48
|
+
"@cypress/vite-dev-server": "^5.0.5",
|
|
49
|
+
"@cypress/vue": "^5.0.5",
|
|
50
|
+
"@indielayer/stylelint-config": "^1.0.0",
|
|
51
|
+
"@rushstack/eslint-patch": "^1.3.2",
|
|
52
|
+
"@tsconfig/node18": "^2.0.1",
|
|
53
|
+
"@types/jsdom": "^21.1.1",
|
|
54
|
+
"@types/node": "^18.16.18",
|
|
55
|
+
"@vitejs/plugin-vue": "^4.2.3",
|
|
56
|
+
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
|
57
|
+
"@vue/test-utils": "^2.4.0",
|
|
58
|
+
"@vue/tsconfig": "^0.4.0",
|
|
59
|
+
"@vueuse/core": "^10.2.0",
|
|
75
60
|
"autoprefixer": "^10.4.0",
|
|
76
61
|
"c8": "^7.12.0",
|
|
77
|
-
"chokidar-cli": "^3.0.0",
|
|
78
62
|
"clean-css": "^5.3.0",
|
|
79
|
-
"cypress": "^
|
|
80
|
-
"eslint": "^8.
|
|
81
|
-
"eslint-plugin-cypress": "^2.
|
|
82
|
-
"jsdom": "^
|
|
63
|
+
"cypress": "^12.16.0",
|
|
64
|
+
"eslint": "^8.43.0",
|
|
65
|
+
"eslint-plugin-cypress": "^2.13.3",
|
|
66
|
+
"jsdom": "^22.1.0",
|
|
83
67
|
"postcss": "^8.4.4",
|
|
84
|
-
"
|
|
68
|
+
"rollup-plugin-visualizer": "^5.9.2",
|
|
85
69
|
"start-server-and-test": "^1.14.0",
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
"vue
|
|
70
|
+
"stylelint": "^14.16.1",
|
|
71
|
+
"tailwindcss": "^3.3.2",
|
|
72
|
+
"typescript": "^5.2.2",
|
|
73
|
+
"vite": "^4.4.11",
|
|
74
|
+
"vitest": "^0.32.2",
|
|
75
|
+
"vue": "^3.3.4",
|
|
76
|
+
"vue-tsc": "^1.8.2"
|
|
92
77
|
},
|
|
93
78
|
"browserslist": [
|
|
94
79
|
"> 1%",
|
|
@@ -107,5 +92,20 @@
|
|
|
107
92
|
"publishConfig": {
|
|
108
93
|
"access": "public"
|
|
109
94
|
},
|
|
110
|
-
"
|
|
111
|
-
|
|
95
|
+
"scripts": {
|
|
96
|
+
"dev": "pnpm generate && vite build --watch",
|
|
97
|
+
"build": "pnpm generate && vite build",
|
|
98
|
+
"build:prod": "pnpm build && pnpm gen-types",
|
|
99
|
+
"build:only": "vite build",
|
|
100
|
+
"build:stats": "VITE_VISUALIZER=Y npm run build",
|
|
101
|
+
"generate": "pnpm gen-version",
|
|
102
|
+
"gen-types": "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.vitest.json --composite false",
|
|
103
|
+
"gen-version": "node .scripts/gen-version.js",
|
|
104
|
+
"test": "pnpm test:unit",
|
|
105
|
+
"test:unit": "vitest --environment jsdom",
|
|
106
|
+
"test:e2e": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress open'",
|
|
107
|
+
"test:e2e:ci": "start-server-and-test preview http://127.0.0.1:5050/ 'cypress run'",
|
|
108
|
+
"typecheck": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
|
|
109
|
+
"stylelint": "stylelint \"**/*.{css,vue,postcss,scss,sass}\" --ignore-path .gitignore"
|
|
110
|
+
}
|
|
111
|
+
}
|
package/src/common/utils.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
1
2
|
import { unref, isRef } from 'vue'
|
|
2
3
|
|
|
3
|
-
const isObject = (val:
|
|
4
|
-
const isArray = Array.isArray
|
|
4
|
+
export const isObject = (val: unknown): val is object => val !== null && typeof val === 'object'
|
|
5
|
+
export const isArray = (val: unknown): val is [] => Array.isArray(val)
|
|
6
|
+
export const isFunction = (val: unknown): val is Function => typeof val === 'function'
|
|
5
7
|
|
|
6
8
|
/**
|
|
7
9
|
* Deeply unref a value, recursing into objects and arrays.
|
|
@@ -66,3 +68,24 @@ export const unrefObject = (obj: any) => {
|
|
|
66
68
|
|
|
67
69
|
return unreffed
|
|
68
70
|
}
|
|
71
|
+
|
|
72
|
+
export const mergeRightDeep = (source: any = {}, target: any = {}) => {
|
|
73
|
+
const sourceKeys = Object.keys(source)
|
|
74
|
+
const targetKeys = Object.keys(target)
|
|
75
|
+
|
|
76
|
+
const merged = { ...source }
|
|
77
|
+
|
|
78
|
+
targetKeys.forEach((key) => {
|
|
79
|
+
if (sourceKeys.includes(key)) {
|
|
80
|
+
if (isObject(source[key]) && isObject(target[key])) {
|
|
81
|
+
merged[key] = mergeRightDeep(source[key], target[key])
|
|
82
|
+
} else {
|
|
83
|
+
merged[key] = target[key]
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
merged[key] = target[key]
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
return merged
|
|
91
|
+
}
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme'
|
|
2
|
+
import type { AlertProps } from './Alert.vue'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
type InternalClasses = 'wrapper'
|
|
5
|
+
|
|
6
|
+
interface InternalTheme extends ThemeComponent<AlertProps, InternalClasses> {}
|
|
7
|
+
export interface AlertTheme extends Omit<InternalTheme, 'classes'> {
|
|
8
|
+
classes?: Partial<ThemeClasses<AlertProps, InternalClasses>>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const theme: InternalTheme = {
|
|
4
12
|
classes: {
|
|
5
|
-
|
|
6
|
-
wrapper: 'flex rounded-md space-x-2 px-4 py-2 border items-center',
|
|
13
|
+
wrapper: 'flex items-center rounded-md space-x-2 px-4 py-2 border',
|
|
7
14
|
},
|
|
8
|
-
styles: ({ props, colors, css }
|
|
15
|
+
styles: ({ props, colors, css }) => {
|
|
9
16
|
const color = colors.getPalette(props.color)
|
|
10
|
-
const vars
|
|
17
|
+
const vars = []
|
|
11
18
|
|
|
12
19
|
if (props.glow) vars.push(css.get('glow', colors.getColorOpacity(color[500], 0.5)))
|
|
13
20
|
|
|
@@ -55,3 +62,5 @@ export default {
|
|
|
55
62
|
return vars
|
|
56
63
|
},
|
|
57
64
|
}
|
|
65
|
+
|
|
66
|
+
export default theme
|