@indielayer/ui 0.0.0-dev-20240129122517 → 0.0.0-dev-20240205224808
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/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 +47 -0
- package/docs/components/common/CopyButton.vue +50 -0
- package/docs/components/common/DocumentPage.vue +285 -0
- package/docs/components/common/Indielayer-theme.json +702 -0
- package/docs/components/common/MultiSnippet.vue +26 -0
- package/docs/components/menu/DocsMenu.vue +96 -0
- package/docs/components/toolbar/PreToolbar.vue +16 -0
- package/docs/components/toolbar/Toolbar.vue +76 -0
- package/docs/components/toolbar/ToolbarColorToggle.vue +49 -0
- package/docs/icons.ts +61 -0
- package/docs/layouts/default.vue +33 -0
- package/docs/layouts/simple.vue +3 -0
- package/docs/main.ts +33 -0
- package/docs/pages/colors.vue +120 -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 +22 -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 +47 -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 +14 -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 +78 -0
- package/docs/pages/component/modal/index.vue +36 -0
- package/docs/pages/component/modal/usage.vue +66 -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 +46 -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 +142 -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 +19 -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 +12 -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 +12 -0
- package/docs/pages/error.vue +6 -0
- package/docs/pages/icons.vue +101 -0
- package/docs/pages/index.vue +153 -0
- package/docs/pages/play.vue +7 -0
- package/docs/pages/typography.vue +91 -0
- package/docs/router/index.ts +77 -0
- package/exports/tailwind.preset.js +0 -1
- package/lib/components/accordion/Accordion.vue.d.ts +3 -0
- package/lib/components/accordion/Accordion.vue.js +7 -7
- package/lib/components/accordion/AccordionItem.vue.d.ts +1 -0
- package/lib/components/accordion/AccordionItem.vue.js +49 -47
- package/lib/components/accordion/index.d.ts +1 -1
- package/lib/components/accordion/theme/Accordion.carbon.theme.js +3 -6
- package/lib/components/accordion/theme/AccordionItem.base.theme.js +9 -9
- package/lib/components/accordion/theme/AccordionItem.carbon.theme.js +3 -14
- package/lib/components/badge/Badge.vue.js +7 -7
- package/lib/components/breadcrumbs/theme/Breadcrumbs.base.theme.js +1 -1
- package/lib/components/button/Button.vue.js +2 -2
- package/lib/components/button/Button.vue2.js +26 -26
- package/lib/components/button/theme/Button.base.theme.js +7 -7
- package/lib/components/card/theme/Card.base.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 +3 -0
- package/lib/components/checkbox/Checkbox.vue2.js +23 -23
- package/lib/components/checkbox/theme/Checkbox.base.theme.js +10 -10
- package/lib/components/checkbox/theme/Checkbox.carbon.theme.js +2 -2
- 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/divider/Divider.vue.js +14 -14
- package/lib/components/divider/theme/Divider.base.theme.js +2 -2
- package/lib/components/drawer/Drawer.vue.js +2 -2
- package/lib/components/drawer/theme/Drawer.base.theme.js +1 -1
- package/lib/components/form/Form.vue.js +1 -1
- package/lib/components/form/theme/Form.base.theme.js +5 -5
- package/lib/components/form/theme/Form.carbon.theme.js +4 -4
- package/lib/components/formGroup/FormGroup.vue.d.ts +3 -0
- package/lib/components/formGroup/FormGroup.vue.js +16 -15
- package/lib/components/formGroup/theme/FormGroup.base.theme.js +1 -1
- package/lib/components/icon/theme/Icon.base.theme.js +1 -1
- package/lib/components/index.js +108 -107
- package/lib/components/input/Input.vue.d.ts +3 -0
- package/lib/components/input/Input.vue.js +4 -3
- package/lib/components/input/theme/Input.base.theme.js +10 -10
- package/lib/components/input/theme/Input.carbon.theme.js +10 -10
- package/lib/components/inputFooter/theme/InputFooter.base.theme.js +3 -3
- package/lib/components/inputFooter/theme/InputFooter.carbon.theme.js +2 -2
- package/lib/components/label/Label.vue.d.ts +3 -0
- package/lib/components/label/Label.vue.js +26 -20
- package/lib/components/label/theme/Label.base.theme.js +2 -2
- package/lib/components/label/theme/Label.carbon.theme.js +3 -3
- package/lib/components/link/Link.vue.js +2 -2
- package/lib/components/link/Link.vue2.js +4 -4
- package/lib/components/loader/theme/Loader.base.theme.js +1 -1
- package/lib/components/loader/theme/Loader.carbon.theme.js +1 -1
- package/lib/components/menu/Menu.vue.js +22 -22
- package/lib/components/menu/theme/MenuItem.base.theme.js +22 -32
- package/lib/components/modal/Modal.vue.d.ts +5 -1
- package/lib/components/modal/Modal.vue.js +80 -74
- package/lib/components/modal/theme/Modal.base.theme.js +10 -10
- package/lib/components/modal/theme/Modal.carbon.theme.js +3 -3
- package/lib/components/notifications/Notifications.vue.js +1 -1
- package/lib/components/notifications/theme/Notifications.base.theme.js +1 -1
- package/lib/components/notifications/theme/Notifications.carbon.theme.js +3 -3
- package/lib/components/pagination/Pagination.vue.js +27 -27
- package/lib/components/popover/Popover.vue.d.ts +13 -0
- package/lib/components/popover/Popover.vue.js +13 -8
- package/lib/components/popover/Popover.vue2.js +3 -2
- package/lib/components/popover/Popover.vue3.js +2 -3
- package/lib/components/popover/theme/PopoverContainer.base.theme.js +4 -4
- package/lib/components/popover/theme/PopoverContainer.carbon.theme.js +4 -4
- package/lib/components/progress/Progress.vue.js +11 -11
- package/lib/components/progress/theme/Progress.base.theme.js +10 -10
- package/lib/components/radio/Radio.vue.d.ts +3 -0
- package/lib/components/radio/theme/Radio.base.theme.js +31 -31
- package/lib/components/radio/theme/Radio.carbon.theme.js +8 -8
- package/lib/components/select/Select.vue.d.ts +16 -0
- package/lib/components/select/Select.vue.js +93 -93
- package/lib/components/select/theme/Select.base.theme.js +11 -11
- package/lib/components/select/theme/Select.carbon.theme.js +10 -10
- package/lib/components/skeleton/theme/Skeleton.base.theme.js +1 -1
- package/lib/components/slider/Slider.vue.d.ts +3 -0
- package/lib/components/slider/Slider.vue.js +1 -1
- package/lib/components/slider/theme/Slider.carbon.theme.js +8 -8
- package/lib/components/stepper/Stepper.vue.js +14 -14
- package/lib/components/tab/Tab.vue.js +55 -54
- package/lib/components/tab/theme/TabGroup.base.theme.js +15 -15
- package/lib/components/tab/theme/TabGroup.carbon.theme.js +8 -8
- package/lib/components/table/Table.vue.js +192 -194
- package/lib/components/table/theme/Table.base.theme.js +3 -3
- package/lib/components/table/theme/Table.carbon.theme.js +7 -7
- package/lib/components/table/theme/TableHead.base.theme.js +1 -1
- package/lib/components/table/theme/TableHead.carbon.theme.js +1 -1
- package/lib/components/table/theme/TableHeader.base.theme.js +1 -1
- package/lib/components/table/theme/TableHeader.carbon.theme.js +2 -2
- package/lib/components/table/theme/TableRow.base.theme.js +3 -3
- package/lib/components/table/theme/TableRow.carbon.theme.js +3 -3
- package/lib/components/tag/Tag.vue.js +4 -4
- package/lib/components/textarea/Textarea.vue.d.ts +7 -0
- package/lib/components/textarea/Textarea.vue.js +23 -21
- package/lib/components/textarea/theme/Textarea.base.theme.js +6 -6
- package/lib/components/textarea/theme/Textarea.carbon.theme.js +6 -6
- package/lib/components/toggle/Toggle.vue.d.ts +3 -0
- package/lib/components/toggle/Toggle.vue.js +26 -26
- package/lib/components/toggle/theme/Toggle.base.theme.js +1 -1
- package/lib/components/tooltip/ToggleTip.vue.d.ts +14 -0
- package/lib/components/tooltip/ToggleTip.vue.js +29 -0
- package/lib/components/tooltip/ToggleTip.vue2.js +4 -0
- package/lib/components/tooltip/Tooltip.vue.d.ts +22 -3
- package/lib/components/tooltip/Tooltip.vue.js +26 -17
- package/lib/components/tooltip/__tests__/ToggleTip.spec.d.ts +1 -0
- package/lib/components/tooltip/index.d.ts +2 -0
- package/lib/composables/keys.d.ts +2 -2
- package/lib/composables/useColors.js +9 -9
- package/lib/composables/useInputtable.d.ts +1 -0
- package/lib/composables/useInputtable.js +20 -19
- package/lib/index.js +37 -35
- package/lib/index.umd.js +7 -3
- package/lib/tailwind.preset.js +0 -1
- package/lib/themes/base/index.js +3 -6
- package/lib/themes/base/styles.css.js +4 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -2
- package/src/components/accordion/Accordion.vue +5 -1
- package/src/components/accordion/AccordionItem.vue +5 -2
- package/src/components/accordion/index.ts +1 -1
- package/src/components/accordion/theme/Accordion.carbon.theme.ts +3 -5
- package/src/components/accordion/theme/AccordionItem.base.theme.ts +11 -8
- package/src/components/accordion/theme/AccordionItem.carbon.theme.ts +2 -30
- package/src/components/badge/Badge.vue +1 -1
- package/src/components/breadcrumbs/theme/Breadcrumbs.base.theme.ts +1 -1
- package/src/components/button/Button.vue +1 -1
- package/src/components/button/theme/Button.base.theme.ts +2 -2
- package/src/components/card/theme/Card.base.theme.ts +1 -1
- package/src/components/carousel/CarouselSlide.vue +9 -4
- package/src/components/checkbox/Checkbox.vue +1 -1
- package/src/components/checkbox/theme/Checkbox.base.theme.ts +9 -9
- package/src/components/checkbox/theme/Checkbox.carbon.theme.ts +2 -2
- package/src/components/container/Container.vue +4 -0
- package/src/components/container/theme/Container.base.theme.ts +7 -1
- package/src/components/divider/Divider.vue +1 -1
- package/src/components/divider/theme/Divider.base.theme.ts +2 -2
- package/src/components/drawer/Drawer.vue +2 -2
- package/src/components/drawer/theme/Drawer.base.theme.ts +1 -1
- package/src/components/form/Form.vue +1 -1
- package/src/components/form/theme/Form.base.theme.ts +2 -2
- package/src/components/form/theme/Form.carbon.theme.ts +1 -1
- package/src/components/formGroup/FormGroup.vue +1 -0
- package/src/components/formGroup/theme/FormGroup.base.theme.ts +1 -1
- package/src/components/icon/theme/Icon.base.theme.ts +2 -2
- package/src/components/input/Input.vue +2 -1
- package/src/components/input/theme/Input.base.theme.ts +5 -5
- package/src/components/input/theme/Input.carbon.theme.ts +6 -6
- package/src/components/inputFooter/theme/InputFooter.base.theme.ts +3 -3
- package/src/components/inputFooter/theme/InputFooter.carbon.theme.ts +2 -2
- package/src/components/label/Label.vue +4 -1
- package/src/components/label/theme/Label.base.theme.ts +2 -2
- package/src/components/label/theme/Label.carbon.theme.ts +1 -3
- package/src/components/link/Link.vue +1 -1
- package/src/components/loader/theme/Loader.base.theme.ts +1 -1
- package/src/components/loader/theme/Loader.carbon.theme.ts +1 -1
- package/src/components/menu/Menu.vue +4 -4
- package/src/components/menu/theme/MenuItem.base.theme.ts +30 -34
- package/src/components/modal/Modal.vue +11 -4
- package/src/components/modal/theme/Modal.base.theme.ts +9 -6
- package/src/components/modal/theme/Modal.carbon.theme.ts +3 -3
- package/src/components/notifications/Notifications.vue +1 -1
- package/src/components/notifications/theme/Notifications.base.theme.ts +1 -1
- package/src/components/notifications/theme/Notifications.carbon.theme.ts +1 -1
- package/src/components/pagination/Pagination.vue +3 -3
- package/src/components/popover/Popover.vue +77 -2
- package/src/components/popover/theme/PopoverContainer.base.theme.ts +1 -1
- package/src/components/popover/theme/PopoverContainer.carbon.theme.ts +1 -1
- package/src/components/progress/Progress.vue +1 -1
- package/src/components/progress/theme/Progress.base.theme.ts +2 -2
- package/src/components/radio/theme/Radio.base.theme.ts +9 -9
- package/src/components/radio/theme/Radio.carbon.theme.ts +1 -1
- package/src/components/select/Select.vue +7 -7
- package/src/components/select/theme/Select.base.theme.ts +8 -8
- package/src/components/select/theme/Select.carbon.theme.ts +8 -8
- package/src/components/skeleton/theme/Skeleton.base.theme.ts +1 -1
- package/src/components/slider/Slider.vue +1 -1
- package/src/components/slider/theme/Slider.carbon.theme.ts +1 -1
- package/src/components/stepper/Stepper.vue +3 -3
- package/src/components/tab/Tab.vue +3 -3
- package/src/components/tab/theme/TabGroup.base.theme.ts +4 -4
- package/src/components/tab/theme/TabGroup.carbon.theme.ts +3 -3
- package/src/components/table/Table.vue +2 -0
- package/src/components/table/theme/Table.base.theme.ts +1 -1
- package/src/components/table/theme/Table.carbon.theme.ts +2 -2
- package/src/components/table/theme/TableHead.base.theme.ts +1 -1
- package/src/components/table/theme/TableHead.carbon.theme.ts +1 -1
- package/src/components/table/theme/TableHeader.base.theme.ts +1 -1
- package/src/components/table/theme/TableHeader.carbon.theme.ts +2 -2
- package/src/components/table/theme/TableRow.base.theme.ts +3 -3
- package/src/components/table/theme/TableRow.carbon.theme.ts +3 -3
- package/src/components/tag/Tag.vue +1 -1
- package/src/components/textarea/Textarea.vue +3 -1
- package/src/components/textarea/theme/Textarea.base.theme.ts +5 -4
- package/src/components/textarea/theme/Textarea.carbon.theme.ts +5 -5
- package/src/components/toggle/Toggle.vue +3 -3
- package/src/components/toggle/theme/Toggle.base.theme.ts +1 -1
- package/src/components/tooltip/ToggleTip.vue +31 -0
- package/src/components/tooltip/Tooltip.vue +14 -4
- package/src/components/tooltip/__tests__/ToggleTip.spec.ts +11 -0
- package/src/components/tooltip/index.ts +3 -0
- package/src/composables/keys.ts +2 -2
- package/src/composables/useColors.ts +1 -1
- package/src/composables/useInputtable.ts +1 -0
- package/src/themes/base/index.ts +0 -3
- package/src/themes/base/styles.css +4 -0
- package/src/version.ts +1 -1
- package/volar.d.ts +1 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<h2 class="text-4xl font-semibold">Getting Started</h2>
|
|
3
|
+
<h1 class="text-lg my-2 text-gray-500 dark:text-gray-400">Tailwind CSS UI components for Vue.js 3 / Nuxt.js 3. Build and prototype fast web applications.</h1>
|
|
4
|
+
<x-divider class="mt-4 mb-8"/>
|
|
5
|
+
|
|
6
|
+
<h3 class="text-2xl mb-4">Quickstart a new Vue 3 or Nuxt 3 project</h3>
|
|
7
|
+
<p class="my-4">
|
|
8
|
+
This following command will install and execute <x-link
|
|
9
|
+
external
|
|
10
|
+
href="https://github.com/indielayer/ui/tree/main/packages/create-ui"
|
|
11
|
+
target="_blank"
|
|
12
|
+
shadow
|
|
13
|
+
color="primary"
|
|
14
|
+
>@indielayer/create-ui</x-link>, the official Indielayer UI project scaffolding tool. You will be presented with prompts for a number of optional features such as TypeScript.
|
|
15
|
+
</p>
|
|
16
|
+
<code-snippet :code="`npm init @indielayer/ui`" lang="bash"/>
|
|
17
|
+
<pre class="bg-slate-600 text-slate-50 text-xs mt-4 px-4 py-2 rounded-md">? Project type: › - Use arrow-keys. Return to submit.
|
|
18
|
+
❯ Vue 3
|
|
19
|
+
Nuxt 3</pre>
|
|
20
|
+
|
|
21
|
+
<h3 class="text-2xl mt-16 mb-4 text-gray-500">Manual guide</h3>
|
|
22
|
+
<h3 class="text-2xl mb-4">1. Install via package manager</h3>
|
|
23
|
+
<multi-snippet
|
|
24
|
+
:snippets="[{
|
|
25
|
+
label: 'npm',
|
|
26
|
+
lang: 'bash',
|
|
27
|
+
code: 'npm install @indielayer/ui'
|
|
28
|
+
}, {
|
|
29
|
+
label: 'yarn',
|
|
30
|
+
lang: 'bash',
|
|
31
|
+
code: 'yarn add @indielayer/ui'
|
|
32
|
+
}, {
|
|
33
|
+
label: 'pnpm',
|
|
34
|
+
lang: 'bash',
|
|
35
|
+
code: 'pnpm add @indielayer/ui'
|
|
36
|
+
}]"
|
|
37
|
+
/>
|
|
38
|
+
|
|
39
|
+
<h3 class="text-2xl mt-8 mb-4">2. Setup TailwindCSS</h3>
|
|
40
|
+
<p>If you do not have Tailwind CSS 3 installed in your project, please see the <x-link href="https://tailwindcss.com/docs/guides/vite" external shadow color="primary">Tailwind 3 Vite install guide here</x-link> before proceeding.</p>
|
|
41
|
+
<p class="my-4">
|
|
42
|
+
Add Indielayer Tailwind CSS preset <b>tailwind.preset.js</b> to your Tailwind CSS configuration file tailwind.config.js and <b>purge css configurations.</b>
|
|
43
|
+
</p>
|
|
44
|
+
<code-snippet
|
|
45
|
+
lang="js"
|
|
46
|
+
:code="`// tailwind.config.js
|
|
47
|
+
const colors = require('tailwindcss/colors')
|
|
48
|
+
const indielayer = require('@indielayer/ui/tailwind.preset')
|
|
49
|
+
|
|
50
|
+
module.exports = {
|
|
51
|
+
darkMode: 'class',
|
|
52
|
+
// load indielayer ui presets
|
|
53
|
+
presets: [indielayer()],
|
|
54
|
+
// allow PurgeCSS to analyze components
|
|
55
|
+
content: [
|
|
56
|
+
'./index.html',
|
|
57
|
+
'./**/*.vue',
|
|
58
|
+
'./src/**/*.{vue,js,ts,jsx,tsx}',
|
|
59
|
+
'node_modules/@indielayer/ui/{lib,src}/**/*',
|
|
60
|
+
],
|
|
61
|
+
theme: {
|
|
62
|
+
extend: {
|
|
63
|
+
colors: {
|
|
64
|
+
primary: colors.emerald,
|
|
65
|
+
secondary: colors.slate,
|
|
66
|
+
success: colors.green,
|
|
67
|
+
warning: colors.yellow,
|
|
68
|
+
error: colors.red,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
plugins: [],
|
|
73
|
+
}`"
|
|
74
|
+
/>
|
|
75
|
+
<h3 class="text-2xl mt-8 mb-4">3. Load the UI in your project</h3>
|
|
76
|
+
<h4 class="text-xl mt-8 mb-4">Load on a Vue 3 project</h4>
|
|
77
|
+
<code-snippet
|
|
78
|
+
lang="js"
|
|
79
|
+
:code="`import { createApp } from 'vue'
|
|
80
|
+
import UI from '@indielayer/ui'
|
|
81
|
+
|
|
82
|
+
const app = createApp(App)
|
|
83
|
+
|
|
84
|
+
app.use(UI, {
|
|
85
|
+
prefix: 'X',
|
|
86
|
+
})`"
|
|
87
|
+
/>
|
|
88
|
+
<h4 class="text-xl mt-8 mb-4">Load on a Nuxt 3 project</h4>
|
|
89
|
+
<multi-snippet
|
|
90
|
+
class="my-4"
|
|
91
|
+
:snippets="[{
|
|
92
|
+
label: 'npm',
|
|
93
|
+
lang: 'bash',
|
|
94
|
+
code: 'npm install @indielayer/ui @vueuse/core floating-vue -D'
|
|
95
|
+
}, {
|
|
96
|
+
label: 'yarn',
|
|
97
|
+
lang: 'bash',
|
|
98
|
+
code: 'yarn add @indielayer/ui @vueuse/core floating-vue -D'
|
|
99
|
+
}, {
|
|
100
|
+
label: 'pnpm',
|
|
101
|
+
lang: 'bash',
|
|
102
|
+
code: 'pnpm add @indielayer/ui @vueuse/core floating-vue -D'
|
|
103
|
+
}]"
|
|
104
|
+
/>
|
|
105
|
+
<code-snippet
|
|
106
|
+
lang="js"
|
|
107
|
+
:code="`import { colors } from '@indielayer/ui'
|
|
108
|
+
|
|
109
|
+
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
110
|
+
export default defineNuxtConfig({
|
|
111
|
+
modules: [
|
|
112
|
+
['@indielayer/ui/nuxt', {
|
|
113
|
+
theme: {
|
|
114
|
+
colors: {
|
|
115
|
+
primary: colors.emerald,
|
|
116
|
+
secondary: colors.slate,
|
|
117
|
+
success: colors.green,
|
|
118
|
+
warning: colors.yellow,
|
|
119
|
+
error: colors.red,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
}],
|
|
123
|
+
],
|
|
124
|
+
css: ['~/assets/tailwind.css'],
|
|
125
|
+
/**
|
|
126
|
+
* @tailwind base;
|
|
127
|
+
* @tailwind components;
|
|
128
|
+
* @tailwind utilities;
|
|
129
|
+
*/
|
|
130
|
+
postcss: {
|
|
131
|
+
plugins: {
|
|
132
|
+
'tailwindcss/nesting': {},
|
|
133
|
+
tailwindcss: {},
|
|
134
|
+
autoprefixer: {},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
})`"
|
|
138
|
+
/>
|
|
139
|
+
<h3 class="text-2xl mt-8 mb-4">4. (optional) Load only the components you want</h3>
|
|
140
|
+
<code-snippet
|
|
141
|
+
lang="js"
|
|
142
|
+
:code="`import { createApp } from 'vue'
|
|
143
|
+
import { createUI, XButton, XAlert } from '@indielayer/ui'
|
|
144
|
+
|
|
145
|
+
const app = createApp(App)
|
|
146
|
+
|
|
147
|
+
const UI = createUI({
|
|
148
|
+
components: [XButton, XAlert],
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
app.use(UI)`"
|
|
152
|
+
/>
|
|
153
|
+
</template>
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const textClasses = {
|
|
3
|
+
'text-xs': {
|
|
4
|
+
size: '0.75rem',
|
|
5
|
+
line: '1rem',
|
|
6
|
+
},
|
|
7
|
+
'text-sm': {
|
|
8
|
+
size: '0.875rem',
|
|
9
|
+
line: '1.25rem',
|
|
10
|
+
},
|
|
11
|
+
'text-base': {
|
|
12
|
+
size: '1rem',
|
|
13
|
+
line: '1.5rem',
|
|
14
|
+
},
|
|
15
|
+
'text-lg': {
|
|
16
|
+
size: '1.125rem',
|
|
17
|
+
line: '1.75rem',
|
|
18
|
+
},
|
|
19
|
+
'text-xl': {
|
|
20
|
+
size: '1.25rem',
|
|
21
|
+
line: '1.75rem',
|
|
22
|
+
},
|
|
23
|
+
'text-2xl': {
|
|
24
|
+
size: '1.5rem',
|
|
25
|
+
line: '2rem',
|
|
26
|
+
},
|
|
27
|
+
'text-3xl': {
|
|
28
|
+
size: '1.875rem',
|
|
29
|
+
line: '2.25rem',
|
|
30
|
+
},
|
|
31
|
+
'text-4xl': {
|
|
32
|
+
size: '2.25rem',
|
|
33
|
+
line: '2.5rem',
|
|
34
|
+
},
|
|
35
|
+
'text-5xl': {
|
|
36
|
+
size: '3rem',
|
|
37
|
+
line: 'auto',
|
|
38
|
+
},
|
|
39
|
+
'text-6xl': {
|
|
40
|
+
size: '3.75rem',
|
|
41
|
+
line: 'auto',
|
|
42
|
+
},
|
|
43
|
+
'text-7xl': {
|
|
44
|
+
size: '4.5rem',
|
|
45
|
+
line: 'auto',
|
|
46
|
+
},
|
|
47
|
+
'text-8xl': {
|
|
48
|
+
size: '6rem',
|
|
49
|
+
line: 'auto',
|
|
50
|
+
},
|
|
51
|
+
'text-9xl': {
|
|
52
|
+
size: '8rem',
|
|
53
|
+
line: 'auto',
|
|
54
|
+
},
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
<template>
|
|
60
|
+
<h1 class="text-4xl font-semibold">Typography</h1>
|
|
61
|
+
<h2 class="text-lg my-2 text-gray-500 dark:text-gray-400">Big letters, small letters, fonts and stuff</h2>
|
|
62
|
+
|
|
63
|
+
<x-divider class="mt-4 mb-8"/>
|
|
64
|
+
|
|
65
|
+
<div>
|
|
66
|
+
<div>Main font</div>
|
|
67
|
+
<div class="text-gray-500 dark:text-gray-400">Inter</div>
|
|
68
|
+
<div class="text-6xl mt-4">AaBbCc</div>
|
|
69
|
+
</div>
|
|
70
|
+
|
|
71
|
+
<div class="mt-10">
|
|
72
|
+
<table class="text-left w-full">
|
|
73
|
+
<tr>
|
|
74
|
+
<th class="py-2">Class</th>
|
|
75
|
+
<th>Size</th>
|
|
76
|
+
<th>Line Height</th>
|
|
77
|
+
<th>Preview</th>
|
|
78
|
+
</tr>
|
|
79
|
+
<tr v-for="(c, key) in textClasses" :key="key" class="border-t">
|
|
80
|
+
<td class="py-2">{{ key }}</td>
|
|
81
|
+
<td class="text-secondary-500 font-light">{{ c.size }}</td>
|
|
82
|
+
<td class="text-secondary-500 font-light">{{ c.line }}</td>
|
|
83
|
+
<td :class="key" class="max-w-lg truncate">Preview text</td>
|
|
84
|
+
</tr>
|
|
85
|
+
</table>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div class="text-secondary-500 mt-4">
|
|
89
|
+
See more about Tailwind typography classes here -> <x-link href="https://tailwindcss.com/docs/font-size" target="_blank" underline>Tailwind Documentation</x-link>
|
|
90
|
+
</div>
|
|
91
|
+
</template>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
|
|
2
|
+
|
|
3
|
+
// layouts
|
|
4
|
+
import DefaultLayout from '../layouts/default.vue'
|
|
5
|
+
import SimpleLayout from '../layouts/simple.vue'
|
|
6
|
+
|
|
7
|
+
// help
|
|
8
|
+
import HomePage from '../pages/index.vue'
|
|
9
|
+
import IconsPage from '../pages/icons.vue'
|
|
10
|
+
import PlayPage from '../pages/play.vue'
|
|
11
|
+
import TypographyPage from '../pages/typography.vue'
|
|
12
|
+
import ColorsPage from '../pages/colors.vue'
|
|
13
|
+
|
|
14
|
+
const pages: Record<string, any> = import.meta.glob('../pages/component/*/index.vue', { eager: true })
|
|
15
|
+
|
|
16
|
+
const componentPages: RouteRecordRaw[] = []
|
|
17
|
+
|
|
18
|
+
Object.keys(pages).forEach((path) => {
|
|
19
|
+
const match = path.match(/\/pages\/component\/(.*)\/index\.vue$/)
|
|
20
|
+
|
|
21
|
+
if (match) {
|
|
22
|
+
const name = match[1].toLowerCase()
|
|
23
|
+
|
|
24
|
+
componentPages.push({
|
|
25
|
+
path: name,
|
|
26
|
+
component: pages[path].default,
|
|
27
|
+
})
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
const routes: RouteRecordRaw[] = [{
|
|
32
|
+
path: '/',
|
|
33
|
+
component: DefaultLayout,
|
|
34
|
+
children: [{
|
|
35
|
+
path: '',
|
|
36
|
+
redirect: { name: 'getting-started' },
|
|
37
|
+
}, {
|
|
38
|
+
path: 'getting-started',
|
|
39
|
+
name: 'getting-started',
|
|
40
|
+
component: HomePage,
|
|
41
|
+
}, {
|
|
42
|
+
path: 'icons',
|
|
43
|
+
name: 'icons',
|
|
44
|
+
component: IconsPage,
|
|
45
|
+
}, {
|
|
46
|
+
path: 'typography',
|
|
47
|
+
name: 'typography',
|
|
48
|
+
component: TypographyPage,
|
|
49
|
+
}, {
|
|
50
|
+
path: 'colors',
|
|
51
|
+
name: 'colors',
|
|
52
|
+
component: ColorsPage,
|
|
53
|
+
}, {
|
|
54
|
+
path: 'component',
|
|
55
|
+
component: SimpleLayout,
|
|
56
|
+
children: componentPages,
|
|
57
|
+
}],
|
|
58
|
+
}, {
|
|
59
|
+
path: '/play',
|
|
60
|
+
component: PlayPage,
|
|
61
|
+
}, {
|
|
62
|
+
path: '/:pathMatch(.*)*', name: 'NotFound', redirect: { name: 'getting-started' },
|
|
63
|
+
}]
|
|
64
|
+
|
|
65
|
+
const router = createRouter({
|
|
66
|
+
history: createWebHistory('/'),
|
|
67
|
+
routes,
|
|
68
|
+
scrollBehavior(to, from, savedPosition) {
|
|
69
|
+
if (savedPosition) {
|
|
70
|
+
return savedPosition
|
|
71
|
+
} else {
|
|
72
|
+
return { top: 0 }
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
export default router
|
|
@@ -28,7 +28,6 @@ module.exports = () => ({
|
|
|
28
28
|
secondary: getColorVarPallete('secondary'),
|
|
29
29
|
success: getColorVarPallete('success'),
|
|
30
30
|
warning: getColorVarPallete('warning'),
|
|
31
|
-
danger: getColorVarPallete('error'),
|
|
32
31
|
error: getColorVarPallete('error'),
|
|
33
32
|
},
|
|
34
33
|
borderColor: getColorVar('border'),
|
|
@@ -15,6 +15,9 @@ declare const accordionProps: {
|
|
|
15
15
|
iconAlign: PropType<"left" | "right">;
|
|
16
16
|
};
|
|
17
17
|
export type AccordionProps = ExtractPublicPropTypes<typeof accordionProps>;
|
|
18
|
+
export type AccordionInjection = AccordionProps & {
|
|
19
|
+
isInsideAccordion: boolean;
|
|
20
|
+
};
|
|
18
21
|
type InternalClasses = 'wrapper';
|
|
19
22
|
export interface AccordionTheme extends ThemeComponent<AccordionProps, InternalClasses> {
|
|
20
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTheme as
|
|
1
|
+
import { defineComponent as a, provide as i, openBlock as l, createElementBlock as d, normalizeStyle as p, unref as e, normalizeClass as m, renderSlot as u } from "vue";
|
|
2
|
+
import { useTheme as f } from "../../composables/useTheme.js";
|
|
3
3
|
import { injectAccordionKey as _ } from "../../composables/keys.js";
|
|
4
4
|
const y = {
|
|
5
5
|
tag: {
|
|
@@ -17,21 +17,21 @@ const y = {
|
|
|
17
17
|
}, g = {
|
|
18
18
|
name: "XAccordion",
|
|
19
19
|
validators: {}
|
|
20
|
-
}, h = /* @__PURE__ */
|
|
20
|
+
}, h = /* @__PURE__ */ a({
|
|
21
21
|
...g,
|
|
22
22
|
props: y,
|
|
23
23
|
setup(n) {
|
|
24
24
|
const o = n;
|
|
25
|
-
|
|
26
|
-
const { styles: t, classes: r, className: s } =
|
|
27
|
-
return (
|
|
25
|
+
i(_, { ...o, isInsideAccordion: !0 });
|
|
26
|
+
const { styles: t, classes: r, className: s } = f("Accordion", {}, o);
|
|
27
|
+
return (c, A) => (l(), d("div", {
|
|
28
28
|
style: p(e(t)),
|
|
29
29
|
class: m([
|
|
30
30
|
e(s),
|
|
31
31
|
e(r).wrapper
|
|
32
32
|
])
|
|
33
33
|
}, [
|
|
34
|
-
|
|
34
|
+
u(c.$slots, "default")
|
|
35
35
|
], 6));
|
|
36
36
|
}
|
|
37
37
|
});
|
|
@@ -23,6 +23,7 @@ export type AccordionItemProps = ExtractPublicPropTypes<typeof accordionItemProp
|
|
|
23
23
|
type InternalClasses = 'wrapper' | 'icon' | 'content';
|
|
24
24
|
type InternalData = {
|
|
25
25
|
collapsed: boolean;
|
|
26
|
+
isInsideAccordion: boolean;
|
|
26
27
|
};
|
|
27
28
|
export interface AccordionItemTheme extends ThemeComponent<AccordionItemProps, InternalClasses, InternalData> {
|
|
28
29
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as V, inject as j, computed as z, reactive as D, ref as
|
|
1
|
+
import { defineComponent as V, inject as j, computed as z, reactive as D, ref as m, watch as H, openBlock as a, createBlock as v, resolveDynamicComponent as K, normalizeStyle as M, unref as s, normalizeClass as l, withCtx as h, createElementVNode as r, renderSlot as d, createElementBlock as g, createCommentVNode as y, createVNode as X, Transition as q, withDirectives as F, vShow as G } from "vue";
|
|
2
2
|
import { useTheme as J } from "../../composables/useTheme.js";
|
|
3
3
|
import O from "../icon/Icon.vue.js";
|
|
4
4
|
import { injectAccordionKey as Q } from "../../composables/keys.js";
|
|
@@ -27,103 +27,105 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
|
|
|
27
27
|
type: String,
|
|
28
28
|
default: "right"
|
|
29
29
|
}
|
|
30
|
-
},
|
|
30
|
+
}, oe = {
|
|
31
31
|
name: "XAccordionItem",
|
|
32
32
|
validators: {
|
|
33
33
|
iconAlign: Z
|
|
34
34
|
}
|
|
35
|
-
},
|
|
36
|
-
...
|
|
35
|
+
}, ae = /* @__PURE__ */ V({
|
|
36
|
+
...oe,
|
|
37
37
|
props: ee,
|
|
38
38
|
emits: ["expand"],
|
|
39
|
-
setup(
|
|
40
|
-
const n =
|
|
39
|
+
setup(A, { expose: x, emit: _ }) {
|
|
40
|
+
const n = A, k = _, u = j(Q, {
|
|
41
|
+
isInsideAccordion: !1
|
|
42
|
+
}), w = z(() => u.iconAlign || n.iconAlign), I = D({
|
|
41
43
|
iconAlign: w
|
|
42
|
-
}),
|
|
44
|
+
}), o = m(!n.expanded), t = m(!0);
|
|
43
45
|
H(() => n.expanded, () => {
|
|
44
|
-
|
|
46
|
+
o.value = !n.expanded;
|
|
45
47
|
});
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
+
function B(e) {
|
|
49
|
+
t.value && (e.style.height = "0px");
|
|
48
50
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
+
function E(e, i) {
|
|
52
|
+
t.value ? (e.addEventListener("transitionend", i), setTimeout(() => {
|
|
51
53
|
e.style.height = `${e.scrollHeight}px`;
|
|
52
54
|
}, 1)) : i();
|
|
53
55
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
+
function C(e) {
|
|
57
|
+
t.value ? e.style.removeProperty("height") : t.value = !0;
|
|
56
58
|
}
|
|
57
59
|
function $(e) {
|
|
58
|
-
|
|
60
|
+
t.value && (e.style.height = `${e.scrollHeight}px`);
|
|
59
61
|
}
|
|
60
62
|
function b(e, i) {
|
|
61
|
-
|
|
63
|
+
t.value ? (e.addEventListener("transitionend", i), setTimeout(() => {
|
|
62
64
|
e.style.height = "0px";
|
|
63
65
|
}, 1)) : i();
|
|
64
66
|
}
|
|
65
67
|
function S(e) {
|
|
66
|
-
|
|
68
|
+
t.value ? e.style.removeProperty("height") : t.value = !0;
|
|
67
69
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
+
function p(e = !0) {
|
|
71
|
+
t.value = e, o.value = !1;
|
|
70
72
|
}
|
|
71
73
|
function L(e = !0) {
|
|
72
|
-
|
|
74
|
+
t.value = e, o.value = !0;
|
|
73
75
|
}
|
|
74
|
-
function
|
|
75
|
-
n.disabled || (
|
|
76
|
+
function f() {
|
|
77
|
+
n.disabled || (o.value = !o.value);
|
|
76
78
|
}
|
|
77
79
|
function P(e = !0) {
|
|
78
|
-
|
|
80
|
+
p(e), k("expand");
|
|
79
81
|
}
|
|
80
82
|
const { styles: N, classes: c, className: T } = J("AccordionItem", {}, {
|
|
81
83
|
...n,
|
|
82
|
-
...
|
|
83
|
-
}, { collapsed:
|
|
84
|
-
return
|
|
85
|
-
style: M(
|
|
86
|
-
class: l(
|
|
84
|
+
...I
|
|
85
|
+
}, { collapsed: o, isInsideAccordion: u.isInsideAccordion });
|
|
86
|
+
return x({ toggle: f, open: p, close: L }), (e, i) => (a(), v(K(e.tag), {
|
|
87
|
+
style: M(s(N)),
|
|
88
|
+
class: l(s(T)),
|
|
87
89
|
"aria-disabled": e.disabled,
|
|
88
|
-
"aria-expanded":
|
|
90
|
+
"aria-expanded": o.value ? "false" : "true"
|
|
89
91
|
}, {
|
|
90
|
-
default:
|
|
92
|
+
default: h(() => [
|
|
91
93
|
r("button", {
|
|
92
|
-
class: l(
|
|
93
|
-
onClick:
|
|
94
|
+
class: l(s(c).wrapper),
|
|
95
|
+
onClick: f
|
|
94
96
|
}, [
|
|
95
97
|
r("div", R, [
|
|
96
|
-
d(e.$slots, "default", { collapsed:
|
|
98
|
+
d(e.$slots, "default", { collapsed: o.value })
|
|
97
99
|
]),
|
|
98
|
-
e.showIcon ? (
|
|
100
|
+
e.showIcon ? (a(), g("div", {
|
|
99
101
|
key: 0,
|
|
100
|
-
class: l(
|
|
102
|
+
class: l(s(c).icon)
|
|
101
103
|
}, [
|
|
102
|
-
e.icon ? (
|
|
104
|
+
e.icon ? (a(), v(O, {
|
|
103
105
|
key: 0,
|
|
104
106
|
icon: e.icon
|
|
105
|
-
}, null, 8, ["icon"])) : (
|
|
106
|
-
], 2)) :
|
|
107
|
+
}, null, 8, ["icon"])) : (a(), g("svg", U, Y))
|
|
108
|
+
], 2)) : y("", !0)
|
|
107
109
|
], 2),
|
|
108
|
-
e.$slots.summary ? d(e.$slots, "summary", { key: 0 }) :
|
|
110
|
+
e.$slots.summary ? d(e.$slots, "summary", { key: 0 }) : y("", !0),
|
|
109
111
|
X(q, {
|
|
110
|
-
onBeforeEnter:
|
|
111
|
-
onEnter:
|
|
112
|
-
onAfterEnter:
|
|
112
|
+
onBeforeEnter: B,
|
|
113
|
+
onEnter: E,
|
|
114
|
+
onAfterEnter: C,
|
|
113
115
|
onBeforeLeave: $,
|
|
114
116
|
onLeave: b,
|
|
115
117
|
onAfterLeave: S
|
|
116
118
|
}, {
|
|
117
|
-
default:
|
|
119
|
+
default: h(() => [
|
|
118
120
|
F(r("div", {
|
|
119
|
-
class: l(
|
|
121
|
+
class: l(s(c).content)
|
|
120
122
|
}, [
|
|
121
123
|
d(e.$slots, "content", {
|
|
122
124
|
expand: P,
|
|
123
|
-
collapsed:
|
|
125
|
+
collapsed: o.value
|
|
124
126
|
})
|
|
125
127
|
], 2), [
|
|
126
|
-
[G, !
|
|
128
|
+
[G, !o.value]
|
|
127
129
|
])
|
|
128
130
|
]),
|
|
129
131
|
_: 3
|
|
@@ -134,5 +136,5 @@ const R = { class: "flex-1 overflow-hidden" }, U = {
|
|
|
134
136
|
}
|
|
135
137
|
});
|
|
136
138
|
export {
|
|
137
|
-
|
|
139
|
+
ae as default
|
|
138
140
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as XAccordion } from './Accordion.vue';
|
|
2
|
-
export type { AccordionProps, AccordionTheme } from './Accordion.vue';
|
|
2
|
+
export type { AccordionProps, AccordionInjection, AccordionTheme } from './Accordion.vue';
|
|
3
3
|
export { default as XAccordionItem } from './AccordionItem.vue';
|
|
4
4
|
export type { AccordionItemProps, AccordionItemTheme } from './AccordionItem.vue';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r = {
|
|
2
2
|
classes: {
|
|
3
|
-
wrapper: ({ props: t, slots:
|
|
4
|
-
const
|
|
5
|
-
return
|
|
3
|
+
wrapper: ({ props: t, slots: i, data: e }) => {
|
|
4
|
+
const s = ["relative flex items-center w-full text-left"];
|
|
5
|
+
return e.isInsideAccordion && (i.default && (t.iconAlign === "left" ? s.push("pl-8 pr-4") : s.push("pr-8 pl-4"), s.push("py-2"), t.disabled || s.push("hover:bg-secondary-50 dark:hover:bg-secondary-600")), t.disabled || s.push("cursor-pointer")), s;
|
|
6
6
|
},
|
|
7
|
-
icon: ({ props: t, data:
|
|
8
|
-
const e = ["flex transform transition-transform duration-150"];
|
|
9
|
-
return
|
|
7
|
+
icon: ({ props: t, data: i }) => {
|
|
8
|
+
const e = ["absolute flex transform transition-transform duration-150"];
|
|
9
|
+
return i.collapsed || e.push("rotate-180"), t.disabled && e.push("text-secondary-300"), t.iconAlign === "left" ? e.push("left-2") : e.push("right-2"), e;
|
|
10
10
|
},
|
|
11
11
|
content: "transition-[height] duration-150 overflow-y-hidden"
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, n = r;
|
|
14
14
|
export {
|
|
15
|
-
|
|
15
|
+
n as default
|
|
16
16
|
};
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
wrapper: ({ props: t, slots: r }) => {
|
|
4
|
-
const e = ["relative flex items-center w-full text-left"];
|
|
5
|
-
return r.default && (e.push("px-4 py-2"), t.disabled || e.push("hover:bg-gray-50 dark:hover:bg-gray-800")), t.iconAlign === "left" && e.push("flex-row-reverse"), t.disabled || e.push("cursor-pointer"), e;
|
|
6
|
-
},
|
|
7
|
-
icon: ({ props: t, data: r }) => {
|
|
8
|
-
const e = ["flex transform transition-transform duration-150"];
|
|
9
|
-
return r.collapsed || e.push("rotate-180"), t.disabled && e.push("text-gray-300"), t.iconAlign === "left" && e.push("mr-4"), e;
|
|
10
|
-
},
|
|
11
|
-
content: "px-4 pt-2 pb-6 transition-[height] duration-150 overflow-y-hidden"
|
|
12
|
-
}
|
|
13
|
-
}, i = s;
|
|
1
|
+
import e from "./AccordionItem.base.theme.js";
|
|
2
|
+
const t = e, o = t;
|
|
14
3
|
export {
|
|
15
|
-
|
|
4
|
+
o as default
|
|
16
5
|
};
|