storybook 9.0.0-beta.1 → 9.0.0-beta.3
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/actions/decorator.js +49 -52
- package/dist/actions/index.cjs +42 -44
- package/dist/actions/index.js +37 -40
- package/dist/actions/preview.cjs +44 -46
- package/dist/actions/preview.js +24 -27
- package/dist/bin/index.cjs +44 -44
- package/dist/bin/index.js +44 -44
- package/dist/cli/bin/index.cjs +34 -33
- package/dist/cli/bin/index.js +36 -35
- package/dist/cli/index.cjs +13611 -13641
- package/dist/cli/index.js +13814 -13844
- package/dist/common/index.cjs +75 -75
- package/dist/common/index.js +49 -49
- package/dist/components/index.cjs +7644 -5501
- package/dist/components/index.js +4233 -3466
- package/dist/core-server/index.cjs +5925 -5952
- package/dist/core-server/index.js +5979 -6006
- package/dist/core-server/presets/common-manager.js +3995 -3230
- package/dist/core-server/presets/common-preset.cjs +1 -1
- package/dist/core-server/presets/common-preset.js +1 -1
- package/dist/manager/globals-runtime.js +2 -2
- package/dist/manager-api/index.cjs +1 -1
- package/dist/manager-api/index.js +1 -1
- package/dist/preview/runtime.js +10883 -10793
- package/dist/telemetry/index.cjs +2 -2
- package/dist/telemetry/index.js +2 -2
- package/dist/theming/create.cjs +2245 -79
- package/dist/theming/create.js +833 -67
- package/dist/theming/index.cjs +3210 -1067
- package/dist/theming/index.js +1711 -951
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -4
package/dist/theming/create.js
CHANGED
|
@@ -1,9 +1,776 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var ae = Object.defineProperty;
|
|
2
|
+
var n = (r, e) => ae(r, "name", { value: e, configurable: !0 });
|
|
3
|
+
|
|
4
|
+
// ../node_modules/@babel/runtime/helpers/esm/extends.js
|
|
5
|
+
function v() {
|
|
6
|
+
return v = 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
|
+
}, v.apply(null, arguments);
|
|
13
|
+
}
|
|
14
|
+
n(v, "_extends");
|
|
15
|
+
|
|
16
|
+
// ../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
17
|
+
function q(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(q, "_assertThisInitialized");
|
|
22
|
+
|
|
23
|
+
// ../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
24
|
+
function m(r, e) {
|
|
25
|
+
return m = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, a) {
|
|
26
|
+
return t.__proto__ = a, t;
|
|
27
|
+
}, m(r, e);
|
|
28
|
+
}
|
|
29
|
+
n(m, "_setPrototypeOf");
|
|
30
|
+
|
|
31
|
+
// ../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
32
|
+
function U(r, e) {
|
|
33
|
+
r.prototype = Object.create(e.prototype), r.prototype.constructor = r, m(r, e);
|
|
34
|
+
}
|
|
35
|
+
n(U, "_inheritsLoose");
|
|
36
|
+
|
|
37
|
+
// ../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
|
38
|
+
function F(r) {
|
|
39
|
+
return F = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(e) {
|
|
40
|
+
return e.__proto__ || Object.getPrototypeOf(e);
|
|
41
|
+
}, F(r);
|
|
42
|
+
}
|
|
43
|
+
n(F, "_getPrototypeOf");
|
|
44
|
+
|
|
45
|
+
// ../node_modules/@babel/runtime/helpers/esm/isNativeFunction.js
|
|
46
|
+
function V(r) {
|
|
47
|
+
try {
|
|
48
|
+
return Function.toString.call(r).indexOf("[native code]") !== -1;
|
|
49
|
+
} catch {
|
|
50
|
+
return typeof r == "function";
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
n(V, "_isNativeFunction");
|
|
54
|
+
|
|
55
|
+
// ../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
|
|
56
|
+
function T() {
|
|
57
|
+
try {
|
|
58
|
+
var r = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
59
|
+
}));
|
|
60
|
+
} catch {
|
|
61
|
+
}
|
|
62
|
+
return (T = /* @__PURE__ */ n(function() {
|
|
63
|
+
return !!r;
|
|
64
|
+
}, "_isNativeReflectConstruct"))();
|
|
65
|
+
}
|
|
66
|
+
n(T, "_isNativeReflectConstruct");
|
|
67
|
+
|
|
68
|
+
// ../node_modules/@babel/runtime/helpers/esm/construct.js
|
|
69
|
+
function N(r, e, t) {
|
|
70
|
+
if (T()) 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 && m(i, t.prototype), i;
|
|
75
|
+
}
|
|
76
|
+
n(N, "_construct");
|
|
77
|
+
|
|
78
|
+
// ../node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js
|
|
79
|
+
function C(r) {
|
|
80
|
+
var e = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
81
|
+
return C = /* @__PURE__ */ n(function(a) {
|
|
82
|
+
if (a === null || !V(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 N(a, arguments, F(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
|
+
}), m(i, a);
|
|
99
|
+
}, "_wrapNativeSuper"), C(r);
|
|
100
|
+
}
|
|
101
|
+
n(C, "_wrapNativeSuper");
|
|
102
|
+
|
|
103
|
+
// ../node_modules/polished/dist/polished.esm.js
|
|
104
|
+
var ie = {
|
|
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 oe() {
|
|
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(s) {
|
|
344
|
+
a = a.replace(/%[a-z]/, s);
|
|
345
|
+
}), a;
|
|
346
|
+
}
|
|
347
|
+
n(oe, "format");
|
|
348
|
+
var d = /* @__PURE__ */ function(r) {
|
|
349
|
+
U(e, r);
|
|
350
|
+
function e(t) {
|
|
351
|
+
for (var a, i = arguments.length, o = new Array(i > 1 ? i - 1 : 0), s = 1; s < i; s++)
|
|
352
|
+
o[s - 1] = arguments[s];
|
|
353
|
+
return a = r.call(this, oe.apply(void 0, [ie[t]].concat(o))) || this, q(a);
|
|
354
|
+
}
|
|
355
|
+
return n(e, "PolishedError"), e;
|
|
356
|
+
}(/* @__PURE__ */ C(Error));
|
|
357
|
+
function I(r) {
|
|
358
|
+
return Math.round(r * 255);
|
|
359
|
+
}
|
|
360
|
+
n(I, "colorToInt");
|
|
361
|
+
function ue(r, e, t) {
|
|
362
|
+
return I(r) + "," + I(e) + "," + I(t);
|
|
363
|
+
}
|
|
364
|
+
n(ue, "convertToInt");
|
|
365
|
+
function w(r, e, t, a) {
|
|
366
|
+
if (a === void 0 && (a = ue), e === 0)
|
|
367
|
+
return a(t, t, t);
|
|
368
|
+
var i = (r % 360 + 360) % 360 / 60, o = (1 - Math.abs(2 * t - 1)) * e, s = o * (1 - Math.abs(i % 2 - 1)), f = 0, p = 0, l = 0;
|
|
369
|
+
i >= 0 && i < 1 ? (f = o, p = s) : i >= 1 && i < 2 ? (f = s, p = o) : i >= 2 && i < 3 ? (p = o, l = s) : i >= 3 && i < 4 ? (p = s, l = o) :
|
|
370
|
+
i >= 4 && i < 5 ? (f = s, l = o) : i >= 5 && i < 6 && (f = o, l = s);
|
|
371
|
+
var h = t - o / 2, b = f + h, c = p + h, A = l + h;
|
|
372
|
+
return a(b, c, A);
|
|
373
|
+
}
|
|
374
|
+
n(w, "hslToRgb");
|
|
375
|
+
var G = {
|
|
376
|
+
aliceblue: "f0f8ff",
|
|
377
|
+
antiquewhite: "faebd7",
|
|
378
|
+
aqua: "00ffff",
|
|
379
|
+
aquamarine: "7fffd4",
|
|
380
|
+
azure: "f0ffff",
|
|
381
|
+
beige: "f5f5dc",
|
|
382
|
+
bisque: "ffe4c4",
|
|
383
|
+
black: "000",
|
|
384
|
+
blanchedalmond: "ffebcd",
|
|
385
|
+
blue: "0000ff",
|
|
386
|
+
blueviolet: "8a2be2",
|
|
387
|
+
brown: "a52a2a",
|
|
388
|
+
burlywood: "deb887",
|
|
389
|
+
cadetblue: "5f9ea0",
|
|
390
|
+
chartreuse: "7fff00",
|
|
391
|
+
chocolate: "d2691e",
|
|
392
|
+
coral: "ff7f50",
|
|
393
|
+
cornflowerblue: "6495ed",
|
|
394
|
+
cornsilk: "fff8dc",
|
|
395
|
+
crimson: "dc143c",
|
|
396
|
+
cyan: "00ffff",
|
|
397
|
+
darkblue: "00008b",
|
|
398
|
+
darkcyan: "008b8b",
|
|
399
|
+
darkgoldenrod: "b8860b",
|
|
400
|
+
darkgray: "a9a9a9",
|
|
401
|
+
darkgreen: "006400",
|
|
402
|
+
darkgrey: "a9a9a9",
|
|
403
|
+
darkkhaki: "bdb76b",
|
|
404
|
+
darkmagenta: "8b008b",
|
|
405
|
+
darkolivegreen: "556b2f",
|
|
406
|
+
darkorange: "ff8c00",
|
|
407
|
+
darkorchid: "9932cc",
|
|
408
|
+
darkred: "8b0000",
|
|
409
|
+
darksalmon: "e9967a",
|
|
410
|
+
darkseagreen: "8fbc8f",
|
|
411
|
+
darkslateblue: "483d8b",
|
|
412
|
+
darkslategray: "2f4f4f",
|
|
413
|
+
darkslategrey: "2f4f4f",
|
|
414
|
+
darkturquoise: "00ced1",
|
|
415
|
+
darkviolet: "9400d3",
|
|
416
|
+
deeppink: "ff1493",
|
|
417
|
+
deepskyblue: "00bfff",
|
|
418
|
+
dimgray: "696969",
|
|
419
|
+
dimgrey: "696969",
|
|
420
|
+
dodgerblue: "1e90ff",
|
|
421
|
+
firebrick: "b22222",
|
|
422
|
+
floralwhite: "fffaf0",
|
|
423
|
+
forestgreen: "228b22",
|
|
424
|
+
fuchsia: "ff00ff",
|
|
425
|
+
gainsboro: "dcdcdc",
|
|
426
|
+
ghostwhite: "f8f8ff",
|
|
427
|
+
gold: "ffd700",
|
|
428
|
+
goldenrod: "daa520",
|
|
429
|
+
gray: "808080",
|
|
430
|
+
green: "008000",
|
|
431
|
+
greenyellow: "adff2f",
|
|
432
|
+
grey: "808080",
|
|
433
|
+
honeydew: "f0fff0",
|
|
434
|
+
hotpink: "ff69b4",
|
|
435
|
+
indianred: "cd5c5c",
|
|
436
|
+
indigo: "4b0082",
|
|
437
|
+
ivory: "fffff0",
|
|
438
|
+
khaki: "f0e68c",
|
|
439
|
+
lavender: "e6e6fa",
|
|
440
|
+
lavenderblush: "fff0f5",
|
|
441
|
+
lawngreen: "7cfc00",
|
|
442
|
+
lemonchiffon: "fffacd",
|
|
443
|
+
lightblue: "add8e6",
|
|
444
|
+
lightcoral: "f08080",
|
|
445
|
+
lightcyan: "e0ffff",
|
|
446
|
+
lightgoldenrodyellow: "fafad2",
|
|
447
|
+
lightgray: "d3d3d3",
|
|
448
|
+
lightgreen: "90ee90",
|
|
449
|
+
lightgrey: "d3d3d3",
|
|
450
|
+
lightpink: "ffb6c1",
|
|
451
|
+
lightsalmon: "ffa07a",
|
|
452
|
+
lightseagreen: "20b2aa",
|
|
453
|
+
lightskyblue: "87cefa",
|
|
454
|
+
lightslategray: "789",
|
|
455
|
+
lightslategrey: "789",
|
|
456
|
+
lightsteelblue: "b0c4de",
|
|
457
|
+
lightyellow: "ffffe0",
|
|
458
|
+
lime: "0f0",
|
|
459
|
+
limegreen: "32cd32",
|
|
460
|
+
linen: "faf0e6",
|
|
461
|
+
magenta: "f0f",
|
|
462
|
+
maroon: "800000",
|
|
463
|
+
mediumaquamarine: "66cdaa",
|
|
464
|
+
mediumblue: "0000cd",
|
|
465
|
+
mediumorchid: "ba55d3",
|
|
466
|
+
mediumpurple: "9370db",
|
|
467
|
+
mediumseagreen: "3cb371",
|
|
468
|
+
mediumslateblue: "7b68ee",
|
|
469
|
+
mediumspringgreen: "00fa9a",
|
|
470
|
+
mediumturquoise: "48d1cc",
|
|
471
|
+
mediumvioletred: "c71585",
|
|
472
|
+
midnightblue: "191970",
|
|
473
|
+
mintcream: "f5fffa",
|
|
474
|
+
mistyrose: "ffe4e1",
|
|
475
|
+
moccasin: "ffe4b5",
|
|
476
|
+
navajowhite: "ffdead",
|
|
477
|
+
navy: "000080",
|
|
478
|
+
oldlace: "fdf5e6",
|
|
479
|
+
olive: "808000",
|
|
480
|
+
olivedrab: "6b8e23",
|
|
481
|
+
orange: "ffa500",
|
|
482
|
+
orangered: "ff4500",
|
|
483
|
+
orchid: "da70d6",
|
|
484
|
+
palegoldenrod: "eee8aa",
|
|
485
|
+
palegreen: "98fb98",
|
|
486
|
+
paleturquoise: "afeeee",
|
|
487
|
+
palevioletred: "db7093",
|
|
488
|
+
papayawhip: "ffefd5",
|
|
489
|
+
peachpuff: "ffdab9",
|
|
490
|
+
peru: "cd853f",
|
|
491
|
+
pink: "ffc0cb",
|
|
492
|
+
plum: "dda0dd",
|
|
493
|
+
powderblue: "b0e0e6",
|
|
494
|
+
purple: "800080",
|
|
495
|
+
rebeccapurple: "639",
|
|
496
|
+
red: "f00",
|
|
497
|
+
rosybrown: "bc8f8f",
|
|
498
|
+
royalblue: "4169e1",
|
|
499
|
+
saddlebrown: "8b4513",
|
|
500
|
+
salmon: "fa8072",
|
|
501
|
+
sandybrown: "f4a460",
|
|
502
|
+
seagreen: "2e8b57",
|
|
503
|
+
seashell: "fff5ee",
|
|
504
|
+
sienna: "a0522d",
|
|
505
|
+
silver: "c0c0c0",
|
|
506
|
+
skyblue: "87ceeb",
|
|
507
|
+
slateblue: "6a5acd",
|
|
508
|
+
slategray: "708090",
|
|
509
|
+
slategrey: "708090",
|
|
510
|
+
snow: "fffafa",
|
|
511
|
+
springgreen: "00ff7f",
|
|
512
|
+
steelblue: "4682b4",
|
|
513
|
+
tan: "d2b48c",
|
|
514
|
+
teal: "008080",
|
|
515
|
+
thistle: "d8bfd8",
|
|
516
|
+
tomato: "ff6347",
|
|
517
|
+
turquoise: "40e0d0",
|
|
518
|
+
violet: "ee82ee",
|
|
519
|
+
wheat: "f5deb3",
|
|
520
|
+
white: "fff",
|
|
521
|
+
whitesmoke: "f5f5f5",
|
|
522
|
+
yellow: "ff0",
|
|
523
|
+
yellowgreen: "9acd32"
|
|
524
|
+
};
|
|
525
|
+
function se(r) {
|
|
526
|
+
if (typeof r != "string") return r;
|
|
527
|
+
var e = r.toLowerCase();
|
|
528
|
+
return G[e] ? "#" + G[e] : r;
|
|
529
|
+
}
|
|
530
|
+
n(se, "nameToHex");
|
|
531
|
+
var fe = /^#[a-fA-F0-9]{6}$/, pe = /^#[a-fA-F0-9]{8}$/, le = /^#[a-fA-F0-9]{3}$/, de = /^#[a-fA-F0-9]{4}$/, R = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i,
|
|
532
|
+
ce = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i, me = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i,
|
|
533
|
+
ge = /^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;
|
|
534
|
+
function $(r) {
|
|
535
|
+
if (typeof r != "string")
|
|
536
|
+
throw new d(3);
|
|
537
|
+
var e = se(r);
|
|
538
|
+
if (e.match(fe))
|
|
539
|
+
return {
|
|
540
|
+
red: parseInt("" + e[1] + e[2], 16),
|
|
541
|
+
green: parseInt("" + e[3] + e[4], 16),
|
|
542
|
+
blue: parseInt("" + e[5] + e[6], 16)
|
|
543
|
+
};
|
|
544
|
+
if (e.match(pe)) {
|
|
545
|
+
var t = parseFloat((parseInt("" + e[7] + e[8], 16) / 255).toFixed(2));
|
|
546
|
+
return {
|
|
547
|
+
red: parseInt("" + e[1] + e[2], 16),
|
|
548
|
+
green: parseInt("" + e[3] + e[4], 16),
|
|
549
|
+
blue: parseInt("" + e[5] + e[6], 16),
|
|
550
|
+
alpha: t
|
|
551
|
+
};
|
|
552
|
+
}
|
|
553
|
+
if (e.match(le))
|
|
554
|
+
return {
|
|
555
|
+
red: parseInt("" + e[1] + e[1], 16),
|
|
556
|
+
green: parseInt("" + e[2] + e[2], 16),
|
|
557
|
+
blue: parseInt("" + e[3] + e[3], 16)
|
|
558
|
+
};
|
|
559
|
+
if (e.match(de)) {
|
|
560
|
+
var a = parseFloat((parseInt("" + e[4] + e[4], 16) / 255).toFixed(2));
|
|
561
|
+
return {
|
|
562
|
+
red: parseInt("" + e[1] + e[1], 16),
|
|
563
|
+
green: parseInt("" + e[2] + e[2], 16),
|
|
564
|
+
blue: parseInt("" + e[3] + e[3], 16),
|
|
565
|
+
alpha: a
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
var i = R.exec(e);
|
|
569
|
+
if (i)
|
|
570
|
+
return {
|
|
571
|
+
red: parseInt("" + i[1], 10),
|
|
572
|
+
green: parseInt("" + i[2], 10),
|
|
573
|
+
blue: parseInt("" + i[3], 10)
|
|
574
|
+
};
|
|
575
|
+
var o = ce.exec(e.substring(0, 50));
|
|
576
|
+
if (o)
|
|
577
|
+
return {
|
|
578
|
+
red: parseInt("" + o[1], 10),
|
|
579
|
+
green: parseInt("" + o[2], 10),
|
|
580
|
+
blue: parseInt("" + o[3], 10),
|
|
581
|
+
alpha: parseFloat("" + o[4]) > 1 ? parseFloat("" + o[4]) / 100 : parseFloat("" + o[4])
|
|
582
|
+
};
|
|
583
|
+
var s = me.exec(e);
|
|
584
|
+
if (s) {
|
|
585
|
+
var f = parseInt("" + s[1], 10), p = parseInt("" + s[2], 10) / 100, l = parseInt("" + s[3], 10) / 100, h = "rgb(" + w(f, p, l) + ")", b = R.
|
|
586
|
+
exec(h);
|
|
587
|
+
if (!b)
|
|
588
|
+
throw new d(4, e, h);
|
|
589
|
+
return {
|
|
590
|
+
red: parseInt("" + b[1], 10),
|
|
591
|
+
green: parseInt("" + b[2], 10),
|
|
592
|
+
blue: parseInt("" + b[3], 10)
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
var c = ge.exec(e.substring(0, 50));
|
|
596
|
+
if (c) {
|
|
597
|
+
var A = parseInt("" + c[1], 10), te = parseInt("" + c[2], 10) / 100, ne = parseInt("" + c[3], 10) / 100, W = "rgb(" + w(A, te, ne) + ")",
|
|
598
|
+
S = R.exec(W);
|
|
599
|
+
if (!S)
|
|
600
|
+
throw new d(4, e, W);
|
|
601
|
+
return {
|
|
602
|
+
red: parseInt("" + S[1], 10),
|
|
603
|
+
green: parseInt("" + S[2], 10),
|
|
604
|
+
blue: parseInt("" + S[3], 10),
|
|
605
|
+
alpha: parseFloat("" + c[4]) > 1 ? parseFloat("" + c[4]) / 100 : parseFloat("" + c[4])
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
throw new d(5);
|
|
609
|
+
}
|
|
610
|
+
n($, "parseToRgb");
|
|
611
|
+
function he(r) {
|
|
612
|
+
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), s = (i + o) / 2;
|
|
613
|
+
if (i === o)
|
|
614
|
+
return r.alpha !== void 0 ? {
|
|
615
|
+
hue: 0,
|
|
616
|
+
saturation: 0,
|
|
617
|
+
lightness: s,
|
|
618
|
+
alpha: r.alpha
|
|
619
|
+
} : {
|
|
620
|
+
hue: 0,
|
|
621
|
+
saturation: 0,
|
|
622
|
+
lightness: s
|
|
623
|
+
};
|
|
624
|
+
var f, p = i - o, l = s > 0.5 ? p / (2 - i - o) : p / (i + o);
|
|
625
|
+
switch (i) {
|
|
626
|
+
case e:
|
|
627
|
+
f = (t - a) / p + (t < a ? 6 : 0);
|
|
628
|
+
break;
|
|
629
|
+
case t:
|
|
630
|
+
f = (a - e) / p + 2;
|
|
631
|
+
break;
|
|
632
|
+
default:
|
|
633
|
+
f = (e - t) / p + 4;
|
|
634
|
+
break;
|
|
635
|
+
}
|
|
636
|
+
return f *= 60, r.alpha !== void 0 ? {
|
|
637
|
+
hue: f,
|
|
638
|
+
saturation: l,
|
|
639
|
+
lightness: s,
|
|
640
|
+
alpha: r.alpha
|
|
641
|
+
} : {
|
|
642
|
+
hue: f,
|
|
643
|
+
saturation: l,
|
|
644
|
+
lightness: s
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
n(he, "rgbToHsl");
|
|
648
|
+
function Q(r) {
|
|
649
|
+
return he($(r));
|
|
650
|
+
}
|
|
651
|
+
n(Q, "parseToHsl");
|
|
652
|
+
var be = /* @__PURE__ */ n(function(e) {
|
|
653
|
+
return e.length === 7 && e[1] === e[2] && e[3] === e[4] && e[5] === e[6] ? "#" + e[1] + e[3] + e[5] : e;
|
|
654
|
+
}, "reduceHexValue"), O = be;
|
|
655
|
+
function g(r) {
|
|
656
|
+
var e = r.toString(16);
|
|
657
|
+
return e.length === 1 ? "0" + e : e;
|
|
658
|
+
}
|
|
659
|
+
n(g, "numberToHex");
|
|
660
|
+
function j(r) {
|
|
661
|
+
return g(Math.round(r * 255));
|
|
662
|
+
}
|
|
663
|
+
n(j, "colorToHex");
|
|
664
|
+
function ve(r, e, t) {
|
|
665
|
+
return O("#" + j(r) + j(e) + j(t));
|
|
666
|
+
}
|
|
667
|
+
n(ve, "convertToHex");
|
|
668
|
+
function z(r, e, t) {
|
|
669
|
+
return w(r, e, t, ve);
|
|
670
|
+
}
|
|
671
|
+
n(z, "hslToHex");
|
|
672
|
+
function ye(r, e, t) {
|
|
673
|
+
if (typeof r == "number" && typeof e == "number" && typeof t == "number")
|
|
674
|
+
return z(r, e, t);
|
|
675
|
+
if (typeof r == "object" && e === void 0 && t === void 0)
|
|
676
|
+
return z(r.hue, r.saturation, r.lightness);
|
|
677
|
+
throw new d(1);
|
|
678
|
+
}
|
|
679
|
+
n(ye, "hsl");
|
|
680
|
+
function we(r, e, t, a) {
|
|
681
|
+
if (typeof r == "number" && typeof e == "number" && typeof t == "number" && typeof a == "number")
|
|
682
|
+
return a >= 1 ? z(r, e, t) : "rgba(" + w(r, e, t) + "," + a + ")";
|
|
683
|
+
if (typeof r == "object" && e === void 0 && t === void 0 && a === void 0)
|
|
684
|
+
return r.alpha >= 1 ? z(r.hue, r.saturation, r.lightness) : "rgba(" + w(r.hue, r.saturation, r.lightness) + "," + r.alpha + ")";
|
|
685
|
+
throw new d(2);
|
|
686
|
+
}
|
|
687
|
+
n(we, "hsla");
|
|
688
|
+
function k(r, e, t) {
|
|
689
|
+
if (typeof r == "number" && typeof e == "number" && typeof t == "number")
|
|
690
|
+
return O("#" + g(r) + g(e) + g(t));
|
|
691
|
+
if (typeof r == "object" && e === void 0 && t === void 0)
|
|
692
|
+
return O("#" + g(r.red) + g(r.green) + g(r.blue));
|
|
693
|
+
throw new d(6);
|
|
694
|
+
}
|
|
695
|
+
n(k, "rgb");
|
|
696
|
+
function x(r, e, t, a) {
|
|
697
|
+
if (typeof r == "string" && typeof e == "number") {
|
|
698
|
+
var i = $(r);
|
|
699
|
+
return "rgba(" + i.red + "," + i.green + "," + i.blue + "," + e + ")";
|
|
700
|
+
} else {
|
|
701
|
+
if (typeof r == "number" && typeof e == "number" && typeof t == "number" && typeof a == "number")
|
|
702
|
+
return a >= 1 ? k(r, e, t) : "rgba(" + r + "," + e + "," + t + "," + a + ")";
|
|
703
|
+
if (typeof r == "object" && e === void 0 && t === void 0 && a === void 0)
|
|
704
|
+
return r.alpha >= 1 ? k(r.red, r.green, r.blue) : "rgba(" + r.red + "," + r.green + "," + r.blue + "," + r.alpha + ")";
|
|
705
|
+
}
|
|
706
|
+
throw new d(7);
|
|
707
|
+
}
|
|
708
|
+
n(x, "rgba");
|
|
709
|
+
var xe = /* @__PURE__ */ n(function(e) {
|
|
710
|
+
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && (typeof e.alpha != "number" || typeof e.alpha >
|
|
711
|
+
"u");
|
|
712
|
+
}, "isRgb"), Se = /* @__PURE__ */ n(function(e) {
|
|
713
|
+
return typeof e.red == "number" && typeof e.green == "number" && typeof e.blue == "number" && typeof e.alpha == "number";
|
|
714
|
+
}, "isRgba"), Fe = /* @__PURE__ */ n(function(e) {
|
|
715
|
+
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && (typeof e.alpha != "number" || typeof e.
|
|
716
|
+
alpha > "u");
|
|
717
|
+
}, "isHsl"), Ce = /* @__PURE__ */ n(function(e) {
|
|
718
|
+
return typeof e.hue == "number" && typeof e.saturation == "number" && typeof e.lightness == "number" && typeof e.alpha == "number";
|
|
719
|
+
}, "isHsla");
|
|
720
|
+
function Y(r) {
|
|
721
|
+
if (typeof r != "object") throw new d(8);
|
|
722
|
+
if (Se(r)) return x(r);
|
|
723
|
+
if (xe(r)) return k(r);
|
|
724
|
+
if (Ce(r)) return we(r);
|
|
725
|
+
if (Fe(r)) return ye(r);
|
|
726
|
+
throw new d(8);
|
|
727
|
+
}
|
|
728
|
+
n(Y, "toColorString");
|
|
729
|
+
function J(r, e, t) {
|
|
730
|
+
return /* @__PURE__ */ n(function() {
|
|
731
|
+
var i = t.concat(Array.prototype.slice.call(arguments));
|
|
732
|
+
return i.length >= e ? r.apply(this, i) : J(r, e, i);
|
|
733
|
+
}, "fn");
|
|
734
|
+
}
|
|
735
|
+
n(J, "curried");
|
|
736
|
+
function B(r) {
|
|
737
|
+
return J(r, r.length, []);
|
|
738
|
+
}
|
|
739
|
+
n(B, "curry");
|
|
740
|
+
function M(r, e, t) {
|
|
741
|
+
return Math.max(r, Math.min(e, t));
|
|
742
|
+
}
|
|
743
|
+
n(M, "guard");
|
|
744
|
+
function ze(r, e) {
|
|
745
|
+
if (e === "transparent") return e;
|
|
746
|
+
var t = Q(e);
|
|
747
|
+
return Y(v({}, t, {
|
|
748
|
+
lightness: M(0, 1, t.lightness - parseFloat(r))
|
|
749
|
+
}));
|
|
750
|
+
}
|
|
751
|
+
n(ze, "darken");
|
|
752
|
+
var Ae = /* @__PURE__ */ B(ze), Z = Ae;
|
|
753
|
+
function Te(r, e) {
|
|
754
|
+
if (e === "transparent") return e;
|
|
755
|
+
var t = Q(e);
|
|
756
|
+
return Y(v({}, t, {
|
|
757
|
+
lightness: M(0, 1, t.lightness + parseFloat(r))
|
|
758
|
+
}));
|
|
759
|
+
}
|
|
760
|
+
n(Te, "lighten");
|
|
761
|
+
var Ie = /* @__PURE__ */ B(Te), X = Ie;
|
|
762
|
+
function Re(r, e) {
|
|
763
|
+
if (e === "transparent") return e;
|
|
764
|
+
var t = $(e), a = typeof t.alpha == "number" ? t.alpha : 1, i = v({}, t, {
|
|
765
|
+
alpha: M(0, 1, +(a * 100 - parseFloat(r) * 100).toFixed(2) / 100)
|
|
766
|
+
});
|
|
767
|
+
return x(i);
|
|
768
|
+
}
|
|
769
|
+
n(Re, "transparentize");
|
|
770
|
+
var je = /* @__PURE__ */ B(Re), K = je;
|
|
3
771
|
|
|
4
772
|
// src/theming/base.ts
|
|
5
|
-
|
|
6
|
-
var e = {
|
|
773
|
+
var u = {
|
|
7
774
|
// Official color palette
|
|
8
775
|
primary: "#FF4785",
|
|
9
776
|
// coral
|
|
@@ -41,20 +808,20 @@ var e = {
|
|
|
41
808
|
positiveText: "#448028",
|
|
42
809
|
negativeText: "#D43900",
|
|
43
810
|
warningText: "#A15C20"
|
|
44
|
-
},
|
|
811
|
+
}, P = {
|
|
45
812
|
app: "#F6F9FC",
|
|
46
|
-
bar:
|
|
47
|
-
content:
|
|
48
|
-
preview:
|
|
813
|
+
bar: u.lightest,
|
|
814
|
+
content: u.lightest,
|
|
815
|
+
preview: u.lightest,
|
|
49
816
|
gridCellSize: 10,
|
|
50
|
-
hoverable:
|
|
817
|
+
hoverable: K(0.9, u.secondary),
|
|
51
818
|
// hover state for items in a list
|
|
52
819
|
// Notification, error, and warning backgrounds
|
|
53
820
|
positive: "#E1FFD4",
|
|
54
821
|
negative: "#FEDED2",
|
|
55
822
|
warning: "#FFF5CF",
|
|
56
823
|
critical: "#FF4400"
|
|
57
|
-
},
|
|
824
|
+
}, y = {
|
|
58
825
|
fonts: {
|
|
59
826
|
base: [
|
|
60
827
|
'"Nunito Sans"',
|
|
@@ -100,7 +867,7 @@ var e = {
|
|
|
100
867
|
};
|
|
101
868
|
|
|
102
869
|
// src/theming/themes/dark.ts
|
|
103
|
-
var
|
|
870
|
+
var Oe = {
|
|
104
871
|
base: "dark",
|
|
105
872
|
// Storybook-specific color palette
|
|
106
873
|
colorPrimary: "#FF4785",
|
|
@@ -110,20 +877,20 @@ var C = {
|
|
|
110
877
|
// UI
|
|
111
878
|
appBg: "#222425",
|
|
112
879
|
appContentBg: "#1B1C1D",
|
|
113
|
-
appPreviewBg:
|
|
880
|
+
appPreviewBg: u.lightest,
|
|
114
881
|
appBorderColor: "rgba(255,255,255,.1)",
|
|
115
882
|
appBorderRadius: 4,
|
|
116
883
|
// Fonts
|
|
117
|
-
fontBase:
|
|
118
|
-
fontCode:
|
|
884
|
+
fontBase: y.fonts.base,
|
|
885
|
+
fontCode: y.fonts.mono,
|
|
119
886
|
// Text colors
|
|
120
887
|
textColor: "#C9CDCF",
|
|
121
888
|
textInverseColor: "#222425",
|
|
122
889
|
textMutedColor: "#798186",
|
|
123
890
|
// Toolbar default and active colors
|
|
124
|
-
barTextColor:
|
|
125
|
-
barHoverColor:
|
|
126
|
-
barSelectedColor:
|
|
891
|
+
barTextColor: u.mediumdark,
|
|
892
|
+
barHoverColor: u.secondary,
|
|
893
|
+
barSelectedColor: u.secondary,
|
|
127
894
|
barBg: "#292C2E",
|
|
128
895
|
// Form colors
|
|
129
896
|
buttonBg: "#222425",
|
|
@@ -132,12 +899,12 @@ var C = {
|
|
|
132
899
|
booleanSelectedBg: "#2E3438",
|
|
133
900
|
inputBg: "#1B1C1D",
|
|
134
901
|
inputBorder: "rgba(255,255,255,.1)",
|
|
135
|
-
inputTextColor:
|
|
902
|
+
inputTextColor: u.lightest,
|
|
136
903
|
inputBorderRadius: 4
|
|
137
|
-
},
|
|
904
|
+
}, _ = Oe;
|
|
138
905
|
|
|
139
906
|
// src/theming/themes/light.ts
|
|
140
|
-
var
|
|
907
|
+
var ke = {
|
|
141
908
|
base: "light",
|
|
142
909
|
// Storybook-specific color palette
|
|
143
910
|
colorPrimary: "#FF4785",
|
|
@@ -145,72 +912,71 @@ var b = {
|
|
|
145
912
|
colorSecondary: "#029CFD",
|
|
146
913
|
// ocean
|
|
147
914
|
// UI
|
|
148
|
-
appBg:
|
|
149
|
-
appContentBg:
|
|
150
|
-
appPreviewBg:
|
|
151
|
-
appBorderColor:
|
|
915
|
+
appBg: P.app,
|
|
916
|
+
appContentBg: u.lightest,
|
|
917
|
+
appPreviewBg: u.lightest,
|
|
918
|
+
appBorderColor: u.border,
|
|
152
919
|
appBorderRadius: 4,
|
|
153
920
|
// Fonts
|
|
154
|
-
fontBase:
|
|
155
|
-
fontCode:
|
|
921
|
+
fontBase: y.fonts.base,
|
|
922
|
+
fontCode: y.fonts.mono,
|
|
156
923
|
// Text colors
|
|
157
|
-
textColor:
|
|
158
|
-
textInverseColor:
|
|
159
|
-
textMutedColor:
|
|
924
|
+
textColor: u.darkest,
|
|
925
|
+
textInverseColor: u.lightest,
|
|
926
|
+
textMutedColor: u.dark,
|
|
160
927
|
// Toolbar default and active colors
|
|
161
|
-
barTextColor:
|
|
162
|
-
barHoverColor:
|
|
163
|
-
barSelectedColor:
|
|
164
|
-
barBg:
|
|
928
|
+
barTextColor: u.mediumdark,
|
|
929
|
+
barHoverColor: u.secondary,
|
|
930
|
+
barSelectedColor: u.secondary,
|
|
931
|
+
barBg: u.lightest,
|
|
165
932
|
// Form colors
|
|
166
|
-
buttonBg:
|
|
167
|
-
buttonBorder:
|
|
168
|
-
booleanBg:
|
|
169
|
-
booleanSelectedBg:
|
|
170
|
-
inputBg:
|
|
171
|
-
inputBorder:
|
|
172
|
-
inputTextColor:
|
|
933
|
+
buttonBg: P.app,
|
|
934
|
+
buttonBorder: u.medium,
|
|
935
|
+
booleanBg: u.mediumlight,
|
|
936
|
+
booleanSelectedBg: u.lightest,
|
|
937
|
+
inputBg: u.lightest,
|
|
938
|
+
inputBorder: u.border,
|
|
939
|
+
inputTextColor: u.darkest,
|
|
173
940
|
inputBorderRadius: 4
|
|
174
|
-
},
|
|
941
|
+
}, E = ke;
|
|
175
942
|
|
|
176
943
|
// src/theming/utils.ts
|
|
177
|
-
import { logger as
|
|
178
|
-
import { global as
|
|
179
|
-
|
|
180
|
-
var
|
|
181
|
-
var k = /* @__PURE__ */ o((r) => typeof r != "string" ? (f.warn(
|
|
944
|
+
import { logger as $e } from "storybook/internal/client-logger";
|
|
945
|
+
import { global as Be } from "@storybook/global";
|
|
946
|
+
var { window: H } = Be;
|
|
947
|
+
var Me = /* @__PURE__ */ n((r) => typeof r != "string" ? ($e.warn(
|
|
182
948
|
`Color passed to theme object should be a string. Instead ${r}(${typeof r}) was passed.`
|
|
183
|
-
), !1) : !0, "isColorString"),
|
|
184
|
-
(r,
|
|
185
|
-
if (!
|
|
186
|
-
return
|
|
949
|
+
), !1) : !0, "isColorString"), Pe = /* @__PURE__ */ n((r) => !/(gradient|var|calc)/.test(r), "isValidColorForPolished"), Ee = /* @__PURE__ */ n(
|
|
950
|
+
(r, e) => r === "darken" ? x(`${Z(1, e)}`, 0.95) : r === "lighten" ? x(`${X(1, e)}`, 0.95) : e, "applyPolished"), ee = /* @__PURE__ */ n((r) => (e) => {
|
|
951
|
+
if (!Me(e) || !Pe(e))
|
|
952
|
+
return e;
|
|
187
953
|
try {
|
|
188
|
-
return
|
|
954
|
+
return Ee(r, e);
|
|
189
955
|
} catch {
|
|
190
|
-
return
|
|
956
|
+
return e;
|
|
191
957
|
}
|
|
192
|
-
}, "colorFactory"),
|
|
193
|
-
|
|
958
|
+
}, "colorFactory"), Rr = ee("lighten"), jr = ee("darken"), re = /* @__PURE__ */ n(() => !H || !H.matchMedia ? "light" : H.matchMedia("(prefe\
|
|
959
|
+
rs-color-scheme: dark)").matches ? "dark" : "light", "getPreferredColorScheme");
|
|
194
960
|
|
|
195
961
|
// src/theming/create.ts
|
|
196
|
-
var
|
|
197
|
-
light:
|
|
198
|
-
dark:
|
|
199
|
-
normal:
|
|
200
|
-
},
|
|
201
|
-
let
|
|
202
|
-
...
|
|
203
|
-
...
|
|
962
|
+
var L = {
|
|
963
|
+
light: E,
|
|
964
|
+
dark: _,
|
|
965
|
+
normal: E
|
|
966
|
+
}, D = re(), Pr = /* @__PURE__ */ n((r = { base: D }, e) => {
|
|
967
|
+
let t = {
|
|
968
|
+
...L[D],
|
|
969
|
+
...L[r.base] || {},
|
|
204
970
|
...r,
|
|
205
|
-
base:
|
|
971
|
+
base: L[r.base] ? r.base : D
|
|
206
972
|
};
|
|
207
973
|
return {
|
|
974
|
+
...e,
|
|
208
975
|
...t,
|
|
209
|
-
|
|
210
|
-
barSelectedColor: r.barSelectedColor || n.colorSecondary
|
|
976
|
+
barSelectedColor: r.barSelectedColor || t.colorSecondary
|
|
211
977
|
};
|
|
212
978
|
}, "create");
|
|
213
979
|
export {
|
|
214
|
-
|
|
215
|
-
|
|
980
|
+
Pr as create,
|
|
981
|
+
L as themes
|
|
216
982
|
};
|