@stihl-design-system/components 1.0.0-RC.36 → 1.0.0-RC.37

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 (44) hide show
  1. package/{actionbutton.Du5CT-Mt.js → actionbutton.qf7Bc8JA.js} +1 -1
  2. package/{actionlink.BK9CaQUY.js → actionlink.Ke8jQtse.js} +1 -1
  3. package/assets/ActionButton.sn7jTqva.css +1 -0
  4. package/assets/ActionLink.D7fuY3NQ.css +1 -0
  5. package/assets/LinkCard.DgC0-Ow5.css +1 -0
  6. package/assets/TextUtility.BsMYk5lH.css +1 -0
  7. package/assets/radio.BLd_UGcp.css +1 -0
  8. package/assets/{Text.Dgpj61UP.css → text.ZCpNYmwU.css} +1 -1
  9. package/card-example-image-2.png +0 -0
  10. package/card-example-image-2.webp +0 -0
  11. package/card-example-image-3.webp +0 -0
  12. package/card-example-image.webp +0 -0
  13. package/chunks/{ActionButton.BOYQYo5M.js → ActionButton.CyMR7DqS.js} +47 -47
  14. package/chunks/ActionLink.5wdpwrU9.js +153 -0
  15. package/chunks/LinkCard.BjXQ85ZH.js +159 -0
  16. package/chunks/{RadioGroup.BDsVAhCK.js → RadioGroup.DupoApOX.js} +1 -1
  17. package/chunks/Text.utils.B4MiHAK_.js +11 -0
  18. package/chunks/TextUtility.C68m5upo.js +82 -0
  19. package/components/LinkCard/Link.utils.test.d.ts +1 -0
  20. package/components/LinkCard/LinkCard.d.ts +80 -0
  21. package/components/LinkCard/LinkCard.test.d.ts +1 -0
  22. package/components/LinkCard/LinkCard.utils.d.ts +10 -0
  23. package/components/TextUtility/TextUtility.d.ts +30 -0
  24. package/components/TextUtility/TextUtility.test.d.ts +1 -0
  25. package/components/TextUtility/TextUtility.utils.d.ts +10 -0
  26. package/components/TextUtility/TextUtility.utils.test.d.ts +1 -0
  27. package/index.d.ts +4 -0
  28. package/index.es.js +156 -146
  29. package/linkcard.B43Y9rO4.js +12 -0
  30. package/linkcard.d.ts +2 -0
  31. package/package.json +1 -1
  32. package/partials/index.js +20 -8
  33. package/partials/lib/partials.d.ts +1 -1
  34. package/{radio.pyM5ma9s.js → radio.DYKHJbxF.js} +37 -37
  35. package/{radiogroup.sdob0iPE.js → radiogroup.D-t1_oGC.js} +2 -2
  36. package/styles/scss/ds/lib/text.scss +5 -5
  37. package/text.CQdFtUUQ.js +72 -0
  38. package/{text.cLv2PhjQ.js → textutility.DMKAWLsT.js} +3 -2
  39. package/textutility.d.ts +2 -0
  40. package/assets/ActionButton.oGVPTS1J.css +0 -1
  41. package/assets/ActionLink.CTh6IXrN.css +0 -1
  42. package/assets/radio.CsfCywxz.css +0 -1
  43. package/chunks/ActionLink.BlwvrnPN.js +0 -153
  44. package/chunks/Text.DpRtTpB4.js +0 -75
@@ -0,0 +1,159 @@
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
+ };
@@ -4,7 +4,7 @@ import { d as X } from "./index.D-sRdssb.js";
4
4
  import { c as J } from "./index.DL9mof6u.js";
5
5
  import { forwardRef as Y, useState as Z } from "react";
6
6
  import { D as oo } from "./Fieldset.Bk8W5h13.js";
7
- import { DSRadio as eo } from "../radio.pyM5ma9s.js";
7
+ import { DSRadio as eo } from "../radio.DYKHJbxF.js";
8
8
  import { g, r as W } from "./helpers.CexwVao7.js";
9
9
  import '../assets/RadioGroup.q1lQ-HIZ.css';const to = "ds-radio-group_fieldset--custom-area-above_1r3gv_1", ro = "ds-radio-group_root_1r3gv_5", so = "ds-radio-group_root--horizontal_1r3gv_13", io = "ds-radio-group_root--invalid_1r3gv_16", ao = "ds-radio-group_root--custom-area-above_1r3gv_19", no = "ds-radio-group_root--custom-area-above--horizontal_1r3gv_26", H = {
10
10
  fieldsetCustomAreaAbove: to,
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { a } from "./helpers.CexwVao7.js";
3
+ import "react";
4
+ import "./index.D-sRdssb.js";
5
+ const m = ["address", "blockquote", "cite", "div", "dd", "dfn", "dt", "figcaption", "legend", "li", "p", "span", "time"], r = ["large", "medium", "small", "x-small", "xx-small"], o = ["bold", "normal"], d = (t, s) => Array.isArray(s) ? s.some((i) => !!a(t, i)) : !!a(t, s);
6
+ export {
7
+ m as T,
8
+ r as a,
9
+ o as b,
10
+ d as i
11
+ };
@@ -0,0 +1,82 @@
1
+ "use client";
2
+ import { jsx as k } from "react/jsx-runtime";
3
+ import { d as M } from "./index.D-sRdssb.js";
4
+ import { c as X } from "./index.DL9mof6u.js";
5
+ import { useRef as N, useEffect as P } from "react";
6
+ import { g } from "./helpers.CexwVao7.js";
7
+ import { i as B } from "./Text.utils.B4MiHAK_.js";
8
+ import '../assets/TextUtility.BsMYk5lH.css';const Y = "ds-text-utility_root_1hq5u_6", $ = "ds-text-utility_root--large_1hq5u_15", z = "ds-text-utility_root--large-bold_1hq5u_26", G = "ds-text-utility_root--medium_1hq5u_37", R = "ds-text-utility_root--medium-bold_1hq5u_48", W = "ds-text-utility_root--small_1hq5u_59", j = "ds-text-utility_root--small-bold_1hq5u_70", A = "ds-text-utility_root--small-demi_1hq5u_81", C = "ds-text-utility_root--x-small-demi_1hq5u_92", H = "ds-text-utility_root--theme-dark_1hq5u_186", l = {
9
+ root: Y,
10
+ rootLarge: $,
11
+ rootLargeBold: z,
12
+ rootMedium: G,
13
+ rootMediumBold: R,
14
+ rootSmall: W,
15
+ rootSmallBold: j,
16
+ rootSmallDemi: A,
17
+ rootXSmallDemi: C,
18
+ rootThemeDark: H
19
+ }, tt = ["address", "blockquote", "cite", "div", "dd", "dfn", "dt", "figcaption", "legend", "li", "p", "span", "time"], ot = ["large", "medium", "small", "x-small"], et = ["bold", "demi", "normal"], O = ({
20
+ size: i,
21
+ weight: t
22
+ }) => {
23
+ t === "demi" && i !== "small" && i !== "x-small" && console.warn(g("DSTextUtility", 'Invalid prop combination: weight "demi" is only supported on sizes "small" and "x-small".')), i === "x-small" && t !== "demi" && console.warn(g("DSTextUtility", 'Invalid prop combination: size "x-small" only supports weight "demi".'));
24
+ }, lt = (i) => {
25
+ const t = M.c(29);
26
+ let r, a, m, n, d, c, u;
27
+ t[0] !== i ? ({
28
+ children: r,
29
+ className: a,
30
+ size: n,
31
+ tag: d,
32
+ theme: c,
33
+ weight: u,
34
+ ...m
35
+ } = i, t[0] = i, t[1] = r, t[2] = a, t[3] = m, t[4] = n, t[5] = d, t[6] = c, t[7] = u) : (r = t[1], a = t[2], m = t[3], n = t[4], d = t[5], c = t[6], u = t[7]);
36
+ const o = n === void 0 ? "medium" : n, s = d === void 0 ? "p" : d, L = c === void 0 ? "light" : c, e = u === void 0 ? "normal" : u, _ = N(null);
37
+ let h, T;
38
+ t[8] !== o || t[9] !== s || t[10] !== e ? (h = () => {
39
+ if (process.env.NODE_ENV !== "production" && (O({
40
+ size: o,
41
+ weight: e
42
+ }), _.current))
43
+ t: switch (s) {
44
+ case "li": {
45
+ if (!B(_.current, "ul, ol"))
46
+ throw Error(g("DSTextUtility", `The DSTextUtility component with the tag "${s}" is not within a list element (ul, ol). Please ensure it's placed correctly.`));
47
+ break t;
48
+ }
49
+ case "dt":
50
+ case "dd": {
51
+ if (!B(_.current, "dl"))
52
+ throw Error(g("DSTextUtility", `The DSTextUtility component with the tag "${s}" is not within a description list element (dl). Please ensure it's placed correctly.`));
53
+ break t;
54
+ }
55
+ default:
56
+ return;
57
+ }
58
+ }, T = [s, o, e], t[8] = o, t[9] = s, t[10] = e, t[11] = h, t[12] = T) : (h = t[11], T = t[12]), P(h, T);
59
+ const f = s, y = o === "large" && e === "normal", S = o === "large" && e === "bold", D = o === "medium" && e === "normal", b = o === "medium" && e === "bold", w = o === "small" && e === "normal", E = o === "small" && e === "bold", q = o === "small" && e === "demi", U = o === "x-small" && e === "demi", v = L === "dark";
60
+ let p;
61
+ t[13] !== a || t[14] !== b || t[15] !== w || t[16] !== E || t[17] !== q || t[18] !== U || t[19] !== v || t[20] !== y || t[21] !== S || t[22] !== D ? (p = X(l.root, a, {
62
+ [l.rootLarge]: y,
63
+ [l.rootLargeBold]: S,
64
+ [l.rootMedium]: D,
65
+ [l.rootMediumBold]: b,
66
+ [l.rootSmall]: w,
67
+ [l.rootSmallBold]: E,
68
+ [l.rootSmallDemi]: q,
69
+ [l.rootXSmallDemi]: U,
70
+ [l.rootThemeDark]: v
71
+ }), t[13] = a, t[14] = b, t[15] = w, t[16] = E, t[17] = q, t[18] = U, t[19] = v, t[20] = y, t[21] = S, t[22] = D, t[23] = p) : p = t[23];
72
+ const I = p;
73
+ let x;
74
+ return t[24] !== f || t[25] !== r || t[26] !== m || t[27] !== I ? (x = /* @__PURE__ */ k(f, { className: I, ref: _, ...m, children: r }), t[24] = f, t[25] = r, t[26] = m, t[27] = I, t[28] = x) : x = t[28], x;
75
+ };
76
+ export {
77
+ lt as D,
78
+ tt as T,
79
+ ot as a,
80
+ et as b,
81
+ O as v
82
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,80 @@
1
+ import { AnchorHTMLAttributes, JSX } from 'react';
2
+ import { LinkButtonProps } from '../LinkButton/LinkButton';
3
+ import { CardHeading } from './LinkCard.utils';
4
+ type DecorativeLinkButtonProps = Pick<LinkButtonProps, 'iconPosition' | 'iconName' | 'size' | 'hideLabel'> & {
5
+ label?: string;
6
+ variant?: Extract<LinkButtonProps['variant'], 'filled' | 'ghost'>;
7
+ };
8
+ export interface LinkCardProps extends AnchorHTMLAttributes<HTMLAnchorElement | HTMLDivElement> {
9
+ /**
10
+ * The `heading` prop can either be a simple `string` or an object with specific properties.
11
+ * When provided as a string, it represents the default medium h3 heading directly.
12
+ * When provided as an object, it allows for more detailed configuration, including:
13
+ * - `headingText: string` The text content for the heading.
14
+ * - `headingSize?: 'x-large' | 'x-large-uppercase' | 'large' | 'large-uppercase' | 'medium' | 'medium-uppercase' | 'small' | 'small-uppercase'` Defines the size of the heading, using predefined size types, defaults to `'medium'`
15
+ * - `headingTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'` Specifies the HTML tag to be used for the heading, such as 'h1', 'h2', etc., defaults to `'h3'`
16
+ *
17
+ * @prop {string | { headingText: string; headingSize?: HeadingSize; headingTag?: HeadingTag; }} heading
18
+ */
19
+ heading: CardHeading;
20
+ /** Orange brand flag text displayed on the image. */
21
+ brandFlag?: string;
22
+ /**
23
+ * ClassName for the content container inside the card.
24
+ */
25
+ classNameContent?: string;
26
+ /**
27
+ * ClassName for the card wrapper element.
28
+ */
29
+ classNameWrapper?: string;
30
+ /**
31
+ * Props for the decorative link button optionally displayed at the bottom of the card.
32
+ *
33
+ * - `label?: string` The text label for the decorative link button.
34
+ * - `variant?: 'filled' | 'ghost'` The variant style for the decorative link button, defaults to `'filled'`.
35
+ * - `iconPosition?: 'left' | 'right'` The position of the icon in the decorative link button.
36
+ * - `iconName?: IconName` The name of the icon to be used in the decorative link button.
37
+ * - `size?: 'small' | 'medium'` The size of the decorative link button.
38
+ * - `hideLabel?: boolean` Whether to hide the label of the decorative link button.
39
+ */
40
+ decorativeLinkButtonProps?: DecorativeLinkButtonProps;
41
+ /** Short descriptive text displayed beneath the headline. */
42
+ description?: React.ReactNode;
43
+ /**
44
+ * ARIA label for the list of flags for screen readers. Needed if flags are provided.
45
+ */
46
+ flagListAriaLabel?: string;
47
+ /**
48
+ * Array of DSFlag components to be displayed on the card.
49
+ */
50
+ flags?: string[];
51
+ /** Defines the URL to link to. */
52
+ href?: string;
53
+ /** Image element to be displayed within the card. */
54
+ img?: React.ReactNode;
55
+ /**
56
+ * Makes the card layout responsive.
57
+ * @default true
58
+ */
59
+ isResponsive?: boolean;
60
+ /** Link component to be used for the navigation. */
61
+ linkComponent?: React.ReactElement<React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement> & {
62
+ onClick?: () => void;
63
+ to?: string;
64
+ }>;
65
+ /** Meta data content displayed beneath the description. */
66
+ metaData?: React.ReactNode;
67
+ /**
68
+ * Sets the orientation of the card.
69
+ * @default 'vertical'
70
+ */
71
+ orientation?: 'vertical' | 'horizontal';
72
+ }
73
+ /**
74
+ * A simple, responsive & accessible Card component that can be used as a link to navigate to other pages.
75
+ * The entire card is clickable and follows accessibility best practices.
76
+ *
77
+ * Design in Figma: [Link Card](https://www.figma.com/design/qXldpLO6gxHJNLdcXIPxYt/Core-Components-%F0%9F%92%A0?node-id=26075-11591&p=f&t=WDN78eWtKR9F8yYp-11)
78
+ */
79
+ export declare const DSLinkCard: ({ heading, brandFlag, className, classNameContent, classNameWrapper, decorativeLinkButtonProps, description, flagListAriaLabel, flags, href, img, isResponsive, linkComponent, metaData, orientation, ...rest }: LinkCardProps) => JSX.Element;
80
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import { HeadingSize, HeadingTag } from '../Heading/Heading.utils';
2
+ import { LinkCardProps } from './LinkCard';
3
+ export type CardHeading = string | {
4
+ headingText: string;
5
+ headingSize?: HeadingSize;
6
+ headingTag?: HeadingTag;
7
+ };
8
+ type ValidationProps = Pick<LinkCardProps, 'href' | 'linkComponent' | 'flags' | 'flagListAriaLabel' | 'heading' | 'isResponsive' | 'orientation' | 'img' | 'brandFlag'>;
9
+ export declare const validateLinkCardProps: ({ href, linkComponent, flags, flagListAriaLabel, heading, isResponsive, orientation, img, brandFlag, }: ValidationProps) => void;
10
+ export {};
@@ -0,0 +1,30 @@
1
+ import { HTMLAttributes, JSX } from 'react';
2
+ import { Theme } from '../../types';
3
+ import { TextUtilitySize, TextUtilityTag, TextUtilityWeight } from './TextUtility.utils';
4
+ export interface TextUtilityProps extends HTMLAttributes<HTMLQuoteElement | HTMLDivElement | HTMLLegendElement | HTMLParagraphElement | HTMLSpanElement | HTMLTimeElement> {
5
+ /** Content of the text. */
6
+ children: React.ReactNode;
7
+ /** Size of the text.
8
+ * @default 'medium'
9
+ */
10
+ size?: TextUtilitySize;
11
+ /** Specifies the HTML tag to be used for the text.
12
+ * @default 'p'
13
+ */
14
+ tag?: TextUtilityTag;
15
+ /** Defines the theme.
16
+ * @default 'light'
17
+ */
18
+ theme?: Theme;
19
+ /** Defines the weight. **Weight 'demi' is only supported on sizes 'small' and 'x-small'. Size 'x-small' only supports 'demi' weight.**.
20
+ * @default 'normal'
21
+ */
22
+ weight?: TextUtilityWeight;
23
+ }
24
+ /**
25
+ * The `DSTextUtility` component is optimized for utility text use-cases
26
+ * (labels, captions, UI text) and maps directly to the SCSS utility typography mixins.
27
+ *
28
+ * Design in Figma: [Text](https://www.figma.com/design/d9wrOp4aCplDsV9AVC87Xn/Typography-%F0%9F%85%B0%EF%B8%8F?node-id=3-2301&t=TeSgud7dB5pnld5s-11)
29
+ */
30
+ export declare const DSTextUtility: ({ children, className, size, tag, theme, weight, ...rest }: TextUtilityProps) => JSX.Element;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import { TextUtilityProps } from './TextUtility';
2
+ export declare const TEXT_UTILITY_TAG: readonly ["address", "blockquote", "cite", "div", "dd", "dfn", "dt", "figcaption", "legend", "li", "p", "span", "time"];
3
+ export type TextUtilityTag = (typeof TEXT_UTILITY_TAG)[number];
4
+ export declare const TEXT_UTILITY_SIZE: readonly ["large", "medium", "small", "x-small"];
5
+ export type TextUtilitySize = (typeof TEXT_UTILITY_SIZE)[number];
6
+ export declare const TEXT_UTILITY_WEIGHT: readonly ["bold", "demi", "normal"];
7
+ export type TextUtilityWeight = (typeof TEXT_UTILITY_WEIGHT)[number];
8
+ type ValidationProps = Pick<TextUtilityProps, 'size' | 'weight'>;
9
+ export declare const validateTextUtilityProps: ({ size, weight }: ValidationProps) => void;
10
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/index.d.ts CHANGED
@@ -50,6 +50,8 @@ export * from './components/Link/Link';
50
50
  export * from './components/Link/Link.utils';
51
51
  export * from './components/LinkButton/LinkButton';
52
52
  export * from './components/LinkButton/LinkButton.utils';
53
+ export * from './components/LinkCard/LinkCard';
54
+ export * from './components/LinkCard/LinkCard.utils';
53
55
  export * from './components/Logo/Logo';
54
56
  export * from './components/Logo/Logo.utils';
55
57
  export * from './components/MegaMenu/MegaMenu';
@@ -83,6 +85,8 @@ export * from './components/Text/Text';
83
85
  export * from './components/Text/Text.utils';
84
86
  export * from './components/Textarea/Textarea';
85
87
  export * from './components/Textarea/Textarea.utils';
88
+ export * from './components/TextUtility/TextUtility';
89
+ export * from './components/TextUtility/TextUtility.utils';
86
90
  export * from './components/Title/Title';
87
91
  export * from './components/Title/Title.utils';
88
92
  export * from './components/Toast/ToastManager';