@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
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme'
|
|
2
|
+
import type { PaginationProps } from './Pagination.vue'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
type InternalClasses = 'wrapper' | 'dots'
|
|
5
|
+
|
|
6
|
+
interface InternalTheme extends ThemeComponent<PaginationProps, InternalClasses> {}
|
|
7
|
+
export interface PaginationTheme extends Omit<InternalTheme, 'classes'> {
|
|
8
|
+
classes?: Partial<ThemeClasses<PaginationProps, InternalClasses>>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const theme: InternalTheme = {
|
|
4
12
|
classes: {
|
|
5
|
-
wrapper: ({ props }
|
|
13
|
+
wrapper: ({ props }) => {
|
|
6
14
|
if (props.variant === 'simple') return 'flex items-center space-x-2'
|
|
7
15
|
else if (props.variant === 'dots') return 'flex space-x-6'
|
|
8
16
|
|
|
9
17
|
return 'flex items-center' // quick variant
|
|
10
18
|
},
|
|
11
19
|
|
|
12
|
-
dots: ({ props }
|
|
20
|
+
dots: ({ props }) => {
|
|
13
21
|
if (props.size === 'xs') return 'h-2 w-2'
|
|
14
22
|
else if (props.size === 'sm') return 'h-3 w-3'
|
|
15
23
|
else if (props.size === 'lg') return 'h-4 w-4'
|
|
@@ -19,9 +27,11 @@ export default {
|
|
|
19
27
|
},
|
|
20
28
|
},
|
|
21
29
|
|
|
22
|
-
styles: ({ props, css, colors }
|
|
30
|
+
styles: ({ props, css, colors }) => {
|
|
23
31
|
const color = colors.getPalette('primary')
|
|
24
32
|
|
|
25
33
|
return css.get('bg', color[500])
|
|
26
34
|
},
|
|
27
35
|
}
|
|
36
|
+
|
|
37
|
+
export default theme
|
|
@@ -1,17 +1,38 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
const paginationVariant = ['simple', 'quick', 'dots'] as const
|
|
3
|
+
const paginationProps = {
|
|
4
|
+
...useCommon.props(),
|
|
5
|
+
links: Boolean,
|
|
6
|
+
totalPages: {
|
|
7
|
+
type: Number,
|
|
8
|
+
default: 1,
|
|
9
|
+
},
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: Number,
|
|
12
|
+
default: 1,
|
|
13
|
+
},
|
|
14
|
+
variant: {
|
|
15
|
+
type: String as PropType<PaginationVariant>,
|
|
16
|
+
default: 'simple',
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export type PaginationVariant = typeof paginationVariant[number]
|
|
21
|
+
export type PaginationProps = ExtractPublicPropTypes<typeof paginationProps>
|
|
3
22
|
|
|
4
23
|
export default {
|
|
5
24
|
name: 'XPagination',
|
|
6
25
|
validators: {
|
|
7
26
|
...useCommon.validators(),
|
|
27
|
+
variant: paginationVariant,
|
|
8
28
|
},
|
|
9
29
|
}
|
|
10
30
|
</script>
|
|
11
31
|
|
|
12
32
|
<script setup lang="ts">
|
|
13
|
-
import { computed, ref, watch, type PropType } from 'vue'
|
|
33
|
+
import { computed, ref, watch, type PropType, type ExtractPublicPropTypes } from 'vue'
|
|
14
34
|
import { useTheme } from '../../composables/theme'
|
|
35
|
+
import { useCommon } from '../../composables/common'
|
|
15
36
|
import { dotsIcon, prevIcon, nextIcon } from '../../common/icons'
|
|
16
37
|
|
|
17
38
|
import XIcon from '../../components/icon/Icon.vue'
|
|
@@ -21,22 +42,7 @@ import XPaginationItem from './PaginationItem.vue'
|
|
|
21
42
|
|
|
22
43
|
import theme from './Pagination.theme'
|
|
23
44
|
|
|
24
|
-
const props = defineProps(
|
|
25
|
-
...useCommon.props(),
|
|
26
|
-
links: Boolean,
|
|
27
|
-
totalPages: {
|
|
28
|
-
type: Number,
|
|
29
|
-
default: 1,
|
|
30
|
-
},
|
|
31
|
-
modelValue: {
|
|
32
|
-
type: Number,
|
|
33
|
-
default: 1,
|
|
34
|
-
},
|
|
35
|
-
variant: {
|
|
36
|
-
type: String as PropType<'simple' | 'quick' | 'dots'>,
|
|
37
|
-
default: 'simple',
|
|
38
|
-
},
|
|
39
|
-
})
|
|
45
|
+
const props = defineProps(paginationProps)
|
|
40
46
|
|
|
41
47
|
const emit = defineEmits(['update:modelValue'])
|
|
42
48
|
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme'
|
|
2
|
+
import type { PaginationItemProps } from './PaginationItem.vue'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
type InternalClasses = 'wrapper'
|
|
5
|
+
|
|
6
|
+
interface InternalTheme extends ThemeComponent<PaginationItemProps, InternalClasses> {}
|
|
7
|
+
export interface PaginationItemTheme extends Omit<InternalTheme, 'classes'> {
|
|
8
|
+
classes?: Partial<ThemeClasses<PaginationItemProps, InternalClasses>>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const theme: InternalTheme = {
|
|
4
12
|
classes: {
|
|
5
|
-
wrapper: ({ props }
|
|
13
|
+
wrapper: ({ props }) => {
|
|
6
14
|
if (props.size === 'xs') return '!leading-none !p-1 min-w-[1.375rem]'
|
|
7
15
|
else if (props.size === 'sm') return '!leading-none !p-2 min-w-[2rem]'
|
|
8
16
|
else if (props.size === 'lg') return '!leading-none !p-3 min-w-[2.75rem]'
|
|
@@ -12,3 +20,5 @@ export default {
|
|
|
12
20
|
},
|
|
13
21
|
},
|
|
14
22
|
}
|
|
23
|
+
|
|
24
|
+
export default theme
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
const paginationItemProps = {
|
|
3
|
+
...useCommon.props(),
|
|
4
|
+
value: {
|
|
5
|
+
type: Number,
|
|
6
|
+
default: 0,
|
|
7
|
+
},
|
|
8
|
+
selected: Boolean,
|
|
9
|
+
links: Boolean,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type PaginationItemProps = ExtractPublicPropTypes<typeof paginationItemProps>
|
|
3
13
|
|
|
4
14
|
export default {
|
|
5
15
|
name: 'XPaginationItem',
|
|
@@ -11,20 +21,14 @@ export default {
|
|
|
11
21
|
|
|
12
22
|
<script setup lang="ts">
|
|
13
23
|
import { useTheme } from '../../composables/theme'
|
|
24
|
+
import { useCommon } from '../../composables/common'
|
|
14
25
|
|
|
15
26
|
import XButton from '../button/Button.vue'
|
|
16
27
|
|
|
17
28
|
import theme from './PaginationItem.theme'
|
|
29
|
+
import type { ExtractPublicPropTypes } from 'vue'
|
|
18
30
|
|
|
19
|
-
const props = defineProps(
|
|
20
|
-
...useCommon.props(),
|
|
21
|
-
value: {
|
|
22
|
-
type: Number,
|
|
23
|
-
default: 0,
|
|
24
|
-
},
|
|
25
|
-
selected: Boolean,
|
|
26
|
-
links: Boolean,
|
|
27
|
-
})
|
|
31
|
+
const props = defineProps(paginationItemProps)
|
|
28
32
|
|
|
29
33
|
const emit = defineEmits(['input'])
|
|
30
34
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as XPagination } from './Pagination.vue'
|
|
2
|
+
export type { PaginationProps, PaginationVariant } from './Pagination.vue'
|
|
3
|
+
export type { PaginationTheme } from './Pagination.theme'
|
|
4
|
+
|
|
5
|
+
export { default as XPaginationItem } from './PaginationItem.vue'
|
|
6
|
+
export type { PaginationItemProps } from './PaginationItem.vue'
|
|
7
|
+
export type { PaginationItemTheme } from './PaginationItem.theme'
|
|
@@ -1,9 +1,19 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme'
|
|
2
|
+
import type { PopoverProps } from './Popover.vue'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
type InternalClasses = 'wrapper' | 'content'
|
|
5
|
+
|
|
6
|
+
interface InternalTheme extends ThemeComponent<PopoverProps, InternalClasses> {}
|
|
7
|
+
export interface PopoverTheme extends Omit<InternalTheme, 'classes'> {
|
|
8
|
+
classes?: Partial<ThemeClasses<PopoverProps, InternalClasses>>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const theme: InternalTheme = {
|
|
4
12
|
classes: {
|
|
5
13
|
wrapper: 'inline-block relative',
|
|
6
14
|
|
|
7
15
|
content: 'max-w-xs',
|
|
8
16
|
},
|
|
9
17
|
}
|
|
18
|
+
|
|
19
|
+
export default theme
|
|
@@ -1,32 +1,19 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
const validators = {
|
|
3
|
-
align: ['bottom','center','left','right','top'],
|
|
4
|
-
position: ['bottom','left','right','top'],
|
|
3
|
+
align: ['bottom', 'center', 'left', 'right', 'top'] as const,
|
|
4
|
+
position: ['bottom', 'left', 'right', 'top'] as const,
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
name: 'XPopover',
|
|
9
|
-
validators,
|
|
10
|
-
}
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<script setup lang="ts">
|
|
14
|
-
import { computed, ref, useCssModule, watch, type PropType } from 'vue'
|
|
15
|
-
import { onClickOutside, useEventListener } from '@vueuse/core'
|
|
16
|
-
import { useTheme } from '../../composables/theme'
|
|
17
|
-
|
|
18
|
-
import theme from './Popover.theme'
|
|
19
|
-
|
|
20
|
-
const props = defineProps({
|
|
7
|
+
const popoverProps = {
|
|
21
8
|
align: {
|
|
22
|
-
type: String as PropType<
|
|
9
|
+
type: String as PropType<PopoverAlign>,
|
|
23
10
|
default: 'center',
|
|
24
|
-
validator: (value: string) => validators.align.includes(value),
|
|
11
|
+
validator: (value: string) => validators.align.includes(value as PopoverAlign),
|
|
25
12
|
},
|
|
26
13
|
position: {
|
|
27
|
-
type: String as PropType<
|
|
14
|
+
type: String as PropType<PopoverPosition>,
|
|
28
15
|
default: 'bottom',
|
|
29
|
-
validator: (value: string) => validators.position.includes(value),
|
|
16
|
+
validator: (value: string) => validators.position.includes(value as PopoverPosition),
|
|
30
17
|
},
|
|
31
18
|
dismissOnClick: {
|
|
32
19
|
type: Boolean,
|
|
@@ -39,7 +26,26 @@ const props = defineProps({
|
|
|
39
26
|
disabled: Boolean,
|
|
40
27
|
hover: Boolean,
|
|
41
28
|
block: Boolean,
|
|
42
|
-
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type PopoverAlign = typeof validators.align[number]
|
|
32
|
+
export type PopoverPosition = typeof validators.position[number]
|
|
33
|
+
export type PopoverProps = ExtractPublicPropTypes<typeof popoverProps>
|
|
34
|
+
|
|
35
|
+
export default {
|
|
36
|
+
name: 'XPopover',
|
|
37
|
+
validators,
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<script setup lang="ts">
|
|
42
|
+
import { computed, ref, useCssModule, watch, type PropType, type ExtractPublicPropTypes } from 'vue'
|
|
43
|
+
import { onClickOutside, useEventListener } from '@vueuse/core'
|
|
44
|
+
import { useTheme } from '../../composables/theme'
|
|
45
|
+
|
|
46
|
+
import theme from './Popover.theme'
|
|
47
|
+
|
|
48
|
+
const props = defineProps(popoverProps)
|
|
43
49
|
|
|
44
50
|
const emit = defineEmits(['open', 'close', 'toggle'])
|
|
45
51
|
|
|
@@ -47,7 +53,7 @@ const elRef = ref<HTMLElement | null>(null)
|
|
|
47
53
|
const contentRef = ref<HTMLElement | null>(null)
|
|
48
54
|
const isOpen = ref(false)
|
|
49
55
|
|
|
50
|
-
let stopClickOutside: undefined | (()=> void) = undefined
|
|
56
|
+
let stopClickOutside: undefined | (() => void) = undefined
|
|
51
57
|
|
|
52
58
|
watch(isOpen, (newValue) => {
|
|
53
59
|
if (props.hover) return
|
|
@@ -101,10 +107,10 @@ const contentClasses = computed(() => {
|
|
|
101
107
|
else if ((position === 'top' || position === 'bottom')) align = 'right'
|
|
102
108
|
}
|
|
103
109
|
|
|
104
|
-
if (position === 'top') c.push(`bottom-full ${$style
|
|
105
|
-
if (position === 'bottom') c.push(`top-full bottom-0 ${$style
|
|
106
|
-
if (position === 'right') c.push(`left-full ${$style
|
|
107
|
-
if (position === 'left') c.push(`right-full left-auto ${$style
|
|
110
|
+
if (position === 'top') c.push(`bottom-full ${$style['popover-top']}`)
|
|
111
|
+
if (position === 'bottom') c.push(`top-full bottom-0 ${$style['popover-bottom']}`)
|
|
112
|
+
if (position === 'right') c.push(`left-full ${$style['popover-right']}`)
|
|
113
|
+
if (position === 'left') c.push(`right-full left-auto ${$style['popover-left']}`)
|
|
108
114
|
|
|
109
115
|
if (align === 'left' && ['bottom', 'top'].includes(position)) c.push('left-0 right-auto')
|
|
110
116
|
if (align === 'center' && ['bottom', 'top'].includes(position)) c.push('left-1/2 right-auto -translate-x-1/2')
|
|
@@ -185,7 +191,7 @@ defineExpose({ open, close, toggle, isOpen })
|
|
|
185
191
|
ref="contentRef"
|
|
186
192
|
class="absolute transform transition-transform z-40 h-fit"
|
|
187
193
|
:class="[
|
|
188
|
-
$style
|
|
194
|
+
$style['popover-content'],
|
|
189
195
|
contentClasses,
|
|
190
196
|
classes.content
|
|
191
197
|
]"
|
|
@@ -198,48 +204,52 @@ defineExpose({ open, close, toggle, isOpen })
|
|
|
198
204
|
|
|
199
205
|
<style lang="postcss" module>
|
|
200
206
|
.popover {
|
|
201
|
-
.
|
|
207
|
+
.popover-content {
|
|
202
208
|
visibility: hidden;
|
|
203
|
-
transition-duration: .1s;
|
|
204
|
-
transition-timing-function: cubic-bezier(.4,0,1,1);
|
|
209
|
+
transition-duration: 0.1s;
|
|
210
|
+
transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
|
|
205
211
|
}
|
|
206
|
-
|
|
212
|
+
|
|
213
|
+
.popover-top {
|
|
207
214
|
--tw-translate-y: 0.5rem;
|
|
208
215
|
}
|
|
209
|
-
|
|
216
|
+
|
|
217
|
+
.popover-right {
|
|
210
218
|
--tw-translate-x: -0.5rem;
|
|
211
219
|
}
|
|
212
|
-
|
|
220
|
+
|
|
221
|
+
.popover-bottom {
|
|
213
222
|
--tw-translate-y: -0.5rem;
|
|
214
223
|
}
|
|
215
|
-
|
|
224
|
+
|
|
225
|
+
.popover-left {
|
|
216
226
|
--tw-translate-x: 0.5rem;
|
|
217
227
|
}
|
|
218
228
|
|
|
219
|
-
&.
|
|
220
|
-
&.
|
|
229
|
+
&.is-open .popover-content,
|
|
230
|
+
&.hover:hover .popover-content {
|
|
221
231
|
visibility: visible;
|
|
222
|
-
transition-duration: .15s;
|
|
223
|
-
transition-timing-function: cubic-bezier(0,0
|
|
232
|
+
transition-duration: 0.15s;
|
|
233
|
+
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
224
234
|
}
|
|
225
235
|
|
|
226
|
-
&.
|
|
227
|
-
&.
|
|
236
|
+
&.is-open .popover-top,
|
|
237
|
+
&.hover:hover .popover-top {
|
|
228
238
|
--tw-translate-y: -0.25rem;
|
|
229
239
|
}
|
|
230
240
|
|
|
231
|
-
&.
|
|
232
|
-
&.
|
|
241
|
+
&.is-open .popover-right,
|
|
242
|
+
&.hover:hover .popover-right {
|
|
233
243
|
--tw-translate-x: 0.25rem;
|
|
234
244
|
}
|
|
235
245
|
|
|
236
|
-
&.
|
|
237
|
-
&.
|
|
246
|
+
&.is-open .popover-bottom,
|
|
247
|
+
&.hover:hover .popover-bottom {
|
|
238
248
|
--tw-translate-y: 0.25rem;
|
|
239
249
|
}
|
|
240
250
|
|
|
241
|
-
&.
|
|
242
|
-
&.
|
|
251
|
+
&.is-open .popover-left,
|
|
252
|
+
&.hover:hover .popover-left {
|
|
243
253
|
--tw-translate-x: -0.25rem;
|
|
244
254
|
}
|
|
245
255
|
}
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme'
|
|
2
|
+
import type { PopoverContainerProps } from './PopoverContainer.vue'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
type InternalClasses = 'wrapper'
|
|
5
|
+
|
|
6
|
+
interface InternalTheme extends ThemeComponent<PopoverContainerProps, InternalClasses> {}
|
|
7
|
+
export interface PopoverContainerTheme extends Omit<InternalTheme, 'classes'> {
|
|
8
|
+
classes?: Partial<ThemeClasses<PopoverContainerProps, InternalClasses>>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const theme: InternalTheme = {
|
|
4
12
|
classes: {
|
|
5
13
|
wrapper: 'block w-full bg-white dark:bg-gray-700 shadow-lg rounded-md border border-gray-200 dark:border-gray-800',
|
|
6
14
|
},
|
|
7
15
|
}
|
|
16
|
+
|
|
17
|
+
export default theme
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
const popoverContainerProps = {
|
|
3
|
+
tag: {
|
|
4
|
+
default: 'div',
|
|
5
|
+
type: String,
|
|
6
|
+
},
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type PopoverContainerProps = ExtractPublicPropTypes<typeof popoverContainerProps>
|
|
10
|
+
|
|
2
11
|
export default { name: 'XPopoverContainer' }
|
|
3
12
|
</script>
|
|
4
13
|
|
|
5
14
|
<script setup lang="ts">
|
|
15
|
+
import type { ExtractPublicPropTypes } from 'vue'
|
|
6
16
|
import { useTheme } from '../../composables/theme'
|
|
7
17
|
|
|
8
18
|
import theme from './PopoverContainer.theme'
|
|
9
19
|
|
|
10
|
-
const props = defineProps(
|
|
11
|
-
tag: {
|
|
12
|
-
default: 'div',
|
|
13
|
-
type: String,
|
|
14
|
-
},
|
|
15
|
-
})
|
|
20
|
+
const props = defineProps(popoverContainerProps)
|
|
16
21
|
|
|
17
22
|
const { styles, classes, className } = useTheme('popover-container', theme, props)
|
|
18
23
|
</script>
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
|
|
5
|
+
export { default as XPopoverContainer } from './PopoverContainer.vue'
|
|
6
|
+
export type { PopoverContainerProps } from './PopoverContainer.vue'
|
|
7
|
+
export type { PopoverContainerTheme } from './PopoverContainer.theme'
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme'
|
|
2
|
+
import type { ProgressProps } from './Progress.vue'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
type InternalClasses = 'wrapper' | 'list' | 'item'
|
|
5
|
+
|
|
6
|
+
interface InternalTheme extends ThemeComponent<ProgressProps, InternalClasses> {}
|
|
7
|
+
export interface ProgressTheme extends Omit<InternalTheme, 'classes'> {
|
|
8
|
+
classes?: Partial<ThemeClasses<ProgressProps, InternalClasses>>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const theme: InternalTheme = {
|
|
4
12
|
classes: {
|
|
5
|
-
wrapper: ({ props }
|
|
13
|
+
wrapper: ({ props }) => `relative rounded bg-gray-100 dark:bg-gray-700 overflow-hidden pointer-events-none ${props.thick ? 'h-1.5' : 'h-1'}`,
|
|
6
14
|
|
|
7
15
|
list: 'flex flex-col items-end w-full sm:w-[520px] px-4',
|
|
8
16
|
|
|
9
17
|
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',
|
|
10
18
|
},
|
|
11
19
|
|
|
12
|
-
styles: ({ props, colors, css }
|
|
20
|
+
styles: ({ props, colors, css }) => {
|
|
13
21
|
const color = colors.getPalette(props.color)
|
|
14
22
|
const vars = []
|
|
15
23
|
|
|
@@ -24,3 +32,5 @@ export default {
|
|
|
24
32
|
return vars
|
|
25
33
|
},
|
|
26
34
|
}
|
|
35
|
+
|
|
36
|
+
export default theme
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
3
|
-
</script>
|
|
4
|
-
|
|
5
|
-
<script setup lang="ts">
|
|
6
|
-
import { useColors } from '../../composables/colors'
|
|
7
|
-
import { useTheme } from '../../composables/theme'
|
|
8
|
-
|
|
9
|
-
import theme from './Progress.theme'
|
|
10
|
-
|
|
11
|
-
const props = defineProps({
|
|
2
|
+
const progressProps = {
|
|
12
3
|
...useColors.props('primary'),
|
|
13
4
|
percentage: {
|
|
14
5
|
type: Number,
|
|
15
6
|
default: 0,
|
|
16
7
|
validator: (value: number) => value >= 0 && value <= 100,
|
|
17
8
|
},
|
|
18
|
-
// variant: {
|
|
19
|
-
// type: String as PropType<'bar' | 'score'>,
|
|
20
|
-
// default: 'bar',
|
|
21
|
-
// validator: (value: string) => validators.variant.includes(value),
|
|
22
|
-
// },
|
|
23
9
|
gradient: Boolean,
|
|
24
10
|
animate: {
|
|
25
11
|
type: Boolean,
|
|
26
12
|
default: true,
|
|
27
13
|
},
|
|
28
14
|
thick: Boolean,
|
|
29
|
-
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type ProgressProps = ExtractPublicPropTypes<typeof progressProps>
|
|
18
|
+
|
|
19
|
+
export default { name: 'XProgress' }
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script setup lang="ts">
|
|
23
|
+
import type { ExtractPublicPropTypes } from 'vue'
|
|
24
|
+
import { useColors } from '../../composables/colors'
|
|
25
|
+
import { useTheme } from '../../composables/theme'
|
|
26
|
+
|
|
27
|
+
import theme from './Progress.theme'
|
|
28
|
+
|
|
29
|
+
const props = defineProps(progressProps)
|
|
30
30
|
|
|
31
31
|
const { styles, classes, className } = useTheme('progress', theme, props)
|
|
32
32
|
</script>
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Ref } from 'vue'
|
|
2
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme'
|
|
3
|
+
import type { RadioProps } from './Radio.vue'
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
type InternalClasses = 'wrapper' | 'circle' | 'circleIcon' | 'label' | 'content'
|
|
6
|
+
type InternalExtraData = { selected: Ref<boolean>; }
|
|
7
|
+
|
|
8
|
+
interface InternalTheme extends ThemeComponent<RadioProps, InternalClasses, InternalExtraData> {}
|
|
9
|
+
export interface RadioTheme extends Omit<InternalTheme, 'classes'> {
|
|
10
|
+
classes?: Partial<ThemeClasses<RadioProps, InternalClasses, InternalExtraData>>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const theme: InternalTheme = {
|
|
4
14
|
classes: {
|
|
5
15
|
wrapper: 'inline-block relative cursor-pointer focus:outline-none group',
|
|
6
16
|
|
|
7
|
-
circle: ({ props }
|
|
17
|
+
circle: ({ props }) => {
|
|
8
18
|
let c = 'rounded-full flex justify-center items-center shrink-0 border-2 outline-offset-2 outline-slate-300 dark:outline-slate-500 group-focus:outline-1 group-focus:outline'
|
|
9
19
|
|
|
10
20
|
if (props.size === 'xs' || props.size === 'sm') c += ' h-4 w-4'
|
|
@@ -14,7 +24,7 @@ export default {
|
|
|
14
24
|
return c
|
|
15
25
|
},
|
|
16
26
|
|
|
17
|
-
circleIcon: ({ props, data }
|
|
27
|
+
circleIcon: ({ props, data }) => {
|
|
18
28
|
const c = []
|
|
19
29
|
|
|
20
30
|
if (!data.selected) c.push('opacity-0')
|
|
@@ -27,7 +37,7 @@ export default {
|
|
|
27
37
|
return c
|
|
28
38
|
},
|
|
29
39
|
|
|
30
|
-
label: ({ props, data }
|
|
40
|
+
label: ({ props, data }) => {
|
|
31
41
|
let c = 'font-medium text-gray-800 dark:text-gray-200 pl-2'
|
|
32
42
|
|
|
33
43
|
if (props.size === 'xs') c += ' text-xs'
|
|
@@ -38,7 +48,7 @@ export default {
|
|
|
38
48
|
return c
|
|
39
49
|
},
|
|
40
50
|
|
|
41
|
-
content: ({ props }
|
|
51
|
+
content: ({ props }) => {
|
|
42
52
|
let c = 'pl-2'
|
|
43
53
|
|
|
44
54
|
if (props.size === 'xs') c += ' text-xs'
|
|
@@ -50,7 +60,7 @@ export default {
|
|
|
50
60
|
},
|
|
51
61
|
},
|
|
52
62
|
|
|
53
|
-
styles: ({ props, colors, css, data }
|
|
63
|
+
styles: ({ props, colors, css, data }) => {
|
|
54
64
|
const gray = colors.getPalette('gray')
|
|
55
65
|
const color = colors.getPalette(props.color)
|
|
56
66
|
const vars = []
|
|
@@ -119,3 +129,5 @@ export default {
|
|
|
119
129
|
return vars
|
|
120
130
|
},
|
|
121
131
|
}
|
|
132
|
+
|
|
133
|
+
export default theme
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
const radioProps = {
|
|
3
|
+
...useCommon.props(),
|
|
4
|
+
...useColors.props('primary'),
|
|
5
|
+
...useInteractive.props(),
|
|
6
|
+
...useInputtable.props(),
|
|
7
|
+
value: [String, Number, Boolean, Function, Object, Array],
|
|
8
|
+
label: String,
|
|
9
|
+
helper: String,
|
|
10
|
+
glow: Boolean,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type RadioProps = ExtractPublicPropTypes<typeof radioProps>
|
|
14
|
+
|
|
15
|
+
export default {
|
|
16
|
+
name: 'XRadio',
|
|
17
|
+
validators: {
|
|
18
|
+
...useCommon.validators(),
|
|
19
|
+
},
|
|
20
|
+
}
|
|
3
21
|
</script>
|
|
4
22
|
|
|
5
23
|
<script setup lang="ts">
|
|
6
|
-
import { computed, ref } from 'vue'
|
|
24
|
+
import { computed, ref, type ExtractPublicPropTypes } from 'vue'
|
|
7
25
|
import { useCommon } from '../../composables/common'
|
|
8
26
|
import { useTheme } from '../../composables/theme'
|
|
9
27
|
import { useColors } from '../../composables/colors'
|
|
@@ -15,16 +33,7 @@ import XInputError from '../helpers/InputError'
|
|
|
15
33
|
|
|
16
34
|
import theme from './Radio.theme'
|
|
17
35
|
|
|
18
|
-
const props = defineProps(
|
|
19
|
-
...useCommon.props(),
|
|
20
|
-
...useColors.props('primary'),
|
|
21
|
-
...useInteractive.props(),
|
|
22
|
-
...useInputtable.props(),
|
|
23
|
-
value: [String, Number, Boolean, Function, Object, Array],
|
|
24
|
-
label: String,
|
|
25
|
-
helper: String,
|
|
26
|
-
glow: Boolean,
|
|
27
|
-
})
|
|
36
|
+
const props = defineProps(radioProps)
|
|
28
37
|
|
|
29
38
|
const emit = defineEmits(useInputtable.emits(false))
|
|
30
39
|
|
|
@@ -128,10 +137,11 @@ defineExpose({ focus, blur, reset, validate, setError })
|
|
|
128
137
|
}
|
|
129
138
|
|
|
130
139
|
&--glow {
|
|
131
|
-
box-shadow: 0 0 #000, 0 0 #000, 0 10px 15px -3px var(--x-radio-glow),0 4px 6px -4px var(--x-radio-glow);
|
|
140
|
+
box-shadow: 0 0 #000, 0 0 #000, 0 10px 15px -3px var(--x-radio-glow), 0 4px 6px -4px var(--x-radio-glow);
|
|
132
141
|
}
|
|
133
142
|
|
|
134
|
-
:global(.dark) &,
|
|
143
|
+
:global(.dark) &,
|
|
144
|
+
&:global(.dark) {
|
|
135
145
|
border-color: var(--x-radio-dark-border);
|
|
136
146
|
background-color: var(--x-radio-dark-bg);
|
|
137
147
|
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme'
|
|
2
|
+
import type { ScrollProps } from './Scroll.vue'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
type InternalClasses = 'wrapper'
|
|
5
|
+
|
|
6
|
+
interface InternalTheme extends ThemeComponent<ScrollProps, InternalClasses> {}
|
|
7
|
+
export interface ScrollTheme extends Omit<InternalTheme, 'classes'> {
|
|
8
|
+
classes?: Partial<ThemeClasses<ScrollProps, InternalClasses>>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const theme: InternalTheme = {
|
|
4
12
|
classes: {
|
|
5
13
|
wrapper: '',
|
|
6
14
|
},
|
|
7
15
|
}
|
|
16
|
+
|
|
17
|
+
export default theme
|