@oliasoft-open-source/react-ui-library 5.8.10-beta-1 → 5.8.10-beta-3
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/global.css +1 -1
- package/dist/index.js +169 -262
- package/package.json +1 -3
package/dist/index.js
CHANGED
|
@@ -5,7 +5,6 @@ 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";
|
|
9
8
|
import ResizeObserver$1 from "resize-observer-polyfill";
|
|
10
9
|
import { Arrow, mergeRefs, useHover, useLayer, useMousePositionAsTrigger } from "react-laag";
|
|
11
10
|
import { cloneDeep, cloneDeepWith, debounce, get, isArray, isBoolean, isEmpty, isEqual, isFunction, isNil, isNumber, isObject, isPlainObject, isString, noop, set, toLower, toNumber } from "lodash";
|
|
@@ -51,8 +50,8 @@ let TriggerType = /* @__PURE__ */ function(e) {
|
|
|
51
50
|
return e.TEXT = "text", e.RADIO = "radio", e.CHECKBOX = "checkbox", e;
|
|
52
51
|
}({});
|
|
53
52
|
var chevron_module_default = {
|
|
54
|
-
chevron: "
|
|
55
|
-
expanded: "
|
|
53
|
+
chevron: "_chevron_1kw4m_1",
|
|
54
|
+
expanded: "_expanded_1kw4m_9"
|
|
56
55
|
};
|
|
57
56
|
const DisabledContext = React.createContext(!1);
|
|
58
57
|
var icon_module_default = {
|
|
@@ -254,32 +253,8 @@ var accordion_module_default = {
|
|
|
254
253
|
expanded: "_expanded_15p8j_36",
|
|
255
254
|
padding: "_padding_15p8j_44",
|
|
256
255
|
squareBottom: "_squareBottom_15p8j_47"
|
|
257
|
-
}
|
|
258
|
-
|
|
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", {
|
|
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", {
|
|
283
258
|
className: cx(accordion_module_default.accordion, n ? accordion_module_default.bordered : "", t ? accordion_module_default.expanded : "", a ? accordion_module_default.squareBottom : ""),
|
|
284
259
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
285
260
|
className: cx(accordion_module_default.accordionHeader, o ? accordion_module_default.clickable : ""),
|
|
@@ -289,12 +264,9 @@ const Collapse = ({ children: e, expanded: t }) => /* @__PURE__ */ jsx(CSSTransi
|
|
|
289
264
|
className: accordion_module_default.heading,
|
|
290
265
|
children: e
|
|
291
266
|
})]
|
|
292
|
-
}), /* @__PURE__ */ jsx(
|
|
293
|
-
|
|
294
|
-
children:
|
|
295
|
-
className: cx(accordion_module_default.accordionContent, n && r ? accordion_module_default.padding : ""),
|
|
296
|
-
children: i
|
|
297
|
-
})
|
|
267
|
+
}), t && i && /* @__PURE__ */ jsx("div", {
|
|
268
|
+
className: cx(accordion_module_default.accordionContent, n && r ? accordion_module_default.padding : ""),
|
|
269
|
+
children: i
|
|
298
270
|
})]
|
|
299
271
|
}), AccordionManaged = ({ heading: t, bordered: n, padding: r, expanded: i = !1, children: a, testId: o }) => {
|
|
300
272
|
let [s, c] = React.useState(i);
|
|
@@ -329,11 +301,9 @@ var check_box_module_default = {
|
|
|
329
301
|
isInTable: "_isInTable_oo4mp_99",
|
|
330
302
|
helpIconEnabled: "_helpIconEnabled_oo4mp_102"
|
|
331
303
|
}, tooltip_module_default = {
|
|
332
|
-
tooltip: "
|
|
333
|
-
error: "
|
|
334
|
-
warning: "
|
|
335
|
-
enter: "_enter_1kuu4_23",
|
|
336
|
-
enterActive: "_enterActive_1kuu4_27"
|
|
304
|
+
tooltip: "_tooltip_wli9z_1",
|
|
305
|
+
error: "_error_wli9z_15",
|
|
306
|
+
warning: "_warning_wli9z_19"
|
|
337
307
|
};
|
|
338
308
|
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: {
|
|
339
309
|
top: "100%",
|
|
@@ -374,25 +344,16 @@ const TooltipLayer = ({ text: e = "", error: t = !1, warning: n = !1, maxWidth:
|
|
|
374
344
|
possiblePlacements: a,
|
|
375
345
|
onParentClose: v
|
|
376
346
|
});
|
|
377
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
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", {
|
|
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", {
|
|
396
357
|
...x,
|
|
397
358
|
..._,
|
|
398
359
|
style: {
|
|
@@ -625,37 +586,35 @@ var actions_module_default = {
|
|
|
625
586
|
actionComponentContainer: "_actionComponentContainer_1t7vd_14",
|
|
626
587
|
active: "_active_1t7vd_36"
|
|
627
588
|
}, menu_module_default = {
|
|
628
|
-
wrapper: "
|
|
629
|
-
layer: "
|
|
630
|
-
layerContainer: "
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
right: "_right_15ymr_214",
|
|
658
|
-
actions: "_actions_15ymr_219"
|
|
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"
|
|
659
618
|
};
|
|
660
619
|
const Heading$3 = ({ label: e, onClick: t, icon: n, testId: r }) => /* @__PURE__ */ jsxs("div", {
|
|
661
620
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -1064,33 +1023,24 @@ const DropDownMenu = ({ menu: e, width: t, disabled: n = !1, badgeTitle: r, badg
|
|
|
1064
1023
|
testId: g,
|
|
1065
1024
|
selected: S,
|
|
1066
1025
|
tabIndex: C
|
|
1067
|
-
}), /* @__PURE__ */ jsx(
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
close: l || z,
|
|
1086
|
-
tree: u,
|
|
1087
|
-
path: d,
|
|
1088
|
-
maxHeight: h,
|
|
1089
|
-
showAllButton: F,
|
|
1090
|
-
testId: g && `${g}-layer`
|
|
1091
|
-
})
|
|
1092
|
-
})) })
|
|
1093
|
-
})] });
|
|
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
|
+
}))] });
|
|
1094
1044
|
}, Menu = (e) => e.contextMenu ? /* @__PURE__ */ jsx(ContextMenu, {
|
|
1095
1045
|
...e,
|
|
1096
1046
|
tree: {},
|
|
@@ -1760,37 +1710,22 @@ const FileInput = ({ label: e = "Select", loading: t = !1, placeholder: n = "No
|
|
|
1760
1710
|
}, [e]), n ? createPortal(t, n) : null;
|
|
1761
1711
|
};
|
|
1762
1712
|
var modal_module_default = {
|
|
1763
|
-
wrapper: "
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
centered: "_centered_1sv3a_52",
|
|
1770
|
-
newLine: "_newLine_1sv3a_56"
|
|
1771
|
-
}, Wrapper = ({ children: e, visible: t }) => {
|
|
1772
|
-
let n = useRef(null);
|
|
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);
|
|
1773
1719
|
return useEffect(() => {
|
|
1774
|
-
if (
|
|
1775
|
-
let e =
|
|
1776
|
-
e ? e.focus() :
|
|
1720
|
+
if (t.current) {
|
|
1721
|
+
let e = t.current.querySelector("[tabindex=\"0\"]");
|
|
1722
|
+
e ? e.focus() : t.current.focus();
|
|
1777
1723
|
}
|
|
1778
|
-
}, []), /* @__PURE__ */ jsx(
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
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: e
|
|
1793
|
-
})
|
|
1724
|
+
}, []), /* @__PURE__ */ jsx("div", {
|
|
1725
|
+
ref: t,
|
|
1726
|
+
tabIndex: -1,
|
|
1727
|
+
className: cx(modal_module_default.wrapper),
|
|
1728
|
+
children: e
|
|
1794
1729
|
});
|
|
1795
1730
|
}, Content$2 = ({ children: e, width: t, centered: n }) => /* @__PURE__ */ jsx("div", {
|
|
1796
1731
|
className: cx(modal_module_default.contentContainer, n ? modal_module_default.centered : ""),
|
|
@@ -1809,17 +1744,14 @@ const Modal = ({ children: e, visible: t = !1, centered: n = !1, width: r = "100
|
|
|
1809
1744
|
t && i && i();
|
|
1810
1745
|
}, [t, i]), useKeyboardEvent("Escape", () => {
|
|
1811
1746
|
t && a && a();
|
|
1812
|
-
}, [t, a]), /* @__PURE__ */ jsx(Portal, {
|
|
1747
|
+
}, [t, a]), /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Portal, {
|
|
1813
1748
|
id: o,
|
|
1814
|
-
children: /* @__PURE__ */ jsx(Wrapper, {
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
})
|
|
1821
|
-
})
|
|
1822
|
-
});
|
|
1749
|
+
children: t ? /* @__PURE__ */ jsx(Wrapper, { children: /* @__PURE__ */ jsx(Content$2, {
|
|
1750
|
+
width: r,
|
|
1751
|
+
centered: n,
|
|
1752
|
+
children: e
|
|
1753
|
+
}) }) : null
|
|
1754
|
+
}) });
|
|
1823
1755
|
};
|
|
1824
1756
|
var progress_bar_module_default = {
|
|
1825
1757
|
progress: "_progress_23ror_1",
|
|
@@ -2034,13 +1966,10 @@ var reducer$1 = (e, t) => {
|
|
|
2034
1966
|
className: cx(message_module_default.legendToggle),
|
|
2035
1967
|
onClick: n,
|
|
2036
1968
|
children: t ? "Hide details" : "Show details"
|
|
2037
|
-
}), /* @__PURE__ */ jsx(
|
|
2038
|
-
|
|
2039
|
-
children:
|
|
2040
|
-
|
|
2041
|
-
children: e
|
|
2042
|
-
})
|
|
2043
|
-
})] }), DialogIcon = ({ type: e }) => {
|
|
1969
|
+
}), t ? /* @__PURE__ */ jsx("div", {
|
|
1970
|
+
className: message_module_default.detailsText,
|
|
1971
|
+
children: e
|
|
1972
|
+
}) : null] }), DialogIcon = ({ type: e }) => {
|
|
2044
1973
|
switch (e) {
|
|
2045
1974
|
case MessageType.SUCCESS: return /* @__PURE__ */ jsx(Icon, {
|
|
2046
1975
|
icon: IconType.SUCCESS,
|
|
@@ -2225,22 +2154,20 @@ const useWindowWidth = () => {
|
|
|
2225
2154
|
}), []), e;
|
|
2226
2155
|
};
|
|
2227
2156
|
var custom_select_module_default = {
|
|
2228
|
-
layerContainer: "
|
|
2229
|
-
layer: "
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
icon: "_icon_q5iac_116",
|
|
2243
|
-
details: "_details_q5iac_121"
|
|
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"
|
|
2244
2171
|
};
|
|
2245
2172
|
const Heading$2 = ({ label: e }) => /* @__PURE__ */ jsx("div", {
|
|
2246
2173
|
onClick: (e) => e.stopPropagation(),
|
|
@@ -2783,36 +2710,27 @@ const useCustomSelectLogic = ({ state: e, dispatch: t, options: n, setTriggerFoc
|
|
|
2783
2710
|
placeholder: u,
|
|
2784
2711
|
right: w,
|
|
2785
2712
|
testId: T
|
|
2786
|
-
}), /* @__PURE__ */ jsx(
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
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
|
-
})]
|
|
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
|
+
}))]
|
|
2816
2734
|
});
|
|
2817
2735
|
}, 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" ? {
|
|
2818
2736
|
label: e,
|
|
@@ -3409,11 +3327,9 @@ const Slider = ({ name: e, label: t, width: n = "100%", labelWidth: r = "auto",
|
|
|
3409
3327
|
});
|
|
3410
3328
|
}, ActionsCell = ({ cell: e }) => /* @__PURE__ */ jsx(Actions, { actions: e.actions });
|
|
3411
3329
|
var popover_module_default = {
|
|
3412
|
-
toggleBox: "
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
fullWidthStyleFix: "_fullWidthStyleFix_rwod1_17",
|
|
3416
|
-
dismiss: "_dismiss_rwod1_22"
|
|
3330
|
+
toggleBox: "_toggleBox_lhie5_1",
|
|
3331
|
+
fullWidthStyleFix: "_fullWidthStyleFix_lhie5_8",
|
|
3332
|
+
dismiss: "_dismiss_lhie5_13"
|
|
3417
3333
|
};
|
|
3418
3334
|
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 }) => {
|
|
3419
3335
|
let h = useContext(DisabledContext), [_, v] = f === void 0 ? useState(!1) : [f, p], y = () => {
|
|
@@ -3438,34 +3354,25 @@ const Popover = ({ children: t, content: n, placement: r = "top-center", closeOn
|
|
|
3438
3354
|
onClick: b,
|
|
3439
3355
|
"data-testid": l,
|
|
3440
3356
|
children: t
|
|
3441
|
-
}), /* @__PURE__ */
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
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
|
-
})] });
|
|
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
|
+
}))] });
|
|
3469
3376
|
}, CellHelpIcon = ({ cell: e }) => {
|
|
3470
3377
|
let { helpIcon: t } = e;
|
|
3471
3378
|
return t ? /* @__PURE__ */ jsx("div", {
|
|
@@ -6689,7 +6596,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6689
6596
|
} : {
|
|
6690
6597
|
value: G,
|
|
6691
6598
|
unit: U
|
|
6692
|
-
}),
|
|
6599
|
+
}), Ad = k || K?.value === void 0, [J, jd] = useState(w ? PredefinedOptionsMenuState.PREDEFINED : PredefinedOptionsMenuState.CUSTOM), Md = !!(O || n), Y = C && C.find((e) => {
|
|
6693
6600
|
if (!e?.value) return;
|
|
6694
6601
|
if (E) return E === e.valueKey;
|
|
6695
6602
|
let t = isValueWithUnit(e.value) ? getUnit(e.value) : "", { value: n = l } = convertUnit({
|
|
@@ -6698,7 +6605,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6698
6605
|
toUnit: t
|
|
6699
6606
|
});
|
|
6700
6607
|
return withUnit(n, t) === e.value;
|
|
6701
|
-
}),
|
|
6608
|
+
}), Nd = () => {
|
|
6702
6609
|
let e = l ?? "", t = K.unit;
|
|
6703
6610
|
if (checkConversion({
|
|
6704
6611
|
value: e,
|
|
@@ -6712,7 +6619,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6712
6619
|
return null;
|
|
6713
6620
|
}
|
|
6714
6621
|
} else return getAltUnitsListByQuantity(u)?.map((e) => ["", e?.unit]);
|
|
6715
|
-
},
|
|
6622
|
+
}, Pd = (t) => {
|
|
6716
6623
|
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;
|
|
6717
6624
|
h({ target: {
|
|
6718
6625
|
value: s,
|
|
@@ -6725,7 +6632,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6725
6632
|
}), R(() => {
|
|
6726
6633
|
r.selectionStart = a, r.selectionEnd = a;
|
|
6727
6634
|
});
|
|
6728
|
-
},
|
|
6635
|
+
}, Fd = (e, t) => {
|
|
6729
6636
|
t === K.unit || isNaN(Number(e)) || (q({
|
|
6730
6637
|
value: e,
|
|
6731
6638
|
unit: t
|
|
@@ -6756,7 +6663,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6756
6663
|
e !== void 0 && q({
|
|
6757
6664
|
value: e,
|
|
6758
6665
|
unit: t
|
|
6759
|
-
}), C &&
|
|
6666
|
+
}), C && jd(Y && T ? PredefinedOptionsMenuState.PREDEFINED : PredefinedOptionsMenuState.CUSTOM);
|
|
6760
6667
|
}
|
|
6761
6668
|
}, [
|
|
6762
6669
|
U,
|
|
@@ -6764,7 +6671,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6764
6671
|
i,
|
|
6765
6672
|
T
|
|
6766
6673
|
]);
|
|
6767
|
-
let X =
|
|
6674
|
+
let X = Nd(), Z = label(K.unit) || K.unit || "", Id = p || !X || X && X.length === 1, Q = getStringName(e), $, Ld = (t) => {
|
|
6768
6675
|
let r = t?.value ? t.value : "", [i = "", a = ""] = isValueWithUnit(r) ? split(r) : [r], o = withPrettyUnitLabel(r);
|
|
6769
6676
|
if (checkConversion({
|
|
6770
6677
|
value: r,
|
|
@@ -6784,7 +6691,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6784
6691
|
type: MenuType.OPTION,
|
|
6785
6692
|
inline: !0,
|
|
6786
6693
|
onClick: () => {
|
|
6787
|
-
validateNumber(i).valid && !n && (
|
|
6694
|
+
validateNumber(i).valid && !n && (jd(PredefinedOptionsMenuState.PREDEFINED), h({ target: {
|
|
6788
6695
|
value: r,
|
|
6789
6696
|
name: typeof e == "string" ? e : e?.fieldName || "",
|
|
6790
6697
|
predefinedSelected: !0,
|
|
@@ -6811,10 +6718,10 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6811
6718
|
label: "Custom",
|
|
6812
6719
|
selected: J === PredefinedOptionsMenuState.CUSTOM
|
|
6813
6720
|
}], C?.length) {
|
|
6814
|
-
let e = C.map(
|
|
6721
|
+
let e = C.map(Ld);
|
|
6815
6722
|
$ = [...$, ...e];
|
|
6816
6723
|
}
|
|
6817
|
-
let
|
|
6724
|
+
let Rd = (e) => {
|
|
6818
6725
|
if (isValueWithUnit(e)) {
|
|
6819
6726
|
let t = getUnit(e), { value: n } = safeConvertValue({
|
|
6820
6727
|
value: e,
|
|
@@ -6826,7 +6733,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6826
6733
|
return n;
|
|
6827
6734
|
}
|
|
6828
6735
|
return e;
|
|
6829
|
-
},
|
|
6736
|
+
}, zd = !C && (!F || F === GroupOrder.FIRST) ? GroupOrder.FIRST : GroupOrder.MIDDLE, Bd = !F || F === GroupOrder.LAST ? GroupOrder.LAST : GroupOrder.MIDDLE;
|
|
6830
6737
|
return /* @__PURE__ */ jsx("div", {
|
|
6831
6738
|
className: J === PredefinedOptionsMenuState.PREDEFINED ? cx(unit_input_module_default.predefinedMenuActive) : "",
|
|
6832
6739
|
children: /* @__PURE__ */ jsxs(InputGroup, {
|
|
@@ -6858,31 +6765,31 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6858
6765
|
name: Q,
|
|
6859
6766
|
testId: x,
|
|
6860
6767
|
disabled: n,
|
|
6861
|
-
placeholder:
|
|
6768
|
+
placeholder: Rd(t),
|
|
6862
6769
|
value: K.value,
|
|
6863
|
-
onChange:
|
|
6770
|
+
onChange: Pd,
|
|
6864
6771
|
onFocus: v,
|
|
6865
6772
|
error: i === null ? void 0 : i,
|
|
6866
6773
|
warning: S === null ? void 0 : S,
|
|
6867
6774
|
left: a,
|
|
6868
|
-
allowEmpty:
|
|
6775
|
+
allowEmpty: Ad,
|
|
6869
6776
|
validationCallback: (e, t) => D(Q, t),
|
|
6870
6777
|
enableCosmeticRounding: j,
|
|
6871
6778
|
enableDisplayRounding: M,
|
|
6872
6779
|
roundDisplayValue: N,
|
|
6873
|
-
groupOrder:
|
|
6874
|
-
disableInternalErrorValidationMessages:
|
|
6780
|
+
groupOrder: zd,
|
|
6781
|
+
disableInternalErrorValidationMessages: Md,
|
|
6875
6782
|
small: o,
|
|
6876
6783
|
selectOnFocus: P,
|
|
6877
6784
|
tooltip: I
|
|
6878
6785
|
}, Q)
|
|
6879
6786
|
}),
|
|
6880
|
-
Z && (
|
|
6881
|
-
groupOrder:
|
|
6787
|
+
Z && (Id || !H ? /* @__PURE__ */ jsx(InputGroupAddon, {
|
|
6788
|
+
groupOrder: Bd,
|
|
6882
6789
|
small: o,
|
|
6883
6790
|
children: Z
|
|
6884
6791
|
}) : /* @__PURE__ */ jsx(Menu, {
|
|
6885
|
-
groupOrder:
|
|
6792
|
+
groupOrder: Bd,
|
|
6886
6793
|
maxHeight: 380,
|
|
6887
6794
|
disabled: r,
|
|
6888
6795
|
testId: x && `${x}-menu`,
|
|
@@ -6898,7 +6805,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6898
6805
|
label: j ? safeRoundNumbers(i) : i,
|
|
6899
6806
|
inline: !0,
|
|
6900
6807
|
onClick: (n) => {
|
|
6901
|
-
n.stopPropagation(),
|
|
6808
|
+
n.stopPropagation(), Fd(e, t);
|
|
6902
6809
|
},
|
|
6903
6810
|
description: r,
|
|
6904
6811
|
selected: r === Z,
|
|
@@ -8523,7 +8430,7 @@ const countDeltas = (e) => (Array.isArray(e) ? e : e ? [e] : []).reduce((e, t) =
|
|
|
8523
8430
|
if (i) return i;
|
|
8524
8431
|
}
|
|
8525
8432
|
return "";
|
|
8526
|
-
}, toText = (e) => e && typeof e == "object"
|
|
8433
|
+
}, toText = (e) => Array.isArray(e) ? e.length === 0 ? "" : e.some((e) => e && typeof e == "object") ? "Multiple changes..." : String(e) : e && typeof e == "object" ? Object.keys(e).length === 0 ? "" : "Multiple changes..." : String(e), defaultMessage = (e) => {
|
|
8527
8434
|
switch (e.length) {
|
|
8528
8435
|
case 1: {
|
|
8529
8436
|
let [t] = e;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliasoft-open-source/react-ui-library",
|
|
3
|
-
"version": "5.8.10-beta-
|
|
3
|
+
"version": "5.8.10-beta-3",
|
|
4
4
|
"description": "Reusable UI components for React projects",
|
|
5
5
|
"homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
|
|
6
6
|
"bugs": {
|
|
@@ -81,7 +81,6 @@
|
|
|
81
81
|
"react-router-dom": "^7.2.0",
|
|
82
82
|
"react-svg": "^16.3.0",
|
|
83
83
|
"react-toastify": "^9.1.3",
|
|
84
|
-
"react-transition-group": "^4.4.5",
|
|
85
84
|
"react-window": "^1.8.11",
|
|
86
85
|
"remirror": "^2.0.31",
|
|
87
86
|
"resize-observer-polyfill": "^1.5.1",
|
|
@@ -111,7 +110,6 @@
|
|
|
111
110
|
"@types/react": "^18.3.18",
|
|
112
111
|
"@types/react-dom": "^18.3.5",
|
|
113
112
|
"@types/react-redux": "^7.1.34",
|
|
114
|
-
"@types/react-transition-group": "^4.4.12",
|
|
115
113
|
"@types/seamless-immutable": "^7.1.19",
|
|
116
114
|
"@typescript-eslint/eslint-plugin": "^8.26.0",
|
|
117
115
|
"@typescript-eslint/parser": "^8.26.0",
|