@yahoo/uds 3.115.0 → 3.115.2

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.
@@ -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 = (0, node_module.createRequire)(require("url").pathToFileURL(__filename).href)("tailwindcss/colors.js");
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
- delete tailwindColorsConfig["lightBlue"];
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);
@@ -1,13 +1,304 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
2
2
  import { defaultTokensConfig } from "../../../../config/dist/index.js";
3
3
  import { entries } from "../../utils/entries.js";
4
- import { createRequire } from "node:module";
5
4
 
6
5
  //#region ../tailwind/dist/tailwind/plugins/getTailwindAsUdsColors.js
7
6
  /*! © 2026 Yahoo, Inc. UDS Tailwind and Purger v0.0.0-development */
8
7
  const SPECTRUM_COLOR_PREFIX = "uds-spectrum-color";
9
8
  const lightSpectrum = defaultTokensConfig.colorMode.light.spectrum;
10
- const tailwindColorsConfig = createRequire(import.meta.url)("tailwindcss/colors.js");
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
+ };
11
302
  const udsLightColors = flattenSpectrumToRgbRecord(lightSpectrum);
12
303
  /**
13
304
  * Iterates the two-level spectrum structure directly instead of using
@@ -54,13 +345,7 @@ const getClosestUdsColor = (targetColor) => {
54
345
  function getTailwindAsUdsColors() {
55
346
  const tailwindColorsAsUds = {};
56
347
  /** Avoid logging deprecation warnings */
57
- delete tailwindColorsConfig["lightBlue"];
58
- delete tailwindColorsConfig["warmGray"];
59
- delete tailwindColorsConfig["trueGray"];
60
- delete tailwindColorsConfig["coolGray"];
61
- delete tailwindColorsConfig["blueGray"];
62
- for (const [name, colorOrConfig] of entries(tailwindColorsConfig)) if (typeof colorOrConfig === "object") if (name === "lightBlue" || name === "warmGray" || name === "trueGray" || name === "coolGray" || name === "blueGray") continue;
63
- else {
348
+ for (const [name, colorOrConfig] of entries(tailwindColorsConfig)) if (typeof colorOrConfig === "object") {
64
349
  for (const [shade, color] of entries(colorOrConfig)) {
65
350
  if (!tailwindColorsAsUds[name]) tailwindColorsAsUds[name] = {};
66
351
  tailwindColorsAsUds[name][shade] = getClosestUdsColor(color);