@stihl-design-system/components 1.0.0-RC.26 → 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.
- package/{accordion.CBaDU14g.js → accordion.B9X4Vlig.js} +1 -1
- package/{actionbutton.DEJsLxnQ.js → actionbutton.7x4F7a0U.js} +1 -1
- package/{actionlink.Cs6BTCA3.js → actionlink.CV0n19ik.js} +1 -1
- package/assets/Accordion.BHWEZCmu.css +1 -0
- package/assets/CustomReactSelect.Dq5Hoqv2.css +1 -0
- package/assets/{Fieldset.Cy5r0K7n.css → Fieldset.CW9dBvAo.css} +1 -1
- package/assets/InputFile.BVgHILAZ.css +1 -0
- package/assets/InputPassword.CBpkWGy7.css +1 -0
- package/assets/InputSearch.CnPJYH8L.css +1 -0
- package/assets/InputStepper.U2h9Kd0t.css +1 -0
- package/assets/Select.U7xsC0o1.css +1 -0
- package/assets/Slider.DzwSjDPV.css +1 -0
- package/assets/Textarea.C4IEEOFR.css +1 -0
- package/assets/banner.D9EiZqqR.css +1 -0
- package/assets/input.CuIHvnD5.css +1 -0
- package/assets/radio.ipbv7OMF.css +1 -0
- package/assets/scroller.Hszs1Yq4.css +1 -0
- package/banner.CgQdUb_c.js +55 -0
- package/banner.d.ts +2 -0
- package/{checkboxgroup.YK8H0YoX.js → checkboxgroup.Bylq97Q9.js} +2 -2
- package/chipgroup.BWpqUzXF.js +209 -0
- package/chunks/Accordion.BvHroAyn.js +154 -0
- package/chunks/ActionButton.BlhiiU3l.js +165 -0
- package/chunks/ActionLink.BvFL6rgb.js +138 -0
- package/chunks/{CheckboxGroup.DHzpgOWp.js → CheckboxGroup.D4MQD0i0.js} +1 -1
- package/chunks/{CustomReactSelect.DWdh3k_q.js → CustomReactSelect.D9B928kB.js} +440 -438
- package/chunks/Fieldset.BgZMYAH-.js +74 -0
- package/chunks/Header.BSvyYrIV.js +368 -0
- package/chunks/InputFile.rC7NJYrU.js +218 -0
- package/chunks/InputPassword.5-r36K86.js +132 -0
- package/chunks/InputSearch.D4Q99_nR.js +170 -0
- package/chunks/InputStepper.EsPAGCFJ.js +259 -0
- package/chunks/{NavigationTabs.CuOXq0b7.js → NavigationTabs.BofhX8bD.js} +1 -1
- package/chunks/{RadioGroup.okEm_-NA.js → RadioGroup.CRP8_vsg.js} +2 -2
- package/chunks/Select.lveq1iBY.js +158 -0
- package/chunks/Slider.D9MHH4cZ.js +292 -0
- package/chunks/{Tabs.C4qGWCcD.js → Tabs.Bl4K3Kjn.js} +1 -1
- package/chunks/Textarea.BRfh8ykm.js +161 -0
- package/chunks/is-animation-disabled.CUl4N3LI.js +20 -0
- package/combobox.pMk_oggm.js +60 -0
- package/components/Banner/Banner.d.ts +32 -0
- package/components/Banner/Banner.utils.d.ts +2 -0
- package/components/Combobox/Combobox.d.ts +4 -0
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +1 -1
- package/components/Scroller/Scroller.d.ts +20 -0
- package/components/Scroller/Scroller.utils.d.ts +3 -0
- package/components/Tabs/TabList/TabList.d.ts +1 -1
- package/components/Tabs/TabList/TabList.utils.d.ts +0 -4
- package/{customreactselect.BvuvCDyE.js → customreactselect.-DGMZMFu.js} +2 -3
- package/{fieldset.DM9ELUJa.js → fieldset.BR9fZReW.js} +1 -1
- package/{header.DLrTpc-W.js → header.Z4Oxj_xL.js} +1 -1
- package/index.d.ts +4 -0
- package/index.es.js +202 -195
- package/input.DAneVu7p.js +199 -0
- package/{inputfile.Cmkxf4Vq.js → inputfile.CB-QTIDn.js} +2 -3
- package/{inputpassword.CYfGcUE-.js → inputpassword.B_A0JDkz.js} +2 -3
- package/{inputsearch.CecX8gHD.js → inputsearch.DUgTkPWm.js} +2 -3
- package/{inputstepper.CFgfHjM_.js → inputstepper.DKmlBa0Y.js} +2 -3
- package/{navigationtabs.B86G8ODY.js → navigationtabs.DQ1kE-h4.js} +2 -2
- package/package.json +2 -2
- package/partials/index.js +107 -85
- package/partials/lib/partials.d.ts +1 -1
- package/radio.z-Mi3J6t.js +134 -0
- package/{radiogroup.C2PkTHnF.js → radiogroup.Bk36A24U.js} +3 -3
- package/scroller.CCA6kFR6.js +123 -0
- package/scroller.d.ts +2 -0
- package/{select.CmGQdpsV.js → select.4wUa3vMT.js} +2 -3
- package/{slider.DGmVtnxs.js → slider.BicJfJzc.js} +2 -2
- package/styles/scss/ds/index.scss +1 -0
- package/styles/scss/ds/lib/ds-internal/_index.scss +1 -0
- package/styles/scss/ds/lib/ds-internal/_input.scss +187 -0
- package/styles/scss/ds/lib/input.scss +26 -0
- package/tablist.Dzwe0_J4.js +256 -0
- package/{tabs.Dby_2Hyz.js → tabs.yudjJk9d.js} +2 -2
- package/{textarea.yOTo23Pd.js → textarea.BynOgkpo.js} +2 -3
- package/{topbar.qNB9efbF.js → topbar.Bccms0xZ.js} +1 -1
- package/utils/get-rect.d.ts +4 -0
- package/utils/get-rect.test.d.ts +1 -0
- package/utils/index.d.ts +2 -1
- package/utils/is-animation-disabled.d.ts +14 -0
- package/utils/is-animation-disabled.test.d.ts +1 -0
- package/assets/Accordion.DOcfZwq8.css +0 -1
- package/assets/CustomReactSelect.B8l6al4B.css +0 -1
- package/assets/InputFile.Dqjz53mb.css +0 -1
- package/assets/InputPassword.CkHF5zCh.css +0 -1
- package/assets/InputSearch.BV8Q2EUL.css +0 -1
- package/assets/InputStepper.DzzrAdma.css +0 -1
- package/assets/Select.e1fTfWmm.css +0 -1
- package/assets/Slider.C8i4U4iT.css +0 -1
- package/assets/Textarea.BGV7Z0Z9.css +0 -1
- package/assets/input.Cj4tF_F7.css +0 -1
- package/assets/radio.CqaNn1Gz.css +0 -1
- package/chipgroup.Bp_v9IQu.js +0 -186
- package/chunks/Accordion.eVOD7J_8.js +0 -154
- package/chunks/ActionButton.Ck1rGqgm.js +0 -165
- package/chunks/ActionLink.DnUNjoAT.js +0 -138
- package/chunks/Fieldset.BX46NuLh.js +0 -74
- package/chunks/Header.CsrzyVil.js +0 -356
- package/chunks/InputFile.vkkg5Pab.js +0 -220
- package/chunks/InputPassword.BQU09DJh.js +0 -136
- package/chunks/InputSearch.CXL9ThpX.js +0 -174
- package/chunks/InputStepper.BhLQVAlo.js +0 -263
- package/chunks/Select.D3IUIdPJ.js +0 -162
- package/chunks/Slider.CPG4Btbq.js +0 -292
- package/chunks/Textarea.D4vXRg_U.js +0 -163
- package/combobox.DIB07SNA.js +0 -58
- package/input.D4OiEI8g.js +0 -203
- package/radio.Dm9bDBzM.js +0 -134
- package/tablist.CcCURua8.js +0 -266
- package/utils/isAnimationDisabled.d.ts +0 -1
- /package/components/{Tabs/TabList/TabList.utils.test.d.ts → Banner/Banner.test.d.ts} +0 -0
|
@@ -0,0 +1,154 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as ut, jsx as u, Fragment as It } from "react/jsx-runtime";
|
|
3
|
+
import { d as Nt } from "./index.CgTHIF3K.js";
|
|
4
|
+
import { c as T } from "./index.CEyLAtio.js";
|
|
5
|
+
import { forwardRef as Wt } from "react";
|
|
6
|
+
import { D as ft } from "./Icon.C0161Glk.js";
|
|
7
|
+
import { NumberIndicator as mt } from "../numberindicator.Ddf3ESi7.js";
|
|
8
|
+
import { g as A } from "./helpers.BbWkXTr3.js";
|
|
9
|
+
import '../assets/ActionButton.Ewi0i1hW.css';const gt = "ds-action-button_root_16ush_1", wt = "ds-action-button_root--indent-level-1_16ush_72", Tt = "ds-action-button_root--active_16ush_75", At = "ds-action-button_root--active--with-marker_16ush_78", St = "ds-action-button_root--icon--top_16ush_81", Pt = "ds-action-button_root--stretched_16ush_106", Ct = "ds-action-button_active-marker_16ush_111", Dt = "ds-action-button_active-marker--with-indent_16ush_123", Ot = "ds-action-button_icon-wrapper_16ush_127", Bt = "ds-action-button_icon-wrapper--x-large_16ush_130", kt = "ds-action-button_icon-wrapper--with-number-indicator_16ush_133", Lt = "ds-action-button_icon-wrapper--with-number-indicator--with-value_16ush_141", xt = "ds-action-button_label_16ush_145", Et = "ds-action-button_label--bold_16ush_156", Mt = "ds-action-button_label--active_16ush_167", Ut = "ds-action-button_label--icon-top_16ush_178", zt = "ds-action-button_number-indicator_16ush_201", Rt = "ds-action-button_label-wrapper_16ush_205", Vt = "ds-action-button_label-wrapper--icon-top_16ush_210", yt = "ds-action-button_chevron_16ush_214", Ht = "ds-action-button_chevron--icon-position-top_16ush_229", Xt = "ds-action-button_chevron--up_16ush_235", jt = "ds-action-button_chevron--right_16ush_246", Ft = "ds-action-button_chevron--left_16ush_257", o = {
|
|
10
|
+
root: gt,
|
|
11
|
+
rootIndentLevel1: wt,
|
|
12
|
+
rootActive: Tt,
|
|
13
|
+
rootActiveWithMarker: At,
|
|
14
|
+
rootIconTop: St,
|
|
15
|
+
rootStretched: Pt,
|
|
16
|
+
activeMarker: Ct,
|
|
17
|
+
activeMarkerWithIndent: Dt,
|
|
18
|
+
iconWrapper: Ot,
|
|
19
|
+
iconWrapperXLarge: Bt,
|
|
20
|
+
iconWrapperWithNumberIndicator: kt,
|
|
21
|
+
iconWrapperWithNumberIndicatorWithValue: Lt,
|
|
22
|
+
label: xt,
|
|
23
|
+
labelBold: Et,
|
|
24
|
+
labelActive: Mt,
|
|
25
|
+
labelIconTop: Ut,
|
|
26
|
+
numberIndicator: zt,
|
|
27
|
+
labelWrapper: Rt,
|
|
28
|
+
labelWrapperIconTop: Vt,
|
|
29
|
+
chevron: yt,
|
|
30
|
+
chevronIconPositionTop: Ht,
|
|
31
|
+
chevronUp: Xt,
|
|
32
|
+
chevronRight: jt,
|
|
33
|
+
chevronLeft: Ft
|
|
34
|
+
}, oo = ["left", "top"], eo = ["large", "x-large"], no = [0, 1], io = ["normal", "bold"], ro = ["up", "down", "right", "left"], Gt = ({
|
|
35
|
+
iconName: _,
|
|
36
|
+
iconSize: v,
|
|
37
|
+
iconSource: t,
|
|
38
|
+
iconPosition: l,
|
|
39
|
+
indentLevel: r,
|
|
40
|
+
stretched: p,
|
|
41
|
+
weight: h
|
|
42
|
+
}) => {
|
|
43
|
+
if (_ && !t && v === "x-large" && console.warn(A("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.')), l === "top") {
|
|
44
|
+
if (!_ && !t)
|
|
45
|
+
throw new Error(A("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.'));
|
|
46
|
+
v === "x-large" && console.warn(A("DSActionButton", 'An "iconSize" prop set to "x-large" has no effect when "iconPosition" is set to "top". Please remove the "iconSize" prop.')), h === "bold" && console.warn(A("DSActionButton", 'A "weight" prop set to "bold" with "iconPosition" set to "top" has no effect. Please remove the "weight" prop.')), r === 1 && console.warn(A("DSActionButton", 'An "indentLevel" prop set to "1" with "iconPosition" set to "top" has no effect. Please remove the "indentLevel" prop.')), p && console.warn(A("DSActionButton", 'A "stretched" prop set to "true" with "iconPosition" set to "top" has no effect. Please remove the "stretched" prop.'));
|
|
47
|
+
}
|
|
48
|
+
}, Zt = Wt((_, v) => {
|
|
49
|
+
const t = Nt.c(83);
|
|
50
|
+
let l, r, p, h, c, s, n, d, b, S, P, C, D, O, B, k;
|
|
51
|
+
t[0] !== _ ? ({
|
|
52
|
+
children: p,
|
|
53
|
+
aria: l,
|
|
54
|
+
chevronDirection: r,
|
|
55
|
+
className: h,
|
|
56
|
+
disabled: S,
|
|
57
|
+
iconName: c,
|
|
58
|
+
iconPosition: P,
|
|
59
|
+
iconSize: C,
|
|
60
|
+
iconSource: s,
|
|
61
|
+
indentLevel: D,
|
|
62
|
+
isActive: O,
|
|
63
|
+
numberIndicatorValue: n,
|
|
64
|
+
stretched: B,
|
|
65
|
+
weight: k,
|
|
66
|
+
onClick: d,
|
|
67
|
+
...b
|
|
68
|
+
} = _, t[0] = _, t[1] = l, t[2] = r, t[3] = p, t[4] = h, t[5] = c, t[6] = s, t[7] = n, t[8] = d, t[9] = b, t[10] = S, t[11] = P, t[12] = C, t[13] = D, t[14] = O, t[15] = B, t[16] = k) : (l = t[1], r = t[2], p = t[3], h = t[4], c = t[5], s = t[6], n = t[7], d = t[8], b = t[9], S = t[10], P = t[11], C = t[12], D = t[13], O = t[14], B = t[15], k = t[16]);
|
|
69
|
+
const i = S === void 0 ? !1 : S, e = P === void 0 ? "left" : P, L = C === void 0 ? "large" : C, H = D === void 0 ? 0 : D, f = O === void 0 ? !1 : O, _t = B === void 0 ? !1 : B, vt = k === void 0 ? "normal" : k;
|
|
70
|
+
process.env.NODE_ENV !== "production" && Gt({
|
|
71
|
+
iconName: c,
|
|
72
|
+
iconSize: L,
|
|
73
|
+
iconSource: s,
|
|
74
|
+
iconPosition: e,
|
|
75
|
+
indentLevel: H,
|
|
76
|
+
stretched: _t,
|
|
77
|
+
weight: vt
|
|
78
|
+
});
|
|
79
|
+
const a = (n == null ? void 0 : n.trim()) === "", X = e === "top", j = H === 1, F = f && !i, G = f && !i && e === "left", Z = _t === !0 && e === "left";
|
|
80
|
+
let x;
|
|
81
|
+
t[17] !== h || t[18] !== F || t[19] !== G || t[20] !== Z || t[21] !== X || t[22] !== j ? (x = T(o.root, h, {
|
|
82
|
+
[o.rootIconTop]: X,
|
|
83
|
+
[o.rootIndentLevel1]: j,
|
|
84
|
+
[o.rootActive]: F,
|
|
85
|
+
[o.rootActiveWithMarker]: G,
|
|
86
|
+
[o.rootStretched]: Z
|
|
87
|
+
}), t[17] = h, t[18] = F, t[19] = G, t[20] = Z, t[21] = X, t[22] = j, t[23] = x) : x = t[23];
|
|
88
|
+
const $ = x, q = H === 1;
|
|
89
|
+
let E;
|
|
90
|
+
t[24] !== q ? (E = T(o.activeMarker, {
|
|
91
|
+
[o.activeMarkerWithIndent]: q
|
|
92
|
+
}), t[24] = q, t[25] = E) : E = t[25];
|
|
93
|
+
const J = E, K = f && !i, Q = vt === "bold", Y = e === "top";
|
|
94
|
+
let M;
|
|
95
|
+
t[26] !== K || t[27] !== Q || t[28] !== Y ? (M = T(o.label, {
|
|
96
|
+
[o.labelActive]: K,
|
|
97
|
+
[o.labelBold]: Q,
|
|
98
|
+
[o.labelIconTop]: Y
|
|
99
|
+
}), t[26] = K, t[27] = Q, t[28] = Y, t[29] = M) : M = t[29];
|
|
100
|
+
const tt = M, ot = e === "top";
|
|
101
|
+
let U;
|
|
102
|
+
t[30] !== ot ? (U = T(o.labelWrapper, {
|
|
103
|
+
[o.labelWrapperIconTop]: ot
|
|
104
|
+
}), t[30] = ot, t[31] = U) : U = t[31];
|
|
105
|
+
const et = U, nt = e === "top", it = r === "up", rt = r === "right", ct = r === "left";
|
|
106
|
+
let z;
|
|
107
|
+
t[32] !== nt || t[33] !== it || t[34] !== rt || t[35] !== ct ? (z = T(o.chevron, {
|
|
108
|
+
[o.chevronIconPositionTop]: nt,
|
|
109
|
+
[o.chevronUp]: it,
|
|
110
|
+
[o.chevronRight]: rt,
|
|
111
|
+
[o.chevronLeft]: ct
|
|
112
|
+
}), t[32] = nt, t[33] = it, t[34] = rt, t[35] = ct, t[36] = z) : z = t[36];
|
|
113
|
+
const st = z, at = L === "x-large", lt = (c || s) && (n || a), pt = (c || s) && !a;
|
|
114
|
+
let R;
|
|
115
|
+
t[37] !== at || t[38] !== lt || t[39] !== pt ? (R = T(o.iconWrapper, {
|
|
116
|
+
[o.iconWrapperXLarge]: at,
|
|
117
|
+
[o.iconWrapperWithNumberIndicator]: lt,
|
|
118
|
+
[o.iconWrapperWithNumberIndicatorWithValue]: pt
|
|
119
|
+
}), t[37] = at, t[38] = lt, t[39] = pt, t[40] = R) : R = t[40];
|
|
120
|
+
const ht = R;
|
|
121
|
+
let V;
|
|
122
|
+
t[41] !== i || t[42] !== d ? (V = (bt) => {
|
|
123
|
+
if (i) {
|
|
124
|
+
bt.preventDefault();
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
d && d(bt);
|
|
128
|
+
}, t[41] = i, t[42] = d, t[43] = V) : V = t[43];
|
|
129
|
+
const dt = V;
|
|
130
|
+
let m;
|
|
131
|
+
t[44] !== J || t[45] !== e || t[46] !== f ? (m = f && e === "left" && /* @__PURE__ */ u("div", { className: J }), t[44] = J, t[45] = e, t[46] = f, t[47] = m) : m = t[47];
|
|
132
|
+
let I;
|
|
133
|
+
t[48] !== i || t[49] !== c || t[50] !== e || t[51] !== L || t[52] !== s || t[53] !== ht || t[54] !== a || t[55] !== n ? (I = (c || s) && /* @__PURE__ */ u(It, { children: /* @__PURE__ */ ut("span", { className: ht, children: [
|
|
134
|
+
/* @__PURE__ */ u(ft, { name: c, theme: "light", source: s, "aria-hidden": "true", size: c || e === "top" ? "large" : L }),
|
|
135
|
+
!i && (e === "left" && a || e === "top" && (n || a)) && /* @__PURE__ */ u(mt, { variant: "highlight", label: n })
|
|
136
|
+
] }) }), t[48] = i, t[49] = c, t[50] = e, t[51] = L, t[52] = s, t[53] = ht, t[54] = a, t[55] = n, t[56] = I) : I = t[56];
|
|
137
|
+
let N;
|
|
138
|
+
t[57] !== p || t[58] !== tt ? (N = /* @__PURE__ */ u("span", { className: tt, children: p }), t[57] = p, t[58] = tt, t[59] = N) : N = t[59];
|
|
139
|
+
let W;
|
|
140
|
+
t[60] !== st || t[61] !== r ? (W = r && /* @__PURE__ */ u(ft, { name: "chevron-down", theme: "light", "aria-hidden": "true", className: st }), t[60] = st, t[61] = r, t[62] = W) : W = t[62];
|
|
141
|
+
let g;
|
|
142
|
+
t[63] !== et || t[64] !== N || t[65] !== W ? (g = /* @__PURE__ */ ut("div", { className: et, children: [
|
|
143
|
+
N,
|
|
144
|
+
W
|
|
145
|
+
] }), t[63] = et, t[64] = N, t[65] = W, t[66] = g) : g = t[66];
|
|
146
|
+
let w;
|
|
147
|
+
t[67] !== i || t[68] !== e || t[69] !== a || t[70] !== n ? (w = e === "left" && !i && n && !a && /* @__PURE__ */ u(mt, { variant: "default", label: n, className: o.numberIndicator }), t[67] = i, t[68] = e, t[69] = a, t[70] = n, t[71] = w) : w = t[71];
|
|
148
|
+
let y;
|
|
149
|
+
return t[72] !== l || t[73] !== i || t[74] !== dt || t[75] !== v || t[76] !== b || t[77] !== $ || t[78] !== m || t[79] !== I || t[80] !== g || t[81] !== w ? (y = /* @__PURE__ */ ut("button", { className: $, type: "button", onClick: dt, ...l, ...b, "aria-disabled": i, ref: v, children: [
|
|
150
|
+
m,
|
|
151
|
+
I,
|
|
152
|
+
g,
|
|
153
|
+
w
|
|
154
|
+
] }), t[72] = l, t[73] = i, t[74] = dt, t[75] = v, t[76] = b, t[77] = $, t[78] = m, t[79] = I, t[80] = g, t[81] = w, t[82] = y) : y = t[82], y;
|
|
155
|
+
});
|
|
156
|
+
Zt.displayName = "DSActionButton";
|
|
157
|
+
export {
|
|
158
|
+
oo as A,
|
|
159
|
+
Zt as D,
|
|
160
|
+
eo as a,
|
|
161
|
+
no as b,
|
|
162
|
+
io as c,
|
|
163
|
+
ro as d,
|
|
164
|
+
Gt as v
|
|
165
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as rt, jsx as w, Fragment as at } from "react/jsx-runtime";
|
|
3
|
+
import { d as st } from "./index.CgTHIF3K.js";
|
|
4
|
+
import { c as y } from "./index.CEyLAtio.js";
|
|
5
|
+
import { D as lt } from "./Icon.C0161Glk.js";
|
|
6
|
+
import { forwardRef as pt } from "react";
|
|
7
|
+
import { NumberIndicator as ct } from "../numberindicator.Ddf3ESi7.js";
|
|
8
|
+
import { g as W } from "./helpers.BbWkXTr3.js";
|
|
9
|
+
import '../assets/ActionLink.BdPEvuGm.css';const dt = "ds-action-link_root_14712_1", ht = "ds-action-link_root--indent-level-1_14712_72", _t = "ds-action-link_root--active_14712_75", vt = "ds-action-link_root--active--with-marker_14712_78", mt = "ds-action-link_root--icon--top_14712_81", ft = "ds-action-link_root--stretched_14712_106", kt = "ds-action-link_active-marker_14712_111", bt = "ds-action-link_active-marker--with-indent_14712_123", It = "ds-action-link_icon-wrapper_14712_127", Nt = "ds-action-link_icon-wrapper--x-large_14712_130", At = "ds-action-link_icon-wrapper--with-number-indicator_14712_133", gt = "ds-action-link_icon-wrapper--with-number-indicator--with-value_14712_141", ut = "ds-action-link_label_14712_145", wt = "ds-action-link_label--bold_14712_156", Wt = "ds-action-link_label--active_14712_167", Lt = "ds-action-link_label--icon-top_14712_178", St = "ds-action-link_number-indicator_14712_201", o = {
|
|
10
|
+
root: dt,
|
|
11
|
+
rootIndentLevel1: ht,
|
|
12
|
+
rootActive: _t,
|
|
13
|
+
rootActiveWithMarker: vt,
|
|
14
|
+
rootIconTop: mt,
|
|
15
|
+
rootStretched: ft,
|
|
16
|
+
activeMarker: kt,
|
|
17
|
+
activeMarkerWithIndent: bt,
|
|
18
|
+
iconWrapper: It,
|
|
19
|
+
iconWrapperXLarge: Nt,
|
|
20
|
+
iconWrapperWithNumberIndicator: At,
|
|
21
|
+
iconWrapperWithNumberIndicatorWithValue: gt,
|
|
22
|
+
label: ut,
|
|
23
|
+
labelBold: wt,
|
|
24
|
+
labelActive: Wt,
|
|
25
|
+
labelIconTop: Lt,
|
|
26
|
+
numberIndicator: St
|
|
27
|
+
}, Kt = ["left", "top"], Vt = ["large", "x-large"], yt = [0, 1], Bt = ["normal", "bold"], Pt = ({
|
|
28
|
+
iconName: _,
|
|
29
|
+
iconSize: v,
|
|
30
|
+
iconSource: t,
|
|
31
|
+
iconPosition: a,
|
|
32
|
+
indentLevel: s,
|
|
33
|
+
stretched: l,
|
|
34
|
+
weight: p
|
|
35
|
+
}) => {
|
|
36
|
+
if (_ && !t && v === "x-large" && console.warn(W("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.')), a === "top") {
|
|
37
|
+
if (!_ && !t)
|
|
38
|
+
throw new Error(W("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.'));
|
|
39
|
+
v === "x-large" && console.warn(W("DSActionLink", 'An "iconSize" prop set to "x-large" has no effect when "iconPosition" is set to "top". Please remove the "iconSize" prop.')), p === "bold" && console.warn(W("DSActionLink", 'A "weight" prop set to "bold" with "iconPosition" set to "top" has no effect. Please remove the "weight" prop.')), s === 1 && console.warn(W("DSActionLink", 'An "indentLevel" prop set to "1" with "iconPosition" set to "top" has no effect. Please remove the "indentLevel" prop.')), l && console.warn(W("DSActionLink", 'A "stretched" prop set to "true" with "iconPosition" set to "top" has no effect. Please remove the "stretched" prop.'));
|
|
40
|
+
}
|
|
41
|
+
}, Dt = pt((_, v) => {
|
|
42
|
+
const t = st.c(73);
|
|
43
|
+
let a, s, l, p, h, n, r, i, m, f, k, L, S, P, D, T, x, M;
|
|
44
|
+
t[0] !== _ ? ({
|
|
45
|
+
children: s,
|
|
46
|
+
aria: a,
|
|
47
|
+
className: l,
|
|
48
|
+
download: p,
|
|
49
|
+
href: h,
|
|
50
|
+
iconName: n,
|
|
51
|
+
iconPosition: L,
|
|
52
|
+
iconSize: S,
|
|
53
|
+
iconSource: r,
|
|
54
|
+
indentLevel: P,
|
|
55
|
+
isActive: D,
|
|
56
|
+
numberIndicatorValue: i,
|
|
57
|
+
referrerPolicy: m,
|
|
58
|
+
rel: f,
|
|
59
|
+
stretched: T,
|
|
60
|
+
target: x,
|
|
61
|
+
weight: M,
|
|
62
|
+
...k
|
|
63
|
+
} = _, t[0] = _, t[1] = a, t[2] = s, t[3] = l, t[4] = p, t[5] = h, t[6] = n, t[7] = r, t[8] = i, t[9] = m, t[10] = f, t[11] = k, t[12] = L, t[13] = S, t[14] = P, t[15] = D, t[16] = T, t[17] = x, t[18] = M) : (a = t[1], s = t[2], l = t[3], p = t[4], h = t[5], n = t[6], r = t[7], i = t[8], m = t[9], f = t[10], k = t[11], L = t[12], S = t[13], P = t[14], D = t[15], T = t[16], x = t[17], M = t[18]);
|
|
64
|
+
const e = L === void 0 ? "left" : L, C = S === void 0 ? "large" : S, B = P === void 0 ? 0 : P, d = D === void 0 ? !1 : D, it = T === void 0 ? !1 : T, X = x === void 0 ? "_self" : x, nt = M === void 0 ? "normal" : M;
|
|
65
|
+
process.env.NODE_ENV !== "production" && Pt({
|
|
66
|
+
iconName: n,
|
|
67
|
+
iconSize: C,
|
|
68
|
+
iconSource: r,
|
|
69
|
+
iconPosition: e,
|
|
70
|
+
indentLevel: B,
|
|
71
|
+
stretched: it,
|
|
72
|
+
weight: nt
|
|
73
|
+
});
|
|
74
|
+
const c = (i == null ? void 0 : i.trim()) === "", j = e === "top", H = B === 1, F = d && e === "left", G = it === !0 && e === "left";
|
|
75
|
+
let E;
|
|
76
|
+
t[19] !== l || t[20] !== d || t[21] !== F || t[22] !== G || t[23] !== j || t[24] !== H ? (E = y(o.root, l, {
|
|
77
|
+
[o.rootIconTop]: j,
|
|
78
|
+
[o.rootIndentLevel1]: H,
|
|
79
|
+
[o.rootActive]: d,
|
|
80
|
+
[o.rootActiveWithMarker]: F,
|
|
81
|
+
[o.rootStretched]: G
|
|
82
|
+
}), t[19] = l, t[20] = d, t[21] = F, t[22] = G, t[23] = j, t[24] = H, t[25] = E) : E = t[25];
|
|
83
|
+
const R = E, Z = B === 1;
|
|
84
|
+
let O;
|
|
85
|
+
t[26] !== Z ? (O = y(o.activeMarker, {
|
|
86
|
+
[o.activeMarkerWithIndent]: Z
|
|
87
|
+
}), t[26] = Z, t[27] = O) : O = t[27];
|
|
88
|
+
const $ = O, q = d && e === "left", J = nt === "bold", Q = e === "top";
|
|
89
|
+
let z;
|
|
90
|
+
t[28] !== q || t[29] !== J || t[30] !== Q ? (z = y(o.label, {
|
|
91
|
+
[o.labelActive]: q,
|
|
92
|
+
[o.labelBold]: J,
|
|
93
|
+
[o.labelIconTop]: Q
|
|
94
|
+
}), t[28] = q, t[29] = J, t[30] = Q, t[31] = z) : z = t[31];
|
|
95
|
+
const U = z, Y = C === "x-large", tt = (n || r) && (i || c), et = (n || r) && !c;
|
|
96
|
+
let K;
|
|
97
|
+
t[32] !== Y || t[33] !== tt || t[34] !== et ? (K = y(o.iconWrapper, {
|
|
98
|
+
[o.iconWrapperXLarge]: Y,
|
|
99
|
+
[o.iconWrapperWithNumberIndicator]: tt,
|
|
100
|
+
[o.iconWrapperWithNumberIndicatorWithValue]: et
|
|
101
|
+
}), t[32] = Y, t[33] = tt, t[34] = et, t[35] = K) : K = t[35];
|
|
102
|
+
const ot = K, b = h === void 0 ? "span" : "a";
|
|
103
|
+
let I;
|
|
104
|
+
t[36] !== b || t[37] !== p || t[38] !== h || t[39] !== m || t[40] !== f || t[41] !== X ? (I = b === "a" && {
|
|
105
|
+
href: h,
|
|
106
|
+
target: X,
|
|
107
|
+
rel: f,
|
|
108
|
+
referrerPolicy: m,
|
|
109
|
+
download: p
|
|
110
|
+
}, t[36] = b, t[37] = p, t[38] = h, t[39] = m, t[40] = f, t[41] = X, t[42] = I) : I = t[42];
|
|
111
|
+
let N;
|
|
112
|
+
t[43] !== $ || t[44] !== e || t[45] !== d ? (N = d && e === "left" && /* @__PURE__ */ w("div", { className: $ }), t[43] = $, t[44] = e, t[45] = d, t[46] = N) : N = t[46];
|
|
113
|
+
let A;
|
|
114
|
+
t[47] !== n || t[48] !== e || t[49] !== C || t[50] !== r || t[51] !== ot || t[52] !== c || t[53] !== i ? (A = (n || r) && /* @__PURE__ */ w(at, { children: /* @__PURE__ */ rt("span", { className: ot, children: [
|
|
115
|
+
/* @__PURE__ */ w(lt, { name: n, theme: "light", source: r, "aria-hidden": "true", size: n || e === "top" ? "large" : C }),
|
|
116
|
+
(e === "left" && c || e === "top" && (i || c)) && /* @__PURE__ */ w(ct, { variant: "highlight", label: i })
|
|
117
|
+
] }) }), t[47] = n, t[48] = e, t[49] = C, t[50] = r, t[51] = ot, t[52] = c, t[53] = i, t[54] = A) : A = t[54];
|
|
118
|
+
let g;
|
|
119
|
+
t[55] !== s || t[56] !== U ? (g = /* @__PURE__ */ w("span", { className: U, children: s }), t[55] = s, t[56] = U, t[57] = g) : g = t[57];
|
|
120
|
+
let u;
|
|
121
|
+
t[58] !== e || t[59] !== c || t[60] !== i ? (u = e === "left" && i && !c && /* @__PURE__ */ w(ct, { variant: "default", label: i, className: o.numberIndicator }), t[58] = e, t[59] = c, t[60] = i, t[61] = u) : u = t[61];
|
|
122
|
+
let V;
|
|
123
|
+
return t[62] !== b || t[63] !== a || t[64] !== v || t[65] !== k || t[66] !== R || t[67] !== I || t[68] !== N || t[69] !== A || t[70] !== g || t[71] !== u ? (V = /* @__PURE__ */ rt(b, { className: R, ...I, ...a, ...k, ref: v, children: [
|
|
124
|
+
N,
|
|
125
|
+
A,
|
|
126
|
+
g,
|
|
127
|
+
u
|
|
128
|
+
] }), t[62] = b, t[63] = a, t[64] = v, t[65] = k, t[66] = R, t[67] = I, t[68] = N, t[69] = A, t[70] = g, t[71] = u, t[72] = V) : V = t[72], V;
|
|
129
|
+
});
|
|
130
|
+
Dt.displayName = "DSActionLink";
|
|
131
|
+
export {
|
|
132
|
+
Kt as A,
|
|
133
|
+
Dt as D,
|
|
134
|
+
Vt as a,
|
|
135
|
+
yt as b,
|
|
136
|
+
Bt as c,
|
|
137
|
+
Pt as v
|
|
138
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _ } from "react/jsx-runtime";
|
|
3
3
|
import { d as w } from "./index.CgTHIF3K.js";
|
|
4
4
|
import { c as G } from "./index.CEyLAtio.js";
|
|
5
|
-
import { D as q } from "./Fieldset.
|
|
5
|
+
import { D as q } from "./Fieldset.BgZMYAH-.js";
|
|
6
6
|
import S from "react";
|
|
7
7
|
import { g as x, r as N } from "./helpers.BbWkXTr3.js";
|
|
8
8
|
import { D as z } from "./Checkbox.BIQAKBVy.js";
|