@indielayer/ui 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/{src/exports/nuxt.js → exports/nuxt.mjs} +1 -1
- package/{lib → exports}/nuxt.plugin.js +1 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +9 -0
- package/lib/common/icons.js +18 -0
- package/lib/common/utils.d.ts +4 -0
- package/lib/common/utils.js +25 -0
- package/lib/components/alert/Alert.theme.d.ts +10 -8
- package/lib/components/alert/Alert.theme.js +41 -0
- package/lib/components/alert/Alert.vue.d.ts +33 -7
- package/lib/components/alert/Alert.vue.js +9 -0
- package/lib/components/alert/Alert.vue2.js +62 -0
- package/lib/components/alert/Alert.vue3.js +8 -0
- package/lib/components/alert/index.d.ts +3 -0
- package/lib/components/avatar/Avatar.theme.d.ts +13 -7
- package/lib/components/avatar/Avatar.theme.js +25 -0
- package/lib/components/avatar/Avatar.vue.d.ts +32 -3
- package/lib/components/avatar/Avatar.vue.js +9 -0
- package/lib/components/avatar/Avatar.vue2.js +76 -0
- package/lib/components/avatar/Avatar.vue3.js +7 -0
- package/lib/components/avatar/index.d.ts +3 -0
- package/lib/components/badge/Badge.theme.d.ts +10 -8
- package/lib/components/badge/Badge.theme.js +12 -0
- package/lib/components/badge/Badge.vue.d.ts +54 -9
- package/lib/components/badge/Badge.vue.js +94 -0
- package/lib/components/badge/Badge.vue2.js +4 -0
- package/lib/components/badge/index.d.ts +3 -0
- package/lib/components/breadcrumbs/Breadcrumbs.theme.d.ts +10 -8
- package/lib/components/breadcrumbs/Breadcrumbs.theme.js +10 -0
- package/lib/components/breadcrumbs/Breadcrumbs.vue.d.ts +20 -6
- package/lib/components/breadcrumbs/Breadcrumbs.vue.js +79 -0
- package/lib/components/breadcrumbs/Breadcrumbs.vue2.js +4 -0
- package/lib/components/breadcrumbs/index.d.ts +3 -0
- package/lib/components/button/Button.theme.d.ts +12 -9
- package/lib/components/button/Button.theme.js +138 -0
- package/lib/components/button/Button.vue.d.ts +49 -8
- package/lib/components/button/Button.vue.js +9 -0
- package/lib/components/button/Button.vue2.js +115 -0
- package/lib/components/button/Button.vue3.js +8 -0
- package/lib/components/button/ButtonGroup.theme.d.ts +12 -5
- package/lib/components/button/ButtonGroup.theme.js +8 -0
- package/lib/components/button/ButtonGroup.vue.d.ts +44 -6
- package/lib/components/button/ButtonGroup.vue.js +9 -0
- package/lib/components/button/ButtonGroup.vue2.js +54 -0
- package/lib/components/button/ButtonGroup.vue3.js +7 -0
- package/lib/components/button/index.d.ts +6 -0
- package/lib/components/card/Card.theme.d.ts +10 -7
- package/lib/components/card/Card.theme.js +8 -0
- package/lib/components/card/Card.vue.d.ts +17 -1
- package/lib/components/card/Card.vue.js +31 -0
- package/lib/components/card/Card.vue2.js +4 -0
- package/lib/components/card/index.d.ts +3 -0
- package/lib/components/checkbox/Checkbox.theme.d.ts +13 -10
- package/lib/components/checkbox/Checkbox.theme.js +52 -0
- package/lib/components/checkbox/Checkbox.vue.d.ts +46 -7
- package/lib/components/checkbox/Checkbox.vue.js +9 -0
- package/lib/components/checkbox/Checkbox.vue2.js +108 -0
- package/lib/components/checkbox/Checkbox.vue3.js +6 -0
- package/lib/components/checkbox/index.d.ts +3 -0
- package/lib/components/collapse/Collapse.theme.d.ts +10 -9
- package/lib/components/collapse/Collapse.theme.js +10 -0
- package/lib/components/collapse/Collapse.vue.d.ts +32 -2
- package/lib/components/collapse/Collapse.vue.js +132 -0
- package/lib/components/collapse/Collapse.vue2.js +4 -0
- package/lib/components/collapse/index.d.ts +3 -0
- package/lib/components/container/Container.theme.d.ts +10 -6
- package/lib/components/container/Container.theme.js +8 -0
- package/lib/components/container/Container.vue.d.ts +16 -1
- package/lib/components/container/Container.vue.js +30 -0
- package/lib/components/container/Container.vue2.js +4 -0
- package/lib/components/container/index.d.ts +3 -0
- package/lib/components/divider/Divider.theme.d.ts +10 -9
- package/lib/components/divider/Divider.theme.js +10 -0
- package/lib/components/divider/Divider.vue.d.ts +7 -1
- package/lib/components/divider/Divider.vue.js +53 -0
- package/lib/components/divider/Divider.vue2.js +4 -0
- package/lib/components/divider/index.d.ts +3 -0
- package/lib/components/drawer/Drawer.theme.d.ts +10 -7
- package/lib/components/drawer/Drawer.theme.js +9 -0
- package/lib/components/drawer/Drawer.vue.d.ts +50 -14
- package/lib/components/drawer/Drawer.vue.js +171 -0
- package/lib/components/drawer/Drawer.vue2.js +4 -0
- package/lib/components/drawer/index.d.ts +3 -0
- package/lib/components/form/Form.theme.d.ts +10 -6
- package/lib/components/form/Form.theme.js +8 -0
- package/lib/components/form/Form.vue.d.ts +34 -6
- package/lib/components/form/Form.vue.js +79 -0
- package/lib/components/form/Form.vue2.js +4 -0
- package/lib/components/form/index.d.ts +3 -0
- package/lib/components/helpers/InputError.d.ts +2 -2
- package/lib/components/helpers/InputError.js +18 -0
- package/lib/components/icon/Icon.theme.d.ts +10 -7
- package/lib/components/icon/Icon.theme.js +11 -0
- package/lib/components/icon/Icon.vue.d.ts +22 -4
- package/lib/components/icon/Icon.vue.js +74 -0
- package/lib/components/icon/Icon.vue2.js +4 -0
- package/lib/components/icon/index.d.ts +3 -0
- package/lib/components/image/Image.theme.d.ts +10 -6
- package/lib/components/image/Image.theme.js +8 -0
- package/lib/components/image/Image.vue.d.ts +6 -1
- package/lib/components/image/Image.vue.js +32 -0
- package/lib/components/image/Image.vue2.js +4 -0
- package/lib/components/image/index.d.ts +3 -0
- package/lib/components/index.d.ts +35 -45
- package/lib/components/index.js +92 -0
- package/lib/components/input/Input.theme.d.ts +12 -10
- package/lib/components/input/Input.theme.js +21 -0
- package/lib/components/input/Input.vue.d.ts +73 -22
- package/lib/components/input/Input.vue.js +140 -0
- package/lib/components/input/Input.vue2.js +4 -0
- package/lib/components/input/index.d.ts +3 -0
- package/lib/components/link/Link.theme.d.ts +10 -8
- package/lib/components/link/Link.theme.js +25 -0
- package/lib/components/link/Link.vue.d.ts +25 -2
- package/lib/components/link/Link.vue.js +9 -0
- package/lib/components/link/Link.vue2.js +48 -0
- package/lib/components/link/Link.vue3.js +8 -0
- package/lib/components/link/index.d.ts +3 -0
- package/lib/components/menu/Menu.theme.d.ts +10 -6
- package/lib/components/menu/Menu.theme.js +8 -0
- package/lib/components/menu/Menu.vue.d.ts +62 -9
- package/lib/components/menu/Menu.vue.js +133 -0
- package/lib/components/menu/Menu.vue2.js +4 -0
- package/lib/components/menu/MenuItem.theme.d.ts +13 -7
- package/lib/components/menu/MenuItem.theme.js +86 -0
- package/lib/components/menu/MenuItem.vue.d.ts +63 -14
- package/lib/components/menu/MenuItem.vue.js +9 -0
- package/lib/components/menu/MenuItem.vue2.js +143 -0
- package/lib/components/menu/MenuItem.vue3.js +7 -0
- package/lib/components/menu/index.d.ts +6 -0
- package/lib/components/modal/Modal.theme.d.ts +10 -13
- package/lib/components/modal/Modal.theme.js +17 -0
- package/lib/components/modal/Modal.vue.d.ts +24 -2
- package/lib/components/modal/Modal.vue.js +127 -0
- package/lib/components/modal/Modal.vue2.js +4 -0
- package/lib/components/modal/index.d.ts +3 -0
- package/lib/components/notifications/Notifications.theme.d.ts +10 -8
- package/lib/components/notifications/Notifications.theme.js +10 -0
- package/lib/components/notifications/Notifications.vue.d.ts +56 -16
- package/lib/components/notifications/Notifications.vue.js +234 -0
- package/lib/components/notifications/Notifications.vue2.js +4 -0
- package/lib/components/notifications/index.d.ts +3 -0
- package/lib/components/pagination/Pagination.theme.d.ts +10 -9
- package/lib/components/pagination/Pagination.theme.js +13 -0
- package/lib/components/pagination/Pagination.vue.d.ts +28 -5
- package/lib/components/pagination/Pagination.vue.js +131 -0
- package/lib/components/pagination/Pagination.vue2.js +4 -0
- package/lib/components/pagination/PaginationItem.theme.d.ts +10 -7
- package/lib/components/pagination/PaginationItem.theme.js +8 -0
- package/lib/components/pagination/PaginationItem.vue.d.ts +17 -2
- package/lib/components/pagination/PaginationItem.vue.js +48 -0
- package/lib/components/pagination/PaginationItem.vue2.js +4 -0
- package/lib/components/pagination/index.d.ts +6 -0
- package/lib/components/popover/Popover.theme.d.ts +10 -7
- package/lib/components/popover/Popover.theme.js +9 -0
- package/lib/components/popover/Popover.vue.d.ts +48 -10
- package/lib/components/popover/Popover.vue.js +9 -0
- package/lib/components/popover/Popover.vue2.js +106 -0
- package/lib/components/popover/Popover.vue3.js +15 -0
- package/lib/components/popover/PopoverContainer.theme.d.ts +10 -6
- package/lib/components/popover/PopoverContainer.theme.js +8 -0
- package/lib/components/popover/PopoverContainer.vue.d.ts +16 -1
- package/lib/components/popover/PopoverContainer.vue.js +30 -0
- package/lib/components/popover/PopoverContainer.vue2.js +4 -0
- package/lib/components/popover/index.d.ts +6 -0
- package/lib/components/progress/Progress.theme.d.ts +10 -10
- package/lib/components/progress/Progress.theme.js +18 -0
- package/lib/components/progress/Progress.vue.d.ts +21 -2
- package/lib/components/progress/Progress.vue.js +51 -0
- package/lib/components/progress/Progress.vue2.js +4 -0
- package/lib/components/progress/index.d.ts +3 -0
- package/lib/components/radio/Radio.theme.d.ts +13 -11
- package/lib/components/radio/Radio.theme.js +67 -0
- package/lib/components/radio/Radio.vue.d.ts +48 -9
- package/lib/components/radio/Radio.vue.js +9 -0
- package/lib/components/radio/Radio.vue2.js +117 -0
- package/lib/components/radio/Radio.vue3.js +10 -0
- package/lib/components/radio/index.d.ts +3 -0
- package/lib/components/scroll/Scroll.theme.d.ts +10 -6
- package/lib/components/scroll/Scroll.theme.js +8 -0
- package/lib/components/scroll/Scroll.vue.d.ts +20 -2
- package/lib/components/scroll/Scroll.vue.js +9 -0
- package/lib/components/scroll/Scroll.vue2.js +64 -0
- package/lib/components/scroll/Scroll.vue3.js +17 -0
- package/lib/components/scroll/index.d.ts +3 -0
- package/lib/components/select/Select.theme.d.ts +13 -12
- package/lib/components/select/Select.theme.js +23 -0
- package/lib/components/select/Select.vue.d.ts +44 -8
- package/lib/components/select/Select.vue.js +269 -0
- package/lib/components/select/Select.vue2.js +4 -0
- package/lib/components/select/index.d.ts +3 -0
- package/lib/components/skeleton/Skeleton.theme.d.ts +10 -6
- package/lib/components/skeleton/Skeleton.theme.js +8 -0
- package/lib/components/skeleton/Skeleton.vue.d.ts +9 -1
- package/lib/components/skeleton/Skeleton.vue.js +30 -0
- package/lib/components/skeleton/Skeleton.vue2.js +4 -0
- package/lib/components/skeleton/index.d.ts +3 -0
- package/lib/components/slider/Slider.theme.d.ts +10 -10
- package/lib/components/slider/Slider.theme.js +20 -0
- package/lib/components/slider/Slider.vue.d.ts +55 -7
- package/lib/components/slider/Slider.vue.js +148 -0
- package/lib/components/slider/Slider.vue2.js +4 -0
- package/lib/components/slider/index.d.ts +2 -0
- package/lib/components/spacer/Spacer.d.ts +1 -1
- package/lib/components/spacer/Spacer.js +12 -0
- package/lib/components/spacer/index.d.ts +1 -0
- package/lib/components/spinner/Spinner.vue.d.ts +14 -1
- package/lib/components/spinner/Spinner.vue.js +28 -0
- package/lib/components/spinner/Spinner.vue2.js +4 -0
- package/lib/components/spinner/index.d.ts +2 -0
- package/lib/components/tab/Tab.theme.d.ts +12 -9
- package/lib/components/tab/Tab.theme.js +13 -0
- package/lib/components/tab/Tab.vue.d.ts +44 -9
- package/lib/components/tab/Tab.vue.js +129 -0
- package/lib/components/tab/Tab.vue2.js +4 -0
- package/lib/components/tab/TabGroup.theme.d.ts +10 -10
- package/lib/components/tab/TabGroup.theme.js +27 -0
- package/lib/components/tab/TabGroup.vue.d.ts +61 -9
- package/lib/components/tab/TabGroup.vue.js +133 -0
- package/lib/components/tab/TabGroup.vue2.js +4 -0
- package/lib/components/tab/index.d.ts +4 -0
- package/lib/components/table/Table.theme.d.ts +10 -8
- package/lib/components/table/Table.theme.js +12 -0
- package/lib/components/table/Table.vue.d.ts +269 -51
- package/lib/components/table/Table.vue.js +147 -0
- package/lib/components/table/Table.vue2.js +4 -0
- package/lib/components/table/TableBody.d.ts +1 -1
- package/lib/components/table/TableBody.js +15 -0
- package/lib/components/table/TableCell.theme.d.ts +10 -7
- package/lib/components/table/TableCell.theme.js +11 -0
- package/lib/components/table/TableCell.vue.d.ts +35 -6
- package/lib/components/table/TableCell.vue.js +43 -0
- package/lib/components/table/TableCell.vue2.js +4 -0
- package/lib/components/table/TableHead.d.ts +1 -1
- package/lib/components/table/TableHead.js +19 -0
- package/lib/components/table/TableHeader.vue.d.ts +34 -9
- package/lib/components/table/TableHeader.vue.js +78 -0
- package/lib/components/table/TableHeader.vue2.js +4 -0
- package/lib/components/table/TableRow.vue.d.ts +8 -1
- package/lib/components/table/TableRow.vue.js +32 -0
- package/lib/components/table/TableRow.vue2.js +4 -0
- package/lib/components/table/index.d.ts +9 -0
- package/lib/components/tag/Tag.theme.d.ts +10 -9
- package/lib/components/tag/Tag.theme.js +23 -0
- package/lib/components/tag/Tag.vue.d.ts +31 -4
- package/lib/components/tag/Tag.vue.js +61 -0
- package/lib/components/tag/Tag.vue2.js +4 -0
- package/lib/components/tag/index.d.ts +2 -0
- package/lib/components/textarea/Textarea.theme.d.ts +13 -9
- package/lib/components/textarea/Textarea.theme.js +16 -0
- package/lib/components/textarea/Textarea.vue.d.ts +59 -17
- package/lib/components/textarea/Textarea.vue.js +110 -0
- package/lib/components/textarea/Textarea.vue2.js +4 -0
- package/lib/components/textarea/index.d.ts +2 -0
- package/lib/components/toggle/Toggle.theme.d.ts +10 -11
- package/lib/components/toggle/Toggle.theme.js +29 -0
- package/lib/components/toggle/Toggle.vue.d.ts +39 -7
- package/lib/components/toggle/Toggle.vue.js +110 -0
- package/lib/components/toggle/Toggle.vue2.js +4 -0
- package/lib/components/toggle/index.d.ts +2 -0
- package/lib/components/tooltip/Tooltip.vue.d.ts +12 -1
- package/lib/components/tooltip/Tooltip.vue.js +27 -0
- package/lib/components/tooltip/Tooltip.vue2.js +4 -0
- package/lib/components/tooltip/index.d.ts +2 -0
- package/lib/composables/colors-utils.js +19 -0
- package/lib/composables/colors.d.ts +6 -4
- package/lib/composables/colors.js +52 -0
- package/lib/composables/common.d.ts +1 -1
- package/lib/composables/common.js +17 -0
- package/lib/composables/css.d.ts +1 -1
- package/lib/composables/css.js +26 -0
- package/lib/composables/inputtable.d.ts +4 -4
- package/lib/composables/inputtable.js +78 -0
- package/lib/composables/interactive.js +17 -0
- package/lib/composables/keys.d.ts +6 -3
- package/lib/composables/keys.js +10 -0
- package/lib/composables/notifications.d.ts +1 -1
- package/lib/composables/notifications.js +9 -0
- package/lib/composables/theme.d.ts +13 -7
- package/lib/composables/theme.js +59 -0
- package/lib/create.d.ts +1 -1
- package/lib/create.js +19 -0
- package/lib/index.js +121 -0
- package/lib/index.umd.js +1 -0
- package/lib/install.js +10 -0
- package/lib/node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.4/node_modules/@vueuse/core/index.js +379 -0
- package/lib/node_modules/.pnpm/@vueuse_shared@10.2.0_vue@3.3.4/node_modules/@vueuse/shared/index.js +90 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +4 -0
- package/package.json +54 -54
- package/src/common/utils.ts +25 -2
- package/src/components/alert/Alert.theme.ts +15 -6
- package/src/components/alert/Alert.vue +26 -13
- package/src/components/alert/index.ts +3 -0
- package/src/components/avatar/Avatar.theme.ts +16 -4
- package/src/components/avatar/Avatar.vue +20 -15
- package/src/components/avatar/index.ts +3 -0
- package/src/components/badge/Badge.theme.ts +13 -3
- package/src/components/badge/Badge.vue +30 -15
- package/src/components/badge/index.ts +3 -0
- package/src/components/breadcrumbs/Breadcrumbs.theme.ts +12 -2
- package/src/components/breadcrumbs/Breadcrumbs.vue +24 -21
- package/src/components/breadcrumbs/index.ts +3 -0
- package/src/components/button/Button.theme.ts +23 -19
- package/src/components/button/Button.vue +30 -19
- package/src/components/button/ButtonGroup.theme.ts +14 -1
- package/src/components/button/ButtonGroup.vue +33 -19
- package/src/components/button/index.ts +7 -0
- package/src/components/card/Card.theme.ts +13 -3
- package/src/components/card/Card.vue +12 -7
- package/src/components/card/index.ts +3 -0
- package/src/components/checkbox/Checkbox.theme.ts +19 -7
- package/src/components/checkbox/Checkbox.vue +21 -12
- package/src/components/checkbox/index.ts +3 -0
- package/src/components/collapse/Collapse.theme.ts +13 -3
- package/src/components/collapse/Collapse.vue +28 -24
- package/src/components/collapse/index.ts +3 -0
- package/src/components/container/Container.theme.ts +12 -2
- package/src/components/container/Container.vue +11 -6
- package/src/components/container/index.ts +3 -0
- package/src/components/divider/Divider.theme.ts +13 -3
- package/src/components/divider/Divider.vue +9 -4
- package/src/components/divider/index.ts +3 -0
- package/src/components/drawer/Drawer.theme.ts +12 -2
- package/src/components/drawer/Drawer.vue +50 -41
- package/src/components/drawer/index.ts +3 -0
- package/src/components/form/Form.theme.ts +12 -2
- package/src/components/form/Form.vue +40 -31
- package/src/components/form/index.ts +3 -0
- package/src/components/helpers/InputError.tsx +2 -2
- package/src/components/icon/Icon.theme.ts +13 -3
- package/src/components/icon/Icon.vue +24 -15
- package/src/components/icon/__tests__/Icon.spec.ts +5 -1
- package/src/components/icon/index.ts +3 -0
- package/src/components/image/Image.theme.ts +12 -2
- package/src/components/image/Image.vue +8 -4
- package/src/components/image/index.ts +3 -0
- package/src/components/index.ts +35 -45
- package/src/components/input/Input.theme.ts +17 -6
- package/src/components/input/Input.vue +33 -22
- package/src/components/input/index.ts +3 -0
- package/src/components/link/Link.theme.ts +13 -3
- package/src/components/link/Link.vue +20 -12
- package/src/components/link/index.ts +3 -0
- package/src/components/menu/Menu.theme.ts +12 -2
- package/src/components/menu/Menu.vue +59 -23
- package/src/components/menu/MenuItem.theme.ts +17 -5
- package/src/components/menu/MenuItem.vue +65 -52
- package/src/components/menu/index.ts +7 -0
- package/src/components/modal/Modal.theme.ts +13 -3
- package/src/components/modal/Modal.vue +23 -12
- package/src/components/modal/index.ts +3 -0
- package/src/components/notifications/Notifications.theme.ts +12 -2
- package/src/components/notifications/Notifications.vue +53 -49
- package/src/components/notifications/index.ts +9 -0
- package/src/components/pagination/Pagination.theme.ts +15 -5
- package/src/components/pagination/Pagination.vue +24 -18
- package/src/components/pagination/PaginationItem.theme.ts +13 -3
- package/src/components/pagination/PaginationItem.vue +14 -10
- package/src/components/pagination/index.ts +7 -0
- package/src/components/popover/Popover.theme.ts +12 -2
- package/src/components/popover/Popover.vue +56 -46
- package/src/components/popover/PopoverContainer.theme.ts +12 -2
- package/src/components/popover/PopoverContainer.vue +11 -6
- package/src/components/popover/index.ts +7 -0
- package/src/components/progress/Progress.theme.ts +14 -4
- package/src/components/progress/Progress.vue +16 -16
- package/src/components/progress/index.ts +3 -0
- package/src/components/radio/Radio.theme.ts +19 -7
- package/src/components/radio/Radio.vue +24 -14
- package/src/components/radio/index.ts +3 -0
- package/src/components/scroll/Scroll.theme.ts +12 -2
- package/src/components/scroll/Scroll.vue +37 -26
- package/src/components/scroll/index.ts +3 -0
- package/src/components/select/Select.theme.ts +20 -6
- package/src/components/select/Select.vue +28 -20
- package/src/components/select/index.ts +3 -0
- package/src/components/skeleton/Skeleton.theme.ts +12 -2
- package/src/components/skeleton/Skeleton.vue +11 -6
- package/src/components/skeleton/index.ts +3 -0
- package/src/components/slider/Slider.theme.ts +14 -4
- package/src/components/slider/Slider.vue +24 -16
- package/src/components/slider/index.ts +2 -0
- package/src/components/spacer/index.ts +1 -0
- package/src/components/spinner/Spinner.vue +18 -8
- package/src/components/spinner/index.ts +2 -0
- package/src/components/tab/Tab.theme.ts +15 -3
- package/src/components/tab/Tab.vue +85 -68
- package/src/components/tab/TabGroup.theme.ts +15 -5
- package/src/components/tab/TabGroup.vue +67 -22
- package/src/components/tab/index.ts +5 -0
- package/src/components/table/Table.theme.ts +14 -4
- package/src/components/table/Table.vue +41 -31
- package/src/components/table/TableCell.theme.ts +13 -3
- package/src/components/table/TableCell.vue +22 -16
- package/src/components/table/TableHeader.vue +20 -17
- package/src/components/table/TableRow.vue +1 -1
- package/src/components/table/index.ts +10 -0
- package/src/components/tag/Tag.theme.ts +14 -4
- package/src/components/tag/Tag.vue +22 -13
- package/src/components/tag/index.ts +2 -0
- package/src/components/textarea/Textarea.theme.ts +18 -30
- package/src/components/textarea/Textarea.vue +28 -19
- package/src/components/textarea/index.ts +2 -0
- package/src/components/toggle/Toggle.theme.ts +16 -6
- package/src/components/toggle/Toggle.vue +21 -12
- package/src/components/toggle/index.ts +2 -0
- package/src/components/tooltip/Tooltip.vue +5 -0
- package/src/components/tooltip/index.ts +2 -0
- package/src/composables/colors-utils.ts +4 -346
- package/src/composables/colors.ts +21 -17
- package/src/composables/common.ts +1 -1
- package/src/composables/css.ts +4 -4
- package/src/composables/inputtable.ts +8 -8
- package/src/composables/interactive.ts +2 -2
- package/src/composables/keys.ts +6 -3
- package/src/composables/theme.ts +30 -27
- package/src/create.ts +6 -7
- package/src/version.ts +1 -1
- package/volar.d.ts +0 -2
- package/lib/components/tooltip/Tooltip.theme.d.ts +0 -11
- package/lib/index.cjs.js +0 -1
- package/lib/index.es.js +0 -7184
- package/lib/nuxt.js +0 -33
- package/src/components/tooltip/Tooltip.theme.ts +0 -51
- package/src/exports/nuxt.plugin.js +0 -8
- package/src/exports/tailwind.preset.js +0 -55
- /package/{lib → exports}/tailwind.preset.js +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineComponent as d, createVNode as n } from "vue";
|
|
2
|
+
const p = /* @__PURE__ */ d({
|
|
3
|
+
name: "XTableBody",
|
|
4
|
+
setup(o, {
|
|
5
|
+
slots: e
|
|
6
|
+
}) {
|
|
7
|
+
return () => {
|
|
8
|
+
var a;
|
|
9
|
+
return n("tbody", null, [(a = e.default) == null ? void 0 : a.call(e)]);
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
p as default
|
|
15
|
+
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { TableCellProps } from './TableCell.vue';
|
|
3
|
+
type InternalClasses = 'wrapper';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<TableCellProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface TableCellTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<TableCellProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const i = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: ({ props: t }) => {
|
|
4
|
+
const e = ["last:pr-0 px-3"];
|
|
5
|
+
return e.push(t.dense ? "py-2" : "py-4"), t.textAlign === "left" ? e.push("text-left") : t.textAlign === "center" ? e.push("text-center") : t.textAlign === "right" ? e.push("text-right") : t.textAlign === "justify" && e.push("text-justify"), t.verticalAlign === "baseline" ? e.push("align-baseline") : t.verticalAlign === "bottom" ? e.push("align-bottom") : t.verticalAlign === "middle" ? e.push("align-middle") : t.verticalAlign === "text-bottom" ? e.push("align-text-bottom") : t.verticalAlign === "text-top" ? e.push("align-text-top") : t.verticalAlign === "top" && e.push("align-top"), t.truncate && t.fixed && e.push("truncate"), e;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}, l = i;
|
|
9
|
+
export {
|
|
10
|
+
l as default
|
|
11
|
+
};
|
|
@@ -1,33 +1,62 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ExtractPublicPropTypes, PropType } from 'vue';
|
|
2
|
+
declare const validators: {
|
|
3
|
+
textAlign: readonly [null, "left", "center", "right", "justify"];
|
|
4
|
+
verticalAlign: readonly [null, "baseline", "bottom", "middle", "text-bottom", "text-top", "top"];
|
|
5
|
+
};
|
|
6
|
+
declare const tableCellProps: {
|
|
2
7
|
textAlign: {
|
|
3
|
-
type:
|
|
8
|
+
type: PropType<"left" | "right" | "center" | "justify" | null>;
|
|
4
9
|
validator: (value: string) => boolean;
|
|
5
10
|
};
|
|
6
11
|
truncate: BooleanConstructor;
|
|
7
12
|
dense: BooleanConstructor;
|
|
8
13
|
fixed: BooleanConstructor;
|
|
9
14
|
verticalAlign: {
|
|
10
|
-
type:
|
|
15
|
+
type: PropType<"top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top" | null>;
|
|
16
|
+
default: string;
|
|
17
|
+
validator: (value: string) => boolean;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export type TableCellTextAlign = typeof validators.textAlign[number];
|
|
21
|
+
export type TableCellVerticalAlign = typeof validators.verticalAlign[number];
|
|
22
|
+
export type TableCellProps = ExtractPublicPropTypes<typeof tableCellProps>;
|
|
23
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
24
|
+
textAlign: {
|
|
25
|
+
type: PropType<"left" | "right" | "center" | "justify" | null>;
|
|
26
|
+
validator: (value: string) => boolean;
|
|
27
|
+
};
|
|
28
|
+
truncate: BooleanConstructor;
|
|
29
|
+
dense: BooleanConstructor;
|
|
30
|
+
fixed: BooleanConstructor;
|
|
31
|
+
verticalAlign: {
|
|
32
|
+
type: PropType<"top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top" | null>;
|
|
11
33
|
default: string;
|
|
12
34
|
validator: (value: string) => boolean;
|
|
13
35
|
};
|
|
14
36
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
15
37
|
textAlign: {
|
|
16
|
-
type:
|
|
38
|
+
type: PropType<"left" | "right" | "center" | "justify" | null>;
|
|
17
39
|
validator: (value: string) => boolean;
|
|
18
40
|
};
|
|
19
41
|
truncate: BooleanConstructor;
|
|
20
42
|
dense: BooleanConstructor;
|
|
21
43
|
fixed: BooleanConstructor;
|
|
22
44
|
verticalAlign: {
|
|
23
|
-
type:
|
|
45
|
+
type: PropType<"top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top" | null>;
|
|
24
46
|
default: string;
|
|
25
47
|
validator: (value: string) => boolean;
|
|
26
48
|
};
|
|
27
49
|
}>>, {
|
|
28
50
|
fixed: boolean;
|
|
29
51
|
dense: boolean;
|
|
30
|
-
verticalAlign:
|
|
52
|
+
verticalAlign: "top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top" | null;
|
|
31
53
|
truncate: boolean;
|
|
54
|
+
}, {}>, {
|
|
55
|
+
default?(_: {}): any;
|
|
32
56
|
}>;
|
|
33
57
|
export default _default;
|
|
58
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
59
|
+
new (): {
|
|
60
|
+
$slots: S;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as i, openBlock as c, createElementBlock as p, normalizeStyle as d, unref as l, normalizeClass as m, renderSlot as u } from "vue";
|
|
2
|
+
import { useTheme as f } from "../../composables/theme.js";
|
|
3
|
+
import g from "./TableCell.theme.js";
|
|
4
|
+
const o = {
|
|
5
|
+
textAlign: [null, "left", "center", "right", "justify"],
|
|
6
|
+
verticalAlign: [null, "baseline", "bottom", "middle", "text-bottom", "text-top", "top"]
|
|
7
|
+
}, x = {
|
|
8
|
+
textAlign: {
|
|
9
|
+
type: String,
|
|
10
|
+
validator: (e) => o.textAlign.includes(e)
|
|
11
|
+
},
|
|
12
|
+
truncate: Boolean,
|
|
13
|
+
dense: Boolean,
|
|
14
|
+
fixed: Boolean,
|
|
15
|
+
verticalAlign: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "middle",
|
|
18
|
+
validator: (e) => o.verticalAlign.includes(e)
|
|
19
|
+
}
|
|
20
|
+
}, b = {
|
|
21
|
+
name: "XTableCell",
|
|
22
|
+
validators: o
|
|
23
|
+
}, A = /* @__PURE__ */ i({
|
|
24
|
+
...b,
|
|
25
|
+
props: x,
|
|
26
|
+
setup(e) {
|
|
27
|
+
const t = e;
|
|
28
|
+
t.truncate && !t.fixed && console.warn('Table must have "fixed" property set to true when using TableCell "truncate" property');
|
|
29
|
+
const { styles: n, classes: r, className: a } = f("table-cell", g, t);
|
|
30
|
+
return (s, y) => (c(), p("td", {
|
|
31
|
+
style: d(l(n)),
|
|
32
|
+
class: m([
|
|
33
|
+
l(a),
|
|
34
|
+
l(r).wrapper
|
|
35
|
+
])
|
|
36
|
+
}, [
|
|
37
|
+
u(s.$slots, "default")
|
|
38
|
+
], 6));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
A as default
|
|
43
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, () => JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent as r, createVNode as t } from "vue";
|
|
2
|
+
const o = /* @__PURE__ */ r({
|
|
3
|
+
name: "XTableHead",
|
|
4
|
+
setup(d, {
|
|
5
|
+
slots: e
|
|
6
|
+
}) {
|
|
7
|
+
return () => {
|
|
8
|
+
var a;
|
|
9
|
+
return t("thead", {
|
|
10
|
+
class: "align-bottom"
|
|
11
|
+
}, [t("tr", {
|
|
12
|
+
class: "text-sm text-gray-600 dark:text-gray-400 border-b"
|
|
13
|
+
}, [(a = e.default) == null ? void 0 : a.call(e)])]);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
o as default
|
|
19
|
+
};
|
|
@@ -1,33 +1,58 @@
|
|
|
1
|
-
import type { PropType } from 'vue';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { ExtractPublicPropTypes, PropType } from 'vue';
|
|
2
|
+
declare const validators: {
|
|
3
|
+
sort: readonly [1, -1, undefined];
|
|
4
|
+
textAlign: readonly ["left", "center", "right", "justify"];
|
|
5
|
+
};
|
|
6
|
+
declare const tableHeaderProps: {
|
|
5
7
|
sort: {
|
|
6
|
-
type: PropType<
|
|
8
|
+
type: PropType<1 | -1 | undefined>;
|
|
7
9
|
validator: (value: number) => boolean;
|
|
8
10
|
};
|
|
9
11
|
sortable: BooleanConstructor;
|
|
10
12
|
textAlign: {
|
|
11
|
-
type: PropType<
|
|
13
|
+
type: PropType<"left" | "right" | "center" | "justify">;
|
|
14
|
+
default: string;
|
|
15
|
+
validator: (value: string) => boolean;
|
|
16
|
+
};
|
|
17
|
+
stickyHeader: BooleanConstructor;
|
|
18
|
+
};
|
|
19
|
+
export type TableHeaderSort = typeof validators.sort[number];
|
|
20
|
+
export type TableHeaderAlign = typeof validators.textAlign[number];
|
|
21
|
+
export type TableHeaderProps = ExtractPublicPropTypes<typeof tableHeaderProps>;
|
|
22
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
23
|
+
sort: {
|
|
24
|
+
type: PropType<1 | -1 | undefined>;
|
|
25
|
+
validator: (value: number) => boolean;
|
|
26
|
+
};
|
|
27
|
+
sortable: BooleanConstructor;
|
|
28
|
+
textAlign: {
|
|
29
|
+
type: PropType<"left" | "right" | "center" | "justify">;
|
|
12
30
|
default: string;
|
|
13
31
|
validator: (value: string) => boolean;
|
|
14
32
|
};
|
|
15
33
|
stickyHeader: BooleanConstructor;
|
|
16
34
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
35
|
sort: {
|
|
18
|
-
type: PropType<
|
|
36
|
+
type: PropType<1 | -1 | undefined>;
|
|
19
37
|
validator: (value: number) => boolean;
|
|
20
38
|
};
|
|
21
39
|
sortable: BooleanConstructor;
|
|
22
40
|
textAlign: {
|
|
23
|
-
type: PropType<
|
|
41
|
+
type: PropType<"left" | "right" | "center" | "justify">;
|
|
24
42
|
default: string;
|
|
25
43
|
validator: (value: string) => boolean;
|
|
26
44
|
};
|
|
27
45
|
stickyHeader: BooleanConstructor;
|
|
28
46
|
}>>, {
|
|
29
|
-
textAlign:
|
|
47
|
+
textAlign: "left" | "right" | "center" | "justify";
|
|
30
48
|
sortable: boolean;
|
|
31
49
|
stickyHeader: boolean;
|
|
50
|
+
}, {}>, {
|
|
51
|
+
default?(_: {}): any;
|
|
32
52
|
}>;
|
|
33
53
|
export default _default;
|
|
54
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
55
|
+
new (): {
|
|
56
|
+
$slots: S;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineComponent as d, openBlock as t, createElementBlock as o, normalizeClass as u, renderSlot as i, Fragment as a, createCommentVNode as n, createElementVNode as s } from "vue";
|
|
2
|
+
const c = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "relative inline-block"
|
|
5
|
+
}, p = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "absolute stroke-2 w-3 h-3 ml-0.5 -right-3 top-0.5",
|
|
8
|
+
width: "24",
|
|
9
|
+
height: "24",
|
|
10
|
+
viewBox: "0 0 24 24",
|
|
11
|
+
stroke: "currentColor",
|
|
12
|
+
"stroke-linejoin": "round",
|
|
13
|
+
"stroke-linecap": "round",
|
|
14
|
+
fill: "none",
|
|
15
|
+
role: "presentation"
|
|
16
|
+
}, y = /* @__PURE__ */ s("line", {
|
|
17
|
+
x1: "12",
|
|
18
|
+
y1: "5",
|
|
19
|
+
x2: "12",
|
|
20
|
+
y2: "19"
|
|
21
|
+
}, null, -1), g = /* @__PURE__ */ s("polyline", { points: "19 12 12 19 5 12" }, null, -1), h = /* @__PURE__ */ s("line", {
|
|
22
|
+
x1: "12",
|
|
23
|
+
y1: "19",
|
|
24
|
+
x2: "12",
|
|
25
|
+
y2: "5"
|
|
26
|
+
}, null, -1), f = /* @__PURE__ */ s("polyline", { points: "5 12 12 5 19 12" }, null, -1), l = {
|
|
27
|
+
sort: [1, -1, void 0],
|
|
28
|
+
textAlign: ["left", "center", "right", "justify"]
|
|
29
|
+
}, k = {
|
|
30
|
+
sort: {
|
|
31
|
+
type: Number,
|
|
32
|
+
validator: (r) => l.sort.includes(r)
|
|
33
|
+
},
|
|
34
|
+
sortable: Boolean,
|
|
35
|
+
textAlign: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "left",
|
|
38
|
+
validator: (r) => l.textAlign.includes(r)
|
|
39
|
+
},
|
|
40
|
+
stickyHeader: Boolean
|
|
41
|
+
}, m = { name: "XTableHeader", validators: l }, b = /* @__PURE__ */ d({
|
|
42
|
+
...m,
|
|
43
|
+
props: k,
|
|
44
|
+
setup(r) {
|
|
45
|
+
return (e, v) => (t(), o("th", {
|
|
46
|
+
class: u(["py-2 font-semibold tracking-widest uppercase text-xs px-3", [
|
|
47
|
+
{
|
|
48
|
+
// sort
|
|
49
|
+
"cursor-pointer hover:text-gray-800 dark:hover:text-gray-300 transition-colors duration-150 ease-in-out": e.sortable,
|
|
50
|
+
// stickyHeader
|
|
51
|
+
"sticky top-0": e.stickyHeader,
|
|
52
|
+
// textAlign
|
|
53
|
+
"text-left": e.textAlign === "left",
|
|
54
|
+
"text-right": e.textAlign === "right",
|
|
55
|
+
"text-center": e.textAlign === "center",
|
|
56
|
+
"text-justify": e.textAlign === "justify"
|
|
57
|
+
}
|
|
58
|
+
]])
|
|
59
|
+
}, [
|
|
60
|
+
e.sortable ? (t(), o("div", c, [
|
|
61
|
+
i(e.$slots, "default"),
|
|
62
|
+
e.sort && [1, -1].includes(e.sort) ? (t(), o("svg", p, [
|
|
63
|
+
e.sort === -1 ? (t(), o(a, { key: 0 }, [
|
|
64
|
+
y,
|
|
65
|
+
g
|
|
66
|
+
], 64)) : n("", !0),
|
|
67
|
+
e.sort === 1 ? (t(), o(a, { key: 1 }, [
|
|
68
|
+
h,
|
|
69
|
+
f
|
|
70
|
+
], 64)) : n("", !0)
|
|
71
|
+
])) : n("", !0)
|
|
72
|
+
])) : i(e.$slots, "default", { key: 1 })
|
|
73
|
+
], 2));
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
b as default
|
|
78
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
3
|
pointer: BooleanConstructor;
|
|
4
4
|
striped: BooleanConstructor;
|
|
5
5
|
verticalAlign: {
|
|
@@ -19,5 +19,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
pointer: boolean;
|
|
20
20
|
verticalAlign: "top" | "bottom" | "baseline" | "middle" | "text-bottom" | "text-top";
|
|
21
21
|
striped: boolean;
|
|
22
|
+
}, {}>, {
|
|
23
|
+
default?(_: {}): any;
|
|
22
24
|
}>;
|
|
23
25
|
export default _default;
|
|
26
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent as i, computed as a, openBlock as n, createElementBlock as s, normalizeClass as d, renderSlot as g } from "vue";
|
|
2
|
+
const r = {
|
|
3
|
+
verticalAlign: ["baseline", "bottom", "middle", "text-bottom", "text-top", "top"]
|
|
4
|
+
}, c = { name: "XTableRow", validators: r }, u = /* @__PURE__ */ i({
|
|
5
|
+
...c,
|
|
6
|
+
props: {
|
|
7
|
+
pointer: Boolean,
|
|
8
|
+
striped: Boolean,
|
|
9
|
+
verticalAlign: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "top",
|
|
12
|
+
validator: (t) => r.verticalAlign.includes(t)
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
setup(t) {
|
|
16
|
+
const e = t, l = a(() => e.verticalAlign === "baseline" ? "align-baseline" : e.verticalAlign === "bottom" ? "align-bottom" : e.verticalAlign === "middle" ? "align-middle" : e.verticalAlign === "text-bottom" ? "align-text-bottom" : e.verticalAlign === "text-top" ? "align-text-top" : e.verticalAlign === "top" ? "align-top" : "");
|
|
17
|
+
return (o, p) => (n(), s("tr", {
|
|
18
|
+
class: d([
|
|
19
|
+
t.striped ? "odd:bg-gray-50 dark:odd:bg-gray-800" : "border-b border-gray-200 dark:border-gray-700",
|
|
20
|
+
{
|
|
21
|
+
"hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer": t.pointer
|
|
22
|
+
},
|
|
23
|
+
l.value
|
|
24
|
+
])
|
|
25
|
+
}, [
|
|
26
|
+
g(o.$slots, "default")
|
|
27
|
+
], 2));
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export {
|
|
31
|
+
u as default
|
|
32
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as XTable } from './Table.vue';
|
|
2
|
+
export { default as XTableBody } from './TableBody';
|
|
3
|
+
export { default as XTableCell } from './TableCell.vue';
|
|
4
|
+
export { default as XTableHead } from './TableHead';
|
|
5
|
+
export { default as XTableHeader } from './TableHeader.vue';
|
|
6
|
+
export { default as XTableRow } from './TableRow.vue';
|
|
7
|
+
export type { TableProps, TableHeader } from './Table.vue';
|
|
8
|
+
export type { TableHeaderProps, TableHeaderAlign, TableHeaderSort } from './TableHeader.vue';
|
|
9
|
+
export type { TableCellProps, TableCellTextAlign, TableCellVerticalAlign } from './TableCell.vue';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { TagProps } from './Tag.vue';
|
|
3
|
+
type InternalClasses = 'wrapper' | 'loadingWrapper';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<TagProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface TagTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<TagProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const a = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: ({ props: t, data: s }) => {
|
|
4
|
+
let e = "inline-flex items-center leading-none max-w-full";
|
|
5
|
+
return t.size === "xs" ? e += " px-2 py-1 text-xs" : t.size === "sm" ? e += " px-2 py-1 text-sm" : t.size === "lg" ? e += " px-4 py-3 text-lg" : t.size === "xl" ? e += " px-6 py-6 text-xl" : e += " px-3 py-2", e;
|
|
6
|
+
},
|
|
7
|
+
loadingWrapper: "absolute inset-0 flex items-center justify-center z-40 bg-gray-300 dark:bg-gray-600 rounded opacity-50"
|
|
8
|
+
},
|
|
9
|
+
styles: ({ colors: t, props: s, css: e }) => {
|
|
10
|
+
const l = t.getPalette(s.color);
|
|
11
|
+
return e.variables({
|
|
12
|
+
bg: l[100],
|
|
13
|
+
text: l[800],
|
|
14
|
+
border: l[800],
|
|
15
|
+
dark: {
|
|
16
|
+
text: s.outlined ? l[200] : l[800]
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}, i = a;
|
|
21
|
+
export {
|
|
22
|
+
i as default
|
|
23
|
+
};
|
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
import { type ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
declare const tagProps: {
|
|
3
|
+
tag: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
rounded: BooleanConstructor;
|
|
8
|
+
removable: BooleanConstructor;
|
|
9
|
+
outlined: BooleanConstructor;
|
|
10
|
+
color: {
|
|
11
|
+
readonly type: StringConstructor;
|
|
12
|
+
readonly default: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
size: {
|
|
15
|
+
readonly type: import("vue").PropType<import("../../composables/common").Size>;
|
|
16
|
+
readonly default: "md";
|
|
17
|
+
readonly validator: (value: string) => boolean;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export type TagProps = ExtractPublicPropTypes<typeof tagProps>;
|
|
21
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
22
|
tag: {
|
|
3
23
|
type: StringConstructor;
|
|
4
24
|
default: string;
|
|
@@ -35,11 +55,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
35
55
|
}>> & {
|
|
36
56
|
onRemove?: ((...args: any[]) => any) | undefined;
|
|
37
57
|
}, {
|
|
38
|
-
size: import("../../composables/common").Size;
|
|
39
|
-
outlined: boolean;
|
|
40
|
-
removable: boolean;
|
|
41
58
|
color: string;
|
|
59
|
+
size: import("../../composables/common").Size;
|
|
42
60
|
tag: string;
|
|
61
|
+
outlined: boolean;
|
|
43
62
|
rounded: boolean;
|
|
63
|
+
removable: boolean;
|
|
64
|
+
}, {}>, {
|
|
65
|
+
default?(_: {}): any;
|
|
44
66
|
}>;
|
|
45
67
|
export default _default;
|
|
68
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
69
|
+
new (): {
|
|
70
|
+
$slots: S;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { defineComponent as p, computed as f, openBlock as s, createBlock as g, resolveDynamicComponent as v, normalizeClass as y, unref as r, normalizeStyle as x, withCtx as z, createElementBlock as k, renderSlot as l, createVNode as b } from "vue";
|
|
2
|
+
import { useColors as C } from "../../composables/colors.js";
|
|
3
|
+
import { useCommon as a } from "../../composables/common.js";
|
|
4
|
+
import { useTheme as B } from "../../composables/theme.js";
|
|
5
|
+
import { closeIcon as h } from "../../common/icons.js";
|
|
6
|
+
import S from "../icon/Icon.vue.js";
|
|
7
|
+
import _ from "./Tag.theme.js";
|
|
8
|
+
const $ = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "max-w-full truncate"
|
|
11
|
+
}, w = {
|
|
12
|
+
...a.props(),
|
|
13
|
+
...C.props("gray"),
|
|
14
|
+
tag: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "span"
|
|
17
|
+
},
|
|
18
|
+
rounded: Boolean,
|
|
19
|
+
removable: Boolean,
|
|
20
|
+
outlined: Boolean
|
|
21
|
+
}, I = {
|
|
22
|
+
name: "XTag",
|
|
23
|
+
validators: {
|
|
24
|
+
...a.validators()
|
|
25
|
+
}
|
|
26
|
+
}, j = /* @__PURE__ */ p({
|
|
27
|
+
...I,
|
|
28
|
+
props: w,
|
|
29
|
+
emits: ["remove"],
|
|
30
|
+
setup(n) {
|
|
31
|
+
const o = n, m = f(() => o.size === "xs" ? "xs" : o.size === "sm" ? "sm" : o.size === "lg" ? "md" : o.size === "xl" ? "lg" : "sm"), { styles: i, classes: u, className: d } = B("tag", _, o);
|
|
32
|
+
return (e, t) => (s(), g(v(e.tag), {
|
|
33
|
+
class: y([
|
|
34
|
+
"text-[color:var(--x-tag-text)] dark:text-[color:var(--x-tag-dark-text)] border-[color:var(--x-tag-border)",
|
|
35
|
+
[
|
|
36
|
+
r(d),
|
|
37
|
+
r(u).wrapper,
|
|
38
|
+
e.outlined ? "border" : "bg-[color:var(--x-tag-bg)]",
|
|
39
|
+
e.rounded ? "rounded-full" : "rounded"
|
|
40
|
+
]
|
|
41
|
+
]),
|
|
42
|
+
style: x(r(i))
|
|
43
|
+
}, {
|
|
44
|
+
default: z(() => [
|
|
45
|
+
e.removable ? (s(), k("span", $, [
|
|
46
|
+
l(e.$slots, "default"),
|
|
47
|
+
b(S, {
|
|
48
|
+
size: m.value,
|
|
49
|
+
icon: r(h),
|
|
50
|
+
class: "ml-1 cursor-pointer hover:text-gray-700 transition-colors duration-150",
|
|
51
|
+
onClick: t[0] || (t[0] = (c) => e.$emit("remove", c))
|
|
52
|
+
}, null, 8, ["size", "icon"])
|
|
53
|
+
])) : l(e.$slots, "default", { key: 1 })
|
|
54
|
+
]),
|
|
55
|
+
_: 3
|
|
56
|
+
}, 8, ["style", "class"]));
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
export {
|
|
60
|
+
j as default
|
|
61
|
+
};
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
styles: ({ colors, props, css }: ThemeParams) => Record<string, string>;
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
3
|
+
import type { TextareaProps } from './Textarea.vue';
|
|
4
|
+
type InternalClasses = 'wrapper' | 'label' | 'input';
|
|
5
|
+
type InternalExtraData = {
|
|
6
|
+
errorInternal: Ref<boolean>;
|
|
9
7
|
};
|
|
10
|
-
|
|
8
|
+
interface InternalTheme extends ThemeComponent<TextareaProps, InternalClasses, InternalExtraData> {
|
|
9
|
+
}
|
|
10
|
+
export interface TextareaTheme extends Omit<InternalTheme, 'classes'> {
|
|
11
|
+
classes?: Partial<ThemeClasses<TextareaProps, InternalClasses, InternalExtraData>>;
|
|
12
|
+
}
|
|
13
|
+
declare const theme: InternalTheme;
|
|
14
|
+
export default theme;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const s = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: "inline-block align-bottom text-left",
|
|
4
|
+
label: ({ props: e }) => {
|
|
5
|
+
const r = "font-medium text-gray-800 dark:text-gray-200 mb-1";
|
|
6
|
+
return e.size === "xs" ? r + " text-xs" : e.size === "sm" ? r + " text-sm" : e.size === "lg" ? r + " text-lg" : e.size === "xl" ? r + " text-xl" : r;
|
|
7
|
+
},
|
|
8
|
+
input: ({ props: e, data: r }) => {
|
|
9
|
+
const t = ["resize-none appearance-none block w-full placeholder-gray-400 dark:placeholder-gray-500 outline-transparent outline outline-2 outline-offset-[-1px] transition duration-150 ease-in-out border-gray-300 dark:border-gray-700 border shadow-sm rounded-md"];
|
|
10
|
+
return !r.errorInternal && !e.disabled && t.push("hover:border-gray-400 dark:hover:border-gray-500"), e.size === "xs" ? t.push("px-2 py-1 text-xs") : e.size === "sm" ? t.push("px-2 py-2 text-sm") : e.size === "lg" ? t.push("px-4 py-3 text-lg") : e.size === "xl" ? t.push("px-5 py-4 text-xl") : t.push("px-3 py-2"), t.push(e.disabled ? "bg-gray-100 dark:bg-gray-900 text-gray-500 cursor-not-allowed" : "bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200"), t;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}, a = s;
|
|
14
|
+
export {
|
|
15
|
+
a as default
|
|
16
|
+
};
|