maz-ui 3.47.2-beta.22 → 3.47.2-beta.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/nuxt/index.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.0.0"
6
6
  },
7
- "version": "3.47.2-beta.22",
7
+ "version": "3.47.2-beta.23",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "maz-ui",
3
3
  "type": "module",
4
- "version": "3.47.2-beta.22",
4
+ "version": "3.47.2-beta.23",
5
5
  "description": "A standalone components library for Vue.Js 3 & Nuxt.Js 3",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -1,13 +1,15 @@
1
1
  import type { ThemeConfig } from 'tailwindcss/types/config'
2
2
  import { baseColors, variatingColors, variations } from '../variables/colors'
3
3
 
4
+ type VariatingColorKeys = keyof typeof variatingColors
5
+
4
6
  export function getColors() {
5
- const colors: Record<keyof typeof variatingColors & keyof typeof baseColors, string> = {
7
+ const colors: ThemeConfig['colors'] = {
6
8
  ...baseColors,
7
9
  }
8
10
 
9
- for (const color of Object.keys(variatingColors)) {
10
- colors[color] = variations.reduce(
11
+ for (const color of Object.keys(variatingColors) as VariatingColorKeys[]) {
12
+ const colorVariations = variations.reduce(
11
13
  (colorVariations, variation) => {
12
14
  colorVariations[variation]
13
15
  = variation === 'DEFAULT'
@@ -15,9 +17,11 @@ export function getColors() {
15
17
  : `var(--maz-color-${color}-${variation})`
16
18
  return colorVariations
17
19
  },
18
- {} as Record<string, string>,
20
+ {} as Record<typeof variations[number], string>,
19
21
  )
22
+
23
+ colors[color] = colorVariations
20
24
  }
21
25
 
22
- return colors satisfies ThemeConfig['colors']
26
+ return colors
23
27
  }
@@ -39,7 +39,7 @@ export declare const baseConfig: {
39
39
  'lap-2xl': string;
40
40
  'lap-3xl': string;
41
41
  };
42
- colors: Record<never, string>;
42
+ colors: import("tailwindcss/types/config").RecursiveKeyValuePair<string, string>;
43
43
  borderWidth: {
44
44
  0: string;
45
45
  1: string;
@@ -98,7 +98,7 @@ export declare const tailwindConfig: {
98
98
  'lap-2xl': string;
99
99
  'lap-3xl': string;
100
100
  };
101
- colors: Record<never, string>;
101
+ colors: import("tailwindcss/types/config").RecursiveKeyValuePair<string, string>;
102
102
  borderWidth: {
103
103
  0: string;
104
104
  1: string;
@@ -1 +1 @@
1
- export declare function getColors(): Record<never, string>;
1
+ export declare function getColors(): import("tailwindcss/types/config").RecursiveKeyValuePair<string, string>;