asma-ui-core 3.81.2 → 3.81.4
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/asma-ui-core.css +1 -1
- package/dist/components/custom/pathfinder-card/PathfinderCard.js +1 -0
- package/dist/components/data-display/interactive-chip/StyledInteractiveChip.js +13 -13
- package/dist/components/inputs/dynamic-select/components/DynamicSelectAutocomplete.js +2 -2
- package/dist/components/inputs/select/StyledSelectItem.js +1 -1
- package/dist/components/inputs/select-autocomplete/StyledSelectAutocomplete.js +1 -1
- package/dist/components/miscellaneous/StyledFormControlLabel.js +21 -19
- package/dist/datetime/components/date-picker/components/StyledCalendarPickerFooter.js +19 -17
- package/dist/datetime/components/time-picker/components/TimePickerPanel.js +12 -10
- package/dist/src/components/miscellaneous/StyledFormControlLabel.d.ts +10 -0
- package/dist/src/table/shared-components/StyledCheckbox.d.ts +9 -0
- package/dist/table/components/columns/selectColumn.js +31 -33
- package/dist/table/components/columns/showTextColumn.js +13 -12
- package/dist/table/shared-components/StyledCheckbox.js +59 -53
- package/package.json +1 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { cn as
|
|
1
|
+
import { cn as x } from "../../helpers/cn.js";
|
|
2
2
|
import e from "./StyledCheckbox.module.js";
|
|
3
|
-
import
|
|
4
|
-
import { jsx as
|
|
5
|
-
var
|
|
3
|
+
import P, { useEffect as v, useRef as b } from "react";
|
|
4
|
+
import { Fragment as $, jsx as t, jsxs as l } from "react/jsx-runtime";
|
|
5
|
+
var y = (r) => /* @__PURE__ */ l("svg", {
|
|
6
6
|
viewBox: "0 0 24 24",
|
|
7
7
|
width: "100%",
|
|
8
8
|
height: "100%",
|
|
9
9
|
fill: "none",
|
|
10
|
-
...
|
|
11
|
-
children: [/* @__PURE__ */
|
|
10
|
+
...r,
|
|
11
|
+
children: [/* @__PURE__ */ t("title", { children: "Indeterminate icon" }), /* @__PURE__ */ t("path", {
|
|
12
12
|
d: "M6 12H18",
|
|
13
13
|
stroke: "currentColor",
|
|
14
|
-
strokeWidth:
|
|
14
|
+
strokeWidth: r.strokeWidth ?? 3,
|
|
15
15
|
strokeLinecap: "round"
|
|
16
16
|
})]
|
|
17
|
-
}),
|
|
17
|
+
}), B = (r) => /* @__PURE__ */ l("svg", {
|
|
18
18
|
viewBox: "0 0 24 24",
|
|
19
19
|
width: "100%",
|
|
20
20
|
height: "100%",
|
|
@@ -23,56 +23,62 @@ var E = (t) => /* @__PURE__ */ k("svg", {
|
|
|
23
23
|
strokeWidth: 2,
|
|
24
24
|
strokeLinecap: "round",
|
|
25
25
|
strokeLinejoin: "round",
|
|
26
|
-
...
|
|
27
|
-
children: [/* @__PURE__ */
|
|
28
|
-
}),
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
...r,
|
|
27
|
+
children: [/* @__PURE__ */ t("title", { children: "Check icon" }), /* @__PURE__ */ t("path", { d: "M4 12l5 5L20 6" })]
|
|
28
|
+
}), _ = ({ dataTest: r, size: d = "medium", disabled: h, readOnly: a, indeterminate: n = !1, checked: p, disableRipple: g, hideWrapper: I, className: N, onChange: R, decorative: w, ...W }) => {
|
|
29
|
+
const c = !!I, s = !g && !c && !h && !a, u = b(null), m = b(null);
|
|
30
|
+
v(() => {
|
|
31
|
+
u.current && (u.current.indeterminate = n);
|
|
32
32
|
}, [n]);
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
33
|
+
const k = x(e.CheckboxWrapper, !c && e[`size-${d}`], c && e.HideWrapper, n && e.Indeterminate, a && e.ReadOnly, s && e.CheckboxHover, N), L = x(e.Checkbox, e[`size-${d}`], n && e.Indeterminate), E = n ? y : B, H = P.useCallback((o) => {
|
|
34
|
+
if (o.stopPropagation(), !s) return;
|
|
35
35
|
const i = document.createElement("span");
|
|
36
|
-
i.className = e.CheckboxRipple ?? "", i.addEventListener("animationend", () => i.remove(), { once: !0 }),
|
|
36
|
+
i.className = e.CheckboxRipple ?? "", i.addEventListener("animationend", () => i.remove(), { once: !0 }), m.current?.appendChild(i);
|
|
37
37
|
}, [s]);
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
return () =>
|
|
41
|
-
}, [])
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"data-checked":
|
|
46
|
-
"data-unchecked": !
|
|
38
|
+
v(() => {
|
|
39
|
+
const o = m.current;
|
|
40
|
+
return () => o?.replaceChildren();
|
|
41
|
+
}, []);
|
|
42
|
+
const j = (o) => {
|
|
43
|
+
a || R?.(o, o.target.checked);
|
|
44
|
+
}, C = {
|
|
45
|
+
"data-checked": p && !n ? "" : void 0,
|
|
46
|
+
"data-unchecked": !p && !n ? "" : void 0,
|
|
47
47
|
"data-indeterminate": n ? "" : void 0,
|
|
48
|
-
"data-disabled":
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
48
|
+
"data-disabled": h ? "" : void 0
|
|
49
|
+
}, f = /* @__PURE__ */ l($, { children: [!c && s && /* @__PURE__ */ t("span", {
|
|
50
|
+
ref: m,
|
|
51
|
+
className: e.CheckboxRippleContainer
|
|
52
|
+
}), /* @__PURE__ */ t("span", {
|
|
53
|
+
className: L,
|
|
54
|
+
children: /* @__PURE__ */ t("span", {
|
|
55
|
+
className: e.Indicator,
|
|
56
|
+
children: /* @__PURE__ */ t(E, { strokeWidth: d === "small" ? 3 : 2 })
|
|
57
|
+
})
|
|
58
|
+
})] });
|
|
59
|
+
return w ? /* @__PURE__ */ t("span", {
|
|
60
|
+
"aria-hidden": "true",
|
|
61
|
+
className: k,
|
|
62
|
+
"data-test": r,
|
|
63
|
+
...C,
|
|
64
|
+
children: f
|
|
65
|
+
}) : /* @__PURE__ */ l("label", {
|
|
66
|
+
className: k,
|
|
67
|
+
"data-test": r,
|
|
68
|
+
onPointerDown: H,
|
|
69
|
+
...C,
|
|
70
|
+
children: [/* @__PURE__ */ t("input", {
|
|
71
|
+
ref: u,
|
|
72
|
+
type: "checkbox",
|
|
73
|
+
className: "sr-only",
|
|
74
|
+
checked: p,
|
|
75
|
+
disabled: h,
|
|
76
|
+
readOnly: a,
|
|
77
|
+
onChange: j,
|
|
78
|
+
...W
|
|
79
|
+
}), f]
|
|
74
80
|
});
|
|
75
81
|
};
|
|
76
82
|
export {
|
|
77
|
-
|
|
83
|
+
_ as StyledCheckbox
|
|
78
84
|
};
|