@indielayer/ui 1.0.10 → 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/lib/_virtual/_plugin-vue_export-helper.js +9 -0
- package/lib/common/icons.js +18 -0
- package/lib/common/utils.d.ts +4 -0
- package/lib/common/utils.js +25 -0
- package/lib/components/alert/Alert.theme.d.ts +10 -8
- package/lib/components/alert/Alert.theme.js +41 -0
- package/lib/components/alert/Alert.vue.d.ts +22 -5
- package/lib/components/alert/Alert.vue.js +9 -0
- package/lib/components/alert/Alert.vue2.js +62 -0
- package/lib/components/alert/Alert.vue3.js +8 -0
- package/lib/components/alert/index.d.ts +3 -0
- package/lib/components/avatar/Avatar.theme.d.ts +13 -7
- package/lib/components/avatar/Avatar.theme.js +25 -0
- package/lib/components/avatar/Avatar.vue.d.ts +24 -2
- package/lib/components/avatar/Avatar.vue.js +9 -0
- package/lib/components/avatar/Avatar.vue2.js +76 -0
- package/lib/components/avatar/Avatar.vue3.js +7 -0
- package/lib/components/avatar/index.d.ts +3 -0
- package/lib/components/badge/Badge.theme.d.ts +10 -8
- package/lib/components/badge/Badge.theme.js +12 -0
- package/lib/components/badge/Badge.vue.d.ts +45 -8
- package/lib/components/badge/Badge.vue.js +94 -0
- package/lib/components/badge/Badge.vue2.js +4 -0
- package/lib/components/badge/index.d.ts +3 -0
- package/lib/components/breadcrumbs/Breadcrumbs.theme.d.ts +10 -8
- package/lib/components/breadcrumbs/Breadcrumbs.theme.js +10 -0
- package/lib/components/breadcrumbs/Breadcrumbs.vue.d.ts +19 -5
- package/lib/components/breadcrumbs/Breadcrumbs.vue.js +79 -0
- package/lib/components/breadcrumbs/Breadcrumbs.vue2.js +4 -0
- package/lib/components/breadcrumbs/index.d.ts +3 -0
- package/lib/components/button/Button.theme.d.ts +12 -9
- package/lib/components/button/Button.theme.js +138 -0
- package/lib/components/button/Button.vue.d.ts +41 -7
- package/lib/components/button/Button.vue.js +9 -0
- package/lib/components/button/Button.vue2.js +115 -0
- package/lib/components/button/Button.vue3.js +8 -0
- package/lib/components/button/ButtonGroup.theme.d.ts +12 -5
- package/lib/components/button/ButtonGroup.theme.js +8 -0
- package/lib/components/button/ButtonGroup.vue.d.ts +36 -5
- package/lib/components/button/ButtonGroup.vue.js +9 -0
- package/lib/components/button/ButtonGroup.vue2.js +54 -0
- package/lib/components/button/ButtonGroup.vue3.js +7 -0
- package/lib/components/button/index.d.ts +6 -0
- package/lib/components/card/Card.theme.d.ts +10 -7
- package/lib/components/card/Card.theme.js +8 -0
- package/lib/components/card/Card.vue.d.ts +9 -0
- package/lib/components/card/Card.vue.js +31 -0
- package/lib/components/card/Card.vue2.js +4 -0
- package/lib/components/card/index.d.ts +3 -0
- package/lib/components/checkbox/Checkbox.theme.d.ts +13 -10
- package/lib/components/checkbox/Checkbox.theme.js +52 -0
- package/lib/components/checkbox/Checkbox.vue.d.ts +35 -4
- package/lib/components/checkbox/Checkbox.vue.js +9 -0
- package/lib/components/checkbox/Checkbox.vue2.js +108 -0
- package/lib/components/checkbox/Checkbox.vue3.js +6 -0
- package/lib/components/checkbox/index.d.ts +3 -0
- package/lib/components/collapse/Collapse.theme.d.ts +10 -9
- package/lib/components/collapse/Collapse.theme.js +10 -0
- package/lib/components/collapse/Collapse.vue.d.ts +17 -1
- package/lib/components/collapse/Collapse.vue.js +132 -0
- package/lib/components/collapse/Collapse.vue2.js +4 -0
- package/lib/components/collapse/index.d.ts +3 -0
- package/lib/components/container/Container.theme.d.ts +10 -6
- package/lib/components/container/Container.theme.js +8 -0
- package/lib/components/container/Container.vue.d.ts +8 -0
- package/lib/components/container/Container.vue.js +30 -0
- package/lib/components/container/Container.vue2.js +4 -0
- package/lib/components/container/index.d.ts +3 -0
- package/lib/components/divider/Divider.theme.d.ts +10 -9
- package/lib/components/divider/Divider.theme.js +10 -0
- package/lib/components/divider/Divider.vue.d.ts +6 -0
- package/lib/components/divider/Divider.vue.js +53 -0
- package/lib/components/divider/Divider.vue2.js +4 -0
- package/lib/components/divider/index.d.ts +3 -0
- package/lib/components/drawer/Drawer.theme.d.ts +10 -7
- package/lib/components/drawer/Drawer.theme.js +9 -0
- package/lib/components/drawer/Drawer.vue.d.ts +39 -12
- package/lib/components/drawer/Drawer.vue.js +171 -0
- package/lib/components/drawer/Drawer.vue2.js +4 -0
- package/lib/components/drawer/index.d.ts +3 -0
- package/lib/components/form/Form.theme.d.ts +10 -6
- package/lib/components/form/Form.theme.js +8 -0
- package/lib/components/form/Form.vue.d.ts +25 -4
- package/lib/components/form/Form.vue.js +79 -0
- package/lib/components/form/Form.vue2.js +4 -0
- package/lib/components/form/index.d.ts +3 -0
- package/lib/components/helpers/InputError.js +18 -0
- package/lib/components/icon/Icon.theme.d.ts +10 -7
- package/lib/components/icon/Icon.theme.js +11 -0
- package/lib/components/icon/Icon.vue.d.ts +21 -3
- package/lib/components/icon/Icon.vue.js +74 -0
- package/lib/components/icon/Icon.vue2.js +4 -0
- package/lib/components/icon/index.d.ts +3 -0
- package/lib/components/image/Image.theme.d.ts +10 -6
- package/lib/components/image/Image.theme.js +8 -0
- package/lib/components/image/Image.vue.d.ts +5 -0
- package/lib/components/image/Image.vue.js +32 -0
- package/lib/components/image/Image.vue2.js +4 -0
- package/lib/components/image/index.d.ts +3 -0
- package/lib/components/index.d.ts +35 -45
- package/lib/components/index.js +92 -0
- package/lib/components/input/Input.theme.d.ts +12 -10
- package/lib/components/input/Input.theme.js +21 -0
- package/lib/components/input/Input.vue.d.ts +70 -19
- package/lib/components/input/Input.vue.js +140 -0
- package/lib/components/input/Input.vue2.js +4 -0
- package/lib/components/input/index.d.ts +3 -0
- package/lib/components/link/Link.theme.d.ts +10 -8
- package/lib/components/link/Link.theme.js +25 -0
- package/lib/components/link/Link.vue.d.ts +17 -1
- package/lib/components/link/Link.vue.js +9 -0
- package/lib/components/link/Link.vue2.js +48 -0
- package/lib/components/link/Link.vue3.js +8 -0
- package/lib/components/link/index.d.ts +3 -0
- package/lib/components/menu/Menu.theme.d.ts +10 -6
- package/lib/components/menu/Menu.theme.js +8 -0
- package/lib/components/menu/Menu.vue.d.ts +61 -8
- package/lib/components/menu/Menu.vue.js +133 -0
- package/lib/components/menu/Menu.vue2.js +4 -0
- package/lib/components/menu/MenuItem.theme.d.ts +13 -7
- package/lib/components/menu/MenuItem.theme.js +86 -0
- package/lib/components/menu/MenuItem.vue.d.ts +55 -15
- package/lib/components/menu/MenuItem.vue.js +9 -0
- package/lib/components/menu/MenuItem.vue2.js +143 -0
- package/lib/components/menu/MenuItem.vue3.js +7 -0
- package/lib/components/menu/index.d.ts +6 -0
- package/lib/components/modal/Modal.theme.d.ts +10 -13
- package/lib/components/modal/Modal.theme.js +17 -0
- package/lib/components/modal/Modal.vue.d.ts +13 -1
- package/lib/components/modal/Modal.vue.js +127 -0
- package/lib/components/modal/Modal.vue2.js +4 -0
- package/lib/components/modal/index.d.ts +3 -0
- package/lib/components/notifications/Notifications.theme.d.ts +10 -8
- package/lib/components/notifications/Notifications.theme.js +10 -0
- package/lib/components/notifications/Notifications.vue.d.ts +46 -13
- package/lib/components/notifications/Notifications.vue.js +234 -0
- package/lib/components/notifications/Notifications.vue2.js +4 -0
- package/lib/components/notifications/index.d.ts +3 -0
- package/lib/components/pagination/Pagination.theme.d.ts +10 -9
- package/lib/components/pagination/Pagination.theme.js +13 -0
- package/lib/components/pagination/Pagination.vue.d.ts +27 -4
- package/lib/components/pagination/Pagination.vue.js +131 -0
- package/lib/components/pagination/Pagination.vue2.js +4 -0
- package/lib/components/pagination/PaginationItem.theme.d.ts +10 -7
- package/lib/components/pagination/PaginationItem.theme.js +8 -0
- package/lib/components/pagination/PaginationItem.vue.d.ts +16 -1
- package/lib/components/pagination/PaginationItem.vue.js +48 -0
- package/lib/components/pagination/PaginationItem.vue2.js +4 -0
- package/lib/components/pagination/index.d.ts +6 -0
- package/lib/components/popover/Popover.theme.d.ts +10 -7
- package/lib/components/popover/Popover.theme.js +9 -0
- package/lib/components/popover/Popover.vue.d.ts +40 -10
- package/lib/components/popover/Popover.vue.js +9 -0
- package/lib/components/popover/Popover.vue2.js +106 -0
- package/lib/components/popover/Popover.vue3.js +15 -0
- package/lib/components/popover/PopoverContainer.theme.d.ts +10 -6
- package/lib/components/popover/PopoverContainer.theme.js +8 -0
- package/lib/components/popover/PopoverContainer.vue.d.ts +8 -0
- package/lib/components/popover/PopoverContainer.vue.js +30 -0
- package/lib/components/popover/PopoverContainer.vue2.js +4 -0
- package/lib/components/popover/index.d.ts +6 -0
- package/lib/components/progress/Progress.theme.d.ts +10 -12
- package/lib/components/progress/Progress.theme.js +18 -0
- package/lib/components/progress/Progress.vue.d.ts +19 -0
- package/lib/components/progress/Progress.vue.js +51 -0
- package/lib/components/progress/Progress.vue2.js +4 -0
- package/lib/components/progress/index.d.ts +3 -0
- package/lib/components/radio/Radio.theme.d.ts +13 -11
- package/lib/components/radio/Radio.theme.js +67 -0
- package/lib/components/radio/Radio.vue.d.ts +38 -6
- package/lib/components/radio/Radio.vue.js +9 -0
- package/lib/components/radio/Radio.vue2.js +117 -0
- package/lib/components/radio/Radio.vue3.js +10 -0
- package/lib/components/radio/index.d.ts +3 -0
- package/lib/components/scroll/Scroll.theme.d.ts +10 -6
- package/lib/components/scroll/Scroll.theme.js +8 -0
- package/lib/components/scroll/Scroll.vue.d.ts +12 -1
- package/lib/components/scroll/Scroll.vue.js +9 -0
- package/lib/components/scroll/Scroll.vue2.js +64 -0
- package/lib/components/scroll/Scroll.vue3.js +17 -0
- package/lib/components/scroll/index.d.ts +3 -0
- package/lib/components/select/Select.theme.d.ts +13 -12
- package/lib/components/select/Select.theme.js +23 -0
- package/lib/components/select/Select.vue.d.ts +33 -4
- package/lib/components/select/Select.vue.js +269 -0
- package/lib/components/select/Select.vue2.js +4 -0
- package/lib/components/select/index.d.ts +3 -0
- package/lib/components/skeleton/Skeleton.theme.d.ts +10 -6
- package/lib/components/skeleton/Skeleton.theme.js +8 -0
- package/lib/components/skeleton/Skeleton.vue.d.ts +8 -0
- package/lib/components/skeleton/Skeleton.vue.js +30 -0
- package/lib/components/skeleton/Skeleton.vue2.js +4 -0
- package/lib/components/skeleton/index.d.ts +3 -0
- package/lib/components/slider/Slider.theme.d.ts +10 -10
- package/lib/components/slider/Slider.theme.js +20 -0
- package/lib/components/slider/Slider.vue.d.ts +40 -4
- package/lib/components/slider/Slider.vue.js +148 -0
- package/lib/components/slider/Slider.vue2.js +4 -0
- package/lib/components/slider/index.d.ts +2 -0
- package/lib/components/spacer/Spacer.js +12 -0
- package/lib/components/spacer/index.d.ts +1 -0
- package/lib/components/spinner/Spinner.vue.d.ts +13 -0
- package/lib/components/spinner/Spinner.vue.js +28 -0
- package/lib/components/spinner/Spinner.vue2.js +4 -0
- package/lib/components/spinner/index.d.ts +2 -0
- package/lib/components/tab/Tab.theme.d.ts +12 -9
- package/lib/components/tab/Tab.theme.js +13 -0
- package/lib/components/tab/Tab.vue.d.ts +31 -9
- package/lib/components/tab/Tab.vue.js +129 -0
- package/lib/components/tab/Tab.vue2.js +4 -0
- package/lib/components/tab/TabGroup.theme.d.ts +10 -10
- package/lib/components/tab/TabGroup.theme.js +27 -0
- package/lib/components/tab/TabGroup.vue.d.ts +53 -8
- package/lib/components/tab/TabGroup.vue.js +133 -0
- package/lib/components/tab/TabGroup.vue2.js +4 -0
- package/lib/components/tab/index.d.ts +4 -0
- package/lib/components/table/Table.theme.d.ts +10 -8
- package/lib/components/table/Table.theme.js +12 -0
- package/lib/components/table/Table.vue.d.ts +268 -57
- package/lib/components/table/Table.vue.js +147 -0
- package/lib/components/table/Table.vue2.js +4 -0
- package/lib/components/table/TableBody.js +15 -0
- package/lib/components/table/TableCell.theme.d.ts +10 -7
- package/lib/components/table/TableCell.theme.js +11 -0
- package/lib/components/table/TableCell.vue.d.ts +27 -5
- package/lib/components/table/TableCell.vue.js +43 -0
- package/lib/components/table/TableCell.vue2.js +4 -0
- package/lib/components/table/TableHead.js +19 -0
- package/lib/components/table/TableHeader.vue.d.ts +26 -8
- package/lib/components/table/TableHeader.vue.js +78 -0
- package/lib/components/table/TableHeader.vue2.js +4 -0
- package/lib/components/table/TableRow.vue.js +32 -0
- package/lib/components/table/TableRow.vue2.js +4 -0
- package/lib/components/table/index.d.ts +9 -0
- package/lib/components/tag/Tag.theme.d.ts +10 -9
- package/lib/components/tag/Tag.theme.js +23 -0
- package/lib/components/tag/Tag.vue.d.ts +23 -3
- package/lib/components/tag/Tag.vue.js +61 -0
- package/lib/components/tag/Tag.vue2.js +4 -0
- package/lib/components/tag/index.d.ts +2 -0
- package/lib/components/textarea/Textarea.theme.d.ts +13 -9
- package/lib/components/textarea/Textarea.theme.js +16 -0
- package/lib/components/textarea/Textarea.vue.d.ts +56 -14
- package/lib/components/textarea/Textarea.vue.js +110 -0
- package/lib/components/textarea/Textarea.vue2.js +4 -0
- package/lib/components/textarea/index.d.ts +2 -0
- package/lib/components/toggle/Toggle.theme.d.ts +10 -11
- package/lib/components/toggle/Toggle.theme.js +29 -0
- package/lib/components/toggle/Toggle.vue.d.ts +36 -4
- package/lib/components/toggle/Toggle.vue.js +110 -0
- package/lib/components/toggle/Toggle.vue2.js +4 -0
- package/lib/components/toggle/index.d.ts +2 -0
- package/lib/components/tooltip/Tooltip.vue.d.ts +3 -0
- package/lib/components/tooltip/Tooltip.vue.js +27 -0
- package/lib/components/tooltip/Tooltip.vue2.js +4 -0
- package/lib/components/tooltip/index.d.ts +2 -0
- package/lib/composables/colors-utils.js +19 -0
- package/lib/composables/colors.d.ts +2 -1
- package/lib/composables/colors.js +52 -0
- package/lib/composables/common.d.ts +1 -1
- package/lib/composables/common.js +17 -0
- package/lib/composables/css.js +26 -0
- package/lib/composables/inputtable.d.ts +4 -4
- package/lib/composables/inputtable.js +78 -0
- package/lib/composables/interactive.js +17 -0
- package/lib/composables/keys.d.ts +6 -3
- package/lib/composables/keys.js +10 -0
- package/lib/composables/notifications.js +9 -0
- package/lib/composables/theme.d.ts +13 -7
- package/lib/composables/theme.js +59 -0
- package/lib/create.js +19 -0
- package/lib/index.js +121 -0
- package/lib/index.umd.js +1 -0
- package/lib/install.js +10 -0
- package/lib/node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.4/node_modules/@vueuse/core/index.js +379 -0
- package/lib/node_modules/.pnpm/@vueuse_shared@10.2.0_vue@3.3.4/node_modules/@vueuse/shared/index.js +90 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +4 -0
- package/package.json +8 -8
- package/src/common/utils.ts +25 -2
- package/src/components/alert/Alert.theme.ts +15 -6
- package/src/components/alert/Alert.vue +24 -12
- package/src/components/alert/index.ts +3 -0
- package/src/components/avatar/Avatar.theme.ts +16 -4
- package/src/components/avatar/Avatar.vue +18 -14
- package/src/components/avatar/index.ts +3 -0
- package/src/components/badge/Badge.theme.ts +13 -3
- package/src/components/badge/Badge.vue +30 -15
- package/src/components/badge/index.ts +3 -0
- package/src/components/breadcrumbs/Breadcrumbs.theme.ts +12 -2
- package/src/components/breadcrumbs/Breadcrumbs.vue +24 -21
- package/src/components/breadcrumbs/index.ts +3 -0
- package/src/components/button/Button.theme.ts +18 -8
- package/src/components/button/Button.vue +28 -18
- package/src/components/button/ButtonGroup.theme.ts +14 -1
- package/src/components/button/ButtonGroup.vue +29 -15
- package/src/components/button/index.ts +7 -0
- package/src/components/card/Card.theme.ts +13 -3
- package/src/components/card/Card.vue +12 -7
- package/src/components/card/index.ts +3 -0
- package/src/components/checkbox/Checkbox.theme.ts +19 -7
- package/src/components/checkbox/Checkbox.vue +20 -11
- package/src/components/checkbox/index.ts +3 -0
- package/src/components/collapse/Collapse.theme.ts +13 -3
- package/src/components/collapse/Collapse.vue +16 -12
- package/src/components/collapse/index.ts +3 -0
- package/src/components/container/Container.theme.ts +12 -2
- package/src/components/container/Container.vue +11 -6
- package/src/components/container/index.ts +3 -0
- package/src/components/divider/Divider.theme.ts +13 -3
- package/src/components/divider/Divider.vue +9 -4
- package/src/components/divider/index.ts +3 -0
- package/src/components/drawer/Drawer.theme.ts +12 -2
- package/src/components/drawer/Drawer.vue +27 -18
- package/src/components/drawer/index.ts +3 -0
- package/src/components/form/Form.theme.ts +12 -2
- package/src/components/form/Form.vue +38 -28
- package/src/components/form/index.ts +3 -0
- package/src/components/helpers/InputError.tsx +2 -2
- package/src/components/icon/Icon.theme.ts +13 -3
- package/src/components/icon/Icon.vue +24 -15
- package/src/components/icon/__tests__/Icon.spec.ts +5 -1
- package/src/components/icon/index.ts +3 -0
- package/src/components/image/Image.theme.ts +12 -2
- package/src/components/image/Image.vue +8 -4
- package/src/components/image/index.ts +3 -0
- package/src/components/index.ts +35 -45
- package/src/components/input/Input.theme.ts +17 -6
- package/src/components/input/Input.vue +31 -20
- package/src/components/input/index.ts +3 -0
- package/src/components/link/Link.theme.ts +13 -3
- package/src/components/link/Link.vue +16 -11
- package/src/components/link/index.ts +3 -0
- package/src/components/menu/Menu.theme.ts +12 -2
- package/src/components/menu/Menu.vue +59 -23
- package/src/components/menu/MenuItem.theme.ts +17 -5
- package/src/components/menu/MenuItem.vue +56 -48
- package/src/components/menu/index.ts +7 -0
- package/src/components/modal/Modal.theme.ts +13 -3
- package/src/components/modal/Modal.vue +22 -11
- package/src/components/modal/index.ts +3 -0
- package/src/components/notifications/Notifications.theme.ts +12 -2
- package/src/components/notifications/Notifications.vue +53 -49
- package/src/components/notifications/index.ts +9 -0
- package/src/components/pagination/Pagination.theme.ts +15 -5
- package/src/components/pagination/Pagination.vue +24 -18
- package/src/components/pagination/PaginationItem.theme.ts +13 -3
- package/src/components/pagination/PaginationItem.vue +14 -10
- package/src/components/pagination/index.ts +7 -0
- package/src/components/popover/Popover.theme.ts +12 -2
- package/src/components/popover/Popover.vue +27 -21
- package/src/components/popover/PopoverContainer.theme.ts +12 -2
- package/src/components/popover/PopoverContainer.vue +11 -6
- package/src/components/popover/index.ts +7 -0
- package/src/components/progress/Progress.theme.ts +14 -4
- package/src/components/progress/Progress.vue +16 -16
- package/src/components/progress/index.ts +3 -0
- package/src/components/radio/Radio.theme.ts +19 -7
- package/src/components/radio/Radio.vue +21 -12
- package/src/components/radio/index.ts +3 -0
- package/src/components/scroll/Scroll.theme.ts +12 -2
- package/src/components/scroll/Scroll.vue +14 -10
- package/src/components/scroll/index.ts +3 -0
- package/src/components/select/Select.theme.ts +20 -6
- package/src/components/select/Select.vue +28 -19
- package/src/components/select/index.ts +3 -0
- package/src/components/skeleton/Skeleton.theme.ts +12 -2
- package/src/components/skeleton/Skeleton.vue +11 -6
- package/src/components/skeleton/index.ts +3 -0
- package/src/components/slider/Slider.theme.ts +14 -4
- package/src/components/slider/Slider.vue +24 -16
- package/src/components/slider/index.ts +2 -0
- package/src/components/spacer/index.ts +1 -0
- package/src/components/spinner/Spinner.vue +18 -8
- package/src/components/spinner/index.ts +2 -0
- package/src/components/tab/Tab.theme.ts +15 -3
- package/src/components/tab/Tab.vue +85 -68
- package/src/components/tab/TabGroup.theme.ts +15 -5
- package/src/components/tab/TabGroup.vue +67 -22
- package/src/components/tab/index.ts +5 -0
- package/src/components/table/Table.theme.ts +14 -4
- package/src/components/table/Table.vue +41 -31
- package/src/components/table/TableCell.theme.ts +13 -3
- package/src/components/table/TableCell.vue +22 -16
- package/src/components/table/TableHeader.vue +20 -17
- package/src/components/table/index.ts +10 -0
- package/src/components/tag/Tag.theme.ts +14 -4
- package/src/components/tag/Tag.vue +22 -13
- package/src/components/tag/index.ts +2 -0
- package/src/components/textarea/Textarea.theme.ts +18 -30
- package/src/components/textarea/Textarea.vue +28 -19
- package/src/components/textarea/index.ts +2 -0
- package/src/components/toggle/Toggle.theme.ts +16 -6
- package/src/components/toggle/Toggle.vue +21 -12
- package/src/components/toggle/index.ts +2 -0
- package/src/components/tooltip/Tooltip.vue +5 -0
- package/src/components/tooltip/index.ts +2 -0
- package/src/composables/colors-utils.ts +1 -78
- package/src/composables/colors.ts +6 -4
- package/src/composables/common.ts +1 -1
- package/src/composables/inputtable.ts +4 -4
- package/src/composables/keys.ts +6 -3
- package/src/composables/theme.ts +26 -23
- package/src/create.ts +1 -2
- package/src/version.ts +1 -1
- package/volar.d.ts +1 -1
- package/lib/components/tooltip/Tooltip.theme.d.ts +0 -11
- package/lib/index.cjs.js +0 -1
- package/lib/index.es.js +0 -5187
- package/src/components/tooltip/Tooltip.theme.ts +0 -51
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent as t, openBlock as r, createBlock as n } from "vue";
|
|
2
|
+
import { useCommon as o } from "../../composables/common.js";
|
|
3
|
+
import i from "../icon/Icon.vue.js";
|
|
4
|
+
const a = {
|
|
5
|
+
...o.props(),
|
|
6
|
+
icon: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: '<g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".5" cx="18" cy="18" r="18"/><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="0.5s" repeatCount="indefinite"/></path></g></g>'
|
|
9
|
+
}
|
|
10
|
+
}, s = {
|
|
11
|
+
name: "XSpinner",
|
|
12
|
+
validators: {
|
|
13
|
+
...o.validators()
|
|
14
|
+
}
|
|
15
|
+
}, d = /* @__PURE__ */ t({
|
|
16
|
+
...s,
|
|
17
|
+
props: a,
|
|
18
|
+
setup(p) {
|
|
19
|
+
return (e, c) => (r(), n(i, {
|
|
20
|
+
icon: e.icon,
|
|
21
|
+
size: e.size,
|
|
22
|
+
"view-box": "0 0 38 38"
|
|
23
|
+
}, null, 8, ["icon", "size"]));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
d as default
|
|
28
|
+
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { TabProps } from './Tab.vue';
|
|
3
|
+
import type { TabGroupInjection } from './TabGroup.vue';
|
|
4
|
+
type InternalClasses = 'wrapper' | 'label' | 'icon';
|
|
5
|
+
type InternalExtraData = Pick<TabGroupInjection, 'state'>['state'];
|
|
6
|
+
interface InternalTheme extends ThemeComponent<TabProps, InternalClasses, InternalExtraData> {
|
|
7
|
+
}
|
|
8
|
+
export interface TabTheme extends Omit<InternalTheme, 'classes'> {
|
|
9
|
+
classes?: Partial<ThemeClasses<TabProps, InternalClasses, InternalExtraData>>;
|
|
10
|
+
}
|
|
11
|
+
declare const theme: InternalTheme;
|
|
12
|
+
export default theme;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const i = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: ({ props: t, data: s }) => {
|
|
4
|
+
const e = ["py-2 transition-colors duration-150 ease-in-out whitespace-nowrap text-center"];
|
|
5
|
+
return s.variant === "block" && e.push("px-8"), t.size === "xs" ? e.push("text-xs") : t.size === "sm" ? e.push("text-sm") : t.size === "lg" ? e.push("text-lg") : t.size === "xl" && e.push("text-xl"), e;
|
|
6
|
+
},
|
|
7
|
+
label: "",
|
|
8
|
+
icon: "mr-1.5"
|
|
9
|
+
}
|
|
10
|
+
}, l = i;
|
|
11
|
+
export {
|
|
12
|
+
l as default
|
|
13
|
+
};
|
|
@@ -1,49 +1,71 @@
|
|
|
1
|
+
import { type ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
import { type Size } from '../../composables/common';
|
|
3
|
+
declare const tabProps: {
|
|
4
|
+
value: {
|
|
5
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
6
|
+
};
|
|
7
|
+
tag: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
to: (ObjectConstructor | StringConstructor)[];
|
|
12
|
+
label: StringConstructor;
|
|
13
|
+
icon: StringConstructor;
|
|
14
|
+
disabled: BooleanConstructor;
|
|
15
|
+
exact: BooleanConstructor;
|
|
16
|
+
size: {
|
|
17
|
+
readonly type: import("vue").PropType<Size>;
|
|
18
|
+
readonly default: "md";
|
|
19
|
+
readonly validator: (value: string) => boolean;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export type TabProps = ExtractPublicPropTypes<typeof tabProps>;
|
|
1
23
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
24
|
value: {
|
|
3
|
-
type: (
|
|
25
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
4
26
|
};
|
|
5
27
|
tag: {
|
|
6
28
|
type: StringConstructor;
|
|
7
29
|
default: string;
|
|
8
30
|
};
|
|
9
|
-
to: StringConstructor;
|
|
31
|
+
to: (ObjectConstructor | StringConstructor)[];
|
|
10
32
|
label: StringConstructor;
|
|
11
33
|
icon: StringConstructor;
|
|
12
34
|
disabled: BooleanConstructor;
|
|
13
35
|
exact: BooleanConstructor;
|
|
14
36
|
size: {
|
|
15
|
-
readonly type: import("vue").PropType<
|
|
37
|
+
readonly type: import("vue").PropType<Size>;
|
|
16
38
|
readonly default: "md";
|
|
17
39
|
readonly validator: (value: string) => boolean;
|
|
18
40
|
};
|
|
19
41
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
42
|
value: {
|
|
21
|
-
type: (
|
|
43
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
22
44
|
};
|
|
23
45
|
tag: {
|
|
24
46
|
type: StringConstructor;
|
|
25
47
|
default: string;
|
|
26
48
|
};
|
|
27
|
-
to: StringConstructor;
|
|
49
|
+
to: (ObjectConstructor | StringConstructor)[];
|
|
28
50
|
label: StringConstructor;
|
|
29
51
|
icon: StringConstructor;
|
|
30
52
|
disabled: BooleanConstructor;
|
|
31
53
|
exact: BooleanConstructor;
|
|
32
54
|
size: {
|
|
33
|
-
readonly type: import("vue").PropType<
|
|
55
|
+
readonly type: import("vue").PropType<Size>;
|
|
34
56
|
readonly default: "md";
|
|
35
57
|
readonly validator: (value: string) => boolean;
|
|
36
58
|
};
|
|
37
59
|
}>>, {
|
|
38
|
-
size: import("../../composables/common").Size;
|
|
39
|
-
tag: string;
|
|
40
60
|
disabled: boolean;
|
|
61
|
+
size: Size;
|
|
41
62
|
exact: boolean;
|
|
63
|
+
tag: string;
|
|
42
64
|
}, {}>, {
|
|
43
65
|
tab?(_: {
|
|
44
66
|
label: string | undefined;
|
|
45
67
|
value: string | number | undefined;
|
|
46
|
-
size:
|
|
68
|
+
size: Size;
|
|
47
69
|
icon: string | undefined;
|
|
48
70
|
}): any;
|
|
49
71
|
default?(_: {}): any;
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { defineComponent as j, computed as r, ref as n, inject as B, reactive as N, onMounted as R, openBlock as m, createBlock as f, resolveDynamicComponent as D, normalizeStyle as L, unref as l, normalizeClass as p, withCtx as V, renderSlot as y, createElementVNode as g, createCommentVNode as x, toDisplayString as E, Teleport as M } from "vue";
|
|
2
|
+
import { useMutationObserver as O } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.4/node_modules/@vueuse/core/index.js";
|
|
3
|
+
import { injectTabKey as P } from "../../composables/keys.js";
|
|
4
|
+
import { useCommon as h } from "../../composables/common.js";
|
|
5
|
+
import { useTheme as X } from "../../composables/theme.js";
|
|
6
|
+
import F from "../icon/Icon.vue.js";
|
|
7
|
+
import K from "../link/Link.vue.js";
|
|
8
|
+
import q from "./Tab.theme.js";
|
|
9
|
+
const A = { class: "flex items-center justify-center" }, G = {
|
|
10
|
+
...h.props(),
|
|
11
|
+
value: {
|
|
12
|
+
type: [String, Number]
|
|
13
|
+
},
|
|
14
|
+
tag: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "div"
|
|
17
|
+
},
|
|
18
|
+
to: [String, Object],
|
|
19
|
+
label: String,
|
|
20
|
+
icon: String,
|
|
21
|
+
disabled: Boolean,
|
|
22
|
+
exact: Boolean
|
|
23
|
+
}, H = {
|
|
24
|
+
name: "XTab",
|
|
25
|
+
validators: {
|
|
26
|
+
...h.validators()
|
|
27
|
+
}
|
|
28
|
+
}, ee = /* @__PURE__ */ j({
|
|
29
|
+
...H,
|
|
30
|
+
props: G,
|
|
31
|
+
setup(z) {
|
|
32
|
+
const t = z, i = r(() => {
|
|
33
|
+
var e, d;
|
|
34
|
+
return ((d = (e = o.value) == null ? void 0 : e.$el) == null ? void 0 : d.href) || t.value;
|
|
35
|
+
}), C = r(() => t.label || t.value), c = n(null), o = n(null), a = B(P, {
|
|
36
|
+
tabsContentRef: n(null),
|
|
37
|
+
activateTab: () => {
|
|
38
|
+
},
|
|
39
|
+
state: N({
|
|
40
|
+
active: void 0,
|
|
41
|
+
variant: "line",
|
|
42
|
+
ghost: !1,
|
|
43
|
+
grow: !1,
|
|
44
|
+
exact: !1,
|
|
45
|
+
size: "md",
|
|
46
|
+
color: "primary"
|
|
47
|
+
})
|
|
48
|
+
}), b = r(() => a.state.exact || t.exact), u = r(() => t.size || a.state.size);
|
|
49
|
+
R(() => {
|
|
50
|
+
c.value = a.tabsContentRef.value, t.to && o.value && (k(), O(o.value.$el, k, {
|
|
51
|
+
attributes: !0,
|
|
52
|
+
attributeFilter: ["class"]
|
|
53
|
+
}));
|
|
54
|
+
});
|
|
55
|
+
function k() {
|
|
56
|
+
o.value && o.value.$el && t.to && o.value.$el.classList.contains(b.value ? "router-link-exact-active" : "router-link-active") && a.activateTab(i.value);
|
|
57
|
+
}
|
|
58
|
+
const s = r(() => a.state.active === i.value), S = r(() => a.state.color);
|
|
59
|
+
function T(e) {
|
|
60
|
+
if (t.disabled) {
|
|
61
|
+
e.preventDefault(), e.stopPropagation();
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
!t.to && i.value && a.activateTab(i.value);
|
|
65
|
+
}
|
|
66
|
+
const { styles: $, classes: v, className: w } = X("tab", q, n({
|
|
67
|
+
...t,
|
|
68
|
+
size: u.value,
|
|
69
|
+
exact: b.value
|
|
70
|
+
}), a.state);
|
|
71
|
+
return (e, d) => (m(), f(D(e.to ? K : e.tag), {
|
|
72
|
+
ref_key: "elRef",
|
|
73
|
+
ref: o,
|
|
74
|
+
"data-value": i.value,
|
|
75
|
+
to: e.to,
|
|
76
|
+
color: s.value ? S.value : void 0,
|
|
77
|
+
style: L([
|
|
78
|
+
l($),
|
|
79
|
+
e.to && s.value && l(a).state.variant === "block" ? "--x-link-text: var(--x-tabs-text); --x-link-text-hover: var(--x-tabs-text);" : ""
|
|
80
|
+
]),
|
|
81
|
+
class: p([
|
|
82
|
+
l(w),
|
|
83
|
+
l(v).wrapper,
|
|
84
|
+
"shrink-0 font-medium",
|
|
85
|
+
{
|
|
86
|
+
"flex-1": l(a).state.grow,
|
|
87
|
+
"text-[color:var(--x-tabs-text)] dark:text-[color:var(--x-tabs-dark-text)]": s.value,
|
|
88
|
+
"cursor-pointer": !e.disabled,
|
|
89
|
+
"cursor-not-allowed": e.disabled,
|
|
90
|
+
"cursor-not-allowed text-gray-500": e.disabled && !s.value
|
|
91
|
+
}
|
|
92
|
+
]),
|
|
93
|
+
"aria-disabled": e.disabled ? "true" : void 0,
|
|
94
|
+
"aria-selected": s.value ? "true" : "false",
|
|
95
|
+
onClick: T
|
|
96
|
+
}, {
|
|
97
|
+
default: V(() => [
|
|
98
|
+
y(e.$slots, "tab", {
|
|
99
|
+
label: e.label,
|
|
100
|
+
value: e.value,
|
|
101
|
+
size: u.value,
|
|
102
|
+
icon: e.icon
|
|
103
|
+
}, () => [
|
|
104
|
+
g("div", A, [
|
|
105
|
+
e.icon ? (m(), f(F, {
|
|
106
|
+
key: 0,
|
|
107
|
+
icon: e.icon,
|
|
108
|
+
size: u.value,
|
|
109
|
+
class: p(l(v).icon)
|
|
110
|
+
}, null, 8, ["icon", "size", "class"])) : x("", !0),
|
|
111
|
+
g("div", {
|
|
112
|
+
class: p(l(v).label)
|
|
113
|
+
}, E(C.value), 3)
|
|
114
|
+
])
|
|
115
|
+
]),
|
|
116
|
+
s.value && c.value ? (m(), f(M, {
|
|
117
|
+
key: 0,
|
|
118
|
+
to: c.value
|
|
119
|
+
}, [
|
|
120
|
+
y(e.$slots, "default")
|
|
121
|
+
], 8, ["to"])) : x("", !0)
|
|
122
|
+
]),
|
|
123
|
+
_: 3
|
|
124
|
+
}, 8, ["data-value", "to", "color", "style", "class", "aria-disabled", "aria-selected"]));
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
export {
|
|
128
|
+
ee as default
|
|
129
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export default
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { TabGroupProps } from './TabGroup.vue';
|
|
3
|
+
type InternalClasses = 'wrapper' | 'list' | 'tracker';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<TabGroupProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface TabGroupTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<TabGroupProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const l = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: "",
|
|
4
|
+
list: ({ props: t }) => {
|
|
5
|
+
const a = ["flex min-w-full w-fit"];
|
|
6
|
+
return t.variant === "line" && a.push("border-b border-gray-200 dark:border-gray-700"), t.variant === "line" && !t.grow && a.push("space-x-8"), t.variant === "block" && a.push("z-[1]"), t.align === "center" && a.push("justify-center"), t.align === "right" && a.push("justify-end"), a;
|
|
7
|
+
},
|
|
8
|
+
tracker: ({ props: t }) => {
|
|
9
|
+
const a = ["absolute transition-all duration-150"];
|
|
10
|
+
return t.variant === "line" && a.push("h-[2px] -mt-[2px] bg-[color:var(--x-tabs-text)] dark:bg-[color:var(--x-tabs-dark-text)]"), t.variant === "block" && a.push("rounded-md h-full top-0 bg-[color:var(--x-tabs-bg)] dark:bg-[color:var(--x-tabs-dark-bg)]"), a;
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
styles: ({ props: t, colors: a, css: e }) => {
|
|
14
|
+
const i = a.getPalette("gray"), r = a.getPalette(t.color);
|
|
15
|
+
return e.variables({
|
|
16
|
+
text: r[600],
|
|
17
|
+
bg: t.ghost ? r[50] : "#fff",
|
|
18
|
+
dark: {
|
|
19
|
+
text: r[400],
|
|
20
|
+
bg: t.ghost ? r[900] : i[700]
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}, n = l;
|
|
25
|
+
export {
|
|
26
|
+
n as default
|
|
27
|
+
};
|
|
@@ -1,6 +1,51 @@
|
|
|
1
|
-
import { type PropType } from 'vue';
|
|
1
|
+
import { type PropType, type ExtractPublicPropTypes, type Ref } from 'vue';
|
|
2
|
+
import { type Size } from '../../composables/common';
|
|
3
|
+
declare const validators: {
|
|
4
|
+
variant: readonly ["line", "block"];
|
|
5
|
+
align: readonly ["left", "center", "right"];
|
|
6
|
+
size: string[];
|
|
7
|
+
};
|
|
8
|
+
declare const tabGroupProps: {
|
|
9
|
+
modelValue: (StringConstructor | NumberConstructor)[];
|
|
10
|
+
variant: {
|
|
11
|
+
type: PropType<"line" | "block">;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
align: {
|
|
15
|
+
type: PropType<"left" | "right" | "center">;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
ghost: BooleanConstructor;
|
|
19
|
+
grow: BooleanConstructor;
|
|
20
|
+
exact: BooleanConstructor;
|
|
21
|
+
color: {
|
|
22
|
+
readonly type: StringConstructor;
|
|
23
|
+
readonly default: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
size: {
|
|
26
|
+
readonly type: PropType<Size>;
|
|
27
|
+
readonly default: "md";
|
|
28
|
+
readonly validator: (value: string) => boolean;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type TabGroupInjection = {
|
|
32
|
+
tabsContentRef: Ref<HTMLElement | null>;
|
|
33
|
+
activateTab: (tab: string | number) => void;
|
|
34
|
+
state: {
|
|
35
|
+
active: string | number | undefined;
|
|
36
|
+
variant: TabGroupVariant;
|
|
37
|
+
ghost: boolean;
|
|
38
|
+
grow: boolean;
|
|
39
|
+
exact: boolean;
|
|
40
|
+
size: Size;
|
|
41
|
+
color: string;
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export type TabGroupVariant = typeof validators.variant[number];
|
|
45
|
+
export type TabGroupAlign = typeof validators.align[number];
|
|
46
|
+
export type TabGroupProps = ExtractPublicPropTypes<typeof tabGroupProps>;
|
|
2
47
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
3
|
-
modelValue: (
|
|
48
|
+
modelValue: (StringConstructor | NumberConstructor)[];
|
|
4
49
|
variant: {
|
|
5
50
|
type: PropType<"line" | "block">;
|
|
6
51
|
default: string;
|
|
@@ -17,12 +62,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
17
62
|
readonly default: string | undefined;
|
|
18
63
|
};
|
|
19
64
|
size: {
|
|
20
|
-
readonly type: PropType<
|
|
65
|
+
readonly type: PropType<Size>;
|
|
21
66
|
readonly default: "md";
|
|
22
67
|
readonly validator: (value: string) => boolean;
|
|
23
68
|
};
|
|
24
69
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
-
modelValue: (
|
|
70
|
+
modelValue: (StringConstructor | NumberConstructor)[];
|
|
26
71
|
variant: {
|
|
27
72
|
type: PropType<"line" | "block">;
|
|
28
73
|
default: string;
|
|
@@ -39,20 +84,20 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
39
84
|
readonly default: string | undefined;
|
|
40
85
|
};
|
|
41
86
|
size: {
|
|
42
|
-
readonly type: PropType<
|
|
87
|
+
readonly type: PropType<Size>;
|
|
43
88
|
readonly default: "md";
|
|
44
89
|
readonly validator: (value: string) => boolean;
|
|
45
90
|
};
|
|
46
91
|
}>> & {
|
|
47
92
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
48
93
|
}, {
|
|
49
|
-
size: import("../../composables/common").Size;
|
|
50
94
|
color: string;
|
|
95
|
+
size: Size;
|
|
96
|
+
variant: "line" | "block";
|
|
51
97
|
align: "left" | "right" | "center";
|
|
52
98
|
ghost: boolean;
|
|
53
|
-
exact: boolean;
|
|
54
|
-
variant: "line" | "block";
|
|
55
99
|
grow: boolean;
|
|
100
|
+
exact: boolean;
|
|
56
101
|
}, {}>, {
|
|
57
102
|
default?(_: {}): any;
|
|
58
103
|
}>;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { defineComponent as B, ref as l, watchEffect as x, reactive as E, computed as a, provide as V, watch as z, onMounted as N, openBlock as $, createElementBlock as q, createElementVNode as c, normalizeClass as f, unref as n, normalizeStyle as F, createVNode as G, withCtx as L, renderSlot as M, withDirectives as X, vShow as j, nextTick as D } from "vue";
|
|
2
|
+
import { useMutationObserver as K } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.4/node_modules/@vueuse/core/index.js";
|
|
3
|
+
import { injectTabKey as O } from "../../composables/keys.js";
|
|
4
|
+
import { useCommon as g } from "../../composables/common.js";
|
|
5
|
+
import { useColors as P } from "../../composables/colors.js";
|
|
6
|
+
import { useTheme as W } from "../../composables/theme.js";
|
|
7
|
+
import A from "../scroll/Scroll.vue.js";
|
|
8
|
+
import H from "./TabGroup.theme.js";
|
|
9
|
+
import { useThrottleFn as I } from "../../node_modules/.pnpm/@vueuse_shared@10.2.0_vue@3.3.4/node_modules/@vueuse/shared/index.js";
|
|
10
|
+
const J = {
|
|
11
|
+
...g.validators(),
|
|
12
|
+
variant: ["line", "block"],
|
|
13
|
+
align: ["left", "center", "right"]
|
|
14
|
+
}, Q = {
|
|
15
|
+
...g.props(),
|
|
16
|
+
...P.props("primary"),
|
|
17
|
+
modelValue: [String, Number],
|
|
18
|
+
variant: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "line"
|
|
21
|
+
},
|
|
22
|
+
align: {
|
|
23
|
+
type: String,
|
|
24
|
+
default: "left"
|
|
25
|
+
},
|
|
26
|
+
ghost: Boolean,
|
|
27
|
+
grow: Boolean,
|
|
28
|
+
exact: Boolean
|
|
29
|
+
}, U = {
|
|
30
|
+
name: "XTabGroup",
|
|
31
|
+
validators: J
|
|
32
|
+
}, ne = /* @__PURE__ */ B({
|
|
33
|
+
...U,
|
|
34
|
+
props: Q,
|
|
35
|
+
emits: ["update:modelValue"],
|
|
36
|
+
setup(k, { emit: y }) {
|
|
37
|
+
const t = k, i = l(null), w = l(null), u = l(null), r = l(null), m = l(null), s = l();
|
|
38
|
+
x(() => {
|
|
39
|
+
s.value = t.modelValue;
|
|
40
|
+
});
|
|
41
|
+
const R = E({
|
|
42
|
+
active: a(() => s.value),
|
|
43
|
+
variant: a(() => t.variant),
|
|
44
|
+
ghost: a(() => t.ghost),
|
|
45
|
+
grow: a(() => t.grow),
|
|
46
|
+
exact: a(() => t.exact),
|
|
47
|
+
size: a(() => t.size),
|
|
48
|
+
color: a(() => t.color)
|
|
49
|
+
});
|
|
50
|
+
function d(e) {
|
|
51
|
+
s.value = e, y("update:modelValue", e);
|
|
52
|
+
}
|
|
53
|
+
V(O, {
|
|
54
|
+
tabsContentRef: m,
|
|
55
|
+
activateTab: d,
|
|
56
|
+
state: R
|
|
57
|
+
});
|
|
58
|
+
const h = I(async (e) => {
|
|
59
|
+
var b;
|
|
60
|
+
if (typeof e > "u")
|
|
61
|
+
return;
|
|
62
|
+
await D();
|
|
63
|
+
const o = (b = r.value) == null ? void 0 : b.querySelector(`[data-value="${e}"]`);
|
|
64
|
+
if (!o || !u.value || (u.value.style.left = `${o.offsetLeft}px`, u.value.style.width = `${o.offsetWidth}px`, !r.value || !i.value))
|
|
65
|
+
return;
|
|
66
|
+
const T = o.offsetLeft - (r.value.getBoundingClientRect().width - o.getBoundingClientRect().width) / 2;
|
|
67
|
+
i.value.scrollEl && i.value.scrollEl.scrollTo({ left: T, behavior: "smooth" });
|
|
68
|
+
}, 100), v = l(!0);
|
|
69
|
+
function S() {
|
|
70
|
+
var e;
|
|
71
|
+
(e = r.value) != null && e.querySelector(".router-link-active") ? v.value = !0 : (d(null), v.value = !1);
|
|
72
|
+
}
|
|
73
|
+
z(() => s.value, (e) => {
|
|
74
|
+
h(e);
|
|
75
|
+
}), N(() => {
|
|
76
|
+
var e;
|
|
77
|
+
(e = r.value) != null && e.querySelector(".x-link") && K(r.value, S, {
|
|
78
|
+
attributes: !0,
|
|
79
|
+
subtree: !0,
|
|
80
|
+
attributeFilter: ["class"]
|
|
81
|
+
}), h(s.value);
|
|
82
|
+
});
|
|
83
|
+
const { styles: _, classes: p, className: C } = W("tabs", H, t);
|
|
84
|
+
return (e, o) => ($(), q("div", null, [
|
|
85
|
+
c("div", {
|
|
86
|
+
ref_key: "wrapperRef",
|
|
87
|
+
ref: w,
|
|
88
|
+
class: f(["relative", [
|
|
89
|
+
n(C),
|
|
90
|
+
n(p).wrapper
|
|
91
|
+
]]),
|
|
92
|
+
style: F(n(_))
|
|
93
|
+
}, [
|
|
94
|
+
G(A, {
|
|
95
|
+
ref_key: "scrollRef",
|
|
96
|
+
ref: i,
|
|
97
|
+
scrollbar: !1,
|
|
98
|
+
horizontal: "",
|
|
99
|
+
mousewheel: "",
|
|
100
|
+
class: f({
|
|
101
|
+
"rounded-md": e.variant === "block",
|
|
102
|
+
"bg-slate-100 dark:bg-gray-800 p-1": e.variant === "block" && !e.ghost
|
|
103
|
+
})
|
|
104
|
+
}, {
|
|
105
|
+
default: L(() => [
|
|
106
|
+
c("div", {
|
|
107
|
+
ref_key: "tabsRef",
|
|
108
|
+
ref: r,
|
|
109
|
+
class: f(["relative", n(p).list])
|
|
110
|
+
}, [
|
|
111
|
+
M(e.$slots, "default")
|
|
112
|
+
], 2),
|
|
113
|
+
X(c("div", {
|
|
114
|
+
ref_key: "trackerRef",
|
|
115
|
+
ref: u,
|
|
116
|
+
class: f(n(p).tracker)
|
|
117
|
+
}, null, 2), [
|
|
118
|
+
[j, v.value]
|
|
119
|
+
])
|
|
120
|
+
]),
|
|
121
|
+
_: 3
|
|
122
|
+
}, 8, ["class"])
|
|
123
|
+
], 6),
|
|
124
|
+
c("div", {
|
|
125
|
+
ref_key: "tabsContentRef",
|
|
126
|
+
ref: m
|
|
127
|
+
}, null, 512)
|
|
128
|
+
]));
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
export {
|
|
132
|
+
ne as default
|
|
133
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { TableProps } from './Table.vue';
|
|
3
|
+
type InternalClasses = 'wrapper' | 'loadingWrapper';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<TableProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface TableTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<TableProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: ({ props: a, data: l }) => {
|
|
4
|
+
const e = ["w-full relative"];
|
|
5
|
+
return a.scrollable && e.push("overflow-x-scroll sm:overflow-x-auto whitespace-wrap sm:whitespace-normal block sm:table"), a.stickyHeader && e.push("relative"), a.fixed && e.push("table-fixed"), 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
|
+
}, r = t;
|
|
10
|
+
export {
|
|
11
|
+
r as default
|
|
12
|
+
};
|