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

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 (238) hide show
  1. package/README.md +0 -9
  2. package/{accordion.B3UkxlAZ.js → accordion.CEKQh-7i.js} +1 -1
  3. package/accordion.d.ts +1 -0
  4. package/{arialiveregions.BK4T7Vhk.js → arialiveregions.BKpxxK7O.js} +1 -1
  5. package/arialiveregions.d.ts +1 -0
  6. package/assets/Accordion.DMEFgtQm.css +1 -0
  7. package/assets/Chip.D10_7Q82.css +1 -0
  8. package/assets/CustomReactSelect.D5XKd9vg.css +1 -0
  9. package/assets/Dialog.B0pucIEI.css +1 -0
  10. package/assets/Drawer.CATBzfY7.css +1 -0
  11. package/assets/Fieldset.CwDhKRUL.css +1 -0
  12. package/assets/InputPassword.DOAAzj-O.css +1 -0
  13. package/assets/InputSearch.CxPYaQGZ.css +1 -0
  14. package/assets/InputStepper.CYYJUu0b.css +1 -0
  15. package/assets/Notification.mhVFeSGm.css +1 -0
  16. package/assets/Select.DZKpHV4G.css +1 -0
  17. package/assets/Textarea.Cp0b7oZp.css +1 -0
  18. package/assets/Toast.Cz6wYaBv.css +1 -0
  19. package/assets/button.C9_ejpGG.css +1 -0
  20. package/assets/buttonround.DTCqRP-0.css +1 -0
  21. package/assets/chipgroup.BMovtKTy.css +1 -0
  22. package/assets/flag.DX_lH1v7.css +1 -0
  23. package/assets/floatingactionbutton.Do-yEH6c.css +1 -0
  24. package/assets/input.Q5oKkmW2.css +1 -0
  25. package/assets/link.DhZqkLMP.css +1 -0
  26. package/assets/linkstandalone.Dwz-_O8q.css +1 -0
  27. package/assets/optioncheckbox.C62HtIj5.css +1 -0
  28. package/assets/radio.-Xxx5wL4.css +1 -0
  29. package/assets/switch.C1Ei0-z8.css +1 -0
  30. package/assets/text.DxKFcfY6.css +1 -0
  31. package/asterisk.d.ts +1 -0
  32. package/button.C5opEJ6x.js +135 -0
  33. package/button.d.ts +1 -0
  34. package/buttonround.CUoqRyy0.js +118 -0
  35. package/buttonround.d.ts +1 -0
  36. package/checkbox.d.ts +1 -0
  37. package/checkboxgroup.BqD5IV51.js +8 -0
  38. package/checkboxgroup.d.ts +1 -0
  39. package/chip.B92ew-hk.js +10 -0
  40. package/chip.d.ts +2 -0
  41. package/chipgroup.BJrqEfvr.js +175 -0
  42. package/chipgroup.d.ts +2 -0
  43. package/chunks/Accordion.DFwFN8mX.js +125 -0
  44. package/chunks/{AriaLiveRegions.utils.D2ni4Yrf.js → AriaLiveRegions.utils.BGSZafnS.js} +2 -2
  45. package/chunks/CheckboxGroup.M3jOjhNf.js +92 -0
  46. package/chunks/Chip.fMG8wi5K.js +142 -0
  47. package/chunks/{CustomReactSelect.ChAtL6fu.js → CustomReactSelect.D3jv5-fa.js} +883 -876
  48. package/chunks/{Dialog.Z5ESJQMi.js → Dialog.Fwr6vLiK.js} +47 -47
  49. package/chunks/{Drawer.BdowMqE0.js → Drawer.CKoYzQHd.js} +32 -32
  50. package/chunks/Fieldset.C9K8BYmH.js +99 -0
  51. package/chunks/InputPassword.C7pNeWGx.js +143 -0
  52. package/chunks/InputSearch.B24rcIJ_.js +192 -0
  53. package/chunks/InputStepper.CEW-bieQ.js +294 -0
  54. package/chunks/Notification.BXVN7_Fs.js +93 -0
  55. package/chunks/RadioGroup.D4UOflwr.js +137 -0
  56. package/chunks/Select.Ds86q4UC.js +194 -0
  57. package/chunks/Textarea.DcB8hKnO.js +198 -0
  58. package/chunks/Toast.DrzxdzVW.js +89 -0
  59. package/chunks/translate.isa3FHb8.js +11 -0
  60. package/{combobox.JL1Dsn3E.js → combobox.BeTnbG1m.js} +1 -1
  61. package/combobox.d.ts +1 -0
  62. package/components/Accordion/Accordion.d.ts +0 -1
  63. package/components/Accordion/Accordion.utils.d.ts +0 -1
  64. package/components/Button/Button.d.ts +0 -1
  65. package/components/ButtonRound/ButtonRound.d.ts +0 -1
  66. package/components/Checkbox/Checkbox.d.ts +0 -1
  67. package/components/CheckboxGroup/CheckboxGroup.d.ts +6 -7
  68. package/components/CheckboxGroup/CheckboxGroup.utils.d.ts +0 -1
  69. package/components/ChipGroup/Chip.d.ts +12 -0
  70. package/components/ChipGroup/ChipGroup.d.ts +42 -0
  71. package/components/ChipGroup/ChipGroup.test.d.ts +1 -0
  72. package/components/ChipGroup/ChipGroup.utils.d.ts +60 -0
  73. package/components/ChipGroup/ChipGroup.utils.test.d.ts +1 -0
  74. package/components/Combobox/Combobox.d.ts +0 -1
  75. package/components/Combobox/Combobox.utils.d.ts +6 -1
  76. package/components/CustomReactSelect/CustomReactSelect.d.ts +0 -1
  77. package/components/CustomReactSelect/CustomReactSelect.utils.d.ts +0 -13
  78. package/components/CustomReactSelect/OptionCheckbox.d.ts +0 -1
  79. package/components/Dialog/Dialog.d.ts +0 -1
  80. package/components/Dialog/Dialog.utils.d.ts +0 -1
  81. package/components/Drawer/Drawer.d.ts +0 -1
  82. package/components/Drawer/Drawer.utils.d.ts +0 -1
  83. package/components/Fieldset/Fieldset.d.ts +0 -1
  84. package/components/Fieldset/Fieldset.utils.d.ts +7 -1
  85. package/components/Flag/Flag.d.ts +23 -0
  86. package/components/Flag/Flag.test.d.ts +1 -0
  87. package/components/Flag/Flag.utils.d.ts +2 -0
  88. package/components/FloatingActionButton/FloatingActionButton.d.ts +0 -1
  89. package/components/Heading/Heading.d.ts +0 -1
  90. package/components/Icon/Icon.d.ts +0 -1
  91. package/components/Icon/Icon.utils.d.ts +0 -1
  92. package/components/Input/Input.d.ts +0 -1
  93. package/components/Input/Input.utils.d.ts +0 -1
  94. package/components/InputPassword/InputPassword.d.ts +0 -1
  95. package/components/InputPassword/InputPassword.utils.d.ts +0 -1
  96. package/components/InputSearch/InputSearch.d.ts +0 -1
  97. package/components/InputSearch/InputSearch.utils.d.ts +0 -1
  98. package/components/InputStepper/InputStepper.d.ts +0 -1
  99. package/components/InputStepper/InputStepper.utils.d.ts +0 -1
  100. package/components/Link/Link.d.ts +0 -1
  101. package/components/LinkStandalone/LinkStandalone.d.ts +0 -1
  102. package/components/Logo/Logo.d.ts +1 -2
  103. package/components/Logo/Logo.utils.d.ts +0 -1
  104. package/components/Notification/Notification.d.ts +0 -1
  105. package/components/Notification/Notification.utils.d.ts +0 -1
  106. package/components/Radio/Radio.d.ts +0 -1
  107. package/components/RadioGroup/RadioGroup.d.ts +7 -8
  108. package/components/RadioGroup/RadioGroup.utils.d.ts +2 -3
  109. package/components/Select/Select.d.ts +0 -1
  110. package/components/Select/Select.utils.d.ts +0 -1
  111. package/components/SkipToContent/SkipToContent.d.ts +0 -1
  112. package/components/Spinner/Spinner.d.ts +0 -1
  113. package/components/Switch/Switch.d.ts +0 -1
  114. package/components/SystemFeedback/SystemFeedback.d.ts +0 -1
  115. package/components/Text/Text.d.ts +0 -1
  116. package/components/Textarea/Textarea.d.ts +0 -1
  117. package/components/Textarea/Textarea.utils.d.ts +0 -1
  118. package/components/Title/Title.d.ts +0 -1
  119. package/components/Toast/Toast.d.ts +0 -1
  120. package/components/Toast/Toast.utils.d.ts +0 -1
  121. package/components/Toast/ToastManager.d.ts +0 -1
  122. package/customreactselect.d.ts +1 -0
  123. package/{customreactselect.Dg8Kgq3e.js → customreactselect.lYJhIeyx.js} +2 -2
  124. package/dialog.d.ts +1 -0
  125. package/{dialog.D3bJ0rsW.js → dialog.lGwNQU91.js} +2 -2
  126. package/{drawer.CNPF1-Kc.js → drawer.DNi5m8wP.js} +2 -2
  127. package/drawer.d.ts +1 -0
  128. package/{fieldset.CTshPWYX.js → fieldset.BqiAjeax.js} +1 -1
  129. package/fieldset.d.ts +1 -0
  130. package/flag.XJHHSP38.js +43 -0
  131. package/flag.d.ts +2 -0
  132. package/floatingactionbutton.CMpkTdhX.js +87 -0
  133. package/floatingactionbutton.d.ts +1 -0
  134. package/heading.d.ts +1 -0
  135. package/icon.d.ts +1 -0
  136. package/index.d.ts +4 -0
  137. package/index.es.js +133 -113
  138. package/input.d.ts +1 -0
  139. package/input.v7qB7wPJ.js +239 -0
  140. package/{inputpassword.nsYu6YeB.js → inputpassword.CSjh1GU7.js} +2 -2
  141. package/inputpassword.d.ts +1 -0
  142. package/{inputsearch.ZGIrDrcv.js → inputsearch.DyznOWLK.js} +2 -2
  143. package/inputsearch.d.ts +1 -0
  144. package/{inputstepper.BvY36hA1.js → inputstepper.3BLb7s0P.js} +2 -2
  145. package/inputstepper.d.ts +1 -0
  146. package/link.Clk5_BYp.js +116 -0
  147. package/link.d.ts +1 -0
  148. package/linkstandalone.BXERmqdN.js +80 -0
  149. package/linkstandalone.d.ts +1 -0
  150. package/logo.d.ts +1 -0
  151. package/{notification.BAS13UQ6.js → notification.0kX1GMaB.js} +2 -2
  152. package/notification.d.ts +1 -0
  153. package/{optioncheckbox.DZWwtx6f.js → optioncheckbox.BPN3f6l_.js} +13 -13
  154. package/optioncheckbox.d.ts +1 -0
  155. package/package.json +44 -39
  156. package/partials/index.js +407 -407
  157. package/partials/lib/partials.d.ts +0 -1
  158. package/radio.DTZNJzMU.js +115 -0
  159. package/radio.d.ts +1 -0
  160. package/radiogroup.SYkZm2DG.js +10 -0
  161. package/radiogroup.d.ts +1 -0
  162. package/{select.C4OZMB-V.js → select.CYbwR3RW.js} +1 -1
  163. package/select.d.ts +1 -0
  164. package/{skiptocontent.C4yQfWr2.js → skiptocontent.DUQWopO4.js} +1 -1
  165. package/skiptocontent.d.ts +1 -0
  166. package/spinner.d.ts +1 -0
  167. package/styles/fonts/STIHLContrafaceDigitalTextDemi.woff +0 -0
  168. package/styles/fonts/STIHLContrafaceDigitalTextDemi.woff2 +0 -0
  169. package/styles/fonts/font-face.min.css +1 -1
  170. package/styles/scss/_index.scss +1 -0
  171. package/styles/scss/lib/_breakpoints.scss +0 -1
  172. package/styles/scss/lib/_link.scss +3 -0
  173. package/styles/scss/lib/_spacing-dynamic.scss +61 -0
  174. package/switch.CoNnIhM4.js +65 -0
  175. package/switch.d.ts +1 -0
  176. package/systemfeedback.d.ts +1 -0
  177. package/text.d.ts +1 -0
  178. package/text.fMcHzVbH.js +57 -0
  179. package/{textarea.CtQtGqn5.js → textarea.DJc527nX.js} +1 -1
  180. package/textarea.d.ts +1 -0
  181. package/title.d.ts +1 -0
  182. package/{toast.DVd9dLs2.js → toast.D48GFmp0.js} +2 -2
  183. package/toast.d.ts +1 -0
  184. package/{toastmanager.Dh0gzFkM.js → toastmanager.Dl8-Q3ED.js} +2 -2
  185. package/toastmanager.d.ts +1 -0
  186. package/utils/index.d.ts +1 -0
  187. package/utils/translate.d.ts +11 -0
  188. package/utils/translate.test.d.ts +1 -0
  189. package/utils/useBreakpoint.d.ts +0 -1
  190. package/utils/useIsomorphicLayoutEffect.d.ts +0 -1
  191. package/utils/vitest.setup.d.ts +0 -1
  192. package/assets/Accordion.lFv7Q_RG.css +0 -1
  193. package/assets/CustomReactSelect.CMkn-EGK.css +0 -1
  194. package/assets/Dialog.fiQvxJg_.css +0 -1
  195. package/assets/Drawer.BqBgbSuP.css +0 -1
  196. package/assets/Fieldset.qHYeUFZt.css +0 -1
  197. package/assets/InputPassword.Cf394z47.css +0 -1
  198. package/assets/InputSearch.eCRQoxjN.css +0 -1
  199. package/assets/InputStepper.B80KulYE.css +0 -1
  200. package/assets/Notification.DK6agBGS.css +0 -1
  201. package/assets/Select.BptsMxz4.css +0 -1
  202. package/assets/Textarea.CIIVh03G.css +0 -1
  203. package/assets/Toast.Dsvs1zdM.css +0 -1
  204. package/assets/button.B1O7Yw3Q.css +0 -1
  205. package/assets/buttonround.DlH_ipDo.css +0 -1
  206. package/assets/floatingactionbutton.DRYentYC.css +0 -1
  207. package/assets/input.C0MrSbQu.css +0 -1
  208. package/assets/link.vtTST2ki.css +0 -1
  209. package/assets/linkstandalone.BtAcziZ7.css +0 -1
  210. package/assets/optioncheckbox.BJJAph5_.css +0 -1
  211. package/assets/radio.9kpIO3HC.css +0 -1
  212. package/assets/switch.2DQF2zH-.css +0 -1
  213. package/assets/text.Dhb_l50R.css +0 -1
  214. package/button.DH0h6uPs.js +0 -135
  215. package/buttonround.0mw4zzlU.js +0 -118
  216. package/checkboxgroup.CZqrlF-x.js +0 -9
  217. package/chunks/Accordion.pI3JyHJL.js +0 -125
  218. package/chunks/CheckboxGroup.4J_gZ_XJ.js +0 -87
  219. package/chunks/Fieldset.COGbZwry.js +0 -99
  220. package/chunks/InputPassword.Dgo95-PU.js +0 -140
  221. package/chunks/InputSearch.BFof0pBn.js +0 -189
  222. package/chunks/InputStepper.4IqLa5tX.js +0 -291
  223. package/chunks/Notification.BhwbaXqk.js +0 -93
  224. package/chunks/RadioGroup.C5jbCJM4.js +0 -132
  225. package/chunks/RadioGroup.module.BBZwHDjW.js +0 -11
  226. package/chunks/Select.fXeQJXtz.js +0 -191
  227. package/chunks/Textarea.Bewrp0Za.js +0 -195
  228. package/chunks/Toast.DA_CQ9J-.js +0 -89
  229. package/floatingactionbutton.CCIj9Fjr.js +0 -87
  230. package/input.CTgeAYdu.js +0 -236
  231. package/link.DAZNwQ0a.js +0 -116
  232. package/linkstandalone.C9X3er7g.js +0 -80
  233. package/radio.CWGJtmKl.js +0 -115
  234. package/radiogroup.BhffFqN3.js +0 -11
  235. package/switch.CmpNUC7s.js +0 -65
  236. package/text.rgDKQBrU.js +0 -57
  237. package/utils/render-in-iframe.d.ts +0 -15
  238. /package/assets/{RadioGroup.Bz3_xkZU.css → CheckboxGroup.Bz3_xkZU.css} +0 -0
@@ -1,291 +0,0 @@
1
- "use client";
2
- import { j as e } from "./jsx-runtime.C115EyI4.js";
3
- import { c } from "./index.CvOaL64Y.js";
4
- import { useState as f, useRef as N, useEffect as w } from "react";
5
- import { u as ft } from "./useBreakpoint.5xBNDiCf.js";
6
- import { M as E, a as H, u as M } from "./Input.utils.ChV6RJsh.js";
7
- import { Asterisk as mt } from "../asterisk.DDn-yX4P.js";
8
- import { DSButton as X } from "../button.DH0h6uPs.js";
9
- import { DSSystemFeedback as gt } from "../systemfeedback.ZzRUAVYX.js";
10
- import { g as S } from "./helpers.B1JT5ShS.js";
11
- import '../assets/InputStepper.B80KulYE.css';const ht = "_input_td0g0_226", bt = "_input--invalid_td0g0_338", xt = "_input--small_td0g0_345", St = "_input--has-leading-icon_td0g0_399", yt = "_input--has-action-button_td0g0_402", It = "_input--has-second-action-button_td0g0_405", vt = "_input--has-affix_td0g0_417", At = "_input--is-ready_td0g0_431", Bt = "_root_td0g0_441", Dt = "_hint_td0g0_449", Nt = "_label_td0g0_449", wt = "_wrapper_td0g0_453", Et = "_affix_td0g0_459", Ht = "_affix--small_td0g0_481", Lt = "_affix--disabled_td0g0_495", jt = "_prefix_td0g0_498", Rt = "_affix--readonly_td0g0_501", kt = "_suffix_td0g0_511", Ct = "_action-button_td0g0_518", $t = "_label--hidden_td0g0_537", Ft = "_feedback_td0g0_566", Vt = "_second-action-button_td0g0_580", Pt = "_value-announcer_td0g0_584", n = {
12
- input: ht,
13
- "input--invalid": "_input--invalid_td0g0_338",
14
- inputInvalid: bt,
15
- "input--small": "_input--small_td0g0_345",
16
- inputSmall: xt,
17
- "input--has-leading-icon": "_input--has-leading-icon_td0g0_399",
18
- inputHasLeadingIcon: St,
19
- "input--has-action-button": "_input--has-action-button_td0g0_402",
20
- inputHasActionButton: yt,
21
- "input--has-second-action-button": "_input--has-second-action-button_td0g0_405",
22
- inputHasSecondActionButton: It,
23
- "input--has-affix": "_input--has-affix_td0g0_417",
24
- inputHasAffix: vt,
25
- "input--is-ready": "_input--is-ready_td0g0_431",
26
- inputIsReady: At,
27
- root: Bt,
28
- hint: Dt,
29
- label: Nt,
30
- wrapper: wt,
31
- affix: Et,
32
- "affix--small": "_affix--small_td0g0_481",
33
- affixSmall: Ht,
34
- "affix--disabled": "_affix--disabled_td0g0_495",
35
- affixDisabled: Lt,
36
- prefix: jt,
37
- "affix--readonly": "_affix--readonly_td0g0_501",
38
- affixReadonly: Rt,
39
- suffix: kt,
40
- "action-button": "_action-button_td0g0_518",
41
- actionButton: Ct,
42
- "label--hidden": "_label--hidden_td0g0_537",
43
- labelHidden: $t,
44
- feedback: Ft,
45
- "second-action-button": "_second-action-button_td0g0_580",
46
- secondActionButton: Vt,
47
- "value-announcer": "_value-announcer_td0g0_584",
48
- valueAnnouncer: Pt
49
- }, Tt = ({
50
- id: a,
51
- label: m,
52
- prefix: g,
53
- suffix: h
54
- }) => {
55
- if (!a)
56
- throw new Error(
57
- S(
58
- "DSInputStepper",
59
- 'A unique "id" prop is required. Please add an unique "id" prop to the DSInputStepper component.'
60
- )
61
- );
62
- if (!m)
63
- throw new Error(
64
- S(
65
- "DSInputStepper",
66
- `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputStepper component. If you don't want to display a label, set hideLabel={true}.`
67
- )
68
- );
69
- g && g.length > E && console.warn(
70
- S(
71
- "DSInputStepper",
72
- `Prefix length must not exceed ${E} characters.`
73
- )
74
- ), h && h.length > H && console.warn(
75
- S(
76
- "DSInputStepper",
77
- `Suffix length must not exceed ${H} characters.`
78
- )
79
- );
80
- }, Qt = ({
81
- id: a,
82
- label: m,
83
- announcementText: g = "Value changed to",
84
- className: h,
85
- disabled: r = !1,
86
- decreaseAmountButtonLabel: q = "Decrease",
87
- hint: y,
88
- hideLabel: G = !1,
89
- invalid: b = !1,
90
- increaseAmountButtonLabel: O = "Increase",
91
- prefix: u,
92
- max: L = 100,
93
- min: j = 0,
94
- readonly: p = !1,
95
- required: R = !1,
96
- size: o = "medium",
97
- step: U = 1,
98
- suffix: d,
99
- systemFeedback: I,
100
- value: x,
101
- onChange: k,
102
- ...J
103
- }) => {
104
- process.env.NODE_ENV !== "production" && Tt({
105
- id: a,
106
- label: m,
107
- prefix: u,
108
- suffix: d
109
- });
110
- const [K, Q] = f(!1), [_, v] = f(x), [A, C] = f(""), [Y, Z] = f(!1), [z, tt] = f({}), s = N(null), nt = u == null ? void 0 : u.substring(0, E), B = N(null), et = d == null ? void 0 : d.substring(0, H), D = N(null), at = ft(G);
111
- w(() => {
112
- x && v(x);
113
- }, [x]), w(() => {
114
- if (A) {
115
- const t = setTimeout(() => {
116
- C("");
117
- }, 3e3);
118
- return () => clearTimeout(t);
119
- }
120
- }, [A]), w(() => {
121
- var i;
122
- const t = (l) => {
123
- l.preventDefault();
124
- };
125
- return (i = s.current) == null || i.addEventListener("wheel", t, {
126
- // The { passive: false } option is used to indicate that the event listener wants to cancel the event, allowing preventDefault to work as expected.
127
- passive: !1
128
- }), () => {
129
- var l;
130
- (l = s.current) == null || l.removeEventListener("wheel", t);
131
- };
132
- }, []), M(() => {
133
- const t = o === "medium" ? 16 : 8, i = {};
134
- if (B.current) {
135
- const l = B.current.offsetWidth;
136
- i.paddingInlineStart = t + l + "px";
137
- }
138
- if (D.current) {
139
- const l = D.current.offsetWidth;
140
- i.paddingInlineEnd = t + l + "px";
141
- }
142
- tt(i), Q(!0);
143
- }, [u, d, o, Y]), M(() => {
144
- (async () => {
145
- "fonts" in document && (await document.fonts.load(
146
- '1em "STIHL Contraface Digital Text Regular"'
147
- ), Z(!0));
148
- })();
149
- }, []);
150
- const $ = c(n.affix, {
151
- [n.affixSmall]: o === "small",
152
- [n.affixDisabled]: r,
153
- [n.affixReadonly]: p
154
- }), F = `${a}-label`, V = `${a}-feedback`, P = `${a}-hint`, T = `${a}-value-announcer`, st = y ? ` ${P}` : "", ot = c(n.root, h), it = c(n.input, {
155
- // small input
156
- [n.inputSmall]: o === "small",
157
- // invalid state
158
- [n.inputInvalid]: b,
159
- // prefix/suffix
160
- [n.inputHasAffix]: u || d,
161
- [n.inputIsReady]: K
162
- }), lt = c(n.label, {
163
- // hide label only visually to keep them available for assistive technologies
164
- [n.labelHidden]: at
165
- }), ct = c(n.secondActionButton, {
166
- [n.secondActionButtonSmall]: o === "small"
167
- }), ut = c(n.actionButton, {
168
- [n.actionButtonSmall]: o === "small"
169
- }), dt = () => {
170
- const t = [T];
171
- return b && I && t.push(V), t.join(" ");
172
- }, W = () => {
173
- var t;
174
- if (s.current) {
175
- v(s.current.value);
176
- const i = new Event("change", { bubbles: !0 });
177
- (t = s.current) == null || t.dispatchEvent(i), C(`${g} ${s.current.value}`);
178
- }
179
- }, rt = () => {
180
- var t;
181
- (t = s.current) == null || t.stepDown(), W();
182
- }, pt = () => {
183
- var t;
184
- (t = s.current) == null || t.stepUp(), W();
185
- }, _t = (t) => {
186
- v(t.target.value), k && k(t);
187
- };
188
- return /* @__PURE__ */ e.jsxs("div", { className: ot, children: [
189
- /* @__PURE__ */ e.jsxs("label", { className: lt, id: F, htmlFor: a, children: [
190
- m,
191
- R && /* @__PURE__ */ e.jsx(mt, {})
192
- ] }),
193
- y && /* @__PURE__ */ e.jsx("div", { className: n.hint, id: P, children: y }),
194
- /* @__PURE__ */ e.jsx(
195
- "div",
196
- {
197
- "aria-live": "polite",
198
- "aria-atomic": "true",
199
- className: n.valueAnnouncer,
200
- id: T,
201
- children: A
202
- }
203
- ),
204
- b && I && /* @__PURE__ */ e.jsx(
205
- gt,
206
- {
207
- className: n.feedback,
208
- message: I,
209
- type: "invalid",
210
- id: V
211
- }
212
- ),
213
- /* @__PURE__ */ e.jsxs("div", { className: n.wrapper, children: [
214
- u && /* @__PURE__ */ e.jsx(
215
- "span",
216
- {
217
- className: c($, n.prefix),
218
- ref: B,
219
- "aria-disabled": r,
220
- children: nt
221
- }
222
- ),
223
- /* @__PURE__ */ e.jsx(
224
- "input",
225
- {
226
- className: it,
227
- id: a,
228
- ref: s,
229
- ...J,
230
- style: z,
231
- "aria-labelledby": `${F}${st}`,
232
- "aria-describedby": dt(),
233
- "aria-invalid": b,
234
- "aria-disabled": p,
235
- disabled: r,
236
- min: j,
237
- max: L,
238
- readOnly: p,
239
- required: R,
240
- step: U,
241
- type: "number",
242
- value: _,
243
- onChange: _t
244
- }
245
- ),
246
- d && /* @__PURE__ */ e.jsx(
247
- "span",
248
- {
249
- className: c($, n.suffix),
250
- ref: D,
251
- "aria-disabled": r,
252
- children: et
253
- }
254
- ),
255
- /* @__PURE__ */ e.jsx(
256
- X,
257
- {
258
- hideLabel: !0,
259
- theme: "light",
260
- iconName: "minus",
261
- variant: "filled",
262
- className: ct,
263
- size: o,
264
- onClick: rt,
265
- disabled: r || p || !!_ && Number(_) <= j,
266
- type: "button",
267
- children: q
268
- }
269
- ),
270
- /* @__PURE__ */ e.jsx(
271
- X,
272
- {
273
- hideLabel: !0,
274
- theme: "light",
275
- iconName: "plus",
276
- variant: "filled",
277
- className: ut,
278
- size: o,
279
- onClick: pt,
280
- disabled: r || p || !!_ && Number(_) >= L,
281
- type: "button",
282
- children: O
283
- }
284
- )
285
- ] })
286
- ] });
287
- };
288
- export {
289
- Qt as D,
290
- Tt as v
291
- };
@@ -1,93 +0,0 @@
1
- "use client";
2
- import { j as e } from "./jsx-runtime.C115EyI4.js";
3
- import { c as s } from "./index.CvOaL64Y.js";
4
- import { DSButton as u } from "../button.DH0h6uPs.js";
5
- import { D as b } from "./Icon.C2o2seDb.js";
6
- import '../assets/Notification.DK6agBGS.css';const g = "_root_70bef_76", N = "_root--success_70bef_102", h = "_root--error_70bef_106", I = "_root--warning_70bef_110", x = "_root--hide-icon_70bef_114", A = "_content_70bef_128", C = "_content--hide-close-button_70bef_135", H = "_content--hide-icon_70bef_138", j = "_icon_70bef_142", S = "_message_70bef_146", p = "_custom-action-area_70bef_161", o = {
7
- root: g,
8
- "root--success": "_root--success_70bef_102",
9
- rootSuccess: N,
10
- "root--error": "_root--error_70bef_106",
11
- rootError: h,
12
- "root--warning": "_root--warning_70bef_110",
13
- rootWarning: I,
14
- "root--hide-icon": "_root--hide-icon_70bef_114",
15
- rootHideIcon: x,
16
- content: A,
17
- "content--hide-close-button": "_content--hide-close-button_70bef_135",
18
- contentHideCloseButton: C,
19
- "content--hide-icon": "_content--hide-icon_70bef_138",
20
- contentHideIcon: H,
21
- icon: j,
22
- message: S,
23
- "custom-action-area": "_custom-action-area_70bef_161",
24
- customActionArea: p
25
- }, R = [
26
- "success",
27
- "error",
28
- "warning",
29
- "info"
30
- ], w = {
31
- success: "circle-check-colored",
32
- error: "diamond-exclamationmark-colored",
33
- warning: "triangle-exclamationmark-colored",
34
- info: "circle-info-colored"
35
- }, O = {
36
- error: "alert",
37
- warning: "alert",
38
- info: "status",
39
- success: "status"
40
- }, B = ({
41
- children: i,
42
- variant: t = "info",
43
- className: a,
44
- closeButtonLabel: _ = "Close notification",
45
- customActionArea: c,
46
- hideCloseButton: r = !1,
47
- hideIcon: n = !1,
48
- onClose: l,
49
- ...f
50
- }) => {
51
- const m = s(o.root, a, {
52
- [o.rootSuccess]: t === "success",
53
- [o.rootError]: t === "error",
54
- [o.rootWarning]: t === "warning",
55
- [o.rootInfo]: t === "info",
56
- [o.rootHideIcon]: n
57
- }), d = s(o.content, {
58
- [o.contentHideCloseButton]: r,
59
- [o.contentHideIcon]: n
60
- });
61
- return /* @__PURE__ */ e.jsxs("div", { className: m, ...f, role: O[t], children: [
62
- /* @__PURE__ */ e.jsxs("div", { className: d, children: [
63
- !n && /* @__PURE__ */ e.jsx(
64
- b,
65
- {
66
- name: w[t],
67
- className: o.icon,
68
- "aria-hidden": "true"
69
- }
70
- ),
71
- /* @__PURE__ */ e.jsx("div", { className: o.message, children: i }),
72
- !r && /* @__PURE__ */ e.jsx(
73
- u,
74
- {
75
- hideLabel: !0,
76
- iconName: "cross",
77
- isFlush: !0,
78
- variant: "ghost",
79
- size: "small",
80
- onClick: l,
81
- type: "button",
82
- children: _
83
- }
84
- )
85
- ] }),
86
- c && /* @__PURE__ */ e.jsx("div", { className: s({ [o.customActionArea]: !n }), children: c })
87
- ] });
88
- };
89
- export {
90
- B as D,
91
- R as N,
92
- w as a
93
- };
@@ -1,132 +0,0 @@
1
- "use client";
2
- import { j as h } from "./jsx-runtime.C115EyI4.js";
3
- import { c as C } from "./index.CvOaL64Y.js";
4
- import { forwardRef as N, useState as A } from "react";
5
- import { D as B } from "./Fieldset.COGbZwry.js";
6
- import { DSRadio as M } from "../radio.CWGJtmKl.js";
7
- import { s as m } from "./RadioGroup.module.BBZwHDjW.js";
8
- import { g as t } from "./helpers.B1JT5ShS.js";
9
- const f = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the DSRadioGroup component.`, D = (o) => o.some(({ hint: a }) => !!a), E = (o) => o.some(({ customArea: a }) => !!a), O = ({
10
- legend: o,
11
- name: a,
12
- options: e,
13
- alignment: s,
14
- description: i,
15
- id: l,
16
- systemFeedback: n
17
- }) => {
18
- if (!l && (i || n))
19
- throw new Error(
20
- t(
21
- "DSRadioGroup",
22
- 'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSRadioGroup component.'
23
- )
24
- );
25
- if (!o)
26
- throw new Error(
27
- t("DSRadioGroup", f("legend"))
28
- );
29
- if (!a)
30
- throw new Error(
31
- t("DSRadioGroup", f("name"))
32
- );
33
- if (!e)
34
- throw new Error(
35
- t("DSRadioGroup", f("options"))
36
- );
37
- if (s === "horizontal" && D(e))
38
- throw new Error(
39
- t(
40
- "DSRadioGroup",
41
- "Horizontal alignment is not possible when options contain a hint. Please remove hints or change alignment property to 'vertical'."
42
- )
43
- );
44
- if (s === "horizontal" && E(e))
45
- throw new Error(
46
- t(
47
- "DSRadioGroup",
48
- "Horizontal alignment is not possible when options contain a custom area. Please remove custom areas or change alignment property to 'vertical'."
49
- )
50
- );
51
- }, V = N(
52
- ({
53
- legend: o,
54
- name: a,
55
- options: e,
56
- alignment: s = "vertical",
57
- className: i,
58
- defaultValue: l,
59
- description: n,
60
- disabled: p = !1,
61
- hideUncheckedHints: g = !1,
62
- id: u,
63
- invalid: c = !1,
64
- required: w = !1,
65
- systemFeedback: d,
66
- value: S,
67
- onChange: v,
68
- ...x
69
- }, z) => {
70
- process.env.NODE_ENV !== "production" && O({
71
- legend: o,
72
- name: a,
73
- options: e,
74
- alignment: s,
75
- description: n,
76
- id: u,
77
- systemFeedback: d
78
- });
79
- const [H, P] = A(l), R = S !== void 0, G = R ? S : H, j = C(m.group, {
80
- // In case of longer copy, use vertical alignment
81
- [m.groupHorizontal]: s === "horizontal" && !D(e) && !E(e),
82
- [m.groupInvalid]: c && !!d
83
- }), q = (r) => {
84
- if (p) {
85
- r.preventDefault();
86
- return;
87
- }
88
- R || P(
89
- r.target.value
90
- ), v && v(r);
91
- }, y = D(e) && !g;
92
- return /* @__PURE__ */ h.jsx(
93
- B,
94
- {
95
- id: u,
96
- legend: o,
97
- className: i,
98
- description: n,
99
- disabled: p,
100
- required: w,
101
- invalid: c,
102
- systemFeedback: d,
103
- ...x,
104
- role: "radiogroup",
105
- onChange: q,
106
- children: /* @__PURE__ */ h.jsx("div", { className: j, children: e.map((r) => /* @__PURE__ */ h.jsx(
107
- M,
108
- {
109
- name: a,
110
- checked: r.value === G,
111
- disabled: p,
112
- hideUncheckedHint: g,
113
- hint: r.hint,
114
- invalid: c,
115
- isBold: y,
116
- required: w,
117
- ref: r.value === G ? z : null,
118
- ...r
119
- },
120
- u + r.label + r.value + r.hint
121
- )) })
122
- }
123
- );
124
- }
125
- );
126
- V.displayName = "DSRadioGroup";
127
- export {
128
- V as D,
129
- E as a,
130
- D as o,
131
- O as v
132
- };
@@ -1,11 +0,0 @@
1
- "use client";
2
- import '../assets/RadioGroup.Bz3_xkZU.css';const o = "_group_2f5rk_76", r = "_group--horizontal_2f5rk_84", n = "_group--invalid_2f5rk_87", _ = {
3
- group: o,
4
- "group--horizontal": "_group--horizontal_2f5rk_84",
5
- groupHorizontal: r,
6
- "group--invalid": "_group--invalid_2f5rk_87",
7
- groupInvalid: n
8
- };
9
- export {
10
- _ as s
11
- };