@stihl-design-system/components 1.0.0-RC.2 → 1.0.0-RC.4
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/arialiveregions.49Zyf6mj.js +27 -0
- package/arialiveregions.d.ts +1 -0
- package/assets/CustomReactSelect.B0rJLjN0.css +1 -0
- package/assets/Fieldset.xazpUXJX.css +1 -0
- package/assets/InputPassword.C3Uyj7oA.css +1 -0
- package/assets/InputSearch.tL3e9-Ob.css +1 -0
- package/assets/InputStepper.paPJix5A.css +1 -0
- package/assets/Notification.CCCbfXEz.css +1 -0
- package/assets/RadioGroup.Ur8Ro-XL.css +1 -0
- package/assets/Select.D2qBxaHP.css +1 -0
- package/assets/Textarea.BKbocznb.css +1 -0
- package/assets/Toast.CAP_EwDX.css +1 -0
- package/assets/arialiveregions.VnhjP8Gr.css +1 -0
- package/assets/asterisk.C-o6rbGQ.css +1 -0
- package/assets/button.BuIpnG-S.css +1 -0
- package/assets/buttonround.C3ph5Yyu.css +1 -0
- package/assets/checkbox.BsFEWfQe.css +1 -0
- package/assets/dialog.BGK3mgk7.css +1 -0
- package/assets/heading.CGFucb-C.css +1 -0
- package/assets/input.BcP5kkZ2.css +1 -0
- package/assets/link.DQy_OhwC.css +1 -0
- package/assets/linkstandalone.Dh6bE5Fb.css +1 -0
- package/assets/radio.CSHQGdpr.css +1 -0
- package/assets/switch.sqve8ApJ.css +1 -0
- package/assets/title.CE0Dm7PI.css +1 -0
- package/asterisk.DU8THnoC.js +8 -0
- package/button.DX_nxoJC.js +135 -0
- package/buttonround.CXsBk9nL.js +118 -0
- package/{checkbox.Bx5D_GAe.js → checkbox.B43oeMeC.js} +30 -30
- package/checkboxgroup.C7aCjYds.js +9 -0
- package/chunks/AriaLiveRegions.utils.DzWI5KCU.js +31 -0
- package/{checkboxgroup.gQwSHy4i.js → chunks/CheckboxGroup.CS6Q_TeZ.js} +27 -20
- package/chunks/{CustomReactSelect.Pvkkof1f.js → CustomReactSelect.DtmbYZUf.js} +516 -510
- package/chunks/Fieldset.BokeZzG5.js +99 -0
- package/chunks/Icon.9gDIp6p4.js +217 -0
- package/chunks/{Input.utils.Bly6ZzLI.js → Input.utils.AKWCNkpA.js} +12 -8
- package/chunks/InputPassword.jpUCijp7.js +140 -0
- package/chunks/InputSearch.BmOtAZcR.js +190 -0
- package/chunks/InputStepper.DTKjUL4U.js +291 -0
- package/chunks/Notification.CUPOlHAX.js +93 -0
- package/{radiogroup.7ptQiohb.js → chunks/RadioGroup.DpwnVv7u.js} +37 -29
- package/chunks/RadioGroup.module.bi3leRes.js +11 -0
- package/chunks/Select.DkDZo0ky.js +193 -0
- package/chunks/Textarea.C938p79X.js +195 -0
- package/chunks/Toast.CLYrwQVO.js +89 -0
- package/chunks/{circle-info-colored.DLY6BTL4.js → circle-info-colored.D2pp54gf.js} +3 -3
- package/chunks/whatsapp.CPpu-7Nn.js +10 -0
- package/{combobox.BOJ7aq_B.js → combobox.BaSkiD6f.js} +7 -7
- package/components/AriaLiveRegions/AriaLiveRegions.d.ts +4 -0
- package/components/AriaLiveRegions/AriaLiveRegions.utils.d.ts +5 -0
- package/components/AriaLiveRegions/AriaLiveRegions.utils.test.d.ts +1 -0
- package/components/Checkbox/Checkbox.d.ts +1 -1
- package/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/components/CheckboxGroup/CheckboxGroup.utils.d.ts +1 -1
- package/components/Dialog/Dialog.d.ts +11 -0
- package/components/Dialog/Dialog.utils.d.ts +0 -0
- package/components/Fieldset/Fieldset.d.ts +1 -1
- package/components/Fieldset/Fieldset.utils.d.ts +1 -1
- package/components/Heading/Heading.utils.d.ts +1 -1
- package/components/Logo/Logo.d.ts +4 -2
- package/components/Logo/Logo.utils.d.ts +1 -0
- package/components/Notification/Notification.d.ts +26 -0
- package/components/Notification/Notification.test.d.ts +1 -0
- package/components/Notification/Notification.utils.d.ts +5 -0
- package/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/components/RadioGroup/RadioGroup.utils.d.ts +1 -1
- package/components/Toast/Toast.d.ts +21 -0
- package/components/Toast/Toast.utils.d.ts +9 -0
- package/components/Toast/ToastManager.d.ts +6 -0
- package/components/Toast/ToastManager.test.d.ts +1 -0
- package/components/Toast/ToastManager.utils.d.ts +2 -0
- package/components/Toast/ToastManager.utils.test.d.ts +1 -0
- package/customreactselect.LTbjaBN2.js +13 -0
- package/dialog.BkXwcbUh.js +45 -0
- package/dialog.d.ts +1 -0
- package/fieldset.BXOWK-B-.js +11 -0
- package/{floatingactionbutton.BtQVIj6W.js → floatingactionbutton.-nDRRiXY.js} +9 -9
- package/heading.DqGbFfj2.js +50 -0
- package/icon.Cpp_9L1I.js +8 -0
- package/index.d.ts +24 -0
- package/index.es.js +138 -45
- package/input.BM6tyRUm.js +236 -0
- package/inputpassword.DUxH1K_k.js +12 -0
- package/inputsearch.B-vePHle.js +13 -0
- package/inputstepper.C2ypADPI.js +13 -0
- package/link.B4XZoLDj.js +115 -0
- package/linkstandalone.BSfd95Pd.js +79 -0
- package/{logo.DXWgPUY4.js → logo.C_oJ8isW.js} +25 -24
- package/notification.CxxAOdNV.js +9 -0
- package/notification.d.ts +1 -0
- package/{optioncheckbox.CYikfEsE.js → optioncheckbox.CUV1MQhh.js} +3 -3
- package/package.json +4 -4
- package/radio.Bhu9OUY-.js +79 -0
- package/radiogroup.CMJ1b38q.js +11 -0
- package/select.DFJK2mHF.js +12 -0
- package/{spinner.CSzQEBx2.js → spinner.BskX4ovu.js} +1 -1
- package/styles/scss/_index.scss +1 -0
- package/styles/scss/lib/_animation.scss +18 -4
- package/styles/scss/lib/_grid-extended.scss +2 -2
- package/styles/scss/lib/_grid-sidebar-sidebar.scss +4 -2
- package/styles/scss/lib/_grid-sidebar.scss +6 -6
- package/styles/scss/lib/_heading.scss +14 -1
- package/styles/scss/lib/_link.scss +10 -9
- package/styles/scss/lib/_shadow.scss +10 -0
- package/styles/scss/lib/_text.scss +4 -0
- package/styles/scss/lib/_theme.scss +7 -5
- package/switch.Bx2tDKx0.js +65 -0
- package/{systemfeedback.rBgdiL5T.js → systemfeedback.4Hkfigi-.js} +1 -1
- package/textarea.DPy3TJJf.js +12 -0
- package/title.icX0VDiO.js +36 -0
- package/toast.C-Yg5EoE.js +10 -0
- package/toast.d.ts +1 -0
- package/toastmanager.DQ_-eTrx.js +96 -0
- package/toastmanager.d.ts +1 -0
- package/types/icon-types.d.ts +1 -1
- package/utils/vitest.setup.d.ts +2 -0
- package/assets/CustomReactSelect.bVnR5yBP.css +0 -1
- package/assets/RadioGroup.SF2fv4CL.css +0 -1
- package/assets/asterisk.Bz7RZnKb.css +0 -1
- package/assets/button.C6ZbQtZ-.css +0 -1
- package/assets/buttonround.CjJUeMND.css +0 -1
- package/assets/checkbox.Bbc6PYDK.css +0 -1
- package/assets/fieldset.DTFs_koU.css +0 -1
- package/assets/heading.5HpYs7wS.css +0 -1
- package/assets/input.GpXQJqEO.css +0 -1
- package/assets/inputpassword.B9J1hCcj.css +0 -1
- package/assets/inputsearch.BY0BGFPK.css +0 -1
- package/assets/inputstepper.B0oC1URa.css +0 -1
- package/assets/link.Di4qXro5.css +0 -1
- package/assets/linkstandalone.239FeO2E.css +0 -1
- package/assets/radio.pqc9u_wx.css +0 -1
- package/assets/select.DLOQ6wu0.css +0 -1
- package/assets/switch.DVlaePGM.css +0 -1
- package/assets/textarea.BNOpd7Nf.css +0 -1
- package/assets/title.1dq1eWy9.css +0 -1
- package/asterisk.BlYjsfkN.js +0 -8
- package/button.Di5XtChf.js +0 -135
- package/buttonround._w4KDbHE.js +0 -118
- package/chunks/RadioGroup.module.B35YQcsb.js +0 -11
- package/customreactselect.DPHXAssl.js +0 -13
- package/fieldset.yE6WV6Ls.js +0 -98
- package/heading.C6k7Gakb.js +0 -44
- package/icon.CmAhxgHK.js +0 -215
- package/input.vP5xcwzV.js +0 -236
- package/inputpassword.BiQ8ORmn.js +0 -139
- package/inputsearch.BA9N3RRc.js +0 -188
- package/inputstepper.Cyxeg2Cj.js +0 -290
- package/link.BoSdsZHj.js +0 -115
- package/linkstandalone.BoN7nARO.js +0 -79
- package/radio.DTO5-Yzf.js +0 -79
- package/select.Dx80W7cW.js +0 -190
- package/switch.BwGtQdnx.js +0 -65
- package/textarea.C8tp1ciU.js +0 -193
- package/title.BT-uIobN.js +0 -36
- /package/assets/{icon.CB-KQmw4.css → Icon.CB-KQmw4.css} +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as l } from "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
+
import { c as _ } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import { D as y } from "./chunks/Icon.9gDIp6p4.js";
|
|
5
|
+
import { DSSpinner as H } from "./spinner.BskX4ovu.js";
|
|
6
|
+
import './assets/buttonround.C3ph5Yyu.css';const p = "_root_eez0z_125", F = "_root--highlight_eez0z_194", O = "_root--dark-highlight_eez0z_194", G = "_root--filled_eez0z_272", I = "_root--outline_eez0z_300", S = "_root--ghost_eez0z_327", x = "_root--ghost-flush_eez0z_352", j = "_root--small_eez0z_358", L = "_root--dark-filled_eez0z_433", C = "_root--dark-outline_eez0z_492", N = "_root--dark-ghost_eez0z_550", R = "_root--dark-ghost-flush_eez0z_606", B = "_root--icon-left_eez0z_665", E = "_root--icon-only_eez0z_681", T = "_root--icon-only-small_eez0z_690", q = "_loader_eez0z_701", w = "_icon--hidden_eez0z_713", A = "_label--hidden_eez0z_717", J = "_label--loading_eez0z_729", o = {
|
|
7
|
+
root: p,
|
|
8
|
+
"root--highlight": "_root--highlight_eez0z_194",
|
|
9
|
+
rootHighlight: F,
|
|
10
|
+
"root--dark-highlight": "_root--dark-highlight_eez0z_194",
|
|
11
|
+
rootDarkHighlight: O,
|
|
12
|
+
"root--filled": "_root--filled_eez0z_272",
|
|
13
|
+
rootFilled: G,
|
|
14
|
+
"root--outline": "_root--outline_eez0z_300",
|
|
15
|
+
rootOutline: I,
|
|
16
|
+
"root--ghost": "_root--ghost_eez0z_327",
|
|
17
|
+
rootGhost: S,
|
|
18
|
+
"root--ghost-flush": "_root--ghost-flush_eez0z_352",
|
|
19
|
+
rootGhostFlush: x,
|
|
20
|
+
"root--small": "_root--small_eez0z_358",
|
|
21
|
+
rootSmall: j,
|
|
22
|
+
"root--dark-filled": "_root--dark-filled_eez0z_433",
|
|
23
|
+
rootDarkFilled: L,
|
|
24
|
+
"root--dark-outline": "_root--dark-outline_eez0z_492",
|
|
25
|
+
rootDarkOutline: C,
|
|
26
|
+
"root--dark-ghost": "_root--dark-ghost_eez0z_550",
|
|
27
|
+
rootDarkGhost: N,
|
|
28
|
+
"root--dark-ghost-flush": "_root--dark-ghost-flush_eez0z_606",
|
|
29
|
+
rootDarkGhostFlush: R,
|
|
30
|
+
"root--icon-left": "_root--icon-left_eez0z_665",
|
|
31
|
+
rootIconLeft: B,
|
|
32
|
+
"root--icon-only": "_root--icon-only_eez0z_681",
|
|
33
|
+
rootIconOnly: E,
|
|
34
|
+
"root--icon-only-small": "_root--icon-only-small_eez0z_690",
|
|
35
|
+
rootIconOnlySmall: T,
|
|
36
|
+
loader: q,
|
|
37
|
+
"icon--hidden": "_icon--hidden_eez0z_713",
|
|
38
|
+
iconHidden: w,
|
|
39
|
+
"label--hidden": "_label--hidden_eez0z_717",
|
|
40
|
+
labelHidden: A,
|
|
41
|
+
"label--loading": "_label--loading_eez0z_729",
|
|
42
|
+
labelLoading: J
|
|
43
|
+
}, U = ({
|
|
44
|
+
children: d,
|
|
45
|
+
aria: z,
|
|
46
|
+
className: c,
|
|
47
|
+
dataTrackingid: g,
|
|
48
|
+
disabled: i = !1,
|
|
49
|
+
iconName: n = "placeholder",
|
|
50
|
+
iconSource: s,
|
|
51
|
+
loading: t = !1,
|
|
52
|
+
theme: r = "light",
|
|
53
|
+
variant: e = "filled",
|
|
54
|
+
onClick: a,
|
|
55
|
+
...k
|
|
56
|
+
}) => {
|
|
57
|
+
const u = _(
|
|
58
|
+
o.root,
|
|
59
|
+
o.rootIconOnlySmall,
|
|
60
|
+
c,
|
|
61
|
+
{
|
|
62
|
+
// variant
|
|
63
|
+
[o.rootFilled]: e === "filled",
|
|
64
|
+
[o.rootHighlight]: e === "highlight",
|
|
65
|
+
// dark theme
|
|
66
|
+
[o.rootDarkFilled]: r === "dark" && e === "filled",
|
|
67
|
+
[o.rootDarkHighlight]: r === "dark" && e === "highlight"
|
|
68
|
+
}
|
|
69
|
+
), f = _(o.label, o.labelHidden, {
|
|
70
|
+
// set label opacity to 0 when loading to prevent button size from changing
|
|
71
|
+
[o.labelLoading]: t
|
|
72
|
+
}), m = _(o.icon, {
|
|
73
|
+
// set icon opacity to 0 when loading to prevent button size from changing
|
|
74
|
+
[o.iconHidden]: t
|
|
75
|
+
}), b = r === "light" && e === "filled" ? "dark" : "light", D = (h) => {
|
|
76
|
+
if (i || t) {
|
|
77
|
+
h.preventDefault();
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
a && a(h);
|
|
81
|
+
};
|
|
82
|
+
return /* @__PURE__ */ l.jsxs(
|
|
83
|
+
"button",
|
|
84
|
+
{
|
|
85
|
+
className: u,
|
|
86
|
+
"data-trackingid": g,
|
|
87
|
+
type: "button",
|
|
88
|
+
onClick: D,
|
|
89
|
+
...z,
|
|
90
|
+
...k,
|
|
91
|
+
"aria-disabled": i || t,
|
|
92
|
+
"aria-busy": t,
|
|
93
|
+
children: [
|
|
94
|
+
t && /* @__PURE__ */ l.jsx(
|
|
95
|
+
H,
|
|
96
|
+
{
|
|
97
|
+
className: o.loader,
|
|
98
|
+
aria: { "aria-label": "Loading state" }
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ l.jsx("span", { className: f, children: d }),
|
|
102
|
+
(n || s) && /* @__PURE__ */ l.jsx(
|
|
103
|
+
y,
|
|
104
|
+
{
|
|
105
|
+
name: n,
|
|
106
|
+
theme: b,
|
|
107
|
+
source: s,
|
|
108
|
+
className: m,
|
|
109
|
+
"aria-hidden": "true"
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
export {
|
|
117
|
+
U as DSButtonRound
|
|
118
|
+
};
|
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as c } from "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as d } from "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import { forwardRef as I, useRef as H, useState as M, useEffect as g, useCallback as B } from "react";
|
|
5
5
|
import { u as E } from "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
6
|
-
import {
|
|
7
|
-
import { DSSystemFeedback as V } from "./systemfeedback.
|
|
8
|
-
import './assets/checkbox.
|
|
6
|
+
import { D as b } from "./chunks/Icon.9gDIp6p4.js";
|
|
7
|
+
import { DSSystemFeedback as V } from "./systemfeedback.4Hkfigi-.js";
|
|
8
|
+
import './assets/checkbox.BsFEWfQe.css';const w = "_root_10jm0_125", L = "_root--disabled_10jm0_144", O = "_checkbox_10jm0_148", P = "_icon-check_10jm0_162", R = "_icon-minus_10jm0_163", U = "_checkbox--invalid_10jm0_184", q = "_label--hidden_10jm0_189", z = "_input_10jm0_202", A = "_label_10jm0_189", F = "_feedback_10jm0_316", e = {
|
|
9
9
|
root: w,
|
|
10
|
-
"root--disabled": "_root--
|
|
10
|
+
"root--disabled": "_root--disabled_10jm0_144",
|
|
11
11
|
rootDisabled: L,
|
|
12
12
|
checkbox: O,
|
|
13
|
-
"icon-check": "_icon-
|
|
13
|
+
"icon-check": "_icon-check_10jm0_162",
|
|
14
14
|
iconCheck: P,
|
|
15
|
-
"icon-minus": "_icon-
|
|
15
|
+
"icon-minus": "_icon-minus_10jm0_163",
|
|
16
16
|
iconMinus: R,
|
|
17
|
-
"checkbox--invalid": "_checkbox--
|
|
17
|
+
"checkbox--invalid": "_checkbox--invalid_10jm0_184",
|
|
18
18
|
checkboxInvalid: U,
|
|
19
|
-
"label--hidden": "_label--
|
|
19
|
+
"label--hidden": "_label--hidden_10jm0_189",
|
|
20
20
|
labelHidden: q,
|
|
21
21
|
input: z,
|
|
22
22
|
label: A,
|
|
23
23
|
feedback: F
|
|
24
24
|
}, G = I(
|
|
25
25
|
({
|
|
26
|
-
label:
|
|
27
|
-
checked:
|
|
26
|
+
label: _,
|
|
27
|
+
checked: m,
|
|
28
28
|
className: k,
|
|
29
|
-
defaultChecked:
|
|
29
|
+
defaultChecked: f = !1,
|
|
30
30
|
disabled: s = !1,
|
|
31
|
-
hideLabel:
|
|
31
|
+
hideLabel: x = !1,
|
|
32
32
|
indeterminate: i = !1,
|
|
33
33
|
invalid: l = !1,
|
|
34
|
-
systemFeedback:
|
|
34
|
+
systemFeedback: h,
|
|
35
35
|
onChange: t,
|
|
36
|
-
...
|
|
36
|
+
...j
|
|
37
37
|
}, n) => {
|
|
38
|
-
const a = H(null), [
|
|
38
|
+
const a = H(null), [p, C] = M(f), D = E(x);
|
|
39
39
|
g(() => {
|
|
40
40
|
a && a.current && (a.current.indeterminate = i);
|
|
41
41
|
}, [i]);
|
|
42
|
-
const
|
|
42
|
+
const r = m !== void 0, u = r ? m : p, N = d(e.root, {
|
|
43
43
|
[e.rootDisabled]: s
|
|
44
|
-
}), v =
|
|
44
|
+
}), v = d(e.label, {
|
|
45
45
|
// hide label only visually to keep them available for assistive technologies
|
|
46
|
-
[e.labelHidden]:
|
|
47
|
-
}), S =
|
|
46
|
+
[e.labelHidden]: D
|
|
47
|
+
}), S = d(e.checkbox, {
|
|
48
48
|
[e.checkboxInvalid]: l
|
|
49
49
|
}), y = B(
|
|
50
50
|
(o) => {
|
|
@@ -52,12 +52,12 @@ import './assets/checkbox.Bbc6PYDK.css';const w = "_root_1upux_125", L = "_root-
|
|
|
52
52
|
o.preventDefault();
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
r || C(o.target.checked), t && t(o);
|
|
56
56
|
},
|
|
57
|
-
[s,
|
|
57
|
+
[s, r, t]
|
|
58
58
|
);
|
|
59
59
|
return /* @__PURE__ */ c.jsxs("div", { className: k, children: [
|
|
60
|
-
/* @__PURE__ */ c.jsxs("label", { className:
|
|
60
|
+
/* @__PURE__ */ c.jsxs("label", { className: N, children: [
|
|
61
61
|
/* @__PURE__ */ c.jsx(
|
|
62
62
|
"input",
|
|
63
63
|
{
|
|
@@ -66,12 +66,12 @@ import './assets/checkbox.Bbc6PYDK.css';const w = "_root_1upux_125", L = "_root-
|
|
|
66
66
|
ref: (o) => {
|
|
67
67
|
typeof n == "function" ? n(o) : n !== null && (n.current = o), a.current = o;
|
|
68
68
|
},
|
|
69
|
-
...
|
|
70
|
-
checked:
|
|
69
|
+
...j,
|
|
70
|
+
checked: u,
|
|
71
71
|
disabled: s,
|
|
72
|
-
"aria-label":
|
|
72
|
+
"aria-label": _,
|
|
73
73
|
"aria-invalid": l,
|
|
74
|
-
"aria-checked": i ? "mixed" :
|
|
74
|
+
"aria-checked": i ? "mixed" : u,
|
|
75
75
|
onChange: y
|
|
76
76
|
}
|
|
77
77
|
),
|
|
@@ -93,13 +93,13 @@ import './assets/checkbox.Bbc6PYDK.css';const w = "_root_1upux_125", L = "_root-
|
|
|
93
93
|
}
|
|
94
94
|
)
|
|
95
95
|
] }),
|
|
96
|
-
/* @__PURE__ */ c.jsx("span", { className: v, children:
|
|
96
|
+
/* @__PURE__ */ c.jsx("span", { className: v, children: _ })
|
|
97
97
|
] }),
|
|
98
|
-
l &&
|
|
98
|
+
l && h && /* @__PURE__ */ c.jsx(
|
|
99
99
|
V,
|
|
100
100
|
{
|
|
101
101
|
className: e.feedback,
|
|
102
|
-
message:
|
|
102
|
+
message: h,
|
|
103
103
|
type: "invalid"
|
|
104
104
|
}
|
|
105
105
|
)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
+
import "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import "./chunks/Fieldset.BokeZzG5.js";
|
|
5
|
+
import "./chunks/RadioGroup.module.bi3leRes.js";
|
|
6
|
+
import { D as e } from "./chunks/CheckboxGroup.CS6Q_TeZ.js";
|
|
7
|
+
export {
|
|
8
|
+
e as DSCheckboxGroup
|
|
9
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { g as i } from "./helpers.B1JT5ShS.js";
|
|
3
|
+
import "react";
|
|
4
|
+
const e = "ds-alert-live-region", n = "ds-status-live-region", r = () => document.getElementById(e), a = () => document.getElementById(n), g = () => {
|
|
5
|
+
const t = document.querySelectorAll(
|
|
6
|
+
`#${e}`
|
|
7
|
+
), o = document.querySelectorAll(
|
|
8
|
+
`#${n}`
|
|
9
|
+
);
|
|
10
|
+
if (t.length > 1)
|
|
11
|
+
throw new Error(
|
|
12
|
+
i(
|
|
13
|
+
"DSAriaLiveRegions",
|
|
14
|
+
`The DSAriaLiveRegions component with id="${e}" should only be present once on the page. Found ${t.length} instances.`
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
if (o.length > 1)
|
|
18
|
+
throw new Error(
|
|
19
|
+
i(
|
|
20
|
+
"DSAriaLiveRegions",
|
|
21
|
+
`The DSAriaLiveRegions component with id="${n}" should only be present once on the page. Found ${o.length} instances.`
|
|
22
|
+
)
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
e as A,
|
|
27
|
+
n as a,
|
|
28
|
+
a as b,
|
|
29
|
+
r as g,
|
|
30
|
+
g as v
|
|
31
|
+
};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as u } from "./
|
|
3
|
-
import { c as
|
|
4
|
-
import {
|
|
5
|
-
import { s as p } from "./
|
|
2
|
+
import { j as u } from "./jsx-runtime.C-kxDJ4g.js";
|
|
3
|
+
import { c as D } from "./index.CvOaL64Y.js";
|
|
4
|
+
import { D as b } from "./Fieldset.BokeZzG5.js";
|
|
5
|
+
import { s as p } from "./RadioGroup.module.bi3leRes.js";
|
|
6
6
|
import l from "react";
|
|
7
|
-
import { g as
|
|
8
|
-
import { DSCheckbox as
|
|
9
|
-
const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the DSCheckboxGroup component.`,
|
|
7
|
+
import { g as s } from "./helpers.B1JT5ShS.js";
|
|
8
|
+
import { DSCheckbox as f } from "../checkbox.B43oeMeC.js";
|
|
9
|
+
const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the DSCheckboxGroup component.`, k = ({
|
|
10
10
|
children: o,
|
|
11
11
|
description: e,
|
|
12
|
-
id:
|
|
12
|
+
id: i,
|
|
13
13
|
legend: n,
|
|
14
14
|
systemFeedback: r
|
|
15
15
|
}) => {
|
|
16
|
-
if (!
|
|
16
|
+
if (!i && (e || r))
|
|
17
17
|
throw new Error(
|
|
18
|
-
|
|
18
|
+
s(
|
|
19
19
|
"DSCheckboxGroup",
|
|
20
20
|
'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSCheckboxGroup component.'
|
|
21
21
|
)
|
|
22
22
|
);
|
|
23
23
|
if (!n)
|
|
24
24
|
throw new Error(
|
|
25
|
-
|
|
25
|
+
s("DSCheckboxGroup", C("legend"))
|
|
26
26
|
);
|
|
27
27
|
if (!o)
|
|
28
28
|
throw new Error(
|
|
29
|
-
|
|
29
|
+
s(
|
|
30
30
|
"DSCheckboxGroup",
|
|
31
31
|
"The component requires DSCheckbox components to be explicitly set as its children. Ensure that you include individual DSCheckbox components within the DSCheckboxGroup to create a cohesive checkbox group."
|
|
32
32
|
)
|
|
33
33
|
);
|
|
34
34
|
l.Children.forEach(o, (t) => {
|
|
35
|
-
if (!(l.isValidElement(t) && t.type ===
|
|
35
|
+
if (!(l.isValidElement(t) && t.type === f))
|
|
36
36
|
throw new Error(
|
|
37
|
-
|
|
37
|
+
s(
|
|
38
38
|
"DSCheckboxGroup",
|
|
39
39
|
"The component requires the children to be DSCheckbox elements. Ensure that you include individual DSCheckbox components within the DSCheckboxGroup to create a cohesive checkbox group."
|
|
40
40
|
)
|
|
@@ -43,7 +43,7 @@ const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the
|
|
|
43
43
|
}, y = ({
|
|
44
44
|
children: o,
|
|
45
45
|
legend: e,
|
|
46
|
-
alignment:
|
|
46
|
+
alignment: i = "vertical",
|
|
47
47
|
className: n,
|
|
48
48
|
description: r,
|
|
49
49
|
disabled: t = !1,
|
|
@@ -53,14 +53,20 @@ const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the
|
|
|
53
53
|
systemFeedback: c,
|
|
54
54
|
...x
|
|
55
55
|
}) => {
|
|
56
|
-
process.env.NODE_ENV !== "production" &&
|
|
57
|
-
|
|
56
|
+
process.env.NODE_ENV !== "production" && k({
|
|
57
|
+
children: o,
|
|
58
|
+
legend: e,
|
|
59
|
+
description: r,
|
|
60
|
+
id: h,
|
|
61
|
+
systemFeedback: c
|
|
62
|
+
});
|
|
63
|
+
const d = D(p.root, {
|
|
58
64
|
// In case of longer copy, use vertical alignment
|
|
59
|
-
[p.rootHorizontal]:
|
|
65
|
+
[p.rootHorizontal]: i === "horizontal",
|
|
60
66
|
[p.rootInvalid]: a && !!c
|
|
61
67
|
});
|
|
62
68
|
return /* @__PURE__ */ u.jsx(
|
|
63
|
-
|
|
69
|
+
b,
|
|
64
70
|
{
|
|
65
71
|
id: h,
|
|
66
72
|
legend: e,
|
|
@@ -76,5 +82,6 @@ const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the
|
|
|
76
82
|
);
|
|
77
83
|
};
|
|
78
84
|
export {
|
|
79
|
-
y as
|
|
85
|
+
y as D,
|
|
86
|
+
k as v
|
|
80
87
|
};
|