@indielayer/ui 1.3.0 → 1.4.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 +4 -4
- package/docs/App.vue +25 -0
- package/docs/assets/css/hljs.css +302 -0
- package/docs/assets/css/tailwind.css +46 -0
- package/docs/assets/images/error.svg +1 -0
- package/docs/assets/images/logo.png +0 -0
- package/docs/assets/images/logo_mini.svg +10 -0
- package/docs/assets/images/logo_white.png +0 -0
- package/docs/assets/images/logo_word.svg +12 -0
- package/docs/assets/images/logo_word_dark.svg +12 -0
- package/docs/assets/images/photo1.jpeg +0 -0
- package/docs/assets/images/photo2.jpeg +0 -0
- package/docs/components/Cookies.vue +42 -0
- package/docs/components/common/CodePreview.vue +80 -0
- package/docs/components/common/CodeSnippet.vue +49 -0
- package/docs/components/common/CopyButton.vue +50 -0
- package/docs/components/common/DocumentPage.vue +289 -0
- package/docs/components/common/Indielayer-theme.json +702 -0
- package/docs/components/common/MultiSnippet.vue +26 -0
- package/docs/components/menu/DocsMenu.vue +143 -0
- package/docs/components/toolbar/PreToolbar.vue +18 -0
- package/docs/components/toolbar/Toolbar.vue +63 -0
- package/docs/components/toolbar/ToolbarColorToggle.vue +49 -0
- package/docs/icons.ts +61 -0
- package/docs/layouts/default.vue +29 -0
- package/docs/layouts/simple.vue +3 -0
- package/docs/main.ts +33 -0
- package/docs/pages/colors.vue +125 -0
- package/docs/pages/component/accordion/index.vue +29 -0
- package/docs/pages/component/accordion/usage.vue +30 -0
- package/docs/pages/component/alert/index.vue +29 -0
- package/docs/pages/component/alert/usage.vue +18 -0
- package/docs/pages/component/avatar/index.vue +43 -0
- package/docs/pages/component/avatar/size.vue +9 -0
- package/docs/pages/component/avatar/usage.vue +9 -0
- package/docs/pages/component/avatar/variants.vue +8 -0
- package/docs/pages/component/badge/index.vue +29 -0
- package/docs/pages/component/badge/usage.vue +50 -0
- package/docs/pages/component/breadcrumbs/index.vue +29 -0
- package/docs/pages/component/breadcrumbs/usage.vue +19 -0
- package/docs/pages/component/button/button-group.vue +18 -0
- package/docs/pages/component/button/icons.vue +9 -0
- package/docs/pages/component/button/index.vue +64 -0
- package/docs/pages/component/button/size.vue +9 -0
- package/docs/pages/component/button/states.vue +6 -0
- package/docs/pages/component/button/usage.vue +12 -0
- package/docs/pages/component/button/variants.vue +7 -0
- package/docs/pages/component/card/index.vue +29 -0
- package/docs/pages/component/card/usage.vue +6 -0
- package/docs/pages/component/carousel/index.vue +29 -0
- package/docs/pages/component/carousel/usage.vue +10 -0
- package/docs/pages/component/checkbox/index.vue +50 -0
- package/docs/pages/component/checkbox/size.vue +9 -0
- package/docs/pages/component/checkbox/states.vue +9 -0
- package/docs/pages/component/checkbox/usage.vue +15 -0
- package/docs/pages/component/checkbox/variants.vue +8 -0
- package/docs/pages/component/container/index.vue +29 -0
- package/docs/pages/component/container/usage.vue +3 -0
- package/docs/pages/component/divider/index.vue +43 -0
- package/docs/pages/component/divider/label.vue +12 -0
- package/docs/pages/component/divider/usage.vue +7 -0
- package/docs/pages/component/divider/vertical.vue +7 -0
- package/docs/pages/component/drawer/index.vue +29 -0
- package/docs/pages/component/drawer/usage.vue +56 -0
- package/docs/pages/component/form/index.vue +29 -0
- package/docs/pages/component/form/usage.vue +96 -0
- package/docs/pages/component/formGroup/index.vue +29 -0
- package/docs/pages/component/formGroup/usage.vue +46 -0
- package/docs/pages/component/icon/index.vue +36 -0
- package/docs/pages/component/icon/usage.vue +6 -0
- package/docs/pages/component/icon/variants.vue +14 -0
- package/docs/pages/component/image/index.vue +29 -0
- package/docs/pages/component/image/usage.vue +8 -0
- package/docs/pages/component/input/index.vue +50 -0
- package/docs/pages/component/input/size.vue +13 -0
- package/docs/pages/component/input/states.vue +12 -0
- package/docs/pages/component/input/usage.vue +15 -0
- package/docs/pages/component/input/variants.vue +18 -0
- package/docs/pages/component/link/index.vue +29 -0
- package/docs/pages/component/link/usage.vue +12 -0
- package/docs/pages/component/loader/index.vue +29 -0
- package/docs/pages/component/loader/usage.vue +7 -0
- package/docs/pages/component/menu/index.vue +29 -0
- package/docs/pages/component/menu/usage.vue +69 -0
- package/docs/pages/component/modal/composed.vue +70 -0
- package/docs/pages/component/modal/index.vue +36 -0
- package/docs/pages/component/modal/usage.vue +61 -0
- package/docs/pages/component/notifications/index.vue +29 -0
- package/docs/pages/component/notifications/usage.vue +56 -0
- package/docs/pages/component/pagination/index.vue +29 -0
- package/docs/pages/component/pagination/usage.vue +17 -0
- package/docs/pages/component/popover/index.vue +29 -0
- package/docs/pages/component/popover/usage.vue +21 -0
- package/docs/pages/component/progress/index.vue +36 -0
- package/docs/pages/component/progress/usage.vue +7 -0
- package/docs/pages/component/progress/variants.vue +18 -0
- package/docs/pages/component/radio/index.vue +50 -0
- package/docs/pages/component/radio/size.vue +15 -0
- package/docs/pages/component/radio/states.vue +13 -0
- package/docs/pages/component/radio/usage.vue +14 -0
- package/docs/pages/component/radio/variants.vue +39 -0
- package/docs/pages/component/scroll/horizontal.vue +14 -0
- package/docs/pages/component/scroll/index.vue +36 -0
- package/docs/pages/component/scroll/usage.vue +5 -0
- package/docs/pages/component/select/index.vue +43 -0
- package/docs/pages/component/select/states.vue +22 -0
- package/docs/pages/component/select/usage.vue +45 -0
- package/docs/pages/component/select/variants.vue +23 -0
- package/docs/pages/component/skeleton/index.vue +29 -0
- package/docs/pages/component/skeleton/usage.vue +10 -0
- package/docs/pages/component/slider/index.vue +29 -0
- package/docs/pages/component/slider/usage.vue +15 -0
- package/docs/pages/component/spacer/index.vue +29 -0
- package/docs/pages/component/spacer/usage.vue +8 -0
- package/docs/pages/component/spinner/index.vue +36 -0
- package/docs/pages/component/spinner/usage.vue +3 -0
- package/docs/pages/component/spinner/variants.vue +9 -0
- package/docs/pages/component/stepper/index.vue +29 -0
- package/docs/pages/component/stepper/usage.vue +21 -0
- package/docs/pages/component/table/index.vue +36 -0
- package/docs/pages/component/table/states.vue +28 -0
- package/docs/pages/component/table/usage.vue +107 -0
- package/docs/pages/component/tabs/index.vue +29 -0
- package/docs/pages/component/tabs/usage.vue +137 -0
- package/docs/pages/component/tag/index.vue +29 -0
- package/docs/pages/component/tag/usage.vue +27 -0
- package/docs/pages/component/textarea/index.vue +43 -0
- package/docs/pages/component/textarea/states.vue +13 -0
- package/docs/pages/component/textarea/usage.vue +22 -0
- package/docs/pages/component/textarea/variants.vue +15 -0
- package/docs/pages/component/toggle/index.vue +43 -0
- package/docs/pages/component/toggle/states.vue +13 -0
- package/docs/pages/component/toggle/usage.vue +14 -0
- package/docs/pages/component/toggle/variants.vue +15 -0
- package/docs/pages/component/tooltip/index.vue +29 -0
- package/docs/pages/component/tooltip/usage.vue +16 -0
- package/docs/pages/error.vue +6 -0
- package/docs/pages/icons.vue +105 -0
- package/docs/pages/index.vue +157 -0
- package/docs/pages/play.vue +19 -0
- package/docs/pages/typography.vue +95 -0
- package/docs/router/index.ts +75 -0
- package/exports/tailwind.preset.js +1 -0
- package/lib/common/icons.d.ts +4 -1
- package/lib/common/icons.js +14 -11
- package/lib/components/accordion/Accordion.vue.d.ts +63 -0
- package/lib/components/accordion/Accordion.vue.js +40 -0
- package/lib/components/accordion/Accordion.vue2.js +4 -0
- package/lib/components/{collapse/Collapse.vue.d.ts → accordion/AccordionItem.vue.d.ts} +33 -18
- package/lib/components/accordion/AccordionItem.vue.js +140 -0
- package/lib/components/accordion/AccordionItem.vue2.js +4 -0
- package/lib/components/accordion/index.d.ts +4 -0
- package/lib/components/accordion/theme/Accordion.base.theme.d.ts +3 -0
- package/lib/components/accordion/theme/Accordion.base.theme.js +8 -0
- package/lib/components/accordion/theme/Accordion.carbon.theme.d.ts +3 -0
- package/lib/components/accordion/theme/Accordion.carbon.theme.js +5 -0
- package/lib/components/accordion/theme/AccordionItem.base.theme.d.ts +3 -0
- package/lib/components/accordion/theme/AccordionItem.base.theme.js +16 -0
- package/lib/components/accordion/theme/AccordionItem.carbon.theme.d.ts +3 -0
- package/lib/components/accordion/theme/AccordionItem.carbon.theme.js +5 -0
- package/lib/components/alert/theme/Alert.carbon.theme.js +39 -3
- package/lib/components/avatar/Avatar.vue.d.ts +2 -2
- package/lib/components/badge/Badge.vue.d.ts +2 -2
- package/lib/components/button/Button.vue.d.ts +3 -3
- package/lib/components/button/ButtonGroup.vue.d.ts +3 -3
- package/lib/components/button/theme/Button.carbon.theme.js +1 -1
- package/lib/components/carousel/CarouselSlide.vue.d.ts +19 -8
- package/lib/components/carousel/CarouselSlide.vue.js +2 -2
- package/lib/components/carousel/CarouselSlide.vue2.js +25 -18
- package/lib/components/checkbox/Checkbox.vue.d.ts +22 -10
- package/lib/components/checkbox/Checkbox.vue2.js +106 -72
- package/lib/components/checkbox/theme/Checkbox.base.theme.js +38 -31
- package/lib/components/checkbox/theme/Checkbox.carbon.theme.js +38 -31
- package/lib/components/container/Container.vue.d.ts +13 -0
- package/lib/components/container/Container.vue.js +15 -11
- package/lib/components/container/theme/Container.base.theme.js +7 -4
- package/lib/components/drawer/Drawer.vue.d.ts +4 -4
- package/lib/components/form/Form.vue.d.ts +25 -2
- package/lib/components/form/Form.vue.js +67 -36
- package/lib/components/form/theme/Form.base.theme.js +8 -4
- package/lib/components/form/theme/Form.carbon.theme.js +10 -3
- package/lib/components/formGroup/FormGroup.vue.d.ts +132 -0
- package/lib/components/formGroup/FormGroup.vue.js +82 -0
- package/lib/components/formGroup/FormGroup.vue2.js +4 -0
- package/lib/components/formGroup/__tests__/FormGroup.spec.d.ts +1 -0
- package/lib/components/formGroup/index.d.ts +2 -0
- package/lib/components/formGroup/theme/FormGroup.base.theme.d.ts +3 -0
- package/lib/components/formGroup/theme/FormGroup.base.theme.js +11 -0
- package/lib/components/formGroup/theme/FormGroup.carbon.theme.d.ts +3 -0
- package/lib/components/formGroup/theme/FormGroup.carbon.theme.js +11 -0
- package/lib/components/icon/theme/Icon.base.theme.js +1 -1
- package/lib/components/icon/theme/Icon.carbon.theme.js +4 -4
- package/lib/components/index.d.ts +3 -1
- package/lib/components/index.js +106 -100
- package/lib/components/input/Input.vue.d.ts +12 -9
- package/lib/components/input/Input.vue.js +39 -39
- package/lib/components/input/theme/Input.carbon.theme.js +1 -1
- package/lib/components/inputFooter/theme/InputFooter.base.theme.js +1 -1
- package/lib/components/inputFooter/theme/InputFooter.carbon.theme.js +1 -1
- package/lib/components/label/Label.vue.d.ts +3 -3
- package/lib/components/label/theme/Label.carbon.theme.js +7 -6
- package/lib/components/link/Link.vue.d.ts +1 -1
- package/lib/components/link/Link.vue.js +2 -2
- package/lib/components/link/Link.vue2.js +1 -1
- package/lib/components/link/theme/Link.base.theme.js +4 -4
- package/lib/components/link/theme/Link.carbon.theme.js +23 -3
- package/lib/components/loader/theme/Loader.carbon.theme.js +1 -1
- package/lib/components/menu/Menu.vue.d.ts +6 -5
- package/lib/components/menu/Menu.vue.js +43 -40
- package/lib/components/menu/MenuItem.vue.d.ts +4 -4
- package/lib/components/menu/MenuItem.vue.js +2 -2
- package/lib/components/menu/MenuItem.vue2.js +1 -1
- package/lib/components/menu/theme/MenuItem.base.theme.js +3 -3
- package/lib/components/modal/Modal.vue.d.ts +98 -3
- package/lib/components/modal/Modal.vue.js +153 -100
- package/lib/components/modal/theme/Modal.base.theme.js +15 -9
- package/lib/components/modal/theme/Modal.carbon.theme.js +27 -3
- package/lib/components/notifications/Notifications.vue.js +56 -53
- package/lib/components/notifications/theme/Notifications.base.theme.js +1 -1
- package/lib/components/notifications/theme/Notifications.carbon.theme.js +8 -3
- package/lib/components/popover/Popover.vue.d.ts +3 -3
- package/lib/components/radio/Radio.vue.d.ts +17 -12
- package/lib/components/radio/Radio.vue2.js +81 -66
- package/lib/components/radio/theme/Radio.base.theme.js +19 -16
- package/lib/components/radio/theme/Radio.carbon.theme.js +32 -29
- package/lib/components/select/Select.vue.d.ts +13 -10
- package/lib/components/select/Select.vue.js +115 -116
- package/lib/components/select/theme/Select.base.theme.js +10 -10
- package/lib/components/select/theme/Select.carbon.theme.js +5 -5
- package/lib/components/skeleton/Skeleton.vue.d.ts +19 -1
- package/lib/components/skeleton/Skeleton.vue.js +25 -15
- package/lib/components/skeleton/theme/Skeleton.base.theme.js +7 -4
- package/lib/components/slider/Slider.vue.d.ts +12 -6
- package/lib/components/slider/Slider.vue.js +3 -4
- package/lib/components/slider/theme/Slider.carbon.theme.js +4 -4
- package/lib/components/spinner/Spinner.vue.d.ts +1 -1
- package/lib/components/spinner/Spinner.vue.js +16 -17
- package/lib/components/stepper/Stepper.vue.d.ts +137 -0
- package/lib/components/stepper/Stepper.vue.js +128 -0
- package/lib/components/stepper/Stepper.vue2.js +4 -0
- package/lib/components/stepper/__tests__/Stepper.spec.d.ts +1 -0
- package/lib/components/stepper/index.d.ts +2 -0
- package/lib/components/stepper/theme/Stepper.base.theme.d.ts +3 -0
- package/lib/components/stepper/theme/Stepper.base.theme.js +20 -0
- package/lib/components/stepper/theme/Stepper.carbon.theme.d.ts +3 -0
- package/lib/components/{collapse/theme/Collapse.carbon.theme.js → stepper/theme/Stepper.carbon.theme.js} +1 -1
- package/lib/components/tab/Tab.vue.d.ts +11 -5
- package/lib/components/tab/Tab.vue.js +65 -50
- package/lib/components/tab/TabGroup.vue.d.ts +1 -1
- package/lib/components/tab/TabGroup.vue.js +5 -5
- package/lib/components/tab/theme/Tab.base.theme.js +2 -1
- package/lib/components/tab/theme/Tab.carbon.theme.js +6 -5
- package/lib/components/tab/theme/TabGroup.carbon.theme.js +28 -2
- package/lib/components/table/Table.vue.d.ts +115 -9
- package/lib/components/table/Table.vue.js +209 -98
- package/lib/components/table/TableCell.vue.d.ts +4 -5
- package/lib/components/table/TableCell.vue.js +21 -22
- package/lib/components/table/TableHead.vue.d.ts +16 -0
- package/lib/components/table/TableHead.vue.js +21 -0
- package/lib/components/table/TableHead.vue2.js +4 -0
- package/lib/components/table/TableHeader.vue.d.ts +4 -0
- package/lib/components/table/TableHeader.vue.js +45 -54
- package/lib/components/table/TableRow.vue.d.ts +15 -1
- package/lib/components/table/TableRow.vue.js +21 -25
- package/lib/components/table/index.d.ts +4 -2
- package/lib/components/table/theme/Table.base.theme.js +7 -6
- package/lib/components/table/theme/Table.carbon.theme.js +11 -3
- package/lib/components/table/theme/TableCell.base.theme.js +3 -3
- package/lib/components/table/theme/TableCell.carbon.theme.js +9 -3
- package/lib/components/table/theme/TableHead.base.theme.d.ts +3 -0
- package/lib/components/table/theme/TableHead.base.theme.js +9 -0
- package/lib/components/table/theme/TableHead.carbon.theme.d.ts +3 -0
- package/lib/components/table/theme/TableHead.carbon.theme.js +9 -0
- package/lib/components/table/theme/TableHeader.base.theme.d.ts +3 -0
- package/lib/components/table/theme/TableHeader.base.theme.js +12 -0
- package/lib/components/table/theme/TableHeader.carbon.theme.d.ts +3 -0
- package/lib/components/table/theme/TableHeader.carbon.theme.js +12 -0
- package/lib/components/table/theme/TableRow.base.theme.d.ts +3 -0
- package/lib/components/table/theme/TableRow.base.theme.js +11 -0
- package/lib/components/table/theme/TableRow.carbon.theme.d.ts +3 -0
- package/lib/components/table/theme/TableRow.carbon.theme.js +11 -0
- package/lib/components/tag/Tag.vue.d.ts +3 -3
- package/lib/components/tag/Tag.vue.js +17 -17
- package/lib/components/tag/theme/Tag.base.theme.js +14 -13
- package/lib/components/tag/theme/Tag.carbon.theme.js +14 -14
- package/lib/components/textarea/Textarea.vue.d.ts +11 -8
- package/lib/components/textarea/Textarea.vue.js +34 -34
- package/lib/components/textarea/theme/Textarea.carbon.theme.js +1 -1
- package/lib/components/toggle/Toggle.vue.d.ts +12 -12
- package/lib/components/toggle/Toggle.vue.js +37 -39
- package/lib/composables/keys.d.ts +5 -1
- package/lib/composables/keys.js +8 -6
- package/lib/composables/useFocusTrap.d.ts +6 -0
- package/lib/composables/useFocusTrap.js +45 -0
- package/lib/composables/useInputtable.d.ts +6 -0
- package/lib/composables/useInputtable.js +59 -42
- package/lib/index.js +137 -129
- package/lib/index.umd.js +3 -3
- package/lib/nuxt.mjs +33 -0
- package/lib/nuxt.plugin.js +8 -0
- package/lib/tailwind.preset.js +41 -0
- package/lib/theme.d.ts +8 -2
- package/lib/themes/base/components.d.ts +7 -1
- package/lib/themes/base/components.js +98 -86
- package/lib/themes/carbon/components.d.ts +7 -1
- package/lib/themes/carbon/components.js +98 -86
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +7 -2
- package/src/common/icons.ts +4 -1
- package/src/components/accordion/Accordion.vue +55 -0
- package/src/components/{collapse/Collapse.vue → accordion/AccordionItem.vue} +51 -32
- package/src/components/accordion/__tests__/Accordion.spec.ts +11 -0
- package/src/components/accordion/index.ts +4 -0
- package/src/components/accordion/theme/Accordion.base.theme.ts +9 -0
- package/src/components/accordion/theme/Accordion.carbon.theme.ts +7 -0
- package/src/components/accordion/theme/AccordionItem.base.theme.ts +38 -0
- package/src/components/accordion/theme/AccordionItem.carbon.theme.ts +7 -0
- package/src/components/alert/theme/Alert.carbon.theme.ts +54 -2
- package/src/components/button/theme/Button.carbon.theme.ts +1 -1
- package/src/components/carousel/CarouselSlide.vue +9 -4
- package/src/components/checkbox/Checkbox.vue +69 -20
- package/src/components/checkbox/theme/Checkbox.base.theme.ts +15 -1
- package/src/components/checkbox/theme/Checkbox.carbon.theme.ts +17 -3
- package/src/components/container/Container.vue +4 -0
- package/src/components/container/theme/Container.base.theme.ts +7 -1
- package/src/components/form/Form.vue +26 -5
- package/src/components/form/theme/Form.base.theme.ts +9 -1
- package/src/components/form/theme/Form.carbon.theme.ts +12 -2
- package/src/components/formGroup/FormGroup.vue +116 -0
- package/src/components/formGroup/__tests__/FormGroup.spec.ts +11 -0
- package/src/components/formGroup/index.ts +2 -0
- package/src/components/formGroup/theme/FormGroup.base.theme.ts +16 -0
- package/src/components/formGroup/theme/FormGroup.carbon.theme.ts +16 -0
- package/src/components/icon/theme/Icon.base.theme.ts +1 -1
- package/src/components/icon/theme/Icon.carbon.theme.ts +3 -4
- package/src/components/index.ts +3 -1
- package/src/components/input/Input.vue +3 -3
- package/src/components/input/theme/Input.carbon.theme.ts +1 -1
- package/src/components/inputFooter/theme/InputFooter.base.theme.ts +1 -1
- package/src/components/inputFooter/theme/InputFooter.carbon.theme.ts +1 -1
- package/src/components/label/theme/Label.carbon.theme.ts +8 -3
- package/src/components/link/Link.vue +1 -1
- package/src/components/link/theme/Link.carbon.theme.ts +23 -2
- package/src/components/loader/theme/Loader.carbon.theme.ts +1 -1
- package/src/components/menu/Menu.vue +8 -5
- package/src/components/menu/MenuItem.vue +1 -1
- package/src/components/menu/theme/MenuItem.base.theme.ts +3 -3
- package/src/components/modal/Modal.vue +110 -50
- package/src/components/modal/theme/Modal.base.theme.ts +28 -12
- package/src/components/modal/theme/Modal.carbon.theme.ts +55 -2
- package/src/components/notifications/Notifications.vue +5 -5
- package/src/components/notifications/theme/Notifications.base.theme.ts +1 -1
- package/src/components/notifications/theme/Notifications.carbon.theme.ts +12 -2
- package/src/components/radio/Radio.vue +39 -15
- package/src/components/radio/theme/Radio.base.theme.ts +7 -1
- package/src/components/radio/theme/Radio.carbon.theme.ts +13 -7
- package/src/components/select/Select.vue +10 -11
- package/src/components/select/theme/Select.base.theme.ts +1 -1
- package/src/components/select/theme/Select.carbon.theme.ts +2 -2
- package/src/components/skeleton/Skeleton.vue +18 -2
- package/src/components/skeleton/theme/Skeleton.base.theme.ts +8 -1
- package/src/components/slider/Slider.vue +1 -2
- package/src/components/slider/theme/Slider.carbon.theme.ts +1 -1
- package/src/components/spinner/Spinner.vue +2 -2
- package/src/components/stepper/Stepper.vue +153 -0
- package/src/components/{collapse/__tests__/Collapse.spec.ts → stepper/__tests__/Stepper.spec.ts} +3 -3
- package/src/components/stepper/index.ts +6 -0
- package/src/components/stepper/theme/Stepper.base.theme.ts +45 -0
- package/src/components/stepper/theme/Stepper.carbon.theme.ts +7 -0
- package/src/components/tab/Tab.vue +20 -6
- package/src/components/tab/TabGroup.vue +2 -2
- package/src/components/tab/theme/Tab.base.theme.ts +2 -0
- package/src/components/tab/theme/Tab.carbon.theme.ts +4 -2
- package/src/components/tab/theme/TabGroup.carbon.theme.ts +50 -2
- package/src/components/table/Table.vue +123 -27
- package/src/components/table/TableCell.vue +5 -6
- package/src/components/table/TableHead.vue +25 -0
- package/src/components/table/TableHeader.vue +35 -56
- package/src/components/table/TableRow.vue +19 -17
- package/src/components/table/index.ts +4 -2
- package/src/components/table/theme/Table.base.theme.ts +9 -7
- package/src/components/table/theme/Table.carbon.theme.ts +18 -2
- package/src/components/table/theme/TableCell.base.theme.ts +1 -1
- package/src/components/table/theme/TableCell.carbon.theme.ts +24 -2
- package/src/components/table/theme/TableHead.base.theme.ts +10 -0
- package/src/components/table/theme/TableHead.carbon.theme.ts +10 -0
- package/src/components/table/theme/TableHeader.base.theme.ts +28 -0
- package/src/components/table/theme/TableHeader.carbon.theme.ts +28 -0
- package/src/components/table/theme/TableRow.base.theme.ts +21 -0
- package/src/components/table/theme/TableRow.carbon.theme.ts +21 -0
- package/src/components/tag/Tag.vue +4 -4
- package/src/components/tag/theme/Tag.base.theme.ts +4 -4
- package/src/components/tag/theme/Tag.carbon.theme.ts +5 -6
- package/src/components/textarea/Textarea.vue +3 -3
- package/src/components/textarea/theme/Textarea.carbon.theme.ts +1 -1
- package/src/components/toggle/Toggle.vue +2 -4
- package/src/composables/keys.ts +5 -1
- package/src/composables/useFocusTrap.ts +106 -0
- package/src/composables/useInputtable.ts +31 -3
- package/src/theme.ts +14 -2
- package/src/themes/base/components.ts +7 -1
- package/src/themes/carbon/components.ts +7 -1
- package/src/version.ts +1 -1
- package/volar.d.ts +5 -1
- package/lib/components/collapse/Collapse.vue.js +0 -131
- package/lib/components/collapse/Collapse.vue2.js +0 -4
- package/lib/components/collapse/index.d.ts +0 -2
- package/lib/components/collapse/theme/Collapse.base.theme.d.ts +0 -3
- package/lib/components/collapse/theme/Collapse.base.theme.js +0 -10
- package/lib/components/collapse/theme/Collapse.carbon.theme.d.ts +0 -3
- package/lib/components/table/TableHead.d.ts +0 -2
- package/lib/components/table/TableHead.js +0 -19
- package/src/components/collapse/index.ts +0 -2
- package/src/components/collapse/theme/Collapse.base.theme.ts +0 -13
- package/src/components/collapse/theme/Collapse.carbon.theme.ts +0 -7
- package/src/components/table/TableHead.tsx +0 -14
- /package/lib/components/{collapse/__tests__/Collapse.spec.d.ts → accordion/__tests__/Accordion.spec.d.ts} +0 -0
|
@@ -1,126 +1,179 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { onClickOutside as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import { defineComponent as X, ref as f, watch as g, nextTick as B, useSlots as j, computed as H, openBlock as l, createBlock as p, Teleport as I, createElementBlock as i, normalizeStyle as M, unref as o, normalizeClass as a, createCommentVNode as s, createElementVNode as S, resolveDynamicComponent as P, withCtx as w, renderSlot as r, toDisplayString as v } from "vue";
|
|
2
|
+
import { onClickOutside as W, useEventListener as K } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9/node_modules/@vueuse/core/index.js";
|
|
3
|
+
import { useTheme as L } from "../../composables/useTheme.js";
|
|
4
|
+
import { useFocusTrap as q } from "../../composables/useFocusTrap.js";
|
|
5
|
+
import { closeIcon as G } from "../../common/icons.js";
|
|
6
|
+
import J from "../button/Button.vue.js";
|
|
7
|
+
import Q from "../scroll/Scroll.vue.js";
|
|
8
|
+
import U from "../form/Form.vue.js";
|
|
9
|
+
const Y = { class: "flex items-end sm:items-center justify-center p-4 sm:p-6 h-screen" }, Z = { key: 0 }, _ = ["xs", "sm", "md", "lg", "xl", "full"], x = {
|
|
8
10
|
size: {
|
|
9
11
|
type: String,
|
|
10
|
-
default: "
|
|
12
|
+
default: "xl"
|
|
11
13
|
},
|
|
12
14
|
modelValue: Boolean,
|
|
13
15
|
showClose: Boolean,
|
|
14
|
-
backdrop: Boolean
|
|
15
|
-
|
|
16
|
+
backdrop: Boolean,
|
|
17
|
+
hasActions: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !0
|
|
20
|
+
},
|
|
21
|
+
hasHeader: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !0
|
|
24
|
+
},
|
|
25
|
+
title: String,
|
|
26
|
+
description: String,
|
|
27
|
+
label: String,
|
|
28
|
+
loading: Boolean,
|
|
29
|
+
loadingText: String,
|
|
30
|
+
fluid: Boolean,
|
|
31
|
+
// form props
|
|
32
|
+
isForm: Boolean,
|
|
33
|
+
formDisabled: Boolean,
|
|
34
|
+
formDescription: String,
|
|
35
|
+
formTitle: String,
|
|
36
|
+
formAutoValidate: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: !0
|
|
39
|
+
},
|
|
40
|
+
formErrors: {
|
|
41
|
+
type: [Array, Object],
|
|
42
|
+
default: () => []
|
|
43
|
+
}
|
|
44
|
+
}, ee = {
|
|
16
45
|
name: "XModal",
|
|
17
46
|
validators: {
|
|
18
|
-
size:
|
|
47
|
+
size: _
|
|
19
48
|
}
|
|
20
|
-
},
|
|
21
|
-
...
|
|
22
|
-
props:
|
|
23
|
-
emits: ["update:modelValue"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
let
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
49
|
+
}, ue = /* @__PURE__ */ X({
|
|
50
|
+
...ee,
|
|
51
|
+
props: x,
|
|
52
|
+
emits: ["update:modelValue", "submit"],
|
|
53
|
+
setup(V, { expose: $, emit: T }) {
|
|
54
|
+
const u = V, b = T, d = f(u.modelValue), n = f(!1), y = f(null), C = f(null), { initFocusTrap: D, clearFocusTrap: z } = q();
|
|
55
|
+
let m;
|
|
56
|
+
g(d, (e) => {
|
|
57
|
+
m && (m(), m = void 0), e && setTimeout(() => {
|
|
58
|
+
m = W(y, c);
|
|
30
59
|
});
|
|
31
|
-
}),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
t.value = e;
|
|
36
|
-
}, 150));
|
|
37
|
-
}), typeof window < "u" && I(document, "keydown", C);
|
|
38
|
-
function C(e) {
|
|
39
|
-
e.key === "Escape" && t.value && d();
|
|
60
|
+
}), g(() => u.modelValue, E, { immediate: !0 });
|
|
61
|
+
async function E() {
|
|
62
|
+
const e = u.modelValue;
|
|
63
|
+
e ? (d.value = e, await B(), n.value = e, await B(), D(y), document.body.style.overflow = "hidden") : (n.value = e, d.value = e, z(), document.body.style.overflow = "auto");
|
|
40
64
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
65
|
+
typeof window < "u" && K(document, "keydown", A);
|
|
66
|
+
function A(e) {
|
|
67
|
+
e.key === "Escape" && d.value && c();
|
|
68
|
+
}
|
|
69
|
+
function c() {
|
|
70
|
+
n.value = !1, setTimeout(() => {
|
|
71
|
+
b("update:modelValue", !1);
|
|
44
72
|
}, 150);
|
|
45
73
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
a.value = !0;
|
|
49
|
-
});
|
|
74
|
+
function F() {
|
|
75
|
+
b("update:modelValue", !0), n.value = !0;
|
|
50
76
|
}
|
|
51
|
-
const { styles:
|
|
52
|
-
|
|
53
|
-
|
|
77
|
+
const k = j(), R = H(() => !!(k["tertiary-action"] || k["cancel-action"])), { styles: N, classes: t, className: O } = L("Modal", {}, u, {
|
|
78
|
+
visible: n
|
|
79
|
+
});
|
|
80
|
+
return $({ open: F, close: c }), (e, h) => (l(), p(I, { to: "body" }, [
|
|
81
|
+
d.value ? (l(), i("div", {
|
|
54
82
|
key: 0,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
83
|
+
ref_key: "modalWrapperRef",
|
|
84
|
+
ref: C,
|
|
85
|
+
style: M(o(N)),
|
|
86
|
+
class: a([
|
|
87
|
+
o(O),
|
|
88
|
+
o(t).wrapper,
|
|
89
|
+
n.value ? "visible" : "invisible ease-in duration-100"
|
|
60
90
|
])
|
|
61
91
|
}, [
|
|
62
|
-
e.backdrop ? (l(),
|
|
92
|
+
e.backdrop ? (l(), i("div", {
|
|
63
93
|
key: 0,
|
|
64
|
-
class:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}, null, 2)) : r("", !0),
|
|
69
|
-
p("div", j, [
|
|
70
|
-
p("div", {
|
|
94
|
+
class: a(o(t).backdrop)
|
|
95
|
+
}, null, 2)) : s("", !0),
|
|
96
|
+
S("div", Y, [
|
|
97
|
+
(l(), p(P(e.isForm ? U : "div"), {
|
|
71
98
|
ref_key: "modalRef",
|
|
72
|
-
ref:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
99
|
+
ref: y,
|
|
100
|
+
disabled: e.formDisabled,
|
|
101
|
+
"auto-validate": e.formAutoValidate,
|
|
102
|
+
title: e.formTitle,
|
|
103
|
+
description: e.formDescription,
|
|
104
|
+
errors: e.formErrors,
|
|
105
|
+
class: a(o(t).modal),
|
|
106
|
+
"auto-focus": "",
|
|
107
|
+
"has-footer": !1,
|
|
77
108
|
role: "dialog",
|
|
78
109
|
"aria-modal": "true",
|
|
79
|
-
"aria-labelledby": "modal-headline"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
110
|
+
"aria-labelledby": "modal-headline",
|
|
111
|
+
onSubmit: h[0] || (h[0] = (oe) => e.$emit("submit"))
|
|
112
|
+
}, {
|
|
113
|
+
default: w(() => [
|
|
114
|
+
r(e.$slots, "image"),
|
|
115
|
+
e.hasHeader ? (l(), i("div", {
|
|
116
|
+
key: 0,
|
|
117
|
+
class: a(o(t).header)
|
|
118
|
+
}, [
|
|
119
|
+
r(e.$slots, "header", {}, () => [
|
|
120
|
+
e.label ? (l(), i("div", {
|
|
121
|
+
key: 0,
|
|
122
|
+
class: a(o(t).label)
|
|
123
|
+
}, v(e.label), 3)) : s("", !0),
|
|
124
|
+
e.title ? (l(), i("div", {
|
|
125
|
+
key: 1,
|
|
126
|
+
class: a(o(t).title)
|
|
127
|
+
}, v(e.title), 3)) : s("", !0)
|
|
128
|
+
])
|
|
129
|
+
], 2)) : s("", !0),
|
|
130
|
+
e.$slots.default ? (l(), p(Q, {
|
|
131
|
+
key: 1,
|
|
132
|
+
scrollbar: !1,
|
|
133
|
+
vertical: ""
|
|
134
|
+
}, {
|
|
135
|
+
default: w(() => [
|
|
136
|
+
S("div", {
|
|
137
|
+
class: a(o(t).content)
|
|
138
|
+
}, [
|
|
139
|
+
e.description ? (l(), i("div", {
|
|
140
|
+
key: 0,
|
|
141
|
+
class: a(o(t).description)
|
|
142
|
+
}, v(e.description), 3)) : s("", !0),
|
|
143
|
+
r(e.$slots, "default")
|
|
144
|
+
], 2)
|
|
145
|
+
]),
|
|
146
|
+
_: 3
|
|
147
|
+
})) : s("", !0),
|
|
148
|
+
e.showClose ? (l(), p(J, {
|
|
149
|
+
key: 2,
|
|
150
|
+
ghost: "",
|
|
151
|
+
size: "lg",
|
|
152
|
+
tabindex: "-1",
|
|
153
|
+
icon: o(G),
|
|
154
|
+
class: a(o(t).closeIcon),
|
|
155
|
+
onClick: c
|
|
156
|
+
}, null, 8, ["icon", "class"])) : s("", !0),
|
|
157
|
+
e.hasActions ? (l(), i("div", {
|
|
158
|
+
key: 3,
|
|
159
|
+
class: a(o(t).actions)
|
|
160
|
+
}, [
|
|
161
|
+
r(e.$slots, "actions", {}, () => [
|
|
162
|
+
r(e.$slots, "cancel-action"),
|
|
163
|
+
R.value ? (l(), i("div", Z)) : s("", !0),
|
|
164
|
+
r(e.$slots, "tertiary-action"),
|
|
165
|
+
r(e.$slots, "secondary-action"),
|
|
166
|
+
r(e.$slots, "primary-action")
|
|
167
|
+
])
|
|
168
|
+
], 2)) : s("", !0)
|
|
169
|
+
]),
|
|
170
|
+
_: 3
|
|
171
|
+
}, 40, ["disabled", "auto-validate", "title", "description", "errors", "class"]))
|
|
119
172
|
])
|
|
120
|
-
], 6)) :
|
|
173
|
+
], 6)) : s("", !0)
|
|
121
174
|
]));
|
|
122
175
|
}
|
|
123
176
|
});
|
|
124
177
|
export {
|
|
125
|
-
|
|
178
|
+
ue as default
|
|
126
179
|
};
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
const a = {
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper: "fixed z-40 inset-0 overflow-y-auto transition-all",
|
|
4
|
-
backdrop:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
return l.size === "xs" ? e += " sm:max-w-xs" : l.size === "sm" ? e += " sm:max-w-sm" : l.size === "lg" ? e += " sm:max-w-xl" : l.size === "xl" ? e += " sm:max-w-3xl" : e += " sm:max-w-lg", e;
|
|
4
|
+
backdrop: ({ data: s }) => {
|
|
5
|
+
const t = ["fixed inset-0 bg-gray-500 dark:bg-black transition-opacity"];
|
|
6
|
+
return s.visible ? t.push("ease-out duration-200 opacity-30 dark:opacity-70") : t.push("ease-in duration-100 opacity-0"), t;
|
|
8
7
|
},
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
modal: ({ props: s, data: t }) => {
|
|
9
|
+
const e = ["relative flex flex-col z-10 bg-white dark:bg-gray-900 rounded-md shadow-lg transform transition-all overflow-hidden max-h-full w-full"];
|
|
10
|
+
return t.visible ? e.push("ease-out duration-200 opacity-100 translate-y-0 sm:scale-100") : e.push("ease-in duration-200 opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"), s.size === "xs" ? e.push("sm:max-w-xs") : s.size === "sm" ? e.push("sm:max-w-sm") : s.size === "lg" ? e.push("sm:max-w-xl") : s.size === "xl" ? e.push("sm:max-w-3xl") : e.push("sm:max-w-lg"), e;
|
|
11
|
+
},
|
|
12
|
+
closeIcon: "!absolute top-2 z-10 right-2",
|
|
13
|
+
header: "text-lg pl-6 py-4 border-b pr-12",
|
|
11
14
|
content: "px-6 py-4",
|
|
12
|
-
actions: "bg-slate-50 dark:bg-gray-800 p-4"
|
|
15
|
+
actions: "bg-slate-50 dark:bg-gray-800 p-4 grid grid-flow-col gap-4",
|
|
16
|
+
label: "text-xs text-gray-500 mb-1",
|
|
17
|
+
title: "text-xl font-semibold mb-4",
|
|
18
|
+
description: "text-sm"
|
|
13
19
|
}
|
|
14
|
-
},
|
|
20
|
+
}, l = a;
|
|
15
21
|
export {
|
|
16
|
-
|
|
22
|
+
l as default
|
|
17
23
|
};
|
|
@@ -1,5 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const a = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: "fixed z-40 inset-0 overflow-y-auto transition-all",
|
|
4
|
+
backdrop: ({ data: t }) => {
|
|
5
|
+
const e = ["fixed inset-0 bg-gray-500 dark:bg-black transition-opacity"];
|
|
6
|
+
return t.visible ? e.push("ease-out duration-200 opacity-70 dark:opacity-70") : e.push("ease-in duration-100 opacity-0"), e;
|
|
7
|
+
},
|
|
8
|
+
modal: ({ props: t, data: e }) => {
|
|
9
|
+
const s = ["relative flex flex-col z-10 bg-gray-200 dark:bg-gray-900 shadow-lg transform transition-all overflow-hidden max-h-full w-full"];
|
|
10
|
+
return e.visible ? s.push("ease-out duration-200 opacity-100 translate-y-0 sm:scale-100") : s.push("ease-in duration-200 opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"), t.size === "xs" ? s.push("sm:max-w-xs") : t.size === "sm" ? s.push("sm:max-w-sm") : t.size === "lg" ? s.push("sm:max-w-xl") : t.size === "xl" ? s.push("sm:max-w-3xl") : s.push("sm:max-w-lg"), s;
|
|
11
|
+
},
|
|
12
|
+
closeIcon: "!absolute top-0 z-10 right-0",
|
|
13
|
+
header: "text-lg pl-4 pt-4 pr-12",
|
|
14
|
+
content: ({ props: t }) => {
|
|
15
|
+
const e = ["pb-8"];
|
|
16
|
+
return t.fluid || e.push("px-4"), e;
|
|
17
|
+
},
|
|
18
|
+
actions: ({ props: t, slots: e }) => {
|
|
19
|
+
const s = ["grid grid-flow-col gap-[1px]"];
|
|
20
|
+
return e["tertiary-action"] || e["cancel-action"] ? s.push("grid-cols-4") : s.push("grid-cols-2"), s;
|
|
21
|
+
},
|
|
22
|
+
label: "text-xs text-gray-500 mb-1",
|
|
23
|
+
title: "text-xl mb-4",
|
|
24
|
+
description: "text-sm mb-4"
|
|
25
|
+
}
|
|
26
|
+
}, l = a;
|
|
3
27
|
export {
|
|
4
|
-
|
|
28
|
+
l as default
|
|
5
29
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as I, ref as
|
|
1
|
+
import { defineComponent as I, ref as f, provide as O, watch as $, openBlock as a, createElementBlock as m, Fragment as K, renderSlot as q, createBlock as k, Teleport as J, createElementVNode as x, normalizeStyle as A, unref as l, normalizeClass as b, createVNode as D, TransitionGroup as Q, withCtx as U, renderList as W, createCommentVNode as g, toDisplayString as C } from "vue";
|
|
2
2
|
import { injectNotificationKey as Y } from "../../composables/keys.js";
|
|
3
3
|
import { useColors as H } from "../../composables/useColors.js";
|
|
4
4
|
import { useCSS as Z } from "../../composables/useCSS.js";
|
|
@@ -8,18 +8,18 @@ import E from "../icon/Icon.vue.js";
|
|
|
8
8
|
import te from "../spacer/Spacer.js";
|
|
9
9
|
const se = { class: "flex items-center flex-wrap" }, re = {
|
|
10
10
|
key: 0,
|
|
11
|
-
class: "font-
|
|
11
|
+
class: "font-medium mr-2"
|
|
12
12
|
}, ae = ["onClick"], le = {
|
|
13
13
|
...H.props("primary"),
|
|
14
14
|
align: {
|
|
15
15
|
type: String,
|
|
16
16
|
default: "right",
|
|
17
|
-
validator: (n) =>
|
|
17
|
+
validator: (n) => _.align.includes(n)
|
|
18
18
|
},
|
|
19
19
|
position: {
|
|
20
20
|
type: String,
|
|
21
21
|
default: "bottom",
|
|
22
|
-
validator: (n) =>
|
|
22
|
+
validator: (n) => _.position.includes(n)
|
|
23
23
|
},
|
|
24
24
|
timeout: {
|
|
25
25
|
type: Number,
|
|
@@ -33,30 +33,30 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
33
33
|
type: [Symbol, String],
|
|
34
34
|
default: Y
|
|
35
35
|
}
|
|
36
|
-
},
|
|
36
|
+
}, _ = {
|
|
37
37
|
align: ["left", "right"],
|
|
38
38
|
position: ["bottom", "top"]
|
|
39
39
|
}, ne = {
|
|
40
40
|
name: "XNotifications",
|
|
41
|
-
validators:
|
|
41
|
+
validators: _
|
|
42
42
|
}, ge = /* @__PURE__ */ I({
|
|
43
43
|
...ne,
|
|
44
44
|
props: le,
|
|
45
45
|
setup(n, { expose: L }) {
|
|
46
|
-
const s = n, i =
|
|
46
|
+
const s = n, i = f(s.align), r = f(s.position), p = f([]), z = f(null), R = Z("notification"), M = H();
|
|
47
47
|
O(s.injectKey, {
|
|
48
|
-
log:
|
|
49
|
-
info:
|
|
50
|
-
warn:
|
|
51
|
-
error:
|
|
52
|
-
warning:
|
|
53
|
-
success:
|
|
48
|
+
log: w,
|
|
49
|
+
info: S,
|
|
50
|
+
warn: d,
|
|
51
|
+
error: P,
|
|
52
|
+
warning: d,
|
|
53
|
+
success: N
|
|
54
54
|
}), $(() => s.align, (o) => {
|
|
55
55
|
i.value = o;
|
|
56
56
|
}), $(() => s.position, (o) => {
|
|
57
57
|
r.value = o;
|
|
58
58
|
});
|
|
59
|
-
function
|
|
59
|
+
function w(o) {
|
|
60
60
|
const t = typeof o == "string", e = {
|
|
61
61
|
message: t ? o : void 0
|
|
62
62
|
};
|
|
@@ -65,7 +65,7 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
65
65
|
...o
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function S(o) {
|
|
69
69
|
const t = typeof o == "string", e = {
|
|
70
70
|
icon: '<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd" />',
|
|
71
71
|
iconColor: "sky",
|
|
@@ -76,7 +76,7 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
76
76
|
...o
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function N(o) {
|
|
80
80
|
const t = typeof o == "string", e = {
|
|
81
81
|
icon: '<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" />',
|
|
82
82
|
iconColor: "success",
|
|
@@ -87,7 +87,7 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
87
87
|
...o
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function d(o) {
|
|
91
91
|
const t = typeof o == "string", e = {
|
|
92
92
|
icon: '<path fill-rule="evenodd" d="M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z" clip-rule="evenodd" />',
|
|
93
93
|
iconColor: "warning",
|
|
@@ -98,7 +98,7 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
98
98
|
...o
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function P(o) {
|
|
102
102
|
const t = typeof o == "string", e = {
|
|
103
103
|
icon: '<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd" />',
|
|
104
104
|
iconColor: "error",
|
|
@@ -123,41 +123,41 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
123
123
|
...o
|
|
124
124
|
};
|
|
125
125
|
i.value = e.align, r.value = e.position;
|
|
126
|
-
const
|
|
127
|
-
icon:
|
|
128
|
-
action:
|
|
126
|
+
const u = M.getPalette(e.iconColor), v = M.getPalette(((V = e.action) == null ? void 0 : V.color) || "primary"), T = R.variables({
|
|
127
|
+
icon: u[400],
|
|
128
|
+
action: v[400],
|
|
129
129
|
hover: {
|
|
130
|
-
action:
|
|
130
|
+
action: v[500]
|
|
131
131
|
},
|
|
132
132
|
dark: {
|
|
133
|
-
icon:
|
|
134
|
-
action:
|
|
133
|
+
icon: u[500],
|
|
134
|
+
action: v[500],
|
|
135
135
|
hover: {
|
|
136
|
-
action:
|
|
136
|
+
action: v[600]
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
|
-
e.style = Object.keys(T).map((B) => `${B}: ${T[B]}`).join(";"),
|
|
140
|
+
e.style = Object.keys(T).map((B) => `${B}: ${T[B]}`).join(";"), p.value.push(e), (j = z.value) == null || j.scrollTo({ top: 0, behavior: "smooth" }), e.timeout && X(e, e.timeout);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
|
|
142
|
+
function y(o) {
|
|
143
|
+
p.value = p.value.filter((t) => t.id !== o.id);
|
|
144
144
|
}
|
|
145
145
|
function X(o, t) {
|
|
146
146
|
setTimeout(() => {
|
|
147
|
-
|
|
147
|
+
y(o);
|
|
148
148
|
}, t);
|
|
149
149
|
}
|
|
150
|
-
const { styles: F, classes:
|
|
151
|
-
return L({ log:
|
|
150
|
+
const { styles: F, classes: h, className: G } = ee("Notifications", {}, s);
|
|
151
|
+
return L({ log: w, info: S, success: N, warn: d, warning: d, error: P }), (o, t) => (a(), m(K, null, [
|
|
152
152
|
q(o.$slots, "default"),
|
|
153
|
-
(a(),
|
|
154
|
-
|
|
153
|
+
(a(), k(J, { to: "body" }, [
|
|
154
|
+
x("div", {
|
|
155
155
|
ref_key: "listRef",
|
|
156
|
-
ref:
|
|
156
|
+
ref: z,
|
|
157
157
|
style: A(l(F)),
|
|
158
|
-
class:
|
|
158
|
+
class: b([
|
|
159
159
|
l(G),
|
|
160
|
-
l(
|
|
160
|
+
l(h).wrapper,
|
|
161
161
|
{
|
|
162
162
|
// align
|
|
163
163
|
"left-0": i.value === "left",
|
|
@@ -170,8 +170,8 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
170
170
|
}, [
|
|
171
171
|
D(Q, {
|
|
172
172
|
tag: "ul",
|
|
173
|
-
class:
|
|
174
|
-
l(
|
|
173
|
+
class: b([
|
|
174
|
+
l(h).list,
|
|
175
175
|
{ "flex-col-reverse": r.value }
|
|
176
176
|
]),
|
|
177
177
|
"enter-active-class": "transition ease-out duration-200",
|
|
@@ -183,10 +183,10 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
183
183
|
"move-class": "ease-in-out duration-200"
|
|
184
184
|
}, {
|
|
185
185
|
default: U(() => [
|
|
186
|
-
(a(!0),
|
|
186
|
+
(a(!0), m(K, null, W(p.value, (e) => (a(), m("li", {
|
|
187
187
|
key: e.id,
|
|
188
|
-
class:
|
|
189
|
-
l(
|
|
188
|
+
class: b([
|
|
189
|
+
l(h).item,
|
|
190
190
|
{
|
|
191
191
|
"mb-2": r.value === "bottom",
|
|
192
192
|
"mt-2": r.value === "top"
|
|
@@ -194,31 +194,34 @@ const se = { class: "flex items-center flex-wrap" }, re = {
|
|
|
194
194
|
]),
|
|
195
195
|
style: A(e.style)
|
|
196
196
|
}, [
|
|
197
|
-
e.icon ? (a(),
|
|
197
|
+
e.icon ? (a(), k(E, {
|
|
198
198
|
key: 0,
|
|
199
199
|
filled: "",
|
|
200
200
|
icon: e.icon,
|
|
201
201
|
class: "mr-4 text-[color:var(--x-notification-icon)] dark:text-[color:var(--x-notification-dark-icon)]",
|
|
202
202
|
viewBox: "0 0 20 20"
|
|
203
|
-
}, null, 8, ["icon"])) :
|
|
204
|
-
|
|
205
|
-
e.title ? (a(),
|
|
206
|
-
|
|
203
|
+
}, null, 8, ["icon"])) : g("", !0),
|
|
204
|
+
x("div", se, [
|
|
205
|
+
e.title ? (a(), m("span", re, C(e.title), 1)) : g("", !0),
|
|
206
|
+
x("span", null, C(e.message), 1)
|
|
207
207
|
]),
|
|
208
208
|
D(l(te)),
|
|
209
|
-
e.action ? (a(),
|
|
209
|
+
e.action ? (a(), m("button", {
|
|
210
210
|
key: 1,
|
|
211
|
-
class: "ml-3 font-
|
|
212
|
-
onClick:
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
class: "ml-3 font-medium cursor-pointer text-[color:var(--x-notification-action)] hover:text-[color:var(--x-notification-action-hover)] dark:text-[color:var(--x-notification-dark-action)] dark:hover:text-[color:var(--x-notification-dark-action-hover)]",
|
|
212
|
+
onClick: () => {
|
|
213
|
+
var u;
|
|
214
|
+
(u = e.action) == null || u.onClick(), y(e);
|
|
215
|
+
}
|
|
216
|
+
}, C(e.action.label), 9, ae)) : g("", !0),
|
|
217
|
+
e.removable ? (a(), k(E, {
|
|
215
218
|
key: 2,
|
|
216
219
|
icon: l(oe),
|
|
217
220
|
class: "text-gray-400 hover:text-gray-500 ml-3 cursor-pointer",
|
|
218
221
|
onClick: () => {
|
|
219
|
-
|
|
222
|
+
y(e);
|
|
220
223
|
}
|
|
221
|
-
}, null, 8, ["icon", "onClick"])) :
|
|
224
|
+
}, null, 8, ["icon", "onClick"])) : g("", !0)
|
|
222
225
|
], 6))), 128))
|
|
223
226
|
]),
|
|
224
227
|
_: 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const e = {
|
|
2
2
|
classes: {
|
|
3
|
-
wrapper: "fixed z-
|
|
3
|
+
wrapper: "fixed z-50 w-full sm:w-auto overflow-y-auto max-h-screen",
|
|
4
4
|
list: "flex flex-col items-end w-full sm:w-[520px] px-4",
|
|
5
5
|
item: "w-full flex items-center rounded-md px-4 py-3 bg-gray-800 dark:bg-gray-50 text-white dark:text-gray-900 border border-gray-700 dark:border-gray-100"
|
|
6
6
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const e = {
|
|
2
|
+
classes: {
|
|
3
|
+
wrapper: "fixed z-50 w-full sm:w-auto overflow-y-auto max-h-screen",
|
|
4
|
+
list: "flex flex-col items-end w-full sm:w-[520px] px-4",
|
|
5
|
+
item: () => ["w-full flex items-center px-4 py-3 bg-gray-800 dark:bg-gray-50 text-white dark:text-gray-900 border-l-2 border-[color:var(--x-notification-icon)]"]
|
|
6
|
+
}
|
|
7
|
+
}, r = e;
|
|
3
8
|
export {
|
|
4
|
-
|
|
9
|
+
r as default
|
|
5
10
|
};
|
|
@@ -29,7 +29,7 @@ declare const popoverProps: {
|
|
|
29
29
|
popperShowTriggers: PropType<TriggerEvent[] | ((triggers: Array<PopoverTriggerEvent>) => Array<PopoverTriggerEvent>)>;
|
|
30
30
|
popperHideTriggers: PropType<TriggerEvent[] | ((triggers: Array<PopoverTriggerEvent>) => Array<PopoverTriggerEvent>)>;
|
|
31
31
|
container: {
|
|
32
|
-
type: (
|
|
32
|
+
type: (BooleanConstructor | ObjectConstructor | StringConstructor | {
|
|
33
33
|
new (): Element;
|
|
34
34
|
prototype: Element;
|
|
35
35
|
})[];
|
|
@@ -87,7 +87,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
87
87
|
popperShowTriggers: PropType<TriggerEvent[] | ((triggers: TriggerEvent[]) => TriggerEvent[])>;
|
|
88
88
|
popperHideTriggers: PropType<TriggerEvent[] | ((triggers: TriggerEvent[]) => TriggerEvent[])>;
|
|
89
89
|
container: {
|
|
90
|
-
type: (
|
|
90
|
+
type: (BooleanConstructor | ObjectConstructor | StringConstructor | {
|
|
91
91
|
new (): Element;
|
|
92
92
|
prototype: Element;
|
|
93
93
|
})[];
|
|
@@ -145,7 +145,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
145
145
|
popperShowTriggers: PropType<TriggerEvent[] | ((triggers: TriggerEvent[]) => TriggerEvent[])>;
|
|
146
146
|
popperHideTriggers: PropType<TriggerEvent[] | ((triggers: TriggerEvent[]) => TriggerEvent[])>;
|
|
147
147
|
container: {
|
|
148
|
-
type: (
|
|
148
|
+
type: (BooleanConstructor | ObjectConstructor | StringConstructor | {
|
|
149
149
|
new (): Element;
|
|
150
150
|
prototype: Element;
|
|
151
151
|
})[];
|