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