vueless 0.0.824 → 0.0.825-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/bin/constants.js +14 -13
  2. package/composables/useUI.ts +20 -14
  3. package/constants.js +156 -325
  4. package/directives/clickOutside/storybook/stories.ts +2 -2
  5. package/directives/tooltip/storybook/stories.ts +5 -5
  6. package/package.json +6 -5
  7. package/tailwind.css +179 -0
  8. package/types.ts +118 -51
  9. package/ui.button/config.ts +40 -103
  10. package/ui.button/storybook/stories.ts +3 -14
  11. package/ui.button/types.ts +2 -28
  12. package/ui.button-link/config.ts +14 -25
  13. package/ui.button-link/storybook/stories.ts +2 -2
  14. package/ui.button-link/types.ts +1 -22
  15. package/ui.button-toggle/UToggle.vue +1 -1
  16. package/ui.button-toggle/config.ts +7 -10
  17. package/ui.button-toggle/storybook/stories.ts +2 -3
  18. package/ui.container-accordion/UAccordion.vue +7 -1
  19. package/ui.container-accordion/config.ts +7 -7
  20. package/ui.container-accordion/storybook/stories.ts +1 -1
  21. package/ui.container-card/config.ts +3 -3
  22. package/ui.container-col/storybook/stories.ts +1 -1
  23. package/ui.container-divider/config.ts +8 -8
  24. package/ui.container-group/storybook/stories.ts +1 -1
  25. package/ui.container-modal/UModal.vue +2 -2
  26. package/ui.container-modal/config.ts +5 -5
  27. package/ui.container-modal/storybook/stories.ts +1 -1
  28. package/ui.container-modal-confirm/UModalConfirm.vue +2 -2
  29. package/ui.container-modal-confirm/config.ts +1 -1
  30. package/ui.container-modal-confirm/storybook/stories.ts +2 -2
  31. package/ui.container-modal-confirm/types.ts +1 -22
  32. package/ui.container-page/UPage.vue +3 -3
  33. package/ui.container-page/config.ts +13 -13
  34. package/ui.container-page/storybook/stories.ts +2 -2
  35. package/ui.container-page/types.ts +2 -2
  36. package/ui.container-row/storybook/stories.ts +1 -1
  37. package/ui.data-list/UDataList.vue +1 -1
  38. package/ui.data-list/config.ts +6 -6
  39. package/ui.data-list/storybook/stories.ts +1 -1
  40. package/ui.data-table/UTable.vue +2 -2
  41. package/ui.data-table/UTableRow.vue +2 -2
  42. package/ui.data-table/config.ts +19 -22
  43. package/ui.data-table/storybook/stories.ts +8 -8
  44. package/ui.data-table/types.ts +1 -1
  45. package/ui.dropdown-badge/config.ts +3 -3
  46. package/ui.dropdown-badge/storybook/stories.ts +3 -3
  47. package/ui.dropdown-badge/types.ts +2 -23
  48. package/ui.dropdown-button/UDropdownButton.vue +0 -1
  49. package/ui.dropdown-button/config.ts +3 -4
  50. package/ui.dropdown-button/storybook/stories.ts +3 -6
  51. package/ui.dropdown-button/types.ts +2 -28
  52. package/ui.dropdown-link/UDropdownLink.vue +3 -0
  53. package/ui.dropdown-link/config.ts +5 -14
  54. package/ui.dropdown-link/storybook/stories.ts +4 -4
  55. package/ui.dropdown-link/types.ts +1 -22
  56. package/ui.dropdown-list/UDropdownList.vue +3 -2
  57. package/ui.dropdown-list/config.ts +20 -32
  58. package/ui.dropdown-list/types.ts +1 -22
  59. package/ui.form-calendar/UCalendar.vue +6 -7
  60. package/ui.form-calendar/UCalendarDayView.vue +26 -32
  61. package/ui.form-calendar/UCalendarMonthView.vue +23 -27
  62. package/ui.form-calendar/UCalendarYearView.vue +23 -27
  63. package/ui.form-calendar/config.ts +18 -18
  64. package/ui.form-checkbox/UCheckbox.vue +4 -10
  65. package/ui.form-checkbox/config.ts +15 -20
  66. package/ui.form-checkbox/storybook/stories.ts +3 -3
  67. package/ui.form-checkbox/types.ts +1 -21
  68. package/ui.form-checkbox-group/config.ts +1 -1
  69. package/ui.form-checkbox-group/storybook/stories.ts +2 -2
  70. package/ui.form-checkbox-group/types.ts +1 -21
  71. package/ui.form-checkbox-multi-state/config.ts +1 -1
  72. package/ui.form-checkbox-multi-state/types.ts +1 -21
  73. package/ui.form-color-picker/UColorPicker.vue +1 -2
  74. package/ui.form-color-picker/config.ts +1 -2
  75. package/ui.form-color-picker/storybook/stories.ts +3 -3
  76. package/ui.form-color-picker/types.ts +3 -3
  77. package/ui.form-date-picker/UDatePicker.vue +2 -2
  78. package/ui.form-date-picker/config.ts +2 -2
  79. package/ui.form-date-picker/storybook/stories.ts +4 -4
  80. package/ui.form-date-picker-range/UDatePickerRange.vue +6 -9
  81. package/ui.form-date-picker-range/UDatePickerRangePeriodMenu.vue +17 -26
  82. package/ui.form-date-picker-range/config.ts +10 -10
  83. package/ui.form-date-picker-range/storybook/stories.ts +4 -4
  84. package/ui.form-input/UInput.vue +9 -3
  85. package/ui.form-input/config.ts +12 -11
  86. package/ui.form-input-file/UInputFile.vue +3 -5
  87. package/ui.form-input-file/config.ts +12 -12
  88. package/ui.form-input-file/storybook/stories.ts +1 -1
  89. package/ui.form-input-number/UInputNumber.vue +4 -6
  90. package/ui.form-input-number/config.ts +3 -3
  91. package/ui.form-input-rating/config.ts +5 -5
  92. package/ui.form-input-rating/storybook/stories.ts +2 -2
  93. package/ui.form-input-search/UInputSearch.vue +2 -2
  94. package/ui.form-input-search/config.ts +1 -1
  95. package/ui.form-input-search/storybook/stories.ts +7 -3
  96. package/ui.form-label/config.ts +17 -17
  97. package/ui.form-label/storybook/stories.ts +2 -2
  98. package/ui.form-radio/URadio.vue +9 -6
  99. package/ui.form-radio/config.ts +11 -14
  100. package/ui.form-radio/storybook/stories.ts +3 -3
  101. package/ui.form-radio/types.ts +1 -21
  102. package/ui.form-radio-group/config.ts +1 -1
  103. package/ui.form-radio-group/storybook/stories.ts +2 -2
  104. package/ui.form-radio-group/types.ts +1 -21
  105. package/ui.form-select/USelect.vue +4 -4
  106. package/ui.form-select/config.ts +24 -24
  107. package/ui.form-select/storybook/stories.ts +4 -4
  108. package/ui.form-switch/config.ts +14 -20
  109. package/ui.form-switch/storybook/stories.ts +1 -1
  110. package/ui.form-switch/types.ts +1 -21
  111. package/ui.form-textarea/config.ts +13 -12
  112. package/ui.form-textarea/storybook/stories.ts +1 -1
  113. package/ui.image-avatar/UAvatar.vue +2 -6
  114. package/ui.image-avatar/config.ts +13 -19
  115. package/ui.image-avatar/types.ts +2 -23
  116. package/ui.image-icon/config.ts +10 -10
  117. package/ui.image-icon/storybook/stories.ts +1 -1
  118. package/ui.image-icon/types.ts +12 -22
  119. package/ui.loader/config.ts +2 -5
  120. package/ui.loader/storybook/stories.ts +1 -1
  121. package/ui.loader/types.ts +7 -22
  122. package/ui.loader-overlay/ULoaderOverlay.vue +1 -10
  123. package/ui.loader-overlay/config.ts +3 -5
  124. package/ui.loader-overlay/types.ts +1 -23
  125. package/ui.loader-progress/config.ts +3 -7
  126. package/ui.loader-progress/types.ts +1 -22
  127. package/ui.navigation-breadcrumbs/storybook/stories.ts +2 -2
  128. package/ui.navigation-breadcrumbs/types.ts +1 -22
  129. package/ui.navigation-pagination/UPagination.vue +10 -11
  130. package/ui.navigation-pagination/config.ts +4 -4
  131. package/ui.navigation-pagination/storybook/stories.ts +1 -1
  132. package/ui.navigation-pagination/types.ts +1 -1
  133. package/ui.navigation-progress/UProgress.vue +5 -1
  134. package/ui.navigation-progress/UStepperProgress.vue +1 -16
  135. package/ui.navigation-progress/config.ts +21 -68
  136. package/ui.navigation-progress/storybook/stories.ts +2 -2
  137. package/ui.navigation-progress/types.ts +2 -23
  138. package/ui.navigation-tab/UTab.vue +1 -1
  139. package/ui.navigation-tab/config.ts +2 -2
  140. package/ui.navigation-tabs/config.ts +2 -2
  141. package/ui.other-dot/config.ts +2 -6
  142. package/ui.other-dot/storybook/stories.ts +1 -1
  143. package/ui.other-dot/types.ts +1 -22
  144. package/ui.other-theme-color-toggle/UThemeColorToggle.vue +35 -44
  145. package/ui.other-theme-color-toggle/config.ts +1 -1
  146. package/ui.other-theme-color-toggle/storybook/stories.ts +10 -10
  147. package/ui.other-theme-color-toggle/types.ts +11 -11
  148. package/ui.text-alert/UAlert.vue +2 -6
  149. package/ui.text-alert/config.ts +20 -50
  150. package/ui.text-alert/storybook/stories.ts +11 -11
  151. package/ui.text-alert/types.ts +3 -29
  152. package/ui.text-badge/config.ts +15 -34
  153. package/ui.text-badge/storybook/stories.ts +0 -15
  154. package/ui.text-badge/types.ts +2 -28
  155. package/ui.text-block/config.ts +4 -3
  156. package/ui.text-block/storybook/stories.ts +1 -1
  157. package/ui.text-empty/UEmpty.vue +6 -1
  158. package/ui.text-empty/config.ts +3 -3
  159. package/ui.text-empty/storybook/stories.ts +2 -2
  160. package/ui.text-file/UFile.vue +3 -3
  161. package/ui.text-file/storybook/stories.ts +2 -2
  162. package/ui.text-files/storybook/stories.ts +2 -2
  163. package/ui.text-header/config.ts +4 -13
  164. package/ui.text-header/storybook/stories.ts +1 -1
  165. package/ui.text-header/types.ts +1 -22
  166. package/ui.text-money/config.ts +1 -1
  167. package/ui.text-money/types.ts +1 -22
  168. package/ui.text-notify/UNotify.vue +4 -4
  169. package/ui.text-notify/config.ts +2 -2
  170. package/ui.text-notify/storybook/stories.ts +3 -3
  171. package/ui.text-number/config.ts +5 -9
  172. package/ui.text-number/storybook/stories.ts +2 -2
  173. package/ui.text-number/types.ts +1 -22
  174. package/utils/node/tailwindSafelist.js +44 -158
  175. package/utils/theme.ts +217 -104
  176. package/utils/ui.ts +3 -31
  177. package/preset-tailwind.js +0 -192
package/bin/constants.js CHANGED
@@ -6,13 +6,24 @@ export default {
6
6
  * Global settings.
7
7
  */
8
8
  strategy: "merge",
9
- brand: "grayscale",
10
- gray: "cool",
9
+ primary: "grayscale",
10
+ neutral: "gray",
11
11
  outline: 2,
12
12
  rounding: 8,
13
+ fontSize: 14,
13
14
  colorMode: "auto",
14
15
  baseClasses: "",
15
16
 
17
+ /**
18
+ * Light theme CSS variable settings.
19
+ */
20
+ lightTheme: {},
21
+
22
+ /**
23
+ * Dark theme CSS variable settings.
24
+ */
25
+ darkTheme: {},
26
+
16
27
  /**
17
28
  * Directive settings.
18
29
  */
@@ -23,20 +34,10 @@ export default {
23
34
  */
24
35
  components: /*tw*/ {},
25
36
 
26
- /**
27
- * Tailwind CSS theme config.
28
- * https://tailwindcss.com/docs/theme
29
- */
30
- tailwindTheme: {
31
- extend: {
32
- colors: {},
33
- },
34
- },
35
-
36
37
  /**
37
38
  * Custom classes TailwindMerge settings.
38
39
  * All lists of rules available here:
39
- * https://github.com/dcastil/tailwind-merge/blob/v2.3.0/src/lib/default-config.ts
40
+ * https://github.com/dcastil/tailwind-merge/blob/main/src/lib/default-config.ts
40
41
  */
41
42
  tailwindMerge: {},
42
43
  };
@@ -1,7 +1,7 @@
1
- import { ref, watch, watchEffect, getCurrentInstance, toValue, useAttrs, computed } from "vue";
1
+ import { ref, watch, getCurrentInstance, toValue, useAttrs, computed } from "vue";
2
2
  import { isEqual } from "lodash-es";
3
3
 
4
- import { cx, cva, setColor, getColor, vuelessConfig, getMergedConfig } from "../utils/ui.ts";
4
+ import { cx, cva, setColor, vuelessConfig, getMergedConfig } from "../utils/ui.ts";
5
5
  import { isCSR } from "../utils/helper.ts";
6
6
  import {
7
7
  STRATEGY_TYPE,
@@ -20,9 +20,9 @@ import type {
20
20
  KeyAttrs,
21
21
  KeysAttrs,
22
22
  Strategies,
23
- BrandColors,
24
23
  MutatedProps,
25
24
  UnknownObject,
25
+ PrimaryColors,
26
26
  ComponentNames,
27
27
  NestedComponent,
28
28
  ComponentConfigFull,
@@ -56,16 +56,22 @@ export default function useUI<T>(
56
56
  const firstClassKey = Object.keys(defaultConfig || {})[0];
57
57
  const config = ref({}) as Ref<ComponentConfigFull<T>>;
58
58
 
59
- watchEffect(() => {
60
- const propsConfig = props.config as ComponentConfigFull<T>;
59
+ watch(
60
+ () => props.config,
61
+ (newVal, oldVal) => {
62
+ if (isEqual(newVal, oldVal)) return;
63
+
64
+ const propsConfig = props.config as ComponentConfigFull<T>;
61
65
 
62
- config.value = getMergedConfig({
63
- defaultConfig,
64
- globalConfig,
65
- propsConfig,
66
- vuelessStrategy,
67
- }) as ComponentConfigFull<T>;
68
- });
66
+ config.value = getMergedConfig({
67
+ defaultConfig,
68
+ globalConfig,
69
+ propsConfig,
70
+ vuelessStrategy,
71
+ }) as ComponentConfigFull<T>;
72
+ },
73
+ { deep: true, immediate: true },
74
+ );
69
75
 
70
76
  /**
71
77
  * Get classes by given key (including CVA if config set).
@@ -74,7 +80,7 @@ export default function useUI<T>(
74
80
  return computed(() => {
75
81
  const mutatedPropsValue = toValue(mutatedProps);
76
82
  const value = (config.value as ComponentConfigFull<T>)[key];
77
- const color = (toValue(mutatedProps || {}).color || props.color) as BrandColors;
83
+ const color = (toValue(mutatedProps || {}).color || props.color) as PrimaryColors;
78
84
 
79
85
  const isTopLevelKey = (topLevelClassKey || firstClassKey) === key;
80
86
  const isNestedComponent = Boolean(getNestedComponent(value));
@@ -85,7 +91,7 @@ export default function useUI<T>(
85
91
  classes = cva(value)({
86
92
  ...props,
87
93
  ...mutatedPropsValue,
88
- ...(color ? { color: getColor(color) } : {}),
94
+ ...(color ? { color } : {}),
89
95
  });
90
96
  }
91
97
 
package/constants.js CHANGED
@@ -4,9 +4,8 @@
4
4
  */
5
5
 
6
6
  /* Custom Vueless colors */
7
- export const BRAND_COLOR = "brand";
8
- export const GRAY_COLOR = "gray";
9
- export const COOL_COLOR = "cool";
7
+ export const PRIMARY_COLOR = "primary";
8
+ export const NEUTRAL_COLOR = "neutral";
10
9
  export const GRAYSCALE_COLOR = "grayscale";
11
10
 
12
11
  /* Vueless dark mode */
@@ -15,22 +14,21 @@ export const LIGHT_MODE_SELECTOR = "vl-light";
15
14
  export const COLOR_MODE_KEY = "vl-color-mode";
16
15
 
17
16
  /* Vueless defaults */
18
- export const DEFAULT_BRAND_COLOR = GRAYSCALE_COLOR;
19
- export const DEFAULT_GRAY_COLOR = COOL_COLOR;
17
+ export const DEFAULT_PRIMARY_COLOR = GRAYSCALE_COLOR;
18
+ export const DEFAULT_NEUTRAL_COLOR = "gray";
19
+ export const DEFAULT_FONT_SIZE = 14; /* pixels */
20
+ export const FONT_SIZE_DECREMENT = 2; /* pixels */
21
+ export const FONT_SIZE_INCREMENT = 2; /* pixels */
20
22
  export const DEFAULT_OUTLINE = 2; /* pixels */
21
23
  export const OUTLINE_DECREMENT = 1; /* pixels */
22
24
  export const OUTLINE_INCREMENT = 1; /* pixels */
23
25
  export const DEFAULT_ROUNDING = 8; /* pixels */
24
26
  export const ROUNDING_DECREMENT = 4; /* pixels */
25
27
  export const ROUNDING_INCREMENT = 6; /* pixels */
26
- export const DEFAULT_BASE_CLASSES = `
27
- text-gray-900 dark:text-gray-100
28
- `;
28
+ export const DEFAULT_BASE_CLASSES = ``;
29
29
 
30
- /* Vueless supported colors and shades */
31
- export const COLOR_SHADES = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
32
- export const GRAY_COLORS = ["slate", COOL_COLOR, "zinc", "neutral", "stone"];
33
- export const BRAND_COLORS = [
30
+ /* Vueless supported color shades */
31
+ export const PRIMARY_COLORS = [
34
32
  "red",
35
33
  "orange",
36
34
  "amber",
@@ -49,6 +47,123 @@ export const BRAND_COLORS = [
49
47
  "pink",
50
48
  "rose",
51
49
  ];
50
+ export const STATE_COLORS = ["info", "warning", "error", "success"];
51
+ export const NEUTRAL_COLORS = ["slate", "gray", "zinc", "neutral", "stone"];
52
+ export const COLOR_SHADES = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
53
+
54
+ export const DEFAULT_LIGHT_THEME = {
55
+ /* Primary colors */
56
+ "--vl-primary": "--color-primary-600",
57
+ "--vl-primary-lifted": "--color-primary-700",
58
+ "--vl-primary-accented": "--color-primary-800",
59
+
60
+ /* Info colors */
61
+ "--vl-info": "--color-blue-600",
62
+ "--vl-info-lifted": "--color-blue-700",
63
+ "--vl-info-accented": "--color-blue-800",
64
+
65
+ /* Error colors */
66
+ "--vl-error": "--color-red-600",
67
+ "--vl-error-lifted": "--color-red-700",
68
+ "--vl-error-accented": "--color-red-800",
69
+
70
+ /* Warning colors */
71
+ "--vl-warning": "--color-orange-600",
72
+ "--vl-warning-lifted": "--color-orange-700",
73
+ "--vl-warning-accented": "--color-orange-800",
74
+
75
+ /* Success colors */
76
+ "--vl-success": "--color-green-600",
77
+ "--vl-success-lifted": "--color-green-700",
78
+ "--vl-success-accented": "--color-green-800",
79
+
80
+ /* Neutral colors */
81
+ "--vl-neutral": "--vl-neutral-500",
82
+ "--vl-neutral-lifted": "--vl-neutral-600",
83
+ "--vl-neutral-accented": "--vl-neutral-700",
84
+
85
+ /* Grayscale colors */
86
+ "--vl-grayscale": "--vl-neutral-900",
87
+ "--vl-grayscale-lifted": "--vl-neutral-800",
88
+ "--vl-grayscale-accented": "--vl-neutral-700",
89
+
90
+ /* Text neutral colors */
91
+ "--vl-text": "--vl-neutral-900",
92
+ "--vl-text-lifted": "--vl-neutral-500",
93
+ "--vl-text-accented": "--vl-neutral-600",
94
+ "--vl-text-muted": "--vl-neutral-400",
95
+ "--vl-text-inverted": "--color-white",
96
+
97
+ /* Border neutral colors */
98
+ "--vl-border": "--vl-neutral-300",
99
+ "--vl-border-lifted": "--vl-neutral-400",
100
+ "--vl-border-accented": "--vl-neutral-600",
101
+ "--vl-border-muted": "--vl-neutral-200",
102
+
103
+ /* Background neutral colors */
104
+ "--vl-bg": "--color-white",
105
+ "--vl-bg-lifted": "--vl-neutral-100",
106
+ "--vl-bg-accented": "--vl-neutral-200",
107
+ "--vl-bg-muted": "--vl-neutral-50",
108
+ "--vl-bg-inverted": "--vl-neutral-900",
109
+ };
110
+
111
+ export const DEFAULT_DARK_THEME = {
112
+ /* Primary colors */
113
+ "--vl-primary": "--color-primary-400",
114
+ "--vl-primary-lifted": "--color-primary-500",
115
+ "--vl-primary-accented": "--color-primary-600",
116
+
117
+ /* Info colors */
118
+ "--vl-info": "--color-blue-400",
119
+ "--vl-info-lifted": "--color-blue-500",
120
+ "--vl-info-accented": "--color-blue-600",
121
+
122
+ /* Error colors */
123
+ "--vl-error": "--color-red-400",
124
+ "--vl-error-lifted": "--color-red-500",
125
+ "--vl-error-accented": "--color-red-600",
126
+
127
+ /* Warning colors */
128
+ "--vl-warning": "--color-orange-400",
129
+ "--vl-warning-lifted": "--color-orange-500",
130
+ "--vl-warning-accented": "--color-orange-600",
131
+
132
+ /* Success colors */
133
+ "--vl-success": "--color-green-400",
134
+ "--vl-success-lifted": "--color-green-500",
135
+ "--vl-success-accented": "--color-green-600",
136
+
137
+ /* Neutral colors */
138
+ "--vl-neutral": "--vl-neutral-300",
139
+ "--vl-neutral-lifted": "--vl-neutral-400",
140
+ "--vl-neutral-accented": "--vl-neutral-500",
141
+
142
+ /* Grayscale colors */
143
+ "--vl-grayscale": "--vl-neutral-100",
144
+ "--vl-grayscale-lifted": "--vl-neutral-200",
145
+ "--vl-grayscale-accented": "--vl-neutral-300",
146
+
147
+ /* Text neutral colors */
148
+ "--vl-text": "--vl-neutral-100",
149
+ "--vl-text-lifted": "--vl-neutral-400",
150
+ "--vl-text-accented": "--vl-neutral-300",
151
+ "--vl-text-muted": "--vl-neutral-600",
152
+ "--vl-text-inverted": "--vl-neutral-900",
153
+
154
+ /* Border neutral colors */
155
+ "--vl-border": "--vl-neutral-700",
156
+ "--vl-border-lifted": "--vl-neutral-600",
157
+ "--vl-border-accented": "--vl-neutral-400",
158
+ "--vl-border-muted": "--vl-neutral-800",
159
+
160
+ /* Background neutral colors */
161
+ "--vl-bg": "--vl-neutral-900",
162
+ "--vl-bg-lifted": "--vl-neutral-800",
163
+ "--vl-bg-accented": "--vl-neutral-700",
164
+ "--vl-bg-muted": "--vl-neutral-800",
165
+ "--vl-bg-inverted": "--vl-neutral-100",
166
+ };
52
167
 
53
168
  /* Vueless merge class strategy types */
54
169
  export const STRATEGY_TYPE = {
@@ -165,31 +280,41 @@ export const COMPONENTS = {
165
280
  /**
166
281
  * Extending Tailwind Merge by vueless custom tailwind classes.
167
282
  * All lists of rules available here:
168
- * https://github.com/dcastil/tailwind-merge/blob/v2.3.0/src/lib/default-config.ts
283
+ * https://github.com/dcastil/tailwind-merge/blob/main/src/lib/default-config.ts
169
284
  */
170
285
  export const TAILWIND_MERGE_EXTENSION = {
171
286
  extend: {
172
287
  theme: {
288
+ colors: ["brand", "brand-"],
173
289
  spacing: ["safe-top", "safe-bottom", "safe-left", "safe-right"],
174
290
  },
175
291
  classGroups: {
176
- "outline-w": [{ outline: ["dynamic", "dynamic-sm", "dynamic-lg"] }],
177
- "font-size": [{ text: ["2xs"] }],
178
- rounded: [{ rounded: ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
179
- "rounded-s": [{ "rounded-s": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
180
- "rounded-e": [{ "rounded-e": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
181
- "rounded-t": [{ "rounded-t": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
182
- "rounded-r": [{ "rounded-r": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
183
- "rounded-b": [{ "rounded-b": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
184
- "rounded-l": [{ "rounded-l": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
185
- "rounded-ss": [{ "rounded-ss": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
186
- "rounded-se": [{ "rounded-se": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
187
- "rounded-ee": [{ "rounded-ee": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
188
- "rounded-es": [{ "rounded-es": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
189
- "rounded-tl": [{ "rounded-tl": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
190
- "rounded-tr": [{ "rounded-tr": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
191
- "rounded-br": [{ "rounded-br": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
192
- "rounded-bl": [{ "rounded-bl": ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
292
+ "outline-w": [{ outline: ["small", "medium", "large"] }],
293
+ "font-size": [{ text: ["xsmall", "small", "medium", "large"] }],
294
+ "bg-color": [{ bg: ["default", "muted", "lifted", "accented", "inverted"] }],
295
+ "text-color": [{ text: ["default", "muted", "lifted", "accented", "inverted"] }],
296
+ "border-color": [{ border: ["default", "muted", "lifted", "accented"] }],
297
+ "border-color-x": [{ "border-x": ["default", "muted", "lifted", "accented"] }],
298
+ "border-color-y": [{ "border-y": ["default", "muted", "lifted", "accented"] }],
299
+ "border-color-t": [{ "border-t": ["default", "muted", "lifted", "accented"] }],
300
+ "border-color-r": [{ "border-r": ["default", "muted", "lifted", "accented"] }],
301
+ "border-color-b": [{ "border-b": ["default", "muted", "lifted", "accented"] }],
302
+ "border-color-l": [{ "border-l": ["default", "muted", "lifted", "accented"] }],
303
+ rounded: [{ rounded: ["small", "medium", "large", "inherit"] }],
304
+ "rounded-s": [{ "rounded-s": ["small", "medium", "large", "inherit"] }],
305
+ "rounded-e": [{ "rounded-e": ["small", "medium", "large", "inherit"] }],
306
+ "rounded-t": [{ "rounded-t": ["small", "medium", "large", "inherit"] }],
307
+ "rounded-r": [{ "rounded-r": ["small", "medium", "large", "inherit"] }],
308
+ "rounded-b": [{ "rounded-b": ["small", "medium", "large", "inherit"] }],
309
+ "rounded-l": [{ "rounded-l": ["small", "medium", "large", "inherit"] }],
310
+ "rounded-ss": [{ "rounded-ss": ["small", "medium", "large", "inherit"] }],
311
+ "rounded-se": [{ "rounded-se": ["small", "medium", "large", "inherit"] }],
312
+ "rounded-ee": [{ "rounded-ee": ["small", "medium", "large", "inherit"] }],
313
+ "rounded-es": [{ "rounded-es": ["small", "medium", "large", "inherit"] }],
314
+ "rounded-tl": [{ "rounded-tl": ["small", "medium", "large", "inherit"] }],
315
+ "rounded-tr": [{ "rounded-tr": ["small", "medium", "large", "inherit"] }],
316
+ "rounded-br": [{ "rounded-br": ["small", "medium", "large", "inherit"] }],
317
+ "rounded-bl": [{ "rounded-bl": ["small", "medium", "large", "inherit"] }],
193
318
  },
194
319
  },
195
320
  };
@@ -223,6 +348,7 @@ export const VUELESS_ICONS_DIR = `${VUELESS_DIR}/${ICONS_DIR}`;
223
348
  export const VUELESS_ICONS_LOCAL_DIR = `src/${ICONS_DIR}`;
224
349
  export const VUELESS_ICONS_CACHED_DIR = `${VUELESS_CACHE_DIR}/${ICONS_DIR}`;
225
350
  export const VUELESS_CONFIGS_CACHED_DIR = `${VUELESS_CACHE_DIR}/configs`;
351
+ export const VUELESS_TAILWIND_SAFELIST = `${VUELESS_CACHE_DIR}/safelist.txt`;
226
352
 
227
353
  /* System error codes */
228
354
  export const DEFAULT_EXIT_CODE = 0;
@@ -233,300 +359,5 @@ export const PX_IN_REM = 16;
233
359
  export const NESTED_COMPONENT_PATTERN_REG_EXP = /\{(U[^}]*)}/;
234
360
  export const EXTENDS_PATTERN_REG_EXP = /\{>[^}]*}/g;
235
361
  export const DYNAMIC_COLOR_PATTERN = "{color}";
236
- export const TAILWIND_COLOR_OPACITY_DELIMITER = "/";
237
- export const TAILWIND_VARIANT_DELIMITER = ":";
238
- export const TAILWIND_VARIANT_DELIMITER_REG_EXP = /:(?![^[]*])/;
239
362
  export const JAVASCRIPT_EXT = ".js";
240
363
  export const TYPESCRIPT_EXT = ".ts";
241
-
242
- /* Default tailwind colors */
243
- export const TAILWIND_COLORS = {
244
- white: "#ffffff",
245
- slate: {
246
- 50: "#f8fafc",
247
- 100: "#f1f5f9",
248
- 200: "#e2e8f0",
249
- 300: "#cbd5e1",
250
- 400: "#94a3b8",
251
- 500: "#64748b",
252
- 600: "#475569",
253
- 700: "#334155",
254
- 800: "#1e293b",
255
- 900: "#0f172a",
256
- 950: "#020617",
257
- },
258
- /* ex. `gray` color */
259
- cool: {
260
- 50: "#f9fafb",
261
- 100: "#f3f4f6",
262
- 200: "#e5e7eb",
263
- 300: "#d1d5db",
264
- 400: "#9ca3af",
265
- 500: "#6b7280",
266
- 600: "#4b5563",
267
- 700: "#374151",
268
- 800: "#1f2937",
269
- 900: "#111827",
270
- 950: "#030712",
271
- },
272
- zinc: {
273
- 50: "#fafafa",
274
- 100: "#f4f4f5",
275
- 200: "#e4e4e7",
276
- 300: "#d4d4d8",
277
- 400: "#a1a1aa",
278
- 500: "#71717a",
279
- 600: "#52525b",
280
- 700: "#3f3f46",
281
- 800: "#27272a",
282
- 900: "#18181b",
283
- 950: "#09090b",
284
- },
285
- neutral: {
286
- 50: "#fafafa",
287
- 100: "#f5f5f5",
288
- 200: "#e5e5e5",
289
- 300: "#d4d4d4",
290
- 400: "#a3a3a3",
291
- 500: "#737373",
292
- 600: "#525252",
293
- 700: "#404040",
294
- 800: "#262626",
295
- 900: "#171717",
296
- 950: "#0a0a0a",
297
- },
298
- stone: {
299
- 50: "#fafaf9",
300
- 100: "#f5f5f4",
301
- 200: "#e7e5e4",
302
- 300: "#d6d3d1",
303
- 400: "#a8a29e",
304
- 500: "#78716c",
305
- 600: "#57534e",
306
- 700: "#44403c",
307
- 800: "#292524",
308
- 900: "#1c1917",
309
- 950: "#0c0a09",
310
- },
311
- red: {
312
- 50: "#fef2f2",
313
- 100: "#fee2e2",
314
- 200: "#fecaca",
315
- 300: "#fca5a5",
316
- 400: "#f87171",
317
- 500: "#ef4444",
318
- 600: "#dc2626",
319
- 700: "#b91c1c",
320
- 800: "#991b1b",
321
- 900: "#7f1d1d",
322
- 950: "#450a0a",
323
- },
324
- orange: {
325
- 50: "#fff7ed",
326
- 100: "#ffedd5",
327
- 200: "#fed7aa",
328
- 300: "#fdba74",
329
- 400: "#fb923c",
330
- 500: "#f97316",
331
- 600: "#ea580c",
332
- 700: "#c2410c",
333
- 800: "#9a3412",
334
- 900: "#7c2d12",
335
- 950: "#431407",
336
- },
337
- amber: {
338
- 50: "#fffbeb",
339
- 100: "#fef3c7",
340
- 200: "#fde68a",
341
- 300: "#fcd34d",
342
- 400: "#fbbf24",
343
- 500: "#f59e0b",
344
- 600: "#d97706",
345
- 700: "#b45309",
346
- 800: "#92400e",
347
- 900: "#78350f",
348
- 950: "#451a03",
349
- },
350
- yellow: {
351
- 50: "#fefce8",
352
- 100: "#fef9c3",
353
- 200: "#fef08a",
354
- 300: "#fde047",
355
- 400: "#facc15",
356
- 500: "#eab308",
357
- 600: "#ca8a04",
358
- 700: "#a16207",
359
- 800: "#854d0e",
360
- 900: "#713f12",
361
- 950: "#422006",
362
- },
363
- lime: {
364
- 50: "#f7fee7",
365
- 100: "#ecfccb",
366
- 200: "#d9f99d",
367
- 300: "#bef264",
368
- 400: "#a3e635",
369
- 500: "#84cc16",
370
- 600: "#65a30d",
371
- 700: "#4d7c0f",
372
- 800: "#3f6212",
373
- 900: "#365314",
374
- 950: "#1a2e05",
375
- },
376
- green: {
377
- 50: "#f0fdf4",
378
- 100: "#dcfce7",
379
- 200: "#bbf7d0",
380
- 300: "#86efac",
381
- 400: "#4ade80",
382
- 500: "#22c55e",
383
- 600: "#16a34a",
384
- 700: "#15803d",
385
- 800: "#166534",
386
- 900: "#14532d",
387
- 950: "#052e16",
388
- },
389
- emerald: {
390
- 50: "#ecfdf5",
391
- 100: "#d1fae5",
392
- 200: "#a7f3d0",
393
- 300: "#6ee7b7",
394
- 400: "#34d399",
395
- 500: "#10b981",
396
- 600: "#059669",
397
- 700: "#047857",
398
- 800: "#065f46",
399
- 900: "#064e3b",
400
- 950: "#022c22",
401
- },
402
- teal: {
403
- 50: "#f0fdfa",
404
- 100: "#ccfbf1",
405
- 200: "#99f6e4",
406
- 300: "#5eead4",
407
- 400: "#2dd4bf",
408
- 500: "#14b8a6",
409
- 600: "#0d9488",
410
- 700: "#0f766e",
411
- 800: "#115e59",
412
- 900: "#134e4a",
413
- 950: "#042f2e",
414
- },
415
- cyan: {
416
- 50: "#ecfeff",
417
- 100: "#cffafe",
418
- 200: "#a5f3fc",
419
- 300: "#67e8f9",
420
- 400: "#22d3ee",
421
- 500: "#06b6d4",
422
- 600: "#0891b2",
423
- 700: "#0e7490",
424
- 800: "#155e75",
425
- 900: "#164e63",
426
- 950: "#083344",
427
- },
428
- sky: {
429
- 50: "#f0f9ff",
430
- 100: "#e0f2fe",
431
- 200: "#bae6fd",
432
- 300: "#7dd3fc",
433
- 400: "#38bdf8",
434
- 500: "#0ea5e9",
435
- 600: "#0284c7",
436
- 700: "#0369a1",
437
- 800: "#075985",
438
- 900: "#0c4a6e",
439
- 950: "#082f49",
440
- },
441
- blue: {
442
- 50: "#eff6ff",
443
- 100: "#dbeafe",
444
- 200: "#bfdbfe",
445
- 300: "#93c5fd",
446
- 400: "#60a5fa",
447
- 500: "#3b82f6",
448
- 600: "#2563eb",
449
- 700: "#1d4ed8",
450
- 800: "#1e40af",
451
- 900: "#1e3a8a",
452
- 950: "#172554",
453
- },
454
- indigo: {
455
- 50: "#eef2ff",
456
- 100: "#e0e7ff",
457
- 200: "#c7d2fe",
458
- 300: "#a5b4fc",
459
- 400: "#818cf8",
460
- 500: "#6366f1",
461
- 600: "#4f46e5",
462
- 700: "#4338ca",
463
- 800: "#3730a3",
464
- 900: "#312e81",
465
- 950: "#1e1b4b",
466
- },
467
- violet: {
468
- 50: "#f5f3ff",
469
- 100: "#ede9fe",
470
- 200: "#ddd6fe",
471
- 300: "#c4b5fd",
472
- 400: "#a78bfa",
473
- 500: "#8b5cf6",
474
- 600: "#7c3aed",
475
- 700: "#6d28d9",
476
- 800: "#5b21b6",
477
- 900: "#4c1d95",
478
- 950: "#2e1065",
479
- },
480
- purple: {
481
- 50: "#faf5ff",
482
- 100: "#f3e8ff",
483
- 200: "#e9d5ff",
484
- 300: "#d8b4fe",
485
- 400: "#c084fc",
486
- 500: "#a855f7",
487
- 600: "#9333ea",
488
- 700: "#7e22ce",
489
- 800: "#6b21a8",
490
- 900: "#581c87",
491
- 950: "#3b0764",
492
- },
493
- fuchsia: {
494
- 50: "#fdf4ff",
495
- 100: "#fae8ff",
496
- 200: "#f5d0fe",
497
- 300: "#f0abfc",
498
- 400: "#e879f9",
499
- 500: "#d946ef",
500
- 600: "#c026d3",
501
- 700: "#a21caf",
502
- 800: "#86198f",
503
- 900: "#701a75",
504
- 950: "#4a044e",
505
- },
506
- pink: {
507
- 50: "#fdf2f8",
508
- 100: "#fce7f3",
509
- 200: "#fbcfe8",
510
- 300: "#f9a8d4",
511
- 400: "#f472b6",
512
- 500: "#ec4899",
513
- 600: "#db2777",
514
- 700: "#be185d",
515
- 800: "#9d174d",
516
- 900: "#831843",
517
- 950: "#500724",
518
- },
519
- rose: {
520
- 50: "#fff1f2",
521
- 100: "#ffe4e6",
522
- 200: "#fecdd3",
523
- 300: "#fda4af",
524
- 400: "#fb7185",
525
- 500: "#f43f5e",
526
- 600: "#e11d48",
527
- 700: "#be123c",
528
- 800: "#9f1239",
529
- 900: "#881337",
530
- 950: "#4c0519",
531
- },
532
- };
@@ -48,7 +48,7 @@ const DefaultTemplate: StoryFn<VOnClickOutsideArgs> = (args: VOnClickOutsideArgs
48
48
 
49
49
  <UCalendar v-model="date" v-if="isShownCalendar" class="mt-2" />
50
50
 
51
- <UAlert class="mt-4" variant="secondary">
51
+ <UAlert class="mt-4" variant="outlined">
52
52
  <p>
53
53
  Click on calendar itself will trigger directive callback, use ignore option to prevent this behavior.
54
54
  </p>
@@ -98,7 +98,7 @@ const SettingsTemplate: StoryFn<VOnClickOutsideArgs> = (args: VOnClickOutsideArg
98
98
  <UCalendar v-model="date" v-if="isShownCalendar" class="mt-2" />
99
99
  </div>
100
100
 
101
- <UAlert class="mt-4" variant="secondary">
101
+ <UAlert class="mt-4" variant="outlined">
102
102
  <p>
103
103
  Click on calendar will not trigger directive callback now.
104
104
  </p>