@binamik/components 0.1.2 → 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,39 +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 React, { useMemo, useCallback, useState, useEffect, createContext, Fragment as Fragment$1, useContext } from "react";
35
- import { motion, AnimatePresence } from "framer-motion";
36
- 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`
37
6
  0% {
38
7
  stroke-dasharray: 1, 200;
39
8
  stroke-dashoffset: 0;
@@ -46,25 +15,22 @@ const dashAnimation = keyframes`
46
15
  stroke-dasharray: 89, 200;
47
16
  stroke-dashoffset: -124px;
48
17
  }
49
- `;
50
- const rotate = keyframes`
18
+ `, Nr = ue`
51
19
  100% {
52
20
  transform: rotate(360deg);
53
21
  }
54
- `;
55
- const SpinnerContainer = styled.div`
22
+ `, Mr = R.div`
56
23
  position: relative;
57
24
  margin: 0 auto;
58
- width: ${({ size }) => size || "1.5rem"};
25
+ width: ${({ size: r }) => r || "1.5rem"};
59
26
 
60
27
  &:before {
61
28
  content: '';
62
29
  display: block;
63
30
  padding-top: 100%;
64
31
  }
65
- `;
66
- const SpinnerComponent = styled.svg`
67
- animation: ${rotate} 2s linear infinite;
32
+ `, Ir = R.svg`
33
+ animation: ${Nr} 2s linear infinite;
68
34
  height: 100%;
69
35
  transform-origin: center center;
70
36
  width: 100%;
@@ -74,83 +40,65 @@ const SpinnerComponent = styled.svg`
74
40
  left: 0;
75
41
  right: 0;
76
42
  margin: auto;
77
- `;
78
- const Circle = styled.circle`
43
+ `, zr = R.circle`
79
44
  stroke-dasharray: 1, 200;
80
45
  stroke-dashoffset: 0;
81
- animation: ${dashAnimation} 1.5s ease-in-out infinite;
46
+ animation: ${Br} 1.5s ease-in-out infinite;
82
47
  stroke-linecap: round;
83
48
  `;
84
- var jsxRuntime = { exports: {} };
85
- var reactJsxRuntime_production_min = {};
49
+ var ce = { exports: {} }, L = {};
86
50
  /*
87
51
  object-assign
88
52
  (c) Sindre Sorhus
89
53
  @license MIT
90
54
  */
91
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
92
- var hasOwnProperty = Object.prototype.hasOwnProperty;
93
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
94
- function toObject(val) {
95
- if (val === null || val === void 0) {
96
- throw new TypeError("Object.assign cannot be called with null or undefined");
97
- }
98
- return Object(val);
99
- }
100
- function shouldUseNative() {
101
- try {
102
- if (!Object.assign) {
103
- return false;
104
- }
105
- var test1 = new String("abc");
106
- test1[5] = "de";
107
- if (Object.getOwnPropertyNames(test1)[0] === "5") {
108
- 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);
65
+ }
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;
109
86
  }
110
- var test2 = {};
111
- for (var i = 0; i < 10; i++) {
112
- test2["_" + String.fromCharCode(i)] = i;
113
- }
114
- var order2 = Object.getOwnPropertyNames(test2).map(function(n2) {
115
- return test2[n2];
116
- });
117
- if (order2.join("") !== "0123456789") {
118
- return false;
119
- }
120
- var test3 = {};
121
- "abcdefghijklmnopqrst".split("").forEach(function(letter) {
122
- test3[letter] = letter;
123
- });
124
- if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
125
- return false;
126
- }
127
- return true;
128
- } catch (err) {
129
- return false;
130
87
  }
131
- }
132
- shouldUseNative() ? Object.assign : function(target, source) {
133
- var from;
134
- var to = toObject(target);
135
- var symbols;
136
- for (var s = 1; s < arguments.length; s++) {
137
- from = Object(arguments[s]);
138
- for (var key in from) {
139
- if (hasOwnProperty.call(from, key)) {
140
- to[key] = from[key];
141
- }
142
- }
143
- if (getOwnPropertySymbols) {
144
- symbols = getOwnPropertySymbols(from);
145
- for (var i = 0; i < symbols.length; i++) {
146
- if (propIsEnumerable.call(from, symbols[i])) {
147
- to[symbols[i]] = from[symbols[i]];
148
- }
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]]);
149
97
  }
150
98
  }
151
- }
152
- return to;
153
- };
99
+ return l;
100
+ }, le;
101
+ }
154
102
  /** @license React v17.0.2
155
103
  * react-jsx-runtime.production.min.js
156
104
  *
@@ -159,67 +107,636 @@ shouldUseNative() ? Object.assign : function(target, source) {
159
107
  * This source code is licensed under the MIT license found in the
160
108
  * LICENSE file in the root directory of this source tree.
161
109
  */
162
- var f = React, g = 60103;
163
- reactJsxRuntime_production_min.Fragment = 60107;
164
- if (typeof Symbol === "function" && Symbol.for) {
165
- var h = Symbol.for;
166
- g = h("react.element");
167
- reactJsxRuntime_production_min.Fragment = h("react.fragment");
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;
168
132
  }
169
- 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 };
170
- function q(c, a, k) {
171
- var b, d = {}, e = null, l = null;
172
- k !== void 0 && (e = "" + k);
173
- a.key !== void 0 && (e = "" + a.key);
174
- a.ref !== void 0 && (l = a.ref);
175
- for (b in a)
176
- n.call(a, b) && !p.hasOwnProperty(b) && (d[b] = a[b]);
177
- if (c && c.defaultProps)
178
- for (b in a = c.defaultProps, a)
179
- d[b] === void 0 && (d[b] = a[b]);
180
- return { $$typeof: g, type: c, key: e, ref: l, props: d, _owner: m.current };
181
- }
182
- reactJsxRuntime_production_min.jsx = q;
183
- reactJsxRuntime_production_min.jsxs = q;
184
- {
185
- 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;
186
708
  }
187
- const jsx = jsxRuntime.exports.jsx;
188
- const jsxs = jsxRuntime.exports.jsxs;
189
- const Fragment = jsxRuntime.exports.Fragment;
190
- const Spinner = ({
191
- size,
192
- color,
193
- thickness
194
- }) => {
195
- return /* @__PURE__ */ jsx(SpinnerContainer, {
196
- size,
197
- children: /* @__PURE__ */ jsx(SpinnerComponent, {
198
- viewBox: "25 25 50 50",
199
- children: /* @__PURE__ */ jsx(Circle, {
200
- className: "path",
201
- cx: "50",
202
- cy: "50",
203
- r: "20",
204
- fill: "none",
205
- stroke: color || "currentColor",
206
- opacity: "0.5",
207
- strokeWidth: thickness || 5,
208
- strokeMiterlimit: "10"
209
- })
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"
210
729
  })
211
- });
212
- };
213
- const pulse = keyframes`
730
+ })
731
+ }), qr = ue`
214
732
  100% {
215
733
  opacity: 0.5;
216
734
  }
217
- `;
218
- const DefaultButtonContainer = styled.button`
735
+ `, Ur = R.button`
219
736
  --button-hover-brightness: 0.88;
220
737
 
221
738
  position: relative;
222
- 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"};
223
740
  border-radius: 30px;
224
741
  border: 0;
225
742
 
@@ -233,7 +750,7 @@ const DefaultButtonContainer = styled.button`
233
750
  cursor: pointer;
234
751
 
235
752
  .button__text_wrapper {
236
- animation: ${({ isLoading }) => isLoading ? pulse : "none"} 0.75s infinite
753
+ animation: ${({ isLoading: r }) => r ? qr : "none"} 0.75s infinite
237
754
  alternate;
238
755
  }
239
756
 
@@ -280,55 +797,44 @@ const DefaultButtonContainer = styled.button`
280
797
  content: '';
281
798
  display: block;
282
799
 
283
- width: ${({ isLoading, hasLoadingText }) => isLoading && hasLoadingText ? "2em" : "0"};
800
+ width: ${({ isLoading: r, hasLoadingText: o }) => r && o ? "2em" : "0"};
284
801
  }
285
802
 
286
803
  .button__spinner_wrapper {
287
804
  margin: -0.5em 0;
288
- display: ${({ isLoading }) => isLoading ? "block" : "none"};
289
- ${({ hasLoadingText }) => hasLoadingText && css`
805
+ display: ${({ isLoading: r }) => r ? "block" : "none"};
806
+ ${({ hasLoadingText: r }) => r && F`
290
807
  top: calc(50% + 0.5em);
291
808
  transform: translateY(-50%);
292
809
  position: absolute;
293
810
  left: 0.5rem;
294
811
  `}
295
812
  }
296
- `;
297
- const Button = (_a) => {
298
- var _b = _a, {
299
- disabled = false,
300
- isLoading = false,
301
- loadingText = "",
302
- outlined = false,
303
- className = "",
304
- children
305
- } = _b, rest = __objRest(_b, [
306
- "disabled",
307
- "isLoading",
308
- "loadingText",
309
- "outlined",
310
- "className",
311
- "children"
312
- ]);
313
- return /* @__PURE__ */ jsxs(DefaultButtonContainer, __spreadProps(__spreadValues({
314
- disabled: disabled || isLoading,
315
- isLoading,
316
- hasLoadingText: !!loadingText,
317
- className: `${className} ${outlined ? "button__outline" : ""}`,
318
- type: "button"
319
- }, rest), {
320
- children: [/* @__PURE__ */ jsx("div", {
321
- className: "button__spinner_wrapper",
322
- children: /* @__PURE__ */ jsx(Spinner, {
323
- size: "1.5em"
324
- })
325
- }), /* @__PURE__ */ jsx("span", {
326
- className: "button__text_wrapper",
327
- children: isLoading ? loadingText || "" : children
328
- })]
329
- }));
330
- };
331
- 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`
332
838
  :root {
333
839
  --clr-white: #ffffff;
334
840
  --clr-black: #000000;
@@ -428,8 +934,7 @@ const binamikTheme = css`
428
934
 
429
935
  --bp-tablet: 64rem; // 1024px
430
936
  }
431
- `;
432
- const binamikCssReset = css`
937
+ `, jt = F`
433
938
  html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p,
434
939
  blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em,
435
940
  img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u,
@@ -515,8 +1020,7 @@ const binamikCssReset = css`
515
1020
  background-clip: text;
516
1021
  -webkit-background-clip: text;
517
1022
  }
518
- `;
519
- const binamikGlobalStyles = css`
1023
+ `, St = F`
520
1024
  body {
521
1025
  line-height: 1;
522
1026
  color: #444;
@@ -578,29 +1082,7 @@ const binamikGlobalStyles = css`
578
1082
  .primary_color_txt {
579
1083
  color: var(--clr-primary);
580
1084
  }
581
- `;
582
- const UMBRA_COLOR = (shadowStyles = "normal") => {
583
- if (shadowStyles === "light")
584
- return "rgba(0, 0, 0, 0.05)";
585
- if (shadowStyles === "normal")
586
- return "rgba(0, 0, 0, 0.1)";
587
- return "rgba(0, 0, 0, 0.2)";
588
- };
589
- const PENUMBRA_COLOR = (shadowStyles = "normal") => {
590
- if (shadowStyles === "light")
591
- return "rgba(0, 0, 0, 0.03)";
592
- if (shadowStyles === "normal")
593
- return "rgba(0, 0, 0, 0.07)";
594
- return "rgba(0, 0, 0, 0.14)";
595
- };
596
- const AMBIENT_COLOR = (shadowStyles = "normal") => {
597
- if (shadowStyles === "light")
598
- return "rgba(0, 0, 0, 0.02)";
599
- if (shadowStyles === "normal")
600
- return "rgba(0, 0, 0, 0.06)";
601
- return "rgba(0, 0, 0, 0.12)";
602
- };
603
- 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 = {
604
1086
  0: "0px 0px 0px 0px",
605
1087
  1: "0px 2px 1px -1px",
606
1088
  2: "0px 3px 1px -2px",
@@ -626,8 +1108,7 @@ const UMBRA_MAP = {
626
1108
  22: "0px 10px 14px -6px",
627
1109
  23: "0px 11px 14px -7px",
628
1110
  24: "0px 11px 15px -7px"
629
- };
630
- const PENUMBRA_MAP = {
1111
+ }, Jr = {
631
1112
  0: "0px 0px 0px 0px",
632
1113
  1: "0px 1px 1px 0px",
633
1114
  2: "0px 2px 2px 0px",
@@ -653,8 +1134,7 @@ const PENUMBRA_MAP = {
653
1134
  22: "0px 22px 35px 3px",
654
1135
  23: "0px 23px 36px 3px",
655
1136
  24: "0px 24px 38px 3px"
656
- };
657
- const AMBIENT_MAP = {
1137
+ }, Xr = {
658
1138
  0: "0px 0px 0px 0px",
659
1139
  1: "0px 1px 3px 0px",
660
1140
  2: "0px 1px 5px 0px",
@@ -680,31 +1160,21 @@ const AMBIENT_MAP = {
680
1160
  22: "0px 8px 42px 7px",
681
1161
  23: "0px 9px 44px 8px",
682
1162
  24: "0px 9px 46px 8px"
683
- };
684
- const depth = (depthValue, strength = "light") => {
685
- return `box-shadow: ${UMBRA_MAP[depthValue]} ${UMBRA_COLOR(strength)},
686
- ${PENUMBRA_MAP[depthValue]} ${PENUMBRA_COLOR(strength)},
687
- ${AMBIENT_MAP[depthValue]} ${AMBIENT_COLOR(strength)};`;
688
- };
689
- const PreventScroll = () => {
690
- return /* @__PURE__ */ jsx(Global, {
691
- 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`
692
1167
  body {
693
1168
  overflow: hidden;
694
1169
  }
695
1170
  `
696
- });
697
- };
698
- const MIN_TABLE_MOBILE_BREAKPOINT = 480;
699
- const parseBreakpointProp = (props) => Math.max(props.mobileBreakpoint, MIN_TABLE_MOBILE_BREAKPOINT);
700
- const filterProps = {
701
- shouldForwardProp(prop) {
702
- return !["columnTemplate", "mobileBreakpoint", "customCss"].includes(prop);
1171
+ }), pe = 480, Qr = (r) => Math.max(r.mobileBreakpoint, pe), et = {
1172
+ shouldForwardProp(r) {
1173
+ return !["columnTemplate", "mobileBreakpoint", "customCss"].includes(r);
703
1174
  }
704
- };
705
- const TableWrapper = styled(motion.div, filterProps)`
1175
+ }, rt = R(D.div, et)`
706
1176
  --radius: 0.625rem;
707
- --column-template: ${(props) => props.columnTemplate};
1177
+ --column-template: ${(r) => r.columnTemplate};
708
1178
  --table-padding: 1.875rem;
709
1179
 
710
1180
  --header-row-display: grid;
@@ -747,7 +1217,7 @@ const TableWrapper = styled(motion.div, filterProps)`
747
1217
  box-sizing: border-box;
748
1218
  }
749
1219
 
750
- @media (max-width: ${parseBreakpointProp}px) {
1220
+ @media (max-width: ${Qr}px) {
751
1221
  --column-template: 1fr;
752
1222
 
753
1223
  --header-row-display: none;
@@ -782,9 +1252,8 @@ const TableWrapper = styled(motion.div, filterProps)`
782
1252
  --cell-padding: 0.8rem 0.65rem;
783
1253
  }
784
1254
 
785
- ${(props) => props.customCss}
786
- `;
787
- const TableRowAnnexWrapper = styled(motion.div)`
1255
+ ${(r) => r.customCss}
1256
+ `, tt = R(D.div)`
788
1257
  width: auto;
789
1258
  position: relative;
790
1259
  border: var(--row-annex-border);
@@ -793,8 +1262,7 @@ const TableRowAnnexWrapper = styled(motion.div)`
793
1262
  padding: var(--row-annex-padding);
794
1263
  background-color: rgba(255, 255, 255, 0.6);
795
1264
  transition: background-color var(--highlight-transition);
796
- `;
797
- const tableRowStyle = css`
1265
+ `, Xe = F`
798
1266
  display: grid;
799
1267
  width: 100%;
800
1268
  grid-template-columns: var(--column-template);
@@ -805,8 +1273,7 @@ const tableRowStyle = css`
805
1273
  color: var(--clr-gray3);
806
1274
  min-height: 0;
807
1275
  min-width: 0;
808
- `;
809
- const TableRowContainer = styled(motion.li)`
1276
+ `, at = R(D.li)`
810
1277
  margin: var(--row-margin);
811
1278
  border: var(--row-border);
812
1279
  border-radius: var(--radius);
@@ -829,9 +1296,8 @@ const TableRowContainer = styled(motion.li)`
829
1296
  &:not(.empty_row):hover {
830
1297
  background-color: var(--row-hover-background);
831
1298
  }
832
- `;
833
- const TableRowWrapper = styled(motion.div)`
834
- ${tableRowStyle}
1299
+ `, nt = R(D.div)`
1300
+ ${Xe}
835
1301
 
836
1302
  max-width: 100%;
837
1303
  min-width: 0;
@@ -842,30 +1308,26 @@ const TableRowWrapper = styled(motion.div)`
842
1308
  &:last-of-type .TableCellWrapper:last-of-type .TableCellRef {
843
1309
  border-radius: 0 0 0 var(--radius);
844
1310
  }
845
- `;
846
- const TableHeaderRow = styled(motion.div)`
847
- ${tableRowStyle}
1311
+ `, ot = R(D.div)`
1312
+ ${Xe}
848
1313
  min-height: 4.375rem;
849
1314
  background-color: var(--label-background);
850
1315
  font-weight: bold;
851
1316
  color: var(--clr-gray3);
852
1317
  border-radius: var(--radius);
853
1318
  display: var(--header-row-display);
854
- `;
855
- const TableBody = styled(motion.ul)`
1319
+ `, it = R(D.ul)`
856
1320
  width: 100%;
857
1321
  list-style: none;
858
1322
  margin: 0;
859
1323
  padding: 0;
860
- `;
861
- const tableCellStyle = css`
1324
+ `, fe = F`
862
1325
  padding: var(--cell-padding);
863
1326
  height: 100%;
864
1327
  display: flex;
865
1328
  align-items: center;
866
1329
  margin: 0;
867
- `;
868
- const nonHeaderCellStyle = css`
1330
+ `, lt = F`
869
1331
  position: relative;
870
1332
 
871
1333
  &::before {
@@ -893,14 +1355,12 @@ const nonHeaderCellStyle = css`
893
1355
  &:first-of-type::before {
894
1356
  border-radius: var(--radius) var(--radius) 0 0;
895
1357
  }
896
- `;
897
- const TableCell = styled.div`
898
- ${tableCellStyle}
1358
+ `, st = R.div`
1359
+ ${fe}
899
1360
 
900
1361
  width: 100%;
901
- `;
902
- const TableCellWrapper = styled.div`
903
- ${nonHeaderCellStyle}
1362
+ `, ct = R.div`
1363
+ ${lt}
904
1364
 
905
1365
  min-width: 0;
906
1366
 
@@ -920,16 +1380,14 @@ const TableCellWrapper = styled.div`
920
1380
  border-radius: var(--radius) 0 0 0;
921
1381
  }
922
1382
  }
923
- `;
924
- const TableCellRef = styled.div`
925
- ${tableCellStyle}
1383
+ `, pt = R.div`
1384
+ ${fe}
926
1385
 
927
1386
  display: var(--mobile-ref-display);
928
1387
  background-color: var(--label-background);
929
1388
  font-weight: bold;
930
1389
  color: var(--clr-gray3);
931
- `;
932
- const sortableStyles = css`
1390
+ `, ut = F`
933
1391
  &.sortable,
934
1392
  &.sorted-asc,
935
1393
  &.sorted-desc {
@@ -984,9 +1442,8 @@ const sortableStyles = css`
984
1442
  margin-top: 0.2ch;
985
1443
  }
986
1444
  }
987
- `;
988
- const TableHeaderWrapper = styled.div`
989
- ${tableCellStyle}
1445
+ `, dt = R.div`
1446
+ ${fe}
990
1447
  transition: background-color var(--highlight-transition);
991
1448
  border-radius: var(--radius);
992
1449
 
@@ -994,9 +1451,8 @@ const TableHeaderWrapper = styled.div`
994
1451
  background-color: var(--clr-gray8);
995
1452
  }
996
1453
 
997
- ${sortableStyles}
998
- `;
999
- const MobileSortButton = styled(motion.button)`
1454
+ ${ut}
1455
+ `, ft = R(D.button)`
1000
1456
  display: var(--mobile-sorting-display);
1001
1457
  align-items: center;
1002
1458
  color: var(--clr-gray3);
@@ -1031,7 +1487,9 @@ const MobileSortButton = styled(motion.button)`
1031
1487
  border-width: 0 1px 1px 0;
1032
1488
  transform: rotate(45deg);
1033
1489
  margin: 0 0.25rem;
1034
- transition: transform 300ms, margin 300ms;
1490
+ transition:
1491
+ transform 300ms,
1492
+ margin 300ms;
1035
1493
  margin-bottom: 0.25rem;
1036
1494
  }
1037
1495
 
@@ -1044,8 +1502,7 @@ const MobileSortButton = styled(motion.button)`
1044
1502
  }
1045
1503
  }
1046
1504
  }
1047
- `;
1048
- const MobileSortTooltip = styled(motion.div)`
1505
+ `, xt = R(D.div)`
1049
1506
  position: absolute;
1050
1507
  top: 2.5rem;
1051
1508
  right: 0;
@@ -1062,9 +1519,8 @@ const MobileSortTooltip = styled(motion.div)`
1062
1519
  overflow: auto;
1063
1520
  max-height: calc(100vh - 5rem);
1064
1521
  transform-origin: top right;
1065
- ${depth(8)}
1066
- `;
1067
- const MobileSortTooltipOption = styled.button`
1522
+ ${Zr(8)}
1523
+ `, gt = R.button`
1068
1524
  background-color: var(--clr-white);
1069
1525
  padding: 0.5rem;
1070
1526
  border-radius: var(--radius);
@@ -1086,8 +1542,7 @@ const MobileSortTooltipOption = styled.button`
1086
1542
  &:hover {
1087
1543
  background-color: var(--clr-gray8);
1088
1544
  }
1089
- `;
1090
- const MobileSortTooltipBackdrop = styled(motion.button)`
1545
+ `, bt = R(D.button)`
1091
1546
  position: fixed;
1092
1547
  inset: 0;
1093
1548
  z-index: 10;
@@ -1095,203 +1550,172 @@ const MobileSortTooltipBackdrop = styled(motion.button)`
1095
1550
  height: 100%;
1096
1551
  background-color: transparent;
1097
1552
  cursor: default;
1098
- `;
1099
- const LOOK_AT_ME = "\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n";
1100
- const buildColumnTemplate = (columns = []) => {
1101
- const safeColumnsWidths = columns.map(({ width }) => (width == null ? void 0 : width.replace(/\s/g, "")) || "1fr");
1102
- return safeColumnsWidths.join(" ");
1103
- };
1104
- const validateProps = ({
1105
- columns = [],
1106
- children = [],
1107
- mobileBreakpoint = 900
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
1108
1561
  }) => {
1109
- if (mobileBreakpoint < MIN_TABLE_MOBILE_BREAKPOINT) {
1110
- console.warn(`Table: mobileBreakpoint (${mobileBreakpoint}) is too small. The minimum of ${MIN_TABLE_MOBILE_BREAKPOINT} will be used instead.${LOOK_AT_ME}`);
1111
- }
1112
- const columnTemplate = buildColumnTemplate(columns);
1113
- const splitTemplate = columnTemplate.split(" ");
1114
- splitTemplate.map((value, idx) => ({ value, idx })).filter((width) => !CSS.supports("grid-template-columns", width.value)).forEach((width) => {
1115
- const parsedWidth = width.value.replace(/"/g, '\\"');
1116
- console.warn(`Table: Invalid width value "${parsedWidth}" on columnsWidths[${width.idx}].${LOOK_AT_ME}`);
1117
- });
1118
- const tableRowChildren = children.map((value, idx) => ({ value, idx })).filter((child) => {
1119
- var _a, _b, _c, _d;
1120
- return React.isValidElement(child.value) && (((_b = (_a = child.value) == null ? void 0 : _a.type) == null ? void 0 : _b.displayName) === "TableRow" || ((_d = (_c = child.value) == null ? void 0 : _c.type) == null ? void 0 : _d.displayName) === "EmptyRow");
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
+ );
1121
1569
  });
1122
- tableRowChildren.forEach((child) => {
1123
- var _a, _b, _c, _d, _e;
1124
- const childChildrenLength = (_c = (_b = (_a = child.value) == null ? void 0 : _a.props) == null ? void 0 : _b.children) == null ? void 0 : _c.filter((childChild) => childChild !== void 0).length;
1125
- if (React.isValidElement(child.value) && ((_e = (_d = child.value) == null ? void 0 : _d.type) == null ? void 0 : _e.displayName) !== "EmptyRow" && childChildrenLength !== columns.length) {
1126
- console.warn(`Table: children[${child.idx}] length (${childChildrenLength}) should be equal to labels length (${columns.length}).${LOOK_AT_ME}`);
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");
1127
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
+ );
1128
1588
  });
1129
- const nonTableRowChildren = children.map((value, idx) => ({ value, idx })).filter((child) => !tableRowChildren.some((tableRowChild) => tableRowChild.idx === child.idx));
1130
- nonTableRowChildren.forEach((child) => {
1131
- console.warn(`Table: children[${child.idx}] is not a TableRow. See TableRow component.${LOOK_AT_ME}`);
1132
- });
1133
- };
1134
- const changeSortOrder = (sortOrder) => sortOrder !== "asc" ? "asc" : "desc";
1135
- const TableHeader = ({
1136
- column,
1137
- onSort
1589
+ }, Qe = (r) => r !== "asc" ? "asc" : "desc", vt = ({
1590
+ column: r,
1591
+ onSort: o
1138
1592
  }) => {
1139
1593
  const {
1140
- sortedColumn,
1141
- sortedOrder = ""
1142
- } = useTable();
1143
- const sortOrder = useMemo(() => sortedColumn === column.name ? sortedOrder : "", [column.name, sortedColumn, sortedOrder]);
1144
- const handleSortClick = useCallback(() => {
1145
- if (!column.sortable)
1146
- return;
1147
- onSort(changeSortOrder(sortOrder));
1148
- }, [column.sortable, onSort, sortOrder]);
1149
- return /* @__PURE__ */ jsx(TableHeaderWrapper, {
1150
- className: ["TableHeader", sortOrder ? `sorted-${sortOrder}` : "", column.sortable ? "sortable" : ""].join(" "),
1151
- onClick: handleSortClick,
1152
- role: column.sortable ? "button" : void 0,
1153
- children: column.label
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
1154
1604
  });
1155
1605
  };
1156
- var DefaultContext = {
1606
+ var er = {
1157
1607
  color: void 0,
1158
1608
  size: void 0,
1159
1609
  className: void 0,
1160
1610
  style: void 0,
1161
1611
  attr: void 0
1162
- };
1163
- var IconContext = React.createContext && React.createContext(DefaultContext);
1164
- var __assign = globalThis && globalThis.__assign || function() {
1165
- __assign = Object.assign || function(t) {
1166
- for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
1167
- s = arguments[i];
1168
- for (var p2 in s)
1169
- if (Object.prototype.hasOwnProperty.call(s, p2))
1170
- t[p2] = s[p2];
1171
- }
1172
- return t;
1173
- };
1174
- return __assign.apply(this, arguments);
1175
- };
1176
- var __rest = globalThis && globalThis.__rest || function(s, e) {
1177
- var t = {};
1178
- for (var p2 in s)
1179
- if (Object.prototype.hasOwnProperty.call(s, p2) && e.indexOf(p2) < 0)
1180
- t[p2] = s[p2];
1181
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1182
- for (var i = 0, p2 = Object.getOwnPropertySymbols(s); i < p2.length; i++) {
1183
- if (e.indexOf(p2[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p2[i]))
1184
- t[p2[i]] = s[p2[i]];
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]);
1185
1618
  }
1186
- return t;
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;
1187
1629
  };
1188
- function Tree2Element(tree) {
1189
- return tree && tree.map(function(node, i) {
1190
- return React.createElement(node.tag, __assign({
1191
- key: i
1192
- }, node.attr), Tree2Element(node.child));
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));
1193
1635
  });
1194
1636
  }
1195
- function GenIcon(data) {
1196
- return function(props) {
1197
- return React.createElement(IconBase, __assign({
1198
- attr: __assign({}, data.attr)
1199
- }, props), Tree2Element(data.child));
1637
+ function xe(r) {
1638
+ return function(o) {
1639
+ return O.createElement(yt, B({
1640
+ attr: B({}, r.attr)
1641
+ }, o), rr(r.child));
1200
1642
  };
1201
1643
  }
1202
- function IconBase(props) {
1203
- var elem = function(conf) {
1204
- var attr = props.attr, size = props.size, title = props.title, svgProps = __rest(props, ["attr", "size", "title"]);
1205
- var computedSize = size || conf.size || "1em";
1206
- var className;
1207
- if (conf.className)
1208
- className = conf.className;
1209
- if (props.className)
1210
- className = (className ? className + " " : "") + props.className;
1211
- return React.createElement("svg", __assign({
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({
1212
1648
  stroke: "currentColor",
1213
1649
  fill: "currentColor",
1214
1650
  strokeWidth: "0"
1215
- }, conf.attr, attr, svgProps, {
1216
- className,
1217
- style: __assign(__assign({
1218
- color: props.color || conf.color
1219
- }, conf.style), props.style),
1220
- height: computedSize,
1221
- width: computedSize,
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,
1222
1658
  xmlns: "http://www.w3.org/2000/svg"
1223
- }), title && React.createElement("title", null, title), props.children);
1659
+ }), d && O.createElement("title", null, d), r.children);
1224
1660
  };
1225
- return IconContext !== void 0 ? React.createElement(IconContext.Consumer, null, function(conf) {
1226
- return elem(conf);
1227
- }) : elem(DefaultContext);
1661
+ return Ue !== void 0 ? O.createElement(Ue.Consumer, null, function(n) {
1662
+ return o(n);
1663
+ }) : o(er);
1228
1664
  }
1229
- function BiSortAlt2(props) {
1230
- return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "M7 20h2V8h3L8 4 4 8h3zm13-4h-3V4h-2v12h-3l4 4z" } }] })(props);
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);
1231
1667
  }
1232
- function BiSortDown(props) {
1233
- return GenIcon({ "tag": "svg", "attr": { "viewBox": "0 0 24 24" }, "child": [{ "tag": "path", "attr": { "d": "m6 20 4-4H7V4H5v12H2zm5-12h9v2h-9zm0 4h7v2h-7zm0-8h11v2H11zm0 12h5v2h-5z" } }] })(props);
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);
1234
1670
  }
1235
- function BiSortUp(props) {
1236
- return GenIcon({ "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" } }] })(props);
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);
1237
1673
  }
1238
- const MobileSortMenu = ({
1239
- onSortingChange
1674
+ const Et = ({
1675
+ onSortingChange: r
1240
1676
  }) => {
1241
1677
  const {
1242
- columns = [],
1243
- sortedOrder = "",
1244
- sortedColumn = ""
1245
- } = useTable();
1246
- const sortableColumns = useMemo(() => {
1247
- return columns.filter(({
1248
- sortable
1249
- }) => sortable);
1250
- }, [columns]);
1251
- const sortedLabel = useMemo(() => {
1252
- var _a;
1253
- return ((_a = columns.find(({
1254
- name
1255
- }) => name === sortedColumn)) == null ? void 0 : _a.label) || "";
1256
- }, [columns, sortedColumn]);
1257
- const isTableSortable = useMemo(() => sortableColumns.length, [sortableColumns]);
1258
- const [isMenuOpen, setMenuOpen] = useState(false);
1259
- const toggleMenu = useCallback(() => {
1260
- if (isTableSortable) {
1261
- setMenuOpen((v) => !v);
1262
- }
1263
- }, [isTableSortable]);
1264
- useEffect(() => {
1265
- if (isTableSortable) {
1266
- setMenuOpen(false);
1267
- }
1268
- }, [isTableSortable]);
1269
- const handleSortingChange = useCallback((column) => () => {
1270
- setMenuOpen(false);
1271
- onSortingChange(column)(changeSortOrder(sortedColumn === column.name ? sortedOrder : ""));
1272
- }, [onSortingChange, sortedColumn, sortedOrder]);
1273
- return isTableSortable || sortedLabel && sortedOrder ? /* @__PURE__ */ jsxs(Fragment, {
1274
- children: [/* @__PURE__ */ jsxs(MobileSortButton, {
1275
- className: [isTableSortable ? "sortable" : "", isMenuOpen ? "open" : ""].join(" "),
1276
- onClick: toggleMenu,
1277
- disabled: !isTableSortable,
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,
1278
1702
  type: "button",
1279
- layout: true,
1280
- children: [isTableSortable && (!sortedLabel || !sortedOrder) ? /* @__PURE__ */ jsxs(Fragment, {
1281
- children: [/* @__PURE__ */ jsx(BiSortAlt2, {}), /* @__PURE__ */ jsx("p", {
1703
+ layout: !0,
1704
+ children: [x && (!d || !n) ? /* @__PURE__ */ j(U, {
1705
+ children: [/* @__PURE__ */ v(wt, {}), /* @__PURE__ */ v("p", {
1282
1706
  children: "Ordenar"
1283
1707
  })]
1284
- }) : null, sortedLabel && sortedOrder ? /* @__PURE__ */ jsxs(Fragment, {
1285
- children: [sortedOrder === "asc" ? /* @__PURE__ */ jsx(BiSortDown, {}) : /* @__PURE__ */ jsx(BiSortUp, {}), /* @__PURE__ */ jsx("p", {
1286
- children: sortedLabel
1708
+ }) : null, d && n ? /* @__PURE__ */ j(U, {
1709
+ children: [n === "asc" ? /* @__PURE__ */ v(Ve, {}) : /* @__PURE__ */ v(He, {}), /* @__PURE__ */ v("p", {
1710
+ children: d
1287
1711
  })]
1288
1712
  }) : null]
1289
- }), /* @__PURE__ */ jsx(AnimatePresence, {
1290
- children: isMenuOpen ? /* @__PURE__ */ jsxs(Fragment, {
1291
- children: [/* @__PURE__ */ jsx(MobileSortTooltipBackdrop, {
1292
- onClick: toggleMenu,
1713
+ }), /* @__PURE__ */ v(Ke, {
1714
+ children: i ? /* @__PURE__ */ j(U, {
1715
+ children: [/* @__PURE__ */ v(bt, {
1716
+ onClick: p,
1293
1717
  type: "button"
1294
- }), /* @__PURE__ */ jsx(MobileSortTooltip, {
1718
+ }), /* @__PURE__ */ v(xt, {
1295
1719
  initial: {
1296
1720
  transform: "scale(0)",
1297
1721
  opacity: 0
@@ -1307,124 +1731,112 @@ const MobileSortMenu = ({
1307
1731
  transition: {
1308
1732
  type: "tween"
1309
1733
  },
1310
- children: sortableColumns.map((column) => /* @__PURE__ */ jsxs(MobileSortTooltipOption, {
1311
- onClick: handleSortingChange(column),
1312
- children: [/* @__PURE__ */ jsx("p", {
1313
- children: column.label
1314
- }), column.name === sortedColumn ? sortedOrder === "desc" ? /* @__PURE__ */ jsx(BiSortDown, {
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, {
1315
1739
  size: "1.25rem"
1316
- }) : /* @__PURE__ */ jsx(BiSortUp, {
1740
+ }) : /* @__PURE__ */ v(He, {
1317
1741
  size: "1.25rem"
1318
1742
  }) : null]
1319
- }, column.key))
1743
+ }, b.key))
1320
1744
  })]
1321
1745
  }) : null
1322
1746
  })]
1323
1747
  }) : null;
1324
- };
1325
- const defaultSortingHandler = (_) => void 0;
1326
- const TableContext = createContext({});
1327
- const Table = ({
1328
- columns = [],
1329
- children,
1330
- customCss,
1331
- sorting,
1332
- onSortingChange = defaultSortingHandler,
1333
- mobileBreakpoint = 900
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
1334
1756
  }) => {
1335
- const handleSortChange = useCallback((column) => (order) => {
1336
- if (!(column == null ? void 0 : column.sortable))
1337
- return;
1338
- onSortingChange({
1339
- column: column.name,
1340
- order
1757
+ const x = X((p) => (u) => {
1758
+ p != null && p.sortable && f({
1759
+ column: p.name,
1760
+ order: u
1341
1761
  });
1342
- }, [onSortingChange]);
1343
- useEffect(() => {
1344
- const effectiveChildren = children.flat().filter(Boolean);
1345
- validateProps({
1346
- columns,
1347
- children: effectiveChildren,
1348
- mobileBreakpoint
1762
+ }, [f]);
1763
+ Ge(() => {
1764
+ const p = o.flat().filter(Boolean);
1765
+ mt({
1766
+ columns: r,
1767
+ children: p,
1768
+ mobileBreakpoint: d
1349
1769
  });
1350
- }, [children, columns, mobileBreakpoint]);
1351
- const columnTemplate = useMemo(() => buildColumnTemplate(columns), [columns]);
1352
- const indexedColumns = useMemo(() => {
1353
- return columns.map((column, index) => __spreadProps(__spreadValues({}, column), {
1354
- index,
1355
- key: `${column.name}-${index}`
1356
- }));
1357
- }, [columns]);
1358
- return /* @__PURE__ */ jsx(TableContext.Provider, {
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, {
1359
1777
  value: {
1360
- columns: indexedColumns,
1361
- sortedOrder: sorting == null ? void 0 : sorting.order,
1362
- sortedColumn: sorting == null ? void 0 : sorting.column
1778
+ columns: l,
1779
+ sortedOrder: c == null ? void 0 : c.order,
1780
+ sortedColumn: c == null ? void 0 : c.column
1363
1781
  },
1364
- children: /* @__PURE__ */ jsxs(TableWrapper, {
1365
- columnTemplate,
1366
- customCss,
1367
- mobileBreakpoint,
1368
- layout: true,
1369
- children: [/* @__PURE__ */ jsx(MobileSortMenu, {
1370
- onSortingChange: handleSortChange
1371
- }), /* @__PURE__ */ jsx(TableHeaderRow, {
1372
- layout: true,
1373
- children: indexedColumns.map((column) => /* @__PURE__ */ jsx(TableHeader, {
1374
- column,
1375
- onSort: handleSortChange(column)
1376
- }, column.key))
1377
- }), /* @__PURE__ */ jsx(TableBody, {
1378
- children: children.map((child, idx) => /* @__PURE__ */ jsx(Fragment$1, {
1379
- children: child
1380
- }, idx))
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))
1381
1799
  })]
1382
1800
  })
1383
1801
  });
1384
1802
  };
1385
- function useTable() {
1386
- const context = useContext(TableContext);
1387
- if (!context) {
1803
+ function Z() {
1804
+ const r = Dr(tr);
1805
+ if (!r)
1388
1806
  throw new Error("useTable and TableRow must be used within a Table");
1389
- }
1390
- return context;
1807
+ return r;
1391
1808
  }
1392
- const TableRow = (_c) => {
1393
- var _d = _c, {
1394
- children,
1395
- className,
1396
- annex
1397
- } = _d, other = __objRest(_d, [
1398
- "children",
1399
- "className",
1400
- "annex"
1401
- ]);
1809
+ const ar = ({
1810
+ children: r,
1811
+ className: o,
1812
+ annex: n,
1813
+ ...c
1814
+ }) => {
1402
1815
  const {
1403
- columns = []
1404
- } = useTable();
1405
- const rowId = useMemo(() => `table-row-${Math.random().toString(16).slice(2)}`, []);
1406
- return /* @__PURE__ */ jsx(Fragment, {
1407
- children: /* @__PURE__ */ jsxs(TableRowContainer, __spreadProps(__spreadValues({
1408
- layout: true,
1409
- className
1410
- }, other), {
1411
- children: [/* @__PURE__ */ jsx(TableRowWrapper, {
1412
- id: rowId,
1413
- layoutId: rowId,
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,
1414
1826
  className: "TableRow",
1415
- children: columns.map((column) => /* @__PURE__ */ jsxs(TableCellWrapper, {
1416
- className: `TableCellWrapper column-${column.index}`,
1417
- children: [/* @__PURE__ */ jsx(TableCellRef, {
1418
- className: `TableCellRef column-${column.index}`,
1419
- children: column.label
1420
- }), /* @__PURE__ */ jsx(TableCell, {
1421
- className: `TableCell column-${column.index}`,
1422
- children: children[column.index] || null
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
1423
1835
  })]
1424
- }, column.key))
1425
- }), /* @__PURE__ */ jsx(AnimatePresence, {
1426
- children: annex ? /* @__PURE__ */ jsx(TableRowAnnexWrapper, {
1427
- layoutId: `${rowId}-annex`,
1836
+ }, x.key))
1837
+ }), /* @__PURE__ */ v(Ke, {
1838
+ children: n ? /* @__PURE__ */ v(tt, {
1839
+ layoutId: `${d}-annex`,
1428
1840
  initial: {
1429
1841
  opacity: 0
1430
1842
  },
@@ -1441,23 +1853,34 @@ const TableRow = (_c) => {
1441
1853
  transition: {
1442
1854
  type: "tween"
1443
1855
  },
1444
- "aria-details": rowId,
1856
+ "aria-details": d,
1445
1857
  className: "TableRowAnnex",
1446
- children: annex
1858
+ children: n
1447
1859
  }, "annex") : null
1448
1860
  })]
1449
- }))
1861
+ })
1450
1862
  });
1451
1863
  };
1452
- TableRow.displayName = "TableRow";
1453
- const EmptyRow = () => {
1864
+ ar.displayName = "TableRow";
1865
+ const kt = () => {
1454
1866
  const {
1455
- columns = []
1456
- } = useTable();
1457
- return /* @__PURE__ */ jsx(TableRow, {
1867
+ columns: r = []
1868
+ } = Z();
1869
+ return /* @__PURE__ */ v(ar, {
1458
1870
  className: "empty_row",
1459
- children: Array(columns.length).fill(null)
1871
+ children: Array(r.length).fill(null)
1460
1872
  });
1461
1873
  };
1462
- EmptyRow.displayName = "EmptyRow";
1463
- export { Button, EmptyRow, PreventScroll, Spinner, Table, TableRow, binamikCssReset, binamikGlobalStyles, binamikTheme, depth };
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
1886
+ };