@stihl-design-system/components 1.0.0-RC.2 → 1.0.0-RC.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.
Files changed (156) hide show
  1. package/README.md +1 -1
  2. package/arialiveregions.49Zyf6mj.js +27 -0
  3. package/arialiveregions.d.ts +1 -0
  4. package/assets/CustomReactSelect.B0rJLjN0.css +1 -0
  5. package/assets/Fieldset.xazpUXJX.css +1 -0
  6. package/assets/InputPassword.C3Uyj7oA.css +1 -0
  7. package/assets/InputSearch.tL3e9-Ob.css +1 -0
  8. package/assets/InputStepper.paPJix5A.css +1 -0
  9. package/assets/Notification.CCCbfXEz.css +1 -0
  10. package/assets/RadioGroup.Ur8Ro-XL.css +1 -0
  11. package/assets/Select.D2qBxaHP.css +1 -0
  12. package/assets/Textarea.BKbocznb.css +1 -0
  13. package/assets/Toast.CAP_EwDX.css +1 -0
  14. package/assets/arialiveregions.VnhjP8Gr.css +1 -0
  15. package/assets/asterisk.C-o6rbGQ.css +1 -0
  16. package/assets/button.BuIpnG-S.css +1 -0
  17. package/assets/buttonround.C3ph5Yyu.css +1 -0
  18. package/assets/checkbox.BsFEWfQe.css +1 -0
  19. package/assets/dialog.BGK3mgk7.css +1 -0
  20. package/assets/heading.CGFucb-C.css +1 -0
  21. package/assets/input.BcP5kkZ2.css +1 -0
  22. package/assets/link.DQy_OhwC.css +1 -0
  23. package/assets/linkstandalone.Dh6bE5Fb.css +1 -0
  24. package/assets/radio.CSHQGdpr.css +1 -0
  25. package/assets/switch.sqve8ApJ.css +1 -0
  26. package/assets/title.CE0Dm7PI.css +1 -0
  27. package/asterisk.DU8THnoC.js +8 -0
  28. package/button.DX_nxoJC.js +135 -0
  29. package/buttonround.CXsBk9nL.js +118 -0
  30. package/{checkbox.Bx5D_GAe.js → checkbox.B43oeMeC.js} +30 -30
  31. package/checkboxgroup.C7aCjYds.js +9 -0
  32. package/chunks/AriaLiveRegions.utils.DzWI5KCU.js +31 -0
  33. package/{checkboxgroup.gQwSHy4i.js → chunks/CheckboxGroup.CS6Q_TeZ.js} +27 -20
  34. package/chunks/{CustomReactSelect.Pvkkof1f.js → CustomReactSelect.DtmbYZUf.js} +516 -510
  35. package/chunks/Fieldset.BokeZzG5.js +99 -0
  36. package/chunks/Icon.9gDIp6p4.js +217 -0
  37. package/chunks/{Input.utils.Bly6ZzLI.js → Input.utils.AKWCNkpA.js} +12 -8
  38. package/chunks/InputPassword.jpUCijp7.js +140 -0
  39. package/chunks/InputSearch.BmOtAZcR.js +190 -0
  40. package/chunks/InputStepper.DTKjUL4U.js +291 -0
  41. package/chunks/Notification.CUPOlHAX.js +93 -0
  42. package/{radiogroup.7ptQiohb.js → chunks/RadioGroup.DpwnVv7u.js} +37 -29
  43. package/chunks/RadioGroup.module.bi3leRes.js +11 -0
  44. package/chunks/Select.DkDZo0ky.js +193 -0
  45. package/chunks/Textarea.C938p79X.js +195 -0
  46. package/chunks/Toast.CLYrwQVO.js +89 -0
  47. package/chunks/{circle-info-colored.DLY6BTL4.js → circle-info-colored.D2pp54gf.js} +3 -3
  48. package/chunks/whatsapp.CPpu-7Nn.js +10 -0
  49. package/{combobox.BOJ7aq_B.js → combobox.BaSkiD6f.js} +7 -7
  50. package/components/AriaLiveRegions/AriaLiveRegions.d.ts +4 -0
  51. package/components/AriaLiveRegions/AriaLiveRegions.utils.d.ts +5 -0
  52. package/components/AriaLiveRegions/AriaLiveRegions.utils.test.d.ts +1 -0
  53. package/components/Checkbox/Checkbox.d.ts +1 -1
  54. package/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  55. package/components/CheckboxGroup/CheckboxGroup.utils.d.ts +1 -1
  56. package/components/Dialog/Dialog.d.ts +11 -0
  57. package/components/Dialog/Dialog.utils.d.ts +0 -0
  58. package/components/Fieldset/Fieldset.d.ts +1 -1
  59. package/components/Fieldset/Fieldset.utils.d.ts +1 -1
  60. package/components/Heading/Heading.utils.d.ts +1 -1
  61. package/components/Logo/Logo.d.ts +4 -2
  62. package/components/Logo/Logo.utils.d.ts +1 -0
  63. package/components/Notification/Notification.d.ts +26 -0
  64. package/components/Notification/Notification.test.d.ts +1 -0
  65. package/components/Notification/Notification.utils.d.ts +5 -0
  66. package/components/RadioGroup/RadioGroup.d.ts +1 -1
  67. package/components/RadioGroup/RadioGroup.utils.d.ts +1 -1
  68. package/components/Toast/Toast.d.ts +21 -0
  69. package/components/Toast/Toast.utils.d.ts +9 -0
  70. package/components/Toast/ToastManager.d.ts +6 -0
  71. package/components/Toast/ToastManager.test.d.ts +1 -0
  72. package/components/Toast/ToastManager.utils.d.ts +2 -0
  73. package/components/Toast/ToastManager.utils.test.d.ts +1 -0
  74. package/customreactselect.LTbjaBN2.js +13 -0
  75. package/dialog.BkXwcbUh.js +45 -0
  76. package/dialog.d.ts +1 -0
  77. package/fieldset.BXOWK-B-.js +11 -0
  78. package/{floatingactionbutton.BtQVIj6W.js → floatingactionbutton.-nDRRiXY.js} +9 -9
  79. package/heading.DqGbFfj2.js +50 -0
  80. package/icon.Cpp_9L1I.js +8 -0
  81. package/index.d.ts +24 -0
  82. package/index.es.js +138 -45
  83. package/input.BM6tyRUm.js +236 -0
  84. package/inputpassword.DUxH1K_k.js +12 -0
  85. package/inputsearch.B-vePHle.js +13 -0
  86. package/inputstepper.C2ypADPI.js +13 -0
  87. package/link.B4XZoLDj.js +115 -0
  88. package/linkstandalone.BSfd95Pd.js +79 -0
  89. package/{logo.DXWgPUY4.js → logo.C_oJ8isW.js} +25 -24
  90. package/notification.CxxAOdNV.js +9 -0
  91. package/notification.d.ts +1 -0
  92. package/{optioncheckbox.CYikfEsE.js → optioncheckbox.CUV1MQhh.js} +3 -3
  93. package/package.json +4 -4
  94. package/radio.Bhu9OUY-.js +79 -0
  95. package/radiogroup.CMJ1b38q.js +11 -0
  96. package/select.DFJK2mHF.js +12 -0
  97. package/{spinner.CSzQEBx2.js → spinner.BskX4ovu.js} +1 -1
  98. package/styles/scss/_index.scss +1 -0
  99. package/styles/scss/lib/_animation.scss +18 -4
  100. package/styles/scss/lib/_grid-extended.scss +2 -2
  101. package/styles/scss/lib/_grid-sidebar-sidebar.scss +4 -2
  102. package/styles/scss/lib/_grid-sidebar.scss +6 -6
  103. package/styles/scss/lib/_heading.scss +14 -1
  104. package/styles/scss/lib/_link.scss +10 -9
  105. package/styles/scss/lib/_shadow.scss +10 -0
  106. package/styles/scss/lib/_text.scss +4 -0
  107. package/styles/scss/lib/_theme.scss +7 -5
  108. package/switch.Bx2tDKx0.js +65 -0
  109. package/{systemfeedback.rBgdiL5T.js → systemfeedback.4Hkfigi-.js} +1 -1
  110. package/textarea.DPy3TJJf.js +12 -0
  111. package/title.icX0VDiO.js +36 -0
  112. package/toast.C-Yg5EoE.js +10 -0
  113. package/toast.d.ts +1 -0
  114. package/toastmanager.DQ_-eTrx.js +96 -0
  115. package/toastmanager.d.ts +1 -0
  116. package/types/icon-types.d.ts +1 -1
  117. package/utils/vitest.setup.d.ts +2 -0
  118. package/assets/CustomReactSelect.bVnR5yBP.css +0 -1
  119. package/assets/RadioGroup.SF2fv4CL.css +0 -1
  120. package/assets/asterisk.Bz7RZnKb.css +0 -1
  121. package/assets/button.C6ZbQtZ-.css +0 -1
  122. package/assets/buttonround.CjJUeMND.css +0 -1
  123. package/assets/checkbox.Bbc6PYDK.css +0 -1
  124. package/assets/fieldset.DTFs_koU.css +0 -1
  125. package/assets/heading.5HpYs7wS.css +0 -1
  126. package/assets/input.GpXQJqEO.css +0 -1
  127. package/assets/inputpassword.B9J1hCcj.css +0 -1
  128. package/assets/inputsearch.BY0BGFPK.css +0 -1
  129. package/assets/inputstepper.B0oC1URa.css +0 -1
  130. package/assets/link.Di4qXro5.css +0 -1
  131. package/assets/linkstandalone.239FeO2E.css +0 -1
  132. package/assets/radio.pqc9u_wx.css +0 -1
  133. package/assets/select.DLOQ6wu0.css +0 -1
  134. package/assets/switch.DVlaePGM.css +0 -1
  135. package/assets/textarea.BNOpd7Nf.css +0 -1
  136. package/assets/title.1dq1eWy9.css +0 -1
  137. package/asterisk.BlYjsfkN.js +0 -8
  138. package/button.Di5XtChf.js +0 -135
  139. package/buttonround._w4KDbHE.js +0 -118
  140. package/chunks/RadioGroup.module.B35YQcsb.js +0 -11
  141. package/customreactselect.DPHXAssl.js +0 -13
  142. package/fieldset.yE6WV6Ls.js +0 -98
  143. package/heading.C6k7Gakb.js +0 -44
  144. package/icon.CmAhxgHK.js +0 -215
  145. package/input.vP5xcwzV.js +0 -236
  146. package/inputpassword.BiQ8ORmn.js +0 -139
  147. package/inputsearch.BA9N3RRc.js +0 -188
  148. package/inputstepper.Cyxeg2Cj.js +0 -290
  149. package/link.BoSdsZHj.js +0 -115
  150. package/linkstandalone.BoN7nARO.js +0 -79
  151. package/radio.DTO5-Yzf.js +0 -79
  152. package/select.Dx80W7cW.js +0 -190
  153. package/switch.BwGtQdnx.js +0 -65
  154. package/textarea.C8tp1ciU.js +0 -193
  155. package/title.BT-uIobN.js +0 -36
  156. /package/assets/{icon.CB-KQmw4.css → Icon.CB-KQmw4.css} +0 -0
@@ -0,0 +1,118 @@
1
+ "use client";
2
+ import { j as l } from "./chunks/jsx-runtime.C-kxDJ4g.js";
3
+ import { c as _ } from "./chunks/index.CvOaL64Y.js";
4
+ import { D as y } from "./chunks/Icon.9gDIp6p4.js";
5
+ import { DSSpinner as H } from "./spinner.BskX4ovu.js";
6
+ import './assets/buttonround.C3ph5Yyu.css';const p = "_root_eez0z_125", F = "_root--highlight_eez0z_194", O = "_root--dark-highlight_eez0z_194", G = "_root--filled_eez0z_272", I = "_root--outline_eez0z_300", S = "_root--ghost_eez0z_327", x = "_root--ghost-flush_eez0z_352", j = "_root--small_eez0z_358", L = "_root--dark-filled_eez0z_433", C = "_root--dark-outline_eez0z_492", N = "_root--dark-ghost_eez0z_550", R = "_root--dark-ghost-flush_eez0z_606", B = "_root--icon-left_eez0z_665", E = "_root--icon-only_eez0z_681", T = "_root--icon-only-small_eez0z_690", q = "_loader_eez0z_701", w = "_icon--hidden_eez0z_713", A = "_label--hidden_eez0z_717", J = "_label--loading_eez0z_729", o = {
7
+ root: p,
8
+ "root--highlight": "_root--highlight_eez0z_194",
9
+ rootHighlight: F,
10
+ "root--dark-highlight": "_root--dark-highlight_eez0z_194",
11
+ rootDarkHighlight: O,
12
+ "root--filled": "_root--filled_eez0z_272",
13
+ rootFilled: G,
14
+ "root--outline": "_root--outline_eez0z_300",
15
+ rootOutline: I,
16
+ "root--ghost": "_root--ghost_eez0z_327",
17
+ rootGhost: S,
18
+ "root--ghost-flush": "_root--ghost-flush_eez0z_352",
19
+ rootGhostFlush: x,
20
+ "root--small": "_root--small_eez0z_358",
21
+ rootSmall: j,
22
+ "root--dark-filled": "_root--dark-filled_eez0z_433",
23
+ rootDarkFilled: L,
24
+ "root--dark-outline": "_root--dark-outline_eez0z_492",
25
+ rootDarkOutline: C,
26
+ "root--dark-ghost": "_root--dark-ghost_eez0z_550",
27
+ rootDarkGhost: N,
28
+ "root--dark-ghost-flush": "_root--dark-ghost-flush_eez0z_606",
29
+ rootDarkGhostFlush: R,
30
+ "root--icon-left": "_root--icon-left_eez0z_665",
31
+ rootIconLeft: B,
32
+ "root--icon-only": "_root--icon-only_eez0z_681",
33
+ rootIconOnly: E,
34
+ "root--icon-only-small": "_root--icon-only-small_eez0z_690",
35
+ rootIconOnlySmall: T,
36
+ loader: q,
37
+ "icon--hidden": "_icon--hidden_eez0z_713",
38
+ iconHidden: w,
39
+ "label--hidden": "_label--hidden_eez0z_717",
40
+ labelHidden: A,
41
+ "label--loading": "_label--loading_eez0z_729",
42
+ labelLoading: J
43
+ }, U = ({
44
+ children: d,
45
+ aria: z,
46
+ className: c,
47
+ dataTrackingid: g,
48
+ disabled: i = !1,
49
+ iconName: n = "placeholder",
50
+ iconSource: s,
51
+ loading: t = !1,
52
+ theme: r = "light",
53
+ variant: e = "filled",
54
+ onClick: a,
55
+ ...k
56
+ }) => {
57
+ const u = _(
58
+ o.root,
59
+ o.rootIconOnlySmall,
60
+ c,
61
+ {
62
+ // variant
63
+ [o.rootFilled]: e === "filled",
64
+ [o.rootHighlight]: e === "highlight",
65
+ // dark theme
66
+ [o.rootDarkFilled]: r === "dark" && e === "filled",
67
+ [o.rootDarkHighlight]: r === "dark" && e === "highlight"
68
+ }
69
+ ), f = _(o.label, o.labelHidden, {
70
+ // set label opacity to 0 when loading to prevent button size from changing
71
+ [o.labelLoading]: t
72
+ }), m = _(o.icon, {
73
+ // set icon opacity to 0 when loading to prevent button size from changing
74
+ [o.iconHidden]: t
75
+ }), b = r === "light" && e === "filled" ? "dark" : "light", D = (h) => {
76
+ if (i || t) {
77
+ h.preventDefault();
78
+ return;
79
+ }
80
+ a && a(h);
81
+ };
82
+ return /* @__PURE__ */ l.jsxs(
83
+ "button",
84
+ {
85
+ className: u,
86
+ "data-trackingid": g,
87
+ type: "button",
88
+ onClick: D,
89
+ ...z,
90
+ ...k,
91
+ "aria-disabled": i || t,
92
+ "aria-busy": t,
93
+ children: [
94
+ t && /* @__PURE__ */ l.jsx(
95
+ H,
96
+ {
97
+ className: o.loader,
98
+ aria: { "aria-label": "Loading state" }
99
+ }
100
+ ),
101
+ /* @__PURE__ */ l.jsx("span", { className: f, children: d }),
102
+ (n || s) && /* @__PURE__ */ l.jsx(
103
+ y,
104
+ {
105
+ name: n,
106
+ theme: b,
107
+ source: s,
108
+ className: m,
109
+ "aria-hidden": "true"
110
+ }
111
+ )
112
+ ]
113
+ }
114
+ );
115
+ };
116
+ export {
117
+ U as DSButtonRound
118
+ };
@@ -1,50 +1,50 @@
1
1
  "use client";
2
2
  import { j as c } from "./chunks/jsx-runtime.C-kxDJ4g.js";
3
- import { c as r } from "./chunks/index.CvOaL64Y.js";
3
+ import { c as d } from "./chunks/index.CvOaL64Y.js";
4
4
  import { forwardRef as I, useRef as H, useState as M, useEffect as g, useCallback as B } from "react";
5
5
  import { u as E } from "./chunks/useBreakpoint.5xBNDiCf.js";
6
- import { DSIcon as b } from "./icon.CmAhxgHK.js";
7
- import { DSSystemFeedback as V } from "./systemfeedback.rBgdiL5T.js";
8
- import './assets/checkbox.Bbc6PYDK.css';const w = "_root_1upux_125", L = "_root--disabled_1upux_144", O = "_checkbox_1upux_148", P = "_icon-check_1upux_162", R = "_icon-minus_1upux_163", U = "_checkbox--invalid_1upux_184", q = "_label--hidden_1upux_189", z = "_input_1upux_202", A = "_label_1upux_189", F = "_feedback_1upux_316", e = {
6
+ import { D as b } from "./chunks/Icon.9gDIp6p4.js";
7
+ import { DSSystemFeedback as V } from "./systemfeedback.4Hkfigi-.js";
8
+ import './assets/checkbox.BsFEWfQe.css';const w = "_root_10jm0_125", L = "_root--disabled_10jm0_144", O = "_checkbox_10jm0_148", P = "_icon-check_10jm0_162", R = "_icon-minus_10jm0_163", U = "_checkbox--invalid_10jm0_184", q = "_label--hidden_10jm0_189", z = "_input_10jm0_202", A = "_label_10jm0_189", F = "_feedback_10jm0_316", e = {
9
9
  root: w,
10
- "root--disabled": "_root--disabled_1upux_144",
10
+ "root--disabled": "_root--disabled_10jm0_144",
11
11
  rootDisabled: L,
12
12
  checkbox: O,
13
- "icon-check": "_icon-check_1upux_162",
13
+ "icon-check": "_icon-check_10jm0_162",
14
14
  iconCheck: P,
15
- "icon-minus": "_icon-minus_1upux_163",
15
+ "icon-minus": "_icon-minus_10jm0_163",
16
16
  iconMinus: R,
17
- "checkbox--invalid": "_checkbox--invalid_1upux_184",
17
+ "checkbox--invalid": "_checkbox--invalid_10jm0_184",
18
18
  checkboxInvalid: U,
19
- "label--hidden": "_label--hidden_1upux_189",
19
+ "label--hidden": "_label--hidden_10jm0_189",
20
20
  labelHidden: q,
21
21
  input: z,
22
22
  label: A,
23
23
  feedback: F
24
24
  }, G = I(
25
25
  ({
26
- label: d,
27
- checked: _,
26
+ label: _,
27
+ checked: m,
28
28
  className: k,
29
- defaultChecked: p = !1,
29
+ defaultChecked: f = !1,
30
30
  disabled: s = !1,
31
- hideLabel: m = !1,
31
+ hideLabel: x = !1,
32
32
  indeterminate: i = !1,
33
33
  invalid: l = !1,
34
- systemFeedback: x,
34
+ systemFeedback: h,
35
35
  onChange: t,
36
- ...f
36
+ ...j
37
37
  }, n) => {
38
- const a = H(null), [C, j] = M(p), N = E(m);
38
+ const a = H(null), [p, C] = M(f), D = E(x);
39
39
  g(() => {
40
40
  a && a.current && (a.current.indeterminate = i);
41
41
  }, [i]);
42
- const u = _ !== void 0, h = u ? _ : C, D = r(e.root, {
42
+ const r = m !== void 0, u = r ? m : p, N = d(e.root, {
43
43
  [e.rootDisabled]: s
44
- }), v = r(e.label, {
44
+ }), v = d(e.label, {
45
45
  // hide label only visually to keep them available for assistive technologies
46
- [e.labelHidden]: N
47
- }), S = r(e.checkbox, {
46
+ [e.labelHidden]: D
47
+ }), S = d(e.checkbox, {
48
48
  [e.checkboxInvalid]: l
49
49
  }), y = B(
50
50
  (o) => {
@@ -52,12 +52,12 @@ import './assets/checkbox.Bbc6PYDK.css';const w = "_root_1upux_125", L = "_root-
52
52
  o.preventDefault();
53
53
  return;
54
54
  }
55
- u || j(o.target.checked), t && t(o);
55
+ r || C(o.target.checked), t && t(o);
56
56
  },
57
- [s, u, t]
57
+ [s, r, t]
58
58
  );
59
59
  return /* @__PURE__ */ c.jsxs("div", { className: k, children: [
60
- /* @__PURE__ */ c.jsxs("label", { className: D, children: [
60
+ /* @__PURE__ */ c.jsxs("label", { className: N, children: [
61
61
  /* @__PURE__ */ c.jsx(
62
62
  "input",
63
63
  {
@@ -66,12 +66,12 @@ import './assets/checkbox.Bbc6PYDK.css';const w = "_root_1upux_125", L = "_root-
66
66
  ref: (o) => {
67
67
  typeof n == "function" ? n(o) : n !== null && (n.current = o), a.current = o;
68
68
  },
69
- ...f,
70
- checked: h,
69
+ ...j,
70
+ checked: u,
71
71
  disabled: s,
72
- "aria-label": d,
72
+ "aria-label": _,
73
73
  "aria-invalid": l,
74
- "aria-checked": i ? "mixed" : h,
74
+ "aria-checked": i ? "mixed" : u,
75
75
  onChange: y
76
76
  }
77
77
  ),
@@ -93,13 +93,13 @@ import './assets/checkbox.Bbc6PYDK.css';const w = "_root_1upux_125", L = "_root-
93
93
  }
94
94
  )
95
95
  ] }),
96
- /* @__PURE__ */ c.jsx("span", { className: v, children: d })
96
+ /* @__PURE__ */ c.jsx("span", { className: v, children: _ })
97
97
  ] }),
98
- l && x && /* @__PURE__ */ c.jsx(
98
+ l && h && /* @__PURE__ */ c.jsx(
99
99
  V,
100
100
  {
101
101
  className: e.feedback,
102
- message: x,
102
+ message: h,
103
103
  type: "invalid"
104
104
  }
105
105
  )
@@ -0,0 +1,9 @@
1
+ "use client";
2
+ import "./chunks/jsx-runtime.C-kxDJ4g.js";
3
+ import "./chunks/index.CvOaL64Y.js";
4
+ import "./chunks/Fieldset.BokeZzG5.js";
5
+ import "./chunks/RadioGroup.module.bi3leRes.js";
6
+ import { D as e } from "./chunks/CheckboxGroup.CS6Q_TeZ.js";
7
+ export {
8
+ e as DSCheckboxGroup
9
+ };
@@ -0,0 +1,31 @@
1
+ "use client";
2
+ import { g as i } from "./helpers.B1JT5ShS.js";
3
+ import "react";
4
+ const e = "ds-alert-live-region", n = "ds-status-live-region", r = () => document.getElementById(e), a = () => document.getElementById(n), g = () => {
5
+ const t = document.querySelectorAll(
6
+ `#${e}`
7
+ ), o = document.querySelectorAll(
8
+ `#${n}`
9
+ );
10
+ if (t.length > 1)
11
+ throw new Error(
12
+ i(
13
+ "DSAriaLiveRegions",
14
+ `The DSAriaLiveRegions component with id="${e}" should only be present once on the page. Found ${t.length} instances.`
15
+ )
16
+ );
17
+ if (o.length > 1)
18
+ throw new Error(
19
+ i(
20
+ "DSAriaLiveRegions",
21
+ `The DSAriaLiveRegions component with id="${n}" should only be present once on the page. Found ${o.length} instances.`
22
+ )
23
+ );
24
+ };
25
+ export {
26
+ e as A,
27
+ n as a,
28
+ a as b,
29
+ r as g,
30
+ g as v
31
+ };
@@ -1,40 +1,40 @@
1
1
  "use client";
2
- import { j as u } from "./chunks/jsx-runtime.C-kxDJ4g.js";
3
- import { c as b } from "./chunks/index.CvOaL64Y.js";
4
- import { DSFieldset as f } from "./fieldset.yE6WV6Ls.js";
5
- import { s as p } from "./chunks/RadioGroup.module.B35YQcsb.js";
2
+ import { j as u } from "./jsx-runtime.C-kxDJ4g.js";
3
+ import { c as D } from "./index.CvOaL64Y.js";
4
+ import { D as b } from "./Fieldset.BokeZzG5.js";
5
+ import { s as p } from "./RadioGroup.module.bi3leRes.js";
6
6
  import l from "react";
7
- import { g as i } from "./chunks/helpers.B1JT5ShS.js";
8
- import { DSCheckbox as D } from "./checkbox.Bx5D_GAe.js";
9
- const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the DSCheckboxGroup component.`, S = ({
7
+ import { g as s } from "./helpers.B1JT5ShS.js";
8
+ import { DSCheckbox as f } from "../checkbox.B43oeMeC.js";
9
+ const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the DSCheckboxGroup component.`, k = ({
10
10
  children: o,
11
11
  description: e,
12
- id: s,
12
+ id: i,
13
13
  legend: n,
14
14
  systemFeedback: r
15
15
  }) => {
16
- if (!s && (e || r))
16
+ if (!i && (e || r))
17
17
  throw new Error(
18
- i(
18
+ s(
19
19
  "DSCheckboxGroup",
20
20
  'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSCheckboxGroup component.'
21
21
  )
22
22
  );
23
23
  if (!n)
24
24
  throw new Error(
25
- i("DSCheckboxGroup", C("legend"))
25
+ s("DSCheckboxGroup", C("legend"))
26
26
  );
27
27
  if (!o)
28
28
  throw new Error(
29
- i(
29
+ s(
30
30
  "DSCheckboxGroup",
31
31
  "The component requires DSCheckbox components to be explicitly set as its children. Ensure that you include individual DSCheckbox components within the DSCheckboxGroup to create a cohesive checkbox group."
32
32
  )
33
33
  );
34
34
  l.Children.forEach(o, (t) => {
35
- if (!(l.isValidElement(t) && t.type === D))
35
+ if (!(l.isValidElement(t) && t.type === f))
36
36
  throw new Error(
37
- i(
37
+ s(
38
38
  "DSCheckboxGroup",
39
39
  "The component requires the children to be DSCheckbox elements. Ensure that you include individual DSCheckbox components within the DSCheckboxGroup to create a cohesive checkbox group."
40
40
  )
@@ -43,7 +43,7 @@ const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the
43
43
  }, y = ({
44
44
  children: o,
45
45
  legend: e,
46
- alignment: s = "vertical",
46
+ alignment: i = "vertical",
47
47
  className: n,
48
48
  description: r,
49
49
  disabled: t = !1,
@@ -53,14 +53,20 @@ const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the
53
53
  systemFeedback: c,
54
54
  ...x
55
55
  }) => {
56
- process.env.NODE_ENV !== "production" && S({ children: o, legend: e, description: r, id: h, systemFeedback: c });
57
- const d = b(p.root, {
56
+ process.env.NODE_ENV !== "production" && k({
57
+ children: o,
58
+ legend: e,
59
+ description: r,
60
+ id: h,
61
+ systemFeedback: c
62
+ });
63
+ const d = D(p.root, {
58
64
  // In case of longer copy, use vertical alignment
59
- [p.rootHorizontal]: s === "horizontal",
65
+ [p.rootHorizontal]: i === "horizontal",
60
66
  [p.rootInvalid]: a && !!c
61
67
  });
62
68
  return /* @__PURE__ */ u.jsx(
63
- f,
69
+ b,
64
70
  {
65
71
  id: h,
66
72
  legend: e,
@@ -76,5 +82,6 @@ const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the
76
82
  );
77
83
  };
78
84
  export {
79
- y as DSCheckboxGroup
85
+ y as D,
86
+ k as v
80
87
  };