@stihl-design-system/components 1.0.0-RC.27 → 1.0.0-RC.28

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 (80) hide show
  1. package/{accordion.CBaDU14g.js → accordion.B9X4Vlig.js} +1 -1
  2. package/{actionbutton.DEJsLxnQ.js → actionbutton.7x4F7a0U.js} +1 -1
  3. package/{actionlink.Cs6BTCA3.js → actionlink.CV0n19ik.js} +1 -1
  4. package/assets/Accordion.BHWEZCmu.css +1 -0
  5. package/assets/CustomReactSelect.Dq5Hoqv2.css +1 -0
  6. package/assets/{Fieldset.Cy5r0K7n.css → Fieldset.CW9dBvAo.css} +1 -1
  7. package/assets/InputFile.BVgHILAZ.css +1 -0
  8. package/assets/InputPassword.CBpkWGy7.css +1 -0
  9. package/assets/InputSearch.CnPJYH8L.css +1 -0
  10. package/assets/InputStepper.U2h9Kd0t.css +1 -0
  11. package/assets/Select.U7xsC0o1.css +1 -0
  12. package/assets/Slider.DzwSjDPV.css +1 -0
  13. package/assets/Textarea.C4IEEOFR.css +1 -0
  14. package/assets/input.CuIHvnD5.css +1 -0
  15. package/assets/radio.ipbv7OMF.css +1 -0
  16. package/{checkboxgroup.YK8H0YoX.js → checkboxgroup.Bylq97Q9.js} +2 -2
  17. package/chunks/Accordion.BvHroAyn.js +154 -0
  18. package/chunks/ActionButton.BlhiiU3l.js +165 -0
  19. package/chunks/ActionLink.BvFL6rgb.js +138 -0
  20. package/chunks/{CheckboxGroup.DHzpgOWp.js → CheckboxGroup.D4MQD0i0.js} +1 -1
  21. package/chunks/{CustomReactSelect.BPnzhvw1.js → CustomReactSelect.D9B928kB.js} +408 -409
  22. package/chunks/Fieldset.BgZMYAH-.js +74 -0
  23. package/chunks/Header.BSvyYrIV.js +368 -0
  24. package/chunks/InputFile.rC7NJYrU.js +218 -0
  25. package/chunks/InputPassword.5-r36K86.js +132 -0
  26. package/chunks/InputSearch.D4Q99_nR.js +170 -0
  27. package/chunks/InputStepper.EsPAGCFJ.js +259 -0
  28. package/chunks/{RadioGroup.c7YYJdUe.js → RadioGroup.CRP8_vsg.js} +2 -2
  29. package/chunks/Select.lveq1iBY.js +158 -0
  30. package/chunks/Slider.D9MHH4cZ.js +292 -0
  31. package/chunks/Textarea.BRfh8ykm.js +161 -0
  32. package/combobox.pMk_oggm.js +60 -0
  33. package/components/Combobox/Combobox.d.ts +4 -0
  34. package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +1 -1
  35. package/{customreactselect.Bu1i8wkh.js → customreactselect.-DGMZMFu.js} +2 -3
  36. package/{fieldset.DM9ELUJa.js → fieldset.BR9fZReW.js} +1 -1
  37. package/{header.WhQHSuB1.js → header.Z4Oxj_xL.js} +1 -1
  38. package/index.es.js +17 -17
  39. package/input.DAneVu7p.js +199 -0
  40. package/{inputfile.Cmkxf4Vq.js → inputfile.CB-QTIDn.js} +2 -3
  41. package/{inputpassword.CaJBCMA0.js → inputpassword.B_A0JDkz.js} +2 -3
  42. package/{inputsearch.B06DhYzo.js → inputsearch.DUgTkPWm.js} +2 -3
  43. package/{inputstepper.DNY7nzP8.js → inputstepper.DKmlBa0Y.js} +2 -3
  44. package/package.json +1 -1
  45. package/partials/index.js +24 -24
  46. package/{radio.Be4pFOLf.js → radio.z-Mi3J6t.js} +20 -20
  47. package/{radiogroup.BRjwP01C.js → radiogroup.Bk36A24U.js} +3 -3
  48. package/{select.3zE96eWc.js → select.4wUa3vMT.js} +2 -3
  49. package/{slider.CTCf7Xdm.js → slider.BicJfJzc.js} +2 -2
  50. package/styles/scss/ds/index.scss +1 -0
  51. package/styles/scss/ds/lib/ds-internal/_index.scss +1 -0
  52. package/styles/scss/ds/lib/ds-internal/_input.scss +187 -0
  53. package/styles/scss/ds/lib/input.scss +26 -0
  54. package/{textarea.B_3fPtmd.js → textarea.BynOgkpo.js} +2 -3
  55. package/{topbar.2b8fjmA4.js → topbar.Bccms0xZ.js} +1 -1
  56. package/assets/Accordion.DOcfZwq8.css +0 -1
  57. package/assets/CustomReactSelect.B9f_KYFg.css +0 -1
  58. package/assets/InputFile.Dqjz53mb.css +0 -1
  59. package/assets/InputPassword.BuVQ9dRy.css +0 -1
  60. package/assets/InputSearch.Dwtb3Mhw.css +0 -1
  61. package/assets/InputStepper.CBt99L83.css +0 -1
  62. package/assets/Select.CghDnBUQ.css +0 -1
  63. package/assets/Slider.C8i4U4iT.css +0 -1
  64. package/assets/Textarea.BgtH-TTe.css +0 -1
  65. package/assets/input.DFwunFjw.css +0 -1
  66. package/assets/radio.BCB51D_y.css +0 -1
  67. package/chunks/Accordion.eVOD7J_8.js +0 -154
  68. package/chunks/ActionButton.Ck1rGqgm.js +0 -165
  69. package/chunks/ActionLink.DnUNjoAT.js +0 -138
  70. package/chunks/Fieldset.BX46NuLh.js +0 -74
  71. package/chunks/Header.Djs1adPW.js +0 -361
  72. package/chunks/InputFile.vkkg5Pab.js +0 -220
  73. package/chunks/InputPassword.D42uUEGy.js +0 -136
  74. package/chunks/InputSearch.aIbUXVQU.js +0 -174
  75. package/chunks/InputStepper.DFEdUWm7.js +0 -263
  76. package/chunks/Select.B_EHpk22.js +0 -162
  77. package/chunks/Slider.DMSwmGwD.js +0 -292
  78. package/chunks/Textarea.Ce26v6ht.js +0 -163
  79. package/combobox.AaK6QjRl.js +0 -58
  80. package/input.DhxUW3zc.js +0 -203
@@ -1,136 +0,0 @@
1
- "use client";
2
- import { jsx as $, jsxs as rt } from "react/jsx-runtime";
3
- import { d as ht } from "./index.CgTHIF3K.js";
4
- import { c as J } from "./index.CEyLAtio.js";
5
- import { forwardRef as vt, useState as gt, useRef as yt } from "react";
6
- import { u as Pt } from "./useBreakpoint.CMOR9ZOB.js";
7
- import { Asterisk as xt } from "../asterisk.CR60hx8S.js";
8
- import { D as St } from "./Button.CC0qEsuR.js";
9
- import { DSSystemFeedback as Dt } from "../systemfeedback.CLQCbTF6.js";
10
- import { g as pt } from "./helpers.BbWkXTr3.js";
11
- import '../assets/InputPassword.BuVQ9dRy.css';const Bt = "ds-input-password_input_1xglz_1", It = "ds-input-password_input--small_1xglz_9", zt = "ds-input-password_input--invalid_1xglz_121", kt = "ds-input-password_input--has-action-button_1xglz_182", Nt = "ds-input-password_root_1xglz_218", Ct = "ds-input-password_hint_1xglz_227", Ht = "ds-input-password_label_1xglz_227", Lt = "ds-input-password_wrapper_1xglz_231", $t = "ds-input-password_action-button_1xglz_237", qt = "ds-input-password_label--hidden_1xglz_255", At = "ds-input-password_label--disabled_1xglz_268", Tt = "ds-input-password_feedback_1xglz_288", s = {
12
- input: Bt,
13
- inputSmall: It,
14
- inputInvalid: zt,
15
- inputHasActionButton: kt,
16
- root: Nt,
17
- hint: Ct,
18
- label: Ht,
19
- wrapper: Lt,
20
- actionButton: $t,
21
- labelHidden: qt,
22
- labelDisabled: At,
23
- feedback: Tt
24
- }, Et = ({
25
- id: d,
26
- label: i
27
- }) => {
28
- if (!d)
29
- throw new Error(pt("DSInputPassword", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputPassword component.'));
30
- if (!i)
31
- throw new Error(pt("DSInputPassword", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputPassword component. If you don't want to display a label, set hideLabel={true}.`));
32
- }, Vt = vt((d, i) => {
33
- const t = ht.c(82);
34
- let p, n, e, r, c, o, S, D, B, I, z, k, N, u;
35
- t[0] !== d ? ({
36
- id: e,
37
- label: r,
38
- autoComplete: S,
39
- className: p,
40
- disabled: D,
41
- hint: n,
42
- hideLabel: B,
43
- invalid: I,
44
- readonly: z,
45
- required: k,
46
- togglePasswordVisibilityButtonProps: u,
47
- size: N,
48
- systemFeedback: o,
49
- ...c
50
- } = d, t[0] = d, t[1] = p, t[2] = n, t[3] = e, t[4] = r, t[5] = c, t[6] = o, t[7] = S, t[8] = D, t[9] = B, t[10] = I, t[11] = z, t[12] = k, t[13] = N, t[14] = u) : (p = t[1], n = t[2], e = t[3], r = t[4], c = t[5], o = t[6], S = t[7], D = t[8], B = t[9], I = t[10], z = t[11], k = t[12], N = t[13], u = t[14]);
51
- const K = S === void 0 ? "new-password" : S, a = D === void 0 ? !1 : D, ct = B === void 0 ? !1 : B, l = I === void 0 ? !1 : I, q = z === void 0 ? !1 : z, b = k === void 0 ? !1 : k, C = N === void 0 ? "medium" : N;
52
- process.env.NODE_ENV !== "production" && Et({
53
- id: e,
54
- label: r
55
- });
56
- let f;
57
- t[15] !== u ? (f = u || {}, t[15] = u, t[16] = f) : f = t[16];
58
- let m, H, L;
59
- t[17] !== f ? ({
60
- hidePasswordText: L,
61
- showPasswordText: H,
62
- ...m
63
- } = f, t[17] = f, t[18] = m, t[19] = H, t[20] = L) : (m = t[18], H = t[19], L = t[20]);
64
- const ut = L === void 0 ? "Hide password" : L, bt = H === void 0 ? "Show password" : H, [Q, ft] = gt(!1), A = `${e}-label`, w = `${e}-feedback`, T = `${e}-hint`, mt = n ? ` ${T}` : "";
65
- let E;
66
- t[21] !== l || t[22] !== o || t[23] !== w ? (E = [l && o && w].filter(Boolean).join(" ") || void 0, t[21] = l, t[22] = o, t[23] = w, t[24] = E) : E = t[24];
67
- const U = E, W = Pt(ct);
68
- let V;
69
- t[25] !== p ? (V = J(s.root, p), t[25] = p, t[26] = V) : V = t[26];
70
- const X = V, Y = C === "small";
71
- let F;
72
- t[27] !== l || t[28] !== Y ? (F = J(s.input, {
73
- [s.inputSmall]: Y,
74
- [s.inputInvalid]: l,
75
- [s.inputHasActionButton]: !0
76
- }), t[27] = l, t[28] = Y, t[29] = F) : F = t[29];
77
- const Z = F;
78
- let R;
79
- t[30] !== a || t[31] !== W ? (R = J(s.label, {
80
- [s.labelHidden]: W,
81
- [s.labelDisabled]: a
82
- }), t[30] = a, t[31] = W, t[32] = R) : R = t[32];
83
- const tt = R, et = C === "small";
84
- let j;
85
- t[33] !== et ? (j = J(s.actionButton, {
86
- [s.actionButtonSmall]: et
87
- }), t[33] = et, t[34] = j) : j = t[34];
88
- const st = j, wt = yt(null);
89
- let O;
90
- t[35] !== i ? (O = (dt) => {
91
- wt.current = dt, typeof i == "function" ? i(dt) : i && (i.current = dt);
92
- }, t[35] = i, t[36] = O) : O = t[36];
93
- const lt = O;
94
- let M;
95
- t[37] === Symbol.for("react.memo_cache_sentinel") ? (M = () => {
96
- ft(Ft);
97
- }, t[37] = M) : M = t[37];
98
- const _t = M;
99
- let _;
100
- t[38] !== b ? (_ = b && /* @__PURE__ */ $(xt, {}), t[38] = b, t[39] = _) : _ = t[39];
101
- let h;
102
- t[40] !== e || t[41] !== A || t[42] !== r || t[43] !== tt || t[44] !== _ ? (h = /* @__PURE__ */ rt("label", { className: tt, id: A, htmlFor: e, children: [
103
- r,
104
- _
105
- ] }), t[40] = e, t[41] = A, t[42] = r, t[43] = tt, t[44] = _, t[45] = h) : h = t[45];
106
- let v;
107
- t[46] !== n || t[47] !== T ? (v = n && /* @__PURE__ */ $("div", { className: s.hint, id: T, children: n }), t[46] = n, t[47] = T, t[48] = v) : v = t[48];
108
- let g;
109
- t[49] !== l || t[50] !== o || t[51] !== w ? (g = l && o && /* @__PURE__ */ $(Dt, { className: s.feedback, message: o, type: "invalid", id: w }), t[49] = l, t[50] = o, t[51] = w, t[52] = g) : g = t[52];
110
- const ot = `${A}${mt}`, at = Q ? "text" : "password";
111
- let y;
112
- t[53] !== U || t[54] !== K || t[55] !== a || t[56] !== lt || t[57] !== e || t[58] !== Z || t[59] !== l || t[60] !== q || t[61] !== b || t[62] !== c || t[63] !== ot || t[64] !== at ? (y = /* @__PURE__ */ $("input", { className: Z, id: e, ...c, ref: lt, "aria-labelledby": ot, "aria-describedby": U, "aria-invalid": l, "aria-disabled": q, readOnly: q, required: b, disabled: a, autoComplete: K, type: at }), t[53] = U, t[54] = K, t[55] = a, t[56] = lt, t[57] = e, t[58] = Z, t[59] = l, t[60] = q, t[61] = b, t[62] = c, t[63] = ot, t[64] = at, t[65] = y) : y = t[65];
113
- const it = Q ? "eye-closed" : "eye", nt = Q ? ut : bt;
114
- let P;
115
- t[66] !== st || t[67] !== a || t[68] !== m || t[69] !== C || t[70] !== it || t[71] !== nt ? (P = /* @__PURE__ */ $(St, { ...m, hideLabel: !0, theme: "light", iconName: it, variant: "ghost", className: st, size: C, onClick: _t, type: "button", disabled: a, children: nt }), t[66] = st, t[67] = a, t[68] = m, t[69] = C, t[70] = it, t[71] = nt, t[72] = P) : P = t[72];
116
- let x;
117
- t[73] !== y || t[74] !== P ? (x = /* @__PURE__ */ rt("div", { className: s.wrapper, children: [
118
- y,
119
- P
120
- ] }), t[73] = y, t[74] = P, t[75] = x) : x = t[75];
121
- let G;
122
- return t[76] !== X || t[77] !== h || t[78] !== v || t[79] !== g || t[80] !== x ? (G = /* @__PURE__ */ rt("div", { className: X, children: [
123
- h,
124
- v,
125
- g,
126
- x
127
- ] }), t[76] = X, t[77] = h, t[78] = v, t[79] = g, t[80] = x, t[81] = G) : G = t[81], G;
128
- });
129
- Vt.displayName = "DSInputPassword";
130
- function Ft(d) {
131
- return !d;
132
- }
133
- export {
134
- Vt as D,
135
- Et as v
136
- };
@@ -1,174 +0,0 @@
1
- "use client";
2
- import { jsx as L, jsxs as gt } from "react/jsx-runtime";
3
- import { d as Vt } from "./index.CgTHIF3K.js";
4
- import { c as R } from "./index.CEyLAtio.js";
5
- import { forwardRef as Ot, useState as $t, useRef as Et, useEffect as kt } from "react";
6
- import { g as Nt, a as qt } from "./helpers.BbWkXTr3.js";
7
- import { u as jt } from "./useBreakpoint.CMOR9ZOB.js";
8
- import { Asterisk as Ft } from "../asterisk.CR60hx8S.js";
9
- import { D as At } from "./Button.CC0qEsuR.js";
10
- import { DSSystemFeedback as Rt } from "../systemfeedback.CLQCbTF6.js";
11
- import '../assets/InputSearch.Dwtb3Mhw.css';const Tt = "ds-input-search_root_563xs_1", zt = "ds-input-search_input_563xs_5", Mt = "ds-input-search_input--small_563xs_13", Wt = "ds-input-search_input--invalid_563xs_125", Gt = "ds-input-search_input--has-action-button_563xs_186", Jt = "ds-input-search_input--has-second-action-button_563xs_189", Kt = "ds-input-search_hint_563xs_231", Qt = "ds-input-search_label_563xs_231", Ut = "ds-input-search_wrapper_563xs_235", Xt = "ds-input-search_action-button_563xs_241", Yt = "ds-input-search_second-action-button_563xs_245", Zt = "ds-input-search_label--hidden_563xs_263", te = "ds-input-search_label--disabled_563xs_276", ee = "ds-input-search_feedback_563xs_296", s = {
12
- root: Tt,
13
- input: zt,
14
- inputSmall: Mt,
15
- inputInvalid: Wt,
16
- inputHasActionButton: Gt,
17
- inputHasSecondActionButton: Jt,
18
- hint: Kt,
19
- label: Qt,
20
- wrapper: Ut,
21
- actionButton: Xt,
22
- secondActionButton: Yt,
23
- labelHidden: Zt,
24
- labelDisabled: te,
25
- feedback: ee
26
- }, se = ({
27
- id: a,
28
- label: i
29
- }) => {
30
- if (!a)
31
- throw new Error(Nt("DSInputSearch", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputSearch component.'));
32
- if (!i)
33
- throw new Error(Nt("DSInputSearch", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputSearch component. If you don't want to display a label, set hideLabel={true}.`));
34
- }, ne = (a) => !!qt(a, "form"), ae = Ot((a, i) => {
35
- const t = Vt.c(103);
36
- let l, d, e, b, f, m, _, c, H, P, V, O, $, q, j, p;
37
- t[0] !== a ? ({
38
- id: e,
39
- label: b,
40
- className: l,
41
- clearButtonLabel: H,
42
- disabled: P,
43
- hint: d,
44
- hideLabel: V,
45
- invalid: O,
46
- readonly: $,
47
- required: q,
48
- size: j,
49
- systemFeedback: c,
50
- value: p,
51
- submitButtonProps: _,
52
- onChange: f,
53
- ...m
54
- } = a, t[0] = a, t[1] = l, t[2] = d, t[3] = e, t[4] = b, t[5] = f, t[6] = m, t[7] = _, t[8] = c, t[9] = H, t[10] = P, t[11] = V, t[12] = O, t[13] = $, t[14] = q, t[15] = j, t[16] = p) : (l = t[1], d = t[2], e = t[3], b = t[4], f = t[5], m = t[6], _ = t[7], c = t[8], H = t[9], P = t[10], V = t[11], O = t[12], $ = t[13], q = t[14], j = t[15], p = t[16]);
55
- const lt = H === void 0 ? "Clear search field" : H, o = P === void 0 ? !1 : P, Ct = V === void 0 ? !1 : V, n = O === void 0 ? !1 : O, r = $ === void 0 ? !1 : $, v = q === void 0 ? !1 : q, u = j === void 0 ? "medium" : j;
56
- process.env.NODE_ENV !== "production" && se({
57
- id: e,
58
- label: b
59
- });
60
- let S;
61
- t[17] !== _ ? (S = _ || {}, t[17] = _, t[18] = S) : S = t[18];
62
- let y, B, F;
63
- t[19] !== S ? ({
64
- label: F,
65
- onClick: y,
66
- ...B
67
- } = S, t[19] = S, t[20] = y, t[21] = B, t[22] = F) : (y = t[20], B = t[21], F = t[22]);
68
- const ot = F === void 0 ? "Search" : F, [D, xt] = $t(p), ct = Et(null), T = Et(null);
69
- let z;
70
- t[23] !== i ? (z = (h) => {
71
- T.current = h, typeof i == "function" ? i(h) : i && (i.current = h);
72
- }, t[23] = i, t[24] = z) : z = t[24];
73
- const rt = z, ut = jt(Ct);
74
- let M, W;
75
- t[25] !== p ? (M = () => {
76
- xt(p);
77
- }, W = [p], t[25] = p, t[26] = M, t[27] = W) : (M = t[26], W = t[27]), kt(M, W);
78
- let G;
79
- t[28] !== e ? (G = () => {
80
- ct.current && !ne(ct.current) && process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && console.warn(Nt("DSInputSearch", `The DSInputSearch component with the id "${e}" is not within a form element. This may cause issues with form submission. Please ensure the DSInputSearch component is within a form element.`));
81
- }, t[28] = e, t[29] = G) : G = t[29];
82
- let J;
83
- t[30] === Symbol.for("react.memo_cache_sentinel") ? (J = [], t[30] = J) : J = t[30], kt(G, J);
84
- const K = `${e}-label`, I = `${e}-feedback`, Q = `${e}-hint`, Lt = d ? ` ${Q}` : "";
85
- let U;
86
- t[31] !== n || t[32] !== c || t[33] !== I ? (U = [n && c && I].filter(Boolean).join(" ") || void 0, t[31] = n, t[32] = c, t[33] = I, t[34] = U) : U = t[34];
87
- const dt = U, X = D !== "" && D !== void 0 && D !== null;
88
- let Y;
89
- t[35] !== l ? (Y = R(s.root, l), t[35] = l, t[36] = Y) : Y = t[36];
90
- const pt = Y, ht = u === "small", bt = X && !r && !o;
91
- let Z;
92
- t[37] !== n || t[38] !== ht || t[39] !== bt ? (Z = R(s.input, {
93
- [s.inputSmall]: ht,
94
- [s.inputInvalid]: n,
95
- [s.inputHasActionButton]: !0,
96
- [s.inputHasSecondActionButton]: bt
97
- }), t[37] = n, t[38] = ht, t[39] = bt, t[40] = Z) : Z = t[40];
98
- const ft = Z;
99
- let tt;
100
- t[41] !== o || t[42] !== ut ? (tt = R(s.label, {
101
- [s.labelHidden]: ut,
102
- [s.labelDisabled]: o
103
- }), t[41] = o, t[42] = ut, t[43] = tt) : tt = t[43];
104
- const mt = tt, _t = u === "small";
105
- let et;
106
- t[44] !== _t ? (et = R(s.actionButton, {
107
- [s.actionButtonSmall]: _t
108
- }), t[44] = _t, t[45] = et) : et = t[45];
109
- const vt = et, St = u === "small";
110
- let st;
111
- t[46] !== St ? (st = R(s.secondActionButton, {
112
- [s.secondActionButtonSmall]: St
113
- }), t[46] = St, t[47] = st) : st = t[47];
114
- const yt = st, Ht = ie;
115
- let nt;
116
- t[48] === Symbol.for("react.memo_cache_sentinel") ? (nt = () => {
117
- var wt;
118
- if (!T.current)
119
- return;
120
- Ht(T.current, "");
121
- const h = new Event("change", {
122
- bubbles: !0
123
- });
124
- (wt = T.current) == null || wt.dispatchEvent(h);
125
- }, t[48] = nt) : nt = t[48];
126
- const Pt = nt;
127
- let at;
128
- t[49] !== f ? (at = (h) => {
129
- xt(h.target.value), f && f(h);
130
- }, t[49] = f, t[50] = at) : at = t[50];
131
- const Bt = at;
132
- let g;
133
- t[51] !== v ? (g = v && /* @__PURE__ */ L(Ft, {}), t[51] = v, t[52] = g) : g = t[52];
134
- let N;
135
- t[53] !== e || t[54] !== K || t[55] !== b || t[56] !== mt || t[57] !== g ? (N = /* @__PURE__ */ gt("label", { className: mt, id: K, htmlFor: e, children: [
136
- b,
137
- g
138
- ] }), t[53] = e, t[54] = K, t[55] = b, t[56] = mt, t[57] = g, t[58] = N) : N = t[58];
139
- let x;
140
- t[59] !== d || t[60] !== Q ? (x = d && /* @__PURE__ */ L("div", { className: s.hint, id: Q, children: d }), t[59] = d, t[60] = Q, t[61] = x) : x = t[61];
141
- let w;
142
- t[62] !== n || t[63] !== c || t[64] !== I ? (w = n && c && /* @__PURE__ */ L(Rt, { className: s.feedback, message: c, type: "invalid", id: I }), t[62] = n, t[63] = c, t[64] = I, t[65] = w) : w = t[65];
143
- const Dt = `${K}${Lt}`;
144
- let E;
145
- t[66] !== dt || t[67] !== o || t[68] !== rt || t[69] !== Bt || t[70] !== e || t[71] !== ft || t[72] !== D || t[73] !== n || t[74] !== r || t[75] !== v || t[76] !== m || t[77] !== Dt ? (E = /* @__PURE__ */ L("input", { className: ft, id: e, ...m, ref: rt, "aria-labelledby": Dt, "aria-describedby": dt, "aria-invalid": n, "aria-disabled": r, readOnly: r, required: v, disabled: o, type: "search", value: D, onChange: Bt }), t[66] = dt, t[67] = o, t[68] = rt, t[69] = Bt, t[70] = e, t[71] = ft, t[72] = D, t[73] = n, t[74] = r, t[75] = v, t[76] = m, t[77] = Dt, t[78] = E) : E = t[78];
146
- let k;
147
- t[79] !== yt || t[80] !== lt || t[81] !== o || t[82] !== X || t[83] !== r || t[84] !== u ? (k = X && !r && !o && /* @__PURE__ */ L(At, { hideLabel: !0, theme: "light", iconName: "cross", className: yt, variant: "ghost", size: u, onClick: Pt, type: "button", tabIndex: -1, children: lt }), t[79] = yt, t[80] = lt, t[81] = o, t[82] = X, t[83] = r, t[84] = u, t[85] = k) : k = t[85];
148
- const It = o || r;
149
- let A;
150
- t[86] !== y || t[87] !== B || t[88] !== u || t[89] !== vt || t[90] !== ot || t[91] !== It ? (A = /* @__PURE__ */ L(At, { ...B, hideLabel: !0, theme: "light", iconName: "magnifying-glass", className: vt, variant: "ghost", size: u, onClick: y, type: "submit", disabled: It, children: ot }), t[86] = y, t[87] = B, t[88] = u, t[89] = vt, t[90] = ot, t[91] = It, t[92] = A) : A = t[92];
151
- let C;
152
- t[93] !== E || t[94] !== k || t[95] !== A ? (C = /* @__PURE__ */ gt("div", { className: s.wrapper, children: [
153
- E,
154
- k,
155
- A
156
- ] }), t[93] = E, t[94] = k, t[95] = A, t[96] = C) : C = t[96];
157
- let it;
158
- return t[97] !== pt || t[98] !== N || t[99] !== x || t[100] !== w || t[101] !== C ? (it = /* @__PURE__ */ gt("div", { className: pt, ref: ct, children: [
159
- N,
160
- x,
161
- w,
162
- C
163
- ] }), t[97] = pt, t[98] = N, t[99] = x, t[100] = w, t[101] = C, t[102] = it) : it = t[102], it;
164
- });
165
- ae.displayName = "DSInputSearch";
166
- function ie(a, i) {
167
- const t = Object.getPrototypeOf(a), l = Object.getOwnPropertyDescriptor(t, "value");
168
- l != null && l.set ? l.set.call(a, i) : a.value = i;
169
- }
170
- export {
171
- ae as D,
172
- ne as i,
173
- se as v
174
- };
@@ -1,263 +0,0 @@
1
- "use client";
2
- import { jsx as S, jsxs as ft } from "react/jsx-runtime";
3
- import { d as Bt } from "./index.CgTHIF3K.js";
4
- import { c as L } from "./index.CEyLAtio.js";
5
- import { forwardRef as wt, useState as ve, useRef as mt, useEffect as bt } from "react";
6
- import { h as Lt } from "./has-window.ut_-aShB.js";
7
- import { u as Et } from "./useBreakpoint.CMOR9ZOB.js";
8
- import { u as vt } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
9
- import { Asterisk as Rt } from "../asterisk.CR60hx8S.js";
10
- import { D as gt } from "./Button.CC0qEsuR.js";
11
- import { M as _t, a as yt } from "./Input.utils.Cnnzvuk4.js";
12
- import { DSSystemFeedback as Ct } from "../systemfeedback.CLQCbTF6.js";
13
- import { g as Ge } from "./helpers.BbWkXTr3.js";
14
- import '../assets/InputStepper.CBt99L83.css';const Ft = "ds-input-stepper_input_g8jky_1", Pt = "ds-input-stepper_input--small_g8jky_9", $t = "ds-input-stepper_input--invalid_g8jky_121", Ht = "ds-input-stepper_input--has-affix_g8jky_197", Vt = "ds-input-stepper_input--is-ready_g8jky_211", Tt = "ds-input-stepper_root_g8jky_222", qt = "ds-input-stepper_hint_g8jky_231", Wt = "ds-input-stepper_label_g8jky_231", Mt = "ds-input-stepper_wrapper_g8jky_235", Xt = "ds-input-stepper_affix_g8jky_241", zt = "ds-input-stepper_affix--small_g8jky_262", Gt = "ds-input-stepper_affix--disabled_g8jky_275", Ot = "ds-input-stepper_prefix_g8jky_283", Ut = "ds-input-stepper_affix--readonly_g8jky_286", Jt = "ds-input-stepper_suffix_g8jky_296", Kt = "ds-input-stepper_action-button_g8jky_303", Qt = "ds-input-stepper_label--hidden_g8jky_321", Yt = "ds-input-stepper_label--disabled_g8jky_334", Zt = "ds-input-stepper_feedback_g8jky_354", en = "ds-input-stepper_second-action-button_g8jky_368", tn = "ds-input-stepper_value-announcer_g8jky_372", t = {
15
- input: Ft,
16
- inputSmall: Pt,
17
- inputInvalid: $t,
18
- inputHasAffix: Ht,
19
- inputIsReady: Vt,
20
- root: Tt,
21
- hint: qt,
22
- label: Wt,
23
- wrapper: Mt,
24
- affix: Xt,
25
- affixSmall: zt,
26
- affixDisabled: Gt,
27
- prefix: Ot,
28
- affixReadonly: Ut,
29
- suffix: Jt,
30
- actionButton: Kt,
31
- labelHidden: Qt,
32
- labelDisabled: Yt,
33
- feedback: Zt,
34
- secondActionButton: en,
35
- valueAnnouncer: tn
36
- }, nn = ({
37
- id: E,
38
- label: k,
39
- prefix: e,
40
- suffix: p
41
- }) => {
42
- if (!E)
43
- throw new Error(Ge("DSInputStepper", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputStepper component.'));
44
- if (!k)
45
- throw new Error(Ge("DSInputStepper", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputStepper component. If you don't want to display a label, set hideLabel={true}.`));
46
- e && e.length > _t && console.warn(Ge("DSInputStepper", `Prefix length must not exceed ${_t} characters.`)), p && p.length > yt && console.warn(Ge("DSInputStepper", `Suffix length must not exceed ${yt} characters.`));
47
- }, sn = wt((E, k) => {
48
- const e = Bt.c(187);
49
- let p, R, m, s, C, b, _, l, I, i, d, te, ne, se, le, ie, ae, oe, re, ce, ue, y;
50
- e[0] !== E ? ({
51
- id: s,
52
- label: b,
53
- announcementText: te,
54
- className: p,
55
- disabled: se,
56
- decreaseAmountButtonProps: R,
57
- hint: m,
58
- hideLabel: le,
59
- invalid: ie,
60
- increaseAmountButtonProps: C,
61
- prefix: l,
62
- max: ae,
63
- min: oe,
64
- readonly: re,
65
- required: ce,
66
- size: ue,
67
- step: ne,
68
- suffix: i,
69
- systemFeedback: d,
70
- value: y,
71
- onChange: _,
72
- ...I
73
- } = E, e[0] = E, e[1] = p, e[2] = R, e[3] = m, e[4] = s, e[5] = C, e[6] = b, e[7] = _, e[8] = l, e[9] = I, e[10] = i, e[11] = d, e[12] = te, e[13] = ne, e[14] = se, e[15] = le, e[16] = ie, e[17] = ae, e[18] = oe, e[19] = re, e[20] = ce, e[21] = ue, e[22] = y) : (p = e[1], R = e[2], m = e[3], s = e[4], C = e[5], b = e[6], _ = e[7], l = e[8], I = e[9], i = e[10], d = e[11], te = e[12], ne = e[13], se = e[14], le = e[15], ie = e[16], ae = e[17], oe = e[18], re = e[19], ce = e[20], ue = e[21], y = e[22]);
74
- const de = te === void 0 ? "Value changed to" : te, c = se === void 0 ? !1 : se, xt = le === void 0 ? !1 : le, o = ie === void 0 ? !1 : ie, F = ae === void 0 ? 100 : ae, P = oe === void 0 ? 0 : oe, h = re === void 0 ? !1 : re, A = ce === void 0 ? !1 : ce, n = ue === void 0 ? "medium" : ue, pe = ne === void 0 ? 1 : ne;
75
- process.env.NODE_ENV !== "production" && nn({
76
- id: s,
77
- label: b,
78
- prefix: l,
79
- suffix: i
80
- });
81
- let $;
82
- e[23] !== R ? ($ = R || {}, e[23] = R, e[24] = $) : $ = e[24];
83
- let H, fe;
84
- e[25] !== $ ? ({
85
- label: fe,
86
- ...H
87
- } = $, e[25] = $, e[26] = H, e[27] = fe) : (H = e[26], fe = e[27]);
88
- const Oe = fe === void 0 ? "Decrease" : fe;
89
- let V;
90
- e[28] !== C ? (V = C || {}, e[28] = C, e[29] = V) : V = e[29];
91
- let T, me;
92
- e[30] !== V ? ({
93
- label: me,
94
- ...T
95
- } = V, e[30] = V, e[31] = T, e[32] = me) : (T = e[31], me = e[32]);
96
- const Ue = me === void 0 ? "Increase" : me, [be, St] = ve(!1), [v, Je] = ve(y), [g, ht] = ve(""), [Ke, kt] = ve(!1);
97
- let ge;
98
- e[33] === Symbol.for("react.memo_cache_sentinel") ? (ge = {}, e[33] = ge) : ge = e[33];
99
- const [_e, It] = ve(ge), x = mt(null);
100
- let xe;
101
- e[34] !== k ? (xe = (a) => {
102
- x.current = a, typeof k == "function" ? k(a) : k && (k.current = a);
103
- }, e[34] = k, e[35] = xe) : xe = e[35];
104
- const ye = xe;
105
- let Se;
106
- e[36] !== l ? (Se = l == null ? void 0 : l.substring(0, _t), e[36] = l, e[37] = Se) : Se = e[37];
107
- const Qe = Se, Ye = mt(null);
108
- let ke;
109
- e[38] !== i ? (ke = i == null ? void 0 : i.substring(0, yt), e[38] = i, e[39] = ke) : ke = e[39];
110
- const Ze = ke, et = mt(null), he = Et(xt);
111
- let Ie, Ae;
112
- e[40] !== y ? (Ie = () => {
113
- y && Je(y);
114
- }, Ae = [y], e[40] = y, e[41] = Ie, e[42] = Ae) : (Ie = e[41], Ae = e[42]), bt(Ie, Ae);
115
- let De, je;
116
- e[43] !== g ? (De = () => {
117
- if (g) {
118
- const a = setTimeout(() => {
119
- ht("");
120
- }, 3e3);
121
- return () => clearTimeout(a);
122
- }
123
- }, je = [g], e[43] = g, e[44] = De, e[45] = je) : (De = e[44], je = e[45]), bt(De, je);
124
- let Ne, Be;
125
- e[46] === Symbol.for("react.memo_cache_sentinel") ? (Ne = () => {
126
- var f;
127
- const a = ln;
128
- return (f = x.current) == null || f.addEventListener("wheel", a, {
129
- passive: !1
130
- }), () => {
131
- var u;
132
- (u = x.current) == null || u.removeEventListener("wheel", a);
133
- };
134
- }, Be = [], e[46] = Ne, e[47] = Be) : (Ne = e[46], Be = e[47]), bt(Ne, Be);
135
- let we;
136
- e[48] !== n ? (we = () => {
137
- const a = n === "medium" ? 16 : 8, f = {};
138
- if (Ye.current) {
139
- const u = Ye.current.offsetWidth;
140
- f.paddingInlineStart = a + u + "px";
141
- }
142
- if (et.current) {
143
- const u = et.current.offsetWidth;
144
- f.paddingInlineEnd = a + u + "px";
145
- }
146
- It(f), St(!0);
147
- }, e[48] = n, e[49] = we) : we = e[49];
148
- let Le;
149
- e[50] !== Ke || e[51] !== l || e[52] !== n || e[53] !== i ? (Le = [l, i, n, Ke], e[50] = Ke, e[51] = l, e[52] = n, e[53] = i, e[54] = Le) : Le = e[54], vt(we, Le);
150
- let Ee, Re;
151
- e[55] === Symbol.for("react.memo_cache_sentinel") ? (Ee = () => {
152
- Lt && (async () => {
153
- "fonts" in document && (await document.fonts.load('1em "STIHL Contraface Digital Text Regular"'), kt(!0));
154
- })();
155
- }, Re = [], e[55] = Ee, e[56] = Re) : (Ee = e[55], Re = e[56]), vt(Ee, Re);
156
- const tt = n === "small";
157
- let q, W, M, X, z, G, D, O, U, j, N, B, w;
158
- if (e[57] !== de || e[58] !== p || e[59] !== c || e[60] !== Qe || e[61] !== Ze || e[62] !== ye || e[63] !== he || e[64] !== m || e[65] !== s || e[66] !== _e || e[67] !== v || e[68] !== o || e[69] !== be || e[70] !== b || e[71] !== F || e[72] !== P || e[73] !== _ || e[74] !== l || e[75] !== h || e[76] !== A || e[77] !== I || e[78] !== n || e[79] !== pe || e[80] !== i || e[81] !== d || e[82] !== tt || e[83] !== g) {
159
- const a = L(t.affix, {
160
- [t.affixSmall]: tt,
161
- [t.affixDisabled]: c,
162
- [t.affixReadonly]: h
163
- }), f = `${s}-label`, u = `${s}-feedback`, Fe = `${s}-hint`, Y = `${s}-value-announcer`, At = m ? ` ${Fe}` : "";
164
- let Pe;
165
- e[97] !== p ? (Pe = L(t.root, p), e[97] = p, e[98] = Pe) : Pe = e[98];
166
- const Dt = Pe, lt = n === "small", it = l || i;
167
- let $e;
168
- e[99] !== o || e[100] !== be || e[101] !== lt || e[102] !== it ? ($e = L(t.input, {
169
- [t.inputSmall]: lt,
170
- [t.inputInvalid]: o,
171
- [t.inputHasAffix]: it,
172
- [t.inputIsReady]: be
173
- }), e[99] = o, e[100] = be, e[101] = lt, e[102] = it, e[103] = $e) : $e = e[103];
174
- const at = $e;
175
- let He;
176
- e[104] !== c || e[105] !== he ? (He = L(t.label, {
177
- [t.labelHidden]: he,
178
- [t.labelDisabled]: c
179
- }), e[104] = c, e[105] = he, e[106] = He) : He = e[106];
180
- const ot = He, rt = n === "small";
181
- let Ve;
182
- e[107] !== rt ? (Ve = L(t.secondActionButton, {
183
- [t.secondActionButtonSmall]: rt
184
- }), e[107] = rt, e[108] = Ve) : Ve = e[108], q = Ve;
185
- const ct = n === "small";
186
- let Te;
187
- e[109] !== ct ? (Te = L(t.actionButton, {
188
- [t.actionButtonSmall]: ct
189
- }), e[109] = ct, e[110] = Te) : Te = e[110], X = Te;
190
- let qe;
191
- e[111] !== o || e[112] !== d || e[113] !== u || e[114] !== Y ? (qe = () => {
192
- const r = [Y];
193
- return o && d && r.push(u), r.join(" ");
194
- }, e[111] = o, e[112] = d, e[113] = u, e[114] = Y, e[115] = qe) : qe = e[115];
195
- const jt = qe;
196
- let We;
197
- e[116] !== de ? (We = () => {
198
- var r;
199
- if (x.current) {
200
- Je(x.current.value);
201
- const Nt = new Event("change", {
202
- bubbles: !0
203
- });
204
- (r = x.current) == null || r.dispatchEvent(Nt), ht(`${de} ${x.current.value}`);
205
- }
206
- }, e[116] = de, e[117] = We) : We = e[117];
207
- const Z = We;
208
- let Me;
209
- e[118] !== Z ? (Me = () => {
210
- var r;
211
- (r = x.current) == null || r.stepDown(), Z();
212
- }, e[118] = Z, e[119] = Me) : Me = e[119], W = Me;
213
- let Xe;
214
- e[120] !== Z ? (Xe = () => {
215
- var r;
216
- (r = x.current) == null || r.stepUp(), Z();
217
- }, e[120] = Z, e[121] = Xe) : Xe = e[121], M = Xe;
218
- let ze;
219
- e[122] !== _ ? (ze = (r) => {
220
- Je(r.target.value), _ && _(r);
221
- }, e[122] = _, e[123] = ze) : ze = e[123];
222
- const ut = ze;
223
- U = Dt;
224
- let ee;
225
- e[124] !== A ? (ee = A && /* @__PURE__ */ S(Rt, {}), e[124] = A, e[125] = ee) : ee = e[125], e[126] !== s || e[127] !== f || e[128] !== b || e[129] !== ot || e[130] !== ee ? (j = /* @__PURE__ */ ft("label", { className: ot, id: f, htmlFor: s, children: [
226
- b,
227
- ee
228
- ] }), e[126] = s, e[127] = f, e[128] = b, e[129] = ot, e[130] = ee, e[131] = j) : j = e[131], e[132] !== m || e[133] !== Fe ? (N = m && /* @__PURE__ */ S("div", { className: t.hint, id: Fe, children: m }), e[132] = m, e[133] = Fe, e[134] = N) : N = e[134], e[135] !== g || e[136] !== Y ? (B = /* @__PURE__ */ S("div", { "aria-live": "polite", "aria-atomic": "true", className: t.valueAnnouncer, id: Y, children: g }), e[135] = g, e[136] = Y, e[137] = B) : B = e[137], e[138] !== o || e[139] !== d || e[140] !== u ? (w = o && d && /* @__PURE__ */ S(Ct, { className: t.feedback, message: d, type: "invalid", id: u }), e[138] = o, e[139] = d, e[140] = u, e[141] = w) : w = e[141], z = t.wrapper, G = l && /* @__PURE__ */ S("span", { className: L(a, t.prefix), ref: Ye, "aria-disabled": c, children: Qe });
229
- const dt = `${f}${At}`, pt = jt();
230
- e[142] !== c || e[143] !== ye || e[144] !== ut || e[145] !== s || e[146] !== at || e[147] !== _e || e[148] !== v || e[149] !== o || e[150] !== F || e[151] !== P || e[152] !== h || e[153] !== A || e[154] !== I || e[155] !== pe || e[156] !== dt || e[157] !== pt ? (D = /* @__PURE__ */ S("input", { className: at, id: s, ...I, style: _e, ref: ye, "aria-labelledby": dt, "aria-describedby": pt, "aria-invalid": o, "aria-disabled": h, disabled: c, min: P, max: F, readOnly: h, required: A, step: pe, type: "number", value: v, onChange: ut }), e[142] = c, e[143] = ye, e[144] = ut, e[145] = s, e[146] = at, e[147] = _e, e[148] = v, e[149] = o, e[150] = F, e[151] = P, e[152] = h, e[153] = A, e[154] = I, e[155] = pe, e[156] = dt, e[157] = pt, e[158] = D) : D = e[158], O = i && /* @__PURE__ */ S("span", { className: L(a, t.suffix), ref: et, "aria-disabled": c, children: Ze }), e[57] = de, e[58] = p, e[59] = c, e[60] = Qe, e[61] = Ze, e[62] = ye, e[63] = he, e[64] = m, e[65] = s, e[66] = _e, e[67] = v, e[68] = o, e[69] = be, e[70] = b, e[71] = F, e[72] = P, e[73] = _, e[74] = l, e[75] = h, e[76] = A, e[77] = I, e[78] = n, e[79] = pe, e[80] = i, e[81] = d, e[82] = tt, e[83] = g, e[84] = q, e[85] = W, e[86] = M, e[87] = X, e[88] = z, e[89] = G, e[90] = D, e[91] = O, e[92] = U, e[93] = j, e[94] = N, e[95] = B, e[96] = w;
231
- } else
232
- q = e[84], W = e[85], M = e[86], X = e[87], z = e[88], G = e[89], D = e[90], O = e[91], U = e[92], j = e[93], N = e[94], B = e[95], w = e[96];
233
- const nt = c || h || !!v && Number(v) <= Number(P);
234
- let J;
235
- e[159] !== q || e[160] !== Oe || e[161] !== W || e[162] !== H || e[163] !== n || e[164] !== nt ? (J = /* @__PURE__ */ S(gt, { ...H, hideLabel: !0, theme: "light", iconName: "minus", variant: "filled", className: q, size: n, onClick: W, disabled: nt, type: "button", children: Oe }), e[159] = q, e[160] = Oe, e[161] = W, e[162] = H, e[163] = n, e[164] = nt, e[165] = J) : J = e[165];
236
- const st = c || h || !!v && Number(v) >= Number(F);
237
- let K;
238
- e[166] !== M || e[167] !== Ue || e[168] !== X || e[169] !== T || e[170] !== n || e[171] !== st ? (K = /* @__PURE__ */ S(gt, { ...T, hideLabel: !0, theme: "light", iconName: "plus", variant: "filled", className: X, size: n, onClick: M, disabled: st, type: "button", children: Ue }), e[166] = M, e[167] = Ue, e[168] = X, e[169] = T, e[170] = n, e[171] = st, e[172] = K) : K = e[172];
239
- let Q;
240
- e[173] !== z || e[174] !== G || e[175] !== D || e[176] !== O || e[177] !== J || e[178] !== K ? (Q = /* @__PURE__ */ ft("div", { className: z, children: [
241
- G,
242
- D,
243
- O,
244
- J,
245
- K
246
- ] }), e[173] = z, e[174] = G, e[175] = D, e[176] = O, e[177] = J, e[178] = K, e[179] = Q) : Q = e[179];
247
- let Ce;
248
- return e[180] !== U || e[181] !== j || e[182] !== N || e[183] !== B || e[184] !== w || e[185] !== Q ? (Ce = /* @__PURE__ */ ft("div", { className: U, children: [
249
- j,
250
- N,
251
- B,
252
- w,
253
- Q
254
- ] }), e[180] = U, e[181] = j, e[182] = N, e[183] = B, e[184] = w, e[185] = Q, e[186] = Ce) : Ce = e[186], Ce;
255
- });
256
- sn.displayName = "DSInputStepper";
257
- function ln(E) {
258
- E.preventDefault();
259
- }
260
- export {
261
- sn as D,
262
- nn as v
263
- };