@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
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as n } from "./jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as s } from "./index.CvOaL64Y.js";
|
|
4
|
-
import { useRef as h, useState as
|
|
5
|
-
import { DSButton as
|
|
6
|
-
import { g as
|
|
7
|
-
import '../assets/Dialog.
|
|
8
|
-
dialog:
|
|
9
|
-
"content-wrapper": "_content-
|
|
10
|
-
contentWrapper:
|
|
11
|
-
"content-wrapper--no-footer": "_content-wrapper--no-
|
|
12
|
-
contentWrapperNoFooter:
|
|
13
|
-
"close-button": "_close-
|
|
14
|
-
closeButton:
|
|
15
|
-
header:
|
|
16
|
-
content:
|
|
17
|
-
footer:
|
|
18
|
-
"header--scrollable": "_header--
|
|
4
|
+
import { useRef as h, useState as x, useEffect as b } from "react";
|
|
5
|
+
import { DSButton as j } from "../button.C5opEJ6x.js";
|
|
6
|
+
import { g as B } from "./helpers.B1JT5ShS.js";
|
|
7
|
+
import '../assets/Dialog.B0pucIEI.css';const E = "_dialog_17zim_80", C = "_content-wrapper_17zim_236", F = "_content-wrapper--no-footer_17zim_242", W = "_close-button_17zim_250", k = "_header_17zim_263", R = "_content_17zim_236", y = "_footer_17zim_265", L = "_header--scrollable_17zim_286", M = "_header--close-button_17zim_295", H = "_content--no-footer_17zim_308", I = "_footer--scrollable_17zim_315", o = {
|
|
8
|
+
dialog: E,
|
|
9
|
+
"content-wrapper": "_content-wrapper_17zim_236",
|
|
10
|
+
contentWrapper: C,
|
|
11
|
+
"content-wrapper--no-footer": "_content-wrapper--no-footer_17zim_242",
|
|
12
|
+
contentWrapperNoFooter: F,
|
|
13
|
+
"close-button": "_close-button_17zim_250",
|
|
14
|
+
closeButton: W,
|
|
15
|
+
header: k,
|
|
16
|
+
content: R,
|
|
17
|
+
footer: y,
|
|
18
|
+
"header--scrollable": "_header--scrollable_17zim_286",
|
|
19
19
|
headerScrollable: L,
|
|
20
|
-
"header--close-button": "_header--close-
|
|
20
|
+
"header--close-button": "_header--close-button_17zim_295",
|
|
21
21
|
headerCloseButton: M,
|
|
22
|
-
"content--no-footer": "_content--no-
|
|
22
|
+
"content--no-footer": "_content--no-footer_17zim_308",
|
|
23
23
|
contentNoFooter: H,
|
|
24
|
-
"footer--scrollable": "_footer--
|
|
24
|
+
"footer--scrollable": "_footer--scrollable_17zim_315",
|
|
25
25
|
footerScrollable: I
|
|
26
26
|
}, O = ({ tabIndex: r }) => {
|
|
27
27
|
if (r || r === 0)
|
|
28
28
|
throw new Error(
|
|
29
|
-
|
|
29
|
+
B(
|
|
30
30
|
"DSDialog",
|
|
31
31
|
"Do not pass the tabindex property to the DSDialog component as it is not interactive and does not receive focus. The DSDialogs contents, including the close button contained in the DSDialog, can receive focus and be interactive."
|
|
32
32
|
)
|
|
33
33
|
);
|
|
34
34
|
}, G = ({
|
|
35
35
|
children: r,
|
|
36
|
-
className:
|
|
37
|
-
closeButtonLabel:
|
|
38
|
-
disableBackdropClose:
|
|
36
|
+
className: g,
|
|
37
|
+
closeButtonLabel: z = "Close dialog",
|
|
38
|
+
disableBackdropClose: D = !1,
|
|
39
39
|
footer: c,
|
|
40
|
-
header:
|
|
40
|
+
header: S,
|
|
41
41
|
hideCloseButton: a = !1,
|
|
42
|
-
isOpen:
|
|
42
|
+
isOpen: i = !1,
|
|
43
43
|
onClose: l,
|
|
44
|
-
...
|
|
44
|
+
..._
|
|
45
45
|
}) => {
|
|
46
46
|
if (process.env.NODE_ENV !== "production") {
|
|
47
|
-
const { tabIndex: e } =
|
|
47
|
+
const { tabIndex: e } = _;
|
|
48
48
|
O({
|
|
49
49
|
tabIndex: e
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
const t = h(null),
|
|
52
|
+
const t = h(null), d = h(null), [m, v] = x(!1);
|
|
53
53
|
b(() => {
|
|
54
|
-
const e =
|
|
54
|
+
const e = d.current;
|
|
55
55
|
if (e) {
|
|
56
|
-
const
|
|
57
|
-
|
|
56
|
+
const u = () => {
|
|
57
|
+
v(
|
|
58
58
|
e.scrollHeight > e.clientHeight
|
|
59
59
|
);
|
|
60
60
|
};
|
|
61
|
-
|
|
62
|
-
const p = new ResizeObserver(
|
|
61
|
+
u();
|
|
62
|
+
const p = new ResizeObserver(u);
|
|
63
63
|
return p.observe(e), () => {
|
|
64
64
|
p.disconnect();
|
|
65
65
|
};
|
|
@@ -67,34 +67,34 @@ import '../assets/Dialog.fiQvxJg_.css';const B = "_dialog_1yzgd_80", E = "_conte
|
|
|
67
67
|
}, []), b(() => {
|
|
68
68
|
const e = t.current;
|
|
69
69
|
if (e)
|
|
70
|
-
return e.addEventListener("close", f),
|
|
70
|
+
return e.addEventListener("close", f), i ? e.showModal() : e.close(), () => {
|
|
71
71
|
e.removeEventListener("close", f);
|
|
72
72
|
};
|
|
73
|
-
}, [
|
|
73
|
+
}, [i, l]);
|
|
74
74
|
const f = () => {
|
|
75
75
|
l && l();
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
},
|
|
76
|
+
}, N = (e) => {
|
|
77
|
+
D || t.current && e.target === t.current && t.current.close();
|
|
78
|
+
}, w = () => {
|
|
79
79
|
t.current && t.current.close();
|
|
80
80
|
};
|
|
81
81
|
return /* @__PURE__ */ n.jsx(
|
|
82
82
|
"dialog",
|
|
83
83
|
{
|
|
84
|
-
...
|
|
84
|
+
..._,
|
|
85
85
|
ref: t,
|
|
86
86
|
className: o.dialog,
|
|
87
|
-
onMouseDown: (e) =>
|
|
87
|
+
onMouseDown: (e) => N(e),
|
|
88
88
|
"aria-modal": "true",
|
|
89
89
|
children: /* @__PURE__ */ n.jsxs(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
|
-
className: s(o.contentWrapper,
|
|
92
|
+
className: s(o.contentWrapper, g, {
|
|
93
93
|
[o.contentWrapperNoFooter]: !c
|
|
94
94
|
}),
|
|
95
95
|
children: [
|
|
96
96
|
!a && /* @__PURE__ */ n.jsx(
|
|
97
|
-
|
|
97
|
+
j,
|
|
98
98
|
{
|
|
99
99
|
className: o.closeButton,
|
|
100
100
|
hideLabel: !0,
|
|
@@ -102,8 +102,8 @@ import '../assets/Dialog.fiQvxJg_.css';const B = "_dialog_1yzgd_80", E = "_conte
|
|
|
102
102
|
size: "small",
|
|
103
103
|
type: "button",
|
|
104
104
|
variant: "ghost",
|
|
105
|
-
onClick: () =>
|
|
106
|
-
children:
|
|
105
|
+
onClick: () => w(),
|
|
106
|
+
children: z
|
|
107
107
|
}
|
|
108
108
|
),
|
|
109
109
|
/* @__PURE__ */ n.jsx(
|
|
@@ -111,15 +111,15 @@ import '../assets/Dialog.fiQvxJg_.css';const B = "_dialog_1yzgd_80", E = "_conte
|
|
|
111
111
|
{
|
|
112
112
|
className: s(o.header, {
|
|
113
113
|
[o.headerCloseButton]: !a,
|
|
114
|
-
[o.headerScrollable]:
|
|
114
|
+
[o.headerScrollable]: m
|
|
115
115
|
}),
|
|
116
|
-
children:
|
|
116
|
+
children: S
|
|
117
117
|
}
|
|
118
118
|
),
|
|
119
119
|
/* @__PURE__ */ n.jsx(
|
|
120
120
|
"div",
|
|
121
121
|
{
|
|
122
|
-
ref:
|
|
122
|
+
ref: d,
|
|
123
123
|
className: s(o.content, {
|
|
124
124
|
[o.contentNoFooter]: !c
|
|
125
125
|
}),
|
|
@@ -131,7 +131,7 @@ import '../assets/Dialog.fiQvxJg_.css';const B = "_dialog_1yzgd_80", E = "_conte
|
|
|
131
131
|
"footer",
|
|
132
132
|
{
|
|
133
133
|
className: s(o.footer, {
|
|
134
|
-
[o.footerScrollable]:
|
|
134
|
+
[o.footerScrollable]: m
|
|
135
135
|
}),
|
|
136
136
|
children: c
|
|
137
137
|
}
|
|
@@ -2,31 +2,31 @@
|
|
|
2
2
|
import { j as r } from "./jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as n } from "./index.CvOaL64Y.js";
|
|
4
4
|
import { useRef as b, useState as j, useEffect as w } from "react";
|
|
5
|
-
import { DSButton as B } from "../button.
|
|
5
|
+
import { DSButton as B } from "../button.C5opEJ6x.js";
|
|
6
6
|
import { g as R } from "./helpers.B1JT5ShS.js";
|
|
7
|
-
import '../assets/Drawer.
|
|
7
|
+
import '../assets/Drawer.CATBzfY7.css';const W = "_drawer_1h1ai_85", C = "_drawer--end_1h1ai_143", F = "_content-wrapper_1h1ai_246", k = "_content-wrapper--no-footer_1h1ai_252", I = "_close-button_1h1ai_255", O = "_header_1h1ai_268", y = "_content_1h1ai_246", z = "_footer_1h1ai_270", L = "_header--scrollable_1h1ai_291", M = "_header--close-button_1h1ai_300", H = "_content--no-footer_1h1ai_314", P = "_footer--scrollable_1h1ai_321", o = {
|
|
8
8
|
drawer: W,
|
|
9
|
-
"drawer--end": "_drawer--
|
|
9
|
+
"drawer--end": "_drawer--end_1h1ai_143",
|
|
10
10
|
drawerEnd: C,
|
|
11
|
-
"content-wrapper": "_content-
|
|
11
|
+
"content-wrapper": "_content-wrapper_1h1ai_246",
|
|
12
12
|
contentWrapper: F,
|
|
13
|
-
"content-wrapper--no-footer": "_content-wrapper--no-
|
|
13
|
+
"content-wrapper--no-footer": "_content-wrapper--no-footer_1h1ai_252",
|
|
14
14
|
contentWrapperNoFooter: k,
|
|
15
|
-
"close-button": "_close-
|
|
15
|
+
"close-button": "_close-button_1h1ai_255",
|
|
16
16
|
closeButton: I,
|
|
17
17
|
header: O,
|
|
18
18
|
content: y,
|
|
19
19
|
footer: z,
|
|
20
|
-
"header--scrollable": "_header--
|
|
20
|
+
"header--scrollable": "_header--scrollable_1h1ai_291",
|
|
21
21
|
headerScrollable: L,
|
|
22
|
-
"header--close-button": "_header--close-
|
|
22
|
+
"header--close-button": "_header--close-button_1h1ai_300",
|
|
23
23
|
headerCloseButton: M,
|
|
24
|
-
"content--no-footer": "_content--no-
|
|
24
|
+
"content--no-footer": "_content--no-footer_1h1ai_314",
|
|
25
25
|
contentNoFooter: H,
|
|
26
|
-
"footer--scrollable": "_footer--
|
|
26
|
+
"footer--scrollable": "_footer--scrollable_1h1ai_321",
|
|
27
27
|
footerScrollable: P
|
|
28
|
-
}, K = ["start", "end"], T = ({ tabIndex:
|
|
29
|
-
if (
|
|
28
|
+
}, K = ["start", "end"], T = ({ tabIndex: a }) => {
|
|
29
|
+
if (a || a === 0)
|
|
30
30
|
throw new Error(
|
|
31
31
|
R(
|
|
32
32
|
"DSDrawer",
|
|
@@ -34,7 +34,7 @@ import '../assets/Drawer.BqBgbSuP.css';const W = "_drawer_h62s5_85", C = "_drawe
|
|
|
34
34
|
)
|
|
35
35
|
);
|
|
36
36
|
}, Q = ({
|
|
37
|
-
children:
|
|
37
|
+
children: a,
|
|
38
38
|
className: m,
|
|
39
39
|
closeButtonLabel: D = "Close modal",
|
|
40
40
|
disableBackdropClose: S = !1,
|
|
@@ -42,27 +42,27 @@ import '../assets/Drawer.BqBgbSuP.css';const W = "_drawer_h62s5_85", C = "_drawe
|
|
|
42
42
|
header: N,
|
|
43
43
|
hideCloseButton: l = !1,
|
|
44
44
|
position: v = "start",
|
|
45
|
-
isOpen:
|
|
46
|
-
onClose:
|
|
47
|
-
...
|
|
45
|
+
isOpen: i = !1,
|
|
46
|
+
onClose: s,
|
|
47
|
+
...d
|
|
48
48
|
}) => {
|
|
49
49
|
if (process.env.NODE_ENV !== "production") {
|
|
50
|
-
const { tabIndex: e } =
|
|
50
|
+
const { tabIndex: e } = d;
|
|
51
51
|
T({
|
|
52
52
|
tabIndex: e
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
const t = b(null),
|
|
55
|
+
const t = b(null), _ = b(null), [h, E] = j(!1);
|
|
56
56
|
w(() => {
|
|
57
|
-
const e =
|
|
57
|
+
const e = _.current;
|
|
58
58
|
if (e) {
|
|
59
|
-
const
|
|
59
|
+
const u = () => {
|
|
60
60
|
E(
|
|
61
61
|
e.scrollHeight > e.clientHeight
|
|
62
62
|
);
|
|
63
63
|
};
|
|
64
|
-
|
|
65
|
-
const p = new ResizeObserver(
|
|
64
|
+
u();
|
|
65
|
+
const p = new ResizeObserver(u);
|
|
66
66
|
return p.observe(e), () => {
|
|
67
67
|
p.disconnect();
|
|
68
68
|
};
|
|
@@ -70,12 +70,12 @@ import '../assets/Drawer.BqBgbSuP.css';const W = "_drawer_h62s5_85", C = "_drawe
|
|
|
70
70
|
}, []), w(() => {
|
|
71
71
|
const e = t.current;
|
|
72
72
|
if (e)
|
|
73
|
-
return e.addEventListener("close",
|
|
74
|
-
e.removeEventListener("close",
|
|
73
|
+
return e.addEventListener("close", f), i ? e.showModal() : e.close(), () => {
|
|
74
|
+
e.removeEventListener("close", f);
|
|
75
75
|
};
|
|
76
|
-
}, [
|
|
77
|
-
const
|
|
78
|
-
|
|
76
|
+
}, [i, s]);
|
|
77
|
+
const f = () => {
|
|
78
|
+
s && s();
|
|
79
79
|
}, x = (e) => {
|
|
80
80
|
S || t.current && e.target === t.current && t.current.close();
|
|
81
81
|
}, g = () => {
|
|
@@ -84,7 +84,7 @@ import '../assets/Drawer.BqBgbSuP.css';const W = "_drawer_h62s5_85", C = "_drawe
|
|
|
84
84
|
return /* @__PURE__ */ r.jsx(
|
|
85
85
|
"dialog",
|
|
86
86
|
{
|
|
87
|
-
...
|
|
87
|
+
...d,
|
|
88
88
|
ref: t,
|
|
89
89
|
className: n(o.drawer, {
|
|
90
90
|
[o.drawerEnd]: v === "end"
|
|
@@ -116,7 +116,7 @@ import '../assets/Drawer.BqBgbSuP.css';const W = "_drawer_h62s5_85", C = "_drawe
|
|
|
116
116
|
{
|
|
117
117
|
className: n(o.header, {
|
|
118
118
|
[o.headerCloseButton]: !l,
|
|
119
|
-
[o.headerScrollable]:
|
|
119
|
+
[o.headerScrollable]: h
|
|
120
120
|
}),
|
|
121
121
|
children: N
|
|
122
122
|
}
|
|
@@ -124,19 +124,19 @@ import '../assets/Drawer.BqBgbSuP.css';const W = "_drawer_h62s5_85", C = "_drawe
|
|
|
124
124
|
/* @__PURE__ */ r.jsx(
|
|
125
125
|
"div",
|
|
126
126
|
{
|
|
127
|
-
ref:
|
|
127
|
+
ref: _,
|
|
128
128
|
className: n(o.content, {
|
|
129
129
|
[o.contentNoFooter]: !c
|
|
130
130
|
}),
|
|
131
131
|
tabIndex: 0,
|
|
132
|
-
children:
|
|
132
|
+
children: a
|
|
133
133
|
}
|
|
134
134
|
),
|
|
135
135
|
c && /* @__PURE__ */ r.jsx(
|
|
136
136
|
"footer",
|
|
137
137
|
{
|
|
138
138
|
className: n(o.footer, {
|
|
139
|
-
[o.footerScrollable]:
|
|
139
|
+
[o.footerScrollable]: h
|
|
140
140
|
}),
|
|
141
141
|
children: c
|
|
142
142
|
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as e } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c } from "./index.CvOaL64Y.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { Asterisk as y } from "../asterisk.DDn-yX4P.js";
|
|
6
|
+
import { DSHeading as v } from "../heading.CAkraI2D.js";
|
|
7
|
+
import { DSSystemFeedback as w } from "../systemfeedback.ZzRUAVYX.js";
|
|
8
|
+
import { g as j } from "./helpers.B1JT5ShS.js";
|
|
9
|
+
import '../assets/Fieldset.CwDhKRUL.css';const N = "_root_2e6a5_76", E = "_child-wrapper_2e6a5_172", M = "_legend_2e6a5_179", q = "_legend--utility--m_2e6a5_183", C = "_description_2e6a5_196", P = "_description--small_2e6a5_211", T = "_system-feedback_2e6a5_215", i = {
|
|
10
|
+
root: N,
|
|
11
|
+
"child-wrapper": "_child-wrapper_2e6a5_172",
|
|
12
|
+
childWrapper: E,
|
|
13
|
+
legend: M,
|
|
14
|
+
"legend--utility--m": "_legend--utility--m_2e6a5_183",
|
|
15
|
+
legendUtilityM: q,
|
|
16
|
+
description: C,
|
|
17
|
+
"description--small": "_description--small_2e6a5_211",
|
|
18
|
+
descriptionSmall: P,
|
|
19
|
+
"system-feedback": "_system-feedback_2e6a5_215",
|
|
20
|
+
systemFeedback: T
|
|
21
|
+
}, U = ({
|
|
22
|
+
description: l,
|
|
23
|
+
id: s,
|
|
24
|
+
legend: n,
|
|
25
|
+
systemFeedback: t
|
|
26
|
+
}) => {
|
|
27
|
+
if (!s && (l || t))
|
|
28
|
+
throw new Error(
|
|
29
|
+
j(
|
|
30
|
+
"DSFieldset",
|
|
31
|
+
'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSFieldset component.'
|
|
32
|
+
)
|
|
33
|
+
);
|
|
34
|
+
if (!n)
|
|
35
|
+
throw new Error(
|
|
36
|
+
j(
|
|
37
|
+
"DSFieldset",
|
|
38
|
+
"The legend prop is required. Please add the legend prop to the DSFieldset component."
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
}, H = ({
|
|
42
|
+
children: l,
|
|
43
|
+
legend: s,
|
|
44
|
+
className: n,
|
|
45
|
+
description: t,
|
|
46
|
+
disabled: S = !1,
|
|
47
|
+
id: d,
|
|
48
|
+
invalid: p = !1,
|
|
49
|
+
required: m = !1,
|
|
50
|
+
systemFeedback: a,
|
|
51
|
+
...b
|
|
52
|
+
}) => {
|
|
53
|
+
process.env.NODE_ENV !== "production" && U({ description: t, id: d, legend: s, systemFeedback: a });
|
|
54
|
+
let o, _, g;
|
|
55
|
+
const r = typeof s == "object" && s !== void 0;
|
|
56
|
+
r && ({ headingSize: o, headingTag: _, headingText: g } = s);
|
|
57
|
+
const h = `${d}-feedback`, f = `${d}-description`, u = [
|
|
58
|
+
a && h,
|
|
59
|
+
t && f
|
|
60
|
+
].filter(Boolean).join(" "), x = !r || o === "small" || o === "small-uppercase", D = c(i.root, n), F = c(i.legend, {
|
|
61
|
+
[i.legendUtilityM]: !r
|
|
62
|
+
}), k = c(i.description, {
|
|
63
|
+
[i.descriptionSmall]: x
|
|
64
|
+
});
|
|
65
|
+
return /* @__PURE__ */ e.jsxs(
|
|
66
|
+
"fieldset",
|
|
67
|
+
{
|
|
68
|
+
className: D,
|
|
69
|
+
disabled: S,
|
|
70
|
+
...b,
|
|
71
|
+
"aria-invalid": p,
|
|
72
|
+
"aria-describedby": u || void 0,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ e.jsx("legend", { className: F, children: r ? /* @__PURE__ */ e.jsxs(v, { tag: _, size: o, children: [
|
|
75
|
+
g,
|
|
76
|
+
m && /* @__PURE__ */ e.jsx(y, {})
|
|
77
|
+
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
78
|
+
s,
|
|
79
|
+
m && /* @__PURE__ */ e.jsx(y, {})
|
|
80
|
+
] }) }),
|
|
81
|
+
t && /* @__PURE__ */ e.jsx("span", { id: f, className: k, children: t }),
|
|
82
|
+
p && a && /* @__PURE__ */ e.jsx(
|
|
83
|
+
w,
|
|
84
|
+
{
|
|
85
|
+
id: h,
|
|
86
|
+
type: "invalid",
|
|
87
|
+
message: a,
|
|
88
|
+
className: i.systemFeedback
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ e.jsx("div", { className: i.childWrapper, children: l })
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
export {
|
|
97
|
+
H as D,
|
|
98
|
+
U as v
|
|
99
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as n } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as e } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { useState as A } from "react";
|
|
5
|
+
import { u as C } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
|
+
import { Asterisk as L } from "../asterisk.DDn-yX4P.js";
|
|
7
|
+
import { DSButton as $ } from "../button.C5opEJ6x.js";
|
|
8
|
+
import { DSSystemFeedback as E } from "../systemfeedback.ZzRUAVYX.js";
|
|
9
|
+
import { g as h } from "./helpers.B1JT5ShS.js";
|
|
10
|
+
import '../assets/InputPassword.DOAAzj-O.css';const q = "_input_l9tjo_226", R = "_input--invalid_l9tjo_343", V = "_input--small_l9tjo_350", O = "_input--has-leading-icon_l9tjo_404", F = "_input--has-action-button_l9tjo_407", M = "_input--has-second-action-button_l9tjo_410", T = "_input--has-affix_l9tjo_422", G = "_input--is-ready_l9tjo_436", J = "_root_l9tjo_443", K = "_hint_l9tjo_451", Q = "_label_l9tjo_451", U = "_wrapper_l9tjo_455", W = "_action-button_l9tjo_461", X = "_label--hidden_l9tjo_480", Y = "_label--disabled_l9tjo_493", Z = "_feedback_l9tjo_514", t = {
|
|
11
|
+
input: q,
|
|
12
|
+
"input--invalid": "_input--invalid_l9tjo_343",
|
|
13
|
+
inputInvalid: R,
|
|
14
|
+
"input--small": "_input--small_l9tjo_350",
|
|
15
|
+
inputSmall: V,
|
|
16
|
+
"input--has-leading-icon": "_input--has-leading-icon_l9tjo_404",
|
|
17
|
+
inputHasLeadingIcon: O,
|
|
18
|
+
"input--has-action-button": "_input--has-action-button_l9tjo_407",
|
|
19
|
+
inputHasActionButton: F,
|
|
20
|
+
"input--has-second-action-button": "_input--has-second-action-button_l9tjo_410",
|
|
21
|
+
inputHasSecondActionButton: M,
|
|
22
|
+
"input--has-affix": "_input--has-affix_l9tjo_422",
|
|
23
|
+
inputHasAffix: T,
|
|
24
|
+
"input--is-ready": "_input--is-ready_l9tjo_436",
|
|
25
|
+
inputIsReady: G,
|
|
26
|
+
root: J,
|
|
27
|
+
hint: K,
|
|
28
|
+
label: Q,
|
|
29
|
+
wrapper: U,
|
|
30
|
+
"action-button": "_action-button_l9tjo_461",
|
|
31
|
+
actionButton: W,
|
|
32
|
+
"label--hidden": "_label--hidden_l9tjo_480",
|
|
33
|
+
labelHidden: X,
|
|
34
|
+
"label--disabled": "_label--disabled_l9tjo_493",
|
|
35
|
+
labelDisabled: Y,
|
|
36
|
+
feedback: Z
|
|
37
|
+
}, z = ({ id: a, label: o }) => {
|
|
38
|
+
if (!a)
|
|
39
|
+
throw new Error(
|
|
40
|
+
h(
|
|
41
|
+
"DSInputPassword",
|
|
42
|
+
'A unique "id" prop is required. Please add an unique "id" prop to the DSInputPassword component.'
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
if (!o)
|
|
46
|
+
throw new Error(
|
|
47
|
+
h(
|
|
48
|
+
"DSInputPassword",
|
|
49
|
+
`A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputPassword component. If you don't want to display a label, set hideLabel={true}.`
|
|
50
|
+
)
|
|
51
|
+
);
|
|
52
|
+
}, ut = ({
|
|
53
|
+
id: a,
|
|
54
|
+
label: o,
|
|
55
|
+
autocomplete: j = "new-password",
|
|
56
|
+
className: f,
|
|
57
|
+
disabled: i = !1,
|
|
58
|
+
hidePasswordText: w = "Hide password",
|
|
59
|
+
hint: l,
|
|
60
|
+
hideLabel: y = !1,
|
|
61
|
+
invalid: s = !1,
|
|
62
|
+
readonly: c = !1,
|
|
63
|
+
required: r = !1,
|
|
64
|
+
showPasswordText: S = "Show password",
|
|
65
|
+
size: u = "medium",
|
|
66
|
+
systemFeedback: p,
|
|
67
|
+
...x
|
|
68
|
+
}) => {
|
|
69
|
+
process.env.NODE_ENV !== "production" && z({
|
|
70
|
+
id: a,
|
|
71
|
+
label: o
|
|
72
|
+
});
|
|
73
|
+
const [d, I] = A(!1), _ = `${a}-label`, b = `${a}-feedback`, m = `${a}-hint`, v = l ? ` ${m}` : "", B = C(y), H = e(t.root, f), g = e(t.input, {
|
|
74
|
+
// small input
|
|
75
|
+
[t.inputSmall]: u === "small",
|
|
76
|
+
// invalid state
|
|
77
|
+
[t.inputInvalid]: s,
|
|
78
|
+
// action button - input password always has an action button
|
|
79
|
+
[t.inputHasActionButton]: !0
|
|
80
|
+
}), D = e(t.label, {
|
|
81
|
+
// hide label only visually to keep them available for assistive technologies
|
|
82
|
+
[t.labelHidden]: B,
|
|
83
|
+
[t.labelDisabled]: i
|
|
84
|
+
}), P = e(t.actionButton, {
|
|
85
|
+
[t.actionButtonSmall]: u === "small"
|
|
86
|
+
}), N = () => {
|
|
87
|
+
I((k) => !k);
|
|
88
|
+
};
|
|
89
|
+
return /* @__PURE__ */ n.jsxs("div", { className: H, children: [
|
|
90
|
+
/* @__PURE__ */ n.jsxs("label", { className: D, id: _, htmlFor: a, children: [
|
|
91
|
+
o,
|
|
92
|
+
r && /* @__PURE__ */ n.jsx(L, {})
|
|
93
|
+
] }),
|
|
94
|
+
l && /* @__PURE__ */ n.jsx("div", { className: t.hint, id: m, children: l }),
|
|
95
|
+
s && p && /* @__PURE__ */ n.jsx(
|
|
96
|
+
E,
|
|
97
|
+
{
|
|
98
|
+
className: t.feedback,
|
|
99
|
+
message: p,
|
|
100
|
+
type: "invalid",
|
|
101
|
+
id: b
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ n.jsxs("div", { className: t.wrapper, children: [
|
|
105
|
+
/* @__PURE__ */ n.jsx(
|
|
106
|
+
"input",
|
|
107
|
+
{
|
|
108
|
+
className: g,
|
|
109
|
+
id: a,
|
|
110
|
+
...x,
|
|
111
|
+
"aria-labelledby": `${_}${v}`,
|
|
112
|
+
"aria-describedby": s && p ? b : void 0,
|
|
113
|
+
"aria-invalid": s,
|
|
114
|
+
"aria-disabled": c,
|
|
115
|
+
readOnly: c,
|
|
116
|
+
required: r,
|
|
117
|
+
disabled: i,
|
|
118
|
+
autoComplete: j,
|
|
119
|
+
type: d ? "text" : "password"
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
/* @__PURE__ */ n.jsx(
|
|
123
|
+
$,
|
|
124
|
+
{
|
|
125
|
+
hideLabel: !0,
|
|
126
|
+
theme: "light",
|
|
127
|
+
iconName: d ? "eye-closed" : "eye",
|
|
128
|
+
variant: "ghost",
|
|
129
|
+
className: P,
|
|
130
|
+
size: u,
|
|
131
|
+
onClick: N,
|
|
132
|
+
type: "button",
|
|
133
|
+
disabled: i,
|
|
134
|
+
children: d ? w : S
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
] })
|
|
138
|
+
] });
|
|
139
|
+
};
|
|
140
|
+
export {
|
|
141
|
+
ut as D,
|
|
142
|
+
z as v
|
|
143
|
+
};
|