@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,193 +0,0 @@
1
- "use client";
2
- import { j as t } from "./jsx-runtime.C-kxDJ4g.js";
3
- import { c as _ } from "./index.CvOaL64Y.js";
4
- import { useRef as $, useState as C, useEffect as W } from "react";
5
- import { u as F } from "./useBreakpoint.5xBNDiCf.js";
6
- import { Asterisk as M } from "../asterisk.DU8THnoC.js";
7
- import { D as O } from "./Icon.9gDIp6p4.js";
8
- import { DSSystemFeedback as T } from "../systemfeedback.4Hkfigi-.js";
9
- import { g as f } from "./helpers.B1JT5ShS.js";
10
- import '../assets/Select.D2qBxaHP.css';const V = "_root_quxca_187", Z = "_hint_quxca_195", J = "_label_quxca_195", K = "_wrapper_quxca_199", Q = "_affix_quxca_205", U = "_affix--small_quxca_225", X = "_affix--disabled_quxca_237", Y = "_prefix_quxca_240", z = "_affix--readonly_quxca_243", G = "_suffix_quxca_253", ee = "_action-button_quxca_260", ae = "_label--hidden_quxca_277", te = "_feedback_quxca_304", se = "_select-wrapper_quxca_309", ce = "_select_quxca_309", ne = "_select--invalid_quxca_428", le = "_select--small_quxca_435", oe = "_input--has-leading-icon_quxca_481", ie = "_input--has-action-button_quxca_484", re = "_input--has-second-action-button_quxca_487", _e = "_select--has-leading-icon_quxca_490", ue = "_select--has-action-button_quxca_493", de = "_select--has-second-action-button_quxca_496", xe = "_select--has-affix_quxca_499", fe = "_select--is-ready_quxca_511", he = "_select--placeholder_quxca_523", pe = "_chevron_quxca_532", be = "_chevron--small_quxca_536", me = "_chevron--disabled_quxca_539", e = {
11
- root: V,
12
- hint: Z,
13
- label: J,
14
- wrapper: K,
15
- affix: Q,
16
- "affix--small": "_affix--small_quxca_225",
17
- affixSmall: U,
18
- "affix--disabled": "_affix--disabled_quxca_237",
19
- affixDisabled: X,
20
- prefix: Y,
21
- "affix--readonly": "_affix--readonly_quxca_243",
22
- affixReadonly: z,
23
- suffix: G,
24
- "action-button": "_action-button_quxca_260",
25
- actionButton: ee,
26
- "label--hidden": "_label--hidden_quxca_277",
27
- labelHidden: ae,
28
- feedback: te,
29
- "select-wrapper": "_select-wrapper_quxca_309",
30
- selectWrapper: se,
31
- select: ce,
32
- "select--invalid": "_select--invalid_quxca_428",
33
- selectInvalid: ne,
34
- "select--small": "_select--small_quxca_435",
35
- selectSmall: le,
36
- "input--has-leading-icon": "_input--has-leading-icon_quxca_481",
37
- inputHasLeadingIcon: oe,
38
- "input--has-action-button": "_input--has-action-button_quxca_484",
39
- inputHasActionButton: ie,
40
- "input--has-second-action-button": "_input--has-second-action-button_quxca_487",
41
- inputHasSecondActionButton: re,
42
- "select--has-leading-icon": "_select--has-leading-icon_quxca_490",
43
- selectHasLeadingIcon: _e,
44
- "select--has-action-button": "_select--has-action-button_quxca_493",
45
- selectHasActionButton: ue,
46
- "select--has-second-action-button": "_select--has-second-action-button_quxca_496",
47
- selectHasSecondActionButton: de,
48
- "select--has-affix": "_select--has-affix_quxca_499",
49
- selectHasAffix: xe,
50
- "select--is-ready": "_select--is-ready_quxca_511",
51
- selectIsReady: fe,
52
- "select--placeholder": "_select--placeholder_quxca_523",
53
- selectPlaceholder: he,
54
- chevron: pe,
55
- "chevron--small": "_chevron--small_quxca_536",
56
- chevronSmall: be,
57
- "chevron--disabled": "_chevron--disabled_quxca_539",
58
- chevronDisabled: me
59
- }, Ae = ["medium", "small"], qe = ({
60
- id: a,
61
- label: n,
62
- options: c
63
- }) => {
64
- if (!a)
65
- throw new Error(
66
- f(
67
- "DSSelect",
68
- 'A unique "id" prop is required. Please add an unique "id" prop to the DSSelect component.'
69
- )
70
- );
71
- if (!n)
72
- throw new Error(
73
- f(
74
- "DSSelect",
75
- `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSSelect component. If you don't want to display a label, set hideLabel={true}.`
76
- )
77
- );
78
- if (!c || c.length === 0)
79
- throw new Error(
80
- f(
81
- "DSSelect",
82
- 'Options are always required. Please add an "options" prop to the DSSelect component.'
83
- )
84
- );
85
- }, ve = (a, n, c) => a === "" || n !== void 0 && n !== "" ? !1 : !(c !== void 0 && c !== ""), Be = ({
86
- id: a,
87
- label: n,
88
- options: c,
89
- className: D,
90
- defaultValue: h,
91
- disabled: p = !1,
92
- hideLabel: H = !1,
93
- hint: u,
94
- invalid: r = !1,
95
- placeholder: d = "Select",
96
- required: b = !1,
97
- size: m = "medium",
98
- systemFeedback: x,
99
- value: q,
100
- ...I
101
- }) => {
102
- process.env.NODE_ENV !== "production" && qe({
103
- id: a,
104
- label: n,
105
- options: c
106
- });
107
- const i = $(null), [w, j] = C(
108
- ve(d, h, q)
109
- );
110
- W(() => {
111
- if (!i.current)
112
- return;
113
- const l = () => {
114
- if (!i.current)
115
- return;
116
- const o = i.current.value;
117
- j(o === "");
118
- }, s = i.current;
119
- return s.addEventListener("change", l), () => {
120
- s.removeEventListener("change", l);
121
- };
122
- }, []);
123
- const A = F(H), v = `${a}-label`, S = `${a}-feedback`, g = `${a}-hint`, B = u ? ` ${g}` : "", E = (l) => [
124
- d && /* @__PURE__ */ t.jsx("option", { value: "", children: d }, `${a}-hidden-option-disabled-placeholder`),
125
- ...l.map((s) => {
126
- if ("options" in s) {
127
- const { label: o, options: R } = s;
128
- return /* @__PURE__ */ t.jsx("optgroup", { label: o, children: R.map(y) }, o);
129
- } else
130
- return y(s);
131
- })
132
- ], y = ({ label: l, value: s, isDisabled: o }) => /* @__PURE__ */ t.jsx("option", { value: s, disabled: o, children: l }, s), L = _(e.root, D), N = _(e.select, {
133
- [e.selectSmall]: m === "small",
134
- [e.selectInvalid]: r,
135
- [e.selectPlaceholder]: w
136
- }), P = _(e.label, {
137
- // hide label only visually to keep them available for assistive technologies
138
- [e.labelHidden]: A
139
- }), k = _(e.chevron, {
140
- [e.chevronSmall]: m === "small",
141
- [e.chevronDisabled]: p
142
- });
143
- return /* @__PURE__ */ t.jsxs("div", { className: L, children: [
144
- /* @__PURE__ */ t.jsxs("label", { className: P, id: v, htmlFor: a, children: [
145
- n,
146
- b && /* @__PURE__ */ t.jsx(M, {})
147
- ] }),
148
- u && /* @__PURE__ */ t.jsx("div", { className: e.hint, id: g, children: u }),
149
- r && x && /* @__PURE__ */ t.jsx(
150
- T,
151
- {
152
- className: e.feedback,
153
- message: x,
154
- type: "invalid",
155
- id: S,
156
- "aria-live": "assertive"
157
- }
158
- ),
159
- /* @__PURE__ */ t.jsxs("div", { className: e.selectWrapper, children: [
160
- /* @__PURE__ */ t.jsx(
161
- "select",
162
- {
163
- ...I,
164
- id: a,
165
- ref: i,
166
- className: N,
167
- "aria-labelledby": `${v}${B}`,
168
- "aria-describedby": r && x ? S : void 0,
169
- "aria-invalid": r,
170
- defaultValue: h,
171
- value: q,
172
- disabled: p,
173
- required: b,
174
- children: E(c)
175
- }
176
- ),
177
- /* @__PURE__ */ t.jsx(
178
- O,
179
- {
180
- name: "chevron-down",
181
- className: k,
182
- "aria-hidden": "true"
183
- }
184
- )
185
- ] })
186
- ] });
187
- };
188
- export {
189
- Be as D,
190
- Ae as S,
191
- ve as g,
192
- qe as v
193
- };
@@ -1,195 +0,0 @@
1
- "use client";
2
- import { j as n } from "./jsx-runtime.C-kxDJ4g.js";
3
- import { c as S } from "./index.CvOaL64Y.js";
4
- import { useState as c, useRef as le, useEffect as x } from "react";
5
- import { u as oe, h as se } from "./useBreakpoint.5xBNDiCf.js";
6
- import { g as H, p as V } from "./helpers.B1JT5ShS.js";
7
- import { Asterisk as ie } from "../asterisk.DU8THnoC.js";
8
- import { DSSystemFeedback as re } from "../systemfeedback.4Hkfigi-.js";
9
- import '../assets/Textarea.BKbocznb.css';const ce = "_textarea_1elbe_187", de = "_textarea--invalid_1elbe_297", _e = "_textarea--small_1elbe_304", ue = "_textarea--resize-auto_1elbe_316", fe = "_root_1elbe_326", be = "_hint_1elbe_334", xe = "_label_1elbe_334", me = "_affix_1elbe_338", he = "_affix--small_1elbe_358", pe = "_affix--disabled_1elbe_370", ve = "_prefix_1elbe_373", ge = "_affix--readonly_1elbe_376", Se = "_suffix_1elbe_386", Ie = "_leading-icon_1elbe_393", Ce = "_leading-icon--small_1elbe_405", ye = "_leading-icon--disabled_1elbe_408", Ae = "_action-button_1elbe_417", De = "_label--hidden_1elbe_434", je = "_feedback_1elbe_461", we = "_char-count_1elbe_466", Re = "_char-count-announcer_1elbe_481", t = {
10
- textarea: ce,
11
- "textarea--invalid": "_textarea--invalid_1elbe_297",
12
- textareaInvalid: de,
13
- "textarea--small": "_textarea--small_1elbe_304",
14
- textareaSmall: _e,
15
- "textarea--resize-auto": "_textarea--resize-auto_1elbe_316",
16
- textareaResizeAuto: ue,
17
- root: fe,
18
- hint: be,
19
- label: xe,
20
- affix: me,
21
- "affix--small": "_affix--small_1elbe_358",
22
- affixSmall: he,
23
- "affix--disabled": "_affix--disabled_1elbe_370",
24
- affixDisabled: pe,
25
- prefix: ve,
26
- "affix--readonly": "_affix--readonly_1elbe_376",
27
- affixReadonly: ge,
28
- suffix: Se,
29
- "leading-icon": "_leading-icon_1elbe_393",
30
- leadingIcon: Ie,
31
- "leading-icon--small": "_leading-icon--small_1elbe_405",
32
- leadingIconSmall: Ce,
33
- "leading-icon--disabled": "_leading-icon--disabled_1elbe_408",
34
- leadingIconDisabled: ye,
35
- "action-button": "_action-button_1elbe_417",
36
- actionButton: Ae,
37
- "label--hidden": "_label--hidden_1elbe_434",
38
- labelHidden: De,
39
- feedback: je,
40
- "char-count": "_char-count_1elbe_466",
41
- charCount: we,
42
- "char-count-announcer": "_char-count-announcer_1elbe_481",
43
- charCountAnnouncer: Re
44
- }, ze = ["medium", "small"], Te = ({ id: l, label: _ }) => {
45
- if (!l)
46
- throw new Error(
47
- H(
48
- "DSTextarea",
49
- 'A unique "id" prop is required. Please add an unique "id" prop to the DSTextarea component.'
50
- )
51
- );
52
- if (!_)
53
- throw new Error(
54
- H(
55
- "DSTextarea",
56
- `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSTextarea component. If you don't want to display a label, set hideLabel={true}.`
57
- )
58
- );
59
- }, Pe = ({
60
- id: l,
61
- label: _,
62
- charsLimitText: z = "Character limit reached",
63
- charsRemainingText: P = "Characters remaining:",
64
- className: q,
65
- defaultValue: M,
66
- disabled: O = !1,
67
- hint: m,
68
- hideLabel: F = !1,
69
- invalid: o = !1,
70
- maxLength: e,
71
- readonly: I = !1,
72
- required: C = !1,
73
- resize: u = "vertical",
74
- size: W = "medium",
75
- systemFeedback: i,
76
- value: h,
77
- wrapperClassName: X,
78
- onChange: y,
79
- onInput: A,
80
- ...Z
81
- }) => {
82
- process.env.NODE_ENV !== "production" && Te({
83
- id: l,
84
- label: _
85
- });
86
- const [G, D] = c(M || ""), [r, j] = c(0), [J, w] = c(0), [K, R] = c("off"), [T, p] = c(i), [v, g] = c(o), E = h !== void 0, f = E ? h : G, s = le(null), Q = oe(F);
87
- x(() => {
88
- if (!e || e <= 0)
89
- return;
90
- r >= e * 0.8 ? R("polite") : R("off");
91
- const a = setTimeout(() => {
92
- w(e - r || 0);
93
- }, 1e3);
94
- return () => clearTimeout(a);
95
- }, [r]), x(() => {
96
- D(f || ""), d(), e && e > 0 && (j(f.toString().length || 0), w(e - f.toString().length || 0));
97
- }, [h]), x(() => {
98
- o && i ? (p(i), g(o)) : !o && e && e >= 0 && r >= e ? (g(!0), p(z)) : (p(i), g(o));
99
- }, [o, v, i, r]), x(() => {
100
- if (se && u === "auto")
101
- return d(), window.addEventListener("resize", d), () => window.removeEventListener("resize", d);
102
- }, [u, s.current]);
103
- const U = S(t.root, X), Y = S(t.textarea, q, {
104
- // small textarea
105
- [t.textareaSmall]: W === "small",
106
- // invalid state
107
- [t.textareaInvalid]: v,
108
- // resize handling
109
- [t.textareaResizeAuto]: u === "auto"
110
- }), L = S(t.label, {
111
- // hide label only visually to keep them available for assistive technologies
112
- [t.labelHidden]: Q
113
- }), N = `${l}-label`, B = `${l}-feedback`, $ = `${l}-hint`, k = `${l}-char-count-announcer`, ee = m ? ` ${$}` : "", d = () => {
114
- if (s.current && u === "auto") {
115
- s.current.style.height = "auto";
116
- const a = V(s.current.scrollHeight), b = V(2);
117
- s.current.style.height = `${// We need to add 2px (border-top & border-bottom) to the scrollHeight to prevent the textarea
118
- // from jumping as soon as the user starts typing.
119
- a + b}rem`;
120
- }
121
- }, ae = () => {
122
- const a = [];
123
- return e && e > 0 && a.push(k), o && i && a.push(B), a.length > 0 ? a.join(" ") : void 0;
124
- }, te = (a) => {
125
- var b;
126
- A && A(a), e && e > 0 && j(((b = s.current) == null ? void 0 : b.value.length) || 0), d();
127
- }, ne = (a) => {
128
- y && y(a), E || D(a.target.value);
129
- };
130
- return /* @__PURE__ */ n.jsxs("div", { className: U, children: [
131
- /* @__PURE__ */ n.jsxs("label", { className: L, id: N, htmlFor: l, children: [
132
- _,
133
- C && /* @__PURE__ */ n.jsx(ie, {})
134
- ] }),
135
- m && /* @__PURE__ */ n.jsx("div", { className: t.hint, id: $, children: m }),
136
- v && T && /* @__PURE__ */ n.jsx(
137
- re,
138
- {
139
- className: t.feedback,
140
- message: T,
141
- type: "invalid",
142
- id: B
143
- }
144
- ),
145
- /* @__PURE__ */ n.jsx(
146
- "textarea",
147
- {
148
- className: Y,
149
- id: l,
150
- ref: s,
151
- ...Z,
152
- "aria-labelledby": `${N}${ee}`,
153
- "aria-describedby": ae(),
154
- "aria-invalid": o,
155
- "aria-disabled": I,
156
- maxLength: e,
157
- readOnly: I,
158
- required: C,
159
- disabled: O,
160
- value: f,
161
- defaultValue: void 0,
162
- rows: void 0,
163
- cols: void 0,
164
- onChange: ne,
165
- onInput: te
166
- }
167
- ),
168
- e !== void 0 && e > 0 && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
169
- /* @__PURE__ */ n.jsxs("div", { className: t.charCount, "aria-hidden": "true", children: [
170
- r,
171
- "/",
172
- e
173
- ] }),
174
- /* @__PURE__ */ n.jsxs(
175
- "div",
176
- {
177
- className: t.charCountAnnouncer,
178
- id: k,
179
- "aria-live": K,
180
- "aria-atomic": "true",
181
- children: [
182
- P,
183
- " ",
184
- J
185
- ]
186
- }
187
- )
188
- ] })
189
- ] });
190
- };
191
- export {
192
- Pe as D,
193
- ze as T,
194
- Te as v
195
- };
@@ -1,89 +0,0 @@
1
- "use client";
2
- import { j as n } from "./jsx-runtime.C-kxDJ4g.js";
3
- import { c as e } from "./index.CvOaL64Y.js";
4
- import { forwardRef as f } from "react";
5
- import { DSButton as u } from "../button.DX_nxoJC.js";
6
- import { D as k } from "./Icon.9gDIp6p4.js";
7
- import '../assets/Toast.CAP_EwDX.css';const y = "_root_pyklq_67", g = "_root--closing_pyklq_76", q = "_fade-out_pyklq_1", h = "_move-in_pyklq_1", x = "_root--success_pyklq_111", I = "_root--info_pyklq_115", S = "_root--warning_pyklq_119", N = "_content_pyklq_124", j = "_content--hide-icon_pyklq_131", v = "_icon_pyklq_135", w = "_message_pyklq_139", o = {
8
- root: y,
9
- "root--closing": "_root--closing_pyklq_76",
10
- rootClosing: g,
11
- "fade-out": "_fade-out_pyklq_1",
12
- fadeOut: q,
13
- "move-in": "_move-in_pyklq_1",
14
- moveIn: h,
15
- "root--success": "_root--success_pyklq_111",
16
- rootSuccess: x,
17
- "root--info": "_root--info_pyklq_115",
18
- rootInfo: I,
19
- "root--warning": "_root--warning_pyklq_119",
20
- rootWarning: S,
21
- content: N,
22
- "content--hide-icon": "_content--hide-icon_pyklq_131",
23
- contentHideIcon: j,
24
- icon: v,
25
- message: w
26
- }, C = {
27
- success: "circle-check-colored",
28
- warning: "triangle-exclamationmark-colored",
29
- info: "circle-info-colored"
30
- }, D = f(
31
- ({
32
- message: s,
33
- className: r,
34
- hideIcon: c = !1,
35
- variant: t = "info",
36
- onClick: i,
37
- onMouseEnter: a,
38
- onMouseLeave: _,
39
- ...l
40
- }, m) => {
41
- const p = e(o.root, r, {
42
- [o.rootSuccess]: t === "success",
43
- [o.rootWarning]: t === "warning",
44
- [o.rootInfo]: t === "info"
45
- }), d = e(o.content, {
46
- [o.contentHideIcon]: c
47
- });
48
- return /* @__PURE__ */ n.jsx(
49
- "aside",
50
- {
51
- className: p,
52
- ref: m,
53
- popover: "manual",
54
- "data-ds-toast": !0,
55
- onMouseEnter: a,
56
- onMouseLeave: _,
57
- "aria-label": s,
58
- ...l,
59
- children: /* @__PURE__ */ n.jsxs("div", { className: d, children: [
60
- !c && /* @__PURE__ */ n.jsx(
61
- k,
62
- {
63
- name: C[t],
64
- className: o.icon,
65
- "aria-hidden": "true"
66
- }
67
- ),
68
- /* @__PURE__ */ n.jsx("div", { className: o.message, children: s }),
69
- /* @__PURE__ */ n.jsx(
70
- u,
71
- {
72
- hideLabel: !0,
73
- iconName: "cross",
74
- size: "small",
75
- variant: "ghost",
76
- onClick: i,
77
- children: "Close toast"
78
- }
79
- )
80
- ] })
81
- }
82
- );
83
- }
84
- );
85
- D.displayName = "DSToast";
86
- export {
87
- D,
88
- o as s
89
- };
@@ -1,13 +0,0 @@
1
- "use client";
2
- import "./chunks/jsx-runtime.C-kxDJ4g.js";
3
- import "./chunks/index.CvOaL64Y.js";
4
- import "react";
5
- import { c as l } from "./chunks/CustomReactSelect.DtmbYZUf.js";
6
- import "./chunks/useBreakpoint.5xBNDiCf.js";
7
- import "./asterisk.DU8THnoC.js";
8
- import "./chunks/Icon.9gDIp6p4.js";
9
- import "./systemfeedback.4Hkfigi-.js";
10
- import "./optioncheckbox.CUV1MQhh.js";
11
- export {
12
- l as CustomReactSelect
13
- };
@@ -1,45 +0,0 @@
1
- "use client";
2
- import { j as r } from "./chunks/jsx-runtime.C-kxDJ4g.js";
3
- import { c as f } from "./chunks/index.CvOaL64Y.js";
4
- import { useRef as u, useEffect as l } from "react";
5
- import { DSButton as m } from "./button.DX_nxoJC.js";
6
- import './assets/dialog.BGK3mgk7.css';const _ = "_root_5faj1_63", d = "_success_5faj1_67", g = "_info_5faj1_71", j = "_warning_5faj1_75", p = {
7
- root: _,
8
- success: d,
9
- info: g,
10
- warning: j
11
- }, D = ({
12
- children: c,
13
- className: i,
14
- footer: n,
15
- header: a,
16
- isOpen: t,
17
- onClose: s
18
- }) => {
19
- const e = u(null);
20
- return l(() => {
21
- const o = e.current;
22
- return o && (t ? o.showModal() : o.close(), s && o.addEventListener("close", s)), () => {
23
- o && s && o.removeEventListener("close", s);
24
- };
25
- }, [t, s]), /* @__PURE__ */ r.jsxs("dialog", { ref: e, className: f(p.root, i), children: [
26
- /* @__PURE__ */ r.jsx(
27
- m,
28
- {
29
- type: "button",
30
- iconName: "cross",
31
- variant: "ghost",
32
- hideLabel: !0,
33
- onClick: s,
34
- autoFocus: !0,
35
- children: "Close Dialog"
36
- }
37
- ),
38
- a,
39
- c,
40
- n
41
- ] });
42
- };
43
- export {
44
- D as DSDialog
45
- };
@@ -1,11 +0,0 @@
1
- "use client";
2
- import "./chunks/jsx-runtime.C-kxDJ4g.js";
3
- import "./chunks/index.CvOaL64Y.js";
4
- import "react";
5
- import "./asterisk.DU8THnoC.js";
6
- import "./heading.DqGbFfj2.js";
7
- import "./systemfeedback.4Hkfigi-.js";
8
- import { D as l } from "./chunks/Fieldset.BokeZzG5.js";
9
- export {
10
- l as DSFieldset
11
- };
@@ -1,87 +0,0 @@
1
- "use client";
2
- import { j as a } from "./chunks/jsx-runtime.C-kxDJ4g.js";
3
- import { c as t } from "./chunks/index.CvOaL64Y.js";
4
- import { D } from "./chunks/Icon.9gDIp6p4.js";
5
- import { DSSpinner as x } from "./spinner.BskX4ovu.js";
6
- import './assets/floatingactionbutton.D7ywURL3.css';const S = "_root_1milf_63", j = "_root--dark_1milf_120", H = "_root--small_1milf_160", y = "_loader_1milf_179", N = "_icon--hidden_1milf_191", C = "_label--hidden_1milf_195", o = {
7
- root: S,
8
- "root--dark": "_root--dark_1milf_120",
9
- rootDark: j,
10
- "root--small": "_root--small_1milf_160",
11
- rootSmall: H,
12
- loader: y,
13
- "icon--hidden": "_icon--hidden_1milf_191",
14
- iconHidden: N,
15
- "label--hidden": "_label--hidden_1milf_195",
16
- labelHidden: C
17
- }, E = ({
18
- aria: m,
19
- children: c,
20
- className: _,
21
- dataTrackingid: f,
22
- disabled: r = !1,
23
- iconName: s = "placeholder",
24
- iconSource: i,
25
- loading: l = !1,
26
- size: b = "medium",
27
- theme: e = "light",
28
- onClick: n,
29
- ...p
30
- }) => {
31
- const u = t(
32
- o.root,
33
- o.rootIconOnlySmall,
34
- _,
35
- {
36
- // dark theme
37
- [o.rootDark]: e === "dark",
38
- // size
39
- [o.rootSmall]: b === "small"
40
- }
41
- ), h = t(o.icon, {
42
- // set icon opacity to 0 when loading to prevent button size from changing
43
- [o.iconHidden]: l
44
- }), k = (d) => {
45
- if (r || l) {
46
- d.preventDefault();
47
- return;
48
- }
49
- n && n(d);
50
- };
51
- return /* @__PURE__ */ a.jsxs(
52
- "button",
53
- {
54
- className: u,
55
- "data-trackingid": f,
56
- type: "button",
57
- onClick: k,
58
- ...m,
59
- ...p,
60
- "aria-disabled": r || l,
61
- "aria-busy": l,
62
- children: [
63
- l && /* @__PURE__ */ a.jsx(
64
- x,
65
- {
66
- className: o.loader,
67
- aria: { "aria-label": "Loading state" }
68
- }
69
- ),
70
- /* @__PURE__ */ a.jsx("span", { className: t(o.label, o.labelHidden), children: c }),
71
- (s || i) && /* @__PURE__ */ a.jsx(
72
- D,
73
- {
74
- name: s,
75
- theme: e,
76
- source: i,
77
- className: h,
78
- "aria-hidden": "true"
79
- }
80
- )
81
- ]
82
- }
83
- );
84
- };
85
- export {
86
- E as DSFloatingActionButton
87
- };
@@ -1,50 +0,0 @@
1
- "use client";
2
- import { j as l } from "./chunks/jsx-runtime.C-kxDJ4g.js";
3
- import { c } from "./chunks/index.CvOaL64Y.js";
4
- import './assets/heading.CGFucb-C.css';const d = "_root_d88h5_63", u = "_root--x-large_d88h5_66", g = "_root--x-large-uppercase_d88h5_80", h = "_root--large_d88h5_94", n = "_root--large-uppercase_d88h5_108", i = "_root--medium_d88h5_122", x = "_root--medium-uppercase_d88h5_130", L = "_root--small_d88h5_138", U = "_root--small-uppercase_d88h5_146", k = "_root--theme-dark_d88h5_154", o = {
5
- root: d,
6
- "root--x-large": "_root--x-large_d88h5_66",
7
- rootXLarge: u,
8
- "root--x-large-uppercase": "_root--x-large-uppercase_d88h5_80",
9
- rootXLargeUppercase: g,
10
- "root--large": "_root--large_d88h5_94",
11
- rootLarge: h,
12
- "root--large-uppercase": "_root--large-uppercase_d88h5_108",
13
- rootLargeUppercase: n,
14
- "root--medium": "_root--medium_d88h5_122",
15
- rootMedium: i,
16
- "root--medium-uppercase": "_root--medium-uppercase_d88h5_130",
17
- rootMediumUppercase: x,
18
- "root--small": "_root--small_d88h5_138",
19
- rootSmall: L,
20
- "root--small-uppercase": "_root--small-uppercase_d88h5_146",
21
- rootSmallUppercase: U,
22
- "root--theme-dark": "_root--theme-dark_d88h5_154",
23
- rootThemeDark: k
24
- }, X = ({
25
- children: e,
26
- className: a,
27
- size: r = "medium",
28
- tag: t = "h2",
29
- // default tag because of SEO reasons (h1 should be used only once per page)
30
- theme: p = "light",
31
- ...s
32
- }) => {
33
- const _ = t, m = c(o.root, a, {
34
- // sizes
35
- [o.rootXLarge]: r === "x-large",
36
- [o.rootXLargeUppercase]: r === "x-large-uppercase",
37
- [o.rootLarge]: r === "large",
38
- [o.rootLargeUppercase]: r === "large-uppercase",
39
- [o.rootMedium]: r == "medium",
40
- [o.rootMediumUppercase]: r == "medium-uppercase",
41
- [o.rootSmall]: r == "small",
42
- [o.rootSmallUppercase]: r == "small-uppercase",
43
- // dark theme
44
- [o.rootThemeDark]: p === "dark"
45
- });
46
- return /* @__PURE__ */ l.jsx(_, { className: m, ...s, children: e });
47
- };
48
- export {
49
- X as DSHeading
50
- };