@5ive-souls/controls 0.0.10 → 0.0.11
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.
|
Binary file
|
|
@@ -113,18 +113,18 @@ function de() {
|
|
|
113
113
|
const u = Array.isArray(o) ? o : [
|
|
114
114
|
o
|
|
115
115
|
], { isReducedMotion: d } = i, l = u.map((c) => {
|
|
116
|
-
const { keyframes: h, reducedMotion: p = Ve, ...f } = c, { keyframes: y = h, ...
|
|
116
|
+
const { keyframes: h, reducedMotion: p = Ve, ...f } = c, { keyframes: y = h, ...S } = p, R = d ? y : h, w = {
|
|
117
117
|
...Ye,
|
|
118
118
|
...f,
|
|
119
119
|
// Use reduced motion overrides (e.g. duration, easing) when reduced motion is enabled
|
|
120
|
-
...d &&
|
|
120
|
+
...d && S
|
|
121
121
|
};
|
|
122
122
|
try {
|
|
123
|
-
const s = n.animate(
|
|
123
|
+
const s = n.animate(R, w);
|
|
124
124
|
if (r)
|
|
125
125
|
s == null || s.persist();
|
|
126
126
|
else {
|
|
127
|
-
const C =
|
|
127
|
+
const C = R[R.length - 1];
|
|
128
128
|
var b;
|
|
129
129
|
Object.assign((b = n.style) !== null && b !== void 0 ? b : {}, C);
|
|
130
130
|
}
|
|
@@ -140,8 +140,8 @@ function de() {
|
|
|
140
140
|
});
|
|
141
141
|
},
|
|
142
142
|
setMotionEndCallbacks(c, h) {
|
|
143
|
-
const p = l.map((f) => new Promise((y,
|
|
144
|
-
f.onfinish = () => y(), f.oncancel = () =>
|
|
143
|
+
const p = l.map((f) => new Promise((y, S) => {
|
|
144
|
+
f.onfinish = () => y(), f.oncancel = () => S();
|
|
145
145
|
}));
|
|
146
146
|
Promise.all(p).then(() => {
|
|
147
147
|
c();
|
|
@@ -269,15 +269,15 @@ var ae;
|
|
|
269
269
|
function Ke() {
|
|
270
270
|
if (ae) return v;
|
|
271
271
|
ae = 1;
|
|
272
|
-
var e = 60103, r = 60106, n = 60107, o = 60108, i = 60114, u = 60109, d = 60110, l = 60112, c = 60113, h = 60120, p = 60115, f = 60116, y = 60121,
|
|
272
|
+
var e = 60103, r = 60106, n = 60107, o = 60108, i = 60114, u = 60109, d = 60110, l = 60112, c = 60113, h = 60120, p = 60115, f = 60116, y = 60121, S = 60122, R = 60117, w = 60129, b = 60131;
|
|
273
273
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
274
274
|
var s = Symbol.for;
|
|
275
|
-
e = s("react.element"), r = s("react.portal"), n = s("react.fragment"), o = s("react.strict_mode"), i = s("react.profiler"), u = s("react.provider"), d = s("react.context"), l = s("react.forward_ref"), c = s("react.suspense"), h = s("react.suspense_list"), p = s("react.memo"), f = s("react.lazy"), y = s("react.block"),
|
|
275
|
+
e = s("react.element"), r = s("react.portal"), n = s("react.fragment"), o = s("react.strict_mode"), i = s("react.profiler"), u = s("react.provider"), d = s("react.context"), l = s("react.forward_ref"), c = s("react.suspense"), h = s("react.suspense_list"), p = s("react.memo"), f = s("react.lazy"), y = s("react.block"), S = s("react.server.block"), R = s("react.fundamental"), w = s("react.debug_trace_mode"), b = s("react.legacy_hidden");
|
|
276
276
|
}
|
|
277
277
|
function C(t) {
|
|
278
278
|
if (typeof t == "object" && t !== null) {
|
|
279
|
-
var
|
|
280
|
-
switch (
|
|
279
|
+
var g = t.$$typeof;
|
|
280
|
+
switch (g) {
|
|
281
281
|
case e:
|
|
282
282
|
switch (t = t.type, t) {
|
|
283
283
|
case n:
|
|
@@ -295,11 +295,11 @@ function Ke() {
|
|
|
295
295
|
case u:
|
|
296
296
|
return t;
|
|
297
297
|
default:
|
|
298
|
-
return
|
|
298
|
+
return g;
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
case r:
|
|
302
|
-
return
|
|
302
|
+
return g;
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
}
|
|
@@ -331,7 +331,7 @@ function Ke() {
|
|
|
331
331
|
}, v.isSuspense = function(t) {
|
|
332
332
|
return C(t) === c;
|
|
333
333
|
}, v.isValidElementType = function(t) {
|
|
334
|
-
return typeof t == "string" || typeof t == "function" || t === n || t === i || t === w || t === o || t === c || t === h || t === b || typeof t == "object" && t !== null && (t.$$typeof === f || t.$$typeof === p || t.$$typeof === u || t.$$typeof === d || t.$$typeof === l || t.$$typeof ===
|
|
334
|
+
return typeof t == "string" || typeof t == "function" || t === n || t === i || t === w || t === o || t === c || t === h || t === b || typeof t == "object" && t !== null && (t.$$typeof === f || t.$$typeof === p || t.$$typeof === u || t.$$typeof === d || t.$$typeof === l || t.$$typeof === R || t.$$typeof === y || t[0] === S);
|
|
335
335
|
}, v.typeOf = C, v;
|
|
336
336
|
}
|
|
337
337
|
var E = {};
|
|
@@ -346,14 +346,14 @@ var E = {};
|
|
|
346
346
|
var se;
|
|
347
347
|
function Xe() {
|
|
348
348
|
return se || (se = 1, process.env.NODE_ENV !== "production" && function() {
|
|
349
|
-
var e = 60103, r = 60106, n = 60107, o = 60108, i = 60114, u = 60109, d = 60110, l = 60112, c = 60113, h = 60120, p = 60115, f = 60116, y = 60121,
|
|
349
|
+
var e = 60103, r = 60106, n = 60107, o = 60108, i = 60114, u = 60109, d = 60110, l = 60112, c = 60113, h = 60120, p = 60115, f = 60116, y = 60121, S = 60122, R = 60117, w = 60129, b = 60131;
|
|
350
350
|
if (typeof Symbol == "function" && Symbol.for) {
|
|
351
351
|
var s = Symbol.for;
|
|
352
|
-
e = s("react.element"), r = s("react.portal"), n = s("react.fragment"), o = s("react.strict_mode"), i = s("react.profiler"), u = s("react.provider"), d = s("react.context"), l = s("react.forward_ref"), c = s("react.suspense"), h = s("react.suspense_list"), p = s("react.memo"), f = s("react.lazy"), y = s("react.block"),
|
|
352
|
+
e = s("react.element"), r = s("react.portal"), n = s("react.fragment"), o = s("react.strict_mode"), i = s("react.profiler"), u = s("react.provider"), d = s("react.context"), l = s("react.forward_ref"), c = s("react.suspense"), h = s("react.suspense_list"), p = s("react.memo"), f = s("react.lazy"), y = s("react.block"), S = s("react.server.block"), R = s("react.fundamental"), s("react.scope"), s("react.opaque.id"), w = s("react.debug_trace_mode"), s("react.offscreen"), b = s("react.legacy_hidden");
|
|
353
353
|
}
|
|
354
354
|
var C = !1;
|
|
355
355
|
function T(a) {
|
|
356
|
-
return !!(typeof a == "string" || typeof a == "function" || a === n || a === i || a === w || a === o || a === c || a === h || a === b || C || typeof a == "object" && a !== null && (a.$$typeof === f || a.$$typeof === p || a.$$typeof === u || a.$$typeof === d || a.$$typeof === l || a.$$typeof ===
|
|
356
|
+
return !!(typeof a == "string" || typeof a == "function" || a === n || a === i || a === w || a === o || a === c || a === h || a === b || C || typeof a == "object" && a !== null && (a.$$typeof === f || a.$$typeof === p || a.$$typeof === u || a.$$typeof === d || a.$$typeof === l || a.$$typeof === R || a.$$typeof === y || a[0] === S));
|
|
357
357
|
}
|
|
358
358
|
function M(a) {
|
|
359
359
|
if (typeof a == "object" && a !== null) {
|
|
@@ -386,7 +386,7 @@ function Xe() {
|
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
var L = d, P = u, N = e, _ = l, z = n, I = f, k = p, O = r, t = i,
|
|
389
|
+
var L = d, P = u, N = e, _ = l, z = n, I = f, k = p, O = r, t = i, g = o, D = c, $ = !1, F = !1;
|
|
390
390
|
function G(a) {
|
|
391
391
|
return $ || ($ = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
|
|
392
392
|
}
|
|
@@ -426,7 +426,7 @@ function Xe() {
|
|
|
426
426
|
function Me(a) {
|
|
427
427
|
return M(a) === c;
|
|
428
428
|
}
|
|
429
|
-
E.ContextConsumer = L, E.ContextProvider = P, E.Element = N, E.ForwardRef = _, E.Fragment = z, E.Lazy = I, E.Memo = k, E.Portal = O, E.Profiler = t, E.StrictMode =
|
|
429
|
+
E.ContextConsumer = L, E.ContextProvider = P, E.Element = N, E.ForwardRef = _, E.Fragment = z, E.Lazy = I, E.Memo = k, E.Portal = O, E.Profiler = t, E.StrictMode = g, E.Suspense = D, E.isAsyncMode = G, E.isConcurrentMode = B, E.isContextConsumer = H, E.isContextProvider = X, E.isElement = ve, E.isForwardRef = Ee, E.isFragment = he, E.isLazy = Ce, E.isMemo = Re, E.isPortal = ge, E.isProfiler = Se, E.isStrictMode = ye, E.isSuspense = Me, E.isValidElementType = T, E.typeOf = M;
|
|
430
430
|
}()), E;
|
|
431
431
|
}
|
|
432
432
|
process.env.NODE_ENV === "production" ? ee.exports = Ke() : ee.exports = Xe();
|
|
@@ -472,7 +472,7 @@ function K(e) {
|
|
|
472
472
|
const o = {
|
|
473
473
|
...m.useContext(et),
|
|
474
474
|
...r
|
|
475
|
-
}, i = Je() === "skip", { appear: u, children: d, imperativeRef: l, onExit: c, onMotionFinish: h, onMotionStart: p, onMotionCancel: f, visible: y, unmountOnExit:
|
|
475
|
+
}, i = Je() === "skip", { appear: u, children: d, imperativeRef: l, onExit: c, onMotionFinish: h, onMotionStart: p, onMotionCancel: f, visible: y, unmountOnExit: S, ...R } = o, w = R, [b, s] = tt(y, S), C = Ze(d), T = je(l), M = m.useRef(), L = Ue(M, C.ref), P = m.useRef({
|
|
476
476
|
appear: u,
|
|
477
477
|
params: w,
|
|
478
478
|
skipMotions: i
|
|
@@ -483,7 +483,7 @@ function K(e) {
|
|
|
483
483
|
}), k = J((t) => {
|
|
484
484
|
h == null || h(null, {
|
|
485
485
|
direction: t
|
|
486
|
-
}), t === "exit" &&
|
|
486
|
+
}), t === "exit" && S && (s(!1), c == null || c());
|
|
487
487
|
}), O = J((t) => {
|
|
488
488
|
f == null || f(null, {
|
|
489
489
|
direction: t
|
|
@@ -500,20 +500,20 @@ function K(e) {
|
|
|
500
500
|
const t = M.current;
|
|
501
501
|
if (!t)
|
|
502
502
|
return;
|
|
503
|
-
let
|
|
503
|
+
let g;
|
|
504
504
|
function D() {
|
|
505
|
-
|
|
505
|
+
g && (F && g.isRunning() || (g.cancel(), T.current = void 0));
|
|
506
506
|
}
|
|
507
507
|
const $ = typeof e == "function" ? e({
|
|
508
508
|
element: t,
|
|
509
509
|
...P.current.params
|
|
510
510
|
}) : e, F = $[rt];
|
|
511
|
-
if (F && (
|
|
512
|
-
return
|
|
511
|
+
if (F && (g = T.current, g && g.isRunning()))
|
|
512
|
+
return g.reverse(), D;
|
|
513
513
|
const G = y ? $.enter : $.exit, B = y ? "enter" : "exit", H = !P.current.appear && _, X = P.current.skipMotions;
|
|
514
|
-
return H || I(B),
|
|
514
|
+
return H || I(B), g = N(t, G, {
|
|
515
515
|
isReducedMotion: z()
|
|
516
|
-
}), H ? (
|
|
516
|
+
}), H ? (g.finish(), D) : (T.current = g, g.setMotionEndCallbacks(() => k(B), () => O(B)), X && g.finish(), D);
|
|
517
517
|
},
|
|
518
518
|
// Excluding `isFirstMount` from deps to prevent re-triggering the animation on subsequent renders
|
|
519
519
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -738,37 +738,37 @@ const ct = Te({
|
|
|
738
738
|
}
|
|
739
739
|
}), ut = (e) => {
|
|
740
740
|
var _;
|
|
741
|
-
const { children: r, icon: n, header: o, collapsible: i, collapseDirection: u, className: d, fill: l, ref: c, id: h, appearance: p, isBusy: f, isBusyMessage: y } = e,
|
|
742
|
-
let C = Y(q.Section,
|
|
743
|
-
(l || (_ = e.cellProps) != null && _.resizable) && (C = Y(C,
|
|
741
|
+
const { children: r, icon: n, header: o, collapsible: i, collapseDirection: u, className: d, fill: l, ref: c, id: h, appearance: p, isBusy: f, isBusyMessage: y } = e, S = ct(), [R, w] = re.useState(!0), [b, s] = re.useState();
|
|
742
|
+
let C = Y(q.Section, S.root, d);
|
|
743
|
+
(l || (_ = e.cellProps) != null && _.resizable) && (C = Y(C, S.fill)), (p == null || p == "default") && (C = Y(C, S.default));
|
|
744
744
|
const T = ie.buildSectionStyles(e), M = ie.buildSectionContentStyles(e);
|
|
745
|
-
|
|
746
|
-
const L = u == "horizontal" ?
|
|
745
|
+
R || (u == "horizontal" ? (T.height = "100%", T.width = "50px", T.maxWidth = "50px") : T.height = "fit-content");
|
|
746
|
+
const L = u == "horizontal" ? R ? /* @__PURE__ */ x(Ae, {}) : /* @__PURE__ */ x(Ie, {}) : R ? /* @__PURE__ */ x(Ne, {}) : /* @__PURE__ */ x(_e, {});
|
|
747
747
|
let P = q.SectionHeader;
|
|
748
|
-
u == "horizontal" && (
|
|
748
|
+
u == "horizontal" && (R || (P = Y(P, S.collapsedHorizontalHeader)));
|
|
749
749
|
const N = (z) => {
|
|
750
750
|
var I;
|
|
751
751
|
if (e.cellProps) {
|
|
752
|
-
const { column: k, row: O } = e.cellProps, t = u == "horizontal",
|
|
753
|
-
if (
|
|
754
|
-
const B = (t ?
|
|
752
|
+
const { column: k, row: O } = e.cellProps, t = u == "horizontal", g = z.currentTarget.closest("." + q.Grid), D = t ? k : O;
|
|
753
|
+
if (R) {
|
|
754
|
+
const B = (t ? g.style.gridTemplateColumns : g.style.gridTemplateRows).split(" ")[D - 1];
|
|
755
755
|
s(B);
|
|
756
756
|
}
|
|
757
|
-
const $ =
|
|
758
|
-
Pe.UpdateLayoutGrid(
|
|
757
|
+
const $ = R ? "min-content" : b;
|
|
758
|
+
Pe.UpdateLayoutGrid(g, t, D, $);
|
|
759
759
|
}
|
|
760
|
-
w(!
|
|
760
|
+
w(!R), (I = e.onCollapseChanged) == null || I.call(e, !R);
|
|
761
761
|
};
|
|
762
762
|
return /* @__PURE__ */ Z(oe, { id: h, className: C, style: T, ref: c, role: e.role, children: [
|
|
763
|
-
/* @__PURE__ */ x(V, { className: P, children: /* @__PURE__ */ Z(oe, { fill: !0, alignItems: "center", horizontal: !0, children: [
|
|
763
|
+
/* @__PURE__ */ x(V, { className: P, children: /* @__PURE__ */ Z(oe, { fill: !0, alignItems: "center", horizontal: !0, reverse: !R && u == "horizontal", children: [
|
|
764
764
|
n && /* @__PURE__ */ x(V, { padding: 8, children: n }),
|
|
765
765
|
/* @__PURE__ */ x(V, { grow: 1, children: o && o }),
|
|
766
766
|
i && /* @__PURE__ */ x(V, { children: /* @__PURE__ */ x(be, { appearance: "transparent", icon: L, onClick: N }) })
|
|
767
767
|
] }) }),
|
|
768
|
-
(n || o || i) && /* @__PURE__ */ x(xe, { className:
|
|
769
|
-
/* @__PURE__ */ x(V, { className: q.SectionContent, grow: 1, style: M, children: /* @__PURE__ */ x(st, { visible:
|
|
768
|
+
(n || o || i) && /* @__PURE__ */ x(xe, { className: S.divider }),
|
|
769
|
+
/* @__PURE__ */ x(V, { className: q.SectionContent, grow: 1, style: M, children: /* @__PURE__ */ x(st, { visible: R, children: /* @__PURE__ */ Z("div", { className: Y(S.fill, S.content), children: [
|
|
770
770
|
!f && r,
|
|
771
|
-
f && /* @__PURE__ */ x(we, { className:
|
|
771
|
+
f && /* @__PURE__ */ x(we, { className: S.spinner, label: y, labelPosition: "below" })
|
|
772
772
|
] }) }) })
|
|
773
773
|
] });
|
|
774
774
|
};
|