@minimalstuff/ui 0.0.8 → 0.0.10

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,41 +1,41 @@
1
1
  import Ce from "@emotion/styled";
2
- import Oe, { createContext as yr } from "react";
3
- import "@emotion/react";
4
- import hr from "hex-rgb";
5
- const Cr = Ce.button(
6
- ({ theme: l, danger: y = !1, secondary: E = !1 }) => {
7
- const h = y ? l.colors.lightRed : l.colors.primary, O = y ? l.colors.lightRed : l.colors.darkBlue, k = E ? h : l.colors.white, _ = E ? l.colors.white : h;
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;
8
8
  return {
9
9
  cursor: "pointer",
10
10
  width: "100%",
11
11
  textTransform: "uppercase",
12
- fontSize: l.fontSizes.m,
13
- color: k,
12
+ fontSize: u.fontSizes.m,
13
+ color: x,
14
14
  background: _,
15
15
  padding: "0.75em",
16
- border: `1px solid ${h}`,
17
- borderRadius: l.borders.radius.m,
18
- transition: l.transitions.delay.normal,
16
+ border: `1px solid ${d}`,
17
+ borderRadius: u.borders.radius.m,
18
+ transition: u.transitions.delay.normal,
19
19
  "&:disabled": {
20
20
  cursor: "not-allowed",
21
21
  opacity: "0.5"
22
22
  },
23
23
  "&:not(:disabled):hover": {
24
- background: E ? l.colors.secondary : O
24
+ background: h ? u.colors.secondary : T
25
25
  }
26
26
  };
27
27
  }
28
- ), Or = Ce.p(({ lines: l = 1 }) => l > 1 ? {
28
+ ), Vr = Ce.p(({ lines: u = 1 }) => u > 1 ? {
29
29
  overflow: "hidden",
30
30
  display: "-webkit-box",
31
- WebkitLineClamp: l,
31
+ WebkitLineClamp: u,
32
32
  WebkitBoxOrient: "vertical"
33
33
  } : {
34
34
  textOverflow: "ellipsis",
35
35
  whiteSpace: "nowrap",
36
36
  overflow: "hidden"
37
37
  });
38
- var I = {};
38
+ var Z = { exports: {} }, I = {};
39
39
  /**
40
40
  * @license React
41
41
  * react-jsx-runtime.production.min.js
@@ -45,19 +45,19 @@ var I = {};
45
45
  * This source code is licensed under the MIT license found in the
46
46
  * LICENSE file in the root directory of this source tree.
47
47
  */
48
- var Te;
49
- function mr() {
50
- if (Te) return I;
51
- Te = 1;
52
- var l = Oe, y = Symbol.for("react.element"), E = Symbol.for("react.fragment"), h = Object.prototype.hasOwnProperty, O = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, k = { key: !0, ref: !0, __self: !0, __source: !0 };
53
- function _(T, d, P) {
54
- var b, R = {}, w = null, Y = null;
55
- P !== void 0 && (w = "" + P), d.key !== void 0 && (w = "" + d.key), d.ref !== void 0 && (Y = d.ref);
56
- for (b in d) h.call(d, b) && !k.hasOwnProperty(b) && (R[b] = d[b]);
57
- if (T && T.defaultProps) for (b in d = T.defaultProps, d) R[b] === void 0 && (R[b] = d[b]);
58
- return { $$typeof: y, type: T, key: w, ref: Y, props: R, _owner: O.current };
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
59
  }
60
- return I.Fragment = E, I.jsx = _, I.jsxs = _, I;
60
+ return I.Fragment = h, I.jsx = _, I.jsxs = _, I;
61
61
  }
62
62
  var W = {};
63
63
  /**
@@ -70,53 +70,53 @@ var W = {};
70
70
  * LICENSE file in the root directory of this source tree.
71
71
  */
72
72
  var we;
73
- function Rr() {
73
+ function wr() {
74
74
  return we || (we = 1, process.env.NODE_ENV !== "production" && function() {
75
- var l = Oe, y = Symbol.for("react.element"), E = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), _ = Symbol.for("react.provider"), T = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Z = Symbol.iterator, Ae = "@@iterator";
76
- function $e(e) {
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
77
  if (e === null || typeof e != "object")
78
78
  return null;
79
- var r = Z && e[Z] || e[Ae];
79
+ var r = Q && e[Q] || e[Ie];
80
80
  return typeof r == "function" ? r : null;
81
81
  }
82
- var x = l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
82
+ var P = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
83
83
  function c(e) {
84
84
  {
85
85
  for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
86
86
  t[n - 1] = arguments[n];
87
- Ie("error", e, t);
87
+ Ye("error", e, t);
88
88
  }
89
89
  }
90
- function Ie(e, r, t) {
90
+ function Ye(e, r, t) {
91
91
  {
92
- var n = x.ReactDebugCurrentFrame, i = n.getStackAddendum();
92
+ var n = P.ReactDebugCurrentFrame, i = n.getStackAddendum();
93
93
  i !== "" && (r += "%s", t = t.concat([i]));
94
- var u = t.map(function(o) {
94
+ var s = t.map(function(o) {
95
95
  return String(o);
96
96
  });
97
- u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u);
97
+ s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s);
98
98
  }
99
99
  }
100
- var We = !1, Ye = !1, Le = !1, Ve = !1, Be = !1, Q;
101
- Q = Symbol.for("react.module.reference");
102
- function Me(e) {
103
- return !!(typeof e == "string" || typeof e == "function" || e === h || e === k || Be || e === O || e === P || e === b || Ve || e === Y || We || Ye || Le || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === R || e.$$typeof === _ || e.$$typeof === T || e.$$typeof === d || // This needs to include all possible module reference object
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
104
  // types supported by any Flight configuration anywhere since
105
105
  // we don't know which Flight build this will end up being used
106
106
  // with.
107
- e.$$typeof === Q || e.getModuleId !== void 0));
107
+ e.$$typeof === ee || e.getModuleId !== void 0));
108
108
  }
109
- function Ue(e, r, t) {
109
+ function Je(e, r, t) {
110
110
  var n = e.displayName;
111
111
  if (n)
112
112
  return n;
113
113
  var i = r.displayName || r.name || "";
114
114
  return i !== "" ? t + "(" + i + ")" : t;
115
115
  }
116
- function ee(e) {
116
+ function re(e) {
117
117
  return e.displayName || "Context";
118
118
  }
119
- function m(e) {
119
+ function E(e) {
120
120
  if (e == null)
121
121
  return null;
122
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")
@@ -124,36 +124,36 @@ function Rr() {
124
124
  if (typeof e == "string")
125
125
  return e;
126
126
  switch (e) {
127
- case h:
127
+ case d:
128
128
  return "Fragment";
129
- case E:
129
+ case h:
130
130
  return "Portal";
131
- case k:
131
+ case x:
132
132
  return "Profiler";
133
- case O:
133
+ case T:
134
134
  return "StrictMode";
135
- case P:
135
+ case O:
136
136
  return "Suspense";
137
- case b:
137
+ case g:
138
138
  return "SuspenseList";
139
139
  }
140
140
  if (typeof e == "object")
141
141
  switch (e.$$typeof) {
142
- case T:
142
+ case w:
143
143
  var r = e;
144
- return ee(r) + ".Consumer";
144
+ return re(r) + ".Consumer";
145
145
  case _:
146
146
  var t = e;
147
- return ee(t._context) + ".Provider";
148
- case d:
149
- return Ue(e, e.render, "ForwardRef");
147
+ return re(t._context) + ".Provider";
148
+ case v:
149
+ return Je(e, e.render, "ForwardRef");
150
150
  case R:
151
151
  var n = e.displayName || null;
152
- return n !== null ? n : m(e.type) || "Memo";
153
- case w: {
154
- var i = e, u = i._payload, o = i._init;
152
+ return n !== null ? n : E(e.type) || "Memo";
153
+ case S: {
154
+ var i = e, s = i._payload, o = i._init;
155
155
  try {
156
- return m(o(u));
156
+ return E(o(s));
157
157
  } catch {
158
158
  return null;
159
159
  }
@@ -161,18 +161,18 @@ function Rr() {
161
161
  }
162
162
  return null;
163
163
  }
164
- var S = Object.assign, F = 0, re, te, ne, ae, oe, ie, ue;
165
- function se() {
164
+ var k = Object.assign, F = 0, te, ne, ae, oe, ie, se, ue;
165
+ function le() {
166
166
  }
167
- se.__reactDisabledLog = !0;
168
- function Ne() {
167
+ le.__reactDisabledLog = !0;
168
+ function Ke() {
169
169
  {
170
170
  if (F === 0) {
171
- re = console.log, te = console.info, ne = console.warn, ae = console.error, oe = console.group, ie = console.groupCollapsed, ue = console.groupEnd;
171
+ te = console.log, ne = console.info, ae = console.warn, oe = console.error, ie = console.group, se = console.groupCollapsed, ue = console.groupEnd;
172
172
  var e = {
173
173
  configurable: !0,
174
174
  enumerable: !0,
175
- value: se,
175
+ value: le,
176
176
  writable: !0
177
177
  };
178
178
  Object.defineProperties(console, {
@@ -188,7 +188,7 @@ function Rr() {
188
188
  F++;
189
189
  }
190
190
  }
191
- function Je() {
191
+ function qe() {
192
192
  {
193
193
  if (F--, F === 0) {
194
194
  var e = {
@@ -197,25 +197,25 @@ function Rr() {
197
197
  writable: !0
198
198
  };
199
199
  Object.defineProperties(console, {
200
- log: S({}, e, {
201
- value: re
202
- }),
203
- info: S({}, e, {
200
+ log: k({}, e, {
204
201
  value: te
205
202
  }),
206
- warn: S({}, e, {
203
+ info: k({}, e, {
207
204
  value: ne
208
205
  }),
209
- error: S({}, e, {
206
+ warn: k({}, e, {
210
207
  value: ae
211
208
  }),
212
- group: S({}, e, {
209
+ error: k({}, e, {
213
210
  value: oe
214
211
  }),
215
- groupCollapsed: S({}, e, {
212
+ group: k({}, e, {
216
213
  value: ie
217
214
  }),
218
- groupEnd: S({}, e, {
215
+ groupCollapsed: k({}, e, {
216
+ value: se
217
+ }),
218
+ groupEnd: k({}, e, {
219
219
  value: ue
220
220
  })
221
221
  });
@@ -223,7 +223,7 @@ function Rr() {
223
223
  F < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
224
224
  }
225
225
  }
226
- var U = x.ReactCurrentDispatcher, N;
226
+ var U = P.ReactCurrentDispatcher, N;
227
227
  function L(e, r, t) {
228
228
  {
229
229
  if (N === void 0)
@@ -237,16 +237,16 @@ function Rr() {
237
237
  ` + N + e;
238
238
  }
239
239
  }
240
- var J = !1, V;
240
+ var J = !1, M;
241
241
  {
242
- var qe = typeof WeakMap == "function" ? WeakMap : Map;
243
- V = new qe();
242
+ var ze = typeof WeakMap == "function" ? WeakMap : Map;
243
+ M = new ze();
244
244
  }
245
- function le(e, r) {
245
+ function fe(e, r) {
246
246
  if (!e || J)
247
247
  return "";
248
248
  {
249
- var t = V.get(e);
249
+ var t = M.get(e);
250
250
  if (t !== void 0)
251
251
  return t;
252
252
  }
@@ -254,8 +254,8 @@ function Rr() {
254
254
  J = !0;
255
255
  var i = Error.prepareStackTrace;
256
256
  Error.prepareStackTrace = void 0;
257
- var u;
258
- u = U.current, U.current = null, Ne();
257
+ var s;
258
+ s = U.current, U.current = null, Ke();
259
259
  try {
260
260
  if (r) {
261
261
  var o = function() {
@@ -268,146 +268,146 @@ function Rr() {
268
268
  }), typeof Reflect == "object" && Reflect.construct) {
269
269
  try {
270
270
  Reflect.construct(o, []);
271
- } catch (p) {
272
- n = p;
271
+ } catch (b) {
272
+ n = b;
273
273
  }
274
274
  Reflect.construct(e, [], o);
275
275
  } else {
276
276
  try {
277
277
  o.call();
278
- } catch (p) {
279
- n = p;
278
+ } catch (b) {
279
+ n = b;
280
280
  }
281
281
  e.call(o.prototype);
282
282
  }
283
283
  } else {
284
284
  try {
285
285
  throw Error();
286
- } catch (p) {
287
- n = p;
286
+ } catch (b) {
287
+ n = b;
288
288
  }
289
289
  e();
290
290
  }
291
- } catch (p) {
292
- if (p && n && typeof p.stack == "string") {
293
- for (var a = p.stack.split(`
294
- `), v = n.stack.split(`
295
- `), s = a.length - 1, f = v.length - 1; s >= 1 && f >= 0 && a[s] !== v[f]; )
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
296
  f--;
297
- for (; s >= 1 && f >= 0; s--, f--)
298
- if (a[s] !== v[f]) {
299
- if (s !== 1 || f !== 1)
297
+ for (; l >= 1 && f >= 0; l--, f--)
298
+ if (a[l] !== p[f]) {
299
+ if (l !== 1 || f !== 1)
300
300
  do
301
- if (s--, f--, f < 0 || a[s] !== v[f]) {
302
- var g = `
303
- ` + a[s].replace(" at new ", " at ");
304
- return e.displayName && g.includes("<anonymous>") && (g = g.replace("<anonymous>", e.displayName)), typeof e == "function" && V.set(e, g), g;
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
305
  }
306
- while (s >= 1 && f >= 0);
306
+ while (l >= 1 && f >= 0);
307
307
  break;
308
308
  }
309
309
  }
310
310
  } finally {
311
- J = !1, U.current = u, Je(), Error.prepareStackTrace = i;
311
+ J = !1, U.current = s, qe(), Error.prepareStackTrace = i;
312
312
  }
313
313
  var D = e ? e.displayName || e.name : "", C = D ? L(D) : "";
314
- return typeof e == "function" && V.set(e, C), C;
314
+ return typeof e == "function" && M.set(e, C), C;
315
315
  }
316
316
  function Ge(e, r, t) {
317
- return le(e, !1);
317
+ return fe(e, !1);
318
318
  }
319
- function Ke(e) {
319
+ function Xe(e) {
320
320
  var r = e.prototype;
321
321
  return !!(r && r.isReactComponent);
322
322
  }
323
- function B(e, r, t) {
323
+ function V(e, r, t) {
324
324
  if (e == null)
325
325
  return "";
326
326
  if (typeof e == "function")
327
- return le(e, Ke(e));
327
+ return fe(e, Xe(e));
328
328
  if (typeof e == "string")
329
329
  return L(e);
330
330
  switch (e) {
331
- case P:
331
+ case O:
332
332
  return L("Suspense");
333
- case b:
333
+ case g:
334
334
  return L("SuspenseList");
335
335
  }
336
336
  if (typeof e == "object")
337
337
  switch (e.$$typeof) {
338
- case d:
338
+ case v:
339
339
  return Ge(e.render);
340
340
  case R:
341
- return B(e.type, r, t);
342
- case w: {
343
- var n = e, i = n._payload, u = n._init;
341
+ return V(e.type, r, t);
342
+ case S: {
343
+ var n = e, i = n._payload, s = n._init;
344
344
  try {
345
- return B(u(i), r, t);
345
+ return V(s(i), r, t);
346
346
  } catch {
347
347
  }
348
348
  }
349
349
  }
350
350
  return "";
351
351
  }
352
- var A = Object.prototype.hasOwnProperty, fe = {}, ce = x.ReactDebugCurrentFrame;
353
- function M(e) {
352
+ var A = Object.prototype.hasOwnProperty, ce = {}, de = P.ReactDebugCurrentFrame;
353
+ function B(e) {
354
354
  if (e) {
355
- var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
356
- ce.setExtraStackFrame(t);
355
+ var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
356
+ de.setExtraStackFrame(t);
357
357
  } else
358
- ce.setExtraStackFrame(null);
358
+ de.setExtraStackFrame(null);
359
359
  }
360
- function ze(e, r, t, n, i) {
360
+ function He(e, r, t, n, i) {
361
361
  {
362
- var u = Function.call.bind(A);
362
+ var s = Function.call.bind(A);
363
363
  for (var o in e)
364
- if (u(e, o)) {
364
+ if (s(e, o)) {
365
365
  var a = void 0;
366
366
  try {
367
367
  if (typeof e[o] != "function") {
368
- var v = 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 v.name = "Invariant Violation", v;
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
370
  }
371
371
  a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
372
- } catch (s) {
373
- a = s;
372
+ } catch (l) {
373
+ a = l;
374
374
  }
375
- a && !(a instanceof Error) && (M(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), M(null)), a instanceof Error && !(a.message in fe) && (fe[a.message] = !0, M(i), c("Failed %s type: %s", t, a.message), M(null));
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
376
  }
377
377
  }
378
378
  }
379
- var Xe = Array.isArray;
380
- function q(e) {
381
- return Xe(e);
379
+ var Ze = Array.isArray;
380
+ function K(e) {
381
+ return Ze(e);
382
382
  }
383
- function He(e) {
383
+ function Qe(e) {
384
384
  {
385
385
  var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
386
386
  return t;
387
387
  }
388
388
  }
389
- function Ze(e) {
389
+ function er(e) {
390
390
  try {
391
- return de(e), !1;
391
+ return ve(e), !1;
392
392
  } catch {
393
393
  return !0;
394
394
  }
395
395
  }
396
- function de(e) {
396
+ function ve(e) {
397
397
  return "" + e;
398
398
  }
399
- function ve(e) {
400
- if (Ze(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.", He(e)), de(e);
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
402
  }
403
- var $ = x.ReactCurrentOwner, Qe = {
403
+ var $ = P.ReactCurrentOwner, rr = {
404
404
  key: !0,
405
405
  ref: !0,
406
406
  __self: !0,
407
407
  __source: !0
408
- }, pe, be, G;
409
- G = {};
410
- function er(e) {
408
+ }, be, ge, q;
409
+ q = {};
410
+ function tr(e) {
411
411
  if (A.call(e, "ref")) {
412
412
  var r = Object.getOwnPropertyDescriptor(e, "ref").get;
413
413
  if (r && r.isReactWarning)
@@ -415,7 +415,7 @@ function Rr() {
415
415
  }
416
416
  return e.ref !== void 0;
417
417
  }
418
- function rr(e) {
418
+ function nr(e) {
419
419
  if (A.call(e, "key")) {
420
420
  var r = Object.getOwnPropertyDescriptor(e, "key").get;
421
421
  if (r && r.isReactWarning)
@@ -423,16 +423,16 @@ function Rr() {
423
423
  }
424
424
  return e.key !== void 0;
425
425
  }
426
- function tr(e, r) {
426
+ function ar(e, r) {
427
427
  if (typeof e.ref == "string" && $.current && r && $.current.stateNode !== r) {
428
- var t = m($.current.type);
429
- G[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', m($.current.type), e.ref), G[t] = !0);
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
430
  }
431
431
  }
432
- function nr(e, r) {
432
+ function or(e, r) {
433
433
  {
434
434
  var t = function() {
435
- pe || (pe = !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));
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
436
  };
437
437
  t.isReactWarning = !0, Object.defineProperty(e, "key", {
438
438
  get: t,
@@ -440,10 +440,10 @@ function Rr() {
440
440
  });
441
441
  }
442
442
  }
443
- function ar(e, r) {
443
+ function ir(e, r) {
444
444
  {
445
445
  var t = function() {
446
- be || (be = !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));
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
447
  };
448
448
  t.isReactWarning = !0, Object.defineProperty(e, "ref", {
449
449
  get: t,
@@ -451,17 +451,17 @@ function Rr() {
451
451
  });
452
452
  }
453
453
  }
454
- var or = function(e, r, t, n, i, u, o) {
454
+ var sr = function(e, r, t, n, i, s, o) {
455
455
  var a = {
456
456
  // This tag allows us to uniquely identify this as a React Element
457
- $$typeof: y,
457
+ $$typeof: m,
458
458
  // Built-in properties that belong on the element
459
459
  type: e,
460
460
  key: r,
461
461
  ref: t,
462
462
  props: o,
463
463
  // Record the component responsible for creating this element.
464
- _owner: u
464
+ _owner: s
465
465
  };
466
466
  return a._store = {}, Object.defineProperty(a._store, "validated", {
467
467
  configurable: !1,
@@ -480,41 +480,41 @@ function Rr() {
480
480
  value: i
481
481
  }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
482
482
  };
483
- function ir(e, r, t, n, i) {
483
+ function ur(e, r, t, n, i) {
484
484
  {
485
- var u, o = {}, a = null, v = null;
486
- t !== void 0 && (ve(t), a = "" + t), rr(r) && (ve(r.key), a = "" + r.key), er(r) && (v = r.ref, tr(r, i));
487
- for (u in r)
488
- A.call(r, u) && !Qe.hasOwnProperty(u) && (o[u] = r[u]);
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
489
  if (e && e.defaultProps) {
490
- var s = e.defaultProps;
491
- for (u in s)
492
- o[u] === void 0 && (o[u] = s[u]);
490
+ var l = e.defaultProps;
491
+ for (s in l)
492
+ o[s] === void 0 && (o[s] = l[s]);
493
493
  }
494
- if (a || v) {
494
+ if (a || p) {
495
495
  var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
496
- a && nr(o, f), v && ar(o, f);
496
+ a && or(o, f), p && ir(o, f);
497
497
  }
498
- return or(e, a, v, i, n, $.current, o);
498
+ return sr(e, a, p, i, n, $.current, o);
499
499
  }
500
500
  }
501
- var K = x.ReactCurrentOwner, ge = x.ReactDebugCurrentFrame;
501
+ var z = P.ReactCurrentOwner, me = P.ReactDebugCurrentFrame;
502
502
  function j(e) {
503
503
  if (e) {
504
- var r = e._owner, t = B(e.type, e._source, r ? r.type : null);
505
- ge.setExtraStackFrame(t);
504
+ var r = e._owner, t = V(e.type, e._source, r ? r.type : null);
505
+ me.setExtraStackFrame(t);
506
506
  } else
507
- ge.setExtraStackFrame(null);
507
+ me.setExtraStackFrame(null);
508
508
  }
509
- var z;
510
- z = !1;
509
+ var G;
510
+ G = !1;
511
511
  function X(e) {
512
- return typeof e == "object" && e !== null && e.$$typeof === y;
512
+ return typeof e == "object" && e !== null && e.$$typeof === m;
513
513
  }
514
- function ye() {
514
+ function he() {
515
515
  {
516
- if (K.current) {
517
- var e = m(K.current.type);
516
+ if (z.current) {
517
+ var e = E(z.current.type);
518
518
  if (e)
519
519
  return `
520
520
 
@@ -523,13 +523,13 @@ Check the render method of \`` + e + "`.";
523
523
  return "";
524
524
  }
525
525
  }
526
- function ur(e) {
526
+ function lr(e) {
527
527
  return "";
528
528
  }
529
- var he = {};
530
- function sr(e) {
529
+ var ye = {};
530
+ function fr(e) {
531
531
  {
532
- var r = ye();
532
+ var r = he();
533
533
  if (!r) {
534
534
  var t = typeof e == "string" ? e : e.displayName || e.name;
535
535
  t && (r = `
@@ -539,39 +539,39 @@ Check the top-level render call using <` + t + ">.");
539
539
  return r;
540
540
  }
541
541
  }
542
- function me(e, r) {
542
+ function _e(e, r) {
543
543
  {
544
544
  if (!e._store || e._store.validated || e.key != null)
545
545
  return;
546
546
  e._store.validated = !0;
547
- var t = sr(r);
548
- if (he[t])
547
+ var t = fr(r);
548
+ if (ye[t])
549
549
  return;
550
- he[t] = !0;
550
+ ye[t] = !0;
551
551
  var n = "";
552
- e && e._owner && e._owner !== K.current && (n = " It was passed a child from " + m(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);
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
553
  }
554
554
  }
555
- function Re(e, r) {
555
+ function Ee(e, r) {
556
556
  {
557
557
  if (typeof e != "object")
558
558
  return;
559
- if (q(e))
559
+ if (K(e))
560
560
  for (var t = 0; t < e.length; t++) {
561
561
  var n = e[t];
562
- X(n) && me(n, r);
562
+ X(n) && _e(n, r);
563
563
  }
564
564
  else if (X(e))
565
565
  e._store && (e._store.validated = !0);
566
566
  else if (e) {
567
- var i = $e(e);
567
+ var i = We(e);
568
568
  if (typeof i == "function" && i !== e.entries)
569
- for (var u = i.call(e), o; !(o = u.next()).done; )
570
- X(o.value) && me(o.value, r);
569
+ for (var s = i.call(e), o; !(o = s.next()).done; )
570
+ X(o.value) && _e(o.value, r);
571
571
  }
572
572
  }
573
573
  }
574
- function lr(e) {
574
+ function cr(e) {
575
575
  {
576
576
  var r = e.type;
577
577
  if (r == null || typeof r == "string")
@@ -579,24 +579,24 @@ Check the top-level render call using <` + t + ">.");
579
579
  var t;
580
580
  if (typeof r == "function")
581
581
  t = r.propTypes;
582
- else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here.
582
+ else if (typeof r == "object" && (r.$$typeof === v || // Note: Memo only checks outer props here.
583
583
  // Inner props are checked in the reconciler.
584
584
  r.$$typeof === R))
585
585
  t = r.propTypes;
586
586
  else
587
587
  return;
588
588
  if (t) {
589
- var n = m(r);
590
- ze(t, e.props, "prop", n, e);
591
- } else if (r.PropTypes !== void 0 && !z) {
592
- z = !0;
593
- var i = m(r);
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
594
  c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown");
595
595
  }
596
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
597
  }
598
598
  }
599
- function fr(e) {
599
+ function dr(e) {
600
600
  {
601
601
  for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
602
602
  var n = r[t];
@@ -608,74 +608,171 @@ Check the top-level render call using <` + t + ">.");
608
608
  e.ref !== null && (j(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), j(null));
609
609
  }
610
610
  }
611
- var Ee = {};
612
- function _e(e, r, t, n, i, u) {
611
+ var Re = {};
612
+ function Te(e, r, t, n, i, s) {
613
613
  {
614
- var o = Me(e);
614
+ var o = Ne(e);
615
615
  if (!o) {
616
616
  var a = "";
617
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 v = ur();
619
- v ? a += v : a += ye();
620
- var s;
621
- e === null ? s = "null" : q(e) ? s = "array" : e !== void 0 && e.$$typeof === y ? (s = "<" + (m(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = 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", s, a);
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
622
  }
623
- var f = ir(e, r, t, i, u);
623
+ var f = ur(e, r, t, i, s);
624
624
  if (f == null)
625
625
  return f;
626
626
  if (o) {
627
- var g = r.children;
628
- if (g !== void 0)
627
+ var y = r.children;
628
+ if (y !== void 0)
629
629
  if (n)
630
- if (q(g)) {
631
- for (var D = 0; D < g.length; D++)
632
- Re(g[D], e);
633
- Object.freeze && Object.freeze(g);
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
634
  } else
635
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
636
  else
637
- Re(g, e);
637
+ Ee(y, e);
638
638
  }
639
639
  if (A.call(r, "key")) {
640
- var C = m(e), p = Object.keys(r).filter(function(gr) {
641
- return gr !== "key";
642
- }), H = p.length > 0 ? "{key: someKey, " + p.join(": ..., ") + ": ...}" : "{key: someKey}";
643
- if (!Ee[C + H]) {
644
- var br = p.length > 0 ? "{" + p.join(": ..., ") + ": ...}" : "{}";
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
645
  c(`A props object containing a "key" prop is being spread into JSX:
646
646
  let props = %s;
647
647
  <%s {...props} />
648
648
  React keys must be passed directly to JSX without using spread:
649
649
  let props = %s;
650
- <%s key={someKey} {...props} />`, H, C, br, C), Ee[C + H] = !0;
650
+ <%s key={someKey} {...props} />`, H, C, mr, C), Re[C + H] = !0;
651
651
  }
652
652
  }
653
- return e === h ? fr(f) : lr(f), f;
653
+ return e === d ? dr(f) : cr(f), f;
654
654
  }
655
655
  }
656
- function cr(e, r, t) {
657
- return _e(e, r, t, !0);
656
+ function vr(e, r, t) {
657
+ return Te(e, r, t, !0);
658
658
  }
659
- function dr(e, r, t) {
660
- return _e(e, r, t, !1);
659
+ function pr(e, r, t) {
660
+ return Te(e, r, t, !1);
661
661
  }
662
- var vr = dr, pr = cr;
663
- W.Fragment = h, W.jsx = vr, W.jsxs = pr;
662
+ var br = pr, gr = vr;
663
+ W.Fragment = d, W.jsx = br, W.jsxs = gr;
664
664
  }()), W;
665
665
  }
666
- process.env.NODE_ENV === "production" ? mr() : Rr();
667
- const ke = (l, y) => `rgba(${hr(l, { format: "array" }).slice(0, -1).join(",")},${y})`, Se = "#3f88c5", Er = "#005aa5", Pe = "#d3e8fa", xe = "#82c5fede", je = Er, De = "#1f2937", Fe = "#FF5A5A";
668
- `${ke("#111", 0.4)}`;
669
- `${ke("#aaa", 0.4)}`;
670
- const kr = yr({
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({
671
737
  isDarkTheme: !0,
672
738
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
673
- toggleDarkTheme: (l) => {
739
+ toggleDarkTheme: (u) => {
674
740
  }
675
741
  });
742
+ function Br({
743
+ preferDarkTheme: u = !0,
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
+ }
676
772
  export {
677
- Cr as Button,
678
- Or as TextEllipsis,
679
- kr as ThemeContext
773
+ Mr as Button,
774
+ Vr as TextEllipsis,
775
+ Br as ThemeContextProvider,
776
+ $r as _ThemeContext
680
777
  };
681
778
  //# sourceMappingURL=index.es.js.map