@spteck/react-controls-v2 2.6.5 → 2.6.7

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.
package/dist/index.js CHANGED
@@ -57563,34 +57563,41 @@ var CC = Object.assign(SC, {
57563
57563
  borderColor: `${G.colorBrandStroke1} !important`,
57564
57564
  boxShadow: `0 0 0 2px ${G.colorBrandBackground2} !important`
57565
57565
  }
57566
- }) }), TC = ({ options: e, onChange: t, renderItem: n, validate: r, label: i, placeholder: a, defaultValue: o, message: s, messageType: c, required: l, size: u, hint: d }) => {
57567
- let f = o ? e.find((e) => e.value === o) : void 0, [p, m] = L(o || ""), [h, g] = L(f?.text || ""), [_, v] = L(""), y = wC(), b = (e, n) => {
57568
- let i = n.optionValue || "", a = n.optionText || "";
57569
- m(i), g(a);
57566
+ }) }), TC = ({ options: e, onChange: t, renderItem: n, validate: r, label: i, placeholder: a, defaultValue: o, value: s, message: c, messageType: l, required: u, size: d, hint: f }) => {
57567
+ let p = s !== void 0, m = (t) => t ? e.find((e) => e.value === t) : void 0, h = p ? s : o ?? "", g = m(h), [_, v] = L(h), [y, b] = L(g?.text ?? ""), [x, S] = L("");
57568
+ j.useEffect(() => {
57569
+ if (p) {
57570
+ let e = m(s);
57571
+ v(s ?? ""), b(e?.text ?? "");
57572
+ }
57573
+ }, [s, p]);
57574
+ let C = p ? s ?? "" : _, w = p ? m(s)?.text ?? y : y, T = wC(), E = (e, n) => {
57575
+ let i = n.optionValue ?? "", a = n.optionText ?? "";
57576
+ p || (v(i), b(a));
57570
57577
  let o = r ? r(i) : "";
57571
- v(o), !o && t && t(i);
57572
- }, x = j.useMemo(() => _ ? "error" : c === "warning" ? "warning" : c === "info" ? "success" : "none", [_, c]);
57578
+ S(o), !o && t && t(i);
57579
+ }, D = j.useMemo(() => x ? "error" : l === "warning" ? "warning" : l === "info" ? "success" : "none", [x, l]);
57573
57580
  return /* @__PURE__ */ z(Zn, {
57574
57581
  label: i,
57575
- required: l,
57576
- validationMessage: j.useMemo(() => _ || s, [_, s]),
57582
+ required: u,
57583
+ validationMessage: j.useMemo(() => x || c, [x, c]),
57577
57584
  validationMessageIcon: j.useCallback(() => {
57578
- switch (x) {
57585
+ switch (D) {
57579
57586
  case "error": return /* @__PURE__ */ z(fa, {});
57580
57587
  case "warning": return /* @__PURE__ */ z(Aa, {});
57581
57588
  case "success": return /* @__PURE__ */ z(Qi, {});
57582
57589
  default: return null;
57583
57590
  }
57584
- }, [x])(),
57585
- size: u,
57586
- hint: d,
57587
- validationState: x,
57591
+ }, [D])(),
57592
+ size: d,
57593
+ hint: f,
57594
+ validationState: D,
57588
57595
  children: /* @__PURE__ */ z(Xn, {
57589
57596
  placeholder: a,
57590
- onOptionSelect: b,
57591
- value: h,
57592
- selectedOptions: p ? [p] : [],
57593
- className: y.dropdownRoot,
57597
+ onOptionSelect: E,
57598
+ value: w,
57599
+ selectedOptions: C ? [C] : [],
57600
+ className: T.dropdownRoot,
57594
57601
  children: e.map((e) => {
57595
57602
  let t = e.icon ?? e.checkIcon;
57596
57603
  return /* @__PURE__ */ z(Er, {
@@ -67507,44 +67514,99 @@ var Ak = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/, jk = (e) => {
67507
67514
  textAlign: "right"
67508
67515
  }
67509
67516
  }, Lk = (e, t, n = "image") => {
67510
- let { borderRadius: r } = e, { getBaseStyles: i } = C_(), a = r ?? G.borderRadiusMedium;
67511
- return {
67512
- heroRootStyles: j.useCallback((t, n) => ({
67513
- ...i(e, t, n),
67514
- overflow: "hidden"
67515
- }), [i, e]),
67516
- item: K({
67517
- position: "relative",
67518
- overflow: "hidden",
67519
- width: "100%",
67520
- height: "100%",
67521
- borderRadius: a,
67522
- animation: `${Fk} 0.5s ease-out`
67523
- }),
67524
- overlayRoot: K({
67525
- position: "absolute",
67526
- inset: 0,
67527
- display: "flex",
67528
- flexDirection: "column",
67529
- borderRadius: a,
67530
- overflow: "hidden",
67531
- zIndex: 1,
67532
- pointerEvents: "none",
67533
- background: `color-mix(in srgb, ${G.colorBackgroundOverlay} 50%, transparent)`
67534
- }),
67535
- overlayScrim: (e) => K({
67536
- position: "absolute",
67537
- inset: 0,
67538
- background: `linear-gradient(
67517
+ let { borderRadius: r } = e, { getBaseStyles: i } = C_(), a = r ?? G.borderRadiusMedium, o = t > 0 && t < 576, s = j.useCallback((t, n) => ({
67518
+ ...i(e, t, n),
67519
+ overflow: "hidden"
67520
+ }), [i, e]), c = K({
67521
+ position: "relative",
67522
+ overflow: "hidden",
67523
+ width: "100%",
67524
+ height: "100%",
67525
+ borderRadius: a,
67526
+ animation: `${Fk} 0.5s ease-out`
67527
+ }), l = K({
67528
+ position: "absolute",
67529
+ inset: 0,
67530
+ display: "flex",
67531
+ flexDirection: "column",
67532
+ borderRadius: a,
67533
+ overflow: "hidden",
67534
+ zIndex: 1,
67535
+ pointerEvents: "none",
67536
+ background: `color-mix(in srgb, ${G.colorBackgroundOverlay} 50%, transparent)`
67537
+ }), u = (e) => K({
67538
+ position: "absolute",
67539
+ inset: 0,
67540
+ background: `linear-gradient(
67539
67541
  to top,
67540
67542
  color-mix(in srgb, black ${Math.min(Math.round(e * 100), 100)}%, transparent) 0%,
67541
67543
  color-mix(in srgb, black ${Math.min(Math.round(e * 30), 100)}%, transparent) 55%,
67542
67544
  transparent 100%
67543
67545
  )`,
67544
- zIndex: 0
67545
- }),
67546
+ zIndex: 0
67547
+ }), d = G.spacingHorizontalXL, f = G.spacingHorizontalXXL, p = "40px", m = {
67548
+ "top-left": {
67549
+ paddingTop: p,
67550
+ paddingRight: d,
67551
+ paddingBottom: d,
67552
+ paddingLeft: p
67553
+ },
67554
+ "top-center": {
67555
+ paddingTop: f,
67556
+ paddingRight: d,
67557
+ paddingBottom: d,
67558
+ paddingLeft: d
67559
+ },
67560
+ "top-right": {
67561
+ paddingTop: p,
67562
+ paddingRight: p,
67563
+ paddingBottom: d,
67564
+ paddingLeft: d
67565
+ },
67566
+ "center-left": {
67567
+ paddingTop: d,
67568
+ paddingRight: d,
67569
+ paddingBottom: d,
67570
+ paddingLeft: f
67571
+ },
67572
+ center: {
67573
+ paddingTop: d,
67574
+ paddingRight: d,
67575
+ paddingBottom: d,
67576
+ paddingLeft: d
67577
+ },
67578
+ "center-right": {
67579
+ paddingTop: d,
67580
+ paddingRight: f,
67581
+ paddingBottom: d,
67582
+ paddingLeft: d
67583
+ },
67584
+ "bottom-left": {
67585
+ paddingTop: d,
67586
+ paddingRight: d,
67587
+ paddingBottom: p,
67588
+ paddingLeft: p
67589
+ },
67590
+ "bottom-center": {
67591
+ paddingTop: d,
67592
+ paddingRight: d,
67593
+ paddingBottom: f,
67594
+ paddingLeft: d
67595
+ },
67596
+ "bottom-right": {
67597
+ paddingTop: d,
67598
+ paddingRight: p,
67599
+ paddingBottom: p,
67600
+ paddingLeft: d
67601
+ }
67602
+ };
67603
+ return {
67604
+ heroRootStyles: s,
67605
+ item: c,
67606
+ overlayRoot: l,
67607
+ overlayScrim: u,
67546
67608
  overlayContent: (e) => {
67547
- let { justify: t, align: r, textAlign: i } = Ik[e] ?? Ik["bottom-left"];
67609
+ let { justify: t, align: r, textAlign: i } = Ik[e] ?? Ik["bottom-left"], a = m[e] ?? m["bottom-left"], o = n === "video" ? "74px" : a.paddingBottom;
67548
67610
  return K({
67549
67611
  position: "relative",
67550
67612
  flex: 1,
@@ -67554,8 +67616,10 @@ var Ak = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/, jk = (e) => {
67554
67616
  alignItems: r,
67555
67617
  textAlign: i,
67556
67618
  zIndex: 1,
67557
- padding: G.spacingHorizontalXL,
67558
- paddingBottom: n === "video" ? "74px" : G.spacingHorizontalL,
67619
+ paddingTop: a.paddingTop,
67620
+ paddingRight: a.paddingRight,
67621
+ paddingBottom: o,
67622
+ paddingLeft: a.paddingLeft,
67559
67623
  gap: G.spacingVerticalS,
67560
67624
  pointerEvents: "none"
67561
67625
  });
@@ -67571,13 +67635,16 @@ var Ak = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/, jk = (e) => {
67571
67635
  overlayTitle: K({
67572
67636
  textShadow: "0 1px 4px color-mix(in srgb, black 65%, transparent)",
67573
67637
  color: G.colorNeutralForegroundStaticInverted,
67574
- margin: 0
67638
+ margin: 0,
67639
+ maxWidth: "80ch",
67640
+ lineHeight: 1.1
67575
67641
  }),
67576
67642
  overlayDescription: K({
67577
67643
  textShadow: "0 1px 3px color-mix(in srgb, black 50%, transparent)",
67578
67644
  color: G.colorNeutralForegroundStaticInverted,
67579
67645
  opacity: .9,
67580
- margin: 0
67646
+ margin: 0,
67647
+ maxWidth: "80ch"
67581
67648
  }),
67582
67649
  overlayCta: K({
67583
67650
  flexShrink: 0,
@@ -67591,7 +67658,7 @@ var Ak = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/, jk = (e) => {
67591
67658
  }),
67592
67659
  splitRoot: K({
67593
67660
  display: "grid",
67594
- gridTemplateColumns: t < 576 ? "1fr" : "1fr 1fr",
67661
+ gridTemplateColumns: o ? "1fr" : "1fr 1fr",
67595
67662
  gap: "3px",
67596
67663
  width: "100%",
67597
67664
  height: "100%",
@@ -67599,7 +67666,7 @@ var Ak = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/, jk = (e) => {
67599
67666
  }),
67600
67667
  featuredRoot: K({
67601
67668
  display: "grid",
67602
- gridTemplateColumns: t < 576 ? "1fr" : "2fr 1fr",
67669
+ gridTemplateColumns: o ? "1fr" : "2fr 1fr",
67603
67670
  gap: "3px",
67604
67671
  width: "100%",
67605
67672
  height: "100%",
@@ -67607,44 +67674,45 @@ var Ak = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/, jk = (e) => {
67607
67674
  }),
67608
67675
  mosaicWrapper: K({
67609
67676
  width: "100%",
67610
- height: t < 576 ? "auto" : "100%",
67677
+ height: o ? "auto" : "100%",
67611
67678
  gap: "3px",
67612
- overflow: t < 576 ? "visible" : "hidden"
67679
+ overflow: o ? "visible" : "hidden"
67613
67680
  }),
67614
67681
  mosaicPrimary: K({
67615
- flex: t < 576 ? "none" : "3 0 0",
67682
+ flex: o ? "none" : "3 0 0",
67616
67683
  minWidth: 0,
67617
67684
  width: "100%",
67618
- height: t < 576 ? "260px" : "100%"
67685
+ height: o ? "260px" : "100%"
67619
67686
  }),
67620
67687
  mosaicRightGrid: (e) => {
67621
- let n = t >= 1100 && e >= 3, r = t < 576 ? "1fr" : n ? "1fr 1fr" : "1fr", i = t < 576 ? void 0 : e === 1 ? "1fr" : n ? "1fr 1fr" : `repeat(${e}, 1fr)`;
67688
+ let n = t >= 1100 && e >= 3, r = o ? "1fr" : n ? "1fr 1fr" : "1fr", i = o ? void 0 : e === 1 ? "1fr" : n ? "1fr 1fr" : `repeat(${e}, 1fr)`;
67622
67689
  return K({
67623
- flex: t < 576 ? "none" : "2 0 0",
67624
- width: t < 576 ? "100%" : void 0,
67690
+ flex: o ? "none" : "2 0 0",
67691
+ width: o ? "100%" : void 0,
67625
67692
  minWidth: 0,
67626
67693
  display: "grid",
67627
67694
  gap: "3px",
67628
67695
  gridTemplateColumns: r,
67629
67696
  gridTemplateRows: i,
67630
- height: t < 576 ? "auto" : "100%"
67697
+ height: o ? "auto" : "100%"
67631
67698
  });
67632
67699
  },
67633
67700
  mosaicSpanFull: K({ gridColumn: "1 / -1" }),
67634
67701
  mosaicMarqueeLane: K({
67635
- flex: t < 576 ? "none" : "2 0 0",
67702
+ flex: o ? "none" : "2 0 0",
67636
67703
  minWidth: 0,
67637
- height: t < 576 ? "320px" : "100%",
67704
+ height: o ? "320px" : "100%",
67638
67705
  overflow: "hidden"
67639
67706
  }),
67640
67707
  mosaicMarqueeItem: K({
67641
67708
  flex: "0 0 auto",
67642
- minHeight: t < 576 ? "160px" : "120px"
67709
+ height: o ? "160px" : "180px",
67710
+ width: "100%"
67643
67711
  }),
67644
67712
  mosaicScrollLane: K({
67645
- flex: t < 576 ? "none" : "2 0 0",
67713
+ flex: o ? "none" : "2 0 0",
67646
67714
  minWidth: 0,
67647
- height: t < 576 ? "320px" : "100%",
67715
+ height: o ? "320px" : "100%",
67648
67716
  overflowY: "auto",
67649
67717
  overflowX: "hidden",
67650
67718
  scrollbarWidth: "thin",
@@ -67661,7 +67729,7 @@ var Ak = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/, jk = (e) => {
67661
67729
  }),
67662
67730
  gridRoot: K({
67663
67731
  display: "grid",
67664
- gridTemplateColumns: `repeat(${t >= 1200 ? 4 : t >= 992 ? 3 : t >= 576 ? 2 : 1}, 1fr)`,
67732
+ gridTemplateColumns: `repeat(${t === 0 ? 2 : t >= 1200 ? 4 : t >= 992 ? 3 : t >= 576 ? 2 : 1}, 1fr)`,
67665
67733
  gap: "3px",
67666
67734
  width: "100%"
67667
67735
  }),
@@ -67677,7 +67745,7 @@ var Ak = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/, jk = (e) => {
67677
67745
  paddingBottom: G.spacingVerticalXS
67678
67746
  }),
67679
67747
  filmstripItem: K({
67680
- flex: `0 0 ${t >= 1200 ? "400px" : t >= 992 ? "340px" : t >= 576 ? "280px" : "220px"}`,
67748
+ flex: `0 0 ${t === 0 ? "280px" : t >= 1200 ? "400px" : t >= 992 ? "340px" : t >= 576 ? "280px" : "220px"}`,
67681
67749
  scrollSnapAlign: "start"
67682
67750
  }),
67683
67751
  carouselWrapper: K({
@@ -67774,24 +67842,24 @@ Vk.displayName = "BackgroundVideo";
67774
67842
  //#region src/components/Hero/HeroOverlay.tsx
67775
67843
  var Hk = j.memo(({ item: e, heroProps: t, containerWidth: n, mediaType: r = "image" }) => {
67776
67844
  let { title: i, description: a, callToActionLabel: o, callToActionUrl: s, textPosition: c = "bottom-left", overlayOpacity: l = .45 } = e, u = i || a || o, { overlayRoot: d, overlayScrim: f, overlayContent: p, overlayTextGroup: m, overlayTitle: h, overlayDescription: g, overlayCta: _ } = Lk(t, n, r);
67777
- return u ? /* @__PURE__ */ B(Y, {
67845
+ return u ? /* @__PURE__ */ B("div", {
67778
67846
  className: d,
67779
- children: [/* @__PURE__ */ z(Y, {
67847
+ children: [/* @__PURE__ */ z("div", {
67780
67848
  className: f(l),
67781
67849
  "aria-hidden": "true"
67782
- }), /* @__PURE__ */ B(Y, {
67850
+ }), /* @__PURE__ */ B("div", {
67783
67851
  className: p(c),
67784
67852
  children: [(i || a) && /* @__PURE__ */ B("div", {
67785
67853
  className: m,
67786
67854
  children: [i && /* @__PURE__ */ z(Dv, {
67787
- fontSize: "l",
67855
+ fontSize: "xl",
67788
67856
  fontWeight: "bold",
67789
67857
  numberOfLines: 2,
67790
67858
  truncate: !0,
67791
67859
  className: h,
67792
67860
  children: i
67793
67861
  }), a && /* @__PURE__ */ z(Dv, {
67794
- fontSize: "s",
67862
+ fontSize: "m",
67795
67863
  numberOfLines: 2,
67796
67864
  className: g,
67797
67865
  children: a
@@ -67808,11 +67876,7 @@ var Hk = j.memo(({ item: e, heroProps: t, containerWidth: n, mediaType: r = "ima
67808
67876
  })]
67809
67877
  })]
67810
67878
  }) : null;
67811
- });
67812
- Hk.displayName = "HeroOverlay";
67813
- //#endregion
67814
- //#region src/components/Hero/HeroItem.tsx
67815
- var Uk = j.memo(({ item: e, heroProps: t, containerWidth: n, className: r, itemHeight: i }) => {
67879
+ }), Uk = j.memo(({ item: e, heroProps: t, containerWidth: n, className: r, itemHeight: i }) => {
67816
67880
  let { item: a } = Lk(t, n), o = i === void 0 ? "100%" : typeof i == "number" ? `${i}px` : i, s = e.mediaType === "video" && e.videoControls === !1 && e.autoPlay;
67817
67881
  return /* @__PURE__ */ z(Y, {
67818
67882
  className: W(a, r),
@@ -67835,7 +67899,7 @@ var Uk = j.memo(({ item: e, heroProps: t, containerWidth: n, className: r, itemH
67835
67899
  item: e,
67836
67900
  heroProps: t,
67837
67901
  containerWidth: n,
67838
- mediaType: "image"
67902
+ mediaType: "video"
67839
67903
  })] }) : /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(IT, {
67840
67904
  url: e.src,
67841
67905
  width: "100%",
@@ -67852,11 +67916,7 @@ var Uk = j.memo(({ item: e, heroProps: t, containerWidth: n, className: r, itemH
67852
67916
  mediaType: e.videoControls === !1 ? "image" : "video"
67853
67917
  })] })
67854
67918
  });
67855
- });
67856
- Uk.displayName = "HeroItem";
67857
- //#endregion
67858
- //#region src/components/Hero/useHeroLayout.ts
67859
- var Wk = (e) => ({
67919
+ }), Wk = (e) => ({
67860
67920
  resolvedHeight: j.useMemo(() => typeof e == "number" ? `${e}px` : e, [e]),
67861
67921
  numericHeight: j.useMemo(() => typeof e == "number" ? e : parseInt(String(e), 10) || 480, [e]),
67862
67922
  mosaicHeight: j.useMemo(() => typeof e == "number" ? `${e + 30}px` : `calc(${e} + 30px)`, [e])
@@ -67871,121 +67931,99 @@ var Wk = (e) => ({
67871
67931
  containerWidth: r
67872
67932
  })
67873
67933
  }) : null;
67874
- };
67875
- Gk.displayName = "HeroFullscreen";
67876
- //#endregion
67877
- //#region src/components/Hero/layouts/HeroSplit.tsx
67878
- var Kk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
67879
- let { splitRoot: i } = Lk(n, r), a = Ds(e, 2, n.rotation), { resolvedHeight: o } = Wk(t);
67880
- return /* @__PURE__ */ z(Y, {
67881
- className: i,
67882
- height: o,
67883
- children: a.map((e) => /* @__PURE__ */ z(Uk, {
67934
+ }, Kk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
67935
+ let i = Ds(e, 2, n.rotation), { resolvedHeight: a } = Wk(t);
67936
+ return /* @__PURE__ */ z(Q_, {
67937
+ styles: {
67938
+ gridTemplateColumns: r > 0 && r < 576 ? "1fr" : "1fr 1fr",
67939
+ height: a,
67940
+ gap: "3px",
67941
+ overflow: "hidden"
67942
+ },
67943
+ children: i.map((e) => /* @__PURE__ */ z(Uk, {
67884
67944
  item: e,
67885
67945
  heroProps: n,
67886
67946
  containerWidth: r
67887
67947
  }, e.id))
67888
67948
  });
67889
- };
67890
- Kk.displayName = "HeroSplit";
67891
- //#endregion
67892
- //#region src/components/Hero/layouts/HeroFeatured.tsx
67893
- var qk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
67894
- let { featuredRoot: i } = Lk(n, r), a = Ds(e, 2, n.rotation), { resolvedHeight: o } = Wk(t);
67895
- return /* @__PURE__ */ z(Y, {
67896
- className: i,
67897
- height: o,
67898
- children: a.map((e) => /* @__PURE__ */ z(Uk, {
67949
+ }, qk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
67950
+ let i = Ds(e, 2, n.rotation), { resolvedHeight: a } = Wk(t);
67951
+ return /* @__PURE__ */ z(Q_, {
67952
+ styles: {
67953
+ gridTemplateColumns: r > 0 && r < 576 ? "1fr" : "2fr 1fr",
67954
+ height: a,
67955
+ gap: "3px",
67956
+ overflow: "hidden"
67957
+ },
67958
+ children: i.map((e) => /* @__PURE__ */ z(Uk, {
67899
67959
  item: e,
67900
67960
  heroProps: n,
67901
67961
  containerWidth: r
67902
67962
  }, e.id))
67903
67963
  });
67904
- };
67905
- qk.displayName = "HeroFeatured";
67906
- //#endregion
67907
- //#region src/components/Hero/layouts/HeroMosaic.tsx
67908
- var Jk = ({ items: e, height: t, heroProps: n, containerWidth: r, mosaicOverflowMode: i = "marquee" }) => {
67909
- let { mosaicWrapper: a, mosaicPrimary: o, mosaicRightGrid: s, mosaicSpanFull: c, mosaicScrollLane: l } = Lk(n, r), { mosaicHeight: u } = Wk(t), d = e.length > 5, f = d ? e : e.slice(0, 5), p = f[0], m = f.slice(1), h = r < 576;
67910
- if (!p) return null;
67911
- let g = h ? 160 : 180;
67964
+ }, Jk = ({ items: e, height: t, heroProps: n, containerWidth: r, mosaicOverflowMode: i = "marquee" }) => {
67965
+ let { mosaicWrapper: a, mosaicPrimary: o, mosaicRightGrid: s, mosaicSpanFull: c, mosaicMarqueeLane: l, mosaicMarqueeItem: u, mosaicScrollLane: d } = Lk(n, r), { mosaicHeight: f } = Wk(t), p = e.length > 5, m = p ? e : e.slice(0, 5), h = m[0], g = m.slice(1), _ = r > 0 && r < 576;
67966
+ if (!h) return null;
67967
+ let v = _ ? 160 : 180;
67912
67968
  return /* @__PURE__ */ B(Y, {
67913
- direction: h ? "vertical" : "horizontal",
67969
+ direction: _ ? "vertical" : "horizontal",
67914
67970
  className: a,
67915
- height: h ? void 0 : u,
67971
+ height: _ ? void 0 : f,
67916
67972
  children: [
67917
67973
  /* @__PURE__ */ z(Uk, {
67918
- item: p,
67974
+ item: h,
67919
67975
  heroProps: n,
67920
67976
  containerWidth: r,
67921
67977
  className: o,
67922
- itemHeight: h ? 260 : void 0
67978
+ itemHeight: _ ? 260 : void 0
67923
67979
  }),
67924
- m.length > 0 && !d && /* @__PURE__ */ z("div", {
67925
- className: s(m.length),
67926
- children: m.map((e, t) => /* @__PURE__ */ z(Uk, {
67980
+ g.length > 0 && !p && /* @__PURE__ */ z("div", {
67981
+ className: s(g.length),
67982
+ children: g.map((e, t) => /* @__PURE__ */ z(Uk, {
67927
67983
  item: e,
67928
67984
  heroProps: n,
67929
67985
  containerWidth: r,
67930
- itemHeight: h ? 180 : void 0,
67931
- className: m.length === 3 && t === 2 && r >= 1100 ? c : void 0
67986
+ itemHeight: _ ? 180 : void 0,
67987
+ className: g.length === 3 && t === 2 && r >= 1100 ? c : void 0
67932
67988
  }, e.id))
67933
67989
  }),
67934
- m.length > 0 && d && i === "marquee" && /* @__PURE__ */ z("div", {
67935
- style: {
67936
- flex: h ? "none" : "2 0 0",
67937
- minWidth: 0,
67938
- height: h ? "320px" : "100%",
67939
- overflow: "hidden",
67940
- scrollbarWidth: "none"
67941
- },
67990
+ g.length > 0 && p && i === "marquee" && /* @__PURE__ */ z("div", {
67991
+ className: l,
67942
67992
  children: /* @__PURE__ */ z(jD, {
67943
67993
  orientation: "vertical",
67944
67994
  duration: 6e4,
67945
67995
  pauseOnHover: !0,
67946
67996
  repeat: 2,
67947
67997
  gap: "3px",
67948
- fadeEdgeSize: "8%",
67949
- children: m.map((e) => /* @__PURE__ */ z("div", {
67950
- style: {
67951
- flex: "0 0 auto",
67952
- height: `${g}px`,
67953
- width: "100%"
67954
- },
67998
+ fadeEdgeSize: "2%",
67999
+ children: g.map((e) => /* @__PURE__ */ z("div", {
68000
+ className: u,
67955
68001
  children: /* @__PURE__ */ z(Uk, {
67956
68002
  item: e,
67957
68003
  heroProps: n,
67958
68004
  containerWidth: r,
67959
- itemHeight: g
68005
+ itemHeight: v
67960
68006
  })
67961
68007
  }, e.id))
67962
68008
  })
67963
68009
  }),
67964
- m.length > 0 && d && i === "scroll" && /* @__PURE__ */ z("div", {
67965
- className: l,
67966
- children: m.map((e) => /* @__PURE__ */ z("div", {
67967
- style: {
67968
- flex: "0 0 auto",
67969
- height: `${g}px`,
67970
- width: "100%"
67971
- },
68010
+ g.length > 0 && p && i === "scroll" && /* @__PURE__ */ z("div", {
68011
+ className: d,
68012
+ children: g.map((e) => /* @__PURE__ */ z("div", {
68013
+ className: u,
67972
68014
  children: /* @__PURE__ */ z(Uk, {
67973
68015
  item: e,
67974
68016
  heroProps: n,
67975
68017
  containerWidth: r,
67976
- itemHeight: g
68018
+ itemHeight: v
67977
68019
  })
67978
68020
  }, e.id))
67979
68021
  })
67980
68022
  ]
67981
68023
  });
67982
- };
67983
- Jk.displayName = "HeroMosaic";
67984
- //#endregion
67985
- //#region src/components/Hero/layouts/HeroGrid.tsx
67986
- var Yk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
68024
+ }, Yk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
67987
68025
  let { gridRoot: i } = Lk(n, r), { resolvedHeight: a } = Wk(t);
67988
- return /* @__PURE__ */ z(Y, {
68026
+ return /* @__PURE__ */ z("div", {
67989
68027
  className: i,
67990
68028
  children: e.map((e) => /* @__PURE__ */ z(Uk, {
67991
68029
  item: e,
@@ -67994,11 +68032,7 @@ var Yk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
67994
68032
  itemHeight: a
67995
68033
  }, e.id))
67996
68034
  });
67997
- };
67998
- Yk.displayName = "HeroGrid";
67999
- //#endregion
68000
- //#region src/components/Hero/layouts/HeroFilmstrip.tsx
68001
- var Xk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
68035
+ }, Xk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
68002
68036
  let { filmstripRoot: i, filmstripItem: a } = Lk(n, r), { resolvedHeight: o } = Wk(t);
68003
68037
  return /* @__PURE__ */ z(Y, {
68004
68038
  direction: "horizontal",
@@ -68013,11 +68047,7 @@ var Xk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
68013
68047
  })
68014
68048
  }, e.id))
68015
68049
  });
68016
- };
68017
- Xk.displayName = "HeroFilmstrip";
68018
- //#endregion
68019
- //#region src/components/Hero/layouts/HeroCarousel.tsx
68020
- var Zk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
68050
+ }, Zk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
68021
68051
  let { carouselWrapper: i } = Lk(n, r), { numericHeight: a } = Wk(t), o = a - 50;
68022
68052
  return /* @__PURE__ */ z(Y, {
68023
68053
  className: i,
@@ -68032,23 +68062,23 @@ var Zk = ({ items: e, height: t, heroProps: n, containerWidth: r }) => {
68032
68062
  height: a
68033
68063
  })
68034
68064
  });
68035
- };
68036
- Zk.displayName = "HeroCarousel";
68037
- //#endregion
68038
- //#region src/components/Hero/Hero.tsx
68039
- var Qk = "480px", $k = (e) => {
68065
+ }, Qk = "480px", $k = (e) => {
68040
68066
  let { items: t, layout: n = "fullscreen", height: r = Qk, className: i } = e, a = j.useRef(null), [o, s] = j.useState(0), [c, l] = j.useState(0), { heroRootStyles: u } = Lk(e, o);
68041
68067
  j.useEffect(() => {
68042
- let e;
68043
- return a.current && (e = new Oi((e) => {
68068
+ if (!a.current) return;
68069
+ s(a.current.clientWidth), l(a.current.clientHeight);
68070
+ let e = new Oi((e) => {
68044
68071
  for (let t of e) {
68045
68072
  let { width: e, height: n } = t.contentRect;
68046
- s(e), l(n);
68073
+ e > 0 && s(e), l(n);
68047
68074
  }
68048
- }), s(a.current.clientWidth), l(a.current.clientHeight), e.observe(a.current)), () => {
68049
- e && e.disconnect();
68050
- };
68051
- }, []);
68075
+ });
68076
+ return e.observe(a.current), () => e.disconnect();
68077
+ }, []), j.useLayoutEffect(() => {
68078
+ if (!a.current) return;
68079
+ let e = a.current.getBoundingClientRect().width;
68080
+ e > 0 && s(e);
68081
+ }, [r]);
68052
68082
  let d = {
68053
68083
  items: t,
68054
68084
  height: r,
@@ -68090,7 +68120,6 @@ var Qk = "480px", $k = (e) => {
68090
68120
  children: f()
68091
68121
  });
68092
68122
  };
68093
- $k.displayName = "Hero";
68094
68123
  //#endregion
68095
68124
  export { cD as AIAssistant, HE as AISearchControl, RE as AISearchIcon, WE as AISearchIconExample, jE as AdaptiveCardHost, QT as AdaptiveCardHostThemeType, uC as AddColumnAfterControl, lC as AddColumnBeforeControl, pC as AddRowAfterControl, fC as AddRowBeforeControl, qS as AlignCenterControl, JS as AlignJustifyControl, GS as AlignLeftControl, KS as AlignRightControl, GO as AppDashboard, av as AspectRatio, LD as BackgroundImage, CD as Blockquote, WS as BlockquoteControl, AS as BoldControl, Nv as Breadcrumb, IS as BulletListControl, kv as ButtonMenu, by as CalendarControl, Cy as CalendarGrid, wy as CalendarHeader, oy as CalendarMonth, X_ as Card, hv as Carousel, cv as Center, KE as ChatInput, ZE as ChatInputWithMensions, lD as ChatInputWithMensionsV1, aD as ChatList, Nw as ChromeInputType, PS as ClearFormattingControl, QS as CodeBlockControl, ZS as CodeControl, cT as ColorPicker, Sw as ColorPickerAlpha, Zw as ColorPickerBlock, Rw as ColorPickerChrome, Kw as ColorPickerCircle, zw as ColorPickerColorful, Yw as ColorPickerCompact, Ow as ColorPickerEditableInput, Aw as ColorPickerEditableInputHSLA, kw as ColorPickerEditableInputRGBA, bw as ColorPickerHue, mw as ColorPickerInteractive, gw as ColorPickerSaturation, ww as ColorPickerShadeSlider, Mw as ColorPickerSketch, $w as ColorPickerSlider, Ew as ColorPickerSwatch, oT as ColorPickerTheme, Uw as ColorPickerWheel, Fy as CompactCalendar, Ty as CompactCalendarToolbar, _ as ConsoleLoggingProvider, uv as Container, iD as ContentRenderer, V_ as ContentType, OT as CustomControlBar, fT as DataGrid, hT as DataGridV2, i as DefaultGraphClient, o as DefaultLocalizationProvider, dC as DeleteColumnControl, mC as DeleteRowControl, cC as DeleteTableControl, TC as DropdownField, Ob as Dropzone, Cb as DropzoneAccept, kb as DropzoneFullScreen, Tb as DropzoneIdle, bb as DropzoneProvider, wb as DropzoneReject, vs as EBreakPoints, ey as ECalendarViews, YO as EGoalMetric, ys as EMessageType, Ib as EXE_MIME_TYPE, DS as EmojiPicker, e as ErrorType, Ey as EventsList, Pk as FluentUIProvider, MT as GenericOverFlowMenu, Q_ as Grid, RS as H1Control, zS as H2Control, BS as H3Control, VS as H4Control, HS as H5Control, US as H6Control, $k as Hero, $S as HighlightControl, eC as HrControl, jb as IMAGE_MIME_TYPE, Pv as IconButton, aO as InlineSVG, DC as InputField, sC as InsertTableControl, jS as ItalicControl, BC as ItemPicker, XO as KPICard, ek as KPICardCompact, ZO as KPICardSkeleton, nk as Kpis, tv as Layout, nv as LayoutItem, Vb as Link, FO as ListItemActivityMessage, xO as ListToolbar, pO as LivePersona, O as LocalStorageProvider, T as LocalizationProvider, g as LogLevel, Ab as MIME_TYPES, Pb as MS_EXCEL_MIME_TYPE, Fb as MS_POWERPOINT_MIME_TYPE, Nb as MS_WORD_MIME_TYPE, ZT as MaplibreWorldMap, nD as MarkdownRenderer, jD as Marquee, JE as Mensions, YE as MensionsExample, hC as MergeOrSplitCellControl, mD as MermaidDiagram, NT as Navigation, $O as NoKpisCard, fO as OTPField, IC as OptionTime, LS as OrderedListControl, Mb as PDF_MIME_TYPE, yv as Popup, rC as RedoControl, ME as RenderAdaptiveCard, vT as RenderDialog, yT as RenderDrawer, bT as RenderHeader, xv as RenderLabel, Cv as RenderSpinner, CC as RichTextEditor, sS as RichTextEditorBgColorPickerControl, tS as RichTextEditorColorControl, nS as RichTextEditorColorPickerControl, Zb as RichTextEditorContent, $b as RichTextEditorControl, ex as RichTextEditorControlBase, Qb as RichTextEditorControlsGroup, cS as RichTextEditorDragHandle, aS as RichTextEditorFontFamilyControl, go as RichTextEditorImage, oS as RichTextEditorImageUploadControl, eS as RichTextEditorLinkControl, Wb as RichTextEditorResizableImage, rS as RichTextEditorSourceCodeControl, kS as RichTextEditorTableControls, Kb as RichTextEditorToolbar, ib as SearchControl, ry as SelectDay, sy as SelectMonth, RC as SelectTime, OC as SelectView, dy as SelectWeek, ST as ShareDialog, wT as ShowError, ET as ShowMessage, Mk as SkeletonLoader, iv as Space, vv as SplitPane, PD as Spoiler, vb as Spotlight, sb as SpotlightAction, cb as SpotlightActionsGroup, lb as SpotlightActionsList, ub as SpotlightEmpty, db as SpotlightFooter, nb as SpotlightRoot, ab as SpotlightSearch, Y as StackV2, AO as StackedUsers, JD as Stepper, NS as StrikeThroughControl, YS as SubscriptControl, XS as SuperscriptControl, jC as TIME_RADIO_GROUP, mo as TableKit, iC as TaskListControl, oC as TaskListLiftControl, aC as TaskListSinkControl, HD as Timeline, gC as ToggleHeaderColumnControl, _C as ToggleHeaderRowControl, vC as ToggleTableColumnLinesControl, yC as ToggleTableRowLinesControl, Dv as TypographyControl, MS as UnderlineControl, nC as UndoControl, xs as UniversalProvider, FS as UnlinkControl, tC as UnsetColorControl, OO as UserCard, IT as VideoPlayer, __ as applyHeaderStyles, v_ as autoFitColumns, g_ as buildHeaderCellStyle, dw as clampHsva, QD as clearInlineSVGCache, A_ as cloneDeep, Vy as closeOnActionTriggerAtom, Yy as closeSpotlight, Q as color, vk as configureSkeletonLoader, X as createControl, Zy as createSpotlight, Uy as createSpotlightStore, O_ as debounce, r as deepMerge, gy as defaultCalendarControlStrings, ay as defaultCalendarMonthStrings, cy as defaultSelectWeekStrings, gb as defaultSpotlightFilter, q_ as detectContentType, n as en, lw as equalColorObjects, uw as equalHex, y_ as escapeCsvCell, B_ as every, R_ as filter, NC as formatTime, M_ as get, J_ as getContentType, cw as getContrastingColor, Hb as getTaskListExtension, I_ as groupBy, qC as hexToHsva, XC as hexToRgba, iw as hslaStringToHsva, KC as hslaToHsva, JC as hsvaToHex, YC as hsvaToHexa, $C as hsvaToHslString, GC as hsvaToHsla, ew as hsvaToHslaString, tw as hsvaToRgbString, UC as hsvaToRgba, nw as hsvaToRgbaString, pb as isActionsGroup, j_ as isEmpty, _b as limitActions, Ry as listIdAtom, L_ as map, Hy as onQueryChangeCallbackAtom, Jy as openSpotlight, Iy as openedAtom, rw as parseHue, zy as queryAtom, dk as registerBones, By as registeredActionsAtom, Xb as renderContentAsEmailHtml, My as resolveLocale, aw as rgbaStringToHsva, ZC as rgbaToHex, QC as rgbaToHexa, WC as rgbaToHsva, Ly as selectedAtom, N_ as set, ak as snapshotBones, z_ as some, qy as spotlight, Ky as spotlightActions, Wy as spotlightStore, k_ as throttle, PC as timeKey, m_ as toasterId, Xy as toggleSpotlight, P_ as uniq, F_ as uniqBy, b as useAIAssistantStrings, C as useAISearchControlStrings, h as useAppDashboardStrings, h_ as useAppToast, Ss as useApplicationContext, ov as useAspectRatioStyles, yD as useBlockquoteStyles, Hs as useBrandCenterFonts, Yv as useCalendar, c as useCalendarStrings, Hv as useCalendarStyles, sv as useCenterStyles, fw as useColorPickerStyles, x as useCommonStrings, Ay as useCompactCalendarEvents, u as useComponentStrings, C_ as useComponentUtils, dT as useDataGridStyles, w_ as useDateUtils, Xv as useDayViewStyles, xb as useDropzoneContext, Eb as useDropzoneStyles, S_ as useExportData, p_ as useFluentEmoji, ws as useGraphAPI, Z_ as useGridStyles, D_ as useImageUtils, Ts as useIndexedDBCache, E as useInputFieldStrings, d as useItemPickerStrings, f as useKpiStrings, $_ as useLayoutStyles, S as useListItemActivityStrings, y as useLocalization, Cs as useLogging, ED as useMarqueeStyles, m as useMensionsStrings, qE as useMensionsStyles, p as useMermaidDiagramStrings, dD as useMermaidDiagramStyles, PT as useNavigationStyles, s as useNoKpiStrings, AC as useOptionTimeStyles, Es as usePolling, xT as useRenderHeaderStyles, Gb as useRichTextEditor, D as useSearchControlStrings, kC as useSelectTimeStyles, A as useShareDialogStrings, CT as useShowErrorStyles, TT as useShowMessageStyles, ok as useSkeletonExtract, rv as useSpaceStyles, gv as useSplitPaneStyles, Qy as useSpotlight, eb as useSpotlightShortcut, l as useSpotlightStrings, k as useStrings, uD as useStyles, ks as useTimeZoneHelper, a as useUserCardStrings, Iv as useUtils, FT as useVideoStyles, Gv as useWeekViewStyles, t as useWorldMapStrings, sw as validHex };
68096
68125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spteck/react-controls-v2",
3
- "version": "2.6.5",
3
+ "version": "2.6.7",
4
4
  "description": "Framework-agnostic React controls for Vite, Next.js, and SPFx - based on Fluent UI 9",
5
5
  "license": "MIT",
6
6
  "author": "João Mendes",