@stihl-design-system/components 1.0.0-RC.41 → 1.0.0-RC.43
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.CiiPLwYQ.js → accordion.CJYNJWAm.js} +2 -2
- package/action-card-example-image-1.webp +0 -0
- package/{actionbutton.DKb4ph1c.js → actionbutton.BLKEsCUm.js} +3 -3
- package/actioncard.WFXhVqOa.js +9 -0
- package/actioncard.d.ts +2 -0
- package/{actionlink.DEGta2h9.js → actionlink.xJDPIikL.js} +3 -3
- package/arialiveregions.BF6mUlPU.js +23 -0
- package/assets/ActionCard.C85bSGRa.css +1 -0
- package/assets/LinkCard.fwyPSY19.css +1 -0
- package/assets/Toast.CGl8z6mX.css +1 -0
- package/assets/filelist.CHVupL8T.css +1 -0
- package/assets/filepreview.2cdH-1Xs.css +1 -0
- package/assets/progressindicator.Cbbzo5-b.css +1 -0
- package/{banner.S_c1UQJe.js → banner.CYahlug-.js} +1 -1
- package/{breadcrumb.DiuuVblR.js → breadcrumb.Bg86bTsh.js} +3 -3
- package/{button.Z7Mmvwhv.js → button.oshwTInZ.js} +4 -4
- package/{buttonround.Bqi8Ej-y.js → buttonround.CPTvQIcE.js} +3 -3
- package/{checkbox.DtSSduSH.js → checkbox.BTnK5VzM.js} +3 -3
- package/{checkboxgroup.CSP1DOCW.js → checkboxgroup.DESMv2S7.js} +2 -2
- package/{chip.CyypeY5M.js → chip.BWL_yfeA.js} +3 -3
- package/chipgroup.DvoNDnTN.js +213 -0
- package/chunks/{Accordion.Q50G9LZ3.js → Accordion.D4jj5_nA.js} +1 -1
- package/chunks/{ActionButton.BEMy35Lh.js → ActionButton.BOKt8109.js} +2 -2
- package/chunks/ActionCard.oi3u27DL.js +242 -0
- package/chunks/{ActionLink.DECHT42B.js → ActionLink.BFwVQSTh.js} +2 -2
- package/chunks/AriaLiveRegions.utils.8ofDlHnN.js +65 -0
- package/chunks/{Breadcrumb.nflDJoKs.js → Breadcrumb.ClHgevZX.js} +2 -2
- package/chunks/{Button.DpGeheky.js → Button.BdqkFovu.js} +3 -3
- package/chunks/{Checkbox.B3NeB54s.js → Checkbox.vdWpXSUh.js} +2 -2
- package/chunks/{CheckboxGroup.BYZSvqF7.js → CheckboxGroup.BtVBLux3.js} +2 -2
- package/chunks/Chip.B_zwA2qc.js +157 -0
- package/chunks/{CustomReactSelect.DBsnmMPl.js → CustomReactSelect.Dtf3mXJ_.js} +4 -4
- package/chunks/{Dialog.C-rcs_Up.js → Dialog.9tejL9sZ.js} +1 -1
- package/chunks/{Drawer.D0d557c5.js → Drawer.DIFMs4Gh.js} +1 -1
- package/chunks/{Fieldset.7WM7w62l.js → Fieldset.8jatF24R.js} +2 -2
- package/chunks/Icon.BoxUJQDT.js +232 -0
- package/chunks/InputFile.zbXRpklU.js +260 -0
- package/chunks/{InputNumber.a44HnJ9B.js → InputNumber.d7gmAHaX.js} +3 -3
- package/chunks/{InputPassword.B1E0Maub.js → InputPassword.Cz41hBCt.js} +3 -3
- package/chunks/{InputSearch.C7AvD7Eu.js → InputSearch.DPQCT8Yo.js} +3 -3
- package/chunks/{LinkButton.CMjq2FKc.js → LinkButton.BGQOwjnE.js} +2 -2
- package/chunks/LinkCard.DRATPHdd.js +178 -0
- package/chunks/{NavigationTabList.ltT6igtk.js → NavigationTabList.Cf6csU_F.js} +1 -1
- package/chunks/{NavigationTabs.DsVepb7H.js → NavigationTabs.CSTtXPxd.js} +1 -1
- package/chunks/{Notification.COwLndR0.js → Notification.ChSYPU3r.js} +2 -2
- package/chunks/Popover.BSL3AilG.js +221 -0
- package/chunks/{RadioGroup.B-qTH31u.js → RadioGroup.DauFXAk6.js} +1 -1
- package/chunks/{Select.DrDVi9lg.js → Select.CWA7DHcL.js} +3 -3
- package/chunks/{Slider.DGMrDfWv.js → Slider.2ltYhUJb.js} +2 -2
- package/chunks/Stepper.Dh69BOVR.js +146 -0
- package/chunks/{SystemFeedback.DFN6Y2cw.js → SystemFeedback.C2XFC5WN.js} +1 -1
- package/chunks/{Tabs.DfH2q9EL.js → Tabs.BvwiBlXt.js} +1 -1
- package/chunks/{Textarea.ymNCbcvH.js → Textarea.Ck0sw4SI.js} +2 -2
- package/chunks/Toast.Ck4woVuy.js +76 -0
- package/chunks/battery-return.tBu7C6Q7.js +10 -0
- package/chunks/cookie.U09gK6it.js +10 -0
- package/chunks/credit-card.BmIN7RQ3.js +10 -0
- package/chunks/legal-info.-S9gzFzc.js +10 -0
- package/chunks/legal.CVCmbA3m.js +10 -0
- package/chunks/present.B4ImIJxi.js +10 -0
- package/chunks/return-package.Bt9FUc42.js +10 -0
- package/{combobox.DzSEFo_5.js → combobox.zkQtaMOE.js} +1 -1
- package/components/ActionButton/ActionButton.d.ts +1 -1
- package/components/ActionCard/ActionCard.d.ts +75 -0
- package/components/ActionCard/ActionCard.utils.d.ts +24 -0
- package/components/AriaLiveRegions/AriaLiveRegions.d.ts +22 -1
- package/components/AriaLiveRegions/AriaLiveRegions.test.d.ts +1 -0
- package/components/AriaLiveRegions/AriaLiveRegions.utils.d.ts +106 -0
- package/components/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/components/Button/Button.d.ts +1 -1
- package/components/ChipGroup/ChipGroup.utils.d.ts +14 -15
- package/components/Icon/Icon.d.ts +1 -1
- package/components/InputFile/FileList/FileList.d.ts +14 -0
- package/components/InputFile/FileList/FileList.test.d.ts +1 -0
- package/components/{FileList → InputFile/FileList}/FileList.utils.d.ts +0 -6
- package/components/InputFile/FileList/FileList.utils.test.d.ts +1 -0
- package/components/InputFile/FileList/FilePreview/FilePreview.d.ts +15 -0
- package/components/InputFile/FileList/FilePreview/FilePreview.test.d.ts +1 -0
- package/components/InputFile/FileList/FilePreview/FilePreview.utils.d.ts +11 -0
- package/components/InputFile/FileList/FilePreview/FilePreview.utils.test.d.ts +1 -0
- package/components/InputFile/FileList/ProgressIndicator/ProgressIndicator.d.ts +34 -0
- package/components/InputFile/FileList/ProgressIndicator/ProgressIndicator.test.d.ts +1 -0
- package/components/InputFile/InputFile.d.ts +49 -15
- package/components/InputFile/InputFile.utils.d.ts +14 -0
- package/components/LinkButton/LinkButton.d.ts +1 -1
- package/components/LinkCard/LinkCard.d.ts +16 -4
- package/components/Logo/Logo.d.ts +1 -1
- package/components/NavigationTabs/NavigationTabs.d.ts +1 -1
- package/components/Spinner/Spinner.d.ts +1 -1
- package/components/Stepper/Stepper.d.ts +1 -1
- package/components/Stepper/Stepper.utils.d.ts +0 -1
- package/components/Switch/Switch.d.ts +1 -1
- package/components/Tabs/TabList/TabList.d.ts +1 -1
- package/components/Toast/ToastManager.utils.d.ts +0 -1
- package/components/TopBar/TopBar.d.ts +1 -1
- package/{customreactselect.D7YraWJ7.js → customreactselect.DbPXuk-C.js} +5 -5
- package/{dialog.CBovd8em.js → dialog.wzLHG12h.js} +2 -2
- package/{drawer.D5F0KXI2.js → drawer.DnHZCC60.js} +2 -2
- package/{fieldset.DgbZ_K_l.js → fieldset.DUU39krR.js} +3 -3
- package/filelist.d.ts +1 -1
- package/filelist.zRCzEN5D.js +128 -0
- package/filepreview.CK8DA0aR.js +94 -0
- package/filepreview.d.ts +2 -0
- package/{flag.D-wrUioF.js → flag.02uD-ADh.js} +1 -1
- package/{floatingactionbutton.CE-Rz0dx.js → floatingactionbutton.BwmRfmD_.js} +3 -3
- package/{icon.ByLYRkPZ.js → icon.DFM8rDOR.js} +1 -1
- package/index.d.ts +3 -0
- package/index.es.js +233 -219
- package/{input.MZXe6rlg.js → input.yBU7wjmW.js} +4 -4
- package/inputfile.BRt_BWK8.js +18 -0
- package/{inputnumber.DevQudIX.js → inputnumber.B0yCOPU1.js} +4 -4
- package/{inputpassword.C-XYK-JP.js → inputpassword.aQxGIeyf.js} +4 -4
- package/{inputsearch.CmJdxnzX.js → inputsearch.EbZnS29c.js} +4 -4
- package/{link.R1lfD5aN.js → link.Ck9Yd2y2.js} +3 -3
- package/{linkbutton.Y-ET1tc9.js → linkbutton.DzbJ1ws2.js} +3 -3
- package/{linkcard.CayqoQNo.js → linkcard.D65tvntF.js} +3 -3
- package/{navigationtablist.Cd9hZzFQ.js → navigationtablist.BMvJp48M.js} +2 -2
- package/{navigationtabs.DHG-TeF2.js → navigationtabs.BzYhrLVd.js} +2 -2
- package/{notification.u_LLz-O0.js → notification.B80f3Sh6.js} +3 -3
- package/{optioncheckbox.v8Plcgeg.js → optioncheckbox.DvF4Vr4C.js} +1 -1
- package/package.json +2 -2
- package/partials/index.js +15 -9
- package/partials/lib/partials.d.ts +1 -1
- package/{popover.T7-imfkx.js → popover.BR8IGyhi.js} +4 -3
- package/product-card-example-1.webp +0 -0
- package/product-card-example-2.webp +0 -0
- package/product-card-example-3.webp +0 -0
- package/product-card-example-4.webp +0 -0
- package/progressindicator.DYKf69nk.js +53 -0
- package/progressindicator.d.ts +2 -0
- package/{radiogroup.CAh4wto1.js → radiogroup.Cniqm1t0.js} +2 -2
- package/{scroller.DfhhZelk.js → scroller.CSSI5khP.js} +1 -1
- package/{select.CSCc_-6d.js → select.DPfXPv-k.js} +4 -4
- package/{skiptocontent.C2HpZt5q.js → skiptocontent.C_nrEIVL.js} +1 -1
- package/{slider.B2aQwfc2.js → slider.CyRU5Kys.js} +3 -3
- package/{spinner.CRVyui04.js → spinner.ww3wgdUU.js} +1 -1
- package/{step.C-LC5sKQ.js → step.C4gOI6c3.js} +2 -2
- package/{stepper.CRljfUF8.js → stepper.Bqdr6GS-.js} +4 -4
- package/{switch.DgKgzm-j.js → switch.DpYvgNSE.js} +2 -2
- package/{systemfeedback.BKLsE5sY.js → systemfeedback.g7odUaLC.js} +2 -2
- package/{tablist.DPiNeY3_.js → tablist.DLFJGmYV.js} +3 -3
- package/{tabs.Cxzm6ZZ-.js → tabs.Bne3Z3rz.js} +2 -2
- package/{textarea.CDXY-OVz.js → textarea.DcAoKkta.js} +3 -3
- package/{toast.Bev-Rfuw.js → toast.C_O0xDYn.js} +3 -3
- package/toastmanager.w_mhIehC.js +79 -0
- package/tooltip.C6HKano9.js +184 -0
- package/types/icon-types.d.ts +1 -1
- package/arialiveregions.B0AV2JcV.js +0 -18
- package/assets/LinkCard.C6HtgbjH.css +0 -1
- package/assets/Toast.DgRXxA0s.css +0 -1
- package/assets/filelist.H_wKcSPX.css +0 -1
- package/chipgroup.CSjQHeeW.js +0 -199
- package/chunks/AriaLiveRegions.utils.CLpOaVD9.js +0 -27
- package/chunks/Chip.SiGIIHR-.js +0 -133
- package/chunks/Icon.m6sMB6vl.js +0 -232
- package/chunks/InputFile.DRGNdtY0.js +0 -236
- package/chunks/LinkCard.CJ5P0ews.js +0 -199
- package/chunks/Popover.C5wtha5l.js +0 -214
- package/chunks/Stepper.DptsFh5n.js +0 -152
- package/chunks/Toast.RUzRjojQ.js +0 -76
- package/components/FileList/FileList.d.ts +0 -13
- package/filelist.CDEBo3Pi.js +0 -160
- package/inputfile.BO4wDnzQ.js +0 -18
- package/toastmanager.DII20_9k.js +0 -89
- package/tooltip._lP4aMV2.js +0 -177
- /package/components/{FileList/FileList.test.d.ts → ActionCard/ActionCard.test.d.ts} +0 -0
- /package/components/{FileList/FileList.utils.test.d.ts → ActionCard/ActionCard.utils.test.d.ts} +0 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as C, jsxs as j } from "react/jsx-runtime";
|
|
3
|
+
import { d as E } from "./index.cKLI89Eg.js";
|
|
4
|
+
import { c as W } from "./index.DQOqod3i.js";
|
|
5
|
+
import { forwardRef as L } from "react";
|
|
6
|
+
import { D as M } from "./Button.BdqkFovu.js";
|
|
7
|
+
import { D as O } from "./Icon.BoxUJQDT.js";
|
|
8
|
+
import '../assets/Toast.CGl8z6mX.css';const P = "ds-toast_root_1k9pu_5", z = "ds-toast_root--closing_1k9pu_15", A = "ds-toast_root--success_1k9pu_66", R = "ds-toast_root--info_1k9pu_70", $ = "ds-toast_root--warning_1k9pu_74", q = "ds-toast_content_1k9pu_79", F = "ds-toast_content--hide-icon_1k9pu_86", G = "ds-toast_icon_1k9pu_90", J = "ds-toast_message_1k9pu_94", s = {
|
|
9
|
+
root: P,
|
|
10
|
+
rootClosing: z,
|
|
11
|
+
rootSuccess: A,
|
|
12
|
+
rootInfo: R,
|
|
13
|
+
rootWarning: $,
|
|
14
|
+
content: q,
|
|
15
|
+
contentHideIcon: F,
|
|
16
|
+
icon: G,
|
|
17
|
+
message: J
|
|
18
|
+
}, K = {
|
|
19
|
+
success: "circle-check-colored",
|
|
20
|
+
warning: "triangle-exclamationmark-colored",
|
|
21
|
+
info: "circle-info-colored"
|
|
22
|
+
}, Q = L((D, b) => {
|
|
23
|
+
const o = E.c(44);
|
|
24
|
+
let e, n, t, c, a, l, i, k, h;
|
|
25
|
+
o[0] !== D ? ({
|
|
26
|
+
message: t,
|
|
27
|
+
className: e,
|
|
28
|
+
closeButtonProps: n,
|
|
29
|
+
hideIcon: k,
|
|
30
|
+
variant: h,
|
|
31
|
+
onClick: c,
|
|
32
|
+
onMouseEnter: a,
|
|
33
|
+
onMouseLeave: l,
|
|
34
|
+
...i
|
|
35
|
+
} = D, o[0] = D, o[1] = e, o[2] = n, o[3] = t, o[4] = c, o[5] = a, o[6] = l, o[7] = i, o[8] = k, o[9] = h) : (e = o[1], n = o[2], t = o[3], c = o[4], a = o[5], l = o[6], i = o[7], k = o[8], h = o[9]);
|
|
36
|
+
const r = k === void 0 ? !1 : k, d = h === void 0 ? "info" : h;
|
|
37
|
+
let m;
|
|
38
|
+
o[10] !== n ? (m = n || {}, o[10] = n, o[11] = m) : m = o[11];
|
|
39
|
+
let _, v;
|
|
40
|
+
o[12] !== m ? ({
|
|
41
|
+
label: v,
|
|
42
|
+
..._
|
|
43
|
+
} = m, o[12] = m, o[13] = _, o[14] = v) : (_ = o[13], v = o[14]);
|
|
44
|
+
const x = v === void 0 ? "Close toast" : v, w = d === "success", T = d === "warning", y = d === "info";
|
|
45
|
+
let I;
|
|
46
|
+
o[15] !== e || o[16] !== w || o[17] !== T || o[18] !== y ? (I = W(s.root, e, {
|
|
47
|
+
[s.rootSuccess]: w,
|
|
48
|
+
[s.rootWarning]: T,
|
|
49
|
+
[s.rootInfo]: y
|
|
50
|
+
}), o[15] = e, o[16] = w, o[17] = T, o[18] = y, o[19] = I) : I = o[19];
|
|
51
|
+
const B = I;
|
|
52
|
+
let N;
|
|
53
|
+
o[20] !== r ? (N = W(s.content, {
|
|
54
|
+
[s.contentHideIcon]: r
|
|
55
|
+
}), o[20] = r, o[21] = N) : N = o[21];
|
|
56
|
+
const H = N;
|
|
57
|
+
let u;
|
|
58
|
+
o[22] !== r || o[23] !== d ? (u = !r && /* @__PURE__ */ C(O, { name: K[d], className: s.icon, "aria-hidden": "true" }), o[22] = r, o[23] = d, o[24] = u) : u = o[24];
|
|
59
|
+
let f;
|
|
60
|
+
o[25] !== t ? (f = /* @__PURE__ */ C("div", { className: s.message, children: t }), o[25] = t, o[26] = f) : f = o[26];
|
|
61
|
+
let p;
|
|
62
|
+
o[27] !== x || o[28] !== c || o[29] !== _ ? (p = /* @__PURE__ */ C(M, { ..._, hideLabel: !0, iconName: "cross", size: "small", variant: "ghost", onClick: c, type: "button", children: x }), o[27] = x, o[28] = c, o[29] = _, o[30] = p) : p = o[30];
|
|
63
|
+
let g;
|
|
64
|
+
o[31] !== H || o[32] !== u || o[33] !== f || o[34] !== p ? (g = /* @__PURE__ */ j("div", { className: H, children: [
|
|
65
|
+
u,
|
|
66
|
+
f,
|
|
67
|
+
p
|
|
68
|
+
] }), o[31] = H, o[32] = u, o[33] = f, o[34] = p, o[35] = g) : g = o[35];
|
|
69
|
+
let S;
|
|
70
|
+
return o[36] !== t || o[37] !== a || o[38] !== l || o[39] !== b || o[40] !== i || o[41] !== B || o[42] !== g ? (S = /* @__PURE__ */ C("aside", { className: B, ref: b, popover: "manual", "data-ds-toast": !0, onMouseEnter: a, onMouseLeave: l, "aria-label": t, ...i, children: g }), o[36] = t, o[37] = a, o[38] = l, o[39] = b, o[40] = i, o[41] = B, o[42] = g, o[43] = S) : S = o[43], S;
|
|
71
|
+
});
|
|
72
|
+
Q.displayName = "DSToast";
|
|
73
|
+
export {
|
|
74
|
+
Q as D,
|
|
75
|
+
s
|
|
76
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const h = ({
|
|
4
|
+
title: t,
|
|
5
|
+
titleId: l,
|
|
6
|
+
...a
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": l, ...a }, t ? /* @__PURE__ */ e.createElement("title", { id: l }, t) : null, /* @__PURE__ */ e.createElement("g", { clipPath: "url(#a)" }, /* @__PURE__ */ e.createElement("path", { d: "M14 2h2v14h-4v-2h2V4h-4v2.035H8V2h2V0h4z" }), /* @__PURE__ */ e.createElement("path", { d: "m5.428 9.39-1.62 1.62 5.197-.005v-.997L7 9.995V8l4 .013V13l-7.191.005 1.619 1.597L4 16l-4.01-3.992L4 8z" })));
|
|
8
|
+
export {
|
|
9
|
+
h as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const m = ({
|
|
4
|
+
title: a,
|
|
5
|
+
titleId: t,
|
|
6
|
+
...l
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": t, ...l }, a ? /* @__PURE__ */ e.createElement("title", { id: t }, a) : null, /* @__PURE__ */ e.createElement("g", { clipPath: "url(#a)" }, /* @__PURE__ */ e.createElement("path", { d: "M7.854.023a3.726 3.726 0 0 0 5.11 3.458 3.726 3.726 0 0 0 2.986 3.633q.049.435.05.884A8.001 8.001 0 1 1 7.854 0zM6.3 2.243A6.001 6.001 0 0 0 8 14a6 6 0 0 0 5.977-5.496 5.74 5.74 0 0 1-2.54-2.759A5.73 5.73 0 0 1 6.3 2.243m.035 7.205a1 1 0 1 1 0 2 1 1 0 0 1 0-2m3.785-1.097a1 1 0 1 1 0 2 1 1 0 0 1 0-2M5.75 5.68a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m9.414-2.931a.75.75 0 1 1-.001 1.501.75.75 0 0 1 .001-1.501M10.75 0a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m2.914 0a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5" })));
|
|
8
|
+
export {
|
|
9
|
+
m as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const r = ({
|
|
4
|
+
title: t,
|
|
5
|
+
titleId: a,
|
|
6
|
+
...l
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": a, ...l }, t ? /* @__PURE__ */ e.createElement("title", { id: a }, t) : null, /* @__PURE__ */ e.createElement("path", { d: "M16 14H0V2h16zM2 12h12V7H2zm6.5-1H3V8.5h5.5zM2 5h12V4H2z" }));
|
|
8
|
+
export {
|
|
9
|
+
r as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const h = ({
|
|
4
|
+
title: l,
|
|
5
|
+
titleId: a,
|
|
6
|
+
...t
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": a, ...t }, l ? /* @__PURE__ */ e.createElement("title", { id: a }, l) : null, /* @__PURE__ */ e.createElement("g", { clipPath: "url(#a)" }, /* @__PURE__ */ e.createElement("path", { d: "M13 14v2H3v-2zm-4-1H7V4h2z" }), /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", d: "M8.85 1H15v2h-1l2 5a3.003 3.003 0 0 1-6 0l2-5H4l2 5a3.003 3.003 0 0 1-6 0l2-5H1V1h6.15l.15-1h1.4zM2.072 8H3.82L3 5.5zm10 0h1.747L13 5.5z", clipRule: "evenodd" })));
|
|
8
|
+
export {
|
|
9
|
+
h as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const a = ({
|
|
4
|
+
title: l,
|
|
5
|
+
titleId: c,
|
|
6
|
+
...t
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": c, ...t }, l ? /* @__PURE__ */ e.createElement("title", { id: c }, l) : null, /* @__PURE__ */ e.createElement("path", { d: "M7.767 15.498c-1.935 0-3.3-.899-4.008-1.935L5.59 12.25c.415.605 1.071 1.14 2.056 1.14 1.002 0 1.295-.38 1.295-.708 0-.398-.276-.605-1.174-1.037l-1.918-.898c-1.52-.708-2.246-1.52-2.246-2.799 0-1.382.83-1.97 1.71-2.28-.466-.553-.725-1.21-.725-2.021 0-1.71 1.261-3.145 3.507-3.145 1.71 0 2.643.76 3.317 1.745l-1.9 1.279c-.484-.743-.899-.933-1.417-.933-.708 0-1.002.484-1.002.915 0 .467.173.778.916 1.123l1.917.881c1.71.795 2.47 1.676 2.47 3.04 0 1.158-.656 1.85-1.64 2.281.466.553.69 1.192.69 1.9 0 1.676-1.364 2.765-3.68 2.765M9.46 9.78c.397-.19.604-.467.604-.864 0-.622-.397-.847-1.14-1.192l-1.917-.881-.415-.208c-.346.139-.657.38-.657.847 0 .518.294.743.899 1.02l1.917.897c.26.121.501.242.709.38" }));
|
|
8
|
+
export {
|
|
9
|
+
a as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const h = ({
|
|
4
|
+
title: l,
|
|
5
|
+
titleId: t,
|
|
6
|
+
...c
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": t, ...c }, l ? /* @__PURE__ */ e.createElement("title", { id: t }, l) : null, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", d: "M2.857 1.242c.95-1.521 3.264-1.675 4.44-.295l.698.82.698-.819c1.176-1.38 3.49-1.227 4.44.294l.083.144c.478.891.314 1.896-.282 2.614H16v6h-1.005v6h-14v-6H0V4h3.057c-.597-.718-.761-1.724-.283-2.615zM8.995 14h4v-4h-4zm-6 0h4v-4h-4zm6-6.034h5.002V6.034H8.995zm-6.991 0h4.991V6.034H2.004zm3.732-5.884c-.307-.36-.911-.32-1.16.077-.248.398.017.9.508.966l1.577.21.07-.084zm5.678.077c-.249-.397-.853-.437-1.16-.076L9.258 3.25l.071.084 1.577-.21c.492-.065.756-.568.508-.966", clipRule: "evenodd" }));
|
|
8
|
+
export {
|
|
9
|
+
h as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const n = ({
|
|
4
|
+
title: l,
|
|
5
|
+
titleId: t,
|
|
6
|
+
...a
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "#252525", viewBox: "0 0 17 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": t, ...a }, l ? /* @__PURE__ */ e.createElement("title", { id: t }, l) : null, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", d: "m9.36 0 6.65 2.826v7.764l-3.538 1.428V9.89l1.535-.61V5.023l-3.645 1.53V7H8.358v-.446l-3.643-1.53V7H2.71V2.826zm0 4.842 3.13-1.321-3.13-1.322-3.13 1.322z", clipRule: "evenodd" }), /* @__PURE__ */ e.createElement("path", { d: "m4.01 8 1.442 1.379-1.624 1.623L9.011 11v-1H7.034V8h3.977v5.002H3.828l1.624 1.623L4.011 16 0 12.002z" }));
|
|
8
|
+
export {
|
|
9
|
+
n as default
|
|
10
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as z } from "react/jsx-runtime";
|
|
3
3
|
import { d as G } from "./chunks/index.cKLI89Eg.js";
|
|
4
|
-
import { v as H, c as J } from "./chunks/CustomReactSelect.
|
|
4
|
+
import { v as H, c as J } from "./chunks/CustomReactSelect.Dtf3mXJ_.js";
|
|
5
5
|
import { forwardRef as K } from "react";
|
|
6
6
|
const Q = K((N, S) => {
|
|
7
7
|
const t = G.c(38);
|
|
@@ -6,7 +6,7 @@ export interface ActionButtonProps extends ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
6
6
|
/** Content within the button. */
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
/** ARIA attributes to enhance accessibility
|
|
9
|
-
* `{'aria-label'
|
|
9
|
+
* `{'aria-label'?: string;`
|
|
10
10
|
* `'aria-expanded'?: boolean | 'true' | 'false';`
|
|
11
11
|
* `'aria-pressed'?: boolean | 'true' | 'false' | 'mixed';`
|
|
12
12
|
* `'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';}`
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { AnchorHTMLAttributes, HTMLAttributes, MouseEventHandler, default as React } from 'react';
|
|
2
|
+
import { SelectedAriaAttributes } from '../../types';
|
|
3
|
+
import { ActionCardAriaAttributes } from './ActionCard.utils';
|
|
4
|
+
export interface ActionCardProps extends HTMLAttributes<HTMLElement> {
|
|
5
|
+
/** ARIA attributes to ensure accessibility. 'aria-labelledby' OR 'aria-label' is required.
|
|
6
|
+
*
|
|
7
|
+
* `{'aria-label'? string;`
|
|
8
|
+
* `'aria-labelledby'?: string;}`
|
|
9
|
+
* */
|
|
10
|
+
aria: SelectedAriaAttributes<ActionCardAriaAttributes>;
|
|
11
|
+
/** Child areas to render within the card. */
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
/** Additional class name to apply to the content wrapper element. */
|
|
14
|
+
classNameContentWrapper?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Sets the orientation of the card.
|
|
17
|
+
* @default 'vertical'
|
|
18
|
+
*/
|
|
19
|
+
orientation?: 'vertical' | 'horizontal';
|
|
20
|
+
/**
|
|
21
|
+
* Sets the padding for the content inside the card.
|
|
22
|
+
* @default 'medium'
|
|
23
|
+
*/
|
|
24
|
+
padding?: 'small' | 'medium';
|
|
25
|
+
}
|
|
26
|
+
/** Props for any "slot" component */
|
|
27
|
+
export interface ActionCardSlotProps {
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Props for the PrimaryAction slot.
|
|
33
|
+
* Supports both links (href) and buttons (onClick), as well as custom link components
|
|
34
|
+
* (e.g., react-router Link) via the linkComponent prop.
|
|
35
|
+
*/
|
|
36
|
+
export interface PrimaryActionSlotProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'onClick' | 'children'> {
|
|
37
|
+
/**
|
|
38
|
+
* Accessible label for the primary action. This is visually hidden but read by screen readers.
|
|
39
|
+
* Should describe where the link/button navigates to or what action it performs.
|
|
40
|
+
*/
|
|
41
|
+
children: React.ReactNode;
|
|
42
|
+
/** Additional class name for styling. */
|
|
43
|
+
className?: string;
|
|
44
|
+
/** URL for the primary action when used as a link. */
|
|
45
|
+
href?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Custom link component (e.g., react-router Link, Next.js Link).
|
|
48
|
+
* When provided, `href` is ignored and the linkComponent handles navigation.
|
|
49
|
+
*/
|
|
50
|
+
linkComponent?: React.ReactElement<React.AnchorHTMLAttributes<HTMLAnchorElement> & React.RefAttributes<HTMLAnchorElement> & {
|
|
51
|
+
onClick?: () => void;
|
|
52
|
+
to?: string;
|
|
53
|
+
}>;
|
|
54
|
+
/** Click handler when used as a button. If provided without href, renders as a button. */
|
|
55
|
+
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
56
|
+
}
|
|
57
|
+
/** Compound type for ActionCard with its static slots */
|
|
58
|
+
interface ActionCardComponent extends React.FC<ActionCardProps> {
|
|
59
|
+
Header: React.FC<ActionCardSlotProps>;
|
|
60
|
+
Content: React.FC<ActionCardSlotProps>;
|
|
61
|
+
Footer: React.FC<ActionCardSlotProps>;
|
|
62
|
+
Media: React.FC<ActionCardSlotProps>;
|
|
63
|
+
PrimaryAction: React.FC<PrimaryActionSlotProps>;
|
|
64
|
+
Supplementary: React.FC<ActionCardSlotProps>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A flexible card component that can display various types of content and media. It renders a semantic `<article>` element as non-clickable container that groups interactive and non-interactive elements.
|
|
68
|
+
*
|
|
69
|
+
* - Slot-based structure: configurable slots (media, header, footer & supplementary) that can be customized.
|
|
70
|
+
* - Internal interactions only: interactive elements (e.g. CTAs) inside the card are clickable and focusable.
|
|
71
|
+
*
|
|
72
|
+
* Design in Figma: [Action Card](https://www.figma.com/design/qXldpLO6gxHJNLdcXIPxYt/branch/NUiDfjIK57Feko6GSHYeXz/Core-Components-%F0%9F%92%A0?node-id=44233-30708&t=ZEFsgMD8yluu9OXi-11)
|
|
73
|
+
*/
|
|
74
|
+
export declare const DSActionCard: ActionCardComponent;
|
|
75
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ActionCardProps, ActionCardSlotProps } from './ActionCard';
|
|
3
|
+
export type ActionCardAriaAttributes = 'aria-label' | 'aria-labelledby';
|
|
4
|
+
type ValidationProps = Pick<ActionCardProps, 'aria'> & {
|
|
5
|
+
cardElement: HTMLElement | null;
|
|
6
|
+
};
|
|
7
|
+
export declare const validateActionCardProps: ({ aria, cardElement, }: ValidationProps) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Filters a React children collection and returns only elements of a given slot type.
|
|
10
|
+
*
|
|
11
|
+
* Why needed: In production builds, `component.type` identity can differ due to
|
|
12
|
+
* bundling/minification. To stay robust, we match either by strict identity or by
|
|
13
|
+
* `displayName`/`name` so slot detection works reliably.
|
|
14
|
+
*
|
|
15
|
+
* Notes:
|
|
16
|
+
* - Only valid React elements are considered; primitives (strings, numbers, etc.) are ignored.
|
|
17
|
+
* - Returns a new array of React elements; original children are not mutated.
|
|
18
|
+
*
|
|
19
|
+
* @param sourceChildren React node(s) to search within (usually `children`).
|
|
20
|
+
* @param target The slot component to match (e.g., `Header`, `Footer`).
|
|
21
|
+
* @returns An array of matching React elements of the desired slot type.
|
|
22
|
+
*/
|
|
23
|
+
export declare const getChildrenOfType: (sourceChildren: React.ReactNode, target: React.ComponentType<ActionCardSlotProps>) => React.ReactElement[];
|
|
24
|
+
export {};
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import { JSX } from 'react';
|
|
2
|
+
export interface AriaLiveRegionsProps {
|
|
3
|
+
/**
|
|
4
|
+
* Enables micro-frontend / Web Component integration mode.
|
|
5
|
+
*
|
|
6
|
+
* When `true`, the component:
|
|
7
|
+
* - Renders nothing in the React tree (returns `null`).
|
|
8
|
+
* - Synchronously injects the live regions directly under `document.body`.
|
|
9
|
+
* - No-ops if the regions already exist (idempotent).
|
|
10
|
+
*
|
|
11
|
+
* Use this mode when:
|
|
12
|
+
* - Multiple independent micro-frontends may exist on the same page.
|
|
13
|
+
* - You cannot guarantee placement close to `<body>` in the React tree.
|
|
14
|
+
*
|
|
15
|
+
* The injection happens during React's commit phase (via `useInsertionEffect` or
|
|
16
|
+
* `useLayoutEffect`), ensuring regions exist before any dependent component's
|
|
17
|
+
* effects run.
|
|
18
|
+
*
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
microFrontendMode?: boolean;
|
|
22
|
+
}
|
|
2
23
|
/**
|
|
3
24
|
* A component that provides hidden ARIA live regions for accessibility, allowing screen readers to announce changes dynamically.
|
|
4
25
|
*/
|
|
5
|
-
export declare const DSAriaLiveRegions: () => JSX.Element;
|
|
26
|
+
export declare const DSAriaLiveRegions: ({ microFrontendMode, }: AriaLiveRegionsProps) => JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,3 +3,109 @@ export declare const ARIA_LIVE_REGION_STATUS_ID = "ds-status-live-region";
|
|
|
3
3
|
export declare const getAriaAlertLiveRegionElement: () => HTMLElement | null | undefined;
|
|
4
4
|
export declare const getAriaStatusLiveRegionElement: () => HTMLElement | null | undefined;
|
|
5
5
|
export declare const validateMultipleDSAriaLiveRegionsOnPage: () => void;
|
|
6
|
+
/**
|
|
7
|
+
* Ensures the two DS live regions exist exactly once on the page, directly under <body>.
|
|
8
|
+
* - If both exist: no-op.
|
|
9
|
+
* - If none exist: injects them under document.body.
|
|
10
|
+
* - If only one exists: throws (broken page state).
|
|
11
|
+
* - If duplicates exist: throws (existing validation).
|
|
12
|
+
*
|
|
13
|
+
* ## Background: Micro-Frontend / AEM Web Component Support
|
|
14
|
+
*
|
|
15
|
+
* This function was introduced to support complex hosting environments where React components
|
|
16
|
+
* are compiled into Web Components and embedded via systems like AEM (Adobe Experience Manager).
|
|
17
|
+
*
|
|
18
|
+
* In these setups:
|
|
19
|
+
* - React components become self-contained widgets, not full SPAs
|
|
20
|
+
* - Multiple independent micro-frontends may exist on a single page
|
|
21
|
+
* - Each micro-frontend has its own encapsulated React/VDOM render process
|
|
22
|
+
* - Web Components render sequentially based on DOM registration order
|
|
23
|
+
* - Shadow DOM is typically disabled, so elements are detectable across components
|
|
24
|
+
*
|
|
25
|
+
* ### The Problem
|
|
26
|
+
*
|
|
27
|
+
* The standard `<DSAriaLiveRegions />` placement guideline ("as close to `<body>` as possible")
|
|
28
|
+
* is impossible to follow when components can only be placed at the root of each Web Component
|
|
29
|
+
* wrapper, not the actual document body. This creates two failure modes:
|
|
30
|
+
*
|
|
31
|
+
* 1. **Missing live regions**: If no static HTML snippet exists and the component isn't rendered,
|
|
32
|
+
* dependent components (DSChipGroup, DSToast, etc.) throw errors.
|
|
33
|
+
* 2. **Duplicate live regions**: Multiple Web Components each rendering their own live regions
|
|
34
|
+
* creates invalid HTML (duplicate IDs) and unpredictable screen reader behavior.
|
|
35
|
+
*
|
|
36
|
+
* ### Why Placement Matters for Accessibility
|
|
37
|
+
*
|
|
38
|
+
* A mode that allows `DSAriaLiveRegions` to render inside arbitrary micro-frontend wrappers
|
|
39
|
+
* is risky for accessibility. Those wrappers can later become `aria-hidden`, `inert`, `hidden`,
|
|
40
|
+
* or be moved under a `<dialog>`, and at that point announcements can become intermittent or
|
|
41
|
+
* stop entirely across screen readers. This is exactly why the requirement to place live regions
|
|
42
|
+
* as close to `<body>` as possible exists.
|
|
43
|
+
*
|
|
44
|
+
* Additionally, treating duplicates as "warn and keep going" is not harmless. As soon as
|
|
45
|
+
* duplicate IDs exist, `getElementById()` effectively selects one instance based on document
|
|
46
|
+
* order. If that instance lives in a subtree that later becomes hidden, announcements will
|
|
47
|
+
* silently break even though "a live region exists somewhere" on the page.
|
|
48
|
+
*
|
|
49
|
+
* ### The Solution: `microFrontendMode`
|
|
50
|
+
*
|
|
51
|
+
* Instead of rendering where mounted (which could be inside problematic wrappers), this mode:
|
|
52
|
+
*
|
|
53
|
+
* 1. **Renders nothing locally** - The component returns `null`
|
|
54
|
+
* 2. **Injects directly under `document.body`** - Guarantees correct placement regardless of
|
|
55
|
+
* where the component is used in the React tree
|
|
56
|
+
* 3. **Is idempotent** - Whichever MFE instance runs first installs the body-level regions,
|
|
57
|
+
* all subsequent calls no-op safely
|
|
58
|
+
* 4. **Maintains strict validation** - True duplicates remain a hard error
|
|
59
|
+
*
|
|
60
|
+
* This provides rollout safety for MFEs and templates without compromising accessibility
|
|
61
|
+
* correctness. The exact render order doesn't matter as long as the logic is idempotent
|
|
62
|
+
* and synchronous.
|
|
63
|
+
*
|
|
64
|
+
* ### Recommended Integration Pattern
|
|
65
|
+
*
|
|
66
|
+
* 1. **Ideal**: Add static HTML live regions to the root `index.html` or AEM page template
|
|
67
|
+
* 2. **Fallback**: Use `<DSAriaLiveRegions microFrontendMode />` at the root of each
|
|
68
|
+
* micro-frontend as a self-healing fallback
|
|
69
|
+
*
|
|
70
|
+
* With this pattern:
|
|
71
|
+
* - If static HTML exists, all `microFrontendMode` instances no-op
|
|
72
|
+
* - If no static HTML exists, the first MFE to render installs the regions
|
|
73
|
+
* - Subsequent MFEs detect the existing regions and no-op
|
|
74
|
+
* - No duplicates, no missing regions, no placement issues
|
|
75
|
+
*/
|
|
76
|
+
export declare const ensureAriaLiveRegions: (srOnlyClassName: string) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Gets the alert live region element if present on the page and returns it.
|
|
79
|
+
* Throws an error with the component name if the element is not found.
|
|
80
|
+
*
|
|
81
|
+
* @param componentName - The component name for error messages if live region is missing
|
|
82
|
+
* @returns The alert live region HTMLElement
|
|
83
|
+
* @throws Error if the alert live region element is not found
|
|
84
|
+
*/
|
|
85
|
+
export declare const getAlertLiveRegionOrThrow: (componentName: string) => HTMLElement;
|
|
86
|
+
/**
|
|
87
|
+
* Gets the status live region element if present on the page and returns it.
|
|
88
|
+
* Throws an error with the component name if the element is not found.
|
|
89
|
+
*
|
|
90
|
+
* @param componentName - The component name for error messages if live region is missing
|
|
91
|
+
* @returns The status live region HTMLElement
|
|
92
|
+
* @throws Error if the status live region element is not found
|
|
93
|
+
*/
|
|
94
|
+
export declare const getStatusLiveRegionOrThrow: (componentName: string) => HTMLElement;
|
|
95
|
+
/**
|
|
96
|
+
* Sets a message to the alert live region (role="alert", aria-live="assertive").
|
|
97
|
+
* Use for urgent announcements that should interrupt the user (e.g., warnings, errors).
|
|
98
|
+
*
|
|
99
|
+
* @param message - The message to announce
|
|
100
|
+
* @param componentName - The component name for error messages if live region is missing
|
|
101
|
+
*/
|
|
102
|
+
export declare const setAriaAlertMessage: (message: string, componentName: string) => void;
|
|
103
|
+
/**
|
|
104
|
+
* Sets a message to the status live region (role="status", aria-live="polite").
|
|
105
|
+
* Use for non-urgent announcements that should wait for user pause (e.g., status updates, success messages).
|
|
106
|
+
* The message is automatically cleared after a short delay.
|
|
107
|
+
*
|
|
108
|
+
* @param message - The message to announce
|
|
109
|
+
* @param componentName - The component name for error messages if live region is missing
|
|
110
|
+
*/
|
|
111
|
+
export declare const setAriaStatusMessage: (message: string, componentName: string) => void;
|
|
@@ -14,7 +14,7 @@ export interface BreadcrumbLink {
|
|
|
14
14
|
export interface BreadcrumbProps extends React.HTMLAttributes<HTMLElement> {
|
|
15
15
|
/** ARIA attributes to ensure accessibility
|
|
16
16
|
*
|
|
17
|
-
* `{'aria-label'
|
|
17
|
+
* `{'aria-label'?: string;`
|
|
18
18
|
* `'aria-labelledby'?: string;}`
|
|
19
19
|
* */
|
|
20
20
|
aria: SelectedAriaAttributes<BreadcrumbAriaAttributes>;
|
|
@@ -6,7 +6,7 @@ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
6
6
|
/** Content within the button. */
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
/** ARIA attributes to enhance accessibility
|
|
9
|
-
* `{'aria-label'
|
|
9
|
+
* `{'aria-label'?: string;`
|
|
10
10
|
* `'aria-expanded'?: boolean | 'true' | 'false';`
|
|
11
11
|
* `'aria-pressed'?: boolean | 'true' | 'false' | 'mixed';`
|
|
12
12
|
* `'aria-haspopup'?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';}`
|
|
@@ -2,7 +2,6 @@ import { IconName } from '../../types';
|
|
|
2
2
|
import { ChipGroupProps } from './ChipGroup';
|
|
3
3
|
type ValidationProps = Pick<ChipGroupProps, 'chips' | 'id' | 'label'>;
|
|
4
4
|
export declare const validateChipGroupProps: ({ chips, id, label, }: ValidationProps) => void;
|
|
5
|
-
export declare const validateIsLiveRegionPresent: () => void;
|
|
6
5
|
export interface Chip {
|
|
7
6
|
/** Unique id for the Chip. */
|
|
8
7
|
id: string | number;
|
|
@@ -27,6 +26,9 @@ export type ChipGroupAriaTranslations = typeof DS_CHIP_GROUP_TRANSLATIONS_EN;
|
|
|
27
26
|
export declare const DS_CHIP_GROUP_TRANSLATIONS_EN: {
|
|
28
27
|
disabled: string;
|
|
29
28
|
selected: string;
|
|
29
|
+
notSelected: string;
|
|
30
|
+
removed: string;
|
|
31
|
+
remaining: string;
|
|
30
32
|
selectChip: string;
|
|
31
33
|
unselectAction: string;
|
|
32
34
|
selectAction: string;
|
|
@@ -37,22 +39,19 @@ export declare const DS_CHIP_GROUP_TRANSLATIONS_EN: {
|
|
|
37
39
|
tooltipRemovable: string;
|
|
38
40
|
tooltipDeactivate: string;
|
|
39
41
|
tooltipActivate: string;
|
|
42
|
+
item_one: string;
|
|
43
|
+
item_other: string;
|
|
44
|
+
countSelected: string;
|
|
45
|
+
countRemaining: string;
|
|
40
46
|
};
|
|
41
|
-
export declare const DS_CHIP_GROUP_TRANSLATIONS_DE:
|
|
42
|
-
disabled: string;
|
|
43
|
-
selected: string;
|
|
44
|
-
selectChip: string;
|
|
45
|
-
unselectAction: string;
|
|
46
|
-
selectAction: string;
|
|
47
|
-
addToSelection: string;
|
|
48
|
-
removeFromSelection: string;
|
|
49
|
-
removeChip: string;
|
|
50
|
-
tooltipDisabled: string;
|
|
51
|
-
tooltipRemovable: string;
|
|
52
|
-
tooltipDeactivate: string;
|
|
53
|
-
tooltipActivate: string;
|
|
54
|
-
};
|
|
47
|
+
export declare const DS_CHIP_GROUP_TRANSLATIONS_DE: ChipGroupAriaTranslations;
|
|
55
48
|
export declare const DS_CHIP_GROUP_TRANSLATIONS: Record<ChipGroupLanguage, ChipGroupAriaTranslations>;
|
|
56
49
|
export declare const getChipAriaLabel: (t: (key: keyof ChipGroupAriaTranslations, replacements?: string[]) => string, label: string, disabled: boolean | undefined, isSelected: boolean | undefined, selectionMode: ChipGroupSelectionMode, isRemovable: boolean | undefined) => string;
|
|
57
50
|
export declare const getChipTooltip: (t: (key: keyof ChipGroupAriaTranslations, replacements?: string[]) => string, disabled: boolean | undefined, isSelected: boolean | undefined, isRemovable: boolean | undefined) => string;
|
|
51
|
+
/**
|
|
52
|
+
* Helper to get the correct plural form for item count.
|
|
53
|
+
* @param count - The number of items
|
|
54
|
+
* @returns The appropriate plural form (item_one or item_other)
|
|
55
|
+
*/
|
|
56
|
+
export declare const getItemPlural: (t: (key: keyof ChipGroupAriaTranslations, replacements?: string[]) => string, count: number) => string;
|
|
58
57
|
export {};
|
|
@@ -3,7 +3,7 @@ import { IconName, SelectedAriaAttributes, Theme } from '../../types';
|
|
|
3
3
|
import { IconAriaAttribute, IconSize } from './Icon.utils';
|
|
4
4
|
export interface IconProps {
|
|
5
5
|
/** ARIA attributes to enhance accessibility.
|
|
6
|
-
* `{'aria-label'
|
|
6
|
+
* `{'aria-label'?: string;}`
|
|
7
7
|
*/
|
|
8
8
|
aria?: SelectedAriaAttributes<IconAriaAttribute>;
|
|
9
9
|
/** Name of the icon to display.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { FileWithUploadMeta } from '../InputFile';
|
|
3
|
+
import { InputFileTranslations } from '../InputFile.utils';
|
|
4
|
+
import { ProgressIndicatorVariant } from './ProgressIndicator/ProgressIndicator';
|
|
5
|
+
export interface FileListProps {
|
|
6
|
+
/**
|
|
7
|
+
* List of files to display in the file list, each with upload metadata.
|
|
8
|
+
*/
|
|
9
|
+
files: FileWithUploadMeta[];
|
|
10
|
+
onRemoveFile: (index: number) => void;
|
|
11
|
+
t: (key: keyof InputFileTranslations, replacements?: string[]) => string;
|
|
12
|
+
showProgress?: ProgressIndicatorVariant;
|
|
13
|
+
}
|
|
14
|
+
export declare const FileList: ({ files, onRemoveFile, t, showProgress, }: FileListProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -10,9 +10,3 @@
|
|
|
10
10
|
* formatFileSize(10485760); // "10 mb"
|
|
11
11
|
*/
|
|
12
12
|
export declare const formatFileSize: (fileSizeInBytes: number) => string;
|
|
13
|
-
export declare const FILE_ICON_EXTENSIONS: {
|
|
14
|
-
nonDisplayableImages: string[];
|
|
15
|
-
documents: string[];
|
|
16
|
-
videos: string[];
|
|
17
|
-
archives: string[];
|
|
18
|
-
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { InputFileTranslations } from '../../InputFile.utils';
|
|
3
|
+
export interface FilePreviewProps {
|
|
4
|
+
/**
|
|
5
|
+
* The file object to preview. Used to determine file type and generate preview.
|
|
6
|
+
*/
|
|
7
|
+
file: File;
|
|
8
|
+
t: (key: keyof InputFileTranslations, replacements?: string[]) => string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Renders a preview for a file based on its type and extension.
|
|
12
|
+
* For displayable images, shows an actual image preview with error fallback.
|
|
13
|
+
* For other file types, shows an appropriate icon.
|
|
14
|
+
*/
|
|
15
|
+
export declare const FilePreview: ({ file, t }: FilePreviewProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IconProps } from '../../../Icon/Icon';
|
|
2
|
+
export declare const FILE_ICON_EXTENSIONS: {
|
|
3
|
+
nonDisplayableImages: string[];
|
|
4
|
+
documents: string[];
|
|
5
|
+
videos: string[];
|
|
6
|
+
archives: string[];
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Determines the appropriate icon name for a file based on its type and extension.
|
|
10
|
+
*/
|
|
11
|
+
export declare const getFileIconName: (file: File, fileExtension: string) => IconProps["name"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
import { InputFileTranslations } from '../../InputFile.utils';
|
|
3
|
+
export type ProgressIndicatorStatus = 'uploading' | 'error';
|
|
4
|
+
export type ProgressIndicatorVariant = 'bar' | 'text';
|
|
5
|
+
export interface ProgressIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
id: string;
|
|
7
|
+
fileName: string;
|
|
8
|
+
/**
|
|
9
|
+
* Upload progress percentage; 'indeterminate' for unknown progress
|
|
10
|
+
* or a number between 0 and 100
|
|
11
|
+
* */
|
|
12
|
+
percent: 'indeterminate' | number;
|
|
13
|
+
/**
|
|
14
|
+
* Current status of the progress indicator 'uploading' or 'error'.
|
|
15
|
+
* Success does not display a progress bar / text but a SystemFeedbackMessage.
|
|
16
|
+
* */
|
|
17
|
+
progressStatus: ProgressIndicatorStatus;
|
|
18
|
+
/**
|
|
19
|
+
* Variant of the progress indicator to display: 'bar' or 'text'
|
|
20
|
+
*/
|
|
21
|
+
variant: ProgressIndicatorVariant;
|
|
22
|
+
t: (key: keyof InputFileTranslations, replacements?: string[]) => string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Accessible progress indicator for file uploads.
|
|
26
|
+
*
|
|
27
|
+
* A11y decisions:
|
|
28
|
+
* - The root element carries role="progressbar" per WAI-ARIA Authoring Practices.
|
|
29
|
+
* - We assume the `percent` prop is always a valid integer between 0 and 100 (validated upstream), so no clamping here.
|
|
30
|
+
* - `aria-valuemin` and `aria-valuemax` are omitted; defaults (0 and 100) are implicit for a percentage UI.
|
|
31
|
+
* - `aria-valuenow` reflects the provided percent value.
|
|
32
|
+
* - Visual percentage text remains for sighted users; screen readers rely on `aria-label` and `aria-valuenow`.
|
|
33
|
+
*/
|
|
34
|
+
export declare const ProgressIndicator: ({ className, fileName, id, percent, progressStatus, variant, t, }: ProgressIndicatorProps) => JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|