@pismo/marola 2.1.18 → 2.1.20

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.
Files changed (54) hide show
  1. package/dist/{Button-Bh6rpTyY.js → Button-BrEDdtHO.js} +2 -2
  2. package/dist/{ClickAwayListener-BjqhGzJh.js → ClickAwayListener-Z08peX_P.js} +3 -3
  3. package/dist/{Popup-aWlctE1C.js → Popup-Dffqo7wT.js} +3 -3
  4. package/dist/{Portal-Dc9ej3DW.js → Portal-DJapUCn6.js} +14 -13
  5. package/dist/{RadioButton.module-VF7v9SuY.js → RadioButton.module-RTKWJmma.js} +1 -1
  6. package/dist/{Toggle-DPXiwAx3.js → Toggle-SlvGYQKW.js} +48 -46
  7. package/dist/assets/Draggable.css +1 -0
  8. package/dist/{combineHooksSlotProps-CNWfgylM.js → combineHooksSlotProps-BhQ14uyD.js} +5 -5
  9. package/dist/components/Autocomplete/Autocomplete.js +38 -38
  10. package/dist/components/Button/Button.js +1 -1
  11. package/dist/components/Chip/Chip.js +6 -3
  12. package/dist/components/DatePicker/DatePicker.js +4 -4
  13. package/dist/components/Dialog/CloseIconButton.js +1 -1
  14. package/dist/components/Dialog/Dialog.js +4 -4
  15. package/dist/components/Draggable/Draggable.d.ts +47 -0
  16. package/dist/components/Draggable/Draggable.js +151 -0
  17. package/dist/components/Draggable/Draggable.spec.d.ts +1 -0
  18. package/dist/components/Draggable/Draggable.stories.d.ts +44 -0
  19. package/dist/components/Draggable/useDraggable.d.ts +20 -0
  20. package/dist/components/Draggable/useDraggable.js +11 -0
  21. package/dist/components/EllipsisTooltip/EllipsisTooltip.stories.d.ts +1 -1
  22. package/dist/components/IconButton/IconButton.js +1 -1
  23. package/dist/components/Input/Input.js +1 -1
  24. package/dist/components/Popover/Popover.js +2 -2
  25. package/dist/components/RadioButton/RadioButton.js +17 -15
  26. package/dist/components/RadioButton/RadioOption.js +13 -12
  27. package/dist/components/ResultWithChips/ResultWithChips.js +1 -1
  28. package/dist/components/RowItem/RowItem.js +5 -3
  29. package/dist/components/Select/Select.js +5 -5
  30. package/dist/components/Snackbar/Snackbar.js +3 -3
  31. package/dist/components/Tabs/Tab.js +3 -3
  32. package/dist/components/Tabs/TabPanel.js +1 -1
  33. package/dist/components/Tabs/Tabs.js +3 -3
  34. package/dist/components/Toggle/Toggle.js +1 -1
  35. package/dist/components/ToggleGroup/Toggle.js +4 -2
  36. package/dist/components/ToggleGroup/ToggleGroup.js +1 -1
  37. package/dist/components/Tooltip/Tooltip.js +350 -119
  38. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
  39. package/dist/contexts/DraggableProvider/DraggableProvider.d.ts +3 -0
  40. package/dist/contexts/DraggableProvider/DraggableProvider.js +6 -0
  41. package/dist/contexts/SnackbarProvider/SnackbarProvider.js +1 -1
  42. package/dist/exactProp-SYjL19cU.js +13 -0
  43. package/dist/{index-Bppuplgd.js → index-1UpBa69h.js} +1361 -1372
  44. package/dist/main.d.ts +6 -0
  45. package/dist/main.js +123 -102
  46. package/dist/{ownerDocument-CXvpb_nj.js → ownerDocument-By592Iy6.js} +1 -1
  47. package/dist/react-BvI-Sw9b.js +509 -0
  48. package/dist/{useButton-B8Y1xR88.js → useButton-CezPDte8.js} +6 -6
  49. package/dist/{useList-9gbS2r78.js → useList-nqLfZem8.js} +2 -2
  50. package/dist/{useSlotProps-C7dqSmdM.js → useSlotProps-CYHDC4TN.js} +2 -2
  51. package/dist/utils/draggable.d.ts +8 -0
  52. package/dist/utils/draggable.js +30 -0
  53. package/dist/utils/draggable.test.d.ts +1 -0
  54. package/package.json +4 -2
@@ -0,0 +1,509 @@
1
+ import te, { useRef as ue, createElement as de, createContext as fe, useReducer as ae, useEffect as ve, useDebugValue as _e, useCallback as he, useContext as we } from "react";
2
+ const I = {}, Y = (e, t) => e.unstable_is ? e.unstable_is(t) : t === e, Z = (e) => "init" in e, $ = (e) => !!e.write, k = (e) => "v" in e || "e" in e, V = (e) => {
3
+ if ("e" in e)
4
+ throw e.e;
5
+ if ((I ? "production" : void 0) !== "production" && !("v" in e))
6
+ throw new Error("[Bug] atom state is not initialized");
7
+ return e.v;
8
+ }, j = /* @__PURE__ */ new WeakMap(), B = (e) => {
9
+ var t;
10
+ return x(e) && !!((t = j.get(e)) != null && t[0]);
11
+ }, Se = (e) => {
12
+ const t = j.get(e);
13
+ t != null && t[0] && (t[0] = !1, t[1].forEach((n) => n()));
14
+ }, ne = (e, t) => {
15
+ let n = j.get(e);
16
+ if (!n) {
17
+ n = [!0, /* @__PURE__ */ new Set()], j.set(e, n);
18
+ const o = () => {
19
+ n[0] = !1;
20
+ };
21
+ e.then(o, o);
22
+ }
23
+ n[1].add(t);
24
+ }, x = (e) => typeof (e == null ? void 0 : e.then) == "function", re = (e, t, n) => {
25
+ n.p.has(e) || (n.p.add(e), t.then(
26
+ () => {
27
+ n.p.delete(e);
28
+ },
29
+ () => {
30
+ n.p.delete(e);
31
+ }
32
+ ));
33
+ }, C = (e, t, n) => {
34
+ const o = n(e), u = "v" in o, f = o.v;
35
+ if (x(t))
36
+ for (const a of o.d.keys())
37
+ re(e, t, n(a));
38
+ o.v = t, delete o.e, (!u || !Object.is(f, o.v)) && (++o.n, x(f) && Se(f));
39
+ }, H = (e, t, n) => {
40
+ var o;
41
+ const u = /* @__PURE__ */ new Set();
42
+ for (const f of ((o = n.get(e)) == null ? void 0 : o.t) || [])
43
+ n.has(f) && u.add(f);
44
+ for (const f of t.p)
45
+ u.add(f);
46
+ return u;
47
+ }, ge = () => {
48
+ const e = /* @__PURE__ */ new Set(), t = () => {
49
+ e.forEach((n) => n());
50
+ };
51
+ return t.add = (n) => (e.add(n), () => {
52
+ e.delete(n);
53
+ }), t;
54
+ }, G = () => {
55
+ const e = {}, t = /* @__PURE__ */ new WeakMap(), n = (o) => {
56
+ var u, f;
57
+ (u = t.get(e)) == null || u.forEach((a) => a(o)), (f = t.get(o)) == null || f.forEach((a) => a());
58
+ };
59
+ return n.add = (o, u) => {
60
+ const f = o || e, a = (t.has(f) ? t : t.set(f, /* @__PURE__ */ new Set())).get(f);
61
+ return a.add(u), () => {
62
+ a == null || a.delete(u), a.size || t.delete(f);
63
+ };
64
+ }, n;
65
+ }, ye = (e) => (e.c || (e.c = G()), e.m || (e.m = G()), e.u || (e.u = G()), e.f || (e.f = ge()), e), pe = Symbol(), be = (e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), n = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set(), a = {}, S = (_, ...b) => _.read(...b), y = (_, ...b) => _.write(...b), v = (_, b) => {
66
+ var A;
67
+ return (A = _.unstable_onInit) == null ? void 0 : A.call(_, b);
68
+ }, h = (_, b) => {
69
+ var A;
70
+ return (A = _.onMount) == null ? void 0 : A.call(_, b);
71
+ }, ...g) => {
72
+ const _ = g[0] || ((r) => {
73
+ if ((I ? "production" : void 0) !== "production" && !r)
74
+ throw new Error("Atom is undefined or null");
75
+ let d = e.get(r);
76
+ return d || (d = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 }, e.set(r, d), v == null || v(r, U)), d;
77
+ }), b = g[1] || (() => {
78
+ const r = [], d = (l) => {
79
+ try {
80
+ l();
81
+ } catch (s) {
82
+ r.push(s);
83
+ }
84
+ };
85
+ do {
86
+ a.f && d(a.f);
87
+ const l = /* @__PURE__ */ new Set(), s = l.add.bind(l);
88
+ o.forEach((i) => {
89
+ var c;
90
+ return (c = t.get(i)) == null ? void 0 : c.l.forEach(s);
91
+ }), o.clear(), f.forEach(s), f.clear(), u.forEach(s), u.clear(), l.forEach(d), o.size && A();
92
+ } while (o.size || f.size || u.size);
93
+ if (r.length)
94
+ throw new AggregateError(r);
95
+ }), A = g[2] || (() => {
96
+ const r = [], d = /* @__PURE__ */ new WeakSet(), l = /* @__PURE__ */ new WeakSet(), s = Array.from(o);
97
+ for (; s.length; ) {
98
+ const i = s[s.length - 1], c = _(i);
99
+ if (l.has(i)) {
100
+ s.pop();
101
+ continue;
102
+ }
103
+ if (d.has(i)) {
104
+ if (n.get(i) === c.n)
105
+ r.push([i, c]);
106
+ else if ((I ? "production" : void 0) !== "production" && n.has(i))
107
+ throw new Error("[Bug] invalidated atom exists");
108
+ l.add(i), s.pop();
109
+ continue;
110
+ }
111
+ d.add(i);
112
+ for (const p of H(i, c, t))
113
+ d.has(p) || s.push(p);
114
+ }
115
+ for (let i = r.length - 1; i >= 0; --i) {
116
+ const [c, p] = r[i];
117
+ let E = !1;
118
+ for (const R of p.d.keys())
119
+ if (R !== c && o.has(R)) {
120
+ E = !0;
121
+ break;
122
+ }
123
+ E && (P(c), L(c)), n.delete(c);
124
+ }
125
+ }), P = g[3] || ((r) => {
126
+ var d;
127
+ const l = _(r);
128
+ if (k(l) && (t.has(r) && n.get(r) !== l.n || Array.from(l.d).every(
129
+ ([w, N]) => (
130
+ // Recursively, read the atom state of the dependency, and
131
+ // check if the atom epoch number is unchanged
132
+ P(w).n === N
133
+ )
134
+ )))
135
+ return l;
136
+ l.d.clear();
137
+ let s = !0;
138
+ const i = () => {
139
+ t.has(r) && (L(r), A(), b());
140
+ }, c = (w) => {
141
+ var N;
142
+ if (Y(r, w)) {
143
+ const X = _(w);
144
+ if (!k(X))
145
+ if (Z(w))
146
+ C(w, w.init, _);
147
+ else
148
+ throw new Error("no atom init");
149
+ return V(X);
150
+ }
151
+ const J = P(w);
152
+ try {
153
+ return V(J);
154
+ } finally {
155
+ l.d.set(w, J.n), B(l.v) && re(r, l.v, J), (N = t.get(w)) == null || N.t.add(r), s || i();
156
+ }
157
+ };
158
+ let p, E;
159
+ const R = {
160
+ get signal() {
161
+ return p || (p = new AbortController()), p.signal;
162
+ },
163
+ get setSelf() {
164
+ return (I ? "production" : void 0) !== "production" && !$(r) && console.warn("setSelf function cannot be used with read-only atom"), !E && $(r) && (E = (...w) => {
165
+ if ((I ? "production" : void 0) !== "production" && s && console.warn("setSelf function cannot be called in sync"), !s)
166
+ try {
167
+ return T(r, ...w);
168
+ } finally {
169
+ A(), b();
170
+ }
171
+ }), E;
172
+ }
173
+ }, O = l.n;
174
+ try {
175
+ const w = S(r, c, R);
176
+ return C(r, w, _), x(w) && (ne(w, () => p == null ? void 0 : p.abort()), w.then(
177
+ i,
178
+ i
179
+ )), l;
180
+ } catch (w) {
181
+ return delete l.v, l.e = w, ++l.n, l;
182
+ } finally {
183
+ s = !1, O !== l.n && n.get(r) === O && (n.set(r, l.n), o.add(r), (d = a.c) == null || d.call(a, r));
184
+ }
185
+ }), M = g[4] || ((r) => {
186
+ const d = [r];
187
+ for (; d.length; ) {
188
+ const l = d.pop(), s = _(l);
189
+ for (const i of H(l, s, t)) {
190
+ const c = _(i);
191
+ n.set(i, c.n), d.push(i);
192
+ }
193
+ }
194
+ }), T = g[5] || ((r, ...d) => {
195
+ let l = !0;
196
+ const s = (c) => V(P(c)), i = (c, ...p) => {
197
+ var E;
198
+ const R = _(c);
199
+ try {
200
+ if (Y(r, c)) {
201
+ if (!Z(c))
202
+ throw new Error("atom not writable");
203
+ const O = R.n, w = p[0];
204
+ C(c, w, _), L(c), O !== R.n && (o.add(c), (E = a.c) == null || E.call(a, c), M(c));
205
+ return;
206
+ } else
207
+ return T(c, ...p);
208
+ } finally {
209
+ l || (A(), b());
210
+ }
211
+ };
212
+ try {
213
+ return y(r, s, i, ...d);
214
+ } finally {
215
+ l = !1;
216
+ }
217
+ }), L = g[6] || ((r) => {
218
+ var d;
219
+ const l = _(r), s = t.get(r);
220
+ if (s && !B(l.v)) {
221
+ for (const [i, c] of l.d)
222
+ if (!s.d.has(i)) {
223
+ const p = _(i);
224
+ W(i).t.add(r), s.d.add(i), c !== p.n && (o.add(i), (d = a.c) == null || d.call(a, i), M(i));
225
+ }
226
+ for (const i of s.d || [])
227
+ if (!l.d.has(i)) {
228
+ s.d.delete(i);
229
+ const c = z(i);
230
+ c == null || c.t.delete(r);
231
+ }
232
+ }
233
+ }), W = g[7] || ((r) => {
234
+ var d;
235
+ const l = _(r);
236
+ let s = t.get(r);
237
+ if (!s) {
238
+ P(r);
239
+ for (const i of l.d.keys())
240
+ W(i).t.add(r);
241
+ if (s = {
242
+ l: /* @__PURE__ */ new Set(),
243
+ d: new Set(l.d.keys()),
244
+ t: /* @__PURE__ */ new Set()
245
+ }, t.set(r, s), (d = a.m) == null || d.call(a, r), $(r)) {
246
+ const i = () => {
247
+ let c = !0;
248
+ const p = (...E) => {
249
+ try {
250
+ return T(r, ...E);
251
+ } finally {
252
+ c || (A(), b());
253
+ }
254
+ };
255
+ try {
256
+ const E = h(r, p);
257
+ E && (s.u = () => {
258
+ c = !0;
259
+ try {
260
+ E();
261
+ } finally {
262
+ c = !1;
263
+ }
264
+ });
265
+ } finally {
266
+ c = !1;
267
+ }
268
+ };
269
+ u.add(i);
270
+ }
271
+ }
272
+ return s;
273
+ }), z = g[8] || ((r) => {
274
+ var d;
275
+ const l = _(r);
276
+ let s = t.get(r);
277
+ if (s && !s.l.size && !Array.from(s.t).some((i) => {
278
+ var c;
279
+ return (c = t.get(i)) == null ? void 0 : c.d.has(r);
280
+ })) {
281
+ s.u && f.add(s.u), s = void 0, t.delete(r), (d = a.u) == null || d.call(a, r);
282
+ for (const i of l.d.keys()) {
283
+ const c = z(i);
284
+ c == null || c.t.delete(r);
285
+ }
286
+ return;
287
+ }
288
+ return s;
289
+ }), le = [
290
+ // store state
291
+ e,
292
+ t,
293
+ n,
294
+ o,
295
+ u,
296
+ f,
297
+ a,
298
+ // atom interceptors
299
+ S,
300
+ y,
301
+ v,
302
+ h,
303
+ // building-block functions
304
+ _,
305
+ b,
306
+ A,
307
+ P,
308
+ M,
309
+ T,
310
+ L,
311
+ W,
312
+ z
313
+ ], U = {
314
+ get: (r) => V(P(r)),
315
+ set: (r, ...d) => {
316
+ try {
317
+ return T(r, ...d);
318
+ } finally {
319
+ A(), b();
320
+ }
321
+ },
322
+ sub: (r, d) => {
323
+ const s = W(r).l;
324
+ return s.add(d), b(), () => {
325
+ s.delete(d), z(r), b();
326
+ };
327
+ }
328
+ };
329
+ return Object.defineProperty(U, pe, { value: le }), U;
330
+ }, oe = be, Ee = ye, m = ne, Q = {};
331
+ let Ae = 0;
332
+ function Ne(e, t) {
333
+ const n = `atom${++Ae}`, o = {
334
+ toString() {
335
+ return (Q ? "production" : void 0) !== "production" && this.debugLabel ? n + ":" + this.debugLabel : n;
336
+ }
337
+ };
338
+ return o.init = e, o.read = Pe, o.write = Re, o;
339
+ }
340
+ function Pe(e) {
341
+ return e(this);
342
+ }
343
+ function Re(e, t, n) {
344
+ return t(
345
+ this,
346
+ typeof n == "function" ? n(e(this)) : n
347
+ );
348
+ }
349
+ const Te = () => {
350
+ let e = 0;
351
+ const t = Ee({}), n = /* @__PURE__ */ new WeakMap(), o = /* @__PURE__ */ new WeakMap(), u = oe(
352
+ n,
353
+ o,
354
+ void 0,
355
+ void 0,
356
+ void 0,
357
+ void 0,
358
+ t,
359
+ void 0,
360
+ (S, y, v, ...h) => e ? v(S, ...h) : S.write(y, v, ...h)
361
+ ), f = /* @__PURE__ */ new Set();
362
+ return t.m.add(void 0, (S) => {
363
+ f.add(S);
364
+ const y = n.get(S);
365
+ y.m = o.get(S);
366
+ }), t.u.add(void 0, (S) => {
367
+ f.delete(S);
368
+ const y = n.get(S);
369
+ delete y.m;
370
+ }), Object.assign(u, {
371
+ // store dev methods (these are tentative and subject to change without notice)
372
+ dev4_get_internal_weak_map: () => (console.log("Deprecated: Use devstore from the devtools library"), n),
373
+ dev4_get_mounted_atoms: () => f,
374
+ dev4_restore_atoms: (S) => {
375
+ const y = {
376
+ read: () => null,
377
+ write: (v, h) => {
378
+ ++e;
379
+ try {
380
+ for (const [g, _] of S)
381
+ "init" in g && h(g, _);
382
+ } finally {
383
+ --e;
384
+ }
385
+ }
386
+ };
387
+ u.set(y);
388
+ }
389
+ });
390
+ };
391
+ function ie() {
392
+ return (Q ? "production" : void 0) !== "production" ? Te() : oe();
393
+ }
394
+ let D;
395
+ function De() {
396
+ return D || (D = ie(), (Q ? "production" : void 0) !== "production" && (globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = D), globalThis.__JOTAI_DEFAULT_STORE__ !== D && console.warn(
397
+ "Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"
398
+ ))), D;
399
+ }
400
+ const Ie = {}, se = fe(
401
+ void 0
402
+ );
403
+ function ce(e) {
404
+ return we(se) || De();
405
+ }
406
+ function Ve({
407
+ children: e,
408
+ store: t
409
+ }) {
410
+ const n = ue(void 0);
411
+ return !t && !n.current && (n.current = ie()), de(
412
+ se.Provider,
413
+ {
414
+ value: t || n.current
415
+ },
416
+ e
417
+ );
418
+ }
419
+ const q = (e) => typeof (e == null ? void 0 : e.then) == "function", F = (e) => {
420
+ e.status || (e.status = "pending", e.then(
421
+ (t) => {
422
+ e.status = "fulfilled", e.value = t;
423
+ },
424
+ (t) => {
425
+ e.status = "rejected", e.reason = t;
426
+ }
427
+ ));
428
+ }, Le = te.use || // A shim for older React versions
429
+ ((e) => {
430
+ if (e.status === "pending")
431
+ throw e;
432
+ if (e.status === "fulfilled")
433
+ return e.value;
434
+ throw e.status === "rejected" ? e.reason : (F(e), e);
435
+ }), K = /* @__PURE__ */ new WeakMap(), ee = (e, t) => {
436
+ let n = K.get(e);
437
+ return n || (n = new Promise((o, u) => {
438
+ let f = e;
439
+ const a = (v) => (h) => {
440
+ f === v && o(h);
441
+ }, S = (v) => (h) => {
442
+ f === v && u(h);
443
+ }, y = () => {
444
+ try {
445
+ const v = t();
446
+ q(v) ? (K.set(v, n), f = v, v.then(a(v), S(v)), m(v, y)) : o(v);
447
+ } catch (v) {
448
+ u(v);
449
+ }
450
+ };
451
+ e.then(a(e), S(e)), m(e, y);
452
+ }), K.set(e, n)), n;
453
+ };
454
+ function We(e, t) {
455
+ const { delay: n, unstable_promiseStatus: o = !te.use } = {}, u = ce(), [[f, a, S], y] = ae(
456
+ (h) => {
457
+ const g = u.get(e);
458
+ return Object.is(h[0], g) && h[1] === u && h[2] === e ? h : [g, u, e];
459
+ },
460
+ void 0,
461
+ () => [u.get(e), u, e]
462
+ );
463
+ let v = f;
464
+ if ((a !== u || S !== e) && (y(), v = u.get(e)), ve(() => {
465
+ const h = u.sub(e, () => {
466
+ if (o)
467
+ try {
468
+ const g = u.get(e);
469
+ q(g) && F(
470
+ ee(g, () => u.get(e))
471
+ );
472
+ } catch {
473
+ }
474
+ if (typeof n == "number") {
475
+ setTimeout(y, n);
476
+ return;
477
+ }
478
+ y();
479
+ });
480
+ return y(), h;
481
+ }, [u, e, n, o]), _e(v), q(v)) {
482
+ const h = ee(v, () => u.get(e));
483
+ return o && F(h), Le(h);
484
+ }
485
+ return v;
486
+ }
487
+ function ze(e, t) {
488
+ const n = ce();
489
+ return he(
490
+ (...u) => {
491
+ if ((Ie ? "production" : void 0) !== "production" && !("write" in e))
492
+ throw new Error("not writable atom");
493
+ return n.set(e, ...u);
494
+ },
495
+ [n, e]
496
+ );
497
+ }
498
+ function je(e, t) {
499
+ return [
500
+ We(e),
501
+ // We do wrong type assertion here, which results in throwing an error.
502
+ ze(e)
503
+ ];
504
+ }
505
+ export {
506
+ Ve as P,
507
+ Ne as a,
508
+ je as u
509
+ };
@@ -1,6 +1,6 @@
1
- import { u as S, b as D, f as k } from "./useSlotProps-C7dqSmdM.js";
1
+ import { u as L, _ as D, f as k } from "./useSlotProps-CYHDC4TN.js";
2
2
  import * as i from "react";
3
- import { u as _ } from "./useIsFocusVisible-BH4IAdcw.js";
3
+ import { u as S } from "./useIsFocusVisible-BH4IAdcw.js";
4
4
  function v(p) {
5
5
  const {
6
6
  rootElementName: n = "",
@@ -30,7 +30,7 @@ function W(p = {}) {
30
30
  onFocus: F,
31
31
  onBlur: M,
32
32
  ref: U
33
- } = _(), [d, R] = i.useState(!1);
33
+ } = S(), [d, R] = i.useState(!1);
34
34
  n && !l && d && R(!1), i.useEffect(() => {
35
35
  E.current = d;
36
36
  }, [d, E]);
@@ -71,13 +71,13 @@ function W(p = {}) {
71
71
  var r;
72
72
  (r = t.onClick) == null || r.call(t, e), e.preventDefault();
73
73
  }
74
- }, L = (t) => (e) => {
74
+ }, _ = (t) => (e) => {
75
75
  var o;
76
76
  if (e.target === e.currentTarget && N(!1), (o = t.onKeyUp) == null || o.call(t, e), e.target === e.currentTarget && !g() && !n && e.key === " " && !e.defaultMuiPrevented) {
77
77
  var r;
78
78
  (r = t.onClick) == null || r.call(t, e);
79
79
  }
80
- }, x = S(V, y, U, b), a = {};
80
+ }, x = L(V, y, U, b), a = {};
81
81
  return u !== void 0 && (a.tabIndex = u), f === "BUTTON" ? (a.type = s ?? "button", l ? a["aria-disabled"] = n : a.disabled = n) : f === "INPUT" ? s && ["button", "submit", "reset"].includes(s) && (l ? a["aria-disabled"] = n : a.disabled = n) : f !== "" && (!c && !m && (a.role = "button", a.tabIndex = u ?? 0), n && (a["aria-disabled"] = n, a.tabIndex = l ? u ?? 0 : -1)), {
82
82
  getRootProps: (t = {}) => {
83
83
  const e = D({}, k(p), k(t)), o = D({
@@ -87,7 +87,7 @@ function W(p = {}) {
87
87
  onClick: I(e),
88
88
  onFocus: P(e),
89
89
  onKeyDown: C(e),
90
- onKeyUp: L(e),
90
+ onKeyUp: _(e),
91
91
  onMouseDown: $(e),
92
92
  onMouseLeave: w(e),
93
93
  ref: x
@@ -1,6 +1,6 @@
1
- import { b as p, u as re, f as ie } from "./useSlotProps-C7dqSmdM.js";
1
+ import { _ as p, u as re, f as ie } from "./useSlotProps-CYHDC4TN.js";
2
2
  import * as f from "react";
3
- import { L as x } from "./combineHooksSlotProps-CNWfgylM.js";
3
+ import { L as x } from "./combineHooksSlotProps-BhQ14uyD.js";
4
4
  function W(t, e, r = (n, l) => n === l) {
5
5
  return t.length === e.length && t.every((n, l) => r(n, e[l]));
6
6
  }
@@ -820,9 +820,9 @@ function nr(e) {
820
820
  }
821
821
  export {
822
822
  Qe as P,
823
- We as _,
823
+ Y as _,
824
824
  rr as a,
825
- Y as b,
825
+ We as b,
826
826
  nr as c,
827
827
  er as d,
828
828
  tr as e,
@@ -0,0 +1,8 @@
1
+ type DeepKeys<T> = {
2
+ [K in keyof T]: T[K] extends object ? `${K & string}` | `${K & string}.${DeepKeys<T[K]>}` : `${K & string}`;
3
+ }[keyof T];
4
+ export declare const replaceItemsByIndex: <T>(items: T[], from: number, to: number) => T[];
5
+ export declare const sortItemsByIndex: <T>(items: T[], from: number, to: number, direction: 'up' | 'down') => T[];
6
+ export declare const sortItemsByKey: <T>(items: T[], key: DeepKeys<T>, from: number, to: number, direction: 'up' | 'down') => T[];
7
+ export declare const replaceItemsByKey: <T>(items: T[], key: DeepKeys<T>, from: number, to: number) => T[];
8
+ export {};
@@ -0,0 +1,30 @@
1
+ const f = (o, r) => {
2
+ const c = r.split(".");
3
+ let n = o;
4
+ for (const e of c)
5
+ n && typeof n == "object" && e in n && (n = n[e]);
6
+ return n;
7
+ }, x = (o, r, c) => {
8
+ const n = [...o], e = r, t = c;
9
+ return e < 0 || e >= n.length || t < 0 || t >= n.length || e !== t && (n[t] = n[e], n[e] = o[c]), n;
10
+ }, l = (o, r, c, n) => {
11
+ const e = [...o], t = r, s = c;
12
+ if (t < 0 || t >= e.length || s < 0 || s >= e.length || t === s)
13
+ return e;
14
+ const I = e[t];
15
+ e.splice(t, 1);
16
+ let d = s;
17
+ return n === "up" ? d = s : n === "down" && (d = t < s ? s : s + 1), e.splice(d, 0, I), e;
18
+ }, i = (o, r, c, n, e) => {
19
+ const t = [...o], s = o.findIndex((d) => f(d, r) === c), I = o.findIndex((d) => f(d, r) === n);
20
+ return l(t, s, I, e);
21
+ }, u = (o, r, c, n) => {
22
+ const e = [...o], t = o.findIndex((I) => f(I, r) === c), s = o.findIndex((I) => f(I, r) === n);
23
+ return x(e, t, s);
24
+ };
25
+ export {
26
+ x as replaceItemsByIndex,
27
+ u as replaceItemsByKey,
28
+ l as sortItemsByIndex,
29
+ i as sortItemsByKey
30
+ };
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pismo/marola",
3
3
  "description": "CDX tribe component library",
4
- "version": "2.1.18",
4
+ "version": "2.1.20",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -96,8 +96,10 @@
96
96
  },
97
97
  "dependencies": {
98
98
  "@base-ui-components/react": "^1.0.0-alpha.6",
99
+ "@floating-ui/dom": "^1.7.2",
99
100
  "@mui/base": "^5.0.0-beta.40",
100
- "@mui/material": "^5.15.15"
101
+ "@mui/material": "^5.15.15",
102
+ "jotai": "^2.12.5"
101
103
  },
102
104
  "resolutions": {
103
105
  "@babel/helpers": "^7.27.1",