@stihl-design-system/components 1.0.0-RC.34 → 1.0.0-RC.36

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 (161) hide show
  1. package/Placeholder.svg +1 -1
  2. package/{actionbutton.DLQJU6AV.js → actionbutton.Du5CT-Mt.js} +2 -2
  3. package/{actionlink.DEBrWfN3.js → actionlink.BK9CaQUY.js} +2 -2
  4. package/assets/Button.CmeGVEAY.css +1 -0
  5. package/assets/CustomReactSelect.BihX36Uo.css +1 -0
  6. package/assets/Fieldset.Oqu7pOBv.css +1 -0
  7. package/assets/InputFile.D7Ihod7B.css +1 -0
  8. package/assets/InputNumber.z_UqRYdv.css +1 -0
  9. package/assets/InputPassword.DZENjxJ9.css +1 -0
  10. package/assets/InputSearch.GBH9Eh6F.css +1 -0
  11. package/assets/LinkButton.88j5ckLu.css +1 -0
  12. package/assets/RadioGroup.q1lQ-HIZ.css +1 -0
  13. package/assets/Select.CL0fqx7X.css +1 -0
  14. package/assets/Slider.DWLuIsNj.css +1 -0
  15. package/assets/Textarea.B1HOakic.css +1 -0
  16. package/assets/buttonround.DBpMesfr.css +1 -0
  17. package/assets/input.RPDR8qdT.css +1 -0
  18. package/assets/radio.CsfCywxz.css +1 -0
  19. package/{banner.CI5HnDqD.js → banner.AhUeW3HM.js} +1 -1
  20. package/{breadcrumb.CtwAux3P.js → breadcrumb.DpIAQk3r.js} +3 -3
  21. package/button.CqNYOfSj.js +12 -0
  22. package/buttonround.9IS0tUqw.js +96 -0
  23. package/{checkbox.DwccD0Mp.js → checkbox.XYQI-ubx.js} +2 -2
  24. package/{checkboxgroup.ZiUFfCJ1.js → checkboxgroup.C66ZwglF.js} +2 -2
  25. package/{chip.B0s_fS8L.js → chip.B-pxhsdb.js} +2 -2
  26. package/{chipgroup.Dpu66bo5.js → chipgroup.CY3pWyLO.js} +4 -3
  27. package/chunks/{ActionButton.DOYsEHPr.js → ActionButton.BOYQYo5M.js} +1 -1
  28. package/chunks/{ActionLink.DbyciN3Y.js → ActionLink.BlwvrnPN.js} +1 -1
  29. package/chunks/{Breadcrumb.BgnpTo01.js → Breadcrumb.C_Yaz_vw.js} +2 -2
  30. package/chunks/Button.CQlIao-Z.js +139 -0
  31. package/chunks/{Checkbox.BcGXAuuP.js → Checkbox.D5X5T6Yg.js} +1 -1
  32. package/chunks/CheckboxGroup.BIspWqeW.js +74 -0
  33. package/chunks/{Chip.D6pubCZV.js → Chip.DIp5hdRH.js} +1 -1
  34. package/chunks/{CustomReactSelect.Dg3wC_VH.js → CustomReactSelect.D4kopDzX.js} +816 -800
  35. package/chunks/{Dialog.DpqSVrYR.js → Dialog.DMxHRrxo.js} +1 -1
  36. package/chunks/{Drawer.DISWybOa.js → Drawer.CatmvDHJ.js} +1 -1
  37. package/chunks/Fieldset.Bk8W5h13.js +81 -0
  38. package/chunks/{Header.7TQL_J9t.js → Header.18sOO0Gf.js} +1 -1
  39. package/chunks/{Input.utils.Dkw7gRrr.js → Input.utils.CL1u4Ctq.js} +27 -25
  40. package/chunks/InputFile.CjK3gEst.js +236 -0
  41. package/chunks/InputNumber.wfDjnz58.js +242 -0
  42. package/chunks/InputPassword.Ctb0xbwg.js +121 -0
  43. package/chunks/InputSearch.C-r5ktR8.js +149 -0
  44. package/chunks/LinkButton.CWibqvhs.js +140 -0
  45. package/chunks/{MegaMenu.CQbOeaib.js → MegaMenu.qttkjGbD.js} +7 -8
  46. package/chunks/{NavigationTabs.BwM-6CRm.js → NavigationTabs.SBNLx87A.js} +1 -1
  47. package/chunks/{Notification.CrojkJ0E.js → Notification.DYl1rcGu.js} +1 -1
  48. package/chunks/{Popover.Bb0Pjmvg.js → Popover.C9tT8xkE.js} +9 -10
  49. package/chunks/RadioGroup.BDsVAhCK.js +125 -0
  50. package/chunks/Select.BjBPN-6W.js +147 -0
  51. package/chunks/Slider.Bh2jhGKn.js +306 -0
  52. package/chunks/{Stepper.PTQdQBYf.js → Stepper.D1Yzw-gL.js} +2 -2
  53. package/chunks/{Tabs.DyP4whX0.js → Tabs.BvG-OPWa.js} +1 -1
  54. package/chunks/Textarea.DibBqiam.js +181 -0
  55. package/chunks/{Toast.ug_RjGgF.js → Toast.ldZRNpGM.js} +1 -1
  56. package/chunks/floating-ui.react.COTL3jH5.js +2984 -0
  57. package/chunks/{useBreakpoint.BzR_yaIv.js → useBreakpoint.1txsny17.js} +8 -5
  58. package/combobox.C2XUM4fM.js +67 -0
  59. package/components/Button/Button.d.ts +5 -0
  60. package/components/Button/Button.utils.d.ts +4 -5
  61. package/components/CheckboxGroup/CheckboxGroup.d.ts +14 -1
  62. package/components/Combobox/Combobox.utils.d.ts +3 -2
  63. package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +13 -0
  64. package/components/Fieldset/Fieldset.d.ts +14 -1
  65. package/components/Input/Input.d.ts +13 -0
  66. package/components/Input/Input.utils.d.ts +2 -2
  67. package/components/InputFile/InputFile.d.ts +13 -0
  68. package/components/InputFile/InputFile.utils.d.ts +4 -2
  69. package/components/InputNumber/InputNumber.d.ts +17 -4
  70. package/components/InputNumber/InputNumber.utils.d.ts +2 -2
  71. package/components/InputPassword/InputPassword.d.ts +13 -0
  72. package/components/InputPassword/InputPassword.utils.d.ts +2 -2
  73. package/components/InputSearch/InputSearch.d.ts +13 -0
  74. package/components/InputSearch/InputSearch.utils.d.ts +2 -2
  75. package/components/LinkButton/LinkButton.d.ts +5 -0
  76. package/components/LinkButton/LinkButton.utils.d.ts +4 -5
  77. package/components/RadioGroup/RadioGroup.d.ts +13 -0
  78. package/components/RadioGroup/RadioGroup.utils.d.ts +3 -2
  79. package/components/Scroller/Scroller.test.d.ts +1 -0
  80. package/components/Select/Select.d.ts +13 -0
  81. package/components/Select/Select.utils.d.ts +2 -2
  82. package/components/Slider/Slider.d.ts +13 -0
  83. package/components/Textarea/Textarea.d.ts +13 -0
  84. package/components/Textarea/Textarea.utils.d.ts +2 -2
  85. package/{customreactselect.BFN8cYJi.js → customreactselect.BNwzk8Qi.js} +4 -3
  86. package/{dialog.CzM_Cxp0.js → dialog.D5geKDtZ.js} +2 -2
  87. package/{drawer._A9MQ8Cj.js → drawer.ucjhpIF4.js} +2 -2
  88. package/{fieldset.CId-NtI5.js → fieldset.Crx4Cb9a.js} +3 -2
  89. package/{filelist.DgVuWpR3.js → filelist.Bcu6TZRj.js} +1 -1
  90. package/{floatingactionbutton.Bsnncudt.js → floatingactionbutton.B5hJ2At2.js} +1 -1
  91. package/{header.CelAkqtp.js → header.A77yIAH3.js} +1 -1
  92. package/index.es.js +103 -102
  93. package/input.DL_M_Pg3.js +190 -0
  94. package/{inputfile.BjgJGefV.js → inputfile.iwsNHjrc.js} +6 -5
  95. package/{inputnumber.BcrxBVv0.js → inputnumber.raC_7KIP.js} +7 -6
  96. package/{inputpassword.CddmBW-T.js → inputpassword.Brte78Sr.js} +4 -4
  97. package/{inputsearch.CFOASqrd.js → inputsearch.BP0EzFcF.js} +6 -5
  98. package/{link.f8MMZo-w.js → link.BtZeNdii.js} +2 -2
  99. package/{linkbutton.BYAvi-_V.js → linkbutton.In_ROT0Z.js} +4 -4
  100. package/{logo100years.B4d_DIiB.js → logo100years.DDzCrczW.js} +10 -10
  101. package/{megamenu.Cy9Cc-mC.js → megamenu.BurL9MfF.js} +3 -3
  102. package/{navigationtabs.Dp7D2fnc.js → navigationtabs.EbmfKv1R.js} +2 -2
  103. package/{notification.B-norGiB.js → notification.tadg6lCc.js} +2 -2
  104. package/package.json +4 -3
  105. package/partials/index.js +32 -32
  106. package/{popover.DFVDZY-m.js → popover.CXq7VoZt.js} +3 -3
  107. package/radio.pyM5ma9s.js +134 -0
  108. package/{radiogroup.DaThoMfq.js → radiogroup.sdob0iPE.js} +3 -3
  109. package/{scroller.Cu7H_VCT.js → scroller.B1LijjCF.js} +1 -1
  110. package/{select.CMdKf7tC.js → select.CZ0C3yJD.js} +5 -4
  111. package/{skiptocontent.CHVh0hbr.js → skiptocontent.CAQy194o.js} +1 -1
  112. package/slider.B3u5du_Q.js +12 -0
  113. package/{step.DKf4CHGr.js → step.DaJFsafj.js} +1 -1
  114. package/{stepper.CCP_igpJ.js → stepper.DcaZESJi.js} +3 -3
  115. package/styles/scss/ds/lib/ds-internal/_input.scss +12 -3
  116. package/styles/scss/ds/lib/ds-internal/_link-button.scss +10 -2
  117. package/styles/scss/ds/lib/link-button.scss +11 -3
  118. package/{tablist.DZgo49nZ.js → tablist.mX5nQWwH.js} +1 -1
  119. package/{tabs.BkoT7feH.js → tabs.DjWfks34.js} +2 -2
  120. package/{textarea.DMn20z4p.js → textarea.69r-5faY.js} +4 -3
  121. package/{toast.Dvs8woTH.js → toast.FzO5KoiK.js} +2 -2
  122. package/{toastmanager.pi_Fhd5t.js → toastmanager.BGIYNKkT.js} +1 -1
  123. package/{tooltip.QJe_bfO-.js → tooltip.Cj3AvYgB.js} +22 -23
  124. package/{topbar.Bxwvp9Lf.js → topbar.CAujTZAE.js} +2 -2
  125. package/utils/useIsomorphicLayoutEffect.d.ts +2 -2
  126. package/assets/Button.C8sNwIeW.css +0 -1
  127. package/assets/CustomReactSelect.E_jJFVew.css +0 -1
  128. package/assets/Fieldset.CW9dBvAo.css +0 -1
  129. package/assets/InputFile.BnIvK65P.css +0 -1
  130. package/assets/InputNumber.BoiCIR1f.css +0 -1
  131. package/assets/InputPassword.Dk3_vNLV.css +0 -1
  132. package/assets/InputSearch.C1_4cVCi.css +0 -1
  133. package/assets/LinkButton.B86yacK5.css +0 -1
  134. package/assets/RadioGroup.CM2mYOzc.css +0 -1
  135. package/assets/Select.COxLltX7.css +0 -1
  136. package/assets/Slider.DPEmJ3HD.css +0 -1
  137. package/assets/Textarea.y3MW7VW0.css +0 -1
  138. package/assets/buttonround.BN3vUDc_.css +0 -1
  139. package/assets/input.DTu4g_iA.css +0 -1
  140. package/assets/radio.CgpGvYc-.css +0 -1
  141. package/button.DHuKanZP.js +0 -13
  142. package/buttonround.CMlmEDaN.js +0 -96
  143. package/chunks/Button.DCZgBNmA.js +0 -142
  144. package/chunks/CheckboxGroup.BuFd1luB.js +0 -72
  145. package/chunks/Fieldset.DiMtr6Vw.js +0 -74
  146. package/chunks/InputFile.C8nt9Fu8.js +0 -218
  147. package/chunks/InputNumber.CbH1XJfl.js +0 -267
  148. package/chunks/InputPassword.DbdjuSiJ.js +0 -136
  149. package/chunks/InputSearch.joxmugiv.js +0 -173
  150. package/chunks/LinkButton.BZgIGgc8.js +0 -132
  151. package/chunks/RadioGroup.CexC4v2Z.js +0 -104
  152. package/chunks/Select.BEIdNMML.js +0 -164
  153. package/chunks/Slider.CR0zYHeZ.js +0 -291
  154. package/chunks/Textarea.Du2RII5u.js +0 -168
  155. package/chunks/floating-ui.dom.BT8pKtCQ.js +0 -1005
  156. package/chunks/floating-ui.react.3FjeMiuN.js +0 -1999
  157. package/combobox.jG5GRA7C.js +0 -65
  158. package/input.DuEbg7d6.js +0 -206
  159. package/radio.DHUfSPai.js +0 -126
  160. package/slider.C5dK6KcG.js +0 -11
  161. /package/components/InputNumber/{InputNumberutils.test.d.ts → InputNumber.utils.test.d.ts} +0 -0
@@ -0,0 +1,181 @@
1
+ "use client";
2
+ import { jsxs as n, jsx as u, Fragment as be } from "react/jsx-runtime";
3
+ import { c as f } from "./index.DL9mof6u.js";
4
+ import { forwardRef as _e, useState as i, useRef as he, useEffect as m } from "react";
5
+ import { g as I, p as X } from "./helpers.CexwVao7.js";
6
+ import { u as Z } from "./useBreakpoint.1txsny17.js";
7
+ import "./index.D-sRdssb.js";
8
+ import { Asterisk as me } from "../asterisk.B2ih8VwF.js";
9
+ import { D as xe } from "./Popover.C9tT8xkE.js";
10
+ import { D as ve } from "./SystemFeedback.CjlARKki.js";
11
+ import '../assets/Textarea.B1HOakic.css';const Se = "ds-textarea_textarea_19e2t_1", Ce = "ds-textarea_textarea--small_19e2t_9", we = "ds-textarea_textarea--invalid_19e2t_121", ye = "ds-textarea_textarea--resize-auto_19e2t_145", De = "ds-textarea_root_19e2t_155", Ae = "ds-textarea_hint_19e2t_155", Te = "ds-textarea_label-wrapper_19e2t_155", Ie = "ds-textarea_label_19e2t_155", Ne = "ds-textarea_label--disabled_19e2t_295", ke = "ds-textarea_label-wrapper--hidden_19e2t_307", Re = "ds-textarea_feedback_19e2t_335", Ee = "ds-textarea_footer_19e2t_339", He = "ds-textarea_footer--has-system-feedback_19e2t_344", ge = "ds-textarea_char-count_19e2t_353", $e = "ds-textarea_char-count-announcer_19e2t_366", a = {
12
+ textarea: Se,
13
+ textareaSmall: Ce,
14
+ textareaInvalid: we,
15
+ textareaResizeAuto: ye,
16
+ root: De,
17
+ hint: Ae,
18
+ labelWrapper: Te,
19
+ label: Ie,
20
+ labelDisabled: Ne,
21
+ labelWrapperHidden: ke,
22
+ feedback: Re,
23
+ footer: Ee,
24
+ footerHasSystemFeedback: He,
25
+ charCount: ge,
26
+ charCountAnnouncer: $e
27
+ }, Xe = ["medium", "small"], Pe = ({
28
+ id: r,
29
+ label: p,
30
+ hideLabel: x,
31
+ popoverContent: v
32
+ }) => {
33
+ if (!r)
34
+ throw new Error(I("DSTextarea", 'A unique "id" prop is required. Please add a unique "id" prop to the DSTextarea component.'));
35
+ if (!p)
36
+ throw new Error(I("DSTextarea", `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}.`));
37
+ x && v && console.warn(I("DSTextarea", "Using a popover when hideLabel is set to true is not supported."));
38
+ }, Ve = _e(({
39
+ id: r,
40
+ label: p,
41
+ charsLimitText: x = "Character limit reached",
42
+ charsRemainingText: v = "Characters remaining:",
43
+ className: G,
44
+ defaultValue: J,
45
+ disabled: N = !1,
46
+ hint: S,
47
+ hideLabel: k = !1,
48
+ invalid: s = !1,
49
+ maxLength: e,
50
+ popoverContent: C,
51
+ popoverInfoButtonProps: K,
52
+ readonly: R = !1,
53
+ required: E = !1,
54
+ resize: b = "vertical",
55
+ size: Q = "medium",
56
+ systemFeedback: l,
57
+ value: w,
58
+ wrapperClassName: Y,
59
+ onChange: H,
60
+ onInput: g,
61
+ ...L
62
+ }, _) => {
63
+ process.env.NODE_ENV !== "production" && Pe({
64
+ id: r,
65
+ label: p,
66
+ hideLabel: Z(k),
67
+ popoverContent: C
68
+ });
69
+ const [ee, $] = i(J || ""), [c, P] = i(0), [te, V] = i(0), [ae, W] = i("off"), [B, y] = i(l), [D, A] = i(s), F = w !== void 0, h = F ? w : ee, o = he(null), j = e !== void 0 && e > 0, T = D && B, re = (t) => {
70
+ o.current = t, typeof _ == "function" ? _(t) : _ && (_.current = t);
71
+ }, q = Z(k);
72
+ m(() => {
73
+ if (!e || e <= 0)
74
+ return;
75
+ c >= e * 0.8 ? W("polite") : W("off");
76
+ const t = setTimeout(() => {
77
+ V(e - c || 0);
78
+ }, 1e3);
79
+ return () => clearTimeout(t);
80
+ }, [c]), m(() => {
81
+ $(h || ""), d(), e && e > 0 && (P(h.toString().length || 0), V(e - h.toString().length || 0));
82
+ }, [w]), m(() => {
83
+ s && l ? (y(l), A(s)) : !s && e && e >= 0 && c >= e ? (A(!0), y(x)) : (y(l), A(s));
84
+ }, [s, D, l, c]), m(() => {
85
+ if (b === "auto")
86
+ return d(), window.addEventListener("resize", d), () => window.removeEventListener("resize", d);
87
+ }, [b, o.current]);
88
+ const se = f(a.root, Y), oe = f(a.textarea, G, {
89
+ // small textarea
90
+ [a.textareaSmall]: Q === "small",
91
+ // invalid state
92
+ [a.textareaInvalid]: D,
93
+ // resize handling
94
+ [a.textareaResizeAuto]: b === "auto"
95
+ }), ne = f(a.label, {
96
+ [a.labelDisabled]: N
97
+ }), le = f(a.labelWrapper, {
98
+ // hide label only visually to keep them available for assistive technologies
99
+ [a.labelWrapperHidden]: q
100
+ }), ce = f(a.footer, {
101
+ [a.footerHasSystemFeedback]: T
102
+ }), z = `${r}-label`, M = `${r}-feedback`, O = `${r}-hint`, U = `${r}-char-count-announcer`, ie = S ? ` ${O}` : "", d = () => {
103
+ if (o.current && b === "auto") {
104
+ o.current.style.height = "auto";
105
+ const t = X(o.current.scrollHeight), pe = X(2);
106
+ o.current.style.height = `${// We need to add 2px (border-top & border-bottom) to the scrollHeight to prevent the textarea
107
+ // from jumping as soon as the user starts typing.
108
+ t + pe}rem`;
109
+ }
110
+ }, de = () => {
111
+ const t = [];
112
+ return e && e > 0 && t.push(U), s && l && t.push(M), t.length > 0 ? t.join(" ") : void 0;
113
+ }, ue = (t) => {
114
+ g && g(t), e && e > 0 && P(o.current?.value.length || 0), d();
115
+ }, fe = (t) => {
116
+ H && H(t), F || $(t.target.value);
117
+ };
118
+ return /* @__PURE__ */ n("div", { className: se, children: [
119
+ /* @__PURE__ */ n("div", { className: le, children: [
120
+ /* @__PURE__ */ n("label", { className: ne, id: z, htmlFor: r, children: [
121
+ p,
122
+ E && /* @__PURE__ */ u(me, {})
123
+ ] }),
124
+ C && !q && /* @__PURE__ */ u(xe, { placement: "top", defaultAnchorButtonProps: K, children: C })
125
+ ] }),
126
+ S && /* @__PURE__ */ u("div", { className: a.hint, id: O, children: S }),
127
+ /* @__PURE__ */ u(
128
+ "textarea",
129
+ {
130
+ className: oe,
131
+ id: r,
132
+ ...L,
133
+ ref: re,
134
+ "aria-labelledby": `${z}${ie}`,
135
+ "aria-describedby": de(),
136
+ "aria-invalid": s,
137
+ "aria-disabled": R,
138
+ maxLength: e,
139
+ readOnly: R,
140
+ required: E,
141
+ disabled: N,
142
+ value: h,
143
+ defaultValue: void 0,
144
+ rows: void 0,
145
+ cols: void 0,
146
+ onChange: fe,
147
+ onInput: ue
148
+ }
149
+ ),
150
+ j || T ? /* @__PURE__ */ n("div", { className: ce, children: [
151
+ T && /* @__PURE__ */ u(ve, { className: a.feedback, message: B, variant: "error", id: M }),
152
+ j && /* @__PURE__ */ n(be, { children: [
153
+ /* @__PURE__ */ n("div", { className: a.charCount, "aria-hidden": "true", children: [
154
+ c,
155
+ "/",
156
+ e
157
+ ] }),
158
+ /* @__PURE__ */ n(
159
+ "div",
160
+ {
161
+ className: a.charCountAnnouncer,
162
+ id: U,
163
+ "aria-live": ae,
164
+ "aria-atomic": "true",
165
+ children: [
166
+ v,
167
+ " ",
168
+ te
169
+ ]
170
+ }
171
+ )
172
+ ] })
173
+ ] }) : null
174
+ ] });
175
+ });
176
+ Ve.displayName = "DSTextarea";
177
+ export {
178
+ Ve as D,
179
+ Xe as T,
180
+ Pe as v
181
+ };
@@ -3,7 +3,7 @@ import { jsx as S, jsxs as y } from "react/jsx-runtime";
3
3
  import { d as E } from "./index.D-sRdssb.js";
4
4
  import { c as W } from "./index.DL9mof6u.js";
5
5
  import { forwardRef as L } from "react";
6
- import { D as M } from "./Button.DCZgBNmA.js";
6
+ import { D as M } from "./Button.CQlIao-Z.js";
7
7
  import { D as O } from "./Icon.CDLyB7Pv.js";
8
8
  import '../assets/Toast.CGyKXb4V.css';const P = "ds-toast_root_1jbef_5", z = "ds-toast_root--closing_1jbef_15", A = "ds-toast_root--success_1jbef_56", R = "ds-toast_root--info_1jbef_60", $ = "ds-toast_root--warning_1jbef_64", q = "ds-toast_content_1jbef_69", F = "ds-toast_content--hide-icon_1jbef_76", G = "ds-toast_icon_1jbef_80", J = "ds-toast_message_1jbef_84", s = {
9
9
  root: P,