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

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 (85) hide show
  1. package/{accordion.Rvtiu8Y4.js → accordion.C6_sqiW2.js} +1 -1
  2. package/{arialiveregions.Cyycgs8g.js → arialiveregions.2dxodwBP.js} +1 -1
  3. package/assets/TabPane.zywjfwo8.css +1 -0
  4. package/assets/Tabs.DUqlqP6R.css +1 -0
  5. package/assets/numberindicator.BJ9vFpnd.css +1 -0
  6. package/{button.M4nXjcUn.js → button.BfcWQZhx.js} +1 -1
  7. package/{checkbox.Cb2_ey6U.js → checkbox.Dt0OWryN.js} +1 -1
  8. package/{checkboxgroup.DBDmB-zR.js → checkboxgroup.je32bRPr.js} +2 -2
  9. package/{chip.C_1tGqvZ.js → chip.CpnDX4Ro.js} +1 -1
  10. package/{chipgroup.BvTj1ziW.js → chipgroup.Cy76KMWu.js} +17 -16
  11. package/chunks/{Accordion.CB6jB3s_.js → Accordion.Bza3TO4Y.js} +1 -1
  12. package/chunks/AriaLiveRegions.utils.Bq6Mp2bE.js +40 -0
  13. package/chunks/{CheckboxGroup.S6i5EOc4.js → CheckboxGroup.C_2ZwEQJ.js} +38 -35
  14. package/chunks/{Chip.CMlPUyOJ.js → Chip.BvlKC503.js} +30 -24
  15. package/chunks/{CustomReactSelect.CQ1uexBH.js → CustomReactSelect.CB41lklE.js} +3 -3
  16. package/chunks/{Dialog.CudsqNag.js → Dialog.ClBjJWOh.js} +2 -2
  17. package/chunks/{Drawer.ueG2Bzr9.js → Drawer.ReDW3ohH.js} +2 -2
  18. package/chunks/{Fieldset.Cjmkgxxk.js → Fieldset.Ct_JFRs9.js} +2 -2
  19. package/chunks/{Input.utils.ChV6RJsh.js → Input.utils.DYbmWlx6.js} +19 -21
  20. package/chunks/{InputPassword.CNLbBFjx.js → InputPassword.Cvk5J8w1.js} +18 -18
  21. package/chunks/{InputSearch.CHA6mkX_.js → InputSearch.BIIW-ERk.js} +4 -4
  22. package/chunks/{InputStepper.xmWGU9pU.js → InputStepper.DGzR3KY6.js} +49 -47
  23. package/chunks/{Notification.nx5vTamN.js → Notification.uAEjPywP.js} +1 -1
  24. package/chunks/RadioGroup.D10-pe9H.js +146 -0
  25. package/chunks/{Select.E6gLFYLk.js → Select.DsLnW29U.js} +3 -3
  26. package/chunks/TabPane.CYuUi0oL.js +51 -0
  27. package/chunks/Tabs.D_JAsvoh.js +270 -0
  28. package/chunks/{Textarea.DUBSOpNL.js → Textarea.Dh9R9YdZ.js} +19 -18
  29. package/chunks/{Toast.DyEi2GEP.js → Toast.j7LPnQ36.js} +1 -1
  30. package/chunks/has-window.ut_-aShB.js +5 -0
  31. package/chunks/helpers.CcqWV-wZ.js +8 -0
  32. package/chunks/{useBreakpoint.5xBNDiCf.js → useBreakpoint.B8XxjSVJ.js} +9 -9
  33. package/chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js +7 -0
  34. package/{combobox.CzBpi97e.js → combobox.D6zXg976.js} +1 -1
  35. package/components/AriaLiveRegions/AriaLiveRegions.utils.d.ts +2 -2
  36. package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +1 -1
  37. package/components/Input/Input.d.ts +6 -0
  38. package/components/InputPassword/InputPassword.d.ts +3 -3
  39. package/components/NumberIndicator/NumberIndicator.d.ts +12 -0
  40. package/components/NumberIndicator/NumberIndicator.test.d.ts +1 -0
  41. package/components/NumberIndicator/NumberIndicator.utils.d.ts +2 -0
  42. package/components/Tabs/TabPane/TabPane.d.ts +10 -0
  43. package/components/Tabs/TabPane/TabPane.utils.d.ts +3 -0
  44. package/components/Tabs/TabPane/TabPane.utils.test.d.ts +1 -0
  45. package/components/Tabs/Tabs.d.ts +42 -0
  46. package/components/Tabs/Tabs.test.d.ts +1 -0
  47. package/components/Tabs/Tabs.utils.d.ts +11 -0
  48. package/components/Tabs/Tabs.utils.test.d.ts +1 -0
  49. package/{customreactselect.qf7CIeFs.js → customreactselect.BcjDvZG6.js} +2 -2
  50. package/{dialog.DYlBUsOD.js → dialog.BkVOgeWY.js} +2 -2
  51. package/{drawer.CvhbP1ra.js → drawer.DM_NKGTQ.js} +2 -2
  52. package/{fieldset.CtUGEdLv.js → fieldset.CSNoVbL1.js} +1 -1
  53. package/index.d.ts +4 -2
  54. package/index.es.js +134 -127
  55. package/{input.BEnCFNM-.js → input.BbnmbMCI.js} +49 -47
  56. package/{inputpassword.B-D_jB9w.js → inputpassword.KnZRwWCQ.js} +3 -3
  57. package/{inputsearch.CaSpklR1.js → inputsearch.DgYJPZ2v.js} +4 -4
  58. package/inputstepper.T_of1Gz0.js +15 -0
  59. package/{link.DREJAoPG.js → link.L8O_InKe.js} +1 -1
  60. package/{notification.6M0OdGXK.js → notification.Bt9TbAAt.js} +2 -2
  61. package/numberindicator.UU7FSouT.js +26 -0
  62. package/numberindicator.d.ts +2 -0
  63. package/package.json +3 -3
  64. package/{radio.DEILy_lV.js → radio.B-2uuWHq.js} +1 -1
  65. package/{radiogroup.DeU-HdlP.js → radiogroup.DM_lF4hI.js} +3 -3
  66. package/{select.BYraFJzz.js → select.COLuwr89.js} +2 -2
  67. package/{skiptocontent.BxvpIB7H.js → skiptocontent.DxogCFvU.js} +2 -2
  68. package/styles/scss/ds/lib/theme.scss +2 -0
  69. package/tabpane.BnQBzVXw.js +8 -0
  70. package/tabpane.d.ts +2 -0
  71. package/tabs.BaELlVri.js +15 -0
  72. package/tabs.d.ts +2 -0
  73. package/textarea.Wcl_pVBb.js +13 -0
  74. package/{toast.n1QUINSA.js → toast.DQlMWU6I.js} +2 -2
  75. package/{toastmanager.B7EZ4JSI.js → toastmanager.DxHFtr5C.js} +17 -17
  76. package/utils/helpers.d.ts +7 -0
  77. package/utils/index.d.ts +1 -0
  78. package/utils/isAnimationDisabled.d.ts +1 -0
  79. package/chunks/AriaLiveRegions.utils.BGSZafnS.js +0 -34
  80. package/chunks/RadioGroup.Crj7NoOs.js +0 -137
  81. package/chunks/has-document.r9i9TxKV.js +0 -5
  82. package/chunks/helpers.B1JT5ShS.js +0 -7
  83. package/inputstepper.C7KD1-0S.js +0 -13
  84. package/textarea.CBvH0ljM.js +0 -12
  85. package/utils/has-document.d.ts +0 -1
@@ -0,0 +1,270 @@
1
+ "use client";
2
+ import { j as l } from "./jsx-runtime.C115EyI4.js";
3
+ import { c as T } from "./index.CvOaL64Y.js";
4
+ import { useState as v, useRef as p, useEffect as tt } from "react";
5
+ import { h as R } from "./has-window.ut_-aShB.js";
6
+ import { g as N, r as et } from "./helpers.CcqWV-wZ.js";
7
+ import { u as M } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
8
+ import { DSButton as H } from "../button.BfcWQZhx.js";
9
+ import { D as rt } from "./Icon.BCmt_XBG.js";
10
+ import { NumberIndicator as st } from "../numberindicator.UU7FSouT.js";
11
+ import { g as z, a as O, T as nt } from "./TabPane.CYuUi0oL.js";
12
+ import '../assets/Tabs.DUqlqP6R.css';const y = () => {
13
+ if (R) {
14
+ const o = getComputedStyle(document.documentElement).getPropertyValue("--ds-animation-duration").trim();
15
+ return o === "0s" || o === "0ms";
16
+ } else
17
+ return !0;
18
+ }, ot = "ds-tabs_tabs-wrapper_infm4_1", ct = "ds-tabs_scroll-wrapper_infm4_6", at = "ds-tabs_scroller_infm4_17", lt = "ds-tabs_scroller--centered_infm4_23", it = "ds-tabs_tab_infm4_1", ut = "ds-tabs_scroll-button_infm4_98", dt = "ds-tabs_scroll-button--hidden_infm4_103", ft = "ds-tabs_scroll-button--right_infm4_107", mt = "ds-tabs_indicator_infm4_119", a = {
19
+ "tabs-wrapper": "ds-tabs_tabs-wrapper_infm4_1",
20
+ tabsWrapper: ot,
21
+ "scroll-wrapper": "ds-tabs_scroll-wrapper_infm4_6",
22
+ scrollWrapper: ct,
23
+ scroller: at,
24
+ "scroller--centered": "ds-tabs_scroller--centered_infm4_23",
25
+ scrollerCentered: lt,
26
+ tab: it,
27
+ "scroll-button": "ds-tabs_scroll-button_infm4_98",
28
+ scrollButton: ut,
29
+ "scroll-button--hidden": "ds-tabs_scroll-button--hidden_infm4_103",
30
+ scrollButtonHidden: dt,
31
+ "scroll-button--right": "ds-tabs_scroll-button--right_infm4_107",
32
+ scrollButtonRight: ft,
33
+ indicator: mt
34
+ }, St = ["left", "center"], Bt = ["prev", "next"], m = (o) => R && (o == null ? void 0 : o.getBoundingClientRect()) || DOMRect.fromRect({ x: 0, y: 0, width: 0, height: 0 }), h = 48, pt = ({ id: o, tabs: f }) => {
35
+ if (!o)
36
+ throw new Error(
37
+ N(
38
+ "DSTabs",
39
+ 'A unique "id" prop is required. Please add a unique "id" prop to the DSTabs component.'
40
+ )
41
+ );
42
+ if (!f)
43
+ throw new Error(
44
+ N("DSTabs", et("tabs", "DSTabs"))
45
+ );
46
+ }, yt = ({
47
+ id: o,
48
+ tabs: f,
49
+ alignment: E = "left",
50
+ className: q,
51
+ classNameTabPane: $,
52
+ defaultSelectedTabIndex: L = 0,
53
+ onTabChange: I,
54
+ ...X
55
+ }) => {
56
+ process.env.NODE_ENV !== "production" && pt({
57
+ id: o,
58
+ tabs: f
59
+ });
60
+ const [i, G] = v(
61
+ L
62
+ ), [C, b] = v(
63
+ L
64
+ ), [K, V] = v(!1), [F, Q] = v(!1), _ = p([]), g = p(null), u = p(null), d = p(null), w = p(!1), j = p(i);
65
+ M(() => {
66
+ var t;
67
+ if (R) {
68
+ const r = [
69
+ "16px 'STIHL Contraface Digital Text Regular'",
70
+ "14px 'STIHL Contraface Digital Text Demi'",
71
+ "16px 'STIHL Contraface Digital Text Bold'"
72
+ ];
73
+ Promise.all(r.map((c) => document.fonts.load(c))).then(() => {
74
+ x(i), D("next", i, "instant"), k(), w.current = !0;
75
+ }).catch((c) => {
76
+ throw new Error(
77
+ N(
78
+ "DSTabs",
79
+ `The component requires the fonts to be loaded: ${c}`
80
+ )
81
+ );
82
+ });
83
+ const e = () => {
84
+ !w.current || !d.current || (s.matches ? d.current.style.transitionDuration = "0s" : d.current.style.transitionDuration = "");
85
+ }, s = window.matchMedia("(prefers-reduced-motion: reduce)");
86
+ s.addEventListener("change", e);
87
+ const n = () => {
88
+ k(), J();
89
+ };
90
+ return window.addEventListener("resize", n), (t = u.current) == null || t.addEventListener("scroll", n), () => {
91
+ var c;
92
+ s.removeEventListener("change", e), window.removeEventListener("resize", n), (c = u.current) == null || c.removeEventListener("scroll", n);
93
+ };
94
+ }
95
+ }, [f, E]), M(() => {
96
+ w.current && x(i), j.current = i;
97
+ }, [i]), tt(() => {
98
+ var t;
99
+ w.current && ((t = _.current[C]) == null || t.focus());
100
+ }, [C]);
101
+ const W = (t) => {
102
+ const r = m(u.current), e = m(_.current[t]);
103
+ let s = "next";
104
+ e.left - h < r.left ? s = "prev" : e.right + h > r.right ? s = "next" : s = i < t ? "next" : "prev", G(t), b(t), D(s, t), I && I(t);
105
+ }, k = () => {
106
+ if (u.current && g.current) {
107
+ const t = m(u.current), r = m(g.current);
108
+ V(r.left < t.left), Q(r.right > t.right + 4);
109
+ }
110
+ }, A = (t = 0) => {
111
+ R && d.current && !y() && !window.matchMedia("(prefers-reduced-motion: reduce)").matches && setTimeout(() => {
112
+ d.current && (d.current.style.transitionDuration = "250ms");
113
+ }, t);
114
+ }, J = () => {
115
+ d.current && (d.current.style.transitionDuration = "0s", x(j.current), A());
116
+ }, x = (t) => {
117
+ const r = d.current, e = m(_.current[t]), s = m(g.current), n = e.left - s.left;
118
+ r && (w.current ? (r.style.width = `${e.width}px`, r.style.transform = `translateX(${n}px)`) : (r.style.transitionDuration = "0s", r.style.transform = `translateX(${n}px)`, r.style.width = `${e.width}px`, A(50)));
119
+ }, U = (t, r) => {
120
+ let e;
121
+ switch (t.key) {
122
+ case "ArrowLeft":
123
+ e = (r > 0 ? r : f.length) - 1, b(e);
124
+ break;
125
+ case "ArrowRight":
126
+ e = (r + 1) % f.length, b(e);
127
+ break;
128
+ case "Home":
129
+ e = 0, b(e);
130
+ break;
131
+ case "End":
132
+ e = f.length - 1, b(e);
133
+ break;
134
+ case "Enter":
135
+ case " ":
136
+ W(r);
137
+ return;
138
+ default:
139
+ return;
140
+ }
141
+ e !== void 0 && setTimeout(
142
+ () => D(
143
+ t.key === "ArrowRight" ? "next" : "prev",
144
+ e
145
+ ),
146
+ 0
147
+ ), t.preventDefault();
148
+ }, D = (t, r, e = "smooth") => {
149
+ const s = _.current[r], n = u.current, c = m(s), S = m(n);
150
+ let B;
151
+ if (!(!s || !n)) {
152
+ if (t === "prev") {
153
+ if (c.left - h > S.left)
154
+ return;
155
+ B = s.offsetLeft - h;
156
+ } else {
157
+ if (c.right + h < S.right)
158
+ return;
159
+ B = s.offsetLeft + s.offsetWidth - S.width + h;
160
+ }
161
+ n.scrollTo({
162
+ left: B,
163
+ behavior: y() ? "instant" : e
164
+ });
165
+ }
166
+ }, P = (t) => {
167
+ var e;
168
+ const r = Y(t);
169
+ (e = u.current) == null || e.scrollTo({
170
+ left: r,
171
+ behavior: y() ? "instant" : "smooth"
172
+ });
173
+ }, Y = (t) => {
174
+ if (!g.current || !u.current)
175
+ return 0;
176
+ const { scrollLeft: r, offsetWidth: e } = u.current, s = Math.round(e * 0.2);
177
+ return t === "next" ? r + s : r - s;
178
+ }, Z = T(a.scroller, {
179
+ [a.scrollerCentered]: E === "center"
180
+ });
181
+ return /* @__PURE__ */ l.jsxs(
182
+ "div",
183
+ {
184
+ className: T(a.tabs, q),
185
+ id: o,
186
+ ...X,
187
+ children: [
188
+ /* @__PURE__ */ l.jsxs("div", { className: a.tabsWrapper, children: [
189
+ /* @__PURE__ */ l.jsxs("div", { className: a.scrollWrapper, ref: u, children: [
190
+ /* @__PURE__ */ l.jsx("div", { role: "tablist", className: Z, ref: g, children: f.map(
191
+ ({ id: t, label: r, iconName: e, numberIndicatorValue: s }, n) => /* @__PURE__ */ l.jsxs(
192
+ "button",
193
+ {
194
+ id: z(o, t),
195
+ role: "tab",
196
+ "aria-selected": i === n,
197
+ "aria-controls": O(o, t, n),
198
+ tabIndex: i === n ? 0 : -1,
199
+ className: a.tab,
200
+ ref: (c) => {
201
+ _.current[n] = c;
202
+ },
203
+ onClick: () => W(n),
204
+ onKeyDown: (c) => U(c, n),
205
+ children: [
206
+ e && /* @__PURE__ */ l.jsx(rt, { name: e, "aria-hidden": "true" }),
207
+ r,
208
+ s && /* @__PURE__ */ l.jsx(st, { label: s })
209
+ ]
210
+ },
211
+ z(o, t)
212
+ )
213
+ ) }),
214
+ /* @__PURE__ */ l.jsx("span", { className: a.indicator, ref: d })
215
+ ] }),
216
+ /* @__PURE__ */ l.jsx(
217
+ H,
218
+ {
219
+ variant: "filled",
220
+ className: T(a.scrollButton, {
221
+ [a.scrollButtonHidden]: !K
222
+ }),
223
+ hideLabel: !0,
224
+ iconName: "chevron-left",
225
+ tabIndex: -1,
226
+ size: "small",
227
+ onClick: () => P("prev"),
228
+ children: "Left"
229
+ }
230
+ ),
231
+ /* @__PURE__ */ l.jsx(
232
+ H,
233
+ {
234
+ variant: "filled",
235
+ className: T(a.scrollButton, a.scrollButtonRight, {
236
+ [a.scrollButtonHidden]: !F
237
+ }),
238
+ hideLabel: !0,
239
+ iconName: "chevron-right",
240
+ tabIndex: -1,
241
+ size: "small",
242
+ onClick: () => P("next"),
243
+ children: "Right"
244
+ }
245
+ )
246
+ ] }),
247
+ f.map(({ id: t, content: r }, e) => /* @__PURE__ */ l.jsx(
248
+ nt,
249
+ {
250
+ id: t,
251
+ content: r,
252
+ index: e,
253
+ selectedTabIndex: i,
254
+ tabListId: o,
255
+ className: $
256
+ },
257
+ O(o, t, e)
258
+ ))
259
+ ]
260
+ }
261
+ );
262
+ };
263
+ export {
264
+ yt as D,
265
+ h as S,
266
+ St as T,
267
+ Bt as a,
268
+ m as g,
269
+ pt as v
270
+ };
@@ -2,11 +2,12 @@
2
2
  import { j as s } from "./jsx-runtime.C115EyI4.js";
3
3
  import { c as g } from "./index.CvOaL64Y.js";
4
4
  import { useState as d, useRef as re, useEffect as x } from "react";
5
- import { u as ne, h as oe } from "./useBreakpoint.5xBNDiCf.js";
6
- import { g as V, p as z } from "./helpers.B1JT5ShS.js";
5
+ import { h as ne } from "./has-window.ut_-aShB.js";
6
+ import { g as V, p as z } from "./helpers.CcqWV-wZ.js";
7
+ import { u as oe } from "./useBreakpoint.B8XxjSVJ.js";
7
8
  import { Asterisk as ie } from "../asterisk.DpzETKdT.js";
8
9
  import { DSSystemFeedback as le } from "../systemfeedback.C3Pfxxpp.js";
9
- import '../assets/Textarea.KJGPTYMz.css';const de = "ds-textarea_textarea_18bj7_1", ce = "ds-textarea_textarea--invalid_18bj7_113", _e = "ds-textarea_textarea--small_18bj7_120", ue = "ds-textarea_textarea--resize-auto_18bj7_139", be = "ds-textarea_root_18bj7_149", fe = "ds-textarea_hint_18bj7_157", xe = "ds-textarea_label_18bj7_157", je = "ds-textarea_affix_18bj7_161", me = "ds-textarea_affix--small_18bj7_182", he = "ds-textarea_affix--disabled_18bj7_195", pe = "ds-textarea_prefix_18bj7_203", ve = "ds-textarea_affix--readonly_18bj7_206", ge = "ds-textarea_suffix_18bj7_216", Se = "ds-textarea_leading-icon_18bj7_223", Ie = "ds-textarea_leading-icon--small_18bj7_235", Ce = "ds-textarea_leading-icon--disabled_18bj7_238", ye = "ds-textarea_action-button_18bj7_247", De = "ds-textarea_label--hidden_18bj7_265", Ae = "ds-textarea_label--disabled_18bj7_278", we = "ds-textarea_feedback_18bj7_298", Re = "ds-textarea_char-count_18bj7_303", Te = "ds-textarea_char-count-announcer_18bj7_319", t = {
10
+ import '../assets/Textarea.KJGPTYMz.css';const de = "ds-textarea_textarea_18bj7_1", ce = "ds-textarea_textarea--invalid_18bj7_113", _e = "ds-textarea_textarea--small_18bj7_120", ue = "ds-textarea_textarea--resize-auto_18bj7_139", fe = "ds-textarea_root_18bj7_149", be = "ds-textarea_hint_18bj7_157", xe = "ds-textarea_label_18bj7_157", je = "ds-textarea_affix_18bj7_161", me = "ds-textarea_affix--small_18bj7_182", he = "ds-textarea_affix--disabled_18bj7_195", pe = "ds-textarea_prefix_18bj7_203", ve = "ds-textarea_affix--readonly_18bj7_206", ge = "ds-textarea_suffix_18bj7_216", Se = "ds-textarea_leading-icon_18bj7_223", Ie = "ds-textarea_leading-icon--small_18bj7_235", Ce = "ds-textarea_leading-icon--disabled_18bj7_238", ye = "ds-textarea_action-button_18bj7_247", De = "ds-textarea_label--hidden_18bj7_265", Ae = "ds-textarea_label--disabled_18bj7_278", we = "ds-textarea_feedback_18bj7_298", Re = "ds-textarea_char-count_18bj7_303", Te = "ds-textarea_char-count-announcer_18bj7_319", t = {
10
11
  textarea: de,
11
12
  "textarea--invalid": "ds-textarea_textarea--invalid_18bj7_113",
12
13
  textareaInvalid: ce,
@@ -14,8 +15,8 @@ import '../assets/Textarea.KJGPTYMz.css';const de = "ds-textarea_textarea_18bj7_
14
15
  textareaSmall: _e,
15
16
  "textarea--resize-auto": "ds-textarea_textarea--resize-auto_18bj7_139",
16
17
  textareaResizeAuto: ue,
17
- root: be,
18
- hint: fe,
18
+ root: fe,
19
+ hint: be,
19
20
  label: xe,
20
21
  affix: je,
21
22
  "affix--small": "ds-textarea_affix--small_18bj7_182",
@@ -43,12 +44,12 @@ import '../assets/Textarea.KJGPTYMz.css';const de = "ds-textarea_textarea_18bj7_
43
44
  charCount: Re,
44
45
  "char-count-announcer": "ds-textarea_char-count-announcer_18bj7_319",
45
46
  charCountAnnouncer: Te
46
- }, Pe = ["medium", "small"], Ee = ({ id: r, label: _ }) => {
47
+ }, qe = ["medium", "small"], Ee = ({ id: r, label: _ }) => {
47
48
  if (!r)
48
49
  throw new Error(
49
50
  V(
50
51
  "DSTextarea",
51
- 'A unique "id" prop is required. Please add an unique "id" prop to the DSTextarea component.'
52
+ 'A unique "id" prop is required. Please add a unique "id" prop to the DSTextarea component.'
52
53
  )
53
54
  );
54
55
  if (!_)
@@ -58,7 +59,7 @@ import '../assets/Textarea.KJGPTYMz.css';const de = "ds-textarea_textarea_18bj7_
58
59
  `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSTextarea component. If you don't want to display a label, set hideLabel={true}.`
59
60
  )
60
61
  );
61
- }, qe = ({
62
+ }, Me = ({
62
63
  id: r,
63
64
  label: _,
64
65
  charsLimitText: P = "Character limit reached",
@@ -85,7 +86,7 @@ import '../assets/Textarea.KJGPTYMz.css';const de = "ds-textarea_textarea_18bj7_
85
86
  id: r,
86
87
  label: _
87
88
  });
88
- const [G, A] = d(O || ""), [l, w] = d(0), [J, R] = d(0), [K, T] = d("off"), [E, h] = d(i), [p, v] = d(n), N = m !== void 0, b = N ? m : G, o = re(null), Q = ne(F);
89
+ const [G, A] = d(O || ""), [l, w] = d(0), [J, R] = d(0), [K, T] = d("off"), [E, h] = d(i), [p, v] = d(n), N = m !== void 0, f = N ? m : G, o = re(null), Q = oe(F);
89
90
  x(() => {
90
91
  if (!e || e <= 0)
91
92
  return;
@@ -95,11 +96,11 @@ import '../assets/Textarea.KJGPTYMz.css';const de = "ds-textarea_textarea_18bj7_
95
96
  }, 1e3);
96
97
  return () => clearTimeout(a);
97
98
  }, [l]), x(() => {
98
- A(b || ""), c(), e && e > 0 && (w(b.toString().length || 0), R(e - b.toString().length || 0));
99
+ A(f || ""), c(), e && e > 0 && (w(f.toString().length || 0), R(e - f.toString().length || 0));
99
100
  }, [m]), x(() => {
100
101
  n && i ? (h(i), v(n)) : !n && e && e >= 0 && l >= e ? (v(!0), h(P)) : (h(i), v(n));
101
102
  }, [n, p, i, l]), x(() => {
102
- if (oe && u === "auto")
103
+ if (ne && u === "auto")
103
104
  return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
104
105
  }, [u, o.current]);
105
106
  const U = g(t.root, X), Y = g(t.textarea, M, {
@@ -116,17 +117,17 @@ import '../assets/Textarea.KJGPTYMz.css';const de = "ds-textarea_textarea_18bj7_
116
117
  }), B = `${r}-label`, $ = `${r}-feedback`, k = `${r}-hint`, H = `${r}-char-count-announcer`, ee = j ? ` ${k}` : "", c = () => {
117
118
  if (o.current && u === "auto") {
118
119
  o.current.style.height = "auto";
119
- const a = z(o.current.scrollHeight), f = z(2);
120
+ const a = z(o.current.scrollHeight), b = z(2);
120
121
  o.current.style.height = `${// We need to add 2px (border-top & border-bottom) to the scrollHeight to prevent the textarea
121
122
  // from jumping as soon as the user starts typing.
122
- a + f}rem`;
123
+ a + b}rem`;
123
124
  }
124
125
  }, ae = () => {
125
126
  const a = [];
126
127
  return e && e > 0 && a.push(H), n && i && a.push($), a.length > 0 ? a.join(" ") : void 0;
127
128
  }, te = (a) => {
128
- var f;
129
- D && D(a), e && e > 0 && w(((f = o.current) == null ? void 0 : f.value.length) || 0), c();
129
+ var b;
130
+ D && D(a), e && e > 0 && w(((b = o.current) == null ? void 0 : b.value.length) || 0), c();
130
131
  }, se = (a) => {
131
132
  y && y(a), N || A(a.target.value);
132
133
  };
@@ -160,7 +161,7 @@ import '../assets/Textarea.KJGPTYMz.css';const de = "ds-textarea_textarea_18bj7_
160
161
  readOnly: I,
161
162
  required: C,
162
163
  disabled: S,
163
- value: b,
164
+ value: f,
164
165
  defaultValue: void 0,
165
166
  rows: void 0,
166
167
  cols: void 0,
@@ -192,7 +193,7 @@ import '../assets/Textarea.KJGPTYMz.css';const de = "ds-textarea_textarea_18bj7_
192
193
  ] });
193
194
  };
194
195
  export {
195
- qe as D,
196
- Pe as T,
196
+ Me as D,
197
+ qe as T,
197
198
  Ee as v
198
199
  };
@@ -2,7 +2,7 @@
2
2
  import { j as t } from "./jsx-runtime.C115EyI4.js";
3
3
  import { c } from "./index.CvOaL64Y.js";
4
4
  import { forwardRef as u } from "react";
5
- import { DSButton as y } from "../button.M4nXjcUn.js";
5
+ import { DSButton as y } from "../button.BfcWQZhx.js";
6
6
  import { D as g } from "./Icon.BCmt_XBG.js";
7
7
  import '../assets/Toast.CuafTAf7.css';const h = "ds-toast_root_58y8a_5", p = "ds-toast_root--closing_58y8a_19", x = "ds-toast_fade-out_58y8a_1", I = "ds-toast_move-in_58y8a_1", S = "ds-toast_root--success_58y8a_54", N = "ds-toast_root--info_58y8a_58", j = "ds-toast_root--warning_58y8a_62", v = "ds-toast_content_58y8a_67", w = "ds-toast_content--hide-icon_58y8a_74", C = "ds-toast_icon_58y8a_78", D = "ds-toast_message_58y8a_82", o = {
8
8
  root: h,
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ const e = typeof window < "u" && typeof window.document < "u";
3
+ export {
4
+ e as h
5
+ };
@@ -0,0 +1,8 @@
1
+ "use client";
2
+ const r = (e) => typeof e != "number" || isNaN(e) ? 0 : e / 16, t = (e, s) => `[STIHL Design System] - [${e}]: ${s}`, o = (e, s) => `The "${e}" prop is required. Please add the "${e}" prop to the ${s} component.`, n = (e, s) => e == null ? void 0 : e.closest(s);
3
+ export {
4
+ n as a,
5
+ t as g,
6
+ r as p,
7
+ o as r
8
+ };
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import { useState as c, useEffect as k } from "react";
3
- const a = typeof window < "u", o = {
3
+ import { h as a } from "./has-window.ut_-aShB.js";
4
+ const o = {
4
5
  base: 0,
5
6
  s: 320,
6
7
  m: 768,
7
8
  l: 1024,
8
9
  xl: 1536
9
- }, u = ["base", "s", "m", "l", "xl"], f = (e) => {
10
+ }, u = ["base", "s", "m", "l", "xl"], b = (e) => {
10
11
  let n = "base";
11
12
  for (const t of u)
12
13
  if (e >= o[t])
@@ -14,7 +15,7 @@ const a = typeof window < "u", o = {
14
15
  else
15
16
  break;
16
17
  return n;
17
- }, b = (e) => e && typeof e == "object" && "base" in e, d = () => {
18
+ }, f = (e) => e && typeof e == "object" && "base" in e, l = () => {
18
19
  const [e, n] = c("base");
19
20
  k(() => {
20
21
  if (a)
@@ -23,13 +24,13 @@ const a = typeof window < "u", o = {
23
24
  const t = () => {
24
25
  if (a) {
25
26
  const r = window.innerWidth;
26
- n(f(r));
27
+ n(b(r));
27
28
  }
28
29
  };
29
30
  return e;
30
- }, B = (e) => {
31
- const n = d();
32
- if (e && typeof e != "object" || !b(e))
31
+ }, p = (e) => {
32
+ const n = l();
33
+ if (e && typeof e != "object" || !f(e))
33
34
  return e;
34
35
  const t = [...u].reverse();
35
36
  let r = e.base;
@@ -43,6 +44,5 @@ const a = typeof window < "u", o = {
43
44
  return r;
44
45
  };
45
46
  export {
46
- a as h,
47
- B as u
47
+ p as u
48
48
  };
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { useLayoutEffect as o, useEffect as t } from "react";
3
+ import { h as e } from "./has-window.ut_-aShB.js";
4
+ const u = e ? o : t;
5
+ export {
6
+ u
7
+ };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { j as u } from "./chunks/jsx-runtime.C115EyI4.js";
3
- import { v as x, c as C } from "./chunks/CustomReactSelect.CQ1uexBH.js";
3
+ import { v as x, c as C } from "./chunks/CustomReactSelect.CB41lklE.js";
4
4
  const v = ({
5
5
  id: s,
6
6
  label: o,
@@ -1,5 +1,5 @@
1
1
  export declare const ARIA_LIVE_REGION_ALERT_ID = "ds-alert-live-region";
2
2
  export declare const ARIA_LIVE_REGION_STATUS_ID = "ds-status-live-region";
3
- export declare const getAriaAlertLiveRegionElement: () => HTMLElement | null;
4
- export declare const getAriaStatusLiveRegionElement: () => HTMLElement | null;
3
+ export declare const getAriaAlertLiveRegionElement: () => HTMLElement | null | undefined;
4
+ export declare const getAriaStatusLiveRegionElement: () => HTMLElement | null | undefined;
5
5
  export declare const validateMultipleDSAriaLiveRegionsOnPage: () => void;
@@ -18,7 +18,7 @@ export interface CustomReactSelectProps<IsMulti extends boolean> extends PickedR
18
18
  * `type ComboboxOptionsOrOptGroups = (ComboboxOption | ComboboxOptionsGroup)[];`
19
19
  * */
20
20
  options: ComboboxOptionsOrOptGroups;
21
- /** The value of autocomplete to use for the DSCombobox. */
21
+ /** The value of autoComplete to use for the DSCombobox. */
22
22
  autoComplete?: string;
23
23
  /** Value of the selected Option in **uncontrolled DSCombobox** component. */
24
24
  defaultValue?: IsMulti extends true ? ComboboxOption[] : ComboboxOption;
@@ -15,6 +15,12 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
15
15
  actionButtonIconSource?: IconProps['source'];
16
16
  /** Callback function called when the action button is clicked. */
17
17
  actionButtonOnClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
18
+ /**
19
+ * Provides hints to the browser for what type of data the input expects.
20
+ * Use standardized values from the W3C specification for input purposes:
21
+ * https://www.w3.org/TR/WCAG21/#input-purposes.
22
+ */
23
+ autoComplete?: string;
18
24
  /** Disables the input, preventing user interaction.
19
25
  * @default false
20
26
  */
@@ -6,10 +6,10 @@ export interface InputPasswordProps extends Omit<InputHTMLAttributes<HTMLInputEl
6
6
  id: string;
7
7
  /** Label text displayed above the input. */
8
8
  label: string;
9
- /** The value of autocomplete to use for the input.
9
+ /** The value of autoComplete to use for the input.
10
10
  * @default 'new-password'
11
11
  */
12
- autocomplete?: 'new-password' | 'current-password' | 'off';
12
+ autoComplete?: 'new-password' | 'current-password' | 'off';
13
13
  /** Disables the input, preventing user interaction.
14
14
  * @default false
15
15
  */
@@ -55,4 +55,4 @@ export interface InputPasswordProps extends Omit<InputHTMLAttributes<HTMLInputEl
55
55
  *
56
56
  * The user can toggle the visibility of the password by clicking on the action button.
57
57
  */
58
- export declare const DSInputPassword: ({ id, label, autocomplete, className, disabled, hidePasswordText, hint, hideLabel, invalid, readonly, required, showPasswordText, size, systemFeedback, ...rest }: InputPasswordProps) => JSX.Element;
58
+ export declare const DSInputPassword: ({ id, label, autoComplete, className, disabled, hidePasswordText, hint, hideLabel, invalid, readonly, required, showPasswordText, size, systemFeedback, ...rest }: InputPasswordProps) => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { NumberIndicatorVariant } from './NumberIndicator.utils';
2
+ export interface NumberIndicatorProps extends React.HTMLAttributes<HTMLSpanElement> {
3
+ /** Content within the NumberIndicator. */
4
+ label?: string;
5
+ /**
6
+ * Variant of the NumberIndicator.
7
+ *
8
+ * @default 'default'
9
+ */
10
+ variant?: NumberIndicatorVariant;
11
+ }
12
+ export declare const NumberIndicator: ({ label, className, variant, ...rest }: NumberIndicatorProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const NUMBER_INDICATOR_VARIANT: readonly ["default", "highlight"];
2
+ export type NumberIndicatorVariant = (typeof NUMBER_INDICATOR_VARIANT)[number];
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ export interface TabPaneProps {
3
+ id: string;
4
+ content: ReactNode;
5
+ index: number;
6
+ selectedTabIndex: number;
7
+ tabListId: string;
8
+ className?: string;
9
+ }
10
+ export declare const TabPane: ({ id, content, index, selectedTabIndex, tabListId, className, }: TabPaneProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const containsFocusableElement: (element: HTMLElement) => boolean;
2
+ export declare const getTabButtonId: (tabListId: string, id: string) => string;
3
+ export declare const getTabPaneId: (tabListId: string, id: string, index: number) => string;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,42 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { IconName } from '../../types';
3
+ import { TabsAlignment } from './Tabs.utils';
4
+ export interface Tab {
5
+ /** Content displayed when the Tab is active. */
6
+ content: React.ReactNode;
7
+ /** Unique id for the Tab. */
8
+ id: string;
9
+ /** Label text displayed on the Tab. */
10
+ label: string;
11
+ /** Name of the icon to display */
12
+ iconName?: IconName;
13
+ /** Number Indicator value displayed next to the label. */
14
+ numberIndicatorValue?: string;
15
+ }
16
+ export interface TabsProps extends HTMLAttributes<HTMLDivElement> {
17
+ /** Unique id for the tab list. */
18
+ id: string;
19
+ /** An array of Tab Objects containing the id, content, label, and other optional parameters.
20
+ * `{id: string; content: React.ReactNode; label: string; iconName?: IconName; numberIndicatorValue?: string;}[]`*/
21
+ tabs: Tab[];
22
+ /** Alignment of the Tabs.
23
+ * @default 'left'
24
+ */
25
+ alignment?: TabsAlignment;
26
+ /**
27
+ * Additional class name to apply to the tab pane.
28
+ */
29
+ classNameTabPane?: string;
30
+ /** Index of the tab to be selected when Tabs are rendered the first time.
31
+ * @default 0
32
+ * */
33
+ defaultSelectedTabIndex?: number;
34
+ /** Callback function called when the selected tab changes. */
35
+ onTabChange?: (selectedTabIndex: number) => void;
36
+ }
37
+ /**
38
+ * A component for organizing content into tabbed sections, allowing users to navigate between them.
39
+ * Supports single selection to maintain focus on one content area at a time.
40
+ * Avoid excessive tabs to prevent overwhelming the user.
41
+ */
42
+ export declare const DSTabs: ({ id: tabListId, tabs, alignment, className, classNameTabPane, defaultSelectedTabIndex, onTabChange, ...rest }: TabsProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { TabsProps } from './Tabs';
2
+ export declare const TABS_ALIGNMENT: readonly ["left", "center"];
3
+ export type TabsAlignment = (typeof TABS_ALIGNMENT)[number];
4
+ export declare const TABS_DIRECTION: readonly ["prev", "next"];
5
+ export type TabsDirection = (typeof TABS_DIRECTION)[number];
6
+ /**
7
+ * Returns the bounding rectangle of a DOM element or a default DOMRect object with 0 values if unavailable.
8
+ */
9
+ export declare const getRect: (element: HTMLElement | null) => DOMRect;
10
+ export declare const SCROLL_MARGIN_INLINE = 48;
11
+ export declare const validateTabsProps: ({ id, tabs }: TabsProps) => void;
@@ -0,0 +1 @@
1
+ export {};
@@ -2,8 +2,8 @@
2
2
  import "./chunks/jsx-runtime.C115EyI4.js";
3
3
  import "./chunks/index.CvOaL64Y.js";
4
4
  import "react";
5
- import { c as l } from "./chunks/CustomReactSelect.CQ1uexBH.js";
6
- import "./chunks/useBreakpoint.5xBNDiCf.js";
5
+ import { c as l } from "./chunks/CustomReactSelect.CB41lklE.js";
6
+ import "./chunks/useBreakpoint.B8XxjSVJ.js";
7
7
  import "./asterisk.DpzETKdT.js";
8
8
  import "./chunks/Icon.BCmt_XBG.js";
9
9
  import "./systemfeedback.C3Pfxxpp.js";
@@ -2,8 +2,8 @@
2
2
  import "./chunks/jsx-runtime.C115EyI4.js";
3
3
  import "./chunks/index.CvOaL64Y.js";
4
4
  import "react";
5
- import "./button.M4nXjcUn.js";
6
- import { D as e } from "./chunks/Dialog.CudsqNag.js";
5
+ import "./button.BfcWQZhx.js";
6
+ import { D as e } from "./chunks/Dialog.ClBjJWOh.js";
7
7
  export {
8
8
  e as DSDialog
9
9
  };