@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,191 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as s } 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 h } from "./helpers.B1JT5ShS.js";
|
|
10
|
-
import '../assets/Select.BptsMxz4.css';const V = "_root_15gy6_226", Z = "_hint_15gy6_234", J = "_label_15gy6_234", K = "_wrapper_15gy6_238", Q = "_affix_15gy6_244", U = "_affix--small_15gy6_266", X = "_affix--disabled_15gy6_280", Y = "_prefix_15gy6_283", z = "_affix--readonly_15gy6_286", G = "_suffix_15gy6_296", ee = "_action-button_15gy6_303", te = "_label--hidden_15gy6_322", se = "_feedback_15gy6_351", ae = "_select-wrapper_15gy6_356", ne = "_select_15gy6_356", le = "_select--invalid_15gy6_474", ce = "_select--small_15gy6_481", oe = "_input--has-leading-icon_15gy6_535", ie = "_input--has-action-button_15gy6_538", re = "_input--has-second-action-button_15gy6_541", _e = "_select--has-leading-icon_15gy6_544", de = "_select--has-action-button_15gy6_547", fe = "_select--has-second-action-button_15gy6_550", ue = "_select--has-affix_15gy6_553", he = "_select--is-ready_15gy6_567", pe = "_select--placeholder_15gy6_584", ge = "_chevron_15gy6_593", ye = "_chevron--small_15gy6_597", be = "_chevron--disabled_15gy6_600", e = {
|
|
11
|
-
root: V,
|
|
12
|
-
hint: Z,
|
|
13
|
-
label: J,
|
|
14
|
-
wrapper: K,
|
|
15
|
-
affix: Q,
|
|
16
|
-
"affix--small": "_affix--small_15gy6_266",
|
|
17
|
-
affixSmall: U,
|
|
18
|
-
"affix--disabled": "_affix--disabled_15gy6_280",
|
|
19
|
-
affixDisabled: X,
|
|
20
|
-
prefix: Y,
|
|
21
|
-
"affix--readonly": "_affix--readonly_15gy6_286",
|
|
22
|
-
affixReadonly: z,
|
|
23
|
-
suffix: G,
|
|
24
|
-
"action-button": "_action-button_15gy6_303",
|
|
25
|
-
actionButton: ee,
|
|
26
|
-
"label--hidden": "_label--hidden_15gy6_322",
|
|
27
|
-
labelHidden: te,
|
|
28
|
-
feedback: se,
|
|
29
|
-
"select-wrapper": "_select-wrapper_15gy6_356",
|
|
30
|
-
selectWrapper: ae,
|
|
31
|
-
select: ne,
|
|
32
|
-
"select--invalid": "_select--invalid_15gy6_474",
|
|
33
|
-
selectInvalid: le,
|
|
34
|
-
"select--small": "_select--small_15gy6_481",
|
|
35
|
-
selectSmall: ce,
|
|
36
|
-
"input--has-leading-icon": "_input--has-leading-icon_15gy6_535",
|
|
37
|
-
inputHasLeadingIcon: oe,
|
|
38
|
-
"input--has-action-button": "_input--has-action-button_15gy6_538",
|
|
39
|
-
inputHasActionButton: ie,
|
|
40
|
-
"input--has-second-action-button": "_input--has-second-action-button_15gy6_541",
|
|
41
|
-
inputHasSecondActionButton: re,
|
|
42
|
-
"select--has-leading-icon": "_select--has-leading-icon_15gy6_544",
|
|
43
|
-
selectHasLeadingIcon: _e,
|
|
44
|
-
"select--has-action-button": "_select--has-action-button_15gy6_547",
|
|
45
|
-
selectHasActionButton: de,
|
|
46
|
-
"select--has-second-action-button": "_select--has-second-action-button_15gy6_550",
|
|
47
|
-
selectHasSecondActionButton: fe,
|
|
48
|
-
"select--has-affix": "_select--has-affix_15gy6_553",
|
|
49
|
-
selectHasAffix: ue,
|
|
50
|
-
"select--is-ready": "_select--is-ready_15gy6_567",
|
|
51
|
-
selectIsReady: he,
|
|
52
|
-
"select--placeholder": "_select--placeholder_15gy6_584",
|
|
53
|
-
selectPlaceholder: pe,
|
|
54
|
-
chevron: ge,
|
|
55
|
-
"chevron--small": "_chevron--small_15gy6_597",
|
|
56
|
-
chevronSmall: ye,
|
|
57
|
-
"chevron--disabled": "_chevron--disabled_15gy6_600",
|
|
58
|
-
chevronDisabled: be
|
|
59
|
-
}, Be = ["medium", "small"], me = ({
|
|
60
|
-
id: t,
|
|
61
|
-
label: l,
|
|
62
|
-
options: n
|
|
63
|
-
}) => {
|
|
64
|
-
if (!t)
|
|
65
|
-
throw new Error(
|
|
66
|
-
h(
|
|
67
|
-
"DSSelect",
|
|
68
|
-
'A unique "id" prop is required. Please add an unique "id" prop to the DSSelect component.'
|
|
69
|
-
)
|
|
70
|
-
);
|
|
71
|
-
if (!l)
|
|
72
|
-
throw new Error(
|
|
73
|
-
h(
|
|
74
|
-
"DSSelect",
|
|
75
|
-
`A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSSelect component. If you don't want to display a label, set hideLabel={true}.`
|
|
76
|
-
)
|
|
77
|
-
);
|
|
78
|
-
if (!n || n.length === 0)
|
|
79
|
-
throw new Error(
|
|
80
|
-
h(
|
|
81
|
-
"DSSelect",
|
|
82
|
-
'Options are always required. Please add an "options" prop to the DSSelect component.'
|
|
83
|
-
)
|
|
84
|
-
);
|
|
85
|
-
}, xe = (t, l, n) => t === "" || l !== void 0 && l !== "" ? !1 : !(n !== void 0 && n !== ""), Ee = ({
|
|
86
|
-
id: t,
|
|
87
|
-
label: l,
|
|
88
|
-
options: n,
|
|
89
|
-
className: H,
|
|
90
|
-
defaultValue: p,
|
|
91
|
-
disabled: g = !1,
|
|
92
|
-
hideLabel: I = !1,
|
|
93
|
-
hint: d,
|
|
94
|
-
invalid: r = !1,
|
|
95
|
-
placeholder: f = "Select",
|
|
96
|
-
required: y = !1,
|
|
97
|
-
size: b = "medium",
|
|
98
|
-
systemFeedback: u,
|
|
99
|
-
value: m,
|
|
100
|
-
...w
|
|
101
|
-
}) => {
|
|
102
|
-
process.env.NODE_ENV !== "production" && me({
|
|
103
|
-
id: t,
|
|
104
|
-
label: l,
|
|
105
|
-
options: n
|
|
106
|
-
});
|
|
107
|
-
const i = C(null), [j, A] = q(
|
|
108
|
-
xe(f, p, m)
|
|
109
|
-
);
|
|
110
|
-
W(() => {
|
|
111
|
-
if (!i.current) return;
|
|
112
|
-
const c = () => {
|
|
113
|
-
if (!i.current) return;
|
|
114
|
-
const o = i.current.value;
|
|
115
|
-
A(o === "");
|
|
116
|
-
}, a = i.current;
|
|
117
|
-
return a.addEventListener("change", c), () => {
|
|
118
|
-
a.removeEventListener("change", c);
|
|
119
|
-
};
|
|
120
|
-
}, []);
|
|
121
|
-
const B = F(I), x = `${t}-label`, v = `${t}-feedback`, S = `${t}-hint`, E = d ? ` ${S}` : "", L = (c) => [
|
|
122
|
-
f && /* @__PURE__ */ s.jsx("option", { value: "", children: f }, `${t}-hidden-option-disabled-placeholder`),
|
|
123
|
-
...c.map((a) => {
|
|
124
|
-
if ("options" in a) {
|
|
125
|
-
const { label: o, options: $ } = a;
|
|
126
|
-
return /* @__PURE__ */ s.jsx("optgroup", { label: o, children: $.map(D) }, o);
|
|
127
|
-
} else
|
|
128
|
-
return D(a);
|
|
129
|
-
})
|
|
130
|
-
], D = ({ label: c, value: a, isDisabled: o }) => /* @__PURE__ */ s.jsx("option", { value: a, disabled: o, children: c }, a), N = _(e.root, H), P = _(e.select, {
|
|
131
|
-
[e.selectSmall]: b === "small",
|
|
132
|
-
[e.selectInvalid]: r,
|
|
133
|
-
[e.selectPlaceholder]: j
|
|
134
|
-
}), k = _(e.label, {
|
|
135
|
-
// hide label only visually to keep them available for assistive technologies
|
|
136
|
-
[e.labelHidden]: B
|
|
137
|
-
}), R = _(e.chevron, {
|
|
138
|
-
[e.chevronSmall]: b === "small",
|
|
139
|
-
[e.chevronDisabled]: g
|
|
140
|
-
});
|
|
141
|
-
return /* @__PURE__ */ s.jsxs("div", { className: N, children: [
|
|
142
|
-
/* @__PURE__ */ s.jsxs("label", { className: k, id: x, htmlFor: t, children: [
|
|
143
|
-
l,
|
|
144
|
-
y && /* @__PURE__ */ s.jsx(M, {})
|
|
145
|
-
] }),
|
|
146
|
-
d && /* @__PURE__ */ s.jsx("div", { className: e.hint, id: S, children: d }),
|
|
147
|
-
r && u && /* @__PURE__ */ s.jsx(
|
|
148
|
-
T,
|
|
149
|
-
{
|
|
150
|
-
className: e.feedback,
|
|
151
|
-
message: u,
|
|
152
|
-
type: "invalid",
|
|
153
|
-
id: v,
|
|
154
|
-
"aria-live": "assertive"
|
|
155
|
-
}
|
|
156
|
-
),
|
|
157
|
-
/* @__PURE__ */ s.jsxs("div", { className: e.selectWrapper, children: [
|
|
158
|
-
/* @__PURE__ */ s.jsx(
|
|
159
|
-
"select",
|
|
160
|
-
{
|
|
161
|
-
...w,
|
|
162
|
-
id: t,
|
|
163
|
-
ref: i,
|
|
164
|
-
className: P,
|
|
165
|
-
"aria-labelledby": `${x}${E}`,
|
|
166
|
-
"aria-describedby": r && u ? v : void 0,
|
|
167
|
-
"aria-invalid": r,
|
|
168
|
-
defaultValue: p,
|
|
169
|
-
value: m,
|
|
170
|
-
disabled: g,
|
|
171
|
-
required: y,
|
|
172
|
-
children: L(n)
|
|
173
|
-
}
|
|
174
|
-
),
|
|
175
|
-
/* @__PURE__ */ s.jsx(
|
|
176
|
-
O,
|
|
177
|
-
{
|
|
178
|
-
name: "chevron-down",
|
|
179
|
-
className: R,
|
|
180
|
-
"aria-hidden": "true"
|
|
181
|
-
}
|
|
182
|
-
)
|
|
183
|
-
] })
|
|
184
|
-
] });
|
|
185
|
-
};
|
|
186
|
-
export {
|
|
187
|
-
Ee as D,
|
|
188
|
-
Be as S,
|
|
189
|
-
xe as g,
|
|
190
|
-
me as v
|
|
191
|
-
};
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as s } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
-
import { c as g } from "./index.CvOaL64Y.js";
|
|
4
|
-
import { useState as c, useRef as na, useEffect as m } from "react";
|
|
5
|
-
import { u as oa, h as ia } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
|
-
import { g as k, p as H } from "./helpers.B1JT5ShS.js";
|
|
7
|
-
import { Asterisk as ra } from "../asterisk.DDn-yX4P.js";
|
|
8
|
-
import { DSSystemFeedback as la } from "../systemfeedback.ZzRUAVYX.js";
|
|
9
|
-
import '../assets/Textarea.CIIVh03G.css';const ca = "_textarea_seaaz_226", da = "_textarea--invalid_seaaz_338", _a = "_textarea--small_seaaz_345", ua = "_textarea--resize-auto_seaaz_365", fa = "_root_seaaz_375", xa = "_hint_seaaz_383", ma = "_label_seaaz_383", ba = "_affix_seaaz_387", ha = "_affix--small_seaaz_409", za = "_affix--disabled_seaaz_423", pa = "_prefix_seaaz_426", va = "_affix--readonly_seaaz_429", ga = "_suffix_seaaz_439", Sa = "_leading-icon_seaaz_446", Ia = "_leading-icon--small_seaaz_458", Ca = "_leading-icon--disabled_seaaz_461", ya = "_action-button_seaaz_470", Aa = "_label--hidden_seaaz_489", Da = "_feedback_seaaz_518", ja = "_char-count_seaaz_523", wa = "_char-count-announcer_seaaz_540", t = {
|
|
10
|
-
textarea: ca,
|
|
11
|
-
"textarea--invalid": "_textarea--invalid_seaaz_338",
|
|
12
|
-
textareaInvalid: da,
|
|
13
|
-
"textarea--small": "_textarea--small_seaaz_345",
|
|
14
|
-
textareaSmall: _a,
|
|
15
|
-
"textarea--resize-auto": "_textarea--resize-auto_seaaz_365",
|
|
16
|
-
textareaResizeAuto: ua,
|
|
17
|
-
root: fa,
|
|
18
|
-
hint: xa,
|
|
19
|
-
label: ma,
|
|
20
|
-
affix: ba,
|
|
21
|
-
"affix--small": "_affix--small_seaaz_409",
|
|
22
|
-
affixSmall: ha,
|
|
23
|
-
"affix--disabled": "_affix--disabled_seaaz_423",
|
|
24
|
-
affixDisabled: za,
|
|
25
|
-
prefix: pa,
|
|
26
|
-
"affix--readonly": "_affix--readonly_seaaz_429",
|
|
27
|
-
affixReadonly: va,
|
|
28
|
-
suffix: ga,
|
|
29
|
-
"leading-icon": "_leading-icon_seaaz_446",
|
|
30
|
-
leadingIcon: Sa,
|
|
31
|
-
"leading-icon--small": "_leading-icon--small_seaaz_458",
|
|
32
|
-
leadingIconSmall: Ia,
|
|
33
|
-
"leading-icon--disabled": "_leading-icon--disabled_seaaz_461",
|
|
34
|
-
leadingIconDisabled: Ca,
|
|
35
|
-
"action-button": "_action-button_seaaz_470",
|
|
36
|
-
actionButton: ya,
|
|
37
|
-
"label--hidden": "_label--hidden_seaaz_489",
|
|
38
|
-
labelHidden: Aa,
|
|
39
|
-
feedback: Da,
|
|
40
|
-
"char-count": "_char-count_seaaz_523",
|
|
41
|
-
charCount: ja,
|
|
42
|
-
"char-count-announcer": "_char-count-announcer_seaaz_540",
|
|
43
|
-
charCountAnnouncer: wa
|
|
44
|
-
}, Va = ["medium", "small"], Ra = ({ id: n, label: _ }) => {
|
|
45
|
-
if (!n)
|
|
46
|
-
throw new Error(
|
|
47
|
-
k(
|
|
48
|
-
"DSTextarea",
|
|
49
|
-
'A unique "id" prop is required. Please add an unique "id" prop to the DSTextarea component.'
|
|
50
|
-
)
|
|
51
|
-
);
|
|
52
|
-
if (!_)
|
|
53
|
-
throw new Error(
|
|
54
|
-
k(
|
|
55
|
-
"DSTextarea",
|
|
56
|
-
`A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSTextarea component. If you don't want to display a label, set hideLabel={true}.`
|
|
57
|
-
)
|
|
58
|
-
);
|
|
59
|
-
}, Pa = ({
|
|
60
|
-
id: n,
|
|
61
|
-
label: _,
|
|
62
|
-
charsLimitText: V = "Character limit reached",
|
|
63
|
-
charsRemainingText: P = "Characters remaining:",
|
|
64
|
-
className: q,
|
|
65
|
-
defaultValue: M,
|
|
66
|
-
disabled: O = !1,
|
|
67
|
-
hint: b,
|
|
68
|
-
hideLabel: F = !1,
|
|
69
|
-
invalid: o = !1,
|
|
70
|
-
maxLength: a,
|
|
71
|
-
readonly: S = !1,
|
|
72
|
-
required: I = !1,
|
|
73
|
-
resize: u = "vertical",
|
|
74
|
-
size: W = "medium",
|
|
75
|
-
systemFeedback: r,
|
|
76
|
-
value: h,
|
|
77
|
-
wrapperClassName: X,
|
|
78
|
-
onChange: C,
|
|
79
|
-
onInput: y,
|
|
80
|
-
...Z
|
|
81
|
-
}) => {
|
|
82
|
-
process.env.NODE_ENV !== "production" && Ra({
|
|
83
|
-
id: n,
|
|
84
|
-
label: _
|
|
85
|
-
});
|
|
86
|
-
const [G, A] = c(M || ""), [l, D] = c(0), [J, j] = c(0), [K, w] = c("off"), [R, z] = c(r), [p, v] = c(o), T = h !== void 0, f = T ? h : G, i = na(null), Q = oa(F);
|
|
87
|
-
m(() => {
|
|
88
|
-
if (!a || a <= 0)
|
|
89
|
-
return;
|
|
90
|
-
l >= a * 0.8 ? w("polite") : w("off");
|
|
91
|
-
const e = setTimeout(() => {
|
|
92
|
-
j(a - l || 0);
|
|
93
|
-
}, 1e3);
|
|
94
|
-
return () => clearTimeout(e);
|
|
95
|
-
}, [l]), m(() => {
|
|
96
|
-
A(f || ""), d(), a && a > 0 && (D(f.toString().length || 0), j(a - f.toString().length || 0));
|
|
97
|
-
}, [h]), m(() => {
|
|
98
|
-
o && r ? (z(r), v(o)) : !o && a && a >= 0 && l >= a ? (v(!0), z(V)) : (z(r), v(o));
|
|
99
|
-
}, [o, p, r, l]), m(() => {
|
|
100
|
-
if (ia && u === "auto")
|
|
101
|
-
return d(), window.addEventListener("resize", d), () => window.removeEventListener("resize", d);
|
|
102
|
-
}, [u, i.current]);
|
|
103
|
-
const U = g(t.root, X), Y = g(t.textarea, q, {
|
|
104
|
-
// small textarea
|
|
105
|
-
[t.textareaSmall]: W === "small",
|
|
106
|
-
// invalid state
|
|
107
|
-
[t.textareaInvalid]: p,
|
|
108
|
-
// resize handling
|
|
109
|
-
[t.textareaResizeAuto]: u === "auto"
|
|
110
|
-
}), L = g(t.label, {
|
|
111
|
-
// hide label only visually to keep them available for assistive technologies
|
|
112
|
-
[t.labelHidden]: Q
|
|
113
|
-
}), E = `${n}-label`, N = `${n}-feedback`, B = `${n}-hint`, $ = `${n}-char-count-announcer`, aa = b ? ` ${B}` : "", d = () => {
|
|
114
|
-
if (i.current && u === "auto") {
|
|
115
|
-
i.current.style.height = "auto";
|
|
116
|
-
const e = H(i.current.scrollHeight), x = H(2);
|
|
117
|
-
i.current.style.height = `${// We need to add 2px (border-top & border-bottom) to the scrollHeight to prevent the textarea
|
|
118
|
-
// from jumping as soon as the user starts typing.
|
|
119
|
-
e + x}rem`;
|
|
120
|
-
}
|
|
121
|
-
}, ea = () => {
|
|
122
|
-
const e = [];
|
|
123
|
-
return a && a > 0 && e.push($), o && r && e.push(N), e.length > 0 ? e.join(" ") : void 0;
|
|
124
|
-
}, ta = (e) => {
|
|
125
|
-
var x;
|
|
126
|
-
y && y(e), a && a > 0 && D(((x = i.current) == null ? void 0 : x.value.length) || 0), d();
|
|
127
|
-
}, sa = (e) => {
|
|
128
|
-
C && C(e), T || A(e.target.value);
|
|
129
|
-
};
|
|
130
|
-
return /* @__PURE__ */ s.jsxs("div", { className: U, children: [
|
|
131
|
-
/* @__PURE__ */ s.jsxs("label", { className: L, id: E, htmlFor: n, children: [
|
|
132
|
-
_,
|
|
133
|
-
I && /* @__PURE__ */ s.jsx(ra, {})
|
|
134
|
-
] }),
|
|
135
|
-
b && /* @__PURE__ */ s.jsx("div", { className: t.hint, id: B, children: b }),
|
|
136
|
-
p && R && /* @__PURE__ */ s.jsx(
|
|
137
|
-
la,
|
|
138
|
-
{
|
|
139
|
-
className: t.feedback,
|
|
140
|
-
message: R,
|
|
141
|
-
type: "invalid",
|
|
142
|
-
id: N
|
|
143
|
-
}
|
|
144
|
-
),
|
|
145
|
-
/* @__PURE__ */ s.jsx(
|
|
146
|
-
"textarea",
|
|
147
|
-
{
|
|
148
|
-
className: Y,
|
|
149
|
-
id: n,
|
|
150
|
-
ref: i,
|
|
151
|
-
...Z,
|
|
152
|
-
"aria-labelledby": `${E}${aa}`,
|
|
153
|
-
"aria-describedby": ea(),
|
|
154
|
-
"aria-invalid": o,
|
|
155
|
-
"aria-disabled": S,
|
|
156
|
-
maxLength: a,
|
|
157
|
-
readOnly: S,
|
|
158
|
-
required: I,
|
|
159
|
-
disabled: O,
|
|
160
|
-
value: f,
|
|
161
|
-
defaultValue: void 0,
|
|
162
|
-
rows: void 0,
|
|
163
|
-
cols: void 0,
|
|
164
|
-
onChange: sa,
|
|
165
|
-
onInput: ta
|
|
166
|
-
}
|
|
167
|
-
),
|
|
168
|
-
a !== void 0 && a > 0 && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
169
|
-
/* @__PURE__ */ s.jsxs("div", { className: t.charCount, "aria-hidden": "true", children: [
|
|
170
|
-
l,
|
|
171
|
-
"/",
|
|
172
|
-
a
|
|
173
|
-
] }),
|
|
174
|
-
/* @__PURE__ */ s.jsxs(
|
|
175
|
-
"div",
|
|
176
|
-
{
|
|
177
|
-
className: t.charCountAnnouncer,
|
|
178
|
-
id: $,
|
|
179
|
-
"aria-live": K,
|
|
180
|
-
"aria-atomic": "true",
|
|
181
|
-
children: [
|
|
182
|
-
P,
|
|
183
|
-
" ",
|
|
184
|
-
J
|
|
185
|
-
]
|
|
186
|
-
}
|
|
187
|
-
)
|
|
188
|
-
] })
|
|
189
|
-
] });
|
|
190
|
-
};
|
|
191
|
-
export {
|
|
192
|
-
Pa as D,
|
|
193
|
-
Va as T,
|
|
194
|
-
Ra as v
|
|
195
|
-
};
|
package/chunks/Toast.DA_CQ9J-.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as n } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
-
import { c as e } from "./index.CvOaL64Y.js";
|
|
4
|
-
import { forwardRef as f } from "react";
|
|
5
|
-
import { DSButton as u } from "../button.DH0h6uPs.js";
|
|
6
|
-
import { D as g } from "./Icon.C2o2seDb.js";
|
|
7
|
-
import '../assets/Toast.Dsvs1zdM.css';const h = "_root_m9wn3_80", p = "_root--closing_m9wn3_94", x = "_fade-out_m9wn3_1", I = "_move-in_m9wn3_1", S = "_root--success_m9wn3_129", N = "_root--info_m9wn3_133", j = "_root--warning_m9wn3_137", v = "_content_m9wn3_142", C = "_content--hide-icon_m9wn3_149", D = "_icon_m9wn3_153", O = "_message_m9wn3_157", o = {
|
|
8
|
-
root: h,
|
|
9
|
-
"root--closing": "_root--closing_m9wn3_94",
|
|
10
|
-
rootClosing: p,
|
|
11
|
-
"fade-out": "_fade-out_m9wn3_1",
|
|
12
|
-
fadeOut: x,
|
|
13
|
-
"move-in": "_move-in_m9wn3_1",
|
|
14
|
-
moveIn: I,
|
|
15
|
-
"root--success": "_root--success_m9wn3_129",
|
|
16
|
-
rootSuccess: S,
|
|
17
|
-
"root--info": "_root--info_m9wn3_133",
|
|
18
|
-
rootInfo: N,
|
|
19
|
-
"root--warning": "_root--warning_m9wn3_137",
|
|
20
|
-
rootWarning: j,
|
|
21
|
-
content: v,
|
|
22
|
-
"content--hide-icon": "_content--hide-icon_m9wn3_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: s,
|
|
33
|
-
className: r,
|
|
34
|
-
hideIcon: c = !1,
|
|
35
|
-
variant: t = "info",
|
|
36
|
-
onClick: i,
|
|
37
|
-
onMouseEnter: a,
|
|
38
|
-
onMouseLeave: _,
|
|
39
|
-
...m
|
|
40
|
-
}, l) => {
|
|
41
|
-
const d = e(o.root, r, {
|
|
42
|
-
[o.rootSuccess]: t === "success",
|
|
43
|
-
[o.rootWarning]: t === "warning",
|
|
44
|
-
[o.rootInfo]: t === "info"
|
|
45
|
-
}), w = e(o.content, {
|
|
46
|
-
[o.contentHideIcon]: c
|
|
47
|
-
});
|
|
48
|
-
return /* @__PURE__ */ n.jsx(
|
|
49
|
-
"aside",
|
|
50
|
-
{
|
|
51
|
-
className: d,
|
|
52
|
-
ref: l,
|
|
53
|
-
popover: "manual",
|
|
54
|
-
"data-ds-toast": !0,
|
|
55
|
-
onMouseEnter: a,
|
|
56
|
-
onMouseLeave: _,
|
|
57
|
-
"aria-label": s,
|
|
58
|
-
...m,
|
|
59
|
-
children: /* @__PURE__ */ n.jsxs("div", { className: w, children: [
|
|
60
|
-
!c && /* @__PURE__ */ n.jsx(
|
|
61
|
-
g,
|
|
62
|
-
{
|
|
63
|
-
name: T[t],
|
|
64
|
-
className: o.icon,
|
|
65
|
-
"aria-hidden": "true"
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
/* @__PURE__ */ n.jsx("div", { className: o.message, children: s }),
|
|
69
|
-
/* @__PURE__ */ n.jsx(
|
|
70
|
-
u,
|
|
71
|
-
{
|
|
72
|
-
hideLabel: !0,
|
|
73
|
-
iconName: "cross",
|
|
74
|
-
size: "small",
|
|
75
|
-
variant: "ghost",
|
|
76
|
-
onClick: i,
|
|
77
|
-
children: "Close toast"
|
|
78
|
-
}
|
|
79
|
-
)
|
|
80
|
-
] })
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
H.displayName = "DSToast";
|
|
86
|
-
export {
|
|
87
|
-
H as D,
|
|
88
|
-
o as s
|
|
89
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as a } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
-
import { c as t } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import { D as k } from "./chunks/Icon.C2o2seDb.js";
|
|
5
|
-
import { DSSpinner as D } from "./spinner.D-xrotcu.js";
|
|
6
|
-
import './assets/floatingactionbutton.DRYentYC.css';const S = "_root_pixlx_76", j = "_root--dark_pixlx_137", H = "_root--small_pixlx_177", y = "_loader_pixlx_198", N = "_icon--hidden_pixlx_210", C = "_label--hidden_pixlx_214", o = {
|
|
7
|
-
root: S,
|
|
8
|
-
"root--dark": "_root--dark_pixlx_137",
|
|
9
|
-
rootDark: j,
|
|
10
|
-
"root--small": "_root--small_pixlx_177",
|
|
11
|
-
rootSmall: H,
|
|
12
|
-
loader: y,
|
|
13
|
-
"icon--hidden": "_icon--hidden_pixlx_210",
|
|
14
|
-
iconHidden: N,
|
|
15
|
-
"label--hidden": "_label--hidden_pixlx_214",
|
|
16
|
-
labelHidden: C
|
|
17
|
-
}, E = ({
|
|
18
|
-
aria: c,
|
|
19
|
-
children: _,
|
|
20
|
-
className: x,
|
|
21
|
-
dataTrackingid: m,
|
|
22
|
-
disabled: r = !1,
|
|
23
|
-
iconName: s = "placeholder",
|
|
24
|
-
iconSource: i,
|
|
25
|
-
loading: l = !1,
|
|
26
|
-
size: p = "medium",
|
|
27
|
-
theme: e = "light",
|
|
28
|
-
onClick: n,
|
|
29
|
-
...b
|
|
30
|
-
}) => {
|
|
31
|
-
const u = t(
|
|
32
|
-
o.root,
|
|
33
|
-
o.rootIconOnlySmall,
|
|
34
|
-
x,
|
|
35
|
-
{
|
|
36
|
-
// dark theme
|
|
37
|
-
[o.rootDark]: e === "dark",
|
|
38
|
-
// size
|
|
39
|
-
[o.rootSmall]: p === "small"
|
|
40
|
-
}
|
|
41
|
-
), h = t(o.icon, {
|
|
42
|
-
// set icon opacity to 0 when loading to prevent button size from changing
|
|
43
|
-
[o.iconHidden]: l
|
|
44
|
-
}), f = (d) => {
|
|
45
|
-
if (r || l) {
|
|
46
|
-
d.preventDefault();
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
n && n(d);
|
|
50
|
-
};
|
|
51
|
-
return /* @__PURE__ */ a.jsxs(
|
|
52
|
-
"button",
|
|
53
|
-
{
|
|
54
|
-
className: u,
|
|
55
|
-
"data-trackingid": m,
|
|
56
|
-
type: "button",
|
|
57
|
-
onClick: f,
|
|
58
|
-
...c,
|
|
59
|
-
...b,
|
|
60
|
-
"aria-disabled": r || l,
|
|
61
|
-
"aria-busy": l,
|
|
62
|
-
children: [
|
|
63
|
-
l && /* @__PURE__ */ a.jsx(
|
|
64
|
-
D,
|
|
65
|
-
{
|
|
66
|
-
className: o.loader,
|
|
67
|
-
aria: { "aria-label": "Loading state" }
|
|
68
|
-
}
|
|
69
|
-
),
|
|
70
|
-
/* @__PURE__ */ a.jsx("span", { className: t(o.label, o.labelHidden), children: _ }),
|
|
71
|
-
(s || i) && /* @__PURE__ */ a.jsx(
|
|
72
|
-
k,
|
|
73
|
-
{
|
|
74
|
-
name: s,
|
|
75
|
-
theme: e,
|
|
76
|
-
source: i,
|
|
77
|
-
className: h,
|
|
78
|
-
"aria-hidden": "true"
|
|
79
|
-
}
|
|
80
|
-
)
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
E as DSFloatingActionButton
|
|
87
|
-
};
|