@stihl-design-system/components 1.0.0-RC.10 → 1.0.0-RC.11
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 +0 -9
- package/{accordion.B3UkxlAZ.js → accordion.CEKQh-7i.js} +1 -1
- package/accordion.d.ts +1 -0
- package/{arialiveregions.BK4T7Vhk.js → arialiveregions.BKpxxK7O.js} +1 -1
- package/arialiveregions.d.ts +1 -0
- package/assets/Accordion.DMEFgtQm.css +1 -0
- package/assets/Chip.D10_7Q82.css +1 -0
- package/assets/CustomReactSelect.D5XKd9vg.css +1 -0
- package/assets/Dialog.B0pucIEI.css +1 -0
- package/assets/Drawer.CATBzfY7.css +1 -0
- package/assets/Fieldset.CwDhKRUL.css +1 -0
- package/assets/InputPassword.DOAAzj-O.css +1 -0
- package/assets/InputSearch.CxPYaQGZ.css +1 -0
- package/assets/InputStepper.CYYJUu0b.css +1 -0
- package/assets/Notification.mhVFeSGm.css +1 -0
- package/assets/Select.DZKpHV4G.css +1 -0
- package/assets/Textarea.Cp0b7oZp.css +1 -0
- package/assets/Toast.Cz6wYaBv.css +1 -0
- package/assets/button.C9_ejpGG.css +1 -0
- package/assets/buttonround.DTCqRP-0.css +1 -0
- package/assets/chipgroup.BMovtKTy.css +1 -0
- package/assets/flag.DX_lH1v7.css +1 -0
- package/assets/floatingactionbutton.Do-yEH6c.css +1 -0
- package/assets/input.Q5oKkmW2.css +1 -0
- package/assets/link.DhZqkLMP.css +1 -0
- package/assets/linkstandalone.Dwz-_O8q.css +1 -0
- package/assets/optioncheckbox.C62HtIj5.css +1 -0
- package/assets/radio.-Xxx5wL4.css +1 -0
- package/assets/switch.C1Ei0-z8.css +1 -0
- package/assets/text.DxKFcfY6.css +1 -0
- package/asterisk.d.ts +1 -0
- package/button.C5opEJ6x.js +135 -0
- package/button.d.ts +1 -0
- package/buttonround.CUoqRyy0.js +118 -0
- package/buttonround.d.ts +1 -0
- package/checkbox.d.ts +1 -0
- package/checkboxgroup.BqD5IV51.js +8 -0
- package/checkboxgroup.d.ts +1 -0
- package/chip.B92ew-hk.js +10 -0
- package/chip.d.ts +2 -0
- package/chipgroup.BJrqEfvr.js +175 -0
- package/chipgroup.d.ts +2 -0
- package/chunks/Accordion.DFwFN8mX.js +125 -0
- package/chunks/{AriaLiveRegions.utils.D2ni4Yrf.js → AriaLiveRegions.utils.BGSZafnS.js} +2 -2
- package/chunks/CheckboxGroup.M3jOjhNf.js +92 -0
- package/chunks/Chip.fMG8wi5K.js +142 -0
- package/chunks/{CustomReactSelect.ChAtL6fu.js → CustomReactSelect.D3jv5-fa.js} +883 -876
- package/chunks/{Dialog.Z5ESJQMi.js → Dialog.Fwr6vLiK.js} +47 -47
- package/chunks/{Drawer.BdowMqE0.js → Drawer.CKoYzQHd.js} +32 -32
- package/chunks/Fieldset.C9K8BYmH.js +99 -0
- package/chunks/InputPassword.C7pNeWGx.js +143 -0
- package/chunks/InputSearch.B24rcIJ_.js +192 -0
- package/chunks/InputStepper.CEW-bieQ.js +294 -0
- package/chunks/Notification.BXVN7_Fs.js +93 -0
- package/chunks/RadioGroup.D4UOflwr.js +137 -0
- package/chunks/Select.Ds86q4UC.js +194 -0
- package/chunks/Textarea.DcB8hKnO.js +198 -0
- package/chunks/Toast.DrzxdzVW.js +89 -0
- package/chunks/translate.isa3FHb8.js +11 -0
- package/{combobox.JL1Dsn3E.js → combobox.BeTnbG1m.js} +1 -1
- package/combobox.d.ts +1 -0
- package/components/Accordion/Accordion.d.ts +0 -1
- package/components/Accordion/Accordion.utils.d.ts +0 -1
- package/components/Button/Button.d.ts +0 -1
- package/components/ButtonRound/ButtonRound.d.ts +0 -1
- package/components/Checkbox/Checkbox.d.ts +0 -1
- package/components/CheckboxGroup/CheckboxGroup.d.ts +6 -7
- package/components/CheckboxGroup/CheckboxGroup.utils.d.ts +0 -1
- package/components/ChipGroup/Chip.d.ts +12 -0
- package/components/ChipGroup/ChipGroup.d.ts +42 -0
- package/components/ChipGroup/ChipGroup.test.d.ts +1 -0
- package/components/ChipGroup/ChipGroup.utils.d.ts +60 -0
- package/components/ChipGroup/ChipGroup.utils.test.d.ts +1 -0
- package/components/Combobox/Combobox.d.ts +0 -1
- package/components/Combobox/Combobox.utils.d.ts +6 -1
- package/components/CustomReactSelect/CustomReactSelect.d.ts +0 -1
- package/components/CustomReactSelect/CustomReactSelect.utils.d.ts +0 -13
- package/components/CustomReactSelect/OptionCheckbox.d.ts +0 -1
- package/components/Dialog/Dialog.d.ts +0 -1
- package/components/Dialog/Dialog.utils.d.ts +0 -1
- package/components/Drawer/Drawer.d.ts +0 -1
- package/components/Drawer/Drawer.utils.d.ts +0 -1
- package/components/Fieldset/Fieldset.d.ts +0 -1
- package/components/Fieldset/Fieldset.utils.d.ts +7 -1
- package/components/Flag/Flag.d.ts +23 -0
- package/components/Flag/Flag.test.d.ts +1 -0
- package/components/Flag/Flag.utils.d.ts +2 -0
- package/components/FloatingActionButton/FloatingActionButton.d.ts +0 -1
- package/components/Heading/Heading.d.ts +0 -1
- package/components/Icon/Icon.d.ts +0 -1
- package/components/Icon/Icon.utils.d.ts +0 -1
- package/components/Input/Input.d.ts +0 -1
- package/components/Input/Input.utils.d.ts +0 -1
- package/components/InputPassword/InputPassword.d.ts +0 -1
- package/components/InputPassword/InputPassword.utils.d.ts +0 -1
- package/components/InputSearch/InputSearch.d.ts +0 -1
- package/components/InputSearch/InputSearch.utils.d.ts +0 -1
- package/components/InputStepper/InputStepper.d.ts +0 -1
- package/components/InputStepper/InputStepper.utils.d.ts +0 -1
- package/components/Link/Link.d.ts +0 -1
- package/components/LinkStandalone/LinkStandalone.d.ts +0 -1
- package/components/Logo/Logo.d.ts +1 -2
- package/components/Logo/Logo.utils.d.ts +0 -1
- package/components/Notification/Notification.d.ts +0 -1
- package/components/Notification/Notification.utils.d.ts +0 -1
- package/components/Radio/Radio.d.ts +0 -1
- package/components/RadioGroup/RadioGroup.d.ts +7 -8
- package/components/RadioGroup/RadioGroup.utils.d.ts +2 -3
- package/components/Select/Select.d.ts +0 -1
- package/components/Select/Select.utils.d.ts +0 -1
- package/components/SkipToContent/SkipToContent.d.ts +0 -1
- package/components/Spinner/Spinner.d.ts +0 -1
- package/components/Switch/Switch.d.ts +0 -1
- package/components/SystemFeedback/SystemFeedback.d.ts +0 -1
- package/components/Text/Text.d.ts +0 -1
- package/components/Textarea/Textarea.d.ts +0 -1
- package/components/Textarea/Textarea.utils.d.ts +0 -1
- package/components/Title/Title.d.ts +0 -1
- package/components/Toast/Toast.d.ts +0 -1
- package/components/Toast/Toast.utils.d.ts +0 -1
- package/components/Toast/ToastManager.d.ts +0 -1
- package/customreactselect.d.ts +1 -0
- package/{customreactselect.Dg8Kgq3e.js → customreactselect.lYJhIeyx.js} +2 -2
- package/dialog.d.ts +1 -0
- package/{dialog.D3bJ0rsW.js → dialog.lGwNQU91.js} +2 -2
- package/{drawer.CNPF1-Kc.js → drawer.DNi5m8wP.js} +2 -2
- package/drawer.d.ts +1 -0
- package/{fieldset.CTshPWYX.js → fieldset.BqiAjeax.js} +1 -1
- package/fieldset.d.ts +1 -0
- package/flag.XJHHSP38.js +43 -0
- package/flag.d.ts +2 -0
- package/floatingactionbutton.CMpkTdhX.js +87 -0
- package/floatingactionbutton.d.ts +1 -0
- package/heading.d.ts +1 -0
- package/icon.d.ts +1 -0
- package/index.d.ts +4 -0
- package/index.es.js +133 -113
- package/input.d.ts +1 -0
- package/input.v7qB7wPJ.js +239 -0
- package/{inputpassword.nsYu6YeB.js → inputpassword.CSjh1GU7.js} +2 -2
- package/inputpassword.d.ts +1 -0
- package/{inputsearch.ZGIrDrcv.js → inputsearch.DyznOWLK.js} +2 -2
- package/inputsearch.d.ts +1 -0
- package/{inputstepper.BvY36hA1.js → inputstepper.3BLb7s0P.js} +2 -2
- package/inputstepper.d.ts +1 -0
- package/link.Clk5_BYp.js +116 -0
- package/link.d.ts +1 -0
- package/linkstandalone.BXERmqdN.js +80 -0
- package/linkstandalone.d.ts +1 -0
- package/logo.d.ts +1 -0
- package/{notification.BAS13UQ6.js → notification.0kX1GMaB.js} +2 -2
- package/notification.d.ts +1 -0
- package/{optioncheckbox.DZWwtx6f.js → optioncheckbox.BPN3f6l_.js} +13 -13
- package/optioncheckbox.d.ts +1 -0
- package/package.json +44 -39
- package/partials/index.js +407 -407
- package/partials/lib/partials.d.ts +0 -1
- package/radio.DTZNJzMU.js +115 -0
- package/radio.d.ts +1 -0
- package/radiogroup.SYkZm2DG.js +10 -0
- package/radiogroup.d.ts +1 -0
- package/{select.C4OZMB-V.js → select.CYbwR3RW.js} +1 -1
- package/select.d.ts +1 -0
- package/{skiptocontent.C4yQfWr2.js → skiptocontent.DUQWopO4.js} +1 -1
- package/skiptocontent.d.ts +1 -0
- package/spinner.d.ts +1 -0
- package/styles/fonts/STIHLContrafaceDigitalTextDemi.woff +0 -0
- package/styles/fonts/STIHLContrafaceDigitalTextDemi.woff2 +0 -0
- package/styles/fonts/font-face.min.css +1 -1
- package/styles/scss/_index.scss +1 -0
- package/styles/scss/lib/_breakpoints.scss +0 -1
- package/styles/scss/lib/_link.scss +3 -0
- package/styles/scss/lib/_spacing-dynamic.scss +61 -0
- package/switch.CoNnIhM4.js +65 -0
- package/switch.d.ts +1 -0
- package/systemfeedback.d.ts +1 -0
- package/text.d.ts +1 -0
- package/text.fMcHzVbH.js +57 -0
- package/{textarea.CtQtGqn5.js → textarea.DJc527nX.js} +1 -1
- package/textarea.d.ts +1 -0
- package/title.d.ts +1 -0
- package/{toast.DVd9dLs2.js → toast.D48GFmp0.js} +2 -2
- package/toast.d.ts +1 -0
- package/{toastmanager.Dh0gzFkM.js → toastmanager.Dl8-Q3ED.js} +2 -2
- package/toastmanager.d.ts +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/translate.d.ts +11 -0
- package/utils/translate.test.d.ts +1 -0
- package/utils/useBreakpoint.d.ts +0 -1
- package/utils/useIsomorphicLayoutEffect.d.ts +0 -1
- package/utils/vitest.setup.d.ts +0 -1
- package/assets/Accordion.lFv7Q_RG.css +0 -1
- package/assets/CustomReactSelect.CMkn-EGK.css +0 -1
- package/assets/Dialog.fiQvxJg_.css +0 -1
- package/assets/Drawer.BqBgbSuP.css +0 -1
- package/assets/Fieldset.qHYeUFZt.css +0 -1
- package/assets/InputPassword.Cf394z47.css +0 -1
- package/assets/InputSearch.eCRQoxjN.css +0 -1
- package/assets/InputStepper.B80KulYE.css +0 -1
- package/assets/Notification.DK6agBGS.css +0 -1
- package/assets/Select.BptsMxz4.css +0 -1
- package/assets/Textarea.CIIVh03G.css +0 -1
- package/assets/Toast.Dsvs1zdM.css +0 -1
- package/assets/button.B1O7Yw3Q.css +0 -1
- package/assets/buttonround.DlH_ipDo.css +0 -1
- package/assets/floatingactionbutton.DRYentYC.css +0 -1
- package/assets/input.C0MrSbQu.css +0 -1
- package/assets/link.vtTST2ki.css +0 -1
- package/assets/linkstandalone.BtAcziZ7.css +0 -1
- package/assets/optioncheckbox.BJJAph5_.css +0 -1
- package/assets/radio.9kpIO3HC.css +0 -1
- package/assets/switch.2DQF2zH-.css +0 -1
- package/assets/text.Dhb_l50R.css +0 -1
- package/button.DH0h6uPs.js +0 -135
- package/buttonround.0mw4zzlU.js +0 -118
- package/checkboxgroup.CZqrlF-x.js +0 -9
- package/chunks/Accordion.pI3JyHJL.js +0 -125
- package/chunks/CheckboxGroup.4J_gZ_XJ.js +0 -87
- package/chunks/Fieldset.COGbZwry.js +0 -99
- package/chunks/InputPassword.Dgo95-PU.js +0 -140
- package/chunks/InputSearch.BFof0pBn.js +0 -189
- package/chunks/InputStepper.4IqLa5tX.js +0 -291
- package/chunks/Notification.BhwbaXqk.js +0 -93
- package/chunks/RadioGroup.C5jbCJM4.js +0 -132
- package/chunks/RadioGroup.module.BBZwHDjW.js +0 -11
- package/chunks/Select.fXeQJXtz.js +0 -191
- package/chunks/Textarea.Bewrp0Za.js +0 -195
- package/chunks/Toast.DA_CQ9J-.js +0 -89
- package/floatingactionbutton.CCIj9Fjr.js +0 -87
- package/input.CTgeAYdu.js +0 -236
- package/link.DAZNwQ0a.js +0 -116
- package/linkstandalone.C9X3er7g.js +0 -80
- package/radio.CWGJtmKl.js +0 -115
- package/radiogroup.BhffFqN3.js +0 -11
- package/switch.CmpNUC7s.js +0 -65
- package/text.rgDKQBrU.js +0 -57
- package/utils/render-in-iframe.d.ts +0 -15
- /package/assets/{RadioGroup.Bz3_xkZU.css → CheckboxGroup.Bz3_xkZU.css} +0 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as h } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as q } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { forwardRef as y, useState as C } from "react";
|
|
5
|
+
import { D as N } from "./Fieldset.C9K8BYmH.js";
|
|
6
|
+
import { DSRadio as I } from "../radio.DTZNJzMU.js";
|
|
7
|
+
import { g as t } from "./helpers.B1JT5ShS.js";
|
|
8
|
+
import '../assets/CheckboxGroup.Bz3_xkZU.css';const A = "_group_2f5rk_76", B = "_group--horizontal_2f5rk_84", M = "_group--invalid_2f5rk_87", f = {
|
|
9
|
+
group: A,
|
|
10
|
+
"group--horizontal": "_group--horizontal_2f5rk_84",
|
|
11
|
+
groupHorizontal: B,
|
|
12
|
+
"group--invalid": "_group--invalid_2f5rk_87",
|
|
13
|
+
groupInvalid: M
|
|
14
|
+
}, g = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the DSRadioGroup component.`, m = (o) => o.some(({ hint: a }) => !!a), z = (o) => o.some(({ customArea: a }) => !!a), O = ({
|
|
15
|
+
legend: o,
|
|
16
|
+
name: a,
|
|
17
|
+
options: e,
|
|
18
|
+
description: l,
|
|
19
|
+
direction: i,
|
|
20
|
+
id: n,
|
|
21
|
+
systemFeedback: s
|
|
22
|
+
}) => {
|
|
23
|
+
if (!n && (l || s))
|
|
24
|
+
throw new Error(
|
|
25
|
+
t(
|
|
26
|
+
"DSRadioGroup",
|
|
27
|
+
'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSRadioGroup component.'
|
|
28
|
+
)
|
|
29
|
+
);
|
|
30
|
+
if (!o)
|
|
31
|
+
throw new Error(
|
|
32
|
+
t("DSRadioGroup", g("legend"))
|
|
33
|
+
);
|
|
34
|
+
if (!a)
|
|
35
|
+
throw new Error(
|
|
36
|
+
t("DSRadioGroup", g("name"))
|
|
37
|
+
);
|
|
38
|
+
if (!e)
|
|
39
|
+
throw new Error(
|
|
40
|
+
t("DSRadioGroup", g("options"))
|
|
41
|
+
);
|
|
42
|
+
if (i === "horizontal" && m(e))
|
|
43
|
+
throw new Error(
|
|
44
|
+
t(
|
|
45
|
+
"DSRadioGroup",
|
|
46
|
+
"Horizontal direction is not possible when options contain a hint. Please remove hints or change direction property to 'vertical'."
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
if (i === "horizontal" && z(e))
|
|
50
|
+
throw new Error(
|
|
51
|
+
t(
|
|
52
|
+
"DSRadioGroup",
|
|
53
|
+
"Horizontal direction is not possible when options contain a custom area. Please remove custom areas or change direction property to 'vertical'."
|
|
54
|
+
)
|
|
55
|
+
);
|
|
56
|
+
}, V = y(
|
|
57
|
+
({
|
|
58
|
+
legend: o,
|
|
59
|
+
name: a,
|
|
60
|
+
options: e,
|
|
61
|
+
className: l,
|
|
62
|
+
defaultValue: i,
|
|
63
|
+
description: n,
|
|
64
|
+
direction: s = "vertical",
|
|
65
|
+
disabled: p = !1,
|
|
66
|
+
hideUncheckedHints: v = !1,
|
|
67
|
+
id: u,
|
|
68
|
+
invalid: c = !1,
|
|
69
|
+
required: D = !1,
|
|
70
|
+
systemFeedback: d,
|
|
71
|
+
value: w,
|
|
72
|
+
onChange: S,
|
|
73
|
+
...G
|
|
74
|
+
}, E) => {
|
|
75
|
+
process.env.NODE_ENV !== "production" && O({
|
|
76
|
+
legend: o,
|
|
77
|
+
name: a,
|
|
78
|
+
options: e,
|
|
79
|
+
description: n,
|
|
80
|
+
direction: s,
|
|
81
|
+
id: u,
|
|
82
|
+
systemFeedback: d
|
|
83
|
+
});
|
|
84
|
+
const [H, x] = C(i), _ = w !== void 0, R = _ ? w : H, P = q(f.group, {
|
|
85
|
+
// In case of longer copy, use vertical direction
|
|
86
|
+
[f.groupHorizontal]: s === "horizontal" && !m(e) && !z(e),
|
|
87
|
+
[f.groupInvalid]: c && !!d
|
|
88
|
+
}), j = (r) => {
|
|
89
|
+
if (p) {
|
|
90
|
+
r.preventDefault();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
_ || x(
|
|
94
|
+
r.target.value
|
|
95
|
+
), S && S(r);
|
|
96
|
+
}, k = m(e) && !v;
|
|
97
|
+
return /* @__PURE__ */ h.jsx(
|
|
98
|
+
N,
|
|
99
|
+
{
|
|
100
|
+
id: u,
|
|
101
|
+
legend: o,
|
|
102
|
+
className: l,
|
|
103
|
+
description: n,
|
|
104
|
+
disabled: p,
|
|
105
|
+
required: D,
|
|
106
|
+
invalid: c,
|
|
107
|
+
systemFeedback: d,
|
|
108
|
+
...G,
|
|
109
|
+
role: "radiogroup",
|
|
110
|
+
onChange: j,
|
|
111
|
+
children: /* @__PURE__ */ h.jsx("div", { className: P, children: e.map((r) => /* @__PURE__ */ h.jsx(
|
|
112
|
+
I,
|
|
113
|
+
{
|
|
114
|
+
name: a,
|
|
115
|
+
checked: r.value === R,
|
|
116
|
+
disabled: p,
|
|
117
|
+
hideUncheckedHint: v,
|
|
118
|
+
hint: r.hint,
|
|
119
|
+
invalid: c,
|
|
120
|
+
isBold: k,
|
|
121
|
+
required: D,
|
|
122
|
+
ref: r.value === R ? E : null,
|
|
123
|
+
...r
|
|
124
|
+
},
|
|
125
|
+
u + r.label + r.value + r.hint
|
|
126
|
+
)) })
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
V.displayName = "DSRadioGroup";
|
|
132
|
+
export {
|
|
133
|
+
V as D,
|
|
134
|
+
z as a,
|
|
135
|
+
m as o,
|
|
136
|
+
O as v
|
|
137
|
+
};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as t } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as _ } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { useRef as C, useState as q, useEffect as W } from "react";
|
|
5
|
+
import { u as F } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
|
+
import { Asterisk as M } from "../asterisk.DDn-yX4P.js";
|
|
7
|
+
import { D as O } from "./Icon.C2o2seDb.js";
|
|
8
|
+
import { DSSystemFeedback as T } from "../systemfeedback.ZzRUAVYX.js";
|
|
9
|
+
import { g as u } from "./helpers.B1JT5ShS.js";
|
|
10
|
+
import '../assets/Select.DZKpHV4G.css';const V = "_root_1opnm_226", Z = "_hint_1opnm_234", J = "_label_1opnm_234", K = "_wrapper_1opnm_238", Q = "_affix_1opnm_244", U = "_affix--small_1opnm_266", X = "_affix--disabled_1opnm_280", Y = "_prefix_1opnm_288", z = "_affix--readonly_1opnm_291", G = "_suffix_1opnm_301", ee = "_action-button_1opnm_308", ne = "_label--hidden_1opnm_327", te = "_label--disabled_1opnm_340", se = "_feedback_1opnm_361", oe = "_select-wrapper_1opnm_366", ae = "_select_1opnm_366", le = "_select--invalid_1opnm_489", ce = "_select--small_1opnm_496", ie = "_input--has-leading-icon_1opnm_550", re = "_input--has-action-button_1opnm_553", _e = "_input--has-second-action-button_1opnm_556", de = "_select--has-leading-icon_1opnm_559", pe = "_select--has-action-button_1opnm_562", me = "_select--has-second-action-button_1opnm_565", fe = "_select--has-affix_1opnm_568", ue = "_select--is-ready_1opnm_582", he = "_select--placeholder_1opnm_599", be = "_chevron_1opnm_608", xe = "_chevron--small_1opnm_612", ve = "_chevron--disabled_1opnm_615", e = {
|
|
11
|
+
root: V,
|
|
12
|
+
hint: Z,
|
|
13
|
+
label: J,
|
|
14
|
+
wrapper: K,
|
|
15
|
+
affix: Q,
|
|
16
|
+
"affix--small": "_affix--small_1opnm_266",
|
|
17
|
+
affixSmall: U,
|
|
18
|
+
"affix--disabled": "_affix--disabled_1opnm_280",
|
|
19
|
+
affixDisabled: X,
|
|
20
|
+
prefix: Y,
|
|
21
|
+
"affix--readonly": "_affix--readonly_1opnm_291",
|
|
22
|
+
affixReadonly: z,
|
|
23
|
+
suffix: G,
|
|
24
|
+
"action-button": "_action-button_1opnm_308",
|
|
25
|
+
actionButton: ee,
|
|
26
|
+
"label--hidden": "_label--hidden_1opnm_327",
|
|
27
|
+
labelHidden: ne,
|
|
28
|
+
"label--disabled": "_label--disabled_1opnm_340",
|
|
29
|
+
labelDisabled: te,
|
|
30
|
+
feedback: se,
|
|
31
|
+
"select-wrapper": "_select-wrapper_1opnm_366",
|
|
32
|
+
selectWrapper: oe,
|
|
33
|
+
select: ae,
|
|
34
|
+
"select--invalid": "_select--invalid_1opnm_489",
|
|
35
|
+
selectInvalid: le,
|
|
36
|
+
"select--small": "_select--small_1opnm_496",
|
|
37
|
+
selectSmall: ce,
|
|
38
|
+
"input--has-leading-icon": "_input--has-leading-icon_1opnm_550",
|
|
39
|
+
inputHasLeadingIcon: ie,
|
|
40
|
+
"input--has-action-button": "_input--has-action-button_1opnm_553",
|
|
41
|
+
inputHasActionButton: re,
|
|
42
|
+
"input--has-second-action-button": "_input--has-second-action-button_1opnm_556",
|
|
43
|
+
inputHasSecondActionButton: _e,
|
|
44
|
+
"select--has-leading-icon": "_select--has-leading-icon_1opnm_559",
|
|
45
|
+
selectHasLeadingIcon: de,
|
|
46
|
+
"select--has-action-button": "_select--has-action-button_1opnm_562",
|
|
47
|
+
selectHasActionButton: pe,
|
|
48
|
+
"select--has-second-action-button": "_select--has-second-action-button_1opnm_565",
|
|
49
|
+
selectHasSecondActionButton: me,
|
|
50
|
+
"select--has-affix": "_select--has-affix_1opnm_568",
|
|
51
|
+
selectHasAffix: fe,
|
|
52
|
+
"select--is-ready": "_select--is-ready_1opnm_582",
|
|
53
|
+
selectIsReady: ue,
|
|
54
|
+
"select--placeholder": "_select--placeholder_1opnm_599",
|
|
55
|
+
selectPlaceholder: he,
|
|
56
|
+
chevron: be,
|
|
57
|
+
"chevron--small": "_chevron--small_1opnm_612",
|
|
58
|
+
chevronSmall: xe,
|
|
59
|
+
"chevron--disabled": "_chevron--disabled_1opnm_615",
|
|
60
|
+
chevronDisabled: ve
|
|
61
|
+
}, Ee = ["medium", "small"], Se = ({
|
|
62
|
+
id: n,
|
|
63
|
+
label: a,
|
|
64
|
+
options: o
|
|
65
|
+
}) => {
|
|
66
|
+
if (!n)
|
|
67
|
+
throw new Error(
|
|
68
|
+
u(
|
|
69
|
+
"DSSelect",
|
|
70
|
+
'A unique "id" prop is required. Please add an unique "id" prop to the DSSelect component.'
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
if (!a)
|
|
74
|
+
throw new Error(
|
|
75
|
+
u(
|
|
76
|
+
"DSSelect",
|
|
77
|
+
`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}.`
|
|
78
|
+
)
|
|
79
|
+
);
|
|
80
|
+
if (!o || o.length === 0)
|
|
81
|
+
throw new Error(
|
|
82
|
+
u(
|
|
83
|
+
"DSSelect",
|
|
84
|
+
'Options are always required. Please add an "options" prop to the DSSelect component.'
|
|
85
|
+
)
|
|
86
|
+
);
|
|
87
|
+
}, ge = (n, a, o) => n === "" || a !== void 0 && a !== "" ? !1 : !(o !== void 0 && o !== ""), Le = ({
|
|
88
|
+
id: n,
|
|
89
|
+
label: a,
|
|
90
|
+
options: o,
|
|
91
|
+
className: H,
|
|
92
|
+
defaultValue: h,
|
|
93
|
+
disabled: d = !1,
|
|
94
|
+
hideLabel: I = !1,
|
|
95
|
+
hint: p,
|
|
96
|
+
invalid: r = !1,
|
|
97
|
+
placeholder: m = "Select",
|
|
98
|
+
required: b = !1,
|
|
99
|
+
size: x = "medium",
|
|
100
|
+
systemFeedback: f,
|
|
101
|
+
value: v,
|
|
102
|
+
...w
|
|
103
|
+
}) => {
|
|
104
|
+
process.env.NODE_ENV !== "production" && Se({
|
|
105
|
+
id: n,
|
|
106
|
+
label: a,
|
|
107
|
+
options: o
|
|
108
|
+
});
|
|
109
|
+
const i = C(null), [j, A] = q(
|
|
110
|
+
ge(m, h, v)
|
|
111
|
+
);
|
|
112
|
+
W(() => {
|
|
113
|
+
if (!i.current) return;
|
|
114
|
+
const l = () => {
|
|
115
|
+
if (!i.current) return;
|
|
116
|
+
const c = i.current.value;
|
|
117
|
+
A(c === "");
|
|
118
|
+
}, s = i.current;
|
|
119
|
+
return s.addEventListener("change", l), () => {
|
|
120
|
+
s.removeEventListener("change", l);
|
|
121
|
+
};
|
|
122
|
+
}, []);
|
|
123
|
+
const B = F(I), S = `${n}-label`, g = `${n}-feedback`, D = `${n}-hint`, E = p ? ` ${D}` : "", L = (l) => [
|
|
124
|
+
m && /* @__PURE__ */ t.jsx("option", { value: "", children: m }, `${n}-hidden-option-disabled-placeholder`),
|
|
125
|
+
...l.map((s) => {
|
|
126
|
+
if ("options" in s) {
|
|
127
|
+
const { label: c, options: $ } = s;
|
|
128
|
+
return /* @__PURE__ */ t.jsx("optgroup", { label: c, children: $.map(y) }, c);
|
|
129
|
+
} else
|
|
130
|
+
return y(s);
|
|
131
|
+
})
|
|
132
|
+
], y = ({ label: l, value: s, isDisabled: c }) => /* @__PURE__ */ t.jsx("option", { value: s, disabled: c, children: l }, s), N = _(e.root, H), P = _(e.select, {
|
|
133
|
+
[e.selectSmall]: x === "small",
|
|
134
|
+
[e.selectInvalid]: r,
|
|
135
|
+
[e.selectPlaceholder]: j
|
|
136
|
+
}), k = _(e.label, {
|
|
137
|
+
// hide label only visually to keep them available for assistive technologies
|
|
138
|
+
[e.labelHidden]: B,
|
|
139
|
+
[e.labelDisabled]: d
|
|
140
|
+
}), R = _(e.chevron, {
|
|
141
|
+
[e.chevronSmall]: x === "small",
|
|
142
|
+
[e.chevronDisabled]: d
|
|
143
|
+
});
|
|
144
|
+
return /* @__PURE__ */ t.jsxs("div", { className: N, children: [
|
|
145
|
+
/* @__PURE__ */ t.jsxs("label", { className: k, id: S, htmlFor: n, children: [
|
|
146
|
+
a,
|
|
147
|
+
b && /* @__PURE__ */ t.jsx(M, {})
|
|
148
|
+
] }),
|
|
149
|
+
p && /* @__PURE__ */ t.jsx("div", { className: e.hint, id: D, children: p }),
|
|
150
|
+
r && f && /* @__PURE__ */ t.jsx(
|
|
151
|
+
T,
|
|
152
|
+
{
|
|
153
|
+
className: e.feedback,
|
|
154
|
+
message: f,
|
|
155
|
+
type: "invalid",
|
|
156
|
+
id: g,
|
|
157
|
+
"aria-live": "assertive"
|
|
158
|
+
}
|
|
159
|
+
),
|
|
160
|
+
/* @__PURE__ */ t.jsxs("div", { className: e.selectWrapper, children: [
|
|
161
|
+
/* @__PURE__ */ t.jsx(
|
|
162
|
+
"select",
|
|
163
|
+
{
|
|
164
|
+
...w,
|
|
165
|
+
id: n,
|
|
166
|
+
ref: i,
|
|
167
|
+
className: P,
|
|
168
|
+
"aria-labelledby": `${S}${E}`,
|
|
169
|
+
"aria-describedby": r && f ? g : void 0,
|
|
170
|
+
"aria-invalid": r,
|
|
171
|
+
defaultValue: h,
|
|
172
|
+
value: v,
|
|
173
|
+
disabled: d,
|
|
174
|
+
required: b,
|
|
175
|
+
children: L(o)
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
/* @__PURE__ */ t.jsx(
|
|
179
|
+
O,
|
|
180
|
+
{
|
|
181
|
+
name: "chevron-down",
|
|
182
|
+
className: R,
|
|
183
|
+
"aria-hidden": "true"
|
|
184
|
+
}
|
|
185
|
+
)
|
|
186
|
+
] })
|
|
187
|
+
] });
|
|
188
|
+
};
|
|
189
|
+
export {
|
|
190
|
+
Le as D,
|
|
191
|
+
Ee as S,
|
|
192
|
+
ge as g,
|
|
193
|
+
Se as v
|
|
194
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as n } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as v } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { useState as c, useRef as oa, useEffect as x } from "react";
|
|
5
|
+
import { u as sa, h as ia } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
|
+
import { g as V, p as z } from "./helpers.B1JT5ShS.js";
|
|
7
|
+
import { Asterisk as la } from "../asterisk.DDn-yX4P.js";
|
|
8
|
+
import { DSSystemFeedback as ra } from "../systemfeedback.ZzRUAVYX.js";
|
|
9
|
+
import '../assets/Textarea.Cp0b7oZp.css';const ca = "_textarea_ya3ak_226", da = "_textarea--invalid_ya3ak_343", _a = "_textarea--small_ya3ak_350", ua = "_textarea--resize-auto_ya3ak_370", fa = "_root_ya3ak_380", ba = "_hint_ya3ak_388", xa = "_label_ya3ak_388", ya = "_affix_ya3ak_392", ma = "_affix--small_ya3ak_414", ha = "_affix--disabled_ya3ak_428", ka = "_prefix_ya3ak_436", pa = "_affix--readonly_ya3ak_439", va = "_suffix_ya3ak_449", ga = "_leading-icon_ya3ak_456", Sa = "_leading-icon--small_ya3ak_468", Ia = "_leading-icon--disabled_ya3ak_471", Ca = "_action-button_ya3ak_480", Da = "_label--hidden_ya3ak_499", Aa = "_label--disabled_ya3ak_512", ja = "_feedback_ya3ak_533", wa = "_char-count_ya3ak_538", Ra = "_char-count-announcer_ya3ak_555", t = {
|
|
10
|
+
textarea: ca,
|
|
11
|
+
"textarea--invalid": "_textarea--invalid_ya3ak_343",
|
|
12
|
+
textareaInvalid: da,
|
|
13
|
+
"textarea--small": "_textarea--small_ya3ak_350",
|
|
14
|
+
textareaSmall: _a,
|
|
15
|
+
"textarea--resize-auto": "_textarea--resize-auto_ya3ak_370",
|
|
16
|
+
textareaResizeAuto: ua,
|
|
17
|
+
root: fa,
|
|
18
|
+
hint: ba,
|
|
19
|
+
label: xa,
|
|
20
|
+
affix: ya,
|
|
21
|
+
"affix--small": "_affix--small_ya3ak_414",
|
|
22
|
+
affixSmall: ma,
|
|
23
|
+
"affix--disabled": "_affix--disabled_ya3ak_428",
|
|
24
|
+
affixDisabled: ha,
|
|
25
|
+
prefix: ka,
|
|
26
|
+
"affix--readonly": "_affix--readonly_ya3ak_439",
|
|
27
|
+
affixReadonly: pa,
|
|
28
|
+
suffix: va,
|
|
29
|
+
"leading-icon": "_leading-icon_ya3ak_456",
|
|
30
|
+
leadingIcon: ga,
|
|
31
|
+
"leading-icon--small": "_leading-icon--small_ya3ak_468",
|
|
32
|
+
leadingIconSmall: Sa,
|
|
33
|
+
"leading-icon--disabled": "_leading-icon--disabled_ya3ak_471",
|
|
34
|
+
leadingIconDisabled: Ia,
|
|
35
|
+
"action-button": "_action-button_ya3ak_480",
|
|
36
|
+
actionButton: Ca,
|
|
37
|
+
"label--hidden": "_label--hidden_ya3ak_499",
|
|
38
|
+
labelHidden: Da,
|
|
39
|
+
"label--disabled": "_label--disabled_ya3ak_512",
|
|
40
|
+
labelDisabled: Aa,
|
|
41
|
+
feedback: ja,
|
|
42
|
+
"char-count": "_char-count_ya3ak_538",
|
|
43
|
+
charCount: wa,
|
|
44
|
+
"char-count-announcer": "_char-count-announcer_ya3ak_555",
|
|
45
|
+
charCountAnnouncer: Ra
|
|
46
|
+
}, Pa = ["medium", "small"], Ta = ({ id: o, label: _ }) => {
|
|
47
|
+
if (!o)
|
|
48
|
+
throw new Error(
|
|
49
|
+
V(
|
|
50
|
+
"DSTextarea",
|
|
51
|
+
'A unique "id" prop is required. Please add an unique "id" prop to the DSTextarea component.'
|
|
52
|
+
)
|
|
53
|
+
);
|
|
54
|
+
if (!_)
|
|
55
|
+
throw new Error(
|
|
56
|
+
V(
|
|
57
|
+
"DSTextarea",
|
|
58
|
+
`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}.`
|
|
59
|
+
)
|
|
60
|
+
);
|
|
61
|
+
}, qa = ({
|
|
62
|
+
id: o,
|
|
63
|
+
label: _,
|
|
64
|
+
charsLimitText: P = "Character limit reached",
|
|
65
|
+
charsRemainingText: q = "Characters remaining:",
|
|
66
|
+
className: M,
|
|
67
|
+
defaultValue: O,
|
|
68
|
+
disabled: g = !1,
|
|
69
|
+
hint: y,
|
|
70
|
+
hideLabel: F = !1,
|
|
71
|
+
invalid: s = !1,
|
|
72
|
+
maxLength: a,
|
|
73
|
+
readonly: S = !1,
|
|
74
|
+
required: I = !1,
|
|
75
|
+
resize: u = "vertical",
|
|
76
|
+
size: W = "medium",
|
|
77
|
+
systemFeedback: l,
|
|
78
|
+
value: m,
|
|
79
|
+
wrapperClassName: X,
|
|
80
|
+
onChange: C,
|
|
81
|
+
onInput: D,
|
|
82
|
+
...Z
|
|
83
|
+
}) => {
|
|
84
|
+
process.env.NODE_ENV !== "production" && Ta({
|
|
85
|
+
id: o,
|
|
86
|
+
label: _
|
|
87
|
+
});
|
|
88
|
+
const [G, A] = c(O || ""), [r, j] = c(0), [J, w] = c(0), [K, R] = c("off"), [T, h] = c(l), [k, p] = c(s), E = m !== void 0, f = E ? m : G, i = oa(null), Q = sa(F);
|
|
89
|
+
x(() => {
|
|
90
|
+
if (!a || a <= 0)
|
|
91
|
+
return;
|
|
92
|
+
r >= a * 0.8 ? R("polite") : R("off");
|
|
93
|
+
const e = setTimeout(() => {
|
|
94
|
+
w(a - r || 0);
|
|
95
|
+
}, 1e3);
|
|
96
|
+
return () => clearTimeout(e);
|
|
97
|
+
}, [r]), x(() => {
|
|
98
|
+
A(f || ""), d(), a && a > 0 && (j(f.toString().length || 0), w(a - f.toString().length || 0));
|
|
99
|
+
}, [m]), x(() => {
|
|
100
|
+
s && l ? (h(l), p(s)) : !s && a && a >= 0 && r >= a ? (p(!0), h(P)) : (h(l), p(s));
|
|
101
|
+
}, [s, k, l, r]), x(() => {
|
|
102
|
+
if (ia && u === "auto")
|
|
103
|
+
return d(), window.addEventListener("resize", d), () => window.removeEventListener("resize", d);
|
|
104
|
+
}, [u, i.current]);
|
|
105
|
+
const U = v(t.root, X), Y = v(t.textarea, M, {
|
|
106
|
+
// small textarea
|
|
107
|
+
[t.textareaSmall]: W === "small",
|
|
108
|
+
// invalid state
|
|
109
|
+
[t.textareaInvalid]: k,
|
|
110
|
+
// resize handling
|
|
111
|
+
[t.textareaResizeAuto]: u === "auto"
|
|
112
|
+
}), L = v(t.label, {
|
|
113
|
+
// hide label only visually to keep them available for assistive technologies
|
|
114
|
+
[t.labelHidden]: Q,
|
|
115
|
+
[t.labelDisabled]: g
|
|
116
|
+
}), N = `${o}-label`, B = `${o}-feedback`, $ = `${o}-hint`, H = `${o}-char-count-announcer`, aa = y ? ` ${$}` : "", d = () => {
|
|
117
|
+
if (i.current && u === "auto") {
|
|
118
|
+
i.current.style.height = "auto";
|
|
119
|
+
const e = z(i.current.scrollHeight), b = z(2);
|
|
120
|
+
i.current.style.height = `${// We need to add 2px (border-top & border-bottom) to the scrollHeight to prevent the textarea
|
|
121
|
+
// from jumping as soon as the user starts typing.
|
|
122
|
+
e + b}rem`;
|
|
123
|
+
}
|
|
124
|
+
}, ea = () => {
|
|
125
|
+
const e = [];
|
|
126
|
+
return a && a > 0 && e.push(H), s && l && e.push(B), e.length > 0 ? e.join(" ") : void 0;
|
|
127
|
+
}, ta = (e) => {
|
|
128
|
+
var b;
|
|
129
|
+
D && D(e), a && a > 0 && j(((b = i.current) == null ? void 0 : b.value.length) || 0), d();
|
|
130
|
+
}, na = (e) => {
|
|
131
|
+
C && C(e), E || A(e.target.value);
|
|
132
|
+
};
|
|
133
|
+
return /* @__PURE__ */ n.jsxs("div", { className: U, children: [
|
|
134
|
+
/* @__PURE__ */ n.jsxs("label", { className: L, id: N, htmlFor: o, children: [
|
|
135
|
+
_,
|
|
136
|
+
I && /* @__PURE__ */ n.jsx(la, {})
|
|
137
|
+
] }),
|
|
138
|
+
y && /* @__PURE__ */ n.jsx("div", { className: t.hint, id: $, children: y }),
|
|
139
|
+
k && T && /* @__PURE__ */ n.jsx(
|
|
140
|
+
ra,
|
|
141
|
+
{
|
|
142
|
+
className: t.feedback,
|
|
143
|
+
message: T,
|
|
144
|
+
type: "invalid",
|
|
145
|
+
id: B
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ n.jsx(
|
|
149
|
+
"textarea",
|
|
150
|
+
{
|
|
151
|
+
className: Y,
|
|
152
|
+
id: o,
|
|
153
|
+
ref: i,
|
|
154
|
+
...Z,
|
|
155
|
+
"aria-labelledby": `${N}${aa}`,
|
|
156
|
+
"aria-describedby": ea(),
|
|
157
|
+
"aria-invalid": s,
|
|
158
|
+
"aria-disabled": S,
|
|
159
|
+
maxLength: a,
|
|
160
|
+
readOnly: S,
|
|
161
|
+
required: I,
|
|
162
|
+
disabled: g,
|
|
163
|
+
value: f,
|
|
164
|
+
defaultValue: void 0,
|
|
165
|
+
rows: void 0,
|
|
166
|
+
cols: void 0,
|
|
167
|
+
onChange: na,
|
|
168
|
+
onInput: ta
|
|
169
|
+
}
|
|
170
|
+
),
|
|
171
|
+
a !== void 0 && a > 0 && /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
172
|
+
/* @__PURE__ */ n.jsxs("div", { className: t.charCount, "aria-hidden": "true", children: [
|
|
173
|
+
r,
|
|
174
|
+
"/",
|
|
175
|
+
a
|
|
176
|
+
] }),
|
|
177
|
+
/* @__PURE__ */ n.jsxs(
|
|
178
|
+
"div",
|
|
179
|
+
{
|
|
180
|
+
className: t.charCountAnnouncer,
|
|
181
|
+
id: H,
|
|
182
|
+
"aria-live": K,
|
|
183
|
+
"aria-atomic": "true",
|
|
184
|
+
children: [
|
|
185
|
+
q,
|
|
186
|
+
" ",
|
|
187
|
+
J
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
] })
|
|
192
|
+
] });
|
|
193
|
+
};
|
|
194
|
+
export {
|
|
195
|
+
qa as D,
|
|
196
|
+
Pa as T,
|
|
197
|
+
Ta as v
|
|
198
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as s } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { forwardRef as f } from "react";
|
|
5
|
+
import { DSButton as g } from "../button.C5opEJ6x.js";
|
|
6
|
+
import { D as h } from "./Icon.C2o2seDb.js";
|
|
7
|
+
import '../assets/Toast.Cz6wYaBv.css';const p = "_root_1rrus_80", x = "_root--closing_1rrus_94", I = "_fade-out_1rrus_1", S = "_move-in_1rrus_1", N = "_root--success_1rrus_129", j = "_root--info_1rrus_133", v = "_root--warning_1rrus_137", w = "_content_1rrus_142", C = "_content--hide-icon_1rrus_149", D = "_icon_1rrus_153", O = "_message_1rrus_157", o = {
|
|
8
|
+
root: p,
|
|
9
|
+
"root--closing": "_root--closing_1rrus_94",
|
|
10
|
+
rootClosing: x,
|
|
11
|
+
"fade-out": "_fade-out_1rrus_1",
|
|
12
|
+
fadeOut: I,
|
|
13
|
+
"move-in": "_move-in_1rrus_1",
|
|
14
|
+
moveIn: S,
|
|
15
|
+
"root--success": "_root--success_1rrus_129",
|
|
16
|
+
rootSuccess: N,
|
|
17
|
+
"root--info": "_root--info_1rrus_133",
|
|
18
|
+
rootInfo: j,
|
|
19
|
+
"root--warning": "_root--warning_1rrus_137",
|
|
20
|
+
rootWarning: v,
|
|
21
|
+
content: w,
|
|
22
|
+
"content--hide-icon": "_content--hide-icon_1rrus_149",
|
|
23
|
+
contentHideIcon: C,
|
|
24
|
+
icon: D,
|
|
25
|
+
message: O
|
|
26
|
+
}, T = {
|
|
27
|
+
success: "circle-check-colored",
|
|
28
|
+
warning: "triangle-exclamationmark-colored",
|
|
29
|
+
info: "circle-info-colored"
|
|
30
|
+
}, H = f(
|
|
31
|
+
({
|
|
32
|
+
message: n,
|
|
33
|
+
className: e,
|
|
34
|
+
hideIcon: t = !1,
|
|
35
|
+
variant: r = "info",
|
|
36
|
+
onClick: i,
|
|
37
|
+
onMouseEnter: a,
|
|
38
|
+
onMouseLeave: _,
|
|
39
|
+
...u
|
|
40
|
+
}, l) => {
|
|
41
|
+
const m = c(o.root, e, {
|
|
42
|
+
[o.rootSuccess]: r === "success",
|
|
43
|
+
[o.rootWarning]: r === "warning",
|
|
44
|
+
[o.rootInfo]: r === "info"
|
|
45
|
+
}), d = c(o.content, {
|
|
46
|
+
[o.contentHideIcon]: t
|
|
47
|
+
});
|
|
48
|
+
return /* @__PURE__ */ s.jsx(
|
|
49
|
+
"aside",
|
|
50
|
+
{
|
|
51
|
+
className: m,
|
|
52
|
+
ref: l,
|
|
53
|
+
popover: "manual",
|
|
54
|
+
"data-ds-toast": !0,
|
|
55
|
+
onMouseEnter: a,
|
|
56
|
+
onMouseLeave: _,
|
|
57
|
+
"aria-label": n,
|
|
58
|
+
...u,
|
|
59
|
+
children: /* @__PURE__ */ s.jsxs("div", { className: d, children: [
|
|
60
|
+
!t && /* @__PURE__ */ s.jsx(
|
|
61
|
+
h,
|
|
62
|
+
{
|
|
63
|
+
name: T[r],
|
|
64
|
+
className: o.icon,
|
|
65
|
+
"aria-hidden": "true"
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ s.jsx("div", { className: o.message, children: n }),
|
|
69
|
+
/* @__PURE__ */ s.jsx(
|
|
70
|
+
g,
|
|
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
|
+
H.displayName = "DSToast";
|
|
86
|
+
export {
|
|
87
|
+
H as D,
|
|
88
|
+
o as s
|
|
89
|
+
};
|
package/combobox.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DetailsHTMLAttributes } from 'react';
|
|
2
2
|
import { AccordionSize, ChevronPosition, Summary } from './Accordion.utils';
|
|
3
|
-
|
|
4
3
|
export interface AccordionProps extends DetailsHTMLAttributes<HTMLDetailsElement> {
|
|
5
4
|
/** Content to be displayed within the accordion. */
|
|
6
5
|
children: React.ReactNode;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { HeadingSize, HeadingTag } from '../Heading/Heading.utils';
|
|
2
2
|
import { AccordionProps } from './Accordion';
|
|
3
|
-
|
|
4
3
|
export declare const ACCORDION_SIZE: readonly ["medium", "small"];
|
|
5
4
|
export type AccordionSize = (typeof ACCORDION_SIZE)[number];
|
|
6
5
|
export declare const CHEVRON_POSITION: readonly ["left", "right"];
|
|
@@ -2,7 +2,6 @@ import { ButtonHTMLAttributes } from 'react';
|
|
|
2
2
|
import { BreakpointCustomizable, IconName, SelectedAriaAttributes, Theme } from '../../types';
|
|
3
3
|
import { IconProps } from '../Icon/Icon';
|
|
4
4
|
import { ButtonAriaAttribute, ButtonSize, ButtonVariant } from './Button.utils';
|
|
5
|
-
|
|
6
5
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
6
|
/** Content within the button. */
|
|
8
7
|
children: React.ReactNode;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { IconName } from '../../types';
|
|
2
2
|
import { ButtonProps } from '../Button/Button';
|
|
3
3
|
import { ButtonRoundVariant } from './ButtonRound.utils';
|
|
4
|
-
|
|
5
4
|
export interface ButtonRoundProps extends Omit<ButtonProps, 'hideLabel' | 'size' | 'iconPosition' | 'isFlush'> {
|
|
6
5
|
children: React.ReactNode;
|
|
7
6
|
/** Visual style variant of the button.
|