@minimalstuff/ui 0.0.19 → 0.0.21

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,5 +1,5 @@
1
1
  import y from "@emotion/styled";
2
- import P, { useEffect as Q, createContext as ze, useContext as Ve, useState as Y, useRef as Ue, Fragment as He } from "react";
2
+ import P, { useEffect as ce, createContext as ze, useContext as Ve, useState as Y, useRef as Ue, Fragment as He } from "react";
3
3
  import { keyframes as ue, useTheme as Ge, ThemeProvider as Br, css as J, Global as Mr } from "@emotion/react";
4
4
  import { useHotkeys as Nr } from "react-hotkeys-hook";
5
5
  import zr from "hex-rgb";
@@ -32,7 +32,7 @@ const Nt = y.button(
32
32
  };
33
33
  }
34
34
  );
35
- var ce = { exports: {} }, z = {};
35
+ var se = { exports: {} }, z = {};
36
36
  /**
37
37
  * @license React
38
38
  * react-jsx-runtime.production.min.js
@@ -220,27 +220,27 @@ function Kr() {
220
220
  B < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
221
221
  }
222
222
  }
223
- var ee = $.ReactCurrentDispatcher, re;
223
+ var Q = $.ReactCurrentDispatcher, ee;
224
224
  function U(e, o, i) {
225
225
  {
226
- if (re === void 0)
226
+ if (ee === void 0)
227
227
  try {
228
228
  throw Error();
229
229
  } catch (b) {
230
230
  var l = b.stack.trim().match(/\n( *(at )?)/);
231
- re = l && l[1] || "";
231
+ ee = l && l[1] || "";
232
232
  }
233
233
  return `
234
- ` + re + e;
234
+ ` + ee + e;
235
235
  }
236
236
  }
237
- var te = !1, H;
237
+ var re = !1, H;
238
238
  {
239
239
  var gr = typeof WeakMap == "function" ? WeakMap : Map;
240
240
  H = new gr();
241
241
  }
242
242
  function ke(e, o) {
243
- if (!e || te)
243
+ if (!e || re)
244
244
  return "";
245
245
  {
246
246
  var i = H.get(e);
@@ -248,11 +248,11 @@ function Kr() {
248
248
  return i;
249
249
  }
250
250
  var l;
251
- te = !0;
251
+ re = !0;
252
252
  var b = Error.prepareStackTrace;
253
253
  Error.prepareStackTrace = void 0;
254
254
  var v;
255
- v = ee.current, ee.current = null, pr();
255
+ v = Q.current, Q.current = null, pr();
256
256
  try {
257
257
  if (o) {
258
258
  var d = function() {
@@ -305,7 +305,7 @@ function Kr() {
305
305
  }
306
306
  }
307
307
  } finally {
308
- te = !1, ee.current = v, br(), Error.prepareStackTrace = b;
308
+ re = !1, Q.current = v, br(), Error.prepareStackTrace = b;
309
309
  }
310
310
  var L = e ? e.displayName || e.name : "", A = L ? U(L) : "";
311
311
  return typeof e == "function" && H.set(e, A), A;
@@ -374,7 +374,7 @@ function Kr() {
374
374
  }
375
375
  }
376
376
  var yr = Array.isArray;
377
- function oe(e) {
377
+ function te(e) {
378
378
  return yr(e);
379
379
  }
380
380
  function xr(e) {
@@ -402,8 +402,8 @@ function Kr() {
402
402
  ref: !0,
403
403
  __self: !0,
404
404
  __source: !0
405
- }, je, Oe, ne;
406
- ne = {};
405
+ }, je, Oe, oe;
406
+ oe = {};
407
407
  function _r(e) {
408
408
  if (M.call(e, "ref")) {
409
409
  var o = Object.getOwnPropertyDescriptor(e, "ref").get;
@@ -423,7 +423,7 @@ function Kr() {
423
423
  function Rr(e, o) {
424
424
  if (typeof e.ref == "string" && N.current && o && N.current.stateNode !== o) {
425
425
  var i = j(N.current.type);
426
- ne[i] || (_('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', j(N.current.type), e.ref), ne[i] = !0);
426
+ oe[i] || (_('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', j(N.current.type), e.ref), oe[i] = !0);
427
427
  }
428
428
  }
429
429
  function Sr(e, o) {
@@ -495,7 +495,7 @@ function Kr() {
495
495
  return Tr(e, u, k, b, l, N.current, d);
496
496
  }
497
497
  }
498
- var ae = $.ReactCurrentOwner, Pe = $.ReactDebugCurrentFrame;
498
+ var ne = $.ReactCurrentOwner, Pe = $.ReactDebugCurrentFrame;
499
499
  function W(e) {
500
500
  if (e) {
501
501
  var o = e._owner, i = G(e.type, e._source, o ? o.type : null);
@@ -503,15 +503,15 @@ function Kr() {
503
503
  } else
504
504
  Pe.setExtraStackFrame(null);
505
505
  }
506
- var ie;
507
- ie = !1;
508
- function le(e) {
506
+ var ae;
507
+ ae = !1;
508
+ function ie(e) {
509
509
  return typeof e == "object" && e !== null && e.$$typeof === t;
510
510
  }
511
511
  function De() {
512
512
  {
513
- if (ae.current) {
514
- var e = j(ae.current.type);
513
+ if (ne.current) {
514
+ var e = j(ne.current.type);
515
515
  if (e)
516
516
  return `
517
517
 
@@ -546,25 +546,25 @@ Check the top-level render call using <` + i + ">.");
546
546
  return;
547
547
  Ie[i] = !0;
548
548
  var l = "";
549
- e && e._owner && e._owner !== ae.current && (l = " It was passed a child from " + j(e._owner.type) + "."), W(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, l), W(null);
549
+ e && e._owner && e._owner !== ne.current && (l = " It was passed a child from " + j(e._owner.type) + "."), W(e), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', i, l), W(null);
550
550
  }
551
551
  }
552
552
  function Ae(e, o) {
553
553
  {
554
554
  if (typeof e != "object")
555
555
  return;
556
- if (oe(e))
556
+ if (te(e))
557
557
  for (var i = 0; i < e.length; i++) {
558
558
  var l = e[i];
559
- le(l) && Fe(l, o);
559
+ ie(l) && Fe(l, o);
560
560
  }
561
- else if (le(e))
561
+ else if (ie(e))
562
562
  e._store && (e._store.validated = !0);
563
563
  else if (e) {
564
564
  var b = nr(e);
565
565
  if (typeof b == "function" && b !== e.entries)
566
566
  for (var v = b.call(e), d; !(d = v.next()).done; )
567
- le(d.value) && Fe(d.value, o);
567
+ ie(d.value) && Fe(d.value, o);
568
568
  }
569
569
  }
570
570
  }
@@ -585,8 +585,8 @@ Check the top-level render call using <` + i + ">.");
585
585
  if (i) {
586
586
  var l = j(o);
587
587
  hr(i, e.props, "prop", l, e);
588
- } else if (o.PropTypes !== void 0 && !ie) {
589
- ie = !0;
588
+ } else if (o.PropTypes !== void 0 && !ae) {
589
+ ae = !0;
590
590
  var b = j(o);
591
591
  _("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown");
592
592
  }
@@ -615,7 +615,7 @@ Check the top-level render call using <` + i + ">.");
615
615
  var k = Or();
616
616
  k ? u += k : u += De();
617
617
  var x;
618
- e === null ? x = "null" : oe(e) ? x = "array" : e !== void 0 && e.$$typeof === t ? (x = "<" + (j(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : x = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", x, u);
618
+ e === null ? x = "null" : te(e) ? x = "array" : e !== void 0 && e.$$typeof === t ? (x = "<" + (j(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : x = typeof e, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", x, u);
619
619
  }
620
620
  var w = jr(e, o, i, b, v);
621
621
  if (w == null)
@@ -624,7 +624,7 @@ Check the top-level render call using <` + i + ">.");
624
624
  var C = o.children;
625
625
  if (C !== void 0)
626
626
  if (l)
627
- if (oe(C)) {
627
+ if (te(C)) {
628
628
  for (var L = 0; L < C.length; L++)
629
629
  Ae(C[L], e);
630
630
  Object.freeze && Object.freeze(C);
@@ -636,15 +636,15 @@ Check the top-level render call using <` + i + ">.");
636
636
  if (M.call(o, "key")) {
637
637
  var A = j(e), R = Object.keys(o).filter(function(Yr) {
638
638
  return Yr !== "key";
639
- }), se = R.length > 0 ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}";
640
- if (!$e[A + se]) {
639
+ }), le = R.length > 0 ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}";
640
+ if (!$e[A + le]) {
641
641
  var Lr = R.length > 0 ? "{" + R.join(": ..., ") + ": ...}" : "{}";
642
642
  _(`A props object containing a "key" prop is being spread into JSX:
643
643
  let props = %s;
644
644
  <%s {...props} />
645
645
  React keys must be passed directly to JSX without using spread:
646
646
  let props = %s;
647
- <%s key={someKey} {...props} />`, se, A, Lr, A), $e[A + se] = !0;
647
+ <%s key={someKey} {...props} />`, le, A, Lr, A), $e[A + le] = !0;
648
648
  }
649
649
  }
650
650
  return e === a ? Ir(w) : Dr(w), w;
@@ -660,8 +660,8 @@ React keys must be passed directly to JSX without using spread:
660
660
  V.Fragment = a, V.jsx = $r, V.jsxs = Wr;
661
661
  }()), V;
662
662
  }
663
- process.env.NODE_ENV === "production" ? ce.exports = Gr() : ce.exports = Kr();
664
- var f = ce.exports;
663
+ process.env.NODE_ENV === "production" ? se.exports = Gr() : se.exports = Kr();
664
+ var f = se.exports;
665
665
  ue({
666
666
  "0%": {
667
667
  opacity: 0
@@ -712,7 +712,7 @@ const Jr = ue({
712
712
  gap: "0.35em"
713
713
  }));
714
714
  function Je(r, t) {
715
- Q(() => {
715
+ ce(() => {
716
716
  function n(a) {
717
717
  var s;
718
718
  r != null && r.current && !((s = r.current) != null && s.contains(a.target)) && t();
@@ -1044,7 +1044,7 @@ function Gt({
1044
1044
  close: c
1045
1045
  }) {
1046
1046
  const m = Ue(null), { setGlobalHotkeysEnabled: h } = qe();
1047
- return Je(m, c), Xe("ESCAPE_KEY", c, { disableGlobalCheck: !0 }), Q(
1047
+ return Je(m, c), Xe("ESCAPE_KEY", c, { disableGlobalCheck: !0 }), ce(
1048
1048
  () => h(!n),
1049
1049
  [n, h]
1050
1050
  ), typeof window > "u" ? /* @__PURE__ */ f.jsx(He, {}) : n && Vr(
@@ -1247,7 +1247,7 @@ function Qt({
1247
1247
  ...h
1248
1248
  }) {
1249
1249
  const g = Ge(), [S, p] = Y();
1250
- Q(() => {
1250
+ ce(() => {
1251
1251
  if (a.length === 0) return;
1252
1252
  const E = a.find((D) => D.value === n);
1253
1253
  E && p(E);
@@ -1355,11 +1355,9 @@ function eo({
1355
1355
  onPreferenceChange: t
1356
1356
  }) {
1357
1357
  const [n, a] = Y(() => !!localStorage.getItem(Ne)), s = (c) => {
1358
- a(c), t == null || t(c);
1358
+ a(c), t == null || t(c), localStorage.setItem(Ne, String(n));
1359
1359
  };
1360
- return Q(() => {
1361
- localStorage.setItem(Ne, String(n));
1362
- }, [n]), /* @__PURE__ */ f.jsx(
1360
+ return /* @__PURE__ */ f.jsx(
1363
1361
  Br,
1364
1362
  {
1365
1363
  theme: {