@stihl-design-system/components 1.0.0-RC.37 → 1.0.0-RC.39
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/assets/LinkCard.Bi9QqIDA.css +1 -0
- package/card-example-image-1.webp +0 -0
- package/card-example-image-2.webp +0 -0
- package/card-example-image-3.webp +0 -0
- package/card-example-image-4.webp +0 -0
- package/card-example-image-5.webp +0 -0
- package/card-example-image-6.webp +0 -0
- package/card-example-image-7.webp +0 -0
- package/card-example-image-8.webp +0 -0
- package/card-example-image-square.webp +0 -0
- package/chunks/{CustomReactSelect.D4kopDzX.js → CustomReactSelect.DS9Ey-jr.js} +234 -226
- package/chunks/LinkCard.SIrSjRNL.js +199 -0
- package/combobox.Ds2prR5y.js +69 -0
- package/components/Combobox/Combobox.utils.d.ts +2 -0
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +4 -0
- package/components/LinkCard/LinkCard.d.ts +29 -13
- package/components/LinkCard/LinkCard.utils.d.ts +2 -2
- package/{customreactselect.BNwzk8Qi.js → customreactselect.CUmUV5IW.js} +1 -1
- package/index.es.js +3 -3
- package/{linkcard.B43Y9rO4.js → linkcard.CyNfW13i.js} +1 -1
- package/package.json +8 -8
- package/partials/index.js +2 -2
- package/styles/scss/ds/lib/shadow.scss +5 -0
- package/assets/LinkCard.DgC0-Ow5.css +0 -1
- package/card-example-image-2.png +0 -0
- package/chunks/LinkCard.BjXQ85ZH.js +0 -159
- package/combobox.C2XUM4fM.js +0 -67
- /package/components/LinkCard/{Link.utils.test.d.ts → LinkCard.utils.test.d.ts} +0 -0
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as x, jsx as s, Fragment as ae } from "react/jsx-runtime";
|
|
3
|
-
import { d as ne } from "./index.D-sRdssb.js";
|
|
4
|
-
import { c as I } from "./index.DL9mof6u.js";
|
|
5
|
-
import { isValidElement as se, cloneElement as re } from "react";
|
|
6
|
-
import { DSFlag as ee } from "../flag.CE32qHPa.js";
|
|
7
|
-
import { DSHeading as le } from "../heading.DHLpT4dc.js";
|
|
8
|
-
import { D as de } from "./LinkButton.CWibqvhs.js";
|
|
9
|
-
import { g as D } from "./helpers.CexwVao7.js";
|
|
10
|
-
import '../assets/LinkCard.DgC0-Ow5.css';const ce = "ds-link-card_root_1v6ea_1", pe = "ds-link-card_root--responsive_1v6ea_4", he = "ds-link-card_wrapper_1v6ea_9", me = "ds-link-card_content_1v6ea_21", fe = "ds-link-card_footer_1v6ea_36", ge = "ds-link-card_flags_1v6ea_41", ve = "ds-link-card_root--horizontal_1v6ea_45", ke = "ds-link-card_header_1v6ea_134", _e = "ds-link-card_heading_1v6ea_146", ue = "ds-link-card_link_1v6ea_150", Le = "ds-link-card_description_1v6ea_155", be = "ds-link-card_meta-data_1v6ea_172", Ne = "ds-link-card_brand-flag_1v6ea_198", i = {
|
|
11
|
-
root: ce,
|
|
12
|
-
rootResponsive: pe,
|
|
13
|
-
wrapper: he,
|
|
14
|
-
content: me,
|
|
15
|
-
footer: fe,
|
|
16
|
-
flags: ge,
|
|
17
|
-
rootHorizontal: ve,
|
|
18
|
-
header: ke,
|
|
19
|
-
heading: _e,
|
|
20
|
-
link: ue,
|
|
21
|
-
description: Le,
|
|
22
|
-
metaData: be,
|
|
23
|
-
brandFlag: Ne
|
|
24
|
-
}, De = ({
|
|
25
|
-
href: h,
|
|
26
|
-
linkComponent: e,
|
|
27
|
-
flags: t,
|
|
28
|
-
flagListAriaLabel: m,
|
|
29
|
-
heading: f,
|
|
30
|
-
isResponsive: g,
|
|
31
|
-
orientation: v,
|
|
32
|
-
img: r,
|
|
33
|
-
brandFlag: a
|
|
34
|
-
}) => {
|
|
35
|
-
if (!h && !e)
|
|
36
|
-
throw new Error(D("DSLinkCard", "Please provide either the 'href' prop or a custom 'linkComponent'."));
|
|
37
|
-
if (h && e)
|
|
38
|
-
throw new Error(D("DSLinkCard", "Please provide either the 'href' prop or a custom 'linkComponent', but not both."));
|
|
39
|
-
if (!f)
|
|
40
|
-
throw new Error(D("DSLinkCard", "The 'heading' prop is required and must be provided."));
|
|
41
|
-
t && t.length > 6 && console.warn(D("DSLinkCard", "It is recommended to provide a maximum of 6 flags for optimal display.")), t && t.length > 0 && !m && console.warn(D("DSLinkCard", "When providing flags, please also ensure to add the 'flagListAriaLabel' to describe the list of flags for non sighted screen reader users.")), g === !0 && v && console.warn(D("DSLinkCard", "The 'orientation' prop is ignored when 'isResponsive' is set to true. Please set 'isResponsive' to false to use the 'orientation' prop.")), a && r === void 0 && console.warn(D("DSLinkCard", "The 'brandFlag' prop is set to true, but no 'img' prop is provided. The 'brandFlag' will have no effect without an image."));
|
|
42
|
-
}, je = (h) => {
|
|
43
|
-
const e = ne.c(75);
|
|
44
|
-
let t, m, f, g, v, r, a, l, d, n, o, k, u, c, L, b;
|
|
45
|
-
e[0] !== h ? ({
|
|
46
|
-
heading: l,
|
|
47
|
-
brandFlag: t,
|
|
48
|
-
className: m,
|
|
49
|
-
classNameContent: f,
|
|
50
|
-
classNameWrapper: g,
|
|
51
|
-
decorativeLinkButtonProps: v,
|
|
52
|
-
description: r,
|
|
53
|
-
flagListAriaLabel: a,
|
|
54
|
-
flags: L,
|
|
55
|
-
href: d,
|
|
56
|
-
img: n,
|
|
57
|
-
isResponsive: b,
|
|
58
|
-
linkComponent: o,
|
|
59
|
-
metaData: k,
|
|
60
|
-
orientation: u,
|
|
61
|
-
...c
|
|
62
|
-
} = h, e[0] = h, e[1] = t, e[2] = m, e[3] = f, e[4] = g, e[5] = v, e[6] = r, e[7] = a, e[8] = l, e[9] = d, e[10] = n, e[11] = o, e[12] = k, e[13] = u, e[14] = c, e[15] = L, e[16] = b) : (t = e[1], m = e[2], f = e[3], g = e[4], v = e[5], r = e[6], a = e[7], l = e[8], d = e[9], n = e[10], o = e[11], k = e[12], u = e[13], c = e[14], L = e[15], b = e[16]);
|
|
63
|
-
let p, _;
|
|
64
|
-
e[17] !== t || e[18] !== a || e[19] !== l || e[20] !== d || e[21] !== n || e[22] !== o || e[23] !== u || e[24] !== L || e[25] !== b ? (p = L === void 0 ? [] : L, _ = b === void 0 ? !0 : b, process.env.NODE_ENV !== "production" && De({
|
|
65
|
-
href: d,
|
|
66
|
-
linkComponent: o,
|
|
67
|
-
heading: l,
|
|
68
|
-
flags: p,
|
|
69
|
-
flagListAriaLabel: a,
|
|
70
|
-
isResponsive: _,
|
|
71
|
-
orientation: u,
|
|
72
|
-
img: n,
|
|
73
|
-
brandFlag: t
|
|
74
|
-
}), e[17] = t, e[18] = a, e[19] = l, e[20] = d, e[21] = n, e[22] = o, e[23] = u, e[24] = L, e[25] = b, e[26] = p, e[27] = _) : (p = e[26], _ = e[27]);
|
|
75
|
-
let R;
|
|
76
|
-
e[28] !== v ? (R = v || {}, e[28] = v, e[29] = R) : R = e[29];
|
|
77
|
-
const {
|
|
78
|
-
label: H,
|
|
79
|
-
iconName: O,
|
|
80
|
-
variant: te,
|
|
81
|
-
hideLabel: W,
|
|
82
|
-
size: U
|
|
83
|
-
} = R, q = U === void 0 ? "small" : U, P = te === "ghost" ? "ghost" : "filled", M = k || p.length > 0 || H, $ = _ === !1 && u === "horizontal";
|
|
84
|
-
let j;
|
|
85
|
-
e[30] !== m || e[31] !== _ || e[32] !== $ ? (j = I(i.root, m, {
|
|
86
|
-
[i.rootResponsive]: _,
|
|
87
|
-
[i.rootHorizontal]: $
|
|
88
|
-
}), e[30] = m, e[31] = _, e[32] = $, e[33] = j) : j = e[33];
|
|
89
|
-
const G = j;
|
|
90
|
-
let y;
|
|
91
|
-
e[34] !== g ? (y = I(i.wrapper, g), e[34] = g, e[35] = y) : y = e[35];
|
|
92
|
-
const J = y;
|
|
93
|
-
let V;
|
|
94
|
-
e[36] !== f ? (V = I(i.content, f), e[36] = f, e[37] = V) : V = e[37];
|
|
95
|
-
const K = V;
|
|
96
|
-
let A;
|
|
97
|
-
if (e[38] !== d || e[39] !== o || e[40] !== c) {
|
|
98
|
-
const ie = (N) => o && se(o) ? re(o, {
|
|
99
|
-
...o.props,
|
|
100
|
-
className: I(i.link, o.props.className),
|
|
101
|
-
children: /* @__PURE__ */ x(ae, { children: [
|
|
102
|
-
N,
|
|
103
|
-
" ",
|
|
104
|
-
o.props.children
|
|
105
|
-
] })
|
|
106
|
-
}) : /* @__PURE__ */ s("a", { href: d, className: i.link, ...c, children: N });
|
|
107
|
-
A = (N) => {
|
|
108
|
-
const X = typeof N == "object" && N !== void 0, {
|
|
109
|
-
headingText: oe,
|
|
110
|
-
headingSize: Y,
|
|
111
|
-
headingTag: Z
|
|
112
|
-
} = X ? N : {
|
|
113
|
-
headingText: N
|
|
114
|
-
};
|
|
115
|
-
return /* @__PURE__ */ s(le, { tag: Z === void 0 ? "h3" : Z, size: Y === void 0 ? "medium" : Y, className: i.heading, children: ie(oe) });
|
|
116
|
-
}, e[38] = d, e[39] = o, e[40] = c, e[41] = A;
|
|
117
|
-
} else
|
|
118
|
-
A = e[41];
|
|
119
|
-
const Q = A;
|
|
120
|
-
let w;
|
|
121
|
-
e[42] !== Q || e[43] !== l ? (w = Q(l), e[42] = Q, e[43] = l, e[44] = w) : w = e[44];
|
|
122
|
-
let C;
|
|
123
|
-
e[45] !== r ? (C = r && /* @__PURE__ */ s("div", { className: i.description, children: r }), e[45] = r, e[46] = C) : C = e[46];
|
|
124
|
-
let S;
|
|
125
|
-
e[47] !== w || e[48] !== C ? (S = /* @__PURE__ */ x("div", { className: i.header, children: [
|
|
126
|
-
w,
|
|
127
|
-
C
|
|
128
|
-
] }), e[47] = w, e[48] = C, e[49] = S) : S = e[49];
|
|
129
|
-
let z;
|
|
130
|
-
e[50] !== P || e[51] !== W || e[52] !== O || e[53] !== H || e[54] !== q || e[55] !== a || e[56] !== p || e[57] !== M || e[58] !== k ? (z = M && /* @__PURE__ */ x("div", { className: i.footer, children: [
|
|
131
|
-
k && /* @__PURE__ */ s("div", { className: i.metaData, children: k }),
|
|
132
|
-
p.length > 0 && /* @__PURE__ */ s("ul", { className: i.flags, "aria-label": a, children: p.map(we) }),
|
|
133
|
-
H && /* @__PURE__ */ s(de, { iconName: O, iconPosition: "right", variant: P, hideLabel: W, size: q, isFlush: P === "ghost", "aria-hidden": !0, children: H })
|
|
134
|
-
] }), e[50] = P, e[51] = W, e[52] = O, e[53] = H, e[54] = q, e[55] = a, e[56] = p, e[57] = M, e[58] = k, e[59] = z) : z = e[59];
|
|
135
|
-
let F;
|
|
136
|
-
e[60] !== K || e[61] !== S || e[62] !== z ? (F = /* @__PURE__ */ x("div", { className: K, children: [
|
|
137
|
-
S,
|
|
138
|
-
z
|
|
139
|
-
] }), e[60] = K, e[61] = S, e[62] = z, e[63] = F) : F = e[63];
|
|
140
|
-
let T;
|
|
141
|
-
e[64] !== t || e[65] !== n ? (T = n && /* @__PURE__ */ x("div", { className: i.image, children: [
|
|
142
|
-
t && /* @__PURE__ */ s(ee, { color: "orange-base", className: i.brandFlag, children: t }),
|
|
143
|
-
n
|
|
144
|
-
] }), e[64] = t, e[65] = n, e[66] = T) : T = e[66];
|
|
145
|
-
let E;
|
|
146
|
-
e[67] !== F || e[68] !== T || e[69] !== J ? (E = /* @__PURE__ */ x("div", { className: J, children: [
|
|
147
|
-
F,
|
|
148
|
-
T
|
|
149
|
-
] }), e[67] = F, e[68] = T, e[69] = J, e[70] = E) : E = e[70];
|
|
150
|
-
let B;
|
|
151
|
-
return e[71] !== c || e[72] !== G || e[73] !== E ? (B = /* @__PURE__ */ s("div", { ...c, className: G, children: E }), e[71] = c, e[72] = G, e[73] = E, e[74] = B) : B = e[74], B;
|
|
152
|
-
};
|
|
153
|
-
function we(h, e) {
|
|
154
|
-
return /* @__PURE__ */ s("li", { children: /* @__PURE__ */ s(ee, { color: "grey-light", children: h }) }, e);
|
|
155
|
-
}
|
|
156
|
-
export {
|
|
157
|
-
je as D,
|
|
158
|
-
De as v
|
|
159
|
-
};
|
package/combobox.C2XUM4fM.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _ } from "react/jsx-runtime";
|
|
3
|
-
import { d as $ } from "./chunks/index.D-sRdssb.js";
|
|
4
|
-
import { v as z, c as G } from "./chunks/CustomReactSelect.D4kopDzX.js";
|
|
5
|
-
import { forwardRef as H } from "react";
|
|
6
|
-
const J = H((x, N) => {
|
|
7
|
-
const t = $.c(36);
|
|
8
|
-
let a, r, e, d, l, i, p, s, c, n, v, f, o, u, m;
|
|
9
|
-
if (t[0] !== x) {
|
|
10
|
-
const h = x ?? {}, {
|
|
11
|
-
id: q,
|
|
12
|
-
label: A,
|
|
13
|
-
className: B,
|
|
14
|
-
disabled: g,
|
|
15
|
-
dropdownOnFocus: w,
|
|
16
|
-
filterOption: I,
|
|
17
|
-
hideLabel: y,
|
|
18
|
-
invalid: D,
|
|
19
|
-
lang: E,
|
|
20
|
-
popoverContent: L,
|
|
21
|
-
popoverInfoButtonProps: R,
|
|
22
|
-
required: F,
|
|
23
|
-
tabSelectsValue: M,
|
|
24
|
-
variant: V,
|
|
25
|
-
...j
|
|
26
|
-
} = h;
|
|
27
|
-
i = q, s = A, a = B, d = I, n = L, v = R, o = j, r = g === void 0 ? !1 : g, e = w === void 0 ? !1 : w, l = y === void 0 ? !1 : y, p = D === void 0 ? !1 : D, c = E === void 0 ? "en" : E, f = F === void 0 ? !1 : F, u = M === void 0 ? !0 : M, m = V === void 0 ? "single" : V;
|
|
28
|
-
const k = Array.isArray(o.options) ? o.options : [];
|
|
29
|
-
process.env.NODE_ENV !== "production" && z({
|
|
30
|
-
id: i,
|
|
31
|
-
label: s,
|
|
32
|
-
options: k,
|
|
33
|
-
hideLabel: l,
|
|
34
|
-
popoverContent: n
|
|
35
|
-
}), t[0] = x, t[1] = a, t[2] = r, t[3] = e, t[4] = d, t[5] = l, t[6] = i, t[7] = p, t[8] = s, t[9] = c, t[10] = n, t[11] = v, t[12] = f, t[13] = o, t[14] = u, t[15] = m;
|
|
36
|
-
} else
|
|
37
|
-
a = t[1], r = t[2], e = t[3], d = t[4], l = t[5], i = t[6], p = t[7], s = t[8], c = t[9], n = t[10], v = t[11], f = t[12], o = t[13], u = t[14], m = t[15];
|
|
38
|
-
const b = m === "multi", S = !e || b;
|
|
39
|
-
let C;
|
|
40
|
-
t[16] !== a || t[17] !== r || t[18] !== e || t[19] !== d || t[20] !== l || t[21] !== i || t[22] !== p || t[23] !== b || t[24] !== s || t[25] !== c || t[26] !== n || t[27] !== v || t[28] !== N || t[29] !== f || t[30] !== o || t[31] !== S || t[32] !== u ? (C = {
|
|
41
|
-
id: i,
|
|
42
|
-
label: s,
|
|
43
|
-
className: a,
|
|
44
|
-
disabled: r,
|
|
45
|
-
filterOption: d,
|
|
46
|
-
hideLabel: l,
|
|
47
|
-
isMulti: b,
|
|
48
|
-
invalid: p,
|
|
49
|
-
lang: c,
|
|
50
|
-
openMenuOnClick: e,
|
|
51
|
-
openMenuOnFocus: e,
|
|
52
|
-
isClearable: S,
|
|
53
|
-
required: f,
|
|
54
|
-
ref: N,
|
|
55
|
-
tabSelectsValue: u,
|
|
56
|
-
popoverContent: n,
|
|
57
|
-
popoverInfoButtonProps: v,
|
|
58
|
-
...o
|
|
59
|
-
}, t[16] = a, t[17] = r, t[18] = e, t[19] = d, t[20] = l, t[21] = i, t[22] = p, t[23] = b, t[24] = s, t[25] = c, t[26] = n, t[27] = v, t[28] = N, t[29] = f, t[30] = o, t[31] = S, t[32] = u, t[33] = C) : C = t[33];
|
|
60
|
-
const P = C;
|
|
61
|
-
let O;
|
|
62
|
-
return t[34] !== P ? (O = /* @__PURE__ */ _(G, { ...P }), t[34] = P, t[35] = O) : O = t[35], O;
|
|
63
|
-
});
|
|
64
|
-
J.displayName = "DSCombobox";
|
|
65
|
-
export {
|
|
66
|
-
J as DSCombobox
|
|
67
|
-
};
|
|
File without changes
|