@indielayer/ui 1.4.0 → 1.5.1
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/components/common/CodePreview.vue +1 -1
- package/docs/components/common/CodeSnippet.vue +5 -7
- package/docs/components/common/DocumentPage.vue +89 -93
- package/docs/components/menu/DocsMenu.vue +75 -122
- package/docs/components/toolbar/PreToolbar.vue +10 -12
- package/docs/components/toolbar/Toolbar.vue +21 -8
- package/docs/layouts/default.vue +7 -3
- package/docs/pages/colors.vue +49 -54
- package/docs/pages/component/button/button-group.vue +6 -2
- package/docs/pages/component/button/size.vue +1 -1
- package/docs/pages/component/carousel/usage.vue +2 -2
- package/docs/pages/component/form/usage.vue +3 -3
- package/docs/pages/component/formGroup/usage.vue +1 -0
- package/docs/pages/component/input/usage.vue +8 -9
- package/docs/pages/component/modal/composed.vue +10 -2
- package/docs/pages/component/modal/usage.vue +11 -6
- package/docs/pages/component/popover/usage.vue +3 -3
- package/docs/pages/component/select/usage.vue +1 -0
- package/docs/pages/component/tabs/usage.vue +6 -1
- package/docs/pages/component/textarea/usage.vue +10 -13
- package/docs/pages/component/toggle/usage.vue +9 -11
- package/docs/pages/component/tooltip/index.vue +2 -2
- package/docs/pages/component/tooltip/usage.vue +4 -8
- package/docs/pages/icons.vue +54 -58
- package/docs/pages/index.vue +73 -77
- package/docs/pages/play.vue +2 -14
- package/docs/pages/typography.vue +26 -30
- package/docs/router/index.ts +2 -0
- package/exports/tailwind.preset.js +0 -1
- package/lib/components/accordion/theme/AccordionItem.base.theme.js +7 -7
- 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/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 +6 -6
- package/lib/components/checkbox/theme/Checkbox.carbon.theme.js +2 -2
- package/lib/components/container/theme/Container.base.theme.js +2 -2
- 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 +4 -4
- 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 +1 -1
- 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 +19 -19
- package/lib/components/menu/theme/MenuItem.base.theme.js +21 -31
- package/lib/components/modal/Modal.vue.d.ts +4 -0
- 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 +28 -28
- 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 +95 -92
- 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 +6 -6
- 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/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 +2 -1
- package/src/components/accordion/theme/AccordionItem.base.theme.ts +2 -2
- 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/checkbox/Checkbox.vue +1 -1
- package/src/components/checkbox/theme/Checkbox.base.theme.ts +8 -8
- package/src/components/checkbox/theme/Checkbox.carbon.theme.ts +2 -2
- package/src/components/container/theme/Container.base.theme.ts +2 -2
- 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 +1 -1
- 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 +1 -1
- package/src/components/label/theme/Label.carbon.theme.ts +1 -1
- 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 +3 -3
- 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 +8 -8
- package/src/components/radio/theme/Radio.carbon.theme.ts +1 -1
- package/src/components/select/Select.vue +7 -4
- 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/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
package/docs/pages/index.vue
CHANGED
|
@@ -1,51 +1,49 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<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>
|
|
6
|
-
<x-divider class="mt-4 mb-8"/>
|
|
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"/>
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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.
|
|
20
18
|
❯ Vue 3
|
|
21
19
|
Nuxt 3</pre>
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
+
/>
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
|
49
47
|
const colors = require('tailwindcss/colors')
|
|
50
48
|
const indielayer = require('@indielayer/ui/tailwind.preset')
|
|
51
49
|
|
|
@@ -73,12 +71,12 @@ module.exports = {
|
|
|
73
71
|
},
|
|
74
72
|
plugins: [],
|
|
75
73
|
}`"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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'
|
|
82
80
|
import UI from '@indielayer/ui'
|
|
83
81
|
|
|
84
82
|
const app = createApp(App)
|
|
@@ -86,27 +84,27 @@ const app = createApp(App)
|
|
|
86
84
|
app.use(UI, {
|
|
87
85
|
prefix: 'X',
|
|
88
86
|
})`"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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'
|
|
110
108
|
|
|
111
109
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
112
110
|
export default defineNuxtConfig({
|
|
@@ -137,11 +135,11 @@ export default defineNuxtConfig({
|
|
|
137
135
|
},
|
|
138
136
|
},
|
|
139
137
|
})`"
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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'
|
|
145
143
|
import { createUI, XButton, XAlert } from '@indielayer/ui'
|
|
146
144
|
|
|
147
145
|
const app = createApp(App)
|
|
@@ -151,7 +149,5 @@ const UI = createUI({
|
|
|
151
149
|
})
|
|
152
150
|
|
|
153
151
|
app.use(UI)`"
|
|
154
|
-
|
|
155
|
-
</section>
|
|
156
|
-
</div>
|
|
152
|
+
/>
|
|
157
153
|
</template>
|
package/docs/pages/play.vue
CHANGED
|
@@ -57,39 +57,35 @@ const textClasses = {
|
|
|
57
57
|
</script>
|
|
58
58
|
|
|
59
59
|
<template>
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
<h1 class="text-4xl font-semibold">Typography</h1>
|
|
63
|
-
<h2 class="text-lg my-2 text-gray-500 dark:text-gray-400">Big letters, small letters, fonts and stuff</h2>
|
|
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>
|
|
64
62
|
|
|
65
|
-
|
|
63
|
+
<x-divider class="mt-4 mb-8"/>
|
|
66
64
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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>
|
|
72
70
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
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>
|
|
89
87
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</div>
|
|
93
|
-
</section>
|
|
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>
|
|
94
90
|
</div>
|
|
95
91
|
</template>
|
package/docs/router/index.ts
CHANGED
|
@@ -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'),
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
const r = {
|
|
2
2
|
classes: {
|
|
3
|
-
wrapper: ({ props:
|
|
4
|
-
const
|
|
5
|
-
return e.isInsideAccordion && (i.default && (
|
|
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:
|
|
7
|
+
icon: ({ props: t, data: i }) => {
|
|
8
8
|
const e = ["absolute flex transform transition-transform duration-150"];
|
|
9
|
-
return i.collapsed || e.push("rotate-180"),
|
|
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,12 +1,12 @@
|
|
|
1
1
|
import { defineComponent as v, useSlots as z, computed as l, openBlock as o, createBlock as S, resolveDynamicComponent as B, normalizeStyle as n, unref as s, normalizeClass as i, withCtx as w, createElementVNode as r, renderSlot as a, createElementBlock as p, createCommentVNode as f } from "vue";
|
|
2
2
|
import { useTheme as C } from "../../composables/useTheme.js";
|
|
3
|
-
import { useCommon as
|
|
3
|
+
import { useCommon as d } from "../../composables/useCommon.js";
|
|
4
4
|
import { useColors as k } from "../../composables/useColors.js";
|
|
5
5
|
const N = { class: "relative inline-block" }, X = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "animate-ping opacity-75 absolute top-0 left-0 rounded-full h-full w-full z-10 bg-[color:var(--x-badge-bg)]"
|
|
8
8
|
}, x = ["left", "right"], Y = ["top", "bottom"], $ = {
|
|
9
|
-
...
|
|
9
|
+
...d.props(),
|
|
10
10
|
...k.props("primary"),
|
|
11
11
|
tag: {
|
|
12
12
|
type: String,
|
|
@@ -32,17 +32,17 @@ const N = { class: "relative inline-block" }, X = {
|
|
|
32
32
|
}, E = {
|
|
33
33
|
name: "XBadge",
|
|
34
34
|
validators: {
|
|
35
|
-
...
|
|
35
|
+
...d.validators(),
|
|
36
36
|
position: Y,
|
|
37
37
|
align: x
|
|
38
38
|
}
|
|
39
39
|
}, D = /* @__PURE__ */ v({
|
|
40
40
|
...E,
|
|
41
41
|
props: $,
|
|
42
|
-
setup(
|
|
43
|
-
const t =
|
|
42
|
+
setup(m) {
|
|
43
|
+
const t = m, u = z(), g = l(() => {
|
|
44
44
|
const e = [];
|
|
45
|
-
return t.position === "top" && e.push("top-0"), t.position === "bottom" && e.push("bottom-0"), t.align === "left" && e.push("left-0"), t.align === "right" && e.push("right-0"),
|
|
45
|
+
return t.position === "top" && e.push("top-0"), t.position === "bottom" && e.push("bottom-0"), t.align === "left" && e.push("left-0"), t.align === "right" && e.push("right-0"), u.content ? e.push("-m-[7.5%]") : t.outlined ? e.push("-m-[5%]") : e.push("-m-[3.5%]"), e;
|
|
46
46
|
}), c = l(() => {
|
|
47
47
|
const e = {};
|
|
48
48
|
return t.offsetX && (e[t.align === "left" ? "marginLeft" : "marginRight"] = t.offsetX + "px"), t.offsetY && (e[t.position === "top" ? "marginTop" : "marginBottom"] = t.offsetY + "px"), e;
|
|
@@ -62,7 +62,7 @@ const N = { class: "relative inline-block" }, X = {
|
|
|
62
62
|
class: i(["absolute rounded-full z-10 bg-[color:var(--x-badge-bg)]", [
|
|
63
63
|
g.value,
|
|
64
64
|
{
|
|
65
|
-
"border-2 border-
|
|
65
|
+
"border-2 border-secondary-50 dark:border-secondary-900": e.outlined
|
|
66
66
|
}
|
|
67
67
|
]]),
|
|
68
68
|
style: n(c.value)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import o from "./Button.vue2.js";
|
|
2
2
|
import s from "./Button.vue3.js";
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const e = {
|
|
5
5
|
$style: s
|
|
6
|
-
}, m = /* @__PURE__ */ t(o, [["__cssModules",
|
|
6
|
+
}, m = /* @__PURE__ */ t(o, [["__cssModules", e], ["__scopeId", "data-v-b25d6b6e"]]);
|
|
7
7
|
export {
|
|
8
8
|
m as default
|
|
9
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as D, ref as I, inject as T, computed as l, useAttrs as V, unref as
|
|
1
|
+
import { defineComponent as D, ref as I, inject as T, computed as l, useAttrs as V, unref as t, openBlock as a, createBlock as r, resolveDynamicComponent as A, normalizeClass as u, normalizeStyle as E, withCtx as F, createCommentVNode as d, createElementVNode as m, renderSlot as K } from "vue";
|
|
2
2
|
import { useTheme as O } from "../../composables/useTheme.js";
|
|
3
3
|
import { useColors as X } from "../../composables/useColors.js";
|
|
4
4
|
import { useCommon as b } from "../../composables/useCommon.js";
|
|
@@ -34,42 +34,42 @@ const J = {
|
|
|
34
34
|
validators: {
|
|
35
35
|
...b.validators()
|
|
36
36
|
}
|
|
37
|
-
},
|
|
37
|
+
}, to = /* @__PURE__ */ D({
|
|
38
38
|
...M,
|
|
39
39
|
props: J,
|
|
40
40
|
setup(y, { expose: v }) {
|
|
41
|
-
const
|
|
41
|
+
const e = y, g = I(null), s = T(q, {
|
|
42
42
|
isButtonGroup: !1,
|
|
43
43
|
groupProps: {}
|
|
44
|
-
}), { isButtonGroup: B } = s, n = l(() => s.groupProps.size ||
|
|
45
|
-
size:
|
|
46
|
-
flat:
|
|
47
|
-
color:
|
|
48
|
-
ghost:
|
|
49
|
-
light:
|
|
50
|
-
outlined:
|
|
51
|
-
disabled:
|
|
52
|
-
loading:
|
|
53
|
-
block:
|
|
54
|
-
glow:
|
|
55
|
-
iconLeft:
|
|
56
|
-
iconRight:
|
|
57
|
-
rounded:
|
|
44
|
+
}), { isButtonGroup: B } = s, n = l(() => s.groupProps.size || e.size), z = l(() => s.groupProps.flat || e.flat), k = l(() => e.color || s.groupProps.color), P = l(() => e.ghost || s.groupProps.ghost), S = l(() => e.light || s.groupProps.light), w = l(() => e.outlined || s.groupProps.outlined), i = l(() => e.disabled || s.groupProps.disabled), p = l(() => e.icon || e.iconLeft), C = V(), R = l(() => C.href ? "a" : e.to ? "router-link" : e.tag), L = l(() => ({
|
|
45
|
+
size: t(n),
|
|
46
|
+
flat: t(z),
|
|
47
|
+
color: t(k),
|
|
48
|
+
ghost: t(P),
|
|
49
|
+
light: t(S),
|
|
50
|
+
outlined: t(w),
|
|
51
|
+
disabled: t(i),
|
|
52
|
+
loading: e.loading,
|
|
53
|
+
block: e.block,
|
|
54
|
+
glow: e.glow,
|
|
55
|
+
iconLeft: t(p),
|
|
56
|
+
iconRight: e.iconRight,
|
|
57
|
+
rounded: e.rounded
|
|
58
58
|
})), { className: G, classes: c, styles: $ } = O("Button", {}, L, {
|
|
59
59
|
isButtonGroup: B
|
|
60
|
-
}), { focus:
|
|
61
|
-
return v({ focus:
|
|
60
|
+
}), { focus: j, blur: N } = h(g);
|
|
61
|
+
return v({ focus: j, blur: N }), (o, Q) => (a(), r(A(R.value), {
|
|
62
62
|
ref_key: "elRef",
|
|
63
63
|
ref: g,
|
|
64
64
|
to: o.to,
|
|
65
65
|
class: u([
|
|
66
|
-
|
|
66
|
+
t(G),
|
|
67
67
|
o.$style.button,
|
|
68
68
|
o.glow && !i.value && !o.loading ? o.$style["button--glow"] : "",
|
|
69
|
-
|
|
69
|
+
t(c).wrapper,
|
|
70
70
|
{ "w-full": o.block }
|
|
71
71
|
]),
|
|
72
|
-
style: E(
|
|
72
|
+
style: E(t($)),
|
|
73
73
|
"aria-busy": o.loading ? "true" : null,
|
|
74
74
|
"aria-disabled": o.tag !== "button" && i.value ? "true" : null,
|
|
75
75
|
disabled: i.value || o.loading,
|
|
@@ -84,14 +84,14 @@ const J = {
|
|
|
84
84
|
status: o.loadingStatus
|
|
85
85
|
}, null, 8, ["size", "label", "status"])) : d("", !0),
|
|
86
86
|
m("div", {
|
|
87
|
-
class: u({ invisible: o.loading })
|
|
87
|
+
class: u(["inline-flex items-center justify-center", { invisible: o.loading }])
|
|
88
88
|
}, [
|
|
89
89
|
p.value ? (a(), r(f, {
|
|
90
90
|
key: 0,
|
|
91
91
|
size: n.value,
|
|
92
92
|
icon: p.value,
|
|
93
93
|
class: u([
|
|
94
|
-
|
|
94
|
+
t(c).iconLeft
|
|
95
95
|
])
|
|
96
96
|
}, null, 8, ["size", "icon", "class"])) : d("", !0),
|
|
97
97
|
m("span", null, [
|
|
@@ -103,7 +103,7 @@ const J = {
|
|
|
103
103
|
size: n.value,
|
|
104
104
|
icon: o.iconRight,
|
|
105
105
|
class: u([
|
|
106
|
-
|
|
106
|
+
t(c).iconRight,
|
|
107
107
|
{ invisible: o.loading }
|
|
108
108
|
])
|
|
109
109
|
}, null, 8, ["size", "icon", "class"])) : d("", !0)
|
|
@@ -113,5 +113,5 @@ const J = {
|
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
115
|
export {
|
|
116
|
-
|
|
116
|
+
to as default
|
|
117
117
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const r = {
|
|
2
2
|
classes: {
|
|
3
3
|
wrapper({ props: e, slots: n, data: i }) {
|
|
4
4
|
const d = ["relative transition duration-150 focus:outline-none inline-flex items-center justify-center font-medium whitespace-nowrap overflow-hidden align-middle active:!shadow-none border appearance-none"];
|
|
@@ -8,8 +8,8 @@ const g = {
|
|
|
8
8
|
iconRight: ({ slots: e }) => e.default ? "ml-2" : "m-0.5"
|
|
9
9
|
},
|
|
10
10
|
styles({ props: e, colors: n, css: i, data: d }) {
|
|
11
|
-
const a = n.getPalette("gray"), t = e.color ? n.getPalette(e.color) : a, l = [],
|
|
12
|
-
return e.glow && l.push(i.get("glow", n.getColorOpacity(e.color ? t[500] : a[500], 0.5))),
|
|
11
|
+
const a = n.getPalette("gray"), t = e.color ? n.getPalette(e.color) : a, l = [], b = e.color && e.light, g = !e.color && !e.ghost;
|
|
12
|
+
return e.glow && l.push(i.get("glow", n.getColorOpacity(e.color ? t[500] : a[500], 0.5))), g ? e.disabled ? l.push(i.variables({
|
|
13
13
|
bg: a[50],
|
|
14
14
|
text: a[300],
|
|
15
15
|
border: a[200],
|
|
@@ -31,7 +31,7 @@ const g = {
|
|
|
31
31
|
hover: { bg: e.loading ? "" : a[700], border: a[600] },
|
|
32
32
|
active: { bg: e.loading ? "" : a[600], border: a[500] }
|
|
33
33
|
}
|
|
34
|
-
})) :
|
|
34
|
+
})) : b ? ((!e.outlined || e.disabled) && l.push(i.get("border", "transparent")), e.disabled ? l.push(i.variables({
|
|
35
35
|
bg: t[50],
|
|
36
36
|
text: t[200],
|
|
37
37
|
border: "transparent",
|
|
@@ -110,10 +110,10 @@ const g = {
|
|
|
110
110
|
}
|
|
111
111
|
}))) : (l.push(i.variables({
|
|
112
112
|
text: "#fff",
|
|
113
|
-
border:
|
|
113
|
+
border: t[600],
|
|
114
114
|
dark: {
|
|
115
115
|
text: "#fff",
|
|
116
|
-
border:
|
|
116
|
+
border: t[500]
|
|
117
117
|
}
|
|
118
118
|
})), e.disabled ? l.push(i.variables({
|
|
119
119
|
bg: t[100],
|
|
@@ -132,7 +132,7 @@ const g = {
|
|
|
132
132
|
}
|
|
133
133
|
}))), l;
|
|
134
134
|
}
|
|
135
|
-
}, u =
|
|
135
|
+
}, u = r;
|
|
136
136
|
export {
|
|
137
137
|
u as default
|
|
138
138
|
};
|
|
@@ -21,6 +21,7 @@ declare const checkboxProps: {
|
|
|
21
21
|
readonly type: ArrayConstructor;
|
|
22
22
|
readonly default: () => never[];
|
|
23
23
|
};
|
|
24
|
+
tooltip: StringConstructor;
|
|
24
25
|
disabled: BooleanConstructor;
|
|
25
26
|
loading: BooleanConstructor;
|
|
26
27
|
loadingLabel: StringConstructor;
|
|
@@ -68,6 +69,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
68
69
|
readonly type: ArrayConstructor;
|
|
69
70
|
readonly default: () => never[];
|
|
70
71
|
};
|
|
72
|
+
tooltip: StringConstructor;
|
|
71
73
|
disabled: BooleanConstructor;
|
|
72
74
|
loading: BooleanConstructor;
|
|
73
75
|
loadingLabel: StringConstructor;
|
|
@@ -112,6 +114,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
112
114
|
readonly type: ArrayConstructor;
|
|
113
115
|
readonly default: () => never[];
|
|
114
116
|
};
|
|
117
|
+
tooltip: StringConstructor;
|
|
115
118
|
disabled: BooleanConstructor;
|
|
116
119
|
loading: BooleanConstructor;
|
|
117
120
|
loadingLabel: StringConstructor;
|