@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
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
const menu1 = [{
|
|
3
|
+
label: 'Open',
|
|
4
|
+
active: false,
|
|
5
|
+
value: 'a',
|
|
6
|
+
disabled: true,
|
|
7
|
+
}, {
|
|
8
|
+
label: 'Close',
|
|
9
|
+
active: false,
|
|
10
|
+
value: 'b',
|
|
11
|
+
}, {
|
|
12
|
+
divider: true,
|
|
13
|
+
}, {
|
|
14
|
+
label: 'Sign out',
|
|
15
|
+
active: false,
|
|
16
|
+
value: 'c',
|
|
17
|
+
}]
|
|
18
|
+
const menu2 = [{
|
|
19
|
+
label: 'Menu item 1',
|
|
20
|
+
value: '',
|
|
21
|
+
target: '_blank',
|
|
22
|
+
href: 'https://indielayer.com',
|
|
23
|
+
}, {
|
|
24
|
+
to: 'menu',
|
|
25
|
+
label: 'Menu item 2',
|
|
26
|
+
value: '',
|
|
27
|
+
icon: 'smile',
|
|
28
|
+
exact: true,
|
|
29
|
+
}, {
|
|
30
|
+
label: 'Menu item 3',
|
|
31
|
+
value: '',
|
|
32
|
+
exact: true,
|
|
33
|
+
items: [{
|
|
34
|
+
label: 'derp',
|
|
35
|
+
}],
|
|
36
|
+
}, {
|
|
37
|
+
divider: true,
|
|
38
|
+
}, {
|
|
39
|
+
label: 'Sub-menu (non-collapsible)',
|
|
40
|
+
loading: false,
|
|
41
|
+
collapsible: false,
|
|
42
|
+
items: [{
|
|
43
|
+
label: 'Option',
|
|
44
|
+
value: '',
|
|
45
|
+
icon: 'smile',
|
|
46
|
+
}, {
|
|
47
|
+
label: 'Links (sub-menu collapsible)',
|
|
48
|
+
value: '',
|
|
49
|
+
items: [{
|
|
50
|
+
to: 'menu',
|
|
51
|
+
label: 'Link to \'menu\'',
|
|
52
|
+
value: '',
|
|
53
|
+
}],
|
|
54
|
+
}],
|
|
55
|
+
}, {
|
|
56
|
+
label: 'Last menu item',
|
|
57
|
+
value: '',
|
|
58
|
+
icon: 'heart',
|
|
59
|
+
exact: '',
|
|
60
|
+
onClick: () => {},
|
|
61
|
+
disabled: false,
|
|
62
|
+
}]
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<template>
|
|
66
|
+
<x-menu :items="menu1" />
|
|
67
|
+
<x-divider class="my-8"/>
|
|
68
|
+
<x-menu :items="menu2" />
|
|
69
|
+
</template>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
import { useNotifications } from '@indielayer/ui'
|
|
4
|
+
|
|
5
|
+
const show = ref(false)
|
|
6
|
+
|
|
7
|
+
const notifications = useNotifications('notifica')
|
|
8
|
+
|
|
9
|
+
const email = ref('')
|
|
10
|
+
const password = ref('')
|
|
11
|
+
const description = ref('')
|
|
12
|
+
|
|
13
|
+
const rules = {
|
|
14
|
+
isEmail: (v: string) => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid',
|
|
15
|
+
isRequired: (v: string) => !!v || 'Field is required',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function onSubmit(isValid: boolean) {
|
|
19
|
+
if (isValid) notifications?.success('Valid! Sumitted.')
|
|
20
|
+
else notifications?.error('Invalid! Form has errors')
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<x-modal
|
|
26
|
+
v-model="show"
|
|
27
|
+
show-close
|
|
28
|
+
backdrop
|
|
29
|
+
is-form
|
|
30
|
+
title="Modal title"
|
|
31
|
+
label="Modal label"
|
|
32
|
+
description="Lorem ipsum dolor, sit amet consectetur adipisicing elit. Sapiente, fugit."
|
|
33
|
+
@submit="onSubmit"
|
|
34
|
+
>
|
|
35
|
+
<x-input
|
|
36
|
+
v-model="email"
|
|
37
|
+
:rules="[rules.isRequired, rules.isEmail]"
|
|
38
|
+
name="email"
|
|
39
|
+
label="Email"
|
|
40
|
+
placeholder="Enter your email"
|
|
41
|
+
/>
|
|
42
|
+
<x-input
|
|
43
|
+
v-model="password"
|
|
44
|
+
type="password"
|
|
45
|
+
:rules="[rules.isRequired]"
|
|
46
|
+
name="password"
|
|
47
|
+
label="Password"
|
|
48
|
+
placeholder="Enter your password"
|
|
49
|
+
helper="Must be between 8 and 10 characters"
|
|
50
|
+
/>
|
|
51
|
+
<x-textarea
|
|
52
|
+
v-model="description"
|
|
53
|
+
name="description"
|
|
54
|
+
label="Description"
|
|
55
|
+
placeholder="Description"
|
|
56
|
+
/>
|
|
57
|
+
|
|
58
|
+
<!-- <template #tertiary-action>
|
|
59
|
+
<x-button color="gray" size="lg">Tertiary</x-button>
|
|
60
|
+
</template> -->
|
|
61
|
+
<template #secondary-action>
|
|
62
|
+
<x-button color="gray" size="lg" tabindex="-1" @click="show = false">Cancel</x-button>
|
|
63
|
+
</template>
|
|
64
|
+
<template #primary-action>
|
|
65
|
+
<x-button color="primary" size="lg" type="submit">Confirm</x-button>
|
|
66
|
+
</template>
|
|
67
|
+
</x-modal>
|
|
68
|
+
|
|
69
|
+
<x-button class="mr-2" @click="show = true">Open modal</x-button>
|
|
70
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { XModal } from '@indielayer/ui'
|
|
3
|
+
import UsageDemoCode from './usage.vue?raw'
|
|
4
|
+
import UsageDemo from './usage.vue'
|
|
5
|
+
import ComposedDemoCode from './composed.vue?raw'
|
|
6
|
+
import ComposedDemo from './composed.vue'
|
|
7
|
+
|
|
8
|
+
const title = 'Modal'
|
|
9
|
+
const description = 'Modals are used to display content on top of the current page.'
|
|
10
|
+
const components = [XModal]
|
|
11
|
+
const demos = [{
|
|
12
|
+
name: 'Usage',
|
|
13
|
+
description: '',
|
|
14
|
+
code: UsageDemoCode,
|
|
15
|
+
component: UsageDemo,
|
|
16
|
+
}, {
|
|
17
|
+
name: 'Composed',
|
|
18
|
+
description: '',
|
|
19
|
+
code: ComposedDemoCode,
|
|
20
|
+
component: ComposedDemo,
|
|
21
|
+
}]
|
|
22
|
+
const back = 'menu'
|
|
23
|
+
const next = 'notifications'
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<document-page
|
|
28
|
+
github="https://github.com/indielayer/ui/blob/main/packages/ui/docs/pages/component/modal"
|
|
29
|
+
:title="title"
|
|
30
|
+
:description="description"
|
|
31
|
+
:components="components"
|
|
32
|
+
:demos="demos"
|
|
33
|
+
:back="back"
|
|
34
|
+
:next="next"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
const show = ref(false)
|
|
4
|
+
const show1 = ref(false)
|
|
5
|
+
const show2 = ref(false)
|
|
6
|
+
const show3 = ref(false)
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<x-modal v-model="show" show-close backdrop>
|
|
11
|
+
<template #image>
|
|
12
|
+
<x-image src="https://images.unsplash.com/photo-1543352634-99a5d50ae78e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1742&q=80" alt=""/>
|
|
13
|
+
</template>
|
|
14
|
+
<template #header>
|
|
15
|
+
Modal Header
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<div>
|
|
19
|
+
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Iure praesentium non id dolores vitae. Nam ratione veritatis ab cumque voluptas porro illum, voluptate perferendis ducimus dolorem optio magni assumenda dolore! Doloremque facere aliquid facilis distinctio accusamus, dolorum eligendi consequuntur molestias sapiente non rem vero sed eos minus itaque sunt officiis iste ea repellendus possimus earum maiores? Quo laudantium fuga odit tenetur sint fugit deleniti dolores placeat, accusamus magni consectetur unde totam sunt labore dolor rem consequatur quaerat! Iure temporibus voluptatem cumque, dolore maiores rerum neque vero, iusto veritatis repellat eligendi amet! Molestiae cumque officiis eius harum iste, fuga corporis molestias.
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<template #actions>
|
|
23
|
+
<div class="text-right space-x-4">
|
|
24
|
+
<x-button>Cancel</x-button>
|
|
25
|
+
<x-button color="success">Confirm</x-button>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
</x-modal>
|
|
29
|
+
|
|
30
|
+
<x-modal v-model="show1" backdrop>
|
|
31
|
+
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Iure praesentium non id dolores vitae. Nam ratione veritatis ab cumque voluptas porro illum, voluptate perferendis ducimus dolorem optio magni assumenda dolore! Doloremque facere aliquid facilis distinctio accusamus, dolorum eligendi consequuntur molestias sapiente non rem vero sed eos minus itaque sunt officiis iste ea repellendus possimus earum maiores? Quo laudantium fuga odit tenetur sint fugit deleniti dolores placeat, accusamus magni consectetur unde totam sunt labore dolor rem consequatur quaerat! Iure temporibus voluptatem cumque, dolore maiores rerum neque vero, iusto veritatis repellat eligendi amet! Molestiae cumque officiis eius harum iste, fuga corporis molestias.
|
|
32
|
+
</x-modal>
|
|
33
|
+
|
|
34
|
+
<x-modal v-model="show2" backdrop>
|
|
35
|
+
<template #header>
|
|
36
|
+
Modal Header
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Iure praesentium non id dolores vitae. Nam ratione veritatis ab cumque voluptas porro illum, voluptate perferendis ducimus dolorem optio magni assumenda dolore! Doloremque facere aliquid facilis distinctio accusamus, dolorum eligendi consequuntur molestias sapiente non rem vero sed eos minus itaque sunt officiis iste ea repellendus possimus earum maiores? Quo laudantium fuga odit tenetur sint fugit deleniti dolores placeat, accusamus magni consectetur unde totam sunt labore dolor rem consequatur quaerat! Iure temporibus voluptatem cumque, dolore maiores rerum neque vero, iusto veritatis repellat eligendi amet! Molestiae cumque officiis eius harum iste, fuga corporis molestias.
|
|
40
|
+
|
|
41
|
+
<template #actions>
|
|
42
|
+
<div class="text-right space-x-4">
|
|
43
|
+
<x-button>Cancel</x-button>
|
|
44
|
+
<x-button color="success">Confirm</x-button>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
</x-modal>
|
|
48
|
+
|
|
49
|
+
<x-modal v-model="show3" show-close>
|
|
50
|
+
<template #header>
|
|
51
|
+
Modal Title
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Iure praesentium non id dolores vitae. Nam ratione veritatis ab cumque voluptas porro illum, voluptate perferendis ducimus dolorem optio magni assumenda dolore! Doloremque facere aliquid facilis distinctio accusamus, dolorum eligendi consequuntur molestias sapiente non rem vero sed eos minus itaque sunt officiis iste ea repellendus possimus earum maiores? Quo laudantium fuga odit tenetur sint fugit deleniti dolores placeat, accusamus magni consectetur unde totam sunt labore dolor rem consequatur quaerat! Iure temporibus voluptatem cumque, dolore maiores rerum neque vero, iusto veritatis repellat eligendi amet! Molestiae cumque officiis eius harum iste, fuga corporis molestias.
|
|
55
|
+
</x-modal>
|
|
56
|
+
|
|
57
|
+
<x-button class="mr-2" @click="show = true">complete</x-button>
|
|
58
|
+
<x-button class="mr-2" @click="show1 = true">content only</x-button>
|
|
59
|
+
<x-button class="mr-2" @click="show2 = true">title & content</x-button>
|
|
60
|
+
<x-button class="mr-2" @click="show3 = true">header & content</x-button>
|
|
61
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { XNotifications } from '@indielayer/ui'
|
|
3
|
+
import UsageDemoCode from './usage.vue?raw'
|
|
4
|
+
import UsageDemo from './usage.vue'
|
|
5
|
+
|
|
6
|
+
const title = 'Notifications'
|
|
7
|
+
const description = 'Notifications are used to display a message to the user.'
|
|
8
|
+
const components = [XNotifications]
|
|
9
|
+
const demos = [{
|
|
10
|
+
name: 'Usage',
|
|
11
|
+
description: '',
|
|
12
|
+
code: UsageDemoCode,
|
|
13
|
+
component: UsageDemo,
|
|
14
|
+
}]
|
|
15
|
+
const back = 'modal'
|
|
16
|
+
const next = 'pagination'
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<document-page
|
|
21
|
+
github="https://github.com/indielayer/ui/blob/main/packages/ui/docs/pages/component/notifications"
|
|
22
|
+
:title="title"
|
|
23
|
+
:description="description"
|
|
24
|
+
:components="components"
|
|
25
|
+
:demos="demos"
|
|
26
|
+
:back="back"
|
|
27
|
+
:next="next"
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useNotifications } from '@indielayer/ui'
|
|
3
|
+
|
|
4
|
+
const notification = useNotifications('notifica')
|
|
5
|
+
|
|
6
|
+
const log = () => {notification.log('Default notification.')}
|
|
7
|
+
const info = () => {notification.info('Starwars is a movie.')}
|
|
8
|
+
const error = () => {notification.error('Disk is full!')}
|
|
9
|
+
const warn = () => {notification.warn('Disk is almost full.')}
|
|
10
|
+
const success = () => {notification.success('File saved!')}
|
|
11
|
+
const custom = () => {
|
|
12
|
+
notification.info({
|
|
13
|
+
timeout: 0,
|
|
14
|
+
title: 'Notification title',
|
|
15
|
+
message: 'Subtitle text goes here.',
|
|
16
|
+
iconColor: 'primary',
|
|
17
|
+
align: 'right',
|
|
18
|
+
position: 'bottom',
|
|
19
|
+
action: {
|
|
20
|
+
label: 'Hello',
|
|
21
|
+
onClick: () => {
|
|
22
|
+
console.log('Hello!')
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
})
|
|
26
|
+
}
|
|
27
|
+
const custom2 = () => {
|
|
28
|
+
notification.info({
|
|
29
|
+
timeout: 0,
|
|
30
|
+
title: 'Notification title',
|
|
31
|
+
message: 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem accusamus quisquam deleniti error possimus ipsa, fugit maiores. Fuga, non ab id odit praesentium earum optio tempore veniam, eligendi deleniti culpa neque aliquam blanditiis distinctio perferendis delectus ut aut. Sapiente repellendus culpa magnam ullam placeat et sunt laborum minus inventore. Cupiditate, totam soluta. Numquam placeat illum provident culpa corporis quis exercitationem, praesentium dicta quisquam quaerat voluptatem soluta dignissimos, enim dolores, saepe ullam. Dolorem, quo porro officiis aspernatur odit neque at minima totam eius! Cum aliquid repudiandae molestias, dolore accusantium qui ratione iusto, consequatur mollitia quaerat at ipsa voluptatibus quia minima? Nobis?',
|
|
32
|
+
iconColor: 'primary',
|
|
33
|
+
align: 'right',
|
|
34
|
+
position: 'top',
|
|
35
|
+
action: {
|
|
36
|
+
label: 'Hello',
|
|
37
|
+
color: 'pink',
|
|
38
|
+
onClick: () => {
|
|
39
|
+
console.log('Hello!')
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<div class="space-x-4">
|
|
48
|
+
<x-button @click="log">Log</x-button>
|
|
49
|
+
<x-button @click="info">Info</x-button>
|
|
50
|
+
<x-button @click="error">Error</x-button>
|
|
51
|
+
<x-button @click="warn">Warn</x-button>
|
|
52
|
+
<x-button @click="success">Success</x-button>
|
|
53
|
+
<x-button @click="custom">Custom</x-button>
|
|
54
|
+
<x-button @click="custom2">Custom2</x-button>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { XPagination } from '@indielayer/ui'
|
|
3
|
+
import UsageDemoCode from './usage.vue?raw'
|
|
4
|
+
import UsageDemo from './usage.vue'
|
|
5
|
+
|
|
6
|
+
const title = 'Pagination'
|
|
7
|
+
const description = 'Pagination is used to navigate through a list of items.'
|
|
8
|
+
const components = [XPagination]
|
|
9
|
+
const demos = [{
|
|
10
|
+
name: 'Usage',
|
|
11
|
+
description: '',
|
|
12
|
+
code: UsageDemoCode,
|
|
13
|
+
component: UsageDemo,
|
|
14
|
+
}]
|
|
15
|
+
const back = 'notifications'
|
|
16
|
+
const next = 'popover'
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<document-page
|
|
21
|
+
github="https://github.com/indielayer/ui/blob/main/packages/ui/docs/pages/component/pagination"
|
|
22
|
+
:title="title"
|
|
23
|
+
:description="description"
|
|
24
|
+
:components="components"
|
|
25
|
+
:demos="demos"
|
|
26
|
+
:back="back"
|
|
27
|
+
:next="next"
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
const totalPages = 10
|
|
4
|
+
const page = ref(1)
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="space-y-10">
|
|
9
|
+
<x-pagination v-model="page" :total-pages="totalPages" variant="quick" />
|
|
10
|
+
<x-pagination v-model="page" :total-pages="totalPages" />
|
|
11
|
+
<x-pagination v-model="page" :total-pages="totalPages" variant="dots" />
|
|
12
|
+
<div>
|
|
13
|
+
<p class="font-bold mb-2">Pagination with links (?page) query string</p>
|
|
14
|
+
<x-pagination v-model="page" :total-pages="totalPages" links />
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { XPopover, XPopoverContainer } from '@indielayer/ui'
|
|
3
|
+
import UsageDemoCode from './usage.vue?raw'
|
|
4
|
+
import UsageDemo from './usage.vue'
|
|
5
|
+
|
|
6
|
+
const title = 'Popover'
|
|
7
|
+
const description = 'Popover is used to display content in a small overlay.'
|
|
8
|
+
const components = [XPopover, XPopoverContainer]
|
|
9
|
+
const demos = [{
|
|
10
|
+
name: 'Usage',
|
|
11
|
+
description: '',
|
|
12
|
+
code: UsageDemoCode,
|
|
13
|
+
component: UsageDemo,
|
|
14
|
+
}]
|
|
15
|
+
const back = 'pagination'
|
|
16
|
+
const next = 'progress'
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<document-page
|
|
21
|
+
github="https://github.com/indielayer/ui/blob/main/packages/ui/docs/pages/component/popover"
|
|
22
|
+
:title="title"
|
|
23
|
+
:description="description"
|
|
24
|
+
:components="components"
|
|
25
|
+
:demos="demos"
|
|
26
|
+
:back="back"
|
|
27
|
+
:next="next"
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="space-x-2">
|
|
3
|
+
<x-popover placement="top-start">
|
|
4
|
+
<x-button>Click me to open popover</x-button>
|
|
5
|
+
<template #content>
|
|
6
|
+
<x-popover-container class="p-2">
|
|
7
|
+
example
|
|
8
|
+
</x-popover-container>
|
|
9
|
+
</template>
|
|
10
|
+
</x-popover>
|
|
11
|
+
|
|
12
|
+
<x-popover align="top" position="left">
|
|
13
|
+
<x-avatar class="cursor-pointer shadow" name="John Smith" />
|
|
14
|
+
<template #content>
|
|
15
|
+
<x-popover-container class="p-2">
|
|
16
|
+
another one
|
|
17
|
+
</x-popover-container>
|
|
18
|
+
</template>
|
|
19
|
+
</x-popover>
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { XProgress } from '@indielayer/ui'
|
|
3
|
+
import UsageDemoCode from './usage.vue?raw'
|
|
4
|
+
import UsageDemo from './usage.vue'
|
|
5
|
+
import VariantsDemoCode from './variants.vue?raw'
|
|
6
|
+
import VariantsDemo from './variants.vue'
|
|
7
|
+
|
|
8
|
+
const title = 'Progress'
|
|
9
|
+
const description = 'Progress is used to show the progress of an operation.'
|
|
10
|
+
const components = [XProgress]
|
|
11
|
+
const demos = [{
|
|
12
|
+
name: 'Usage',
|
|
13
|
+
description: '',
|
|
14
|
+
code: UsageDemoCode,
|
|
15
|
+
component: UsageDemo,
|
|
16
|
+
}, {
|
|
17
|
+
name: 'Variants',
|
|
18
|
+
description: '',
|
|
19
|
+
code: VariantsDemoCode,
|
|
20
|
+
component: VariantsDemo,
|
|
21
|
+
}]
|
|
22
|
+
const back = 'popover'
|
|
23
|
+
const next = 'skeleton'
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<document-page
|
|
28
|
+
github="https://github.com/indielayer/ui/blob/main/packages/ui/docs/pages/component/progress"
|
|
29
|
+
:title="title"
|
|
30
|
+
:description="description"
|
|
31
|
+
:components="components"
|
|
32
|
+
:demos="demos"
|
|
33
|
+
:back="back"
|
|
34
|
+
:next="next"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="grid grid-cols-3 gap-4">
|
|
3
|
+
<x-progress :percentage="percentage" gradient color="sky" />
|
|
4
|
+
<x-progress :percentage="percentage" color="rose" />
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script setup>
|
|
9
|
+
import { ref, onMounted } from 'vue'
|
|
10
|
+
const percentage = ref(0)
|
|
11
|
+
|
|
12
|
+
onMounted(() => {
|
|
13
|
+
const interval = setInterval(() => {
|
|
14
|
+
percentage.value += 5
|
|
15
|
+
if (percentage.value >= 100) clearTimeout(interval)
|
|
16
|
+
}, 100)
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { XRadio } from '@indielayer/ui'
|
|
3
|
+
import UsageDemoCode from './usage.vue?raw'
|
|
4
|
+
import UsageDemo from './usage.vue'
|
|
5
|
+
import VariantsDemoCode from './variants.vue?raw'
|
|
6
|
+
import VariantsDemo from './variants.vue'
|
|
7
|
+
import StatesDemoCode from './states.vue?raw'
|
|
8
|
+
import StatesDemo from './states.vue'
|
|
9
|
+
import SizeDemoCode from './size.vue?raw'
|
|
10
|
+
import SizeDemo from './size.vue'
|
|
11
|
+
|
|
12
|
+
const title = 'Radio'
|
|
13
|
+
const description = 'Radios allow the user to select one option from a set. Use radio buttons for exclusive selection if you think that the user needs to see all available options side-by-side.'
|
|
14
|
+
const components = [XRadio]
|
|
15
|
+
const demos = [{
|
|
16
|
+
name: 'Usage',
|
|
17
|
+
description: '',
|
|
18
|
+
code: UsageDemoCode,
|
|
19
|
+
component: UsageDemo,
|
|
20
|
+
}, {
|
|
21
|
+
name: 'Variants',
|
|
22
|
+
description: '',
|
|
23
|
+
code: VariantsDemoCode,
|
|
24
|
+
component: VariantsDemo,
|
|
25
|
+
}, {
|
|
26
|
+
name: 'States',
|
|
27
|
+
description: '',
|
|
28
|
+
code: StatesDemoCode,
|
|
29
|
+
component: StatesDemo,
|
|
30
|
+
}, {
|
|
31
|
+
name: 'Size',
|
|
32
|
+
description: '',
|
|
33
|
+
code: SizeDemoCode,
|
|
34
|
+
component: SizeDemo,
|
|
35
|
+
}]
|
|
36
|
+
const back = 'input'
|
|
37
|
+
const next = 'select'
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<document-page
|
|
42
|
+
github="https://github.com/indielayer/ui/blob/main/packages/ui/docs/pages/component/radio"
|
|
43
|
+
:title="title"
|
|
44
|
+
:description="description"
|
|
45
|
+
:components="components"
|
|
46
|
+
:demos="demos"
|
|
47
|
+
:back="back"
|
|
48
|
+
:next="next"
|
|
49
|
+
/>
|
|
50
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
const selected = ref('a')
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<div class="grid grid-cols-4 gap-4">
|
|
9
|
+
<x-radio v-model="selected" size="xs" value="a" label="Option A" />
|
|
10
|
+
<x-radio v-model="selected" size="sm" value="b" label="Option B" />
|
|
11
|
+
<x-radio v-model="selected" size="md" value="c" label="Option C" />
|
|
12
|
+
<x-radio v-model="selected" size="lg" value="d" label="Option D" />
|
|
13
|
+
<x-radio v-model="selected" size="xl" value="e" label="Option E" />
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="grid grid-cols-4 gap-4">
|
|
3
|
+
<x-radio v-model="selected" disabled value="a" label="Disabled" />
|
|
4
|
+
<x-radio v-model="selected" loading value="b" label="Loading" />
|
|
5
|
+
<x-radio v-model="selected" error="Invalid input" value="a" label="Error" />
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
data() { return { selected: 'a' } },
|
|
12
|
+
}
|
|
13
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="grid grid-cols-4 gap-4">
|
|
3
|
+
<x-radio v-model="selected" name="inputName" value="a" label="Option A" />
|
|
4
|
+
<x-radio v-model="selected" name="inputName" value="b" label="Option B" />
|
|
5
|
+
<x-radio v-model="selected" name="inputName" value="c" label="Option C" />
|
|
6
|
+
<x-radio v-model="selected" name="inputName" value="d" label="Option D" />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
export default {
|
|
12
|
+
data() { return { selected: 'a' } },
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="grid grid-cols-4 gap-4">
|
|
3
|
+
<x-radio
|
|
4
|
+
v-model="selected"
|
|
5
|
+
value="a"
|
|
6
|
+
color="rose"
|
|
7
|
+
label="Option A"
|
|
8
|
+
>
|
|
9
|
+
option extra content
|
|
10
|
+
</x-radio>
|
|
11
|
+
<x-radio
|
|
12
|
+
v-model="selected"
|
|
13
|
+
value="b"
|
|
14
|
+
color="amber"
|
|
15
|
+
glow
|
|
16
|
+
label="Option B"
|
|
17
|
+
>Glow</x-radio>
|
|
18
|
+
<x-radio
|
|
19
|
+
v-model="selected"
|
|
20
|
+
value="c"
|
|
21
|
+
color="sky"
|
|
22
|
+
glow
|
|
23
|
+
label="Option C"
|
|
24
|
+
>Glow</x-radio>
|
|
25
|
+
<x-radio
|
|
26
|
+
v-model="selected"
|
|
27
|
+
value="d"
|
|
28
|
+
color="indigo"
|
|
29
|
+
glow
|
|
30
|
+
label="Option D"
|
|
31
|
+
>Glow</x-radio>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
export default {
|
|
37
|
+
data() { return { selected: 'a' } },
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<x-scroll horizontal>
|
|
3
|
+
<div class="w-screen">
|
|
4
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam, quod fuga deleniti eaque sit nemo, labore, quisquam est esse quidem corrupti quia illo totam. Dicta laborum hic cupiditate distinctio quas totam sed sunt sint mollitia nostrum, provident quasi quam, suscipit atque rem ut saepe quae! In ipsum, minus non deleniti quasi temporibus qui autem voluptates! Architecto iusto unde placeat mollitia doloremque amet vel necessitatibus sapiente ipsa tenetur temporibus quidem perferendis sunt, quibusdam porro minima error impedit! Voluptatum ratione porro praesentium est veniam commodi, veritatis nemo voluptates atque iste, neque illum nesciunt aspernatur reprehenderit. Deleniti, aspernatur iusto accusamus nulla quos magni.
|
|
5
|
+
</div>
|
|
6
|
+
</x-scroll>
|
|
7
|
+
|
|
8
|
+
<div class="text-lg mt-10">Horizontal scroll with Mousewheel</div>
|
|
9
|
+
<x-scroll horizontal mousewheel>
|
|
10
|
+
<div class="w-screen">
|
|
11
|
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ullam, quod fuga deleniti eaque sit nemo, labore, quisquam est esse quidem corrupti quia illo totam. Dicta laborum hic cupiditate distinctio quas totam sed sunt sint mollitia nostrum, provident quasi quam, suscipit atque rem ut saepe quae! In ipsum, minus non deleniti quasi temporibus qui autem voluptates! Architecto iusto unde placeat mollitia doloremque amet vel necessitatibus sapiente ipsa tenetur temporibus quidem perferendis sunt, quibusdam porro minima error impedit! Voluptatum ratione porro praesentium est veniam commodi, veritatis nemo voluptates atque iste, neque illum nesciunt aspernatur reprehenderit. Deleniti, aspernatur iusto accusamus nulla quos magni.
|
|
12
|
+
</div>
|
|
13
|
+
</x-scroll>
|
|
14
|
+
</template>
|