@stihl-design-system/components 1.0.0-RC.7 → 1.0.0-RC.9
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/Notification-additional-information.jpeg +0 -0
- package/Notification-confirm-error.jpg +0 -0
- package/Notification-confirm-warn.jpeg +0 -0
- package/Notification-overview.jpeg +0 -0
- package/Notification-success.jpeg +0 -0
- package/assets/CustomReactSelect.CMkn-EGK.css +1 -0
- package/assets/Dialog.DdLMmOLt.css +1 -0
- package/assets/Drawer.BqBgbSuP.css +1 -0
- package/assets/Fieldset.qHYeUFZt.css +1 -0
- package/assets/InputPassword.Cf394z47.css +1 -0
- package/assets/InputSearch.eCRQoxjN.css +1 -0
- package/assets/InputStepper.B80KulYE.css +1 -0
- package/assets/Notification.DK6agBGS.css +1 -0
- package/assets/Select.BptsMxz4.css +1 -0
- package/assets/Textarea.CIIVh03G.css +1 -0
- package/assets/Toast.Dsvs1zdM.css +1 -0
- package/assets/asterisk.DlJ4YtSZ.css +1 -0
- package/assets/button.B1O7Yw3Q.css +1 -0
- package/assets/buttonround.DlH_ipDo.css +1 -0
- package/assets/checkbox.K4CVYK9g.css +1 -0
- package/assets/heading.6bER-Eac.css +1 -0
- package/assets/input.C0MrSbQu.css +1 -0
- package/assets/link.vtTST2ki.css +1 -0
- package/assets/linkstandalone.BtAcziZ7.css +1 -0
- package/assets/logo.pETQEsvZ.css +1 -0
- package/assets/optioncheckbox.BJJAph5_.css +1 -0
- package/assets/radio.9kpIO3HC.css +1 -0
- package/assets/skiptocontent.CHcqLS7S.css +1 -0
- package/assets/switch.2DQF2zH-.css +1 -0
- package/assets/systemfeedback.Sq0bAIyf.css +1 -0
- package/assets/text.Dhb_l50R.css +1 -0
- package/assets/title.f74Bosn-.css +1 -0
- package/{asterisk.Cjbk-xZi.js → asterisk.DDn-yX4P.js} +1 -1
- package/button.CkHCQg3Y.js +135 -0
- package/buttonround.DX3u2Fio.js +118 -0
- package/checkbox.BbmCDJCm.js +112 -0
- package/{checkboxgroup.DqWlzAeR.js → checkboxgroup.CPENWSuk.js} +2 -2
- package/chunks/{CheckboxGroup.DsQ6lI5a.js → CheckboxGroup.Dx_Hn8Dl.js} +2 -2
- package/chunks/CustomReactSelect.C4rTVlvy.js +3593 -0
- package/chunks/Dialog.TPjJ_yxK.js +148 -0
- package/chunks/Drawer.DrLGSch-.js +154 -0
- package/chunks/{Fieldset.B1vsrHNv.js → Fieldset.P09LInkT.js} +29 -29
- package/chunks/{Input.utils.BGUhXCNP.js → Input.utils.ChV6RJsh.js} +19 -17
- package/chunks/InputPassword.CSc1c98k.js +140 -0
- package/chunks/{InputSearch.DITRiB92.js → InputSearch.DrgdGFT_.js} +49 -49
- package/chunks/{InputStepper.Bf8NZ9pb.js → InputStepper.DJEuIr4C.js} +76 -76
- package/chunks/{Notification.DVVuSOqG.js → Notification.B68mMDiB.js} +24 -24
- package/chunks/{RadioGroup.BO4pbAJw.js → RadioGroup.B5jRveyI.js} +2 -2
- package/chunks/Select.Cl2eJR1z.js +191 -0
- package/chunks/Textarea.Sk9-GXfs.js +195 -0
- package/chunks/{Toast.RON4bFPY.js → Toast.D9DAuz2m.js} +33 -33
- package/{combobox.CRlhqmuO.js → combobox.jDpV6bv-.js} +1 -1
- package/components/Button/Button.d.ts +1 -1
- package/components/Checkbox/Checkbox.d.ts +1 -1
- package/components/CustomReactSelect/CustomReactSelect.d.ts +2 -2
- package/components/Dialog/Dialog.d.ts +22 -3
- package/components/Dialog/Dialog.test.d.ts +1 -0
- package/components/Dialog/Dialog.utils.d.ts +12 -0
- package/components/Dialog/Dialog.utils.test.d.ts +1 -0
- package/components/Drawer/Drawer.d.ts +31 -0
- package/components/Drawer/Drawer.test.d.ts +1 -0
- package/components/Drawer/Drawer.utils.d.ts +14 -0
- package/components/Drawer/Drawer.utils.test.d.ts +1 -0
- package/components/Input/Input.d.ts +1 -1
- package/components/InputSearch/InputSearch.d.ts +1 -1
- package/components/LinkStandalone/LinkStandalone.d.ts +1 -1
- package/components/Notification/Notification.d.ts +3 -1
- package/components/Radio/Radio.d.ts +1 -1
- package/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/components/SkipToContent/SkipToContent.d.ts +1 -1
- package/components/Switch/Switch.d.ts +1 -1
- package/components/Toast/Toast.d.ts +3 -0
- package/{customreactselect.CD58gwtp.js → customreactselect.C2QK_Q8T.js} +4 -4
- package/dialog.BPX7RJtQ.js +9 -0
- package/drawer.BfEPcSsQ.js +9 -0
- package/drawer.d.ts +1 -0
- package/fieldset.4yvz0e7M.js +11 -0
- package/heading.CAkraI2D.js +50 -0
- package/index.d.ts +4 -0
- package/index.es.js +99 -92
- package/input.lLMqAG-6.js +236 -0
- package/{inputpassword.Ba9SUUIK.js → inputpassword.BIdYGrhB.js} +4 -4
- package/{inputsearch.BK-0OTwA.js → inputsearch.DleOblJp.js} +4 -4
- package/inputstepper.DWkHwOAn.js +13 -0
- package/link.KZaBufPM.js +116 -0
- package/linkstandalone.B6tN-NXD.js +80 -0
- package/{logo.BR_CUXFl.js → logo.CqukakYv.js} +32 -36
- package/{notification.Csn5QCR2.js → notification.DdJjbSdM.js} +2 -2
- package/optioncheckbox.DwQEfxGG.js +43 -0
- package/package.json +6 -4
- package/partials/index.js +442 -442
- package/radio.CWGJtmKl.js +115 -0
- package/{radiogroup.CiENWRos.js → radiogroup.FfK4DLsV.js} +3 -3
- package/{select.DLYav8gw.js → select.BEuTuEFZ.js} +3 -3
- package/{skiptocontent._YZRKxnc.js → skiptocontent.fP4SOp-p.js} +16 -14
- package/styles/scss/lib/_heading.scss +50 -9
- package/styles/scss/lib/_helpers.scss +12 -0
- package/styles/scss/lib/_link.scss +58 -94
- package/styles/scss/lib/_text.scss +57 -14
- package/switch.KO8HZPNL.js +65 -0
- package/{systemfeedback.CUWch42u.js → systemfeedback._8gatmgR.js} +1 -1
- package/text.rgDKQBrU.js +57 -0
- package/{textarea.hLgeYdsI.js → textarea.DV1yVty7.js} +3 -3
- package/title.LY1ylQsb.js +36 -0
- package/{toast.r_yhGYEe.js → toast.BB8L0ixD.js} +2 -2
- package/{toastmanager.BncH_rUP.js → toastmanager.DifUvJcg.js} +27 -25
- package/utils/index.d.ts +1 -0
- package/utils/render-in-iframe.d.ts +15 -0
- package/utils/useIsomorphicLayoutEffect.d.ts +26 -0
- package/utils/vitest.setup.d.ts +2 -0
- package/assets/CustomReactSelect.Bsphydqt.css +0 -1
- package/assets/Fieldset.D0jHAGRL.css +0 -1
- package/assets/InputPassword.VCNO8ANM.css +0 -1
- package/assets/InputSearch.BMRAb95l.css +0 -1
- package/assets/InputStepper.BKjqNi-i.css +0 -1
- package/assets/Notification.Bg63cvs4.css +0 -1
- package/assets/Select.Bz1TImkI.css +0 -1
- package/assets/Textarea.D2h5cW_t.css +0 -1
- package/assets/Toast.BzVaebc0.css +0 -1
- package/assets/asterisk.JlyPArZu.css +0 -1
- package/assets/button.BdxtFZKx.css +0 -1
- package/assets/buttonround.pR4StXA7.css +0 -1
- package/assets/checkbox.BjIn2stV.css +0 -1
- package/assets/dialog.CKwM2EBH.css +0 -1
- package/assets/heading.CCbuI4X-.css +0 -1
- package/assets/input.71tOIrpp.css +0 -1
- package/assets/link.D61tKkSK.css +0 -1
- package/assets/linkstandalone.Bx8Uvo0G.css +0 -1
- package/assets/logo.C05WqGId.css +0 -1
- package/assets/optioncheckbox.BdRJHcSw.css +0 -1
- package/assets/radio.ewRpPo4W.css +0 -1
- package/assets/skiptocontent.DGVJ77cj.css +0 -1
- package/assets/switch.Ds-I_ybT.css +0 -1
- package/assets/systemfeedback.BzJATHDd.css +0 -1
- package/assets/text.B-CTuGgI.css +0 -1
- package/assets/title.DlhX9K3W.css +0 -1
- package/button.L1lgCuM9.js +0 -135
- package/buttonround.ddSqXjYf.js +0 -118
- package/checkbox.DNHdo6_n.js +0 -113
- package/chunks/CustomReactSelect.5dHi6PEO.js +0 -4983
- package/chunks/InputPassword.a7zHKrmM.js +0 -140
- package/chunks/Select.COdS787F.js +0 -191
- package/chunks/Textarea.oqCrSopu.js +0 -195
- package/dialog.0qPUVJha.js +0 -45
- package/fieldset.aY3V2jK2.js +0 -11
- package/heading.BTNroD1E.js +0 -50
- package/input.DqSOhSMX.js +0 -236
- package/inputstepper.DFQ4zC15.js +0 -13
- package/link.SAcKvzJ3.js +0 -115
- package/linkstandalone.DNe0Nydm.js +0 -79
- package/optioncheckbox.C4l2UIak.js +0 -43
- package/radio.epf54-sG.js +0 -115
- package/switch.rd7PdLc9.js +0 -65
- package/text.CrYUewrP.js +0 -57
- package/title.Dvp8LKJt.js +0 -36
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as e } from "./jsx-runtime.C115EyI4.js";
|
|
3
|
-
import { c
|
|
3
|
+
import { c } from "./index.CvOaL64Y.js";
|
|
4
4
|
import { useState as G, useRef as N, useEffect as w } from "react";
|
|
5
5
|
import { g as S, a as J } from "./helpers.B1JT5ShS.js";
|
|
6
6
|
import { u as K } from "./useBreakpoint.5xBNDiCf.js";
|
|
7
|
-
import { Asterisk as Q } from "../asterisk.
|
|
8
|
-
import { DSButton as D } from "../button.
|
|
9
|
-
import { DSSystemFeedback as U } from "../systemfeedback.
|
|
10
|
-
import '../assets/InputSearch.
|
|
7
|
+
import { Asterisk as Q } from "../asterisk.DDn-yX4P.js";
|
|
8
|
+
import { DSButton as D } from "../button.CkHCQg3Y.js";
|
|
9
|
+
import { DSSystemFeedback as U } from "../systemfeedback._8gatmgR.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
11
|
input: X,
|
|
12
|
-
"input--invalid": "_input--
|
|
12
|
+
"input--invalid": "_input--invalid_8z3ht_338",
|
|
13
13
|
inputInvalid: Y,
|
|
14
|
-
"input--small": "_input--
|
|
14
|
+
"input--small": "_input--small_8z3ht_345",
|
|
15
15
|
inputSmall: Z,
|
|
16
|
-
"input--has-leading-icon": "_input--has-leading-
|
|
16
|
+
"input--has-leading-icon": "_input--has-leading-icon_8z3ht_399",
|
|
17
17
|
inputHasLeadingIcon: tt,
|
|
18
|
-
"input--has-action-button": "_input--has-action-
|
|
18
|
+
"input--has-action-button": "_input--has-action-button_8z3ht_402",
|
|
19
19
|
inputHasActionButton: nt,
|
|
20
|
-
"input--has-second-action-button": "_input--has-second-action-
|
|
20
|
+
"input--has-second-action-button": "_input--has-second-action-button_8z3ht_405",
|
|
21
21
|
inputHasSecondActionButton: et,
|
|
22
|
-
"input--has-affix": "_input--has-
|
|
22
|
+
"input--has-affix": "_input--has-affix_8z3ht_417",
|
|
23
23
|
inputHasAffix: at,
|
|
24
|
-
"input--is-ready": "_input--is-
|
|
24
|
+
"input--is-ready": "_input--is-ready_8z3ht_431",
|
|
25
25
|
inputIsReady: st,
|
|
26
26
|
root: ot,
|
|
27
27
|
hint: it,
|
|
28
|
-
label:
|
|
29
|
-
wrapper:
|
|
30
|
-
"action-button": "_action-
|
|
28
|
+
label: ct,
|
|
29
|
+
wrapper: ut,
|
|
30
|
+
"action-button": "_action-button_8z3ht_456",
|
|
31
31
|
actionButton: lt,
|
|
32
|
-
"second-action-button": "_second-action-
|
|
33
|
-
secondActionButton:
|
|
34
|
-
"label--hidden": "_label--
|
|
35
|
-
labelHidden:
|
|
36
|
-
feedback:
|
|
37
|
-
},
|
|
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
38
|
if (!n)
|
|
39
39
|
throw new Error(
|
|
40
40
|
S(
|
|
@@ -42,22 +42,22 @@ import '../assets/InputSearch.BMRAb95l.css';const X = "_input_12zpu_226", Y = "_
|
|
|
42
42
|
'A unique "id" prop is required. Please add an unique "id" prop to the DSInputSearch component.'
|
|
43
43
|
)
|
|
44
44
|
);
|
|
45
|
-
if (!
|
|
45
|
+
if (!u)
|
|
46
46
|
throw new Error(
|
|
47
47
|
S(
|
|
48
48
|
"DSInputSearch",
|
|
49
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
50
|
)
|
|
51
51
|
);
|
|
52
|
-
},
|
|
52
|
+
}, dt = (n) => !!J(n, "form"), Bt = ({
|
|
53
53
|
id: n,
|
|
54
|
-
label:
|
|
54
|
+
label: u,
|
|
55
55
|
className: A,
|
|
56
56
|
clearButtonLabel: H = "Clear search field",
|
|
57
57
|
disabled: l = !1,
|
|
58
|
-
hint:
|
|
58
|
+
hint: d,
|
|
59
59
|
hideLabel: E = !1,
|
|
60
|
-
invalid:
|
|
60
|
+
invalid: r = !1,
|
|
61
61
|
readonly: s = !1,
|
|
62
62
|
required: I = !1,
|
|
63
63
|
size: o = "medium",
|
|
@@ -68,59 +68,59 @@ import '../assets/InputSearch.BMRAb95l.css';const X = "_input_12zpu_226", Y = "_
|
|
|
68
68
|
onChange: g,
|
|
69
69
|
...k
|
|
70
70
|
}) => {
|
|
71
|
-
process.env.NODE_ENV !== "production" &&
|
|
71
|
+
process.env.NODE_ENV !== "production" && _t({
|
|
72
72
|
id: n,
|
|
73
|
-
label:
|
|
73
|
+
label: u
|
|
74
74
|
});
|
|
75
|
-
const [
|
|
75
|
+
const [p, v] = G(b), f = N(null), h = N(null), L = K(E);
|
|
76
76
|
w(() => {
|
|
77
77
|
v(b);
|
|
78
78
|
}, [b]), w(() => {
|
|
79
|
-
f.current && !
|
|
79
|
+
f.current && !dt(f.current) && process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && console.warn(
|
|
80
80
|
S(
|
|
81
81
|
"DSInputSearch",
|
|
82
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
83
|
)
|
|
84
84
|
);
|
|
85
85
|
}, []);
|
|
86
|
-
const z = `${n}-label`, B = `${n}-feedback`, y = `${n}-hint`, V =
|
|
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
87
|
// small input
|
|
88
88
|
[t.inputSmall]: o === "small",
|
|
89
89
|
// invalid state
|
|
90
|
-
[t.inputInvalid]:
|
|
90
|
+
[t.inputInvalid]: r,
|
|
91
91
|
// action button - input password always has an action button
|
|
92
92
|
[t.inputHasActionButton]: !0,
|
|
93
93
|
// action second action button
|
|
94
94
|
[t.inputHasSecondActionButton]: x && !s && !l
|
|
95
|
-
}), $ =
|
|
95
|
+
}), $ = c(t.label, {
|
|
96
96
|
// hide label only visually to keep them available for assistive technologies
|
|
97
97
|
[t.labelHidden]: L
|
|
98
|
-
}), R =
|
|
98
|
+
}), R = c(t.actionButton, {
|
|
99
99
|
[t.actionButtonSmall]: o === "small"
|
|
100
|
-
}), q =
|
|
100
|
+
}), q = c(t.secondActionButton, {
|
|
101
101
|
[t.secondActionButtonSmall]: o === "small"
|
|
102
102
|
}), T = (a, i) => {
|
|
103
|
-
const W = Object.getPrototypeOf(a),
|
|
103
|
+
const W = Object.getPrototypeOf(a), _ = Object.getOwnPropertyDescriptor(
|
|
104
104
|
W,
|
|
105
105
|
"value"
|
|
106
106
|
);
|
|
107
|
-
|
|
107
|
+
_ != null && _.set ? _.set.call(a, i) : a.value = i;
|
|
108
108
|
}, F = () => {
|
|
109
109
|
var i;
|
|
110
|
-
if (!
|
|
111
|
-
T(
|
|
110
|
+
if (!h.current) return;
|
|
111
|
+
T(h.current, "");
|
|
112
112
|
const a = new Event("change", { bubbles: !0 });
|
|
113
|
-
(i =
|
|
113
|
+
(i = h.current) == null || i.dispatchEvent(a);
|
|
114
114
|
}, M = (a) => {
|
|
115
115
|
v(a.target.value), g && g(a);
|
|
116
116
|
};
|
|
117
117
|
return /* @__PURE__ */ e.jsxs("div", { className: O, ref: f, children: [
|
|
118
118
|
/* @__PURE__ */ e.jsxs("label", { className: $, id: z, htmlFor: n, children: [
|
|
119
|
-
|
|
119
|
+
u,
|
|
120
120
|
I && /* @__PURE__ */ e.jsx(Q, {})
|
|
121
121
|
] }),
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
d && /* @__PURE__ */ e.jsx("div", { className: t.hint, id: y, children: d }),
|
|
123
|
+
r && m && /* @__PURE__ */ e.jsx(
|
|
124
124
|
U,
|
|
125
125
|
{
|
|
126
126
|
className: t.feedback,
|
|
@@ -135,17 +135,17 @@ import '../assets/InputSearch.BMRAb95l.css';const X = "_input_12zpu_226", Y = "_
|
|
|
135
135
|
{
|
|
136
136
|
className: P,
|
|
137
137
|
id: n,
|
|
138
|
-
ref:
|
|
138
|
+
ref: h,
|
|
139
139
|
...k,
|
|
140
140
|
"aria-labelledby": `${z}${V}`,
|
|
141
|
-
"aria-describedby":
|
|
142
|
-
"aria-invalid":
|
|
141
|
+
"aria-describedby": r && m ? B : void 0,
|
|
142
|
+
"aria-invalid": r,
|
|
143
143
|
"aria-disabled": s,
|
|
144
144
|
readOnly: s,
|
|
145
145
|
required: I,
|
|
146
146
|
disabled: l,
|
|
147
147
|
type: "search",
|
|
148
|
-
value:
|
|
148
|
+
value: p,
|
|
149
149
|
onChange: M
|
|
150
150
|
}
|
|
151
151
|
),
|
|
@@ -184,6 +184,6 @@ import '../assets/InputSearch.BMRAb95l.css';const X = "_input_12zpu_226", Y = "_
|
|
|
184
184
|
};
|
|
185
185
|
export {
|
|
186
186
|
Bt as D,
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
dt as i,
|
|
188
|
+
_t as v
|
|
189
189
|
};
|
|
@@ -1,90 +1,90 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as e } from "./jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c } from "./index.CvOaL64Y.js";
|
|
4
|
-
import { useState as
|
|
5
|
-
import { u as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { DSSystemFeedback as
|
|
10
|
-
import { g as
|
|
11
|
-
import '../assets/InputStepper.
|
|
12
|
-
input:
|
|
13
|
-
"input--invalid": "_input--
|
|
4
|
+
import { useState as f, useRef as N, useEffect as w } from "react";
|
|
5
|
+
import { u as ft } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
|
+
import { M as E, a as H, u as M } from "./Input.utils.ChV6RJsh.js";
|
|
7
|
+
import { Asterisk as mt } from "../asterisk.DDn-yX4P.js";
|
|
8
|
+
import { DSButton as X } from "../button.CkHCQg3Y.js";
|
|
9
|
+
import { DSSystemFeedback as gt } from "../systemfeedback._8gatmgR.js";
|
|
10
|
+
import { g as S } from "./helpers.B1JT5ShS.js";
|
|
11
|
+
import '../assets/InputStepper.B80KulYE.css';const ht = "_input_td0g0_226", bt = "_input--invalid_td0g0_338", xt = "_input--small_td0g0_345", St = "_input--has-leading-icon_td0g0_399", yt = "_input--has-action-button_td0g0_402", It = "_input--has-second-action-button_td0g0_405", vt = "_input--has-affix_td0g0_417", At = "_input--is-ready_td0g0_431", Bt = "_root_td0g0_441", Dt = "_hint_td0g0_449", Nt = "_label_td0g0_449", wt = "_wrapper_td0g0_453", Et = "_affix_td0g0_459", Ht = "_affix--small_td0g0_481", Lt = "_affix--disabled_td0g0_495", jt = "_prefix_td0g0_498", Rt = "_affix--readonly_td0g0_501", kt = "_suffix_td0g0_511", Ct = "_action-button_td0g0_518", $t = "_label--hidden_td0g0_537", Ft = "_feedback_td0g0_566", Vt = "_second-action-button_td0g0_580", Pt = "_value-announcer_td0g0_584", n = {
|
|
12
|
+
input: ht,
|
|
13
|
+
"input--invalid": "_input--invalid_td0g0_338",
|
|
14
14
|
inputInvalid: bt,
|
|
15
|
-
"input--small": "_input--
|
|
16
|
-
inputSmall:
|
|
17
|
-
"input--has-leading-icon": "_input--has-leading-
|
|
18
|
-
inputHasLeadingIcon:
|
|
19
|
-
"input--has-action-button": "_input--has-action-
|
|
20
|
-
inputHasActionButton:
|
|
21
|
-
"input--has-second-action-button": "_input--has-second-action-
|
|
15
|
+
"input--small": "_input--small_td0g0_345",
|
|
16
|
+
inputSmall: xt,
|
|
17
|
+
"input--has-leading-icon": "_input--has-leading-icon_td0g0_399",
|
|
18
|
+
inputHasLeadingIcon: St,
|
|
19
|
+
"input--has-action-button": "_input--has-action-button_td0g0_402",
|
|
20
|
+
inputHasActionButton: yt,
|
|
21
|
+
"input--has-second-action-button": "_input--has-second-action-button_td0g0_405",
|
|
22
22
|
inputHasSecondActionButton: It,
|
|
23
|
-
"input--has-affix": "_input--has-
|
|
24
|
-
inputHasAffix:
|
|
25
|
-
"input--is-ready": "_input--is-
|
|
23
|
+
"input--has-affix": "_input--has-affix_td0g0_417",
|
|
24
|
+
inputHasAffix: vt,
|
|
25
|
+
"input--is-ready": "_input--is-ready_td0g0_431",
|
|
26
26
|
inputIsReady: At,
|
|
27
27
|
root: Bt,
|
|
28
28
|
hint: Dt,
|
|
29
29
|
label: Nt,
|
|
30
30
|
wrapper: wt,
|
|
31
31
|
affix: Et,
|
|
32
|
-
"affix--small": "_affix--
|
|
32
|
+
"affix--small": "_affix--small_td0g0_481",
|
|
33
33
|
affixSmall: Ht,
|
|
34
|
-
"affix--disabled": "_affix--
|
|
34
|
+
"affix--disabled": "_affix--disabled_td0g0_495",
|
|
35
35
|
affixDisabled: Lt,
|
|
36
36
|
prefix: jt,
|
|
37
|
-
"affix--readonly": "_affix--
|
|
37
|
+
"affix--readonly": "_affix--readonly_td0g0_501",
|
|
38
38
|
affixReadonly: Rt,
|
|
39
39
|
suffix: kt,
|
|
40
|
-
"action-button": "_action-
|
|
40
|
+
"action-button": "_action-button_td0g0_518",
|
|
41
41
|
actionButton: Ct,
|
|
42
|
-
"label--hidden": "_label--
|
|
42
|
+
"label--hidden": "_label--hidden_td0g0_537",
|
|
43
43
|
labelHidden: $t,
|
|
44
44
|
feedback: Ft,
|
|
45
|
-
"second-action-button": "_second-action-
|
|
45
|
+
"second-action-button": "_second-action-button_td0g0_580",
|
|
46
46
|
secondActionButton: Vt,
|
|
47
|
-
"value-announcer": "_value-
|
|
47
|
+
"value-announcer": "_value-announcer_td0g0_584",
|
|
48
48
|
valueAnnouncer: Pt
|
|
49
49
|
}, Tt = ({
|
|
50
50
|
id: a,
|
|
51
|
-
label:
|
|
52
|
-
prefix:
|
|
53
|
-
suffix:
|
|
51
|
+
label: m,
|
|
52
|
+
prefix: g,
|
|
53
|
+
suffix: h
|
|
54
54
|
}) => {
|
|
55
55
|
if (!a)
|
|
56
56
|
throw new Error(
|
|
57
|
-
|
|
57
|
+
S(
|
|
58
58
|
"DSInputStepper",
|
|
59
59
|
'A unique "id" prop is required. Please add an unique "id" prop to the DSInputStepper component.'
|
|
60
60
|
)
|
|
61
61
|
);
|
|
62
|
-
if (!
|
|
62
|
+
if (!m)
|
|
63
63
|
throw new Error(
|
|
64
|
-
|
|
64
|
+
S(
|
|
65
65
|
"DSInputStepper",
|
|
66
66
|
`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}.`
|
|
67
67
|
)
|
|
68
68
|
);
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
g && g.length > E && console.warn(
|
|
70
|
+
S(
|
|
71
71
|
"DSInputStepper",
|
|
72
72
|
`Prefix length must not exceed ${E} characters.`
|
|
73
73
|
)
|
|
74
|
-
),
|
|
75
|
-
|
|
74
|
+
), h && h.length > H && console.warn(
|
|
75
|
+
S(
|
|
76
76
|
"DSInputStepper",
|
|
77
77
|
`Suffix length must not exceed ${H} characters.`
|
|
78
78
|
)
|
|
79
79
|
);
|
|
80
80
|
}, Qt = ({
|
|
81
81
|
id: a,
|
|
82
|
-
label:
|
|
83
|
-
announcementText:
|
|
84
|
-
className:
|
|
82
|
+
label: m,
|
|
83
|
+
announcementText: g = "Value changed to",
|
|
84
|
+
className: h,
|
|
85
85
|
disabled: r = !1,
|
|
86
86
|
decreaseAmountButtonLabel: q = "Decrease",
|
|
87
|
-
hint:
|
|
87
|
+
hint: y,
|
|
88
88
|
hideLabel: G = !1,
|
|
89
89
|
invalid: b = !1,
|
|
90
90
|
increaseAmountButtonLabel: O = "Increase",
|
|
@@ -93,24 +93,24 @@ import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt =
|
|
|
93
93
|
min: j = 0,
|
|
94
94
|
readonly: p = !1,
|
|
95
95
|
required: R = !1,
|
|
96
|
-
size:
|
|
96
|
+
size: o = "medium",
|
|
97
97
|
step: U = 1,
|
|
98
98
|
suffix: d,
|
|
99
99
|
systemFeedback: I,
|
|
100
|
-
value:
|
|
100
|
+
value: x,
|
|
101
101
|
onChange: k,
|
|
102
102
|
...J
|
|
103
103
|
}) => {
|
|
104
104
|
process.env.NODE_ENV !== "production" && Tt({
|
|
105
105
|
id: a,
|
|
106
|
-
label:
|
|
106
|
+
label: m,
|
|
107
107
|
prefix: u,
|
|
108
108
|
suffix: d
|
|
109
109
|
});
|
|
110
|
-
const [K, Q] =
|
|
110
|
+
const [K, Q] = f(!1), [_, v] = f(x), [A, C] = f(""), [Y, Z] = f(!1), [z, tt] = f({}), s = N(null), nt = u == null ? void 0 : u.substring(0, E), B = N(null), et = d == null ? void 0 : d.substring(0, H), D = N(null), at = ft(G);
|
|
111
111
|
w(() => {
|
|
112
|
-
|
|
113
|
-
}, [
|
|
112
|
+
x && v(x);
|
|
113
|
+
}, [x]), w(() => {
|
|
114
114
|
if (A) {
|
|
115
115
|
const t = setTimeout(() => {
|
|
116
116
|
C("");
|
|
@@ -118,11 +118,11 @@ import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt =
|
|
|
118
118
|
return () => clearTimeout(t);
|
|
119
119
|
}
|
|
120
120
|
}, [A]), w(() => {
|
|
121
|
-
var
|
|
121
|
+
var i;
|
|
122
122
|
const t = (l) => {
|
|
123
123
|
l.preventDefault();
|
|
124
124
|
};
|
|
125
|
-
return (
|
|
125
|
+
return (i = s.current) == null || i.addEventListener("wheel", t, {
|
|
126
126
|
// The { passive: false } option is used to indicate that the event listener wants to cancel the event, allowing preventDefault to work as expected.
|
|
127
127
|
passive: !1
|
|
128
128
|
}), () => {
|
|
@@ -130,17 +130,17 @@ import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt =
|
|
|
130
130
|
(l = s.current) == null || l.removeEventListener("wheel", t);
|
|
131
131
|
};
|
|
132
132
|
}, []), M(() => {
|
|
133
|
-
const t =
|
|
133
|
+
const t = o === "medium" ? 16 : 8, i = {};
|
|
134
134
|
if (B.current) {
|
|
135
135
|
const l = B.current.offsetWidth;
|
|
136
|
-
|
|
136
|
+
i.paddingInlineStart = t + l + "px";
|
|
137
137
|
}
|
|
138
138
|
if (D.current) {
|
|
139
139
|
const l = D.current.offsetWidth;
|
|
140
|
-
|
|
140
|
+
i.paddingInlineEnd = t + l + "px";
|
|
141
141
|
}
|
|
142
|
-
tt(
|
|
143
|
-
}, [u, d,
|
|
142
|
+
tt(i), Q(!0);
|
|
143
|
+
}, [u, d, o, Y]), M(() => {
|
|
144
144
|
(async () => {
|
|
145
145
|
"fonts" in document && (await document.fonts.load(
|
|
146
146
|
'1em "STIHL Contraface Digital Text Regular"'
|
|
@@ -148,12 +148,12 @@ import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt =
|
|
|
148
148
|
})();
|
|
149
149
|
}, []);
|
|
150
150
|
const $ = c(n.affix, {
|
|
151
|
-
[n.affixSmall]:
|
|
151
|
+
[n.affixSmall]: o === "small",
|
|
152
152
|
[n.affixDisabled]: r,
|
|
153
153
|
[n.affixReadonly]: p
|
|
154
|
-
}), F = `${a}-label`, V = `${a}-feedback`, P = `${a}-hint`, T = `${a}-value-announcer`, st =
|
|
154
|
+
}), F = `${a}-label`, V = `${a}-feedback`, P = `${a}-hint`, T = `${a}-value-announcer`, st = y ? ` ${P}` : "", ot = c(n.root, h), it = c(n.input, {
|
|
155
155
|
// small input
|
|
156
|
-
[n.inputSmall]:
|
|
156
|
+
[n.inputSmall]: o === "small",
|
|
157
157
|
// invalid state
|
|
158
158
|
[n.inputInvalid]: b,
|
|
159
159
|
// prefix/suffix
|
|
@@ -163,18 +163,18 @@ import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt =
|
|
|
163
163
|
// hide label only visually to keep them available for assistive technologies
|
|
164
164
|
[n.labelHidden]: at
|
|
165
165
|
}), ct = c(n.secondActionButton, {
|
|
166
|
-
[n.secondActionButtonSmall]:
|
|
166
|
+
[n.secondActionButtonSmall]: o === "small"
|
|
167
167
|
}), ut = c(n.actionButton, {
|
|
168
|
-
[n.actionButtonSmall]:
|
|
168
|
+
[n.actionButtonSmall]: o === "small"
|
|
169
169
|
}), dt = () => {
|
|
170
170
|
const t = [T];
|
|
171
171
|
return b && I && t.push(V), t.join(" ");
|
|
172
172
|
}, W = () => {
|
|
173
173
|
var t;
|
|
174
174
|
if (s.current) {
|
|
175
|
-
|
|
176
|
-
const
|
|
177
|
-
(t = s.current) == null || t.dispatchEvent(
|
|
175
|
+
v(s.current.value);
|
|
176
|
+
const i = new Event("change", { bubbles: !0 });
|
|
177
|
+
(t = s.current) == null || t.dispatchEvent(i), C(`${g} ${s.current.value}`);
|
|
178
178
|
}
|
|
179
179
|
}, rt = () => {
|
|
180
180
|
var t;
|
|
@@ -182,15 +182,15 @@ import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt =
|
|
|
182
182
|
}, pt = () => {
|
|
183
183
|
var t;
|
|
184
184
|
(t = s.current) == null || t.stepUp(), W();
|
|
185
|
-
},
|
|
186
|
-
|
|
185
|
+
}, _t = (t) => {
|
|
186
|
+
v(t.target.value), k && k(t);
|
|
187
187
|
};
|
|
188
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
188
|
+
return /* @__PURE__ */ e.jsxs("div", { className: ot, children: [
|
|
189
189
|
/* @__PURE__ */ e.jsxs("label", { className: lt, id: F, htmlFor: a, children: [
|
|
190
|
-
|
|
191
|
-
R && /* @__PURE__ */ e.jsx(
|
|
190
|
+
m,
|
|
191
|
+
R && /* @__PURE__ */ e.jsx(mt, {})
|
|
192
192
|
] }),
|
|
193
|
-
|
|
193
|
+
y && /* @__PURE__ */ e.jsx("div", { className: n.hint, id: P, children: y }),
|
|
194
194
|
/* @__PURE__ */ e.jsx(
|
|
195
195
|
"div",
|
|
196
196
|
{
|
|
@@ -202,7 +202,7 @@ import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt =
|
|
|
202
202
|
}
|
|
203
203
|
),
|
|
204
204
|
b && I && /* @__PURE__ */ e.jsx(
|
|
205
|
-
|
|
205
|
+
gt,
|
|
206
206
|
{
|
|
207
207
|
className: n.feedback,
|
|
208
208
|
message: I,
|
|
@@ -223,7 +223,7 @@ import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt =
|
|
|
223
223
|
/* @__PURE__ */ e.jsx(
|
|
224
224
|
"input",
|
|
225
225
|
{
|
|
226
|
-
className:
|
|
226
|
+
className: it,
|
|
227
227
|
id: a,
|
|
228
228
|
ref: s,
|
|
229
229
|
...J,
|
|
@@ -239,8 +239,8 @@ import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt =
|
|
|
239
239
|
required: R,
|
|
240
240
|
step: U,
|
|
241
241
|
type: "number",
|
|
242
|
-
value:
|
|
243
|
-
onChange:
|
|
242
|
+
value: _,
|
|
243
|
+
onChange: _t
|
|
244
244
|
}
|
|
245
245
|
),
|
|
246
246
|
d && /* @__PURE__ */ e.jsx(
|
|
@@ -260,9 +260,9 @@ import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt =
|
|
|
260
260
|
iconName: "minus",
|
|
261
261
|
variant: "filled",
|
|
262
262
|
className: ct,
|
|
263
|
-
size:
|
|
263
|
+
size: o,
|
|
264
264
|
onClick: rt,
|
|
265
|
-
disabled: r || p || !!
|
|
265
|
+
disabled: r || p || !!_ && Number(_) <= j,
|
|
266
266
|
type: "button",
|
|
267
267
|
children: q
|
|
268
268
|
}
|
|
@@ -275,9 +275,9 @@ import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt =
|
|
|
275
275
|
iconName: "plus",
|
|
276
276
|
variant: "filled",
|
|
277
277
|
className: ut,
|
|
278
|
-
size:
|
|
278
|
+
size: o,
|
|
279
279
|
onClick: pt,
|
|
280
|
-
disabled: r || p || !!
|
|
280
|
+
disabled: r || p || !!_ && Number(_) >= L,
|
|
281
281
|
type: "button",
|
|
282
282
|
children: O
|
|
283
283
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as e } from "./jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as s } from "./index.CvOaL64Y.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import '../assets/Notification.
|
|
7
|
-
root:
|
|
8
|
-
"root--success": "_root--
|
|
9
|
-
rootSuccess:
|
|
10
|
-
"root--error": "_root--
|
|
4
|
+
import { DSButton as u } from "../button.CkHCQg3Y.js";
|
|
5
|
+
import { D as b } from "./Icon.n4XZrQ4N.js";
|
|
6
|
+
import '../assets/Notification.DK6agBGS.css';const g = "_root_70bef_76", N = "_root--success_70bef_102", h = "_root--error_70bef_106", I = "_root--warning_70bef_110", x = "_root--hide-icon_70bef_114", A = "_content_70bef_128", C = "_content--hide-close-button_70bef_135", H = "_content--hide-icon_70bef_138", j = "_icon_70bef_142", S = "_message_70bef_146", p = "_custom-action-area_70bef_161", o = {
|
|
7
|
+
root: g,
|
|
8
|
+
"root--success": "_root--success_70bef_102",
|
|
9
|
+
rootSuccess: N,
|
|
10
|
+
"root--error": "_root--error_70bef_106",
|
|
11
11
|
rootError: h,
|
|
12
|
-
"root--warning": "_root--
|
|
12
|
+
"root--warning": "_root--warning_70bef_110",
|
|
13
13
|
rootWarning: I,
|
|
14
|
-
"root--hide-icon": "_root--hide-
|
|
14
|
+
"root--hide-icon": "_root--hide-icon_70bef_114",
|
|
15
15
|
rootHideIcon: x,
|
|
16
16
|
content: A,
|
|
17
|
-
"content--hide-close-button": "_content--hide-close-
|
|
17
|
+
"content--hide-close-button": "_content--hide-close-button_70bef_135",
|
|
18
18
|
contentHideCloseButton: C,
|
|
19
|
-
"content--hide-icon": "_content--hide-
|
|
19
|
+
"content--hide-icon": "_content--hide-icon_70bef_138",
|
|
20
20
|
contentHideIcon: H,
|
|
21
21
|
icon: j,
|
|
22
22
|
message: S,
|
|
23
|
-
"custom-action-area": "_custom-action-
|
|
24
|
-
customActionArea:
|
|
23
|
+
"custom-action-area": "_custom-action-area_70bef_161",
|
|
24
|
+
customActionArea: p
|
|
25
25
|
}, R = [
|
|
26
26
|
"success",
|
|
27
27
|
"error",
|
|
28
28
|
"warning",
|
|
29
29
|
"info"
|
|
30
|
-
],
|
|
30
|
+
], w = {
|
|
31
31
|
success: "circle-check-colored",
|
|
32
32
|
error: "diamond-exclamationmark-colored",
|
|
33
33
|
warning: "triangle-exclamationmark-colored",
|
|
34
34
|
info: "circle-info-colored"
|
|
35
|
-
},
|
|
35
|
+
}, O = {
|
|
36
36
|
error: "alert",
|
|
37
37
|
warning: "alert",
|
|
38
38
|
info: "status",
|
|
@@ -46,31 +46,31 @@ import '../assets/Notification.Bg63cvs4.css';const N = "_root_l12pe_76", f = "_r
|
|
|
46
46
|
hideCloseButton: r = !1,
|
|
47
47
|
hideIcon: n = !1,
|
|
48
48
|
onClose: l,
|
|
49
|
-
...
|
|
49
|
+
...f
|
|
50
50
|
}) => {
|
|
51
|
-
const
|
|
51
|
+
const m = s(o.root, a, {
|
|
52
52
|
[o.rootSuccess]: t === "success",
|
|
53
53
|
[o.rootError]: t === "error",
|
|
54
54
|
[o.rootWarning]: t === "warning",
|
|
55
55
|
[o.rootInfo]: t === "info",
|
|
56
56
|
[o.rootHideIcon]: n
|
|
57
|
-
}),
|
|
57
|
+
}), d = s(o.content, {
|
|
58
58
|
[o.contentHideCloseButton]: r,
|
|
59
59
|
[o.contentHideIcon]: n
|
|
60
60
|
});
|
|
61
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
62
|
-
/* @__PURE__ */ e.jsxs("div", { className:
|
|
61
|
+
return /* @__PURE__ */ e.jsxs("div", { className: m, ...f, role: O[t], children: [
|
|
62
|
+
/* @__PURE__ */ e.jsxs("div", { className: d, children: [
|
|
63
63
|
!n && /* @__PURE__ */ e.jsx(
|
|
64
|
-
|
|
64
|
+
b,
|
|
65
65
|
{
|
|
66
|
-
name:
|
|
66
|
+
name: w[t],
|
|
67
67
|
className: o.icon,
|
|
68
68
|
"aria-hidden": "true"
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
71
|
/* @__PURE__ */ e.jsx("div", { className: o.message, children: i }),
|
|
72
72
|
!r && /* @__PURE__ */ e.jsx(
|
|
73
|
-
|
|
73
|
+
u,
|
|
74
74
|
{
|
|
75
75
|
hideLabel: !0,
|
|
76
76
|
iconName: "cross",
|
|
@@ -89,5 +89,5 @@ import '../assets/Notification.Bg63cvs4.css';const N = "_root_l12pe_76", f = "_r
|
|
|
89
89
|
export {
|
|
90
90
|
B as D,
|
|
91
91
|
R as N,
|
|
92
|
-
|
|
92
|
+
w as a
|
|
93
93
|
};
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { j as h } from "./jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as C } from "./index.CvOaL64Y.js";
|
|
4
4
|
import { forwardRef as N, useState as A } from "react";
|
|
5
|
-
import { D as B } from "./Fieldset.
|
|
6
|
-
import { DSRadio as M } from "../radio.
|
|
5
|
+
import { D as B } from "./Fieldset.P09LInkT.js";
|
|
6
|
+
import { DSRadio as M } from "../radio.CWGJtmKl.js";
|
|
7
7
|
import { s as m } from "./RadioGroup.module.BBZwHDjW.js";
|
|
8
8
|
import { g as t } from "./helpers.B1JT5ShS.js";
|
|
9
9
|
const f = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the DSRadioGroup component.`, D = (o) => o.some(({ hint: a }) => !!a), E = (o) => o.some(({ customArea: a }) => !!a), O = ({
|