@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/colors.vue
CHANGED
|
@@ -18,51 +18,49 @@ function copyPalette(val: any) {
|
|
|
18
18
|
document.execCommand('copy')
|
|
19
19
|
document.body.removeChild(el)
|
|
20
20
|
|
|
21
|
-
notifications
|
|
21
|
+
notifications?.success('Copied to clipboard!')
|
|
22
22
|
}
|
|
23
23
|
</script>
|
|
24
24
|
|
|
25
25
|
<template>
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
<div v-for="shade in Object.keys(palette)" :key="shade" class="h-32 flex items-center justify-center" :style="`background-color: ${palette[shade]}`">{{ shade }}</div>
|
|
40
|
-
</div>
|
|
26
|
+
<h1 class="text-4xl font-semibold">Colors</h1>
|
|
27
|
+
<h2 class="text-lg my-2 text-gray-500 dark:text-gray-400">Generate your own palettes, use Tailwind's or use color prop to generate at runtime</h2>
|
|
28
|
+
<x-divider class="mt-4 mb-8"/>
|
|
29
|
+
|
|
30
|
+
<h2 class="text-2xl mb-2">Generate your own palettes</h2>
|
|
31
|
+
<p class="mb-8 text-gray-500 dark:text-gray-400">Generate your own color palette like Tailwind. With the same properties as Tailwind color palettes.</p>
|
|
32
|
+
<p class="font-medium"></p>
|
|
33
|
+
<div class="mt-4">
|
|
34
|
+
<x-input v-model="color500" label="Change here the middle value (500) to generate a new palette"/>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="grid grid-cols-11 my-4 text-sm">
|
|
37
|
+
<div v-for="shade in Object.keys(palette)" :key="shade" class="h-32 flex items-center justify-center" :style="`background-color: ${palette[shade]}`">{{ shade }}</div>
|
|
38
|
+
</div>
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
<x-button icon-left="copy" :color="color500" block @click="copyPalette(palette)">Copy Palette</x-button>
|
|
43
41
|
|
|
44
|
-
|
|
42
|
+
<p class="text-gray-500 dark:text-gray-400 mt-4">This is the generated palette when you use the color directly on the color prop like <x-button <b>color="#10B981"</b>>Hello</x-button></p>
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
<x-divider class="mt-4 mb-8"/>
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
<h2 class="text-2xl mb-2">Theme colors</h2>
|
|
47
|
+
<p class="mb-8 text-gray-500 dark:text-gray-400">Default theme color names and how to customize them.</p>
|
|
50
48
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
49
|
+
<p>The default theme color names are
|
|
50
|
+
<b class="text-primary-500">primary</b>,
|
|
51
|
+
<b class="text-secondary-500">secondary</b>,
|
|
52
|
+
<b class="text-success-500">success</b>,
|
|
53
|
+
<b class="text-warning-500">warning</b> and
|
|
54
|
+
<b class="text-error-500">error</b>.
|
|
55
|
+
You can customize them or even add your own.
|
|
56
|
+
</p>
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
<p class="my-4"></p>
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
<p class="my-2">Customize the color prop, e.g. <b>color="primary"</b> on the UI initialization.</p>
|
|
61
|
+
<code-snippet
|
|
62
|
+
lang="js"
|
|
63
|
+
:code="`import { createApp } from 'vue'
|
|
66
64
|
import UI, { colors } from '@indielayer/ui'
|
|
67
65
|
|
|
68
66
|
const app = createApp(App)
|
|
@@ -78,14 +76,14 @@ app.use(UI, {
|
|
|
78
76
|
},
|
|
79
77
|
}
|
|
80
78
|
})`"
|
|
81
|
-
|
|
79
|
+
/>
|
|
82
80
|
|
|
83
|
-
|
|
81
|
+
<p class="my-4">Allow you to use the Tailwind classes like <b>text-primary-500</b>, <b>bg-primary-500</b>, etc:</p>
|
|
84
82
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
<div>
|
|
84
|
+
<code-snippet
|
|
85
|
+
lang="js"
|
|
86
|
+
:code="`// tailwind.config.js
|
|
89
87
|
//...
|
|
90
88
|
const colors = require('tailwindcss/colors')
|
|
91
89
|
|
|
@@ -103,23 +101,20 @@ module.exports = {
|
|
|
103
101
|
},
|
|
104
102
|
},
|
|
105
103
|
}`"
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
108
106
|
|
|
109
|
-
|
|
107
|
+
<x-divider class="mt-4 mb-8"/>
|
|
110
108
|
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
<h2 class="text-2xl mb-2">Tailwind Colors</h2>
|
|
110
|
+
<p class="mb-8 text-gray-500 dark:text-gray-400">Default tailwind color palettes.</p>
|
|
113
111
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
112
|
+
<div class="grid gap-6 grid-cols-1 md:grid-cols-2 text-xs">
|
|
113
|
+
<div v-for="(pal, key) in TailwindColors" :key="key">
|
|
114
|
+
<div class="text-overline mb-2">{{ key }}</div>
|
|
115
|
+
<div class="grid grid-cols-11">
|
|
116
|
+
<div v-for="(color, palKey) in pal" :key="palKey" class="h-32 flex items-center justify-center" :style="`background-color: ${color}`">{{ palKey }}</div>
|
|
121
117
|
</div>
|
|
122
|
-
</
|
|
118
|
+
</div>
|
|
123
119
|
</div>
|
|
124
|
-
|
|
125
120
|
</template>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="space-x-4">
|
|
3
3
|
<x-button-group>
|
|
4
|
-
<x-button
|
|
4
|
+
<x-button >Cancel</x-button>
|
|
5
5
|
<x-button color="primary">Save</x-button>
|
|
6
6
|
</x-button-group>
|
|
7
7
|
<x-button-group color="primary" light outlined>
|
|
@@ -9,10 +9,14 @@
|
|
|
9
9
|
<x-button>middle</x-button>
|
|
10
10
|
<x-button>right</x-button>
|
|
11
11
|
</x-button-group>
|
|
12
|
+
<x-button-group color="primary" light outlined>
|
|
13
|
+
<x-button icon="edit"/>
|
|
14
|
+
<x-button icon="code"/>
|
|
15
|
+
<x-button icon="smile"/>
|
|
16
|
+
</x-button-group>
|
|
12
17
|
<x-button-group color="indigo" outlined disabled>
|
|
13
18
|
<x-button>left</x-button>
|
|
14
19
|
<x-button>middle</x-button>
|
|
15
|
-
<x-button>right</x-button>
|
|
16
20
|
</x-button-group>
|
|
17
21
|
</div>
|
|
18
22
|
</template>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<x-carousel class="!h-80 rounded-md" class-dots="!justify-start pl-10">
|
|
3
3
|
<x-carousel-slide>
|
|
4
|
-
<img src="
|
|
4
|
+
<img src="../../../assets/images/photo2.jpeg" alt="" />
|
|
5
5
|
</x-carousel-slide>
|
|
6
6
|
<x-carousel-slide>
|
|
7
|
-
<img src="
|
|
7
|
+
<img src="../../../assets/images/photo1.jpeg" alt="" />
|
|
8
8
|
</x-carousel-slide>
|
|
9
9
|
</x-carousel>
|
|
10
10
|
</template>
|
|
@@ -59,12 +59,12 @@ function onSubmit(isValid: string) {
|
|
|
59
59
|
placeholder="Description"
|
|
60
60
|
/>
|
|
61
61
|
|
|
62
|
-
<x-form-group v-model="selected" label="Group of checkboxes"
|
|
62
|
+
<x-form-group v-model="selected" label="Group of checkboxes" :rules="[rules.isRequired]">
|
|
63
63
|
<x-checkbox value="a" label="Lorem ipsum dolor" />
|
|
64
64
|
<x-checkbox value="b" label="Second option" />
|
|
65
65
|
</x-form-group>
|
|
66
66
|
|
|
67
|
-
<x-form-group v-model="checked" label="Group of radio buttons"
|
|
67
|
+
<x-form-group v-model="checked" label="Group of radio buttons" :rules="[rules.isRequired]">
|
|
68
68
|
<x-radio name="inputName" value="a" label="Option A" />
|
|
69
69
|
<x-radio name="inputName" value="b" label="Option B" />
|
|
70
70
|
</x-form-group>
|
|
@@ -87,7 +87,7 @@ function onSubmit(isValid: string) {
|
|
|
87
87
|
/>
|
|
88
88
|
|
|
89
89
|
<template #secondary-action>
|
|
90
|
-
<x-button
|
|
90
|
+
<x-button ghost>Cancel</x-button>
|
|
91
91
|
</template>
|
|
92
92
|
<template #primary-action>
|
|
93
93
|
<x-button color="primary" type="submit">Submit</x-button>
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
<script setup>
|
|
1
|
+
<script setup lang="ts">
|
|
2
2
|
import { ref } from 'vue'
|
|
3
3
|
const name = ref('')
|
|
4
4
|
</script>
|
|
5
5
|
|
|
6
6
|
<template>
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</div>
|
|
7
|
+
<x-input
|
|
8
|
+
v-model="name"
|
|
9
|
+
label="Label here"
|
|
10
|
+
placeholder="Placeholder"
|
|
11
|
+
helper="Helper text here"
|
|
12
|
+
tooltip="Tooltip here"
|
|
13
|
+
/>
|
|
15
14
|
</template>
|
|
@@ -53,16 +53,17 @@ function onSubmit(isValid: boolean) {
|
|
|
53
53
|
name="description"
|
|
54
54
|
label="Description"
|
|
55
55
|
placeholder="Description"
|
|
56
|
+
hide-footer
|
|
56
57
|
/>
|
|
57
58
|
|
|
58
59
|
<!-- <template #tertiary-action>
|
|
59
60
|
<x-button color="gray" size="lg">Tertiary</x-button>
|
|
60
61
|
</template> -->
|
|
61
62
|
<template #secondary-action>
|
|
62
|
-
<x-button
|
|
63
|
+
<x-button ghost tabindex="-1" @click="show = false">Cancel</x-button>
|
|
63
64
|
</template>
|
|
64
65
|
<template #primary-action>
|
|
65
|
-
<x-button color="primary"
|
|
66
|
+
<x-button color="primary" type="submit">Confirm</x-button>
|
|
66
67
|
</template>
|
|
67
68
|
</x-modal>
|
|
68
69
|
|
|
@@ -27,7 +27,14 @@ const show3 = ref(false)
|
|
|
27
27
|
</template>
|
|
28
28
|
</x-modal>
|
|
29
29
|
|
|
30
|
-
<x-modal
|
|
30
|
+
<x-modal
|
|
31
|
+
v-model="show1"
|
|
32
|
+
backdrop
|
|
33
|
+
:has-actions="false"
|
|
34
|
+
:has-header="false"
|
|
35
|
+
show-close
|
|
36
|
+
:dissmissable="false"
|
|
37
|
+
>
|
|
31
38
|
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Iure praesentium non id dolores vitae. Nam ratione veritatis ab cumque voluptas porro illum, voluptate perferendis ducimus dolorem optio magni assumenda dolore! Doloremque facere aliquid facilis distinctio accusamus, dolorum eligendi consequuntur molestias sapiente non rem vero sed eos minus itaque sunt officiis iste ea repellendus possimus earum maiores? Quo laudantium fuga odit tenetur sint fugit deleniti dolores placeat, accusamus magni consectetur unde totam sunt labore dolor rem consequatur quaerat! Iure temporibus voluptatem cumque, dolore maiores rerum neque vero, iusto veritatis repellat eligendi amet! Molestiae cumque officiis eius harum iste, fuga corporis molestias.
|
|
32
39
|
</x-modal>
|
|
33
40
|
|
|
@@ -39,14 +46,12 @@ const show3 = ref(false)
|
|
|
39
46
|
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Iure praesentium non id dolores vitae. Nam ratione veritatis ab cumque voluptas porro illum, voluptate perferendis ducimus dolorem optio magni assumenda dolore! Doloremque facere aliquid facilis distinctio accusamus, dolorum eligendi consequuntur molestias sapiente non rem vero sed eos minus itaque sunt officiis iste ea repellendus possimus earum maiores? Quo laudantium fuga odit tenetur sint fugit deleniti dolores placeat, accusamus magni consectetur unde totam sunt labore dolor rem consequatur quaerat! Iure temporibus voluptatem cumque, dolore maiores rerum neque vero, iusto veritatis repellat eligendi amet! Molestiae cumque officiis eius harum iste, fuga corporis molestias.
|
|
40
47
|
|
|
41
48
|
<template #actions>
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
<x-button color="success">Confirm</x-button>
|
|
45
|
-
</div>
|
|
49
|
+
<x-button>Cancel</x-button>
|
|
50
|
+
<x-button color="success">Confirm</x-button>
|
|
46
51
|
</template>
|
|
47
52
|
</x-modal>
|
|
48
53
|
|
|
49
|
-
<x-modal v-model="show3" show-close>
|
|
54
|
+
<x-modal v-model="show3" show-close :has-actions="false">
|
|
50
55
|
<template #header>
|
|
51
56
|
Modal Title
|
|
52
57
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
2
|
+
<div class="grid gap-4">
|
|
3
3
|
<x-popover placement="top-start">
|
|
4
4
|
<x-button>Click me to open popover</x-button>
|
|
5
5
|
<template #content>
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
</template>
|
|
10
10
|
</x-popover>
|
|
11
11
|
|
|
12
|
-
<x-popover
|
|
13
|
-
<x-avatar class="cursor-pointer shadow" name="John Smith" />
|
|
12
|
+
<x-popover>
|
|
13
|
+
<x-avatar class="cursor-pointer shadow relative" name="John Smith" />
|
|
14
14
|
<template #content>
|
|
15
15
|
<x-popover-container class="p-2">
|
|
16
16
|
another one
|
|
@@ -62,7 +62,12 @@ const linkTab = ref(null)
|
|
|
62
62
|
content e
|
|
63
63
|
</x-tab>
|
|
64
64
|
</x-tab-group>
|
|
65
|
-
<x-tab-group
|
|
65
|
+
<x-tab-group
|
|
66
|
+
v-model="tab"
|
|
67
|
+
class="pb-10"
|
|
68
|
+
variant="block"
|
|
69
|
+
grow
|
|
70
|
+
>
|
|
66
71
|
<x-tab value="a" label="Tab A">
|
|
67
72
|
content a
|
|
68
73
|
</x-tab>
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
const multiline = ref('')
|
|
5
|
+
</script>
|
|
6
|
+
|
|
1
7
|
<template>
|
|
2
|
-
<div class="grid grid-cols-
|
|
8
|
+
<div class="grid grid-cols-2 gap-4">
|
|
3
9
|
<x-textarea
|
|
4
|
-
v-model="
|
|
10
|
+
v-model="multiline"
|
|
5
11
|
label="Normal textarea"
|
|
6
12
|
helper="Helper text"
|
|
13
|
+
resizable
|
|
7
14
|
placeholder="Placeholder"
|
|
15
|
+
tooltip="Tooltip here"
|
|
8
16
|
/>
|
|
9
17
|
<x-textarea v-model="multiline" label="Multiline adjust" adjust-to-text />
|
|
10
18
|
</div>
|
|
11
19
|
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
export default {
|
|
15
|
-
data() {
|
|
16
|
-
return {
|
|
17
|
-
name: '',
|
|
18
|
-
multiline: 'auto\nadjusted\nheight',
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
}
|
|
22
|
-
</script>
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue'
|
|
3
|
+
|
|
4
|
+
const checked = ref(true)
|
|
5
|
+
</script>
|
|
6
|
+
|
|
1
7
|
<template>
|
|
2
|
-
<div class="grid grid-cols-
|
|
3
|
-
<x-toggle v-model="checked"
|
|
4
|
-
<x-toggle v-model="checked" color="
|
|
5
|
-
<x-toggle v-model="checked" color="success" label="Success" />
|
|
6
|
-
<x-toggle v-model="checked" color="warning" label="Warning" />
|
|
8
|
+
<div class="grid grid-cols-2 gap-4">
|
|
9
|
+
<x-toggle v-model="checked" label="Primary" />
|
|
10
|
+
<x-toggle v-model="checked" color="sky" label="Sky" />
|
|
7
11
|
</div>
|
|
8
12
|
</template>
|
|
9
|
-
|
|
10
|
-
<script>
|
|
11
|
-
export default {
|
|
12
|
-
data() { return { checked: true } },
|
|
13
|
-
}
|
|
14
|
-
</script>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { XTooltip } from '@indielayer/ui'
|
|
2
|
+
import { XTooltip, XToggleTip } from '@indielayer/ui'
|
|
3
3
|
import UsageDemoCode from './usage.vue?raw'
|
|
4
4
|
import UsageDemo from './usage.vue'
|
|
5
5
|
|
|
6
6
|
const title = 'Tooltip'
|
|
7
7
|
const description = 'Tooltips are used to display a message when hovering over an element.'
|
|
8
|
-
const components = [XTooltip]
|
|
8
|
+
const components = [XTooltip, XToggleTip]
|
|
9
9
|
const demos = [{
|
|
10
10
|
name: 'Usage',
|
|
11
11
|
description: '',
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<x-tooltip>
|
|
3
|
-
<x-button>Hover me to see tooltip</x-button>
|
|
4
|
-
<template #tooltip>
|
|
5
|
-
Cool <span class="text-gray-300">Tooltip</span>
|
|
6
|
-
</template>
|
|
7
|
-
</x-tooltip>
|
|
8
|
-
|
|
9
|
-
<x-tooltip>
|
|
10
|
-
<x-button>Hover me to see tooltip</x-button>
|
|
3
|
+
<x-button>Hover me to see the tooltip</x-button>
|
|
11
4
|
<template #tooltip>
|
|
12
5
|
<div class="font-bold">Tooltip title</div>
|
|
13
6
|
<div>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatibus corrupti maiores aut minima iusto nulla inventore ea illo commodi et.</div>
|
|
14
7
|
</template>
|
|
15
8
|
</x-tooltip>
|
|
9
|
+
|
|
10
|
+
<!-- tooltip with the info icon -->
|
|
11
|
+
<x-toggle-tip content="Lets go"/>
|
|
16
12
|
</template>
|
package/docs/pages/icons.vue
CHANGED
|
@@ -1,68 +1,64 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<h1 class="text-lg my-2 text-gray-500 dark:text-gray-400">Building your own SVG icon library from multiple open source libraries</h1>
|
|
6
|
-
<x-divider class="mt-4 mb-8"/>
|
|
2
|
+
<h2 class="text-4xl font-semibold">Icons</h2>
|
|
3
|
+
<h1 class="text-lg my-2 text-gray-500 dark:text-gray-400">Building your own SVG icon library from multiple open source libraries</h1>
|
|
4
|
+
<x-divider class="mt-4 mb-8"/>
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
6
|
+
<p class="text-xl mt-8 my-4">SVG Icon Libraries</p>
|
|
7
|
+
<div class="font-bold text-lg">
|
|
8
|
+
<ul>
|
|
9
|
+
<li><x-link
|
|
10
|
+
external
|
|
11
|
+
color="sky"
|
|
12
|
+
underline
|
|
13
|
+
href="https://icones.js.org/"
|
|
14
|
+
target="_blank"
|
|
15
|
+
>Icônes - All the libraries</x-link></li>
|
|
16
|
+
<li><x-link
|
|
17
|
+
external
|
|
18
|
+
color="sky"
|
|
19
|
+
underline
|
|
20
|
+
href="https://heroicons.com/"
|
|
21
|
+
target="_blank"
|
|
22
|
+
>Hero Icons (MIT)</x-link></li>
|
|
23
|
+
<li><x-link
|
|
24
|
+
external
|
|
25
|
+
color="sky"
|
|
26
|
+
underline
|
|
27
|
+
href="https://tabler-icons.io/"
|
|
28
|
+
target="_blank"
|
|
29
|
+
>Tabler Icons (MIT)</x-link></li>
|
|
30
|
+
<li><x-link
|
|
31
|
+
external
|
|
32
|
+
color="sky"
|
|
33
|
+
underline
|
|
34
|
+
href="https://feathericons.com/"
|
|
35
|
+
target="_blank"
|
|
36
|
+
>Feather Icons (MIT)</x-link></li>
|
|
37
|
+
</ul>
|
|
38
|
+
</div>
|
|
41
39
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
40
|
+
<h3 class="text-2xl mt-8 mb-4">1. Create the icons file -> <strong>icons.js</strong></h3>
|
|
41
|
+
<code-snippet
|
|
42
|
+
lang="js"
|
|
43
|
+
:code="iconExample"
|
|
44
|
+
/>
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
<h3 class="text-2xl mt-8 mb-4">2. Add icons on UI install options -> <strong>main.js</strong></h3>
|
|
47
|
+
<code-snippet
|
|
48
|
+
lang="js"
|
|
49
|
+
:code="installExample"
|
|
50
|
+
/>
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
<h3 class="text-2xl mt-8 mb-4">3. Add icons from open source libraries</h3>
|
|
53
|
+
<p class="mb-2 text-xl">Start adding the icons you need.</p>
|
|
54
|
+
<p class="mb-2">SVG wrapper optional, copy only the content part of the SVG:</p>
|
|
55
|
+
<p class="mb-4 border dark:border-gray-600 rounded-md p-4"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><strong><polyline points="20 6 9 17 4 12"></polyline></strong></svg></p>
|
|
56
|
+
<code-snippet lang="js" :code="iconExample1"/>
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</div>
|
|
63
|
-
<code-snippet lang="js" :code="iconExample2"/>
|
|
64
|
-
</section>
|
|
58
|
+
<div class="my-4">
|
|
59
|
+
Icon "check" <x-icon icon="check"/>
|
|
65
60
|
</div>
|
|
61
|
+
<code-snippet lang="js" :code="iconExample2"/>
|
|
66
62
|
</template>
|
|
67
63
|
|
|
68
64
|
<script>
|