@minimalstuff/ui 0.0.5 → 0.0.9

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/index.es.js CHANGED
@@ -1,29 +1,778 @@
1
- import d from "@emotion/styled";
2
- const c = d.button(
3
- ({ theme: o, danger: t = !1, secondary: r = !1 }) => {
4
- const s = t ? o.colors.lightRed : o.colors.primary, l = t ? o.colors.lightRed : o.colors.darkBlue, n = r ? s : o.colors.white, i = r ? o.colors.white : s;
1
+ import Ce from "@emotion/styled";
2
+ import Oe, { createContext as yr, useState as _r, useEffect as Er } from "react";
3
+ import { ThemeProvider as Rr } from "@emotion/react";
4
+ import Tr from "hex-rgb";
5
+ const Mr = Ce.button(
6
+ ({ theme: u, danger: m = !1, secondary: h = !1 }) => {
7
+ const d = m ? u.colors.lightRed : u.colors.primary, T = m ? u.colors.lightRed : u.colors.darkBlue, x = h ? d : u.colors.white, _ = h ? u.colors.white : d;
5
8
  return {
6
9
  cursor: "pointer",
7
10
  width: "100%",
8
11
  textTransform: "uppercase",
9
- fontSize: o.fontSizes.m,
10
- color: n,
11
- background: i,
12
+ fontSize: u.fontSizes.m,
13
+ color: x,
14
+ background: _,
12
15
  padding: "0.75em",
13
- border: `1px solid ${s}`,
14
- borderRadius: o.borders.radius.m,
15
- transition: o.transitions.delay.normal,
16
+ border: `1px solid ${d}`,
17
+ borderRadius: u.borders.radius.m,
18
+ transition: u.transitions.delay.normal,
16
19
  "&:disabled": {
17
20
  cursor: "not-allowed",
18
21
  opacity: "0.5"
19
22
  },
20
23
  "&:not(:disabled):hover": {
21
- background: r ? o.colors.secondary : l
24
+ background: h ? u.colors.secondary : T
22
25
  }
23
26
  };
24
27
  }
25
- );
28
+ ), Vr = Ce.p(({ lines: u = 1 }) => u > 1 ? {
29
+ overflow: "hidden",
30
+ display: "-webkit-box",
31
+ WebkitLineClamp: u,
32
+ WebkitBoxOrient: "vertical"
33
+ } : {
34
+ textOverflow: "ellipsis",
35
+ whiteSpace: "nowrap",
36
+ overflow: "hidden"
37
+ });
38
+ var Z = { exports: {} }, I = {};
39
+ /**
40
+ * @license React
41
+ * react-jsx-runtime.production.min.js
42
+ *
43
+ * Copyright (c) Facebook, Inc. and its affiliates.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE file in the root directory of this source tree.
47
+ */
48
+ var xe;
49
+ function xr() {
50
+ if (xe) return I;
51
+ xe = 1;
52
+ var u = Oe, m = Symbol.for("react.element"), h = Symbol.for("react.fragment"), d = Object.prototype.hasOwnProperty, T = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, x = { key: !0, ref: !0, __self: !0, __source: !0 };
53
+ function _(w, v, O) {
54
+ var g, R = {}, S = null, Y = null;
55
+ O !== void 0 && (S = "" + O), v.key !== void 0 && (S = "" + v.key), v.ref !== void 0 && (Y = v.ref);
56
+ for (g in v) d.call(v, g) && !x.hasOwnProperty(g) && (R[g] = v[g]);
57
+ if (w && w.defaultProps) for (g in v = w.defaultProps, v) R[g] === void 0 && (R[g] = v[g]);
58
+ return { $$typeof: m, type: w, key: S, ref: Y, props: R, _owner: T.current };
59
+ }
60
+ return I.Fragment = h, I.jsx = _, I.jsxs = _, I;
61
+ }
62
+ var W = {};
63
+ /**
64
+ * @license React
65
+ * react-jsx-runtime.development.js
66
+ *
67
+ * Copyright (c) Facebook, Inc. and its affiliates.
68
+ *
69
+ * This source code is licensed under the MIT license found in the
70
+ * LICENSE file in the root directory of this source tree.
71
+ */
72
+ var we;
73
+ function wr() {
74
+ return we || (we = 1, process.env.NODE_ENV !== "production" && function() {
75
+ var u = Oe, m = Symbol.for("react.element"), h = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), T = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), w = Symbol.for("react.context"), v = Symbol.for("react.forward_ref"), O = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Q = Symbol.iterator, Ie = "@@iterator";
76
+ function We(e) {
77
+ if (e === null || typeof e != "object")
78
+ return null;
79
+ var r = Q && e[Q] || e[Ie];
80
+ return typeof r == "function" ? r : null;
81
+ }
82
+ var P = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
83
+ function c(e) {
84
+ {
85
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
86
+ t[n - 1] = arguments[n];
87
+ Ye("error", e, t);
88
+ }
89
+ }
90
+ function Ye(e, r, t) {
91
+ {
92
+ var n = P.ReactDebugCurrentFrame, i = n.getStackAddendum();
93
+ i !== "" && (r += "%s", t = t.concat([i]));
94
+ var s = t.map(function(o) {
95
+ return String(o);
96
+ });
97
+ s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
98
+ }
99
+ }
100
+ var Le = !1, Me = !1, Ve = !1, Be = !1, Ue = !1, ee;
101
+ ee = Symbol.for("react.module.reference");
102
+ function Ne(e) {
103
+ return !!(typeof e == "string" || typeof e == "function" || e === d || e === x || Ue || e === T || e === O || e === g || Be || e === Y || Le || Me || Ve || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === R || e.$$typeof === _ || e.$$typeof === w || e.$$typeof === v || // This needs to include all possible module reference object
104
+ // types supported by any Flight configuration anywhere since
105
+ // we don't know which Flight build this will end up being used
106
+ // with.
107
+ e.$$typeof === ee || e.getModuleId !== void 0));
108
+ }
109
+ function Je(e, r, t) {
110
+ var n = e.displayName;
111
+ if (n)
112
+ return n;
113
+ var i = r.displayName || r.name || "";
114
+ return i !== "" ? t + "(" + i + ")" : t;
115
+ }
116
+ function re(e) {
117
+ return e.displayName || "Context";
118
+ }
119
+ function E(e) {
120
+ if (e == null)
121
+ return null;
122
+ if (typeof e.tag == "number" && c("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
123
+ return e.displayName || e.name || null;
124
+ if (typeof e == "string")
125
+ return e;
126
+ switch (e) {
127
+ case d:
128
+ return "Fragment";
129
+ case h:
130
+ return "Portal";
131
+ case x:
132
+ return "Profiler";
133
+ case T:
134
+ return "StrictMode";
135
+ case O:
136
+ return "Suspense";
137
+ case g:
138
+ return "SuspenseList";
139
+ }
140
+ if (typeof e == "object")
141
+ switch (e.$$typeof) {
142
+ case w:
143
+ var r = e;
144
+ return re(r) + ".Consumer";
145
+ case _:
146
+ var t = e;
147
+ return re(t._context) + ".Provider";
148
+ case v:
149
+ return Je(e, e.render, "ForwardRef");
150
+ case R:
151
+ var n = e.displayName || null;
152
+ return n !== null ? n : E(e.type) || "Memo";
153
+ case S: {
154
+ var i = e, s = i._payload, o = i._init;
155
+ try {
156
+ return E(o(s));
157
+ } catch {
158
+ return null;
159
+ }
160
+ }
161
+ }
162
+ return null;
163
+ }
164
+ var k = Object.assign, F = 0, te, ne, ae, oe, ie, se, ue;
165
+ function le() {
166
+ }
167
+ le.__reactDisabledLog = !0;
168
+ function Ke() {
169
+ {
170
+ if (F === 0) {
171
+ te = console.log, ne = console.info, ae = console.warn, oe = console.error, ie = console.group, se = console.groupCollapsed, ue = console.groupEnd;
172
+ var e = {
173
+ configurable: !0,
174
+ enumerable: !0,
175
+ value: le,
176
+ writable: !0
177
+ };
178
+ Object.defineProperties(console, {
179
+ info: e,
180
+ log: e,
181
+ warn: e,
182
+ error: e,
183
+ group: e,
184
+ groupCollapsed: e,
185
+ groupEnd: e
186
+ });
187
+ }
188
+ F++;
189
+ }
190
+ }
191
+ function qe() {
192
+ {
193
+ if (F--, F === 0) {
194
+ var e = {
195
+ configurable: !0,
196
+ enumerable: !0,
197
+ writable: !0
198
+ };
199
+ Object.defineProperties(console, {
200
+ log: k({}, e, {
201
+ value: te
202
+ }),
203
+ info: k({}, e, {
204
+ value: ne
205
+ }),
206
+ warn: k({}, e, {
207
+ value: ae
208
+ }),
209
+ error: k({}, e, {
210
+ value: oe
211
+ }),
212
+ group: k({}, e, {
213
+ value: ie
214
+ }),
215
+ groupCollapsed: k({}, e, {
216
+ value: se
217
+ }),
218
+ groupEnd: k({}, e, {
219
+ value: ue
220
+ })
221
+ });
222
+ }
223
+ F < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
224
+ }
225
+ }
226
+ var U = P.ReactCurrentDispatcher, N;
227
+ function L(e, r, t) {
228
+ {
229
+ if (N === void 0)
230
+ try {
231
+ throw Error();
232
+ } catch (i) {
233
+ var n = i.stack.trim().match(/\n( *(at )?)/);
234
+ N = n && n[1] || "";
235
+ }
236
+ return `
237
+ ` + N + e;
238
+ }
239
+ }
240
+ var J = !1, M;
241
+ {
242
+ var ze = typeof WeakMap == "function" ? WeakMap : Map;
243
+ M = new ze();
244
+ }
245
+ function fe(e, r) {
246
+ if (!e || J)
247
+ return "";
248
+ {
249
+ var t = M.get(e);
250
+ if (t !== void 0)
251
+ return t;
252
+ }
253
+ var n;
254
+ J = !0;
255
+ var i = Error.prepareStackTrace;
256
+ Error.prepareStackTrace = void 0;
257
+ var s;
258
+ s = U.current, U.current = null, Ke();
259
+ try {
260
+ if (r) {
261
+ var o = function() {
262
+ throw Error();
263
+ };
264
+ if (Object.defineProperty(o.prototype, "props", {
265
+ set: function() {
266
+ throw Error();
267
+ }
268
+ }), typeof Reflect == "object" && Reflect.construct) {
269
+ try {
270
+ Reflect.construct(o, []);
271
+ } catch (b) {
272
+ n = b;
273
+ }
274
+ Reflect.construct(e, [], o);
275
+ } else {
276
+ try {
277
+ o.call();
278
+ } catch (b) {
279
+ n = b;
280
+ }
281
+ e.call(o.prototype);
282
+ }
283
+ } else {
284
+ try {
285
+ throw Error();
286
+ } catch (b) {
287
+ n = b;
288
+ }
289
+ e();
290
+ }
291
+ } catch (b) {
292
+ if (b && n && typeof b.stack == "string") {
293
+ for (var a = b.stack.split(`
294
+ `), p = n.stack.split(`
295
+ `), l = a.length - 1, f = p.length - 1; l >= 1 && f >= 0 && a[l] !== p[f]; )
296
+ f--;
297
+ for (; l >= 1 && f >= 0; l--, f--)
298
+ if (a[l] !== p[f]) {
299
+ if (l !== 1 || f !== 1)
300
+ do
301
+ if (l--, f--, f < 0 || a[l] !== p[f]) {
302
+ var y = `
303
+ ` + a[l].replace(" at new ", " at ");
304
+ return e.displayName && y.includes("<anonymous>") && (y = y.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, y), y;
305
+ }
306
+ while (l >= 1 && f >= 0);
307
+ break;
308
+ }
309
+ }
310
+ } finally {
311
+ J = !1, U.current = s, qe(), Error.prepareStackTrace = i;
312
+ }
313
+ var D = e ? e.displayName || e.name : "", C = D ? L(D) : "";
314
+ return typeof e == "function" && M.set(e, C), C;
315
+ }
316
+ function Ge(e, r, t) {
317
+ return fe(e, !1);
318
+ }
319
+ function Xe(e) {
320
+ var r = e.prototype;
321
+ return !!(r && r.isReactComponent);
322
+ }
323
+ function V(e, r, t) {
324
+ if (e == null)
325
+ return "";
326
+ if (typeof e == "function")
327
+ return fe(e, Xe(e));
328
+ if (typeof e == "string")
329
+ return L(e);
330
+ switch (e) {
331
+ case O:
332
+ return L("Suspense");
333
+ case g:
334
+ return L("SuspenseList");
335
+ }
336
+ if (typeof e == "object")
337
+ switch (e.$$typeof) {
338
+ case v:
339
+ return Ge(e.render);
340
+ case R:
341
+ return V(e.type, r, t);
342
+ case S: {
343
+ var n = e, i = n._payload, s = n._init;
344
+ try {
345
+ return V(s(i), r, t);
346
+ } catch {
347
+ }
348
+ }
349
+ }
350
+ return "";
351
+ }
352
+ var A = Object.prototype.hasOwnProperty, ce = {}, de = P.ReactDebugCurrentFrame;
353
+ function B(e) {
354
+ if (e) {
355
+ var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
356
+ de.setExtraStackFrame(t);
357
+ } else
358
+ de.setExtraStackFrame(null);
359
+ }
360
+ function He(e, r, t, n, i) {
361
+ {
362
+ var s = Function.call.bind(A);
363
+ for (var o in e)
364
+ if (s(e, o)) {
365
+ var a = void 0;
366
+ try {
367
+ if (typeof e[o] != "function") {
368
+ var p = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
369
+ throw p.name = "Invariant Violation", p;
370
+ }
371
+ a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
372
+ } catch (l) {
373
+ a = l;
374
+ }
375
+ a && !(a instanceof Error) && (B(i), c("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), B(null)), a instanceof Error && !(a.message in ce) && (ce[a.message] = !0, B(i), c("Failed %s type: %s", t, a.message), B(null));
376
+ }
377
+ }
378
+ }
379
+ var Ze = Array.isArray;
380
+ function K(e) {
381
+ return Ze(e);
382
+ }
383
+ function Qe(e) {
384
+ {
385
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
386
+ return t;
387
+ }
388
+ }
389
+ function er(e) {
390
+ try {
391
+ return ve(e), !1;
392
+ } catch {
393
+ return !0;
394
+ }
395
+ }
396
+ function ve(e) {
397
+ return "" + e;
398
+ }
399
+ function pe(e) {
400
+ if (er(e))
401
+ return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Qe(e)), ve(e);
402
+ }
403
+ var $ = P.ReactCurrentOwner, rr = {
404
+ key: !0,
405
+ ref: !0,
406
+ __self: !0,
407
+ __source: !0
408
+ }, be, ge, q;
409
+ q = {};
410
+ function tr(e) {
411
+ if (A.call(e, "ref")) {
412
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
413
+ if (r && r.isReactWarning)
414
+ return !1;
415
+ }
416
+ return e.ref !== void 0;
417
+ }
418
+ function nr(e) {
419
+ if (A.call(e, "key")) {
420
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
421
+ if (r && r.isReactWarning)
422
+ return !1;
423
+ }
424
+ return e.key !== void 0;
425
+ }
426
+ function ar(e, r) {
427
+ if (typeof e.ref == "string" && $.current && r && $.current.stateNode !== r) {
428
+ var t = E($.current.type);
429
+ q[t] || (c('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', E($.current.type), e.ref), q[t] = !0);
430
+ }
431
+ }
432
+ function or(e, r) {
433
+ {
434
+ var t = function() {
435
+ be || (be = !0, c("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
436
+ };
437
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
438
+ get: t,
439
+ configurable: !0
440
+ });
441
+ }
442
+ }
443
+ function ir(e, r) {
444
+ {
445
+ var t = function() {
446
+ ge || (ge = !0, c("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
447
+ };
448
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
449
+ get: t,
450
+ configurable: !0
451
+ });
452
+ }
453
+ }
454
+ var sr = function(e, r, t, n, i, s, o) {
455
+ var a = {
456
+ // This tag allows us to uniquely identify this as a React Element
457
+ $$typeof: m,
458
+ // Built-in properties that belong on the element
459
+ type: e,
460
+ key: r,
461
+ ref: t,
462
+ props: o,
463
+ // Record the component responsible for creating this element.
464
+ _owner: s
465
+ };
466
+ return a._store = {}, Object.defineProperty(a._store, "validated", {
467
+ configurable: !1,
468
+ enumerable: !1,
469
+ writable: !0,
470
+ value: !1
471
+ }), Object.defineProperty(a, "_self", {
472
+ configurable: !1,
473
+ enumerable: !1,
474
+ writable: !1,
475
+ value: n
476
+ }), Object.defineProperty(a, "_source", {
477
+ configurable: !1,
478
+ enumerable: !1,
479
+ writable: !1,
480
+ value: i
481
+ }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
482
+ };
483
+ function ur(e, r, t, n, i) {
484
+ {
485
+ var s, o = {}, a = null, p = null;
486
+ t !== void 0 && (pe(t), a = "" + t), nr(r) && (pe(r.key), a = "" + r.key), tr(r) && (p = r.ref, ar(r, i));
487
+ for (s in r)
488
+ A.call(r, s) && !rr.hasOwnProperty(s) && (o[s] = r[s]);
489
+ if (e && e.defaultProps) {
490
+ var l = e.defaultProps;
491
+ for (s in l)
492
+ o[s] === void 0 && (o[s] = l[s]);
493
+ }
494
+ if (a || p) {
495
+ var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
496
+ a && or(o, f), p && ir(o, f);
497
+ }
498
+ return sr(e, a, p, i, n, $.current, o);
499
+ }
500
+ }
501
+ var z = P.ReactCurrentOwner, me = P.ReactDebugCurrentFrame;
502
+ function j(e) {
503
+ if (e) {
504
+ var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
505
+ me.setExtraStackFrame(t);
506
+ } else
507
+ me.setExtraStackFrame(null);
508
+ }
509
+ var G;
510
+ G = !1;
511
+ function X(e) {
512
+ return typeof e == "object" && e !== null && e.$$typeof === m;
513
+ }
514
+ function he() {
515
+ {
516
+ if (z.current) {
517
+ var e = E(z.current.type);
518
+ if (e)
519
+ return `
520
+
521
+ Check the render method of \`` + e + "`.";
522
+ }
523
+ return "";
524
+ }
525
+ }
526
+ function lr(e) {
527
+ return "";
528
+ }
529
+ var ye = {};
530
+ function fr(e) {
531
+ {
532
+ var r = he();
533
+ if (!r) {
534
+ var t = typeof e == "string" ? e : e.displayName || e.name;
535
+ t && (r = `
536
+
537
+ Check the top-level render call using <` + t + ">.");
538
+ }
539
+ return r;
540
+ }
541
+ }
542
+ function _e(e, r) {
543
+ {
544
+ if (!e._store || e._store.validated || e.key != null)
545
+ return;
546
+ e._store.validated = !0;
547
+ var t = fr(r);
548
+ if (ye[t])
549
+ return;
550
+ ye[t] = !0;
551
+ var n = "";
552
+ e && e._owner && e._owner !== z.current && (n = " It was passed a child from " + E(e._owner.type) + "."), j(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), j(null);
553
+ }
554
+ }
555
+ function Ee(e, r) {
556
+ {
557
+ if (typeof e != "object")
558
+ return;
559
+ if (K(e))
560
+ for (var t = 0; t < e.length; t++) {
561
+ var n = e[t];
562
+ X(n) && _e(n, r);
563
+ }
564
+ else if (X(e))
565
+ e._store && (e._store.validated = !0);
566
+ else if (e) {
567
+ var i = We(e);
568
+ if (typeof i == "function" && i !== e.entries)
569
+ for (var s = i.call(e), o; !(o = s.next()).done; )
570
+ X(o.value) && _e(o.value, r);
571
+ }
572
+ }
573
+ }
574
+ function cr(e) {
575
+ {
576
+ var r = e.type;
577
+ if (r == null || typeof r == "string")
578
+ return;
579
+ var t;
580
+ if (typeof r == "function")
581
+ t = r.propTypes;
582
+ else if (typeof r == "object" && (r.$$typeof === v || // Note: Memo only checks outer props here.
583
+ // Inner props are checked in the reconciler.
584
+ r.$$typeof === R))
585
+ t = r.propTypes;
586
+ else
587
+ return;
588
+ if (t) {
589
+ var n = E(r);
590
+ He(t, e.props, "prop", n, e);
591
+ } else if (r.PropTypes !== void 0 && !G) {
592
+ G = !0;
593
+ var i = E(r);
594
+ c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
595
+ }
596
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
597
+ }
598
+ }
599
+ function dr(e) {
600
+ {
601
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
602
+ var n = r[t];
603
+ if (n !== "children" && n !== "key") {
604
+ j(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), j(null);
605
+ break;
606
+ }
607
+ }
608
+ e.ref !== null && (j(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), j(null));
609
+ }
610
+ }
611
+ var Re = {};
612
+ function Te(e, r, t, n, i, s) {
613
+ {
614
+ var o = Ne(e);
615
+ if (!o) {
616
+ var a = "";
617
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
618
+ var p = lr();
619
+ p ? a += p : a += he();
620
+ var l;
621
+ e === null ? l = "null" : K(e) ? l = "array" : e !== void 0 && e.$$typeof === m ? (l = "<" + (E(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : l = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", l, a);
622
+ }
623
+ var f = ur(e, r, t, i, s);
624
+ if (f == null)
625
+ return f;
626
+ if (o) {
627
+ var y = r.children;
628
+ if (y !== void 0)
629
+ if (n)
630
+ if (K(y)) {
631
+ for (var D = 0; D < y.length; D++)
632
+ Ee(y[D], e);
633
+ Object.freeze && Object.freeze(y);
634
+ } else
635
+ c("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
636
+ else
637
+ Ee(y, e);
638
+ }
639
+ if (A.call(r, "key")) {
640
+ var C = E(e), b = Object.keys(r).filter(function(hr) {
641
+ return hr !== "key";
642
+ }), H = b.length > 0 ? "{key: someKey, " + b.join(": ..., ") + ": ...}" : "{key: someKey}";
643
+ if (!Re[C + H]) {
644
+ var mr = b.length > 0 ? "{" + b.join(": ..., ") + ": ...}" : "{}";
645
+ c(`A props object containing a "key" prop is being spread into JSX:
646
+ let props = %s;
647
+ <%s {...props} />
648
+ React keys must be passed directly to JSX without using spread:
649
+ let props = %s;
650
+ <%s key={someKey} {...props} />`, H, C, mr, C), Re[C + H] = !0;
651
+ }
652
+ }
653
+ return e === d ? dr(f) : cr(f), f;
654
+ }
655
+ }
656
+ function vr(e, r, t) {
657
+ return Te(e, r, t, !0);
658
+ }
659
+ function pr(e, r, t) {
660
+ return Te(e, r, t, !1);
661
+ }
662
+ var br = pr, gr = vr;
663
+ W.Fragment = d, W.jsx = br, W.jsxs = gr;
664
+ }()), W;
665
+ }
666
+ process.env.NODE_ENV === "production" ? Z.exports = xr() : Z.exports = wr();
667
+ var Se = Z.exports;
668
+ const Sr = "__minimstuff_dark_theme__", kr = {
669
+ radius: {
670
+ xs: "1px",
671
+ s: "2px",
672
+ m: "3px",
673
+ l: "4px",
674
+ xl: "5px"
675
+ }
676
+ }, Cr = {
677
+ xs: "10px",
678
+ s: "12px",
679
+ m: "14px",
680
+ l: "16px",
681
+ xl: "18px"
682
+ }, Or = {
683
+ mobile: "768px",
684
+ tablet: "1024px",
685
+ small_desktop: "1280px",
686
+ medium_desktop: "1440px",
687
+ large_desktop: "1920px",
688
+ xlarge_desktop: "2560px"
689
+ }, Pr = {
690
+ delay: {
691
+ fast: "0.075s",
692
+ normal: "0.15s",
693
+ slow: "0.3s"
694
+ }
695
+ }, jr = {
696
+ borders: kr,
697
+ medias: Or,
698
+ transitions: Pr,
699
+ fontSizes: Cr
700
+ }, Pe = (u, m) => `rgba(${Tr(u, { format: "array" }).slice(0, -1).join(",")},${m})`, ke = "#3f88c5", Dr = "#005aa5", je = "#d3e8fa", De = "#82c5fede", Fe = Dr, Ae = "#1f2937", $e = "#FF5A5A", Fr = {
701
+ font: "#f0eef6",
702
+ background: "#222831",
703
+ primary: "#4fadfc",
704
+ secondary: "#323a47",
705
+ black: "#333333",
706
+ white: "#ffffff",
707
+ lightGrey: "#323a47",
708
+ grey: "#aaaaaa",
709
+ lightestBlue: je,
710
+ lightBlue: De,
711
+ blue: "#4fadfc",
712
+ darkBlue: Fe,
713
+ darkestBlue: Ae,
714
+ green: "#09b909",
715
+ lightRed: $e,
716
+ yellow: "#ffc107",
717
+ boxShadow: `0 0 1em 0 ${Pe("#111", 0.4)}`
718
+ }, Ar = {
719
+ font: "#333",
720
+ background: "#f0eef6",
721
+ primary: ke,
722
+ secondary: "#fff",
723
+ black: "#333",
724
+ white: "#ffffff",
725
+ lightGrey: "#dadce0",
726
+ grey: "#777777",
727
+ lightestBlue: je,
728
+ lightBlue: De,
729
+ blue: ke,
730
+ darkBlue: Fe,
731
+ darkestBlue: Ae,
732
+ green: "green",
733
+ lightRed: $e,
734
+ yellow: "#FF8A08",
735
+ boxShadow: `0 0 1em 0 ${Pe("#aaa", 0.4)}`
736
+ }, $r = yr({
737
+ isDarkTheme: !0,
738
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
739
+ toggleDarkTheme: (u) => {
740
+ }
741
+ });
742
+ function Br({
743
+ preferDarkTheme: u,
744
+ children: m,
745
+ onPreferenceChange: h
746
+ }) {
747
+ const [d, T] = _r(u), x = (_) => {
748
+ T(_), h == null || h(_);
749
+ };
750
+ return Er(() => {
751
+ localStorage.setItem(Sr, String(d));
752
+ }, [d]), /* @__PURE__ */ Se.jsx(
753
+ Rr,
754
+ {
755
+ theme: {
756
+ ...jr,
757
+ colors: d ? Fr : Ar
758
+ },
759
+ children: /* @__PURE__ */ Se.jsx(
760
+ $r.Provider,
761
+ {
762
+ value: {
763
+ isDarkTheme: d,
764
+ toggleDarkTheme: x
765
+ },
766
+ children: m
767
+ }
768
+ )
769
+ }
770
+ );
771
+ }
26
772
  export {
27
- c as Button
773
+ Mr as Button,
774
+ Vr as TextEllipsis,
775
+ Br as ThemeContextProvider,
776
+ $r as _ThemeContext
28
777
  };
29
778
  //# sourceMappingURL=index.es.js.map