@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.
Files changed (214) hide show
  1. package/docs/components/common/CodePreview.vue +1 -1
  2. package/docs/components/common/CodeSnippet.vue +5 -7
  3. package/docs/components/common/DocumentPage.vue +89 -93
  4. package/docs/components/menu/DocsMenu.vue +75 -122
  5. package/docs/components/toolbar/PreToolbar.vue +10 -12
  6. package/docs/components/toolbar/Toolbar.vue +21 -8
  7. package/docs/layouts/default.vue +7 -3
  8. package/docs/pages/colors.vue +49 -54
  9. package/docs/pages/component/button/button-group.vue +6 -2
  10. package/docs/pages/component/button/size.vue +1 -1
  11. package/docs/pages/component/carousel/usage.vue +2 -2
  12. package/docs/pages/component/form/usage.vue +3 -3
  13. package/docs/pages/component/formGroup/usage.vue +1 -0
  14. package/docs/pages/component/input/usage.vue +8 -9
  15. package/docs/pages/component/modal/composed.vue +3 -2
  16. package/docs/pages/component/modal/usage.vue +11 -6
  17. package/docs/pages/component/popover/usage.vue +3 -3
  18. package/docs/pages/component/select/usage.vue +1 -0
  19. package/docs/pages/component/tabs/usage.vue +6 -1
  20. package/docs/pages/component/textarea/usage.vue +10 -13
  21. package/docs/pages/component/toggle/usage.vue +9 -11
  22. package/docs/pages/component/tooltip/index.vue +2 -2
  23. package/docs/pages/component/tooltip/usage.vue +4 -8
  24. package/docs/pages/icons.vue +54 -58
  25. package/docs/pages/index.vue +73 -77
  26. package/docs/pages/play.vue +2 -14
  27. package/docs/pages/typography.vue +26 -30
  28. package/docs/router/index.ts +2 -0
  29. package/exports/tailwind.preset.js +0 -1
  30. package/lib/components/accordion/theme/AccordionItem.base.theme.js +7 -7
  31. package/lib/components/badge/Badge.vue.js +7 -7
  32. package/lib/components/breadcrumbs/theme/Breadcrumbs.base.theme.js +1 -1
  33. package/lib/components/button/theme/Button.base.theme.js +7 -7
  34. package/lib/components/card/theme/Card.base.theme.js +1 -1
  35. package/lib/components/checkbox/Checkbox.vue.d.ts +3 -0
  36. package/lib/components/checkbox/Checkbox.vue2.js +23 -23
  37. package/lib/components/checkbox/theme/Checkbox.base.theme.js +6 -6
  38. package/lib/components/checkbox/theme/Checkbox.carbon.theme.js +2 -2
  39. package/lib/components/container/theme/Container.base.theme.js +2 -2
  40. package/lib/components/divider/Divider.vue.js +14 -14
  41. package/lib/components/divider/theme/Divider.base.theme.js +2 -2
  42. package/lib/components/drawer/Drawer.vue.js +2 -2
  43. package/lib/components/drawer/theme/Drawer.base.theme.js +1 -1
  44. package/lib/components/form/Form.vue.js +1 -1
  45. package/lib/components/form/theme/Form.base.theme.js +4 -4
  46. package/lib/components/form/theme/Form.carbon.theme.js +4 -4
  47. package/lib/components/formGroup/FormGroup.vue.d.ts +3 -0
  48. package/lib/components/formGroup/FormGroup.vue.js +16 -15
  49. package/lib/components/formGroup/theme/FormGroup.base.theme.js +1 -1
  50. package/lib/components/icon/theme/Icon.base.theme.js +1 -1
  51. package/lib/components/index.js +108 -107
  52. package/lib/components/input/Input.vue.d.ts +3 -0
  53. package/lib/components/input/Input.vue.js +4 -3
  54. package/lib/components/input/theme/Input.base.theme.js +10 -10
  55. package/lib/components/input/theme/Input.carbon.theme.js +10 -10
  56. package/lib/components/inputFooter/theme/InputFooter.base.theme.js +3 -3
  57. package/lib/components/inputFooter/theme/InputFooter.carbon.theme.js +2 -2
  58. package/lib/components/label/Label.vue.d.ts +3 -0
  59. package/lib/components/label/Label.vue.js +26 -20
  60. package/lib/components/label/theme/Label.base.theme.js +1 -1
  61. package/lib/components/label/theme/Label.carbon.theme.js +3 -3
  62. package/lib/components/link/Link.vue.js +2 -2
  63. package/lib/components/link/Link.vue2.js +4 -4
  64. package/lib/components/loader/theme/Loader.base.theme.js +1 -1
  65. package/lib/components/loader/theme/Loader.carbon.theme.js +1 -1
  66. package/lib/components/menu/Menu.vue.js +19 -19
  67. package/lib/components/menu/theme/MenuItem.base.theme.js +21 -31
  68. package/lib/components/modal/Modal.vue.d.ts +4 -0
  69. package/lib/components/modal/Modal.vue.js +78 -74
  70. package/lib/components/modal/theme/Modal.base.theme.js +10 -10
  71. package/lib/components/modal/theme/Modal.carbon.theme.js +3 -3
  72. package/lib/components/notifications/Notifications.vue.js +1 -1
  73. package/lib/components/notifications/theme/Notifications.base.theme.js +1 -1
  74. package/lib/components/notifications/theme/Notifications.carbon.theme.js +3 -3
  75. package/lib/components/pagination/Pagination.vue.js +27 -27
  76. package/lib/components/popover/Popover.vue.d.ts +13 -0
  77. package/lib/components/popover/Popover.vue.js +13 -8
  78. package/lib/components/popover/Popover.vue2.js +3 -2
  79. package/lib/components/popover/Popover.vue3.js +2 -3
  80. package/lib/components/popover/theme/PopoverContainer.base.theme.js +4 -4
  81. package/lib/components/popover/theme/PopoverContainer.carbon.theme.js +4 -4
  82. package/lib/components/progress/Progress.vue.js +11 -11
  83. package/lib/components/progress/theme/Progress.base.theme.js +10 -10
  84. package/lib/components/radio/Radio.vue.d.ts +3 -0
  85. package/lib/components/radio/theme/Radio.base.theme.js +28 -28
  86. package/lib/components/radio/theme/Radio.carbon.theme.js +8 -8
  87. package/lib/components/select/Select.vue.d.ts +16 -0
  88. package/lib/components/select/Select.vue.js +95 -92
  89. package/lib/components/select/theme/Select.base.theme.js +11 -11
  90. package/lib/components/select/theme/Select.carbon.theme.js +10 -10
  91. package/lib/components/skeleton/theme/Skeleton.base.theme.js +1 -1
  92. package/lib/components/slider/Slider.vue.d.ts +3 -0
  93. package/lib/components/slider/Slider.vue.js +1 -1
  94. package/lib/components/slider/theme/Slider.carbon.theme.js +6 -6
  95. package/lib/components/stepper/Stepper.vue.js +14 -14
  96. package/lib/components/tab/Tab.vue.js +55 -54
  97. package/lib/components/tab/theme/TabGroup.base.theme.js +15 -15
  98. package/lib/components/tab/theme/TabGroup.carbon.theme.js +8 -8
  99. package/lib/components/table/Table.vue.js +192 -194
  100. package/lib/components/table/theme/Table.base.theme.js +3 -3
  101. package/lib/components/table/theme/Table.carbon.theme.js +7 -7
  102. package/lib/components/table/theme/TableHead.base.theme.js +1 -1
  103. package/lib/components/table/theme/TableHead.carbon.theme.js +1 -1
  104. package/lib/components/table/theme/TableHeader.base.theme.js +1 -1
  105. package/lib/components/table/theme/TableHeader.carbon.theme.js +2 -2
  106. package/lib/components/table/theme/TableRow.base.theme.js +3 -3
  107. package/lib/components/table/theme/TableRow.carbon.theme.js +3 -3
  108. package/lib/components/tag/Tag.vue.js +4 -4
  109. package/lib/components/textarea/Textarea.vue.d.ts +7 -0
  110. package/lib/components/textarea/Textarea.vue.js +23 -21
  111. package/lib/components/textarea/theme/Textarea.base.theme.js +6 -6
  112. package/lib/components/textarea/theme/Textarea.carbon.theme.js +6 -6
  113. package/lib/components/toggle/Toggle.vue.d.ts +3 -0
  114. package/lib/components/toggle/Toggle.vue.js +26 -26
  115. package/lib/components/toggle/theme/Toggle.base.theme.js +1 -1
  116. package/lib/components/tooltip/ToggleTip.vue.d.ts +14 -0
  117. package/lib/components/tooltip/ToggleTip.vue.js +29 -0
  118. package/lib/components/tooltip/ToggleTip.vue2.js +4 -0
  119. package/lib/components/tooltip/Tooltip.vue.d.ts +22 -3
  120. package/lib/components/tooltip/Tooltip.vue.js +26 -17
  121. package/lib/components/tooltip/__tests__/ToggleTip.spec.d.ts +1 -0
  122. package/lib/components/tooltip/index.d.ts +2 -0
  123. package/lib/composables/useColors.js +9 -9
  124. package/lib/composables/useInputtable.d.ts +1 -0
  125. package/lib/composables/useInputtable.js +20 -19
  126. package/lib/index.js +37 -35
  127. package/lib/index.umd.js +7 -3
  128. package/lib/tailwind.preset.js +0 -1
  129. package/lib/themes/base/index.js +3 -6
  130. package/lib/themes/base/styles.css.js +4 -0
  131. package/lib/version.d.ts +1 -1
  132. package/lib/version.js +1 -1
  133. package/package.json +2 -1
  134. package/src/components/accordion/theme/AccordionItem.base.theme.ts +2 -2
  135. package/src/components/badge/Badge.vue +1 -1
  136. package/src/components/breadcrumbs/theme/Breadcrumbs.base.theme.ts +1 -1
  137. package/src/components/button/theme/Button.base.theme.ts +2 -2
  138. package/src/components/card/theme/Card.base.theme.ts +1 -1
  139. package/src/components/checkbox/Checkbox.vue +1 -1
  140. package/src/components/checkbox/theme/Checkbox.base.theme.ts +8 -8
  141. package/src/components/checkbox/theme/Checkbox.carbon.theme.ts +2 -2
  142. package/src/components/container/theme/Container.base.theme.ts +2 -2
  143. package/src/components/divider/Divider.vue +1 -1
  144. package/src/components/divider/theme/Divider.base.theme.ts +2 -2
  145. package/src/components/drawer/Drawer.vue +2 -2
  146. package/src/components/drawer/theme/Drawer.base.theme.ts +1 -1
  147. package/src/components/form/Form.vue +1 -1
  148. package/src/components/form/theme/Form.base.theme.ts +1 -1
  149. package/src/components/form/theme/Form.carbon.theme.ts +1 -1
  150. package/src/components/formGroup/FormGroup.vue +1 -0
  151. package/src/components/formGroup/theme/FormGroup.base.theme.ts +1 -1
  152. package/src/components/icon/theme/Icon.base.theme.ts +2 -2
  153. package/src/components/input/Input.vue +2 -1
  154. package/src/components/input/theme/Input.base.theme.ts +5 -5
  155. package/src/components/input/theme/Input.carbon.theme.ts +6 -6
  156. package/src/components/inputFooter/theme/InputFooter.base.theme.ts +3 -3
  157. package/src/components/inputFooter/theme/InputFooter.carbon.theme.ts +2 -2
  158. package/src/components/label/Label.vue +4 -1
  159. package/src/components/label/theme/Label.base.theme.ts +1 -1
  160. package/src/components/label/theme/Label.carbon.theme.ts +1 -1
  161. package/src/components/link/Link.vue +1 -1
  162. package/src/components/loader/theme/Loader.base.theme.ts +1 -1
  163. package/src/components/loader/theme/Loader.carbon.theme.ts +1 -1
  164. package/src/components/menu/Menu.vue +3 -3
  165. package/src/components/menu/theme/MenuItem.base.theme.ts +30 -34
  166. package/src/components/modal/Modal.vue +8 -3
  167. package/src/components/modal/theme/Modal.base.theme.ts +9 -6
  168. package/src/components/modal/theme/Modal.carbon.theme.ts +3 -3
  169. package/src/components/notifications/Notifications.vue +1 -1
  170. package/src/components/notifications/theme/Notifications.base.theme.ts +1 -1
  171. package/src/components/notifications/theme/Notifications.carbon.theme.ts +1 -1
  172. package/src/components/pagination/Pagination.vue +3 -3
  173. package/src/components/popover/Popover.vue +77 -2
  174. package/src/components/popover/theme/PopoverContainer.base.theme.ts +1 -1
  175. package/src/components/popover/theme/PopoverContainer.carbon.theme.ts +1 -1
  176. package/src/components/progress/Progress.vue +1 -1
  177. package/src/components/progress/theme/Progress.base.theme.ts +2 -2
  178. package/src/components/radio/theme/Radio.base.theme.ts +8 -8
  179. package/src/components/radio/theme/Radio.carbon.theme.ts +1 -1
  180. package/src/components/select/Select.vue +7 -4
  181. package/src/components/select/theme/Select.base.theme.ts +8 -8
  182. package/src/components/select/theme/Select.carbon.theme.ts +8 -8
  183. package/src/components/skeleton/theme/Skeleton.base.theme.ts +1 -1
  184. package/src/components/slider/Slider.vue +1 -1
  185. package/src/components/slider/theme/Slider.carbon.theme.ts +1 -1
  186. package/src/components/stepper/Stepper.vue +3 -3
  187. package/src/components/tab/Tab.vue +3 -3
  188. package/src/components/tab/theme/TabGroup.base.theme.ts +4 -4
  189. package/src/components/tab/theme/TabGroup.carbon.theme.ts +3 -3
  190. package/src/components/table/Table.vue +2 -0
  191. package/src/components/table/theme/Table.base.theme.ts +1 -1
  192. package/src/components/table/theme/Table.carbon.theme.ts +2 -2
  193. package/src/components/table/theme/TableHead.base.theme.ts +1 -1
  194. package/src/components/table/theme/TableHead.carbon.theme.ts +1 -1
  195. package/src/components/table/theme/TableHeader.base.theme.ts +1 -1
  196. package/src/components/table/theme/TableHeader.carbon.theme.ts +2 -2
  197. package/src/components/table/theme/TableRow.base.theme.ts +3 -3
  198. package/src/components/table/theme/TableRow.carbon.theme.ts +3 -3
  199. package/src/components/tag/Tag.vue +1 -1
  200. package/src/components/textarea/Textarea.vue +3 -1
  201. package/src/components/textarea/theme/Textarea.base.theme.ts +5 -4
  202. package/src/components/textarea/theme/Textarea.carbon.theme.ts +5 -5
  203. package/src/components/toggle/Toggle.vue +3 -3
  204. package/src/components/toggle/theme/Toggle.base.theme.ts +1 -1
  205. package/src/components/tooltip/ToggleTip.vue +31 -0
  206. package/src/components/tooltip/Tooltip.vue +14 -4
  207. package/src/components/tooltip/__tests__/ToggleTip.spec.ts +11 -0
  208. package/src/components/tooltip/index.ts +3 -0
  209. package/src/composables/useColors.ts +1 -1
  210. package/src/composables/useInputtable.ts +1 -0
  211. package/src/themes/base/index.ts +0 -3
  212. package/src/themes/base/styles.css +4 -0
  213. package/src/version.ts +1 -1
  214. package/volar.d.ts +1 -0
@@ -1,51 +1,49 @@
1
1
  <template>
2
- <div>
3
- <section class="p-4 lg:p-8 max-w-4xl xl:max-w-7xl mx-auto">
4
- <h2 class="text-4xl font-semibold">Getting Started</h2>
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
- <h3 class="text-2xl mb-4">Quickstart a new Vue 3 or Nuxt 3 project</h3>
9
- <p class="my-4">
10
- This following command will install and execute <x-link
11
- external
12
- href="https://github.com/indielayer/ui/tree/main/packages/create-ui"
13
- target="_blank"
14
- shadow
15
- color="primary"
16
- >@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.
17
- </p>
18
- <code-snippet :code="`npm init @indielayer/ui`" lang="bash"/>
19
- <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.
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
- <h3 class="text-2xl mt-16 mb-4 text-gray-500">Manual guide</h3>
24
- <h3 class="text-2xl mb-4">1. Install via package manager</h3>
25
- <multi-snippet
26
- :snippets="[{
27
- label: 'npm',
28
- lang: 'bash',
29
- code: 'npm install @indielayer/ui'
30
- }, {
31
- label: 'yarn',
32
- lang: 'bash',
33
- code: 'yarn add @indielayer/ui'
34
- }, {
35
- label: 'pnpm',
36
- lang: 'bash',
37
- code: 'pnpm add @indielayer/ui'
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
- <h3 class="text-2xl mt-8 mb-4">2. Setup TailwindCSS</h3>
42
- <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>
43
- <p class="my-4">
44
- 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>
45
- </p>
46
- <code-snippet
47
- lang="js"
48
- :code="`// tailwind.config.js
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
- <h3 class="text-2xl mt-8 mb-4">3. Load the UI in your project</h3>
78
- <h4 class="text-xl mt-8 mb-4">Load on a Vue 3 project</h4>
79
- <code-snippet
80
- lang="js"
81
- :code="`import { createApp } from 'vue'
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
- <h4 class="text-xl mt-8 mb-4">Load on a Nuxt 3 project</h4>
91
- <multi-snippet
92
- class="my-4"
93
- :snippets="[{
94
- label: 'npm',
95
- lang: 'bash',
96
- code: 'npm install @indielayer/ui @vueuse/core floating-vue -D'
97
- }, {
98
- label: 'yarn',
99
- lang: 'bash',
100
- code: 'yarn add @indielayer/ui @vueuse/core floating-vue -D'
101
- }, {
102
- label: 'pnpm',
103
- lang: 'bash',
104
- code: 'pnpm add @indielayer/ui @vueuse/core floating-vue -D'
105
- }]"
106
- />
107
- <code-snippet
108
- lang="js"
109
- :code="`import { colors } from '@indielayer/ui'
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
- <h3 class="text-2xl mt-8 mb-4">4. (optional) Load only the components you want</h3>
142
- <code-snippet
143
- lang="js"
144
- :code="`import { createApp } from 'vue'
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>
@@ -1,19 +1,7 @@
1
- <script>
1
+ <script setup lang="ts">
2
2
 
3
- export default {
4
- components: {
5
-
6
- },
7
- data() {
8
- return {
9
-
10
- }
11
- },
12
- }
13
3
  </script>
14
4
 
15
5
  <template>
16
- <div class="p-10">
17
- hello
18
- </div>
6
+ <div>playground</div>
19
7
  </template>
@@ -57,39 +57,35 @@ const textClasses = {
57
57
  </script>
58
58
 
59
59
  <template>
60
- <div>
61
- <section class="p-4 lg:p-8 max-w-4xl xl:max-w-7xl mx-auto">
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
- <x-divider class="mt-4 mb-8"/>
63
+ <x-divider class="mt-4 mb-8"/>
66
64
 
67
- <div>
68
- <div>Main font</div>
69
- <div class="text-gray-500 dark:text-gray-400">Inter</div>
70
- <div class="text-6xl mt-4">AaBbCc</div>
71
- </div>
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
- <div class="mt-10">
74
- <table class="text-left w-full">
75
- <tr>
76
- <th class="py-2">Class</th>
77
- <th>Size</th>
78
- <th>Line Height</th>
79
- <th>Preview</th>
80
- </tr>
81
- <tr v-for="(c, key) in textClasses" :key="key" class="border-t">
82
- <td class="py-2">{{ key }}</td>
83
- <td class="text-secondary-500 font-light">{{ c.size }}</td>
84
- <td class="text-secondary-500 font-light">{{ c.line }}</td>
85
- <td :class="key" class="max-w-lg truncate">Preview text</td>
86
- </tr>
87
- </table>
88
- </div>
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
- <div class="text-secondary-500 mt-4">
91
- See more about Tailwind typography classes here -> <x-link href="https://tailwindcss.com/docs/font-size" target="_blank" underline>Tailwind Documentation</x-link>
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>
@@ -58,6 +58,8 @@ const routes: RouteRecordRaw[] = [{
58
58
  }, {
59
59
  path: '/play',
60
60
  component: PlayPage,
61
+ }, {
62
+ path: '/:pathMatch(.*)*', name: 'NotFound', redirect: { name: 'getting-started' },
61
63
  }]
62
64
 
63
65
  const router = createRouter({
@@ -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: s, slots: i, data: e }) => {
4
- const t = ["relative flex items-center w-full text-left"];
5
- return e.isInsideAccordion && (i.default && (s.iconAlign === "left" ? t.push("pl-8 pr-4") : t.push("pr-8 pl-4"), t.push("py-2"), s.disabled || t.push("hover:bg-gray-50 dark:hover:bg-gray-600")), s.disabled || t.push("cursor-pointer")), t;
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: s, data: i }) => {
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"), s.disabled && e.push("text-gray-300"), s.iconAlign === "left" ? e.push("left-2") : e.push("right-2"), e;
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
- }, l = r;
13
+ }, n = r;
14
14
  export {
15
- l as default
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 m } from "../../composables/useCommon.js";
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
- ...m.props(),
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
- ...m.validators(),
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(u) {
43
- const t = u, d = z(), g = l(() => {
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"), d.content ? e.push("-m-[7.5%]") : t.outlined ? e.push("-m-[5%]") : e.push("-m-[3.5%]"), 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"), 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-gray-50 dark:border-gray-900": e.outlined
65
+ "border-2 border-secondary-50 dark:border-secondary-900": e.outlined
66
66
  }
67
67
  ]]),
68
68
  style: n(c.value)
@@ -2,7 +2,7 @@ const e = {
2
2
  classes: {
3
3
  wrapper: "flex items-center flex-wrap",
4
4
  item: "flex items-center last-of-type:font-semibold",
5
- separator: "text-gray-400 mx-1.5"
5
+ separator: "text-secondary-400 mx-1.5"
6
6
  }
7
7
  }, t = e;
8
8
  export {
@@ -1,4 +1,4 @@
1
- const g = {
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 = [], r = e.color && e.light, b = !e.color && !e.ghost;
12
- return e.glow && l.push(i.get("glow", n.getColorOpacity(e.color ? t[500] : a[500], 0.5))), b ? e.disabled ? l.push(i.variables({
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
- })) : r ? ((!e.outlined || e.disabled) && l.push(i.get("border", "transparent")), e.disabled ? l.push(i.variables({
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: d.isButtonGroup ? t[600] : "transparent",
113
+ border: t[600],
114
114
  dark: {
115
115
  text: "#fff",
116
- border: d.isButtonGroup ? t[500] : "transparent"
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 = g;
135
+ }, u = r;
136
136
  export {
137
137
  u as default
138
138
  };
@@ -1,6 +1,6 @@
1
1
  const a = {
2
2
  classes: {
3
- wrapper: ({ props: e }) => `rounded bg-white dark:bg-gray-800${e.flat ? "" : " shadow"}`
3
+ wrapper: ({ props: e }) => `bg-slate-50 dark:bg-slate-800 rounded-md ${e.flat ? "" : "shadow"}`
4
4
  }
5
5
  }, s = a;
6
6
  export {
@@ -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 o, 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";
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-gray-900"
13
- }, ae = /* @__PURE__ */ d("path", { d: "M0 11l2-2 5 5L18 3l2 2L7 18z" }, null, -1), oe = [
14
- ae
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 = o(r.value);
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 a = o(r.value);
54
+ const o = a(r.value);
55
55
  if (e)
56
- if (a && Array.isArray(a)) {
57
- if (!a.includes(s.value)) {
58
- const n = [...a, s.value];
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 (a && Array.isArray(a) && a.includes(s.value)) {
64
- const n = a.findIndex((D) => D === s.value), g = [...a];
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, a) => (i(), p("label", {
80
- style: R(o(L)),
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
- o(M),
83
- o(t).wrapper
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(o(t).content),
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": a[0] || (a[0] = (n) => l.value = n),
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
- o(t).box,
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([o(t).icon, { "opacity-0": !l.value }])
120
- }, oe, 2))
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(o(t).label)
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
- o(N) ? Q("", !0) : (i(), V(x, {
132
+ a(N) ? Q("", !0) : (i(), V(x, {
133
133
  key: 0,
134
- error: o(G),
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-2 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 === "xs" || r.size === "sm" ? e.push("h-4 w-4") : r.size === "xl" ? e.push("h-6 w-6") : e.push("h-5 w-5"), e;
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-center"];
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 dark:text-gray-900"];
17
- return r.size === "xs" || r.size === "sm" ? e.push("h-2 w-2") : r.size === "xl" ? e.push("h-4 w-4") : e.push("h-3 w-3"), e;
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-gray-800 dark:text-gray-200 pl-2"];
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-gray-900"];
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-gray-800 dark:text-gray-200 pl-2 text-sm"];
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
  },
@@ -1,8 +1,8 @@
1
1
  const a = {
2
2
  classes: {
3
3
  wrapper: ({ props: s }) => {
4
- const e = ["px-4 md:px-8"];
5
- return s.fluid || e.push("max-w-screen-2xl mx-auto"), e;
4
+ const e = ["px-4 md:px-6"];
5
+ return s.fluid || e.push("max-w-screen-lg mx-auto"), e;
6
6
  }
7
7
  }
8
8
  }, t = a;