@stihl-design-system/components 1.0.0-RC.40 → 1.0.0-RC.41

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 (32) hide show
  1. package/{accordion.nt0Foequ.js → accordion.CiiPLwYQ.js} +1 -1
  2. package/{actionbutton.Ctea6drN.js → actionbutton.DKb4ph1c.js} +1 -1
  3. package/{actionlink.VX1OMtm-.js → actionlink.DEGta2h9.js} +1 -1
  4. package/{chipgroup.i5SOv6LA.js → chipgroup.CSjQHeeW.js} +17 -17
  5. package/chunks/Accordion.Q50G9LZ3.js +172 -0
  6. package/chunks/ActionButton.BEMy35Lh.js +188 -0
  7. package/chunks/ActionLink.DECHT42B.js +161 -0
  8. package/chunks/{NavigationTabList.C2f-lWex.js → NavigationTabList.ltT6igtk.js} +23 -22
  9. package/chunks/NavigationTabs.DsVepb7H.js +63 -0
  10. package/chunks/Tabs.DfH2q9EL.js +84 -0
  11. package/components/Accordion/Accordion.d.ts +2 -0
  12. package/components/Accordion/Accordion.utils.d.ts +2 -2
  13. package/components/ActionButton/ActionButton.d.ts +2 -0
  14. package/components/ActionButton/ActionButton.utils.d.ts +2 -2
  15. package/components/ActionLink/ActionLink.d.ts +2 -0
  16. package/components/ActionLink/ActionLink.utils.d.ts +2 -2
  17. package/components/ChipGroup/ChipGroup.d.ts +7 -1
  18. package/components/ChipGroup/ChipGroup.utils.d.ts +2 -2
  19. package/components/NavigationTabs/NavigationTabs.d.ts +3 -0
  20. package/components/Tabs/Tabs.d.ts +3 -0
  21. package/index.es.js +6 -6
  22. package/{navigationtablist.CKPpQrme.js → navigationtablist.Cd9hZzFQ.js} +1 -1
  23. package/{navigationtabs.VUAOwesQ.js → navigationtabs.DHG-TeF2.js} +2 -2
  24. package/package.json +1 -1
  25. package/{tablist.hMHdX1V8.js → tablist.DPiNeY3_.js} +66 -65
  26. package/{tabs.t-gR7dGc.js → tabs.Cxzm6ZZ-.js} +2 -2
  27. package/chunks/Accordion.B-0pf8Fq.js +0 -168
  28. package/chunks/ActionButton.wdWh7E2b.js +0 -182
  29. package/chunks/ActionLink.DwUP-Kgm.js +0 -155
  30. package/chunks/NavigationTabs.D2QrnlL2.js +0 -62
  31. package/chunks/Tabs.2JTenRcr.js +0 -83
  32. /package/components/Accordion/{Acordion.utils.test.d.ts → Accordion.utils.test.d.ts} +0 -0
@@ -6,7 +6,7 @@ import "react";
6
6
  import "./heading.BHSklXho.js";
7
7
  import "./chunks/Icon.m6sMB6vl.js";
8
8
  import "./numberindicator.ZGVRSmqf.js";
9
- import { D as s } from "./chunks/Accordion.B-0pf8Fq.js";
9
+ import { D as s } from "./chunks/Accordion.Q50G9LZ3.js";
10
10
  export {
11
11
  s as DSAccordion
12
12
  };
@@ -6,7 +6,7 @@ import "react";
6
6
  import "./chunks/Icon.m6sMB6vl.js";
7
7
  import "./numberindicator.ZGVRSmqf.js";
8
8
  import "./tooltip._lP4aMV2.js";
9
- import { D as s } from "./chunks/ActionButton.wdWh7E2b.js";
9
+ import { D as s } from "./chunks/ActionButton.BEMy35Lh.js";
10
10
  export {
11
11
  s as DSActionButton
12
12
  };
@@ -6,7 +6,7 @@ import "react";
6
6
  import "./chunks/Icon.m6sMB6vl.js";
7
7
  import "./numberindicator.ZGVRSmqf.js";
8
8
  import "./tooltip._lP4aMV2.js";
9
- import { D as s } from "./chunks/ActionLink.DwUP-Kgm.js";
9
+ import { D as s } from "./chunks/ActionLink.DECHT42B.js";
10
10
  export {
11
11
  s as DSActionLink
12
12
  };
@@ -11,7 +11,7 @@ import './assets/chipgroup.BGxjdSDX.css';const ge = "ds-chip-group_label--hidden
11
11
  root: be
12
12
  }, Ne = (o) => {
13
13
  const e = ue.c(37);
14
- let r, m, d, g, c, L, b, v, y, w, k, C, I;
14
+ let r, m, d, g, c, L, b, v, k, y, C, w, I;
15
15
  e[0] !== o ? ({
16
16
  chips: r,
17
17
  id: d,
@@ -19,15 +19,15 @@ import './assets/chipgroup.BGxjdSDX.css';const ge = "ds-chip-group_label--hidden
19
19
  className: m,
20
20
  disableTooltips: b,
21
21
  hideLabel: v,
22
- isRemovable: y,
23
- lang: w,
24
- selectionMode: k,
25
- size: C,
22
+ isRemovable: k,
23
+ lang: y,
24
+ selectionMode: C,
25
+ size: w,
26
26
  translations: I,
27
27
  onChipsChange: c,
28
28
  ...L
29
- } = o, e[0] = o, e[1] = r, e[2] = m, e[3] = d, e[4] = g, e[5] = c, e[6] = L, e[7] = b, e[8] = v, e[9] = y, e[10] = w, e[11] = k, e[12] = C, e[13] = I) : (r = e[1], m = e[2], d = e[3], g = e[4], c = e[5], L = e[6], b = e[7], v = e[8], y = e[9], w = e[10], k = e[11], C = e[12], I = e[13]);
30
- const X = b === void 0 ? !1 : b, Y = v === void 0 ? !1 : v, u = y === void 0 ? !1 : y, Z = w === void 0 ? "en" : w, f = k === void 0 ? "single" : k, ee = C === void 0 ? "medium" : C;
29
+ } = o, e[0] = o, e[1] = r, e[2] = m, e[3] = d, e[4] = g, e[5] = c, e[6] = L, e[7] = b, e[8] = v, e[9] = k, e[10] = y, e[11] = C, e[12] = w, e[13] = I) : (r = e[1], m = e[2], d = e[3], g = e[4], c = e[5], L = e[6], b = e[7], v = e[8], k = e[9], y = e[10], C = e[11], w = e[12], I = e[13]);
30
+ const X = b === void 0 ? !1 : b, Y = v === void 0 ? !1 : v, u = k === void 0 ? !1 : k, Z = y === void 0 ? "en" : y, f = C === void 0 ? "single" : C, ee = w === void 0 ? "medium" : w;
31
31
  process.env.NODE_ENV !== "production" && me({
32
32
  chips: r,
33
33
  id: d,
@@ -42,7 +42,7 @@ import './assets/chipgroup.BGxjdSDX.css';const ge = "ds-chip-group_label--hidden
42
42
  const D = P(_);
43
43
  let A, K;
44
44
  e[17] !== r ? (K = () => {
45
- S(r.map(ye));
45
+ S(r.map(ke));
46
46
  }, A = [r], e[17] = r, e[18] = A, e[19] = K) : (A = e[18], K = e[19]), V(K, A);
47
47
  let T, N;
48
48
  e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = () => {
@@ -88,10 +88,10 @@ import './assets/chipgroup.BGxjdSDX.css';const ge = "ds-chip-group_label--hidden
88
88
  case "Enter":
89
89
  case " ": {
90
90
  if (t.preventDefault(), u) {
91
- O(l);
91
+ O(l), n[l]?.onClick?.(t);
92
92
  return;
93
93
  } else
94
- x(l);
94
+ x(l), n[l]?.onClick?.(t);
95
95
  break e;
96
96
  }
97
97
  case "Backspace": {
@@ -105,13 +105,13 @@ import './assets/chipgroup.BGxjdSDX.css';const ge = "ds-chip-group_label--hidden
105
105
  }, le = () => {
106
106
  if (f !== "multiple")
107
107
  return;
108
- const t = n.map(we);
108
+ const t = n.map(ye);
109
109
  S(t), E(`${t.length} items selected`), c && c(t);
110
110
  }, h = (t) => {
111
111
  if (u)
112
112
  return;
113
- const l = n.map(ke);
114
- l[t].disabled || (l[t].isSelected = !0, E(`${l[t].label} selected, ${l.filter(Ce).length} items selected`), S(l), c && c(l));
113
+ const l = n.map(Ce);
114
+ l[t].disabled || (l[t].isSelected = !0, E(`${l[t].label} selected, ${l.filter(we).length} items selected`), S(l), c && c(l));
115
115
  }, x = (t) => {
116
116
  if (u)
117
117
  return;
@@ -155,23 +155,23 @@ function ve(o) {
155
155
  ...o
156
156
  };
157
157
  }
158
- function ye(o) {
158
+ function ke(o) {
159
159
  return {
160
160
  ...o
161
161
  };
162
162
  }
163
- function we(o) {
163
+ function ye(o) {
164
164
  return {
165
165
  ...o,
166
166
  selected: !o.disabled
167
167
  };
168
168
  }
169
- function ke(o) {
169
+ function Ce(o) {
170
170
  return {
171
171
  ...o
172
172
  };
173
173
  }
174
- function Ce(o) {
174
+ function we(o) {
175
175
  const {
176
176
  isSelected: e
177
177
  } = o;
@@ -0,0 +1,172 @@
1
+ "use client";
2
+ import { jsx as d, jsxs as Z } from "react/jsx-runtime";
3
+ import { d as fe } from "./index.cKLI89Eg.js";
4
+ import { c as N } from "./index.DQOqod3i.js";
5
+ import { forwardRef as ge, useRef as Se, useState as ve, useImperativeHandle as Ce, useEffect as ye } from "react";
6
+ import { DSHeading as We } from "../heading.BHSklXho.js";
7
+ import { D as Ne } from "./Icon.m6sMB6vl.js";
8
+ import { NumberIndicator as Oe } from "../numberindicator.ZGVRSmqf.js";
9
+ import { g as $ } from "./helpers.CexwVao7.js";
10
+ import '../assets/Accordion.Cr1dbVTH.css';const we = "ds-accordion_details_2g22m_1", De = "ds-accordion_summary_2g22m_117", be = "ds-accordion_summary--utility--m_2g22m_156", xe = "ds-accordion_summary--flush_2g22m_185", Ae = "ds-accordion_summary--small_2g22m_253", Ie = "ds-accordion_summary--x-small_2g22m_257", Ee = "ds-accordion_summary-content-wrapper_2g22m_262", Xe = "ds-accordion_summary-content-wrapper--flush_2g22m_268", Fe = "ds-accordion_summary-content-wrapper--chevron-left_2g22m_272", Te = "ds-accordion_summary-content-wrapper--x-small_2g22m_276", Pe = "ds-accordion_heading-summary-wrapper_2g22m_280", Re = "ds-accordion_heading-summary_2g22m_280", Le = "ds-accordion_heading-summary--x-small_2g22m_290", je = "ds-accordion_hint_2g22m_294", ze = "ds-accordion_icon_2g22m_308", Me = "ds-accordion_icon--open_2g22m_319", He = "ds-accordion_icon--open-caret_2g22m_330", Ue = "ds-accordion_content-wrapper_2g22m_342", qe = "ds-accordion_content-wrapper--flush_2g22m_348", Ve = "ds-accordion_content-wrapper--small_2g22m_352", Ze = "ds-accordion_content-wrapper--x-small_2g22m_356", t = {
11
+ details: we,
12
+ summary: De,
13
+ summaryUtilityM: be,
14
+ summaryFlush: xe,
15
+ summarySmall: Ae,
16
+ summaryXSmall: Ie,
17
+ summaryContentWrapper: Ee,
18
+ summaryContentWrapperFlush: Xe,
19
+ summaryContentWrapperChevronLeft: Fe,
20
+ summaryContentWrapperXSmall: Te,
21
+ headingSummaryWrapper: Pe,
22
+ headingSummary: Re,
23
+ headingSummaryXSmall: Le,
24
+ hint: je,
25
+ icon: ze,
26
+ iconOpen: Me,
27
+ iconOpenCaret: He,
28
+ contentWrapper: Ue,
29
+ contentWrapperFlush: qe,
30
+ contentWrapperSmall: Ve,
31
+ contentWrapperXSmall: Ze
32
+ }, rt = ["medium", "small", "x-small"], nt = ["chevron", "caret"], st = ["left", "right"], $e = ({
33
+ children: O,
34
+ hint: k,
35
+ numberIndicatorValue: e,
36
+ numberIndicatorAriaLabel: n,
37
+ summary: o
38
+ }) => {
39
+ if (!O)
40
+ throw new Error($("DSAccordion", "The component requires children to be set."));
41
+ if (!o)
42
+ throw new Error($("DSAccordion", "The summary prop is required. Please add the summary prop to the DSAccordion component."));
43
+ if (k && (e || e === ""))
44
+ throw new Error($("DSAccordion", "The hint and numberIndicator props cannot be used together. Please remove either the hint prop or the numberIndicatorValue prop."));
45
+ (e || e === "") && !n && console.warn($("DSAccordion", "Please provide a descriptive aria-label for the Number Indicator for better accessibility."));
46
+ }, ke = ge((O, k) => {
47
+ const e = fe.c(75);
48
+ let n, o, m, l, s, p, r, w, D, b, x;
49
+ e[0] !== O ? ({
50
+ children: n,
51
+ summary: r,
52
+ chevronPosition: w,
53
+ className: o,
54
+ hint: m,
55
+ isFlush: D,
56
+ isOpen: b,
57
+ numberIndicatorValue: s,
58
+ numberIndicatorAriaLabel: l,
59
+ size: x,
60
+ ...p
61
+ } = O, e[0] = O, e[1] = n, e[2] = o, e[3] = m, e[4] = l, e[5] = s, e[6] = p, e[7] = r, e[8] = w, e[9] = D, e[10] = b, e[11] = x) : (n = e[1], o = e[2], m = e[3], l = e[4], s = e[5], p = e[6], r = e[7], w = e[8], D = e[9], b = e[10], x = e[11]);
62
+ const pe = w === void 0 ? "right" : w, a = D === void 0 ? !1 : D, i = b === void 0 ? !1 : b, u = x === void 0 ? "medium" : x;
63
+ process.env.NODE_ENV !== "production" && $e({
64
+ children: n,
65
+ hint: m,
66
+ numberIndicatorValue: s,
67
+ numberIndicatorAriaLabel: l,
68
+ summary: r
69
+ });
70
+ const B = pe === "right" ? "chevron" : "caret", c = Se(null), [ue, he] = ve(i);
71
+ let I;
72
+ e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (I = () => c.current, e[12] = I) : I = e[12], Ce(k, I);
73
+ let E;
74
+ e[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (E = () => {
75
+ c.current && he(c.current.open);
76
+ }, e[13] = E) : E = e[13];
77
+ let X;
78
+ e[14] !== i ? (X = [i], e[14] = i, e[15] = X) : X = e[15], ye(E, X);
79
+ let F, T;
80
+ e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (F = () => {
81
+ const _e = () => {
82
+ c.current && he(c.current.open);
83
+ };
84
+ return c.current?.addEventListener("toggle", _e), () => {
85
+ c.current?.removeEventListener("toggle", _e);
86
+ };
87
+ }, T = [], e[16] = F, e[17] = T) : (F = e[16], T = e[17]), ye(F, T);
88
+ let P, R, L;
89
+ const A = typeof r == "object" && r !== void 0;
90
+ A && ({
91
+ headingSize: P,
92
+ headingTag: R,
93
+ headingText: L
94
+ } = r);
95
+ let j;
96
+ e[18] !== o ? (j = N(t.details, o), e[18] = o, e[19] = j) : j = e[19];
97
+ const G = j, J = u === "small", K = u === "x-small", Q = !A;
98
+ let z;
99
+ e[20] !== a || e[21] !== J || e[22] !== K || e[23] !== Q ? (z = N(t.summary, {
100
+ [t.summaryFlush]: a,
101
+ [t.summarySmall]: J,
102
+ [t.summaryXSmall]: K,
103
+ [t.summaryUtilityM]: Q
104
+ }), e[20] = a, e[21] = J, e[22] = K, e[23] = Q, e[24] = z) : z = e[24];
105
+ const Y = z, ee = pe === "left", te = u === "x-small";
106
+ let M;
107
+ e[25] !== a || e[26] !== ee || e[27] !== te ? (M = N(t.summaryContentWrapper, {
108
+ [t.summaryContentWrapperFlush]: a,
109
+ [t.summaryContentWrapperChevronLeft]: ee,
110
+ [t.summaryContentWrapperXSmall]: te
111
+ }), e[25] = a, e[26] = ee, e[27] = te, e[28] = M) : M = e[28];
112
+ const re = M, ne = u === "x-small";
113
+ let H;
114
+ e[29] !== ne ? (H = N(t.headingSummary, {
115
+ [t.headingSummaryXSmall]: ne
116
+ }), e[29] = ne, e[30] = H) : H = e[30];
117
+ const se = H, ae = B === "chevron" && ue, oe = B === "caret" && ue;
118
+ let U;
119
+ e[31] !== ae || e[32] !== oe ? (U = N(t.icon, {
120
+ [t.iconOpen]: ae,
121
+ [t.iconOpenCaret]: oe
122
+ }), e[31] = ae, e[32] = oe, e[33] = U) : U = e[33];
123
+ const me = U, ce = u === "small", le = u === "x-small";
124
+ let q;
125
+ e[34] !== a || e[35] !== ce || e[36] !== le ? (q = N(t.contentWrapper, {
126
+ [t.contentWrapperFlush]: a,
127
+ [t.contentWrapperSmall]: ce,
128
+ [t.contentWrapperXSmall]: le
129
+ }), e[34] = a, e[35] = ce, e[36] = le, e[37] = q) : q = e[37];
130
+ const ie = q;
131
+ let h;
132
+ e[38] !== P || e[39] !== R || e[40] !== L || e[41] !== A || e[42] !== r ? (h = A ? /* @__PURE__ */ d(We, { tag: R, size: P, children: L }) : r, e[38] = P, e[39] = R, e[40] = L, e[41] = A, e[42] = r, e[43] = h) : h = e[43];
133
+ let _;
134
+ e[44] !== l || e[45] !== s ? (_ = (s || s?.trim() === "") && /* @__PURE__ */ d("div", { children: /* @__PURE__ */ d(Oe, { "aria-label": l, label: s }) }), e[44] = l, e[45] = s, e[46] = _) : _ = e[46];
135
+ let y;
136
+ e[47] !== se || e[48] !== h || e[49] !== _ ? (y = /* @__PURE__ */ Z("div", { className: se, children: [
137
+ h,
138
+ _
139
+ ] }), e[47] = se, e[48] = h, e[49] = _, e[50] = y) : y = e[50];
140
+ let f;
141
+ e[51] !== m ? (f = m && /* @__PURE__ */ d("div", { className: t.hint, children: m }), e[51] = m, e[52] = f) : f = e[52];
142
+ let g;
143
+ e[53] !== y || e[54] !== f ? (g = /* @__PURE__ */ Z("div", { className: t.headingSummaryWrapper, children: [
144
+ y,
145
+ f
146
+ ] }), e[53] = y, e[54] = f, e[55] = g) : g = e[55];
147
+ const de = B === "chevron" ? "chevron-down" : "caret-right";
148
+ let S;
149
+ e[56] !== me || e[57] !== de ? (S = /* @__PURE__ */ d(Ne, { name: de, "aria-hidden": "true", className: me }), e[56] = me, e[57] = de, e[58] = S) : S = e[58];
150
+ let v;
151
+ e[59] !== re || e[60] !== g || e[61] !== S ? (v = /* @__PURE__ */ Z("div", { className: re, children: [
152
+ g,
153
+ S
154
+ ] }), e[59] = re, e[60] = g, e[61] = S, e[62] = v) : v = e[62];
155
+ let C;
156
+ e[63] !== Y || e[64] !== v ? (C = /* @__PURE__ */ d("summary", { className: Y, children: v }), e[63] = Y, e[64] = v, e[65] = C) : C = e[65];
157
+ let W;
158
+ e[66] !== n || e[67] !== ie ? (W = /* @__PURE__ */ d("div", { className: ie, children: n }), e[66] = n, e[67] = ie, e[68] = W) : W = e[68];
159
+ let V;
160
+ return e[69] !== G || e[70] !== i || e[71] !== p || e[72] !== C || e[73] !== W ? (V = /* @__PURE__ */ Z("details", { ...p, ref: c, className: G, open: i, children: [
161
+ C,
162
+ W
163
+ ] }), e[69] = G, e[70] = i, e[71] = p, e[72] = C, e[73] = W, e[74] = V) : V = e[74], V;
164
+ });
165
+ ke.displayName = "DSAccordion";
166
+ export {
167
+ rt as A,
168
+ st as C,
169
+ ke as D,
170
+ nt as a,
171
+ $e as v
172
+ };
@@ -0,0 +1,188 @@
1
+ "use client";
2
+ import { jsxs as q, jsx as d, Fragment as zt } from "react/jsx-runtime";
3
+ import { d as St } from "./index.cKLI89Eg.js";
4
+ import { c as C } from "./index.DQOqod3i.js";
5
+ import { forwardRef as Pt } from "react";
6
+ import { D as wt } from "./Icon.m6sMB6vl.js";
7
+ import { NumberIndicator as Tt } from "../numberindicator.ZGVRSmqf.js";
8
+ import { Tooltip as Wt } from "../tooltip._lP4aMV2.js";
9
+ import { g as f } from "./helpers.CexwVao7.js";
10
+ import '../assets/ActionButton.BLOWs6IZ.css';const Ct = "ds-action-button_root_19zdv_1", Dt = "ds-action-button_root--indent-level-1_19zdv_75", Ot = "ds-action-button_root--active_19zdv_78", Bt = "ds-action-button_root--active--with-marker_19zdv_81", kt = "ds-action-button_root--icon--top_19zdv_84", Lt = "ds-action-button_root--stretched_19zdv_110", Et = "ds-action-button_active-marker_19zdv_115", xt = "ds-action-button_active-marker--with-indent_19zdv_127", Mt = "ds-action-button_icon-wrapper_19zdv_131", Ut = "ds-action-button_icon-wrapper--x-large_19zdv_134", Rt = "ds-action-button_icon-wrapper--with-number-indicator_19zdv_137", Vt = "ds-action-button_icon-wrapper--with-number-indicator--with-value_19zdv_145", yt = "ds-action-button_label_19zdv_149", Ht = "ds-action-button_label--bold_19zdv_160", Xt = "ds-action-button_label--active_19zdv_171", jt = "ds-action-button_label--icon-top_19zdv_182", Ft = "ds-action-button_number-indicator_19zdv_205", Gt = "ds-action-button_label-wrapper_19zdv_209", Zt = "ds-action-button_label-wrapper--icon-top_19zdv_214", $t = "ds-action-button_chevron_19zdv_218", qt = "ds-action-button_chevron--icon-position-top_19zdv_233", Jt = "ds-action-button_chevron--up_19zdv_239", Kt = "ds-action-button_chevron--right_19zdv_250", Qt = "ds-action-button_chevron--left_19zdv_261", o = {
11
+ root: Ct,
12
+ rootIndentLevel1: Dt,
13
+ rootActive: Ot,
14
+ rootActiveWithMarker: Bt,
15
+ rootIconTop: kt,
16
+ rootStretched: Lt,
17
+ activeMarker: Et,
18
+ activeMarkerWithIndent: xt,
19
+ iconWrapper: Mt,
20
+ iconWrapperXLarge: Ut,
21
+ iconWrapperWithNumberIndicator: Rt,
22
+ iconWrapperWithNumberIndicatorWithValue: Vt,
23
+ label: yt,
24
+ labelBold: Ht,
25
+ labelActive: Xt,
26
+ labelIconTop: jt,
27
+ numberIndicator: Ft,
28
+ labelWrapper: Gt,
29
+ labelWrapperIconTop: Zt,
30
+ chevron: $t,
31
+ chevronIconPositionTop: qt,
32
+ chevronUp: Jt,
33
+ chevronRight: Kt,
34
+ chevronLeft: Qt
35
+ }, lo = ["left", "top"], po = ["large", "x-large"], ho = [0, 1], vo = ["normal", "bold"], bo = ["up", "down", "right", "left"], Yt = ({
36
+ iconName: m,
37
+ iconSize: I,
38
+ iconSource: t,
39
+ iconPosition: h,
40
+ indentLevel: a,
41
+ stretched: v,
42
+ weight: b,
43
+ numberIndicatorValue: r,
44
+ numberIndicatorAriaLabel: c
45
+ }) => {
46
+ if (m && !t && I === "x-large" && console.warn(f("DSActionButton", 'An "iconSize" prop set to "x-large" has no effect when "iconName" is set. Please remove the "iconSize" prop or provide a custom icon via the "iconSource" prop.')), h === "top") {
47
+ if (!m && !t)
48
+ throw new Error(f("DSActionButton", 'The "iconPosition" prop should not be set to "top", when no "iconName" or "iconSource" prop was provided. Please either remove the "iconPosition" prop or set a valid icon via the "iconName" or "iconSource" prop.'));
49
+ I === "x-large" && console.warn(f("DSActionButton", 'An "iconSize" prop set to "x-large" has no effect when "iconPosition" is set to "top". Please remove the "iconSize" prop.')), b === "bold" && console.warn(f("DSActionButton", 'A "weight" prop set to "bold" with "iconPosition" set to "top" has no effect. Please remove the "weight" prop.')), a === 1 && console.warn(f("DSActionButton", 'An "indentLevel" prop set to "1" with "iconPosition" set to "top" has no effect. Please remove the "indentLevel" prop.')), v && console.warn(f("DSActionButton", 'A "stretched" prop set to "true" with "iconPosition" set to "top" has no effect. Please remove the "stretched" prop.'));
50
+ }
51
+ (r || r === "") && !c && console.warn(f("DSActionButton", "Please provide a descriptive aria-label for the Number Indicator for better accessibility."));
52
+ }, to = Pt((m, I) => {
53
+ const t = St.c(96);
54
+ let h, a, v, b, r, c, s, n, _, N, D, O, B, k, L, E, x, u;
55
+ t[0] !== m ? ({
56
+ children: v,
57
+ aria: h,
58
+ chevronDirection: a,
59
+ className: b,
60
+ disabled: D,
61
+ iconName: r,
62
+ iconPosition: O,
63
+ iconSize: B,
64
+ iconSource: c,
65
+ indentLevel: k,
66
+ isActive: L,
67
+ numberIndicatorValue: n,
68
+ numberIndicatorAriaLabel: s,
69
+ stretched: E,
70
+ weight: x,
71
+ tooltip: u,
72
+ onClick: _,
73
+ ...N
74
+ } = m, t[0] = m, t[1] = h, t[2] = a, t[3] = v, t[4] = b, t[5] = r, t[6] = c, t[7] = s, t[8] = n, t[9] = _, t[10] = N, t[11] = D, t[12] = O, t[13] = B, t[14] = k, t[15] = L, t[16] = E, t[17] = x, t[18] = u) : (h = t[1], a = t[2], v = t[3], b = t[4], r = t[5], c = t[6], s = t[7], n = t[8], _ = t[9], N = t[10], D = t[11], O = t[12], B = t[13], k = t[14], L = t[15], E = t[16], x = t[17], u = t[18]);
75
+ const i = D === void 0 ? !1 : D, e = O === void 0 ? "left" : O, M = B === void 0 ? "large" : B, J = k === void 0 ? 0 : k, W = L === void 0 ? !1 : L, At = E === void 0 ? !1 : E, gt = x === void 0 ? "normal" : x;
76
+ process.env.NODE_ENV !== "production" && Yt({
77
+ iconName: r,
78
+ iconSize: M,
79
+ iconSource: c,
80
+ iconPosition: e,
81
+ indentLevel: J,
82
+ numberIndicatorValue: n,
83
+ numberIndicatorAriaLabel: s,
84
+ stretched: At,
85
+ weight: gt
86
+ });
87
+ let U;
88
+ t[19] !== n ? (U = n?.trim(), t[19] = n, t[20] = U) : U = t[20];
89
+ const l = U === "", K = e === "top", Q = J === 1, Y = W && !i, tt = W && !i && e === "left", ot = At === !0 && e === "left";
90
+ let R;
91
+ t[21] !== b || t[22] !== Q || t[23] !== Y || t[24] !== tt || t[25] !== ot || t[26] !== K ? (R = C(o.root, b, {
92
+ [o.rootIconTop]: K,
93
+ [o.rootIndentLevel1]: Q,
94
+ [o.rootActive]: Y,
95
+ [o.rootActiveWithMarker]: tt,
96
+ [o.rootStretched]: ot
97
+ }), t[21] = b, t[22] = Q, t[23] = Y, t[24] = tt, t[25] = ot, t[26] = K, t[27] = R) : R = t[27];
98
+ const et = R, nt = J === 1;
99
+ let V;
100
+ t[28] !== nt ? (V = C(o.activeMarker, {
101
+ [o.activeMarkerWithIndent]: nt
102
+ }), t[28] = nt, t[29] = V) : V = t[29];
103
+ const it = V, rt = W && !i, ct = gt === "bold", at = e === "top";
104
+ let y;
105
+ t[30] !== rt || t[31] !== ct || t[32] !== at ? (y = C(o.label, {
106
+ [o.labelActive]: rt,
107
+ [o.labelBold]: ct,
108
+ [o.labelIconTop]: at
109
+ }), t[30] = rt, t[31] = ct, t[32] = at, t[33] = y) : y = t[33];
110
+ const st = y, lt = e === "top";
111
+ let H;
112
+ t[34] !== lt ? (H = C(o.labelWrapper, {
113
+ [o.labelWrapperIconTop]: lt
114
+ }), t[34] = lt, t[35] = H) : H = t[35];
115
+ const pt = H, dt = e === "top", ht = a === "up", vt = a === "right", bt = a === "left";
116
+ let X;
117
+ t[36] !== dt || t[37] !== ht || t[38] !== vt || t[39] !== bt ? (X = C(o.chevron, {
118
+ [o.chevronIconPositionTop]: dt,
119
+ [o.chevronUp]: ht,
120
+ [o.chevronRight]: vt,
121
+ [o.chevronLeft]: bt
122
+ }), t[36] = dt, t[37] = ht, t[38] = vt, t[39] = bt, t[40] = X) : X = t[40];
123
+ const _t = X, ut = M === "x-large", ft = (r || c) && (n || l), mt = (r || c) && !l;
124
+ let j;
125
+ t[41] !== ut || t[42] !== ft || t[43] !== mt ? (j = C(o.iconWrapper, {
126
+ [o.iconWrapperXLarge]: ut,
127
+ [o.iconWrapperWithNumberIndicator]: ft,
128
+ [o.iconWrapperWithNumberIndicatorWithValue]: mt
129
+ }), t[41] = ut, t[42] = ft, t[43] = mt, t[44] = j) : j = t[44];
130
+ const It = j;
131
+ let F;
132
+ t[45] !== i || t[46] !== _ ? (F = (p) => {
133
+ if (i) {
134
+ p.preventDefault();
135
+ return;
136
+ }
137
+ _ && _(p);
138
+ }, t[45] = i, t[46] = _, t[47] = F) : F = t[47];
139
+ const Nt = F;
140
+ let A;
141
+ t[48] !== it || t[49] !== e || t[50] !== W ? (A = W && e === "left" && /* @__PURE__ */ d("div", { className: it }), t[48] = it, t[49] = e, t[50] = W, t[51] = A) : A = t[51];
142
+ let g;
143
+ t[52] !== i || t[53] !== r || t[54] !== e || t[55] !== M || t[56] !== c || t[57] !== It || t[58] !== l || t[59] !== s || t[60] !== n ? (g = (r || c) && /* @__PURE__ */ d(zt, { children: /* @__PURE__ */ q("span", { className: It, children: [
144
+ /* @__PURE__ */ d(wt, { name: r, theme: "light", source: c, "aria-hidden": "true", size: r || e === "top" ? "large" : M }),
145
+ !i && (e === "left" && l || e === "top" && (n || l)) && /* @__PURE__ */ d(Tt, { variant: "highlight", "aria-label": s, label: n })
146
+ ] }) }), t[52] = i, t[53] = r, t[54] = e, t[55] = M, t[56] = c, t[57] = It, t[58] = l, t[59] = s, t[60] = n, t[61] = g) : g = t[61];
147
+ let w;
148
+ t[62] !== v || t[63] !== st ? (w = /* @__PURE__ */ d("span", { className: st, children: v }), t[62] = v, t[63] = st, t[64] = w) : w = t[64];
149
+ let T;
150
+ t[65] !== _t || t[66] !== a ? (T = a && /* @__PURE__ */ d(wt, { name: "chevron-down", theme: "light", "aria-hidden": "true", className: _t }), t[65] = _t, t[66] = a, t[67] = T) : T = t[67];
151
+ let z;
152
+ t[68] !== pt || t[69] !== w || t[70] !== T ? (z = /* @__PURE__ */ q("div", { className: pt, children: [
153
+ w,
154
+ T
155
+ ] }), t[68] = pt, t[69] = w, t[70] = T, t[71] = z) : z = t[71];
156
+ let S;
157
+ t[72] !== i || t[73] !== e || t[74] !== l || t[75] !== s || t[76] !== n ? (S = e === "left" && !i && n && !l && /* @__PURE__ */ d(Tt, { variant: "default", "aria-label": s, label: n, className: o.numberIndicator }), t[72] = i, t[73] = e, t[74] = l, t[75] = s, t[76] = n, t[77] = S) : S = t[77];
158
+ let G;
159
+ t[78] !== h || t[79] !== i || t[80] !== Nt || t[81] !== I || t[82] !== N || t[83] !== et || t[84] !== A || t[85] !== g || t[86] !== z || t[87] !== S ? (G = /* @__PURE__ */ q("button", { className: et, type: "button", onClick: Nt, ...h, ...N, "aria-disabled": i, ref: I, children: [
160
+ A,
161
+ g,
162
+ z,
163
+ S
164
+ ] }), t[78] = h, t[79] = i, t[80] = Nt, t[81] = I, t[82] = N, t[83] = et, t[84] = A, t[85] = g, t[86] = z, t[87] = S, t[88] = G) : G = t[88];
165
+ const Z = G;
166
+ if (u) {
167
+ let p;
168
+ t[89] !== Z ? (p = /* @__PURE__ */ d(Wt.Anchor, { children: Z }), t[89] = Z, t[90] = p) : p = t[90];
169
+ let P;
170
+ t[91] !== u ? (P = /* @__PURE__ */ d(Wt.Content, { children: u }), t[91] = u, t[92] = P) : P = t[92];
171
+ let $;
172
+ return t[93] !== p || t[94] !== P ? ($ = /* @__PURE__ */ q(Wt, { placement: "top", tooltipOffset: 6, children: [
173
+ p,
174
+ P
175
+ ] }), t[93] = p, t[94] = P, t[95] = $) : $ = t[95], $;
176
+ }
177
+ return Z;
178
+ });
179
+ to.displayName = "DSActionButton";
180
+ export {
181
+ lo as A,
182
+ to as D,
183
+ po as a,
184
+ ho as b,
185
+ vo as c,
186
+ bo as d,
187
+ Yt as v
188
+ };
@@ -0,0 +1,161 @@
1
+ "use client";
2
+ import { jsxs as pt, jsx as b, Fragment as _t } from "react/jsx-runtime";
3
+ import { d as mt } from "./index.cKLI89Eg.js";
4
+ import { c as R } from "./index.DQOqod3i.js";
5
+ import { forwardRef as vt } from "react";
6
+ import { D as kt } from "./Icon.m6sMB6vl.js";
7
+ import { NumberIndicator as bt } from "../numberindicator.ZGVRSmqf.js";
8
+ import { Tooltip as dt } from "../tooltip._lP4aMV2.js";
9
+ import { g as m } from "./helpers.CexwVao7.js";
10
+ import '../assets/ActionLink.BJDUVdT7.css';const It = "ds-action-link_root_o08fb_1", Nt = "ds-action-link_root--indent-level-1_o08fb_75", ut = "ds-action-link_root--active_o08fb_78", At = "ds-action-link_root--active--with-marker_o08fb_81", wt = "ds-action-link_root--icon--top_o08fb_84", gt = "ds-action-link_root--stretched_o08fb_110", Wt = "ds-action-link_active-marker_o08fb_115", Lt = "ds-action-link_active-marker--with-indent_o08fb_127", St = "ds-action-link_icon-wrapper_o08fb_131", Pt = "ds-action-link_icon-wrapper--x-large_o08fb_134", Dt = "ds-action-link_icon-wrapper--with-number-indicator_o08fb_137", Tt = "ds-action-link_icon-wrapper--with-number-indicator--with-value_o08fb_145", xt = "ds-action-link_label_o08fb_149", Ct = "ds-action-link_label--bold_o08fb_160", Mt = "ds-action-link_label--active_o08fb_171", Et = "ds-action-link_label--icon-top_o08fb_182", Ot = "ds-action-link_number-indicator_o08fb_205", o = {
11
+ root: It,
12
+ rootIndentLevel1: Nt,
13
+ rootActive: ut,
14
+ rootActiveWithMarker: At,
15
+ rootIconTop: wt,
16
+ rootStretched: gt,
17
+ activeMarker: Wt,
18
+ activeMarkerWithIndent: Lt,
19
+ iconWrapper: St,
20
+ iconWrapperXLarge: Pt,
21
+ iconWrapperWithNumberIndicator: Dt,
22
+ iconWrapperWithNumberIndicatorWithValue: Tt,
23
+ label: xt,
24
+ labelBold: Ct,
25
+ labelActive: Mt,
26
+ labelIconTop: Et,
27
+ numberIndicator: Ot
28
+ }, Rt = ["left", "top"], Zt = ["large", "x-large"], $t = [0, 1], qt = ["normal", "bold"], zt = ({
29
+ iconName: v,
30
+ iconSize: k,
31
+ iconSource: t,
32
+ iconPosition: s,
33
+ indentLevel: p,
34
+ stretched: d,
35
+ weight: f,
36
+ numberIndicatorValue: r,
37
+ numberIndicatorAriaLabel: n
38
+ }) => {
39
+ if (v && !t && k === "x-large" && console.warn(m("DSActionLink", 'An "iconSize" prop set to "x-large" has no effect when "iconName" is set. Please remove the "iconSize" prop or provide a custom icon via the "iconSource" prop.')), s === "top") {
40
+ if (!v && !t)
41
+ throw new Error(m("DSActionLink", 'The "iconPosition" prop should not be set to "top", when no "iconName" or "iconSource" prop was provided. Please either remove the "iconPosition" prop or set a valid icon via the "iconName" or "iconSource" prop.'));
42
+ k === "x-large" && console.warn(m("DSActionLink", 'An "iconSize" prop set to "x-large" has no effect when "iconPosition" is set to "top". Please remove the "iconSize" prop.')), f === "bold" && console.warn(m("DSActionLink", 'A "weight" prop set to "bold" with "iconPosition" set to "top" has no effect. Please remove the "weight" prop.')), p === 1 && console.warn(m("DSActionLink", 'An "indentLevel" prop set to "1" with "iconPosition" set to "top" has no effect. Please remove the "indentLevel" prop.')), d && console.warn(m("DSActionLink", 'A "stretched" prop set to "true" with "iconPosition" set to "top" has no effect. Please remove the "stretched" prop.'));
43
+ }
44
+ (r || r === "") && !n && console.warn(m("DSActionLink", "Please provide a descriptive aria-label for the Number Indicator for better accessibility."));
45
+ }, Vt = vt((v, k) => {
46
+ const t = mt.c(86);
47
+ let s, p, d, f, r, n, c, a, i, I, N, u, T, x, C, M, E, O, z, _;
48
+ t[0] !== v ? ({
49
+ children: p,
50
+ aria: s,
51
+ className: d,
52
+ download: f,
53
+ href: r,
54
+ iconName: n,
55
+ iconPosition: T,
56
+ iconSize: x,
57
+ iconSource: c,
58
+ indentLevel: C,
59
+ isActive: M,
60
+ numberIndicatorValue: i,
61
+ numberIndicatorAriaLabel: a,
62
+ referrerPolicy: I,
63
+ rel: N,
64
+ stretched: E,
65
+ target: O,
66
+ tooltip: _,
67
+ weight: z,
68
+ ...u
69
+ } = v, t[0] = v, t[1] = s, t[2] = p, t[3] = d, t[4] = f, t[5] = r, t[6] = n, t[7] = c, t[8] = a, t[9] = i, t[10] = I, t[11] = N, t[12] = u, t[13] = T, t[14] = x, t[15] = C, t[16] = M, t[17] = E, t[18] = O, t[19] = z, t[20] = _) : (s = t[1], p = t[2], d = t[3], f = t[4], r = t[5], n = t[6], c = t[7], a = t[8], i = t[9], I = t[10], N = t[11], u = t[12], T = t[13], x = t[14], C = t[15], M = t[16], E = t[17], O = t[18], z = t[19], _ = t[20]);
70
+ const e = T === void 0 ? "left" : T, V = x === void 0 ? "large" : x, Z = C === void 0 ? 0 : C, h = M === void 0 ? !1 : M, ft = E === void 0 ? !1 : E, $ = O === void 0 ? "_self" : O, ht = z === void 0 ? "normal" : z;
71
+ process.env.NODE_ENV !== "production" && zt({
72
+ iconName: n,
73
+ iconSize: V,
74
+ iconSource: c,
75
+ iconPosition: e,
76
+ indentLevel: Z,
77
+ numberIndicatorValue: i,
78
+ numberIndicatorAriaLabel: a,
79
+ stretched: ft,
80
+ weight: ht
81
+ });
82
+ let y;
83
+ t[21] !== i ? (y = i?.trim(), t[21] = i, t[22] = y) : y = t[22];
84
+ const l = y === "", q = e === "top", J = Z === 1, Q = h && e === "left", U = ft === !0 && e === "left";
85
+ let K;
86
+ t[23] !== d || t[24] !== h || t[25] !== J || t[26] !== Q || t[27] !== U || t[28] !== q ? (K = R(o.root, d, {
87
+ [o.rootIconTop]: q,
88
+ [o.rootIndentLevel1]: J,
89
+ [o.rootActive]: h,
90
+ [o.rootActiveWithMarker]: Q,
91
+ [o.rootStretched]: U
92
+ }), t[23] = d, t[24] = h, t[25] = J, t[26] = Q, t[27] = U, t[28] = q, t[29] = K) : K = t[29];
93
+ const Y = K, tt = Z === 1;
94
+ let B;
95
+ t[30] !== tt ? (B = R(o.activeMarker, {
96
+ [o.activeMarkerWithIndent]: tt
97
+ }), t[30] = tt, t[31] = B) : B = t[31];
98
+ const et = B, ot = h && e === "left", it = ht === "bold", nt = e === "top";
99
+ let X;
100
+ t[32] !== ot || t[33] !== it || t[34] !== nt ? (X = R(o.label, {
101
+ [o.labelActive]: ot,
102
+ [o.labelBold]: it,
103
+ [o.labelIconTop]: nt
104
+ }), t[32] = ot, t[33] = it, t[34] = nt, t[35] = X) : X = t[35];
105
+ const rt = X, ct = V === "x-large", at = (n || c) && (i || l), lt = (n || c) && !l;
106
+ let j;
107
+ t[36] !== ct || t[37] !== at || t[38] !== lt ? (j = R(o.iconWrapper, {
108
+ [o.iconWrapperXLarge]: ct,
109
+ [o.iconWrapperWithNumberIndicator]: at,
110
+ [o.iconWrapperWithNumberIndicatorWithValue]: lt
111
+ }), t[36] = ct, t[37] = at, t[38] = lt, t[39] = j) : j = t[39];
112
+ const st = j, A = r === void 0 ? "span" : "a";
113
+ let w;
114
+ t[40] !== A || t[41] !== f || t[42] !== r || t[43] !== I || t[44] !== N || t[45] !== $ ? (w = A === "a" && {
115
+ href: r,
116
+ target: $,
117
+ rel: N,
118
+ referrerPolicy: I,
119
+ download: f
120
+ }, t[40] = A, t[41] = f, t[42] = r, t[43] = I, t[44] = N, t[45] = $, t[46] = w) : w = t[46];
121
+ let g;
122
+ t[47] !== et || t[48] !== e || t[49] !== h ? (g = h && e === "left" && /* @__PURE__ */ b("div", { className: et }), t[47] = et, t[48] = e, t[49] = h, t[50] = g) : g = t[50];
123
+ let W;
124
+ t[51] !== n || t[52] !== e || t[53] !== V || t[54] !== c || t[55] !== st || t[56] !== l || t[57] !== a || t[58] !== i ? (W = (n || c) && /* @__PURE__ */ b(_t, { children: /* @__PURE__ */ pt("span", { className: st, children: [
125
+ /* @__PURE__ */ b(kt, { name: n, theme: "light", source: c, "aria-hidden": "true", size: n || e === "top" ? "large" : V }),
126
+ (e === "left" && l || e === "top" && (i || l)) && /* @__PURE__ */ b(bt, { variant: "highlight", "aria-label": a, label: i })
127
+ ] }) }), t[51] = n, t[52] = e, t[53] = V, t[54] = c, t[55] = st, t[56] = l, t[57] = a, t[58] = i, t[59] = W) : W = t[59];
128
+ let L;
129
+ t[60] !== p || t[61] !== rt ? (L = /* @__PURE__ */ b("span", { className: rt, children: p }), t[60] = p, t[61] = rt, t[62] = L) : L = t[62];
130
+ let S;
131
+ t[63] !== e || t[64] !== l || t[65] !== a || t[66] !== i ? (S = e === "left" && i && !l && /* @__PURE__ */ b(bt, { variant: "default", "aria-label": a, label: i, className: o.numberIndicator }), t[63] = e, t[64] = l, t[65] = a, t[66] = i, t[67] = S) : S = t[67];
132
+ let H;
133
+ t[68] !== A || t[69] !== s || t[70] !== k || t[71] !== u || t[72] !== Y || t[73] !== w || t[74] !== g || t[75] !== W || t[76] !== L || t[77] !== S ? (H = /* @__PURE__ */ pt(A, { className: Y, ...w, ...s, ...u, ref: k, children: [
134
+ g,
135
+ W,
136
+ L,
137
+ S
138
+ ] }), t[68] = A, t[69] = s, t[70] = k, t[71] = u, t[72] = Y, t[73] = w, t[74] = g, t[75] = W, t[76] = L, t[77] = S, t[78] = H) : H = t[78];
139
+ const F = H;
140
+ if (_) {
141
+ let P;
142
+ t[79] !== F ? (P = /* @__PURE__ */ b(dt.Anchor, { children: F }), t[79] = F, t[80] = P) : P = t[80];
143
+ let D;
144
+ t[81] !== _ ? (D = /* @__PURE__ */ b(dt.Content, { children: _ }), t[81] = _, t[82] = D) : D = t[82];
145
+ let G;
146
+ return t[83] !== P || t[84] !== D ? (G = /* @__PURE__ */ pt(dt, { placement: "top", tooltipOffset: 6, children: [
147
+ P,
148
+ D
149
+ ] }), t[83] = P, t[84] = D, t[85] = G) : G = t[85], G;
150
+ }
151
+ return F;
152
+ });
153
+ Vt.displayName = "DSActionLink";
154
+ export {
155
+ Rt as A,
156
+ Vt as D,
157
+ Zt as a,
158
+ $t as b,
159
+ qt as c,
160
+ zt as v
161
+ };