@indielayer/ui 1.4.0 → 1.5.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/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 +3 -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/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 +78 -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/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 +8 -3
- 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,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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as P, ref as w, watch as m, unref as
|
|
1
|
+
import { defineComponent as P, ref as w, watch as m, unref as a, openBlock as i, createElementBlock as p, normalizeStyle as R, normalizeClass as u, createElementVNode as d, withKeys as T, withModifiers as H, withDirectives as O, mergeProps as U, toHandlers as X, vModelCheckbox as j, createBlock as V, renderSlot as C, toDisplayString as J, createCommentVNode as Q } from "vue";
|
|
2
2
|
import { useTheme as W } from "../../composables/useTheme.js";
|
|
3
3
|
import { useCommon as I } from "../../composables/useCommon.js";
|
|
4
4
|
import { useColors as Y } from "../../composables/useColors.js";
|
|
@@ -9,9 +9,9 @@ import x from "../inputFooter/InputFooter.vue.js";
|
|
|
9
9
|
const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled", "disabled", "required"], le = {
|
|
10
10
|
key: 1,
|
|
11
11
|
name: "check-icon",
|
|
12
|
-
class: "w-2/3 h-[2px] bg-white dark:bg-
|
|
13
|
-
},
|
|
14
|
-
|
|
12
|
+
class: "w-2/3 h-[2px] bg-white dark:bg-secondary-900"
|
|
13
|
+
}, oe = /* @__PURE__ */ d("path", { d: "M0 11l2-2 5 5L18 3l2 2L7 18z" }, null, -1), ae = [
|
|
14
|
+
oe
|
|
15
15
|
], re = ["textContent"], ie = {
|
|
16
16
|
...I.props(),
|
|
17
17
|
...Y.props("primary"),
|
|
@@ -46,22 +46,22 @@ const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled",
|
|
|
46
46
|
setError: E
|
|
47
47
|
} = f(s, { focus: y, emit: v, withListeners: !1 });
|
|
48
48
|
c ? (m(() => r.value, () => {
|
|
49
|
-
const e =
|
|
49
|
+
const e = a(r.value);
|
|
50
50
|
e && Array.isArray(e) && e.includes(s.value) ? l.value = !0 : l.value = !1;
|
|
51
51
|
}, { immediate: !0, deep: !0 }), m(() => l.value, (e) => {
|
|
52
52
|
if (!s.value)
|
|
53
53
|
return;
|
|
54
|
-
const
|
|
54
|
+
const o = a(r.value);
|
|
55
55
|
if (e)
|
|
56
|
-
if (
|
|
57
|
-
if (!
|
|
58
|
-
const n = [...
|
|
56
|
+
if (o && Array.isArray(o)) {
|
|
57
|
+
if (!o.includes(s.value)) {
|
|
58
|
+
const n = [...o, s.value];
|
|
59
59
|
r.setValue(n);
|
|
60
60
|
}
|
|
61
61
|
} else
|
|
62
62
|
r.setValue([s.value]);
|
|
63
|
-
else if (
|
|
64
|
-
const n =
|
|
63
|
+
else if (o && Array.isArray(o) && o.includes(s.value)) {
|
|
64
|
+
const n = o.findIndex((D) => D === s.value), g = [...o];
|
|
65
65
|
g.splice(n, 1), r.setValue(g);
|
|
66
66
|
}
|
|
67
67
|
})) : (m(() => s.modelValue, (e) => {
|
|
@@ -76,23 +76,23 @@ const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled",
|
|
|
76
76
|
}, 0);
|
|
77
77
|
}
|
|
78
78
|
}, { styles: L, classes: t, className: M } = W("Checkbox", {}, s, { checked: l, isInsideForm: S, isInsideFormGroup: c });
|
|
79
|
-
return B({ focus: y, blur: F, toggle: b, reset: q, validate: k, setError: E }), (e,
|
|
80
|
-
style: R(
|
|
79
|
+
return B({ focus: y, blur: F, toggle: b, reset: q, validate: k, setError: E }), (e, o) => (i(), p("label", {
|
|
80
|
+
style: R(a(L)),
|
|
81
81
|
class: u([
|
|
82
|
-
|
|
83
|
-
|
|
82
|
+
a(M),
|
|
83
|
+
a(t).wrapper
|
|
84
84
|
])
|
|
85
85
|
}, [
|
|
86
86
|
d("div", {
|
|
87
87
|
ref_key: "elRef",
|
|
88
88
|
ref: h,
|
|
89
|
-
class: u(
|
|
89
|
+
class: u(a(t).content),
|
|
90
90
|
tabindex: "0",
|
|
91
91
|
onKeypress: T(H(b, ["prevent", "stop"]), ["space"])
|
|
92
92
|
}, [
|
|
93
93
|
O(d("input", U({
|
|
94
94
|
id: e.id,
|
|
95
|
-
"onUpdate:modelValue":
|
|
95
|
+
"onUpdate:modelValue": o[0] || (o[0] = (n) => l.value = n),
|
|
96
96
|
name: e.name,
|
|
97
97
|
"aria-checked": e.indeterminate ? "mixed" : l.value ? "true" : "false",
|
|
98
98
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
@@ -105,7 +105,7 @@ const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled",
|
|
|
105
105
|
]),
|
|
106
106
|
d("div", {
|
|
107
107
|
class: u([
|
|
108
|
-
|
|
108
|
+
a(t).box,
|
|
109
109
|
[e.glow && !e.disabled && !e.loading ? e.$style["checkbox--glow"] : ""]
|
|
110
110
|
])
|
|
111
111
|
}, [
|
|
@@ -116,12 +116,12 @@ const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled",
|
|
|
116
116
|
}, null, 8, ["size"])) : e.indeterminate ? (i(), p("span", le)) : C(e.$slots, "icon", { key: 2 }, () => [
|
|
117
117
|
(i(), p("svg", {
|
|
118
118
|
viewBox: "0 0 20 20",
|
|
119
|
-
class: u([
|
|
120
|
-
},
|
|
119
|
+
class: u([a(t).icon, { "opacity-0": !l.value }])
|
|
120
|
+
}, ae, 2))
|
|
121
121
|
])
|
|
122
122
|
], 2),
|
|
123
123
|
d("div", {
|
|
124
|
-
class: u(
|
|
124
|
+
class: u(a(t).label)
|
|
125
125
|
}, [
|
|
126
126
|
e.label ? (i(), p("span", {
|
|
127
127
|
key: 0,
|
|
@@ -129,9 +129,9 @@ const ee = ["onKeypress"], se = ["id", "name", "aria-checked", "aria-disabled",
|
|
|
129
129
|
}, null, 8, re)) : C(e.$slots, "default", { key: 1 })
|
|
130
130
|
], 2)
|
|
131
131
|
], 42, ee),
|
|
132
|
-
|
|
132
|
+
a(N) ? Q("", !0) : (i(), V(x, {
|
|
133
133
|
key: 0,
|
|
134
|
-
error:
|
|
134
|
+
error: a(G),
|
|
135
135
|
helper: e.helper
|
|
136
136
|
}, null, 8, ["error", "helper"]))
|
|
137
137
|
], 6));
|
|
@@ -5,19 +5,19 @@ const o = {
|
|
|
5
5
|
return r.isInsideForm && !r.isInsideFormGroup && e.push("mb-3"), e;
|
|
6
6
|
},
|
|
7
7
|
box: ({ props: r }) => {
|
|
8
|
-
const e = ["rounded flex justify-center items-center shrink-0 border
|
|
9
|
-
return r.size === "
|
|
8
|
+
const e = ["rounded flex justify-center items-center shrink-0 border border-[color:var(--x-checkbox-border)] bg-[color:var(--x-checkbox-bg)] dark:border-[color:var(--x-checkbox-dark-border)] dark:bg-[color:var(--x-checkbox-dark-bg)]"];
|
|
9
|
+
return r.size === "lg" ? e.push("h-5 w-5") : r.size === "xl" ? e.push("h-6 w-6") : e.push("h-4 w-4"), e;
|
|
10
10
|
},
|
|
11
11
|
content: ({ props: r }) => {
|
|
12
|
-
const e = ["flex items-
|
|
12
|
+
const e = ["flex items-baseline"];
|
|
13
13
|
return r.disabled && e.push("cursor-not-allowed"), e;
|
|
14
14
|
},
|
|
15
15
|
icon: ({ props: r }) => {
|
|
16
|
-
const e = ["fill-current text-white
|
|
17
|
-
return r.size === "
|
|
16
|
+
const e = ["fill-current text-white"];
|
|
17
|
+
return r.size === "lg" ? e.push("h-3 w-3") : r.size === "xl" ? e.push("h-4 w-4") : e.push("h-2.5 w-2.5"), e;
|
|
18
18
|
},
|
|
19
19
|
label: ({ props: r }) => {
|
|
20
|
-
const e = ["inline-block font-medium text-
|
|
20
|
+
const e = ["inline-block font-medium text-secondary-800 dark:text-secondary-200 pl-2"];
|
|
21
21
|
return r.size === "xs" ? e.push("text-xs") : r.size === "sm" ? e.push("text-sm") : r.size === "lg" ? e.push("text-lg") : r.size === "xl" && e.push("text-xl"), e;
|
|
22
22
|
}
|
|
23
23
|
},
|
|
@@ -13,11 +13,11 @@ const o = {
|
|
|
13
13
|
return r.disabled && e.push("cursor-not-allowed"), e;
|
|
14
14
|
},
|
|
15
15
|
icon: ({ props: r }) => {
|
|
16
|
-
const e = ["fill-current text-white dark:text-
|
|
16
|
+
const e = ["fill-current text-white dark:text-secondary-900"];
|
|
17
17
|
return r.size === "xs" || r.size === "sm" ? e.push("h-2 w-2") : r.size === "xl" ? e.push("h-3.5 w-3.5") : e.push("h-2.5 w-2.5"), e;
|
|
18
18
|
},
|
|
19
19
|
label: ({ props: r }) => {
|
|
20
|
-
const e = ["text-
|
|
20
|
+
const e = ["text-secondary-800 dark:text-secondary-200 pl-2 text-sm"];
|
|
21
21
|
return r.size === "xs" ? e.push("text-xs") : r.size === "sm" ? e.push("text-sm") : r.size === "lg" ? e.push("text-lg") : r.size === "xl" && e.push("text-xl"), e;
|
|
22
22
|
}
|
|
23
23
|
},
|