@oliasoft-open-source/react-ui-library 6.12.0-beta-4 → 6.12.0-beta-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/components/popover/popover.d.ts +1 -0
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/unit-slider/unit-slider.d.ts.map +1 -1
- package/dist/components/unit-slider/unit-slider.test-case.stories.d.ts.map +1 -1
- package/dist/global.css +1 -1
- package/dist/index.js +96 -88
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1384,52 +1384,52 @@ var Ur = /* @__PURE__ */ function(e) {
|
|
|
1384
1384
|
enterActive: "_enterActive_rwod1_12",
|
|
1385
1385
|
fullWidthStyleFix: "_fullWidthStyleFix_rwod1_17",
|
|
1386
1386
|
dismiss: "_dismiss_rwod1_22"
|
|
1387
|
-
}, ka = ({ children: t, content: n, placement: r = "top-center", closeOnOutsideClick: i = !0, fullWidth: a = !1, showCloseButton: o = !1, testId: s, disabled: u = !1, overflowContainer: d = !1, isOpen: f, onToggle: p }) => {
|
|
1388
|
-
let
|
|
1389
|
-
!u && !
|
|
1390
|
-
},
|
|
1391
|
-
u ||
|
|
1387
|
+
}, ka = ({ children: t, content: n, placement: r = "top-center", closeOnOutsideClick: i = !0, fullWidth: a = !1, showCloseButton: o = !1, testId: s, disabled: u = !1, overflowContainer: d = !1, isOpen: f, onToggle: p, toggleOnTriggerClick: g = !0 }) => {
|
|
1388
|
+
let x = c(U), S = m(null), [C, w] = f === void 0 ? h(!1) : [f, p], T = () => {
|
|
1389
|
+
!u && !x && w && w(!1);
|
|
1390
|
+
}, E = () => {
|
|
1391
|
+
u || x || w && w(!C);
|
|
1392
1392
|
};
|
|
1393
1393
|
l(() => {
|
|
1394
|
-
(u ||
|
|
1395
|
-
}, [u,
|
|
1396
|
-
let { renderLayer:
|
|
1397
|
-
isOpen:
|
|
1394
|
+
(u || x) && T();
|
|
1395
|
+
}, [u, x]);
|
|
1396
|
+
let { renderLayer: D, arrowProps: O, layerProps: k, triggerProps: A } = wi({
|
|
1397
|
+
isOpen: C,
|
|
1398
1398
|
placement: r,
|
|
1399
1399
|
triggerOffset: 6,
|
|
1400
|
-
onOutsideClick: i ?
|
|
1400
|
+
onOutsideClick: i ? T : void 0,
|
|
1401
1401
|
overflowContainer: d
|
|
1402
|
-
}),
|
|
1402
|
+
}), j = Yt([S, k.ref]);
|
|
1403
1403
|
return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("div", {
|
|
1404
|
-
ref:
|
|
1405
|
-
onClick:
|
|
1404
|
+
ref: A.ref,
|
|
1405
|
+
onClick: g ? E : void 0,
|
|
1406
1406
|
"data-testid": s,
|
|
1407
1407
|
children: t
|
|
1408
1408
|
}), /* @__PURE__ */ y(jt, {
|
|
1409
|
-
nodeRef:
|
|
1410
|
-
in:
|
|
1409
|
+
nodeRef: S,
|
|
1410
|
+
in: C,
|
|
1411
1411
|
timeout: 100,
|
|
1412
1412
|
classNames: {
|
|
1413
1413
|
enter: Oa.enter,
|
|
1414
1414
|
enterActive: Oa.enterActive
|
|
1415
1415
|
},
|
|
1416
1416
|
unmountOnExit: !0,
|
|
1417
|
-
children: /* @__PURE__ */ y(v, { children:
|
|
1417
|
+
children: /* @__PURE__ */ y(v, { children: C && D(/* @__PURE__ */ b("div", {
|
|
1418
1418
|
className: a ? _(Oa.toggleBox, Oa.fullWidthStyleFix) : _(Oa.toggleBox),
|
|
1419
|
-
...
|
|
1420
|
-
ref:
|
|
1419
|
+
...k,
|
|
1420
|
+
ref: j,
|
|
1421
1421
|
"data-testid": `${s}-layer`,
|
|
1422
|
-
children: [/* @__PURE__ */ b("div", { children: [e.isValidElement(n) && typeof n.type != "string" ? e.cloneElement(n, { close:
|
|
1422
|
+
children: [/* @__PURE__ */ b("div", { children: [e.isValidElement(n) && typeof n.type != "string" ? e.cloneElement(n, { close: T }) : n, o && /* @__PURE__ */ y("div", {
|
|
1423
1423
|
className: Oa.dismiss,
|
|
1424
1424
|
children: /* @__PURE__ */ y(K, {
|
|
1425
1425
|
small: !0,
|
|
1426
1426
|
round: !0,
|
|
1427
|
-
onClick:
|
|
1427
|
+
onClick: T,
|
|
1428
1428
|
icon: H.CLOSE
|
|
1429
1429
|
})
|
|
1430
|
-
})] }),
|
|
1431
|
-
context:
|
|
1432
|
-
ref:
|
|
1430
|
+
})] }), O.context && /* @__PURE__ */ y(Mt, {
|
|
1431
|
+
context: O.context,
|
|
1432
|
+
ref: O.ref,
|
|
1433
1433
|
width: 12,
|
|
1434
1434
|
height: 6,
|
|
1435
1435
|
tipRadius: 1,
|
|
@@ -3647,21 +3647,21 @@ var La = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ra =
|
|
|
3647
3647
|
})
|
|
3648
3648
|
})
|
|
3649
3649
|
}), zc = {
|
|
3650
|
-
container: "
|
|
3651
|
-
small: "
|
|
3652
|
-
vertical: "
|
|
3653
|
-
hasArrows: "
|
|
3654
|
-
button: "
|
|
3655
|
-
thumb: "
|
|
3656
|
-
slider: "
|
|
3657
|
-
track: "
|
|
3658
|
-
range: "
|
|
3659
|
-
marks: "
|
|
3660
|
-
mark: "
|
|
3661
|
-
dot: "
|
|
3662
|
-
markActive: "
|
|
3663
|
-
sliderDisabled: "
|
|
3664
|
-
label: "
|
|
3650
|
+
container: "_container_3cdfx_1",
|
|
3651
|
+
small: "_small_3cdfx_9",
|
|
3652
|
+
vertical: "_vertical_3cdfx_12",
|
|
3653
|
+
hasArrows: "_hasArrows_3cdfx_16",
|
|
3654
|
+
button: "_button_3cdfx_20",
|
|
3655
|
+
thumb: "_thumb_3cdfx_23",
|
|
3656
|
+
slider: "_slider_3cdfx_28",
|
|
3657
|
+
track: "_track_3cdfx_60",
|
|
3658
|
+
range: "_range_3cdfx_72",
|
|
3659
|
+
marks: "_marks_3cdfx_110",
|
|
3660
|
+
mark: "_mark_3cdfx_110",
|
|
3661
|
+
dot: "_dot_3cdfx_138",
|
|
3662
|
+
markActive: "_markActive_3cdfx_146",
|
|
3663
|
+
sliderDisabled: "_sliderDisabled_3cdfx_149",
|
|
3664
|
+
label: "_label_3cdfx_161"
|
|
3665
3665
|
}, Bc = (e, t) => gn(nn(e) ? e : [e]).slice(0, t ? 2 : 1), Vc = (e, t) => t ? e : e[0], Hc = vr((e) => e.map(({ label: e, tooltip: t, value: n }) => ({
|
|
3666
3666
|
label: e,
|
|
3667
3667
|
tooltip: t,
|
|
@@ -6474,14 +6474,13 @@ var La = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ra =
|
|
|
6474
6474
|
width: t,
|
|
6475
6475
|
height: n
|
|
6476
6476
|
}), pd = {
|
|
6477
|
-
wrapper: "
|
|
6478
|
-
label: "
|
|
6479
|
-
input: "
|
|
6480
|
-
inputSmall: "
|
|
6481
|
-
editable: "
|
|
6482
|
-
inputControl: "
|
|
6483
|
-
|
|
6484
|
-
actions: "_actions_4rfwh_28"
|
|
6477
|
+
wrapper: "_wrapper_j8x9r_1",
|
|
6478
|
+
label: "_label_j8x9r_5",
|
|
6479
|
+
input: "_input_j8x9r_9",
|
|
6480
|
+
inputSmall: "_inputSmall_j8x9r_18",
|
|
6481
|
+
editable: "_editable_j8x9r_22",
|
|
6482
|
+
inputControl: "_inputControl_j8x9r_25",
|
|
6483
|
+
actions: "_actions_j8x9r_28"
|
|
6485
6484
|
}, md = () => {
|
|
6486
6485
|
let e = m(null);
|
|
6487
6486
|
return d(() => {
|
|
@@ -6831,21 +6830,35 @@ var La = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ra =
|
|
|
6831
6830
|
l(() => {
|
|
6832
6831
|
O || D(T);
|
|
6833
6832
|
}, [O, T]);
|
|
6834
|
-
let [A = "", j = c] = ir(E), M =
|
|
6833
|
+
let [A = "", j = c] = ir(E), M = or(A), N = null;
|
|
6835
6834
|
if (A.trim() !== "" && Number.isFinite(M)) try {
|
|
6836
6835
|
N = v ? M : Un(M, c, j);
|
|
6837
6836
|
} catch {
|
|
6838
|
-
N =
|
|
6837
|
+
N = null;
|
|
6839
6838
|
}
|
|
6840
|
-
let P =
|
|
6839
|
+
let P = N === null ? "Must be a numerical value" : N < n ? C(n) : N > r ? w(r) : "", F = () => {
|
|
6841
6840
|
!u || d || (D(T), k(!0));
|
|
6842
6841
|
}, I = () => {
|
|
6843
6842
|
D(T), k(!1);
|
|
6844
6843
|
}, L = () => {
|
|
6845
|
-
P || (o(Nd(e, N)), s == null || s(Nd(e, N)), k(!1));
|
|
6844
|
+
P || N === null || (o(Nd(e, N)), s == null || s(Nd(e, N)), k(!1));
|
|
6846
6845
|
}, R = (e) => {
|
|
6847
6846
|
e.key === "Enter" && L(), e.key === "Escape" && I();
|
|
6848
|
-
}, z = d || O
|
|
6847
|
+
}, z = d || O, ee = /* @__PURE__ */ b("div", {
|
|
6848
|
+
className: pd.actions,
|
|
6849
|
+
children: [/* @__PURE__ */ y(K, {
|
|
6850
|
+
icon: "close",
|
|
6851
|
+
small: !0,
|
|
6852
|
+
onClick: I,
|
|
6853
|
+
testId: g && `${g}-cancel`
|
|
6854
|
+
}), /* @__PURE__ */ y(K, {
|
|
6855
|
+
icon: "checkmark",
|
|
6856
|
+
small: !0,
|
|
6857
|
+
disabled: !!P,
|
|
6858
|
+
onClick: L,
|
|
6859
|
+
testId: g && `${g}-confirm`
|
|
6860
|
+
})]
|
|
6861
|
+
});
|
|
6849
6862
|
return /* @__PURE__ */ b("div", {
|
|
6850
6863
|
className: pd.wrapper,
|
|
6851
6864
|
"data-testid": g && `${g}-wrapper`,
|
|
@@ -6857,43 +6870,38 @@ var La = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ra =
|
|
|
6857
6870
|
children: i
|
|
6858
6871
|
})
|
|
6859
6872
|
}),
|
|
6860
|
-
f && /* @__PURE__ */
|
|
6861
|
-
className: _(pd.input, x && pd.inputSmall, u && pd.editable),
|
|
6862
|
-
children:
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
small: !0,
|
|
6891
|
-
disabled: !!P,
|
|
6892
|
-
onClick: L,
|
|
6893
|
-
testId: g && `${g}-confirm`
|
|
6894
|
-
})]
|
|
6873
|
+
f && /* @__PURE__ */ y("div", {
|
|
6874
|
+
className: _(pd.input, x && pd.inputSmall, u && !d && pd.editable),
|
|
6875
|
+
children: /* @__PURE__ */ y(Aa, {
|
|
6876
|
+
content: ee,
|
|
6877
|
+
isOpen: O,
|
|
6878
|
+
onToggle: (e) => {
|
|
6879
|
+
e || I();
|
|
6880
|
+
},
|
|
6881
|
+
overflowContainer: !0,
|
|
6882
|
+
placement: "bottom-start",
|
|
6883
|
+
testId: g && `${g}-edit-popover`,
|
|
6884
|
+
toggleOnTriggerClick: !1,
|
|
6885
|
+
children: /* @__PURE__ */ y("div", {
|
|
6886
|
+
className: pd.inputControl,
|
|
6887
|
+
"data-testid": g && `${g}-edit-trigger`,
|
|
6888
|
+
onClick: F,
|
|
6889
|
+
onKeyDown: R,
|
|
6890
|
+
children: /* @__PURE__ */ y(Md, {
|
|
6891
|
+
name: e,
|
|
6892
|
+
value: O ? E : T,
|
|
6893
|
+
unitkey: m,
|
|
6894
|
+
initUnit: c,
|
|
6895
|
+
noConversion: v,
|
|
6896
|
+
onChange: (e) => D(e.target.value),
|
|
6897
|
+
onFocus: F,
|
|
6898
|
+
disabled: d,
|
|
6899
|
+
error: O ? P : null,
|
|
6900
|
+
small: x,
|
|
6901
|
+
testId: g && `${g}-unit-input`
|
|
6902
|
+
})
|
|
6895
6903
|
})
|
|
6896
|
-
})
|
|
6904
|
+
})
|
|
6897
6905
|
}),
|
|
6898
6906
|
/* @__PURE__ */ y(Uc, {
|
|
6899
6907
|
name: e,
|
|
@@ -6904,7 +6912,7 @@ var La = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ra =
|
|
|
6904
6912
|
onChange: o,
|
|
6905
6913
|
onChangeComplete: s,
|
|
6906
6914
|
showArrows: p,
|
|
6907
|
-
showTooltip: !
|
|
6915
|
+
showTooltip: !z,
|
|
6908
6916
|
tooltipFormatter: () => ur(T),
|
|
6909
6917
|
disabled: z,
|
|
6910
6918
|
small: x,
|
package/package.json
CHANGED