@yahoo/uds 3.116.0-beta.3 → 3.116.0-beta.4
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/dist/automated-config/dist/generated/autoVariants.cjs +1 -0
- package/dist/automated-config/dist/generated/autoVariants.d.cts +1 -0
- package/dist/automated-config/dist/generated/autoVariants.d.ts +1 -0
- package/dist/automated-config/dist/generated/autoVariants.js +1 -0
- package/dist/automated-config/dist/generated/generatedConfigs.cjs +48 -0
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +14 -0
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +14 -0
- package/dist/automated-config/dist/generated/generatedConfigs.js +48 -0
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +5 -0
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +5 -0
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.cts +2 -2
- package/dist/automated-config/dist/utils/getConfigVariantProperties.d.ts +2 -2
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
- package/dist/components/client/Popover/PopoverContent.cjs +4 -3
- package/dist/components/client/Popover/PopoverContent.js +4 -3
- package/dist/config/dist/index.cjs +5 -0
- package/dist/config/dist/index.js +5 -0
- package/dist/runtime/popoverConfig.cjs +6 -11
- package/dist/runtime/popoverConfig.d.cts +2 -1
- package/dist/runtime/popoverConfig.d.ts +2 -1
- package/dist/runtime/popoverConfig.js +6 -11
- package/dist/styles/styler.d.cts +70 -69
- package/dist/styles/styler.d.ts +70 -69
- package/dist/styles/variants.d.cts +3 -0
- package/dist/styles/variants.d.ts +3 -0
- package/dist/tailwind/dist/commands/generateComponentData.cjs +2 -0
- package/dist/tailwind/dist/commands/generateComponentData.js +3 -1
- package/dist/tailwind/dist/commands/generatePurgeCSSData.cjs +3 -8
- package/dist/tailwind/dist/commands/generatePurgeCSSData.js +3 -8
- package/dist/tailwind/dist/purger/optimized/purgeFromCode.cjs +22 -2
- package/dist/tailwind/dist/purger/optimized/purgeFromCode.js +22 -2
- package/dist/tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.cjs +294 -10
- package/dist/tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.js +294 -9
- package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.cts +1 -1
- package/dist/tailwind/dist/tailwind/utils/getFontStyles.d.ts +1 -1
- package/dist/uds/generated/componentData.cjs +226 -225
- package/dist/uds/generated/componentData.js +226 -225
- package/dist/uds/generated/tailwindPurge.cjs +219 -218
- package/dist/uds/generated/tailwindPurge.js +219 -218
- package/dist/uds/package.cjs +1 -1
- package/dist/uds/package.js +1 -1
- package/generated/componentData.json +306 -305
- package/generated/tailwindPurge.ts +5 -4604
- package/package.json +2 -2
- package/dist/tailwind/dist/.prettierrc.cjs +0 -13
- package/dist/tailwind/dist/.prettierrc.js +0 -12
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_colors = require('../../../cli/dist/lib/colors.cjs');
|
|
4
4
|
const require_print = require('../../../cli/dist/lib/print.cjs');
|
|
5
|
-
const require__prettierrc = require('../.prettierrc.cjs');
|
|
6
5
|
const require_generatePurgeCSSData = require('../utils/generatePurgeCSSData.cjs');
|
|
7
6
|
let node_path = require("node:path");
|
|
8
7
|
node_path = require_runtime.__toESM(node_path);
|
|
9
|
-
let prettier = require("prettier");
|
|
10
8
|
|
|
11
9
|
//#region ../tailwind/dist/commands/generatePurgeCSSData.js
|
|
12
10
|
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
@@ -24,7 +22,7 @@ const makeGeneratePurgeCSSDataCommand = (getContext) => ({
|
|
|
24
22
|
let componentToTwClasses = await require_generatePurgeCSSData.getTwClassesInComponent(exportedComponents, exportsToFilePath);
|
|
25
23
|
componentToTwClasses = require_generatePurgeCSSData.addAutoVariantsToComponentClasses(componentToTwClasses);
|
|
26
24
|
const outputFilePath = node_path.default.resolve(process.cwd(), "./generated/tailwindPurge.ts");
|
|
27
|
-
const
|
|
25
|
+
const fileContent = `
|
|
28
26
|
//! This file is generated by \`uds purge\` from @yahoo/uds
|
|
29
27
|
//! Do not edit directly
|
|
30
28
|
//! If there is issue with this file please report to #ask-uds
|
|
@@ -39,11 +37,8 @@ export const variantsList: VariantsList = ${JSON.stringify(variantsList)};
|
|
|
39
37
|
export const componentToVariants: ComponentToVariants = ${JSON.stringify(componentToVariants)};
|
|
40
38
|
export const componentToTwClasses: ComponentToTwClasses = ${JSON.stringify(componentToTwClasses)};
|
|
41
39
|
export const componentsDependencies: ComponentDependencies = ${JSON.stringify(componentsDependencies)};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
...require__prettierrc._prettierrc_default
|
|
45
|
-
});
|
|
46
|
-
await Bun.write(outputFilePath, formattedContent);
|
|
40
|
+
`;
|
|
41
|
+
await Bun.write(outputFilePath, fileContent);
|
|
47
42
|
require_print.print(require_colors.green(`✅ Purge CSS Data saved ${outputFilePath}`));
|
|
48
43
|
}
|
|
49
44
|
});
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
import { green } from "../../../cli/dist/lib/colors.js";
|
|
3
3
|
import { print } from "../../../cli/dist/lib/print.js";
|
|
4
|
-
import { _prettierrc_default } from "../.prettierrc.js";
|
|
5
4
|
import { addAutoVariantsToComponentClasses, convertVariantsIntoTailwindClass, getComponentsDependencies, getComponentsProps, getExportedComponents, getExportsToFilePath, getTwClassesInComponent } from "../utils/generatePurgeCSSData.js";
|
|
6
5
|
import path from "node:path";
|
|
7
|
-
import { format } from "prettier";
|
|
8
6
|
|
|
9
7
|
//#region ../tailwind/dist/commands/generatePurgeCSSData.js
|
|
10
8
|
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
@@ -22,7 +20,7 @@ const makeGeneratePurgeCSSDataCommand = (getContext) => ({
|
|
|
22
20
|
let componentToTwClasses = await getTwClassesInComponent(exportedComponents, exportsToFilePath);
|
|
23
21
|
componentToTwClasses = addAutoVariantsToComponentClasses(componentToTwClasses);
|
|
24
22
|
const outputFilePath = path.resolve(process.cwd(), "./generated/tailwindPurge.ts");
|
|
25
|
-
const
|
|
23
|
+
const fileContent = `
|
|
26
24
|
//! This file is generated by \`uds purge\` from @yahoo/uds
|
|
27
25
|
//! Do not edit directly
|
|
28
26
|
//! If there is issue with this file please report to #ask-uds
|
|
@@ -37,11 +35,8 @@ export const variantsList: VariantsList = ${JSON.stringify(variantsList)};
|
|
|
37
35
|
export const componentToVariants: ComponentToVariants = ${JSON.stringify(componentToVariants)};
|
|
38
36
|
export const componentToTwClasses: ComponentToTwClasses = ${JSON.stringify(componentToTwClasses)};
|
|
39
37
|
export const componentsDependencies: ComponentDependencies = ${JSON.stringify(componentsDependencies)};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
..._prettierrc_default
|
|
43
|
-
});
|
|
44
|
-
await Bun.write(outputFilePath, formattedContent);
|
|
38
|
+
`;
|
|
39
|
+
await Bun.write(outputFilePath, fileContent);
|
|
45
40
|
print(green(`✅ Purge CSS Data saved ${outputFilePath}`));
|
|
46
41
|
}
|
|
47
42
|
});
|
|
@@ -266,12 +266,32 @@ const purgeFromCodeOptimized = async (code, options) => {
|
|
|
266
266
|
*/
|
|
267
267
|
const findComponentReferences = (sourceFile, componentName) => {
|
|
268
268
|
const references = [];
|
|
269
|
+
const seenTags = /* @__PURE__ */ new Set();
|
|
270
|
+
const collectMatchingTags = (localName) => {
|
|
271
|
+
sourceFile.getDescendants().filter((node) => ts_morph.Node.isJsxOpeningElement(node) || ts_morph.Node.isJsxSelfClosingElement(node)).forEach((node) => {
|
|
272
|
+
const tagName = node.getTagNameNode().getText();
|
|
273
|
+
if (tagName === localName || tagName.startsWith(`${localName}.`)) {
|
|
274
|
+
const key = `${tagName}:${node.getStart()}`;
|
|
275
|
+
if (!seenTags.has(key)) {
|
|
276
|
+
seenTags.add(key);
|
|
277
|
+
references.push(node);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
});
|
|
281
|
+
};
|
|
269
282
|
sourceFile.getImportDeclarations().forEach((importDecl) => {
|
|
270
283
|
if (!isUdsComponentModule(getModuleSpecifierValue(importDecl))) return;
|
|
271
284
|
importDecl.getNamedImports().forEach((namedImport) => {
|
|
272
285
|
if (namedImport.getName() === componentName) {
|
|
273
|
-
const
|
|
274
|
-
|
|
286
|
+
const localName = namedImport.getAliasNode()?.getText() ?? componentName;
|
|
287
|
+
require_jsx.findJsxReferences(namedImport.getFirstDescendantByKindOrThrow(ts_morph.ts.SyntaxKind.Identifier)).forEach((reference) => {
|
|
288
|
+
const key = `${reference.getTagNameNode().getText()}:${reference.getStart()}`;
|
|
289
|
+
if (!seenTags.has(key)) {
|
|
290
|
+
seenTags.add(key);
|
|
291
|
+
references.push(reference);
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
collectMatchingTags(localName);
|
|
275
295
|
}
|
|
276
296
|
});
|
|
277
297
|
});
|
|
@@ -265,12 +265,32 @@ const purgeFromCodeOptimized = async (code, options) => {
|
|
|
265
265
|
*/
|
|
266
266
|
const findComponentReferences = (sourceFile, componentName) => {
|
|
267
267
|
const references = [];
|
|
268
|
+
const seenTags = /* @__PURE__ */ new Set();
|
|
269
|
+
const collectMatchingTags = (localName) => {
|
|
270
|
+
sourceFile.getDescendants().filter((node) => Node.isJsxOpeningElement(node) || Node.isJsxSelfClosingElement(node)).forEach((node) => {
|
|
271
|
+
const tagName = node.getTagNameNode().getText();
|
|
272
|
+
if (tagName === localName || tagName.startsWith(`${localName}.`)) {
|
|
273
|
+
const key = `${tagName}:${node.getStart()}`;
|
|
274
|
+
if (!seenTags.has(key)) {
|
|
275
|
+
seenTags.add(key);
|
|
276
|
+
references.push(node);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
};
|
|
268
281
|
sourceFile.getImportDeclarations().forEach((importDecl) => {
|
|
269
282
|
if (!isUdsComponentModule(getModuleSpecifierValue(importDecl))) return;
|
|
270
283
|
importDecl.getNamedImports().forEach((namedImport) => {
|
|
271
284
|
if (namedImport.getName() === componentName) {
|
|
272
|
-
const
|
|
273
|
-
|
|
285
|
+
const localName = namedImport.getAliasNode()?.getText() ?? componentName;
|
|
286
|
+
findJsxReferences(namedImport.getFirstDescendantByKindOrThrow(ts.SyntaxKind.Identifier)).forEach((reference) => {
|
|
287
|
+
const key = `${reference.getTagNameNode().getText()}:${reference.getStart()}`;
|
|
288
|
+
if (!seenTags.has(key)) {
|
|
289
|
+
seenTags.add(key);
|
|
290
|
+
references.push(reference);
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
collectMatchingTags(localName);
|
|
274
294
|
}
|
|
275
295
|
});
|
|
276
296
|
});
|
|
@@ -1,14 +1,304 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
-
const require_runtime = require('../../../../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
const require_index = require('../../../../config/dist/index.cjs');
|
|
4
3
|
const require_entries = require('../../utils/entries.cjs');
|
|
5
|
-
let node_module = require("node:module");
|
|
6
4
|
|
|
7
5
|
//#region ../tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.js
|
|
8
6
|
/*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
|
|
9
7
|
const SPECTRUM_COLOR_PREFIX = "uds-spectrum-color";
|
|
10
8
|
const lightSpectrum = require_index.defaultTokensConfig.colorMode.light.spectrum;
|
|
11
|
-
const tailwindColorsConfig =
|
|
9
|
+
const tailwindColorsConfig = {
|
|
10
|
+
inherit: "inherit",
|
|
11
|
+
current: "currentColor",
|
|
12
|
+
transparent: "transparent",
|
|
13
|
+
black: "#000",
|
|
14
|
+
white: "#fff",
|
|
15
|
+
slate: {
|
|
16
|
+
50: "#f8fafc",
|
|
17
|
+
100: "#f1f5f9",
|
|
18
|
+
200: "#e2e8f0",
|
|
19
|
+
300: "#cbd5e1",
|
|
20
|
+
400: "#94a3b8",
|
|
21
|
+
500: "#64748b",
|
|
22
|
+
600: "#475569",
|
|
23
|
+
700: "#334155",
|
|
24
|
+
800: "#1e293b",
|
|
25
|
+
900: "#0f172a",
|
|
26
|
+
950: "#020617"
|
|
27
|
+
},
|
|
28
|
+
gray: {
|
|
29
|
+
50: "#f9fafb",
|
|
30
|
+
100: "#f3f4f6",
|
|
31
|
+
200: "#e5e7eb",
|
|
32
|
+
300: "#d1d5db",
|
|
33
|
+
400: "#9ca3af",
|
|
34
|
+
500: "#6b7280",
|
|
35
|
+
600: "#4b5563",
|
|
36
|
+
700: "#374151",
|
|
37
|
+
800: "#1f2937",
|
|
38
|
+
900: "#111827",
|
|
39
|
+
950: "#030712"
|
|
40
|
+
},
|
|
41
|
+
zinc: {
|
|
42
|
+
50: "#fafafa",
|
|
43
|
+
100: "#f4f4f5",
|
|
44
|
+
200: "#e4e4e7",
|
|
45
|
+
300: "#d4d4d8",
|
|
46
|
+
400: "#a1a1aa",
|
|
47
|
+
500: "#71717a",
|
|
48
|
+
600: "#52525b",
|
|
49
|
+
700: "#3f3f46",
|
|
50
|
+
800: "#27272a",
|
|
51
|
+
900: "#18181b",
|
|
52
|
+
950: "#09090b"
|
|
53
|
+
},
|
|
54
|
+
neutral: {
|
|
55
|
+
50: "#fafafa",
|
|
56
|
+
100: "#f5f5f5",
|
|
57
|
+
200: "#e5e5e5",
|
|
58
|
+
300: "#d4d4d4",
|
|
59
|
+
400: "#a3a3a3",
|
|
60
|
+
500: "#737373",
|
|
61
|
+
600: "#525252",
|
|
62
|
+
700: "#404040",
|
|
63
|
+
800: "#262626",
|
|
64
|
+
900: "#171717",
|
|
65
|
+
950: "#0a0a0a"
|
|
66
|
+
},
|
|
67
|
+
stone: {
|
|
68
|
+
50: "#fafaf9",
|
|
69
|
+
100: "#f5f5f4",
|
|
70
|
+
200: "#e7e5e4",
|
|
71
|
+
300: "#d6d3d1",
|
|
72
|
+
400: "#a8a29e",
|
|
73
|
+
500: "#78716c",
|
|
74
|
+
600: "#57534e",
|
|
75
|
+
700: "#44403c",
|
|
76
|
+
800: "#292524",
|
|
77
|
+
900: "#1c1917",
|
|
78
|
+
950: "#0c0a09"
|
|
79
|
+
},
|
|
80
|
+
red: {
|
|
81
|
+
50: "#fef2f2",
|
|
82
|
+
100: "#fee2e2",
|
|
83
|
+
200: "#fecaca",
|
|
84
|
+
300: "#fca5a5",
|
|
85
|
+
400: "#f87171",
|
|
86
|
+
500: "#ef4444",
|
|
87
|
+
600: "#dc2626",
|
|
88
|
+
700: "#b91c1c",
|
|
89
|
+
800: "#991b1b",
|
|
90
|
+
900: "#7f1d1d",
|
|
91
|
+
950: "#450a0a"
|
|
92
|
+
},
|
|
93
|
+
orange: {
|
|
94
|
+
50: "#fff7ed",
|
|
95
|
+
100: "#ffedd5",
|
|
96
|
+
200: "#fed7aa",
|
|
97
|
+
300: "#fdba74",
|
|
98
|
+
400: "#fb923c",
|
|
99
|
+
500: "#f97316",
|
|
100
|
+
600: "#ea580c",
|
|
101
|
+
700: "#c2410c",
|
|
102
|
+
800: "#9a3412",
|
|
103
|
+
900: "#7c2d12",
|
|
104
|
+
950: "#431407"
|
|
105
|
+
},
|
|
106
|
+
amber: {
|
|
107
|
+
50: "#fffbeb",
|
|
108
|
+
100: "#fef3c7",
|
|
109
|
+
200: "#fde68a",
|
|
110
|
+
300: "#fcd34d",
|
|
111
|
+
400: "#fbbf24",
|
|
112
|
+
500: "#f59e0b",
|
|
113
|
+
600: "#d97706",
|
|
114
|
+
700: "#b45309",
|
|
115
|
+
800: "#92400e",
|
|
116
|
+
900: "#78350f",
|
|
117
|
+
950: "#451a03"
|
|
118
|
+
},
|
|
119
|
+
yellow: {
|
|
120
|
+
50: "#fefce8",
|
|
121
|
+
100: "#fef9c3",
|
|
122
|
+
200: "#fef08a",
|
|
123
|
+
300: "#fde047",
|
|
124
|
+
400: "#facc15",
|
|
125
|
+
500: "#eab308",
|
|
126
|
+
600: "#ca8a04",
|
|
127
|
+
700: "#a16207",
|
|
128
|
+
800: "#854d0e",
|
|
129
|
+
900: "#713f12",
|
|
130
|
+
950: "#422006"
|
|
131
|
+
},
|
|
132
|
+
lime: {
|
|
133
|
+
50: "#f7fee7",
|
|
134
|
+
100: "#ecfccb",
|
|
135
|
+
200: "#d9f99d",
|
|
136
|
+
300: "#bef264",
|
|
137
|
+
400: "#a3e635",
|
|
138
|
+
500: "#84cc16",
|
|
139
|
+
600: "#65a30d",
|
|
140
|
+
700: "#4d7c0f",
|
|
141
|
+
800: "#3f6212",
|
|
142
|
+
900: "#365314",
|
|
143
|
+
950: "#1a2e05"
|
|
144
|
+
},
|
|
145
|
+
green: {
|
|
146
|
+
50: "#f0fdf4",
|
|
147
|
+
100: "#dcfce7",
|
|
148
|
+
200: "#bbf7d0",
|
|
149
|
+
300: "#86efac",
|
|
150
|
+
400: "#4ade80",
|
|
151
|
+
500: "#22c55e",
|
|
152
|
+
600: "#16a34a",
|
|
153
|
+
700: "#15803d",
|
|
154
|
+
800: "#166534",
|
|
155
|
+
900: "#14532d",
|
|
156
|
+
950: "#052e16"
|
|
157
|
+
},
|
|
158
|
+
emerald: {
|
|
159
|
+
50: "#ecfdf5",
|
|
160
|
+
100: "#d1fae5",
|
|
161
|
+
200: "#a7f3d0",
|
|
162
|
+
300: "#6ee7b7",
|
|
163
|
+
400: "#34d399",
|
|
164
|
+
500: "#10b981",
|
|
165
|
+
600: "#059669",
|
|
166
|
+
700: "#047857",
|
|
167
|
+
800: "#065f46",
|
|
168
|
+
900: "#064e3b",
|
|
169
|
+
950: "#022c22"
|
|
170
|
+
},
|
|
171
|
+
teal: {
|
|
172
|
+
50: "#f0fdfa",
|
|
173
|
+
100: "#ccfbf1",
|
|
174
|
+
200: "#99f6e4",
|
|
175
|
+
300: "#5eead4",
|
|
176
|
+
400: "#2dd4bf",
|
|
177
|
+
500: "#14b8a6",
|
|
178
|
+
600: "#0d9488",
|
|
179
|
+
700: "#0f766e",
|
|
180
|
+
800: "#115e59",
|
|
181
|
+
900: "#134e4a",
|
|
182
|
+
950: "#042f2e"
|
|
183
|
+
},
|
|
184
|
+
cyan: {
|
|
185
|
+
50: "#ecfeff",
|
|
186
|
+
100: "#cffafe",
|
|
187
|
+
200: "#a5f3fc",
|
|
188
|
+
300: "#67e8f9",
|
|
189
|
+
400: "#22d3ee",
|
|
190
|
+
500: "#06b6d4",
|
|
191
|
+
600: "#0891b2",
|
|
192
|
+
700: "#0e7490",
|
|
193
|
+
800: "#155e75",
|
|
194
|
+
900: "#164e63",
|
|
195
|
+
950: "#083344"
|
|
196
|
+
},
|
|
197
|
+
sky: {
|
|
198
|
+
50: "#f0f9ff",
|
|
199
|
+
100: "#e0f2fe",
|
|
200
|
+
200: "#bae6fd",
|
|
201
|
+
300: "#7dd3fc",
|
|
202
|
+
400: "#38bdf8",
|
|
203
|
+
500: "#0ea5e9",
|
|
204
|
+
600: "#0284c7",
|
|
205
|
+
700: "#0369a1",
|
|
206
|
+
800: "#075985",
|
|
207
|
+
900: "#0c4a6e",
|
|
208
|
+
950: "#082f49"
|
|
209
|
+
},
|
|
210
|
+
blue: {
|
|
211
|
+
50: "#eff6ff",
|
|
212
|
+
100: "#dbeafe",
|
|
213
|
+
200: "#bfdbfe",
|
|
214
|
+
300: "#93c5fd",
|
|
215
|
+
400: "#60a5fa",
|
|
216
|
+
500: "#3b82f6",
|
|
217
|
+
600: "#2563eb",
|
|
218
|
+
700: "#1d4ed8",
|
|
219
|
+
800: "#1e40af",
|
|
220
|
+
900: "#1e3a8a",
|
|
221
|
+
950: "#172554"
|
|
222
|
+
},
|
|
223
|
+
indigo: {
|
|
224
|
+
50: "#eef2ff",
|
|
225
|
+
100: "#e0e7ff",
|
|
226
|
+
200: "#c7d2fe",
|
|
227
|
+
300: "#a5b4fc",
|
|
228
|
+
400: "#818cf8",
|
|
229
|
+
500: "#6366f1",
|
|
230
|
+
600: "#4f46e5",
|
|
231
|
+
700: "#4338ca",
|
|
232
|
+
800: "#3730a3",
|
|
233
|
+
900: "#312e81",
|
|
234
|
+
950: "#1e1b4b"
|
|
235
|
+
},
|
|
236
|
+
violet: {
|
|
237
|
+
50: "#f5f3ff",
|
|
238
|
+
100: "#ede9fe",
|
|
239
|
+
200: "#ddd6fe",
|
|
240
|
+
300: "#c4b5fd",
|
|
241
|
+
400: "#a78bfa",
|
|
242
|
+
500: "#8b5cf6",
|
|
243
|
+
600: "#7c3aed",
|
|
244
|
+
700: "#6d28d9",
|
|
245
|
+
800: "#5b21b6",
|
|
246
|
+
900: "#4c1d95",
|
|
247
|
+
950: "#2e1065"
|
|
248
|
+
},
|
|
249
|
+
purple: {
|
|
250
|
+
50: "#faf5ff",
|
|
251
|
+
100: "#f3e8ff",
|
|
252
|
+
200: "#e9d5ff",
|
|
253
|
+
300: "#d8b4fe",
|
|
254
|
+
400: "#c084fc",
|
|
255
|
+
500: "#a855f7",
|
|
256
|
+
600: "#9333ea",
|
|
257
|
+
700: "#7e22ce",
|
|
258
|
+
800: "#6b21a8",
|
|
259
|
+
900: "#581c87",
|
|
260
|
+
950: "#3b0764"
|
|
261
|
+
},
|
|
262
|
+
fuchsia: {
|
|
263
|
+
50: "#fdf4ff",
|
|
264
|
+
100: "#fae8ff",
|
|
265
|
+
200: "#f5d0fe",
|
|
266
|
+
300: "#f0abfc",
|
|
267
|
+
400: "#e879f9",
|
|
268
|
+
500: "#d946ef",
|
|
269
|
+
600: "#c026d3",
|
|
270
|
+
700: "#a21caf",
|
|
271
|
+
800: "#86198f",
|
|
272
|
+
900: "#701a75",
|
|
273
|
+
950: "#4a044e"
|
|
274
|
+
},
|
|
275
|
+
pink: {
|
|
276
|
+
50: "#fdf2f8",
|
|
277
|
+
100: "#fce7f3",
|
|
278
|
+
200: "#fbcfe8",
|
|
279
|
+
300: "#f9a8d4",
|
|
280
|
+
400: "#f472b6",
|
|
281
|
+
500: "#ec4899",
|
|
282
|
+
600: "#db2777",
|
|
283
|
+
700: "#be185d",
|
|
284
|
+
800: "#9d174d",
|
|
285
|
+
900: "#831843",
|
|
286
|
+
950: "#500724"
|
|
287
|
+
},
|
|
288
|
+
rose: {
|
|
289
|
+
50: "#fff1f2",
|
|
290
|
+
100: "#ffe4e6",
|
|
291
|
+
200: "#fecdd3",
|
|
292
|
+
300: "#fda4af",
|
|
293
|
+
400: "#fb7185",
|
|
294
|
+
500: "#f43f5e",
|
|
295
|
+
600: "#e11d48",
|
|
296
|
+
700: "#be123c",
|
|
297
|
+
800: "#9f1239",
|
|
298
|
+
900: "#881337",
|
|
299
|
+
950: "#4c0519"
|
|
300
|
+
}
|
|
301
|
+
};
|
|
12
302
|
const udsLightColors = flattenSpectrumToRgbRecord(lightSpectrum);
|
|
13
303
|
/**
|
|
14
304
|
* Iterates the two-level spectrum structure directly instead of using
|
|
@@ -55,13 +345,7 @@ const getClosestUdsColor = (targetColor) => {
|
|
|
55
345
|
function getTailwindAsUdsColors() {
|
|
56
346
|
const tailwindColorsAsUds = {};
|
|
57
347
|
/** Avoid logging deprecation warnings */
|
|
58
|
-
|
|
59
|
-
delete tailwindColorsConfig["warmGray"];
|
|
60
|
-
delete tailwindColorsConfig["trueGray"];
|
|
61
|
-
delete tailwindColorsConfig["coolGray"];
|
|
62
|
-
delete tailwindColorsConfig["blueGray"];
|
|
63
|
-
for (const [name, colorOrConfig] of require_entries.entries(tailwindColorsConfig)) if (typeof colorOrConfig === "object") if (name === "lightBlue" || name === "warmGray" || name === "trueGray" || name === "coolGray" || name === "blueGray") continue;
|
|
64
|
-
else {
|
|
348
|
+
for (const [name, colorOrConfig] of require_entries.entries(tailwindColorsConfig)) if (typeof colorOrConfig === "object") {
|
|
65
349
|
for (const [shade, color] of require_entries.entries(colorOrConfig)) {
|
|
66
350
|
if (!tailwindColorsAsUds[name]) tailwindColorsAsUds[name] = {};
|
|
67
351
|
tailwindColorsAsUds[name][shade] = getClosestUdsColor(color);
|