vueless 0.0.675 → 0.0.677

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 (89) hide show
  1. package/composables/useUI.ts +12 -1
  2. package/constants.js +1 -0
  3. package/package.json +1 -1
  4. package/types.ts +1 -1
  5. package/ui.boilerplate/types.ts +1 -1
  6. package/ui.button/UButton.vue +9 -6
  7. package/ui.button/types.ts +1 -1
  8. package/ui.button-link/ULink.vue +37 -62
  9. package/ui.button-link/config.ts +8 -35
  10. package/ui.button-link/storybook/stories.ts +0 -22
  11. package/ui.button-link/types.ts +1 -11
  12. package/ui.button-toggle/types.ts +1 -1
  13. package/ui.button-toggle-item/types.ts +1 -1
  14. package/ui.container-accordion/types.ts +1 -1
  15. package/ui.container-card/types.ts +1 -1
  16. package/ui.container-col/types.ts +1 -1
  17. package/ui.container-divider/types.ts +1 -1
  18. package/ui.container-group/types.ts +1 -1
  19. package/ui.container-groups/types.ts +1 -1
  20. package/ui.container-modal/UModal.vue +21 -20
  21. package/ui.container-modal/config.ts +3 -2
  22. package/ui.container-modal/types.ts +1 -1
  23. package/ui.container-modal-confirm/types.ts +1 -1
  24. package/ui.container-page/UPage.vue +31 -19
  25. package/ui.container-page/config.ts +1 -0
  26. package/ui.container-page/types.ts +1 -1
  27. package/ui.container-row/types.ts +1 -1
  28. package/ui.data-list/types.ts +1 -1
  29. package/ui.data-table/types.ts +1 -1
  30. package/ui.dropdown-badge/types.ts +1 -1
  31. package/ui.dropdown-button/types.ts +1 -1
  32. package/ui.dropdown-link/UDropdownLink.vue +29 -33
  33. package/ui.dropdown-link/config.ts +3 -3
  34. package/ui.dropdown-link/types.ts +1 -1
  35. package/ui.dropdown-list/types.ts +1 -1
  36. package/ui.form-calendar/types.ts +1 -1
  37. package/ui.form-checkbox/types.ts +1 -1
  38. package/ui.form-checkbox-group/types.ts +1 -1
  39. package/ui.form-checkbox-multi-state/types.ts +1 -1
  40. package/ui.form-color-picker/UColorPicker.vue +68 -0
  41. package/ui.form-color-picker/config.ts +29 -0
  42. package/ui.form-color-picker/constants.ts +5 -0
  43. package/ui.form-color-picker/storybook/docs.mdx +16 -0
  44. package/ui.form-color-picker/storybook/stories.ts +97 -0
  45. package/ui.form-color-picker/types.ts +42 -0
  46. package/ui.form-date-picker/types.ts +1 -1
  47. package/ui.form-date-picker-range/types.ts +1 -1
  48. package/ui.form-input/types.ts +1 -1
  49. package/ui.form-input-file/storybook/stories.ts +1 -1
  50. package/ui.form-input-file/types.ts +1 -1
  51. package/ui.form-input-money/types.ts +1 -1
  52. package/ui.form-input-number/types.ts +1 -1
  53. package/ui.form-input-rating/types.ts +1 -1
  54. package/ui.form-input-search/types.ts +1 -1
  55. package/ui.form-label/storybook/stories.ts +1 -1
  56. package/ui.form-label/types.ts +1 -1
  57. package/ui.form-radio/types.ts +1 -1
  58. package/ui.form-radio-group/types.ts +1 -1
  59. package/ui.form-select/USelect.vue +8 -6
  60. package/ui.form-select/types.ts +1 -1
  61. package/ui.form-switch/types.ts +1 -1
  62. package/ui.form-textarea/types.ts +1 -1
  63. package/ui.image-avatar/types.ts +1 -1
  64. package/ui.image-icon/UIcon.vue +2 -18
  65. package/ui.image-icon/storybook/stories.ts +0 -3
  66. package/ui.image-icon/types.ts +1 -13
  67. package/ui.loader/types.ts +1 -1
  68. package/ui.loader-overlay/types.ts +1 -1
  69. package/ui.loader-progress/types.ts +1 -1
  70. package/ui.navigation-pagination/types.ts +1 -1
  71. package/ui.navigation-progress/types.ts +2 -2
  72. package/ui.navigation-tab/types.ts +1 -1
  73. package/ui.navigation-tabs/types.ts +1 -1
  74. package/ui.other-dot/types.ts +1 -1
  75. package/ui.other-theme-color-toggle/UThemeColorToggle.vue +44 -70
  76. package/ui.other-theme-color-toggle/config.ts +2 -23
  77. package/ui.other-theme-color-toggle/storybook/stories.ts +6 -5
  78. package/ui.other-theme-color-toggle/types.ts +8 -3
  79. package/ui.text-alert/types.ts +1 -1
  80. package/ui.text-badge/types.ts +1 -1
  81. package/ui.text-block/types.ts +1 -1
  82. package/ui.text-empty/types.ts +1 -1
  83. package/ui.text-file/types.ts +1 -1
  84. package/ui.text-files/types.ts +1 -1
  85. package/ui.text-header/types.ts +1 -1
  86. package/ui.text-money/types.ts +1 -1
  87. package/ui.text-notify/types.ts +1 -1
  88. package/ui.text-number/types.ts +1 -1
  89. package/utils/theme.ts +8 -4
@@ -2,7 +2,6 @@
2
2
  import { computed, defineAsyncComponent } from "vue";
3
3
 
4
4
  import useUI from "../composables/useUI.ts";
5
- import { vTooltip } from "../directives";
6
5
  import { getDefaults } from "../utils/ui.ts";
7
6
  import { isSSR } from "../utils/helper.ts";
8
7
  import { VUELESS_ICONS_CACHED_DIR, VUELESS_LIBRARY } from "../constants.js";
@@ -12,13 +11,11 @@ import defaultConfig from "./config.ts";
12
11
 
13
12
  import type { AsyncComponentLoader } from "vue";
14
13
  import type { Props, Config, IconLibraries } from "./types.ts";
15
- import type { Props as TippyProps, Instance as TippyInstance } from "tippy.js";
16
14
 
17
15
  defineOptions({ inheritAttrs: false });
18
16
 
19
17
  const props = withDefaults(defineProps<Props>(), {
20
18
  ...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
21
- tooltipSettings: () => ({}) as TippyProps,
22
19
  });
23
20
 
24
21
  const emit = defineEmits([
@@ -128,18 +125,6 @@ const dynamicComponent = computed(() => {
128
125
  return defineAsyncComponent(libraries[library] as AsyncComponentLoader);
129
126
  });
130
127
 
131
- const tooltipConfig = computed(() => ({
132
- ...props.tooltipSettings,
133
- content: props.tooltip,
134
- onShow: (instance: TippyInstance) => {
135
- const userOnShow = props.tooltipSettings?.onShow;
136
-
137
- userOnShow && userOnShow(instance);
138
-
139
- return !!props.tooltip;
140
- },
141
- }));
142
-
143
128
  function onClick(event: MouseEvent) {
144
129
  emit("click", event);
145
130
  }
@@ -148,16 +133,15 @@ function onClick(event: MouseEvent) {
148
133
  * Get element / nested component attributes for each config token ✨
149
134
  * Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
150
135
  */
151
- const { config, iconAttrs } = useUI<Config>(defaultConfig);
136
+ const { getDataTest, config, iconAttrs } = useUI<Config>(defaultConfig);
152
137
  </script>
153
138
 
154
139
  <template>
155
140
  <component
156
141
  :is="dynamicComponent"
157
- v-tooltip="tooltipConfig"
158
142
  tabindex="-1"
159
143
  v-bind="iconAttrs"
160
- :data-test="dataTest"
144
+ :data-test="getDataTest()"
161
145
  @click="onClick"
162
146
  />
163
147
  </template>
@@ -79,8 +79,5 @@ Sizes.args = { enum: "size" };
79
79
  export const Variants = EnumVariantTemplate.bind({});
80
80
  Variants.args = { enum: "variant", color: "red" };
81
81
 
82
- export const Tooltip = DefaultTemplate.bind({});
83
- Tooltip.args = { tooltip: "Some text" };
84
-
85
82
  export const Interactive = DefaultTemplate.bind({});
86
83
  Interactive.args = { interactive: true };
@@ -3,7 +3,6 @@ import defaultConfig from "./config.ts";
3
3
  import type { DefineComponent, SVGAttributes } from "vue";
4
4
 
5
5
  import type { ComponentConfig } from "../types.ts";
6
- import type { Props as TippyProps } from "tippy.js";
7
6
 
8
7
  export type Config = typeof defaultConfig;
9
8
 
@@ -68,17 +67,6 @@ export interface Props {
68
67
  */
69
68
  interactive?: boolean;
70
69
 
71
- /**
72
- * Add tooltip text on hover.
73
- */
74
- tooltip?: string;
75
-
76
- /**
77
- * Tooltip settings.
78
- * [See all settings here](https://kabbouchi.github.io/vue-tippy/4.0/features/placement.html).
79
- */
80
- tooltipSettings?: TippyProps;
81
-
82
70
  /**
83
71
  * Mark that Icon used inside Vueless components (used to get icons from vueless library).
84
72
  */
@@ -92,5 +80,5 @@ export interface Props {
92
80
  /**
93
81
  * Data-test attribute for automated testing.
94
82
  */
95
- dataTest?: string;
83
+ dataTest?: string | null;
96
84
  }
@@ -51,5 +51,5 @@ export interface Props {
51
51
  /**
52
52
  * Data-test attribute for automated testing.
53
53
  */
54
- dataTest?: string;
54
+ dataTest?: string | null;
55
55
  }
@@ -44,5 +44,5 @@ export interface Props {
44
44
  /**
45
45
  * Data-test attribute for automated testing.
46
46
  */
47
- dataTest?: string;
47
+ dataTest?: string | null;
48
48
  }
@@ -53,5 +53,5 @@ export interface Props {
53
53
  /**
54
54
  * Data-test attribute for automated testing.
55
55
  */
56
- dataTest?: string;
56
+ dataTest?: string | null;
57
57
  }
@@ -82,5 +82,5 @@ export interface Props {
82
82
  /**
83
83
  * Data-test attribute for automated testing.
84
84
  */
85
- dataTest?: string;
85
+ dataTest?: string | null;
86
86
  }
@@ -63,7 +63,7 @@ export interface UProgressProps {
63
63
  /**
64
64
  * Data-test attribute for automated testing.
65
65
  */
66
- dataTest?: string;
66
+ dataTest?: string | null;
67
67
  }
68
68
 
69
69
  export interface StepperProgressProps {
@@ -90,5 +90,5 @@ export interface StepperProgressProps {
90
90
  /**
91
91
  * Data-test attribute for automated testing.
92
92
  */
93
- dataTest?: string;
93
+ dataTest?: string | null;
94
94
  }
@@ -31,5 +31,5 @@ export interface Props {
31
31
  /**
32
32
  * Data-test attribute for automated testing.
33
33
  */
34
- dataTest?: string;
34
+ dataTest?: string | null;
35
35
  }
@@ -43,5 +43,5 @@ export interface Props {
43
43
  /**
44
44
  * Data-test attribute for automated testing.
45
45
  */
46
- dataTest?: string;
46
+ dataTest?: string | null;
47
47
  }
@@ -43,5 +43,5 @@ export interface Props {
43
43
  /**
44
44
  * Data-test attribute for automated testing.
45
45
  */
46
- dataTest?: string;
46
+ dataTest?: string | null;
47
47
  }
@@ -1,26 +1,25 @@
1
1
  <script setup lang="ts">
2
- import { computed, useId, watch } from "vue";
2
+ import { computed, useId } from "vue";
3
3
 
4
- import { vTooltip } from "../directives";
5
4
  import useUI from "../composables/useUI.ts";
6
5
  import { getDefaults } from "../utils/ui.ts";
7
6
  import { setTheme, getSelectedBrandColor, getSelectedGrayColor } from "../utils/theme.ts";
8
7
  import { GRAYSCALE_COLOR } from "../constants.js";
9
8
 
10
9
  import UDivider from "../ui.container-divider/UDivider.vue";
11
- import UButton from "../ui.button/UButton.vue";
10
+ import UColorPicker from "../ui.form-color-picker/UColorPicker.vue";
12
11
 
13
12
  import { COMPONENT_NAME } from "./constants.ts";
14
13
  import defaultConfig from "./config.ts";
15
14
 
16
- import type { BrandColors, GrayColors } from "../types.ts";
17
15
  import type { Props, Config } from "./types.ts";
18
16
 
19
17
  defineOptions({ inheritAttrs: false });
20
18
 
21
19
  const props = withDefaults(defineProps<Props>(), {
22
20
  ...getDefaults<Props, Config>(defaultConfig, COMPONENT_NAME),
23
- modelValue: () => ["", ""],
21
+ brand: "",
22
+ gray: "",
24
23
  brandColors: () => ({}),
25
24
  grayColors: () => ({}),
26
25
  brandLabels: () => ({}),
@@ -29,78 +28,61 @@ const props = withDefaults(defineProps<Props>(), {
29
28
 
30
29
  const emit = defineEmits([
31
30
  /**
32
- * Triggers when color value changes.
31
+ * Triggers when the brand color changes.
33
32
  * @property {string} value
34
33
  */
35
- "update:modelValue",
34
+ "update:brand",
35
+
36
+ /**
37
+ * Triggers when the gray color changes.
38
+ * @property {string} value
39
+ */
40
+ "update:gray",
36
41
  ]);
37
42
 
38
43
  const elementId = props.id || useId();
39
44
 
40
- const selectedBrand = getSelectedBrandColor();
41
- const selectedGray = getSelectedGrayColor();
45
+ const selectedBrandColor = computed({
46
+ get: () => props.brand || getSelectedBrandColor(),
47
+ set: (brand: string) => {
48
+ const prevBrand = getSelectedBrandColor();
49
+ const isBrandGrayscale = brand === GRAYSCALE_COLOR;
50
+ const isPrevBrandGrayscale = prevBrand === GRAYSCALE_COLOR;
42
51
 
43
- const selectedItem = computed({
44
- get: () => {
45
- const [brand, gray] = props.modelValue;
52
+ if (brand !== prevBrand && (isBrandGrayscale || isPrevBrandGrayscale)) {
53
+ window.location.reload();
54
+ }
46
55
 
47
- return [brand || selectedBrand, gray || selectedGray];
56
+ setTheme({ brand });
57
+ emit("update:brand", brand);
48
58
  },
49
- set: (value) => emit("update:modelValue", value),
50
59
  });
51
60
 
52
- watch(selectedItem, (newValue, oldValue) => {
53
- const [oldBrand, oldGray] = oldValue;
54
- const [brand, gray] = newValue;
55
-
56
- if (oldBrand === brand && oldGray === gray) {
57
- return;
58
- }
59
-
60
- setTheme({ brand, gray });
61
-
62
- if (oldBrand !== brand && (brand === GRAYSCALE_COLOR || oldBrand === GRAYSCALE_COLOR)) {
63
- window.location.reload();
64
- }
61
+ const selectedGrayColor = computed({
62
+ get: () => props.gray || getSelectedGrayColor(),
63
+ set: (value: string) => {
64
+ setTheme({ gray: value });
65
+ emit("update:gray", value);
66
+ },
65
67
  });
66
68
 
67
- function onClickBrandColor(brand: BrandColors) {
68
- const [, gray] = selectedItem.value;
69
-
70
- selectedItem.value = [brand, gray];
71
- }
72
-
73
- function onClickGrayColor(gray: GrayColors) {
74
- const [brand] = selectedItem.value;
75
-
76
- selectedItem.value = [brand, gray];
77
- }
78
-
79
69
  /**
80
70
  * Get element / nested component attributes for each config token ✨
81
71
  * Applies: `class`, `config`, redefined default `props` and dev `vl-...` attributes.
82
72
  */
83
- const { listAttrs, colorButtonAttrs, circleAttrs, colorDividerAttrs } =
73
+ const { listAttrs, colorDividerAttrs, brandColorPickerAttrs, grayColorPickerAttrs } =
84
74
  useUI<Config>(defaultConfig);
85
75
  </script>
86
76
 
87
77
  <template>
88
78
  <div :id="elementId" v-bind="listAttrs">
89
- <UButton
90
- v-for="(brandColorClass, color) in brandColors"
91
- :key="color"
92
- v-tooltip="brandLabels?.[color] || color"
93
- square
94
- size="xs"
95
- :ring="false"
96
- color="grayscale"
97
- variant="thirdary"
98
- :filled="selectedItem[0] === color"
99
- v-bind="colorButtonAttrs"
100
- @click="onClickBrandColor(color)"
101
- >
102
- <div :class="brandColorClass" v-bind="circleAttrs" />
103
- </UButton>
79
+ <UColorPicker
80
+ v-model="selectedBrandColor"
81
+ :size="size"
82
+ :colors="brandColors"
83
+ :labels="brandLabels"
84
+ v-bind="brandColorPickerAttrs"
85
+ />
104
86
 
105
87
  <UDivider
106
88
  v-if="Object.keys(brandColors).length && Object.keys(grayColors).length"
@@ -108,20 +90,12 @@ const { listAttrs, colorButtonAttrs, circleAttrs, colorDividerAttrs } =
108
90
  v-bind="colorDividerAttrs"
109
91
  />
110
92
 
111
- <UButton
112
- v-for="(grayColorClass, color) in grayColors"
113
- :key="color"
114
- v-tooltip="brandLabels?.[color] || color"
115
- square
116
- size="xs"
117
- :ring="false"
118
- color="grayscale"
119
- variant="thirdary"
120
- :filled="selectedItem[1] === color"
121
- v-bind="colorButtonAttrs"
122
- @click="onClickGrayColor(color)"
123
- >
124
- <div :class="grayColorClass" v-bind="circleAttrs" />
125
- </UButton>
93
+ <UColorPicker
94
+ v-model="selectedGrayColor"
95
+ :size="size"
96
+ :colors="grayColors"
97
+ :labels="grayLabels"
98
+ v-bind="grayColorPickerAttrs"
99
+ />
126
100
  </div>
127
101
  </template>
@@ -1,28 +1,7 @@
1
1
  export default /*tw*/ {
2
2
  list: "flex flex-wrap gap-0.5",
3
- colorButton: {
4
- base: "{UButton}",
5
- button: {
6
- compoundVariants: [
7
- {
8
- filled: true,
9
- variant: "thirdary",
10
- color: "grayscale",
11
- class: "bg-gray-800/10 dark:bg-gray-200/10",
12
- },
13
- ],
14
- },
15
- },
16
- circle: {
17
- base: "rounded-full",
18
- variants: {
19
- size: {
20
- sm: "size-4",
21
- md: "size-5",
22
- lg: "size-6",
23
- },
24
- },
25
- },
3
+ brandColorPicker: "{UColorPicker}",
4
+ grayColorPicker: "{UColorPicker}",
26
5
  colorDivider: "{UDivider}",
27
6
  defaults: {
28
7
  size: "md",
@@ -19,13 +19,13 @@ interface UThemeColorToggleArgs extends Props {
19
19
 
20
20
  export default {
21
21
  id: "100020",
22
- title: "Other / Theme Color Switcher",
22
+ title: "Other / Theme Color Toggle",
23
23
  component: UThemeColorToggle,
24
24
  args: {
25
- modelValue: ["", ""],
25
+ brand: "",
26
+ gray: "",
26
27
  brandColors: {
27
28
  grayscale: "bg-gray-900",
28
- gray: "bg-gray-600",
29
29
  red: "bg-red-600",
30
30
  orange: "bg-orange-600",
31
31
  amber: "bg-amber-600",
@@ -71,7 +71,7 @@ const DefaultTemplate: StoryFn<UThemeColorToggleArgs> = (args: UThemeColorToggle
71
71
  },
72
72
  template: `
73
73
  <UCol>
74
- <UThemeColorToggle v-bind="args" v-model="args.modelValue">
74
+ <UThemeColorToggle v-bind="args" v-model:brand="args.brand" v-model:gray="args.gray">
75
75
  ${args.slotTemplate || getSlotsFragment("")}
76
76
  </UThemeColorToggle>
77
77
 
@@ -97,7 +97,8 @@ const EnumVariantTemplate: StoryFn<UThemeColorToggleArgs> = (
97
97
  v-for="(option, index) in options"
98
98
  :key="index"
99
99
  v-bind="args"
100
- v-model="args.modelValue"
100
+ v-model:brand="args.brand"
101
+ v-model:gray="args.gray"
101
102
  :[args.enum]="option"
102
103
  />
103
104
  </UCol>
@@ -6,9 +6,14 @@ export type Config = typeof defaultConfig;
6
6
 
7
7
  export interface Props {
8
8
  /**
9
- * Selected values.
9
+ * Selected brand color (v-model).
10
10
  */
11
- modelValue: [BrandColors, GrayColors];
11
+ brand: BrandColors;
12
+
13
+ /**
14
+ * Selected gray color (v-model).
15
+ */
16
+ gray: GrayColors;
12
17
 
13
18
  /**
14
19
  * Component size.
@@ -48,5 +53,5 @@ export interface Props {
48
53
  /**
49
54
  * Data-test attribute for automated testing.
50
55
  */
51
- dataTest?: string;
56
+ dataTest?: string | null;
52
57
  }
@@ -73,5 +73,5 @@ export interface Props {
73
73
  /**
74
74
  * Data-test attribute for automated testing.
75
75
  */
76
- dataTest?: string;
76
+ dataTest?: string | null;
77
77
  }
@@ -83,5 +83,5 @@ export interface Props {
83
83
  /**
84
84
  * Data-test attribute for automated testing.
85
85
  */
86
- dataTest?: string;
86
+ dataTest?: string | null;
87
87
  }
@@ -32,5 +32,5 @@ export interface Props {
32
32
  /**
33
33
  * Data-test attribute for automated testing.
34
34
  */
35
- dataTest?: string;
35
+ dataTest?: string | null;
36
36
  }
@@ -27,5 +27,5 @@ export interface Props {
27
27
  /**
28
28
  * Data-test attribute for automated testing.
29
29
  */
30
- dataTest?: string;
30
+ dataTest?: string | null;
31
31
  }
@@ -42,5 +42,5 @@ export interface Props {
42
42
  /**
43
43
  * Data-test attribute for automated testing.
44
44
  */
45
- dataTest?: string;
45
+ dataTest?: string | null;
46
46
  }
@@ -42,5 +42,5 @@ export interface Props {
42
42
  /**
43
43
  * Data-test attribute for automated testing.
44
44
  */
45
- dataTest?: string;
45
+ dataTest?: string | null;
46
46
  }
@@ -63,5 +63,5 @@ export interface Props {
63
63
  /**
64
64
  * Data-test attribute for automated testing.
65
65
  */
66
- dataTest?: string;
66
+ dataTest?: string | null;
67
67
  }
@@ -98,5 +98,5 @@ export interface Props {
98
98
  /**
99
99
  * Data-test attribute for automated testing.
100
100
  */
101
- dataTest?: string;
101
+ dataTest?: string | null;
102
102
  }
@@ -50,5 +50,5 @@ export interface Props {
50
50
  /**
51
51
  * Data-test attribute for automated testing.
52
52
  */
53
- dataTest?: string;
53
+ dataTest?: string | null;
54
54
  }
@@ -78,5 +78,5 @@ export interface Props {
78
78
  /**
79
79
  * Data-test attribute for automated testing.
80
80
  */
81
- dataTest?: string;
81
+ dataTest?: string | null;
82
82
  }
package/utils/theme.ts CHANGED
@@ -115,7 +115,7 @@ export function setTheme(config: Config = {}) {
115
115
  const roundingLg = config.roundingLg ?? vuelessConfig.roundingLg ?? rounding * 2;
116
116
  const isDarkMode = isCSR && document.documentElement.classList.contains(DARK_MODE_SELECTOR);
117
117
 
118
- const brand: BrandColors =
118
+ let brand: BrandColors =
119
119
  config.brand ?? getSelectedBrandColor() ?? vuelessConfig.brand ?? DEFAULT_BRAND_COLOR;
120
120
 
121
121
  let gray: GrayColors =
@@ -138,10 +138,17 @@ export function setTheme(config: Config = {}) {
138
138
  const defaultGrayShade = isDarkMode ? 400 : 600;
139
139
  const defaultRingOffsetColor = isDarkMode ? ringOffsetColorDark : ringOffsetColorLight;
140
140
 
141
+ localStorage.setItem("brand", brand);
142
+ localStorage.setItem("gray", gray);
143
+
141
144
  if (gray === COOL_COLOR) {
142
145
  gray = GRAY_COLOR;
143
146
  }
144
147
 
148
+ if (brand === GRAYSCALE_COLOR) {
149
+ brand = gray;
150
+ }
151
+
145
152
  /* Remove deprecated color aliases. */
146
153
  delete (tailwindColors as Partial<DefaultColors>).lightBlue;
147
154
  delete (tailwindColors as Partial<DefaultColors>).warmGray;
@@ -169,9 +176,6 @@ export function setTheme(config: Config = {}) {
169
176
  console.warn(`The gray color '${gray}' is missing in your palette.`);
170
177
  }
171
178
 
172
- localStorage.setItem("brand", brand);
173
- localStorage.setItem("gray", gray);
174
-
175
179
  const variables: Partial<VuelessCssVariables> = {
176
180
  "--vl-rounding-sm": `${Number(roundingSm) / PX_IN_REM}rem`,
177
181
  "--vl-rounding": `${Number(rounding) / PX_IN_REM}rem`,