@stihl-design-system/components 1.0.0-RC.14 → 1.0.0-RC.16

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 (244) hide show
  1. package/accordion.Dm5MWHQ6.js +12 -0
  2. package/arialiveregions.BwwB-OfU.js +19 -0
  3. package/assets/Accordion.B5bGf8mR.css +1 -0
  4. package/assets/Breadcrumb.BaYrwrYl.css +1 -0
  5. package/assets/NavigationTabList.B6x56sAV.css +1 -0
  6. package/assets/linkstandalone.LMdnj-G0.css +1 -0
  7. package/asterisk.DUzshaw5.js +8 -0
  8. package/breadcrumb.BDpXhffn.js +11 -0
  9. package/breadcrumb.d.ts +2 -0
  10. package/button.Ywd82k7O.js +121 -0
  11. package/buttonround.CI5RGkR9.js +105 -0
  12. package/checkbox.C1JJOQeV.js +103 -0
  13. package/checkboxgroup.o5t3fWsf.js +9 -0
  14. package/chip.DcJLVxEm.js +11 -0
  15. package/chipgroup.CCq2AMSa.js +187 -0
  16. package/chunks/Accordion.BmI7nlus.js +166 -0
  17. package/chunks/AriaLiveRegions.utils.zSFFD3SF.js +27 -0
  18. package/chunks/Breadcrumb.BycdSn-b.js +106 -0
  19. package/chunks/CheckboxGroup.C-Adg1hA.js +74 -0
  20. package/chunks/Chip.BY8kLPnz.js +120 -0
  21. package/chunks/CustomReactSelect.C2yN7CYh.js +3622 -0
  22. package/chunks/Dialog.CjzCKRr2.js +140 -0
  23. package/chunks/Drawer.m2JeVNBp.js +148 -0
  24. package/chunks/Fieldset.DfWsQgjD.js +105 -0
  25. package/chunks/Icon.DhKyUWtM.js +231 -0
  26. package/chunks/Input.utils.Um8Pqp4U.js +52 -0
  27. package/chunks/InputPassword.CmvZcn6n.js +141 -0
  28. package/chunks/InputSearch.CwXaGLJp.js +179 -0
  29. package/chunks/InputStepper.NCl90c4h.js +275 -0
  30. package/chunks/NavigationTabList.BOrhiSiM.js +63 -0
  31. package/chunks/NavigationTabs.DW_6fZxc.js +63 -0
  32. package/chunks/Notification.Bp28ubaX.js +99 -0
  33. package/chunks/RadioGroup.Dh-7jSOg.js +105 -0
  34. package/chunks/Select.CMwsbHvQ.js +190 -0
  35. package/chunks/TabPane.utils.DG16Y2uD.js +10 -0
  36. package/chunks/Tabs.D3yDE5nU.js +77 -0
  37. package/chunks/Textarea.CMRn2Aof.js +184 -0
  38. package/chunks/Toast.Boi6TEHu.js +76 -0
  39. package/chunks/index.CEyLAtio.js +48 -0
  40. package/chunks/index.CgTHIF3K.js +293 -0
  41. package/chunks/{translate.isa3FHb8.js → translate.nuU7uChI.js} +1 -4
  42. package/chunks/useBreakpoint.CMOR9ZOB.js +44 -0
  43. package/combobox.BhzaJrs7.js +55 -0
  44. package/components/Accordion/Accordion.d.ts +5 -1
  45. package/components/Accordion/Accordion.utils.d.ts +2 -2
  46. package/components/AriaLiveRegions/AriaLiveRegions.d.ts +1 -0
  47. package/components/Asterisk/Asterisk.d.ts +1 -0
  48. package/components/Breadcrumb/Breadcrumb.d.ts +45 -0
  49. package/components/Breadcrumb/Breadcrumb.utils.d.ts +4 -0
  50. package/components/Button/Button.d.ts +6 -4
  51. package/components/ButtonRound/ButtonRound.d.ts +4 -1
  52. package/components/Checkbox/Checkbox.d.ts +2 -0
  53. package/components/CheckboxGroup/CheckboxGroup.d.ts +3 -1
  54. package/components/ChipGroup/ChipGroup.d.ts +2 -0
  55. package/components/Combobox/Combobox.d.ts +3 -0
  56. package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +3 -2
  57. package/components/Combobox/CustomReactSelect/OptionCheckbox.d.ts +1 -1
  58. package/components/Dialog/Dialog.d.ts +15 -4
  59. package/components/Drawer/Drawer.d.ts +15 -5
  60. package/components/Fieldset/Fieldset.d.ts +3 -1
  61. package/components/Flag/Flag.d.ts +3 -0
  62. package/components/FloatingActionButton/FloatingActionButton.d.ts +4 -1
  63. package/components/Heading/Heading.d.ts +3 -1
  64. package/components/Icon/Icon.d.ts +3 -1
  65. package/components/Input/Input.d.ts +23 -10
  66. package/components/Input/Input.utils.d.ts +2 -2
  67. package/components/InputPassword/InputPassword.d.ts +18 -9
  68. package/components/InputSearch/InputSearch.d.ts +17 -7
  69. package/components/InputStepper/InputStepper.d.ts +24 -8
  70. package/components/Link/Link.d.ts +6 -3
  71. package/components/LinkStandalone/LinkStandalone.d.ts +4 -1
  72. package/components/Logo/Logo.d.ts +3 -1
  73. package/components/NavigationTabs/NavigationTabs.d.ts +43 -0
  74. package/components/NavigationTabs/NavigationTabs.test.d.ts +1 -0
  75. package/components/NavigationTabs/NavigationTabs.utils.d.ts +6 -0
  76. package/components/Notification/Notification.d.ts +14 -5
  77. package/components/NumberIndicator/NumberIndicator.d.ts +1 -0
  78. package/components/RadioGroup/RadioGroup.d.ts +2 -0
  79. package/components/Select/Select.d.ts +2 -1
  80. package/components/SkipToContent/SkipToContent.d.ts +3 -0
  81. package/components/Spinner/Spinner.d.ts +7 -1
  82. package/components/Switch/Switch.d.ts +6 -4
  83. package/components/SystemFeedback/SystemFeedback.d.ts +1 -1
  84. package/components/Tabs/TabList/NavigationTabList/NavigationTabList.d.ts +22 -0
  85. package/components/Tabs/TabList/TabList.d.ts +38 -0
  86. package/components/Tabs/TabList/TabList.utils.d.ts +6 -0
  87. package/components/Tabs/TabList/TabList.utils.test.d.ts +1 -0
  88. package/components/Tabs/TabPane/TabPane.d.ts +1 -1
  89. package/components/Tabs/Tabs.d.ts +9 -2
  90. package/components/Tabs/Tabs.utils.d.ts +1 -6
  91. package/components/Text/Text.d.ts +6 -4
  92. package/components/Textarea/Textarea.d.ts +3 -1
  93. package/components/Title/Title.d.ts +3 -1
  94. package/components/Toast/Toast.d.ts +2 -0
  95. package/customreactselect.CW5-QQSM.js +14 -0
  96. package/dialog.DuAgAwfs.js +10 -0
  97. package/drawer.D3E46fH1.js +10 -0
  98. package/fieldset.4UygHVV3.js +12 -0
  99. package/flag.BJk5fHMs.js +50 -0
  100. package/floatingactionbutton.DFZ2YwaJ.js +74 -0
  101. package/heading.6LOBHJG6.js +55 -0
  102. package/icon.dww0DXWN.js +9 -0
  103. package/index.d.ts +4 -0
  104. package/index.es.js +139 -179
  105. package/input.DXzeHdRE.js +211 -0
  106. package/inputpassword.DXEvvgZt.js +13 -0
  107. package/inputsearch.DzwXj82k.js +14 -0
  108. package/inputstepper.CYwcFoQ1.js +16 -0
  109. package/link.CgNqBaNn.js +106 -0
  110. package/linkstandalone.Dn-uDj5T.js +69 -0
  111. package/logo.BgnYvK7t.js +51 -0
  112. package/navigationtablist.XNy54fXK.js +9 -0
  113. package/navigationtablist.d.ts +2 -0
  114. package/navigationtabs.DheMj9hs.js +9 -0
  115. package/navigationtabs.d.ts +2 -0
  116. package/notification.BnyOWmCm.js +10 -0
  117. package/numberindicator.Do92cr0z.js +35 -0
  118. package/optioncheckbox.DcckSTrV.js +52 -0
  119. package/package.json +53 -50
  120. package/partials/index.js +248 -2131
  121. package/partials/lib/partials.d.ts +77 -4
  122. package/radio.TDaeblOB.js +130 -0
  123. package/radiogroup.DyL_cJzK.js +11 -0
  124. package/select.BoeUz4Fb.js +13 -0
  125. package/skiptocontent.D7xhN0KM.js +35 -0
  126. package/spinner.gilnr6vN.js +52 -0
  127. package/switch.Ca9tRATr.js +68 -0
  128. package/systemfeedback.7I6fnqjX.js +34 -0
  129. package/tablist.TWjlHs5Y.js +251 -0
  130. package/tablist.d.ts +2 -0
  131. package/tabpane.CB-eudyw.js +37 -0
  132. package/tabs.Cr2CMXbY.js +11 -0
  133. package/text.C6gOJ2nV.js +59 -0
  134. package/textarea.CqDSxfcU.js +12 -0
  135. package/title.CSCXJnBN.js +43 -0
  136. package/toast.BN0v57nF.js +11 -0
  137. package/toastmanager.B9CR9plV.js +115 -0
  138. package/utils/render-documentation.d.ts +1 -0
  139. package/accordion.C6_sqiW2.js +0 -10
  140. package/arialiveregions.2dxodwBP.js +0 -27
  141. package/assets/Accordion.i4k5SMQM.css +0 -1
  142. package/assets/Tabs.DUqlqP6R.css +0 -1
  143. package/assets/linkstandalone.DIazcjIv.css +0 -1
  144. package/asterisk.DpzETKdT.js +0 -8
  145. package/button.BfcWQZhx.js +0 -135
  146. package/buttonround.E56F_805.js +0 -118
  147. package/checkbox.Dt0OWryN.js +0 -111
  148. package/checkboxgroup.je32bRPr.js +0 -8
  149. package/chip.CpnDX4Ro.js +0 -10
  150. package/chipgroup.Cy76KMWu.js +0 -175
  151. package/chunks/Accordion.Bza3TO4Y.js +0 -125
  152. package/chunks/AriaLiveRegions.utils.Bq6Mp2bE.js +0 -40
  153. package/chunks/CheckboxGroup.C_2ZwEQJ.js +0 -95
  154. package/chunks/Chip.BvlKC503.js +0 -148
  155. package/chunks/CustomReactSelect.CB41lklE.js +0 -3598
  156. package/chunks/Dialog.ClBjJWOh.js +0 -148
  157. package/chunks/Drawer.ReDW3ohH.js +0 -154
  158. package/chunks/Fieldset.Ct_JFRs9.js +0 -99
  159. package/chunks/Icon.BCmt_XBG.js +0 -223
  160. package/chunks/Input.utils.DYbmWlx6.js +0 -111
  161. package/chunks/InputPassword.Cvk5J8w1.js +0 -143
  162. package/chunks/InputSearch.BIIW-ERk.js +0 -192
  163. package/chunks/InputStepper.DGzR3KY6.js +0 -296
  164. package/chunks/Notification.uAEjPywP.js +0 -92
  165. package/chunks/RadioGroup.D10-pe9H.js +0 -146
  166. package/chunks/Select.DsLnW29U.js +0 -194
  167. package/chunks/TabPane.CYuUi0oL.js +0 -51
  168. package/chunks/Tabs.D_JAsvoh.js +0 -270
  169. package/chunks/Textarea.Dh9R9YdZ.js +0 -199
  170. package/chunks/Toast.j7LPnQ36.js +0 -89
  171. package/chunks/index.CvOaL64Y.js +0 -45
  172. package/chunks/jsx-runtime.C115EyI4.js +0 -635
  173. package/chunks/useBreakpoint.B8XxjSVJ.js +0 -48
  174. package/combobox.D6zXg976.js +0 -47
  175. package/customreactselect.BcjDvZG6.js +0 -13
  176. package/dialog.BkVOgeWY.js +0 -9
  177. package/drawer.DM_NKGTQ.js +0 -9
  178. package/fieldset.CSNoVbL1.js +0 -11
  179. package/flag.BKpsdB_-.js +0 -43
  180. package/floatingactionbutton.D5L0B7zI.js +0 -87
  181. package/heading.IPIYc5vW.js +0 -50
  182. package/icon.Ck0BpI34.js +0 -8
  183. package/input.BbnmbMCI.js +0 -241
  184. package/inputpassword.KnZRwWCQ.js +0 -12
  185. package/inputsearch.DgYJPZ2v.js +0 -13
  186. package/inputstepper.T_of1Gz0.js +0 -15
  187. package/link.L8O_InKe.js +0 -116
  188. package/linkstandalone.BBoEniZ_.js +0 -79
  189. package/logo.Hul8qCFo.js +0 -65
  190. package/notification.Bt9TbAAt.js +0 -9
  191. package/numberindicator.UU7FSouT.js +0 -26
  192. package/optioncheckbox.BRUTnQnJ.js +0 -43
  193. package/radio.B-2uuWHq.js +0 -114
  194. package/radiogroup.DM_lF4hI.js +0 -10
  195. package/select.COLuwr89.js +0 -12
  196. package/skiptocontent.DxogCFvU.js +0 -45
  197. package/spinner.Bq97Og-6.js +0 -58
  198. package/switch.DI8YYa5G.js +0 -65
  199. package/systemfeedback.C3Pfxxpp.js +0 -25
  200. package/tabpane.BnQBzVXw.js +0 -8
  201. package/tabs.BaELlVri.js +0 -15
  202. package/text.DThvTwm8.js +0 -57
  203. package/textarea.Wcl_pVBb.js +0 -13
  204. package/title.DqzdB2Gq.js +0 -36
  205. package/toast.DQlMWU6I.js +0 -10
  206. package/toastmanager.DxHFtr5C.js +0 -119
  207. /package/assets/{CheckboxGroup.BH1Br1dg.css → CheckboxGroup.Dd-Huo7x.css} +0 -0
  208. /package/assets/{Chip.DSdLuzoi.css → Chip.dxIYIjj7.css} +0 -0
  209. /package/assets/{CustomReactSelect.vHt8qNKC.css → CustomReactSelect.DYDaP5r5.css} +0 -0
  210. /package/assets/{Dialog.BgzebVk4.css → Dialog.DXmPdExC.css} +0 -0
  211. /package/assets/{Drawer.Bauwxrk7.css → Drawer.BcM0epJS.css} +0 -0
  212. /package/assets/{Fieldset.DOdTbb7C.css → Fieldset.Og4EsnPI.css} +0 -0
  213. /package/assets/{Icon.DxRSBRSL.css → Icon.ZNrKuqgu.css} +0 -0
  214. /package/assets/{InputPassword.CG7Ugu73.css → InputPassword.DtKteerr.css} +0 -0
  215. /package/assets/{InputSearch.CseChMc-.css → InputSearch.Mql3oFlQ.css} +0 -0
  216. /package/assets/{InputStepper.C0eAYr7P.css → InputStepper.BXz1MMBg.css} +0 -0
  217. /package/assets/{Notification.DbRapUJo.css → Notification.DZIF-Wo6.css} +0 -0
  218. /package/assets/{RadioGroup.BfMo157q.css → RadioGroup.CM2mYOzc.css} +0 -0
  219. /package/assets/{Select.D4EXgIbz.css → Select.KvAgxJZk.css} +0 -0
  220. /package/assets/{Textarea.KJGPTYMz.css → Textarea.BIRQlv6m.css} +0 -0
  221. /package/assets/{Toast.CuafTAf7.css → Toast.CuM-yS7S.css} +0 -0
  222. /package/assets/{arialiveregions.DhsijBaL.css → arialiveregions.e0Q16ZWi.css} +0 -0
  223. /package/assets/{asterisk.BfVAUBO7.css → asterisk.B41DaZDe.css} +0 -0
  224. /package/assets/{button.DF4RBeC2.css → button.CpPeQPsM.css} +0 -0
  225. /package/assets/{buttonround.19uK_-oO.css → buttonround.BFauSRAb.css} +0 -0
  226. /package/assets/{checkbox.ByOoFouu.css → checkbox.BKHQN_tu.css} +0 -0
  227. /package/assets/{chipgroup.BzfZLbkv.css → chipgroup.CUIkyYBW.css} +0 -0
  228. /package/assets/{flag.B-RLcMcf.css → flag.C7i3MAAP.css} +0 -0
  229. /package/assets/{floatingactionbutton.E9HekT6S.css → floatingactionbutton.l0nvFiJU.css} +0 -0
  230. /package/assets/{heading.u4f8Mz94.css → heading.B-rdLVZD.css} +0 -0
  231. /package/assets/{input.BAkFKPW3.css → input.B5spSeMe.css} +0 -0
  232. /package/assets/{link.DDJj0D1U.css → link.Be5OF_8E.css} +0 -0
  233. /package/assets/{logo.CnW8alZU.css → logo.bVXt9m9R.css} +0 -0
  234. /package/assets/{numberindicator.BJ9vFpnd.css → numberindicator.BJnvB-K3.css} +0 -0
  235. /package/assets/{optioncheckbox.BZaWtRD7.css → optioncheckbox.DAffEKvY.css} +0 -0
  236. /package/assets/{radio.X-RTl_jo.css → radio.CGf7v0D_.css} +0 -0
  237. /package/assets/{skiptocontent.PTL3256m.css → skiptocontent.CTSDC_kG.css} +0 -0
  238. /package/assets/{spinner.2iWJWKyA.css → spinner.BJ5xwnYH.css} +0 -0
  239. /package/assets/{switch.gw6aa3kx.css → switch.Bc9KIyw9.css} +0 -0
  240. /package/assets/{systemfeedback.BPz5YlPC.css → systemfeedback.DoqgHZPH.css} +0 -0
  241. /package/assets/{TabPane.zywjfwo8.css → tabpane.D1LTb432.css} +0 -0
  242. /package/assets/{text.DjTG_qNb.css → text.BlRcxO8n.css} +0 -0
  243. /package/assets/{title.rosWPEG3.css → title.B0tsgJ-n.css} +0 -0
  244. /package/components/{Tabs/Tabs.utils.test.d.ts → Breadcrumb/Breadcrumb.test.d.ts} +0 -0
@@ -1,296 +0,0 @@
1
- "use client";
2
- import { j as n } from "./jsx-runtime.C115EyI4.js";
3
- import { c as u } from "./index.CvOaL64Y.js";
4
- import { useState as _, useRef as N, useEffect as w } from "react";
5
- import { h as _t } from "./has-window.ut_-aShB.js";
6
- import { u as ft } from "./useBreakpoint.B8XxjSVJ.js";
7
- import { u as M } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
8
- import { Asterisk as bt } from "../asterisk.DpzETKdT.js";
9
- import { DSButton as X } from "../button.BfcWQZhx.js";
10
- import { M as E, a as H } from "./Input.utils.DYbmWlx6.js";
11
- import { DSSystemFeedback as gt } from "../systemfeedback.C3Pfxxpp.js";
12
- import { g as S } from "./helpers.CcqWV-wZ.js";
13
- import '../assets/InputStepper.C0eAYr7P.css';const ht = "ds-input-stepper_input_1pm8g_1", xt = "ds-input-stepper_input--invalid_1pm8g_113", St = "ds-input-stepper_input--small_1pm8g_120", yt = "ds-input-stepper_input--has-leading-icon_1pm8g_173", It = "ds-input-stepper_input--has-action-button_1pm8g_176", vt = "ds-input-stepper_input--has-second-action-button_1pm8g_179", At = "ds-input-stepper_input--has-affix_1pm8g_191", Dt = "ds-input-stepper_input--is-ready_1pm8g_205", Bt = "ds-input-stepper_root_1pm8g_215", Nt = "ds-input-stepper_hint_1pm8g_223", wt = "ds-input-stepper_label_1pm8g_223", Et = "ds-input-stepper_wrapper_1pm8g_227", Ht = "ds-input-stepper_affix_1pm8g_233", Lt = "ds-input-stepper_affix--small_1pm8g_254", jt = "ds-input-stepper_affix--disabled_1pm8g_267", Rt = "ds-input-stepper_prefix_1pm8g_275", kt = "ds-input-stepper_affix--readonly_1pm8g_278", Ct = "ds-input-stepper_suffix_1pm8g_288", $t = "ds-input-stepper_action-button_1pm8g_295", Ft = "ds-input-stepper_label--hidden_1pm8g_313", Vt = "ds-input-stepper_label--disabled_1pm8g_326", Pt = "ds-input-stepper_feedback_1pm8g_346", Tt = "ds-input-stepper_second-action-button_1pm8g_360", Wt = "ds-input-stepper_value-announcer_1pm8g_364", e = {
14
- input: ht,
15
- "input--invalid": "ds-input-stepper_input--invalid_1pm8g_113",
16
- inputInvalid: xt,
17
- "input--small": "ds-input-stepper_input--small_1pm8g_120",
18
- inputSmall: St,
19
- "input--has-leading-icon": "ds-input-stepper_input--has-leading-icon_1pm8g_173",
20
- inputHasLeadingIcon: yt,
21
- "input--has-action-button": "ds-input-stepper_input--has-action-button_1pm8g_176",
22
- inputHasActionButton: It,
23
- "input--has-second-action-button": "ds-input-stepper_input--has-second-action-button_1pm8g_179",
24
- inputHasSecondActionButton: vt,
25
- "input--has-affix": "ds-input-stepper_input--has-affix_1pm8g_191",
26
- inputHasAffix: At,
27
- "input--is-ready": "ds-input-stepper_input--is-ready_1pm8g_205",
28
- inputIsReady: Dt,
29
- root: Bt,
30
- hint: Nt,
31
- label: wt,
32
- wrapper: Et,
33
- affix: Ht,
34
- "affix--small": "ds-input-stepper_affix--small_1pm8g_254",
35
- affixSmall: Lt,
36
- "affix--disabled": "ds-input-stepper_affix--disabled_1pm8g_267",
37
- affixDisabled: jt,
38
- prefix: Rt,
39
- "affix--readonly": "ds-input-stepper_affix--readonly_1pm8g_278",
40
- affixReadonly: kt,
41
- suffix: Ct,
42
- "action-button": "ds-input-stepper_action-button_1pm8g_295",
43
- actionButton: $t,
44
- "label--hidden": "ds-input-stepper_label--hidden_1pm8g_313",
45
- labelHidden: Ft,
46
- "label--disabled": "ds-input-stepper_label--disabled_1pm8g_326",
47
- labelDisabled: Vt,
48
- feedback: Pt,
49
- "second-action-button": "ds-input-stepper_second-action-button_1pm8g_360",
50
- secondActionButton: Tt,
51
- "value-announcer": "ds-input-stepper_value-announcer_1pm8g_364",
52
- valueAnnouncer: Wt
53
- }, Mt = ({
54
- id: s,
55
- label: f,
56
- prefix: b,
57
- suffix: g
58
- }) => {
59
- if (!s)
60
- throw new Error(
61
- S(
62
- "DSInputStepper",
63
- 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputStepper component.'
64
- )
65
- );
66
- if (!f)
67
- throw new Error(
68
- S(
69
- "DSInputStepper",
70
- `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}.`
71
- )
72
- );
73
- b && b.length > E && console.warn(
74
- S(
75
- "DSInputStepper",
76
- `Prefix length must not exceed ${E} characters.`
77
- )
78
- ), g && g.length > H && console.warn(
79
- S(
80
- "DSInputStepper",
81
- `Suffix length must not exceed ${H} characters.`
82
- )
83
- );
84
- }, te = ({
85
- id: s,
86
- label: f,
87
- announcementText: b = "Value changed to",
88
- className: g,
89
- disabled: l = !1,
90
- decreaseAmountButtonLabel: q = "Decrease",
91
- hint: y,
92
- hideLabel: G = !1,
93
- invalid: h = !1,
94
- increaseAmountButtonLabel: O = "Increase",
95
- prefix: r,
96
- max: L = 100,
97
- min: j = 0,
98
- readonly: d = !1,
99
- required: R = !1,
100
- size: p = "medium",
101
- step: U = 1,
102
- suffix: c,
103
- systemFeedback: I,
104
- value: x,
105
- onChange: k,
106
- ...J
107
- }) => {
108
- process.env.NODE_ENV !== "production" && Mt({
109
- id: s,
110
- label: f,
111
- prefix: r,
112
- suffix: c
113
- });
114
- const [K, Q] = _(!1), [m, v] = _(x), [A, C] = _(""), [Y, Z] = _(!1), [z, tt] = _({}), a = N(null), et = r == null ? void 0 : r.substring(0, E), D = N(null), nt = c == null ? void 0 : c.substring(0, H), B = N(null), st = ft(G);
115
- w(() => {
116
- x && v(x);
117
- }, [x]), w(() => {
118
- if (A) {
119
- const t = setTimeout(() => {
120
- C("");
121
- }, 3e3);
122
- return () => clearTimeout(t);
123
- }
124
- }, [A]), w(() => {
125
- var i;
126
- const t = (o) => {
127
- o.preventDefault();
128
- };
129
- return (i = a.current) == null || i.addEventListener("wheel", t, {
130
- // The { passive: false } option is used to indicate that the event listener wants to cancel the event, allowing preventDefault to work as expected.
131
- passive: !1
132
- }), () => {
133
- var o;
134
- (o = a.current) == null || o.removeEventListener("wheel", t);
135
- };
136
- }, []), M(() => {
137
- const t = p === "medium" ? 16 : 8, i = {};
138
- if (D.current) {
139
- const o = D.current.offsetWidth;
140
- i.paddingInlineStart = t + o + "px";
141
- }
142
- if (B.current) {
143
- const o = B.current.offsetWidth;
144
- i.paddingInlineEnd = t + o + "px";
145
- }
146
- tt(i), Q(!0);
147
- }, [r, c, p, Y]), M(() => {
148
- _t && (async () => {
149
- "fonts" in document && (await document.fonts.load(
150
- '1em "STIHL Contraface Digital Text Regular"'
151
- ), Z(!0));
152
- })();
153
- }, []);
154
- const $ = u(e.affix, {
155
- [e.affixSmall]: p === "small",
156
- [e.affixDisabled]: l,
157
- [e.affixReadonly]: d
158
- }), F = `${s}-label`, V = `${s}-feedback`, P = `${s}-hint`, T = `${s}-value-announcer`, at = y ? ` ${P}` : "", pt = u(e.root, g), it = u(e.input, {
159
- // small input
160
- [e.inputSmall]: p === "small",
161
- // invalid state
162
- [e.inputInvalid]: h,
163
- // prefix/suffix
164
- [e.inputHasAffix]: r || c,
165
- [e.inputIsReady]: K
166
- }), ot = u(e.label, {
167
- // hide label only visually to keep them available for assistive technologies
168
- [e.labelHidden]: st,
169
- [e.labelDisabled]: l
170
- }), ut = u(e.secondActionButton, {
171
- [e.secondActionButtonSmall]: p === "small"
172
- }), lt = u(e.actionButton, {
173
- [e.actionButtonSmall]: p === "small"
174
- }), rt = () => {
175
- const t = [T];
176
- return h && I && t.push(V), t.join(" ");
177
- }, W = () => {
178
- var t;
179
- if (a.current) {
180
- v(a.current.value);
181
- const i = new Event("change", { bubbles: !0 });
182
- (t = a.current) == null || t.dispatchEvent(i), C(`${b} ${a.current.value}`);
183
- }
184
- }, ct = () => {
185
- var t;
186
- (t = a.current) == null || t.stepDown(), W();
187
- }, dt = () => {
188
- var t;
189
- (t = a.current) == null || t.stepUp(), W();
190
- }, mt = (t) => {
191
- v(t.target.value), k && k(t);
192
- };
193
- return /* @__PURE__ */ n.jsxs("div", { className: pt, children: [
194
- /* @__PURE__ */ n.jsxs("label", { className: ot, id: F, htmlFor: s, children: [
195
- f,
196
- R && /* @__PURE__ */ n.jsx(bt, {})
197
- ] }),
198
- y && /* @__PURE__ */ n.jsx("div", { className: e.hint, id: P, children: y }),
199
- /* @__PURE__ */ n.jsx(
200
- "div",
201
- {
202
- "aria-live": "polite",
203
- "aria-atomic": "true",
204
- className: e.valueAnnouncer,
205
- id: T,
206
- children: A
207
- }
208
- ),
209
- h && I && /* @__PURE__ */ n.jsx(
210
- gt,
211
- {
212
- className: e.feedback,
213
- message: I,
214
- type: "invalid",
215
- id: V
216
- }
217
- ),
218
- /* @__PURE__ */ n.jsxs("div", { className: e.wrapper, children: [
219
- r && /* @__PURE__ */ n.jsx(
220
- "span",
221
- {
222
- className: u($, e.prefix),
223
- ref: D,
224
- "aria-disabled": l,
225
- children: et
226
- }
227
- ),
228
- /* @__PURE__ */ n.jsx(
229
- "input",
230
- {
231
- className: it,
232
- id: s,
233
- ref: a,
234
- ...J,
235
- style: z,
236
- "aria-labelledby": `${F}${at}`,
237
- "aria-describedby": rt(),
238
- "aria-invalid": h,
239
- "aria-disabled": d,
240
- disabled: l,
241
- min: j,
242
- max: L,
243
- readOnly: d,
244
- required: R,
245
- step: U,
246
- type: "number",
247
- value: m,
248
- onChange: mt
249
- }
250
- ),
251
- c && /* @__PURE__ */ n.jsx(
252
- "span",
253
- {
254
- className: u($, e.suffix),
255
- ref: B,
256
- "aria-disabled": l,
257
- children: nt
258
- }
259
- ),
260
- /* @__PURE__ */ n.jsx(
261
- X,
262
- {
263
- hideLabel: !0,
264
- theme: "light",
265
- iconName: "minus",
266
- variant: "filled",
267
- className: ut,
268
- size: p,
269
- onClick: ct,
270
- disabled: l || d || !!m && Number(m) <= j,
271
- type: "button",
272
- children: q
273
- }
274
- ),
275
- /* @__PURE__ */ n.jsx(
276
- X,
277
- {
278
- hideLabel: !0,
279
- theme: "light",
280
- iconName: "plus",
281
- variant: "filled",
282
- className: lt,
283
- size: p,
284
- onClick: dt,
285
- disabled: l || d || !!m && Number(m) >= L,
286
- type: "button",
287
- children: O
288
- }
289
- )
290
- ] })
291
- ] });
292
- };
293
- export {
294
- te as D,
295
- Mt as v
296
- };
@@ -1,92 +0,0 @@
1
- "use client";
2
- import { j as n } from "./jsx-runtime.C115EyI4.js";
3
- import { c as s } from "./index.CvOaL64Y.js";
4
- import { DSButton as f } from "../button.BfcWQZhx.js";
5
- import { D as u } from "./Icon.BCmt_XBG.js";
6
- import '../assets/Notification.DbRapUJo.css';const j = "ds-notification_root_1cajm_1", g = "ds-notification_root--success_1cajm_26", N = "ds-notification_root--error_1cajm_30", h = "ds-notification_root--warning_1cajm_34", I = "ds-notification_root--hide-icon_1cajm_38", x = "ds-notification_content_1cajm_52", A = "ds-notification_content--hide-close-button_1cajm_59", H = "ds-notification_content--hide-icon_1cajm_62", C = "ds-notification_icon_1cajm_66", S = "ds-notification_message_1cajm_70", p = "ds-notification_custom-action-area_1cajm_167", o = {
7
- root: j,
8
- "root--success": "ds-notification_root--success_1cajm_26",
9
- rootSuccess: g,
10
- "root--error": "ds-notification_root--error_1cajm_30",
11
- rootError: N,
12
- "root--warning": "ds-notification_root--warning_1cajm_34",
13
- rootWarning: h,
14
- "root--hide-icon": "ds-notification_root--hide-icon_1cajm_38",
15
- rootHideIcon: I,
16
- content: x,
17
- "content--hide-close-button": "ds-notification_content--hide-close-button_1cajm_59",
18
- contentHideCloseButton: A,
19
- "content--hide-icon": "ds-notification_content--hide-icon_1cajm_62",
20
- contentHideIcon: H,
21
- icon: C,
22
- message: S,
23
- "custom-action-area": "ds-notification_custom-action-area_1cajm_167",
24
- customActionArea: p
25
- }, k = [
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: r,
42
- variant: t = "info",
43
- className: a,
44
- closeButtonLabel: _ = "Close notification",
45
- customActionArea: e,
46
- hideIcon: c = !1,
47
- onClose: i,
48
- ...d
49
- }) => {
50
- const m = s(o.root, a, {
51
- [o.rootSuccess]: t === "success",
52
- [o.rootError]: t === "error",
53
- [o.rootWarning]: t === "warning",
54
- [o.rootInfo]: t === "info",
55
- [o.rootHideIcon]: c
56
- }), l = s(o.content, {
57
- [o.contentHideCloseButton]: !i,
58
- [o.contentHideIcon]: c
59
- });
60
- return /* @__PURE__ */ n.jsxs("div", { className: m, ...d, role: O[t], children: [
61
- /* @__PURE__ */ n.jsxs("div", { className: l, children: [
62
- !c && /* @__PURE__ */ n.jsx(
63
- u,
64
- {
65
- name: w[t],
66
- className: o.icon,
67
- "aria-hidden": "true"
68
- }
69
- ),
70
- /* @__PURE__ */ n.jsx("div", { className: o.message, children: r }),
71
- i && /* @__PURE__ */ n.jsx(
72
- f,
73
- {
74
- hideLabel: !0,
75
- iconName: "cross",
76
- isFlush: !0,
77
- variant: "ghost",
78
- size: "small",
79
- onClick: i,
80
- type: "button",
81
- children: _
82
- }
83
- )
84
- ] }),
85
- e && /* @__PURE__ */ n.jsx("div", { className: s({ [o.customActionArea]: !c }), children: e })
86
- ] });
87
- };
88
- export {
89
- B as D,
90
- k as N,
91
- w as a
92
- };
@@ -1,146 +0,0 @@
1
- "use client";
2
- import { j as f } from "./jsx-runtime.C115EyI4.js";
3
- import { c as y } from "./index.CvOaL64Y.js";
4
- import { forwardRef as C, useState as q } from "react";
5
- import { D as I } from "./Fieldset.Ct_JFRs9.js";
6
- import { DSRadio as A } from "../radio.B-2uuWHq.js";
7
- import { g as a, r as h } from "./helpers.CcqWV-wZ.js";
8
- import '../assets/RadioGroup.BfMo157q.css';const B = "ds-radio-group_root_12fot_1", M = "ds-radio-group_root--horizontal_12fot_9", O = "ds-radio-group_root--invalid_12fot_12", m = {
9
- root: B,
10
- "root--horizontal": "ds-radio-group_root--horizontal_12fot_9",
11
- rootHorizontal: M,
12
- "root--invalid": "ds-radio-group_root--invalid_12fot_12",
13
- rootInvalid: O
14
- }, v = (t) => t.some(({ hint: e }) => !!e), G = (t) => t.some(({ customArea: e }) => !!e), V = ({
15
- legend: t,
16
- name: e,
17
- options: r,
18
- description: l,
19
- direction: i,
20
- id: s,
21
- systemFeedback: n
22
- }) => {
23
- if (!s && (l || n))
24
- throw new Error(
25
- a(
26
- "DSRadioGroup",
27
- 'A unique "id" prop is required when providing the description or systemFeedback property. Please add a unique "id" prop to the DSRadioGroup component.'
28
- )
29
- );
30
- if (!t)
31
- throw new Error(
32
- a(
33
- "DSRadioGroup",
34
- h("legend", "DSRadioGroup")
35
- )
36
- );
37
- if (!e)
38
- throw new Error(
39
- a(
40
- "DSRadioGroup",
41
- h("name", "DSRadioGroup")
42
- )
43
- );
44
- if (!r)
45
- throw new Error(
46
- a(
47
- "DSRadioGroup",
48
- h("options", "DSRadioGroup")
49
- )
50
- );
51
- if (i === "horizontal" && v(r))
52
- throw new Error(
53
- a(
54
- "DSRadioGroup",
55
- "Horizontal direction is not possible when options contain a hint. Please remove hints or change direction property to 'vertical'."
56
- )
57
- );
58
- if (i === "horizontal" && G(r))
59
- throw new Error(
60
- a(
61
- "DSRadioGroup",
62
- "Horizontal direction is not possible when options contain a custom area. Please remove custom areas or change direction property to 'vertical'."
63
- )
64
- );
65
- }, b = C(
66
- ({
67
- legend: t,
68
- name: e,
69
- options: r,
70
- className: l,
71
- defaultValue: i,
72
- description: s,
73
- direction: n = "vertical",
74
- disabled: d = !1,
75
- hideUncheckedHints: D = !1,
76
- id: p,
77
- invalid: u = !1,
78
- required: S = !1,
79
- systemFeedback: c,
80
- value: w,
81
- onChange: R,
82
- ...z
83
- }, E) => {
84
- process.env.NODE_ENV !== "production" && V({
85
- legend: t,
86
- name: e,
87
- options: r,
88
- description: s,
89
- direction: n,
90
- id: p,
91
- systemFeedback: c
92
- });
93
- const [H, x] = q(i), _ = w !== void 0, g = _ ? w : H, j = y(m.root, {
94
- // In case of longer copy, use vertical direction
95
- [m.rootHorizontal]: n === "horizontal" && !v(r) && !G(r),
96
- [m.rootInvalid]: u && !!c
97
- }), N = (o) => {
98
- if (d) {
99
- o.preventDefault();
100
- return;
101
- }
102
- _ || x(
103
- o.target.value
104
- ), R && R(o);
105
- }, P = v(r) && !D;
106
- return /* @__PURE__ */ f.jsx(
107
- I,
108
- {
109
- id: p,
110
- legend: t,
111
- className: l,
112
- description: s,
113
- disabled: d,
114
- required: S,
115
- invalid: u,
116
- systemFeedback: c,
117
- ...z,
118
- role: "radiogroup",
119
- onChange: N,
120
- children: /* @__PURE__ */ f.jsx("div", { className: j, children: r.map((o) => /* @__PURE__ */ f.jsx(
121
- A,
122
- {
123
- name: e,
124
- checked: o.value === g,
125
- disabled: d,
126
- hideUncheckedHint: D,
127
- hint: o.hint,
128
- invalid: u,
129
- isBold: P,
130
- required: S,
131
- ref: o.value === g ? E : null,
132
- ...o
133
- },
134
- p + o.label + o.value + o.hint
135
- )) })
136
- }
137
- );
138
- }
139
- );
140
- b.displayName = "DSRadioGroup";
141
- export {
142
- b as D,
143
- G as a,
144
- v as o,
145
- V as v
146
- };