@oliasoft-open-source/react-ui-library 5.8.10 → 5.8.11-beta-2

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.d.ts CHANGED
@@ -82,6 +82,8 @@ export declare const CheckBox: ({ noMargin, dataix, isInTable, tabIndex, checked
82
82
 
83
83
  export declare const Chevron: ({ expanded }: IChevronProps) => JSX_2.Element;
84
84
 
85
+ export declare const Collapse: ({ children, expanded }: ICollapseProps) => JSX_2.Element;
86
+
85
87
  export declare enum Color {
86
88
  DANGER = "danger",
87
89
  RED = "red",
@@ -323,6 +325,11 @@ export declare interface IChevronProps {
323
325
  expanded: boolean;
324
326
  }
325
327
 
328
+ export declare interface ICollapseProps {
329
+ children: default_2.ReactNode;
330
+ expanded: boolean;
331
+ }
332
+
326
333
  /**
327
334
  * Icon wrapper component to support different icon formats:
328
335
  * - string names (default recommendation)
package/dist/index.js CHANGED
@@ -5,6 +5,7 @@ import { TbAlertTriangle, TbArrowDown, TbArrowLeft, TbArrowRight, TbArrowUp, TbA
5
5
  import { VscCollapseAll, VscExpandAll } from "react-icons/vsc";
6
6
  import { AiOutlineMinusSquare, AiOutlinePlusSquare } from "react-icons/ai";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
+ import { CSSTransition } from "react-transition-group";
8
9
  import ResizeObserver$1 from "resize-observer-polyfill";
9
10
  import { Arrow, mergeRefs, useHover, useLayer, useMousePositionAsTrigger } from "react-laag";
10
11
  import { cloneDeep, cloneDeepWith, debounce, get, isArray, isBoolean, isEmpty, isEqual, isFunction, isNil, isNumber, isObject, isPlainObject, isString, noop, set, toLower, toNumber } from "lodash";
@@ -50,8 +51,8 @@ let TriggerType = /* @__PURE__ */ function(e) {
50
51
  return e.TEXT = "text", e.RADIO = "radio", e.CHECKBOX = "checkbox", e;
51
52
  }({});
52
53
  var chevron_module_default = {
53
- chevron: "_chevron_1kw4m_1",
54
- expanded: "_expanded_1kw4m_9"
54
+ chevron: "_chevron_dd6mn_1",
55
+ expanded: "_expanded_dd6mn_9"
55
56
  };
56
57
  const DisabledContext = React.createContext(!1);
57
58
  var icon_module_default = {
@@ -253,8 +254,32 @@ var accordion_module_default = {
253
254
  expanded: "_expanded_15p8j_36",
254
255
  padding: "_padding_15p8j_44",
255
256
  squareBottom: "_squareBottom_15p8j_47"
256
- };
257
- const AccordionBase = ({ heading: e, expanded: t = !1, bordered: n = !1, padding: r = !0, children: i, squareBottom: a = !1, onClick: o, testId: s }) => /* @__PURE__ */ jsxs("div", {
257
+ }, collapse_module_default = {
258
+ collapse: "_collapse_1m1n2_5",
259
+ enter: "_enter_1m1n2_9",
260
+ enterActive: "_enterActive_1m1n2_12",
261
+ exit: "_exit_1m1n2_15",
262
+ exitActive: "_exitActive_1m1n2_18",
263
+ collapseInner: "_collapseInner_1m1n2_21"
264
+ };
265
+ const Collapse = ({ children: e, expanded: t }) => /* @__PURE__ */ jsx(CSSTransition, {
266
+ in: t,
267
+ timeout: 100,
268
+ classNames: {
269
+ enter: collapse_module_default.enter,
270
+ enterActive: collapse_module_default.enterActive,
271
+ exit: collapse_module_default.exit,
272
+ exitActive: collapse_module_default.exitActive
273
+ },
274
+ unmountOnExit: !0,
275
+ children: /* @__PURE__ */ jsx("div", {
276
+ className: collapse_module_default.collapse,
277
+ children: /* @__PURE__ */ jsx("div", {
278
+ className: collapse_module_default.collapseInner,
279
+ children: /* @__PURE__ */ jsx("div", { children: e })
280
+ })
281
+ })
282
+ }), AccordionBase = ({ heading: e, expanded: t = !1, bordered: n = !1, padding: r = !0, children: i, squareBottom: a = !1, onClick: o, testId: s }) => /* @__PURE__ */ jsxs("div", {
258
283
  className: cx(accordion_module_default.accordion, n ? accordion_module_default.bordered : "", t ? accordion_module_default.expanded : "", a ? accordion_module_default.squareBottom : ""),
259
284
  children: [/* @__PURE__ */ jsxs("div", {
260
285
  className: cx(accordion_module_default.accordionHeader, o ? accordion_module_default.clickable : ""),
@@ -264,9 +289,12 @@ const AccordionBase = ({ heading: e, expanded: t = !1, bordered: n = !1, padding
264
289
  className: accordion_module_default.heading,
265
290
  children: e
266
291
  })]
267
- }), t && i && /* @__PURE__ */ jsx("div", {
268
- className: cx(accordion_module_default.accordionContent, n && r ? accordion_module_default.padding : ""),
269
- children: i
292
+ }), /* @__PURE__ */ jsx(Collapse, {
293
+ expanded: t,
294
+ children: /* @__PURE__ */ jsx("div", {
295
+ className: cx(accordion_module_default.accordionContent, n && r ? accordion_module_default.padding : ""),
296
+ children: i
297
+ })
270
298
  })]
271
299
  }), AccordionManaged = ({ heading: t, bordered: n, padding: r, expanded: i = !1, children: a, testId: o }) => {
272
300
  let [s, c] = React.useState(i);
@@ -301,9 +329,11 @@ var check_box_module_default = {
301
329
  isInTable: "_isInTable_oo4mp_99",
302
330
  helpIconEnabled: "_helpIconEnabled_oo4mp_102"
303
331
  }, tooltip_module_default = {
304
- tooltip: "_tooltip_wli9z_1",
305
- error: "_error_wli9z_15",
306
- warning: "_warning_wli9z_19"
332
+ tooltip: "_tooltip_hixsm_1",
333
+ error: "_error_hixsm_15",
334
+ warning: "_warning_hixsm_19",
335
+ enter: "_enter_hixsm_23",
336
+ enterActive: "_enterActive_hixsm_26"
307
337
  };
308
338
  const TooltipLayer = ({ text: e = "", error: t = !1, warning: n = !1, maxWidth: r = "none", fontSize: i = "inherit", padding: a = "var(--padding-xxs) var(--padding-xs)", layerProps: o = { style: { position: "fixed" } }, arrowProps: s = { style: {
309
339
  top: "100%",
@@ -344,16 +374,25 @@ const TooltipLayer = ({ text: e = "", error: t = !1, warning: n = !1, maxWidth:
344
374
  possiblePlacements: a,
345
375
  onParentClose: v
346
376
  });
347
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [y && b(/* @__PURE__ */ jsx(TooltipLayer, {
348
- text: t,
349
- error: n,
350
- warning: s,
351
- padding: d,
352
- maxWidth: c,
353
- fontSize: u,
354
- layerProps: S,
355
- arrowProps: C
356
- })), /* @__PURE__ */ jsx("span", {
377
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(CSSTransition, {
378
+ in: y,
379
+ timeout: 100,
380
+ classNames: {
381
+ enter: tooltip_module_default.enter,
382
+ enterActive: tooltip_module_default.enterActive
383
+ },
384
+ unmountOnExit: !0,
385
+ children: /* @__PURE__ */ jsx(Fragment$1, { children: y && b(/* @__PURE__ */ jsx(TooltipLayer, {
386
+ text: t,
387
+ error: n,
388
+ warning: s,
389
+ padding: d,
390
+ maxWidth: c,
391
+ fontSize: u,
392
+ layerProps: S,
393
+ arrowProps: C
394
+ })) })
395
+ }), /* @__PURE__ */ jsx("span", {
357
396
  ...x,
358
397
  ..._,
359
398
  style: {
@@ -586,35 +625,37 @@ var actions_module_default = {
586
625
  actionComponentContainer: "_actionComponentContainer_1t7vd_14",
587
626
  active: "_active_1t7vd_36"
588
627
  }, menu_module_default = {
589
- wrapper: "_wrapper_9g7i6_1",
590
- layer: "_layer_9g7i6_5",
591
- layerContainer: "_layerContainer_9g7i6_8",
592
- nested: "_nested_9g7i6_24",
593
- fileInput: "_fileInput_9g7i6_36",
594
- trigger: "_trigger_9g7i6_41",
595
- middleAlignedInline: "_middleAlignedInline_9g7i6_50",
596
- heading: "_heading_9g7i6_56",
597
- headingIcon: "_headingIcon_9g7i6_62",
598
- clickable: "_clickable_9g7i6_69",
599
- option: "_option_9g7i6_73",
600
- active: "_active_9g7i6_92",
601
- disabled: "_disabled_9g7i6_97",
602
- selected: "_selected_9g7i6_101",
603
- optionContent: "_optionContent_9g7i6_108",
604
- inline: "_inline_9g7i6_112",
605
- icon: "_icon_9g7i6_117",
606
- check: "_check_9g7i6_118",
607
- text: "_text_9g7i6_144",
608
- label: "_label_9g7i6_149",
609
- description: "_description_9g7i6_160",
610
- arrow: "_arrow_9g7i6_164",
611
- divider: "_divider_9g7i6_168",
612
- deprecatedSemanticIcon: "_deprecatedSemanticIcon_9g7i6_172",
613
- buttonLabel: "_buttonLabel_9g7i6_180",
614
- buttonCaret: "_buttonCaret_9g7i6_186",
615
- component: "_component_9g7i6_190",
616
- right: "_right_9g7i6_196",
617
- actions: "_actions_9g7i6_201"
628
+ wrapper: "_wrapper_15ymr_1",
629
+ layer: "_layer_15ymr_5",
630
+ layerContainer: "_layerContainer_15ymr_8",
631
+ enter: "_enter_15ymr_24",
632
+ enterActive: "_enterActive_15ymr_28",
633
+ nested: "_nested_15ymr_33",
634
+ fileInput: "_fileInput_15ymr_54",
635
+ trigger: "_trigger_15ymr_59",
636
+ middleAlignedInline: "_middleAlignedInline_15ymr_68",
637
+ heading: "_heading_15ymr_74",
638
+ headingIcon: "_headingIcon_15ymr_80",
639
+ clickable: "_clickable_15ymr_87",
640
+ option: "_option_15ymr_91",
641
+ active: "_active_15ymr_110",
642
+ disabled: "_disabled_15ymr_115",
643
+ selected: "_selected_15ymr_119",
644
+ optionContent: "_optionContent_15ymr_126",
645
+ inline: "_inline_15ymr_130",
646
+ icon: "_icon_15ymr_135",
647
+ check: "_check_15ymr_136",
648
+ text: "_text_15ymr_162",
649
+ label: "_label_15ymr_167",
650
+ description: "_description_15ymr_178",
651
+ arrow: "_arrow_15ymr_182",
652
+ divider: "_divider_15ymr_186",
653
+ deprecatedSemanticIcon: "_deprecatedSemanticIcon_15ymr_190",
654
+ buttonLabel: "_buttonLabel_15ymr_198",
655
+ buttonCaret: "_buttonCaret_15ymr_204",
656
+ component: "_component_15ymr_208",
657
+ right: "_right_15ymr_214",
658
+ actions: "_actions_15ymr_219"
618
659
  };
619
660
  const Heading$3 = ({ label: e, onClick: t, icon: n, testId: r }) => /* @__PURE__ */ jsxs("div", {
620
661
  onClick: (e) => e.stopPropagation(),
@@ -1023,24 +1064,33 @@ const DropDownMenu = ({ menu: e, width: t, disabled: n = !1, badgeTitle: r, badg
1023
1064
  testId: g,
1024
1065
  selected: S,
1025
1066
  tabIndex: C
1026
- }), L && U(/* @__PURE__ */ jsx("div", {
1027
- ...H,
1028
- className: menu_module_default.layerContainer,
1029
- "data-testid": e.testId,
1030
- onClick: (e) => e.stopPropagation(),
1031
- children: /* @__PURE__ */ jsx(Layer$2, {
1032
- sections: M,
1033
- isNested: o,
1034
- width: t,
1035
- closeOnOptionClick: c,
1036
- close: l || z,
1037
- tree: u,
1038
- path: d,
1039
- maxHeight: h,
1040
- showAllButton: F,
1041
- testId: g && `${g}-layer`
1042
- })
1043
- }))] });
1067
+ }), /* @__PURE__ */ jsx(CSSTransition, {
1068
+ in: L,
1069
+ timeout: 100,
1070
+ classNames: {
1071
+ enter: menu_module_default.enter,
1072
+ enterActive: menu_module_default.enterActive
1073
+ },
1074
+ unmountOnExit: !0,
1075
+ children: /* @__PURE__ */ jsx(Fragment$1, { children: L && U(/* @__PURE__ */ jsx("div", {
1076
+ ...H,
1077
+ className: menu_module_default.layerContainer,
1078
+ "data-testid": e.testId,
1079
+ onClick: (e) => e.stopPropagation(),
1080
+ children: /* @__PURE__ */ jsx(Layer$2, {
1081
+ sections: M,
1082
+ isNested: o,
1083
+ width: t,
1084
+ closeOnOptionClick: c,
1085
+ close: l || z,
1086
+ tree: u,
1087
+ path: d,
1088
+ maxHeight: h,
1089
+ showAllButton: F,
1090
+ testId: g && `${g}-layer`
1091
+ })
1092
+ })) })
1093
+ })] });
1044
1094
  }, Menu = (e) => e.contextMenu ? /* @__PURE__ */ jsx(ContextMenu, {
1045
1095
  ...e,
1046
1096
  tree: {},
@@ -1710,22 +1760,37 @@ const FileInput = ({ label: e = "Select", loading: t = !1, placeholder: n = "No
1710
1760
  }, [e]), n ? createPortal(t, n) : null;
1711
1761
  };
1712
1762
  var modal_module_default = {
1713
- wrapper: "_wrapper_sb0hc_1",
1714
- contentContainer: "_contentContainer_sb0hc_15",
1715
- centered: "_centered_sb0hc_24",
1716
- newLine: "_newLine_sb0hc_28"
1717
- }, Wrapper = ({ children: e }) => {
1718
- let t = useRef(null);
1763
+ wrapper: "_wrapper_1sv3a_1",
1764
+ enter: "_enter_1sv3a_15",
1765
+ enterActive: "_enterActive_1sv3a_18",
1766
+ exit: "_exit_1sv3a_22",
1767
+ exitActive: "_exitActive_1sv3a_25",
1768
+ contentContainer: "_contentContainer_1sv3a_29",
1769
+ centered: "_centered_1sv3a_52",
1770
+ newLine: "_newLine_1sv3a_56"
1771
+ }, Wrapper = ({ children: e, visible: t }) => {
1772
+ let n = useRef(null);
1719
1773
  return useEffect(() => {
1720
- if (t.current) {
1721
- let e = t.current.querySelector("[tabindex=\"0\"]");
1722
- e ? e.focus() : t.current.focus();
1774
+ if (n.current) {
1775
+ let e = n.current.querySelector("[tabindex=\"0\"]");
1776
+ e ? e.focus() : n.current.focus();
1723
1777
  }
1724
- }, []), /* @__PURE__ */ jsx("div", {
1725
- ref: t,
1726
- tabIndex: -1,
1727
- className: cx(modal_module_default.wrapper),
1728
- children: e
1778
+ }, []), /* @__PURE__ */ jsx(CSSTransition, {
1779
+ in: t,
1780
+ timeout: 100,
1781
+ classNames: {
1782
+ enter: modal_module_default.enter,
1783
+ enterActive: modal_module_default.enterActive,
1784
+ exit: modal_module_default.exit,
1785
+ exitActive: modal_module_default.exitActive
1786
+ },
1787
+ unmountOnExit: !0,
1788
+ children: /* @__PURE__ */ jsx("div", {
1789
+ ref: n,
1790
+ tabIndex: -1,
1791
+ className: cx(modal_module_default.wrapper),
1792
+ children: t && e
1793
+ })
1729
1794
  });
1730
1795
  }, Content$2 = ({ children: e, width: t, centered: n }) => /* @__PURE__ */ jsx("div", {
1731
1796
  className: cx(modal_module_default.contentContainer, n ? modal_module_default.centered : ""),
@@ -1744,14 +1809,17 @@ const Modal = ({ children: e, visible: t = !1, centered: n = !1, width: r = "100
1744
1809
  t && i && i();
1745
1810
  }, [t, i]), useKeyboardEvent("Escape", () => {
1746
1811
  t && a && a();
1747
- }, [t, a]), /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Portal, {
1812
+ }, [t, a]), /* @__PURE__ */ jsx(Portal, {
1748
1813
  id: o,
1749
- children: t ? /* @__PURE__ */ jsx(Wrapper, { children: /* @__PURE__ */ jsx(Content$2, {
1750
- width: r,
1751
- centered: n,
1752
- children: e
1753
- }) }) : null
1754
- }) });
1814
+ children: /* @__PURE__ */ jsx(Wrapper, {
1815
+ visible: t,
1816
+ children: /* @__PURE__ */ jsx(Content$2, {
1817
+ width: r,
1818
+ centered: n,
1819
+ children: e
1820
+ })
1821
+ })
1822
+ });
1755
1823
  };
1756
1824
  var progress_bar_module_default = {
1757
1825
  progress: "_progress_23ror_1",
@@ -1966,10 +2034,13 @@ var reducer$1 = (e, t) => {
1966
2034
  className: cx(message_module_default.legendToggle),
1967
2035
  onClick: n,
1968
2036
  children: t ? "Hide details" : "Show details"
1969
- }), t ? /* @__PURE__ */ jsx("div", {
1970
- className: message_module_default.detailsText,
1971
- children: e
1972
- }) : null] }), DialogIcon = ({ type: e }) => {
2037
+ }), /* @__PURE__ */ jsx(Collapse, {
2038
+ expanded: t,
2039
+ children: /* @__PURE__ */ jsx("div", {
2040
+ className: message_module_default.detailsText,
2041
+ children: e
2042
+ })
2043
+ })] }), DialogIcon = ({ type: e }) => {
1973
2044
  switch (e) {
1974
2045
  case MessageType.SUCCESS: return /* @__PURE__ */ jsx(Icon, {
1975
2046
  icon: IconType.SUCCESS,
@@ -2154,20 +2225,22 @@ const useWindowWidth = () => {
2154
2225
  }), []), e;
2155
2226
  };
2156
2227
  var custom_select_module_default = {
2157
- layerContainer: "_layerContainer_41zze_1",
2158
- layer: "_layer_41zze_1",
2159
- small: "_small_41zze_23",
2160
- heading: "_heading_41zze_26",
2161
- option: "_option_41zze_27",
2162
- message: "_message_41zze_28",
2163
- focused: "_focused_41zze_67",
2164
- selected: "_selected_41zze_71",
2165
- disabled: "_disabled_41zze_74",
2166
- check: "_check_41zze_78",
2167
- optionContent: "_optionContent_41zze_95",
2168
- label: "_label_41zze_100",
2169
- icon: "_icon_41zze_107",
2170
- details: "_details_41zze_112"
2228
+ layerContainer: "_layerContainer_q5iac_1",
2229
+ layer: "_layer_q5iac_1",
2230
+ enter: "_enter_q5iac_14",
2231
+ enterActive: "_enterActive_q5iac_18",
2232
+ small: "_small_q5iac_32",
2233
+ heading: "_heading_q5iac_35",
2234
+ option: "_option_q5iac_36",
2235
+ message: "_message_q5iac_37",
2236
+ focused: "_focused_q5iac_76",
2237
+ selected: "_selected_q5iac_80",
2238
+ disabled: "_disabled_q5iac_83",
2239
+ check: "_check_q5iac_87",
2240
+ optionContent: "_optionContent_q5iac_104",
2241
+ label: "_label_q5iac_109",
2242
+ icon: "_icon_q5iac_116",
2243
+ details: "_details_q5iac_121"
2171
2244
  };
2172
2245
  const Heading$2 = ({ label: e }) => /* @__PURE__ */ jsx("div", {
2173
2246
  onClick: (e) => e.stopPropagation(),
@@ -2710,27 +2783,36 @@ const useCustomSelectLogic = ({ state: e, dispatch: t, options: n, setTriggerFoc
2710
2783
  placeholder: u,
2711
2784
  right: w,
2712
2785
  testId: T
2713
- }), M.isLayerOpen && H(/* @__PURE__ */ jsx("div", {
2714
- ...U,
2715
- className: custom_select_module_default.layerContainer,
2716
- children: /* @__PURE__ */ jsx(Layer$1, {
2717
- listRef: O,
2718
- isMulti: t,
2719
- sections: M.visibleOptions,
2720
- selectedOptions: c,
2721
- onSelectOption: (e, n) => {
2722
- G(e, n, t ? void 0 : W);
2723
- },
2724
- closeLayer: () => {
2725
- b && W();
2726
- },
2727
- width: K(q),
2728
- small: d,
2729
- focusedOptionIndex: M.layerFocus.current,
2730
- firstSelectedOptionIndex: C ?? 0,
2731
- testId: T && `${T}-layer`
2732
- })
2733
- }))]
2786
+ }), /* @__PURE__ */ jsx(CSSTransition, {
2787
+ in: M.isLayerOpen,
2788
+ timeout: 100,
2789
+ classNames: {
2790
+ enter: custom_select_module_default.enter,
2791
+ enterActive: custom_select_module_default.enterActive
2792
+ },
2793
+ unmountOnExit: !0,
2794
+ children: /* @__PURE__ */ jsx(Fragment$1, { children: M.isLayerOpen && H(/* @__PURE__ */ jsx("div", {
2795
+ ...U,
2796
+ className: custom_select_module_default.layerContainer,
2797
+ children: /* @__PURE__ */ jsx(Layer$1, {
2798
+ listRef: O,
2799
+ isMulti: t,
2800
+ sections: M.visibleOptions,
2801
+ selectedOptions: c,
2802
+ onSelectOption: (e, n) => {
2803
+ G(e, n, t ? void 0 : W);
2804
+ },
2805
+ closeLayer: () => {
2806
+ b && W();
2807
+ },
2808
+ width: K(q),
2809
+ small: d,
2810
+ focusedOptionIndex: M.layerFocus.current,
2811
+ firstSelectedOptionIndex: C ?? 0,
2812
+ testId: T && `${T}-layer`
2813
+ })
2814
+ })) })
2815
+ })]
2734
2816
  });
2735
2817
  }, isEmptyNullOrUndefined = (e) => e == null || e === "", isNumericLike = (e) => /^-?\d+(\.\d+)?$/.test(e.trim()), isMulti = (e) => e instanceof Array, standardizeOptions = (e, t) => t && Array.isArray(e) ? e.map((e) => typeof e == "string" || typeof e == "number" ? {
2736
2818
  label: e,
@@ -3327,9 +3409,11 @@ const Slider = ({ name: e, label: t, width: n = "100%", labelWidth: r = "auto",
3327
3409
  });
3328
3410
  }, ActionsCell = ({ cell: e }) => /* @__PURE__ */ jsx(Actions, { actions: e.actions });
3329
3411
  var popover_module_default = {
3330
- toggleBox: "_toggleBox_lhie5_1",
3331
- fullWidthStyleFix: "_fullWidthStyleFix_lhie5_8",
3332
- dismiss: "_dismiss_lhie5_13"
3412
+ toggleBox: "_toggleBox_rwod1_1",
3413
+ enter: "_enter_rwod1_8",
3414
+ enterActive: "_enterActive_rwod1_12",
3415
+ fullWidthStyleFix: "_fullWidthStyleFix_rwod1_17",
3416
+ dismiss: "_dismiss_rwod1_22"
3333
3417
  };
3334
3418
  const Popover = ({ children: t, content: n, placement: r = "top-center", closeOnOutsideClick: i = !0, fullWidth: a = !1, showCloseButton: o = !1, testId: l, disabled: u = !1, overflowContainer: d = !1, isOpen: f, onToggle: p }) => {
3335
3419
  let h = useContext(DisabledContext), [_, v] = f === void 0 ? useState(!1) : [f, p], y = () => {
@@ -3354,25 +3438,34 @@ const Popover = ({ children: t, content: n, placement: r = "top-center", closeOn
3354
3438
  onClick: b,
3355
3439
  "data-testid": l,
3356
3440
  children: t
3357
- }), _ && x(/* @__PURE__ */ jsxs("div", {
3358
- className: a ? cx(popover_module_default.toggleBox, popover_module_default.fullWidthStyleFix) : cx(popover_module_default.toggleBox),
3359
- ...C,
3360
- children: [/* @__PURE__ */ jsxs("div", { children: [React.isValidElement(n) ? React.cloneElement(n, { close: y }) : n, o && /* @__PURE__ */ jsx("div", {
3361
- className: popover_module_default.dismiss,
3362
- children: /* @__PURE__ */ jsx(Button, {
3363
- small: !0,
3364
- round: !0,
3365
- onClick: y,
3366
- icon: IconType.CLOSE
3367
- })
3368
- })] }), /* @__PURE__ */ jsx(Arrow, {
3369
- ...S,
3370
- backgroundColor: "var(--color-background-layer)",
3371
- borderColor: "var(--color-border)",
3372
- borderWidth: 1,
3373
- size: 6
3374
- })]
3375
- }))] });
3441
+ }), /* @__PURE__ */ jsx(CSSTransition, {
3442
+ in: _,
3443
+ timeout: 100,
3444
+ classNames: {
3445
+ enter: popover_module_default.enter,
3446
+ enterActive: popover_module_default.enterActive
3447
+ },
3448
+ unmountOnExit: !0,
3449
+ children: /* @__PURE__ */ jsx(Fragment$1, { children: _ && x(/* @__PURE__ */ jsxs("div", {
3450
+ className: a ? cx(popover_module_default.toggleBox, popover_module_default.fullWidthStyleFix) : cx(popover_module_default.toggleBox),
3451
+ ...C,
3452
+ children: [/* @__PURE__ */ jsxs("div", { children: [React.isValidElement(n) ? React.cloneElement(n, { close: y }) : n, o && /* @__PURE__ */ jsx("div", {
3453
+ className: popover_module_default.dismiss,
3454
+ children: /* @__PURE__ */ jsx(Button, {
3455
+ small: !0,
3456
+ round: !0,
3457
+ onClick: y,
3458
+ icon: IconType.CLOSE
3459
+ })
3460
+ })] }), /* @__PURE__ */ jsx(Arrow, {
3461
+ ...S,
3462
+ backgroundColor: "var(--color-background-layer)",
3463
+ borderColor: "var(--color-border)",
3464
+ borderWidth: 1,
3465
+ size: 6
3466
+ })]
3467
+ })) })
3468
+ })] });
3376
3469
  }, CellHelpIcon = ({ cell: e }) => {
3377
3470
  let { helpIcon: t } = e;
3378
3471
  return t ? /* @__PURE__ */ jsx("div", {
@@ -6596,7 +6689,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
6596
6689
  } : {
6597
6690
  value: G,
6598
6691
  unit: U
6599
- }), Ad = k || K?.value === void 0, [J, jd] = useState(w ? PredefinedOptionsMenuState.PREDEFINED : PredefinedOptionsMenuState.CUSTOM), Md = !!(O || n), Y = C && C.find((e) => {
6692
+ }), Nd = k || K?.value === void 0, [J, Pd] = useState(w ? PredefinedOptionsMenuState.PREDEFINED : PredefinedOptionsMenuState.CUSTOM), Fd = !!(O || n), Y = C && C.find((e) => {
6600
6693
  if (!e?.value) return;
6601
6694
  if (E) return E === e.valueKey;
6602
6695
  let t = isValueWithUnit(e.value) ? getUnit(e.value) : "", { value: n = l } = convertUnit({
@@ -6605,7 +6698,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
6605
6698
  toUnit: t
6606
6699
  });
6607
6700
  return withUnit(n, t) === e.value;
6608
- }), Nd = () => {
6701
+ }), Id = () => {
6609
6702
  let e = l ?? "", t = K.unit;
6610
6703
  if (checkConversion({
6611
6704
  value: e,
@@ -6619,7 +6712,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
6619
6712
  return null;
6620
6713
  }
6621
6714
  } else return getAltUnitsListByQuantity(u)?.map((e) => ["", e?.unit]);
6622
- }, Pd = (t) => {
6715
+ }, Ld = (t) => {
6623
6716
  let n = getStringName(e), r = t.target, { value: i, selectionStart: a } = r, o = withUnit(i, K?.unit || ""), s = A ? withUnit(convertAndGetValue(o, B), B) : o;
6624
6717
  h({ target: {
6625
6718
  value: s,
@@ -6632,7 +6725,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
6632
6725
  }), R(() => {
6633
6726
  r.selectionStart = a, r.selectionEnd = a;
6634
6727
  });
6635
- }, Fd = (e, t) => {
6728
+ }, Rd = (e, t) => {
6636
6729
  t === K.unit || isNaN(Number(e)) || (q({
6637
6730
  value: e,
6638
6731
  unit: t
@@ -6663,7 +6756,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
6663
6756
  e !== void 0 && q({
6664
6757
  value: e,
6665
6758
  unit: t
6666
- }), C && jd(Y && T ? PredefinedOptionsMenuState.PREDEFINED : PredefinedOptionsMenuState.CUSTOM);
6759
+ }), C && Pd(Y && T ? PredefinedOptionsMenuState.PREDEFINED : PredefinedOptionsMenuState.CUSTOM);
6667
6760
  }
6668
6761
  }, [
6669
6762
  U,
@@ -6671,7 +6764,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
6671
6764
  i,
6672
6765
  T
6673
6766
  ]);
6674
- let X = Nd(), Z = label(K.unit) || K.unit || "", Id = p || !X || X && X.length === 1, Q = getStringName(e), $, Ld = (t) => {
6767
+ let X = Id(), Z = label(K.unit) || K.unit || "", zd = p || !X || X && X.length === 1, Q = getStringName(e), $, Bd = (t) => {
6675
6768
  let r = t?.value ? t.value : "", [i = "", a = ""] = isValueWithUnit(r) ? split(r) : [r], o = withPrettyUnitLabel(r);
6676
6769
  if (checkConversion({
6677
6770
  value: r,
@@ -6691,7 +6784,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
6691
6784
  type: MenuType.OPTION,
6692
6785
  inline: !0,
6693
6786
  onClick: () => {
6694
- validateNumber(i).valid && !n && (jd(PredefinedOptionsMenuState.PREDEFINED), h({ target: {
6787
+ validateNumber(i).valid && !n && (Pd(PredefinedOptionsMenuState.PREDEFINED), h({ target: {
6695
6788
  value: r,
6696
6789
  name: typeof e == "string" ? e : e?.fieldName || "",
6697
6790
  predefinedSelected: !0,
@@ -6718,10 +6811,10 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
6718
6811
  label: "Custom",
6719
6812
  selected: J === PredefinedOptionsMenuState.CUSTOM
6720
6813
  }], C?.length) {
6721
- let e = C.map(Ld);
6814
+ let e = C.map(Bd);
6722
6815
  $ = [...$, ...e];
6723
6816
  }
6724
- let Rd = (e) => {
6817
+ let Vd = (e) => {
6725
6818
  if (isValueWithUnit(e)) {
6726
6819
  let t = getUnit(e), { value: n } = safeConvertValue({
6727
6820
  value: e,
@@ -6733,7 +6826,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
6733
6826
  return n;
6734
6827
  }
6735
6828
  return e;
6736
- }, zd = !C && (!F || F === GroupOrder.FIRST) ? GroupOrder.FIRST : GroupOrder.MIDDLE, Bd = !F || F === GroupOrder.LAST ? GroupOrder.LAST : GroupOrder.MIDDLE;
6829
+ }, Hd = !C && (!F || F === GroupOrder.FIRST) ? GroupOrder.FIRST : GroupOrder.MIDDLE, Ud = !F || F === GroupOrder.LAST ? GroupOrder.LAST : GroupOrder.MIDDLE;
6737
6830
  return /* @__PURE__ */ jsx("div", {
6738
6831
  className: J === PredefinedOptionsMenuState.PREDEFINED ? cx(unit_input_module_default.predefinedMenuActive) : "",
6739
6832
  children: /* @__PURE__ */ jsxs(InputGroup, {
@@ -6765,31 +6858,31 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
6765
6858
  name: Q,
6766
6859
  testId: x,
6767
6860
  disabled: n,
6768
- placeholder: Rd(t),
6861
+ placeholder: Vd(t),
6769
6862
  value: K.value,
6770
- onChange: Pd,
6863
+ onChange: Ld,
6771
6864
  onFocus: v,
6772
6865
  error: i === null ? void 0 : i,
6773
6866
  warning: S === null ? void 0 : S,
6774
6867
  left: a,
6775
- allowEmpty: Ad,
6868
+ allowEmpty: Nd,
6776
6869
  validationCallback: (e, t) => D(Q, t),
6777
6870
  enableCosmeticRounding: j,
6778
6871
  enableDisplayRounding: M,
6779
6872
  roundDisplayValue: N,
6780
- groupOrder: zd,
6781
- disableInternalErrorValidationMessages: Md,
6873
+ groupOrder: Hd,
6874
+ disableInternalErrorValidationMessages: Fd,
6782
6875
  small: o,
6783
6876
  selectOnFocus: P,
6784
6877
  tooltip: I
6785
6878
  }, Q)
6786
6879
  }),
6787
- Z && (Id || !H ? /* @__PURE__ */ jsx(InputGroupAddon, {
6788
- groupOrder: Bd,
6880
+ Z && (zd || !H ? /* @__PURE__ */ jsx(InputGroupAddon, {
6881
+ groupOrder: Ud,
6789
6882
  small: o,
6790
6883
  children: Z
6791
6884
  }) : /* @__PURE__ */ jsx(Menu, {
6792
- groupOrder: Bd,
6885
+ groupOrder: Ud,
6793
6886
  maxHeight: 380,
6794
6887
  disabled: r,
6795
6888
  testId: x && `${x}-menu`,
@@ -6805,7 +6898,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
6805
6898
  label: j ? safeRoundNumbers(i) : i,
6806
6899
  inline: !0,
6807
6900
  onClick: (n) => {
6808
- n.stopPropagation(), Fd(e, t);
6901
+ n.stopPropagation(), Rd(e, t);
6809
6902
  },
6810
6903
  description: r,
6811
6904
  selected: r === Z,
@@ -8682,4 +8775,4 @@ const ComparisonViewModal = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, se
8682
8775
  }
8683
8776
  });
8684
8777
  };
8685
- export { Accordion, AccordionWithDefaultToggle, Actions, Align, AuditLog, Badge, Breadcrumb, BreadcrumbLinkType, Button, ButtonGroup, ButtonPosition, ButtonType, Card, CheckBox, Chevron, Color, Column, Dialog, DiffViewer, DisabledContext, Divider, Drawer, ElementType, Empty, Field, FileButton, FileInput, Flex, FormRow, Grid, GroupOrder, Heading, HelpIcon, Icon, IconType, Input, InputGroup, InputGroupAddon, InputReaderMethods, InputType, Label, List, ListHeading, ListSubheading, Loader, Menu, MenuCarat, MenuType, Message, MessageType, Modal, NativeSelect, NumberInput, OptionDropdown, Page, Pagination, PopConfirm, Popover, Portal, PrintHeader, ProgressBar, RadioButton, RichTextInput, Row, Select, SettingField, SideBar, Slider, SmartUploadModal, Spacer, Spinner, Table, TableImportExport, Tabs, Text, TextArea, TextLink, TextTransform, Theme, Toaster, Toggle, Tooltip, TopBar, Tree, TriggerType, UnitInput, UnitTable, dismissToast, initializeContext, initializeGuiLibrary, readFile, toast, useFocus, useKeyboardEvent, useWindowWidth };
8778
+ export { Accordion, AccordionWithDefaultToggle, Actions, Align, AuditLog, Badge, Breadcrumb, BreadcrumbLinkType, Button, ButtonGroup, ButtonPosition, ButtonType, Card, CheckBox, Chevron, Collapse, Color, Column, Dialog, DiffViewer, DisabledContext, Divider, Drawer, ElementType, Empty, Field, FileButton, FileInput, Flex, FormRow, Grid, GroupOrder, Heading, HelpIcon, Icon, IconType, Input, InputGroup, InputGroupAddon, InputReaderMethods, InputType, Label, List, ListHeading, ListSubheading, Loader, Menu, MenuCarat, MenuType, Message, MessageType, Modal, NativeSelect, NumberInput, OptionDropdown, Page, Pagination, PopConfirm, Popover, Portal, PrintHeader, ProgressBar, RadioButton, RichTextInput, Row, Select, SettingField, SideBar, Slider, SmartUploadModal, Spacer, Spinner, Table, TableImportExport, Tabs, Text, TextArea, TextLink, TextTransform, Theme, Toaster, Toggle, Tooltip, TopBar, Tree, TriggerType, UnitInput, UnitTable, dismissToast, initializeContext, initializeGuiLibrary, readFile, toast, useFocus, useKeyboardEvent, useWindowWidth };