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

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 (124) hide show
  1. package/{accordion.B9X4Vlig.js → accordion.DkwtJy--.js} +2 -2
  2. package/{actionbutton.7x4F7a0U.js → actionbutton.DHt1AL7U.js} +2 -2
  3. package/{actionlink.CV0n19ik.js → actionlink.BML1jenE.js} +2 -2
  4. package/assets/Accordion.BJb4TOG0.css +1 -0
  5. package/assets/CustomReactSelect.D0b1Hg1T.css +1 -0
  6. package/assets/InputFile.CCQxsulT.css +1 -0
  7. package/assets/InputPassword.124xVOiO.css +1 -0
  8. package/assets/InputSearch.Bkg-1urJ.css +1 -0
  9. package/assets/InputStepper.Dth4qZN_.css +1 -0
  10. package/assets/Select.CYACicZ3.css +1 -0
  11. package/assets/{systemfeedback.BX2zCzSL.css → SystemFeedback.RcrPepSZ.css} +1 -1
  12. package/assets/Textarea.BXWhXpXx.css +1 -0
  13. package/assets/input.ONbL-_C1.css +1 -0
  14. package/assets/radio.CgpGvYc-.css +1 -0
  15. package/{banner.CgQdUb_c.js → banner.B2YO054K.js} +1 -1
  16. package/{breadcrumb.x78HJy5P.js → breadcrumb.BS-S3zUI.js} +3 -3
  17. package/{button.BD_04tIG.js → button.CPilCCUI.js} +3 -3
  18. package/{buttonround.BT3OfowK.js → buttonround.C426mO4d.js} +2 -2
  19. package/{checkbox.BktYXQmJ.js → checkbox.BtlUvs0z.js} +3 -3
  20. package/{checkboxgroup.Bylq97Q9.js → checkboxgroup.C5NgyyQF.js} +2 -2
  21. package/{chip.BKtNbt4y.js → chip.tVIG1ysH.js} +2 -2
  22. package/{chipgroup.BWpqUzXF.js → chipgroup.CjIK0Z0x.js} +1 -1
  23. package/chunks/Accordion.C5V5IcM-.js +170 -0
  24. package/chunks/{ActionButton.BlhiiU3l.js → ActionButton.CzaWZGPt.js} +1 -1
  25. package/chunks/{ActionLink.BvFL6rgb.js → ActionLink.BlhqDEtq.js} +1 -1
  26. package/chunks/{Breadcrumb.B7g30dIO.js → Breadcrumb.BGzwzvh8.js} +2 -2
  27. package/chunks/{Button.CC0qEsuR.js → Button.B7xF1E19.js} +2 -2
  28. package/chunks/{Checkbox.BIQAKBVy.js → Checkbox.DxV7-F5W.js} +14 -14
  29. package/chunks/{CheckboxGroup.D4MQD0i0.js → CheckboxGroup.Dy_6tiGk.js} +2 -2
  30. package/chunks/{Chip.DifLxHH7.js → Chip.31UfPwQF.js} +1 -1
  31. package/chunks/{CustomReactSelect.D9B928kB.js → CustomReactSelect.iE5iTdez.js} +348 -346
  32. package/chunks/{Dialog.BuEEJ199.js → Dialog.B_2pKRnd.js} +1 -1
  33. package/chunks/{Drawer.BXUGmpJI.js → Drawer.HFlBTcqN.js} +1 -1
  34. package/chunks/{Fieldset.BgZMYAH-.js → Fieldset.CjIfmN_5.js} +12 -12
  35. package/chunks/Icon.DGTYCv63.js +231 -0
  36. package/chunks/InputFile.DvOatDzg.js +220 -0
  37. package/chunks/InputPassword.DC2POUc1.js +136 -0
  38. package/chunks/InputSearch.B0aCuPRZ.js +174 -0
  39. package/chunks/InputStepper.B_ZjgY_f.js +263 -0
  40. package/chunks/{LinkButton.DmXVHeyZ.js → LinkButton.DdTspmJz.js} +1 -1
  41. package/chunks/{NavigationTabList.IQM074Vb.js → NavigationTabList.dYFYTmWv.js} +1 -1
  42. package/chunks/{NavigationTabs.BofhX8bD.js → NavigationTabs.ClpVGcl0.js} +1 -1
  43. package/chunks/{Notification.B-3dPVUE.js → Notification.DIdIhGTQ.js} +2 -2
  44. package/chunks/{RadioGroup.CRP8_vsg.js → RadioGroup.peTeMK45.js} +2 -2
  45. package/chunks/Select.BDHLJ2ma.js +162 -0
  46. package/chunks/{Slider.D9MHH4cZ.js → Slider.kyVr7BLk.js} +1 -1
  47. package/chunks/SystemFeedback.B9f67mjJ.js +38 -0
  48. package/chunks/{Tabs.Bl4K3Kjn.js → Tabs.CkVL8Jw8.js} +1 -1
  49. package/chunks/Textarea.ORkJUx-S.js +163 -0
  50. package/chunks/{Toast.BHz0vlGz.js → Toast.DHo4pLH3.js} +2 -2
  51. package/chunks/caret-down.CupuwAF6.js +10 -0
  52. package/chunks/caret-right.DKtu4PQe.js +10 -0
  53. package/chunks/collapse.Dvv3mgkv.js +10 -0
  54. package/{combobox.pMk_oggm.js → combobox.Bk2ycofh.js} +1 -1
  55. package/components/Accordion/Accordion.utils.d.ts +3 -1
  56. package/components/ActionButton/ActionButton.d.ts +5 -5
  57. package/components/ActionLink/ActionLink.d.ts +5 -5
  58. package/components/Header/Header.d.ts +1 -1
  59. package/components/Radio/Radio.d.ts +0 -6
  60. package/components/SystemFeedback/SystemFeedback.d.ts +13 -5
  61. package/components/SystemFeedback/SystemFeedback.utils.d.ts +4 -7
  62. package/components/TopBar/TopBar.d.ts +1 -1
  63. package/customreactselect.Hnch9LGg.js +14 -0
  64. package/{dialog.CGsUCqhR.js → dialog.7sWoqGwL.js} +2 -2
  65. package/{drawer.BcAo4TO0.js → drawer.DsF4KIPn.js} +2 -2
  66. package/{fieldset.BR9fZReW.js → fieldset.DUFUMcT-.js} +2 -2
  67. package/{filelist.Cj9U-Jx8.js → filelist.nunJKxkv.js} +7 -7
  68. package/{flag.BHaAfp6B.js → flag.D_iN8iD6.js} +1 -1
  69. package/{floatingactionbutton.DSZXUHB_.js → floatingactionbutton.DOH2k0gv.js} +2 -2
  70. package/{icon.DwfGhFCd.js → icon.vMQcEBnH.js} +1 -1
  71. package/index.d.ts +2 -0
  72. package/index.es.js +175 -170
  73. package/input.BKHOY118.js +203 -0
  74. package/{inputfile.CB-QTIDn.js → inputfile.DK8759wV.js} +7 -6
  75. package/inputpassword.rV_ZZw5F.js +13 -0
  76. package/{inputsearch.DUgTkPWm.js → inputsearch.CmhakTpa.js} +5 -4
  77. package/{inputstepper.DKmlBa0Y.js → inputstepper.5olvh4tk.js} +5 -4
  78. package/{link.DGuYGfh2.js → link.D_FjTyoZ.js} +2 -2
  79. package/{linkbutton.B3q0B_yb.js → linkbutton.D2C4vykc.js} +2 -2
  80. package/{navigationtablist.CS9yEGdP.js → navigationtablist.CVjh1k-b.js} +2 -2
  81. package/{navigationtabs.DQ1kE-h4.js → navigationtabs.BGfi9AG2.js} +2 -2
  82. package/{notification.D8BDaU5x.js → notification.Dn-FZWEL.js} +3 -3
  83. package/{optioncheckbox.CEEPAq0u.js → optioncheckbox.D97W3zeW.js} +1 -1
  84. package/package.json +1 -1
  85. package/partials/index.js +28 -22
  86. package/partials/lib/partials.d.ts +1 -1
  87. package/radio.7_N_alaS.js +126 -0
  88. package/{radiogroup.Bk36A24U.js → radiogroup.J8WpEEo8.js} +3 -3
  89. package/{scroller.CCA6kFR6.js → scroller.BiRLQg__.js} +1 -1
  90. package/{inputpassword.B_A0JDkz.js → select.DIzGPVx3.js} +5 -4
  91. package/{skiptocontent.D1UkPmhD.js → skiptocontent._F-d8y5b.js} +1 -1
  92. package/{slider.BicJfJzc.js → slider.DuJK0RdB.js} +2 -2
  93. package/{spinner.CeGt8DxU.js → spinner.Dht6FspZ.js} +1 -1
  94. package/{switch.CtULjgZq.js → switch.B37S4vfP.js} +2 -2
  95. package/systemfeedback.C_2PhwKe.js +10 -0
  96. package/{tablist.Dzwe0_J4.js → tablist.g_Nwu6GA.js} +3 -3
  97. package/{tabs.yudjJk9d.js → tabs.oh9-wHPp.js} +2 -2
  98. package/{textarea.BynOgkpo.js → textarea.dQ12-oYB.js} +4 -3
  99. package/{toast.Bhpwj1NF.js → toast.sMNbfKxi.js} +3 -3
  100. package/{toastmanager.BHk65ynQ.js → toastmanager.CVamaS5T.js} +1 -1
  101. package/types/icon-types.d.ts +1 -1
  102. package/assets/Accordion.BHWEZCmu.css +0 -1
  103. package/assets/CustomReactSelect.Dq5Hoqv2.css +0 -1
  104. package/assets/InputFile.BVgHILAZ.css +0 -1
  105. package/assets/InputPassword.CBpkWGy7.css +0 -1
  106. package/assets/InputSearch.CnPJYH8L.css +0 -1
  107. package/assets/InputStepper.U2h9Kd0t.css +0 -1
  108. package/assets/Select.U7xsC0o1.css +0 -1
  109. package/assets/Textarea.C4IEEOFR.css +0 -1
  110. package/assets/input.CuIHvnD5.css +0 -1
  111. package/assets/radio.ipbv7OMF.css +0 -1
  112. package/chunks/Accordion.BvHroAyn.js +0 -154
  113. package/chunks/Icon.C0161Glk.js +0 -231
  114. package/chunks/InputFile.rC7NJYrU.js +0 -218
  115. package/chunks/InputPassword.5-r36K86.js +0 -132
  116. package/chunks/InputSearch.D4Q99_nR.js +0 -170
  117. package/chunks/InputStepper.EsPAGCFJ.js +0 -259
  118. package/chunks/Select.lveq1iBY.js +0 -158
  119. package/chunks/Textarea.BRfh8ykm.js +0 -161
  120. package/customreactselect.-DGMZMFu.js +0 -13
  121. package/input.DAneVu7p.js +0 -199
  122. package/radio.z-Mi3J6t.js +0 -134
  123. package/select.4wUa3vMT.js +0 -12
  124. package/systemfeedback.CLQCbTF6.js +0 -44
@@ -1,154 +0,0 @@
1
- "use client";
2
- import { jsx as i, jsxs as q } from "react/jsx-runtime";
3
- import { d as me } from "./index.CgTHIF3K.js";
4
- import { c as E } from "./index.CEyLAtio.js";
5
- import { forwardRef as ie, useRef as le, useState as pe, useImperativeHandle as de, useEffect as ae } from "react";
6
- import { DSHeading as ue } from "../heading.BXFBZhKv.js";
7
- import { D as ye } from "./Icon.C0161Glk.js";
8
- import { NumberIndicator as he } from "../numberindicator.Ddf3ESi7.js";
9
- import { g as ee } from "./helpers.BbWkXTr3.js";
10
- import '../assets/Accordion.BHWEZCmu.css';const fe = "ds-accordion_details_wpym3_1", _e = "ds-accordion_summary_wpym3_115", we = "ds-accordion_summary--utility--m_wpym3_154", Se = "ds-accordion_summary--flush_wpym3_183", ge = "ds-accordion_summary--small_wpym3_251", ve = "ds-accordion_summary-content-wrapper_wpym3_256", Ce = "ds-accordion_summary-content-wrapper--flush_wpym3_262", We = "ds-accordion_summary-content-wrapper--chevron-left_wpym3_266", Ne = "ds-accordion_heading-summary-wrapper_wpym3_271", De = "ds-accordion_heading-summary_wpym3_271", Oe = "ds-accordion_hint_wpym3_282", Ee = "ds-accordion_icon_wpym3_296", Fe = "ds-accordion_icon--open_wpym3_307", be = "ds-accordion_content-wrapper_wpym3_319", Ae = "ds-accordion_content-wrapper--flush_wpym3_325", Ie = "ds-accordion_content-wrapper--small_wpym3_329", t = {
11
- details: fe,
12
- summary: _e,
13
- summaryUtilityM: we,
14
- summaryFlush: Se,
15
- summarySmall: ge,
16
- summaryContentWrapper: ve,
17
- summaryContentWrapperFlush: Ce,
18
- summaryContentWrapperChevronLeft: We,
19
- headingSummaryWrapper: Ne,
20
- headingSummary: De,
21
- hint: Oe,
22
- icon: Ee,
23
- iconOpen: Fe,
24
- contentWrapper: be,
25
- contentWrapperFlush: Ae,
26
- contentWrapperSmall: Ie
27
- }, qe = ["medium", "small"], Ve = ["left", "right"], Te = ({
28
- children: v,
29
- hint: V,
30
- numberIndicatorValue: e,
31
- summary: n
32
- }) => {
33
- if (!v)
34
- throw new Error(ee("DSAccordion", "The component requires children to be set."));
35
- if (!n)
36
- throw new Error(ee("DSAccordion", "The summary prop is required. Please add the summary prop to the DSAccordion component."));
37
- if (V && e)
38
- throw new Error(ee("DSAccordion", "The hint and numberIndicator props cannot be used together. Please remove either the hint prop or the numberIndicatorValue prop."));
39
- }, Pe = ie((v, V) => {
40
- const e = me.c(65);
41
- let n, l, a, r, p, s, C, W, N, D;
42
- e[0] !== v ? ({
43
- children: n,
44
- summary: s,
45
- chevronPosition: C,
46
- className: l,
47
- hint: a,
48
- isFlush: W,
49
- isOpen: N,
50
- numberIndicatorValue: r,
51
- size: D,
52
- ...p
53
- } = v, e[0] = v, e[1] = n, e[2] = l, e[3] = a, e[4] = r, e[5] = p, e[6] = s, e[7] = C, e[8] = W, e[9] = N, e[10] = D) : (n = e[1], l = e[2], a = e[3], r = e[4], p = e[5], s = e[6], C = e[7], W = e[8], N = e[9], D = e[10]);
54
- const ce = C === void 0 ? "right" : C, o = W === void 0 ? !1 : W, m = N === void 0 ? !1 : N, te = D === void 0 ? "medium" : D;
55
- process.env.NODE_ENV !== "production" && Te({
56
- children: n,
57
- hint: a,
58
- numberIndicatorValue: r,
59
- summary: s
60
- });
61
- const c = le(null), [Z, re] = pe(m);
62
- let F;
63
- e[11] === Symbol.for("react.memo_cache_sentinel") ? (F = () => c.current, e[11] = F) : F = e[11], de(V, F);
64
- let b;
65
- e[12] === Symbol.for("react.memo_cache_sentinel") ? (b = () => {
66
- c.current && re(c.current.open);
67
- }, e[12] = b) : b = e[12];
68
- let A;
69
- e[13] !== m ? (A = [m], e[13] = m, e[14] = A) : A = e[14], ae(b, A);
70
- let I, T;
71
- e[15] === Symbol.for("react.memo_cache_sentinel") ? (I = () => {
72
- var ne;
73
- const se = () => {
74
- c.current && re(c.current.open);
75
- };
76
- return (ne = c.current) == null || ne.addEventListener("toggle", se), () => {
77
- var oe;
78
- (oe = c.current) == null || oe.removeEventListener("toggle", se);
79
- };
80
- }, T = [], e[15] = I, e[16] = T) : (I = e[15], T = e[16]), ae(I, T);
81
- let P, x, L;
82
- const O = typeof s == "object" && s !== void 0;
83
- O && ({
84
- headingSize: P,
85
- headingTag: x,
86
- headingText: L
87
- } = s);
88
- let R;
89
- e[17] !== l ? (R = E(t.details, l), e[17] = l, e[18] = R) : R = e[18];
90
- const $ = R, k = te === "small", B = !O;
91
- let j;
92
- e[19] !== o || e[20] !== k || e[21] !== B ? (j = E(t.summary, {
93
- [t.summaryFlush]: o,
94
- [t.summarySmall]: k,
95
- [t.summaryUtilityM]: B
96
- }), e[19] = o, e[20] = k, e[21] = B, e[22] = j) : j = e[22];
97
- const G = j, J = ce === "left";
98
- let z;
99
- e[23] !== o || e[24] !== J ? (z = E(t.summaryContentWrapper, {
100
- [t.summaryContentWrapperFlush]: o,
101
- [t.summaryContentWrapperChevronLeft]: J
102
- }), e[23] = o, e[24] = J, e[25] = z) : z = e[25];
103
- const K = z;
104
- let M;
105
- e[26] !== Z ? (M = E(t.icon, {
106
- [t.iconOpen]: Z
107
- }), e[26] = Z, e[27] = M) : M = e[27];
108
- const Q = M, X = te === "small";
109
- let H;
110
- e[28] !== o || e[29] !== X ? (H = E(t.contentWrapper, {
111
- [t.contentWrapperFlush]: o,
112
- [t.contentWrapperSmall]: X
113
- }), e[28] = o, e[29] = X, e[30] = H) : H = e[30];
114
- const Y = H;
115
- let d;
116
- e[31] !== P || e[32] !== x || e[33] !== L || e[34] !== O || e[35] !== s ? (d = O ? /* @__PURE__ */ i(ue, { tag: x, size: P, children: L }) : s, e[31] = P, e[32] = x, e[33] = L, e[34] = O, e[35] = s, e[36] = d) : d = e[36];
117
- let u;
118
- e[37] !== r ? (u = (r || (r == null ? void 0 : r.trim()) === "") && /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(he, { label: r }) }), e[37] = r, e[38] = u) : u = e[38];
119
- let y;
120
- e[39] !== d || e[40] !== u ? (y = /* @__PURE__ */ q("div", { className: t.headingSummary, children: [
121
- d,
122
- u
123
- ] }), e[39] = d, e[40] = u, e[41] = y) : y = e[41];
124
- let h;
125
- e[42] !== a ? (h = a && /* @__PURE__ */ i("div", { className: t.hint, children: a }), e[42] = a, e[43] = h) : h = e[43];
126
- let f;
127
- e[44] !== y || e[45] !== h ? (f = /* @__PURE__ */ q("div", { className: t.headingSummaryWrapper, children: [
128
- y,
129
- h
130
- ] }), e[44] = y, e[45] = h, e[46] = f) : f = e[46];
131
- let _;
132
- e[47] !== Q ? (_ = /* @__PURE__ */ i(ye, { name: "chevron-down", "aria-hidden": "true", className: Q }), e[47] = Q, e[48] = _) : _ = e[48];
133
- let w;
134
- e[49] !== K || e[50] !== f || e[51] !== _ ? (w = /* @__PURE__ */ q("div", { className: K, children: [
135
- f,
136
- _
137
- ] }), e[49] = K, e[50] = f, e[51] = _, e[52] = w) : w = e[52];
138
- let S;
139
- e[53] !== G || e[54] !== w ? (S = /* @__PURE__ */ i("summary", { className: G, children: w }), e[53] = G, e[54] = w, e[55] = S) : S = e[55];
140
- let g;
141
- e[56] !== n || e[57] !== Y ? (g = /* @__PURE__ */ i("div", { className: Y, children: n }), e[56] = n, e[57] = Y, e[58] = g) : g = e[58];
142
- let U;
143
- return e[59] !== $ || e[60] !== m || e[61] !== p || e[62] !== S || e[63] !== g ? (U = /* @__PURE__ */ q("details", { ...p, ref: c, className: $, open: m, children: [
144
- S,
145
- g
146
- ] }), e[59] = $, e[60] = m, e[61] = p, e[62] = S, e[63] = g, e[64] = U) : U = e[64], U;
147
- });
148
- Pe.displayName = "DSAccordion";
149
- export {
150
- qe as A,
151
- Ve as C,
152
- Pe as D,
153
- Te as v
154
- };
@@ -1,231 +0,0 @@
1
- "use client";
2
- import { jsx as A } from "react/jsx-runtime";
3
- import { d as P } from "./index.CgTHIF3K.js";
4
- import { c as H } from "./index.CEyLAtio.js";
5
- import * as x from "react";
6
- import { useRef as U, useState as C, useEffect as G } from "react";
7
- import { g as W } from "./helpers.BbWkXTr3.js";
8
- import '../assets/Icon.QeJ7TxZs.css';var $ = /* @__PURE__ */ new Map(), D = /* @__PURE__ */ new WeakMap(), B = 0, Z = void 0;
9
- function F(t) {
10
- return t ? (D.has(t) || (B += 1, D.set(t, B.toString())), D.get(t)) : "0";
11
- }
12
- function J(t) {
13
- return Object.keys(t).sort().filter(
14
- (s) => t[s] !== void 0
15
- ).map((s) => `${s}_${s === "root" ? F(t.root) : t[s]}`).toString();
16
- }
17
- function K(t) {
18
- const s = J(t);
19
- let i = $.get(s);
20
- if (!i) {
21
- const o = /* @__PURE__ */ new Map();
22
- let c;
23
- const e = new IntersectionObserver((n) => {
24
- n.forEach((r) => {
25
- var a;
26
- const m = r.isIntersecting && c.some((d) => r.intersectionRatio >= d);
27
- t.trackVisibility && typeof r.isVisible > "u" && (r.isVisible = m), (a = o.get(r.target)) == null || a.forEach((d) => {
28
- d(m, r);
29
- });
30
- });
31
- }, t);
32
- c = e.thresholds || (Array.isArray(t.threshold) ? t.threshold : [t.threshold || 0]), i = {
33
- id: s,
34
- observer: e,
35
- elements: o
36
- }, $.set(s, i);
37
- }
38
- return i;
39
- }
40
- function Q(t, s, i = {}, o = Z) {
41
- if (typeof window.IntersectionObserver > "u" && o !== void 0) {
42
- const a = t.getBoundingClientRect();
43
- return s(o, {
44
- isIntersecting: o,
45
- target: t,
46
- intersectionRatio: typeof i.threshold == "number" ? i.threshold : 0,
47
- time: 0,
48
- boundingClientRect: a,
49
- intersectionRect: a,
50
- rootBounds: a
51
- }), () => {
52
- };
53
- }
54
- const { id: c, observer: e, elements: n } = K(i), r = n.get(t) || [];
55
- return n.has(t) || n.set(t, r), r.push(s), e.observe(t), function() {
56
- r.splice(r.indexOf(s), 1), r.length === 0 && (n.delete(t), e.unobserve(t)), n.size === 0 && (e.disconnect(), $.delete(c));
57
- };
58
- }
59
- function Y({
60
- threshold: t,
61
- delay: s,
62
- trackVisibility: i,
63
- rootMargin: o,
64
- root: c,
65
- triggerOnce: e,
66
- skip: n,
67
- initialInView: r,
68
- fallbackInView: a,
69
- onChange: m
70
- } = {}) {
71
- var d;
72
- const [h, b] = x.useState(null), u = x.useRef(m), [f, w] = x.useState({
73
- inView: !!r,
74
- entry: void 0
75
- });
76
- u.current = m, x.useEffect(
77
- () => {
78
- if (n || !h) return;
79
- let p;
80
- return p = Q(
81
- h,
82
- (S, v) => {
83
- w({
84
- inView: S,
85
- entry: v
86
- }), u.current && u.current(S, v), v.isIntersecting && e && p && (p(), p = void 0);
87
- },
88
- {
89
- root: c,
90
- rootMargin: o,
91
- threshold: t,
92
- // @ts-ignore
93
- trackVisibility: i,
94
- // @ts-ignore
95
- delay: s
96
- },
97
- a
98
- ), () => {
99
- p && p();
100
- };
101
- },
102
- // We break the rule here, because we aren't including the actual `threshold` variable
103
- // eslint-disable-next-line react-hooks/exhaustive-deps
104
- [
105
- // If the threshold is an array, convert it to a string, so it won't change between renders.
106
- Array.isArray(t) ? t.toString() : t,
107
- h,
108
- c,
109
- o,
110
- e,
111
- n,
112
- i,
113
- a,
114
- s
115
- ]
116
- );
117
- const l = (d = f.entry) == null ? void 0 : d.target, k = x.useRef(void 0);
118
- !h && l && !e && !n && k.current !== l && (k.current = l, w({
119
- inView: !!r,
120
- entry: void 0
121
- }));
122
- const g = [b, f.inView, f.entry];
123
- return g.ref = g[0], g.inView = g[1], g.entry = g[2], g;
124
- }
125
- const ss = "ds-icon_image_clh5i_1", ts = "ds-icon_image--theme-dark_clh5i_10", is = "ds-icon_image--size-x-large_clh5i_13", es = "ds-icon_image--size-medium_clh5i_19", os = "ds-icon_image--size-small_clh5i_25", rs = "ds-icon_image--size-x-small_clh5i_31", y = {
126
- image: ss,
127
- imageThemeDark: ts,
128
- imageSizeXLarge: is,
129
- imageSizeMedium: es,
130
- imageSizeSmall: os,
131
- imageSizeXSmall: rs
132
- }, ns = (t, s, i) => {
133
- const o = t[s];
134
- return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((c, e) => {
135
- (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
136
- e.bind(
137
- null,
138
- new Error(
139
- "Unknown variable dynamic import: " + s + (s.split("/").length !== i ? ". Note that variables only represent file names one level deep." : "")
140
- )
141
- )
142
- );
143
- });
144
- }, vs = ["x-large", "large", "medium", "small", "x-small"], as = (t) => {
145
- var n;
146
- const s = U(void 0), [i, o] = C(!1), [c, e] = C(!0);
147
- return G(() => {
148
- i && (e(!0), (async () => {
149
- try {
150
- s.current = await ns(/* @__PURE__ */ Object.assign({ "../../../../icons/dist/assets/360.svg": () => import("./360.CfjUtgxq.js"), "../../../../icons/dist/assets/academic-cap.svg": () => import("./academic-cap.OBigTQQS.js"), "../../../../icons/dist/assets/accessibility.svg": () => import("./accessibility.B57oX4yV.js"), "../../../../icons/dist/assets/alarm-clock.svg": () => import("./alarm-clock.CpK-AEZG.js"), "../../../../icons/dist/assets/arrow-clockwise.svg": () => import("./arrow-clockwise.BefOjGPg.js"), "../../../../icons/dist/assets/arrow-counterclockwise.svg": () => import("./arrow-counterclockwise.C7Ov32BZ.js"), "../../../../icons/dist/assets/arrow-down-line.svg": () => import("./arrow-down-line.RDD2pRZY.js"), "../../../../icons/dist/assets/arrow-down.svg": () => import("./arrow-down.XpokLh98.js"), "../../../../icons/dist/assets/arrow-edge.svg": () => import("./arrow-edge.CPA93M81.js"), "../../../../icons/dist/assets/arrow-left.svg": () => import("./arrow-left.C8NG5I2X.js"), "../../../../icons/dist/assets/arrow-out.svg": () => import("./arrow-out.CsHHHYN9.js"), "../../../../icons/dist/assets/arrow-outline-left.svg": () => import("./arrow-outline-left.Bhw_LzfV.js"), "../../../../icons/dist/assets/arrow-right.svg": () => import("./arrow-right.HNwAz18h.js"), "../../../../icons/dist/assets/arrow-up-arrow-down.svg": () => import("./arrow-up-arrow-down.BVyuVJP5.js"), "../../../../icons/dist/assets/arrow-up.svg": () => import("./arrow-up.Ca1GnLaY.js"), "../../../../icons/dist/assets/at.svg": () => import("./at.BNfdp4M0.js"), "../../../../icons/dist/assets/barcode-scanner.svg": () => import("./barcode-scanner.D0olxB_m.js"), "../../../../icons/dist/assets/battery.svg": () => import("./battery.YCg9lYqC.js"), "../../../../icons/dist/assets/bell.svg": () => import("./bell.DbPxCAUM.js"), "../../../../icons/dist/assets/bin-open.svg": () => import("./bin-open.DsjIBW00.js"), "../../../../icons/dist/assets/bin.svg": () => import("./bin.ktpYUJmK.js"), "../../../../icons/dist/assets/bluetooth.svg": () => import("./bluetooth.dW5tTwby.js"), "../../../../icons/dist/assets/bookmark.svg": () => import("./bookmark.B7Mbr-d6.js"), "../../../../icons/dist/assets/burger.svg": () => import("./burger.DLP81BXa.js"), "../../../../icons/dist/assets/calendar.svg": () => import("./calendar.Cig7yG7m.js"), "../../../../icons/dist/assets/camera.svg": () => import("./camera.BoCB0Emp.js"), "../../../../icons/dist/assets/cart-check.svg": () => import("./cart-check.CYH0vTB8.js"), "../../../../icons/dist/assets/cart-plus.svg": () => import("./cart-plus.DzXXFMZj.js"), "../../../../icons/dist/assets/cart.svg": () => import("./cart.CoEwMABr.js"), "../../../../icons/dist/assets/catalog.svg": () => import("./catalog.CwV-J6Kb.js"), "../../../../icons/dist/assets/certificate.svg": () => import("./certificate.Crs4RohK.js"), "../../../../icons/dist/assets/chain-link.svg": () => import("./chain-link.BMV2WV6k.js"), "../../../../icons/dist/assets/chainsaw.svg": () => import("./chainsaw.CI1EYF7a.js"), "../../../../icons/dist/assets/check.svg": () => import("./check.CuZKWgYj.js"), "../../../../icons/dist/assets/chevron-down.svg": () => import("./chevron-down.5UkGOwK_.js"), "../../../../icons/dist/assets/chevron-left.svg": () => import("./chevron-left.DRFQ-efY.js"), "../../../../icons/dist/assets/chevron-line-left.svg": () => import("./chevron-line-left.SQvDJQ1t.js"), "../../../../icons/dist/assets/chevron-line-right.svg": () => import("./chevron-line-right.CYQ3b2cQ.js"), "../../../../icons/dist/assets/chevron-right.svg": () => import("./chevron-right.B_Ew9QUt.js"), "../../../../icons/dist/assets/chevron-up.svg": () => import("./chevron-up.DqETUWqG.js"), "../../../../icons/dist/assets/circle-check-colored.svg": () => import("./circle-check-colored.Bye_GwLy.js"), "../../../../icons/dist/assets/circle-check-inverted.svg": () => import("./circle-check-inverted.Cc2cUmWT.js"), "../../../../icons/dist/assets/circle-info-colored.svg": () => import("./circle-info-colored.D2pp54gf.js"), "../../../../icons/dist/assets/circle-info-inverted.svg": () => import("./circle-info-inverted.D8Z0vTmu.js"), "../../../../icons/dist/assets/circle-pause.svg": () => import("./circle-pause.DaRfXOff.js"), "../../../../icons/dist/assets/circle-stroke.svg": () => import("./circle-stroke.CWu_o3Gx.js"), "../../../../icons/dist/assets/circle.svg": () => import("./circle.471EUzv6.js"), "../../../../icons/dist/assets/clock.svg": () => import("./clock.Bw5ICIVH.js"), "../../../../icons/dist/assets/coffee-cup.svg": () => import("./coffee-cup.DIijzKx_.js"), "../../../../icons/dist/assets/compare.svg": () => import("./compare.BgktBbYD.js"), "../../../../icons/dist/assets/connected-box-mobile.svg": () => import("./connected-box-mobile.DboMCVxp.js"), "../../../../icons/dist/assets/connected-box-stationary.svg": () => import("./connected-box-stationary.CAPCPQ1d.js"), "../../../../icons/dist/assets/connected-box.svg": () => import("./connected-box.DVqJw-ws.js"), "../../../../icons/dist/assets/cross.svg": () => import("./cross.rEw3TuHs.js"), "../../../../icons/dist/assets/diamond-exclamationmark-colored.svg": () => import("./diamond-exclamationmark-colored.WNKYwZ8q.js"), "../../../../icons/dist/assets/diamond-exclamationmark-inverted.svg": () => import("./diamond-exclamationmark-inverted.DzAIb8Nt.js"), "../../../../icons/dist/assets/diamond.svg": () => import("./diamond.CXZHFpPC.js"), "../../../../icons/dist/assets/diskette.svg": () => import("./diskette._0C2VZ9v.js"), "../../../../icons/dist/assets/distance.svg": () => import("./distance.FA6pTjcW.js"), "../../../../icons/dist/assets/document-magnifying-glass.svg": () => import("./document-magnifying-glass.DkvpNz-D.js"), "../../../../icons/dist/assets/dots-connected.svg": () => import("./dots-connected.ZMYjHeNS.js"), "../../../../icons/dist/assets/download-complete.svg": () => import("./download-complete.CZVpzrvY.js"), "../../../../icons/dist/assets/envelope-open.svg": () => import("./envelope-open.CA4cE5lk.js"), "../../../../icons/dist/assets/envelope.svg": () => import("./envelope.re-RxZVw.js"), "../../../../icons/dist/assets/exclamationmark.svg": () => import("./exclamationmark.DEbIGqGC.js"), "../../../../icons/dist/assets/exit.svg": () => import("./exit.Cgb8AB-k.js"), "../../../../icons/dist/assets/eye-closed.svg": () => import("./eye-closed.CvqozUwK.js"), "../../../../icons/dist/assets/eye.svg": () => import("./eye.CRQMKZs4.js"), "../../../../icons/dist/assets/facebook.svg": () => import("./facebook.CVcxa0rV.js"), "../../../../icons/dist/assets/file-type-doc.svg": () => import("./file-type-doc.DlovDOBh.js"), "../../../../icons/dist/assets/file-type-image.svg": () => import("./file-type-image.Cg2NRd7y.js"), "../../../../icons/dist/assets/file-type-pdf.svg": () => import("./file-type-pdf.Dm94xL2i.js"), "../../../../icons/dist/assets/file-type-video.svg": () => import("./file-type-video.CFwfiP-D.js"), "../../../../icons/dist/assets/file-type-zip.svg": () => import("./file-type-zip.SNixmKhQ.js"), "../../../../icons/dist/assets/file.svg": () => import("./file.DLgRXiem.js"), "../../../../icons/dist/assets/filter.svg": () => import("./filter.DrPSKpaG.js"), "../../../../icons/dist/assets/finger-double-arrow.svg": () => import("./finger-double-arrow.DDUZoPh8.js"), "../../../../icons/dist/assets/flash.svg": () => import("./flash.CgJJ1bUx.js"), "../../../../icons/dist/assets/fullscreen.svg": () => import("./fullscreen.Be2rBj1i.js"), "../../../../icons/dist/assets/gear.svg": () => import("./gear.DEltGVSA.js"), "../../../../icons/dist/assets/globe.svg": () => import("./globe.DG6uw6fi.js"), "../../../../icons/dist/assets/grid.svg": () => import("./grid.DH1impeF.js"), "../../../../icons/dist/assets/guidance.svg": () => import("./guidance.BBYB3JpW.js"), "../../../../icons/dist/assets/haircross.svg": () => import("./haircross.D-whkit9.js"), "../../../../icons/dist/assets/hanger.svg": () => import("./hanger.Bo8qtNo5.js"), "../../../../icons/dist/assets/headphones.svg": () => import("./headphones.DjWXOuJJ.js"), "../../../../icons/dist/assets/heart.svg": () => import("./heart.D-BnHMb-.js"), "../../../../icons/dist/assets/hexagon-arrow-clockwise.svg": () => import("./hexagon-arrow-clockwise.D0eeDQQx.js"), "../../../../icons/dist/assets/horizontal-ellipsis.svg": () => import("./horizontal-ellipsis.ChdN6RnG.js"), "../../../../icons/dist/assets/house.svg": () => import("./house.BohpDQ3q.js"), "../../../../icons/dist/assets/imow.svg": () => import("./imow.Dh1oMqcW.js"), "../../../../icons/dist/assets/info.svg": () => import("./info.BZVg9FLA.js"), "../../../../icons/dist/assets/instagram.svg": () => import("./instagram.CIlKb7xj.js"), "../../../../icons/dist/assets/leave-fullscreen.svg": () => import("./leave-fullscreen.BC5iwDur.js"), "../../../../icons/dist/assets/lightbulb.svg": () => import("./lightbulb.DQ7TiRsr.js"), "../../../../icons/dist/assets/linkedin.svg": () => import("./linkedin.br5zvxco.js"), "../../../../icons/dist/assets/list-three-rows.svg": () => import("./list-three-rows.Cso4ybs8.js"), "../../../../icons/dist/assets/list-two-rows.svg": () => import("./list-two-rows.DOsZEv0-.js"), "../../../../icons/dist/assets/loading-spinner.svg": () => import("./loading-spinner.BukfMaU6.js"), "../../../../icons/dist/assets/lock.svg": () => import("./lock.Dw_GOpTn.js"), "../../../../icons/dist/assets/magnifying-glass-minus.svg": () => import("./magnifying-glass-minus.BYztw2P1.js"), "../../../../icons/dist/assets/magnifying-glass-plus.svg": () => import("./magnifying-glass-plus.BTgviDVh.js"), "../../../../icons/dist/assets/magnifying-glass.svg": () => import("./magnifying-glass.C8DfRaIO.js"), "../../../../icons/dist/assets/map.svg": () => import("./map.CXgG1iGz.js"), "../../../../icons/dist/assets/minus.svg": () => import("./minus.BkhCuIH4.js"), "../../../../icons/dist/assets/mobile.svg": () => import("./mobile.C1Kj9VnC.js"), "../../../../icons/dist/assets/nine-squares.svg": () => import("./nine-squares.DVsNAOzz.js"), "../../../../icons/dist/assets/note-check.svg": () => import("./note-check.CM_kmt0M.js"), "../../../../icons/dist/assets/note-plus.svg": () => import("./note-plus.Bkn78EyA.js"), "../../../../icons/dist/assets/note.svg": () => import("./note.CE0ACLn8.js"), "../../../../icons/dist/assets/number-input.svg": () => import("./number-input.BLhoh5mh.js"), "../../../../icons/dist/assets/paperclip.svg": () => import("./paperclip.BMerX4rj.js"), "../../../../icons/dist/assets/parcel.svg": () => import("./parcel.Ve9GL_EG.js"), "../../../../icons/dist/assets/pause.svg": () => import("./pause.B91Ejn-O.js"), "../../../../icons/dist/assets/pen.svg": () => import("./pen.CvKw2PvE.js"), "../../../../icons/dist/assets/percent.svg": () => import("./percent.BlB6rG-B.js"), "../../../../icons/dist/assets/petrol.svg": () => import("./petrol.Du6qAgp0.js"), "../../../../icons/dist/assets/phone.svg": () => import("./phone.DzdXfmNC.js"), "../../../../icons/dist/assets/pin-s.svg": () => import("./pin-s.DXgYuN9C.js"), "../../../../icons/dist/assets/pin.svg": () => import("./pin.DZfZr4El.js"), "../../../../icons/dist/assets/pinterest.svg": () => import("./pinterest.sUPAub_q.js"), "../../../../icons/dist/assets/placeholder.svg": () => import("./placeholder.Dbb0hT5R.js"), "../../../../icons/dist/assets/play.svg": () => import("./play.BDiY2JrT.js"), "../../../../icons/dist/assets/plug.svg": () => import("./plug.DZozve4C.js"), "../../../../icons/dist/assets/plus.svg": () => import("./plus.zdu17kAe.js"), "../../../../icons/dist/assets/printer.svg": () => import("./printer.CaFaWfeS.js"), "../../../../icons/dist/assets/prohibition-sign.svg": () => import("./prohibition-sign.DUFn0QiV.js"), "../../../../icons/dist/assets/questionmark.svg": () => import("./questionmark.QyDxanQy.js"), "../../../../icons/dist/assets/security.svg": () => import("./security.DkLw5ym4.js"), "../../../../icons/dist/assets/share.svg": () => import("./share.C3wwEl8n.js"), "../../../../icons/dist/assets/shirt.svg": () => import("./shirt.BC8W-yCI.js"), "../../../../icons/dist/assets/shop.svg": () => import("./shop.DdPV35mK.js"), "../../../../icons/dist/assets/sound-off.svg": () => import("./sound-off.D4kGcehG.js"), "../../../../icons/dist/assets/sound-on.svg": () => import("./sound-on.Cynkb0_t.js"), "../../../../icons/dist/assets/speechbubble.svg": () => import("./speechbubble.87vuoKUp.js"), "../../../../icons/dist/assets/speechbubbles.svg": () => import("./speechbubbles.CSFhpNJn.js"), "../../../../icons/dist/assets/square.svg": () => import("./square.D6PgEi_r.js"), "../../../../icons/dist/assets/star-half.svg": () => import("./star-half.DZTtM5Bw.js"), "../../../../icons/dist/assets/star.svg": () => import("./star.BkjednvI.js"), "../../../../icons/dist/assets/tag.svg": () => import("./tag.yO7uMsHj.js"), "../../../../icons/dist/assets/thumbs-down.svg": () => import("./thumbs-down.DeBD6wnK.js"), "../../../../icons/dist/assets/thumbs-up.svg": () => import("./thumbs-up.D-44gexH.js"), "../../../../icons/dist/assets/tiktok.svg": () => import("./tiktok.BWJTDGYm.js"), "../../../../icons/dist/assets/triangle-exclamationmark-colored.svg": () => import("./triangle-exclamationmark-colored.CbVC3Gzi.js"), "../../../../icons/dist/assets/triangle-exclamationmark-inverted.svg": () => import("./triangle-exclamationmark-inverted.BiGoK7TV.js"), "../../../../icons/dist/assets/triangle.svg": () => import("./triangle.ibv6NDnt.js"), "../../../../icons/dist/assets/truck.svg": () => import("./truck.xIk5wW6T.js"), "../../../../icons/dist/assets/twitch.svg": () => import("./twitch.C893cAK8.js"), "../../../../icons/dist/assets/two-people-screen.svg": () => import("./two-people-screen.BBLouaW4.js"), "../../../../icons/dist/assets/two-sheets.svg": () => import("./two-sheets.DWFmuL7N.js"), "../../../../icons/dist/assets/upload.svg": () => import("./upload.ZImTAIgx.js"), "../../../../icons/dist/assets/user.svg": () => import("./user.BMARueuy.js"), "../../../../icons/dist/assets/vertical-ellipsis.svg": () => import("./vertical-ellipsis.Bc9eBsDF.js"), "../../../../icons/dist/assets/wc.svg": () => import("./wc.gmKE1r5l.js"), "../../../../icons/dist/assets/whatsapp.svg": () => import("./whatsapp.CPpu-7Nn.js"), "../../../../icons/dist/assets/wifi-1bar.svg": () => import("./wifi-1bar.BcEP-r8w.js"), "../../../../icons/dist/assets/wifi-2bars.svg": () => import("./wifi-2bars.jDOd4Q3q.js"), "../../../../icons/dist/assets/wifi-off.svg": () => import("./wifi-off.D9xPqVWn.js"), "../../../../icons/dist/assets/wifi.svg": () => import("./wifi.CuQykF6X.js"), "../../../../icons/dist/assets/wind-rose.svg": () => import("./wind-rose.C-XcKdy-.js"), "../../../../icons/dist/assets/wrench.svg": () => import("./wrench.DMFV2S9u.js"), "../../../../icons/dist/assets/x.svg": () => import("./x.BqbpXd7O.js"), "../../../../icons/dist/assets/xing.svg": () => import("./xing.CiKYLbPq.js"), "../../../../icons/dist/assets/youtube.svg": () => import("./youtube.DrImaRSP.js") }), `../../../../icons/dist/assets/${t}.svg`, 8);
151
- } catch (a) {
152
- console.error(W("DSIcon", a instanceof Error ? a.message : String(a)));
153
- } finally {
154
- e(!1);
155
- }
156
- })());
157
- }, [t, i]), {
158
- isLoading: c,
159
- SVGIcon: (n = s.current) == null ? void 0 : n.default,
160
- setShouldLoad: o
161
- };
162
- }, ls = (t) => {
163
- const s = P.c(38);
164
- let i, o, c, e, n, r, a;
165
- s[0] !== t ? ({
166
- aria: i,
167
- className: o,
168
- name: n,
169
- size: r,
170
- source: e,
171
- theme: a,
172
- ...c
173
- } = t, s[0] = t, s[1] = i, s[2] = o, s[3] = c, s[4] = e, s[5] = n, s[6] = r, s[7] = a) : (i = s[1], o = s[2], c = s[3], e = s[4], n = s[5], r = s[6], a = s[7]);
174
- const m = n === void 0 ? "placeholder" : n, d = r === void 0 ? "large" : r, h = a === void 0 ? "light" : a, {
175
- SVGIcon: b,
176
- isLoading: u,
177
- setShouldLoad: f
178
- } = as(m), [, w] = C(m);
179
- let l;
180
- s[8] === Symbol.for("react.memo_cache_sentinel") ? (l = {
181
- "x-large": 24,
182
- large: 16,
183
- medium: 12,
184
- small: 10,
185
- "x-small": 8
186
- }, s[8] = l) : l = s[8];
187
- const k = l;
188
- let g;
189
- s[9] !== m || s[10] !== w ? (g = () => {
190
- w(m);
191
- }, s[9] = m, s[10] = w, s[11] = g) : g = s[11];
192
- let p;
193
- s[12] !== m ? (p = [m], s[12] = m, s[13] = p) : p = s[13], G(g, p);
194
- const S = !!e;
195
- let v;
196
- s[14] !== f ? (v = (q) => {
197
- f(q);
198
- }, s[14] = f, s[15] = v) : v = s[15];
199
- let z;
200
- s[16] !== S || s[17] !== v ? (z = {
201
- rootMargin: "200px 0px",
202
- triggerOnce: !0,
203
- fallbackInView: !0,
204
- skip: S,
205
- onChange: v
206
- }, s[16] = S, s[17] = v, s[18] = z) : z = s[18];
207
- const {
208
- ref: E
209
- } = Y(z);
210
- let I;
211
- s[19] !== e ? (I = (q) => (j) => {
212
- e && j && (j.src = q);
213
- }, s[19] = e, s[20] = I) : I = s[20];
214
- const L = I, N = h === "dark" && !e && !m.includes("-colored"), T = d === "x-large", V = d === "medium", O = d === "small", X = d === "x-small";
215
- let R;
216
- s[21] !== o || s[22] !== N || s[23] !== T || s[24] !== V || s[25] !== O || s[26] !== X ? (R = H(y.image, o, {
217
- [y.imageThemeDark]: N,
218
- [y.imageSizeXLarge]: T,
219
- [y.imageSizeMedium]: V,
220
- [y.imageSizeSmall]: O,
221
- [y.imageSizeXSmall]: X
222
- }), s[21] = o, s[22] = N, s[23] = T, s[24] = V, s[25] = O, s[26] = X, s[27] = R) : R = s[27];
223
- const _ = R;
224
- let M;
225
- return s[28] !== b || s[29] !== L || s[30] !== i || s[31] !== _ || s[32] !== u || s[33] !== E || s[34] !== c || s[35] !== d || s[36] !== e ? (M = e ? /* @__PURE__ */ A("img", { className: _, ref: L(e), width: k[d], height: k[d], loading: "lazy", alt: (i == null ? void 0 : i["aria-label"]) || "", ...c }) : !u && b ? /* @__PURE__ */ A(b, { className: _, title: (i == null ? void 0 : i["aria-label"]) || "", role: i != null && i["aria-label"] ? "img" : void 0, ...c }) : /* @__PURE__ */ A("div", { className: _, ref: E }), s[28] = b, s[29] = L, s[30] = i, s[31] = _, s[32] = u, s[33] = E, s[34] = c, s[35] = d, s[36] = e, s[37] = M) : M = s[37], M;
226
- };
227
- export {
228
- ls as D,
229
- vs as I,
230
- as as u
231
- };
@@ -1,218 +0,0 @@
1
- "use client";
2
- import { jsxs as T, jsx as a } from "react/jsx-runtime";
3
- import { c as m } from "./index.CEyLAtio.js";
4
- import { forwardRef as pe, useState as U, useRef as ge, useCallback as be } from "react";
5
- import { t as _e } from "./translate.nuU7uChI.js";
6
- import { u as Z } from "./useBreakpoint.CMOR9ZOB.js";
7
- import "./index.CgTHIF3K.js";
8
- import { g as De } from "./AriaLiveRegions.utils.Cb327d_2.js";
9
- import { D as me } from "./Button.CC0qEsuR.js";
10
- import { FileList as ve } from "../filelist.Cj9U-Jx8.js";
11
- import { D as he } from "./Icon.C0161Glk.js";
12
- import { DSSystemFeedback as Ie } from "../systemfeedback.CLQCbTF6.js";
13
- import { g as I } from "./helpers.BbWkXTr3.js";
14
- import '../assets/InputFile.BVgHILAZ.css';const we = "ds-input-file_root_38v94_1", ze = "ds-input-file_hint_38v94_1", Se = "ds-input-file_label_38v94_1", Ne = "ds-input-file_browse-button--is-dragging-filled_38v94_4", ye = "ds-input-file_browse-button--is-dragging_38v94_4", Le = "ds-input-file_label--hidden_38v94_44", ke = "ds-input-file_label--disabled_38v94_57", Be = "ds-input-file_label--required_38v94_61", Fe = "ds-input-file_feedback_38v94_82", Te = "ds-input-file_dropzone_38v94_87", $e = "ds-input-file_dropzone--disabled_38v94_93", Ae = "ds-input-file_dropzone--invalid_38v94_107", Ce = "ds-input-file_dropzone--is-dragging_38v94_110", Re = "ds-input-file_hint-drop-zone_38v94_113", qe = "ds-input-file_upload-icon_38v94_116", Ee = "ds-input-file_browse-button-dropzone--is-dragging_38v94_119", Pe = "ds-input-file_instructions_38v94_122", xe = "ds-input-file_input_38v94_159", He = "ds-input-file_required-sr-info_38v94_163", t = {
15
- root: we,
16
- hint: ze,
17
- label: Se,
18
- browseButtonIsDraggingFilled: Ne,
19
- browseButtonIsDragging: ye,
20
- labelHidden: Le,
21
- labelDisabled: ke,
22
- labelRequired: Be,
23
- feedback: Fe,
24
- dropzone: Te,
25
- dropzoneDisabled: $e,
26
- dropzoneInvalid: Ae,
27
- dropzoneIsDragging: Ce,
28
- hintDropZone: Re,
29
- uploadIcon: qe,
30
- browseButtonDropzoneIsDragging: Ee,
31
- instructions: Pe,
32
- input: xe,
33
- requiredSrInfo: He
34
- }, Oe = {
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
- }, We = {
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
- }, Ve = {
53
- en: Oe,
54
- de: We
55
- }, je = (r, d) => {
56
- const i = d.split(",").map((l) => l.trim().toLowerCase()).filter(Boolean), u = r.name.toLowerCase(), o = r.type.toLowerCase();
57
- return i.some((l) => {
58
- if (l.startsWith("."))
59
- return u.endsWith(l);
60
- if (l.endsWith("/*")) {
61
- const [w] = o.split("/");
62
- return w === l.slice(0, -2);
63
- }
64
- return o === l;
65
- });
66
- }, Me = ({
67
- id: r,
68
- label: d,
69
- inputFileButtonProps: i
70
- }) => {
71
- var u;
72
- if (!r)
73
- throw new Error(I("DSInputFile", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputFile component.'));
74
- if (!d)
75
- 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}.`));
76
- if (i && ((u = i.label) == null ? void 0 : u.trim()) === "")
77
- throw new Error(I("DSInputFile", "The input file button needs to have a label for a11y reasons. Please add a label to the inputFileButtonProps."));
78
- if (i && i.variant && i.variant !== "outline" && i.variant !== "filled")
79
- throw new Error(I("DSInputFile", "The inputFileButtonProps variant value can only be 'outline' for DSInputFile components inside forms or 'filled' for standalone DSInputFile components."));
80
- }, Ue = pe(({
81
- id: r,
82
- label: d,
83
- accept: i,
84
- className: u,
85
- disabled: o = !1,
86
- fileListItemRemoveButtonProps: l,
87
- hideLabel: w = !1,
88
- hint: _,
89
- inputFileButtonProps: $,
90
- invalid: v = !1,
91
- isHintOutsideDropzone: G = {
92
- base: !0,
93
- m: !1
94
- },
95
- lang: A = "en",
96
- maxSizeInMb: z = 7,
97
- multiple: D = !1,
98
- required: S = !1,
99
- showFileList: J = !0,
100
- showDropzone: c = !1,
101
- systemFeedback: N,
102
- translations: K,
103
- onFilesSelect: f,
104
- ...Q
105
- }, h) => {
106
- const p = _e(K || Ve[A]);
107
- process.env.NODE_ENV !== "production" && Me({
108
- id: r,
109
- label: d,
110
- inputFileButtonProps: $
111
- });
112
- const {
113
- label: X = A === "en" ? `Choose File${D ? "s" : ""}` : `Datei${D ? "en" : ""} auswählen`,
114
- variant: y = "outline",
115
- ...Y
116
- } = $ || {}, [C, R] = U([]), g = ge(null), [b, L] = U(!1), ee = z * 1024 * 1024, k = `${r}-label`, q = `${r}-feedback`, B = `${r}-hint`, E = _ ? ` ${B}` : "", te = Z(w), P = Z(G), ne = m(t.root, u), ie = m(t.dropzone, {
117
- [t.dropzoneDisabled]: o,
118
- [t.dropzoneInvalid]: v,
119
- [t.dropzoneIsDragging]: b
120
- }), oe = m(t.label, {
121
- // hide label only visually to keep them available for assistive technologies
122
- [t.labelHidden]: te,
123
- [t.labelDisabled]: o,
124
- [t.labelRequired]: S
125
- }), se = m(t.browseButton, {
126
- [t.browseButtonIsDragging]: b && y === "outline",
127
- [t.browseButtonIsDraggingFilled]: b && y === "filled"
128
- }), re = m(t.browseButtonDropzone, {
129
- [t.browseButtonDropzoneIsDragging]: b
130
- }), ae = [v && N && q].filter(Boolean).join(" ") || void 0, le = (e) => {
131
- g.current = e, typeof h == "function" ? h(e) : h && (h.current = e);
132
- }, x = (e) => {
133
- if (!e)
134
- return;
135
- const n = [];
136
- for (const s of e)
137
- if (i && !je(s, i) && (s.feedback = `${p("feedbackFileType")}: ${s.type}.`), s.size > ee && (s.feedback = `${p("feedbackFileSize")} ${z} MB.`), n.push(s), !D && n.length > 0)
138
- break;
139
- n.length > 0 && (R(() => {
140
- const s = [...n], M = s.map(({
141
- name: F,
142
- feedback: fe = ""
143
- }) => `${F} ${fe}`).join(", ");
144
- return setTimeout(() => {
145
- ce(`${p("filesSelectedHint")}: ${M}.`);
146
- }, 1e3), s;
147
- }), f == null || f(n));
148
- }, H = (e) => {
149
- var n;
150
- o || ((n = g.current) == null || n.click(), e.stopPropagation());
151
- }, O = (e) => {
152
- e.preventDefault(), b || L(!0);
153
- }, W = (e) => {
154
- e.preventDefault(), b && L(!1);
155
- }, V = be((e) => {
156
- e.preventDefault(), !o && (L(!1), x(e.dataTransfer.files));
157
- }, [D, i, z, o]), de = (e) => {
158
- x(e.target.files), g != null && g.current && (g.current.value = "");
159
- }, ue = (e) => {
160
- R((n) => {
161
- const s = n.filter((M, F) => F !== e);
162
- return f == null || f(s), s;
163
- });
164
- }, ce = (e) => {
165
- const n = De();
166
- n && (n.innerText = e, setTimeout(() => {
167
- n.innerText = "";
168
- }, 350));
169
- }, j = () => /* @__PURE__ */ a(me, { ...Y, className: c ? re : se, type: "button", variant: y, size: c ? "small" : "medium", disabled: o, iconName: c ? void 0 : "upload", onClick: H, "aria-describedby": ae, "aria-invalid": v, children: X });
170
- return /* @__PURE__ */ T("div", { className: ne, children: [
171
- /* @__PURE__ */ T("label", { className: oe, id: k, htmlFor: r, children: [
172
- d,
173
- S && /* @__PURE__ */ a("span", { className: t.requiredSrInfo, children: p("required") })
174
- ] }),
175
- _ && (P || !c) && /* @__PURE__ */ a("div", { className: t.hint, id: B, children: _ }),
176
- v && N && /* @__PURE__ */ a(Ie, { className: t.feedback, message: N, type: "invalid", id: q }),
177
- !c && /* @__PURE__ */ a(
178
- "div",
179
- {
180
- onDragOver: O,
181
- onDragLeave: W,
182
- onDrop: V,
183
- "aria-labelledby": `${k}${E}`,
184
- "aria-disabled": o,
185
- children: j()
186
- }
187
- ),
188
- c && /* @__PURE__ */ T(
189
- "div",
190
- {
191
- className: ie,
192
- onClick: (e) => H(e),
193
- onDragOver: O,
194
- onDragLeave: W,
195
- onDrop: V,
196
- "aria-labelledby": `${k}${E}`,
197
- "aria-disabled": o,
198
- children: [
199
- /* @__PURE__ */ a(he, { name: "upload", className: t.uploadIcon, size: "x-large" }),
200
- /* @__PURE__ */ a("p", { id: "file-upload-instructions", className: t.instructions, children: p("dragAndDropInstructions") }),
201
- j(),
202
- _ && !P && /* @__PURE__ */ a("div", { className: t.hintDropZone, id: B, children: _ })
203
- ]
204
- }
205
- ),
206
- /* @__PURE__ */ a("input", { ...Q, type: "file", className: t.input, id: r, ref: le, accept: i, multiple: D, "aria-hidden": "true", required: S, disabled: o, onChange: de }),
207
- C.length > 0 && J && /* @__PURE__ */ a(ve, { files: C, onRemoveFile: ue, fileListItemRemoveButtonProps: l, t: p })
208
- ] });
209
- });
210
- Ue.displayName = "DSInputFile";
211
- export {
212
- Ue as D,
213
- Oe as a,
214
- We as b,
215
- Ve as c,
216
- je as f,
217
- Me as v
218
- };