@stihl-design-system/components 1.0.0-RC.11 → 1.0.0-RC.13

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 (225) hide show
  1. package/README.md +1 -1
  2. package/{accordion.CEKQh-7i.js → accordion.Rvtiu8Y4.js} +3 -3
  3. package/arialiveregions.Cyycgs8g.js +27 -0
  4. package/assets/Accordion.i4k5SMQM.css +1 -0
  5. package/assets/CheckboxGroup.BH1Br1dg.css +1 -0
  6. package/assets/Chip.DSdLuzoi.css +1 -0
  7. package/assets/CustomReactSelect.vHt8qNKC.css +1 -0
  8. package/assets/Dialog.BgzebVk4.css +1 -0
  9. package/assets/Drawer.Bauwxrk7.css +1 -0
  10. package/assets/Fieldset.DOdTbb7C.css +1 -0
  11. package/assets/Icon.DxRSBRSL.css +1 -0
  12. package/assets/InputPassword.CG7Ugu73.css +1 -0
  13. package/assets/InputSearch.CseChMc-.css +1 -0
  14. package/assets/InputStepper.C0eAYr7P.css +1 -0
  15. package/assets/Notification.DbRapUJo.css +1 -0
  16. package/assets/RadioGroup.BfMo157q.css +1 -0
  17. package/assets/Select.D4EXgIbz.css +1 -0
  18. package/assets/Textarea.KJGPTYMz.css +1 -0
  19. package/assets/Toast.CuafTAf7.css +1 -0
  20. package/assets/arialiveregions.DhsijBaL.css +1 -0
  21. package/assets/asterisk.BfVAUBO7.css +1 -0
  22. package/assets/button.DF4RBeC2.css +1 -0
  23. package/assets/buttonround.19uK_-oO.css +1 -0
  24. package/assets/checkbox.ByOoFouu.css +1 -0
  25. package/assets/chipgroup.BzfZLbkv.css +1 -0
  26. package/assets/flag.B-RLcMcf.css +1 -0
  27. package/assets/floatingactionbutton.E9HekT6S.css +1 -0
  28. package/assets/heading.u4f8Mz94.css +1 -0
  29. package/assets/input.BAkFKPW3.css +1 -0
  30. package/assets/link.DDJj0D1U.css +1 -0
  31. package/assets/linkstandalone.DIazcjIv.css +1 -0
  32. package/assets/logo.CnW8alZU.css +1 -0
  33. package/assets/optioncheckbox.BZaWtRD7.css +1 -0
  34. package/assets/radio.X-RTl_jo.css +1 -0
  35. package/assets/skiptocontent.PTL3256m.css +1 -0
  36. package/assets/spinner.2iWJWKyA.css +1 -0
  37. package/assets/switch.gw6aa3kx.css +1 -0
  38. package/assets/systemfeedback.BPz5YlPC.css +1 -0
  39. package/assets/text.DjTG_qNb.css +1 -0
  40. package/assets/title.rosWPEG3.css +1 -0
  41. package/asterisk.DpzETKdT.js +8 -0
  42. package/button.M4nXjcUn.js +135 -0
  43. package/buttonround.E56F_805.js +118 -0
  44. package/checkbox.Cb2_ey6U.js +111 -0
  45. package/{checkboxgroup.BqD5IV51.js → checkboxgroup.DBDmB-zR.js} +2 -2
  46. package/{chip.B92ew-hk.js → chip.C_1tGqvZ.js} +2 -2
  47. package/chipgroup.BvTj1ziW.js +174 -0
  48. package/chunks/Accordion.CB6jB3s_.js +125 -0
  49. package/chunks/{CheckboxGroup.M3jOjhNf.js → CheckboxGroup.S6i5EOc4.js} +40 -40
  50. package/chunks/{Chip.fMG8wi5K.js → Chip.CMlPUyOJ.js} +15 -15
  51. package/chunks/{CustomReactSelect.D3jv5-fa.js → CustomReactSelect.CQ1uexBH.js} +1321 -1321
  52. package/chunks/Dialog.CudsqNag.js +148 -0
  53. package/chunks/Drawer.ueG2Bzr9.js +154 -0
  54. package/chunks/{Fieldset.C9K8BYmH.js → Fieldset.Cjmkgxxk.js} +32 -32
  55. package/chunks/{Icon.C2o2seDb.js → Icon.BCmt_XBG.js} +45 -45
  56. package/chunks/InputPassword.CNLbBFjx.js +143 -0
  57. package/chunks/InputSearch.CHA6mkX_.js +192 -0
  58. package/chunks/InputStepper.xmWGU9pU.js +294 -0
  59. package/chunks/Notification.nx5vTamN.js +92 -0
  60. package/chunks/RadioGroup.Crj7NoOs.js +137 -0
  61. package/chunks/Select.E6gLFYLk.js +194 -0
  62. package/chunks/Textarea.DUBSOpNL.js +198 -0
  63. package/chunks/Toast.DyEi2GEP.js +89 -0
  64. package/{combobox.BeTnbG1m.js → combobox.CzBpi97e.js} +1 -1
  65. package/components/Combobox/Combobox.d.ts +1 -1
  66. package/components/{CustomReactSelect → Combobox/CustomReactSelect}/CustomReactSelect.d.ts +2 -2
  67. package/components/{CustomReactSelect → Combobox/CustomReactSelect}/CustomReactSelect.utils.d.ts +1 -1
  68. package/components/Notification/Notification.d.ts +2 -6
  69. package/components/Radio/Radio.d.ts +1 -1
  70. package/customreactselect.d.ts +1 -1
  71. package/customreactselect.qf7CIeFs.js +13 -0
  72. package/{dialog.lGwNQU91.js → dialog.DYlBUsOD.js} +2 -2
  73. package/{drawer.DNi5m8wP.js → drawer.CvhbP1ra.js} +2 -2
  74. package/fieldset.CtUGEdLv.js +11 -0
  75. package/flag.BKpsdB_-.js +43 -0
  76. package/floatingactionbutton.D5L0B7zI.js +87 -0
  77. package/heading.IPIYc5vW.js +50 -0
  78. package/{icon.BoMgOmC1.js → icon.Ck0BpI34.js} +1 -1
  79. package/index.es.js +34 -34
  80. package/input.BEnCFNM-.js +239 -0
  81. package/{inputpassword.CSjh1GU7.js → inputpassword.B-D_jB9w.js} +4 -4
  82. package/{inputsearch.DyznOWLK.js → inputsearch.CaSpklR1.js} +4 -4
  83. package/{inputstepper.3BLb7s0P.js → inputstepper.C7KD1-0S.js} +4 -4
  84. package/link.DREJAoPG.js +116 -0
  85. package/linkstandalone.BBoEniZ_.js +79 -0
  86. package/logo.Hul8qCFo.js +65 -0
  87. package/{notification.0kX1GMaB.js → notification.6M0OdGXK.js} +3 -3
  88. package/optioncheckbox.BRUTnQnJ.js +43 -0
  89. package/optioncheckbox.d.ts +1 -1
  90. package/package.json +8 -6
  91. package/partials/index.js +1 -1
  92. package/radio.DEILy_lV.js +114 -0
  93. package/{radiogroup.SYkZm2DG.js → radiogroup.DeU-HdlP.js} +3 -3
  94. package/{select.CYbwR3RW.js → select.BYraFJzz.js} +4 -4
  95. package/skiptocontent.BxvpIB7H.js +45 -0
  96. package/spinner.Bq97Og-6.js +58 -0
  97. package/styles/scss/ds/index.scss +19 -0
  98. package/styles/scss/ds/lib/animation.scss +21 -0
  99. package/styles/scss/ds/lib/breakpoints.scss +15 -0
  100. package/styles/scss/ds/lib/container-query.scss +54 -0
  101. package/styles/scss/ds/lib/ds-internal/_a11y.scss +15 -0
  102. package/styles/scss/{lib → ds/lib/ds-internal}/_focus.scss +13 -15
  103. package/styles/scss/ds/lib/ds-internal/_heading.scss +37 -0
  104. package/styles/scss/ds/lib/ds-internal/_helpers.scss +32 -0
  105. package/styles/scss/ds/lib/ds-internal/_high-contrast.scss +6 -0
  106. package/styles/scss/ds/lib/ds-internal/_hover.scss +6 -0
  107. package/styles/scss/ds/lib/ds-internal/_index.scss +9 -0
  108. package/styles/scss/ds/lib/ds-internal/_link.scss +62 -0
  109. package/styles/scss/ds/lib/ds-internal/_spacing-dynamic.scss +53 -0
  110. package/styles/scss/ds/lib/ds-internal/_text.scss +30 -0
  111. package/styles/scss/ds/lib/grid-extended.scss +11 -0
  112. package/styles/scss/ds/lib/grid-full.scss +6 -0
  113. package/styles/scss/ds/lib/grid-main.scss +119 -0
  114. package/styles/scss/ds/lib/grid-narrow.scss +14 -0
  115. package/styles/scss/ds/lib/grid-sidebar-sidebar.scss +52 -0
  116. package/styles/scss/{lib/_grid-sidebar.scss → ds/lib/grid-sidebar.scss} +23 -32
  117. package/styles/scss/{lib/_grid.scss → ds/lib/grid.scss} +15 -17
  118. package/styles/scss/ds/lib/heading.scss +75 -0
  119. package/styles/scss/ds/lib/link.scss +74 -0
  120. package/styles/scss/ds/lib/media-query.scss +32 -0
  121. package/styles/scss/{lib/_shadow.scss → ds/lib/shadow.scss} +2 -2
  122. package/styles/scss/ds/lib/spacing-dynamic.scss +7 -0
  123. package/styles/scss/ds/lib/spacing.scss +20 -0
  124. package/styles/scss/ds/lib/text.scss +83 -0
  125. package/styles/scss/ds/lib/theme.scss +162 -0
  126. package/styles/scss/ds/lib/transition.scss +36 -0
  127. package/switch.DI8YYa5G.js +65 -0
  128. package/{systemfeedback.ZzRUAVYX.js → systemfeedback.C3Pfxxpp.js} +6 -6
  129. package/text.DThvTwm8.js +57 -0
  130. package/{textarea.DJc527nX.js → textarea.CBvH0ljM.js} +3 -3
  131. package/title.DqzdB2Gq.js +36 -0
  132. package/{toast.D48GFmp0.js → toast.n1QUINSA.js} +3 -3
  133. package/{toastmanager.Dl8-Q3ED.js → toastmanager.B7EZ4JSI.js} +1 -1
  134. package/arialiveregions.BKpxxK7O.js +0 -27
  135. package/assets/Accordion.DMEFgtQm.css +0 -1
  136. package/assets/CheckboxGroup.Bz3_xkZU.css +0 -1
  137. package/assets/Chip.D10_7Q82.css +0 -1
  138. package/assets/CustomReactSelect.D5XKd9vg.css +0 -1
  139. package/assets/Dialog.B0pucIEI.css +0 -1
  140. package/assets/Drawer.CATBzfY7.css +0 -1
  141. package/assets/Fieldset.CwDhKRUL.css +0 -1
  142. package/assets/Icon.Duy_0R8w.css +0 -1
  143. package/assets/InputPassword.DOAAzj-O.css +0 -1
  144. package/assets/InputSearch.CxPYaQGZ.css +0 -1
  145. package/assets/InputStepper.CYYJUu0b.css +0 -1
  146. package/assets/Notification.mhVFeSGm.css +0 -1
  147. package/assets/Select.DZKpHV4G.css +0 -1
  148. package/assets/Textarea.Cp0b7oZp.css +0 -1
  149. package/assets/Toast.Cz6wYaBv.css +0 -1
  150. package/assets/arialiveregions.GsGx2USO.css +0 -1
  151. package/assets/asterisk.DlJ4YtSZ.css +0 -1
  152. package/assets/button.C9_ejpGG.css +0 -1
  153. package/assets/buttonround.DTCqRP-0.css +0 -1
  154. package/assets/checkbox.K4CVYK9g.css +0 -1
  155. package/assets/chipgroup.BMovtKTy.css +0 -1
  156. package/assets/flag.DX_lH1v7.css +0 -1
  157. package/assets/floatingactionbutton.Do-yEH6c.css +0 -1
  158. package/assets/heading.6bER-Eac.css +0 -1
  159. package/assets/input.Q5oKkmW2.css +0 -1
  160. package/assets/link.DhZqkLMP.css +0 -1
  161. package/assets/linkstandalone.Dwz-_O8q.css +0 -1
  162. package/assets/logo.pETQEsvZ.css +0 -1
  163. package/assets/optioncheckbox.C62HtIj5.css +0 -1
  164. package/assets/radio.-Xxx5wL4.css +0 -1
  165. package/assets/skiptocontent.CHcqLS7S.css +0 -1
  166. package/assets/spinner.D_Nnf1ZG.css +0 -1
  167. package/assets/switch.C1Ei0-z8.css +0 -1
  168. package/assets/systemfeedback.Sq0bAIyf.css +0 -1
  169. package/assets/text.DxKFcfY6.css +0 -1
  170. package/assets/title.f74Bosn-.css +0 -1
  171. package/asterisk.DDn-yX4P.js +0 -8
  172. package/button.C5opEJ6x.js +0 -135
  173. package/buttonround.CUoqRyy0.js +0 -118
  174. package/checkbox.DETR3e3X.js +0 -112
  175. package/chipgroup.BJrqEfvr.js +0 -175
  176. package/chunks/Accordion.DFwFN8mX.js +0 -125
  177. package/chunks/Dialog.Fwr6vLiK.js +0 -148
  178. package/chunks/Drawer.CKoYzQHd.js +0 -154
  179. package/chunks/InputPassword.C7pNeWGx.js +0 -143
  180. package/chunks/InputSearch.B24rcIJ_.js +0 -192
  181. package/chunks/InputStepper.CEW-bieQ.js +0 -294
  182. package/chunks/Notification.BXVN7_Fs.js +0 -93
  183. package/chunks/RadioGroup.D4UOflwr.js +0 -137
  184. package/chunks/Select.Ds86q4UC.js +0 -194
  185. package/chunks/Textarea.DcB8hKnO.js +0 -198
  186. package/chunks/Toast.DrzxdzVW.js +0 -89
  187. package/customreactselect.lYJhIeyx.js +0 -13
  188. package/fieldset.BqiAjeax.js +0 -11
  189. package/flag.XJHHSP38.js +0 -43
  190. package/floatingactionbutton.CMpkTdhX.js +0 -87
  191. package/heading.CAkraI2D.js +0 -50
  192. package/input.v7qB7wPJ.js +0 -239
  193. package/link.Clk5_BYp.js +0 -116
  194. package/linkstandalone.BXERmqdN.js +0 -80
  195. package/logo.CEO6OV7u.js +0 -65
  196. package/optioncheckbox.BPN3f6l_.js +0 -43
  197. package/radio.DTZNJzMU.js +0 -115
  198. package/skiptocontent.DUQWopO4.js +0 -46
  199. package/spinner.D-xrotcu.js +0 -58
  200. package/styles/scss/_index.scss +0 -24
  201. package/styles/scss/lib/_a11y.scss +0 -15
  202. package/styles/scss/lib/_animation.scss +0 -21
  203. package/styles/scss/lib/_breakpoints.scss +0 -15
  204. package/styles/scss/lib/_container-query.scss +0 -58
  205. package/styles/scss/lib/_grid-extended.scss +0 -11
  206. package/styles/scss/lib/_grid-full.scss +0 -6
  207. package/styles/scss/lib/_grid-main.scss +0 -117
  208. package/styles/scss/lib/_grid-narrow.scss +0 -16
  209. package/styles/scss/lib/_grid-sidebar-sidebar.scss +0 -50
  210. package/styles/scss/lib/_heading.scss +0 -107
  211. package/styles/scss/lib/_helpers.scss +0 -15
  212. package/styles/scss/lib/_high-contrast.scss +0 -24
  213. package/styles/scss/lib/_hover.scss +0 -10
  214. package/styles/scss/lib/_link.scss +0 -129
  215. package/styles/scss/lib/_media-query.scss +0 -32
  216. package/styles/scss/lib/_spacing-dynamic.scss +0 -61
  217. package/styles/scss/lib/_spacing.scss +0 -32
  218. package/styles/scss/lib/_text.scss +0 -110
  219. package/styles/scss/lib/_theme.scss +0 -162
  220. package/styles/scss/lib/_transition.scss +0 -45
  221. package/switch.CoNnIhM4.js +0 -65
  222. package/text.fMcHzVbH.js +0 -57
  223. package/title.LY1ylQsb.js +0 -36
  224. /package/components/{CustomReactSelect → Combobox/CustomReactSelect}/CustomReactSelect.utils.test.d.ts +0 -0
  225. /package/components/{CustomReactSelect → Combobox/CustomReactSelect}/OptionCheckbox.d.ts +0 -0
@@ -1,137 +0,0 @@
1
- "use client";
2
- import { j as h } from "./jsx-runtime.C115EyI4.js";
3
- import { c as q } from "./index.CvOaL64Y.js";
4
- import { forwardRef as y, useState as C } from "react";
5
- import { D as N } from "./Fieldset.C9K8BYmH.js";
6
- import { DSRadio as I } from "../radio.DTZNJzMU.js";
7
- import { g as t } from "./helpers.B1JT5ShS.js";
8
- import '../assets/CheckboxGroup.Bz3_xkZU.css';const A = "_group_2f5rk_76", B = "_group--horizontal_2f5rk_84", M = "_group--invalid_2f5rk_87", f = {
9
- group: A,
10
- "group--horizontal": "_group--horizontal_2f5rk_84",
11
- groupHorizontal: B,
12
- "group--invalid": "_group--invalid_2f5rk_87",
13
- groupInvalid: M
14
- }, g = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the DSRadioGroup component.`, m = (o) => o.some(({ hint: a }) => !!a), z = (o) => o.some(({ customArea: a }) => !!a), O = ({
15
- legend: o,
16
- name: a,
17
- options: e,
18
- description: l,
19
- direction: i,
20
- id: n,
21
- systemFeedback: s
22
- }) => {
23
- if (!n && (l || s))
24
- throw new Error(
25
- t(
26
- "DSRadioGroup",
27
- 'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSRadioGroup component.'
28
- )
29
- );
30
- if (!o)
31
- throw new Error(
32
- t("DSRadioGroup", g("legend"))
33
- );
34
- if (!a)
35
- throw new Error(
36
- t("DSRadioGroup", g("name"))
37
- );
38
- if (!e)
39
- throw new Error(
40
- t("DSRadioGroup", g("options"))
41
- );
42
- if (i === "horizontal" && m(e))
43
- throw new Error(
44
- t(
45
- "DSRadioGroup",
46
- "Horizontal direction is not possible when options contain a hint. Please remove hints or change direction property to 'vertical'."
47
- )
48
- );
49
- if (i === "horizontal" && z(e))
50
- throw new Error(
51
- t(
52
- "DSRadioGroup",
53
- "Horizontal direction is not possible when options contain a custom area. Please remove custom areas or change direction property to 'vertical'."
54
- )
55
- );
56
- }, V = y(
57
- ({
58
- legend: o,
59
- name: a,
60
- options: e,
61
- className: l,
62
- defaultValue: i,
63
- description: n,
64
- direction: s = "vertical",
65
- disabled: p = !1,
66
- hideUncheckedHints: v = !1,
67
- id: u,
68
- invalid: c = !1,
69
- required: D = !1,
70
- systemFeedback: d,
71
- value: w,
72
- onChange: S,
73
- ...G
74
- }, E) => {
75
- process.env.NODE_ENV !== "production" && O({
76
- legend: o,
77
- name: a,
78
- options: e,
79
- description: n,
80
- direction: s,
81
- id: u,
82
- systemFeedback: d
83
- });
84
- const [H, x] = C(i), _ = w !== void 0, R = _ ? w : H, P = q(f.group, {
85
- // In case of longer copy, use vertical direction
86
- [f.groupHorizontal]: s === "horizontal" && !m(e) && !z(e),
87
- [f.groupInvalid]: c && !!d
88
- }), j = (r) => {
89
- if (p) {
90
- r.preventDefault();
91
- return;
92
- }
93
- _ || x(
94
- r.target.value
95
- ), S && S(r);
96
- }, k = m(e) && !v;
97
- return /* @__PURE__ */ h.jsx(
98
- N,
99
- {
100
- id: u,
101
- legend: o,
102
- className: l,
103
- description: n,
104
- disabled: p,
105
- required: D,
106
- invalid: c,
107
- systemFeedback: d,
108
- ...G,
109
- role: "radiogroup",
110
- onChange: j,
111
- children: /* @__PURE__ */ h.jsx("div", { className: P, children: e.map((r) => /* @__PURE__ */ h.jsx(
112
- I,
113
- {
114
- name: a,
115
- checked: r.value === R,
116
- disabled: p,
117
- hideUncheckedHint: v,
118
- hint: r.hint,
119
- invalid: c,
120
- isBold: k,
121
- required: D,
122
- ref: r.value === R ? E : null,
123
- ...r
124
- },
125
- u + r.label + r.value + r.hint
126
- )) })
127
- }
128
- );
129
- }
130
- );
131
- V.displayName = "DSRadioGroup";
132
- export {
133
- V as D,
134
- z as a,
135
- m as o,
136
- O as v
137
- };
@@ -1,194 +0,0 @@
1
- "use client";
2
- import { j as t } from "./jsx-runtime.C115EyI4.js";
3
- import { c as _ } from "./index.CvOaL64Y.js";
4
- import { useRef as C, useState as q, useEffect as W } from "react";
5
- import { u as F } from "./useBreakpoint.5xBNDiCf.js";
6
- import { Asterisk as M } from "../asterisk.DDn-yX4P.js";
7
- import { D as O } from "./Icon.C2o2seDb.js";
8
- import { DSSystemFeedback as T } from "../systemfeedback.ZzRUAVYX.js";
9
- import { g as u } from "./helpers.B1JT5ShS.js";
10
- import '../assets/Select.DZKpHV4G.css';const V = "_root_1opnm_226", Z = "_hint_1opnm_234", J = "_label_1opnm_234", K = "_wrapper_1opnm_238", Q = "_affix_1opnm_244", U = "_affix--small_1opnm_266", X = "_affix--disabled_1opnm_280", Y = "_prefix_1opnm_288", z = "_affix--readonly_1opnm_291", G = "_suffix_1opnm_301", ee = "_action-button_1opnm_308", ne = "_label--hidden_1opnm_327", te = "_label--disabled_1opnm_340", se = "_feedback_1opnm_361", oe = "_select-wrapper_1opnm_366", ae = "_select_1opnm_366", le = "_select--invalid_1opnm_489", ce = "_select--small_1opnm_496", ie = "_input--has-leading-icon_1opnm_550", re = "_input--has-action-button_1opnm_553", _e = "_input--has-second-action-button_1opnm_556", de = "_select--has-leading-icon_1opnm_559", pe = "_select--has-action-button_1opnm_562", me = "_select--has-second-action-button_1opnm_565", fe = "_select--has-affix_1opnm_568", ue = "_select--is-ready_1opnm_582", he = "_select--placeholder_1opnm_599", be = "_chevron_1opnm_608", xe = "_chevron--small_1opnm_612", ve = "_chevron--disabled_1opnm_615", e = {
11
- root: V,
12
- hint: Z,
13
- label: J,
14
- wrapper: K,
15
- affix: Q,
16
- "affix--small": "_affix--small_1opnm_266",
17
- affixSmall: U,
18
- "affix--disabled": "_affix--disabled_1opnm_280",
19
- affixDisabled: X,
20
- prefix: Y,
21
- "affix--readonly": "_affix--readonly_1opnm_291",
22
- affixReadonly: z,
23
- suffix: G,
24
- "action-button": "_action-button_1opnm_308",
25
- actionButton: ee,
26
- "label--hidden": "_label--hidden_1opnm_327",
27
- labelHidden: ne,
28
- "label--disabled": "_label--disabled_1opnm_340",
29
- labelDisabled: te,
30
- feedback: se,
31
- "select-wrapper": "_select-wrapper_1opnm_366",
32
- selectWrapper: oe,
33
- select: ae,
34
- "select--invalid": "_select--invalid_1opnm_489",
35
- selectInvalid: le,
36
- "select--small": "_select--small_1opnm_496",
37
- selectSmall: ce,
38
- "input--has-leading-icon": "_input--has-leading-icon_1opnm_550",
39
- inputHasLeadingIcon: ie,
40
- "input--has-action-button": "_input--has-action-button_1opnm_553",
41
- inputHasActionButton: re,
42
- "input--has-second-action-button": "_input--has-second-action-button_1opnm_556",
43
- inputHasSecondActionButton: _e,
44
- "select--has-leading-icon": "_select--has-leading-icon_1opnm_559",
45
- selectHasLeadingIcon: de,
46
- "select--has-action-button": "_select--has-action-button_1opnm_562",
47
- selectHasActionButton: pe,
48
- "select--has-second-action-button": "_select--has-second-action-button_1opnm_565",
49
- selectHasSecondActionButton: me,
50
- "select--has-affix": "_select--has-affix_1opnm_568",
51
- selectHasAffix: fe,
52
- "select--is-ready": "_select--is-ready_1opnm_582",
53
- selectIsReady: ue,
54
- "select--placeholder": "_select--placeholder_1opnm_599",
55
- selectPlaceholder: he,
56
- chevron: be,
57
- "chevron--small": "_chevron--small_1opnm_612",
58
- chevronSmall: xe,
59
- "chevron--disabled": "_chevron--disabled_1opnm_615",
60
- chevronDisabled: ve
61
- }, Ee = ["medium", "small"], Se = ({
62
- id: n,
63
- label: a,
64
- options: o
65
- }) => {
66
- if (!n)
67
- throw new Error(
68
- u(
69
- "DSSelect",
70
- 'A unique "id" prop is required. Please add an unique "id" prop to the DSSelect component.'
71
- )
72
- );
73
- if (!a)
74
- throw new Error(
75
- u(
76
- "DSSelect",
77
- `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}.`
78
- )
79
- );
80
- if (!o || o.length === 0)
81
- throw new Error(
82
- u(
83
- "DSSelect",
84
- 'Options are always required. Please add an "options" prop to the DSSelect component.'
85
- )
86
- );
87
- }, ge = (n, a, o) => n === "" || a !== void 0 && a !== "" ? !1 : !(o !== void 0 && o !== ""), Le = ({
88
- id: n,
89
- label: a,
90
- options: o,
91
- className: H,
92
- defaultValue: h,
93
- disabled: d = !1,
94
- hideLabel: I = !1,
95
- hint: p,
96
- invalid: r = !1,
97
- placeholder: m = "Select",
98
- required: b = !1,
99
- size: x = "medium",
100
- systemFeedback: f,
101
- value: v,
102
- ...w
103
- }) => {
104
- process.env.NODE_ENV !== "production" && Se({
105
- id: n,
106
- label: a,
107
- options: o
108
- });
109
- const i = C(null), [j, A] = q(
110
- ge(m, h, v)
111
- );
112
- W(() => {
113
- if (!i.current) return;
114
- const l = () => {
115
- if (!i.current) return;
116
- const c = i.current.value;
117
- A(c === "");
118
- }, s = i.current;
119
- return s.addEventListener("change", l), () => {
120
- s.removeEventListener("change", l);
121
- };
122
- }, []);
123
- const B = F(I), S = `${n}-label`, g = `${n}-feedback`, D = `${n}-hint`, E = p ? ` ${D}` : "", L = (l) => [
124
- m && /* @__PURE__ */ t.jsx("option", { value: "", children: m }, `${n}-hidden-option-disabled-placeholder`),
125
- ...l.map((s) => {
126
- if ("options" in s) {
127
- const { label: c, options: $ } = s;
128
- return /* @__PURE__ */ t.jsx("optgroup", { label: c, children: $.map(y) }, c);
129
- } else
130
- return y(s);
131
- })
132
- ], y = ({ label: l, value: s, isDisabled: c }) => /* @__PURE__ */ t.jsx("option", { value: s, disabled: c, children: l }, s), N = _(e.root, H), P = _(e.select, {
133
- [e.selectSmall]: x === "small",
134
- [e.selectInvalid]: r,
135
- [e.selectPlaceholder]: j
136
- }), k = _(e.label, {
137
- // hide label only visually to keep them available for assistive technologies
138
- [e.labelHidden]: B,
139
- [e.labelDisabled]: d
140
- }), R = _(e.chevron, {
141
- [e.chevronSmall]: x === "small",
142
- [e.chevronDisabled]: d
143
- });
144
- return /* @__PURE__ */ t.jsxs("div", { className: N, children: [
145
- /* @__PURE__ */ t.jsxs("label", { className: k, id: S, htmlFor: n, children: [
146
- a,
147
- b && /* @__PURE__ */ t.jsx(M, {})
148
- ] }),
149
- p && /* @__PURE__ */ t.jsx("div", { className: e.hint, id: D, children: p }),
150
- r && f && /* @__PURE__ */ t.jsx(
151
- T,
152
- {
153
- className: e.feedback,
154
- message: f,
155
- type: "invalid",
156
- id: g,
157
- "aria-live": "assertive"
158
- }
159
- ),
160
- /* @__PURE__ */ t.jsxs("div", { className: e.selectWrapper, children: [
161
- /* @__PURE__ */ t.jsx(
162
- "select",
163
- {
164
- ...w,
165
- id: n,
166
- ref: i,
167
- className: P,
168
- "aria-labelledby": `${S}${E}`,
169
- "aria-describedby": r && f ? g : void 0,
170
- "aria-invalid": r,
171
- defaultValue: h,
172
- value: v,
173
- disabled: d,
174
- required: b,
175
- children: L(o)
176
- }
177
- ),
178
- /* @__PURE__ */ t.jsx(
179
- O,
180
- {
181
- name: "chevron-down",
182
- className: R,
183
- "aria-hidden": "true"
184
- }
185
- )
186
- ] })
187
- ] });
188
- };
189
- export {
190
- Le as D,
191
- Ee as S,
192
- ge as g,
193
- Se as v
194
- };
@@ -1,198 +0,0 @@
1
- "use client";
2
- import { j as n } from "./jsx-runtime.C115EyI4.js";
3
- import { c as v } from "./index.CvOaL64Y.js";
4
- import { useState as c, useRef as oa, useEffect as x } from "react";
5
- import { u as sa, h as ia } from "./useBreakpoint.5xBNDiCf.js";
6
- import { g as V, p as z } from "./helpers.B1JT5ShS.js";
7
- import { Asterisk as la } from "../asterisk.DDn-yX4P.js";
8
- import { DSSystemFeedback as ra } from "../systemfeedback.ZzRUAVYX.js";
9
- import '../assets/Textarea.Cp0b7oZp.css';const ca = "_textarea_ya3ak_226", da = "_textarea--invalid_ya3ak_343", _a = "_textarea--small_ya3ak_350", ua = "_textarea--resize-auto_ya3ak_370", fa = "_root_ya3ak_380", ba = "_hint_ya3ak_388", xa = "_label_ya3ak_388", ya = "_affix_ya3ak_392", ma = "_affix--small_ya3ak_414", ha = "_affix--disabled_ya3ak_428", ka = "_prefix_ya3ak_436", pa = "_affix--readonly_ya3ak_439", va = "_suffix_ya3ak_449", ga = "_leading-icon_ya3ak_456", Sa = "_leading-icon--small_ya3ak_468", Ia = "_leading-icon--disabled_ya3ak_471", Ca = "_action-button_ya3ak_480", Da = "_label--hidden_ya3ak_499", Aa = "_label--disabled_ya3ak_512", ja = "_feedback_ya3ak_533", wa = "_char-count_ya3ak_538", Ra = "_char-count-announcer_ya3ak_555", t = {
10
- textarea: ca,
11
- "textarea--invalid": "_textarea--invalid_ya3ak_343",
12
- textareaInvalid: da,
13
- "textarea--small": "_textarea--small_ya3ak_350",
14
- textareaSmall: _a,
15
- "textarea--resize-auto": "_textarea--resize-auto_ya3ak_370",
16
- textareaResizeAuto: ua,
17
- root: fa,
18
- hint: ba,
19
- label: xa,
20
- affix: ya,
21
- "affix--small": "_affix--small_ya3ak_414",
22
- affixSmall: ma,
23
- "affix--disabled": "_affix--disabled_ya3ak_428",
24
- affixDisabled: ha,
25
- prefix: ka,
26
- "affix--readonly": "_affix--readonly_ya3ak_439",
27
- affixReadonly: pa,
28
- suffix: va,
29
- "leading-icon": "_leading-icon_ya3ak_456",
30
- leadingIcon: ga,
31
- "leading-icon--small": "_leading-icon--small_ya3ak_468",
32
- leadingIconSmall: Sa,
33
- "leading-icon--disabled": "_leading-icon--disabled_ya3ak_471",
34
- leadingIconDisabled: Ia,
35
- "action-button": "_action-button_ya3ak_480",
36
- actionButton: Ca,
37
- "label--hidden": "_label--hidden_ya3ak_499",
38
- labelHidden: Da,
39
- "label--disabled": "_label--disabled_ya3ak_512",
40
- labelDisabled: Aa,
41
- feedback: ja,
42
- "char-count": "_char-count_ya3ak_538",
43
- charCount: wa,
44
- "char-count-announcer": "_char-count-announcer_ya3ak_555",
45
- charCountAnnouncer: Ra
46
- }, Pa = ["medium", "small"], Ta = ({ id: o, label: _ }) => {
47
- if (!o)
48
- throw new Error(
49
- V(
50
- "DSTextarea",
51
- 'A unique "id" prop is required. Please add an unique "id" prop to the DSTextarea component.'
52
- )
53
- );
54
- if (!_)
55
- throw new Error(
56
- V(
57
- "DSTextarea",
58
- `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}.`
59
- )
60
- );
61
- }, qa = ({
62
- id: o,
63
- label: _,
64
- charsLimitText: P = "Character limit reached",
65
- charsRemainingText: q = "Characters remaining:",
66
- className: M,
67
- defaultValue: O,
68
- disabled: g = !1,
69
- hint: y,
70
- hideLabel: F = !1,
71
- invalid: s = !1,
72
- maxLength: a,
73
- readonly: S = !1,
74
- required: I = !1,
75
- resize: u = "vertical",
76
- size: W = "medium",
77
- systemFeedback: l,
78
- value: m,
79
- wrapperClassName: X,
80
- onChange: C,
81
- onInput: D,
82
- ...Z
83
- }) => {
84
- process.env.NODE_ENV !== "production" && Ta({
85
- id: o,
86
- label: _
87
- });
88
- const [G, A] = c(O || ""), [r, j] = c(0), [J, w] = c(0), [K, R] = c("off"), [T, h] = c(l), [k, p] = c(s), E = m !== void 0, f = E ? m : G, i = oa(null), Q = sa(F);
89
- x(() => {
90
- if (!a || a <= 0)
91
- return;
92
- r >= a * 0.8 ? R("polite") : R("off");
93
- const e = setTimeout(() => {
94
- w(a - r || 0);
95
- }, 1e3);
96
- return () => clearTimeout(e);
97
- }, [r]), x(() => {
98
- A(f || ""), d(), a && a > 0 && (j(f.toString().length || 0), w(a - f.toString().length || 0));
99
- }, [m]), x(() => {
100
- s && l ? (h(l), p(s)) : !s && a && a >= 0 && r >= a ? (p(!0), h(P)) : (h(l), p(s));
101
- }, [s, k, l, r]), x(() => {
102
- if (ia && u === "auto")
103
- return d(), window.addEventListener("resize", d), () => window.removeEventListener("resize", d);
104
- }, [u, i.current]);
105
- const U = v(t.root, X), Y = v(t.textarea, M, {
106
- // small textarea
107
- [t.textareaSmall]: W === "small",
108
- // invalid state
109
- [t.textareaInvalid]: k,
110
- // resize handling
111
- [t.textareaResizeAuto]: u === "auto"
112
- }), L = v(t.label, {
113
- // hide label only visually to keep them available for assistive technologies
114
- [t.labelHidden]: Q,
115
- [t.labelDisabled]: g
116
- }), N = `${o}-label`, B = `${o}-feedback`, $ = `${o}-hint`, H = `${o}-char-count-announcer`, aa = y ? ` ${$}` : "", d = () => {
117
- if (i.current && u === "auto") {
118
- i.current.style.height = "auto";
119
- const e = z(i.current.scrollHeight), b = z(2);
120
- i.current.style.height = `${// We need to add 2px (border-top & border-bottom) to the scrollHeight to prevent the textarea
121
- // from jumping as soon as the user starts typing.
122
- e + b}rem`;
123
- }
124
- }, ea = () => {
125
- const e = [];
126
- return a && a > 0 && e.push(H), s && l && e.push(B), e.length > 0 ? e.join(" ") : void 0;
127
- }, ta = (e) => {
128
- var b;
129
- D && D(e), a && a > 0 && j(((b = i.current) == null ? void 0 : b.value.length) || 0), d();
130
- }, na = (e) => {
131
- C && C(e), E || A(e.target.value);
132
- };
133
- return /* @__PURE__ */ n.jsxs("div", { className: U, children: [
134
- /* @__PURE__ */ n.jsxs("label", { className: L, id: N, htmlFor: o, children: [
135
- _,
136
- I && /* @__PURE__ */ n.jsx(la, {})
137
- ] }),
138
- y && /* @__PURE__ */ n.jsx("div", { className: t.hint, id: $, children: y }),
139
- k && T && /* @__PURE__ */ n.jsx(
140
- ra,
141
- {
142
- className: t.feedback,
143
- message: T,
144
- type: "invalid",
145
- id: B
146
- }
147
- ),
148
- /* @__PURE__ */ n.jsx(
149
- "textarea",
150
- {
151
- className: Y,
152
- id: o,
153
- ref: i,
154
- ...Z,
155
- "aria-labelledby": `${N}${aa}`,
156
- "aria-describedby": ea(),
157
- "aria-invalid": s,
158
- "aria-disabled": S,
159
- maxLength: a,
160
- readOnly: S,
161
- required: I,
162
- disabled: g,
163
- value: f,
164
- defaultValue: void 0,
165
- rows: void 0,
166
- cols: void 0,
167
- onChange: na,
168
- onInput: ta
169
- }
170
- ),
171
- a !== void 0 && a > 0 && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
172
- /* @__PURE__ */ n.jsxs("div", { className: t.charCount, "aria-hidden": "true", children: [
173
- r,
174
- "/",
175
- a
176
- ] }),
177
- /* @__PURE__ */ n.jsxs(
178
- "div",
179
- {
180
- className: t.charCountAnnouncer,
181
- id: H,
182
- "aria-live": K,
183
- "aria-atomic": "true",
184
- children: [
185
- q,
186
- " ",
187
- J
188
- ]
189
- }
190
- )
191
- ] })
192
- ] });
193
- };
194
- export {
195
- qa as D,
196
- Pa as T,
197
- Ta as v
198
- };
@@ -1,89 +0,0 @@
1
- "use client";
2
- import { j as s } from "./jsx-runtime.C115EyI4.js";
3
- import { c } from "./index.CvOaL64Y.js";
4
- import { forwardRef as f } from "react";
5
- import { DSButton as g } from "../button.C5opEJ6x.js";
6
- import { D as h } from "./Icon.C2o2seDb.js";
7
- import '../assets/Toast.Cz6wYaBv.css';const p = "_root_1rrus_80", x = "_root--closing_1rrus_94", I = "_fade-out_1rrus_1", S = "_move-in_1rrus_1", N = "_root--success_1rrus_129", j = "_root--info_1rrus_133", v = "_root--warning_1rrus_137", w = "_content_1rrus_142", C = "_content--hide-icon_1rrus_149", D = "_icon_1rrus_153", O = "_message_1rrus_157", o = {
8
- root: p,
9
- "root--closing": "_root--closing_1rrus_94",
10
- rootClosing: x,
11
- "fade-out": "_fade-out_1rrus_1",
12
- fadeOut: I,
13
- "move-in": "_move-in_1rrus_1",
14
- moveIn: S,
15
- "root--success": "_root--success_1rrus_129",
16
- rootSuccess: N,
17
- "root--info": "_root--info_1rrus_133",
18
- rootInfo: j,
19
- "root--warning": "_root--warning_1rrus_137",
20
- rootWarning: v,
21
- content: w,
22
- "content--hide-icon": "_content--hide-icon_1rrus_149",
23
- contentHideIcon: C,
24
- icon: D,
25
- message: O
26
- }, T = {
27
- success: "circle-check-colored",
28
- warning: "triangle-exclamationmark-colored",
29
- info: "circle-info-colored"
30
- }, H = f(
31
- ({
32
- message: n,
33
- className: e,
34
- hideIcon: t = !1,
35
- variant: r = "info",
36
- onClick: i,
37
- onMouseEnter: a,
38
- onMouseLeave: _,
39
- ...u
40
- }, l) => {
41
- const m = c(o.root, e, {
42
- [o.rootSuccess]: r === "success",
43
- [o.rootWarning]: r === "warning",
44
- [o.rootInfo]: r === "info"
45
- }), d = c(o.content, {
46
- [o.contentHideIcon]: t
47
- });
48
- return /* @__PURE__ */ s.jsx(
49
- "aside",
50
- {
51
- className: m,
52
- ref: l,
53
- popover: "manual",
54
- "data-ds-toast": !0,
55
- onMouseEnter: a,
56
- onMouseLeave: _,
57
- "aria-label": n,
58
- ...u,
59
- children: /* @__PURE__ */ s.jsxs("div", { className: d, children: [
60
- !t && /* @__PURE__ */ s.jsx(
61
- h,
62
- {
63
- name: T[r],
64
- className: o.icon,
65
- "aria-hidden": "true"
66
- }
67
- ),
68
- /* @__PURE__ */ s.jsx("div", { className: o.message, children: n }),
69
- /* @__PURE__ */ s.jsx(
70
- g,
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
- H.displayName = "DSToast";
86
- export {
87
- H as D,
88
- o as s
89
- };
@@ -1,13 +0,0 @@
1
- "use client";
2
- import "./chunks/jsx-runtime.C115EyI4.js";
3
- import "./chunks/index.CvOaL64Y.js";
4
- import "react";
5
- import { c as l } from "./chunks/CustomReactSelect.D3jv5-fa.js";
6
- import "./chunks/useBreakpoint.5xBNDiCf.js";
7
- import "./asterisk.DDn-yX4P.js";
8
- import "./chunks/Icon.C2o2seDb.js";
9
- import "./systemfeedback.ZzRUAVYX.js";
10
- import "./optioncheckbox.BPN3f6l_.js";
11
- export {
12
- l as CustomReactSelect
13
- };
@@ -1,11 +0,0 @@
1
- "use client";
2
- import "./chunks/jsx-runtime.C115EyI4.js";
3
- import "./chunks/index.CvOaL64Y.js";
4
- import "react";
5
- import "./asterisk.DDn-yX4P.js";
6
- import "./heading.CAkraI2D.js";
7
- import "./systemfeedback.ZzRUAVYX.js";
8
- import { D as l } from "./chunks/Fieldset.C9K8BYmH.js";
9
- export {
10
- l as DSFieldset
11
- };
package/flag.XJHHSP38.js DELETED
@@ -1,43 +0,0 @@
1
- "use client";
2
- import { j as e } from "./chunks/jsx-runtime.C115EyI4.js";
3
- import { c as i } from "./chunks/index.CvOaL64Y.js";
4
- import { D as n } from "./chunks/Icon.C2o2seDb.js";
5
- import './assets/flag.DX_lH1v7.css';const h = "_flag_dk9bs_76", d = "_flag--color-grey-light_dk9bs_103", b = "_flag--color-yellow-light_dk9bs_106", C = "_flag--color-red-light_dk9bs_109", k = "_flag--color-green-light_dk9bs_112", y = "_flag--color-orange-base_dk9bs_115", o = {
6
- flag: h,
7
- "flag--color-grey-light": "_flag--color-grey-light_dk9bs_103",
8
- flagColorGreyLight: d,
9
- "flag--color-yellow-light": "_flag--color-yellow-light_dk9bs_106",
10
- flagColorYellowLight: b,
11
- "flag--color-red-light": "_flag--color-red-light_dk9bs_109",
12
- flagColorRedLight: C,
13
- "flag--color-green-light": "_flag--color-green-light_dk9bs_112",
14
- flagColorGreenLight: k,
15
- "flag--color-orange-base": "_flag--color-orange-base_dk9bs_115",
16
- flagColorOrangeBase: y
17
- }, u = ({
18
- children: s,
19
- className: t,
20
- color: l,
21
- iconName: g,
22
- iconSource: r,
23
- ...f
24
- }) => {
25
- const a = typeof l == "string" && o[`flag--color-${l}`], _ = a ? {} : { backgroundColor: l }, c = i(o.flag, t, {
26
- [o[`flag--color-${l}`]]: a
27
- });
28
- return /* @__PURE__ */ e.jsxs("span", { className: c, style: _, ...f, children: [
29
- (g || r) && /* @__PURE__ */ e.jsx(
30
- n,
31
- {
32
- name: g,
33
- theme: "light",
34
- source: r,
35
- "aria-hidden": "true"
36
- }
37
- ),
38
- s
39
- ] });
40
- };
41
- export {
42
- u as DSFlag
43
- };