@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
@@ -0,0 +1,135 @@
1
+ "use client";
2
+ import { j as _ } from "./chunks/jsx-runtime.C115EyI4.js";
3
+ import { c as a } from "./chunks/index.CvOaL64Y.js";
4
+ import { u as e } from "./chunks/useBreakpoint.5xBNDiCf.js";
5
+ import { D as I } from "./chunks/Icon.C2o2seDb.js";
6
+ import { DSSpinner as F } from "./spinner.D-xrotcu.js";
7
+ import './assets/button.C9_ejpGG.css';const S = "_root_1b5zu_151", x = "_root--highlight_1b5zu_228", j = "_root--dark-highlight_1b5zu_228", L = "_root--filled_1b5zu_306", C = "_root--outline_1b5zu_334", N = "_root--ghost_1b5zu_361", B = "_root--ghost-flush_1b5zu_386", E = "_root--small_1b5zu_392", R = "_root--dark-filled_1b5zu_474", T = "_root--dark-outline_1b5zu_533", V = "_root--dark-ghost_1b5zu_591", q = "_root--dark-ghost-flush_1b5zu_647", w = "_root--icon-left_1b5zu_711", A = "_root--icon-only_1b5zu_727", J = "_root--icon-only-small_1b5zu_736", K = "_loader_1b5zu_751", M = "_icon--hidden_1b5zu_763", P = "_label--hidden_1b5zu_767", Q = "_label--loading_1b5zu_779", o = {
8
+ root: S,
9
+ "root--highlight": "_root--highlight_1b5zu_228",
10
+ rootHighlight: x,
11
+ "root--dark-highlight": "_root--dark-highlight_1b5zu_228",
12
+ rootDarkHighlight: j,
13
+ "root--filled": "_root--filled_1b5zu_306",
14
+ rootFilled: L,
15
+ "root--outline": "_root--outline_1b5zu_334",
16
+ rootOutline: C,
17
+ "root--ghost": "_root--ghost_1b5zu_361",
18
+ rootGhost: N,
19
+ "root--ghost-flush": "_root--ghost-flush_1b5zu_386",
20
+ rootGhostFlush: B,
21
+ "root--small": "_root--small_1b5zu_392",
22
+ rootSmall: E,
23
+ "root--dark-filled": "_root--dark-filled_1b5zu_474",
24
+ rootDarkFilled: R,
25
+ "root--dark-outline": "_root--dark-outline_1b5zu_533",
26
+ rootDarkOutline: T,
27
+ "root--dark-ghost": "_root--dark-ghost_1b5zu_591",
28
+ rootDarkGhost: V,
29
+ "root--dark-ghost-flush": "_root--dark-ghost-flush_1b5zu_647",
30
+ rootDarkGhostFlush: q,
31
+ "root--icon-left": "_root--icon-left_1b5zu_711",
32
+ rootIconLeft: w,
33
+ "root--icon-only": "_root--icon-only_1b5zu_727",
34
+ rootIconOnly: A,
35
+ "root--icon-only-small": "_root--icon-only-small_1b5zu_736",
36
+ rootIconOnlySmall: J,
37
+ loader: K,
38
+ "icon--hidden": "_icon--hidden_1b5zu_763",
39
+ iconHidden: M,
40
+ "label--hidden": "_label--hidden_1b5zu_767",
41
+ labelHidden: P,
42
+ "label--loading": "_label--loading_1b5zu_779",
43
+ labelLoading: Q
44
+ }, $ = ({
45
+ children: g,
46
+ aria: k,
47
+ className: f,
48
+ dataTrackingid: z,
49
+ disabled: h = !1,
50
+ hideLabel: i = !1,
51
+ iconName: u,
52
+ iconPosition: m = "left",
53
+ iconSource: d,
54
+ isFlush: s = !1,
55
+ loading: r = !1,
56
+ size: n = "medium",
57
+ theme: l = "light",
58
+ variant: t = "filled",
59
+ onClick: c,
60
+ ...D
61
+ }) => {
62
+ const y = a(o.root, f, {
63
+ // variant
64
+ [o.rootFilled]: t === "filled",
65
+ [o.rootHighlight]: t === "highlight",
66
+ [o.rootOutline]: t === "outline",
67
+ [o.rootGhost]: t === "ghost" && s !== !0,
68
+ // isFlush
69
+ [o.rootGhostFlush]: t === "ghost" && s === !0,
70
+ // dark theme
71
+ [o.rootDarkFilled]: l === "dark" && t === "filled",
72
+ [o.rootDarkHighlight]: l === "dark" && t === "highlight",
73
+ [o.rootDarkOutline]: l === "dark" && t === "outline",
74
+ [o.rootDarkGhost]: l === "dark" && t === "ghost" && s !== !0,
75
+ // dark isFlush
76
+ [o.rootDarkGhostFlush]: l === "dark" && t === "ghost" && s === !0,
77
+ // size
78
+ [o.rootSmall]: n === "small",
79
+ // icon position
80
+ [o.rootIconLeft]: m === "left",
81
+ // icon only
82
+ [o.rootIconOnly]: e(i) && n === "medium",
83
+ [o.rootIconOnlySmall]: e(i) && n === "small"
84
+ }), O = a(o.label, {
85
+ // hide label only visually to keep them available for assistive technologies
86
+ [o.labelHidden]: e(i),
87
+ // set label opacity to 0 when loading to prevent button size from changing
88
+ [o.labelLoading]: r
89
+ }), p = a(o.icon, {
90
+ // set icon opacity to 0 when loading to prevent button size from changing
91
+ [o.iconHidden]: r
92
+ }), G = l === "light" && t === "filled" || l === "dark" && t === "outline" || l === "dark" && t === "ghost" ? "dark" : "light", H = (b) => {
93
+ if (h || r) {
94
+ b.preventDefault();
95
+ return;
96
+ }
97
+ c && c(b);
98
+ };
99
+ return /* @__PURE__ */ _.jsxs(
100
+ "button",
101
+ {
102
+ className: y,
103
+ "data-trackingid": z,
104
+ type: "submit",
105
+ onClick: H,
106
+ ...k,
107
+ ...D,
108
+ "aria-disabled": h || r,
109
+ "aria-busy": r,
110
+ children: [
111
+ r && /* @__PURE__ */ _.jsx(
112
+ F,
113
+ {
114
+ className: o.loader,
115
+ aria: { "aria-label": "Loading state" }
116
+ }
117
+ ),
118
+ /* @__PURE__ */ _.jsx("span", { className: O, children: g }),
119
+ (u || d) && /* @__PURE__ */ _.jsx(
120
+ I,
121
+ {
122
+ name: u,
123
+ theme: G,
124
+ source: d,
125
+ className: p,
126
+ "aria-hidden": "true"
127
+ }
128
+ )
129
+ ]
130
+ }
131
+ );
132
+ };
133
+ export {
134
+ $ as DSButton
135
+ };
package/button.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './components/Button/Button'
2
+ export {}
@@ -0,0 +1,118 @@
1
+ "use client";
2
+ import { j as i } from "./chunks/jsx-runtime.C115EyI4.js";
3
+ import { c as _ } from "./chunks/index.CvOaL64Y.js";
4
+ import { D as H } from "./chunks/Icon.C2o2seDb.js";
5
+ import { DSSpinner as p } from "./spinner.D-xrotcu.js";
6
+ import './assets/buttonround.DTCqRP-0.css';const F = "_root_15iy5_151", O = "_root--highlight_15iy5_228", G = "_root--dark-highlight_15iy5_228", I = "_root--filled_15iy5_306", S = "_root--outline_15iy5_334", x = "_root--ghost_15iy5_361", j = "_root--ghost-flush_15iy5_386", L = "_root--small_15iy5_392", C = "_root--dark-filled_15iy5_474", N = "_root--dark-outline_15iy5_533", R = "_root--dark-ghost_15iy5_591", B = "_root--dark-ghost-flush_15iy5_647", E = "_root--icon-left_15iy5_711", T = "_root--icon-only_15iy5_727", q = "_root--icon-only-small_15iy5_736", w = "_loader_15iy5_753", z = "_icon--hidden_15iy5_765", A = "_label--hidden_15iy5_769", J = "_label--loading_15iy5_781", o = {
7
+ root: F,
8
+ "root--highlight": "_root--highlight_15iy5_228",
9
+ rootHighlight: O,
10
+ "root--dark-highlight": "_root--dark-highlight_15iy5_228",
11
+ rootDarkHighlight: G,
12
+ "root--filled": "_root--filled_15iy5_306",
13
+ rootFilled: I,
14
+ "root--outline": "_root--outline_15iy5_334",
15
+ rootOutline: S,
16
+ "root--ghost": "_root--ghost_15iy5_361",
17
+ rootGhost: x,
18
+ "root--ghost-flush": "_root--ghost-flush_15iy5_386",
19
+ rootGhostFlush: j,
20
+ "root--small": "_root--small_15iy5_392",
21
+ rootSmall: L,
22
+ "root--dark-filled": "_root--dark-filled_15iy5_474",
23
+ rootDarkFilled: C,
24
+ "root--dark-outline": "_root--dark-outline_15iy5_533",
25
+ rootDarkOutline: N,
26
+ "root--dark-ghost": "_root--dark-ghost_15iy5_591",
27
+ rootDarkGhost: R,
28
+ "root--dark-ghost-flush": "_root--dark-ghost-flush_15iy5_647",
29
+ rootDarkGhostFlush: B,
30
+ "root--icon-left": "_root--icon-left_15iy5_711",
31
+ rootIconLeft: E,
32
+ "root--icon-only": "_root--icon-only_15iy5_727",
33
+ rootIconOnly: T,
34
+ "root--icon-only-small": "_root--icon-only-small_15iy5_736",
35
+ rootIconOnlySmall: q,
36
+ loader: w,
37
+ "icon--hidden": "_icon--hidden_15iy5_765",
38
+ iconHidden: z,
39
+ "label--hidden": "_label--hidden_15iy5_769",
40
+ labelHidden: A,
41
+ "label--loading": "_label--loading_15iy5_781",
42
+ labelLoading: J
43
+ }, U = ({
44
+ children: d,
45
+ aria: c,
46
+ className: y,
47
+ dataTrackingid: g,
48
+ disabled: n = !1,
49
+ iconName: s = "placeholder",
50
+ iconSource: a,
51
+ loading: t = !1,
52
+ theme: r = "light",
53
+ variant: l = "filled",
54
+ onClick: e,
55
+ ...k
56
+ }) => {
57
+ const u = _(
58
+ o.root,
59
+ o.rootIconOnlySmall,
60
+ y,
61
+ {
62
+ // variant
63
+ [o.rootFilled]: l === "filled",
64
+ [o.rootHighlight]: l === "highlight",
65
+ // dark theme
66
+ [o.rootDarkFilled]: r === "dark" && l === "filled",
67
+ [o.rootDarkHighlight]: r === "dark" && l === "highlight"
68
+ }
69
+ ), f = _(o.label, o.labelHidden, {
70
+ // set label opacity to 0 when loading to prevent button size from changing
71
+ [o.labelLoading]: t
72
+ }), m = _(o.icon, {
73
+ // set icon opacity to 0 when loading to prevent button size from changing
74
+ [o.iconHidden]: t
75
+ }), b = r === "light" && l === "filled" ? "dark" : "light", D = (h) => {
76
+ if (n || t) {
77
+ h.preventDefault();
78
+ return;
79
+ }
80
+ e && e(h);
81
+ };
82
+ return /* @__PURE__ */ i.jsxs(
83
+ "button",
84
+ {
85
+ className: u,
86
+ "data-trackingid": g,
87
+ type: "button",
88
+ onClick: D,
89
+ ...c,
90
+ ...k,
91
+ "aria-disabled": n || t,
92
+ "aria-busy": t,
93
+ children: [
94
+ t && /* @__PURE__ */ i.jsx(
95
+ p,
96
+ {
97
+ className: o.loader,
98
+ aria: { "aria-label": "Loading state" }
99
+ }
100
+ ),
101
+ /* @__PURE__ */ i.jsx("span", { className: f, children: d }),
102
+ (s || a) && /* @__PURE__ */ i.jsx(
103
+ H,
104
+ {
105
+ name: s,
106
+ theme: b,
107
+ source: a,
108
+ className: m,
109
+ "aria-hidden": "true"
110
+ }
111
+ )
112
+ ]
113
+ }
114
+ );
115
+ };
116
+ export {
117
+ U as DSButtonRound
118
+ };
package/buttonround.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './components/ButtonRound/ButtonRound'
2
+ export {}
package/checkbox.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './components/Checkbox/Checkbox'
2
+ export {}
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ import "./chunks/jsx-runtime.C115EyI4.js";
3
+ import "./chunks/index.CvOaL64Y.js";
4
+ import "./chunks/Fieldset.C9K8BYmH.js";
5
+ import { D as i } from "./chunks/CheckboxGroup.M3jOjhNf.js";
6
+ export {
7
+ i as DSCheckboxGroup
8
+ };
@@ -1 +1,2 @@
1
1
  export * from './components/CheckboxGroup/CheckboxGroup'
2
+ export {}
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ import "./chunks/jsx-runtime.C115EyI4.js";
3
+ import "./chunks/index.CvOaL64Y.js";
4
+ import "react";
5
+ import "./chunks/translate.isa3FHb8.js";
6
+ import "./chunks/Icon.C2o2seDb.js";
7
+ import { e as s } from "./chunks/Chip.fMG8wi5K.js";
8
+ export {
9
+ s as DSChip
10
+ };
package/chip.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/ChipGroup/Chip'
2
+ export {}
@@ -0,0 +1,175 @@
1
+ "use client";
2
+ import { j as y } from "./chunks/jsx-runtime.C115EyI4.js";
3
+ import { useState as S, useRef as I, useEffect as w, createElement as W } from "react";
4
+ import { c as L } from "./chunks/index.CvOaL64Y.js";
5
+ import { h as $, u as q } from "./chunks/useBreakpoint.5xBNDiCf.js";
6
+ import { g as z } from "./chunks/AriaLiveRegions.utils.BGSZafnS.js";
7
+ import { v as J, a as P, e as Q } from "./chunks/Chip.fMG8wi5K.js";
8
+ import './assets/chipgroup.BMovtKTy.css';const X = "_label--hidden_vobaf_76", Y = "_chip-group_vobaf_89", A = {
9
+ "label--hidden": "_label--hidden_vobaf_76",
10
+ labelHidden: X,
11
+ "chip-group": "_chip-group_vobaf_89",
12
+ chipGroup: Y
13
+ }, ne = ({
14
+ chips: p,
15
+ id: h,
16
+ label: D,
17
+ className: G,
18
+ hideLabel: K = !1,
19
+ isRemovable: r = !1,
20
+ lang: j = "en",
21
+ selectionMode: c = "single",
22
+ size: C = "medium",
23
+ translations: N,
24
+ onChipsChange: i,
25
+ ...T
26
+ }) => {
27
+ process.env.NODE_ENV !== "production" && J({
28
+ chips: p,
29
+ id: h,
30
+ label: D
31
+ });
32
+ const [l, o] = S(null), [s, a] = S(p), E = I(null), [d, b] = S(), f = I([]);
33
+ w(() => {
34
+ a(p);
35
+ }, [p]), w(() => {
36
+ P();
37
+ const e = () => b("keydown"), t = () => b(null), n = () => b(null);
38
+ return $ && (document.addEventListener("keydown", e), document.addEventListener("mousedown", t), document.addEventListener("touchstart", n)), () => {
39
+ $ && (document.removeEventListener("keydown", e), document.removeEventListener("mousedown", t), document.removeEventListener("touchstart", n));
40
+ };
41
+ }, []), w(() => {
42
+ var e;
43
+ l !== null && f.current[l] && d === "keydown" && ((e = f.current[l]) == null || e.focus());
44
+ }, [l]), w(() => {
45
+ d === "keydown" && l !== null && s.length > 0 && f.current.forEach((e, t) => {
46
+ e && (e.tabIndex = t === l ? 0 : -1, t === l && e.focus());
47
+ });
48
+ }, [s]);
49
+ const B = (e) => {
50
+ if (l === null) return;
51
+ let t = l;
52
+ switch (e.key) {
53
+ case "a":
54
+ (e.metaKey || e.ctrlKey) && (e.preventDefault(), F());
55
+ break;
56
+ case "ArrowRight":
57
+ case "ArrowDown":
58
+ e.shiftKey && c === "multiple" && !r ? (t = l + 1 > s.length - 1 ? s.length - 1 : l + 1, l !== t ? (u(l), u(t)) : s[l].isSelected || u(l)) : (t = (l + 1) % s.length, e.preventDefault());
59
+ break;
60
+ case "ArrowLeft":
61
+ case "ArrowUp":
62
+ e.shiftKey && c === "multiple" && !r ? (t = l - 1 < 0 ? 0 : l - 1, l !== t ? (u(l), u(t)) : s[0].isSelected || u(0)) : (t = (l - 1 + s.length) % s.length, e.preventDefault());
63
+ break;
64
+ case "Enter":
65
+ case " ":
66
+ if (e.preventDefault(), r) {
67
+ k(t);
68
+ return;
69
+ } else
70
+ v(t);
71
+ break;
72
+ case "Backspace":
73
+ r && k(t), e.preventDefault();
74
+ return;
75
+ default:
76
+ return;
77
+ }
78
+ o(t);
79
+ }, F = () => {
80
+ if (c !== "multiple") return;
81
+ const e = s.map((t) => ({
82
+ ...t,
83
+ selected: !t.disabled
84
+ }));
85
+ a(e), m(`${e.length} items selected`), i && i(e);
86
+ }, u = (e) => {
87
+ if (r) return;
88
+ const t = [...s];
89
+ t[e].disabled || (t[e].isSelected = !0, m(
90
+ `${t[e].label} selected, ${t.filter(({ isSelected: n }) => n).length} items selected`
91
+ ), a(t), i && i(t));
92
+ }, v = (e) => {
93
+ if (r) return;
94
+ const t = [...s];
95
+ t[e].disabled || (c === "single" ? t.forEach((n, g) => {
96
+ g === e ? (n.isSelected = !n.isSelected, m(
97
+ `${n.label} ${n.isSelected ? "selected" : "not selected"}`
98
+ )) : n.isSelected = !1;
99
+ }) : c === "multiple" && (t[e].isSelected = !t[e].isSelected, m(
100
+ `${t[e].label} ${t[e].isSelected ? "selected" : "not selected"}, ${t.filter(({ isSelected: n }) => n).length} items selected`
101
+ )), a(t), i && i(t));
102
+ }, k = (e) => {
103
+ var g;
104
+ const t = s[e], n = s.filter((_, U) => U !== e);
105
+ if (a(n), m(
106
+ `${t.label} removed, ${n.length} items remaining`
107
+ ), d === "keydown")
108
+ if (n.length > 0) {
109
+ const _ = Math.min(e, n.length - 1);
110
+ o(_);
111
+ } else
112
+ (g = E.current) == null || g.focus(), o(null);
113
+ i && i(n);
114
+ }, H = (e) => {
115
+ r ? k(e) : s[e].disabled || v(e);
116
+ }, m = (e) => {
117
+ const t = z();
118
+ t && (t.innerText = e, setTimeout(() => {
119
+ t.innerText = "";
120
+ }, 350));
121
+ }, V = (e) => l === null || l === e ? 0 : -1, x = q(K), O = L(A.chipGroup, G);
122
+ return s.length === 0 ? null : /* @__PURE__ */ y.jsxs("div", { children: [
123
+ /* @__PURE__ */ y.jsx(
124
+ "div",
125
+ {
126
+ id: h,
127
+ className: L({
128
+ [A.labelHidden]: x
129
+ }),
130
+ children: D
131
+ }
132
+ ),
133
+ s.length > 0 && /* @__PURE__ */ y.jsx(
134
+ "div",
135
+ {
136
+ ref: E,
137
+ role: "grid",
138
+ "aria-labelledby": h,
139
+ "aria-multiselectable": c === "multiple",
140
+ tabIndex: -1,
141
+ onKeyDown: B,
142
+ onFocus: () => {
143
+ l === null ? (f.current[0].focus(), d === "keydown" && o(0)) : d === "keydown" && o(l);
144
+ },
145
+ onBlur: () => o(null),
146
+ className: O,
147
+ ...T,
148
+ children: s.map((e, t) => /* @__PURE__ */ W(
149
+ Q,
150
+ {
151
+ ...e,
152
+ key: `${e.id}-${t}`,
153
+ groupId: h,
154
+ tabIndex: V(t),
155
+ onClick: (n) => {
156
+ H(t), e.onClick && e.onClick(n);
157
+ },
158
+ "data-focused": l === t,
159
+ isRemovable: r,
160
+ lang: j,
161
+ selectionMode: c,
162
+ size: C,
163
+ translations: N,
164
+ ref: (n) => {
165
+ f.current[t] = n;
166
+ }
167
+ }
168
+ ))
169
+ }
170
+ )
171
+ ] });
172
+ };
173
+ export {
174
+ ne as DSChipGroup
175
+ };
package/chipgroup.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './components/ChipGroup/ChipGroup'
2
+ export {}
@@ -0,0 +1,125 @@
1
+ "use client";
2
+ import { j as t } from "./jsx-runtime.C115EyI4.js";
3
+ import { c as s } from "./index.CvOaL64Y.js";
4
+ import { forwardRef as O, useRef as A, useState as F, useImperativeHandle as I, useEffect as q } from "react";
5
+ import { DSHeading as R } from "../heading.CAkraI2D.js";
6
+ import { D as T } from "./Icon.C2o2seDb.js";
7
+ import { g as w } from "./helpers.B1JT5ShS.js";
8
+ import '../assets/Accordion.DMEFgtQm.css';const L = "_details_1h0q5_76", M = "_summary_1h0q5_197", b = "_summary--utility--m_1h0q5_238", H = "_summary--flush_1h0q5_268", P = "_summary--small_1h0q5_338", U = "_summary-content-wrapper_1h0q5_343", V = "_summary-content-wrapper--flush_1h0q5_349", z = "_summary-content-wrapper--chevron-left_1h0q5_353", Z = "_heading-summary-wrapper_1h0q5_358", k = "_hint_1h0q5_362", B = "_icon_1h0q5_377", G = "_icon--open_1h0q5_388", J = "_content-wrapper_1h0q5_400", K = "_content-wrapper--flush_1h0q5_406", Q = "_content-wrapper--small_1h0q5_410", e = {
9
+ details: L,
10
+ summary: M,
11
+ "summary--utility--m": "_summary--utility--m_1h0q5_238",
12
+ summaryUtilityM: b,
13
+ "summary--flush": "_summary--flush_1h0q5_268",
14
+ summaryFlush: H,
15
+ "summary--small": "_summary--small_1h0q5_338",
16
+ summarySmall: P,
17
+ "summary-content-wrapper": "_summary-content-wrapper_1h0q5_343",
18
+ summaryContentWrapper: U,
19
+ "summary-content-wrapper--flush": "_summary-content-wrapper--flush_1h0q5_349",
20
+ summaryContentWrapperFlush: V,
21
+ "summary-content-wrapper--chevron-left": "_summary-content-wrapper--chevron-left_1h0q5_353",
22
+ summaryContentWrapperChevronLeft: z,
23
+ "heading-summary-wrapper": "_heading-summary-wrapper_1h0q5_358",
24
+ headingSummaryWrapper: Z,
25
+ hint: k,
26
+ icon: B,
27
+ "icon--open": "_icon--open_1h0q5_388",
28
+ iconOpen: G,
29
+ "content-wrapper": "_content-wrapper_1h0q5_400",
30
+ contentWrapper: J,
31
+ "content-wrapper--flush": "_content-wrapper--flush_1h0q5_406",
32
+ contentWrapperFlush: K,
33
+ "content-wrapper--small": "_content-wrapper--small_1h0q5_410",
34
+ contentWrapperSmall: Q
35
+ }, ae = ["medium", "small"], me = ["left", "right"], X = ({
36
+ children: a,
37
+ summary: n
38
+ }) => {
39
+ if (!a)
40
+ throw new Error(
41
+ w(
42
+ "DSAccordion",
43
+ "The component requires children to be set."
44
+ )
45
+ );
46
+ if (!n)
47
+ throw new Error(
48
+ w(
49
+ "DSAccordion",
50
+ "The summary prop is required. Please add the summary prop to the DSAccordion component."
51
+ )
52
+ );
53
+ }, Y = O(
54
+ ({
55
+ children: a,
56
+ summary: n,
57
+ chevronPosition: g = "right",
58
+ className: C,
59
+ hint: p,
60
+ isFlush: m = !1,
61
+ isOpen: o = !1,
62
+ size: l = "medium",
63
+ ...S
64
+ }, W) => {
65
+ process.env.NODE_ENV !== "production" && X({ children: a, summary: n });
66
+ const r = A(null), [v, i] = F(o);
67
+ I(W, () => r.current), q(() => {
68
+ r.current && i(r.current.open);
69
+ }, [o]), q(() => {
70
+ var d;
71
+ const y = () => {
72
+ r.current && i(r.current.open);
73
+ };
74
+ return (d = r.current) == null || d.addEventListener("toggle", y), () => {
75
+ var f;
76
+ (f = r.current) == null || f.removeEventListener("toggle", y);
77
+ };
78
+ }, []);
79
+ let u, _, h;
80
+ const c = typeof n == "object" && n !== void 0;
81
+ c && ({ headingSize: u, headingTag: _, headingText: h } = n);
82
+ const D = s(e.details, C), N = s(e.summary, {
83
+ [e.summaryFlush]: m,
84
+ [e.summarySmall]: l === "small",
85
+ [e.summaryUtilityM]: !c
86
+ }), j = s(
87
+ e.summaryContentWrapper,
88
+ {
89
+ [e.summaryContentWrapperFlush]: m,
90
+ [e.summaryContentWrapperChevronLeft]: g === "left"
91
+ }
92
+ ), x = s(e.icon, {
93
+ [e.iconOpen]: v
94
+ }), E = s(e.contentWrapper, {
95
+ [e.contentWrapperFlush]: m,
96
+ [e.contentWrapperSmall]: l === "small"
97
+ });
98
+ return /* @__PURE__ */ t.jsxs(
99
+ "details",
100
+ {
101
+ ...S,
102
+ ref: r,
103
+ className: D,
104
+ open: o,
105
+ children: [
106
+ /* @__PURE__ */ t.jsx("summary", { className: N, children: /* @__PURE__ */ t.jsxs("div", { className: j, children: [
107
+ /* @__PURE__ */ t.jsxs("div", { className: e.headingSummaryWrapper, children: [
108
+ c ? /* @__PURE__ */ t.jsx(R, { tag: _, size: u, children: h }) : n,
109
+ p && /* @__PURE__ */ t.jsx("div", { className: e.hint, children: p })
110
+ ] }),
111
+ /* @__PURE__ */ t.jsx(T, { name: "chevron-down", className: x })
112
+ ] }) }),
113
+ /* @__PURE__ */ t.jsx("div", { className: E, children: a })
114
+ ]
115
+ }
116
+ );
117
+ }
118
+ );
119
+ Y.displayName = "DSAccordion";
120
+ export {
121
+ ae as A,
122
+ me as C,
123
+ Y as D,
124
+ X as v
125
+ };
@@ -28,7 +28,7 @@ const e = "ds-alert-live-region", t = "ds-status-live-region", g = () => documen
28
28
  export {
29
29
  e as A,
30
30
  t as a,
31
- c as b,
32
- g,
31
+ g as b,
32
+ c as g,
33
33
  m as v
34
34
  };