@stihl-design-system/components 1.0.0-RC.4 → 1.0.0-RC.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.
Files changed (167) hide show
  1. package/Klarna.svg +1 -0
  2. package/Mastercard.svg +2 -0
  3. package/PayPal.svg +2 -0
  4. package/Placeholder.svg +1 -0
  5. package/Visa.svg +2 -0
  6. package/arialiveregions.BvZhV6hb.js +27 -0
  7. package/assets/CustomReactSelect.Bsphydqt.css +1 -0
  8. package/assets/Fieldset.D0jHAGRL.css +1 -0
  9. package/assets/Icon.Duy_0R8w.css +1 -0
  10. package/assets/InputPassword.VCNO8ANM.css +1 -0
  11. package/assets/InputSearch.BMRAb95l.css +1 -0
  12. package/assets/InputStepper.BKjqNi-i.css +1 -0
  13. package/assets/Notification.Bg63cvs4.css +1 -0
  14. package/assets/RadioGroup.Bz3_xkZU.css +1 -0
  15. package/assets/Select.Bz1TImkI.css +1 -0
  16. package/assets/Textarea.D2h5cW_t.css +1 -0
  17. package/assets/Toast.BzVaebc0.css +1 -0
  18. package/assets/{arialiveregions.VnhjP8Gr.css → arialiveregions.GsGx2USO.css} +1 -1
  19. package/assets/{asterisk.C-o6rbGQ.css → asterisk.JlyPArZu.css} +1 -1
  20. package/assets/button.BdxtFZKx.css +1 -0
  21. package/assets/buttonround.pR4StXA7.css +1 -0
  22. package/assets/checkbox.BjIn2stV.css +1 -0
  23. package/assets/dialog.CKwM2EBH.css +1 -0
  24. package/assets/floatingactionbutton.CUvMbEMf.css +1 -0
  25. package/assets/heading.CCbuI4X-.css +1 -0
  26. package/assets/input.71tOIrpp.css +1 -0
  27. package/assets/link.D61tKkSK.css +1 -0
  28. package/assets/linkstandalone.Bx8Uvo0G.css +1 -0
  29. package/assets/logo.C05WqGId.css +1 -0
  30. package/assets/optioncheckbox.BdRJHcSw.css +1 -0
  31. package/assets/radio.ewRpPo4W.css +1 -0
  32. package/assets/skiptocontent.DGVJ77cj.css +1 -0
  33. package/assets/spinner.D_Nnf1ZG.css +1 -0
  34. package/assets/switch.Ds-I_ybT.css +1 -0
  35. package/assets/{systemfeedback.WE3wClZ3.css → systemfeedback.BzJATHDd.css} +1 -1
  36. package/assets/text.B-CTuGgI.css +1 -0
  37. package/assets/{title.CE0Dm7PI.css → title.DlhX9K3W.css} +1 -1
  38. package/asterisk.Cjbk-xZi.js +8 -0
  39. package/button.L1lgCuM9.js +135 -0
  40. package/buttonround.ddSqXjYf.js +118 -0
  41. package/checkbox.DNHdo6_n.js +113 -0
  42. package/checkboxgroup.DqWlzAeR.js +9 -0
  43. package/chunks/{CheckboxGroup.CS6Q_TeZ.js → CheckboxGroup.DsQ6lI5a.js} +22 -22
  44. package/chunks/{CustomReactSelect.DtmbYZUf.js → CustomReactSelect.5dHi6PEO.js} +909 -959
  45. package/chunks/Fieldset.B1vsrHNv.js +99 -0
  46. package/chunks/{Icon.9gDIp6p4.js → Icon.n4XZrQ4N.js} +33 -27
  47. package/chunks/InputPassword.a7zHKrmM.js +140 -0
  48. package/chunks/InputSearch.DITRiB92.js +189 -0
  49. package/chunks/InputStepper.BkncCNwJ.js +291 -0
  50. package/chunks/Notification.DVVuSOqG.js +93 -0
  51. package/chunks/RadioGroup.BO4pbAJw.js +132 -0
  52. package/chunks/RadioGroup.module.BBZwHDjW.js +11 -0
  53. package/chunks/Select.COdS787F.js +191 -0
  54. package/chunks/Textarea.oqCrSopu.js +195 -0
  55. package/chunks/Toast.RON4bFPY.js +89 -0
  56. package/chunks/{jsx-runtime.C-kxDJ4g.js → jsx-runtime.C115EyI4.js} +3 -7
  57. package/{combobox.BaSkiD6f.js → combobox.CRlhqmuO.js} +2 -2
  58. package/components/Radio/Radio.d.ts +11 -3
  59. package/components/RadioGroup/RadioGroup.d.ts +6 -3
  60. package/components/RadioGroup/RadioGroup.utils.d.ts +5 -3
  61. package/components/RadioGroup/RadioGroup.utils.test.d.ts +1 -0
  62. package/components/SkipToContent/SkipToContent.d.ts +12 -0
  63. package/components/SkipToContent/SkipToContent.test.d.ts +1 -0
  64. package/customreactselect.CD58gwtp.js +13 -0
  65. package/dialog.0qPUVJha.js +45 -0
  66. package/fieldset.aY3V2jK2.js +11 -0
  67. package/floatingactionbutton.D_e4vz2G.js +87 -0
  68. package/heading.BTNroD1E.js +50 -0
  69. package/icon.D3RXjzh4.js +8 -0
  70. package/index.d.ts +1 -0
  71. package/index.es.js +66 -62
  72. package/input.ChVISFEX.js +236 -0
  73. package/inputpassword.Ba9SUUIK.js +12 -0
  74. package/inputsearch.BK-0OTwA.js +13 -0
  75. package/inputstepper.CTpTeXL9.js +13 -0
  76. package/link.SAcKvzJ3.js +115 -0
  77. package/linkstandalone.DNe0Nydm.js +79 -0
  78. package/{logo.C_oJ8isW.js → logo.BR_CUXFl.js} +16 -16
  79. package/notification.Csn5QCR2.js +9 -0
  80. package/{optioncheckbox.CUV1MQhh.js → optioncheckbox.C4l2UIak.js} +7 -7
  81. package/package.json +28 -24
  82. package/partials/index.js +51 -79
  83. package/radio.epf54-sG.js +115 -0
  84. package/radiogroup.CiENWRos.js +11 -0
  85. package/select.DLYav8gw.js +12 -0
  86. package/skiptocontent._YZRKxnc.js +44 -0
  87. package/skiptocontent.d.ts +1 -0
  88. package/spinner.DVa112nj.js +58 -0
  89. package/styles/scss/lib/_animation.scss +15 -14
  90. package/styles/scss/lib/_container-query.scss +3 -3
  91. package/styles/scss/lib/_grid-sidebar.scss +14 -7
  92. package/styles/scss/lib/_link.scss +48 -42
  93. package/styles/scss/lib/_media-query.scss +3 -3
  94. package/styles/scss/lib/_transition.scss +26 -7
  95. package/switch.rd7PdLc9.js +65 -0
  96. package/{systemfeedback.4Hkfigi-.js → systemfeedback.CUWch42u.js} +3 -3
  97. package/text.CrYUewrP.js +57 -0
  98. package/{textarea.DPy3TJJf.js → textarea.hLgeYdsI.js} +4 -4
  99. package/title.Dvp8LKJt.js +36 -0
  100. package/toast.r_yhGYEe.js +10 -0
  101. package/{toastmanager.DQ_-eTrx.js → toastmanager.D-uIi-TS.js} +2 -2
  102. package/utils/index.d.ts +1 -0
  103. package/utils/remove-spaces.d.ts +6 -0
  104. package/utils/remove-spaces.test.d.ts +1 -0
  105. package/arialiveregions.49Zyf6mj.js +0 -27
  106. package/assets/CustomReactSelect.B0rJLjN0.css +0 -1
  107. package/assets/Fieldset.xazpUXJX.css +0 -1
  108. package/assets/Icon.CB-KQmw4.css +0 -1
  109. package/assets/InputPassword.C3Uyj7oA.css +0 -1
  110. package/assets/InputSearch.tL3e9-Ob.css +0 -1
  111. package/assets/InputStepper.paPJix5A.css +0 -1
  112. package/assets/Notification.CCCbfXEz.css +0 -1
  113. package/assets/RadioGroup.Ur8Ro-XL.css +0 -1
  114. package/assets/Select.D2qBxaHP.css +0 -1
  115. package/assets/Textarea.BKbocznb.css +0 -1
  116. package/assets/Toast.CAP_EwDX.css +0 -1
  117. package/assets/button.BuIpnG-S.css +0 -1
  118. package/assets/buttonround.C3ph5Yyu.css +0 -1
  119. package/assets/checkbox.BsFEWfQe.css +0 -1
  120. package/assets/dialog.BGK3mgk7.css +0 -1
  121. package/assets/floatingactionbutton.D7ywURL3.css +0 -1
  122. package/assets/heading.CGFucb-C.css +0 -1
  123. package/assets/input.BcP5kkZ2.css +0 -1
  124. package/assets/link.DQy_OhwC.css +0 -1
  125. package/assets/linkstandalone.Dh6bE5Fb.css +0 -1
  126. package/assets/logo.BbHYgnWo.css +0 -1
  127. package/assets/optioncheckbox.C-K1FLhc.css +0 -1
  128. package/assets/radio.CSHQGdpr.css +0 -1
  129. package/assets/spinner.C5rBmKiF.css +0 -1
  130. package/assets/switch.sqve8ApJ.css +0 -1
  131. package/assets/text.DDAveG7E.css +0 -1
  132. package/asterisk.DU8THnoC.js +0 -8
  133. package/button.DX_nxoJC.js +0 -135
  134. package/buttonround.CXsBk9nL.js +0 -118
  135. package/checkbox.B43oeMeC.js +0 -112
  136. package/checkboxgroup.C7aCjYds.js +0 -9
  137. package/chunks/Fieldset.BokeZzG5.js +0 -99
  138. package/chunks/InputPassword.jpUCijp7.js +0 -140
  139. package/chunks/InputSearch.BmOtAZcR.js +0 -190
  140. package/chunks/InputStepper.DTKjUL4U.js +0 -291
  141. package/chunks/Notification.CUPOlHAX.js +0 -93
  142. package/chunks/RadioGroup.DpwnVv7u.js +0 -110
  143. package/chunks/RadioGroup.module.bi3leRes.js +0 -11
  144. package/chunks/Select.DkDZo0ky.js +0 -193
  145. package/chunks/Textarea.C938p79X.js +0 -195
  146. package/chunks/Toast.CLYrwQVO.js +0 -89
  147. package/customreactselect.LTbjaBN2.js +0 -13
  148. package/dialog.BkXwcbUh.js +0 -45
  149. package/fieldset.BXOWK-B-.js +0 -11
  150. package/floatingactionbutton.-nDRRiXY.js +0 -87
  151. package/heading.DqGbFfj2.js +0 -50
  152. package/icon.Cpp_9L1I.js +0 -8
  153. package/input.BM6tyRUm.js +0 -236
  154. package/inputpassword.DUxH1K_k.js +0 -12
  155. package/inputsearch.B-vePHle.js +0 -13
  156. package/inputstepper.C2ypADPI.js +0 -13
  157. package/link.B4XZoLDj.js +0 -115
  158. package/linkstandalone.BSfd95Pd.js +0 -79
  159. package/notification.CxxAOdNV.js +0 -9
  160. package/radio.Bhu9OUY-.js +0 -79
  161. package/radiogroup.CMJ1b38q.js +0 -11
  162. package/select.DFJK2mHF.js +0 -12
  163. package/spinner.BskX4ovu.js +0 -58
  164. package/switch.Bx2tDKx0.js +0 -65
  165. package/text.CPU8IUqY.js +0 -57
  166. package/title.icX0VDiO.js +0 -36
  167. package/toast.C-Yg5EoE.js +0 -10
@@ -1,135 +0,0 @@
1
- "use client";
2
- import { j as _ } from "./chunks/jsx-runtime.C-kxDJ4g.js";
3
- import { c as a } from "./chunks/index.CvOaL64Y.js";
4
- import { u as e } from "./chunks/useBreakpoint.5xBNDiCf.js";
5
- import { D as I } from "./chunks/Icon.9gDIp6p4.js";
6
- import { DSSpinner as F } from "./spinner.BskX4ovu.js";
7
- import './assets/button.BuIpnG-S.css';const S = "_root_1ktgx_125", j = "_root--highlight_1ktgx_192", L = "_root--dark-highlight_1ktgx_192", C = "_root--filled_1ktgx_270", N = "_root--outline_1ktgx_298", B = "_root--ghost_1ktgx_325", E = "_root--ghost-flush_1ktgx_350", R = "_root--small_1ktgx_356", T = "_root--dark-filled_1ktgx_431", V = "_root--dark-outline_1ktgx_490", q = "_root--dark-ghost_1ktgx_548", w = "_root--dark-ghost-flush_1ktgx_604", A = "_root--icon-left_1ktgx_663", J = "_root--icon-only_1ktgx_679", K = "_root--icon-only-small_1ktgx_688", M = "_loader_1ktgx_699", P = "_icon--hidden_1ktgx_711", Q = "_label--hidden_1ktgx_715", U = "_label--loading_1ktgx_727", o = {
8
- root: S,
9
- "root--highlight": "_root--highlight_1ktgx_192",
10
- rootHighlight: j,
11
- "root--dark-highlight": "_root--dark-highlight_1ktgx_192",
12
- rootDarkHighlight: L,
13
- "root--filled": "_root--filled_1ktgx_270",
14
- rootFilled: C,
15
- "root--outline": "_root--outline_1ktgx_298",
16
- rootOutline: N,
17
- "root--ghost": "_root--ghost_1ktgx_325",
18
- rootGhost: B,
19
- "root--ghost-flush": "_root--ghost-flush_1ktgx_350",
20
- rootGhostFlush: E,
21
- "root--small": "_root--small_1ktgx_356",
22
- rootSmall: R,
23
- "root--dark-filled": "_root--dark-filled_1ktgx_431",
24
- rootDarkFilled: T,
25
- "root--dark-outline": "_root--dark-outline_1ktgx_490",
26
- rootDarkOutline: V,
27
- "root--dark-ghost": "_root--dark-ghost_1ktgx_548",
28
- rootDarkGhost: q,
29
- "root--dark-ghost-flush": "_root--dark-ghost-flush_1ktgx_604",
30
- rootDarkGhostFlush: w,
31
- "root--icon-left": "_root--icon-left_1ktgx_663",
32
- rootIconLeft: A,
33
- "root--icon-only": "_root--icon-only_1ktgx_679",
34
- rootIconOnly: J,
35
- "root--icon-only-small": "_root--icon-only-small_1ktgx_688",
36
- rootIconOnlySmall: K,
37
- loader: M,
38
- "icon--hidden": "_icon--hidden_1ktgx_711",
39
- iconHidden: P,
40
- "label--hidden": "_label--hidden_1ktgx_715",
41
- labelHidden: Q,
42
- "label--loading": "_label--loading_1ktgx_727",
43
- labelLoading: U
44
- }, z = ({
45
- children: u,
46
- aria: x,
47
- className: f,
48
- dataTrackingid: m,
49
- disabled: g = !1,
50
- hideLabel: i = !1,
51
- iconName: h,
52
- iconPosition: D = "left",
53
- iconSource: k,
54
- isFlush: s = !1,
55
- loading: r = !1,
56
- size: n = "medium",
57
- theme: l = "light",
58
- variant: t = "filled",
59
- onClick: d,
60
- ...b
61
- }) => {
62
- const y = a(o.root, f, {
63
- // variant
64
- [o.rootFilled]: t === "filled",
65
- [o.rootHighlight]: t === "highlight",
66
- [o.rootOutline]: t === "outline",
67
- [o.rootGhost]: t === "ghost" && s !== !0,
68
- // isFlush
69
- [o.rootGhostFlush]: t === "ghost" && s === !0,
70
- // dark theme
71
- [o.rootDarkFilled]: l === "dark" && t === "filled",
72
- [o.rootDarkHighlight]: l === "dark" && t === "highlight",
73
- [o.rootDarkOutline]: l === "dark" && t === "outline",
74
- [o.rootDarkGhost]: l === "dark" && t === "ghost" && s !== !0,
75
- // dark isFlush
76
- [o.rootDarkGhostFlush]: l === "dark" && t === "ghost" && s === !0,
77
- // size
78
- [o.rootSmall]: n === "small",
79
- // icon position
80
- [o.rootIconLeft]: D === "left",
81
- // icon only
82
- [o.rootIconOnly]: e(i) && n === "medium",
83
- [o.rootIconOnlySmall]: e(i) && n === "small"
84
- }), O = a(o.label, {
85
- // hide label only visually to keep them available for assistive technologies
86
- [o.labelHidden]: e(i),
87
- // set label opacity to 0 when loading to prevent button size from changing
88
- [o.labelLoading]: r
89
- }), p = a(o.icon, {
90
- // set icon opacity to 0 when loading to prevent button size from changing
91
- [o.iconHidden]: r
92
- }), G = l === "light" && t === "filled" || l === "dark" && t === "outline" || l === "dark" && t === "ghost" ? "dark" : "light", H = (c) => {
93
- if (g || r) {
94
- c.preventDefault();
95
- return;
96
- }
97
- d && d(c);
98
- };
99
- return /* @__PURE__ */ _.jsxs(
100
- "button",
101
- {
102
- className: y,
103
- "data-trackingid": m,
104
- type: "submit",
105
- onClick: H,
106
- ...x,
107
- ...b,
108
- "aria-disabled": g || r,
109
- "aria-busy": r,
110
- children: [
111
- r && /* @__PURE__ */ _.jsx(
112
- F,
113
- {
114
- className: o.loader,
115
- aria: { "aria-label": "Loading state" }
116
- }
117
- ),
118
- /* @__PURE__ */ _.jsx("span", { className: O, children: u }),
119
- (h || k) && /* @__PURE__ */ _.jsx(
120
- I,
121
- {
122
- name: h,
123
- theme: G,
124
- source: k,
125
- className: p,
126
- "aria-hidden": "true"
127
- }
128
- )
129
- ]
130
- }
131
- );
132
- };
133
- export {
134
- z as DSButton
135
- };
@@ -1,118 +0,0 @@
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,112 +0,0 @@
1
- "use client";
2
- import { j as c } from "./chunks/jsx-runtime.C-kxDJ4g.js";
3
- import { c as d } from "./chunks/index.CvOaL64Y.js";
4
- import { forwardRef as I, useRef as H, useState as M, useEffect as g, useCallback as B } from "react";
5
- import { u as E } from "./chunks/useBreakpoint.5xBNDiCf.js";
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
- root: w,
10
- "root--disabled": "_root--disabled_10jm0_144",
11
- rootDisabled: L,
12
- checkbox: O,
13
- "icon-check": "_icon-check_10jm0_162",
14
- iconCheck: P,
15
- "icon-minus": "_icon-minus_10jm0_163",
16
- iconMinus: R,
17
- "checkbox--invalid": "_checkbox--invalid_10jm0_184",
18
- checkboxInvalid: U,
19
- "label--hidden": "_label--hidden_10jm0_189",
20
- labelHidden: q,
21
- input: z,
22
- label: A,
23
- feedback: F
24
- }, G = I(
25
- ({
26
- label: _,
27
- checked: m,
28
- className: k,
29
- defaultChecked: f = !1,
30
- disabled: s = !1,
31
- hideLabel: x = !1,
32
- indeterminate: i = !1,
33
- invalid: l = !1,
34
- systemFeedback: h,
35
- onChange: t,
36
- ...j
37
- }, n) => {
38
- const a = H(null), [p, C] = M(f), D = E(x);
39
- g(() => {
40
- a && a.current && (a.current.indeterminate = i);
41
- }, [i]);
42
- const r = m !== void 0, u = r ? m : p, N = d(e.root, {
43
- [e.rootDisabled]: s
44
- }), v = d(e.label, {
45
- // hide label only visually to keep them available for assistive technologies
46
- [e.labelHidden]: D
47
- }), S = d(e.checkbox, {
48
- [e.checkboxInvalid]: l
49
- }), y = B(
50
- (o) => {
51
- if (s) {
52
- o.preventDefault();
53
- return;
54
- }
55
- r || C(o.target.checked), t && t(o);
56
- },
57
- [s, r, t]
58
- );
59
- return /* @__PURE__ */ c.jsxs("div", { className: k, children: [
60
- /* @__PURE__ */ c.jsxs("label", { className: N, children: [
61
- /* @__PURE__ */ c.jsx(
62
- "input",
63
- {
64
- type: "checkbox",
65
- className: e.input,
66
- ref: (o) => {
67
- typeof n == "function" ? n(o) : n !== null && (n.current = o), a.current = o;
68
- },
69
- ...j,
70
- checked: u,
71
- disabled: s,
72
- "aria-label": _,
73
- "aria-invalid": l,
74
- "aria-checked": i ? "mixed" : u,
75
- onChange: y
76
- }
77
- ),
78
- /* @__PURE__ */ c.jsxs("span", { className: S, children: [
79
- /* @__PURE__ */ c.jsx(
80
- b,
81
- {
82
- name: "check",
83
- className: e.iconCheck,
84
- "aria-hidden": "true"
85
- }
86
- ),
87
- /* @__PURE__ */ c.jsx(
88
- b,
89
- {
90
- name: "minus",
91
- className: e.iconMinus,
92
- "aria-hidden": "true"
93
- }
94
- )
95
- ] }),
96
- /* @__PURE__ */ c.jsx("span", { className: v, children: _ })
97
- ] }),
98
- l && h && /* @__PURE__ */ c.jsx(
99
- V,
100
- {
101
- className: e.feedback,
102
- message: h,
103
- type: "invalid"
104
- }
105
- )
106
- ] });
107
- }
108
- );
109
- G.displayName = "DSCheckbox";
110
- export {
111
- G as DSCheckbox
112
- };
@@ -1,9 +0,0 @@
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
- };
@@ -1,99 +0,0 @@
1
- "use client";
2
- import { j as e } from "./jsx-runtime.C-kxDJ4g.js";
3
- import { c } from "./index.CvOaL64Y.js";
4
- import "react";
5
- import { Asterisk as f } from "../asterisk.DU8THnoC.js";
6
- import { DSHeading as v } from "../heading.DqGbFfj2.js";
7
- import { DSSystemFeedback as w } from "../systemfeedback.4Hkfigi-.js";
8
- import { g as y } from "./helpers.B1JT5ShS.js";
9
- import '../assets/Fieldset.xazpUXJX.css';const N = "_root_189b3_63", E = "_child-wrapper_189b3_69", M = "_legend_189b3_76", q = "_legend--utility--m_189b3_80", C = "_description_189b3_91", P = "_description--small_189b3_104", T = "_system-feedback_189b3_108", i = {
10
- root: N,
11
- "child-wrapper": "_child-wrapper_189b3_69",
12
- childWrapper: E,
13
- legend: M,
14
- "legend--utility--m": "_legend--utility--m_189b3_80",
15
- legendUtilityM: q,
16
- description: C,
17
- "description--small": "_description--small_189b3_104",
18
- descriptionSmall: P,
19
- "system-feedback": "_system-feedback_189b3_108",
20
- systemFeedback: T
21
- }, U = ({
22
- description: a,
23
- id: s,
24
- legend: n,
25
- systemFeedback: t
26
- }) => {
27
- if (!s && (a || t))
28
- throw new Error(
29
- y(
30
- "DSFieldset",
31
- 'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSFieldset component.'
32
- )
33
- );
34
- if (!n)
35
- throw new Error(
36
- y(
37
- "DSFieldset",
38
- "The legend prop is required. Please add the legend prop to the DSFieldset component."
39
- )
40
- );
41
- }, H = ({
42
- children: a,
43
- legend: s,
44
- className: n,
45
- description: t,
46
- disabled: j = !1,
47
- id: d,
48
- invalid: p = !1,
49
- required: m = !1,
50
- systemFeedback: o,
51
- ...S
52
- }) => {
53
- process.env.NODE_ENV !== "production" && U({ description: t, id: d, legend: s, systemFeedback: o });
54
- let r, _, b;
55
- const l = typeof s == "object" && s !== void 0;
56
- l && ({ headingSize: r, headingTag: _, headingText: b } = s);
57
- const g = `${d}-feedback`, h = `${d}-description`, u = [
58
- o && g,
59
- t && h
60
- ].filter(Boolean).join(" "), x = !l || r === "small" || r === "small-uppercase", D = c(i.root, n), F = c(i.legend, {
61
- [i.legendUtilityM]: !l
62
- }), k = c(i.description, {
63
- [i.descriptionSmall]: x
64
- });
65
- return /* @__PURE__ */ e.jsxs(
66
- "fieldset",
67
- {
68
- className: D,
69
- disabled: j,
70
- ...S,
71
- "aria-invalid": p,
72
- "aria-describedby": u || void 0,
73
- children: [
74
- /* @__PURE__ */ e.jsx("legend", { className: F, children: l ? /* @__PURE__ */ e.jsxs(v, { tag: _, size: r, children: [
75
- b,
76
- m && /* @__PURE__ */ e.jsx(f, {})
77
- ] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
78
- s,
79
- m && /* @__PURE__ */ e.jsx(f, {})
80
- ] }) }),
81
- t && /* @__PURE__ */ e.jsx("span", { id: h, className: k, children: t }),
82
- p && o && /* @__PURE__ */ e.jsx(
83
- w,
84
- {
85
- id: g,
86
- type: "invalid",
87
- message: o,
88
- className: i.systemFeedback
89
- }
90
- ),
91
- /* @__PURE__ */ e.jsx("div", { className: i.childWrapper, children: a })
92
- ]
93
- }
94
- );
95
- };
96
- export {
97
- H as D,
98
- U as v
99
- };
@@ -1,140 +0,0 @@
1
- "use client";
2
- import { j as a } from "./jsx-runtime.C-kxDJ4g.js";
3
- import { c as i } from "./index.CvOaL64Y.js";
4
- import { useState as A } from "react";
5
- import { u as D } from "./useBreakpoint.5xBNDiCf.js";
6
- import { Asterisk as C } from "../asterisk.DU8THnoC.js";
7
- import { DSButton as L } from "../button.DX_nxoJC.js";
8
- import { DSSystemFeedback as $ } from "../systemfeedback.4Hkfigi-.js";
9
- import { g as b } from "./helpers.B1JT5ShS.js";
10
- import '../assets/InputPassword.C3Uyj7oA.css';const E = "_input_8z84y_187", q = "_input--invalid_8z84y_297", R = "_input--small_8z84y_304", V = "_input--has-leading-icon_8z84y_350", O = "_input--has-action-button_8z84y_353", F = "_input--has-second-action-button_8z84y_356", M = "_input--has-affix_8z84y_368", T = "_input--is-ready_8z84y_380", G = "_root_8z84y_387", J = "_hint_8z84y_395", K = "_label_8z84y_395", Q = "_wrapper_8z84y_399", U = "_action-button_8z84y_405", W = "_label--hidden_8z84y_422", X = "_feedback_8z84y_449", t = {
11
- input: E,
12
- "input--invalid": "_input--invalid_8z84y_297",
13
- inputInvalid: q,
14
- "input--small": "_input--small_8z84y_304",
15
- inputSmall: R,
16
- "input--has-leading-icon": "_input--has-leading-icon_8z84y_350",
17
- inputHasLeadingIcon: V,
18
- "input--has-action-button": "_input--has-action-button_8z84y_353",
19
- inputHasActionButton: O,
20
- "input--has-second-action-button": "_input--has-second-action-button_8z84y_356",
21
- inputHasSecondActionButton: F,
22
- "input--has-affix": "_input--has-affix_8z84y_368",
23
- inputHasAffix: M,
24
- "input--is-ready": "_input--is-ready_8z84y_380",
25
- inputIsReady: T,
26
- root: G,
27
- hint: J,
28
- label: K,
29
- wrapper: Q,
30
- "action-button": "_action-button_8z84y_405",
31
- actionButton: U,
32
- "label--hidden": "_label--hidden_8z84y_422",
33
- labelHidden: W,
34
- feedback: X
35
- }, Y = ({ id: n, label: s }) => {
36
- if (!n)
37
- throw new Error(
38
- b(
39
- "DSInputPassword",
40
- 'A unique "id" prop is required. Please add an unique "id" prop to the DSInputPassword component.'
41
- )
42
- );
43
- if (!s)
44
- throw new Error(
45
- b(
46
- "DSInputPassword",
47
- `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputPassword component. If you don't want to display a label, set hideLabel={true}.`
48
- )
49
- );
50
- }, lt = ({
51
- id: n,
52
- label: s,
53
- autocomplete: h = "new-password",
54
- className: f,
55
- disabled: c = !1,
56
- hidePasswordText: w = "Hide password",
57
- hint: e,
58
- hideLabel: z = !1,
59
- invalid: o = !1,
60
- readonly: r = !1,
61
- required: d = !1,
62
- showPasswordText: S = "Show password",
63
- size: l = "medium",
64
- systemFeedback: u,
65
- ...x
66
- }) => {
67
- process.env.NODE_ENV !== "production" && Y({
68
- id: n,
69
- label: s
70
- });
71
- const [p, I] = A(!1), _ = `${n}-label`, m = `${n}-feedback`, y = `${n}-hint`, v = e ? ` ${y}` : "", B = D(z), H = i(t.root, f), g = i(t.input, {
72
- // small input
73
- [t.inputSmall]: l === "small",
74
- // invalid state
75
- [t.inputInvalid]: o,
76
- // action button - input password always has an action button
77
- [t.inputHasActionButton]: !0
78
- }), P = i(t.label, {
79
- // hide label only visually to keep them available for assistive technologies
80
- [t.labelHidden]: B
81
- }), N = i(t.actionButton, {
82
- [t.actionButtonSmall]: l === "small"
83
- }), j = () => {
84
- I((k) => !k);
85
- };
86
- return /* @__PURE__ */ a.jsxs("div", { className: H, children: [
87
- /* @__PURE__ */ a.jsxs("label", { className: P, id: _, htmlFor: n, children: [
88
- s,
89
- d && /* @__PURE__ */ a.jsx(C, {})
90
- ] }),
91
- e && /* @__PURE__ */ a.jsx("div", { className: t.hint, id: y, children: e }),
92
- o && u && /* @__PURE__ */ a.jsx(
93
- $,
94
- {
95
- className: t.feedback,
96
- message: u,
97
- type: "invalid",
98
- id: m
99
- }
100
- ),
101
- /* @__PURE__ */ a.jsxs("div", { className: t.wrapper, children: [
102
- /* @__PURE__ */ a.jsx(
103
- "input",
104
- {
105
- className: g,
106
- id: n,
107
- ...x,
108
- "aria-labelledby": `${_}${v}`,
109
- "aria-describedby": o && u ? m : void 0,
110
- "aria-invalid": o,
111
- "aria-disabled": r,
112
- readOnly: r,
113
- required: d,
114
- disabled: c,
115
- autoComplete: h,
116
- type: p ? "text" : "password"
117
- }
118
- ),
119
- /* @__PURE__ */ a.jsx(
120
- L,
121
- {
122
- hideLabel: !0,
123
- theme: "light",
124
- iconName: p ? "eye-closed" : "eye",
125
- variant: "ghost",
126
- className: N,
127
- size: l,
128
- onClick: j,
129
- type: "button",
130
- disabled: c,
131
- children: p ? w : S
132
- }
133
- )
134
- ] })
135
- ] });
136
- };
137
- export {
138
- lt as D,
139
- Y as v
140
- };