@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
@@ -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,14 +1,11 @@
1
1
  import * as e from "./components.js";
2
2
  import s from "./styles.css.js";
3
- const o = {
3
+ const t = {
4
4
  name: "Base",
5
- colors: {
6
- primary: { 50: "#ecfdf5", 100: "#d1fae5", 200: "#a7f3d0", 300: "#6ee7b7", 400: "#34d399", 500: "#10b981", 600: "#059669", 700: "#047857", 800: "#065f46", 900: "#064e3b", 950: "#022c22" }
7
- },
8
5
  styles: `${s}`,
9
6
  classPrefix: "x-",
10
7
  components: e
11
- }, a = o;
8
+ }, m = t;
12
9
  export {
13
- a as default
10
+ m as default
14
11
  };
@@ -9,6 +9,10 @@ html.dark {
9
9
  background-color: #111827;
10
10
  }
11
11
 
12
+ body {
13
+ font-size: 14px;
14
+ }
15
+
12
16
  *,
13
17
  ::before,
14
18
  ::after {
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "1.4.0";
1
+ declare const _default: "1.5.0";
2
2
  export default _default;
package/lib/version.js CHANGED
@@ -1,4 +1,4 @@
1
- const e = "1.4.0";
1
+ const e = "1.5.0";
2
2
  export {
3
3
  e as default
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indielayer/ui",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Indielayer UI Components with Tailwind CSS build for Vue 3",
5
5
  "author": {
6
6
  "name": "João Teixeira",
@@ -35,6 +35,7 @@
35
35
  "require": "./lib/index.umd.js",
36
36
  "types": "./lib/index.d.ts"
37
37
  },
38
+ "./docs/*": "./docs/*",
38
39
  "./nuxt": "./exports/nuxt.mjs",
39
40
  "./nuxt.plugin": "./exports/nuxt.plugin.js",
40
41
  "./nuxt.plugin.js": "./exports/nuxt.plugin.js",
@@ -11,7 +11,7 @@ const theme: AccordionItemTheme = {
11
11
  if (props.iconAlign === 'left') classes.push('pl-8 pr-4')
12
12
  else classes.push('pr-8 pl-4')
13
13
  classes.push('py-2')
14
- if (!props.disabled) classes.push('hover:bg-gray-50 dark:hover:bg-gray-600')
14
+ if (!props.disabled) classes.push('hover:bg-secondary-50 dark:hover:bg-secondary-600')
15
15
  }
16
16
 
17
17
  if (!props.disabled) classes.push('cursor-pointer')
@@ -23,7 +23,7 @@ const theme: AccordionItemTheme = {
23
23
  const classes = ['absolute flex transform transition-transform duration-150']
24
24
 
25
25
  if (!data.collapsed) classes.push('rotate-180')
26
- if (props.disabled) classes.push('text-gray-300')
26
+ if (props.disabled) classes.push('text-secondary-300')
27
27
 
28
28
  if (props.iconAlign === 'left') classes.push('left-2')
29
29
  else classes.push('right-2')
@@ -101,7 +101,7 @@ const { styles, classes, className } = useTheme('Badge', {}, props)
101
101
  :class="[
102
102
  positionClasses,
103
103
  {
104
- 'border-2 border-gray-50 dark:border-gray-900': outlined,
104
+ 'border-2 border-secondary-50 dark:border-secondary-900': outlined,
105
105
  }
106
106
  ]"
107
107
  >
@@ -4,7 +4,7 @@ const theme: BreadcrumbsTheme = {
4
4
  classes: {
5
5
  wrapper: 'flex items-center flex-wrap',
6
6
  item: 'flex items-center last-of-type:font-semibold',
7
- separator: 'text-gray-400 mx-1.5',
7
+ separator: 'text-secondary-400 mx-1.5',
8
8
  },
9
9
  }
10
10
 
@@ -193,10 +193,10 @@ const theme: ButtonTheme = {
193
193
  // filled
194
194
  vars.push(css.variables({
195
195
  text: '#fff',
196
- border: !data.isButtonGroup ? 'transparent' : color[600],
196
+ border: color[600],
197
197
  dark: {
198
198
  text: '#fff',
199
- border: !data.isButtonGroup ? 'transparent' : color[500],
199
+ border: color[500],
200
200
  },
201
201
  }))
202
202
  if (props.disabled) {
@@ -2,7 +2,7 @@ import type { CardTheme } from '../Card.vue'
2
2
 
3
3
  const theme: CardTheme = {
4
4
  classes: {
5
- wrapper: ({ props }) => `rounded bg-white dark:bg-gray-800${props.flat ? '' : ' shadow'}`,
5
+ wrapper: ({ props }) => `bg-slate-50 dark:bg-slate-800 rounded-md ${props.flat ? '' : 'shadow'}`,
6
6
  },
7
7
  }
8
8
 
@@ -149,7 +149,7 @@ defineExpose({ focus, blur, toggle, reset, validate, setError })
149
149
  ]"
150
150
  >
151
151
  <x-spinner v-if="loading" :size="size" class="absolute" />
152
- <span v-else-if="indeterminate" name="check-icon" class="w-2/3 h-[2px] bg-white dark:bg-gray-900"></span>
152
+ <span v-else-if="indeterminate" name="check-icon" class="w-2/3 h-[2px] bg-white dark:bg-secondary-900"></span>
153
153
  <slot v-else name="icon">
154
154
  <svg
155
155
  viewBox="0 0 20 20"
@@ -11,17 +11,17 @@ const theme: CheckboxTheme = {
11
11
  },
12
12
 
13
13
  box: ({ props }) => {
14
- const classes = ['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)]']
14
+ const classes = ['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)]']
15
15
 
16
- if (props.size === 'xs' || props.size === 'sm') classes.push('h-4 w-4')
16
+ if (props.size === 'lg') classes.push('h-5 w-5')
17
17
  else if (props.size === 'xl') classes.push('h-6 w-6')
18
- else classes.push('h-5 w-5')
18
+ else classes.push('h-4 w-4')
19
19
 
20
20
  return classes
21
21
  },
22
22
 
23
23
  content: ({ props }) => {
24
- const classes = ['flex items-center']
24
+ const classes = ['flex items-baseline']
25
25
 
26
26
  if (props.disabled) classes.push('cursor-not-allowed')
27
27
 
@@ -29,17 +29,17 @@ const theme: CheckboxTheme = {
29
29
  },
30
30
 
31
31
  icon: ({ props }) => {
32
- const classes = ['fill-current text-white dark:text-gray-900']
32
+ const classes = ['fill-current text-white']
33
33
 
34
- if (props.size === 'xs' || props.size === 'sm') classes.push('h-2 w-2')
34
+ if (props.size === 'lg') classes.push('h-3 w-3')
35
35
  else if (props.size === 'xl') classes.push('h-4 w-4')
36
- else classes.push('h-3 w-3')
36
+ else classes.push('h-2.5 w-2.5')
37
37
 
38
38
  return classes
39
39
  },
40
40
 
41
41
  label: ({ props }) => {
42
- const classes = ['inline-block font-medium text-gray-800 dark:text-gray-200 pl-2']
42
+ const classes = ['inline-block font-medium text-secondary-800 dark:text-secondary-200 pl-2']
43
43
 
44
44
  if (props.size === 'xs') classes.push('text-xs')
45
45
  else if (props.size === 'sm') classes.push('text-sm')
@@ -29,7 +29,7 @@ const theme: CheckboxTheme = {
29
29
  },
30
30
 
31
31
  icon: ({ props }) => {
32
- const classes = ['fill-current text-white dark:text-gray-900']
32
+ const classes = ['fill-current text-white dark:text-secondary-900']
33
33
 
34
34
  if (props.size === 'xs' || props.size === 'sm') classes.push('h-2 w-2')
35
35
  else if (props.size === 'xl') classes.push('h-3.5 w-3.5')
@@ -39,7 +39,7 @@ const theme: CheckboxTheme = {
39
39
  },
40
40
 
41
41
  label: ({ props }) => {
42
- const classes = ['text-gray-800 dark:text-gray-200 pl-2 text-sm']
42
+ const classes = ['text-secondary-800 dark:text-secondary-200 pl-2 text-sm']
43
43
 
44
44
  if (props.size === 'xs') classes.push('text-xs')
45
45
  else if (props.size === 'sm') classes.push('text-sm')
@@ -3,9 +3,9 @@ import type { ContainerTheme } from '../Container.vue'
3
3
  const theme: ContainerTheme = {
4
4
  classes: {
5
5
  wrapper: ({ props }) => {
6
- const classes = ['px-4 md:px-8']
6
+ const classes = ['px-4 md:px-6']
7
7
 
8
- if (!props.fluid) classes.push('max-w-screen-2xl mx-auto')
8
+ if (!props.fluid) classes.push('max-w-screen-lg mx-auto')
9
9
 
10
10
  return classes
11
11
  },
@@ -40,7 +40,7 @@ const { styles, classes, className } = useTheme('Divider', {}, props)
40
40
  ></div>
41
41
  <div
42
42
  v-if="label"
43
- class="font-medium text-sm text-gray-600 dark:text-gray-300"
43
+ class="font-medium text-sm text-secondary-600 dark:text-secondary-300"
44
44
  :class="[
45
45
  classes.label,
46
46
  {
@@ -4,9 +4,9 @@ const theme: DividerTheme = {
4
4
  classes: {
5
5
  wrapper: ({ props }) => `flex justify-center items-center ${props.vertical ? 'h-full flex-col' : 'w-full'}`,
6
6
 
7
- label: 'font-medium text-sm text-gray-600 dark:text-gray-300',
7
+ label: 'font-medium text-sm text-secondary-600 dark:text-secondary-300',
8
8
 
9
- line: 'bg-gray-200 dark:bg-slate-700 flex-grow',
9
+ line: 'bg-secondary-200 dark:bg-secondary-700 flex-grow',
10
10
  },
11
11
  }
12
12
 
@@ -155,7 +155,7 @@ function onEnter(el: Element, done: () => void) {
155
155
  }
156
156
  el.addEventListener('transitionend', done)
157
157
  setTimeout(() => {
158
- if (props.backdrop) el.classList.add('bg-gray-500/30')
158
+ if (props.backdrop) el.classList.add('bg-slate-500/30')
159
159
  if (props.position === 'top') (el as HTMLElement).style.top = '0'
160
160
  else if (props.position === 'bottom') (el as HTMLElement).style.bottom = '0'
161
161
  else if (props.position === 'left') (el as HTMLElement).style.left = '0'
@@ -168,7 +168,7 @@ function onBeforeLeave(el: Element) {}
168
168
  function onLeave(el: Element, done: () => void) {
169
169
  el.addEventListener('transitionend', done)
170
170
  setTimeout(() => {
171
- if (props.backdrop) el.classList.remove('bg-gray-500/30')
171
+ if (props.backdrop) el.classList.remove('bg-slate-500/30')
172
172
  if (props.position === 'top') (el as HTMLElement).style.top = `-${props.height}px`
173
173
  else if (props.position === 'bottom') (el as HTMLElement).style.bottom = `-${props.height}px`
174
174
  else if (props.position === 'left') (el as HTMLElement).style.left = `-${props.width}px`
@@ -2,7 +2,7 @@ import type { DrawerTheme } from '../Drawer.vue'
2
2
 
3
3
  const theme: DrawerTheme = {
4
4
  classes: {
5
- wrapper: 'flex flex-col max-h-full bg-white dark:bg-gray-800',
5
+ wrapper: 'flex flex-col max-h-full bg-white dark:bg-secondary-800',
6
6
 
7
7
  backdrop: 'duration-150 ease-in-out',
8
8
  },
@@ -139,7 +139,7 @@ const { styles, classes, className } = useTheme('Form', {}, props)
139
139
  @submit="submit"
140
140
  >
141
141
  <slot name="header">
142
- <div v-if="title || description" class="mb-10">
142
+ <div v-if="title || description" class="mb-6">
143
143
  <p v-if="title" :class="classes.title">{{ title }}</p>
144
144
  <p v-if="description" :class="classes.description">{{ description }}</p>
145
145
  </div>
@@ -8,7 +8,7 @@ const theme: FormTheme = {
8
8
 
9
9
  title: 'text-xl mb-1',
10
10
 
11
- description: 'text-gray-500',
11
+ description: 'text-secondary-500',
12
12
 
13
13
  footer: 'space-x-4 mt-4',
14
14
  },
@@ -8,7 +8,7 @@ const theme: FormTheme = {
8
8
 
9
9
  title: 'text-xl mb-1',
10
10
 
11
- description: 'text-gray-500',
11
+ description: 'text-secondary-500',
12
12
 
13
13
  footer: 'grid grid-cols-2 gap-4 lg:flex mt-8',
14
14
  },
@@ -106,6 +106,7 @@ defineExpose({ focus, blur, reset, validate, setError })
106
106
  :class="[
107
107
  className,
108
108
  ]"
109
+ :tooltip="tooltip"
109
110
  v-on="listeners"
110
111
  >
111
112
  <div :class="classes.wrapper">
@@ -5,7 +5,7 @@ const theme: FormGroupTheme = {
5
5
  wrapper: ({ props }) => {
6
6
  const classes = ['']
7
7
 
8
- if (!props.vertical) classes.push('flex gap-2')
8
+ if (!props.vertical) classes.push('flex gap-4')
9
9
  else classes.push('grid gap-1')
10
10
 
11
11
  return classes
@@ -8,9 +8,9 @@ const theme: IconTheme = {
8
8
  if (props.size === 'xs') return classes + ' h-3 w-3'
9
9
  else if (props.size === 'sm') return classes + ' h-4 w-4'
10
10
  else if (props.size === 'lg') return classes + ' h-6 w-6'
11
- else if (props.size === 'xl') return classes + ' h-9 w-9'
11
+ else if (props.size === 'xl') return classes + ' h-7 w-7'
12
12
 
13
- return classes + ' h-5 w-5'
13
+ return classes + ' h-4 w-4'
14
14
  },
15
15
  },
16
16
  }
@@ -114,6 +114,7 @@ defineExpose({ focus, blur, reset, validate, setError })
114
114
  className,
115
115
  classes.wrapper,
116
116
  ]"
117
+ :tooltip="tooltip"
117
118
  >
118
119
  <div class="relative">
119
120
  <slot name="prefix">
@@ -134,7 +135,7 @@ defineExpose({ focus, blur, reset, validate, setError })
134
135
  type === 'password' ? 'pr-10' : '',
135
136
  // error
136
137
  errorInternal
137
- ? 'border-red-500 dark:border-red-400 focus:outline-red-500'
138
+ ? 'border-error-500 dark:border-error-400 focus:outline-error-500'
138
139
  : 'focus:outline-[color:var(--x-input-border)]',
139
140
  {
140
141
  '!pl-10': iconLeft,
@@ -5,9 +5,9 @@ const theme: InputTheme = {
5
5
  wrapper: '',
6
6
 
7
7
  input: ({ props, data }) => {
8
- const classes = ['appearance-none block w-full placeholder-gray-400 dark:placeholder-gray-500 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out border-gray-300 dark:border-gray-700 border shadow-sm rounded-md']
8
+ const classes = ['appearance-none block w-full placeholder-secondary-400 dark:placeholder-secondary-500 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out border-secondary-300 dark:border-secondary-700 border shadow-sm rounded-md']
9
9
 
10
- if (!data.errorInternal && !props.disabled) classes.push('hover:border-gray-400 dark:hover:border-gray-500')
10
+ if (!data.errorInternal && !props.disabled) classes.push('hover:border-secondary-400 dark:hover:border-secondary-500')
11
11
 
12
12
  if (props.size === 'xs') classes.push('px-2 py-1 text-xs')
13
13
  else if (props.size === 'sm') classes.push('px-2 py-2 text-sm')
@@ -16,13 +16,13 @@ const theme: InputTheme = {
16
16
  else classes.push('px-3 py-2')
17
17
 
18
18
  classes.push(props.disabled
19
- ? 'bg-gray-100 dark:bg-gray-900 text-gray-500 cursor-not-allowed'
20
- : 'bg-white dark:bg-gray-800 text-gray-700 dark:text-gray-200')
19
+ ? 'bg-secondary-100 dark:bg-secondary-700 text-secondary-400 dark:text-secondary-600 cursor-not-allowed'
20
+ : 'bg-white dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200')
21
21
 
22
22
  return classes
23
23
  },
24
24
 
25
- icon: 'text-gray-600 dark:text-gray-300 absolute my-auto inset-y-0',
25
+ icon: 'text-secondary-600 dark:text-secondary-300 absolute my-auto inset-y-0',
26
26
  },
27
27
 
28
28
  styles: ({ colors, props, css }) => {
@@ -5,26 +5,26 @@ const theme: InputTheme = {
5
5
  wrapper: '',
6
6
 
7
7
  input: ({ props, data }) => {
8
- const classes = ['appearance-none block w-full placeholder-gray-400 dark:placeholder-gray-500 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out border-gray-300 dark:border-gray-700 border-b text-sm px-4']
8
+ const classes = ['appearance-none block w-full placeholder-secondary-400 dark:placeholder-secondary-500 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out border-secondary-300 dark:border-secondary-700 border-b text-sm px-4']
9
9
 
10
- if (!data.errorInternal && !props.disabled) classes.push('hover:border-gray-400 dark:hover:border-gray-500')
10
+ if (!data.errorInternal && !props.disabled) classes.push('hover:border-secondary-400 dark:hover:border-secondary-500')
11
11
 
12
12
  if (props.size === 'xs' || props.size === 'sm') classes.push('py-1.5')
13
13
  else if (props.size === 'lg' || props.size === 'xl') classes.push('py-3.5')
14
14
  else classes.push('py-2.5')
15
15
 
16
16
  if (props.disabled) {
17
- classes.push('bg-gray-100 dark:bg-gray-900 text-gray-300 cursor-not-allowed')
17
+ classes.push('bg-secondary-100 dark:bg-secondary-900 text-secondary-300 cursor-not-allowed')
18
18
  } else if (props.readonly) {
19
- classes.push('bg-white dark:bg-gray-900 text-gray-700')
19
+ classes.push('bg-white dark:bg-secondary-900 text-secondary-700')
20
20
  } else {
21
- classes.push('bg-gray-50 dark:bg-gray-800 text-gray-700 dark:text-gray-200')
21
+ classes.push('bg-secondary-50 dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200')
22
22
  }
23
23
 
24
24
  return classes
25
25
  },
26
26
 
27
- icon: 'text-gray-600 dark:text-gray-300 absolute my-auto inset-y-0',
27
+ icon: 'text-secondary-600 dark:text-secondary-300 absolute my-auto inset-y-0',
28
28
  },
29
29
 
30
30
  styles: ({ colors, props, css }) => {
@@ -2,9 +2,9 @@ import type { InputFooterTheme } from '../InputFooter.vue'
2
2
 
3
3
  const theme: InputFooterTheme = {
4
4
  classes: {
5
- wrapper: 'min-h-[1.3rem] text-sm mt-1',
6
- helperText: 'text-gray-500 dark:text-gray-400',
7
- errorText: 'text-red-500 dark:text-red-400',
5
+ wrapper: 'min-h-[1.3rem] text-xs mt-1',
6
+ helperText: 'text-secondary-500 dark:text-secondary-400',
7
+ errorText: 'text-error-500 dark:text-error-400',
8
8
  },
9
9
  }
10
10
 
@@ -3,8 +3,8 @@ import type { InputFooterTheme } from '../InputFooter.vue'
3
3
  const theme: InputFooterTheme = {
4
4
  classes: {
5
5
  wrapper: 'text-xs mt-1',
6
- helperText: 'text-gray-500 dark:text-gray-400',
7
- errorText: 'text-red-500 dark:text-red-400',
6
+ helperText: 'text-secondary-500 dark:text-secondary-400',
7
+ errorText: 'text-error-500 dark:text-error-400',
8
8
  },
9
9
  }
10
10
 
@@ -10,6 +10,7 @@ const labelProps = {
10
10
  type: String,
11
11
  default: 'label',
12
12
  },
13
+ tooltip: String,
13
14
  }
14
15
 
15
16
  export type LabelProps = ExtractPublicPropTypes<typeof labelProps>
@@ -29,6 +30,7 @@ export default {
29
30
  import type { ExtractPublicPropTypes } from 'vue'
30
31
  import { useTheme, type ThemeComponent } from '../../composables/useTheme'
31
32
  import { useCommon } from '../../composables/useCommon'
33
+ import XToggleTip from '../tooltip/ToggleTip.vue'
32
34
 
33
35
  const props = defineProps(labelProps)
34
36
 
@@ -47,7 +49,8 @@ const { styles, classes, className } = useTheme('Label', {}, props)
47
49
  :title="label"
48
50
  :class="classes.label"
49
51
  >
50
- {{ label }}
52
+ <span>{{ label }}</span>
53
+ <x-toggle-tip v-if="tooltip" :content="tooltip"/>
51
54
  </component>
52
55
  <slot></slot>
53
56
  </component>
@@ -12,7 +12,7 @@ const theme: LabelTheme = {
12
12
  },
13
13
 
14
14
  label: ({ props }) => {
15
- const classes = 'font-medium text-gray-800 dark:text-gray-200 mb-1'
15
+ const classes = 'flex items-center gap-2 font-medium text-secondary-800 dark:text-secondary-200 mb-1'
16
16
 
17
17
  if (props.size === 'xs') return classes + ' text-xs'
18
18
  else if (props.size === 'sm') return classes + ' text-sm'
@@ -11,7 +11,7 @@ const theme: LabelTheme = {
11
11
  return classes
12
12
  },
13
13
 
14
- label: 'text-xs text-gray-500 dark:text-gray-200 mb-2',
14
+ label: 'text-xs text-secondary-500 dark:text-secondary-200 mb-2',
15
15
  },
16
16
  }
17
17
 
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  const linkProps = {
3
- ...useColors.props('primary'),
3
+ ...useColors.props('secondary'),
4
4
  tag: {
5
5
  type: String,
6
6
  default: 'a',
@@ -4,7 +4,7 @@ const theme: LoaderTheme = {
4
4
  classes: {
5
5
  wrapper: 'inline-flex items-center justify-center',
6
6
  iconSuccess: 'text-green-500',
7
- iconError: 'text-red-500',
7
+ iconError: 'text-error-500',
8
8
  label: 'mx-2 text-sm',
9
9
  },
10
10
  }
@@ -4,7 +4,7 @@ const theme: LoaderTheme = {
4
4
  classes: {
5
5
  wrapper: 'inline-flex items-center justify-center',
6
6
  iconSuccess: 'text-green-500',
7
- iconError: 'text-red-500',
7
+ iconError: 'text-error-500',
8
8
  label: 'mx-2 text-sm',
9
9
  },
10
10
  }
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  const menuProps = {
3
3
  ...useCommon.props(),
4
- ...useColors.props('primary'),
4
+ ...useColors.props('secondary'),
5
5
  items: Array as PropType<MenuArrayItem[]>,
6
6
  collapsible: {
7
7
  type: Boolean,
@@ -109,7 +109,7 @@ const { styles, classes, className } = useTheme('Menu', {}, props)
109
109
  </template>
110
110
  <template #content="{ expand }">
111
111
  <x-menu
112
- class="border-l ml-4 border-gray-100 dark:border-gray-700"
112
+ class="border-l ml-4 border-secondary-100 dark:border-secondary-700"
113
113
  :class="{ 'pl-1': filled }"
114
114
  :items="item.items"
115
115
  :color="item.color || color"
@@ -138,7 +138,7 @@ const { styles, classes, className } = useTheme('Menu', {}, props)
138
138
  @click="$emit('item-click')"
139
139
  />
140
140
  <x-menu
141
- class="x-menu-inner space-y-1 ml-4 border-l border-gray-100 dark:border-gray-700"
141
+ class="x-menu-inner space-y-1 ml-4 border-l border-secondary-100 dark:border-secondary-700"
142
142
  :class="{ 'pl-1': filled }"
143
143
  :items="item.items"
144
144
  :color="item.color || color"