@stihl-design-system/components 1.0.0-RC.11 → 1.0.0-RC.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/{accordion.CEKQh-7i.js → accordion.Rvtiu8Y4.js} +3 -3
- package/arialiveregions.Cyycgs8g.js +27 -0
- package/assets/Accordion.i4k5SMQM.css +1 -0
- package/assets/CheckboxGroup.BH1Br1dg.css +1 -0
- package/assets/Chip.DSdLuzoi.css +1 -0
- package/assets/CustomReactSelect.vHt8qNKC.css +1 -0
- package/assets/Dialog.BgzebVk4.css +1 -0
- package/assets/Drawer.Bauwxrk7.css +1 -0
- package/assets/Fieldset.DOdTbb7C.css +1 -0
- package/assets/Icon.DxRSBRSL.css +1 -0
- package/assets/InputPassword.CG7Ugu73.css +1 -0
- package/assets/InputSearch.CseChMc-.css +1 -0
- package/assets/InputStepper.C0eAYr7P.css +1 -0
- package/assets/Notification.DbRapUJo.css +1 -0
- package/assets/RadioGroup.BfMo157q.css +1 -0
- package/assets/Select.D4EXgIbz.css +1 -0
- package/assets/Textarea.KJGPTYMz.css +1 -0
- package/assets/Toast.CuafTAf7.css +1 -0
- package/assets/arialiveregions.DhsijBaL.css +1 -0
- package/assets/asterisk.BfVAUBO7.css +1 -0
- package/assets/button.DF4RBeC2.css +1 -0
- package/assets/buttonround.19uK_-oO.css +1 -0
- package/assets/checkbox.ByOoFouu.css +1 -0
- package/assets/chipgroup.BzfZLbkv.css +1 -0
- package/assets/flag.B-RLcMcf.css +1 -0
- package/assets/floatingactionbutton.E9HekT6S.css +1 -0
- package/assets/heading.u4f8Mz94.css +1 -0
- package/assets/input.BAkFKPW3.css +1 -0
- package/assets/link.DDJj0D1U.css +1 -0
- package/assets/linkstandalone.DIazcjIv.css +1 -0
- package/assets/logo.CnW8alZU.css +1 -0
- package/assets/optioncheckbox.BZaWtRD7.css +1 -0
- package/assets/radio.X-RTl_jo.css +1 -0
- package/assets/skiptocontent.PTL3256m.css +1 -0
- package/assets/spinner.2iWJWKyA.css +1 -0
- package/assets/switch.gw6aa3kx.css +1 -0
- package/assets/systemfeedback.BPz5YlPC.css +1 -0
- package/assets/text.DjTG_qNb.css +1 -0
- package/assets/title.rosWPEG3.css +1 -0
- package/asterisk.DpzETKdT.js +8 -0
- package/button.M4nXjcUn.js +135 -0
- package/buttonround.E56F_805.js +118 -0
- package/checkbox.Cb2_ey6U.js +111 -0
- package/{checkboxgroup.BqD5IV51.js → checkboxgroup.DBDmB-zR.js} +2 -2
- package/{chip.B92ew-hk.js → chip.C_1tGqvZ.js} +2 -2
- package/chipgroup.BvTj1ziW.js +174 -0
- package/chunks/Accordion.CB6jB3s_.js +125 -0
- package/chunks/{CheckboxGroup.M3jOjhNf.js → CheckboxGroup.S6i5EOc4.js} +40 -40
- package/chunks/{Chip.fMG8wi5K.js → Chip.CMlPUyOJ.js} +15 -15
- package/chunks/{CustomReactSelect.D3jv5-fa.js → CustomReactSelect.CQ1uexBH.js} +1321 -1321
- package/chunks/Dialog.CudsqNag.js +148 -0
- package/chunks/Drawer.ueG2Bzr9.js +154 -0
- package/chunks/{Fieldset.C9K8BYmH.js → Fieldset.Cjmkgxxk.js} +32 -32
- package/chunks/{Icon.C2o2seDb.js → Icon.BCmt_XBG.js} +45 -45
- package/chunks/InputPassword.CNLbBFjx.js +143 -0
- package/chunks/InputSearch.CHA6mkX_.js +192 -0
- package/chunks/InputStepper.xmWGU9pU.js +294 -0
- package/chunks/Notification.nx5vTamN.js +92 -0
- package/chunks/RadioGroup.Crj7NoOs.js +137 -0
- package/chunks/Select.E6gLFYLk.js +194 -0
- package/chunks/Textarea.DUBSOpNL.js +198 -0
- package/chunks/Toast.DyEi2GEP.js +89 -0
- package/{combobox.BeTnbG1m.js → combobox.CzBpi97e.js} +1 -1
- package/components/Combobox/Combobox.d.ts +1 -1
- package/components/{CustomReactSelect → Combobox/CustomReactSelect}/CustomReactSelect.d.ts +2 -2
- package/components/{CustomReactSelect → Combobox/CustomReactSelect}/CustomReactSelect.utils.d.ts +1 -1
- package/components/Notification/Notification.d.ts +2 -6
- package/components/Radio/Radio.d.ts +1 -1
- package/customreactselect.d.ts +1 -1
- package/customreactselect.qf7CIeFs.js +13 -0
- package/{dialog.lGwNQU91.js → dialog.DYlBUsOD.js} +2 -2
- package/{drawer.DNi5m8wP.js → drawer.CvhbP1ra.js} +2 -2
- package/fieldset.CtUGEdLv.js +11 -0
- package/flag.BKpsdB_-.js +43 -0
- package/floatingactionbutton.D5L0B7zI.js +87 -0
- package/heading.IPIYc5vW.js +50 -0
- package/{icon.BoMgOmC1.js → icon.Ck0BpI34.js} +1 -1
- package/index.es.js +34 -34
- package/input.BEnCFNM-.js +239 -0
- package/{inputpassword.CSjh1GU7.js → inputpassword.B-D_jB9w.js} +4 -4
- package/{inputsearch.DyznOWLK.js → inputsearch.CaSpklR1.js} +4 -4
- package/{inputstepper.3BLb7s0P.js → inputstepper.C7KD1-0S.js} +4 -4
- package/link.DREJAoPG.js +116 -0
- package/linkstandalone.BBoEniZ_.js +79 -0
- package/logo.Hul8qCFo.js +65 -0
- package/{notification.0kX1GMaB.js → notification.6M0OdGXK.js} +3 -3
- package/optioncheckbox.BRUTnQnJ.js +43 -0
- package/optioncheckbox.d.ts +1 -1
- package/package.json +8 -6
- package/partials/index.js +1 -1
- package/radio.DEILy_lV.js +114 -0
- package/{radiogroup.SYkZm2DG.js → radiogroup.DeU-HdlP.js} +3 -3
- package/{select.CYbwR3RW.js → select.BYraFJzz.js} +4 -4
- package/skiptocontent.BxvpIB7H.js +45 -0
- package/spinner.Bq97Og-6.js +58 -0
- package/styles/scss/ds/index.scss +19 -0
- package/styles/scss/ds/lib/animation.scss +21 -0
- package/styles/scss/ds/lib/breakpoints.scss +15 -0
- package/styles/scss/ds/lib/container-query.scss +54 -0
- package/styles/scss/ds/lib/ds-internal/_a11y.scss +15 -0
- package/styles/scss/{lib → ds/lib/ds-internal}/_focus.scss +13 -15
- package/styles/scss/ds/lib/ds-internal/_heading.scss +37 -0
- package/styles/scss/ds/lib/ds-internal/_helpers.scss +32 -0
- package/styles/scss/ds/lib/ds-internal/_high-contrast.scss +6 -0
- package/styles/scss/ds/lib/ds-internal/_hover.scss +6 -0
- package/styles/scss/ds/lib/ds-internal/_index.scss +9 -0
- package/styles/scss/ds/lib/ds-internal/_link.scss +62 -0
- package/styles/scss/ds/lib/ds-internal/_spacing-dynamic.scss +53 -0
- package/styles/scss/ds/lib/ds-internal/_text.scss +30 -0
- package/styles/scss/ds/lib/grid-extended.scss +11 -0
- package/styles/scss/ds/lib/grid-full.scss +6 -0
- package/styles/scss/ds/lib/grid-main.scss +119 -0
- package/styles/scss/ds/lib/grid-narrow.scss +14 -0
- package/styles/scss/ds/lib/grid-sidebar-sidebar.scss +52 -0
- package/styles/scss/{lib/_grid-sidebar.scss → ds/lib/grid-sidebar.scss} +23 -32
- package/styles/scss/{lib/_grid.scss → ds/lib/grid.scss} +15 -17
- package/styles/scss/ds/lib/heading.scss +75 -0
- package/styles/scss/ds/lib/link.scss +74 -0
- package/styles/scss/ds/lib/media-query.scss +32 -0
- package/styles/scss/{lib/_shadow.scss → ds/lib/shadow.scss} +2 -2
- package/styles/scss/ds/lib/spacing-dynamic.scss +7 -0
- package/styles/scss/ds/lib/spacing.scss +20 -0
- package/styles/scss/ds/lib/text.scss +83 -0
- package/styles/scss/ds/lib/theme.scss +162 -0
- package/styles/scss/ds/lib/transition.scss +36 -0
- package/switch.DI8YYa5G.js +65 -0
- package/{systemfeedback.ZzRUAVYX.js → systemfeedback.C3Pfxxpp.js} +6 -6
- package/text.DThvTwm8.js +57 -0
- package/{textarea.DJc527nX.js → textarea.CBvH0ljM.js} +3 -3
- package/title.DqzdB2Gq.js +36 -0
- package/{toast.D48GFmp0.js → toast.n1QUINSA.js} +3 -3
- package/{toastmanager.Dl8-Q3ED.js → toastmanager.B7EZ4JSI.js} +1 -1
- package/arialiveregions.BKpxxK7O.js +0 -27
- package/assets/Accordion.DMEFgtQm.css +0 -1
- package/assets/CheckboxGroup.Bz3_xkZU.css +0 -1
- package/assets/Chip.D10_7Q82.css +0 -1
- package/assets/CustomReactSelect.D5XKd9vg.css +0 -1
- package/assets/Dialog.B0pucIEI.css +0 -1
- package/assets/Drawer.CATBzfY7.css +0 -1
- package/assets/Fieldset.CwDhKRUL.css +0 -1
- package/assets/Icon.Duy_0R8w.css +0 -1
- package/assets/InputPassword.DOAAzj-O.css +0 -1
- package/assets/InputSearch.CxPYaQGZ.css +0 -1
- package/assets/InputStepper.CYYJUu0b.css +0 -1
- package/assets/Notification.mhVFeSGm.css +0 -1
- package/assets/Select.DZKpHV4G.css +0 -1
- package/assets/Textarea.Cp0b7oZp.css +0 -1
- package/assets/Toast.Cz6wYaBv.css +0 -1
- package/assets/arialiveregions.GsGx2USO.css +0 -1
- package/assets/asterisk.DlJ4YtSZ.css +0 -1
- package/assets/button.C9_ejpGG.css +0 -1
- package/assets/buttonround.DTCqRP-0.css +0 -1
- package/assets/checkbox.K4CVYK9g.css +0 -1
- package/assets/chipgroup.BMovtKTy.css +0 -1
- package/assets/flag.DX_lH1v7.css +0 -1
- package/assets/floatingactionbutton.Do-yEH6c.css +0 -1
- package/assets/heading.6bER-Eac.css +0 -1
- package/assets/input.Q5oKkmW2.css +0 -1
- package/assets/link.DhZqkLMP.css +0 -1
- package/assets/linkstandalone.Dwz-_O8q.css +0 -1
- package/assets/logo.pETQEsvZ.css +0 -1
- package/assets/optioncheckbox.C62HtIj5.css +0 -1
- package/assets/radio.-Xxx5wL4.css +0 -1
- package/assets/skiptocontent.CHcqLS7S.css +0 -1
- package/assets/spinner.D_Nnf1ZG.css +0 -1
- package/assets/switch.C1Ei0-z8.css +0 -1
- package/assets/systemfeedback.Sq0bAIyf.css +0 -1
- package/assets/text.DxKFcfY6.css +0 -1
- package/assets/title.f74Bosn-.css +0 -1
- package/asterisk.DDn-yX4P.js +0 -8
- package/button.C5opEJ6x.js +0 -135
- package/buttonround.CUoqRyy0.js +0 -118
- package/checkbox.DETR3e3X.js +0 -112
- package/chipgroup.BJrqEfvr.js +0 -175
- package/chunks/Accordion.DFwFN8mX.js +0 -125
- package/chunks/Dialog.Fwr6vLiK.js +0 -148
- package/chunks/Drawer.CKoYzQHd.js +0 -154
- package/chunks/InputPassword.C7pNeWGx.js +0 -143
- package/chunks/InputSearch.B24rcIJ_.js +0 -192
- package/chunks/InputStepper.CEW-bieQ.js +0 -294
- package/chunks/Notification.BXVN7_Fs.js +0 -93
- package/chunks/RadioGroup.D4UOflwr.js +0 -137
- package/chunks/Select.Ds86q4UC.js +0 -194
- package/chunks/Textarea.DcB8hKnO.js +0 -198
- package/chunks/Toast.DrzxdzVW.js +0 -89
- package/customreactselect.lYJhIeyx.js +0 -13
- package/fieldset.BqiAjeax.js +0 -11
- package/flag.XJHHSP38.js +0 -43
- package/floatingactionbutton.CMpkTdhX.js +0 -87
- package/heading.CAkraI2D.js +0 -50
- package/input.v7qB7wPJ.js +0 -239
- package/link.Clk5_BYp.js +0 -116
- package/linkstandalone.BXERmqdN.js +0 -80
- package/logo.CEO6OV7u.js +0 -65
- package/optioncheckbox.BPN3f6l_.js +0 -43
- package/radio.DTZNJzMU.js +0 -115
- package/skiptocontent.DUQWopO4.js +0 -46
- package/spinner.D-xrotcu.js +0 -58
- package/styles/scss/_index.scss +0 -24
- package/styles/scss/lib/_a11y.scss +0 -15
- package/styles/scss/lib/_animation.scss +0 -21
- package/styles/scss/lib/_breakpoints.scss +0 -15
- package/styles/scss/lib/_container-query.scss +0 -58
- package/styles/scss/lib/_grid-extended.scss +0 -11
- package/styles/scss/lib/_grid-full.scss +0 -6
- package/styles/scss/lib/_grid-main.scss +0 -117
- package/styles/scss/lib/_grid-narrow.scss +0 -16
- package/styles/scss/lib/_grid-sidebar-sidebar.scss +0 -50
- package/styles/scss/lib/_heading.scss +0 -107
- package/styles/scss/lib/_helpers.scss +0 -15
- package/styles/scss/lib/_high-contrast.scss +0 -24
- package/styles/scss/lib/_hover.scss +0 -10
- package/styles/scss/lib/_link.scss +0 -129
- package/styles/scss/lib/_media-query.scss +0 -32
- package/styles/scss/lib/_spacing-dynamic.scss +0 -61
- package/styles/scss/lib/_spacing.scss +0 -32
- package/styles/scss/lib/_text.scss +0 -110
- package/styles/scss/lib/_theme.scss +0 -162
- package/styles/scss/lib/_transition.scss +0 -45
- package/switch.CoNnIhM4.js +0 -65
- package/text.fMcHzVbH.js +0 -57
- package/title.LY1ylQsb.js +0 -36
- /package/components/{CustomReactSelect → Combobox/CustomReactSelect}/CustomReactSelect.utils.test.d.ts +0 -0
- /package/components/{CustomReactSelect → Combobox/CustomReactSelect}/OptionCheckbox.d.ts +0 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as n } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as u } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { useState as m, useRef as N, useEffect as w } from "react";
|
|
5
|
+
import { u as mt } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
|
+
import { M as E, a as H, u as M } from "./Input.utils.ChV6RJsh.js";
|
|
7
|
+
import { Asterisk as ft } from "../asterisk.DpzETKdT.js";
|
|
8
|
+
import { DSButton as X } from "../button.M4nXjcUn.js";
|
|
9
|
+
import { DSSystemFeedback as bt } from "../systemfeedback.C3Pfxxpp.js";
|
|
10
|
+
import { g as S } from "./helpers.B1JT5ShS.js";
|
|
11
|
+
import '../assets/InputStepper.C0eAYr7P.css';const gt = "ds-input-stepper_input_1pm8g_1", ht = "ds-input-stepper_input--invalid_1pm8g_113", xt = "ds-input-stepper_input--small_1pm8g_120", St = "ds-input-stepper_input--has-leading-icon_1pm8g_173", yt = "ds-input-stepper_input--has-action-button_1pm8g_176", It = "ds-input-stepper_input--has-second-action-button_1pm8g_179", vt = "ds-input-stepper_input--has-affix_1pm8g_191", At = "ds-input-stepper_input--is-ready_1pm8g_205", Dt = "ds-input-stepper_root_1pm8g_215", Bt = "ds-input-stepper_hint_1pm8g_223", Nt = "ds-input-stepper_label_1pm8g_223", wt = "ds-input-stepper_wrapper_1pm8g_227", Et = "ds-input-stepper_affix_1pm8g_233", Ht = "ds-input-stepper_affix--small_1pm8g_254", Lt = "ds-input-stepper_affix--disabled_1pm8g_267", jt = "ds-input-stepper_prefix_1pm8g_275", Rt = "ds-input-stepper_affix--readonly_1pm8g_278", kt = "ds-input-stepper_suffix_1pm8g_288", Ct = "ds-input-stepper_action-button_1pm8g_295", $t = "ds-input-stepper_label--hidden_1pm8g_313", Ft = "ds-input-stepper_label--disabled_1pm8g_326", Vt = "ds-input-stepper_feedback_1pm8g_346", Pt = "ds-input-stepper_second-action-button_1pm8g_360", Tt = "ds-input-stepper_value-announcer_1pm8g_364", e = {
|
|
12
|
+
input: gt,
|
|
13
|
+
"input--invalid": "ds-input-stepper_input--invalid_1pm8g_113",
|
|
14
|
+
inputInvalid: ht,
|
|
15
|
+
"input--small": "ds-input-stepper_input--small_1pm8g_120",
|
|
16
|
+
inputSmall: xt,
|
|
17
|
+
"input--has-leading-icon": "ds-input-stepper_input--has-leading-icon_1pm8g_173",
|
|
18
|
+
inputHasLeadingIcon: St,
|
|
19
|
+
"input--has-action-button": "ds-input-stepper_input--has-action-button_1pm8g_176",
|
|
20
|
+
inputHasActionButton: yt,
|
|
21
|
+
"input--has-second-action-button": "ds-input-stepper_input--has-second-action-button_1pm8g_179",
|
|
22
|
+
inputHasSecondActionButton: It,
|
|
23
|
+
"input--has-affix": "ds-input-stepper_input--has-affix_1pm8g_191",
|
|
24
|
+
inputHasAffix: vt,
|
|
25
|
+
"input--is-ready": "ds-input-stepper_input--is-ready_1pm8g_205",
|
|
26
|
+
inputIsReady: At,
|
|
27
|
+
root: Dt,
|
|
28
|
+
hint: Bt,
|
|
29
|
+
label: Nt,
|
|
30
|
+
wrapper: wt,
|
|
31
|
+
affix: Et,
|
|
32
|
+
"affix--small": "ds-input-stepper_affix--small_1pm8g_254",
|
|
33
|
+
affixSmall: Ht,
|
|
34
|
+
"affix--disabled": "ds-input-stepper_affix--disabled_1pm8g_267",
|
|
35
|
+
affixDisabled: Lt,
|
|
36
|
+
prefix: jt,
|
|
37
|
+
"affix--readonly": "ds-input-stepper_affix--readonly_1pm8g_278",
|
|
38
|
+
affixReadonly: Rt,
|
|
39
|
+
suffix: kt,
|
|
40
|
+
"action-button": "ds-input-stepper_action-button_1pm8g_295",
|
|
41
|
+
actionButton: Ct,
|
|
42
|
+
"label--hidden": "ds-input-stepper_label--hidden_1pm8g_313",
|
|
43
|
+
labelHidden: $t,
|
|
44
|
+
"label--disabled": "ds-input-stepper_label--disabled_1pm8g_326",
|
|
45
|
+
labelDisabled: Ft,
|
|
46
|
+
feedback: Vt,
|
|
47
|
+
"second-action-button": "ds-input-stepper_second-action-button_1pm8g_360",
|
|
48
|
+
secondActionButton: Pt,
|
|
49
|
+
"value-announcer": "ds-input-stepper_value-announcer_1pm8g_364",
|
|
50
|
+
valueAnnouncer: Tt
|
|
51
|
+
}, Wt = ({
|
|
52
|
+
id: s,
|
|
53
|
+
label: f,
|
|
54
|
+
prefix: b,
|
|
55
|
+
suffix: g
|
|
56
|
+
}) => {
|
|
57
|
+
if (!s)
|
|
58
|
+
throw new Error(
|
|
59
|
+
S(
|
|
60
|
+
"DSInputStepper",
|
|
61
|
+
'A unique "id" prop is required. Please add an unique "id" prop to the DSInputStepper component.'
|
|
62
|
+
)
|
|
63
|
+
);
|
|
64
|
+
if (!f)
|
|
65
|
+
throw new Error(
|
|
66
|
+
S(
|
|
67
|
+
"DSInputStepper",
|
|
68
|
+
`A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputStepper component. If you don't want to display a label, set hideLabel={true}.`
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
b && b.length > E && console.warn(
|
|
72
|
+
S(
|
|
73
|
+
"DSInputStepper",
|
|
74
|
+
`Prefix length must not exceed ${E} characters.`
|
|
75
|
+
)
|
|
76
|
+
), g && g.length > H && console.warn(
|
|
77
|
+
S(
|
|
78
|
+
"DSInputStepper",
|
|
79
|
+
`Suffix length must not exceed ${H} characters.`
|
|
80
|
+
)
|
|
81
|
+
);
|
|
82
|
+
}, Yt = ({
|
|
83
|
+
id: s,
|
|
84
|
+
label: f,
|
|
85
|
+
announcementText: b = "Value changed to",
|
|
86
|
+
className: g,
|
|
87
|
+
disabled: l = !1,
|
|
88
|
+
decreaseAmountButtonLabel: q = "Decrease",
|
|
89
|
+
hint: y,
|
|
90
|
+
hideLabel: G = !1,
|
|
91
|
+
invalid: h = !1,
|
|
92
|
+
increaseAmountButtonLabel: O = "Increase",
|
|
93
|
+
prefix: r,
|
|
94
|
+
max: L = 100,
|
|
95
|
+
min: j = 0,
|
|
96
|
+
readonly: d = !1,
|
|
97
|
+
required: R = !1,
|
|
98
|
+
size: p = "medium",
|
|
99
|
+
step: U = 1,
|
|
100
|
+
suffix: c,
|
|
101
|
+
systemFeedback: I,
|
|
102
|
+
value: x,
|
|
103
|
+
onChange: k,
|
|
104
|
+
...J
|
|
105
|
+
}) => {
|
|
106
|
+
process.env.NODE_ENV !== "production" && Wt({
|
|
107
|
+
id: s,
|
|
108
|
+
label: f,
|
|
109
|
+
prefix: r,
|
|
110
|
+
suffix: c
|
|
111
|
+
});
|
|
112
|
+
const [K, Q] = m(!1), [_, v] = m(x), [A, C] = m(""), [Y, Z] = m(!1), [z, tt] = m({}), a = N(null), et = r == null ? void 0 : r.substring(0, E), D = N(null), nt = c == null ? void 0 : c.substring(0, H), B = N(null), st = mt(G);
|
|
113
|
+
w(() => {
|
|
114
|
+
x && v(x);
|
|
115
|
+
}, [x]), w(() => {
|
|
116
|
+
if (A) {
|
|
117
|
+
const t = setTimeout(() => {
|
|
118
|
+
C("");
|
|
119
|
+
}, 3e3);
|
|
120
|
+
return () => clearTimeout(t);
|
|
121
|
+
}
|
|
122
|
+
}, [A]), w(() => {
|
|
123
|
+
var i;
|
|
124
|
+
const t = (o) => {
|
|
125
|
+
o.preventDefault();
|
|
126
|
+
};
|
|
127
|
+
return (i = a.current) == null || i.addEventListener("wheel", t, {
|
|
128
|
+
// The { passive: false } option is used to indicate that the event listener wants to cancel the event, allowing preventDefault to work as expected.
|
|
129
|
+
passive: !1
|
|
130
|
+
}), () => {
|
|
131
|
+
var o;
|
|
132
|
+
(o = a.current) == null || o.removeEventListener("wheel", t);
|
|
133
|
+
};
|
|
134
|
+
}, []), M(() => {
|
|
135
|
+
const t = p === "medium" ? 16 : 8, i = {};
|
|
136
|
+
if (D.current) {
|
|
137
|
+
const o = D.current.offsetWidth;
|
|
138
|
+
i.paddingInlineStart = t + o + "px";
|
|
139
|
+
}
|
|
140
|
+
if (B.current) {
|
|
141
|
+
const o = B.current.offsetWidth;
|
|
142
|
+
i.paddingInlineEnd = t + o + "px";
|
|
143
|
+
}
|
|
144
|
+
tt(i), Q(!0);
|
|
145
|
+
}, [r, c, p, Y]), M(() => {
|
|
146
|
+
(async () => {
|
|
147
|
+
"fonts" in document && (await document.fonts.load(
|
|
148
|
+
'1em "STIHL Contraface Digital Text Regular"'
|
|
149
|
+
), Z(!0));
|
|
150
|
+
})();
|
|
151
|
+
}, []);
|
|
152
|
+
const $ = u(e.affix, {
|
|
153
|
+
[e.affixSmall]: p === "small",
|
|
154
|
+
[e.affixDisabled]: l,
|
|
155
|
+
[e.affixReadonly]: d
|
|
156
|
+
}), F = `${s}-label`, V = `${s}-feedback`, P = `${s}-hint`, T = `${s}-value-announcer`, at = y ? ` ${P}` : "", pt = u(e.root, g), it = u(e.input, {
|
|
157
|
+
// small input
|
|
158
|
+
[e.inputSmall]: p === "small",
|
|
159
|
+
// invalid state
|
|
160
|
+
[e.inputInvalid]: h,
|
|
161
|
+
// prefix/suffix
|
|
162
|
+
[e.inputHasAffix]: r || c,
|
|
163
|
+
[e.inputIsReady]: K
|
|
164
|
+
}), ot = u(e.label, {
|
|
165
|
+
// hide label only visually to keep them available for assistive technologies
|
|
166
|
+
[e.labelHidden]: st,
|
|
167
|
+
[e.labelDisabled]: l
|
|
168
|
+
}), ut = u(e.secondActionButton, {
|
|
169
|
+
[e.secondActionButtonSmall]: p === "small"
|
|
170
|
+
}), lt = u(e.actionButton, {
|
|
171
|
+
[e.actionButtonSmall]: p === "small"
|
|
172
|
+
}), rt = () => {
|
|
173
|
+
const t = [T];
|
|
174
|
+
return h && I && t.push(V), t.join(" ");
|
|
175
|
+
}, W = () => {
|
|
176
|
+
var t;
|
|
177
|
+
if (a.current) {
|
|
178
|
+
v(a.current.value);
|
|
179
|
+
const i = new Event("change", { bubbles: !0 });
|
|
180
|
+
(t = a.current) == null || t.dispatchEvent(i), C(`${b} ${a.current.value}`);
|
|
181
|
+
}
|
|
182
|
+
}, ct = () => {
|
|
183
|
+
var t;
|
|
184
|
+
(t = a.current) == null || t.stepDown(), W();
|
|
185
|
+
}, dt = () => {
|
|
186
|
+
var t;
|
|
187
|
+
(t = a.current) == null || t.stepUp(), W();
|
|
188
|
+
}, _t = (t) => {
|
|
189
|
+
v(t.target.value), k && k(t);
|
|
190
|
+
};
|
|
191
|
+
return /* @__PURE__ */ n.jsxs("div", { className: pt, children: [
|
|
192
|
+
/* @__PURE__ */ n.jsxs("label", { className: ot, id: F, htmlFor: s, children: [
|
|
193
|
+
f,
|
|
194
|
+
R && /* @__PURE__ */ n.jsx(ft, {})
|
|
195
|
+
] }),
|
|
196
|
+
y && /* @__PURE__ */ n.jsx("div", { className: e.hint, id: P, children: y }),
|
|
197
|
+
/* @__PURE__ */ n.jsx(
|
|
198
|
+
"div",
|
|
199
|
+
{
|
|
200
|
+
"aria-live": "polite",
|
|
201
|
+
"aria-atomic": "true",
|
|
202
|
+
className: e.valueAnnouncer,
|
|
203
|
+
id: T,
|
|
204
|
+
children: A
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
h && I && /* @__PURE__ */ n.jsx(
|
|
208
|
+
bt,
|
|
209
|
+
{
|
|
210
|
+
className: e.feedback,
|
|
211
|
+
message: I,
|
|
212
|
+
type: "invalid",
|
|
213
|
+
id: V
|
|
214
|
+
}
|
|
215
|
+
),
|
|
216
|
+
/* @__PURE__ */ n.jsxs("div", { className: e.wrapper, children: [
|
|
217
|
+
r && /* @__PURE__ */ n.jsx(
|
|
218
|
+
"span",
|
|
219
|
+
{
|
|
220
|
+
className: u($, e.prefix),
|
|
221
|
+
ref: D,
|
|
222
|
+
"aria-disabled": l,
|
|
223
|
+
children: et
|
|
224
|
+
}
|
|
225
|
+
),
|
|
226
|
+
/* @__PURE__ */ n.jsx(
|
|
227
|
+
"input",
|
|
228
|
+
{
|
|
229
|
+
className: it,
|
|
230
|
+
id: s,
|
|
231
|
+
ref: a,
|
|
232
|
+
...J,
|
|
233
|
+
style: z,
|
|
234
|
+
"aria-labelledby": `${F}${at}`,
|
|
235
|
+
"aria-describedby": rt(),
|
|
236
|
+
"aria-invalid": h,
|
|
237
|
+
"aria-disabled": d,
|
|
238
|
+
disabled: l,
|
|
239
|
+
min: j,
|
|
240
|
+
max: L,
|
|
241
|
+
readOnly: d,
|
|
242
|
+
required: R,
|
|
243
|
+
step: U,
|
|
244
|
+
type: "number",
|
|
245
|
+
value: _,
|
|
246
|
+
onChange: _t
|
|
247
|
+
}
|
|
248
|
+
),
|
|
249
|
+
c && /* @__PURE__ */ n.jsx(
|
|
250
|
+
"span",
|
|
251
|
+
{
|
|
252
|
+
className: u($, e.suffix),
|
|
253
|
+
ref: B,
|
|
254
|
+
"aria-disabled": l,
|
|
255
|
+
children: nt
|
|
256
|
+
}
|
|
257
|
+
),
|
|
258
|
+
/* @__PURE__ */ n.jsx(
|
|
259
|
+
X,
|
|
260
|
+
{
|
|
261
|
+
hideLabel: !0,
|
|
262
|
+
theme: "light",
|
|
263
|
+
iconName: "minus",
|
|
264
|
+
variant: "filled",
|
|
265
|
+
className: ut,
|
|
266
|
+
size: p,
|
|
267
|
+
onClick: ct,
|
|
268
|
+
disabled: l || d || !!_ && Number(_) <= j,
|
|
269
|
+
type: "button",
|
|
270
|
+
children: q
|
|
271
|
+
}
|
|
272
|
+
),
|
|
273
|
+
/* @__PURE__ */ n.jsx(
|
|
274
|
+
X,
|
|
275
|
+
{
|
|
276
|
+
hideLabel: !0,
|
|
277
|
+
theme: "light",
|
|
278
|
+
iconName: "plus",
|
|
279
|
+
variant: "filled",
|
|
280
|
+
className: lt,
|
|
281
|
+
size: p,
|
|
282
|
+
onClick: dt,
|
|
283
|
+
disabled: l || d || !!_ && Number(_) >= L,
|
|
284
|
+
type: "button",
|
|
285
|
+
children: O
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
] })
|
|
289
|
+
] });
|
|
290
|
+
};
|
|
291
|
+
export {
|
|
292
|
+
Yt as D,
|
|
293
|
+
Wt as v
|
|
294
|
+
};
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as n } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as s } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { DSButton as f } from "../button.M4nXjcUn.js";
|
|
5
|
+
import { D as u } from "./Icon.BCmt_XBG.js";
|
|
6
|
+
import '../assets/Notification.DbRapUJo.css';const j = "ds-notification_root_1cajm_1", g = "ds-notification_root--success_1cajm_26", N = "ds-notification_root--error_1cajm_30", h = "ds-notification_root--warning_1cajm_34", I = "ds-notification_root--hide-icon_1cajm_38", x = "ds-notification_content_1cajm_52", A = "ds-notification_content--hide-close-button_1cajm_59", H = "ds-notification_content--hide-icon_1cajm_62", C = "ds-notification_icon_1cajm_66", S = "ds-notification_message_1cajm_70", p = "ds-notification_custom-action-area_1cajm_167", o = {
|
|
7
|
+
root: j,
|
|
8
|
+
"root--success": "ds-notification_root--success_1cajm_26",
|
|
9
|
+
rootSuccess: g,
|
|
10
|
+
"root--error": "ds-notification_root--error_1cajm_30",
|
|
11
|
+
rootError: N,
|
|
12
|
+
"root--warning": "ds-notification_root--warning_1cajm_34",
|
|
13
|
+
rootWarning: h,
|
|
14
|
+
"root--hide-icon": "ds-notification_root--hide-icon_1cajm_38",
|
|
15
|
+
rootHideIcon: I,
|
|
16
|
+
content: x,
|
|
17
|
+
"content--hide-close-button": "ds-notification_content--hide-close-button_1cajm_59",
|
|
18
|
+
contentHideCloseButton: A,
|
|
19
|
+
"content--hide-icon": "ds-notification_content--hide-icon_1cajm_62",
|
|
20
|
+
contentHideIcon: H,
|
|
21
|
+
icon: C,
|
|
22
|
+
message: S,
|
|
23
|
+
"custom-action-area": "ds-notification_custom-action-area_1cajm_167",
|
|
24
|
+
customActionArea: p
|
|
25
|
+
}, k = [
|
|
26
|
+
"success",
|
|
27
|
+
"error",
|
|
28
|
+
"warning",
|
|
29
|
+
"info"
|
|
30
|
+
], w = {
|
|
31
|
+
success: "circle-check-colored",
|
|
32
|
+
error: "diamond-exclamationmark-colored",
|
|
33
|
+
warning: "triangle-exclamationmark-colored",
|
|
34
|
+
info: "circle-info-colored"
|
|
35
|
+
}, O = {
|
|
36
|
+
error: "alert",
|
|
37
|
+
warning: "alert",
|
|
38
|
+
info: "status",
|
|
39
|
+
success: "status"
|
|
40
|
+
}, B = ({
|
|
41
|
+
children: r,
|
|
42
|
+
variant: t = "info",
|
|
43
|
+
className: a,
|
|
44
|
+
closeButtonLabel: _ = "Close notification",
|
|
45
|
+
customActionArea: e,
|
|
46
|
+
hideIcon: c = !1,
|
|
47
|
+
onClose: i,
|
|
48
|
+
...d
|
|
49
|
+
}) => {
|
|
50
|
+
const m = s(o.root, a, {
|
|
51
|
+
[o.rootSuccess]: t === "success",
|
|
52
|
+
[o.rootError]: t === "error",
|
|
53
|
+
[o.rootWarning]: t === "warning",
|
|
54
|
+
[o.rootInfo]: t === "info",
|
|
55
|
+
[o.rootHideIcon]: c
|
|
56
|
+
}), l = s(o.content, {
|
|
57
|
+
[o.contentHideCloseButton]: !i,
|
|
58
|
+
[o.contentHideIcon]: c
|
|
59
|
+
});
|
|
60
|
+
return /* @__PURE__ */ n.jsxs("div", { className: m, ...d, role: O[t], children: [
|
|
61
|
+
/* @__PURE__ */ n.jsxs("div", { className: l, children: [
|
|
62
|
+
!c && /* @__PURE__ */ n.jsx(
|
|
63
|
+
u,
|
|
64
|
+
{
|
|
65
|
+
name: w[t],
|
|
66
|
+
className: o.icon,
|
|
67
|
+
"aria-hidden": "true"
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ n.jsx("div", { className: o.message, children: r }),
|
|
71
|
+
i && /* @__PURE__ */ n.jsx(
|
|
72
|
+
f,
|
|
73
|
+
{
|
|
74
|
+
hideLabel: !0,
|
|
75
|
+
iconName: "cross",
|
|
76
|
+
isFlush: !0,
|
|
77
|
+
variant: "ghost",
|
|
78
|
+
size: "small",
|
|
79
|
+
onClick: i,
|
|
80
|
+
type: "button",
|
|
81
|
+
children: _
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
] }),
|
|
85
|
+
e && /* @__PURE__ */ n.jsx("div", { className: s({ [o.customActionArea]: !c }), children: e })
|
|
86
|
+
] });
|
|
87
|
+
};
|
|
88
|
+
export {
|
|
89
|
+
B as D,
|
|
90
|
+
k as N,
|
|
91
|
+
w as a
|
|
92
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as h } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as y } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { forwardRef as C, useState as N } from "react";
|
|
5
|
+
import { D as I } from "./Fieldset.Cjmkgxxk.js";
|
|
6
|
+
import { DSRadio as A } from "../radio.DEILy_lV.js";
|
|
7
|
+
import { g as a } from "./helpers.B1JT5ShS.js";
|
|
8
|
+
import '../assets/RadioGroup.BfMo157q.css';const B = "ds-radio-group_root_12fot_1", M = "ds-radio-group_root--horizontal_12fot_9", O = "ds-radio-group_root--invalid_12fot_12", f = {
|
|
9
|
+
root: B,
|
|
10
|
+
"root--horizontal": "ds-radio-group_root--horizontal_12fot_9",
|
|
11
|
+
rootHorizontal: M,
|
|
12
|
+
"root--invalid": "ds-radio-group_root--invalid_12fot_12",
|
|
13
|
+
rootInvalid: O
|
|
14
|
+
}, m = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the DSRadioGroup component.`, v = (o) => o.some(({ hint: e }) => !!e), z = (o) => o.some(({ customArea: e }) => !!e), V = ({
|
|
15
|
+
legend: o,
|
|
16
|
+
name: e,
|
|
17
|
+
options: t,
|
|
18
|
+
description: l,
|
|
19
|
+
direction: i,
|
|
20
|
+
id: s,
|
|
21
|
+
systemFeedback: n
|
|
22
|
+
}) => {
|
|
23
|
+
if (!s && (l || n))
|
|
24
|
+
throw new Error(
|
|
25
|
+
a(
|
|
26
|
+
"DSRadioGroup",
|
|
27
|
+
'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSRadioGroup component.'
|
|
28
|
+
)
|
|
29
|
+
);
|
|
30
|
+
if (!o)
|
|
31
|
+
throw new Error(
|
|
32
|
+
a("DSRadioGroup", m("legend"))
|
|
33
|
+
);
|
|
34
|
+
if (!e)
|
|
35
|
+
throw new Error(
|
|
36
|
+
a("DSRadioGroup", m("name"))
|
|
37
|
+
);
|
|
38
|
+
if (!t)
|
|
39
|
+
throw new Error(
|
|
40
|
+
a("DSRadioGroup", m("options"))
|
|
41
|
+
);
|
|
42
|
+
if (i === "horizontal" && v(t))
|
|
43
|
+
throw new Error(
|
|
44
|
+
a(
|
|
45
|
+
"DSRadioGroup",
|
|
46
|
+
"Horizontal direction is not possible when options contain a hint. Please remove hints or change direction property to 'vertical'."
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
if (i === "horizontal" && z(t))
|
|
50
|
+
throw new Error(
|
|
51
|
+
a(
|
|
52
|
+
"DSRadioGroup",
|
|
53
|
+
"Horizontal direction is not possible when options contain a custom area. Please remove custom areas or change direction property to 'vertical'."
|
|
54
|
+
)
|
|
55
|
+
);
|
|
56
|
+
}, $ = C(
|
|
57
|
+
({
|
|
58
|
+
legend: o,
|
|
59
|
+
name: e,
|
|
60
|
+
options: t,
|
|
61
|
+
className: l,
|
|
62
|
+
defaultValue: i,
|
|
63
|
+
description: s,
|
|
64
|
+
direction: n = "vertical",
|
|
65
|
+
disabled: d = !1,
|
|
66
|
+
hideUncheckedHints: D = !1,
|
|
67
|
+
id: c,
|
|
68
|
+
invalid: p = !1,
|
|
69
|
+
required: w = !1,
|
|
70
|
+
systemFeedback: u,
|
|
71
|
+
value: S,
|
|
72
|
+
onChange: _,
|
|
73
|
+
...G
|
|
74
|
+
}, E) => {
|
|
75
|
+
process.env.NODE_ENV !== "production" && V({
|
|
76
|
+
legend: o,
|
|
77
|
+
name: e,
|
|
78
|
+
options: t,
|
|
79
|
+
description: s,
|
|
80
|
+
direction: n,
|
|
81
|
+
id: c,
|
|
82
|
+
systemFeedback: u
|
|
83
|
+
});
|
|
84
|
+
const [H, x] = N(i), g = S !== void 0, R = g ? S : H, P = y(f.root, {
|
|
85
|
+
// In case of longer copy, use vertical direction
|
|
86
|
+
[f.rootHorizontal]: n === "horizontal" && !v(t) && !z(t),
|
|
87
|
+
[f.rootInvalid]: p && !!u
|
|
88
|
+
}), j = (r) => {
|
|
89
|
+
if (d) {
|
|
90
|
+
r.preventDefault();
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
g || x(
|
|
94
|
+
r.target.value
|
|
95
|
+
), _ && _(r);
|
|
96
|
+
}, q = v(t) && !D;
|
|
97
|
+
return /* @__PURE__ */ h.jsx(
|
|
98
|
+
I,
|
|
99
|
+
{
|
|
100
|
+
id: c,
|
|
101
|
+
legend: o,
|
|
102
|
+
className: l,
|
|
103
|
+
description: s,
|
|
104
|
+
disabled: d,
|
|
105
|
+
required: w,
|
|
106
|
+
invalid: p,
|
|
107
|
+
systemFeedback: u,
|
|
108
|
+
...G,
|
|
109
|
+
role: "radiogroup",
|
|
110
|
+
onChange: j,
|
|
111
|
+
children: /* @__PURE__ */ h.jsx("div", { className: P, children: t.map((r) => /* @__PURE__ */ h.jsx(
|
|
112
|
+
A,
|
|
113
|
+
{
|
|
114
|
+
name: e,
|
|
115
|
+
checked: r.value === R,
|
|
116
|
+
disabled: d,
|
|
117
|
+
hideUncheckedHint: D,
|
|
118
|
+
hint: r.hint,
|
|
119
|
+
invalid: p,
|
|
120
|
+
isBold: q,
|
|
121
|
+
required: w,
|
|
122
|
+
ref: r.value === R ? E : null,
|
|
123
|
+
...r
|
|
124
|
+
},
|
|
125
|
+
c + r.label + r.value + r.hint
|
|
126
|
+
)) })
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
$.displayName = "DSRadioGroup";
|
|
132
|
+
export {
|
|
133
|
+
$ as D,
|
|
134
|
+
z as a,
|
|
135
|
+
v as o,
|
|
136
|
+
V as v
|
|
137
|
+
};
|