@indielayer/ui 1.0.10 → 1.2.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 +10 -9
- 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,94 @@
|
|
|
1
|
+
import { defineComponent as v, useSlots as z, computed as l, openBlock as o, createBlock as S, resolveDynamicComponent as w, normalizeStyle as n, unref as s, normalizeClass as i, withCtx as B, createElementVNode as r, renderSlot as a, createElementBlock as p, createCommentVNode as f } from "vue";
|
|
2
|
+
import { useTheme as C } from "../../composables/theme.js";
|
|
3
|
+
import { useCommon as m } from "../../composables/common.js";
|
|
4
|
+
import { useColors as k } from "../../composables/colors.js";
|
|
5
|
+
import N from "./Badge.theme.js";
|
|
6
|
+
const X = { class: "relative inline-block" }, x = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "animate-ping opacity-75 absolute top-0 left-0 rounded-full h-full w-full z-10 bg-[color:var(--x-badge-bg)]"
|
|
9
|
+
}, Y = ["left", "right"], $ = ["top", "bottom"], E = {
|
|
10
|
+
...m.props(),
|
|
11
|
+
...k.props("primary"),
|
|
12
|
+
tag: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: "div"
|
|
15
|
+
},
|
|
16
|
+
position: {
|
|
17
|
+
type: String,
|
|
18
|
+
default: "top"
|
|
19
|
+
},
|
|
20
|
+
align: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "right"
|
|
23
|
+
},
|
|
24
|
+
offsetX: [Number, String],
|
|
25
|
+
offsetY: [Number, String],
|
|
26
|
+
animated: Boolean,
|
|
27
|
+
outlined: Boolean,
|
|
28
|
+
icon: String,
|
|
29
|
+
show: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !0
|
|
32
|
+
}
|
|
33
|
+
}, P = {
|
|
34
|
+
name: "XBadge",
|
|
35
|
+
validators: {
|
|
36
|
+
...m.validators(),
|
|
37
|
+
position: $,
|
|
38
|
+
align: Y
|
|
39
|
+
}
|
|
40
|
+
}, R = /* @__PURE__ */ v({
|
|
41
|
+
...P,
|
|
42
|
+
props: E,
|
|
43
|
+
setup(u) {
|
|
44
|
+
const t = u, d = z(), g = l(() => {
|
|
45
|
+
const e = [];
|
|
46
|
+
return t.position === "top" && e.push("top-0"), t.position === "bottom" && e.push("bottom-0"), t.align === "left" && e.push("left-0"), t.align === "right" && e.push("right-0"), d.content ? e.push("-m-[7.5%]") : t.outlined ? e.push("-m-[5%]") : e.push("-m-[3.5%]"), e;
|
|
47
|
+
}), c = l(() => {
|
|
48
|
+
const e = {};
|
|
49
|
+
return t.offsetX && (e[t.align === "left" ? "marginLeft" : "marginRight"] = t.offsetX + "px"), t.offsetY && (e[t.position === "top" ? "marginTop" : "marginBottom"] = t.offsetY + "px"), e;
|
|
50
|
+
}), { styles: h, classes: b, className: y } = C("badge", N, t);
|
|
51
|
+
return (e, T) => (o(), S(w(e.tag), {
|
|
52
|
+
style: n(s(h)),
|
|
53
|
+
class: i([
|
|
54
|
+
s(y),
|
|
55
|
+
s(b).wrapper
|
|
56
|
+
])
|
|
57
|
+
}, {
|
|
58
|
+
default: B(() => [
|
|
59
|
+
r("div", X, [
|
|
60
|
+
a(e.$slots, "default"),
|
|
61
|
+
e.show ? (o(), p("div", {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: i(["absolute rounded-full z-10 bg-[color:var(--x-badge-bg)]", [
|
|
64
|
+
g.value,
|
|
65
|
+
{
|
|
66
|
+
"border-2 border-gray-50 dark:border-gray-900": e.outlined
|
|
67
|
+
}
|
|
68
|
+
]]),
|
|
69
|
+
style: n(c.value)
|
|
70
|
+
}, [
|
|
71
|
+
e.animated ? (o(), p("div", x)) : f("", !0),
|
|
72
|
+
r("div", {
|
|
73
|
+
class: i(["text-xs text-white overflow-hidden", [
|
|
74
|
+
e.$slots.content ? "flex items-center justify-center min-w-[1.25rem] h-5 px-1.5" : {
|
|
75
|
+
"p-1": e.size === "xs",
|
|
76
|
+
"p-[0.312rem]": e.size === "sm",
|
|
77
|
+
"p-1.5": !e.size || !["xs", "sm", "lg", "xl"].includes(e.size),
|
|
78
|
+
"p-2": e.size === "lg",
|
|
79
|
+
"p-2.5": e.size === "xl"
|
|
80
|
+
}
|
|
81
|
+
]])
|
|
82
|
+
}, [
|
|
83
|
+
a(e.$slots, "content")
|
|
84
|
+
], 2)
|
|
85
|
+
], 6)) : f("", !0)
|
|
86
|
+
])
|
|
87
|
+
]),
|
|
88
|
+
_: 3
|
|
89
|
+
}, 8, ["style", "class"]));
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
export {
|
|
93
|
+
R as default
|
|
94
|
+
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { BreadcrumbsProps } from './Breadcrumbs.vue';
|
|
3
|
+
type InternalClasses = 'wrapper' | 'item' | 'lastItem';
|
|
4
|
+
interface InternalTheme extends ThemeComponent<BreadcrumbsProps, InternalClasses> {
|
|
5
|
+
}
|
|
6
|
+
export interface BreadcrumbsTheme extends Omit<InternalTheme, 'classes'> {
|
|
7
|
+
classes?: Partial<ThemeClasses<BreadcrumbsProps, InternalClasses>>;
|
|
8
|
+
}
|
|
9
|
+
declare const theme: InternalTheme;
|
|
10
|
+
export default theme;
|
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
import { type PropType } from 'vue';
|
|
2
|
-
|
|
1
|
+
import { type ExtractPublicPropTypes, type PropType } from 'vue';
|
|
2
|
+
declare const breadcrumbsProps: {
|
|
3
|
+
items: PropType<BreadcrumbsItem[]>;
|
|
4
|
+
icon: {
|
|
5
|
+
type: StringConstructor;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
shadow: BooleanConstructor;
|
|
9
|
+
underline: BooleanConstructor;
|
|
10
|
+
color: {
|
|
11
|
+
readonly type: StringConstructor;
|
|
12
|
+
readonly default: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type BreadcrumbsItem = {
|
|
3
16
|
label: string;
|
|
4
17
|
to?: string | object;
|
|
5
18
|
href?: string;
|
|
@@ -8,8 +21,9 @@ export type BreadcrumbItem = {
|
|
|
8
21
|
shadow?: boolean;
|
|
9
22
|
underline?: boolean;
|
|
10
23
|
};
|
|
24
|
+
export type BreadcrumbsProps = ExtractPublicPropTypes<typeof breadcrumbsProps>;
|
|
11
25
|
declare const _default: import("vue").DefineComponent<{
|
|
12
|
-
items: PropType<
|
|
26
|
+
items: PropType<BreadcrumbsItem[]>;
|
|
13
27
|
icon: {
|
|
14
28
|
type: StringConstructor;
|
|
15
29
|
default: string;
|
|
@@ -21,7 +35,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
21
35
|
readonly default: string | undefined;
|
|
22
36
|
};
|
|
23
37
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
24
|
-
items: PropType<
|
|
38
|
+
items: PropType<BreadcrumbsItem[]>;
|
|
25
39
|
icon: {
|
|
26
40
|
type: StringConstructor;
|
|
27
41
|
default: string;
|
|
@@ -33,9 +47,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
33
47
|
readonly default: string | undefined;
|
|
34
48
|
};
|
|
35
49
|
}>>, {
|
|
36
|
-
icon: string;
|
|
37
50
|
color: string;
|
|
38
51
|
shadow: boolean;
|
|
52
|
+
icon: string;
|
|
39
53
|
underline: boolean;
|
|
40
54
|
}, {}>;
|
|
41
55
|
export default _default;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { defineComponent as w, computed as B, openBlock as r, createElementBlock as n, normalizeClass as a, unref as l, normalizeStyle as v, createElementVNode as C, Fragment as N, renderList as V, createVNode as d, withCtx as _, createBlock as p, createCommentVNode as c, createTextVNode as f, toDisplayString as h } from "vue";
|
|
2
|
+
import { useTheme as z } from "../../composables/theme.js";
|
|
3
|
+
import { arrowRightIcon as I } from "../../common/icons.js";
|
|
4
|
+
import { useColors as S } from "../../composables/colors.js";
|
|
5
|
+
import m from "../icon/Icon.vue.js";
|
|
6
|
+
import E from "../link/Link.vue.js";
|
|
7
|
+
import L from "./Breadcrumbs.theme.js";
|
|
8
|
+
const T = {
|
|
9
|
+
...S.props(),
|
|
10
|
+
items: Array,
|
|
11
|
+
icon: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: I
|
|
14
|
+
},
|
|
15
|
+
shadow: Boolean,
|
|
16
|
+
underline: Boolean
|
|
17
|
+
}, X = { name: "XBreadcrumbs" }, x = /* @__PURE__ */ w({
|
|
18
|
+
...X,
|
|
19
|
+
props: T,
|
|
20
|
+
setup(y) {
|
|
21
|
+
const s = y, t = B(() => s.items && s.items.length > 0 ? s.items[s.items.length - 1] : void 0), { styles: b, classes: i, className: k } = z("breadcrumbs", L, s);
|
|
22
|
+
return (o, A) => {
|
|
23
|
+
var u;
|
|
24
|
+
return o.items && o.items.length > 0 ? (r(), n("nav", {
|
|
25
|
+
key: 0,
|
|
26
|
+
"aria-label": "Breadcrumb",
|
|
27
|
+
class: a(l(k)),
|
|
28
|
+
style: v(l(b))
|
|
29
|
+
}, [
|
|
30
|
+
C("ul", {
|
|
31
|
+
class: a(l(i).wrapper)
|
|
32
|
+
}, [
|
|
33
|
+
(r(!0), n(N, null, V((u = o.items) == null ? void 0 : u.slice(0, -1), (e, g) => (r(), n("li", {
|
|
34
|
+
key: g,
|
|
35
|
+
class: a(l(i).item)
|
|
36
|
+
}, [
|
|
37
|
+
d(E, {
|
|
38
|
+
to: e.to,
|
|
39
|
+
href: e.href,
|
|
40
|
+
color: e.color || o.color,
|
|
41
|
+
shadow: e.shadow || o.shadow,
|
|
42
|
+
underline: e.underline || o.underline,
|
|
43
|
+
class: "flex items-center"
|
|
44
|
+
}, {
|
|
45
|
+
default: _(() => [
|
|
46
|
+
e.icon ? (r(), p(m, {
|
|
47
|
+
key: 0,
|
|
48
|
+
icon: e.icon,
|
|
49
|
+
class: "mr-1.5"
|
|
50
|
+
}, null, 8, ["icon"])) : c("", !0),
|
|
51
|
+
f(" " + h(e.label), 1)
|
|
52
|
+
]),
|
|
53
|
+
_: 2
|
|
54
|
+
}, 1032, ["to", "href", "color", "shadow", "underline"]),
|
|
55
|
+
d(m, {
|
|
56
|
+
icon: o.icon,
|
|
57
|
+
class: "text-gray-400 mx-1.5",
|
|
58
|
+
size: "sm"
|
|
59
|
+
}, null, 8, ["icon"])
|
|
60
|
+
], 2))), 128)),
|
|
61
|
+
t.value ? (r(), n("li", {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: a(l(i).lastItem)
|
|
64
|
+
}, [
|
|
65
|
+
t.value.icon ? (r(), p(m, {
|
|
66
|
+
key: 0,
|
|
67
|
+
icon: t.value.icon,
|
|
68
|
+
class: "mr-1"
|
|
69
|
+
}, null, 8, ["icon"])) : c("", !0),
|
|
70
|
+
f(" " + h(t.value.label), 1)
|
|
71
|
+
], 2)) : c("", !0)
|
|
72
|
+
], 2)
|
|
73
|
+
], 6)) : c("", !0);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
export {
|
|
78
|
+
x as default
|
|
79
|
+
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
iconRight: ({ slots }: ThemeParams) => "m-0.5" | "ml-2";
|
|
7
|
-
};
|
|
8
|
-
styles({ props, colors, css, data }: ThemeParams): (string | object)[];
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { ButtonProps } from './Button.vue';
|
|
3
|
+
type InternalClasses = 'wrapper' | 'iconLeft' | 'iconRight';
|
|
4
|
+
type InternalExtraData = {
|
|
5
|
+
isButtonGroup: boolean;
|
|
9
6
|
};
|
|
10
|
-
|
|
7
|
+
interface InternalTheme extends ThemeComponent<ButtonProps, InternalClasses, InternalExtraData> {
|
|
8
|
+
}
|
|
9
|
+
export interface ButtonTheme extends Omit<InternalTheme, 'classes'> {
|
|
10
|
+
classes?: Partial<ThemeClasses<ButtonProps, InternalClasses, InternalExtraData>>;
|
|
11
|
+
}
|
|
12
|
+
declare const theme: InternalTheme;
|
|
13
|
+
export default theme;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
const g = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper({ props: e, slots: n, data: i }) {
|
|
4
|
+
const d = ["relative transition duration-150 focus:outline-none inline-flex items-center justify-center font-medium whitespace-nowrap overflow-hidden align-middle active:!shadow-none border appearance-none"];
|
|
5
|
+
return i.isButtonGroup || d.push(e.rounded ? "rounded-full" : "rounded-md"), !e.flat && !e.light && !e.ghost && !e.disabled && !e.loading && d.push("shadow-sm"), e.size === "xs" ? d.push(n.default ? `py-1 text-xs ${e.icon ? "px-2" : "px-3"}` : "leading-none p-1") : e.size === "sm" ? d.push(n.default ? `py-2 text-sm ${e.icon ? "px-3" : "px-4"}` : "leading-none p-2") : e.size === "lg" ? d.push(n.default ? `py-3 text-lg ${e.icon ? "px-4" : "px-6"}` : "leading-none p-3") : e.size === "xl" ? d.push(n.default ? `py-4 text-xl ${e.icon, "px-6"}` : "leading-none p-4") : d.push(n.default ? `py-2 ${e.icon ? "px-4" : "px-5"}` : "leading-none p-2"), e.disabled ? d.push("cursor-not-allowed") : e.loading ? d.push("cursor-default") : d.push("cursor-pointer"), d;
|
|
6
|
+
},
|
|
7
|
+
iconLeft: ({ slots: e }) => e.default ? "mr-2" : "m-0.5",
|
|
8
|
+
iconRight: ({ slots: e }) => e.default ? "ml-2" : "m-0.5"
|
|
9
|
+
},
|
|
10
|
+
styles({ props: e, colors: n, css: i, data: d }) {
|
|
11
|
+
const a = n.getPalette("gray"), t = e.color ? n.getPalette(e.color) : a, l = [], r = e.color && e.light, b = !e.color && !e.ghost;
|
|
12
|
+
return e.glow && l.push(i.get("glow", n.getColorOpacity(e.color ? t[500] : a[500], 0.5))), b ? e.disabled ? l.push(i.variables({
|
|
13
|
+
bg: a[50],
|
|
14
|
+
text: a[300],
|
|
15
|
+
border: a[200],
|
|
16
|
+
dark: {
|
|
17
|
+
bg: a[900],
|
|
18
|
+
text: a[600],
|
|
19
|
+
border: a[700]
|
|
20
|
+
}
|
|
21
|
+
})) : l.push(i.variables({
|
|
22
|
+
bg: "white",
|
|
23
|
+
text: a[800],
|
|
24
|
+
border: a[300],
|
|
25
|
+
hover: { bg: e.loading ? "" : a[100] },
|
|
26
|
+
active: { bg: e.loading ? "" : a[200] },
|
|
27
|
+
dark: {
|
|
28
|
+
bg: a[800],
|
|
29
|
+
text: "white",
|
|
30
|
+
border: a[700],
|
|
31
|
+
hover: { bg: e.loading ? "" : a[700], border: a[600] },
|
|
32
|
+
active: { bg: e.loading ? "" : a[600], border: a[500] }
|
|
33
|
+
}
|
|
34
|
+
})) : r ? ((!e.outlined || e.disabled) && l.push(i.get("border", "transparent")), e.disabled ? l.push(i.variables({
|
|
35
|
+
bg: t[50],
|
|
36
|
+
text: t[200],
|
|
37
|
+
border: "transparent",
|
|
38
|
+
dark: {
|
|
39
|
+
bg: a[800],
|
|
40
|
+
text: t[900],
|
|
41
|
+
border: "transparent"
|
|
42
|
+
}
|
|
43
|
+
})) : l.push(i.variables({
|
|
44
|
+
bg: t[50],
|
|
45
|
+
text: t[600],
|
|
46
|
+
border: e.outlined ? t[500] : "transparent",
|
|
47
|
+
hover: { bg: e.loading ? "" : t[100] },
|
|
48
|
+
active: { bg: e.loading ? "" : t[200] },
|
|
49
|
+
dark: {
|
|
50
|
+
bg: t[900],
|
|
51
|
+
text: t[200],
|
|
52
|
+
border: e.outlined ? t[500] : "transparent",
|
|
53
|
+
hover: { bg: e.loading ? "" : t[800] },
|
|
54
|
+
active: { bg: e.loading ? "" : t[700] }
|
|
55
|
+
}
|
|
56
|
+
}))) : e.ghost ? (e.outlined || l.push(i.get("border", "transparent")), e.color ? e.disabled ? l.push(i.variables({
|
|
57
|
+
text: t[200],
|
|
58
|
+
dark: {
|
|
59
|
+
text: t[700]
|
|
60
|
+
}
|
|
61
|
+
})) : (l.push(i.variables({
|
|
62
|
+
text: t[600],
|
|
63
|
+
dark: {
|
|
64
|
+
text: t[500]
|
|
65
|
+
}
|
|
66
|
+
})), e.loading || l.push(i.variables({
|
|
67
|
+
hover: { bg: t[50] },
|
|
68
|
+
active: { bg: t[100] },
|
|
69
|
+
dark: {
|
|
70
|
+
hover: { bg: a[800] },
|
|
71
|
+
active: { bg: a[700] }
|
|
72
|
+
}
|
|
73
|
+
}))) : e.disabled ? l.push(i.variables({
|
|
74
|
+
text: a[200],
|
|
75
|
+
dark: {
|
|
76
|
+
text: a[700]
|
|
77
|
+
}
|
|
78
|
+
})) : (l.push(i.variables({
|
|
79
|
+
text: a[800],
|
|
80
|
+
dark: {
|
|
81
|
+
text: "white"
|
|
82
|
+
}
|
|
83
|
+
})), e.loading || l.push(i.variables({
|
|
84
|
+
hover: { bg: a[100] },
|
|
85
|
+
active: { bg: a[200] },
|
|
86
|
+
dark: {
|
|
87
|
+
hover: { bg: a[800] },
|
|
88
|
+
active: { bg: a[700] }
|
|
89
|
+
}
|
|
90
|
+
})))) : e.outlined ? e.disabled ? l.push(i.variables({
|
|
91
|
+
text: t[200],
|
|
92
|
+
border: t[200],
|
|
93
|
+
dark: {
|
|
94
|
+
text: t[700],
|
|
95
|
+
border: t[700]
|
|
96
|
+
}
|
|
97
|
+
})) : (l.push(i.variables({
|
|
98
|
+
text: t[600],
|
|
99
|
+
border: t[600],
|
|
100
|
+
dark: {
|
|
101
|
+
text: t[500],
|
|
102
|
+
border: t[500]
|
|
103
|
+
}
|
|
104
|
+
})), e.loading || l.push(i.variables({
|
|
105
|
+
hover: { bg: t[100] },
|
|
106
|
+
active: { bg: t[200] },
|
|
107
|
+
dark: {
|
|
108
|
+
hover: { bg: a[800] },
|
|
109
|
+
active: { bg: a[700] }
|
|
110
|
+
}
|
|
111
|
+
}))) : (l.push(i.variables({
|
|
112
|
+
text: "#fff",
|
|
113
|
+
border: d.isButtonGroup ? t[600] : "transparent",
|
|
114
|
+
dark: {
|
|
115
|
+
text: "#fff",
|
|
116
|
+
border: d.isButtonGroup ? t[500] : "transparent"
|
|
117
|
+
}
|
|
118
|
+
})), e.disabled ? l.push(i.variables({
|
|
119
|
+
bg: t[100],
|
|
120
|
+
dark: {
|
|
121
|
+
text: t[700],
|
|
122
|
+
bg: t[900]
|
|
123
|
+
}
|
|
124
|
+
})) : l.push(i.variables({
|
|
125
|
+
bg: t[500],
|
|
126
|
+
hover: { bg: e.loading ? "" : t[600] },
|
|
127
|
+
active: { bg: e.loading ? "" : t[800] },
|
|
128
|
+
dark: {
|
|
129
|
+
bg: t[600],
|
|
130
|
+
hover: { bg: e.loading ? "" : t[700] },
|
|
131
|
+
active: { bg: e.loading ? "" : t[800] }
|
|
132
|
+
}
|
|
133
|
+
}))), l;
|
|
134
|
+
}
|
|
135
|
+
}, u = g;
|
|
136
|
+
export {
|
|
137
|
+
u as default
|
|
138
|
+
};
|
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
import { type ExtractPublicPropTypes } from 'vue';
|
|
2
|
+
declare const buttonProps: {
|
|
3
|
+
tag: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
type: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
icon: StringConstructor;
|
|
12
|
+
iconLeft: StringConstructor;
|
|
13
|
+
iconRight: StringConstructor;
|
|
14
|
+
to: StringConstructor;
|
|
15
|
+
outlined: BooleanConstructor;
|
|
16
|
+
rounded: BooleanConstructor;
|
|
17
|
+
glow: BooleanConstructor;
|
|
18
|
+
ghost: BooleanConstructor;
|
|
19
|
+
light: BooleanConstructor;
|
|
20
|
+
block: BooleanConstructor;
|
|
21
|
+
flat: BooleanConstructor;
|
|
22
|
+
disabled: BooleanConstructor;
|
|
23
|
+
loading: BooleanConstructor;
|
|
24
|
+
color: {
|
|
25
|
+
readonly type: StringConstructor;
|
|
26
|
+
readonly default: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
size: {
|
|
29
|
+
readonly type: import("vue").PropType<import("../../composables/common").Size>;
|
|
30
|
+
readonly default: "md";
|
|
31
|
+
readonly validator: (value: string) => boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export type ButtonProps = ExtractPublicPropTypes<typeof buttonProps>;
|
|
1
35
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
2
36
|
tag: {
|
|
3
37
|
type: StringConstructor;
|
|
@@ -64,19 +98,19 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
64
98
|
readonly validator: (value: string) => boolean;
|
|
65
99
|
};
|
|
66
100
|
}>>, {
|
|
101
|
+
disabled: boolean;
|
|
67
102
|
flat: boolean;
|
|
68
|
-
size: import("../../composables/common").Size;
|
|
69
103
|
type: string;
|
|
70
104
|
color: string;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
105
|
+
size: import("../../composables/common").Size;
|
|
106
|
+
block: boolean;
|
|
107
|
+
ghost: boolean;
|
|
74
108
|
tag: string;
|
|
109
|
+
outlined: boolean;
|
|
75
110
|
rounded: boolean;
|
|
76
|
-
|
|
77
|
-
block: boolean;
|
|
78
|
-
disabled: boolean;
|
|
111
|
+
light: boolean;
|
|
79
112
|
loading: boolean;
|
|
113
|
+
glow: boolean;
|
|
80
114
|
}, {}>, {
|
|
81
115
|
default?(_: {}): any;
|
|
82
116
|
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import o from "./Button.vue2.js";
|
|
2
|
+
import s from "./Button.vue3.js";
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const c = {
|
|
5
|
+
$style: s
|
|
6
|
+
}, f = /* @__PURE__ */ t(o, [["__cssModules", c], ["__scopeId", "data-v-c70999f2"]]);
|
|
7
|
+
export {
|
|
8
|
+
f as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { defineComponent as j, ref as D, inject as I, computed as l, useAttrs as T, unref as t, openBlock as r, createBlock as a, resolveDynamicComponent as V, normalizeClass as u, normalizeStyle as A, withCtx as E, createCommentVNode as d, createElementVNode as F, renderSlot as K } from "vue";
|
|
2
|
+
import { useTheme as O } from "../../composables/theme.js";
|
|
3
|
+
import { useColors as X } from "../../composables/colors.js";
|
|
4
|
+
import { useCommon as f } from "../../composables/common.js";
|
|
5
|
+
import { useInteractive as b } from "../../composables/interactive.js";
|
|
6
|
+
import { injectButtonGroupKey as q } from "../../composables/keys.js";
|
|
7
|
+
import H from "../spinner/Spinner.vue.js";
|
|
8
|
+
import m from "../icon/Icon.vue.js";
|
|
9
|
+
import J from "./Button.theme.js";
|
|
10
|
+
const M = {
|
|
11
|
+
...f.props(),
|
|
12
|
+
...X.props(),
|
|
13
|
+
...b.props(),
|
|
14
|
+
tag: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: "button"
|
|
17
|
+
},
|
|
18
|
+
type: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "button"
|
|
21
|
+
},
|
|
22
|
+
icon: String,
|
|
23
|
+
iconLeft: String,
|
|
24
|
+
iconRight: String,
|
|
25
|
+
to: String,
|
|
26
|
+
outlined: Boolean,
|
|
27
|
+
rounded: Boolean,
|
|
28
|
+
glow: Boolean,
|
|
29
|
+
ghost: Boolean,
|
|
30
|
+
light: Boolean,
|
|
31
|
+
block: Boolean,
|
|
32
|
+
flat: Boolean
|
|
33
|
+
}, Q = {
|
|
34
|
+
name: "XButton",
|
|
35
|
+
validators: {
|
|
36
|
+
...f.validators()
|
|
37
|
+
}
|
|
38
|
+
}, so = /* @__PURE__ */ j({
|
|
39
|
+
...Q,
|
|
40
|
+
props: M,
|
|
41
|
+
setup(h, { expose: y }) {
|
|
42
|
+
const e = h, g = D(null), s = I(q, {
|
|
43
|
+
isButtonGroup: !1,
|
|
44
|
+
groupProps: {}
|
|
45
|
+
}), { isButtonGroup: v } = s, n = l(() => s.groupProps.size || e.size), B = l(() => s.groupProps.flat || e.flat), z = l(() => e.color || s.groupProps.color), k = l(() => e.ghost || s.groupProps.ghost), P = l(() => e.light || s.groupProps.light), S = l(() => e.outlined || s.groupProps.outlined), i = l(() => e.disabled || s.groupProps.disabled), p = l(() => e.icon || e.iconLeft), w = T(), C = l(() => w.href ? "a" : e.to ? "router-link" : e.tag), R = l(() => ({
|
|
46
|
+
size: t(n),
|
|
47
|
+
flat: t(B),
|
|
48
|
+
color: t(z),
|
|
49
|
+
ghost: t(k),
|
|
50
|
+
light: t(P),
|
|
51
|
+
outlined: t(S),
|
|
52
|
+
disabled: t(i),
|
|
53
|
+
loading: e.loading,
|
|
54
|
+
block: e.block,
|
|
55
|
+
glow: e.glow,
|
|
56
|
+
iconLeft: t(p),
|
|
57
|
+
iconRight: e.iconRight,
|
|
58
|
+
rounded: e.rounded
|
|
59
|
+
})), { className: L, classes: c, styles: G } = O("button", J, R, {
|
|
60
|
+
isButtonGroup: v
|
|
61
|
+
}), { focus: $, blur: N } = b(g);
|
|
62
|
+
return y({ focus: $, blur: N }), (o, U) => (r(), a(V(C.value), {
|
|
63
|
+
ref_key: "elRef",
|
|
64
|
+
ref: g,
|
|
65
|
+
to: o.to,
|
|
66
|
+
class: u([
|
|
67
|
+
t(L),
|
|
68
|
+
o.$style.button,
|
|
69
|
+
o.glow && !i.value && !o.loading ? o.$style["button--glow"] : "",
|
|
70
|
+
t(c).wrapper,
|
|
71
|
+
{ "w-full": o.block }
|
|
72
|
+
]),
|
|
73
|
+
style: A(t(G)),
|
|
74
|
+
"aria-busy": o.loading ? "true" : null,
|
|
75
|
+
"aria-disabled": o.tag !== "button" && i.value ? "true" : null,
|
|
76
|
+
disabled: i.value || o.loading,
|
|
77
|
+
type: o.tag === "button" ? o.type : null
|
|
78
|
+
}, {
|
|
79
|
+
default: E(() => [
|
|
80
|
+
o.loading ? (r(), a(H, {
|
|
81
|
+
key: 0,
|
|
82
|
+
size: n.value,
|
|
83
|
+
class: "absolute"
|
|
84
|
+
}, null, 8, ["size"])) : d("", !0),
|
|
85
|
+
p.value ? (r(), a(m, {
|
|
86
|
+
key: 1,
|
|
87
|
+
size: n.value,
|
|
88
|
+
icon: p.value,
|
|
89
|
+
class: u([
|
|
90
|
+
t(c).iconLeft,
|
|
91
|
+
{ invisible: o.loading }
|
|
92
|
+
])
|
|
93
|
+
}, null, 8, ["size", "icon", "class"])) : d("", !0),
|
|
94
|
+
F("span", {
|
|
95
|
+
class: u({ invisible: o.loading })
|
|
96
|
+
}, [
|
|
97
|
+
K(o.$slots, "default", {}, void 0, !0)
|
|
98
|
+
], 2),
|
|
99
|
+
o.iconRight ? (r(), a(m, {
|
|
100
|
+
key: 2,
|
|
101
|
+
size: n.value,
|
|
102
|
+
icon: o.iconRight,
|
|
103
|
+
class: u([
|
|
104
|
+
t(c).iconRight,
|
|
105
|
+
{ invisible: o.loading }
|
|
106
|
+
])
|
|
107
|
+
}, null, 8, ["size", "icon", "class"])) : d("", !0)
|
|
108
|
+
]),
|
|
109
|
+
_: 3
|
|
110
|
+
}, 8, ["to", "class", "style", "aria-busy", "aria-disabled", "disabled", "type"]));
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
export {
|
|
114
|
+
so as default
|
|
115
|
+
};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { ThemeClasses, ThemeComponent } from '../../composables/theme';
|
|
2
|
+
import type { ButtonGroupProps } from './ButtonGroup.vue';
|
|
3
|
+
type InternalClasses = 'wrapper';
|
|
4
|
+
type InternalExtraData = {
|
|
5
|
+
isButtonGroupGroup: boolean;
|
|
5
6
|
};
|
|
6
|
-
|
|
7
|
+
interface InternalTheme extends ThemeComponent<ButtonGroupProps, InternalClasses, InternalExtraData> {
|
|
8
|
+
}
|
|
9
|
+
export interface ButtonGroupTheme extends Omit<InternalTheme, 'classes'> {
|
|
10
|
+
classes?: Partial<ThemeClasses<ButtonGroupProps, InternalClasses, InternalExtraData>>;
|
|
11
|
+
}
|
|
12
|
+
declare const theme: InternalTheme;
|
|
13
|
+
export default theme;
|