@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,87 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as u } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
-
import { c as D } from "./index.CvOaL64Y.js";
|
|
4
|
-
import { D as b } from "./Fieldset.COGbZwry.js";
|
|
5
|
-
import { s as c } from "./RadioGroup.module.BBZwHDjW.js";
|
|
6
|
-
import l from "react";
|
|
7
|
-
import { g as s } from "./helpers.B1JT5ShS.js";
|
|
8
|
-
import { DSCheckbox as f } from "../checkbox.DETR3e3X.js";
|
|
9
|
-
const C = (e) => `The "${e}" prop is required. Please add the "${e}" prop to the DSCheckboxGroup component.`, k = ({
|
|
10
|
-
children: e,
|
|
11
|
-
description: o,
|
|
12
|
-
id: i,
|
|
13
|
-
legend: n,
|
|
14
|
-
systemFeedback: r
|
|
15
|
-
}) => {
|
|
16
|
-
if (!i && (o || r))
|
|
17
|
-
throw new Error(
|
|
18
|
-
s(
|
|
19
|
-
"DSCheckboxGroup",
|
|
20
|
-
'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSCheckboxGroup component.'
|
|
21
|
-
)
|
|
22
|
-
);
|
|
23
|
-
if (!n)
|
|
24
|
-
throw new Error(
|
|
25
|
-
s("DSCheckboxGroup", C("legend"))
|
|
26
|
-
);
|
|
27
|
-
if (!e)
|
|
28
|
-
throw new Error(
|
|
29
|
-
s(
|
|
30
|
-
"DSCheckboxGroup",
|
|
31
|
-
"The component requires DSCheckbox components to be explicitly set as its children. Ensure that you include individual DSCheckbox components within the DSCheckboxGroup to create a cohesive checkbox group."
|
|
32
|
-
)
|
|
33
|
-
);
|
|
34
|
-
l.Children.forEach(e, (t) => {
|
|
35
|
-
if (!(l.isValidElement(t) && t.type === f))
|
|
36
|
-
throw new Error(
|
|
37
|
-
s(
|
|
38
|
-
"DSCheckboxGroup",
|
|
39
|
-
"The component requires the children to be DSCheckbox elements. Ensure that you include individual DSCheckbox components within the DSCheckboxGroup to create a cohesive checkbox group."
|
|
40
|
-
)
|
|
41
|
-
);
|
|
42
|
-
});
|
|
43
|
-
}, y = ({
|
|
44
|
-
children: e,
|
|
45
|
-
legend: o,
|
|
46
|
-
alignment: i = "vertical",
|
|
47
|
-
className: n,
|
|
48
|
-
description: r,
|
|
49
|
-
disabled: t = !1,
|
|
50
|
-
id: h,
|
|
51
|
-
invalid: a = !1,
|
|
52
|
-
required: m = !1,
|
|
53
|
-
systemFeedback: p,
|
|
54
|
-
...x
|
|
55
|
-
}) => {
|
|
56
|
-
process.env.NODE_ENV !== "production" && k({
|
|
57
|
-
children: e,
|
|
58
|
-
legend: o,
|
|
59
|
-
description: r,
|
|
60
|
-
id: h,
|
|
61
|
-
systemFeedback: p
|
|
62
|
-
});
|
|
63
|
-
const d = D(c.group, {
|
|
64
|
-
// In case of longer copy, use vertical alignment
|
|
65
|
-
[c.groupHorizontal]: i === "horizontal",
|
|
66
|
-
[c.groupInvalid]: a && !!p
|
|
67
|
-
});
|
|
68
|
-
return /* @__PURE__ */ u.jsx(
|
|
69
|
-
b,
|
|
70
|
-
{
|
|
71
|
-
id: h,
|
|
72
|
-
legend: o,
|
|
73
|
-
className: n,
|
|
74
|
-
description: r,
|
|
75
|
-
disabled: t,
|
|
76
|
-
required: m,
|
|
77
|
-
invalid: a,
|
|
78
|
-
systemFeedback: p,
|
|
79
|
-
...x,
|
|
80
|
-
children: /* @__PURE__ */ u.jsx("div", { className: d, children: e })
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
};
|
|
84
|
-
export {
|
|
85
|
-
y as D,
|
|
86
|
-
k as v
|
|
87
|
-
};
|
|
@@ -1,99 +0,0 @@
|
|
|
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 z } from "../asterisk.DDn-yX4P.js";
|
|
6
|
-
import { DSHeading as F } from "../heading.CAkraI2D.js";
|
|
7
|
-
import { DSSystemFeedback as k } from "../systemfeedback.ZzRUAVYX.js";
|
|
8
|
-
import { g as h } from "./helpers.B1JT5ShS.js";
|
|
9
|
-
import '../assets/Fieldset.qHYeUFZt.css';const v = "_root_xfwzz_76", N = "_child-wrapper_xfwzz_82", E = "_legend_xfwzz_89", M = "_legend--utility--m_xfwzz_93", q = "_description_xfwzz_106", C = "_description--small_xfwzz_121", P = "_system-feedback_xfwzz_125", i = {
|
|
10
|
-
root: v,
|
|
11
|
-
"child-wrapper": "_child-wrapper_xfwzz_82",
|
|
12
|
-
childWrapper: N,
|
|
13
|
-
legend: E,
|
|
14
|
-
"legend--utility--m": "_legend--utility--m_xfwzz_93",
|
|
15
|
-
legendUtilityM: M,
|
|
16
|
-
description: q,
|
|
17
|
-
"description--small": "_description--small_xfwzz_121",
|
|
18
|
-
descriptionSmall: C,
|
|
19
|
-
"system-feedback": "_system-feedback_xfwzz_125",
|
|
20
|
-
systemFeedback: P
|
|
21
|
-
}, T = ({
|
|
22
|
-
description: a,
|
|
23
|
-
id: s,
|
|
24
|
-
legend: n,
|
|
25
|
-
systemFeedback: t
|
|
26
|
-
}) => {
|
|
27
|
-
if (!s && (a || t))
|
|
28
|
-
throw new Error(
|
|
29
|
-
h(
|
|
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
|
-
h(
|
|
37
|
-
"DSFieldset",
|
|
38
|
-
"The legend prop is required. Please add the legend prop to the DSFieldset component."
|
|
39
|
-
)
|
|
40
|
-
);
|
|
41
|
-
}, H = ({
|
|
42
|
-
children: a,
|
|
43
|
-
legend: s,
|
|
44
|
-
className: n,
|
|
45
|
-
description: t,
|
|
46
|
-
disabled: w = !1,
|
|
47
|
-
id: d,
|
|
48
|
-
invalid: p = !1,
|
|
49
|
-
required: m = !1,
|
|
50
|
-
systemFeedback: o,
|
|
51
|
-
...y
|
|
52
|
-
}) => {
|
|
53
|
-
process.env.NODE_ENV !== "production" && T({ description: t, id: d, legend: s, systemFeedback: o });
|
|
54
|
-
let r, _, f;
|
|
55
|
-
const l = typeof s == "object" && s !== void 0;
|
|
56
|
-
l && ({ headingSize: r, headingTag: _, headingText: f } = s);
|
|
57
|
-
const g = `${d}-feedback`, x = `${d}-description`, j = [
|
|
58
|
-
o && g,
|
|
59
|
-
t && x
|
|
60
|
-
].filter(Boolean).join(" "), S = !l || r === "small" || r === "small-uppercase", b = c(i.root, n), u = c(i.legend, {
|
|
61
|
-
[i.legendUtilityM]: !l
|
|
62
|
-
}), D = c(i.description, {
|
|
63
|
-
[i.descriptionSmall]: S
|
|
64
|
-
});
|
|
65
|
-
return /* @__PURE__ */ e.jsxs(
|
|
66
|
-
"fieldset",
|
|
67
|
-
{
|
|
68
|
-
className: b,
|
|
69
|
-
disabled: w,
|
|
70
|
-
...y,
|
|
71
|
-
"aria-invalid": p,
|
|
72
|
-
"aria-describedby": j || void 0,
|
|
73
|
-
children: [
|
|
74
|
-
/* @__PURE__ */ e.jsx("legend", { className: u, children: l ? /* @__PURE__ */ e.jsxs(F, { tag: _, size: r, children: [
|
|
75
|
-
f,
|
|
76
|
-
m && /* @__PURE__ */ e.jsx(z, {})
|
|
77
|
-
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
78
|
-
s,
|
|
79
|
-
m && /* @__PURE__ */ e.jsx(z, {})
|
|
80
|
-
] }) }),
|
|
81
|
-
t && /* @__PURE__ */ e.jsx("span", { id: x, className: D, children: t }),
|
|
82
|
-
p && o && /* @__PURE__ */ e.jsx(
|
|
83
|
-
k,
|
|
84
|
-
{
|
|
85
|
-
id: g,
|
|
86
|
-
type: "invalid",
|
|
87
|
-
message: o,
|
|
88
|
-
className: i.systemFeedback
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
/* @__PURE__ */ e.jsx("div", { className: i.childWrapper, children: a })
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
};
|
|
96
|
-
export {
|
|
97
|
-
H as D,
|
|
98
|
-
T as v
|
|
99
|
-
};
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as a } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
-
import { c as i } from "./index.CvOaL64Y.js";
|
|
4
|
-
import { useState as A } from "react";
|
|
5
|
-
import { u as D } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
|
-
import { Asterisk as C } from "../asterisk.DDn-yX4P.js";
|
|
7
|
-
import { DSButton as L } from "../button.DH0h6uPs.js";
|
|
8
|
-
import { DSSystemFeedback as $ } from "../systemfeedback.ZzRUAVYX.js";
|
|
9
|
-
import { g as x } from "./helpers.B1JT5ShS.js";
|
|
10
|
-
import '../assets/InputPassword.Cf394z47.css';const E = "_input_1pqhx_226", R = "_input--invalid_1pqhx_338", V = "_input--small_1pqhx_345", O = "_input--has-leading-icon_1pqhx_399", F = "_input--has-action-button_1pqhx_402", M = "_input--has-second-action-button_1pqhx_405", T = "_input--has-affix_1pqhx_417", G = "_input--is-ready_1pqhx_431", J = "_root_1pqhx_438", K = "_hint_1pqhx_446", Q = "_label_1pqhx_446", U = "_wrapper_1pqhx_450", W = "_action-button_1pqhx_456", X = "_label--hidden_1pqhx_475", Y = "_feedback_1pqhx_504", t = {
|
|
11
|
-
input: E,
|
|
12
|
-
"input--invalid": "_input--invalid_1pqhx_338",
|
|
13
|
-
inputInvalid: R,
|
|
14
|
-
"input--small": "_input--small_1pqhx_345",
|
|
15
|
-
inputSmall: V,
|
|
16
|
-
"input--has-leading-icon": "_input--has-leading-icon_1pqhx_399",
|
|
17
|
-
inputHasLeadingIcon: O,
|
|
18
|
-
"input--has-action-button": "_input--has-action-button_1pqhx_402",
|
|
19
|
-
inputHasActionButton: F,
|
|
20
|
-
"input--has-second-action-button": "_input--has-second-action-button_1pqhx_405",
|
|
21
|
-
inputHasSecondActionButton: M,
|
|
22
|
-
"input--has-affix": "_input--has-affix_1pqhx_417",
|
|
23
|
-
inputHasAffix: T,
|
|
24
|
-
"input--is-ready": "_input--is-ready_1pqhx_431",
|
|
25
|
-
inputIsReady: G,
|
|
26
|
-
root: J,
|
|
27
|
-
hint: K,
|
|
28
|
-
label: Q,
|
|
29
|
-
wrapper: U,
|
|
30
|
-
"action-button": "_action-button_1pqhx_456",
|
|
31
|
-
actionButton: W,
|
|
32
|
-
"label--hidden": "_label--hidden_1pqhx_475",
|
|
33
|
-
labelHidden: X,
|
|
34
|
-
feedback: Y
|
|
35
|
-
}, Z = ({ id: n, label: s }) => {
|
|
36
|
-
if (!n)
|
|
37
|
-
throw new Error(
|
|
38
|
-
x(
|
|
39
|
-
"DSInputPassword",
|
|
40
|
-
'A unique "id" prop is required. Please add an unique "id" prop to the DSInputPassword component.'
|
|
41
|
-
)
|
|
42
|
-
);
|
|
43
|
-
if (!s)
|
|
44
|
-
throw new Error(
|
|
45
|
-
x(
|
|
46
|
-
"DSInputPassword",
|
|
47
|
-
`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}.`
|
|
48
|
-
)
|
|
49
|
-
);
|
|
50
|
-
}, pt = ({
|
|
51
|
-
id: n,
|
|
52
|
-
label: s,
|
|
53
|
-
autocomplete: b = "new-password",
|
|
54
|
-
className: f,
|
|
55
|
-
disabled: c = !1,
|
|
56
|
-
hidePasswordText: q = "Hide password",
|
|
57
|
-
hint: e,
|
|
58
|
-
hideLabel: w = !1,
|
|
59
|
-
invalid: o = !1,
|
|
60
|
-
readonly: r = !1,
|
|
61
|
-
required: d = !1,
|
|
62
|
-
showPasswordText: y = "Show password",
|
|
63
|
-
size: p = "medium",
|
|
64
|
-
systemFeedback: l,
|
|
65
|
-
...S
|
|
66
|
-
}) => {
|
|
67
|
-
process.env.NODE_ENV !== "production" && Z({
|
|
68
|
-
id: n,
|
|
69
|
-
label: s
|
|
70
|
-
});
|
|
71
|
-
const [u, I] = A(!1), _ = `${n}-label`, h = `${n}-feedback`, m = `${n}-hint`, v = e ? ` ${m}` : "", B = D(w), H = i(t.root, f), g = i(t.input, {
|
|
72
|
-
// small input
|
|
73
|
-
[t.inputSmall]: p === "small",
|
|
74
|
-
// invalid state
|
|
75
|
-
[t.inputInvalid]: o,
|
|
76
|
-
// action button - input password always has an action button
|
|
77
|
-
[t.inputHasActionButton]: !0
|
|
78
|
-
}), P = i(t.label, {
|
|
79
|
-
// hide label only visually to keep them available for assistive technologies
|
|
80
|
-
[t.labelHidden]: B
|
|
81
|
-
}), N = i(t.actionButton, {
|
|
82
|
-
[t.actionButtonSmall]: p === "small"
|
|
83
|
-
}), j = () => {
|
|
84
|
-
I((k) => !k);
|
|
85
|
-
};
|
|
86
|
-
return /* @__PURE__ */ a.jsxs("div", { className: H, children: [
|
|
87
|
-
/* @__PURE__ */ a.jsxs("label", { className: P, id: _, htmlFor: n, children: [
|
|
88
|
-
s,
|
|
89
|
-
d && /* @__PURE__ */ a.jsx(C, {})
|
|
90
|
-
] }),
|
|
91
|
-
e && /* @__PURE__ */ a.jsx("div", { className: t.hint, id: m, children: e }),
|
|
92
|
-
o && l && /* @__PURE__ */ a.jsx(
|
|
93
|
-
$,
|
|
94
|
-
{
|
|
95
|
-
className: t.feedback,
|
|
96
|
-
message: l,
|
|
97
|
-
type: "invalid",
|
|
98
|
-
id: h
|
|
99
|
-
}
|
|
100
|
-
),
|
|
101
|
-
/* @__PURE__ */ a.jsxs("div", { className: t.wrapper, children: [
|
|
102
|
-
/* @__PURE__ */ a.jsx(
|
|
103
|
-
"input",
|
|
104
|
-
{
|
|
105
|
-
className: g,
|
|
106
|
-
id: n,
|
|
107
|
-
...S,
|
|
108
|
-
"aria-labelledby": `${_}${v}`,
|
|
109
|
-
"aria-describedby": o && l ? h : void 0,
|
|
110
|
-
"aria-invalid": o,
|
|
111
|
-
"aria-disabled": r,
|
|
112
|
-
readOnly: r,
|
|
113
|
-
required: d,
|
|
114
|
-
disabled: c,
|
|
115
|
-
autoComplete: b,
|
|
116
|
-
type: u ? "text" : "password"
|
|
117
|
-
}
|
|
118
|
-
),
|
|
119
|
-
/* @__PURE__ */ a.jsx(
|
|
120
|
-
L,
|
|
121
|
-
{
|
|
122
|
-
hideLabel: !0,
|
|
123
|
-
theme: "light",
|
|
124
|
-
iconName: u ? "eye-closed" : "eye",
|
|
125
|
-
variant: "ghost",
|
|
126
|
-
className: N,
|
|
127
|
-
size: p,
|
|
128
|
-
onClick: j,
|
|
129
|
-
type: "button",
|
|
130
|
-
disabled: c,
|
|
131
|
-
children: u ? q : y
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
] })
|
|
135
|
-
] });
|
|
136
|
-
};
|
|
137
|
-
export {
|
|
138
|
-
pt as D,
|
|
139
|
-
Z as v
|
|
140
|
-
};
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as e } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
-
import { c } from "./index.CvOaL64Y.js";
|
|
4
|
-
import { useState as G, useRef as N, useEffect as w } from "react";
|
|
5
|
-
import { g as S, a as J } from "./helpers.B1JT5ShS.js";
|
|
6
|
-
import { u as K } from "./useBreakpoint.5xBNDiCf.js";
|
|
7
|
-
import { Asterisk as Q } from "../asterisk.DDn-yX4P.js";
|
|
8
|
-
import { DSButton as D } from "../button.DH0h6uPs.js";
|
|
9
|
-
import { DSSystemFeedback as U } from "../systemfeedback.ZzRUAVYX.js";
|
|
10
|
-
import '../assets/InputSearch.eCRQoxjN.css';const X = "_input_8z3ht_226", Y = "_input--invalid_8z3ht_338", Z = "_input--small_8z3ht_345", tt = "_input--has-leading-icon_8z3ht_399", nt = "_input--has-action-button_8z3ht_402", et = "_input--has-second-action-button_8z3ht_405", at = "_input--has-affix_8z3ht_417", st = "_input--is-ready_8z3ht_431", ot = "_root_8z3ht_438", it = "_hint_8z3ht_446", ct = "_label_8z3ht_446", ut = "_wrapper_8z3ht_450", lt = "_action-button_8z3ht_456", rt = "_second-action-button_8z3ht_460", pt = "_label--hidden_8z3ht_479", ht = "_feedback_8z3ht_508", t = {
|
|
11
|
-
input: X,
|
|
12
|
-
"input--invalid": "_input--invalid_8z3ht_338",
|
|
13
|
-
inputInvalid: Y,
|
|
14
|
-
"input--small": "_input--small_8z3ht_345",
|
|
15
|
-
inputSmall: Z,
|
|
16
|
-
"input--has-leading-icon": "_input--has-leading-icon_8z3ht_399",
|
|
17
|
-
inputHasLeadingIcon: tt,
|
|
18
|
-
"input--has-action-button": "_input--has-action-button_8z3ht_402",
|
|
19
|
-
inputHasActionButton: nt,
|
|
20
|
-
"input--has-second-action-button": "_input--has-second-action-button_8z3ht_405",
|
|
21
|
-
inputHasSecondActionButton: et,
|
|
22
|
-
"input--has-affix": "_input--has-affix_8z3ht_417",
|
|
23
|
-
inputHasAffix: at,
|
|
24
|
-
"input--is-ready": "_input--is-ready_8z3ht_431",
|
|
25
|
-
inputIsReady: st,
|
|
26
|
-
root: ot,
|
|
27
|
-
hint: it,
|
|
28
|
-
label: ct,
|
|
29
|
-
wrapper: ut,
|
|
30
|
-
"action-button": "_action-button_8z3ht_456",
|
|
31
|
-
actionButton: lt,
|
|
32
|
-
"second-action-button": "_second-action-button_8z3ht_460",
|
|
33
|
-
secondActionButton: rt,
|
|
34
|
-
"label--hidden": "_label--hidden_8z3ht_479",
|
|
35
|
-
labelHidden: pt,
|
|
36
|
-
feedback: ht
|
|
37
|
-
}, _t = ({ id: n, label: u }) => {
|
|
38
|
-
if (!n)
|
|
39
|
-
throw new Error(
|
|
40
|
-
S(
|
|
41
|
-
"DSInputSearch",
|
|
42
|
-
'A unique "id" prop is required. Please add an unique "id" prop to the DSInputSearch component.'
|
|
43
|
-
)
|
|
44
|
-
);
|
|
45
|
-
if (!u)
|
|
46
|
-
throw new Error(
|
|
47
|
-
S(
|
|
48
|
-
"DSInputSearch",
|
|
49
|
-
`A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputSearch component. If you don't want to display a label, set hideLabel={true}.`
|
|
50
|
-
)
|
|
51
|
-
);
|
|
52
|
-
}, dt = (n) => !!J(n, "form"), Bt = ({
|
|
53
|
-
id: n,
|
|
54
|
-
label: u,
|
|
55
|
-
className: A,
|
|
56
|
-
clearButtonLabel: H = "Clear search field",
|
|
57
|
-
disabled: l = !1,
|
|
58
|
-
hint: d,
|
|
59
|
-
hideLabel: E = !1,
|
|
60
|
-
invalid: r = !1,
|
|
61
|
-
readonly: s = !1,
|
|
62
|
-
required: I = !1,
|
|
63
|
-
size: o = "medium",
|
|
64
|
-
submitButtonLabel: j = "Search",
|
|
65
|
-
systemFeedback: m,
|
|
66
|
-
value: b,
|
|
67
|
-
submitButtonOnClick: C,
|
|
68
|
-
onChange: g,
|
|
69
|
-
...k
|
|
70
|
-
}) => {
|
|
71
|
-
process.env.NODE_ENV !== "production" && _t({
|
|
72
|
-
id: n,
|
|
73
|
-
label: u
|
|
74
|
-
});
|
|
75
|
-
const [p, v] = G(b), f = N(null), h = N(null), L = K(E);
|
|
76
|
-
w(() => {
|
|
77
|
-
v(b);
|
|
78
|
-
}, [b]), w(() => {
|
|
79
|
-
f.current && !dt(f.current) && process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && console.warn(
|
|
80
|
-
S(
|
|
81
|
-
"DSInputSearch",
|
|
82
|
-
`The DSInputSearch component with the id "${n}" is not within a form element. This may cause issues with form submission. Please ensure the DSInputSearch component is within a form element.`
|
|
83
|
-
)
|
|
84
|
-
);
|
|
85
|
-
}, []);
|
|
86
|
-
const z = `${n}-label`, B = `${n}-feedback`, y = `${n}-hint`, V = d ? ` ${y}` : "", x = p !== "" && p !== void 0 && p !== null, O = c(t.root, A), P = c(t.input, {
|
|
87
|
-
// small input
|
|
88
|
-
[t.inputSmall]: o === "small",
|
|
89
|
-
// invalid state
|
|
90
|
-
[t.inputInvalid]: r,
|
|
91
|
-
// action button - input password always has an action button
|
|
92
|
-
[t.inputHasActionButton]: !0,
|
|
93
|
-
// action second action button
|
|
94
|
-
[t.inputHasSecondActionButton]: x && !s && !l
|
|
95
|
-
}), $ = c(t.label, {
|
|
96
|
-
// hide label only visually to keep them available for assistive technologies
|
|
97
|
-
[t.labelHidden]: L
|
|
98
|
-
}), R = c(t.actionButton, {
|
|
99
|
-
[t.actionButtonSmall]: o === "small"
|
|
100
|
-
}), q = c(t.secondActionButton, {
|
|
101
|
-
[t.secondActionButtonSmall]: o === "small"
|
|
102
|
-
}), T = (a, i) => {
|
|
103
|
-
const W = Object.getPrototypeOf(a), _ = Object.getOwnPropertyDescriptor(
|
|
104
|
-
W,
|
|
105
|
-
"value"
|
|
106
|
-
);
|
|
107
|
-
_ != null && _.set ? _.set.call(a, i) : a.value = i;
|
|
108
|
-
}, F = () => {
|
|
109
|
-
var i;
|
|
110
|
-
if (!h.current) return;
|
|
111
|
-
T(h.current, "");
|
|
112
|
-
const a = new Event("change", { bubbles: !0 });
|
|
113
|
-
(i = h.current) == null || i.dispatchEvent(a);
|
|
114
|
-
}, M = (a) => {
|
|
115
|
-
v(a.target.value), g && g(a);
|
|
116
|
-
};
|
|
117
|
-
return /* @__PURE__ */ e.jsxs("div", { className: O, ref: f, children: [
|
|
118
|
-
/* @__PURE__ */ e.jsxs("label", { className: $, id: z, htmlFor: n, children: [
|
|
119
|
-
u,
|
|
120
|
-
I && /* @__PURE__ */ e.jsx(Q, {})
|
|
121
|
-
] }),
|
|
122
|
-
d && /* @__PURE__ */ e.jsx("div", { className: t.hint, id: y, children: d }),
|
|
123
|
-
r && m && /* @__PURE__ */ e.jsx(
|
|
124
|
-
U,
|
|
125
|
-
{
|
|
126
|
-
className: t.feedback,
|
|
127
|
-
message: m,
|
|
128
|
-
type: "invalid",
|
|
129
|
-
id: B
|
|
130
|
-
}
|
|
131
|
-
),
|
|
132
|
-
/* @__PURE__ */ e.jsxs("div", { className: t.wrapper, children: [
|
|
133
|
-
/* @__PURE__ */ e.jsx(
|
|
134
|
-
"input",
|
|
135
|
-
{
|
|
136
|
-
className: P,
|
|
137
|
-
id: n,
|
|
138
|
-
ref: h,
|
|
139
|
-
...k,
|
|
140
|
-
"aria-labelledby": `${z}${V}`,
|
|
141
|
-
"aria-describedby": r && m ? B : void 0,
|
|
142
|
-
"aria-invalid": r,
|
|
143
|
-
"aria-disabled": s,
|
|
144
|
-
readOnly: s,
|
|
145
|
-
required: I,
|
|
146
|
-
disabled: l,
|
|
147
|
-
type: "search",
|
|
148
|
-
value: p,
|
|
149
|
-
onChange: M
|
|
150
|
-
}
|
|
151
|
-
),
|
|
152
|
-
x && !s && !l && /* @__PURE__ */ e.jsx(
|
|
153
|
-
D,
|
|
154
|
-
{
|
|
155
|
-
hideLabel: !0,
|
|
156
|
-
theme: "light",
|
|
157
|
-
iconName: "cross",
|
|
158
|
-
className: q,
|
|
159
|
-
variant: "ghost",
|
|
160
|
-
size: o,
|
|
161
|
-
onClick: F,
|
|
162
|
-
type: "button",
|
|
163
|
-
tabIndex: -1,
|
|
164
|
-
children: H
|
|
165
|
-
}
|
|
166
|
-
),
|
|
167
|
-
/* @__PURE__ */ e.jsx(
|
|
168
|
-
D,
|
|
169
|
-
{
|
|
170
|
-
hideLabel: !0,
|
|
171
|
-
theme: "light",
|
|
172
|
-
iconName: "magnifying-glass",
|
|
173
|
-
className: R,
|
|
174
|
-
variant: "ghost",
|
|
175
|
-
size: o,
|
|
176
|
-
onClick: C,
|
|
177
|
-
type: "submit",
|
|
178
|
-
disabled: l || s,
|
|
179
|
-
children: j
|
|
180
|
-
}
|
|
181
|
-
)
|
|
182
|
-
] })
|
|
183
|
-
] });
|
|
184
|
-
};
|
|
185
|
-
export {
|
|
186
|
-
Bt as D,
|
|
187
|
-
dt as i,
|
|
188
|
-
_t as v
|
|
189
|
-
};
|