storybook 9.0.0-beta.1 → 9.0.0-beta.11

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 (94) hide show
  1. package/assets/server/base-preview-head.html +2 -1
  2. package/dist/actions/decorator.js +49 -52
  3. package/dist/actions/index.cjs +42 -44
  4. package/dist/actions/index.js +37 -40
  5. package/dist/actions/preview.cjs +44 -46
  6. package/dist/actions/preview.d.ts +501 -0
  7. package/dist/actions/preview.js +24 -27
  8. package/dist/babel/index.cjs +15060 -14974
  9. package/dist/babel/index.d.ts +37 -18
  10. package/dist/babel/index.js +15097 -15011
  11. package/dist/backgrounds/index.d.ts +501 -0
  12. package/dist/backgrounds/preview.d.ts +501 -0
  13. package/dist/bin/index.cjs +44 -44
  14. package/dist/bin/index.js +44 -44
  15. package/dist/builder-manager/index.cjs +303 -283
  16. package/dist/builder-manager/index.js +545 -524
  17. package/dist/channels/index.js +919 -941
  18. package/dist/cli/bin/index.cjs +4184 -736
  19. package/dist/cli/bin/index.js +4198 -748
  20. package/dist/cli/index.cjs +36838 -28392
  21. package/dist/cli/index.d.ts +974 -1
  22. package/dist/cli/index.js +41620 -33168
  23. package/dist/client-logger/index.d.ts +2 -1
  24. package/dist/common/index.cjs +4783 -4691
  25. package/dist/common/index.d.ts +8 -2
  26. package/dist/common/index.js +5165 -5069
  27. package/dist/components/index.cjs +7905 -5600
  28. package/dist/components/index.d.ts +12 -12
  29. package/dist/components/index.js +4713 -3786
  30. package/dist/controls/preview.d.ts +501 -0
  31. package/dist/core-server/index.cjs +6799 -6708
  32. package/dist/core-server/index.d.ts +526 -25
  33. package/dist/core-server/index.js +6948 -6851
  34. package/dist/core-server/presets/common-manager.js +4528 -3377
  35. package/dist/core-server/presets/common-override-preset.cjs +10 -12
  36. package/dist/core-server/presets/common-override-preset.js +3 -5
  37. package/dist/core-server/presets/common-preset.cjs +2301 -2238
  38. package/dist/core-server/presets/common-preset.js +2389 -2322
  39. package/dist/docs-tools/index.cjs +484 -464
  40. package/dist/docs-tools/index.js +781 -768
  41. package/dist/highlight/index.cjs +19 -18
  42. package/dist/highlight/index.d.ts +4 -5
  43. package/dist/highlight/index.js +3 -2
  44. package/dist/highlight/preview.cjs +314 -310
  45. package/dist/highlight/preview.d.ts +501 -0
  46. package/dist/highlight/preview.js +296 -292
  47. package/dist/instrumenter/index.cjs +561 -559
  48. package/dist/instrumenter/index.js +1564 -1516
  49. package/dist/manager/globals-module-info.cjs +2 -0
  50. package/dist/manager/globals-module-info.js +2 -0
  51. package/dist/manager/globals-runtime.js +23602 -23339
  52. package/dist/manager/runtime.js +4891 -4650
  53. package/dist/manager-api/index.cjs +2400 -2321
  54. package/dist/manager-api/index.d.ts +513 -1
  55. package/dist/manager-api/index.js +1951 -1903
  56. package/dist/manager-errors.js +37 -41
  57. package/dist/measure/index.d.ts +501 -0
  58. package/dist/measure/preview.d.ts +501 -0
  59. package/dist/node-logger/index.cjs +25 -25
  60. package/dist/node-logger/index.js +25 -25
  61. package/dist/outline/index.d.ts +501 -0
  62. package/dist/outline/preview.d.ts +501 -0
  63. package/dist/preview/runtime.js +35803 -35785
  64. package/dist/preview-api/index.cjs +1287 -1265
  65. package/dist/preview-api/index.d.ts +1 -1
  66. package/dist/preview-api/index.js +1367 -1361
  67. package/dist/preview-errors.js +152 -173
  68. package/dist/router/index.cjs +5674 -2282
  69. package/dist/router/index.d.ts +622 -243
  70. package/dist/router/index.js +1318 -872
  71. package/dist/server-errors.cjs +192 -177
  72. package/dist/server-errors.d.ts +11 -1
  73. package/dist/server-errors.js +173 -158
  74. package/dist/telemetry/index.cjs +4934 -1445
  75. package/dist/telemetry/index.d.ts +2 -1
  76. package/dist/telemetry/index.js +4966 -1475
  77. package/dist/test/index.cjs +1876 -1878
  78. package/dist/test/index.d.ts +1269 -83
  79. package/dist/test/index.js +9157 -9248
  80. package/dist/test/preview.cjs +49 -15862
  81. package/dist/test/preview.d.ts +520 -13
  82. package/dist/test/preview.js +42 -14493
  83. package/dist/theming/create.cjs +2244 -79
  84. package/dist/theming/create.js +951 -67
  85. package/dist/theming/index.cjs +3209 -1067
  86. package/dist/theming/index.js +1816 -947
  87. package/dist/types/index.cjs +4 -4
  88. package/dist/types/index.d.ts +3124 -2596
  89. package/dist/viewport/index.d.ts +502 -3
  90. package/dist/viewport/preview.d.ts +501 -0
  91. package/package.json +14 -38
  92. package/dist/test/spy.cjs +0 -258
  93. package/dist/test/spy.d.ts +0 -66
  94. package/dist/test/spy.js +0 -240
@@ -1,9 +1,894 @@
1
- var h = Object.defineProperty;
2
- var o = (r, t) => h(r, "name", { value: t, configurable: !0 });
1
+ var se = Object.defineProperty;
2
+ var n = (r, e) => se(r, "name", { value: e, configurable: !0 });
3
+
4
+ // ../node_modules/@babel/runtime/helpers/esm/extends.js
5
+ function l() {
6
+ return l = Object.assign ? Object.assign.bind() : function(r) {
7
+ for (var e = 1; e < arguments.length; e++) {
8
+ var t = arguments[e];
9
+ for (var a in t) ({}).hasOwnProperty.call(t, a) && (r[a] = t[a]);
10
+ }
11
+ return r;
12
+ }, l.apply(null, arguments);
13
+ }
14
+ n(l, "_extends");
15
+
16
+ // ../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
17
+ function V(r) {
18
+ if (r === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
19
+ return r;
20
+ }
21
+ n(V, "_assertThisInitialized");
22
+
23
+ // ../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
24
+ function v(r, e) {
25
+ return v = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, a) {
26
+ return t.__proto__ = a, t;
27
+ }, v(r, e);
28
+ }
29
+ n(v, "_setPrototypeOf");
30
+
31
+ // ../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
32
+ function N(r, e) {
33
+ r.prototype = Object.create(e.prototype), r.prototype.constructor = r, v(r, e);
34
+ }
35
+ n(N, "_inheritsLoose");
36
+
37
+ // ../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
38
+ function R(r) {
39
+ return R = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
40
+ return e.__proto__ || Object.getPrototypeOf(e);
41
+ }, R(r);
42
+ }
43
+ n(R, "_getPrototypeOf");
44
+
45
+ // ../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
46
+ function G(r) {
47
+ try {
48
+ return Function.toString.call(r).indexOf("[native code]") !== -1;
49
+ } catch {
50
+ return typeof r == "function";
51
+ }
52
+ }
53
+ n(G, "_isNativeFunction");
54
+
55
+ // ../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
56
+ function k() {
57
+ try {
58
+ var r = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
59
+ }));
60
+ } catch {
61
+ }
62
+ return (k = /* @__PURE__ */ n(function() {
63
+ return !!r;
64
+ }, "_isNativeReflectConstruct"))();
65
+ }
66
+ n(k, "_isNativeReflectConstruct");
67
+
68
+ // ../node_modules/@babel/runtime/helpers/esm/construct.js
69
+ function Q(r, e, t) {
70
+ if (k()) return Reflect.construct.apply(null, arguments);
71
+ var a = [null];
72
+ a.push.apply(a, e);
73
+ var i = new (r.bind.apply(r, a))();
74
+ return t && v(i, t.prototype), i;
75
+ }
76
+ n(Q, "_construct");
77
+
78
+ // ../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
79
+ function j(r) {
80
+ var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
81
+ return j = /* @__PURE__ */ n(function(a) {
82
+ if (a === null || !G(a)) return a;
83
+ if (typeof a != "function") throw new TypeError("Super expression must either be null or a function");
84
+ if (e !== void 0) {
85
+ if (e.has(a)) return e.get(a);
86
+ e.set(a, i);
87
+ }
88
+ function i() {
89
+ return Q(a, arguments, R(this).constructor);
90
+ }
91
+ return n(i, "Wrapper"), i.prototype = Object.create(a.prototype, {
92
+ constructor: {
93
+ value: i,
94
+ enumerable: !1,
95
+ writable: !0,
96
+ configurable: !0
97
+ }
98
+ }), v(i, a);
99
+ }, "_wrapNativeSuper"), j(r);
100
+ }
101
+ n(j, "_wrapNativeSuper");
102
+
103
+ // ../node_modules/polished/dist/polished.esm.js
104
+ var fe = {
105
+ 1: `Passed invalid arguments to hsl, please pass multiple numbers e.g. hsl(360, 0.75, 0.4) or an object e.g. rgb({ hue: 255, saturation: 0\
106
+ .4, lightness: 0.75 }).
107
+
108
+ `,
109
+ 2: `Passed invalid arguments to hsla, please pass multiple numbers e.g. hsla(360, 0.75, 0.4, 0.7) or an object e.g. rgb({ hue: 255, satura\
110
+ tion: 0.4, lightness: 0.75, alpha: 0.7 }).
111
+
112
+ `,
113
+ 3: `Passed an incorrect argument to a color function, please pass a string representation of a color.
114
+
115
+ `,
116
+ 4: `Couldn't generate valid rgb string from %s, it returned %s.
117
+
118
+ `,
119
+ 5: `Couldn't parse the color string. Please provide the color as a string in hex, rgb, rgba, hsl or hsla notation.
120
+
121
+ `,
122
+ 6: `Passed invalid arguments to rgb, please pass multiple numbers e.g. rgb(255, 205, 100) or an object e.g. rgb({ red: 255, green: 205, bl\
123
+ ue: 100 }).
124
+
125
+ `,
126
+ 7: `Passed invalid arguments to rgba, please pass multiple numbers e.g. rgb(255, 205, 100, 0.75) or an object e.g. rgb({ red: 255, green: \
127
+ 205, blue: 100, alpha: 0.75 }).
128
+
129
+ `,
130
+ 8: `Passed invalid argument to toColorString, please pass a RgbColor, RgbaColor, HslColor or HslaColor object.
131
+
132
+ `,
133
+ 9: `Please provide a number of steps to the modularScale helper.
134
+
135
+ `,
136
+ 10: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
137
+
138
+ `,
139
+ 11: `Invalid value passed as base to modularScale, expected number or em string but got "%s"
140
+
141
+ `,
142
+ 12: `Expected a string ending in "px" or a number passed as the first argument to %s(), got "%s" instead.
143
+
144
+ `,
145
+ 13: `Expected a string ending in "px" or a number passed as the second argument to %s(), got "%s" instead.
146
+
147
+ `,
148
+ 14: `Passed invalid pixel value ("%s") to %s(), please pass a value like "12px" or 12.
149
+
150
+ `,
151
+ 15: `Passed invalid base value ("%s") to %s(), please pass a value like "12px" or 12.
152
+
153
+ `,
154
+ 16: `You must provide a template to this method.
155
+
156
+ `,
157
+ 17: `You passed an unsupported selector state to this method.
158
+
159
+ `,
160
+ 18: `minScreen and maxScreen must be provided as stringified numbers with the same units.
161
+
162
+ `,
163
+ 19: `fromSize and toSize must be provided as stringified numbers with the same units.
164
+
165
+ `,
166
+ 20: `expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
167
+
168
+ `,
169
+ 21: "expects the objects in the first argument array to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
170
+ 22: "expects the first argument object to have the properties `prop`, `fromSize`, and `toSize`.\n\n",
171
+ 23: `fontFace expects a name of a font-family.
172
+
173
+ `,
174
+ 24: `fontFace expects either the path to the font file(s) or a name of a local copy.
175
+
176
+ `,
177
+ 25: `fontFace expects localFonts to be an array.
178
+
179
+ `,
180
+ 26: `fontFace expects fileFormats to be an array.
181
+
182
+ `,
183
+ 27: `radialGradient requries at least 2 color-stops to properly render.
184
+
185
+ `,
186
+ 28: `Please supply a filename to retinaImage() as the first argument.
187
+
188
+ `,
189
+ 29: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
190
+
191
+ `,
192
+ 30: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
193
+ 31: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation
194
+
195
+ `,
196
+ 32: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])
197
+ To pass a single animation please supply them in simple values, e.g. animation('rotate', '2s')
198
+
199
+ `,
200
+ 33: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation
201
+
202
+ `,
203
+ 34: `borderRadius expects a radius value as a string or number as the second argument.
204
+
205
+ `,
206
+ 35: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
207
+
208
+ `,
209
+ 36: `Property must be a string value.
210
+
211
+ `,
212
+ 37: `Syntax Error at %s.
213
+
214
+ `,
215
+ 38: `Formula contains a function that needs parentheses at %s.
216
+
217
+ `,
218
+ 39: `Formula is missing closing parenthesis at %s.
219
+
220
+ `,
221
+ 40: `Formula has too many closing parentheses at %s.
222
+
223
+ `,
224
+ 41: `All values in a formula must have the same unit or be unitless.
225
+
226
+ `,
227
+ 42: `Please provide a number of steps to the modularScale helper.
228
+
229
+ `,
230
+ 43: `Please pass a number or one of the predefined scales to the modularScale helper as the ratio.
231
+
232
+ `,
233
+ 44: `Invalid value passed as base to modularScale, expected number or em/rem string but got %s.
234
+
235
+ `,
236
+ 45: `Passed invalid argument to hslToColorString, please pass a HslColor or HslaColor object.
237
+
238
+ `,
239
+ 46: `Passed invalid argument to rgbToColorString, please pass a RgbColor or RgbaColor object.
240
+
241
+ `,
242
+ 47: `minScreen and maxScreen must be provided as stringified numbers with the same units.
243
+
244
+ `,
245
+ 48: `fromSize and toSize must be provided as stringified numbers with the same units.
246
+
247
+ `,
248
+ 49: `Expects either an array of objects or a single object with the properties prop, fromSize, and toSize.
249
+
250
+ `,
251
+ 50: `Expects the objects in the first argument array to have the properties prop, fromSize, and toSize.
252
+
253
+ `,
254
+ 51: `Expects the first argument object to have the properties prop, fromSize, and toSize.
255
+
256
+ `,
257
+ 52: `fontFace expects either the path to the font file(s) or a name of a local copy.
258
+
259
+ `,
260
+ 53: `fontFace expects localFonts to be an array.
261
+
262
+ `,
263
+ 54: `fontFace expects fileFormats to be an array.
264
+
265
+ `,
266
+ 55: `fontFace expects a name of a font-family.
267
+
268
+ `,
269
+ 56: `linearGradient requries at least 2 color-stops to properly render.
270
+
271
+ `,
272
+ 57: `radialGradient requries at least 2 color-stops to properly render.
273
+
274
+ `,
275
+ 58: `Please supply a filename to retinaImage() as the first argument.
276
+
277
+ `,
278
+ 59: `Passed invalid argument to triangle, please pass correct pointingDirection e.g. 'right'.
279
+
280
+ `,
281
+ 60: "Passed an invalid value to `height` or `width`. Please provide a pixel based unit.\n\n",
282
+ 61: `Property must be a string value.
283
+
284
+ `,
285
+ 62: `borderRadius expects a radius value as a string or number as the second argument.
286
+
287
+ `,
288
+ 63: `borderRadius expects one of "top", "bottom", "left" or "right" as the first argument.
289
+
290
+ `,
291
+ 64: `The animation shorthand only takes 8 arguments. See the specification for more information: http://mdn.io/animation.
292
+
293
+ `,
294
+ 65: `To pass multiple animations please supply them in arrays, e.g. animation(['rotate', '2s'], ['move', '1s'])\\nTo pass a single animatio\
295
+ n please supply them in simple values, e.g. animation('rotate', '2s').
296
+
297
+ `,
298
+ 66: `The animation shorthand arrays can only have 8 elements. See the specification for more information: http://mdn.io/animation.
299
+
300
+ `,
301
+ 67: `You must provide a template to this method.
302
+
303
+ `,
304
+ 68: `You passed an unsupported selector state to this method.
305
+
306
+ `,
307
+ 69: `Expected a string ending in "px" or a number passed as the first argument to %s(), got %s instead.
308
+
309
+ `,
310
+ 70: `Expected a string ending in "px" or a number passed as the second argument to %s(), got %s instead.
311
+
312
+ `,
313
+ 71: `Passed invalid pixel value %s to %s(), please pass a value like "12px" or 12.
314
+
315
+ `,
316
+ 72: `Passed invalid base value %s to %s(), please pass a value like "12px" or 12.
317
+
318
+ `,
319
+ 73: `Please provide a valid CSS variable.
320
+
321
+ `,
322
+ 74: `CSS variable not found and no default was provided.
323
+
324
+ `,
325
+ 75: `important requires a valid style object, got a %s instead.
326
+
327
+ `,
328
+ 76: `fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.
329
+
330
+ `,
331
+ 77: `remToPx expects a value in "rem" but you provided it in "%s".
332
+
333
+ `,
334
+ 78: `base must be set in "px" or "%" but you set it in "%s".
335
+ `
336
+ };
337
+ function pe() {
338
+ for (var r = arguments.length, e = new Array(r), t = 0; t < r; t++)
339
+ e[t] = arguments[t];
340
+ var a = e[0], i = [], o;
341
+ for (o = 1; o < e.length; o += 1)
342
+ i.push(e[o]);
343
+ return i.forEach(function(u) {
344
+ a = a.replace(/%[a-z]/, u);
345
+ }), a;
346
+ }
347
+ n(pe, "format");
348
+ var d = /* @__PURE__ */ function(r) {
349
+ N(e, r);
350
+ function e(t) {
351
+ for (var a, i = arguments.length, o = new Array(i > 1 ? i - 1 : 0), u = 1; u < i; u++)
352
+ o[u - 1] = arguments[u];
353
+ return a = r.call(this, pe.apply(void 0, [fe[t]].concat(o))) || this, V(a);
354
+ }
355
+ return n(e, "PolishedError"), e;
356
+ }(/* @__PURE__ */ j(Error));
357
+ function Y(r, e) {
358
+ return r.substr(-e.length) === e;
359
+ }
360
+ n(Y, "endsWith");
361
+ var le = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
362
+ function J(r) {
363
+ if (typeof r != "string") return r;
364
+ var e = r.match(le);
365
+ return e ? parseFloat(r) : r;
366
+ }
367
+ n(J, "stripUnit");
368
+ var de = /* @__PURE__ */ n(function(e) {
369
+ return function(t, a) {
370
+ a === void 0 && (a = "16px");
371
+ var i = t, o = a;
372
+ if (typeof t == "string") {
373
+ if (!Y(t, "px"))
374
+ throw new d(69, e, t);
375
+ i = J(t);
376
+ }
377
+ if (typeof a == "string") {
378
+ if (!Y(a, "px"))
379
+ throw new d(70, e, a);
380
+ o = J(a);
381
+ }
382
+ if (typeof i == "string")
383
+ throw new d(71, t, e);
384
+ if (typeof o == "string")
385
+ throw new d(72, a, e);
386
+ return "" + i / o + e;
387
+ };
388
+ }, "pxtoFactory"), X = de, Mr = X("em");
389
+ var Pr = X("rem");
390
+ function $(r) {
391
+ return Math.round(r * 255);
392
+ }
393
+ n($, "colorToInt");
394
+ function ce(r, e, t) {
395
+ return $(r) + "," + $(e) + "," + $(t);
396
+ }
397
+ n(ce, "convertToInt");
398
+ function T(r, e, t, a) {
399
+ if (a === void 0 && (a = ce), e === 0)
400
+ return a(t, t, t);
401
+ var i = (r % 360 + 360) % 360 / 60, o = (1 - Math.abs(2 * t - 1)) * e, u = o * (1 - Math.abs(i % 2 - 1)), f = 0, p = 0, g = 0;
402
+ i >= 0 && i < 1 ? (f = o, p = u) : i >= 1 && i < 2 ? (f = u, p = o) : i >= 2 && i < 3 ? (p = o, g = u) : i >= 3 && i < 4 ? (p = u, g = o) :
403
+ i >= 4 && i < 5 ? (f = u, g = o) : i >= 5 && i < 6 && (f = o, g = u);
404
+ var b = t - o / 2, h = f + b, c = p + b, A = g + b;
405
+ return a(h, c, A);
406
+ }
407
+ n(T, "hslToRgb");
408
+ var Z = {
409
+ aliceblue: "f0f8ff",
410
+ antiquewhite: "faebd7",
411
+ aqua: "00ffff",
412
+ aquamarine: "7fffd4",
413
+ azure: "f0ffff",
414
+ beige: "f5f5dc",
415
+ bisque: "ffe4c4",
416
+ black: "000",
417
+ blanchedalmond: "ffebcd",
418
+ blue: "0000ff",
419
+ blueviolet: "8a2be2",
420
+ brown: "a52a2a",
421
+ burlywood: "deb887",
422
+ cadetblue: "5f9ea0",
423
+ chartreuse: "7fff00",
424
+ chocolate: "d2691e",
425
+ coral: "ff7f50",
426
+ cornflowerblue: "6495ed",
427
+ cornsilk: "fff8dc",
428
+ crimson: "dc143c",
429
+ cyan: "00ffff",
430
+ darkblue: "00008b",
431
+ darkcyan: "008b8b",
432
+ darkgoldenrod: "b8860b",
433
+ darkgray: "a9a9a9",
434
+ darkgreen: "006400",
435
+ darkgrey: "a9a9a9",
436
+ darkkhaki: "bdb76b",
437
+ darkmagenta: "8b008b",
438
+ darkolivegreen: "556b2f",
439
+ darkorange: "ff8c00",
440
+ darkorchid: "9932cc",
441
+ darkred: "8b0000",
442
+ darksalmon: "e9967a",
443
+ darkseagreen: "8fbc8f",
444
+ darkslateblue: "483d8b",
445
+ darkslategray: "2f4f4f",
446
+ darkslategrey: "2f4f4f",
447
+ darkturquoise: "00ced1",
448
+ darkviolet: "9400d3",
449
+ deeppink: "ff1493",
450
+ deepskyblue: "00bfff",
451
+ dimgray: "696969",
452
+ dimgrey: "696969",
453
+ dodgerblue: "1e90ff",
454
+ firebrick: "b22222",
455
+ floralwhite: "fffaf0",
456
+ forestgreen: "228b22",
457
+ fuchsia: "ff00ff",
458
+ gainsboro: "dcdcdc",
459
+ ghostwhite: "f8f8ff",
460
+ gold: "ffd700",
461
+ goldenrod: "daa520",
462
+ gray: "808080",
463
+ green: "008000",
464
+ greenyellow: "adff2f",
465
+ grey: "808080",
466
+ honeydew: "f0fff0",
467
+ hotpink: "ff69b4",
468
+ indianred: "cd5c5c",
469
+ indigo: "4b0082",
470
+ ivory: "fffff0",
471
+ khaki: "f0e68c",
472
+ lavender: "e6e6fa",
473
+ lavenderblush: "fff0f5",
474
+ lawngreen: "7cfc00",
475
+ lemonchiffon: "fffacd",
476
+ lightblue: "add8e6",
477
+ lightcoral: "f08080",
478
+ lightcyan: "e0ffff",
479
+ lightgoldenrodyellow: "fafad2",
480
+ lightgray: "d3d3d3",
481
+ lightgreen: "90ee90",
482
+ lightgrey: "d3d3d3",
483
+ lightpink: "ffb6c1",
484
+ lightsalmon: "ffa07a",
485
+ lightseagreen: "20b2aa",
486
+ lightskyblue: "87cefa",
487
+ lightslategray: "789",
488
+ lightslategrey: "789",
489
+ lightsteelblue: "b0c4de",
490
+ lightyellow: "ffffe0",
491
+ lime: "0f0",
492
+ limegreen: "32cd32",
493
+ linen: "faf0e6",
494
+ magenta: "f0f",
495
+ maroon: "800000",
496
+ mediumaquamarine: "66cdaa",
497
+ mediumblue: "0000cd",
498
+ mediumorchid: "ba55d3",
499
+ mediumpurple: "9370db",
500
+ mediumseagreen: "3cb371",
501
+ mediumslateblue: "7b68ee",
502
+ mediumspringgreen: "00fa9a",
503
+ mediumturquoise: "48d1cc",
504
+ mediumvioletred: "c71585",
505
+ midnightblue: "191970",
506
+ mintcream: "f5fffa",
507
+ mistyrose: "ffe4e1",
508
+ moccasin: "ffe4b5",
509
+ navajowhite: "ffdead",
510
+ navy: "000080",
511
+ oldlace: "fdf5e6",
512
+ olive: "808000",
513
+ olivedrab: "6b8e23",
514
+ orange: "ffa500",
515
+ orangered: "ff4500",
516
+ orchid: "da70d6",
517
+ palegoldenrod: "eee8aa",
518
+ palegreen: "98fb98",
519
+ paleturquoise: "afeeee",
520
+ palevioletred: "db7093",
521
+ papayawhip: "ffefd5",
522
+ peachpuff: "ffdab9",
523
+ peru: "cd853f",
524
+ pink: "ffc0cb",
525
+ plum: "dda0dd",
526
+ powderblue: "b0e0e6",
527
+ purple: "800080",
528
+ rebeccapurple: "639",
529
+ red: "f00",
530
+ rosybrown: "bc8f8f",
531
+ royalblue: "4169e1",
532
+ saddlebrown: "8b4513",
533
+ salmon: "fa8072",
534
+ sandybrown: "f4a460",
535
+ seagreen: "2e8b57",
536
+ seashell: "fff5ee",
537
+ sienna: "a0522d",
538
+ silver: "c0c0c0",
539
+ skyblue: "87ceeb",
540
+ slateblue: "6a5acd",
541
+ slategray: "708090",
542
+ slategrey: "708090",
543
+ snow: "fffafa",
544
+ springgreen: "00ff7f",
545
+ steelblue: "4682b4",
546
+ tan: "d2b48c",
547
+ teal: "008080",
548
+ thistle: "d8bfd8",
549
+ tomato: "ff6347",
550
+ turquoise: "40e0d0",
551
+ violet: "ee82ee",
552
+ wheat: "f5deb3",
553
+ white: "fff",
554
+ whitesmoke: "f5f5f5",
555
+ yellow: "ff0",
556
+ yellowgreen: "9acd32"
557
+ };
558
+ function me(r) {
559
+ if (typeof r != "string") return r;
560
+ var e = r.toLowerCase();
561
+ return Z[e] ? "#" + Z[e] : r;
562
+ }
563
+ n(me, "nameToHex");
564
+ var ge = /^#[a-fA-F0-9]{6}$/, he = /^#[a-fA-F0-9]{8}$/, be = /^#[a-fA-F0-9]{3}$/, ve = /^#[a-fA-F0-9]{4}$/, B = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,
565
+ ye = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, we = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,
566
+ xe = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
567
+ function F(r) {
568
+ if (typeof r != "string")
569
+ throw new d(3);
570
+ var e = me(r);
571
+ if (e.match(ge))
572
+ return {
573
+ red: parseInt("" + e[1] + e[2], 16),
574
+ green: parseInt("" + e[3] + e[4], 16),
575
+ blue: parseInt("" + e[5] + e[6], 16)
576
+ };
577
+ if (e.match(he)) {
578
+ var t = parseFloat((parseInt("" + e[7] + e[8], 16) / 255).toFixed(2));
579
+ return {
580
+ red: parseInt("" + e[1] + e[2], 16),
581
+ green: parseInt("" + e[3] + e[4], 16),
582
+ blue: parseInt("" + e[5] + e[6], 16),
583
+ alpha: t
584
+ };
585
+ }
586
+ if (e.match(be))
587
+ return {
588
+ red: parseInt("" + e[1] + e[1], 16),
589
+ green: parseInt("" + e[2] + e[2], 16),
590
+ blue: parseInt("" + e[3] + e[3], 16)
591
+ };
592
+ if (e.match(ve)) {
593
+ var a = parseFloat((parseInt("" + e[4] + e[4], 16) / 255).toFixed(2));
594
+ return {
595
+ red: parseInt("" + e[1] + e[1], 16),
596
+ green: parseInt("" + e[2] + e[2], 16),
597
+ blue: parseInt("" + e[3] + e[3], 16),
598
+ alpha: a
599
+ };
600
+ }
601
+ var i = B.exec(e);
602
+ if (i)
603
+ return {
604
+ red: parseInt("" + i[1], 10),
605
+ green: parseInt("" + i[2], 10),
606
+ blue: parseInt("" + i[3], 10)
607
+ };
608
+ var o = ye.exec(e.substring(0, 50));
609
+ if (o)
610
+ return {
611
+ red: parseInt("" + o[1], 10),
612
+ green: parseInt("" + o[2], 10),
613
+ blue: parseInt("" + o[3], 10),
614
+ alpha: parseFloat("" + o[4]) > 1 ? parseFloat("" + o[4]) / 100 : parseFloat("" + o[4])
615
+ };
616
+ var u = we.exec(e);
617
+ if (u) {
618
+ var f = parseInt("" + u[1], 10), p = parseInt("" + u[2], 10) / 100, g = parseInt("" + u[3], 10) / 100, b = "rgb(" + T(f, p, g) + ")", h = B.
619
+ exec(b);
620
+ if (!h)
621
+ throw new d(4, e, b);
622
+ return {
623
+ red: parseInt("" + h[1], 10),
624
+ green: parseInt("" + h[2], 10),
625
+ blue: parseInt("" + h[3], 10)
626
+ };
627
+ }
628
+ var c = xe.exec(e.substring(0, 50));
629
+ if (c) {
630
+ var A = parseInt("" + c[1], 10), oe = parseInt("" + c[2], 10) / 100, ue = parseInt("" + c[3], 10) / 100, U = "rgb(" + T(A, oe, ue) + ")",
631
+ I = B.exec(U);
632
+ if (!I)
633
+ throw new d(4, e, U);
634
+ return {
635
+ red: parseInt("" + I[1], 10),
636
+ green: parseInt("" + I[2], 10),
637
+ blue: parseInt("" + I[3], 10),
638
+ alpha: parseFloat("" + c[4]) > 1 ? parseFloat("" + c[4]) / 100 : parseFloat("" + c[4])
639
+ };
640
+ }
641
+ throw new d(5);
642
+ }
643
+ n(F, "parseToRgb");
644
+ function Se(r) {
645
+ var e = r.red / 255, t = r.green / 255, a = r.blue / 255, i = Math.max(e, t, a), o = Math.min(e, t, a), u = (i + o) / 2;
646
+ if (i === o)
647
+ return r.alpha !== void 0 ? {
648
+ hue: 0,
649
+ saturation: 0,
650
+ lightness: u,
651
+ alpha: r.alpha
652
+ } : {
653
+ hue: 0,
654
+ saturation: 0,
655
+ lightness: u
656
+ };
657
+ var f, p = i - o, g = u > 0.5 ? p / (2 - i - o) : p / (i + o);
658
+ switch (i) {
659
+ case e:
660
+ f = (t - a) / p + (t < a ? 6 : 0);
661
+ break;
662
+ case t:
663
+ f = (a - e) / p + 2;
664
+ break;
665
+ default:
666
+ f = (e - t) / p + 4;
667
+ break;
668
+ }
669
+ return f *= 60, r.alpha !== void 0 ? {
670
+ hue: f,
671
+ saturation: g,
672
+ lightness: u,
673
+ alpha: r.alpha
674
+ } : {
675
+ hue: f,
676
+ saturation: g,
677
+ lightness: u
678
+ };
679
+ }
680
+ n(Se, "rgbToHsl");
681
+ function y(r) {
682
+ return Se(F(r));
683
+ }
684
+ n(y, "parseToHsl");
685
+ var Fe = /* @__PURE__ */ n(function(e) {
686
+ return e.length === 7 && e[1] === e[2] && e[3] === e[4] && e[5] === e[6] ? "#" + e[1] + e[3] + e[5] : e;
687
+ }, "reduceHexValue"), P = Fe;
688
+ function x(r) {
689
+ var e = r.toString(16);
690
+ return e.length === 1 ? "0" + e : e;
691
+ }
692
+ n(x, "numberToHex");
693
+ function M(r) {
694
+ return x(Math.round(r * 255));
695
+ }
696
+ n(M, "colorToHex");
697
+ function Ce(r, e, t) {
698
+ return P("#" + M(r) + M(e) + M(t));
699
+ }
700
+ n(Ce, "convertToHex");
701
+ function O(r, e, t) {
702
+ return T(r, e, t, Ce);
703
+ }
704
+ n(O, "hslToHex");
705
+ function ze(r, e, t) {
706
+ if (typeof r == "number" && typeof e == "number" && typeof t == "number")
707
+ return O(r, e, t);
708
+ if (typeof r == "object" && e === void 0 && t === void 0)
709
+ return O(r.hue, r.saturation, r.lightness);
710
+ throw new d(1);
711
+ }
712
+ n(ze, "hsl");
713
+ function Ae(r, e, t, a) {
714
+ if (typeof r == "number" && typeof e == "number" && typeof t == "number" && typeof a == "number")
715
+ return a >= 1 ? O(r, e, t) : "rgba(" + T(r, e, t) + "," + a + ")";
716
+ if (typeof r == "object" && e === void 0 && t === void 0 && a === void 0)
717
+ return r.alpha >= 1 ? O(r.hue, r.saturation, r.lightness) : "rgba(" + T(r.hue, r.saturation, r.lightness) + "," + r.alpha + ")";
718
+ throw new d(2);
719
+ }
720
+ n(Ae, "hsla");
721
+ function E(r, e, t) {
722
+ if (typeof r == "number" && typeof e == "number" && typeof t == "number")
723
+ return P("#" + x(r) + x(e) + x(t));
724
+ if (typeof r == "object" && e === void 0 && t === void 0)
725
+ return P("#" + x(r.red) + x(r.green) + x(r.blue));
726
+ throw new d(6);
727
+ }
728
+ n(E, "rgb");
729
+ function S(r, e, t, a) {
730
+ if (typeof r == "string" && typeof e == "number") {
731
+ var i = F(r);
732
+ return "rgba(" + i.red + "," + i.green + "," + i.blue + "," + e + ")";
733
+ } else {
734
+ if (typeof r == "number" && typeof e == "number" && typeof t == "number" && typeof a == "number")
735
+ return a >= 1 ? E(r, e, t) : "rgba(" + r + "," + e + "," + t + "," + a + ")";
736
+ if (typeof r == "object" && e === void 0 && t === void 0 && a === void 0)
737
+ return r.alpha >= 1 ? E(r.red, r.green, r.blue) : "rgba(" + r.red + "," + r.green + "," + r.blue + "," + r.alpha + ")";
738
+ }
739
+ throw new d(7);
740
+ }
741
+ n(S, "rgba");
742
+ var Te = /* @__PURE__ */ n(function(e) {
743
+ return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && (typeof e.alpha != "number" || typeof e.alpha >
744
+ "u");
745
+ }, "isRgb"), Ie = /* @__PURE__ */ n(function(e) {
746
+ return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && typeof e.alpha == "number";
747
+ }, "isRgba"), Re = /* @__PURE__ */ n(function(e) {
748
+ return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && (typeof e.alpha != "number" || typeof e.
749
+ alpha > "u");
750
+ }, "isHsl"), je = /* @__PURE__ */ n(function(e) {
751
+ return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && typeof e.alpha == "number";
752
+ }, "isHsla");
753
+ function w(r) {
754
+ if (typeof r != "object") throw new d(8);
755
+ if (Ie(r)) return S(r);
756
+ if (Te(r)) return E(r);
757
+ if (je(r)) return Ae(r);
758
+ if (Re(r)) return ze(r);
759
+ throw new d(8);
760
+ }
761
+ n(w, "toColorString");
762
+ function K(r, e, t) {
763
+ return /* @__PURE__ */ n(function() {
764
+ var i = t.concat(Array.prototype.slice.call(arguments));
765
+ return i.length >= e ? r.apply(this, i) : K(r, e, i);
766
+ }, "fn");
767
+ }
768
+ n(K, "curried");
769
+ function m(r) {
770
+ return K(r, r.length, []);
771
+ }
772
+ n(m, "curry");
773
+ function Oe(r, e) {
774
+ if (e === "transparent") return e;
775
+ var t = y(e);
776
+ return w(l({}, t, {
777
+ hue: t.hue + parseFloat(r)
778
+ }));
779
+ }
780
+ n(Oe, "adjustHue");
781
+ var Er = m(Oe);
782
+ function C(r, e, t) {
783
+ return Math.max(r, Math.min(e, t));
784
+ }
785
+ n(C, "guard");
786
+ function ke(r, e) {
787
+ if (e === "transparent") return e;
788
+ var t = y(e);
789
+ return w(l({}, t, {
790
+ lightness: C(0, 1, t.lightness - parseFloat(r))
791
+ }));
792
+ }
793
+ n(ke, "darken");
794
+ var $e = m(ke), _ = $e;
795
+ function Be(r, e) {
796
+ if (e === "transparent") return e;
797
+ var t = y(e);
798
+ return w(l({}, t, {
799
+ saturation: C(0, 1, t.saturation - parseFloat(r))
800
+ }));
801
+ }
802
+ n(Be, "desaturate");
803
+ var Hr = m(Be);
804
+ function Me(r, e) {
805
+ if (e === "transparent") return e;
806
+ var t = y(e);
807
+ return w(l({}, t, {
808
+ lightness: C(0, 1, t.lightness + parseFloat(r))
809
+ }));
810
+ }
811
+ n(Me, "lighten");
812
+ var Pe = m(Me), ee = Pe;
813
+ function Ee(r, e, t) {
814
+ if (e === "transparent") return t;
815
+ if (t === "transparent") return e;
816
+ if (r === 0) return t;
817
+ var a = F(e), i = l({}, a, {
818
+ alpha: typeof a.alpha == "number" ? a.alpha : 1
819
+ }), o = F(t), u = l({}, o, {
820
+ alpha: typeof o.alpha == "number" ? o.alpha : 1
821
+ }), f = i.alpha - u.alpha, p = parseFloat(r) * 2 - 1, g = p * f === -1 ? p : p + f, b = 1 + p * f, h = (g / b + 1) / 2, c = 1 - h, A = {
822
+ red: Math.floor(i.red * h + u.red * c),
823
+ green: Math.floor(i.green * h + u.green * c),
824
+ blue: Math.floor(i.blue * h + u.blue * c),
825
+ alpha: i.alpha * parseFloat(r) + u.alpha * (1 - parseFloat(r))
826
+ };
827
+ return S(A);
828
+ }
829
+ n(Ee, "mix");
830
+ var He = m(Ee), re = He;
831
+ function Le(r, e) {
832
+ if (e === "transparent") return e;
833
+ var t = F(e), a = typeof t.alpha == "number" ? t.alpha : 1, i = l({}, t, {
834
+ alpha: C(0, 1, (a * 100 + parseFloat(r) * 100) / 100)
835
+ });
836
+ return S(i);
837
+ }
838
+ n(Le, "opacify");
839
+ var Lr = m(Le);
840
+ function De(r, e) {
841
+ if (e === "transparent") return e;
842
+ var t = y(e);
843
+ return w(l({}, t, {
844
+ saturation: C(0, 1, t.saturation + parseFloat(r))
845
+ }));
846
+ }
847
+ n(De, "saturate");
848
+ var Dr = m(De);
849
+ function We(r, e) {
850
+ return e === "transparent" ? e : w(l({}, y(e), {
851
+ hue: parseFloat(r)
852
+ }));
853
+ }
854
+ n(We, "setHue");
855
+ var Wr = m(We);
856
+ function qe(r, e) {
857
+ return e === "transparent" ? e : w(l({}, y(e), {
858
+ lightness: parseFloat(r)
859
+ }));
860
+ }
861
+ n(qe, "setLightness");
862
+ var qr = m(qe);
863
+ function Ue(r, e) {
864
+ return e === "transparent" ? e : w(l({}, y(e), {
865
+ saturation: parseFloat(r)
866
+ }));
867
+ }
868
+ n(Ue, "setSaturation");
869
+ var Ur = m(Ue);
870
+ function Ve(r, e) {
871
+ return e === "transparent" ? e : re(parseFloat(r), "rgb(0, 0, 0)", e);
872
+ }
873
+ n(Ve, "shade");
874
+ var Vr = m(Ve);
875
+ function Ne(r, e) {
876
+ return e === "transparent" ? e : re(parseFloat(r), "rgb(255, 255, 255)", e);
877
+ }
878
+ n(Ne, "tint");
879
+ var Nr = m(Ne);
880
+ function Ge(r, e) {
881
+ if (e === "transparent") return e;
882
+ var t = F(e), a = typeof t.alpha == "number" ? t.alpha : 1, i = l({}, t, {
883
+ alpha: C(0, 1, +(a * 100 - parseFloat(r) * 100).toFixed(2) / 100)
884
+ });
885
+ return S(i);
886
+ }
887
+ n(Ge, "transparentize");
888
+ var Qe = m(Ge), te = Qe;
3
889
 
4
890
  // src/theming/base.ts
5
- import { transparentize as u } from "polished";
6
- var e = {
891
+ var s = {
7
892
  // Official color palette
8
893
  primary: "#FF4785",
9
894
  // coral
@@ -41,20 +926,20 @@ var e = {
41
926
  positiveText: "#448028",
42
927
  negativeText: "#D43900",
43
928
  warningText: "#A15C20"
44
- }, i = {
929
+ }, H = {
45
930
  app: "#F6F9FC",
46
- bar: e.lightest,
47
- content: e.lightest,
48
- preview: e.lightest,
931
+ bar: s.lightest,
932
+ content: s.lightest,
933
+ preview: s.lightest,
49
934
  gridCellSize: 10,
50
- hoverable: u(0.9, e.secondary),
935
+ hoverable: te(0.9, s.secondary),
51
936
  // hover state for items in a list
52
937
  // Notification, error, and warning backgrounds
53
938
  positive: "#E1FFD4",
54
939
  negative: "#FEDED2",
55
940
  warning: "#FFF5CF",
56
941
  critical: "#FF4400"
57
- }, a = {
942
+ }, z = {
58
943
  fonts: {
59
944
  base: [
60
945
  '"Nunito Sans"',
@@ -100,7 +985,7 @@ var e = {
100
985
  };
101
986
 
102
987
  // src/theming/themes/dark.ts
103
- var C = {
988
+ var Ye = {
104
989
  base: "dark",
105
990
  // Storybook-specific color palette
106
991
  colorPrimary: "#FF4785",
@@ -110,20 +995,20 @@ var C = {
110
995
  // UI
111
996
  appBg: "#222425",
112
997
  appContentBg: "#1B1C1D",
113
- appPreviewBg: e.lightest,
998
+ appPreviewBg: s.lightest,
114
999
  appBorderColor: "rgba(255,255,255,.1)",
115
1000
  appBorderRadius: 4,
116
1001
  // Fonts
117
- fontBase: a.fonts.base,
118
- fontCode: a.fonts.mono,
1002
+ fontBase: z.fonts.base,
1003
+ fontCode: z.fonts.mono,
119
1004
  // Text colors
120
1005
  textColor: "#C9CDCF",
121
1006
  textInverseColor: "#222425",
122
1007
  textMutedColor: "#798186",
123
1008
  // Toolbar default and active colors
124
- barTextColor: e.mediumdark,
125
- barHoverColor: e.secondary,
126
- barSelectedColor: e.secondary,
1009
+ barTextColor: s.mediumdark,
1010
+ barHoverColor: s.secondary,
1011
+ barSelectedColor: s.secondary,
127
1012
  barBg: "#292C2E",
128
1013
  // Form colors
129
1014
  buttonBg: "#222425",
@@ -132,12 +1017,12 @@ var C = {
132
1017
  booleanSelectedBg: "#2E3438",
133
1018
  inputBg: "#1B1C1D",
134
1019
  inputBorder: "rgba(255,255,255,.1)",
135
- inputTextColor: e.lightest,
1020
+ inputTextColor: s.lightest,
136
1021
  inputBorderRadius: 4
137
- }, g = C;
1022
+ }, ne = Ye;
138
1023
 
139
1024
  // src/theming/themes/light.ts
140
- var b = {
1025
+ var Je = {
141
1026
  base: "light",
142
1027
  // Storybook-specific color palette
143
1028
  colorPrimary: "#FF4785",
@@ -145,72 +1030,71 @@ var b = {
145
1030
  colorSecondary: "#029CFD",
146
1031
  // ocean
147
1032
  // UI
148
- appBg: i.app,
149
- appContentBg: e.lightest,
150
- appPreviewBg: e.lightest,
151
- appBorderColor: e.border,
1033
+ appBg: H.app,
1034
+ appContentBg: s.lightest,
1035
+ appPreviewBg: s.lightest,
1036
+ appBorderColor: s.border,
152
1037
  appBorderRadius: 4,
153
1038
  // Fonts
154
- fontBase: a.fonts.base,
155
- fontCode: a.fonts.mono,
1039
+ fontBase: z.fonts.base,
1040
+ fontCode: z.fonts.mono,
156
1041
  // Text colors
157
- textColor: e.darkest,
158
- textInverseColor: e.lightest,
159
- textMutedColor: e.dark,
1042
+ textColor: s.darkest,
1043
+ textInverseColor: s.lightest,
1044
+ textMutedColor: s.dark,
160
1045
  // Toolbar default and active colors
161
- barTextColor: e.mediumdark,
162
- barHoverColor: e.secondary,
163
- barSelectedColor: e.secondary,
164
- barBg: e.lightest,
1046
+ barTextColor: s.mediumdark,
1047
+ barHoverColor: s.secondary,
1048
+ barSelectedColor: s.secondary,
1049
+ barBg: s.lightest,
165
1050
  // Form colors
166
- buttonBg: i.app,
167
- buttonBorder: e.medium,
168
- booleanBg: e.mediumlight,
169
- booleanSelectedBg: e.lightest,
170
- inputBg: e.lightest,
171
- inputBorder: e.border,
172
- inputTextColor: e.darkest,
1051
+ buttonBg: H.app,
1052
+ buttonBorder: s.medium,
1053
+ booleanBg: s.mediumlight,
1054
+ booleanSelectedBg: s.lightest,
1055
+ inputBg: s.lightest,
1056
+ inputBorder: s.border,
1057
+ inputTextColor: s.darkest,
173
1058
  inputBorderRadius: 4
174
- }, s = b;
1059
+ }, L = Je;
175
1060
 
176
1061
  // src/theming/utils.ts
177
- import { logger as f } from "storybook/internal/client-logger";
178
- import { global as y } from "@storybook/global";
179
- import { darken as B, lighten as x, rgba as m } from "polished";
180
- var { window: l } = y;
181
- var k = /* @__PURE__ */ o((r) => typeof r != "string" ? (f.warn(
1062
+ import { logger as Ze } from "storybook/internal/client-logger";
1063
+ import { global as Xe } from "@storybook/global";
1064
+ var { window: D } = Xe;
1065
+ var Ke = /* @__PURE__ */ n((r) => typeof r != "string" ? (Ze.warn(
182
1066
  `Color passed to theme object should be a string. Instead ${r}(${typeof r}) was passed.`
183
- ), !1) : !0, "isColorString"), T = /* @__PURE__ */ o((r) => !/(gradient|var|calc)/.test(r), "isValidColorForPolished"), S = /* @__PURE__ */ o(
184
- (r, t) => r === "darken" ? m(`${B(1, t)}`, 0.95) : r === "lighten" ? m(`${x(1, t)}`, 0.95) : t, "applyPolished"), c = /* @__PURE__ */ o((r) => (t) => {
185
- if (!k(t) || !T(t))
186
- return t;
1067
+ ), !1) : !0, "isColorString"), _e = /* @__PURE__ */ n((r) => !/(gradient|var|calc)/.test(r), "isValidColorForPolished"), er = /* @__PURE__ */ n(
1068
+ (r, e) => r === "darken" ? S(`${_(1, e)}`, 0.95) : r === "lighten" ? S(`${ee(1, e)}`, 0.95) : e, "applyPolished"), ae = /* @__PURE__ */ n((r) => (e) => {
1069
+ if (!Ke(e) || !_e(e))
1070
+ return e;
187
1071
  try {
188
- return S(r, t);
1072
+ return er(r, e);
189
1073
  } catch {
190
- return t;
1074
+ return e;
191
1075
  }
192
- }, "colorFactory"), I = c("lighten"), N = c("darken"), F = /* @__PURE__ */ o(() => !l || !l.matchMedia ? "light" : l.matchMedia("(prefers-co\
193
- lor-scheme: dark)").matches ? "dark" : "light", "getPreferredColorScheme");
1076
+ }, "colorFactory"), nt = ae("lighten"), at = ae("darken"), ie = /* @__PURE__ */ n(() => !D || !D.matchMedia ? "light" : D.matchMedia("(prefe\
1077
+ rs-color-scheme: dark)").matches ? "dark" : "light", "getPreferredColorScheme");
194
1078
 
195
1079
  // src/theming/create.ts
196
- var d = {
197
- light: s,
198
- dark: g,
199
- normal: s
200
- }, p = F(), W = /* @__PURE__ */ o((r = { base: p }, t) => {
201
- let n = {
202
- ...d[p],
203
- ...d[r.base] || {},
1080
+ var W = {
1081
+ light: L,
1082
+ dark: ne,
1083
+ normal: L
1084
+ }, q = ie(), pt = /* @__PURE__ */ n((r = { base: q }, e) => {
1085
+ let t = {
1086
+ ...W[q],
1087
+ ...W[r.base] || {},
204
1088
  ...r,
205
- base: d[r.base] ? r.base : p
1089
+ base: W[r.base] ? r.base : q
206
1090
  };
207
1091
  return {
1092
+ ...e,
208
1093
  ...t,
209
- ...n,
210
- barSelectedColor: r.barSelectedColor || n.colorSecondary
1094
+ barSelectedColor: r.barSelectedColor || t.colorSecondary
211
1095
  };
212
1096
  }, "create");
213
1097
  export {
214
- W as create,
215
- d as themes
1098
+ pt as create,
1099
+ W as themes
216
1100
  };