@stihl-design-system/components 1.0.0-RC.4 → 1.0.0-RC.6
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/Klarna.svg +1 -0
- package/Mastercard.svg +2 -0
- package/PayPal.svg +2 -0
- package/Placeholder.svg +1 -0
- package/Visa.svg +2 -0
- package/arialiveregions.BvZhV6hb.js +27 -0
- package/assets/CustomReactSelect.Bsphydqt.css +1 -0
- package/assets/Fieldset.D0jHAGRL.css +1 -0
- package/assets/Icon.Duy_0R8w.css +1 -0
- package/assets/InputPassword.VCNO8ANM.css +1 -0
- package/assets/InputSearch.BMRAb95l.css +1 -0
- package/assets/InputStepper.BKjqNi-i.css +1 -0
- package/assets/Notification.Bg63cvs4.css +1 -0
- package/assets/RadioGroup.Bz3_xkZU.css +1 -0
- package/assets/Select.Bz1TImkI.css +1 -0
- package/assets/Textarea.D2h5cW_t.css +1 -0
- package/assets/Toast.BzVaebc0.css +1 -0
- package/assets/{arialiveregions.VnhjP8Gr.css → arialiveregions.GsGx2USO.css} +1 -1
- package/assets/{asterisk.C-o6rbGQ.css → asterisk.JlyPArZu.css} +1 -1
- package/assets/button.BdxtFZKx.css +1 -0
- package/assets/buttonround.pR4StXA7.css +1 -0
- package/assets/checkbox.BjIn2stV.css +1 -0
- package/assets/dialog.CKwM2EBH.css +1 -0
- package/assets/floatingactionbutton.CUvMbEMf.css +1 -0
- package/assets/heading.CCbuI4X-.css +1 -0
- package/assets/input.71tOIrpp.css +1 -0
- package/assets/link.D61tKkSK.css +1 -0
- package/assets/linkstandalone.Bx8Uvo0G.css +1 -0
- package/assets/logo.C05WqGId.css +1 -0
- package/assets/optioncheckbox.BdRJHcSw.css +1 -0
- package/assets/radio.ewRpPo4W.css +1 -0
- package/assets/skiptocontent.DGVJ77cj.css +1 -0
- package/assets/spinner.D_Nnf1ZG.css +1 -0
- package/assets/switch.Ds-I_ybT.css +1 -0
- package/assets/{systemfeedback.WE3wClZ3.css → systemfeedback.BzJATHDd.css} +1 -1
- package/assets/text.B-CTuGgI.css +1 -0
- package/assets/{title.CE0Dm7PI.css → title.DlhX9K3W.css} +1 -1
- package/asterisk.Cjbk-xZi.js +8 -0
- package/button.L1lgCuM9.js +135 -0
- package/buttonround.ddSqXjYf.js +118 -0
- package/checkbox.DNHdo6_n.js +113 -0
- package/checkboxgroup.DqWlzAeR.js +9 -0
- package/chunks/{CheckboxGroup.CS6Q_TeZ.js → CheckboxGroup.DsQ6lI5a.js} +22 -22
- package/chunks/{CustomReactSelect.DtmbYZUf.js → CustomReactSelect.5dHi6PEO.js} +909 -959
- package/chunks/Fieldset.B1vsrHNv.js +99 -0
- package/chunks/{Icon.9gDIp6p4.js → Icon.n4XZrQ4N.js} +33 -27
- package/chunks/InputPassword.a7zHKrmM.js +140 -0
- package/chunks/InputSearch.DITRiB92.js +189 -0
- package/chunks/InputStepper.BkncCNwJ.js +291 -0
- package/chunks/Notification.DVVuSOqG.js +93 -0
- package/chunks/RadioGroup.BO4pbAJw.js +132 -0
- package/chunks/RadioGroup.module.BBZwHDjW.js +11 -0
- package/chunks/Select.COdS787F.js +191 -0
- package/chunks/Textarea.oqCrSopu.js +195 -0
- package/chunks/Toast.RON4bFPY.js +89 -0
- package/chunks/{jsx-runtime.C-kxDJ4g.js → jsx-runtime.C115EyI4.js} +3 -7
- package/{combobox.BaSkiD6f.js → combobox.CRlhqmuO.js} +2 -2
- package/components/Radio/Radio.d.ts +11 -3
- package/components/RadioGroup/RadioGroup.d.ts +6 -3
- package/components/RadioGroup/RadioGroup.utils.d.ts +5 -3
- package/components/RadioGroup/RadioGroup.utils.test.d.ts +1 -0
- package/components/SkipToContent/SkipToContent.d.ts +12 -0
- package/components/SkipToContent/SkipToContent.test.d.ts +1 -0
- package/customreactselect.CD58gwtp.js +13 -0
- package/dialog.0qPUVJha.js +45 -0
- package/fieldset.aY3V2jK2.js +11 -0
- package/floatingactionbutton.D_e4vz2G.js +87 -0
- package/heading.BTNroD1E.js +50 -0
- package/icon.D3RXjzh4.js +8 -0
- package/index.d.ts +1 -0
- package/index.es.js +66 -62
- package/input.ChVISFEX.js +236 -0
- package/inputpassword.Ba9SUUIK.js +12 -0
- package/inputsearch.BK-0OTwA.js +13 -0
- package/inputstepper.CTpTeXL9.js +13 -0
- package/link.SAcKvzJ3.js +115 -0
- package/linkstandalone.DNe0Nydm.js +79 -0
- package/{logo.C_oJ8isW.js → logo.BR_CUXFl.js} +16 -16
- package/notification.Csn5QCR2.js +9 -0
- package/{optioncheckbox.CUV1MQhh.js → optioncheckbox.C4l2UIak.js} +7 -7
- package/package.json +28 -24
- package/partials/index.js +51 -79
- package/radio.epf54-sG.js +115 -0
- package/radiogroup.CiENWRos.js +11 -0
- package/select.DLYav8gw.js +12 -0
- package/skiptocontent._YZRKxnc.js +44 -0
- package/skiptocontent.d.ts +1 -0
- package/spinner.DVa112nj.js +58 -0
- package/styles/scss/lib/_animation.scss +15 -14
- package/styles/scss/lib/_container-query.scss +3 -3
- package/styles/scss/lib/_grid-sidebar.scss +14 -7
- package/styles/scss/lib/_link.scss +48 -42
- package/styles/scss/lib/_media-query.scss +3 -3
- package/styles/scss/lib/_transition.scss +26 -7
- package/switch.rd7PdLc9.js +65 -0
- package/{systemfeedback.4Hkfigi-.js → systemfeedback.CUWch42u.js} +3 -3
- package/text.CrYUewrP.js +57 -0
- package/{textarea.DPy3TJJf.js → textarea.hLgeYdsI.js} +4 -4
- package/title.Dvp8LKJt.js +36 -0
- package/toast.r_yhGYEe.js +10 -0
- package/{toastmanager.DQ_-eTrx.js → toastmanager.D-uIi-TS.js} +2 -2
- package/utils/index.d.ts +1 -0
- package/utils/remove-spaces.d.ts +6 -0
- package/utils/remove-spaces.test.d.ts +1 -0
- package/arialiveregions.49Zyf6mj.js +0 -27
- package/assets/CustomReactSelect.B0rJLjN0.css +0 -1
- package/assets/Fieldset.xazpUXJX.css +0 -1
- package/assets/Icon.CB-KQmw4.css +0 -1
- package/assets/InputPassword.C3Uyj7oA.css +0 -1
- package/assets/InputSearch.tL3e9-Ob.css +0 -1
- package/assets/InputStepper.paPJix5A.css +0 -1
- package/assets/Notification.CCCbfXEz.css +0 -1
- package/assets/RadioGroup.Ur8Ro-XL.css +0 -1
- package/assets/Select.D2qBxaHP.css +0 -1
- package/assets/Textarea.BKbocznb.css +0 -1
- package/assets/Toast.CAP_EwDX.css +0 -1
- package/assets/button.BuIpnG-S.css +0 -1
- package/assets/buttonround.C3ph5Yyu.css +0 -1
- package/assets/checkbox.BsFEWfQe.css +0 -1
- package/assets/dialog.BGK3mgk7.css +0 -1
- package/assets/floatingactionbutton.D7ywURL3.css +0 -1
- package/assets/heading.CGFucb-C.css +0 -1
- package/assets/input.BcP5kkZ2.css +0 -1
- package/assets/link.DQy_OhwC.css +0 -1
- package/assets/linkstandalone.Dh6bE5Fb.css +0 -1
- package/assets/logo.BbHYgnWo.css +0 -1
- package/assets/optioncheckbox.C-K1FLhc.css +0 -1
- package/assets/radio.CSHQGdpr.css +0 -1
- package/assets/spinner.C5rBmKiF.css +0 -1
- package/assets/switch.sqve8ApJ.css +0 -1
- package/assets/text.DDAveG7E.css +0 -1
- package/asterisk.DU8THnoC.js +0 -8
- package/button.DX_nxoJC.js +0 -135
- package/buttonround.CXsBk9nL.js +0 -118
- package/checkbox.B43oeMeC.js +0 -112
- package/checkboxgroup.C7aCjYds.js +0 -9
- package/chunks/Fieldset.BokeZzG5.js +0 -99
- package/chunks/InputPassword.jpUCijp7.js +0 -140
- package/chunks/InputSearch.BmOtAZcR.js +0 -190
- package/chunks/InputStepper.DTKjUL4U.js +0 -291
- package/chunks/Notification.CUPOlHAX.js +0 -93
- package/chunks/RadioGroup.DpwnVv7u.js +0 -110
- package/chunks/RadioGroup.module.bi3leRes.js +0 -11
- package/chunks/Select.DkDZo0ky.js +0 -193
- package/chunks/Textarea.C938p79X.js +0 -195
- package/chunks/Toast.CLYrwQVO.js +0 -89
- package/customreactselect.LTbjaBN2.js +0 -13
- package/dialog.BkXwcbUh.js +0 -45
- package/fieldset.BXOWK-B-.js +0 -11
- package/floatingactionbutton.-nDRRiXY.js +0 -87
- package/heading.DqGbFfj2.js +0 -50
- package/icon.Cpp_9L1I.js +0 -8
- package/input.BM6tyRUm.js +0 -236
- package/inputpassword.DUxH1K_k.js +0 -12
- package/inputsearch.B-vePHle.js +0 -13
- package/inputstepper.C2ypADPI.js +0 -13
- package/link.B4XZoLDj.js +0 -115
- package/linkstandalone.BSfd95Pd.js +0 -79
- package/notification.CxxAOdNV.js +0 -9
- package/radio.Bhu9OUY-.js +0 -79
- package/radiogroup.CMJ1b38q.js +0 -11
- package/select.DFJK2mHF.js +0 -12
- package/spinner.BskX4ovu.js +0 -58
- package/switch.Bx2tDKx0.js +0 -65
- package/text.CPU8IUqY.js +0 -57
- package/title.icX0VDiO.js +0 -36
- package/toast.C-Yg5EoE.js +0 -10
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as r } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as h } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import { D as H } from "./chunks/Icon.n4XZrQ4N.js";
|
|
5
|
+
import { DSSpinner as p } from "./spinner.DVa112nj.js";
|
|
6
|
+
import './assets/buttonround.pR4StXA7.css';const F = "_root_lfeh_151", O = "_root--highlight_lfeh_219", G = "_root--dark-highlight_lfeh_219", I = "_root--filled_lfeh_297", S = "_root--outline_lfeh_325", x = "_root--ghost_lfeh_352", j = "_root--ghost-flush_lfeh_377", L = "_root--small_lfeh_383", C = "_root--dark-filled_lfeh_460", N = "_root--dark-outline_lfeh_519", R = "_root--dark-ghost_lfeh_577", B = "_root--dark-ghost-flush_lfeh_633", E = "_root--icon-left_lfeh_692", T = "_root--icon-only_lfeh_708", q = "_root--icon-only-small_lfeh_717", w = "_loader_lfeh_734", z = "_icon--hidden_lfeh_746", A = "_label--hidden_lfeh_750", J = "_label--loading_lfeh_762", o = {
|
|
7
|
+
root: F,
|
|
8
|
+
"root--highlight": "_root--highlight_lfeh_219",
|
|
9
|
+
rootHighlight: O,
|
|
10
|
+
"root--dark-highlight": "_root--dark-highlight_lfeh_219",
|
|
11
|
+
rootDarkHighlight: G,
|
|
12
|
+
"root--filled": "_root--filled_lfeh_297",
|
|
13
|
+
rootFilled: I,
|
|
14
|
+
"root--outline": "_root--outline_lfeh_325",
|
|
15
|
+
rootOutline: S,
|
|
16
|
+
"root--ghost": "_root--ghost_lfeh_352",
|
|
17
|
+
rootGhost: x,
|
|
18
|
+
"root--ghost-flush": "_root--ghost-flush_lfeh_377",
|
|
19
|
+
rootGhostFlush: j,
|
|
20
|
+
"root--small": "_root--small_lfeh_383",
|
|
21
|
+
rootSmall: L,
|
|
22
|
+
"root--dark-filled": "_root--dark-filled_lfeh_460",
|
|
23
|
+
rootDarkFilled: C,
|
|
24
|
+
"root--dark-outline": "_root--dark-outline_lfeh_519",
|
|
25
|
+
rootDarkOutline: N,
|
|
26
|
+
"root--dark-ghost": "_root--dark-ghost_lfeh_577",
|
|
27
|
+
rootDarkGhost: R,
|
|
28
|
+
"root--dark-ghost-flush": "_root--dark-ghost-flush_lfeh_633",
|
|
29
|
+
rootDarkGhostFlush: B,
|
|
30
|
+
"root--icon-left": "_root--icon-left_lfeh_692",
|
|
31
|
+
rootIconLeft: E,
|
|
32
|
+
"root--icon-only": "_root--icon-only_lfeh_708",
|
|
33
|
+
rootIconOnly: T,
|
|
34
|
+
"root--icon-only-small": "_root--icon-only-small_lfeh_717",
|
|
35
|
+
rootIconOnlySmall: q,
|
|
36
|
+
loader: w,
|
|
37
|
+
"icon--hidden": "_icon--hidden_lfeh_746",
|
|
38
|
+
iconHidden: z,
|
|
39
|
+
"label--hidden": "_label--hidden_lfeh_750",
|
|
40
|
+
labelHidden: A,
|
|
41
|
+
"label--loading": "_label--loading_lfeh_762",
|
|
42
|
+
labelLoading: J
|
|
43
|
+
}, U = ({
|
|
44
|
+
children: d,
|
|
45
|
+
aria: f,
|
|
46
|
+
className: c,
|
|
47
|
+
dataTrackingid: g,
|
|
48
|
+
disabled: _ = !1,
|
|
49
|
+
iconName: i = "placeholder",
|
|
50
|
+
iconSource: n,
|
|
51
|
+
loading: l = !1,
|
|
52
|
+
theme: e = "light",
|
|
53
|
+
variant: t = "filled",
|
|
54
|
+
onClick: s,
|
|
55
|
+
...k
|
|
56
|
+
}) => {
|
|
57
|
+
const u = h(
|
|
58
|
+
o.root,
|
|
59
|
+
o.rootIconOnlySmall,
|
|
60
|
+
c,
|
|
61
|
+
{
|
|
62
|
+
// variant
|
|
63
|
+
[o.rootFilled]: t === "filled",
|
|
64
|
+
[o.rootHighlight]: t === "highlight",
|
|
65
|
+
// dark theme
|
|
66
|
+
[o.rootDarkFilled]: e === "dark" && t === "filled",
|
|
67
|
+
[o.rootDarkHighlight]: e === "dark" && t === "highlight"
|
|
68
|
+
}
|
|
69
|
+
), m = h(o.label, o.labelHidden, {
|
|
70
|
+
// set label opacity to 0 when loading to prevent button size from changing
|
|
71
|
+
[o.labelLoading]: l
|
|
72
|
+
}), b = h(o.icon, {
|
|
73
|
+
// set icon opacity to 0 when loading to prevent button size from changing
|
|
74
|
+
[o.iconHidden]: l
|
|
75
|
+
}), D = e === "light" && t === "filled" ? "dark" : "light", y = (a) => {
|
|
76
|
+
if (_ || l) {
|
|
77
|
+
a.preventDefault();
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
s && s(a);
|
|
81
|
+
};
|
|
82
|
+
return /* @__PURE__ */ r.jsxs(
|
|
83
|
+
"button",
|
|
84
|
+
{
|
|
85
|
+
className: u,
|
|
86
|
+
"data-trackingid": g,
|
|
87
|
+
type: "button",
|
|
88
|
+
onClick: y,
|
|
89
|
+
...f,
|
|
90
|
+
...k,
|
|
91
|
+
"aria-disabled": _ || l,
|
|
92
|
+
"aria-busy": l,
|
|
93
|
+
children: [
|
|
94
|
+
l && /* @__PURE__ */ r.jsx(
|
|
95
|
+
p,
|
|
96
|
+
{
|
|
97
|
+
className: o.loader,
|
|
98
|
+
aria: { "aria-label": "Loading state" }
|
|
99
|
+
}
|
|
100
|
+
),
|
|
101
|
+
/* @__PURE__ */ r.jsx("span", { className: m, children: d }),
|
|
102
|
+
(i || n) && /* @__PURE__ */ r.jsx(
|
|
103
|
+
H,
|
|
104
|
+
{
|
|
105
|
+
name: i,
|
|
106
|
+
theme: D,
|
|
107
|
+
source: n,
|
|
108
|
+
className: b,
|
|
109
|
+
"aria-hidden": "true"
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
export {
|
|
117
|
+
U as DSButtonRound
|
|
118
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as e } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as h } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import { forwardRef as R, useRef as S, useState as I, useEffect as H, useCallback as M } from "react";
|
|
5
|
+
import { u as g } from "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
6
|
+
import { D as x } from "./chunks/Icon.n4XZrQ4N.js";
|
|
7
|
+
import { DSSystemFeedback as B } from "./systemfeedback.CUWch42u.js";
|
|
8
|
+
import './assets/checkbox.BjIn2stV.css';const E = "_checkbox-root_vryww_151", V = "_checkbox-root--disabled_vryww_170", L = "_checkbox_vryww_151", O = "_icon-check_vryww_190", P = "_icon-minus_vryww_191", U = "_checkbox--invalid_vryww_215", q = "_label--hidden_vryww_220", z = "_input_vryww_233", A = "_label_vryww_220", F = "_feedback_vryww_347", c = {
|
|
9
|
+
"checkbox-root": "_checkbox-root_vryww_151",
|
|
10
|
+
checkboxRoot: E,
|
|
11
|
+
"checkbox-root--disabled": "_checkbox-root--disabled_vryww_170",
|
|
12
|
+
checkboxRootDisabled: V,
|
|
13
|
+
checkbox: L,
|
|
14
|
+
"icon-check": "_icon-check_vryww_190",
|
|
15
|
+
iconCheck: O,
|
|
16
|
+
"icon-minus": "_icon-minus_vryww_191",
|
|
17
|
+
iconMinus: P,
|
|
18
|
+
"checkbox--invalid": "_checkbox--invalid_vryww_215",
|
|
19
|
+
checkboxInvalid: U,
|
|
20
|
+
"label--hidden": "_label--hidden_vryww_220",
|
|
21
|
+
labelHidden: q,
|
|
22
|
+
input: z,
|
|
23
|
+
label: A,
|
|
24
|
+
feedback: F
|
|
25
|
+
}, G = R(
|
|
26
|
+
({
|
|
27
|
+
label: b,
|
|
28
|
+
checked: _,
|
|
29
|
+
className: u,
|
|
30
|
+
defaultChecked: w = !1,
|
|
31
|
+
disabled: s = !1,
|
|
32
|
+
hideLabel: m = !1,
|
|
33
|
+
indeterminate: i = !1,
|
|
34
|
+
invalid: l = !1,
|
|
35
|
+
systemFeedback: d,
|
|
36
|
+
onChange: t,
|
|
37
|
+
...f
|
|
38
|
+
}, n) => {
|
|
39
|
+
const a = S(null), [v, y] = I(w), p = g(m);
|
|
40
|
+
H(() => {
|
|
41
|
+
a && a.current && (a.current.indeterminate = i);
|
|
42
|
+
}, [i]);
|
|
43
|
+
const r = _ !== void 0, k = r ? _ : v, C = h(c.checkboxRoot, {
|
|
44
|
+
[c.checkboxRootDisabled]: s
|
|
45
|
+
}), j = h(c.label, {
|
|
46
|
+
// hide label only visually to keep them available for assistive technologies
|
|
47
|
+
[c.labelHidden]: p
|
|
48
|
+
}), D = h(c.checkbox, {
|
|
49
|
+
[c.checkboxInvalid]: l
|
|
50
|
+
}), N = M(
|
|
51
|
+
(o) => {
|
|
52
|
+
if (s) {
|
|
53
|
+
o.preventDefault();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
r || y(o.target.checked), t && t(o);
|
|
57
|
+
},
|
|
58
|
+
[s, r, t]
|
|
59
|
+
);
|
|
60
|
+
return /* @__PURE__ */ e.jsxs("div", { className: u, children: [
|
|
61
|
+
/* @__PURE__ */ e.jsxs("label", { className: C, children: [
|
|
62
|
+
/* @__PURE__ */ e.jsx(
|
|
63
|
+
"input",
|
|
64
|
+
{
|
|
65
|
+
type: "checkbox",
|
|
66
|
+
className: c.input,
|
|
67
|
+
ref: (o) => {
|
|
68
|
+
typeof n == "function" ? n(o) : n !== null && (n.current = o), a.current = o;
|
|
69
|
+
},
|
|
70
|
+
...f,
|
|
71
|
+
checked: k,
|
|
72
|
+
disabled: s,
|
|
73
|
+
"aria-label": b,
|
|
74
|
+
"aria-invalid": l,
|
|
75
|
+
"aria-checked": i ? "mixed" : k,
|
|
76
|
+
onChange: N
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ e.jsxs("span", { className: D, children: [
|
|
80
|
+
/* @__PURE__ */ e.jsx(
|
|
81
|
+
x,
|
|
82
|
+
{
|
|
83
|
+
name: "check",
|
|
84
|
+
className: c.iconCheck,
|
|
85
|
+
"aria-hidden": "true"
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ e.jsx(
|
|
89
|
+
x,
|
|
90
|
+
{
|
|
91
|
+
name: "minus",
|
|
92
|
+
className: c.iconMinus,
|
|
93
|
+
"aria-hidden": "true"
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
] }),
|
|
97
|
+
/* @__PURE__ */ e.jsx("span", { className: j, children: b })
|
|
98
|
+
] }),
|
|
99
|
+
l && d && /* @__PURE__ */ e.jsx(
|
|
100
|
+
B,
|
|
101
|
+
{
|
|
102
|
+
className: c.feedback,
|
|
103
|
+
message: d,
|
|
104
|
+
type: "invalid"
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
] });
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
G.displayName = "DSCheckbox";
|
|
111
|
+
export {
|
|
112
|
+
G as DSCheckbox
|
|
113
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import "./chunks/Fieldset.B1vsrHNv.js";
|
|
5
|
+
import "./chunks/RadioGroup.module.BBZwHDjW.js";
|
|
6
|
+
import { D as e } from "./chunks/CheckboxGroup.DsQ6lI5a.js";
|
|
7
|
+
export {
|
|
8
|
+
e as DSCheckboxGroup
|
|
9
|
+
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { j as u } from "./jsx-runtime.
|
|
2
|
+
import { j as u } from "./jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as D } from "./index.CvOaL64Y.js";
|
|
4
|
-
import { D as b } from "./Fieldset.
|
|
5
|
-
import { s as
|
|
4
|
+
import { D as b } from "./Fieldset.B1vsrHNv.js";
|
|
5
|
+
import { s as c } from "./RadioGroup.module.BBZwHDjW.js";
|
|
6
6
|
import l from "react";
|
|
7
7
|
import { g as s } from "./helpers.B1JT5ShS.js";
|
|
8
|
-
import { DSCheckbox as f } from "../checkbox.
|
|
9
|
-
const C = (
|
|
10
|
-
children:
|
|
11
|
-
description:
|
|
8
|
+
import { DSCheckbox as f } from "../checkbox.DNHdo6_n.js";
|
|
9
|
+
const C = (e) => `The "${e}" prop is required. Please add the "${e}" prop to the DSCheckboxGroup component.`, k = ({
|
|
10
|
+
children: e,
|
|
11
|
+
description: o,
|
|
12
12
|
id: i,
|
|
13
13
|
legend: n,
|
|
14
14
|
systemFeedback: r
|
|
15
15
|
}) => {
|
|
16
|
-
if (!i && (
|
|
16
|
+
if (!i && (o || r))
|
|
17
17
|
throw new Error(
|
|
18
18
|
s(
|
|
19
19
|
"DSCheckboxGroup",
|
|
@@ -24,14 +24,14 @@ const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the
|
|
|
24
24
|
throw new Error(
|
|
25
25
|
s("DSCheckboxGroup", C("legend"))
|
|
26
26
|
);
|
|
27
|
-
if (!
|
|
27
|
+
if (!e)
|
|
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
|
-
l.Children.forEach(
|
|
34
|
+
l.Children.forEach(e, (t) => {
|
|
35
35
|
if (!(l.isValidElement(t) && t.type === f))
|
|
36
36
|
throw new Error(
|
|
37
37
|
s(
|
|
@@ -41,8 +41,8 @@ const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the
|
|
|
41
41
|
);
|
|
42
42
|
});
|
|
43
43
|
}, y = ({
|
|
44
|
-
children:
|
|
45
|
-
legend:
|
|
44
|
+
children: e,
|
|
45
|
+
legend: o,
|
|
46
46
|
alignment: i = "vertical",
|
|
47
47
|
className: n,
|
|
48
48
|
description: r,
|
|
@@ -50,34 +50,34 @@ const C = (o) => `The "${o}" prop is required. Please add the "${o}" prop to the
|
|
|
50
50
|
id: h,
|
|
51
51
|
invalid: a = !1,
|
|
52
52
|
required: m = !1,
|
|
53
|
-
systemFeedback:
|
|
53
|
+
systemFeedback: p,
|
|
54
54
|
...x
|
|
55
55
|
}) => {
|
|
56
56
|
process.env.NODE_ENV !== "production" && k({
|
|
57
|
-
children:
|
|
58
|
-
legend:
|
|
57
|
+
children: e,
|
|
58
|
+
legend: o,
|
|
59
59
|
description: r,
|
|
60
60
|
id: h,
|
|
61
|
-
systemFeedback:
|
|
61
|
+
systemFeedback: p
|
|
62
62
|
});
|
|
63
|
-
const d = D(
|
|
63
|
+
const d = D(c.group, {
|
|
64
64
|
// In case of longer copy, use vertical alignment
|
|
65
|
-
[
|
|
66
|
-
[
|
|
65
|
+
[c.groupHorizontal]: i === "horizontal",
|
|
66
|
+
[c.groupInvalid]: a && !!p
|
|
67
67
|
});
|
|
68
68
|
return /* @__PURE__ */ u.jsx(
|
|
69
69
|
b,
|
|
70
70
|
{
|
|
71
71
|
id: h,
|
|
72
|
-
legend:
|
|
72
|
+
legend: o,
|
|
73
73
|
className: n,
|
|
74
74
|
description: r,
|
|
75
75
|
disabled: t,
|
|
76
76
|
required: m,
|
|
77
77
|
invalid: a,
|
|
78
|
-
systemFeedback:
|
|
78
|
+
systemFeedback: p,
|
|
79
79
|
...x,
|
|
80
|
-
children: /* @__PURE__ */ u.jsx("div", { className: d, children:
|
|
80
|
+
children: /* @__PURE__ */ u.jsx("div", { className: d, children: e })
|
|
81
81
|
}
|
|
82
82
|
);
|
|
83
83
|
};
|