@stihl-design-system/components 1.0.0-RC.8 → 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/assets/CustomReactSelect.CMkn-EGK.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/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.C9VX3c5W.js → checkboxgroup.CPENWSuk.js} +2 -2
- package/chunks/{CheckboxGroup.kG1WWhe_.js → CheckboxGroup.Dx_Hn8Dl.js} +2 -2
- package/chunks/CustomReactSelect.C4rTVlvy.js +3593 -0
- package/chunks/{Dialog.o7bcfCBf.js → Dialog.TPjJ_yxK.js} +1 -1
- package/chunks/{Drawer.VbG4cfgJ.js → Drawer.DrLGSch-.js} +1 -1
- 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.BbCdCCax.js → InputSearch.DrgdGFT_.js} +49 -49
- package/chunks/{InputStepper.DR3NR_II.js → InputStepper.DJEuIr4C.js} +76 -76
- package/chunks/{Notification.B6a6FOlS.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.D9DAuz2m.js +89 -0
- package/{combobox.Dgp3kvFR.js → combobox.jDpV6bv-.js} +1 -1
- package/{customreactselect.BxkJi_UE.js → customreactselect.C2QK_Q8T.js} +4 -4
- package/{dialog.CVFl9IVY.js → dialog.BPX7RJtQ.js} +2 -2
- package/{drawer.BheN3lap.js → drawer.BfEPcSsQ.js} +2 -2
- package/fieldset.4yvz0e7M.js +11 -0
- package/heading.CAkraI2D.js +50 -0
- package/index.es.js +26 -26
- package/input.lLMqAG-6.js +236 -0
- package/{inputpassword.CvnUeLTq.js → inputpassword.BIdYGrhB.js} +4 -4
- package/{inputsearch.ClX9PlYG.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/{notification.BGRev3jC.js → notification.DdJjbSdM.js} +2 -2
- package/optioncheckbox.DwQEfxGG.js +43 -0
- package/package.json +5 -3
- 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.ALhHiH8t.js → skiptocontent.fP4SOp-p.js} +9 -9
- 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.CtgjrtBC.js → toast.BB8L0ixD.js} +2 -2
- package/{toastmanager.6mUZ8eCN.js → toastmanager.DifUvJcg.js} +1 -1
- package/utils/index.d.ts +1 -0
- package/utils/useIsomorphicLayoutEffect.d.ts +26 -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.ChT0hchk.css +0 -1
- package/assets/asterisk.JlyPArZu.css +0 -1
- package/assets/button.3UhhGy87.css +0 -1
- package/assets/buttonround.DXDlPKwD.css +0 -1
- package/assets/checkbox.BjIn2stV.css +0 -1
- package/assets/heading.CCbuI4X-.css +0 -1
- package/assets/input.71tOIrpp.css +0 -1
- package/assets/link.BJHmVrew.css +0 -1
- package/assets/linkstandalone.Bx8Uvo0G.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.DPrDynn_.js +0 -135
- package/buttonround.ix_-O4l1.js +0 -118
- package/checkbox.hoVQ37RP.js +0 -112
- package/chunks/CustomReactSelect.BVv0Zcvc.js +0 -4981
- package/chunks/InputPassword.TlusvIds.js +0 -140
- package/chunks/Select.COdS787F.js +0 -191
- package/chunks/Textarea.oqCrSopu.js +0 -195
- package/chunks/Toast.BpyBIPFW.js +0 -89
- package/fieldset.aY3V2jK2.js +0 -11
- package/heading.BTNroD1E.js +0 -50
- package/input.CfO9lL_o.js +0 -236
- package/inputstepper.Dd76qaQT.js +0 -13
- package/link.CIY7SOpm.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,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 { DSButton as
|
|
5
|
-
import { D as
|
|
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 = ({
|
|
@@ -0,0 +1,191 @@
|
|
|
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.n4XZrQ4N.js";
|
|
8
|
+
import { DSSystemFeedback as T } from "../systemfeedback._8gatmgR.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
|
+
};
|