@tedi-design-system/react 16.0.0-rc.2 → 16.0.0-rc.5
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/bundle-stats.html +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/prop-types/external/react-is/index.cjs.js +1 -1
- package/external/prop-types/external/react-is/index.es.js +1 -1
- package/index.css +1 -1
- package/package.json +1 -1
- package/src/tedi/components/buttons/info-button/info-button.cjs.js +1 -1
- package/src/tedi/components/buttons/info-button/info-button.d.ts +4 -3
- package/src/tedi/components/buttons/info-button/info-button.es.js +17 -16
- package/src/tedi/components/form/checkbox/checkbox.cjs.js +1 -1
- package/src/tedi/components/form/checkbox/checkbox.es.js +61 -59
- package/src/tedi/components/form/choice-group/components/choice-group-item/choice-group-item.cjs.js +1 -1
- package/src/tedi/components/form/choice-group/components/choice-group-item/choice-group-item.es.js +61 -58
- package/src/tedi/components/form/choice-input.types.d.ts +5 -1
- package/src/tedi/components/form/radio/radio.cjs.js +1 -1
- package/src/tedi/components/form/radio/radio.es.js +55 -53
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { FeedbackText as
|
|
5
|
-
import { FormLabel as
|
|
1
|
+
import { jsxs as l, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import c from "../../../../../external/classnames/index.es.js";
|
|
3
|
+
import s from "react";
|
|
4
|
+
import { FeedbackText as M } from "../feedback-text/feedback-text.es.js";
|
|
5
|
+
import { FormLabel as q } from "../form-label/form-label.es.js";
|
|
6
6
|
import i from "./radio.module.scss.es.js";
|
|
7
7
|
import { Row as v } from "../../layout/grid/row.es.js";
|
|
8
|
-
import { Col as
|
|
9
|
-
const
|
|
8
|
+
import { Col as k } from "../../layout/grid/col.es.js";
|
|
9
|
+
const K = (N) => {
|
|
10
10
|
const {
|
|
11
|
-
id:
|
|
12
|
-
label:
|
|
13
|
-
value:
|
|
14
|
-
className:
|
|
15
|
-
disabled:
|
|
16
|
-
onChange:
|
|
17
|
-
hideLabel:
|
|
18
|
-
helper:
|
|
19
|
-
checked:
|
|
20
|
-
defaultChecked:
|
|
21
|
-
hover:
|
|
22
|
-
name:
|
|
11
|
+
id: o,
|
|
12
|
+
label: n,
|
|
13
|
+
value: m,
|
|
14
|
+
className: C,
|
|
15
|
+
disabled: h,
|
|
16
|
+
onChange: a,
|
|
17
|
+
hideLabel: g,
|
|
18
|
+
helper: r,
|
|
19
|
+
checked: t,
|
|
20
|
+
defaultChecked: y,
|
|
21
|
+
hover: R,
|
|
22
|
+
name: x,
|
|
23
23
|
tooltip: p,
|
|
24
|
-
size:
|
|
25
|
-
invalid:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
24
|
+
size: f = "default",
|
|
25
|
+
invalid: j,
|
|
26
|
+
required: w,
|
|
27
|
+
...I
|
|
28
|
+
} = N, [u, L] = s.useState(y || !1), _ = s.useRef(null), $ = s.useMemo(() => a && typeof t < "u" ? t : u, [a, u, t]), z = (e) => {
|
|
29
|
+
typeof t > "u" && L(e == null ? void 0 : e.target.checked), a == null || a(m, e == null ? void 0 : e.target.checked);
|
|
30
|
+
}, b = r ? r.id ?? `${o}-helper` : void 0, B = p ? `${o}-tooltip` : void 0, F = c(i["tedi-radio__label"], { [i["tedi-radio--disabled"]]: h });
|
|
31
|
+
return /* @__PURE__ */ l("div", { "data-name": "radio", ...I, children: [
|
|
32
|
+
/* @__PURE__ */ l(v, { gutter: 0, children: [
|
|
33
|
+
/* @__PURE__ */ d(k, { width: "auto", children: /* @__PURE__ */ l("div", { className: i["tedi-radio__outer-indicator-wrapper"], children: [
|
|
33
34
|
/* @__PURE__ */ d(
|
|
34
35
|
"input",
|
|
35
36
|
{
|
|
36
|
-
id:
|
|
37
|
-
value:
|
|
38
|
-
name:
|
|
37
|
+
id: o,
|
|
38
|
+
value: m,
|
|
39
|
+
name: x,
|
|
39
40
|
type: "radio",
|
|
40
|
-
disabled:
|
|
41
|
-
checked:
|
|
42
|
-
onChange:
|
|
41
|
+
disabled: h,
|
|
42
|
+
checked: $,
|
|
43
|
+
onChange: z,
|
|
43
44
|
className: i["tedi-radio__input"],
|
|
44
|
-
"aria-describedby": [b,
|
|
45
|
+
"aria-describedby": [b, B].filter(Boolean).join(" ")
|
|
45
46
|
}
|
|
46
47
|
),
|
|
47
48
|
/* @__PURE__ */ d(
|
|
@@ -50,36 +51,37 @@ const J = (C) => {
|
|
|
50
51
|
"aria-hidden": "true",
|
|
51
52
|
onClick: () => {
|
|
52
53
|
var e;
|
|
53
|
-
return (e =
|
|
54
|
+
return (e = _.current) == null ? void 0 : e.click();
|
|
54
55
|
},
|
|
55
|
-
className:
|
|
56
|
+
className: c(
|
|
56
57
|
i["tedi-radio__indicator"],
|
|
57
|
-
{ [i["tedi-radio__indicator--hover"]]:
|
|
58
|
-
{ [i[`tedi-radio__indicator--size-${
|
|
59
|
-
{ [i["tedi-radio__indicator--invalid"]]:
|
|
60
|
-
|
|
58
|
+
{ [i["tedi-radio__indicator--hover"]]: R },
|
|
59
|
+
{ [i[`tedi-radio__indicator--size-${f}`]]: f },
|
|
60
|
+
{ [i["tedi-radio__indicator--invalid"]]: j },
|
|
61
|
+
C
|
|
61
62
|
),
|
|
62
63
|
"data-testid": "radio-indicator"
|
|
63
64
|
}
|
|
64
65
|
)
|
|
65
66
|
] }) }),
|
|
66
|
-
/* @__PURE__ */ d(
|
|
67
|
-
|
|
67
|
+
n && /* @__PURE__ */ d(k, { children: /* @__PURE__ */ d(
|
|
68
|
+
q,
|
|
68
69
|
{
|
|
69
|
-
ref:
|
|
70
|
-
className:
|
|
71
|
-
id:
|
|
70
|
+
ref: _,
|
|
71
|
+
className: F,
|
|
72
|
+
id: o,
|
|
72
73
|
"data-testid": "radio-label",
|
|
73
|
-
hideLabel:
|
|
74
|
-
label:
|
|
75
|
-
tooltip: p
|
|
74
|
+
hideLabel: g,
|
|
75
|
+
label: n,
|
|
76
|
+
tooltip: p,
|
|
77
|
+
required: w
|
|
76
78
|
}
|
|
77
|
-
)
|
|
79
|
+
) })
|
|
78
80
|
] }),
|
|
79
|
-
|
|
81
|
+
r && /* @__PURE__ */ d(M, { id: b, ...r, className: c(i["tedi-radio__helper"], r.className) })
|
|
80
82
|
] });
|
|
81
83
|
};
|
|
82
84
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
+
K as Radio,
|
|
86
|
+
K as default
|
|
85
87
|
};
|