@oliasoft-open-source/react-ui-library 5.11.6-beta-2 → 5.11.6
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.d.ts +2 -15
- package/dist/index.js +97 -145
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -93,8 +93,6 @@ export declare enum Color {
|
|
|
93
93
|
MUTED = "muted"
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
export declare const ColorInput: ({ columns, disabled, options, small, value, onChange, }: IColorInputProps) => JSX_2.Element;
|
|
97
|
-
|
|
98
96
|
export declare const Column: ({ background, borderLeft, borderRight, children, flex, flexbox, padding, scroll, showScrollbar, spacing, width, widthMobile, widthTablet, testId, }: ILayoutColumnProps) => JSX_2.Element;
|
|
99
97
|
|
|
100
98
|
export declare const Dialog: ({ dialog }: IDialogProps) => JSX_2.Element;
|
|
@@ -332,18 +330,6 @@ export declare interface ICollapseProps {
|
|
|
332
330
|
expanded: boolean;
|
|
333
331
|
}
|
|
334
332
|
|
|
335
|
-
export declare interface IColorInputProps {
|
|
336
|
-
columns?: number;
|
|
337
|
-
disabled?: boolean;
|
|
338
|
-
options?: {
|
|
339
|
-
value: string;
|
|
340
|
-
label: string;
|
|
341
|
-
}[];
|
|
342
|
-
small?: boolean;
|
|
343
|
-
value?: string;
|
|
344
|
-
onChange?: (value: string) => void;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
333
|
/**
|
|
348
334
|
* Icon wrapper component to support different icon formats:
|
|
349
335
|
* - string names (default recommendation)
|
|
@@ -1076,6 +1062,7 @@ export declare interface INumberInputProps {
|
|
|
1076
1062
|
|
|
1077
1063
|
export declare interface IOptionDropdownProps {
|
|
1078
1064
|
name?: string;
|
|
1065
|
+
disabled?: boolean;
|
|
1079
1066
|
label: string;
|
|
1080
1067
|
options: IOptionType[];
|
|
1081
1068
|
onChange: TChangeEventHandler;
|
|
@@ -1944,7 +1931,7 @@ declare interface NavigationEventArgs {
|
|
|
1944
1931
|
|
|
1945
1932
|
export declare const NumberInput: ({ name, placeholder, disabled, error, left, small, width, value, onChange, onFocus, onBlur, selectOnFocus, tabIndex, testId, tooltip, warning, validationCallback, allowEmpty, isInTable, groupOrder, enableCosmeticRounding, enableDisplayRounding, roundDisplayValue, disableInternalErrorValidationMessages, disableValidationOnFocus, }: INumberInputProps) => JSX_2.Element;
|
|
1946
1933
|
|
|
1947
|
-
export declare const OptionDropdown: ({ name, label, options, onChange, small, showHeader, maxHeight, testId, }: IOptionDropdownProps) => ReactElement;
|
|
1934
|
+
export declare const OptionDropdown: ({ name, disabled, label, options, onChange, small, showHeader, maxHeight, testId, }: IOptionDropdownProps) => ReactElement;
|
|
1948
1935
|
|
|
1949
1936
|
export declare const Page: ({ children, left, padding: paddingProp, scroll, top, }: ILayoutPageProps) => JSX_2.Element;
|
|
1950
1937
|
|
package/dist/index.js
CHANGED
|
@@ -1264,118 +1264,6 @@ const Card = ({ bordered: e = !0, heading: t = null, children: n, margin: r = "0
|
|
|
1264
1264
|
children: n
|
|
1265
1265
|
})]
|
|
1266
1266
|
});
|
|
1267
|
-
var popover_module_default = {
|
|
1268
|
-
toggleBox: "_toggleBox_rwod1_1",
|
|
1269
|
-
enter: "_enter_rwod1_8",
|
|
1270
|
-
enterActive: "_enterActive_rwod1_12",
|
|
1271
|
-
fullWidthStyleFix: "_fullWidthStyleFix_rwod1_17",
|
|
1272
|
-
dismiss: "_dismiss_rwod1_22"
|
|
1273
|
-
};
|
|
1274
|
-
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: h }) => {
|
|
1275
|
-
let _ = useContext(DisabledContext), v = useRef(null), [y, b] = f === void 0 ? useState(!1) : [f, h], x = () => {
|
|
1276
|
-
!u && !_ && b && b(!1);
|
|
1277
|
-
}, S = () => {
|
|
1278
|
-
u || _ || b && b(!y);
|
|
1279
|
-
};
|
|
1280
|
-
useEffect(() => {
|
|
1281
|
-
(u || _) && x();
|
|
1282
|
-
}, [u, _]);
|
|
1283
|
-
let { renderLayer: C, arrowProps: w, layerProps: T, triggerProps: E } = useLayer({
|
|
1284
|
-
isOpen: y,
|
|
1285
|
-
placement: r,
|
|
1286
|
-
auto: !0,
|
|
1287
|
-
triggerOffset: 6,
|
|
1288
|
-
onOutsideClick: i ? x : void 0,
|
|
1289
|
-
ResizeObserver: ResizeObserver$1,
|
|
1290
|
-
overflowContainer: d
|
|
1291
|
-
});
|
|
1292
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
1293
|
-
ref: E.ref,
|
|
1294
|
-
onClick: S,
|
|
1295
|
-
"data-testid": l,
|
|
1296
|
-
children: t
|
|
1297
|
-
}), /* @__PURE__ */ jsx(CSSTransition, {
|
|
1298
|
-
nodeRef: v,
|
|
1299
|
-
in: y,
|
|
1300
|
-
timeout: 100,
|
|
1301
|
-
classNames: {
|
|
1302
|
-
enter: popover_module_default.enter,
|
|
1303
|
-
enterActive: popover_module_default.enterActive
|
|
1304
|
-
},
|
|
1305
|
-
unmountOnExit: !0,
|
|
1306
|
-
children: /* @__PURE__ */ jsx(Fragment$1, { children: y && C(/* @__PURE__ */ jsxs("div", {
|
|
1307
|
-
className: a ? cx(popover_module_default.toggleBox, popover_module_default.fullWidthStyleFix) : cx(popover_module_default.toggleBox),
|
|
1308
|
-
...T,
|
|
1309
|
-
ref: (e) => {
|
|
1310
|
-
v.current = e, T.ref(e);
|
|
1311
|
-
},
|
|
1312
|
-
children: [/* @__PURE__ */ jsxs("div", { children: [React.isValidElement(n) ? React.cloneElement(n, { close: x }) : n, o && /* @__PURE__ */ jsx("div", {
|
|
1313
|
-
className: popover_module_default.dismiss,
|
|
1314
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
1315
|
-
small: !0,
|
|
1316
|
-
round: !0,
|
|
1317
|
-
onClick: x,
|
|
1318
|
-
icon: IconType.CLOSE
|
|
1319
|
-
})
|
|
1320
|
-
})] }), /* @__PURE__ */ jsx(Arrow, {
|
|
1321
|
-
...w,
|
|
1322
|
-
backgroundColor: "var(--color-background-layer)",
|
|
1323
|
-
borderColor: "var(--color-border)",
|
|
1324
|
-
borderWidth: 1,
|
|
1325
|
-
size: 6
|
|
1326
|
-
})]
|
|
1327
|
-
})) })
|
|
1328
|
-
})] });
|
|
1329
|
-
};
|
|
1330
|
-
var color_input_module_default = {
|
|
1331
|
-
colorInput: "_colorInput_14lq1_1",
|
|
1332
|
-
trigger: "_trigger_14lq1_7",
|
|
1333
|
-
buttonColor: "_buttonColor_14lq1_11",
|
|
1334
|
-
options: "_options_14lq1_16",
|
|
1335
|
-
option: "_option_14lq1_16"
|
|
1336
|
-
};
|
|
1337
|
-
const ColorInput = ({ columns: e = 9, disabled: t, options: n = [], small: r, value: i, onChange: a }) => {
|
|
1338
|
-
let [o, s] = useState(!1), c = n.find((e) => e.value === i)?.label;
|
|
1339
|
-
return /* @__PURE__ */ jsx("div", {
|
|
1340
|
-
className: color_input_module_default.colorInput,
|
|
1341
|
-
children: /* @__PURE__ */ jsx(Popover, {
|
|
1342
|
-
placement: "bottom-start",
|
|
1343
|
-
isOpen: o,
|
|
1344
|
-
onToggle: s,
|
|
1345
|
-
content: /* @__PURE__ */ jsx("div", {
|
|
1346
|
-
className: color_input_module_default.options,
|
|
1347
|
-
style: { gridTemplateColumns: `repeat(${e}, auto)` },
|
|
1348
|
-
children: n.map((e) => /* @__PURE__ */ jsx("div", {
|
|
1349
|
-
className: color_input_module_default.option,
|
|
1350
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
1351
|
-
basic: !0,
|
|
1352
|
-
disabled: t,
|
|
1353
|
-
width: "var(--size)",
|
|
1354
|
-
tooltip: e.label,
|
|
1355
|
-
label: /* @__PURE__ */ jsx("div", {
|
|
1356
|
-
className: color_input_module_default.buttonColor,
|
|
1357
|
-
style: { backgroundColor: e.value }
|
|
1358
|
-
}),
|
|
1359
|
-
onClick: () => {
|
|
1360
|
-
a?.(e.value), s(!1);
|
|
1361
|
-
}
|
|
1362
|
-
}, e.value)
|
|
1363
|
-
}))
|
|
1364
|
-
}),
|
|
1365
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
1366
|
-
disabled: t,
|
|
1367
|
-
small: r,
|
|
1368
|
-
active: o,
|
|
1369
|
-
width: r ? "var(--size-sm)" : "var(--size)",
|
|
1370
|
-
tooltip: c,
|
|
1371
|
-
label: /* @__PURE__ */ jsx("div", {
|
|
1372
|
-
className: color_input_module_default.buttonColor,
|
|
1373
|
-
style: { backgroundColor: i }
|
|
1374
|
-
})
|
|
1375
|
-
})
|
|
1376
|
-
})
|
|
1377
|
-
});
|
|
1378
|
-
};
|
|
1379
1267
|
var noScrollbars = css`
|
|
1380
1268
|
scrollbar-width: none;
|
|
1381
1269
|
-ms-overflow-style: none;
|
|
@@ -2853,7 +2741,7 @@ const useCustomSelectLogic = ({ state: e, dispatch: t, options: n, setTriggerFoc
|
|
|
2853
2741
|
layerFocus: initialLayerFocus(e, C ?? 0),
|
|
2854
2742
|
triggerFocus: initialTriggerFocus,
|
|
2855
2743
|
isLayerOpen: !1
|
|
2856
|
-
})), { getTriggerWidth: F, onKeyEvent: I, clearAllIsFocused: L, triggerProps: R, onClickTrigger: z, onChangeSearch: B, onClickDeselectOption: V, onClickClearAll: H, renderLayer: U, layerProps: W, closeLayer: G, onSelectOption: K, getLayerWidth: q, triggerBounds:
|
|
2744
|
+
})), { getTriggerWidth: F, onKeyEvent: I, clearAllIsFocused: L, triggerProps: R, onClickTrigger: z, onChangeSearch: B, onClickDeselectOption: V, onClickClearAll: H, renderLayer: U, layerProps: W, closeLayer: G, onSelectOption: K, getLayerWidth: q, triggerBounds: Rd } = useCustomSelectLogic({
|
|
2857
2745
|
...e,
|
|
2858
2746
|
state: N,
|
|
2859
2747
|
dispatch: P,
|
|
@@ -2921,7 +2809,7 @@ const useCustomSelectLogic = ({ state: e, dispatch: t, options: n, setTriggerFoc
|
|
|
2921
2809
|
closeLayer: () => {
|
|
2922
2810
|
b && G();
|
|
2923
2811
|
},
|
|
2924
|
-
width: q(
|
|
2812
|
+
width: q(Rd),
|
|
2925
2813
|
small: d,
|
|
2926
2814
|
focusedOptionIndex: N.layerFocus.current,
|
|
2927
2815
|
firstSelectedOptionIndex: C ?? 0,
|
|
@@ -3523,7 +3411,70 @@ const Slider = ({ name: e, label: t, width: n = "100%", labelWidth: r = "auto",
|
|
|
3523
3411
|
children: /* @__PURE__ */ jsx(Icon, { icon: n })
|
|
3524
3412
|
})
|
|
3525
3413
|
});
|
|
3526
|
-
}, ActionsCell = ({ cell: e }) => /* @__PURE__ */ jsx(Actions, { actions: e.actions })
|
|
3414
|
+
}, ActionsCell = ({ cell: e }) => /* @__PURE__ */ jsx(Actions, { actions: e.actions });
|
|
3415
|
+
var popover_module_default = {
|
|
3416
|
+
toggleBox: "_toggleBox_rwod1_1",
|
|
3417
|
+
enter: "_enter_rwod1_8",
|
|
3418
|
+
enterActive: "_enterActive_rwod1_12",
|
|
3419
|
+
fullWidthStyleFix: "_fullWidthStyleFix_rwod1_17",
|
|
3420
|
+
dismiss: "_dismiss_rwod1_22"
|
|
3421
|
+
};
|
|
3422
|
+
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: h }) => {
|
|
3423
|
+
let _ = useContext(DisabledContext), v = useRef(null), [y, b] = f === void 0 ? useState(!1) : [f, h], x = () => {
|
|
3424
|
+
!u && !_ && b && b(!1);
|
|
3425
|
+
}, S = () => {
|
|
3426
|
+
u || _ || b && b(!y);
|
|
3427
|
+
};
|
|
3428
|
+
useEffect(() => {
|
|
3429
|
+
(u || _) && x();
|
|
3430
|
+
}, [u, _]);
|
|
3431
|
+
let { renderLayer: C, arrowProps: w, layerProps: T, triggerProps: E } = useLayer({
|
|
3432
|
+
isOpen: y,
|
|
3433
|
+
placement: r,
|
|
3434
|
+
auto: !0,
|
|
3435
|
+
triggerOffset: 6,
|
|
3436
|
+
onOutsideClick: i ? x : void 0,
|
|
3437
|
+
ResizeObserver: ResizeObserver$1,
|
|
3438
|
+
overflowContainer: d
|
|
3439
|
+
});
|
|
3440
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
3441
|
+
ref: E.ref,
|
|
3442
|
+
onClick: S,
|
|
3443
|
+
"data-testid": l,
|
|
3444
|
+
children: t
|
|
3445
|
+
}), /* @__PURE__ */ jsx(CSSTransition, {
|
|
3446
|
+
nodeRef: v,
|
|
3447
|
+
in: y,
|
|
3448
|
+
timeout: 100,
|
|
3449
|
+
classNames: {
|
|
3450
|
+
enter: popover_module_default.enter,
|
|
3451
|
+
enterActive: popover_module_default.enterActive
|
|
3452
|
+
},
|
|
3453
|
+
unmountOnExit: !0,
|
|
3454
|
+
children: /* @__PURE__ */ jsx(Fragment$1, { children: y && C(/* @__PURE__ */ jsxs("div", {
|
|
3455
|
+
className: a ? cx(popover_module_default.toggleBox, popover_module_default.fullWidthStyleFix) : cx(popover_module_default.toggleBox),
|
|
3456
|
+
...T,
|
|
3457
|
+
ref: (e) => {
|
|
3458
|
+
v.current = e, T.ref(e);
|
|
3459
|
+
},
|
|
3460
|
+
children: [/* @__PURE__ */ jsxs("div", { children: [React.isValidElement(n) ? React.cloneElement(n, { close: x }) : n, o && /* @__PURE__ */ jsx("div", {
|
|
3461
|
+
className: popover_module_default.dismiss,
|
|
3462
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
3463
|
+
small: !0,
|
|
3464
|
+
round: !0,
|
|
3465
|
+
onClick: x,
|
|
3466
|
+
icon: IconType.CLOSE
|
|
3467
|
+
})
|
|
3468
|
+
})] }), /* @__PURE__ */ jsx(Arrow, {
|
|
3469
|
+
...w,
|
|
3470
|
+
backgroundColor: "var(--color-background-layer)",
|
|
3471
|
+
borderColor: "var(--color-border)",
|
|
3472
|
+
borderWidth: 1,
|
|
3473
|
+
size: 6
|
|
3474
|
+
})]
|
|
3475
|
+
})) })
|
|
3476
|
+
})] });
|
|
3477
|
+
}, CellHelpIcon = ({ cell: e }) => {
|
|
3527
3478
|
let { helpIcon: t } = e;
|
|
3528
3479
|
return t ? /* @__PURE__ */ jsx("div", {
|
|
3529
3480
|
className: cell_module_default.icon,
|
|
@@ -5836,22 +5787,23 @@ const Layer = ({ options: e, onChangeOptions: t, showHeader: n, maxHeight: r, te
|
|
|
5836
5787
|
}, r);
|
|
5837
5788
|
}
|
|
5838
5789
|
})]
|
|
5839
|
-
}), OptionDropdown = ({ name: e,
|
|
5840
|
-
testId:
|
|
5790
|
+
}), OptionDropdown = ({ name: e, disabled: t, label: n, options: r, onChange: i, small: a = !1, showHeader: o = !0, maxHeight: s = "40vh", testId: c }) => /* @__PURE__ */ jsx(Menu, {
|
|
5791
|
+
testId: c,
|
|
5792
|
+
disabled: t,
|
|
5841
5793
|
menu: {
|
|
5842
|
-
testId:
|
|
5843
|
-
small:
|
|
5844
|
-
label:
|
|
5794
|
+
testId: c ? `${c}-menu-layer` : void 0,
|
|
5795
|
+
small: a,
|
|
5796
|
+
label: n,
|
|
5845
5797
|
trigger: TriggerType.DROP_DOWN_BUTTON,
|
|
5846
5798
|
possiblePlacements: ["top-start", "bottom-start"],
|
|
5847
5799
|
sections: /* @__PURE__ */ jsx(Layer, {
|
|
5848
|
-
testId:
|
|
5849
|
-
options:
|
|
5800
|
+
testId: c,
|
|
5801
|
+
options: r,
|
|
5850
5802
|
onChangeOptions: (t, n) => {
|
|
5851
|
-
t.target.name = e, t.target.value = n,
|
|
5803
|
+
t.target.name = e, t.target.value = n, i(t);
|
|
5852
5804
|
},
|
|
5853
|
-
showHeader:
|
|
5854
|
-
maxHeight:
|
|
5805
|
+
showHeader: o,
|
|
5806
|
+
maxHeight: s
|
|
5855
5807
|
})
|
|
5856
5808
|
}
|
|
5857
5809
|
});
|
|
@@ -6784,7 +6736,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6784
6736
|
} : {
|
|
6785
6737
|
value: G,
|
|
6786
6738
|
unit: U
|
|
6787
|
-
}),
|
|
6739
|
+
}), Rd = k || K?.value === void 0, [J, zd] = useState(w ? PredefinedOptionsMenuState.PREDEFINED : PredefinedOptionsMenuState.CUSTOM), Bd = !!(O || n), Y = C && C.find((e) => {
|
|
6788
6740
|
if (!e?.value) return;
|
|
6789
6741
|
if (E) return E === e.valueKey;
|
|
6790
6742
|
let t = isValueWithUnit(e.value) ? getUnit(e.value) : "", { value: n = l } = convertUnit({
|
|
@@ -6793,7 +6745,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6793
6745
|
toUnit: t
|
|
6794
6746
|
});
|
|
6795
6747
|
return withUnit(n, t) === e.value;
|
|
6796
|
-
}),
|
|
6748
|
+
}), Vd = () => {
|
|
6797
6749
|
let e = l ?? "", t = K.unit;
|
|
6798
6750
|
if (checkConversion({
|
|
6799
6751
|
value: e,
|
|
@@ -6807,7 +6759,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6807
6759
|
return null;
|
|
6808
6760
|
}
|
|
6809
6761
|
} else return getAltUnitsListByQuantity(u)?.map((e) => ["", e?.unit]);
|
|
6810
|
-
},
|
|
6762
|
+
}, Hd = (t) => {
|
|
6811
6763
|
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;
|
|
6812
6764
|
h({ target: {
|
|
6813
6765
|
value: s,
|
|
@@ -6820,7 +6772,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6820
6772
|
}), R(() => {
|
|
6821
6773
|
r.selectionStart = a, r.selectionEnd = a;
|
|
6822
6774
|
});
|
|
6823
|
-
},
|
|
6775
|
+
}, Ud = (e, t) => {
|
|
6824
6776
|
t === K.unit || isNaN(Number(e)) || (q({
|
|
6825
6777
|
value: e,
|
|
6826
6778
|
unit: t
|
|
@@ -6851,7 +6803,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6851
6803
|
e !== void 0 && q({
|
|
6852
6804
|
value: e,
|
|
6853
6805
|
unit: t
|
|
6854
|
-
}),
|
|
6806
|
+
}), zd(C && Y && T ? PredefinedOptionsMenuState.PREDEFINED : PredefinedOptionsMenuState.CUSTOM);
|
|
6855
6807
|
}
|
|
6856
6808
|
}, [
|
|
6857
6809
|
U,
|
|
@@ -6859,7 +6811,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6859
6811
|
i,
|
|
6860
6812
|
T
|
|
6861
6813
|
]);
|
|
6862
|
-
let X =
|
|
6814
|
+
let X = Vd(), Z = label(K.unit) || K.unit || "", Wd = p || !X || X && X.length === 1, Q = getStringName(e), $, Gd = (t) => {
|
|
6863
6815
|
let r = t?.value ? t.value : "", [i = "", a = ""] = isValueWithUnit(r) ? split(r) : [r], o = withPrettyUnitLabel(r);
|
|
6864
6816
|
if (checkConversion({
|
|
6865
6817
|
value: r,
|
|
@@ -6879,7 +6831,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6879
6831
|
type: MenuType.OPTION,
|
|
6880
6832
|
inline: !0,
|
|
6881
6833
|
onClick: () => {
|
|
6882
|
-
validateNumber(i).valid && !n && (
|
|
6834
|
+
validateNumber(i).valid && !n && (zd(PredefinedOptionsMenuState.PREDEFINED), h({ target: {
|
|
6883
6835
|
value: r,
|
|
6884
6836
|
name: typeof e == "string" ? e : e?.fieldName || "",
|
|
6885
6837
|
predefinedSelected: !0,
|
|
@@ -6906,10 +6858,10 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6906
6858
|
label: "Custom",
|
|
6907
6859
|
selected: J === PredefinedOptionsMenuState.CUSTOM
|
|
6908
6860
|
}], C?.length) {
|
|
6909
|
-
let e = C.map(
|
|
6861
|
+
let e = C.map(Gd);
|
|
6910
6862
|
$ = [...$, ...e];
|
|
6911
6863
|
}
|
|
6912
|
-
let
|
|
6864
|
+
let Kd = (e) => {
|
|
6913
6865
|
if (isValueWithUnit(e)) {
|
|
6914
6866
|
let t = getUnit(e), { value: n } = safeConvertValue({
|
|
6915
6867
|
value: e,
|
|
@@ -6921,7 +6873,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6921
6873
|
return n;
|
|
6922
6874
|
}
|
|
6923
6875
|
return e;
|
|
6924
|
-
},
|
|
6876
|
+
}, qd = !C && (!F || F === GroupOrder.FIRST) ? GroupOrder.FIRST : GroupOrder.MIDDLE, Jd = !F || F === GroupOrder.LAST ? GroupOrder.LAST : GroupOrder.MIDDLE;
|
|
6925
6877
|
return /* @__PURE__ */ jsx("div", {
|
|
6926
6878
|
className: J === PredefinedOptionsMenuState.PREDEFINED ? cx(unit_input_module_default.predefinedMenuActive) : "",
|
|
6927
6879
|
children: /* @__PURE__ */ jsxs(InputGroup, {
|
|
@@ -6953,31 +6905,31 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6953
6905
|
name: Q,
|
|
6954
6906
|
testId: x,
|
|
6955
6907
|
disabled: n,
|
|
6956
|
-
placeholder:
|
|
6908
|
+
placeholder: Kd(t),
|
|
6957
6909
|
value: K.value,
|
|
6958
|
-
onChange:
|
|
6910
|
+
onChange: Hd,
|
|
6959
6911
|
onFocus: v,
|
|
6960
6912
|
error: i === null ? void 0 : i,
|
|
6961
6913
|
warning: S === null ? void 0 : S,
|
|
6962
6914
|
left: a,
|
|
6963
|
-
allowEmpty:
|
|
6915
|
+
allowEmpty: Rd,
|
|
6964
6916
|
validationCallback: (e, t) => D(Q, t),
|
|
6965
6917
|
enableCosmeticRounding: j,
|
|
6966
6918
|
enableDisplayRounding: M,
|
|
6967
6919
|
roundDisplayValue: N,
|
|
6968
|
-
groupOrder:
|
|
6969
|
-
disableInternalErrorValidationMessages:
|
|
6920
|
+
groupOrder: qd,
|
|
6921
|
+
disableInternalErrorValidationMessages: Bd,
|
|
6970
6922
|
small: o,
|
|
6971
6923
|
selectOnFocus: P,
|
|
6972
6924
|
tooltip: I
|
|
6973
6925
|
}, Q)
|
|
6974
6926
|
}),
|
|
6975
|
-
Z && (
|
|
6976
|
-
groupOrder:
|
|
6927
|
+
Z && (Wd || !H ? /* @__PURE__ */ jsx(InputGroupAddon, {
|
|
6928
|
+
groupOrder: Jd,
|
|
6977
6929
|
small: o,
|
|
6978
6930
|
children: Z
|
|
6979
6931
|
}) : /* @__PURE__ */ jsx(Menu, {
|
|
6980
|
-
groupOrder:
|
|
6932
|
+
groupOrder: Jd,
|
|
6981
6933
|
maxHeight: 380,
|
|
6982
6934
|
disabled: r,
|
|
6983
6935
|
testId: x && `${x}-menu`,
|
|
@@ -6993,7 +6945,7 @@ const UnitInput = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUni
|
|
|
6993
6945
|
label: j ? safeRoundNumbers(i) : i,
|
|
6994
6946
|
inline: !0,
|
|
6995
6947
|
onClick: (n) => {
|
|
6996
|
-
n.stopPropagation(),
|
|
6948
|
+
n.stopPropagation(), Ud(e, t);
|
|
6997
6949
|
},
|
|
6998
6950
|
description: r,
|
|
6999
6951
|
selected: r === Z,
|
|
@@ -8893,4 +8845,4 @@ const ComparisonViewModal = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, se
|
|
|
8893
8845
|
}
|
|
8894
8846
|
});
|
|
8895
8847
|
};
|
|
8896
|
-
export { Accordion, AccordionWithDefaultToggle, Actions, Align, AuditLog, Badge, Breadcrumb, BreadcrumbLinkType, Button, ButtonGroup, ButtonPosition, ButtonType, Card, CheckBox, Chevron, Collapse, Color,
|
|
8848
|
+
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, UsageTracker, dismissToast, initializeContext, initializeGuiLibrary, readFile, toast, useFocus, useKeyboardEvent, useWindowWidth };
|
package/package.json
CHANGED