@stihl-design-system/components 1.0.0-RC.2 → 1.0.0-RC.4
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/README.md +1 -1
- package/arialiveregions.49Zyf6mj.js +27 -0
- package/arialiveregions.d.ts +1 -0
- package/assets/CustomReactSelect.B0rJLjN0.css +1 -0
- package/assets/Fieldset.xazpUXJX.css +1 -0
- package/assets/InputPassword.C3Uyj7oA.css +1 -0
- package/assets/InputSearch.tL3e9-Ob.css +1 -0
- package/assets/InputStepper.paPJix5A.css +1 -0
- package/assets/Notification.CCCbfXEz.css +1 -0
- package/assets/RadioGroup.Ur8Ro-XL.css +1 -0
- package/assets/Select.D2qBxaHP.css +1 -0
- package/assets/Textarea.BKbocznb.css +1 -0
- package/assets/Toast.CAP_EwDX.css +1 -0
- package/assets/arialiveregions.VnhjP8Gr.css +1 -0
- package/assets/asterisk.C-o6rbGQ.css +1 -0
- package/assets/button.BuIpnG-S.css +1 -0
- package/assets/buttonround.C3ph5Yyu.css +1 -0
- package/assets/checkbox.BsFEWfQe.css +1 -0
- package/assets/dialog.BGK3mgk7.css +1 -0
- package/assets/heading.CGFucb-C.css +1 -0
- package/assets/input.BcP5kkZ2.css +1 -0
- package/assets/link.DQy_OhwC.css +1 -0
- package/assets/linkstandalone.Dh6bE5Fb.css +1 -0
- package/assets/radio.CSHQGdpr.css +1 -0
- package/assets/switch.sqve8ApJ.css +1 -0
- package/assets/title.CE0Dm7PI.css +1 -0
- package/asterisk.DU8THnoC.js +8 -0
- package/button.DX_nxoJC.js +135 -0
- package/buttonround.CXsBk9nL.js +118 -0
- package/{checkbox.Bx5D_GAe.js → checkbox.B43oeMeC.js} +30 -30
- package/checkboxgroup.C7aCjYds.js +9 -0
- package/chunks/AriaLiveRegions.utils.DzWI5KCU.js +31 -0
- package/{checkboxgroup.gQwSHy4i.js → chunks/CheckboxGroup.CS6Q_TeZ.js} +27 -20
- package/chunks/{CustomReactSelect.Pvkkof1f.js → CustomReactSelect.DtmbYZUf.js} +516 -510
- package/chunks/Fieldset.BokeZzG5.js +99 -0
- package/chunks/Icon.9gDIp6p4.js +217 -0
- package/chunks/{Input.utils.Bly6ZzLI.js → Input.utils.AKWCNkpA.js} +12 -8
- package/chunks/InputPassword.jpUCijp7.js +140 -0
- package/chunks/InputSearch.BmOtAZcR.js +190 -0
- package/chunks/InputStepper.DTKjUL4U.js +291 -0
- package/chunks/Notification.CUPOlHAX.js +93 -0
- package/{radiogroup.7ptQiohb.js → chunks/RadioGroup.DpwnVv7u.js} +37 -29
- package/chunks/RadioGroup.module.bi3leRes.js +11 -0
- package/chunks/Select.DkDZo0ky.js +193 -0
- package/chunks/Textarea.C938p79X.js +195 -0
- package/chunks/Toast.CLYrwQVO.js +89 -0
- package/chunks/{circle-info-colored.DLY6BTL4.js → circle-info-colored.D2pp54gf.js} +3 -3
- package/chunks/whatsapp.CPpu-7Nn.js +10 -0
- package/{combobox.BOJ7aq_B.js → combobox.BaSkiD6f.js} +7 -7
- package/components/AriaLiveRegions/AriaLiveRegions.d.ts +4 -0
- package/components/AriaLiveRegions/AriaLiveRegions.utils.d.ts +5 -0
- package/components/AriaLiveRegions/AriaLiveRegions.utils.test.d.ts +1 -0
- package/components/Checkbox/Checkbox.d.ts +1 -1
- package/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/components/CheckboxGroup/CheckboxGroup.utils.d.ts +1 -1
- package/components/Dialog/Dialog.d.ts +11 -0
- package/components/Dialog/Dialog.utils.d.ts +0 -0
- package/components/Fieldset/Fieldset.d.ts +1 -1
- package/components/Fieldset/Fieldset.utils.d.ts +1 -1
- package/components/Heading/Heading.utils.d.ts +1 -1
- package/components/Logo/Logo.d.ts +4 -2
- package/components/Logo/Logo.utils.d.ts +1 -0
- package/components/Notification/Notification.d.ts +26 -0
- package/components/Notification/Notification.test.d.ts +1 -0
- package/components/Notification/Notification.utils.d.ts +5 -0
- package/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/components/RadioGroup/RadioGroup.utils.d.ts +1 -1
- package/components/Toast/Toast.d.ts +21 -0
- package/components/Toast/Toast.utils.d.ts +9 -0
- package/components/Toast/ToastManager.d.ts +6 -0
- package/components/Toast/ToastManager.test.d.ts +1 -0
- package/components/Toast/ToastManager.utils.d.ts +2 -0
- package/components/Toast/ToastManager.utils.test.d.ts +1 -0
- package/customreactselect.LTbjaBN2.js +13 -0
- package/dialog.BkXwcbUh.js +45 -0
- package/dialog.d.ts +1 -0
- package/fieldset.BXOWK-B-.js +11 -0
- package/{floatingactionbutton.BtQVIj6W.js → floatingactionbutton.-nDRRiXY.js} +9 -9
- package/heading.DqGbFfj2.js +50 -0
- package/icon.Cpp_9L1I.js +8 -0
- package/index.d.ts +24 -0
- package/index.es.js +138 -45
- package/input.BM6tyRUm.js +236 -0
- package/inputpassword.DUxH1K_k.js +12 -0
- package/inputsearch.B-vePHle.js +13 -0
- package/inputstepper.C2ypADPI.js +13 -0
- package/link.B4XZoLDj.js +115 -0
- package/linkstandalone.BSfd95Pd.js +79 -0
- package/{logo.DXWgPUY4.js → logo.C_oJ8isW.js} +25 -24
- package/notification.CxxAOdNV.js +9 -0
- package/notification.d.ts +1 -0
- package/{optioncheckbox.CYikfEsE.js → optioncheckbox.CUV1MQhh.js} +3 -3
- package/package.json +4 -4
- package/radio.Bhu9OUY-.js +79 -0
- package/radiogroup.CMJ1b38q.js +11 -0
- package/select.DFJK2mHF.js +12 -0
- package/{spinner.CSzQEBx2.js → spinner.BskX4ovu.js} +1 -1
- package/styles/scss/_index.scss +1 -0
- package/styles/scss/lib/_animation.scss +18 -4
- package/styles/scss/lib/_grid-extended.scss +2 -2
- package/styles/scss/lib/_grid-sidebar-sidebar.scss +4 -2
- package/styles/scss/lib/_grid-sidebar.scss +6 -6
- package/styles/scss/lib/_heading.scss +14 -1
- package/styles/scss/lib/_link.scss +10 -9
- package/styles/scss/lib/_shadow.scss +10 -0
- package/styles/scss/lib/_text.scss +4 -0
- package/styles/scss/lib/_theme.scss +7 -5
- package/switch.Bx2tDKx0.js +65 -0
- package/{systemfeedback.rBgdiL5T.js → systemfeedback.4Hkfigi-.js} +1 -1
- package/textarea.DPy3TJJf.js +12 -0
- package/title.icX0VDiO.js +36 -0
- package/toast.C-Yg5EoE.js +10 -0
- package/toast.d.ts +1 -0
- package/toastmanager.DQ_-eTrx.js +96 -0
- package/toastmanager.d.ts +1 -0
- package/types/icon-types.d.ts +1 -1
- package/utils/vitest.setup.d.ts +2 -0
- package/assets/CustomReactSelect.bVnR5yBP.css +0 -1
- package/assets/RadioGroup.SF2fv4CL.css +0 -1
- package/assets/asterisk.Bz7RZnKb.css +0 -1
- package/assets/button.C6ZbQtZ-.css +0 -1
- package/assets/buttonround.CjJUeMND.css +0 -1
- package/assets/checkbox.Bbc6PYDK.css +0 -1
- package/assets/fieldset.DTFs_koU.css +0 -1
- package/assets/heading.5HpYs7wS.css +0 -1
- package/assets/input.GpXQJqEO.css +0 -1
- package/assets/inputpassword.B9J1hCcj.css +0 -1
- package/assets/inputsearch.BY0BGFPK.css +0 -1
- package/assets/inputstepper.B0oC1URa.css +0 -1
- package/assets/link.Di4qXro5.css +0 -1
- package/assets/linkstandalone.239FeO2E.css +0 -1
- package/assets/radio.pqc9u_wx.css +0 -1
- package/assets/select.DLOQ6wu0.css +0 -1
- package/assets/switch.DVlaePGM.css +0 -1
- package/assets/textarea.BNOpd7Nf.css +0 -1
- package/assets/title.1dq1eWy9.css +0 -1
- package/asterisk.BlYjsfkN.js +0 -8
- package/button.Di5XtChf.js +0 -135
- package/buttonround._w4KDbHE.js +0 -118
- package/chunks/RadioGroup.module.B35YQcsb.js +0 -11
- package/customreactselect.DPHXAssl.js +0 -13
- package/fieldset.yE6WV6Ls.js +0 -98
- package/heading.C6k7Gakb.js +0 -44
- package/icon.CmAhxgHK.js +0 -215
- package/input.vP5xcwzV.js +0 -236
- package/inputpassword.BiQ8ORmn.js +0 -139
- package/inputsearch.BA9N3RRc.js +0 -188
- package/inputstepper.Cyxeg2Cj.js +0 -290
- package/link.BoSdsZHj.js +0 -115
- package/linkstandalone.BoN7nARO.js +0 -79
- package/radio.DTO5-Yzf.js +0 -79
- package/select.Dx80W7cW.js +0 -190
- package/switch.BwGtQdnx.js +0 -65
- package/textarea.C8tp1ciU.js +0 -193
- package/title.BT-uIobN.js +0 -36
- /package/assets/{icon.CB-KQmw4.css → Icon.CB-KQmw4.css} +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import '../assets/RadioGroup.Ur8Ro-XL.css';const o = "_root_1c87m_63", t = "_root--horizontal_1c87m_71", r = "_root--invalid_1c87m_74", n = {
|
|
3
|
+
root: o,
|
|
4
|
+
"root--horizontal": "_root--horizontal_1c87m_71",
|
|
5
|
+
rootHorizontal: t,
|
|
6
|
+
"root--invalid": "_root--invalid_1c87m_74",
|
|
7
|
+
rootInvalid: r
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
n as s
|
|
11
|
+
};
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as t } from "./jsx-runtime.C-kxDJ4g.js";
|
|
3
|
+
import { c as _ } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { useRef as $, useState as C, useEffect as W } from "react";
|
|
5
|
+
import { u as F } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
|
+
import { Asterisk as M } from "../asterisk.DU8THnoC.js";
|
|
7
|
+
import { D as O } from "./Icon.9gDIp6p4.js";
|
|
8
|
+
import { DSSystemFeedback as T } from "../systemfeedback.4Hkfigi-.js";
|
|
9
|
+
import { g as f } from "./helpers.B1JT5ShS.js";
|
|
10
|
+
import '../assets/Select.D2qBxaHP.css';const V = "_root_quxca_187", Z = "_hint_quxca_195", J = "_label_quxca_195", K = "_wrapper_quxca_199", Q = "_affix_quxca_205", U = "_affix--small_quxca_225", X = "_affix--disabled_quxca_237", Y = "_prefix_quxca_240", z = "_affix--readonly_quxca_243", G = "_suffix_quxca_253", ee = "_action-button_quxca_260", ae = "_label--hidden_quxca_277", te = "_feedback_quxca_304", se = "_select-wrapper_quxca_309", ce = "_select_quxca_309", ne = "_select--invalid_quxca_428", le = "_select--small_quxca_435", oe = "_input--has-leading-icon_quxca_481", ie = "_input--has-action-button_quxca_484", re = "_input--has-second-action-button_quxca_487", _e = "_select--has-leading-icon_quxca_490", ue = "_select--has-action-button_quxca_493", de = "_select--has-second-action-button_quxca_496", xe = "_select--has-affix_quxca_499", fe = "_select--is-ready_quxca_511", he = "_select--placeholder_quxca_523", pe = "_chevron_quxca_532", be = "_chevron--small_quxca_536", me = "_chevron--disabled_quxca_539", e = {
|
|
11
|
+
root: V,
|
|
12
|
+
hint: Z,
|
|
13
|
+
label: J,
|
|
14
|
+
wrapper: K,
|
|
15
|
+
affix: Q,
|
|
16
|
+
"affix--small": "_affix--small_quxca_225",
|
|
17
|
+
affixSmall: U,
|
|
18
|
+
"affix--disabled": "_affix--disabled_quxca_237",
|
|
19
|
+
affixDisabled: X,
|
|
20
|
+
prefix: Y,
|
|
21
|
+
"affix--readonly": "_affix--readonly_quxca_243",
|
|
22
|
+
affixReadonly: z,
|
|
23
|
+
suffix: G,
|
|
24
|
+
"action-button": "_action-button_quxca_260",
|
|
25
|
+
actionButton: ee,
|
|
26
|
+
"label--hidden": "_label--hidden_quxca_277",
|
|
27
|
+
labelHidden: ae,
|
|
28
|
+
feedback: te,
|
|
29
|
+
"select-wrapper": "_select-wrapper_quxca_309",
|
|
30
|
+
selectWrapper: se,
|
|
31
|
+
select: ce,
|
|
32
|
+
"select--invalid": "_select--invalid_quxca_428",
|
|
33
|
+
selectInvalid: ne,
|
|
34
|
+
"select--small": "_select--small_quxca_435",
|
|
35
|
+
selectSmall: le,
|
|
36
|
+
"input--has-leading-icon": "_input--has-leading-icon_quxca_481",
|
|
37
|
+
inputHasLeadingIcon: oe,
|
|
38
|
+
"input--has-action-button": "_input--has-action-button_quxca_484",
|
|
39
|
+
inputHasActionButton: ie,
|
|
40
|
+
"input--has-second-action-button": "_input--has-second-action-button_quxca_487",
|
|
41
|
+
inputHasSecondActionButton: re,
|
|
42
|
+
"select--has-leading-icon": "_select--has-leading-icon_quxca_490",
|
|
43
|
+
selectHasLeadingIcon: _e,
|
|
44
|
+
"select--has-action-button": "_select--has-action-button_quxca_493",
|
|
45
|
+
selectHasActionButton: ue,
|
|
46
|
+
"select--has-second-action-button": "_select--has-second-action-button_quxca_496",
|
|
47
|
+
selectHasSecondActionButton: de,
|
|
48
|
+
"select--has-affix": "_select--has-affix_quxca_499",
|
|
49
|
+
selectHasAffix: xe,
|
|
50
|
+
"select--is-ready": "_select--is-ready_quxca_511",
|
|
51
|
+
selectIsReady: fe,
|
|
52
|
+
"select--placeholder": "_select--placeholder_quxca_523",
|
|
53
|
+
selectPlaceholder: he,
|
|
54
|
+
chevron: pe,
|
|
55
|
+
"chevron--small": "_chevron--small_quxca_536",
|
|
56
|
+
chevronSmall: be,
|
|
57
|
+
"chevron--disabled": "_chevron--disabled_quxca_539",
|
|
58
|
+
chevronDisabled: me
|
|
59
|
+
}, Ae = ["medium", "small"], qe = ({
|
|
60
|
+
id: a,
|
|
61
|
+
label: n,
|
|
62
|
+
options: c
|
|
63
|
+
}) => {
|
|
64
|
+
if (!a)
|
|
65
|
+
throw new Error(
|
|
66
|
+
f(
|
|
67
|
+
"DSSelect",
|
|
68
|
+
'A unique "id" prop is required. Please add an unique "id" prop to the DSSelect component.'
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
if (!n)
|
|
72
|
+
throw new Error(
|
|
73
|
+
f(
|
|
74
|
+
"DSSelect",
|
|
75
|
+
`A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSSelect component. If you don't want to display a label, set hideLabel={true}.`
|
|
76
|
+
)
|
|
77
|
+
);
|
|
78
|
+
if (!c || c.length === 0)
|
|
79
|
+
throw new Error(
|
|
80
|
+
f(
|
|
81
|
+
"DSSelect",
|
|
82
|
+
'Options are always required. Please add an "options" prop to the DSSelect component.'
|
|
83
|
+
)
|
|
84
|
+
);
|
|
85
|
+
}, ve = (a, n, c) => a === "" || n !== void 0 && n !== "" ? !1 : !(c !== void 0 && c !== ""), Be = ({
|
|
86
|
+
id: a,
|
|
87
|
+
label: n,
|
|
88
|
+
options: c,
|
|
89
|
+
className: D,
|
|
90
|
+
defaultValue: h,
|
|
91
|
+
disabled: p = !1,
|
|
92
|
+
hideLabel: H = !1,
|
|
93
|
+
hint: u,
|
|
94
|
+
invalid: r = !1,
|
|
95
|
+
placeholder: d = "Select",
|
|
96
|
+
required: b = !1,
|
|
97
|
+
size: m = "medium",
|
|
98
|
+
systemFeedback: x,
|
|
99
|
+
value: q,
|
|
100
|
+
...I
|
|
101
|
+
}) => {
|
|
102
|
+
process.env.NODE_ENV !== "production" && qe({
|
|
103
|
+
id: a,
|
|
104
|
+
label: n,
|
|
105
|
+
options: c
|
|
106
|
+
});
|
|
107
|
+
const i = $(null), [w, j] = C(
|
|
108
|
+
ve(d, h, q)
|
|
109
|
+
);
|
|
110
|
+
W(() => {
|
|
111
|
+
if (!i.current)
|
|
112
|
+
return;
|
|
113
|
+
const l = () => {
|
|
114
|
+
if (!i.current)
|
|
115
|
+
return;
|
|
116
|
+
const o = i.current.value;
|
|
117
|
+
j(o === "");
|
|
118
|
+
}, s = i.current;
|
|
119
|
+
return s.addEventListener("change", l), () => {
|
|
120
|
+
s.removeEventListener("change", l);
|
|
121
|
+
};
|
|
122
|
+
}, []);
|
|
123
|
+
const A = F(H), v = `${a}-label`, S = `${a}-feedback`, g = `${a}-hint`, B = u ? ` ${g}` : "", E = (l) => [
|
|
124
|
+
d && /* @__PURE__ */ t.jsx("option", { value: "", children: d }, `${a}-hidden-option-disabled-placeholder`),
|
|
125
|
+
...l.map((s) => {
|
|
126
|
+
if ("options" in s) {
|
|
127
|
+
const { label: o, options: R } = s;
|
|
128
|
+
return /* @__PURE__ */ t.jsx("optgroup", { label: o, children: R.map(y) }, o);
|
|
129
|
+
} else
|
|
130
|
+
return y(s);
|
|
131
|
+
})
|
|
132
|
+
], y = ({ label: l, value: s, isDisabled: o }) => /* @__PURE__ */ t.jsx("option", { value: s, disabled: o, children: l }, s), L = _(e.root, D), N = _(e.select, {
|
|
133
|
+
[e.selectSmall]: m === "small",
|
|
134
|
+
[e.selectInvalid]: r,
|
|
135
|
+
[e.selectPlaceholder]: w
|
|
136
|
+
}), P = _(e.label, {
|
|
137
|
+
// hide label only visually to keep them available for assistive technologies
|
|
138
|
+
[e.labelHidden]: A
|
|
139
|
+
}), k = _(e.chevron, {
|
|
140
|
+
[e.chevronSmall]: m === "small",
|
|
141
|
+
[e.chevronDisabled]: p
|
|
142
|
+
});
|
|
143
|
+
return /* @__PURE__ */ t.jsxs("div", { className: L, children: [
|
|
144
|
+
/* @__PURE__ */ t.jsxs("label", { className: P, id: v, htmlFor: a, children: [
|
|
145
|
+
n,
|
|
146
|
+
b && /* @__PURE__ */ t.jsx(M, {})
|
|
147
|
+
] }),
|
|
148
|
+
u && /* @__PURE__ */ t.jsx("div", { className: e.hint, id: g, children: u }),
|
|
149
|
+
r && x && /* @__PURE__ */ t.jsx(
|
|
150
|
+
T,
|
|
151
|
+
{
|
|
152
|
+
className: e.feedback,
|
|
153
|
+
message: x,
|
|
154
|
+
type: "invalid",
|
|
155
|
+
id: S,
|
|
156
|
+
"aria-live": "assertive"
|
|
157
|
+
}
|
|
158
|
+
),
|
|
159
|
+
/* @__PURE__ */ t.jsxs("div", { className: e.selectWrapper, children: [
|
|
160
|
+
/* @__PURE__ */ t.jsx(
|
|
161
|
+
"select",
|
|
162
|
+
{
|
|
163
|
+
...I,
|
|
164
|
+
id: a,
|
|
165
|
+
ref: i,
|
|
166
|
+
className: N,
|
|
167
|
+
"aria-labelledby": `${v}${B}`,
|
|
168
|
+
"aria-describedby": r && x ? S : void 0,
|
|
169
|
+
"aria-invalid": r,
|
|
170
|
+
defaultValue: h,
|
|
171
|
+
value: q,
|
|
172
|
+
disabled: p,
|
|
173
|
+
required: b,
|
|
174
|
+
children: E(c)
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
/* @__PURE__ */ t.jsx(
|
|
178
|
+
O,
|
|
179
|
+
{
|
|
180
|
+
name: "chevron-down",
|
|
181
|
+
className: k,
|
|
182
|
+
"aria-hidden": "true"
|
|
183
|
+
}
|
|
184
|
+
)
|
|
185
|
+
] })
|
|
186
|
+
] });
|
|
187
|
+
};
|
|
188
|
+
export {
|
|
189
|
+
Be as D,
|
|
190
|
+
Ae as S,
|
|
191
|
+
ve as g,
|
|
192
|
+
qe as v
|
|
193
|
+
};
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as n } from "./jsx-runtime.C-kxDJ4g.js";
|
|
3
|
+
import { c as S } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { useState as c, useRef as le, useEffect as x } from "react";
|
|
5
|
+
import { u as oe, h as se } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
|
+
import { g as H, p as V } from "./helpers.B1JT5ShS.js";
|
|
7
|
+
import { Asterisk as ie } from "../asterisk.DU8THnoC.js";
|
|
8
|
+
import { DSSystemFeedback as re } from "../systemfeedback.4Hkfigi-.js";
|
|
9
|
+
import '../assets/Textarea.BKbocznb.css';const ce = "_textarea_1elbe_187", de = "_textarea--invalid_1elbe_297", _e = "_textarea--small_1elbe_304", ue = "_textarea--resize-auto_1elbe_316", fe = "_root_1elbe_326", be = "_hint_1elbe_334", xe = "_label_1elbe_334", me = "_affix_1elbe_338", he = "_affix--small_1elbe_358", pe = "_affix--disabled_1elbe_370", ve = "_prefix_1elbe_373", ge = "_affix--readonly_1elbe_376", Se = "_suffix_1elbe_386", Ie = "_leading-icon_1elbe_393", Ce = "_leading-icon--small_1elbe_405", ye = "_leading-icon--disabled_1elbe_408", Ae = "_action-button_1elbe_417", De = "_label--hidden_1elbe_434", je = "_feedback_1elbe_461", we = "_char-count_1elbe_466", Re = "_char-count-announcer_1elbe_481", t = {
|
|
10
|
+
textarea: ce,
|
|
11
|
+
"textarea--invalid": "_textarea--invalid_1elbe_297",
|
|
12
|
+
textareaInvalid: de,
|
|
13
|
+
"textarea--small": "_textarea--small_1elbe_304",
|
|
14
|
+
textareaSmall: _e,
|
|
15
|
+
"textarea--resize-auto": "_textarea--resize-auto_1elbe_316",
|
|
16
|
+
textareaResizeAuto: ue,
|
|
17
|
+
root: fe,
|
|
18
|
+
hint: be,
|
|
19
|
+
label: xe,
|
|
20
|
+
affix: me,
|
|
21
|
+
"affix--small": "_affix--small_1elbe_358",
|
|
22
|
+
affixSmall: he,
|
|
23
|
+
"affix--disabled": "_affix--disabled_1elbe_370",
|
|
24
|
+
affixDisabled: pe,
|
|
25
|
+
prefix: ve,
|
|
26
|
+
"affix--readonly": "_affix--readonly_1elbe_376",
|
|
27
|
+
affixReadonly: ge,
|
|
28
|
+
suffix: Se,
|
|
29
|
+
"leading-icon": "_leading-icon_1elbe_393",
|
|
30
|
+
leadingIcon: Ie,
|
|
31
|
+
"leading-icon--small": "_leading-icon--small_1elbe_405",
|
|
32
|
+
leadingIconSmall: Ce,
|
|
33
|
+
"leading-icon--disabled": "_leading-icon--disabled_1elbe_408",
|
|
34
|
+
leadingIconDisabled: ye,
|
|
35
|
+
"action-button": "_action-button_1elbe_417",
|
|
36
|
+
actionButton: Ae,
|
|
37
|
+
"label--hidden": "_label--hidden_1elbe_434",
|
|
38
|
+
labelHidden: De,
|
|
39
|
+
feedback: je,
|
|
40
|
+
"char-count": "_char-count_1elbe_466",
|
|
41
|
+
charCount: we,
|
|
42
|
+
"char-count-announcer": "_char-count-announcer_1elbe_481",
|
|
43
|
+
charCountAnnouncer: Re
|
|
44
|
+
}, ze = ["medium", "small"], Te = ({ id: l, label: _ }) => {
|
|
45
|
+
if (!l)
|
|
46
|
+
throw new Error(
|
|
47
|
+
H(
|
|
48
|
+
"DSTextarea",
|
|
49
|
+
'A unique "id" prop is required. Please add an unique "id" prop to the DSTextarea component.'
|
|
50
|
+
)
|
|
51
|
+
);
|
|
52
|
+
if (!_)
|
|
53
|
+
throw new Error(
|
|
54
|
+
H(
|
|
55
|
+
"DSTextarea",
|
|
56
|
+
`A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSTextarea component. If you don't want to display a label, set hideLabel={true}.`
|
|
57
|
+
)
|
|
58
|
+
);
|
|
59
|
+
}, Pe = ({
|
|
60
|
+
id: l,
|
|
61
|
+
label: _,
|
|
62
|
+
charsLimitText: z = "Character limit reached",
|
|
63
|
+
charsRemainingText: P = "Characters remaining:",
|
|
64
|
+
className: q,
|
|
65
|
+
defaultValue: M,
|
|
66
|
+
disabled: O = !1,
|
|
67
|
+
hint: m,
|
|
68
|
+
hideLabel: F = !1,
|
|
69
|
+
invalid: o = !1,
|
|
70
|
+
maxLength: e,
|
|
71
|
+
readonly: I = !1,
|
|
72
|
+
required: C = !1,
|
|
73
|
+
resize: u = "vertical",
|
|
74
|
+
size: W = "medium",
|
|
75
|
+
systemFeedback: i,
|
|
76
|
+
value: h,
|
|
77
|
+
wrapperClassName: X,
|
|
78
|
+
onChange: y,
|
|
79
|
+
onInput: A,
|
|
80
|
+
...Z
|
|
81
|
+
}) => {
|
|
82
|
+
process.env.NODE_ENV !== "production" && Te({
|
|
83
|
+
id: l,
|
|
84
|
+
label: _
|
|
85
|
+
});
|
|
86
|
+
const [G, D] = c(M || ""), [r, j] = c(0), [J, w] = c(0), [K, R] = c("off"), [T, p] = c(i), [v, g] = c(o), E = h !== void 0, f = E ? h : G, s = le(null), Q = oe(F);
|
|
87
|
+
x(() => {
|
|
88
|
+
if (!e || e <= 0)
|
|
89
|
+
return;
|
|
90
|
+
r >= e * 0.8 ? R("polite") : R("off");
|
|
91
|
+
const a = setTimeout(() => {
|
|
92
|
+
w(e - r || 0);
|
|
93
|
+
}, 1e3);
|
|
94
|
+
return () => clearTimeout(a);
|
|
95
|
+
}, [r]), x(() => {
|
|
96
|
+
D(f || ""), d(), e && e > 0 && (j(f.toString().length || 0), w(e - f.toString().length || 0));
|
|
97
|
+
}, [h]), x(() => {
|
|
98
|
+
o && i ? (p(i), g(o)) : !o && e && e >= 0 && r >= e ? (g(!0), p(z)) : (p(i), g(o));
|
|
99
|
+
}, [o, v, i, r]), x(() => {
|
|
100
|
+
if (se && u === "auto")
|
|
101
|
+
return d(), window.addEventListener("resize", d), () => window.removeEventListener("resize", d);
|
|
102
|
+
}, [u, s.current]);
|
|
103
|
+
const U = S(t.root, X), Y = S(t.textarea, q, {
|
|
104
|
+
// small textarea
|
|
105
|
+
[t.textareaSmall]: W === "small",
|
|
106
|
+
// invalid state
|
|
107
|
+
[t.textareaInvalid]: v,
|
|
108
|
+
// resize handling
|
|
109
|
+
[t.textareaResizeAuto]: u === "auto"
|
|
110
|
+
}), L = S(t.label, {
|
|
111
|
+
// hide label only visually to keep them available for assistive technologies
|
|
112
|
+
[t.labelHidden]: Q
|
|
113
|
+
}), N = `${l}-label`, B = `${l}-feedback`, $ = `${l}-hint`, k = `${l}-char-count-announcer`, ee = m ? ` ${$}` : "", d = () => {
|
|
114
|
+
if (s.current && u === "auto") {
|
|
115
|
+
s.current.style.height = "auto";
|
|
116
|
+
const a = V(s.current.scrollHeight), b = V(2);
|
|
117
|
+
s.current.style.height = `${// We need to add 2px (border-top & border-bottom) to the scrollHeight to prevent the textarea
|
|
118
|
+
// from jumping as soon as the user starts typing.
|
|
119
|
+
a + b}rem`;
|
|
120
|
+
}
|
|
121
|
+
}, ae = () => {
|
|
122
|
+
const a = [];
|
|
123
|
+
return e && e > 0 && a.push(k), o && i && a.push(B), a.length > 0 ? a.join(" ") : void 0;
|
|
124
|
+
}, te = (a) => {
|
|
125
|
+
var b;
|
|
126
|
+
A && A(a), e && e > 0 && j(((b = s.current) == null ? void 0 : b.value.length) || 0), d();
|
|
127
|
+
}, ne = (a) => {
|
|
128
|
+
y && y(a), E || D(a.target.value);
|
|
129
|
+
};
|
|
130
|
+
return /* @__PURE__ */ n.jsxs("div", { className: U, children: [
|
|
131
|
+
/* @__PURE__ */ n.jsxs("label", { className: L, id: N, htmlFor: l, children: [
|
|
132
|
+
_,
|
|
133
|
+
C && /* @__PURE__ */ n.jsx(ie, {})
|
|
134
|
+
] }),
|
|
135
|
+
m && /* @__PURE__ */ n.jsx("div", { className: t.hint, id: $, children: m }),
|
|
136
|
+
v && T && /* @__PURE__ */ n.jsx(
|
|
137
|
+
re,
|
|
138
|
+
{
|
|
139
|
+
className: t.feedback,
|
|
140
|
+
message: T,
|
|
141
|
+
type: "invalid",
|
|
142
|
+
id: B
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
/* @__PURE__ */ n.jsx(
|
|
146
|
+
"textarea",
|
|
147
|
+
{
|
|
148
|
+
className: Y,
|
|
149
|
+
id: l,
|
|
150
|
+
ref: s,
|
|
151
|
+
...Z,
|
|
152
|
+
"aria-labelledby": `${N}${ee}`,
|
|
153
|
+
"aria-describedby": ae(),
|
|
154
|
+
"aria-invalid": o,
|
|
155
|
+
"aria-disabled": I,
|
|
156
|
+
maxLength: e,
|
|
157
|
+
readOnly: I,
|
|
158
|
+
required: C,
|
|
159
|
+
disabled: O,
|
|
160
|
+
value: f,
|
|
161
|
+
defaultValue: void 0,
|
|
162
|
+
rows: void 0,
|
|
163
|
+
cols: void 0,
|
|
164
|
+
onChange: ne,
|
|
165
|
+
onInput: te
|
|
166
|
+
}
|
|
167
|
+
),
|
|
168
|
+
e !== void 0 && e > 0 && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
169
|
+
/* @__PURE__ */ n.jsxs("div", { className: t.charCount, "aria-hidden": "true", children: [
|
|
170
|
+
r,
|
|
171
|
+
"/",
|
|
172
|
+
e
|
|
173
|
+
] }),
|
|
174
|
+
/* @__PURE__ */ n.jsxs(
|
|
175
|
+
"div",
|
|
176
|
+
{
|
|
177
|
+
className: t.charCountAnnouncer,
|
|
178
|
+
id: k,
|
|
179
|
+
"aria-live": K,
|
|
180
|
+
"aria-atomic": "true",
|
|
181
|
+
children: [
|
|
182
|
+
P,
|
|
183
|
+
" ",
|
|
184
|
+
J
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
] })
|
|
189
|
+
] });
|
|
190
|
+
};
|
|
191
|
+
export {
|
|
192
|
+
Pe as D,
|
|
193
|
+
ze as T,
|
|
194
|
+
Te as v
|
|
195
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as n } from "./jsx-runtime.C-kxDJ4g.js";
|
|
3
|
+
import { c as e } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { forwardRef as f } from "react";
|
|
5
|
+
import { DSButton as u } from "../button.DX_nxoJC.js";
|
|
6
|
+
import { D as k } from "./Icon.9gDIp6p4.js";
|
|
7
|
+
import '../assets/Toast.CAP_EwDX.css';const y = "_root_pyklq_67", g = "_root--closing_pyklq_76", q = "_fade-out_pyklq_1", h = "_move-in_pyklq_1", x = "_root--success_pyklq_111", I = "_root--info_pyklq_115", S = "_root--warning_pyklq_119", N = "_content_pyklq_124", j = "_content--hide-icon_pyklq_131", v = "_icon_pyklq_135", w = "_message_pyklq_139", o = {
|
|
8
|
+
root: y,
|
|
9
|
+
"root--closing": "_root--closing_pyklq_76",
|
|
10
|
+
rootClosing: g,
|
|
11
|
+
"fade-out": "_fade-out_pyklq_1",
|
|
12
|
+
fadeOut: q,
|
|
13
|
+
"move-in": "_move-in_pyklq_1",
|
|
14
|
+
moveIn: h,
|
|
15
|
+
"root--success": "_root--success_pyklq_111",
|
|
16
|
+
rootSuccess: x,
|
|
17
|
+
"root--info": "_root--info_pyklq_115",
|
|
18
|
+
rootInfo: I,
|
|
19
|
+
"root--warning": "_root--warning_pyklq_119",
|
|
20
|
+
rootWarning: S,
|
|
21
|
+
content: N,
|
|
22
|
+
"content--hide-icon": "_content--hide-icon_pyklq_131",
|
|
23
|
+
contentHideIcon: j,
|
|
24
|
+
icon: v,
|
|
25
|
+
message: w
|
|
26
|
+
}, C = {
|
|
27
|
+
success: "circle-check-colored",
|
|
28
|
+
warning: "triangle-exclamationmark-colored",
|
|
29
|
+
info: "circle-info-colored"
|
|
30
|
+
}, D = f(
|
|
31
|
+
({
|
|
32
|
+
message: s,
|
|
33
|
+
className: r,
|
|
34
|
+
hideIcon: c = !1,
|
|
35
|
+
variant: t = "info",
|
|
36
|
+
onClick: i,
|
|
37
|
+
onMouseEnter: a,
|
|
38
|
+
onMouseLeave: _,
|
|
39
|
+
...l
|
|
40
|
+
}, m) => {
|
|
41
|
+
const p = e(o.root, r, {
|
|
42
|
+
[o.rootSuccess]: t === "success",
|
|
43
|
+
[o.rootWarning]: t === "warning",
|
|
44
|
+
[o.rootInfo]: t === "info"
|
|
45
|
+
}), d = e(o.content, {
|
|
46
|
+
[o.contentHideIcon]: c
|
|
47
|
+
});
|
|
48
|
+
return /* @__PURE__ */ n.jsx(
|
|
49
|
+
"aside",
|
|
50
|
+
{
|
|
51
|
+
className: p,
|
|
52
|
+
ref: m,
|
|
53
|
+
popover: "manual",
|
|
54
|
+
"data-ds-toast": !0,
|
|
55
|
+
onMouseEnter: a,
|
|
56
|
+
onMouseLeave: _,
|
|
57
|
+
"aria-label": s,
|
|
58
|
+
...l,
|
|
59
|
+
children: /* @__PURE__ */ n.jsxs("div", { className: d, children: [
|
|
60
|
+
!c && /* @__PURE__ */ n.jsx(
|
|
61
|
+
k,
|
|
62
|
+
{
|
|
63
|
+
name: C[t],
|
|
64
|
+
className: o.icon,
|
|
65
|
+
"aria-hidden": "true"
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ n.jsx("div", { className: o.message, children: s }),
|
|
69
|
+
/* @__PURE__ */ n.jsx(
|
|
70
|
+
u,
|
|
71
|
+
{
|
|
72
|
+
hideLabel: !0,
|
|
73
|
+
iconName: "cross",
|
|
74
|
+
size: "small",
|
|
75
|
+
variant: "ghost",
|
|
76
|
+
onClick: i,
|
|
77
|
+
children: "Close toast"
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
] })
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
D.displayName = "DSToast";
|
|
86
|
+
export {
|
|
87
|
+
D,
|
|
88
|
+
o as s
|
|
89
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as e from "react";
|
|
3
|
-
const
|
|
3
|
+
const n = ({
|
|
4
4
|
title: l,
|
|
5
5
|
titleId: t,
|
|
6
6
|
...a
|
|
7
|
-
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": t, ...a }, l ? /* @__PURE__ */ e.createElement("title", { id: t }, l) : null, /* @__PURE__ */ e.createElement("path", { fill: "#666", fillRule: "evenodd", d: "M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0
|
|
7
|
+
}) => /* @__PURE__ */ e.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", focusable: "false", width: "100%", height: "100%", "aria-labelledby": t, ...a }, l ? /* @__PURE__ */ e.createElement("title", { id: t }, l) : null, /* @__PURE__ */ e.createElement("path", { fill: "#666", fillRule: "evenodd", d: "M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16", clipRule: "evenodd" }), /* @__PURE__ */ e.createElement("path", { fill: "#fff", d: "M6.575 3.35C6.575 2.6 7.175 2 8 2s1.425.6 1.425 1.35c0 .825-.6 1.425-1.425 1.425A1.424 1.424 0 0 1 6.575 3.35M9.05 6.775H6.875v6.75H9.05z" }));
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
n as default
|
|
10
10
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
const t = ({
|
|
4
|
+
title: a,
|
|
5
|
+
titleId: l,
|
|
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": l, ...c }, a ? /* @__PURE__ */ e.createElement("title", { id: l }, a) : null, /* @__PURE__ */ e.createElement("g", { clipPath: "url(#a)" }, /* @__PURE__ */ e.createElement("path", { fillRule: "evenodd", d: "M13.669 2.323A7.94 7.94 0 0 0 8.034 0C3.642 0 .068 3.554.067 7.922c0 1.396.366 2.76 1.063 3.96L0 15.989l4.223-1.101a8 8 0 0 0 3.807.964h.004c4.39 0 7.964-3.554 7.966-7.923a7.85 7.85 0 0 0-2.331-5.604m-5.635 12.19H8.03a6.64 6.64 0 0 1-3.37-.918l-.242-.143-2.506.654.668-2.43-.157-.25a6.54 6.54 0 0 1-1.012-3.504c.001-3.63 2.972-6.584 6.624-6.584 1.769 0 3.431.686 4.682 1.931a6.53 6.53 0 0 1 1.937 4.659c-.002 3.63-2.972 6.584-6.621 6.584m3.632-4.932c-.2-.099-1.178-.578-1.36-.644s-.316-.099-.448.1c-.133.198-.515.644-.63.776-.117.132-.233.148-.432.049-.199-.1-.84-.308-1.6-.982a6 6 0 0 1-1.108-1.372c-.116-.198-.012-.305.087-.404.09-.088.199-.23.299-.346s.132-.199.199-.33c.066-.133.033-.248-.017-.347-.05-.1-.448-1.074-.614-1.47-.161-.386-.326-.334-.447-.34a8 8 0 0 0-.382-.007.73.73 0 0 0-.531.248c-.183.198-.697.677-.697 1.651s.713 1.916.813 2.048 1.404 2.132 3.4 2.99c.475.203.846.325 1.136.416.476.151.91.13 1.253.08.383-.058 1.178-.48 1.344-.942.165-.463.165-.86.116-.942-.05-.082-.183-.132-.382-.23z", clipRule: "evenodd" })));
|
|
8
|
+
export {
|
|
9
|
+
t as default
|
|
10
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as u } from "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
-
import { v as x, C } from "./chunks/CustomReactSelect.
|
|
3
|
+
import { v as x, c as C } from "./chunks/CustomReactSelect.DtmbYZUf.js";
|
|
4
4
|
const v = ({
|
|
5
5
|
id: s,
|
|
6
6
|
label: o,
|
|
@@ -8,9 +8,9 @@ const v = ({
|
|
|
8
8
|
disabled: a = !1,
|
|
9
9
|
dropdownOnFocus: e = !1,
|
|
10
10
|
hideLabel: l = !1,
|
|
11
|
-
invalid:
|
|
12
|
-
lang:
|
|
13
|
-
required:
|
|
11
|
+
invalid: c = !1,
|
|
12
|
+
lang: m = "en",
|
|
13
|
+
required: r = !1,
|
|
14
14
|
variant: f = "single",
|
|
15
15
|
...t
|
|
16
16
|
}) => {
|
|
@@ -32,12 +32,12 @@ const v = ({
|
|
|
32
32
|
disabled: a,
|
|
33
33
|
hideLabel: l,
|
|
34
34
|
isMulti: i,
|
|
35
|
-
invalid:
|
|
36
|
-
lang:
|
|
35
|
+
invalid: c,
|
|
36
|
+
lang: m,
|
|
37
37
|
openMenuOnClick: e,
|
|
38
38
|
openMenuOnFocus: e,
|
|
39
39
|
isClearable: !e || i,
|
|
40
|
-
required:
|
|
40
|
+
required: r,
|
|
41
41
|
...t
|
|
42
42
|
}
|
|
43
43
|
);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const ARIA_LIVE_REGION_ALERT_ID = "ds-alert-live-region";
|
|
2
|
+
export declare const ARIA_LIVE_REGION_STATUS_ID = "ds-status-live-region";
|
|
3
|
+
export declare const getAriaAlertLiveRegionElement: () => HTMLElement | null;
|
|
4
|
+
export declare const getAriaStatusLiveRegionElement: () => HTMLElement | null;
|
|
5
|
+
export declare const validateMultipleDSAriaLiveRegionsOnPage: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -8,7 +8,7 @@ export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
|
8
8
|
checked?: boolean;
|
|
9
9
|
/** Disables the checkbox, preventing user interaction */
|
|
10
10
|
disabled?: boolean;
|
|
11
|
-
/**
|
|
11
|
+
/** Hides the checkbox label, can be responsive
|
|
12
12
|
* `boolean | { base: boolean; s?: boolean; m?: boolean; l?: boolean; xl?: boolean; }`
|
|
13
13
|
* */
|
|
14
14
|
hideLabel?: BreakpointCustomizable<boolean>;
|
|
@@ -9,7 +9,7 @@ export interface CheckboxGroupProps extends FieldsetHTMLAttributes<HTMLFieldSetE
|
|
|
9
9
|
* When provided as a string, it represents the legend text directly.
|
|
10
10
|
* When provided as an object, it allows for more detailed configuration, including:
|
|
11
11
|
* - `headingText: string` The text content for the legend.
|
|
12
|
-
* - `headingSize?: 'x-large' | 'large' | 'medium' | 'medium-uppercase' | 'small' | 'small-uppercase'` Defines the size of the heading, using predefined size types, defaults to `'medium'`
|
|
12
|
+
* - `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'`
|
|
13
13
|
* - `headingTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'` Specifies the HTML tag to be used for the heading, such as 'h1', 'h2', etc., defaults to `'h2'`
|
|
14
14
|
*
|
|
15
15
|
* @prop {string | { headingText: string; headingSize?: HeadingSize; headingTag?: HeadingTag; }} legend
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CheckboxGroupProps } from './CheckboxGroup';
|
|
2
2
|
|
|
3
3
|
type ValidationProps = Pick<CheckboxGroupProps, 'children' | 'description' | 'id' | 'legend' | 'systemFeedback'>;
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const validateCheckboxGroupProps: ({ children, description, id, legend, systemFeedback, }: ValidationProps) => void;
|
|
5
5
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
type DialogProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
footer?: React.ReactNode;
|
|
6
|
+
header?: React.ReactNode;
|
|
7
|
+
isOpen?: boolean;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
} & HTMLAttributes<HTMLDialogElement>;
|
|
10
|
+
export declare const DSDialog: ({ children, className, footer, header, isOpen, onClose, }: DialogProps) => JSX.Element;
|
|
11
|
+
export {};
|
|
File without changes
|
|
@@ -9,7 +9,7 @@ export interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElemen
|
|
|
9
9
|
* When provided as a string, it represents the legend text directly.
|
|
10
10
|
* When provided as an object, it allows for more detailed configuration, including:
|
|
11
11
|
* - `headingText: string` The text content for the legend.
|
|
12
|
-
* - `headingSize?: 'x-large' | 'large' | 'medium' | 'medium-uppercase' | 'small' | 'small-uppercase'` Defines the size of the heading, using predefined size types, defaults to `'medium'`
|
|
12
|
+
* - `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'`
|
|
13
13
|
* - `headingTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'` Specifies the HTML tag to be used for the heading, such as 'h1', 'h2', etc., defaults to `'h2'`
|
|
14
14
|
*
|
|
15
15
|
* @prop {string | { headingText: string; headingSize?: HeadingSize; headingTag?: HeadingTag; }} legend
|
|
@@ -7,5 +7,5 @@ export type Legend = string | {
|
|
|
7
7
|
headingTag?: HeadingTag;
|
|
8
8
|
};
|
|
9
9
|
type ValidationProps = Pick<FieldsetProps, 'description' | 'id' | 'legend' | 'systemFeedback'>;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const validateFieldsetProps: ({ description, id, legend, systemFeedback, }: ValidationProps) => void;
|
|
11
11
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const HEADING_SIZE: readonly ["x-large", "large", "medium", "medium-uppercase", "small", "small-uppercase"];
|
|
1
|
+
export declare const HEADING_SIZE: readonly ["x-large", "x-large-uppercase", "large", "large-uppercase", "medium", "medium-uppercase", "small", "small-uppercase"];
|
|
2
2
|
export type HeadingSize = typeof HEADING_SIZE[number];
|
|
3
3
|
export declare const HEADING_TAG: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
|
|
4
4
|
export type HeadingTag = typeof HEADING_TAG[number];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { SelectedAriaAttributes, Theme } from '../../types';
|
|
3
|
-
import { LogoAriaAttribute, LogoTarget } from './Logo.utils';
|
|
3
|
+
import { LogoAriaAttribute, LogoTarget, LogoVariant } from './Logo.utils';
|
|
4
4
|
|
|
5
5
|
export interface LogoProps extends HTMLAttributes<HTMLOrSVGElement | HTMLAnchorElement> {
|
|
6
6
|
/** If the DSLogo is used with an href prop, make sure to add a descriptive label to inform screen reader users what the link stands for
|
|
@@ -13,10 +13,12 @@ export interface LogoProps extends HTMLAttributes<HTMLOrSVGElement | HTMLAnchorE
|
|
|
13
13
|
target?: LogoTarget;
|
|
14
14
|
/** Defines the theme */
|
|
15
15
|
theme?: Theme;
|
|
16
|
+
/** Defines the variant, **standard** is only available with **light** theme */
|
|
17
|
+
variant?: LogoVariant;
|
|
16
18
|
}
|
|
17
19
|
/**
|
|
18
20
|
* This component is used to display the logo.
|
|
19
21
|
*
|
|
20
22
|
* It can be also used as a link by providing a `href` and an `aria-label`.
|
|
21
23
|
*/
|
|
22
|
-
export declare const DSLogo: ({ aria, className, href, target, theme, ...rest }: LogoProps) => JSX.Element;
|
|
24
|
+
export declare const DSLogo: ({ aria, className, href, target, theme, variant, ...rest }: LogoProps) => JSX.Element;
|