@5ive-souls/controls 0.0.8 → 0.0.10

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,9 +1,9 @@
1
1
  import { jsxs as Z, jsx as x } from "react/jsx-runtime";
2
- import { makeStyles as Te, tokens as B, mergeClasses as V, Button as be, Divider as xe, Spinner as we } from "@fluentui/react-components";
2
+ import { makeStyles as Te, tokens as U, mergeClasses as Y, Button as be, Divider as xe, Spinner as we } from "@fluentui/react-components";
3
3
  import * as m from "react";
4
4
  import re from "react";
5
5
  import { FlexBox as oe } from "../FlexBox/FlexBox.js";
6
- import { FlexBoxItem as G } from "../FlexBox/FlexBoxItem/FlexBoxItem.js";
6
+ import { FlexBoxItem as V } from "../FlexBox/FlexBoxItem/FlexBoxItem.js";
7
7
  import "../FlexBox/FlexBoxItemResizer/FlexBoxItemResizer.js";
8
8
  import { ClassNames as q } from "../ClassNames.js";
9
9
  import { SectionUtils as ie } from "./SectionUtils.js";
@@ -31,15 +31,15 @@ const ze = {
31
31
  }, A = {
32
32
  ...ze,
33
33
  ...ke
34
- }, le = m.createContext(void 0), De = {
34
+ }, le = m.createContext(void 0), Oe = {
35
35
  // eslint-disable-next-line @nx/workspace-no-restricted-globals -- expected ignore ( SSR friendly acquisition of globals )
36
36
  targetDocument: typeof document == "object" ? document : void 0,
37
37
  dir: "ltr"
38
38
  };
39
39
  le.Provider;
40
- function Oe() {
40
+ function De() {
41
41
  var e;
42
- return (e = m.useContext(le)) !== null && e !== void 0 ? e : De;
42
+ return (e = m.useContext(le)) !== null && e !== void 0 ? e : Oe;
43
43
  }
44
44
  function $e() {
45
45
  return (
@@ -113,20 +113,20 @@ 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: S = h, ...C } = p, y = d ? S : h, w = {
116
+ const { keyframes: h, reducedMotion: p = Ve, ...f } = c, { keyframes: y = h, ...g } = p, S = 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 && C
120
+ ...d && g
121
121
  };
122
122
  try {
123
- const s = n.animate(y, w);
123
+ const s = n.animate(S, w);
124
124
  if (r)
125
125
  s == null || s.persist();
126
126
  else {
127
- const R = y[y.length - 1];
127
+ const C = S[S.length - 1];
128
128
  var b;
129
- Object.assign((b = n.style) !== null && b !== void 0 ? b : {}, R);
129
+ Object.assign((b = n.style) !== null && b !== void 0 ? b : {}, C);
130
130
  }
131
131
  return s;
132
132
  } catch {
@@ -140,8 +140,8 @@ function de() {
140
140
  });
141
141
  },
142
142
  setMotionEndCallbacks(c, h) {
143
- const p = l.map((f) => new Promise((S, C) => {
144
- f.onfinish = () => S(), f.oncancel = () => C();
143
+ const p = l.map((f) => new Promise((y, g) => {
144
+ f.onfinish = () => y(), f.oncancel = () => g();
145
145
  }));
146
146
  Promise.all(p).then(() => {
147
147
  c();
@@ -238,7 +238,7 @@ function je(e) {
238
238
  }
239
239
  const qe = "screen and (prefers-reduced-motion: reduce)";
240
240
  function We() {
241
- const { targetDocument: e } = Oe();
241
+ const { targetDocument: e } = De();
242
242
  var r;
243
243
  const n = (r = e == null ? void 0 : e.defaultView) !== null && r !== void 0 ? r : null, o = m.useRef(!1), i = m.useCallback(() => o.current, []);
244
244
  return W(() => {
@@ -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, S = 60121, C = 60122, y = 60117, w = 60129, b = 60131;
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, g = 60122, S = 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"), S = s("react.block"), C = s("react.server.block"), y = s("react.fundamental"), w = s("react.debug_trace_mode"), b = s("react.legacy_hidden");
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"), g = s("react.server.block"), S = s("react.fundamental"), w = s("react.debug_trace_mode"), b = s("react.legacy_hidden");
276
276
  }
277
- function R(t) {
277
+ function C(t) {
278
278
  if (typeof t == "object" && t !== null) {
279
- var g = t.$$typeof;
280
- switch (g) {
279
+ var R = t.$$typeof;
280
+ switch (R) {
281
281
  case e:
282
282
  switch (t = t.type, t) {
283
283
  case n:
@@ -295,44 +295,44 @@ function Ke() {
295
295
  case u:
296
296
  return t;
297
297
  default:
298
- return g;
298
+ return R;
299
299
  }
300
300
  }
301
301
  case r:
302
- return g;
302
+ return R;
303
303
  }
304
304
  }
305
305
  }
306
- var T = u, M = e, O = l, P = n, N = f, _ = p, z = r, k = i, D = o, I = c;
307
- return v.ContextConsumer = d, v.ContextProvider = T, v.Element = M, v.ForwardRef = O, v.Fragment = P, v.Lazy = N, v.Memo = _, v.Portal = z, v.Profiler = k, v.StrictMode = D, v.Suspense = I, v.isAsyncMode = function() {
306
+ var T = u, M = e, L = l, P = n, N = f, _ = p, z = r, I = i, k = o, O = c;
307
+ return v.ContextConsumer = d, v.ContextProvider = T, v.Element = M, v.ForwardRef = L, v.Fragment = P, v.Lazy = N, v.Memo = _, v.Portal = z, v.Profiler = I, v.StrictMode = k, v.Suspense = O, v.isAsyncMode = function() {
308
308
  return !1;
309
309
  }, v.isConcurrentMode = function() {
310
310
  return !1;
311
311
  }, v.isContextConsumer = function(t) {
312
- return R(t) === d;
312
+ return C(t) === d;
313
313
  }, v.isContextProvider = function(t) {
314
- return R(t) === u;
314
+ return C(t) === u;
315
315
  }, v.isElement = function(t) {
316
316
  return typeof t == "object" && t !== null && t.$$typeof === e;
317
317
  }, v.isForwardRef = function(t) {
318
- return R(t) === l;
318
+ return C(t) === l;
319
319
  }, v.isFragment = function(t) {
320
- return R(t) === n;
320
+ return C(t) === n;
321
321
  }, v.isLazy = function(t) {
322
- return R(t) === f;
322
+ return C(t) === f;
323
323
  }, v.isMemo = function(t) {
324
- return R(t) === p;
324
+ return C(t) === p;
325
325
  }, v.isPortal = function(t) {
326
- return R(t) === r;
326
+ return C(t) === r;
327
327
  }, v.isProfiler = function(t) {
328
- return R(t) === i;
328
+ return C(t) === i;
329
329
  }, v.isStrictMode = function(t) {
330
- return R(t) === o;
330
+ return C(t) === o;
331
331
  }, v.isSuspense = function(t) {
332
- return R(t) === c;
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 === y || t.$$typeof === S || t[0] === C);
335
- }, v.typeOf = R, v;
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 === S || t.$$typeof === y || t[0] === g);
335
+ }, v.typeOf = C, v;
336
336
  }
337
337
  var E = {};
338
338
  /** @license React v17.0.2
@@ -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, S = 60121, C = 60122, y = 60117, w = 60129, b = 60131;
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, g = 60122, S = 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"), S = s("react.block"), C = s("react.server.block"), y = s("react.fundamental"), s("react.scope"), s("react.opaque.id"), w = s("react.debug_trace_mode"), s("react.offscreen"), b = s("react.legacy_hidden");
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"), g = s("react.server.block"), S = 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
- var R = !1;
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 || R || typeof a == "object" && a !== null && (a.$$typeof === f || a.$$typeof === p || a.$$typeof === u || a.$$typeof === d || a.$$typeof === l || a.$$typeof === y || a.$$typeof === S || a[0] === C));
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 === S || a.$$typeof === y || a[0] === g));
357
357
  }
358
358
  function M(a) {
359
359
  if (typeof a == "object" && a !== null) {
@@ -386,12 +386,12 @@ function Xe() {
386
386
  }
387
387
  }
388
388
  }
389
- var O = d, P = u, N = e, _ = l, z = n, k = f, D = p, I = r, t = i, g = o, $ = c, L = !1, U = !1;
390
- function F(a) {
391
- return L || (L = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
389
+ var L = d, P = u, N = e, _ = l, z = n, I = f, k = p, O = r, t = i, R = o, D = c, $ = !1, F = !1;
390
+ function G(a) {
391
+ return $ || ($ = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")), !1;
392
392
  }
393
- function Y(a) {
394
- return U || (U = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
393
+ function B(a) {
394
+ return F || (F = !0, console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")), !1;
395
395
  }
396
396
  function H(a) {
397
397
  return M(a) === d;
@@ -408,10 +408,10 @@ function Xe() {
408
408
  function he(a) {
409
409
  return M(a) === n;
410
410
  }
411
- function Re(a) {
411
+ function Ce(a) {
412
412
  return M(a) === f;
413
413
  }
414
- function Ce(a) {
414
+ function Re(a) {
415
415
  return M(a) === p;
416
416
  }
417
417
  function ge(a) {
@@ -426,7 +426,7 @@ function Xe() {
426
426
  function Me(a) {
427
427
  return M(a) === c;
428
428
  }
429
- E.ContextConsumer = O, E.ContextProvider = P, E.Element = N, E.ForwardRef = _, E.Fragment = z, E.Lazy = k, E.Memo = D, E.Portal = I, E.Profiler = t, E.StrictMode = g, E.Suspense = $, E.isAsyncMode = F, E.isConcurrentMode = Y, E.isContextConsumer = H, E.isContextProvider = X, E.isElement = ve, E.isForwardRef = Ee, E.isFragment = he, E.isLazy = Re, E.isMemo = Ce, E.isPortal = ge, E.isProfiler = Se, E.isStrictMode = ye, E.isSuspense = Me, E.isValidElementType = T, E.typeOf = M;
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 = R, 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,19 +472,19 @@ 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: S, unmountOnExit: C, ...y } = o, w = y, [b, s] = tt(S, C), R = Ze(d), T = je(l), M = m.useRef(), O = Ue(M, R.ref), P = m.useRef({
475
+ }, i = Je() === "skip", { appear: u, children: d, imperativeRef: l, onExit: c, onMotionFinish: h, onMotionStart: p, onMotionCancel: f, visible: y, unmountOnExit: g, ...S } = o, w = S, [b, s] = tt(y, g), 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
479
- }), N = He(), _ = Le(), z = We(), k = J((t) => {
479
+ }), N = He(), _ = Le(), z = We(), I = J((t) => {
480
480
  p == null || p(null, {
481
481
  direction: t
482
482
  });
483
- }), D = J((t) => {
483
+ }), k = J((t) => {
484
484
  h == null || h(null, {
485
485
  direction: t
486
- }), t === "exit" && C && (s(!1), c == null || c());
487
- }), I = J((t) => {
486
+ }), t === "exit" && g && (s(!1), c == null || c());
487
+ }), O = J((t) => {
488
488
  f == null || f(null, {
489
489
  direction: t
490
490
  });
@@ -500,20 +500,20 @@ function K(e) {
500
500
  const t = M.current;
501
501
  if (!t)
502
502
  return;
503
- let g;
504
- function $() {
505
- g && (U && g.isRunning() || (g.cancel(), T.current = void 0));
503
+ let R;
504
+ function D() {
505
+ R && (F && R.isRunning() || (R.cancel(), T.current = void 0));
506
506
  }
507
- const L = typeof e == "function" ? e({
507
+ const $ = typeof e == "function" ? e({
508
508
  element: t,
509
509
  ...P.current.params
510
- }) : e, U = L[rt];
511
- if (U && (g = T.current, g && g.isRunning()))
512
- return g.reverse(), $;
513
- const F = S ? L.enter : L.exit, Y = S ? "enter" : "exit", H = !P.current.appear && _, X = P.current.skipMotions;
514
- return H || k(Y), g = N(t, F, {
510
+ }) : e, F = $[rt];
511
+ if (F && (R = T.current, R && R.isRunning()))
512
+ return R.reverse(), D;
513
+ const G = y ? $.enter : $.exit, B = y ? "enter" : "exit", H = !P.current.appear && _, X = P.current.skipMotions;
514
+ return H || I(B), R = N(t, G, {
515
515
  isReducedMotion: z()
516
- }), H ? (g.finish(), $) : (T.current = g, g.setMotionEndCallbacks(() => D(Y), () => I(Y)), X && g.finish(), $);
516
+ }), H ? (R.finish(), D) : (T.current = R, R.setMotionEndCallbacks(() => k(B), () => O(B)), X && R.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
@@ -521,13 +521,13 @@ function K(e) {
521
521
  N,
522
522
  T,
523
523
  z,
524
- D,
525
524
  k,
526
525
  I,
527
- S
526
+ O,
527
+ y
528
528
  ]
529
- ), b ? m.cloneElement(R, {
530
- ref: O
529
+ ), b ? m.cloneElement(C, {
530
+ ref: L
531
531
  }) : null;
532
532
  }, {
533
533
  // Heads up!
@@ -656,12 +656,12 @@ const me = (e, r) => {
656
656
  delay: o,
657
657
  fill: "both"
658
658
  });
659
- const S = [];
660
- return h && S.push(ue({
659
+ const y = [];
660
+ return h && y.push(ue({
661
661
  direction: "exit",
662
662
  duration: u,
663
663
  easing: d
664
- })), S.push(it({
664
+ })), y.push(it({
665
665
  orientation: p,
666
666
  duration: i,
667
667
  easing: d,
@@ -675,7 +675,7 @@ const me = (e, r) => {
675
675
  delay: l
676
676
  })), {
677
677
  enter: f,
678
- exit: S
678
+ exit: y
679
679
  };
680
680
  }, te = ({ enterDuration: e = A.durationNormal, enterEasing: r = A.curveEasyEaseMax, exitDuration: n = e, exitEasing: o = r } = {}) => (
681
681
  // Implement a regular collapse as a special case of the delayed collapse,
@@ -702,20 +702,20 @@ K(pe({
702
702
  }));
703
703
  const ct = Te({
704
704
  root: {
705
- backgroundColor: B.colorNeutralBackground1,
705
+ backgroundColor: U.colorNeutralBackground1,
706
706
  boxSizing: "border-box",
707
707
  overflow: "hidden"
708
708
  },
709
709
  default: {
710
- border: "1px solid " + B.colorNeutralForeground1,
711
- borderRadius: B.borderRadiusMedium,
712
- boxShadow: B.shadow16Brand,
713
- transitionDuration: B.durationNormal,
710
+ border: "1px solid " + U.colorNeutralForeground1,
711
+ borderRadius: U.borderRadiusMedium,
712
+ boxShadow: U.shadow16Brand,
713
+ transitionDuration: U.durationNormal,
714
714
  transitionTimingFunction: "ease",
715
715
  transitionProperty: "box-shadow, border",
716
716
  ":hover": {
717
- boxShadow: B.shadow28Brand,
718
- border: "1px solid " + B.colorBrandForeground2Hover
717
+ boxShadow: U.shadow28Brand,
718
+ border: "1px solid " + U.colorBrandForeground2Hover
719
719
  }
720
720
  },
721
721
  divider: {
@@ -738,36 +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: S } = e, C = ct(), [y, w] = re.useState(!0), [b, s] = re.useState();
742
- let R = V(q.Section, C.root, d);
743
- (l || (_ = e.cellProps) != null && _.resizable) && (R = V(R, C.fill)), (p == null || p == "default") && (R = V(R, C.default));
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, g = ct(), [S, w] = re.useState(!0), [b, s] = re.useState();
742
+ let C = Y(q.Section, g.root, d);
743
+ (l || (_ = e.cellProps) != null && _.resizable) && (C = Y(C, g.fill)), (p == null || p == "default") && (C = Y(C, g.default));
744
744
  const T = ie.buildSectionStyles(e), M = ie.buildSectionContentStyles(e);
745
- y || (e.collapseDirection == "horizontal" ? (T.height = "100%", T.width = "50px", T.maxWidth = "50px") : T.height = "fit-content");
746
- const O = u == "horizontal" ? y ? /* @__PURE__ */ x(Ae, {}) : /* @__PURE__ */ x(Ie, {}) : y ? /* @__PURE__ */ x(Ne, {}) : /* @__PURE__ */ x(_e, {});
745
+ S || (u == "horizontal" ? (T.height = "100%", T.width = "50px", T.maxWidth = "50px") : T.height = "fit-content");
746
+ const L = u == "horizontal" ? S ? /* @__PURE__ */ x(Ae, {}) : /* @__PURE__ */ x(Ie, {}) : S ? /* @__PURE__ */ x(Ne, {}) : /* @__PURE__ */ x(_e, {});
747
747
  let P = q.SectionHeader;
748
- e.collapseDirection == "horizontal" && (y || (P = V(P, C.collapsedHorizontalHeader)));
748
+ u == "horizontal" && (S || (P = Y(P, g.collapsedHorizontalHeader)));
749
749
  const N = (z) => {
750
+ var I;
750
751
  if (e.cellProps) {
751
- const { column: k, row: D } = e.cellProps, I = u == "horizontal", t = z.currentTarget.closest("." + q.Grid), g = I ? k : D;
752
- if (y) {
753
- const F = (I ? t.style.gridTemplateColumns : t.style.gridTemplateRows).split(" ")[g - 1];
754
- s(F);
752
+ const { column: k, row: O } = e.cellProps, t = u == "horizontal", R = z.currentTarget.closest("." + q.Grid), D = t ? k : O;
753
+ if (S) {
754
+ const B = (t ? R.style.gridTemplateColumns : R.style.gridTemplateRows).split(" ")[D - 1];
755
+ s(B);
755
756
  }
756
- const $ = y ? "min-content" : b;
757
- Pe.UpdateLayoutGrid(t, I, g, $);
757
+ const $ = S ? "min-content" : b;
758
+ Pe.UpdateLayoutGrid(R, t, D, $);
758
759
  }
759
- w(!y);
760
+ w(!S), (I = e.onCollapseChanged) == null || I.call(e, !S);
760
761
  };
761
- return /* @__PURE__ */ Z(oe, { id: h, className: R, style: T, ref: c, role: e.role, children: [
762
- /* @__PURE__ */ x(G, { className: P, children: /* @__PURE__ */ Z(oe, { fill: !0, alignItems: "center", horizontal: !0, children: [
763
- n && /* @__PURE__ */ x(G, { padding: 8, children: n }),
764
- /* @__PURE__ */ x(G, { grow: 1, children: o && o }),
765
- i && /* @__PURE__ */ x(G, { children: /* @__PURE__ */ x(be, { appearance: "transparent", icon: O, onClick: N }) })
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: [
764
+ n && /* @__PURE__ */ x(V, { padding: 8, children: n }),
765
+ /* @__PURE__ */ x(V, { grow: 1, children: o && o }),
766
+ i && /* @__PURE__ */ x(V, { children: /* @__PURE__ */ x(be, { appearance: "transparent", icon: L, onClick: N }) })
766
767
  ] }) }),
767
- (n || o || i) && /* @__PURE__ */ x(xe, { className: C.divider }),
768
- /* @__PURE__ */ x(G, { className: q.SectionContent, grow: 1, style: M, children: /* @__PURE__ */ x(st, { visible: y, children: /* @__PURE__ */ Z("div", { className: V(C.fill, C.content), children: [
768
+ (n || o || i) && /* @__PURE__ */ x(xe, { className: g.divider }),
769
+ /* @__PURE__ */ x(V, { className: q.SectionContent, grow: 1, style: M, children: /* @__PURE__ */ x(st, { visible: S, children: /* @__PURE__ */ Z("div", { className: Y(g.fill, g.content), children: [
769
770
  !f && r,
770
- f && /* @__PURE__ */ x(we, { className: C.spinner, label: S, labelPosition: "below" })
771
+ f && /* @__PURE__ */ x(we, { className: g.spinner, label: y, labelPosition: "below" })
771
772
  ] }) }) })
772
773
  ] });
773
774
  };
package/dist/main.d.ts CHANGED
@@ -452,9 +452,14 @@ export declare interface ISectionProps extends IComponentProps {
452
452
  */
453
453
  collapsible?: boolean;
454
454
  /**
455
- *
455
+ * Determines which direction to collapse the content.
456
456
  */
457
457
  collapseDirection?: "vertical" | "horizontal";
458
+ /**
459
+ * Callback invoked when the collapsed state changes.
460
+ * @param isExpanded Value representing is the content is expanded or not.
461
+ */
462
+ onCollapseChanged?: (isExpanded: boolean) => void;
458
463
  /**
459
464
  * Applies styling to have the section consume 100% of it's parent's height and width.
460
465
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5ive-souls/controls",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Collection of react components built on the Fluent UI framework.",
5
5
  "keywords": [
6
6
  "react",