@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
@@ -1,74 +0,0 @@
1
- "use client";
2
- import { jsxs as p, jsx as i, Fragment as j } from "react/jsx-runtime";
3
- import { c as m } from "./index.DL9mof6u.js";
4
- import "react";
5
- import { Asterisk as y } from "../asterisk.B2ih8VwF.js";
6
- import { DSHeading as M } from "../heading.DHLpT4dc.js";
7
- import { D as x } from "./SystemFeedback.CjlARKki.js";
8
- import { g as D } from "./helpers.CexwVao7.js";
9
- import "./index.D-sRdssb.js";
10
- import '../assets/Fieldset.CW9dBvAo.css';const E = "ds-fieldset_root_dtiam_1", q = "ds-fieldset_child-wrapper_dtiam_98", C = "ds-fieldset_legend_dtiam_105", P = "ds-fieldset_legend--utility--m_dtiam_109", T = "ds-fieldset_description_dtiam_121", U = "ds-fieldset_description--small_dtiam_135", W = "ds-fieldset_system-feedback_dtiam_139", s = {
11
- root: E,
12
- childWrapper: q,
13
- legend: C,
14
- legendUtilityM: P,
15
- description: T,
16
- descriptionSmall: U,
17
- systemFeedback: W
18
- }, z = ({
19
- description: a,
20
- id: e,
21
- legend: l,
22
- systemFeedback: t
23
- }) => {
24
- if (!e && (a || t))
25
- throw new Error(D("DSFieldset", 'A unique "id" prop is required when providing the description or systemFeedback property. Please add a unique "id" prop to the DSFieldset component.'));
26
- if (!l)
27
- throw new Error(D("DSFieldset", "The legend prop is required. Please add the legend prop to the DSFieldset component."));
28
- }, G = ({
29
- children: a,
30
- legend: e,
31
- className: l,
32
- description: t,
33
- disabled: b = !1,
34
- id: n,
35
- invalid: c = !1,
36
- required: f = !1,
37
- systemFeedback: o,
38
- ...u
39
- }) => {
40
- process.env.NODE_ENV !== "production" && z({
41
- description: t,
42
- id: n,
43
- legend: e,
44
- systemFeedback: o
45
- });
46
- let d, g, _;
47
- const r = typeof e == "object" && e !== void 0;
48
- r && ({
49
- headingSize: d,
50
- headingTag: g,
51
- headingText: _
52
- } = e);
53
- const h = `${n}-feedback`, S = `${n}-description`, F = [c && o && h, t && S].filter(Boolean).join(" ") || void 0, N = !r || d === "small" || d === "small-uppercase", v = m(s.root, l), k = m(s.legend, {
54
- [s.legendUtilityM]: !r
55
- }), w = m(s.description, {
56
- [s.descriptionSmall]: N
57
- });
58
- return /* @__PURE__ */ p("fieldset", { className: v, disabled: b, ...u, "aria-invalid": c, "aria-describedby": F, children: [
59
- /* @__PURE__ */ i("legend", { className: k, children: r ? /* @__PURE__ */ p(M, { tag: g, size: d, children: [
60
- _,
61
- f && /* @__PURE__ */ i(y, {})
62
- ] }) : /* @__PURE__ */ p(j, { children: [
63
- e,
64
- f && /* @__PURE__ */ i(y, {})
65
- ] }) }),
66
- t && /* @__PURE__ */ i("span", { id: S, className: w, children: t }),
67
- c && o && /* @__PURE__ */ i(x, { id: h, variant: "error", message: o, className: s.systemFeedback }),
68
- /* @__PURE__ */ i("div", { className: s.childWrapper, children: a })
69
- ] });
70
- };
71
- export {
72
- G as D,
73
- z as v
74
- };
@@ -1,218 +0,0 @@
1
- "use client";
2
- import { jsxs as h, jsx as a, Fragment as pe } from "react/jsx-runtime";
3
- import { c as b } from "./index.DL9mof6u.js";
4
- import { forwardRef as ge, useState as U, useRef as be, useCallback as me } from "react";
5
- import { t as De } from "./translate.nuU7uChI.js";
6
- import { u as Z } from "./useBreakpoint.BzR_yaIv.js";
7
- import "./index.D-sRdssb.js";
8
- import { g as _e } from "./AriaLiveRegions.utils.CybNIBSa.js";
9
- import { Asterisk as he } from "../asterisk.B2ih8VwF.js";
10
- import { D as Ie } from "./Button.DCZgBNmA.js";
11
- import { FileList as ve } from "../filelist.DgVuWpR3.js";
12
- import { D as Se } from "./Icon.CDLyB7Pv.js";
13
- import { D as we } from "./SystemFeedback.CjlARKki.js";
14
- import { g as I } from "./helpers.CexwVao7.js";
15
- import '../assets/InputFile.BnIvK65P.css';const Fe = "ds-input-file_root_1snnq_1", qe = "ds-input-file_hint_1snnq_1", ze = "ds-input-file_label_1snnq_1", Ne = "ds-input-file_browse-button--is-dragging-filled_1snnq_4", Le = "ds-input-file_browse-button--is-dragging_1snnq_4", ke = "ds-input-file_label--hidden_1snnq_35", ye = "ds-input-file_label--disabled_1snnq_48", Be = "ds-input-file_feedback_1snnq_68", Te = "ds-input-file_dropzone_1snnq_72", Ae = "ds-input-file_dropzone--disabled_1snnq_78", $e = "ds-input-file_dropzone--invalid_1snnq_92", Ce = "ds-input-file_dropzone--is-dragging_1snnq_95", Re = "ds-input-file_hint-drop-zone_1snnq_98", Ee = "ds-input-file_upload-icon_1snnq_101", Pe = "ds-input-file_browse-button-dropzone--is-dragging_1snnq_104", xe = "ds-input-file_instructions_1snnq_107", He = "ds-input-file_input_1snnq_144", Oe = "ds-input-file_required-sr-info_1snnq_148", n = {
16
- root: Fe,
17
- hint: qe,
18
- label: ze,
19
- browseButtonIsDraggingFilled: Ne,
20
- browseButtonIsDragging: Le,
21
- labelHidden: ke,
22
- labelDisabled: ye,
23
- feedback: Be,
24
- dropzone: Te,
25
- dropzoneDisabled: Ae,
26
- dropzoneInvalid: $e,
27
- dropzoneIsDragging: Ce,
28
- hintDropZone: Re,
29
- uploadIcon: Ee,
30
- browseButtonDropzoneIsDragging: Pe,
31
- instructions: xe,
32
- input: He,
33
- requiredSrInfo: Oe
34
- }, We = {
35
- dragAndDropInstructions: "Drag and drop files here or",
36
- feedbackFileSize: "File too large. Maximum file size is",
37
- feedbackFileType: "File type not allowed",
38
- // {0} is the file name
39
- fileListRemoveSelectionButtonLabel: "Remove {0} from selected files",
40
- fileListPreviewAltText: "Preview of",
41
- filesSelectedHint: "The following files are selected",
42
- required: "required"
43
- }, Ve = {
44
- dragAndDropInstructions: "Dateien hier hin ziehen oder",
45
- feedbackFileSize: "Datei zu groß. Maximale Dateigröße ist",
46
- feedbackFileType: "Dateityp nicht zugelassen",
47
- // {0} is the file name
48
- fileListRemoveSelectionButtonLabel: "Datei {0} aus der Auswahl entfernen",
49
- fileListPreviewAltText: "Vorschau von",
50
- filesSelectedHint: "Die folgenden Dateien sind ausgewählt",
51
- required: "erforderlich"
52
- }, je = {
53
- en: We,
54
- de: Ve
55
- }, Me = (s, d) => {
56
- const t = d.split(",").map((l) => l.trim().toLowerCase()).filter(Boolean), v = s.name.toLowerCase(), i = s.type.toLowerCase();
57
- return t.some((l) => {
58
- if (l.startsWith("."))
59
- return v.endsWith(l);
60
- if (l.endsWith("/*")) {
61
- const [S] = i.split("/");
62
- return S === l.slice(0, -2);
63
- }
64
- return i === l;
65
- });
66
- }, Ue = ({
67
- id: s,
68
- label: d,
69
- inputFileButtonProps: t
70
- }) => {
71
- if (!s)
72
- throw new Error(I("DSInputFile", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputFile component.'));
73
- if (!d)
74
- throw new Error(I("DSInputFile", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputFile component. If you don't want to display a label, set hideLabel={true}.`));
75
- if (t && t.label?.trim() === "")
76
- throw new Error(I("DSInputFile", "The input file button needs to have a label for a11y reasons. Please add a label to the inputFileButtonProps."));
77
- if (t && t.variant && t.variant !== "outline" && t.variant !== "filled")
78
- throw new Error(I("DSInputFile", "The inputFileButtonProps variant value can only be 'outline' for DSInputFile components inside forms or 'filled' for standalone DSInputFile components."));
79
- }, Ze = ge(({
80
- id: s,
81
- label: d,
82
- accept: t,
83
- className: v,
84
- disabled: i = !1,
85
- fileListItemRemoveButtonProps: l,
86
- hideLabel: S = !1,
87
- hint: p,
88
- inputFileButtonProps: y,
89
- invalid: m = !1,
90
- isHintOutsideDropzone: G = {
91
- base: !0,
92
- m: !1
93
- },
94
- lang: B = "en",
95
- maxSizeInMb: w = 7,
96
- multiple: g = !1,
97
- required: T = !1,
98
- showFileList: J = !0,
99
- showDropzone: c = !1,
100
- systemFeedback: F,
101
- translations: K,
102
- onFilesSelect: A,
103
- ...Q
104
- }, D) => {
105
- const u = De(K || je[B]);
106
- process.env.NODE_ENV !== "production" && Ue({
107
- id: s,
108
- label: d,
109
- inputFileButtonProps: y
110
- });
111
- const {
112
- label: X = B === "en" ? `Choose File${g ? "s" : ""}` : `Datei${g ? "en" : ""} auswählen`,
113
- variant: q = "outline",
114
- ...Y
115
- } = y || {}, [$, C] = U([]), _ = be(null), [f, z] = U(!1), ee = w * 1024 * 1024, N = `${s}-label`, R = `${s}-feedback`, L = `${s}-hint`, E = p ? ` ${L}` : "", ne = Z(S), P = Z(G), te = b(n.root, v), ie = b(n.dropzone, {
116
- [n.dropzoneDisabled]: i,
117
- [n.dropzoneInvalid]: m,
118
- [n.dropzoneIsDragging]: f
119
- }), oe = b(n.label, {
120
- // hide label only visually to keep them available for assistive technologies
121
- [n.labelHidden]: ne,
122
- [n.labelDisabled]: i
123
- }), se = b(n.browseButton, {
124
- [n.browseButtonIsDragging]: f && q === "outline",
125
- [n.browseButtonIsDraggingFilled]: f && q === "filled"
126
- }), re = b(n.browseButtonDropzone, {
127
- [n.browseButtonDropzoneIsDragging]: f
128
- }), ae = [m && F && R].filter(Boolean).join(" ") || void 0, le = (e) => {
129
- _.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
130
- }, x = (e) => {
131
- if (!e)
132
- return;
133
- const r = [];
134
- for (const o of e)
135
- if (t && !Me(o, t) && (o.feedback = `${u("feedbackFileType")}: ${o.type}.`), o.size > ee && (o.feedback = `${u("feedbackFileSize")} ${w} MB.`), r.push(o), !g && r.length > 0)
136
- break;
137
- r.length > 0 && (C(() => {
138
- const o = [...r], M = o.map(({
139
- name: k,
140
- feedback: fe = ""
141
- }) => `${k} ${fe}`).join(", ");
142
- return setTimeout(() => {
143
- ue(`${u("filesSelectedHint")}: ${M}.`);
144
- }, 1e3), o;
145
- }), A?.(r));
146
- }, H = (e) => {
147
- i || (_.current?.click(), e.stopPropagation());
148
- }, O = (e) => {
149
- e.preventDefault(), f || z(!0);
150
- }, W = (e) => {
151
- e.preventDefault(), f && z(!1);
152
- }, V = me((e) => {
153
- e.preventDefault(), !i && (z(!1), x(e.dataTransfer.files));
154
- }, [g, t, w, i]), de = (e) => {
155
- x(e.target.files), _?.current && (_.current.value = "");
156
- }, ce = (e) => {
157
- C((r) => {
158
- const o = r.filter((M, k) => k !== e);
159
- return A?.(o), o;
160
- });
161
- }, ue = (e) => {
162
- const r = _e();
163
- r && (r.innerText = e, setTimeout(() => {
164
- r.innerText = "";
165
- }, 350));
166
- }, j = () => /* @__PURE__ */ a(Ie, { ...Y, className: c ? re : se, type: "button", variant: q, size: c ? "small" : "medium", disabled: i, iconName: c ? void 0 : "upload", onClick: H, "aria-describedby": ae, "aria-invalid": m, children: X });
167
- return /* @__PURE__ */ h("div", { className: te, children: [
168
- /* @__PURE__ */ h("label", { className: oe, id: N, htmlFor: s, children: [
169
- d,
170
- T && /* @__PURE__ */ h(pe, { children: [
171
- /* @__PURE__ */ a(he, {}),
172
- /* @__PURE__ */ a("span", { className: n.requiredSrInfo, children: u("required") })
173
- ] })
174
- ] }),
175
- p && (P || !c) && /* @__PURE__ */ a("div", { className: n.hint, id: L, children: p }),
176
- !c && /* @__PURE__ */ a(
177
- "div",
178
- {
179
- onDragOver: O,
180
- onDragLeave: W,
181
- onDrop: V,
182
- "aria-labelledby": `${N}${E}`,
183
- "aria-disabled": i,
184
- children: j()
185
- }
186
- ),
187
- c && /* @__PURE__ */ h(
188
- "div",
189
- {
190
- className: ie,
191
- onClick: (e) => H(e),
192
- onDragOver: O,
193
- onDragLeave: W,
194
- onDrop: V,
195
- "aria-labelledby": `${N}${E}`,
196
- "aria-disabled": i,
197
- children: [
198
- /* @__PURE__ */ a(Se, { name: "upload", className: n.uploadIcon, size: "x-large" }),
199
- /* @__PURE__ */ a("p", { id: "file-upload-instructions", className: n.instructions, children: u("dragAndDropInstructions") }),
200
- j(),
201
- p && !P && /* @__PURE__ */ a("div", { className: n.hintDropZone, id: L, children: p })
202
- ]
203
- }
204
- ),
205
- /* @__PURE__ */ a("input", { ...Q, type: "file", className: n.input, id: s, ref: le, accept: t, multiple: g, "aria-hidden": "true", required: T, disabled: i, onChange: de }),
206
- m && F && /* @__PURE__ */ a(we, { className: n.feedback, message: F, variant: "error", id: R }),
207
- $.length > 0 && J && /* @__PURE__ */ a(ve, { files: $, onRemoveFile: ce, fileListItemRemoveButtonProps: l, t: u })
208
- ] });
209
- });
210
- Ze.displayName = "DSInputFile";
211
- export {
212
- Ze as D,
213
- We as a,
214
- Ve as b,
215
- je as c,
216
- Me as f,
217
- Ue as v
218
- };
@@ -1,267 +0,0 @@
1
- "use client";
2
- import { jsx as v, jsxs as bt } from "react/jsx-runtime";
3
- import { d as Lt } from "./index.D-sRdssb.js";
4
- import { c as R } from "./index.DL9mof6u.js";
5
- import { forwardRef as Et, useState as Ae, useRef as _t, useEffect as yt } from "react";
6
- import { h as Rt } from "./has-window.ut_-aShB.js";
7
- import { u as Ct } from "./useBreakpoint.BzR_yaIv.js";
8
- import { u as kt } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
9
- import { Asterisk as Ft } from "../asterisk.B2ih8VwF.js";
10
- import { D as It } from "./Button.DCZgBNmA.js";
11
- import { M as ht, a as xt } from "./Input.utils.Dkw7gRrr.js";
12
- import { D as Pt } from "./SystemFeedback.CjlARKki.js";
13
- import { g as Ke } from "./helpers.CexwVao7.js";
14
- import '../assets/InputNumber.BoiCIR1f.css';const $t = "ds-input-number_input_1yj2k_1", Vt = "ds-input-number_input--small_1yj2k_9", Ht = "ds-input-number_input--invalid_1yj2k_121", Tt = "ds-input-number_input--has-affix_1yj2k_197", qt = "ds-input-number_input--is-ready_1yj2k_211", Wt = "ds-input-number_root_1yj2k_222", Mt = "ds-input-number_hint_1yj2k_222", Xt = "ds-input-number_label_1yj2k_222", zt = "ds-input-number_wrapper_1yj2k_226", Gt = "ds-input-number_affix_1yj2k_232", Ot = "ds-input-number_affix--small_1yj2k_253", Ut = "ds-input-number_prefix_1yj2k_266", Jt = "ds-input-number_suffix_1yj2k_272", Kt = "ds-input-number_affix--disabled_1yj2k_278", Qt = "ds-input-number_affix--readonly_1yj2k_289", Yt = "ds-input-number_action-button_1yj2k_325", Zt = "ds-input-number_label--hidden_1yj2k_343", en = "ds-input-number_label--disabled_1yj2k_356", tn = "ds-input-number_feedback_1yj2k_376", nn = "ds-input-number_second-action-button_1yj2k_389", sn = "ds-input-number_value-announcer_1yj2k_393", t = {
15
- input: $t,
16
- inputSmall: Vt,
17
- inputInvalid: Ht,
18
- inputHasAffix: Tt,
19
- inputIsReady: qt,
20
- root: Wt,
21
- hint: Mt,
22
- label: Xt,
23
- wrapper: zt,
24
- affix: Gt,
25
- affixSmall: Ot,
26
- prefix: Ut,
27
- suffix: Jt,
28
- affixDisabled: Kt,
29
- affixReadonly: Qt,
30
- actionButton: Yt,
31
- labelHidden: Zt,
32
- labelDisabled: en,
33
- feedback: tn,
34
- secondActionButton: nn,
35
- valueAnnouncer: sn
36
- }, Nt = (f) => f != null && f !== "", ln = ({
37
- id: f,
38
- label: k,
39
- prefix: e,
40
- suffix: m
41
- }) => {
42
- if (!f)
43
- throw new Error(Ke("DSInputNumber", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputNumber component.'));
44
- if (!k)
45
- throw new Error(Ke("DSInputNumber", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputNumber component. If you don't want to display a label, set hideLabel={true}.`));
46
- e && e.length > ht && console.warn(Ke("DSInputNumber", `Prefix length must not exceed ${ht} characters.`)), m && m.length > xt && console.warn(Ke("DSInputNumber", `Suffix length must not exceed ${xt} characters.`));
47
- }, an = Et((f, k) => {
48
- const e = Lt.c(201);
49
- let m, F, p, l, P, b, _, a, I, o, d, ae, oe, re, ue, ce, de, fe, me, pe, be, N;
50
- e[0] !== f ? ({
51
- id: l,
52
- label: b,
53
- announcementText: ae,
54
- className: m,
55
- disabled: re,
56
- decreaseAmountButtonProps: F,
57
- hint: p,
58
- hideLabel: ue,
59
- invalid: ce,
60
- increaseAmountButtonProps: P,
61
- prefix: a,
62
- max: de,
63
- min: fe,
64
- readonly: me,
65
- required: pe,
66
- size: be,
67
- step: oe,
68
- suffix: o,
69
- systemFeedback: d,
70
- value: N,
71
- onChange: _,
72
- ...I
73
- } = f, e[0] = f, e[1] = m, e[2] = F, e[3] = p, e[4] = l, e[5] = P, e[6] = b, e[7] = _, e[8] = a, e[9] = I, e[10] = o, e[11] = d, e[12] = ae, e[13] = oe, e[14] = re, e[15] = ue, e[16] = ce, e[17] = de, e[18] = fe, e[19] = me, e[20] = pe, e[21] = be, e[22] = N) : (m = e[1], F = e[2], p = e[3], l = e[4], P = e[5], b = e[6], _ = e[7], a = e[8], I = e[9], o = e[10], d = e[11], ae = e[12], oe = e[13], re = e[14], ue = e[15], ce = e[16], de = e[17], fe = e[18], me = e[19], pe = e[20], be = e[21], N = e[22]);
74
- const _e = ae === void 0 ? "Value changed to" : ae, s = re === void 0 ? !1 : re, At = ue === void 0 ? !1 : ue, r = ce === void 0 ? !1 : ce, A = de === void 0 ? 100 : de, S = fe === void 0 ? 0 : fe, u = me === void 0 ? !1 : me, D = pe === void 0 ? !1 : pe, n = be === void 0 ? "medium" : be, ye = oe === void 0 ? 1 : oe;
75
- process.env.NODE_ENV !== "production" && ln({
76
- id: l,
77
- label: b,
78
- prefix: a,
79
- suffix: o
80
- });
81
- let $;
82
- e[23] !== F ? ($ = F || {}, e[23] = F, e[24] = $) : $ = e[24];
83
- let V, H, he;
84
- e[25] !== $ ? ({
85
- label: he,
86
- tooltip: V,
87
- ...H
88
- } = $, e[25] = $, e[26] = V, e[27] = H, e[28] = he) : (V = e[26], H = e[27], he = e[28]);
89
- const Qe = he === void 0 ? "Decrease" : he;
90
- let T;
91
- e[29] !== P ? (T = P || {}, e[29] = P, e[30] = T) : T = e[30];
92
- let q, W, xe;
93
- e[31] !== T ? ({
94
- label: xe,
95
- tooltip: q,
96
- ...W
97
- } = T, e[31] = T, e[32] = q, e[33] = W, e[34] = xe) : (q = e[32], W = e[33], xe = e[34]);
98
- const Ye = xe === void 0 ? "Increase" : xe, [ve, St] = Ae(!1), [c, Ze] = Ae(N), [y, vt] = Ae(""), [et, Dt] = Ae(!1);
99
- let Se;
100
- e[35] === Symbol.for("react.memo_cache_sentinel") ? (Se = {}, e[35] = Se) : Se = e[35];
101
- const [ke, gt] = Ae(Se), h = _t(null);
102
- let De;
103
- e[36] !== k ? (De = (i) => {
104
- h.current = i, typeof k == "function" ? k(i) : k && (k.current = i);
105
- }, e[36] = k, e[37] = De) : De = e[37];
106
- const Ie = De;
107
- let ge;
108
- e[38] !== a ? (ge = a?.substring(0, ht), e[38] = a, e[39] = ge) : ge = e[39];
109
- const tt = ge, nt = _t(null);
110
- let je;
111
- e[40] !== o ? (je = o?.substring(0, xt), e[40] = o, e[41] = je) : je = e[41];
112
- const st = je, lt = _t(null), Ne = Ct(At);
113
- let Be, we;
114
- e[42] !== N ? (Be = () => {
115
- Ze(N);
116
- }, we = [N], e[42] = N, e[43] = Be, e[44] = we) : (Be = e[43], we = e[44]), yt(Be, we);
117
- let Le, Ee;
118
- e[45] !== y ? (Le = () => {
119
- if (y) {
120
- const i = setTimeout(() => {
121
- vt("");
122
- }, 3e3);
123
- return () => clearTimeout(i);
124
- }
125
- }, Ee = [y], e[45] = y, e[46] = Le, e[47] = Ee) : (Le = e[46], Ee = e[47]), yt(Le, Ee);
126
- let Re, Ce;
127
- e[48] === Symbol.for("react.memo_cache_sentinel") ? (Re = () => {
128
- const i = on;
129
- return h.current?.addEventListener("wheel", i, {
130
- passive: !1
131
- }), () => {
132
- h.current?.removeEventListener("wheel", i);
133
- };
134
- }, Ce = [], e[48] = Re, e[49] = Ce) : (Re = e[48], Ce = e[49]), yt(Re, Ce);
135
- let Fe;
136
- e[50] !== n ? (Fe = () => {
137
- const i = n === "medium" ? 16 : 8, L = {};
138
- if (nt.current) {
139
- const E = nt.current.offsetWidth;
140
- L.paddingInlineStart = i + E + "px";
141
- }
142
- if (lt.current) {
143
- const E = lt.current.offsetWidth;
144
- L.paddingInlineEnd = i + E + "px";
145
- }
146
- gt(L), St(!0);
147
- }, e[50] = n, e[51] = Fe) : Fe = e[51];
148
- let Pe;
149
- e[52] !== et || e[53] !== a || e[54] !== n || e[55] !== o ? (Pe = [a, o, n, et], e[52] = et, e[53] = a, e[54] = n, e[55] = o, e[56] = Pe) : Pe = e[56], kt(Fe, Pe);
150
- let $e, Ve;
151
- e[57] === Symbol.for("react.memo_cache_sentinel") ? ($e = () => {
152
- Rt && (async () => {
153
- "fonts" in document && (await document.fonts.load('1em "STIHL Contraface Digital Text Regular"'), Dt(!0));
154
- })();
155
- }, Ve = [], e[57] = $e, e[58] = Ve) : ($e = e[57], Ve = e[58]), kt($e, Ve);
156
- const it = n === "small";
157
- let M, X, z, G, x, O, U, g, J, K, j, B, w;
158
- if (e[59] !== _e || e[60] !== m || e[61] !== s || e[62] !== tt || e[63] !== st || e[64] !== Ie || e[65] !== Ne || e[66] !== p || e[67] !== l || e[68] !== ke || e[69] !== c || e[70] !== r || e[71] !== ve || e[72] !== b || e[73] !== A || e[74] !== S || e[75] !== _ || e[76] !== a || e[77] !== u || e[78] !== D || e[79] !== I || e[80] !== n || e[81] !== ye || e[82] !== o || e[83] !== d || e[84] !== it || e[85] !== y) {
159
- const i = R(t.affix, {
160
- [t.affixSmall]: it,
161
- [t.affixDisabled]: s,
162
- [t.affixReadonly]: u
163
- }), L = `${l}-label`;
164
- x = `${l}-feedback`;
165
- const E = `${l}-hint`, se = `${l}-value-announcer`, jt = p ? ` ${E}` : "";
166
- let Te;
167
- e[99] !== m ? (Te = R(t.root, m), e[99] = m, e[100] = Te) : Te = e[100];
168
- const Bt = Te, at = n === "small", ot = a || o;
169
- let qe;
170
- e[101] !== r || e[102] !== ve || e[103] !== at || e[104] !== ot ? (qe = R(t.input, {
171
- [t.inputSmall]: at,
172
- [t.inputInvalid]: r,
173
- [t.inputHasAffix]: ot,
174
- [t.inputIsReady]: ve
175
- }), e[101] = r, e[102] = ve, e[103] = at, e[104] = ot, e[105] = qe) : qe = e[105];
176
- const rt = qe;
177
- let We;
178
- e[106] !== s || e[107] !== Ne ? (We = R(t.label, {
179
- [t.labelHidden]: Ne,
180
- [t.labelDisabled]: s
181
- }), e[106] = s, e[107] = Ne, e[108] = We) : We = e[108];
182
- const ut = We, ct = n === "small";
183
- let Me;
184
- e[109] !== ct ? (Me = R(t.secondActionButton, {
185
- [t.secondActionButtonSmall]: ct
186
- }), e[109] = ct, e[110] = Me) : Me = e[110], M = Me;
187
- const dt = n === "small";
188
- let Xe;
189
- e[111] !== dt ? (Xe = R(t.actionButton, {
190
- [t.actionButtonSmall]: dt
191
- }), e[111] = dt, e[112] = Xe) : Xe = e[112], G = Xe;
192
- let ze;
193
- e[113] !== r || e[114] !== d || e[115] !== x || e[116] !== se ? (ze = () => {
194
- const C = [se];
195
- return r && d && C.push(x), C.join(" ");
196
- }, e[113] = r, e[114] = d, e[115] = x, e[116] = se, e[117] = ze) : ze = e[117];
197
- const wt = ze;
198
- let Ge;
199
- e[118] !== _e ? (Ge = () => {
200
- if (h.current) {
201
- Ze(h.current.value);
202
- const C = new Event("change", {
203
- bubbles: !0
204
- });
205
- h.current?.dispatchEvent(C), vt(`${_e} ${h.current.value}`);
206
- }
207
- }, e[118] = _e, e[119] = Ge) : Ge = e[119];
208
- const le = Ge;
209
- let Oe;
210
- e[120] !== le ? (Oe = () => {
211
- h.current?.stepDown(), le();
212
- }, e[120] = le, e[121] = Oe) : Oe = e[121], X = Oe;
213
- let Ue;
214
- e[122] !== le ? (Ue = () => {
215
- h.current?.stepUp(), le();
216
- }, e[122] = le, e[123] = Ue) : Ue = e[123], z = Ue;
217
- let Je;
218
- e[124] !== _ ? (Je = (C) => {
219
- Ze(C.target.value), _ && _(C);
220
- }, e[124] = _, e[125] = Je) : Je = e[125];
221
- const ft = Je;
222
- K = Bt;
223
- let ie;
224
- e[126] !== D ? (ie = D && /* @__PURE__ */ v(Ft, {}), e[126] = D, e[127] = ie) : ie = e[127], e[128] !== l || e[129] !== L || e[130] !== b || e[131] !== ut || e[132] !== ie ? (j = /* @__PURE__ */ bt("label", { className: ut, id: L, htmlFor: l, children: [
225
- b,
226
- ie
227
- ] }), e[128] = l, e[129] = L, e[130] = b, e[131] = ut, e[132] = ie, e[133] = j) : j = e[133], e[134] !== p || e[135] !== E ? (B = p && /* @__PURE__ */ v("div", { className: t.hint, id: E, children: p }), e[134] = p, e[135] = E, e[136] = B) : B = e[136], e[137] !== y || e[138] !== se ? (w = /* @__PURE__ */ v("div", { "aria-live": "polite", "aria-atomic": "true", className: t.valueAnnouncer, id: se, children: y }), e[137] = y, e[138] = se, e[139] = w) : w = e[139], O = t.wrapper, U = a && /* @__PURE__ */ v("span", { className: R(i, t.prefix), ref: nt, "aria-disabled": s, children: tt });
228
- const mt = `${L}${jt}`, pt = wt();
229
- e[140] !== s || e[141] !== Ie || e[142] !== ft || e[143] !== l || e[144] !== rt || e[145] !== ke || e[146] !== c || e[147] !== r || e[148] !== A || e[149] !== S || e[150] !== u || e[151] !== D || e[152] !== I || e[153] !== ye || e[154] !== mt || e[155] !== pt ? (g = /* @__PURE__ */ v("input", { className: rt, id: l, ...I, style: ke, ref: Ie, "aria-labelledby": mt, "aria-describedby": pt, "aria-invalid": r, "aria-disabled": u, disabled: s, min: S, max: A, readOnly: u, required: D, step: ye, type: "number", value: c, onChange: ft }), e[140] = s, e[141] = Ie, e[142] = ft, e[143] = l, e[144] = rt, e[145] = ke, e[146] = c, e[147] = r, e[148] = A, e[149] = S, e[150] = u, e[151] = D, e[152] = I, e[153] = ye, e[154] = mt, e[155] = pt, e[156] = g) : g = e[156], J = o && /* @__PURE__ */ v("span", { className: R(i, t.suffix), ref: lt, "aria-disabled": s, children: st }), e[59] = _e, e[60] = m, e[61] = s, e[62] = tt, e[63] = st, e[64] = Ie, e[65] = Ne, e[66] = p, e[67] = l, e[68] = ke, e[69] = c, e[70] = r, e[71] = ve, e[72] = b, e[73] = A, e[74] = S, e[75] = _, e[76] = a, e[77] = u, e[78] = D, e[79] = I, e[80] = n, e[81] = ye, e[82] = o, e[83] = d, e[84] = it, e[85] = y, e[86] = M, e[87] = X, e[88] = z, e[89] = G, e[90] = x, e[91] = O, e[92] = U, e[93] = g, e[94] = J, e[95] = K, e[96] = j, e[97] = B, e[98] = w;
230
- } else
231
- M = e[86], X = e[87], z = e[88], G = e[89], x = e[90], O = e[91], U = e[92], g = e[93], J = e[94], K = e[95], j = e[96], B = e[97], w = e[98];
232
- let Q;
233
- e[157] !== s || e[158] !== c || e[159] !== S || e[160] !== u ? (Q = s || u || Nt(c) && Number(c) <= Number(S), e[157] = s, e[158] = c, e[159] = S, e[160] = u, e[161] = Q) : Q = e[161];
234
- let Y;
235
- e[162] !== M || e[163] !== Qe || e[164] !== V || e[165] !== X || e[166] !== H || e[167] !== n || e[168] !== Q ? (Y = /* @__PURE__ */ v(It, { ...H, hideLabel: !0, theme: "light", iconName: "minus", variant: "filled", className: M, size: n, onClick: X, tooltip: V, disabled: Q, type: "button", children: Qe }), e[162] = M, e[163] = Qe, e[164] = V, e[165] = X, e[166] = H, e[167] = n, e[168] = Q, e[169] = Y) : Y = e[169];
236
- let Z;
237
- e[170] !== s || e[171] !== c || e[172] !== A || e[173] !== u ? (Z = s || u || Nt(c) && Number(c) >= Number(A), e[170] = s, e[171] = c, e[172] = A, e[173] = u, e[174] = Z) : Z = e[174];
238
- let ee;
239
- e[175] !== z || e[176] !== Ye || e[177] !== q || e[178] !== G || e[179] !== W || e[180] !== n || e[181] !== Z ? (ee = /* @__PURE__ */ v(It, { ...W, hideLabel: !0, theme: "light", iconName: "plus", variant: "filled", tooltip: q, className: G, size: n, onClick: z, disabled: Z, type: "button", children: Ye }), e[175] = z, e[176] = Ye, e[177] = q, e[178] = G, e[179] = W, e[180] = n, e[181] = Z, e[182] = ee) : ee = e[182];
240
- let te;
241
- e[183] !== O || e[184] !== U || e[185] !== g || e[186] !== J || e[187] !== Y || e[188] !== ee ? (te = /* @__PURE__ */ bt("div", { className: O, children: [
242
- U,
243
- g,
244
- J,
245
- Y,
246
- ee
247
- ] }), e[183] = O, e[184] = U, e[185] = g, e[186] = J, e[187] = Y, e[188] = ee, e[189] = te) : te = e[189];
248
- let ne;
249
- e[190] !== r || e[191] !== d || e[192] !== x ? (ne = r && d && /* @__PURE__ */ v(Pt, { className: t.feedback, message: d, variant: "error", id: x }), e[190] = r, e[191] = d, e[192] = x, e[193] = ne) : ne = e[193];
250
- let He;
251
- return e[194] !== K || e[195] !== j || e[196] !== B || e[197] !== w || e[198] !== te || e[199] !== ne ? (He = /* @__PURE__ */ bt("div", { className: K, children: [
252
- j,
253
- B,
254
- w,
255
- te,
256
- ne
257
- ] }), e[194] = K, e[195] = j, e[196] = B, e[197] = w, e[198] = te, e[199] = ne, e[200] = He) : He = e[200], He;
258
- });
259
- an.displayName = "DSInputNumber";
260
- function on(f) {
261
- f.preventDefault();
262
- }
263
- export {
264
- an as D,
265
- Nt as i,
266
- ln as v
267
- };