@binamik/components 0.1.1 → 0.1.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.
@@ -1,38 +1,8 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __objRest = (source, exclude) => {
21
- var target = {};
22
- for (var prop in source)
23
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
- target[prop] = source[prop];
25
- if (source != null && __getOwnPropSymbols)
26
- for (var prop of __getOwnPropSymbols(source)) {
27
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
- target[prop] = source[prop];
29
- }
30
- return target;
31
- };
32
- import { keyframes, css, Global } from "@emotion/react";
33
- import styled from "@emotion/styled";
34
- import require$$0 from "react";
35
- const dashAnimation = keyframes`
1
+ import { keyframes as ue, css as F, Global as jr } from "@emotion/react";
2
+ import R from "@emotion/styled";
3
+ import O, { useMemo as N, useCallback as X, useState as Sr, useEffect as Ge, createContext as $r, Fragment as Fr, useContext as Dr } from "react";
4
+ import { motion as D, AnimatePresence as Ke } from "framer-motion";
5
+ const Br = ue`
36
6
  0% {
37
7
  stroke-dasharray: 1, 200;
38
8
  stroke-dashoffset: 0;
@@ -45,25 +15,22 @@ const dashAnimation = keyframes`
45
15
  stroke-dasharray: 89, 200;
46
16
  stroke-dashoffset: -124px;
47
17
  }
48
- `;
49
- const rotate = keyframes`
18
+ `, Nr = ue`
50
19
  100% {
51
20
  transform: rotate(360deg);
52
21
  }
53
- `;
54
- const SpinnerContainer = styled.div`
22
+ `, Mr = R.div`
55
23
  position: relative;
56
24
  margin: 0 auto;
57
- width: ${({ size }) => size || "1.5rem"};
25
+ width: ${({ size: r }) => r || "1.5rem"};
58
26
 
59
27
  &:before {
60
28
  content: '';
61
29
  display: block;
62
30
  padding-top: 100%;
63
31
  }
64
- `;
65
- const SpinnerComponent = styled.svg`
66
- animation: ${rotate} 2s linear infinite;
32
+ `, Ir = R.svg`
33
+ animation: ${Nr} 2s linear infinite;
67
34
  height: 100%;
68
35
  transform-origin: center center;
69
36
  width: 100%;
@@ -73,83 +40,65 @@ const SpinnerComponent = styled.svg`
73
40
  left: 0;
74
41
  right: 0;
75
42
  margin: auto;
76
- `;
77
- const Circle = styled.circle`
43
+ `, zr = R.circle`
78
44
  stroke-dasharray: 1, 200;
79
45
  stroke-dashoffset: 0;
80
- animation: ${dashAnimation} 1.5s ease-in-out infinite;
46
+ animation: ${Br} 1.5s ease-in-out infinite;
81
47
  stroke-linecap: round;
82
48
  `;
83
- var jsxRuntime = { exports: {} };
84
- var reactJsxRuntime_production_min = {};
49
+ var ce = { exports: {} }, L = {};
85
50
  /*
86
51
  object-assign
87
52
  (c) Sindre Sorhus
88
53
  @license MIT
89
54
  */
90
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
91
- var hasOwnProperty = Object.prototype.hasOwnProperty;
92
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
93
- function toObject(val) {
94
- if (val === null || val === void 0) {
95
- throw new TypeError("Object.assign cannot be called with null or undefined");
96
- }
97
- return Object(val);
98
- }
99
- function shouldUseNative() {
100
- try {
101
- if (!Object.assign) {
102
- return false;
103
- }
104
- var test1 = new String("abc");
105
- test1[5] = "de";
106
- if (Object.getOwnPropertyNames(test1)[0] === "5") {
107
- return false;
108
- }
109
- var test2 = {};
110
- for (var i = 0; i < 10; i++) {
111
- test2["_" + String.fromCharCode(i)] = i;
112
- }
113
- var order2 = Object.getOwnPropertyNames(test2).map(function(n2) {
114
- return test2[n2];
115
- });
116
- if (order2.join("") !== "0123456789") {
117
- return false;
118
- }
119
- var test3 = {};
120
- "abcdefghijklmnopqrst".split("").forEach(function(letter) {
121
- test3[letter] = letter;
122
- });
123
- if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
124
- return false;
125
- }
126
- return true;
127
- } catch (err) {
128
- return false;
55
+ var le, Le;
56
+ function Je() {
57
+ if (Le)
58
+ return le;
59
+ Le = 1;
60
+ var r = Object.getOwnPropertySymbols, o = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
61
+ function c(d) {
62
+ if (d == null)
63
+ throw new TypeError("Object.assign cannot be called with null or undefined");
64
+ return Object(d);
129
65
  }
130
- }
131
- shouldUseNative() ? Object.assign : function(target, source) {
132
- var from;
133
- var to = toObject(target);
134
- var symbols;
135
- for (var s = 1; s < arguments.length; s++) {
136
- from = Object(arguments[s]);
137
- for (var key in from) {
138
- if (hasOwnProperty.call(from, key)) {
139
- to[key] = from[key];
140
- }
66
+ function f() {
67
+ try {
68
+ if (!Object.assign)
69
+ return !1;
70
+ var d = new String("abc");
71
+ if (d[5] = "de", Object.getOwnPropertyNames(d)[0] === "5")
72
+ return !1;
73
+ for (var x = {}, i = 0; i < 10; i++)
74
+ x["_" + String.fromCharCode(i)] = i;
75
+ var l = Object.getOwnPropertyNames(x).map(function(u) {
76
+ return x[u];
77
+ });
78
+ if (l.join("") !== "0123456789")
79
+ return !1;
80
+ var p = {};
81
+ return "abcdefghijklmnopqrst".split("").forEach(function(u) {
82
+ p[u] = u;
83
+ }), Object.keys(Object.assign({}, p)).join("") === "abcdefghijklmnopqrst";
84
+ } catch {
85
+ return !1;
141
86
  }
142
- if (getOwnPropertySymbols) {
143
- symbols = getOwnPropertySymbols(from);
144
- for (var i = 0; i < symbols.length; i++) {
145
- if (propIsEnumerable.call(from, symbols[i])) {
146
- to[symbols[i]] = from[symbols[i]];
147
- }
87
+ }
88
+ return le = f() ? Object.assign : function(d, x) {
89
+ for (var i, l = c(d), p, u = 1; u < arguments.length; u++) {
90
+ i = Object(arguments[u]);
91
+ for (var b in i)
92
+ o.call(i, b) && (l[b] = i[b]);
93
+ if (r) {
94
+ p = r(i);
95
+ for (var E = 0; E < p.length; E++)
96
+ n.call(i, p[E]) && (l[p[E]] = i[p[E]]);
148
97
  }
149
98
  }
150
- }
151
- return to;
152
- };
99
+ return l;
100
+ }, le;
101
+ }
153
102
  /** @license React v17.0.2
154
103
  * react-jsx-runtime.production.min.js
155
104
  *
@@ -158,66 +107,636 @@ shouldUseNative() ? Object.assign : function(target, source) {
158
107
  * This source code is licensed under the MIT license found in the
159
108
  * LICENSE file in the root directory of this source tree.
160
109
  */
161
- var f = require$$0, g = 60103;
162
- reactJsxRuntime_production_min.Fragment = 60107;
163
- if (typeof Symbol === "function" && Symbol.for) {
164
- var h = Symbol.for;
165
- g = h("react.element");
166
- reactJsxRuntime_production_min.Fragment = h("react.fragment");
167
- }
168
- var m = f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, n = Object.prototype.hasOwnProperty, p = { key: true, ref: true, __self: true, __source: true };
169
- function q(c, a, k) {
170
- var b, d = {}, e = null, l = null;
171
- k !== void 0 && (e = "" + k);
172
- a.key !== void 0 && (e = "" + a.key);
173
- a.ref !== void 0 && (l = a.ref);
174
- for (b in a)
175
- n.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
176
- if (c && c.defaultProps)
177
- for (b in a = c.defaultProps, a)
178
- d[b] === void 0 && (d[b] = a[b]);
179
- return { $$typeof: g, type: c, key: e, ref: l, props: d, _owner: m.current };
110
+ var Ye;
111
+ function Wr() {
112
+ if (Ye)
113
+ return L;
114
+ Ye = 1, Je();
115
+ var r = O, o = 60103;
116
+ if (L.Fragment = 60107, typeof Symbol == "function" && Symbol.for) {
117
+ var n = Symbol.for;
118
+ o = n("react.element"), L.Fragment = n("react.fragment");
119
+ }
120
+ var c = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = Object.prototype.hasOwnProperty, d = { key: !0, ref: !0, __self: !0, __source: !0 };
121
+ function x(i, l, p) {
122
+ var u, b = {}, E = null, A = null;
123
+ p !== void 0 && (E = "" + p), l.key !== void 0 && (E = "" + l.key), l.ref !== void 0 && (A = l.ref);
124
+ for (u in l)
125
+ f.call(l, u) && !d.hasOwnProperty(u) && (b[u] = l[u]);
126
+ if (i && i.defaultProps)
127
+ for (u in l = i.defaultProps, l)
128
+ b[u] === void 0 && (b[u] = l[u]);
129
+ return { $$typeof: o, type: i, key: E, ref: A, props: b, _owner: c.current };
130
+ }
131
+ return L.jsx = x, L.jsxs = x, L;
180
132
  }
181
- reactJsxRuntime_production_min.jsx = q;
182
- reactJsxRuntime_production_min.jsxs = q;
183
- {
184
- jsxRuntime.exports = reactJsxRuntime_production_min;
133
+ var se = {};
134
+ /** @license React v17.0.2
135
+ * react-jsx-runtime.development.js
136
+ *
137
+ * Copyright (c) Facebook, Inc. and its affiliates.
138
+ *
139
+ * This source code is licensed under the MIT license found in the
140
+ * LICENSE file in the root directory of this source tree.
141
+ */
142
+ var qe;
143
+ function Lr() {
144
+ return qe || (qe = 1, function(r) {
145
+ process.env.NODE_ENV !== "production" && function() {
146
+ var o = O, n = Je(), c = 60103, f = 60106;
147
+ r.Fragment = 60107;
148
+ var d = 60108, x = 60114, i = 60109, l = 60110, p = 60112, u = 60113, b = 60120, E = 60115, A = 60116, M = 60121, ge = 60122, be = 60117, me = 60129, ve = 60131;
149
+ if (typeof Symbol == "function" && Symbol.for) {
150
+ var _ = Symbol.for;
151
+ c = _("react.element"), f = _("react.portal"), r.Fragment = _("react.fragment"), d = _("react.strict_mode"), x = _("react.profiler"), i = _("react.provider"), l = _("react.context"), p = _("react.forward_ref"), u = _("react.suspense"), b = _("react.suspense_list"), E = _("react.memo"), A = _("react.lazy"), M = _("react.block"), ge = _("react.server.block"), be = _("react.fundamental"), _("react.scope"), _("react.opaque.id"), me = _("react.debug_trace_mode"), _("react.offscreen"), ve = _("react.legacy_hidden");
152
+ }
153
+ var he = typeof Symbol == "function" && Symbol.iterator, nr = "@@iterator";
154
+ function or(e) {
155
+ if (e === null || typeof e != "object")
156
+ return null;
157
+ var t = he && e[he] || e[nr];
158
+ return typeof t == "function" ? t : null;
159
+ }
160
+ var I = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
161
+ function C(e) {
162
+ {
163
+ for (var t = arguments.length, a = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
164
+ a[s - 1] = arguments[s];
165
+ ir("error", e, a);
166
+ }
167
+ }
168
+ function ir(e, t, a) {
169
+ {
170
+ var s = I.ReactDebugCurrentFrame, h = s.getStackAddendum();
171
+ h !== "" && (t += "%s", a = a.concat([h]));
172
+ var y = a.map(function(m) {
173
+ return "" + m;
174
+ });
175
+ y.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, y);
176
+ }
177
+ }
178
+ var lr = !1;
179
+ function sr(e) {
180
+ return !!(typeof e == "string" || typeof e == "function" || e === r.Fragment || e === x || e === me || e === d || e === u || e === b || e === ve || lr || typeof e == "object" && e !== null && (e.$$typeof === A || e.$$typeof === E || e.$$typeof === i || e.$$typeof === l || e.$$typeof === p || e.$$typeof === be || e.$$typeof === M || e[0] === ge));
181
+ }
182
+ function cr(e, t, a) {
183
+ var s = t.displayName || t.name || "";
184
+ return e.displayName || (s !== "" ? a + "(" + s + ")" : a);
185
+ }
186
+ function ye(e) {
187
+ return e.displayName || "Context";
188
+ }
189
+ function P(e) {
190
+ if (e == null)
191
+ return null;
192
+ if (typeof e.tag == "number" && C("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."), typeof e == "function")
193
+ return e.displayName || e.name || null;
194
+ if (typeof e == "string")
195
+ return e;
196
+ switch (e) {
197
+ case r.Fragment:
198
+ return "Fragment";
199
+ case f:
200
+ return "Portal";
201
+ case x:
202
+ return "Profiler";
203
+ case d:
204
+ return "StrictMode";
205
+ case u:
206
+ return "Suspense";
207
+ case b:
208
+ return "SuspenseList";
209
+ }
210
+ if (typeof e == "object")
211
+ switch (e.$$typeof) {
212
+ case l:
213
+ var t = e;
214
+ return ye(t) + ".Consumer";
215
+ case i:
216
+ var a = e;
217
+ return ye(a._context) + ".Provider";
218
+ case p:
219
+ return cr(e, e.render, "ForwardRef");
220
+ case E:
221
+ return P(e.type);
222
+ case M:
223
+ return P(e._render);
224
+ case A: {
225
+ var s = e, h = s._payload, y = s._init;
226
+ try {
227
+ return P(y(h));
228
+ } catch {
229
+ return null;
230
+ }
231
+ }
232
+ }
233
+ return null;
234
+ }
235
+ var Y = 0, we, Ee, _e, ke, Re, Te, Ce;
236
+ function Oe() {
237
+ }
238
+ Oe.__reactDisabledLog = !0;
239
+ function pr() {
240
+ {
241
+ if (Y === 0) {
242
+ we = console.log, Ee = console.info, _e = console.warn, ke = console.error, Re = console.group, Te = console.groupCollapsed, Ce = console.groupEnd;
243
+ var e = {
244
+ configurable: !0,
245
+ enumerable: !0,
246
+ value: Oe,
247
+ writable: !0
248
+ };
249
+ Object.defineProperties(console, {
250
+ info: e,
251
+ log: e,
252
+ warn: e,
253
+ error: e,
254
+ group: e,
255
+ groupCollapsed: e,
256
+ groupEnd: e
257
+ });
258
+ }
259
+ Y++;
260
+ }
261
+ }
262
+ function ur() {
263
+ {
264
+ if (Y--, Y === 0) {
265
+ var e = {
266
+ configurable: !0,
267
+ enumerable: !0,
268
+ writable: !0
269
+ };
270
+ Object.defineProperties(console, {
271
+ log: n({}, e, {
272
+ value: we
273
+ }),
274
+ info: n({}, e, {
275
+ value: Ee
276
+ }),
277
+ warn: n({}, e, {
278
+ value: _e
279
+ }),
280
+ error: n({}, e, {
281
+ value: ke
282
+ }),
283
+ group: n({}, e, {
284
+ value: Re
285
+ }),
286
+ groupCollapsed: n({}, e, {
287
+ value: Te
288
+ }),
289
+ groupEnd: n({}, e, {
290
+ value: Ce
291
+ })
292
+ });
293
+ }
294
+ Y < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
295
+ }
296
+ }
297
+ var Q = I.ReactCurrentDispatcher, ee;
298
+ function V(e, t, a) {
299
+ {
300
+ if (ee === void 0)
301
+ try {
302
+ throw Error();
303
+ } catch (h) {
304
+ var s = h.stack.trim().match(/\n( *(at )?)/);
305
+ ee = s && s[1] || "";
306
+ }
307
+ return `
308
+ ` + ee + e;
309
+ }
310
+ }
311
+ var re = !1, H;
312
+ {
313
+ var dr = typeof WeakMap == "function" ? WeakMap : Map;
314
+ H = new dr();
315
+ }
316
+ function Ae(e, t) {
317
+ if (!e || re)
318
+ return "";
319
+ {
320
+ var a = H.get(e);
321
+ if (a !== void 0)
322
+ return a;
323
+ }
324
+ var s;
325
+ re = !0;
326
+ var h = Error.prepareStackTrace;
327
+ Error.prepareStackTrace = void 0;
328
+ var y;
329
+ y = Q.current, Q.current = null, pr();
330
+ try {
331
+ if (t) {
332
+ var m = function() {
333
+ throw Error();
334
+ };
335
+ if (Object.defineProperty(m.prototype, "props", {
336
+ set: function() {
337
+ throw Error();
338
+ }
339
+ }), typeof Reflect == "object" && Reflect.construct) {
340
+ try {
341
+ Reflect.construct(m, []);
342
+ } catch ($) {
343
+ s = $;
344
+ }
345
+ Reflect.construct(e, [], m);
346
+ } else {
347
+ try {
348
+ m.call();
349
+ } catch ($) {
350
+ s = $;
351
+ }
352
+ e.call(m.prototype);
353
+ }
354
+ } else {
355
+ try {
356
+ throw Error();
357
+ } catch ($) {
358
+ s = $;
359
+ }
360
+ e();
361
+ }
362
+ } catch ($) {
363
+ if ($ && s && typeof $.stack == "string") {
364
+ for (var g = $.stack.split(`
365
+ `), T = s.stack.split(`
366
+ `), w = g.length - 1, k = T.length - 1; w >= 1 && k >= 0 && g[w] !== T[k]; )
367
+ k--;
368
+ for (; w >= 1 && k >= 0; w--, k--)
369
+ if (g[w] !== T[k]) {
370
+ if (w !== 1 || k !== 1)
371
+ do
372
+ if (w--, k--, k < 0 || g[w] !== T[k]) {
373
+ var S = `
374
+ ` + g[w].replace(" at new ", " at ");
375
+ return typeof e == "function" && H.set(e, S), S;
376
+ }
377
+ while (w >= 1 && k >= 0);
378
+ break;
379
+ }
380
+ }
381
+ } finally {
382
+ re = !1, Q.current = y, ur(), Error.prepareStackTrace = h;
383
+ }
384
+ var W = e ? e.displayName || e.name : "", We = W ? V(W) : "";
385
+ return typeof e == "function" && H.set(e, We), We;
386
+ }
387
+ function Pe(e, t, a) {
388
+ return Ae(e, !1);
389
+ }
390
+ function fr(e) {
391
+ var t = e.prototype;
392
+ return !!(t && t.isReactComponent);
393
+ }
394
+ function G(e, t, a) {
395
+ if (e == null)
396
+ return "";
397
+ if (typeof e == "function")
398
+ return Ae(e, fr(e));
399
+ if (typeof e == "string")
400
+ return V(e);
401
+ switch (e) {
402
+ case u:
403
+ return V("Suspense");
404
+ case b:
405
+ return V("SuspenseList");
406
+ }
407
+ if (typeof e == "object")
408
+ switch (e.$$typeof) {
409
+ case p:
410
+ return Pe(e.render);
411
+ case E:
412
+ return G(e.type, t, a);
413
+ case M:
414
+ return Pe(e._render);
415
+ case A: {
416
+ var s = e, h = s._payload, y = s._init;
417
+ try {
418
+ return G(y(h), t, a);
419
+ } catch {
420
+ }
421
+ }
422
+ }
423
+ return "";
424
+ }
425
+ var je = {}, Se = I.ReactDebugCurrentFrame;
426
+ function K(e) {
427
+ if (e) {
428
+ var t = e._owner, a = G(e.type, e._source, t ? t.type : null);
429
+ Se.setExtraStackFrame(a);
430
+ } else
431
+ Se.setExtraStackFrame(null);
432
+ }
433
+ function xr(e, t, a, s, h) {
434
+ {
435
+ var y = Function.call.bind(Object.prototype.hasOwnProperty);
436
+ for (var m in e)
437
+ if (y(e, m)) {
438
+ var g = void 0;
439
+ try {
440
+ if (typeof e[m] != "function") {
441
+ var T = Error((s || "React class") + ": " + a + " type `" + m + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[m] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
442
+ throw T.name = "Invariant Violation", T;
443
+ }
444
+ g = e[m](t, m, s, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
445
+ } catch (w) {
446
+ g = w;
447
+ }
448
+ g && !(g instanceof Error) && (K(h), 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).", s || "React class", a, m, typeof g), K(null)), g instanceof Error && !(g.message in je) && (je[g.message] = !0, K(h), C("Failed %s type: %s", a, g.message), K(null));
449
+ }
450
+ }
451
+ }
452
+ var q = I.ReactCurrentOwner, te = Object.prototype.hasOwnProperty, gr = {
453
+ key: !0,
454
+ ref: !0,
455
+ __self: !0,
456
+ __source: !0
457
+ }, $e, Fe, ae;
458
+ ae = {};
459
+ function br(e) {
460
+ if (te.call(e, "ref")) {
461
+ var t = Object.getOwnPropertyDescriptor(e, "ref").get;
462
+ if (t && t.isReactWarning)
463
+ return !1;
464
+ }
465
+ return e.ref !== void 0;
466
+ }
467
+ function mr(e) {
468
+ if (te.call(e, "key")) {
469
+ var t = Object.getOwnPropertyDescriptor(e, "key").get;
470
+ if (t && t.isReactWarning)
471
+ return !1;
472
+ }
473
+ return e.key !== void 0;
474
+ }
475
+ function vr(e, t) {
476
+ if (typeof e.ref == "string" && q.current && t && q.current.stateNode !== t) {
477
+ var a = P(q.current.type);
478
+ ae[a] || (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', P(q.current.type), e.ref), ae[a] = !0);
479
+ }
480
+ }
481
+ function hr(e, t) {
482
+ {
483
+ var a = function() {
484
+ $e || ($e = !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)", t));
485
+ };
486
+ a.isReactWarning = !0, Object.defineProperty(e, "key", {
487
+ get: a,
488
+ configurable: !0
489
+ });
490
+ }
491
+ }
492
+ function yr(e, t) {
493
+ {
494
+ var a = function() {
495
+ Fe || (Fe = !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)", t));
496
+ };
497
+ a.isReactWarning = !0, Object.defineProperty(e, "ref", {
498
+ get: a,
499
+ configurable: !0
500
+ });
501
+ }
502
+ }
503
+ var wr = function(e, t, a, s, h, y, m) {
504
+ var g = {
505
+ // This tag allows us to uniquely identify this as a React Element
506
+ $$typeof: c,
507
+ // Built-in properties that belong on the element
508
+ type: e,
509
+ key: t,
510
+ ref: a,
511
+ props: m,
512
+ // Record the component responsible for creating this element.
513
+ _owner: y
514
+ };
515
+ return g._store = {}, Object.defineProperty(g._store, "validated", {
516
+ configurable: !1,
517
+ enumerable: !1,
518
+ writable: !0,
519
+ value: !1
520
+ }), Object.defineProperty(g, "_self", {
521
+ configurable: !1,
522
+ enumerable: !1,
523
+ writable: !1,
524
+ value: s
525
+ }), Object.defineProperty(g, "_source", {
526
+ configurable: !1,
527
+ enumerable: !1,
528
+ writable: !1,
529
+ value: h
530
+ }), Object.freeze && (Object.freeze(g.props), Object.freeze(g)), g;
531
+ };
532
+ function Er(e, t, a, s, h) {
533
+ {
534
+ var y, m = {}, g = null, T = null;
535
+ a !== void 0 && (g = "" + a), mr(t) && (g = "" + t.key), br(t) && (T = t.ref, vr(t, h));
536
+ for (y in t)
537
+ te.call(t, y) && !gr.hasOwnProperty(y) && (m[y] = t[y]);
538
+ if (e && e.defaultProps) {
539
+ var w = e.defaultProps;
540
+ for (y in w)
541
+ m[y] === void 0 && (m[y] = w[y]);
542
+ }
543
+ if (g || T) {
544
+ var k = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
545
+ g && hr(m, k), T && yr(m, k);
546
+ }
547
+ return wr(e, g, T, h, s, q.current, m);
548
+ }
549
+ }
550
+ var ne = I.ReactCurrentOwner, De = I.ReactDebugCurrentFrame;
551
+ function z(e) {
552
+ if (e) {
553
+ var t = e._owner, a = G(e.type, e._source, t ? t.type : null);
554
+ De.setExtraStackFrame(a);
555
+ } else
556
+ De.setExtraStackFrame(null);
557
+ }
558
+ var oe;
559
+ oe = !1;
560
+ function ie(e) {
561
+ return typeof e == "object" && e !== null && e.$$typeof === c;
562
+ }
563
+ function Be() {
564
+ {
565
+ if (ne.current) {
566
+ var e = P(ne.current.type);
567
+ if (e)
568
+ return `
569
+
570
+ Check the render method of \`` + e + "`.";
571
+ }
572
+ return "";
573
+ }
574
+ }
575
+ function _r(e) {
576
+ {
577
+ if (e !== void 0) {
578
+ var t = e.fileName.replace(/^.*[\\\/]/, ""), a = e.lineNumber;
579
+ return `
580
+
581
+ Check your code at ` + t + ":" + a + ".";
582
+ }
583
+ return "";
584
+ }
585
+ }
586
+ var Ne = {};
587
+ function kr(e) {
588
+ {
589
+ var t = Be();
590
+ if (!t) {
591
+ var a = typeof e == "string" ? e : e.displayName || e.name;
592
+ a && (t = `
593
+
594
+ Check the top-level render call using <` + a + ">.");
595
+ }
596
+ return t;
597
+ }
598
+ }
599
+ function Me(e, t) {
600
+ {
601
+ if (!e._store || e._store.validated || e.key != null)
602
+ return;
603
+ e._store.validated = !0;
604
+ var a = kr(t);
605
+ if (Ne[a])
606
+ return;
607
+ Ne[a] = !0;
608
+ var s = "";
609
+ e && e._owner && e._owner !== ne.current && (s = " It was passed a child from " + P(e._owner.type) + "."), z(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.', a, s), z(null);
610
+ }
611
+ }
612
+ function Ie(e, t) {
613
+ {
614
+ if (typeof e != "object")
615
+ return;
616
+ if (Array.isArray(e))
617
+ for (var a = 0; a < e.length; a++) {
618
+ var s = e[a];
619
+ ie(s) && Me(s, t);
620
+ }
621
+ else if (ie(e))
622
+ e._store && (e._store.validated = !0);
623
+ else if (e) {
624
+ var h = or(e);
625
+ if (typeof h == "function" && h !== e.entries)
626
+ for (var y = h.call(e), m; !(m = y.next()).done; )
627
+ ie(m.value) && Me(m.value, t);
628
+ }
629
+ }
630
+ }
631
+ function Rr(e) {
632
+ {
633
+ var t = e.type;
634
+ if (t == null || typeof t == "string")
635
+ return;
636
+ var a;
637
+ if (typeof t == "function")
638
+ a = t.propTypes;
639
+ else if (typeof t == "object" && (t.$$typeof === p || // Note: Memo only checks outer props here.
640
+ // Inner props are checked in the reconciler.
641
+ t.$$typeof === E))
642
+ a = t.propTypes;
643
+ else
644
+ return;
645
+ if (a) {
646
+ var s = P(t);
647
+ xr(a, e.props, "prop", s, e);
648
+ } else if (t.PropTypes !== void 0 && !oe) {
649
+ oe = !0;
650
+ var h = P(t);
651
+ C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", h || "Unknown");
652
+ }
653
+ typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
654
+ }
655
+ }
656
+ function Tr(e) {
657
+ {
658
+ for (var t = Object.keys(e.props), a = 0; a < t.length; a++) {
659
+ var s = t[a];
660
+ if (s !== "children" && s !== "key") {
661
+ z(e), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), z(null);
662
+ break;
663
+ }
664
+ }
665
+ e.ref !== null && (z(e), C("Invalid attribute `ref` supplied to `React.Fragment`."), z(null));
666
+ }
667
+ }
668
+ function ze(e, t, a, s, h, y) {
669
+ {
670
+ var m = sr(e);
671
+ if (!m) {
672
+ var g = "";
673
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (g += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
674
+ var T = _r(h);
675
+ T ? g += T : g += Be();
676
+ var w;
677
+ e === null ? w = "null" : Array.isArray(e) ? w = "array" : e !== void 0 && e.$$typeof === c ? (w = "<" + (P(e.type) || "Unknown") + " />", g = " Did you accidentally export a JSX literal instead of a component?") : w = 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", w, g);
678
+ }
679
+ var k = Er(e, t, a, h, y);
680
+ if (k == null)
681
+ return k;
682
+ if (m) {
683
+ var S = t.children;
684
+ if (S !== void 0)
685
+ if (s)
686
+ if (Array.isArray(S)) {
687
+ for (var W = 0; W < S.length; W++)
688
+ Ie(S[W], e);
689
+ Object.freeze && Object.freeze(S);
690
+ } else
691
+ 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.");
692
+ else
693
+ Ie(S, e);
694
+ }
695
+ return e === r.Fragment ? Tr(k) : Rr(k), k;
696
+ }
697
+ }
698
+ function Cr(e, t, a) {
699
+ return ze(e, t, a, !0);
700
+ }
701
+ function Or(e, t, a) {
702
+ return ze(e, t, a, !1);
703
+ }
704
+ var Ar = Or, Pr = Cr;
705
+ r.jsx = Ar, r.jsxs = Pr;
706
+ }();
707
+ }(se)), se;
185
708
  }
186
- const jsx = jsxRuntime.exports.jsx;
187
- const jsxs = jsxRuntime.exports.jsxs;
188
- const Spinner = ({
189
- size,
190
- color,
191
- thickness
192
- }) => {
193
- return /* @__PURE__ */ jsx(SpinnerContainer, {
194
- size,
195
- children: /* @__PURE__ */ jsx(SpinnerComponent, {
196
- viewBox: "25 25 50 50",
197
- children: /* @__PURE__ */ jsx(Circle, {
198
- className: "path",
199
- cx: "50",
200
- cy: "50",
201
- r: "20",
202
- fill: "none",
203
- stroke: color || "currentColor",
204
- opacity: "0.5",
205
- strokeWidth: thickness || 5,
206
- strokeMiterlimit: "10"
207
- })
709
+ process.env.NODE_ENV === "production" ? ce.exports = Wr() : ce.exports = Lr();
710
+ var de = ce.exports;
711
+ const v = de.jsx, j = de.jsxs, U = de.Fragment, Yr = ({
712
+ size: r,
713
+ color: o,
714
+ thickness: n
715
+ }) => /* @__PURE__ */ v(Mr, {
716
+ size: r,
717
+ children: /* @__PURE__ */ v(Ir, {
718
+ viewBox: "25 25 50 50",
719
+ children: /* @__PURE__ */ v(zr, {
720
+ className: "path",
721
+ cx: "50",
722
+ cy: "50",
723
+ r: "20",
724
+ fill: "none",
725
+ stroke: o || "currentColor",
726
+ opacity: "0.5",
727
+ strokeWidth: n || 5,
728
+ strokeMiterlimit: "10"
208
729
  })
209
- });
210
- };
211
- const pulse = keyframes`
730
+ })
731
+ }), qr = ue`
212
732
  100% {
213
733
  opacity: 0.5;
214
734
  }
215
- `;
216
- const DefaultButtonContainer = styled.button`
735
+ `, Ur = R.button`
217
736
  --button-hover-brightness: 0.88;
218
737
 
219
738
  position: relative;
220
- padding: ${({ isLoading, hasLoadingText }) => isLoading && hasLoadingText ? "0.75em 1.125em 0.75em 2.5em" : "0.75em 1.25em"};
739
+ padding: ${({ isLoading: r, hasLoadingText: o }) => r && o ? "0.75em 1.125em 0.75em 2.5em" : "0.75em 1.25em"};
221
740
  border-radius: 30px;
222
741
  border: 0;
223
742
 
@@ -231,7 +750,7 @@ const DefaultButtonContainer = styled.button`
231
750
  cursor: pointer;
232
751
 
233
752
  .button__text_wrapper {
234
- animation: ${({ isLoading }) => isLoading ? pulse : "none"} 0.75s infinite
753
+ animation: ${({ isLoading: r }) => r ? qr : "none"} 0.75s infinite
235
754
  alternate;
236
755
  }
237
756
 
@@ -278,55 +797,44 @@ const DefaultButtonContainer = styled.button`
278
797
  content: '';
279
798
  display: block;
280
799
 
281
- width: ${({ isLoading, hasLoadingText }) => isLoading && hasLoadingText ? "2em" : "0"};
800
+ width: ${({ isLoading: r, hasLoadingText: o }) => r && o ? "2em" : "0"};
282
801
  }
283
802
 
284
803
  .button__spinner_wrapper {
285
804
  margin: -0.5em 0;
286
- display: ${({ isLoading }) => isLoading ? "block" : "none"};
287
- ${({ hasLoadingText }) => hasLoadingText && css`
805
+ display: ${({ isLoading: r }) => r ? "block" : "none"};
806
+ ${({ hasLoadingText: r }) => r && F`
288
807
  top: calc(50% + 0.5em);
289
808
  transform: translateY(-50%);
290
809
  position: absolute;
291
810
  left: 0.5rem;
292
811
  `}
293
812
  }
294
- `;
295
- const Button = (_a) => {
296
- var _b = _a, {
297
- disabled = false,
298
- isLoading = false,
299
- loadingText = "",
300
- outlined = false,
301
- className = "",
302
- children
303
- } = _b, rest = __objRest(_b, [
304
- "disabled",
305
- "isLoading",
306
- "loadingText",
307
- "outlined",
308
- "className",
309
- "children"
310
- ]);
311
- return /* @__PURE__ */ jsxs(DefaultButtonContainer, __spreadProps(__spreadValues({
312
- disabled: disabled || isLoading,
313
- isLoading,
314
- hasLoadingText: !!loadingText,
315
- className: `${className} ${outlined ? "button__outline" : ""}`,
316
- type: "button"
317
- }, rest), {
318
- children: [/* @__PURE__ */ jsx("div", {
319
- className: "button__spinner_wrapper",
320
- children: /* @__PURE__ */ jsx(Spinner, {
321
- size: "1.5em"
322
- })
323
- }), /* @__PURE__ */ jsx("span", {
324
- className: "button__text_wrapper",
325
- children: isLoading ? loadingText || "" : children
326
- })]
327
- }));
328
- };
329
- const binamikTheme = css`
813
+ `, At = ({
814
+ disabled: r = !1,
815
+ isLoading: o = !1,
816
+ loadingText: n = "",
817
+ outlined: c = !1,
818
+ className: f = "",
819
+ children: d,
820
+ ...x
821
+ }) => /* @__PURE__ */ j(Ur, {
822
+ disabled: r || o,
823
+ isLoading: o,
824
+ hasLoadingText: !!n,
825
+ className: `${f} ${c ? "button__outline" : ""}`,
826
+ type: "button",
827
+ ...x,
828
+ children: [/* @__PURE__ */ v("div", {
829
+ className: "button__spinner_wrapper",
830
+ children: /* @__PURE__ */ v(Yr, {
831
+ size: "1.5em"
832
+ })
833
+ }), /* @__PURE__ */ v("span", {
834
+ className: "button__text_wrapper",
835
+ children: o ? n || "" : d
836
+ })]
837
+ }), Pt = F`
330
838
  :root {
331
839
  --clr-white: #ffffff;
332
840
  --clr-black: #000000;
@@ -426,8 +934,7 @@ const binamikTheme = css`
426
934
 
427
935
  --bp-tablet: 64rem; // 1024px
428
936
  }
429
- `;
430
- const binamikCssReset = css`
937
+ `, jt = F`
431
938
  html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p,
432
939
  blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em,
433
940
  img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u,
@@ -513,8 +1020,7 @@ const binamikCssReset = css`
513
1020
  background-clip: text;
514
1021
  -webkit-background-clip: text;
515
1022
  }
516
- `;
517
- const binamikGlobalStyles = css`
1023
+ `, St = F`
518
1024
  body {
519
1025
  line-height: 1;
520
1026
  color: #444;
@@ -576,29 +1082,7 @@ const binamikGlobalStyles = css`
576
1082
  .primary_color_txt {
577
1083
  color: var(--clr-primary);
578
1084
  }
579
- `;
580
- const UMBRA_COLOR = (shadowStyles = "normal") => {
581
- if (shadowStyles === "light")
582
- return "rgba(0, 0, 0, 0.05)";
583
- if (shadowStyles === "normal")
584
- return "rgba(0, 0, 0, 0.1)";
585
- return "rgba(0, 0, 0, 0.2)";
586
- };
587
- const PENUMBRA_COLOR = (shadowStyles = "normal") => {
588
- if (shadowStyles === "light")
589
- return "rgba(0, 0, 0, 0.03)";
590
- if (shadowStyles === "normal")
591
- return "rgba(0, 0, 0, 0.07)";
592
- return "rgba(0, 0, 0, 0.14)";
593
- };
594
- const AMBIENT_COLOR = (shadowStyles = "normal") => {
595
- if (shadowStyles === "light")
596
- return "rgba(0, 0, 0, 0.02)";
597
- if (shadowStyles === "normal")
598
- return "rgba(0, 0, 0, 0.06)";
599
- return "rgba(0, 0, 0, 0.12)";
600
- };
601
- const UMBRA_MAP = {
1085
+ `, Vr = (r = "normal") => r === "light" ? "rgba(0, 0, 0, 0.05)" : r === "normal" ? "rgba(0, 0, 0, 0.1)" : "rgba(0, 0, 0, 0.2)", Hr = (r = "normal") => r === "light" ? "rgba(0, 0, 0, 0.03)" : r === "normal" ? "rgba(0, 0, 0, 0.07)" : "rgba(0, 0, 0, 0.14)", Gr = (r = "normal") => r === "light" ? "rgba(0, 0, 0, 0.02)" : r === "normal" ? "rgba(0, 0, 0, 0.06)" : "rgba(0, 0, 0, 0.12)", Kr = {
602
1086
  0: "0px 0px 0px 0px",
603
1087
  1: "0px 2px 1px -1px",
604
1088
  2: "0px 3px 1px -2px",
@@ -624,8 +1108,7 @@ const UMBRA_MAP = {
624
1108
  22: "0px 10px 14px -6px",
625
1109
  23: "0px 11px 14px -7px",
626
1110
  24: "0px 11px 15px -7px"
627
- };
628
- const PENUMBRA_MAP = {
1111
+ }, Jr = {
629
1112
  0: "0px 0px 0px 0px",
630
1113
  1: "0px 1px 1px 0px",
631
1114
  2: "0px 2px 2px 0px",
@@ -651,8 +1134,7 @@ const PENUMBRA_MAP = {
651
1134
  22: "0px 22px 35px 3px",
652
1135
  23: "0px 23px 36px 3px",
653
1136
  24: "0px 24px 38px 3px"
654
- };
655
- const AMBIENT_MAP = {
1137
+ }, Xr = {
656
1138
  0: "0px 0px 0px 0px",
657
1139
  1: "0px 1px 3px 0px",
658
1140
  2: "0px 1px 5px 0px",
@@ -678,19 +1160,727 @@ const AMBIENT_MAP = {
678
1160
  22: "0px 8px 42px 7px",
679
1161
  23: "0px 9px 44px 8px",
680
1162
  24: "0px 9px 46px 8px"
681
- };
682
- const depth = (depthValue, strength = "light") => {
683
- return `box-shadow: ${UMBRA_MAP[depthValue]} ${UMBRA_COLOR(strength)},
684
- ${PENUMBRA_MAP[depthValue]} ${PENUMBRA_COLOR(strength)},
685
- ${AMBIENT_MAP[depthValue]} ${AMBIENT_COLOR(strength)};`;
686
- };
687
- const PreventScroll = () => {
688
- return /* @__PURE__ */ jsx(Global, {
689
- styles: css`
1163
+ }, Zr = (r, o = "light") => `box-shadow: ${Kr[r]} ${Vr(o)},
1164
+ ${Jr[r]} ${Hr(o)},
1165
+ ${Xr[r]} ${Gr(o)};`, $t = () => /* @__PURE__ */ v(jr, {
1166
+ styles: F`
690
1167
  body {
691
1168
  overflow: hidden;
692
1169
  }
693
1170
  `
1171
+ }), pe = 480, Qr = (r) => Math.max(r.mobileBreakpoint, pe), et = {
1172
+ shouldForwardProp(r) {
1173
+ return !["columnTemplate", "mobileBreakpoint", "customCss"].includes(r);
1174
+ }
1175
+ }, rt = R(D.div, et)`
1176
+ --radius: 0.625rem;
1177
+ --column-template: ${(r) => r.columnTemplate};
1178
+ --table-padding: 1.875rem;
1179
+
1180
+ --header-row-display: grid;
1181
+ --label-background: rgba(0, 0, 0, 0.045);
1182
+ --highlight-transition: 150ms ease-in-out;
1183
+
1184
+ --row-padding: 0.5rem;
1185
+ --row-margin: 0;
1186
+ --row-border: none;
1187
+ --row-even-background: var(--clr-gray14);
1188
+ --row-odd-background: var(--clr-white);
1189
+ --row-hover-background: var(--clr-gray11);
1190
+
1191
+ --cell-column-template: 1fr;
1192
+ --cell-padding: 0.75rem;
1193
+
1194
+ --row-annex-border: 1px solid var(--clr-gray7);
1195
+ --row-annex-padding: calc(var(--row-padding) + var(--cell-padding));
1196
+ --row-annex-margin: 0 var(--row-annex-padding) var(--row-annex-padding);
1197
+
1198
+ --mobile-decorators-content: none;
1199
+ --mobile-ref-width: 20ch;
1200
+ --mobile-ref-display: none;
1201
+ --mobile-sorting-display: none;
1202
+
1203
+ --table-row-height: 3.75rem;
1204
+
1205
+ width: 100%;
1206
+ color: #2d2d2d;
1207
+ line-height: 1.25;
1208
+ border-collapse: collapse;
1209
+ background-color: var(--clr-white);
1210
+ border: 1px solid var(--clr-gray11);
1211
+ padding: var(--table-padding);
1212
+ border-radius: var(--radius);
1213
+ font-size: 0.875rem;
1214
+ position: relative;
1215
+
1216
+ * {
1217
+ box-sizing: border-box;
1218
+ }
1219
+
1220
+ @media (max-width: ${Qr}px) {
1221
+ --column-template: 1fr;
1222
+
1223
+ --header-row-display: none;
1224
+
1225
+ --row-padding: 0;
1226
+ --row-margin: 1rem 0;
1227
+ --row-border: 1px solid var(--clr-gray7);
1228
+ --row-even-background: var(--clr-gray15);
1229
+ --row-hover-background: var(--clr-gray14);
1230
+
1231
+ --cell-column-template: var(--mobile-ref-width) minmax(0, 1fr);
1232
+ --cell-padding: 1rem;
1233
+
1234
+ --row-annex-padding: var(--cell-padding);
1235
+ --row-annex-margin: var(--row-annex-padding);
1236
+
1237
+ --mobile-decorators-content: '';
1238
+ --mobile-ref-display: block;
1239
+ --mobile-sorting-display: flex;
1240
+ --mobile-cell-display: grid;
1241
+ }
1242
+
1243
+ @media (max-width: 480px) {
1244
+ --table-padding: 1.25rem;
1245
+
1246
+ --cell-padding: 0.9rem 0.8rem;
1247
+ --mobile-ref-width: 15ch;
1248
+ }
1249
+
1250
+ @media (max-width: 360px) {
1251
+ --table-padding: 0.7rem;
1252
+ --cell-padding: 0.8rem 0.65rem;
1253
+ }
1254
+
1255
+ ${(r) => r.customCss}
1256
+ `, tt = R(D.div)`
1257
+ width: auto;
1258
+ position: relative;
1259
+ border: var(--row-annex-border);
1260
+ border-radius: var(--radius);
1261
+ margin: var(--row-annex-margin);
1262
+ padding: var(--row-annex-padding);
1263
+ background-color: rgba(255, 255, 255, 0.6);
1264
+ transition: background-color var(--highlight-transition);
1265
+ `, Xe = F`
1266
+ display: grid;
1267
+ width: 100%;
1268
+ grid-template-columns: var(--column-template);
1269
+ padding: var(--row-padding);
1270
+ border-radius: var(--radius);
1271
+ transition: background-color var(--highlight-transition);
1272
+ min-height: var(--table-row-height);
1273
+ color: var(--clr-gray3);
1274
+ min-height: 0;
1275
+ min-width: 0;
1276
+ `, at = R(D.li)`
1277
+ margin: var(--row-margin);
1278
+ border: var(--row-border);
1279
+ border-radius: var(--radius);
1280
+ padding: 0.01px 0;
1281
+ transition: background-color var(--highlight-transition);
1282
+ background-color: var(--clr-white);
1283
+
1284
+ &:first-of-type {
1285
+ margin-top: 0;
1286
+ }
1287
+ &:last-of-type {
1288
+ margin-bottom: 0;
1289
+ }
1290
+ &:nth-of-type(even) {
1291
+ background-color: var(--row-even-background);
1292
+ }
1293
+ &:nth-of-type(odd) {
1294
+ background-color: var(--row-odd-background);
1295
+ }
1296
+ &:not(.empty_row):hover {
1297
+ background-color: var(--row-hover-background);
1298
+ }
1299
+ `, nt = R(D.div)`
1300
+ ${Xe}
1301
+
1302
+ max-width: 100%;
1303
+ min-width: 0;
1304
+
1305
+ &:last-of-type .TableCellWrapper:last-of-type::before {
1306
+ border-radius: 0 0 var(--radius) var(--radius);
1307
+ }
1308
+ &:last-of-type .TableCellWrapper:last-of-type .TableCellRef {
1309
+ border-radius: 0 0 0 var(--radius);
1310
+ }
1311
+ `, ot = R(D.div)`
1312
+ ${Xe}
1313
+ min-height: 4.375rem;
1314
+ background-color: var(--label-background);
1315
+ font-weight: bold;
1316
+ color: var(--clr-gray3);
1317
+ border-radius: var(--radius);
1318
+ display: var(--header-row-display);
1319
+ `, it = R(D.ul)`
1320
+ width: 100%;
1321
+ list-style: none;
1322
+ margin: 0;
1323
+ padding: 0;
1324
+ `, fe = F`
1325
+ padding: var(--cell-padding);
1326
+ height: 100%;
1327
+ display: flex;
1328
+ align-items: center;
1329
+ margin: 0;
1330
+ `, lt = F`
1331
+ position: relative;
1332
+
1333
+ &::before {
1334
+ content: var(--mobile-decorators-content);
1335
+ position: absolute;
1336
+ inset: 0;
1337
+ pointer-events: none;
1338
+ z-index: 0;
1339
+ background-color: transparent;
1340
+ transition: background-color var(--highlight-transition);
1341
+ }
1342
+
1343
+ &:nth-of-type(even) {
1344
+ &::before {
1345
+ background-color: rgba(0, 0, 0, 0.02);
1346
+ }
1347
+ }
1348
+
1349
+ &:hover {
1350
+ &::before {
1351
+ background-color: rgba(0, 0, 0, 0.06);
1352
+ }
1353
+ }
1354
+
1355
+ &:first-of-type::before {
1356
+ border-radius: var(--radius) var(--radius) 0 0;
1357
+ }
1358
+ `, st = R.div`
1359
+ ${fe}
1360
+
1361
+ width: 100%;
1362
+ `, ct = R.div`
1363
+ ${lt}
1364
+
1365
+ min-width: 0;
1366
+
1367
+ display: var(--mobile-cell-display, flex);
1368
+
1369
+ margin: 0;
1370
+ width: 100%;
1371
+ align-items: center;
1372
+ grid-template-columns: var(--cell-column-template);
1373
+
1374
+ & > * {
1375
+ border-radius: none;
1376
+ }
1377
+
1378
+ &:first-of-type {
1379
+ .TableCellRef {
1380
+ border-radius: var(--radius) 0 0 0;
1381
+ }
1382
+ }
1383
+ `, pt = R.div`
1384
+ ${fe}
1385
+
1386
+ display: var(--mobile-ref-display);
1387
+ background-color: var(--label-background);
1388
+ font-weight: bold;
1389
+ color: var(--clr-gray3);
1390
+ `, ut = F`
1391
+ &.sortable,
1392
+ &.sorted-asc,
1393
+ &.sorted-desc {
1394
+ cursor: pointer;
1395
+ position: relative;
1396
+ padding-left: 3.5ch;
1397
+ }
1398
+
1399
+ &::after,
1400
+ &::before {
1401
+ content: '';
1402
+ display: block;
1403
+ position: absolute;
1404
+ height: 0.8ch;
1405
+ width: 0.8ch;
1406
+ border: 0 solid var(--clr-gray3);
1407
+ transform: rotate(45deg);
1408
+ left: var(--cell-padding);
1409
+ }
1410
+ &::before {
1411
+ border-width: 1.5px 0 0 1.5px;
1412
+ margin-bottom: 1.2ch;
1413
+ }
1414
+ &::after {
1415
+ border-width: 0 1.5px 1.5px 0;
1416
+ margin-top: 0.8ch;
1417
+ }
1418
+ &:not(.sortable) {
1419
+ cursor: default;
1420
+ &::before,
1421
+ &::after {
1422
+ content: none;
1423
+ }
1424
+ }
1425
+ &.sorted-desc {
1426
+ &::before {
1427
+ content: none;
1428
+ }
1429
+ &::after {
1430
+ content: '';
1431
+ margin-top: 0;
1432
+ margin-bottom: 0.65ch;
1433
+ }
1434
+ }
1435
+ &.sorted-asc {
1436
+ &::after {
1437
+ content: none;
1438
+ }
1439
+ &::before {
1440
+ content: '';
1441
+ margin-bottom: 0;
1442
+ margin-top: 0.2ch;
1443
+ }
1444
+ }
1445
+ `, dt = R.div`
1446
+ ${fe}
1447
+ transition: background-color var(--highlight-transition);
1448
+ border-radius: var(--radius);
1449
+
1450
+ &:hover {
1451
+ background-color: var(--clr-gray8);
1452
+ }
1453
+
1454
+ ${ut}
1455
+ `, ft = R(D.button)`
1456
+ display: var(--mobile-sorting-display);
1457
+ align-items: center;
1458
+ color: var(--clr-gray3);
1459
+ margin: 0.5rem;
1460
+ background-color: var(--clr-gray12);
1461
+ border-radius: var(--radius);
1462
+ padding: 0.5rem;
1463
+ margin: -0.5rem 0 1rem auto;
1464
+ cursor: default;
1465
+
1466
+ > svg {
1467
+ margin-right: 0.5rem;
1468
+ font-size: 1.75rem;
1469
+ }
1470
+
1471
+ > p {
1472
+ margin-right: 0.25rem;
1473
+ }
1474
+
1475
+ &.sortable {
1476
+ cursor: pointer;
1477
+ &:hover {
1478
+ background-color: var(--clr-gray8);
1479
+ }
1480
+
1481
+ &::after {
1482
+ content: '';
1483
+ display: inline-block;
1484
+ width: 0.4rem;
1485
+ height: 0.4rem;
1486
+ border: 1px solid var(--clr-gray4);
1487
+ border-width: 0 1px 1px 0;
1488
+ transform: rotate(45deg);
1489
+ margin: 0 0.25rem;
1490
+ transition:
1491
+ transform 300ms,
1492
+ margin 300ms;
1493
+ margin-bottom: 0.25rem;
1494
+ }
1495
+
1496
+ &.open {
1497
+ z-index: 11;
1498
+ &::after {
1499
+ transform: rotate(225deg);
1500
+ margin-top: 0.1rem;
1501
+ margin-bottom: 0;
1502
+ }
1503
+ }
1504
+ }
1505
+ `, xt = R(D.div)`
1506
+ position: absolute;
1507
+ top: 2.5rem;
1508
+ right: 0;
1509
+ background-color: var(--clr-white);
1510
+ color: var(--clr-gray3);
1511
+ margin: var(--table-padding);
1512
+ padding: 0.5rem;
1513
+ border-radius: var(--radius);
1514
+ z-index: 11;
1515
+ display: flex;
1516
+ flex-direction: column;
1517
+ align-items: flex-end;
1518
+ border: 1px solid var(--clr-gray10);
1519
+ overflow: auto;
1520
+ max-height: calc(100vh - 5rem);
1521
+ transform-origin: top right;
1522
+ ${Zr(8)}
1523
+ `, gt = R.button`
1524
+ background-color: var(--clr-white);
1525
+ padding: 0.5rem;
1526
+ border-radius: var(--radius);
1527
+ color: inherit;
1528
+ display: flex;
1529
+ align-items: center;
1530
+ justify-content: space-between;
1531
+ flex-direction: row-reverse;
1532
+ width: 100%;
1533
+
1534
+ > p {
1535
+ margin: 0.17rem 0;
1536
+ margin-right: 0.25rem;
1537
+ margin-left: 1.75rem;
1538
+ &:not(:last-child) {
1539
+ margin-left: 0.5rem;
1540
+ }
1541
+ }
1542
+ &:hover {
1543
+ background-color: var(--clr-gray8);
1544
+ }
1545
+ `, bt = R(D.button)`
1546
+ position: fixed;
1547
+ inset: 0;
1548
+ z-index: 10;
1549
+ width: 100%;
1550
+ height: 100%;
1551
+ background-color: transparent;
1552
+ cursor: default;
1553
+ `, J = `
1554
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1555
+ `, Ze = (r = []) => r.map(
1556
+ ({ width: n }) => (n == null ? void 0 : n.replace(/\s/g, "")) || "1fr"
1557
+ ).join(" "), mt = ({
1558
+ columns: r = [],
1559
+ children: o = [],
1560
+ mobileBreakpoint: n = 900
1561
+ }) => {
1562
+ n < pe && console.warn(
1563
+ `Table: mobileBreakpoint (${n}) is too small. The minimum of ${pe} will be used instead.${J}`
1564
+ ), Ze(r).split(" ").map((i, l) => ({ value: i, idx: l })).filter((i) => !CSS.supports("grid-template-columns", i.value)).forEach((i) => {
1565
+ const l = i.value.replace(/"/g, '\\"');
1566
+ console.warn(
1567
+ `Table: Invalid width value "${l}" on columnsWidths[${i.idx}].${J}`
1568
+ );
694
1569
  });
1570
+ const d = o.map((i, l) => ({ value: i, idx: l })).filter(
1571
+ (i) => {
1572
+ var l, p, u, b;
1573
+ return O.isValidElement(i.value) && (((p = (l = i.value) == null ? void 0 : l.type) == null ? void 0 : p.displayName) === "TableRow" || ((b = (u = i.value) == null ? void 0 : u.type) == null ? void 0 : b.displayName) === "EmptyRow");
1574
+ }
1575
+ );
1576
+ d.forEach((i) => {
1577
+ var p, u, b, E, A;
1578
+ const l = (b = (u = (p = i.value) == null ? void 0 : p.props) == null ? void 0 : u.children) == null ? void 0 : b.filter((M) => M !== void 0).length;
1579
+ O.isValidElement(i.value) && ((A = (E = i.value) == null ? void 0 : E.type) == null ? void 0 : A.displayName) !== "EmptyRow" && l !== r.length && console.warn(
1580
+ `Table: children[${i.idx}] length (${l}) should be equal to labels length (${r.length}).${J}`
1581
+ );
1582
+ }), o.map((i, l) => ({ value: i, idx: l })).filter(
1583
+ (i) => !d.some((l) => l.idx === i.idx)
1584
+ ).forEach((i) => {
1585
+ console.warn(
1586
+ `Table: children[${i.idx}] is not a TableRow. See TableRow component.${J}`
1587
+ );
1588
+ });
1589
+ }, Qe = (r) => r !== "asc" ? "asc" : "desc", vt = ({
1590
+ column: r,
1591
+ onSort: o
1592
+ }) => {
1593
+ const {
1594
+ sortedColumn: n,
1595
+ sortedOrder: c = ""
1596
+ } = Z(), f = N(() => n === r.name ? c : "", [r.name, n, c]), d = X(() => {
1597
+ r.sortable && o(Qe(f));
1598
+ }, [r.sortable, o, f]);
1599
+ return /* @__PURE__ */ v(dt, {
1600
+ className: ["TableHeader", f ? `sorted-${f}` : "", r.sortable ? "sortable" : ""].join(" "),
1601
+ onClick: d,
1602
+ role: r.sortable ? "button" : void 0,
1603
+ children: r.label
1604
+ });
1605
+ };
1606
+ var er = {
1607
+ color: void 0,
1608
+ size: void 0,
1609
+ className: void 0,
1610
+ style: void 0,
1611
+ attr: void 0
1612
+ }, Ue = O.createContext && O.createContext(er), B = globalThis && globalThis.__assign || function() {
1613
+ return B = Object.assign || function(r) {
1614
+ for (var o, n = 1, c = arguments.length; n < c; n++) {
1615
+ o = arguments[n];
1616
+ for (var f in o)
1617
+ Object.prototype.hasOwnProperty.call(o, f) && (r[f] = o[f]);
1618
+ }
1619
+ return r;
1620
+ }, B.apply(this, arguments);
1621
+ }, ht = globalThis && globalThis.__rest || function(r, o) {
1622
+ var n = {};
1623
+ for (var c in r)
1624
+ Object.prototype.hasOwnProperty.call(r, c) && o.indexOf(c) < 0 && (n[c] = r[c]);
1625
+ if (r != null && typeof Object.getOwnPropertySymbols == "function")
1626
+ for (var f = 0, c = Object.getOwnPropertySymbols(r); f < c.length; f++)
1627
+ o.indexOf(c[f]) < 0 && Object.prototype.propertyIsEnumerable.call(r, c[f]) && (n[c[f]] = r[c[f]]);
1628
+ return n;
1629
+ };
1630
+ function rr(r) {
1631
+ return r && r.map(function(o, n) {
1632
+ return O.createElement(o.tag, B({
1633
+ key: n
1634
+ }, o.attr), rr(o.child));
1635
+ });
1636
+ }
1637
+ function xe(r) {
1638
+ return function(o) {
1639
+ return O.createElement(yt, B({
1640
+ attr: B({}, r.attr)
1641
+ }, o), rr(r.child));
1642
+ };
1643
+ }
1644
+ function yt(r) {
1645
+ var o = function(n) {
1646
+ var c = r.attr, f = r.size, d = r.title, x = ht(r, ["attr", "size", "title"]), i = f || n.size || "1em", l;
1647
+ return n.className && (l = n.className), r.className && (l = (l ? l + " " : "") + r.className), O.createElement("svg", B({
1648
+ stroke: "currentColor",
1649
+ fill: "currentColor",
1650
+ strokeWidth: "0"
1651
+ }, n.attr, c, x, {
1652
+ className: l,
1653
+ style: B(B({
1654
+ color: r.color || n.color
1655
+ }, n.style), r.style),
1656
+ height: i,
1657
+ width: i,
1658
+ xmlns: "http://www.w3.org/2000/svg"
1659
+ }), d && O.createElement("title", null, d), r.children);
1660
+ };
1661
+ return Ue !== void 0 ? O.createElement(Ue.Consumer, null, function(n) {
1662
+ return o(n);
1663
+ }) : o(er);
1664
+ }
1665
+ function wt(r) {
1666
+ return xe({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M7 20h2V8h3L8 4 4 8h3zm13-4h-3V4h-2v12h-3l4 4z" } }] })(r);
1667
+ }
1668
+ function Ve(r) {
1669
+ return xe({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "m6 20 4-4H7V4H5v12H2zm5-12h9v2h-9zm0 4h7v2h-7zm0-8h11v2H11zm0 12h5v2h-5z" } }] })(r);
1670
+ }
1671
+ function He(r) {
1672
+ return xe({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M11 9h9v2h-9zm0 4h7v2h-7zm0-8h11v2H11zm0 12h5v2h-5zm-6 3h2V8h3L6 4 2 8h3z" } }] })(r);
1673
+ }
1674
+ const Et = ({
1675
+ onSortingChange: r
1676
+ }) => {
1677
+ const {
1678
+ columns: o = [],
1679
+ sortedOrder: n = "",
1680
+ sortedColumn: c = ""
1681
+ } = Z(), f = N(() => o.filter(({
1682
+ sortable: b
1683
+ }) => b), [o]), d = N(() => {
1684
+ var b;
1685
+ return ((b = o.find(({
1686
+ name: E
1687
+ }) => E === c)) == null ? void 0 : b.label) || "";
1688
+ }, [o, c]), x = N(() => f.length, [f]), [i, l] = Sr(!1), p = X(() => {
1689
+ x && l((b) => !b);
1690
+ }, [x]);
1691
+ Ge(() => {
1692
+ x && l(!1);
1693
+ }, [x]);
1694
+ const u = X((b) => () => {
1695
+ l(!1), r(b)(Qe(c === b.name ? n : ""));
1696
+ }, [r, c, n]);
1697
+ return x || d && n ? /* @__PURE__ */ j(U, {
1698
+ children: [/* @__PURE__ */ j(ft, {
1699
+ className: [x ? "sortable" : "", i ? "open" : ""].join(" "),
1700
+ onClick: p,
1701
+ disabled: !x,
1702
+ type: "button",
1703
+ layout: !0,
1704
+ children: [x && (!d || !n) ? /* @__PURE__ */ j(U, {
1705
+ children: [/* @__PURE__ */ v(wt, {}), /* @__PURE__ */ v("p", {
1706
+ children: "Ordenar"
1707
+ })]
1708
+ }) : null, d && n ? /* @__PURE__ */ j(U, {
1709
+ children: [n === "asc" ? /* @__PURE__ */ v(Ve, {}) : /* @__PURE__ */ v(He, {}), /* @__PURE__ */ v("p", {
1710
+ children: d
1711
+ })]
1712
+ }) : null]
1713
+ }), /* @__PURE__ */ v(Ke, {
1714
+ children: i ? /* @__PURE__ */ j(U, {
1715
+ children: [/* @__PURE__ */ v(bt, {
1716
+ onClick: p,
1717
+ type: "button"
1718
+ }), /* @__PURE__ */ v(xt, {
1719
+ initial: {
1720
+ transform: "scale(0)",
1721
+ opacity: 0
1722
+ },
1723
+ animate: {
1724
+ transform: "scale(1)",
1725
+ opacity: 1
1726
+ },
1727
+ exit: {
1728
+ transform: "scale(0)",
1729
+ opacity: 0
1730
+ },
1731
+ transition: {
1732
+ type: "tween"
1733
+ },
1734
+ children: f.map((b) => /* @__PURE__ */ j(gt, {
1735
+ onClick: u(b),
1736
+ children: [/* @__PURE__ */ v("p", {
1737
+ children: b.label
1738
+ }), b.name === c ? n === "desc" ? /* @__PURE__ */ v(Ve, {
1739
+ size: "1.25rem"
1740
+ }) : /* @__PURE__ */ v(He, {
1741
+ size: "1.25rem"
1742
+ }) : null]
1743
+ }, b.key))
1744
+ })]
1745
+ }) : null
1746
+ })]
1747
+ }) : null;
1748
+ }, _t = (r) => {
1749
+ }, tr = $r({}), Ft = ({
1750
+ columns: r = [],
1751
+ children: o,
1752
+ customCss: n,
1753
+ sorting: c,
1754
+ onSortingChange: f = _t,
1755
+ mobileBreakpoint: d = 900
1756
+ }) => {
1757
+ const x = X((p) => (u) => {
1758
+ p != null && p.sortable && f({
1759
+ column: p.name,
1760
+ order: u
1761
+ });
1762
+ }, [f]);
1763
+ Ge(() => {
1764
+ const p = o.flat().filter(Boolean);
1765
+ mt({
1766
+ columns: r,
1767
+ children: p,
1768
+ mobileBreakpoint: d
1769
+ });
1770
+ }, [o, r, d]);
1771
+ const i = N(() => Ze(r), [r]), l = N(() => r.map((p, u) => ({
1772
+ ...p,
1773
+ index: u,
1774
+ key: `${p.name}-${u}`
1775
+ })), [r]);
1776
+ return /* @__PURE__ */ v(tr.Provider, {
1777
+ value: {
1778
+ columns: l,
1779
+ sortedOrder: c == null ? void 0 : c.order,
1780
+ sortedColumn: c == null ? void 0 : c.column
1781
+ },
1782
+ children: /* @__PURE__ */ j(rt, {
1783
+ columnTemplate: i,
1784
+ customCss: n,
1785
+ mobileBreakpoint: d,
1786
+ layout: !0,
1787
+ children: [/* @__PURE__ */ v(Et, {
1788
+ onSortingChange: x
1789
+ }), /* @__PURE__ */ v(ot, {
1790
+ layout: !0,
1791
+ children: l.map((p) => /* @__PURE__ */ v(vt, {
1792
+ column: p,
1793
+ onSort: x(p)
1794
+ }, p.key))
1795
+ }), /* @__PURE__ */ v(it, {
1796
+ children: o.map((p, u) => /* @__PURE__ */ v(Fr, {
1797
+ children: p
1798
+ }, u))
1799
+ })]
1800
+ })
1801
+ });
1802
+ };
1803
+ function Z() {
1804
+ const r = Dr(tr);
1805
+ if (!r)
1806
+ throw new Error("useTable and TableRow must be used within a Table");
1807
+ return r;
1808
+ }
1809
+ const ar = ({
1810
+ children: r,
1811
+ className: o,
1812
+ annex: n,
1813
+ ...c
1814
+ }) => {
1815
+ const {
1816
+ columns: f = []
1817
+ } = Z(), d = N(() => `table-row-${Math.random().toString(16).slice(2)}`, []);
1818
+ return /* @__PURE__ */ v(U, {
1819
+ children: /* @__PURE__ */ j(at, {
1820
+ layout: !0,
1821
+ className: o,
1822
+ ...c,
1823
+ children: [/* @__PURE__ */ v(nt, {
1824
+ id: d,
1825
+ layoutId: d,
1826
+ className: "TableRow",
1827
+ children: f.map((x) => /* @__PURE__ */ j(ct, {
1828
+ className: `TableCellWrapper column-${x.index}`,
1829
+ children: [/* @__PURE__ */ v(pt, {
1830
+ className: `TableCellRef column-${x.index}`,
1831
+ children: x.label
1832
+ }), /* @__PURE__ */ v(st, {
1833
+ className: `TableCell column-${x.index}`,
1834
+ children: r[x.index] || null
1835
+ })]
1836
+ }, x.key))
1837
+ }), /* @__PURE__ */ v(Ke, {
1838
+ children: n ? /* @__PURE__ */ v(tt, {
1839
+ layoutId: `${d}-annex`,
1840
+ initial: {
1841
+ opacity: 0
1842
+ },
1843
+ animate: {
1844
+ opacity: 1
1845
+ },
1846
+ exit: {
1847
+ opacity: 0,
1848
+ height: 0,
1849
+ padding: 0,
1850
+ margin: 0,
1851
+ overflow: "hidden"
1852
+ },
1853
+ transition: {
1854
+ type: "tween"
1855
+ },
1856
+ "aria-details": d,
1857
+ className: "TableRowAnnex",
1858
+ children: n
1859
+ }, "annex") : null
1860
+ })]
1861
+ })
1862
+ });
1863
+ };
1864
+ ar.displayName = "TableRow";
1865
+ const kt = () => {
1866
+ const {
1867
+ columns: r = []
1868
+ } = Z();
1869
+ return /* @__PURE__ */ v(ar, {
1870
+ className: "empty_row",
1871
+ children: Array(r.length).fill(null)
1872
+ });
1873
+ };
1874
+ kt.displayName = "EmptyRow";
1875
+ export {
1876
+ At as Button,
1877
+ kt as EmptyRow,
1878
+ $t as PreventScroll,
1879
+ Yr as Spinner,
1880
+ Ft as Table,
1881
+ ar as TableRow,
1882
+ jt as binamikCssReset,
1883
+ St as binamikGlobalStyles,
1884
+ Pt as binamikTheme,
1885
+ Zr as depth
695
1886
  };
696
- export { Button, PreventScroll, Spinner, binamikCssReset, binamikGlobalStyles, binamikTheme, depth };