@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
package/link.BoSdsZHj.js
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as s } from "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
-
import { c as a } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import { u as g } from "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
5
|
-
import { DSIcon as S } from "./icon.CmAhxgHK.js";
|
|
6
|
-
import './assets/link.Di4qXro5.css';const x = "_root_1mghf_125", b = "_root--highlight_1mghf_191", j = "_root--dark-highlight_1mghf_191", L = "_root--filled_1mghf_269", C = "_root--outline_1mghf_297", N = "_root--ghost_1mghf_324", T = "_root--ghost-flush_1mghf_349", B = "_root--small_1mghf_355", E = "_root--dark-filled_1mghf_430", R = "_root--dark-outline_1mghf_489", V = "_root--dark-ghost_1mghf_547", q = "_root--dark-ghost-flush_1mghf_603", w = "_root--icon-left_1mghf_662", A = "_root--icon-only_1mghf_678", J = "_root--icon-only-small_1mghf_682", K = "_label--hidden_1mghf_689", o = {
|
|
7
|
-
root: x,
|
|
8
|
-
"root--highlight": "_root--highlight_1mghf_191",
|
|
9
|
-
rootHighlight: b,
|
|
10
|
-
"root--dark-highlight": "_root--dark-highlight_1mghf_191",
|
|
11
|
-
rootDarkHighlight: j,
|
|
12
|
-
"root--filled": "_root--filled_1mghf_269",
|
|
13
|
-
rootFilled: L,
|
|
14
|
-
"root--outline": "_root--outline_1mghf_297",
|
|
15
|
-
rootOutline: C,
|
|
16
|
-
"root--ghost": "_root--ghost_1mghf_324",
|
|
17
|
-
rootGhost: N,
|
|
18
|
-
"root--ghost-flush": "_root--ghost-flush_1mghf_349",
|
|
19
|
-
rootGhostFlush: T,
|
|
20
|
-
"root--small": "_root--small_1mghf_355",
|
|
21
|
-
rootSmall: B,
|
|
22
|
-
"root--dark-filled": "_root--dark-filled_1mghf_430",
|
|
23
|
-
rootDarkFilled: E,
|
|
24
|
-
"root--dark-outline": "_root--dark-outline_1mghf_489",
|
|
25
|
-
rootDarkOutline: R,
|
|
26
|
-
"root--dark-ghost": "_root--dark-ghost_1mghf_547",
|
|
27
|
-
rootDarkGhost: V,
|
|
28
|
-
"root--dark-ghost-flush": "_root--dark-ghost-flush_1mghf_603",
|
|
29
|
-
rootDarkGhostFlush: q,
|
|
30
|
-
"root--icon-left": "_root--icon-left_1mghf_662",
|
|
31
|
-
rootIconLeft: w,
|
|
32
|
-
"root--icon-only": "_root--icon-only_1mghf_678",
|
|
33
|
-
rootIconOnly: A,
|
|
34
|
-
"root--icon-only-small": "_root--icon-only-small_1mghf_682",
|
|
35
|
-
rootIconOnlySmall: J,
|
|
36
|
-
"label--hidden": "_label--hidden_1mghf_689",
|
|
37
|
-
labelHidden: K
|
|
38
|
-
}, W = ({
|
|
39
|
-
children: d,
|
|
40
|
-
aria: m,
|
|
41
|
-
className: c,
|
|
42
|
-
dataTrackingid: k,
|
|
43
|
-
download: u,
|
|
44
|
-
hideLabel: h = !1,
|
|
45
|
-
href: i,
|
|
46
|
-
iconName: n,
|
|
47
|
-
iconPosition: D = "left",
|
|
48
|
-
iconSource: f,
|
|
49
|
-
isFlush: r = !1,
|
|
50
|
-
referrerPolicy: y,
|
|
51
|
-
rel: G,
|
|
52
|
-
size: _ = "medium",
|
|
53
|
-
target: O = "_self",
|
|
54
|
-
theme: l = "light",
|
|
55
|
-
variant: t = "filled",
|
|
56
|
-
...I
|
|
57
|
-
}) => {
|
|
58
|
-
const p = a(o.root, c, {
|
|
59
|
-
// variant
|
|
60
|
-
[o.rootFilled]: t === "filled",
|
|
61
|
-
[o.rootHighlight]: t === "highlight",
|
|
62
|
-
[o.rootOutline]: t === "outline",
|
|
63
|
-
[o.rootGhost]: t === "ghost" && r !== !0,
|
|
64
|
-
// isFlush
|
|
65
|
-
[o.rootGhostFlush]: t === "ghost" && r === !0,
|
|
66
|
-
// dark theme
|
|
67
|
-
[o.rootDarkFilled]: l === "dark" && t === "filled",
|
|
68
|
-
[o.rootDarkHighlight]: l === "dark" && t === "highlight",
|
|
69
|
-
[o.rootDarkOutline]: l === "dark" && t === "outline",
|
|
70
|
-
[o.rootDarkGhost]: l === "dark" && t === "ghost" && r !== !0,
|
|
71
|
-
// dark isFlush
|
|
72
|
-
[o.rootDarkGhostFlush]: l === "dark" && t === "ghost" && r === !0,
|
|
73
|
-
// size
|
|
74
|
-
[o.rootSmall]: _ === "small",
|
|
75
|
-
// icon position
|
|
76
|
-
[o.rootIconLeft]: D === "left",
|
|
77
|
-
// icon only
|
|
78
|
-
[o.rootIconOnly]: g(h) && _ === "medium",
|
|
79
|
-
[o.rootIconOnlySmall]: g(h) && _ === "small"
|
|
80
|
-
}), F = a({
|
|
81
|
-
// hide label only visually to keep them available for assistive technologies
|
|
82
|
-
[o.labelHidden]: g(h)
|
|
83
|
-
}), H = l === "light" && t === "filled" || l === "dark" && t === "outline" || l === "dark" && t === "ghost" ? "dark" : "light", e = i === void 0 ? "span" : "a";
|
|
84
|
-
return /* @__PURE__ */ s.jsxs(
|
|
85
|
-
e,
|
|
86
|
-
{
|
|
87
|
-
className: p,
|
|
88
|
-
"data-trackingid": k,
|
|
89
|
-
...e === "a" && {
|
|
90
|
-
href: i,
|
|
91
|
-
target: O,
|
|
92
|
-
rel: G,
|
|
93
|
-
referrerPolicy: y,
|
|
94
|
-
download: u
|
|
95
|
-
},
|
|
96
|
-
...m,
|
|
97
|
-
...I,
|
|
98
|
-
children: [
|
|
99
|
-
/* @__PURE__ */ s.jsx("span", { className: F, children: d }),
|
|
100
|
-
(n || f) && /* @__PURE__ */ s.jsx(
|
|
101
|
-
S,
|
|
102
|
-
{
|
|
103
|
-
name: n,
|
|
104
|
-
theme: H,
|
|
105
|
-
source: f,
|
|
106
|
-
"aria-hidden": "true"
|
|
107
|
-
}
|
|
108
|
-
)
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
};
|
|
113
|
-
export {
|
|
114
|
-
W as DSLink
|
|
115
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as i } from "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
-
import { c as p } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import { DSIcon as D } from "./icon.CmAhxgHK.js";
|
|
5
|
-
import "react";
|
|
6
|
-
import './assets/linkstandalone.239FeO2E.css';const x = "_root_q7zcl_63", H = "_root--highlight_q7zcl_134", j = "_root--neutral-dark_q7zcl_205", v = "_root--highlight-dark_q7zcl_276", L = "_root--active_q7zcl_347", N = "_root--icon-left_q7zcl_353", o = {
|
|
7
|
-
root: x,
|
|
8
|
-
"root--highlight": "_root--highlight_q7zcl_134",
|
|
9
|
-
rootHighlight: H,
|
|
10
|
-
"root--neutral-dark": "_root--neutral-dark_q7zcl_205",
|
|
11
|
-
rootNeutralDark: j,
|
|
12
|
-
"root--highlight-dark": "_root--highlight-dark_q7zcl_276",
|
|
13
|
-
rootHighlightDark: v,
|
|
14
|
-
"root--active": "_root--active_q7zcl_347",
|
|
15
|
-
rootActive: L,
|
|
16
|
-
"root--icon-left": "_root--icon-left_q7zcl_353",
|
|
17
|
-
rootIconLeft: N
|
|
18
|
-
}, y = ({
|
|
19
|
-
children: s,
|
|
20
|
-
aria: e,
|
|
21
|
-
active: _,
|
|
22
|
-
className: g,
|
|
23
|
-
dataTrackingid: n,
|
|
24
|
-
download: k,
|
|
25
|
-
href: l,
|
|
26
|
-
iconName: a,
|
|
27
|
-
iconPosition: d = "left",
|
|
28
|
-
iconSource: c,
|
|
29
|
-
referrerPolicy: u,
|
|
30
|
-
rel: z,
|
|
31
|
-
target: f = "_self",
|
|
32
|
-
theme: t = "light",
|
|
33
|
-
variant: r = "neutral",
|
|
34
|
-
...m
|
|
35
|
-
}) => {
|
|
36
|
-
const q = p(o.root, g, {
|
|
37
|
-
// variant
|
|
38
|
-
[o.rootHighlight]: r === "highlight",
|
|
39
|
-
// theme
|
|
40
|
-
[o.rootNeutralDark]: t === "dark" && r === "neutral",
|
|
41
|
-
[o.rootHighlightDark]: t === "dark" && r === "highlight",
|
|
42
|
-
// active
|
|
43
|
-
[o.rootActive]: _,
|
|
44
|
-
// icon position
|
|
45
|
-
[o.rootIconLeft]: d === "left"
|
|
46
|
-
}), h = l === void 0 ? "span" : "a";
|
|
47
|
-
return /* @__PURE__ */ i.jsxs(
|
|
48
|
-
h,
|
|
49
|
-
{
|
|
50
|
-
className: q,
|
|
51
|
-
"data-trackingid": n,
|
|
52
|
-
...h === "a" && {
|
|
53
|
-
href: l,
|
|
54
|
-
target: f,
|
|
55
|
-
rel: z,
|
|
56
|
-
referrerPolicy: u,
|
|
57
|
-
download: k
|
|
58
|
-
},
|
|
59
|
-
...e,
|
|
60
|
-
...m,
|
|
61
|
-
children: [
|
|
62
|
-
/* @__PURE__ */ i.jsx("span", { className: o.label, children: s }),
|
|
63
|
-
(a || c) && /* @__PURE__ */ i.jsx(
|
|
64
|
-
D,
|
|
65
|
-
{
|
|
66
|
-
name: a,
|
|
67
|
-
theme: t,
|
|
68
|
-
source: c,
|
|
69
|
-
size: "medium",
|
|
70
|
-
"aria-hidden": "true"
|
|
71
|
-
}
|
|
72
|
-
)
|
|
73
|
-
]
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
};
|
|
77
|
-
export {
|
|
78
|
-
y as DSLinkStandalone
|
|
79
|
-
};
|
package/radio.DTO5-Yzf.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as e } from "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
-
import { c as d } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import { forwardRef as y, useRef as H, useState as I, useCallback as R } from "react";
|
|
5
|
-
import { u as S } from "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
6
|
-
import './assets/radio.pqc9u_wx.css';const g = "_root_6ckz7_63", B = "_root--disabled_6ckz7_82", V = "_radio_6ckz7_86", w = "_dot_6ckz7_101", E = "_radio--invalid_6ckz7_123", L = "_label_6ckz7_128", O = "_label--hidden_6ckz7_138", P = "_input_6ckz7_151", o = {
|
|
7
|
-
root: g,
|
|
8
|
-
"root--disabled": "_root--disabled_6ckz7_82",
|
|
9
|
-
rootDisabled: B,
|
|
10
|
-
radio: V,
|
|
11
|
-
dot: w,
|
|
12
|
-
"radio--invalid": "_radio--invalid_6ckz7_123",
|
|
13
|
-
radioInvalid: E,
|
|
14
|
-
label: L,
|
|
15
|
-
"label--hidden": "_label--hidden_6ckz7_138",
|
|
16
|
-
labelHidden: O,
|
|
17
|
-
input: P
|
|
18
|
-
}, U = y(
|
|
19
|
-
({
|
|
20
|
-
label: t,
|
|
21
|
-
name: c,
|
|
22
|
-
value: _,
|
|
23
|
-
defaultChecked: u = !1,
|
|
24
|
-
disabled: s = !1,
|
|
25
|
-
hideLabel: k = !1,
|
|
26
|
-
checked: r,
|
|
27
|
-
invalid: f = !1,
|
|
28
|
-
className: b,
|
|
29
|
-
onChange: i,
|
|
30
|
-
...m
|
|
31
|
-
}, l) => {
|
|
32
|
-
const p = H(null), [h, z] = I(u), n = r !== void 0, v = n ? r : h, x = S(k), C = d(
|
|
33
|
-
o.root,
|
|
34
|
-
{
|
|
35
|
-
[o.rootDisabled]: s
|
|
36
|
-
},
|
|
37
|
-
b
|
|
38
|
-
), j = d(o.label, {
|
|
39
|
-
// hide label only visually to keep them available for assistive technologies
|
|
40
|
-
[o.labelHidden]: x
|
|
41
|
-
}), N = d(o.radio, {
|
|
42
|
-
[o.radioInvalid]: f
|
|
43
|
-
}), D = R(
|
|
44
|
-
(a) => {
|
|
45
|
-
if (s) {
|
|
46
|
-
a.preventDefault();
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
n || z(a.target.checked), i && i(a);
|
|
50
|
-
},
|
|
51
|
-
[s, n, i]
|
|
52
|
-
);
|
|
53
|
-
return /* @__PURE__ */ e.jsxs("label", { className: C, children: [
|
|
54
|
-
/* @__PURE__ */ e.jsx(
|
|
55
|
-
"input",
|
|
56
|
-
{
|
|
57
|
-
type: "radio",
|
|
58
|
-
value: _,
|
|
59
|
-
name: c,
|
|
60
|
-
className: o.input,
|
|
61
|
-
ref: (a) => {
|
|
62
|
-
typeof l == "function" ? l(a) : l !== null && (l.current = a), p.current = a;
|
|
63
|
-
},
|
|
64
|
-
onChange: D,
|
|
65
|
-
...m,
|
|
66
|
-
disabled: s,
|
|
67
|
-
checked: v,
|
|
68
|
-
"aria-label": typeof t == "string" ? t : void 0
|
|
69
|
-
}
|
|
70
|
-
),
|
|
71
|
-
/* @__PURE__ */ e.jsx("span", { className: N, children: /* @__PURE__ */ e.jsx("div", { className: o.dot }) }),
|
|
72
|
-
/* @__PURE__ */ e.jsx("span", { className: j, children: t })
|
|
73
|
-
] });
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
U.displayName = "DSRadio";
|
|
77
|
-
export {
|
|
78
|
-
U as DSRadio
|
|
79
|
-
};
|
package/select.Dx80W7cW.js
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as t } from "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
-
import { c as _ } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import { useRef as C, useState as q, useEffect as W } from "react";
|
|
5
|
-
import { u as F } from "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
6
|
-
import { Asterisk as M } from "./asterisk.BlYjsfkN.js";
|
|
7
|
-
import { DSIcon as O } from "./icon.CmAhxgHK.js";
|
|
8
|
-
import { DSSystemFeedback as V } from "./systemfeedback.rBgdiL5T.js";
|
|
9
|
-
import { g as u } from "./chunks/helpers.B1JT5ShS.js";
|
|
10
|
-
import './assets/select.DLOQ6wu0.css';const J = "_root_1kpli_187", K = "_hint_1kpli_195", Q = "_label_1kpli_195", T = "_wrapper_1kpli_199", U = "_affix_1kpli_205", X = "_affix--small_1kpli_225", Y = "_affix--disabled_1kpli_237", Z = "_prefix_1kpli_240", z = "_affix--readonly_1kpli_243", G = "_suffix_1kpli_253", ee = "_action-button_1kpli_260", le = "_label--hidden_1kpli_277", te = "_feedback_1kpli_304", se = "_select-wrapper_1kpli_309", ne = "_select_1kpli_309", ae = "_select--invalid_1kpli_428", ie = "_select--small_1kpli_435", ce = "_input--has-leading-icon_1kpli_481", oe = "_input--has-action-button_1kpli_484", re = "_input--has-second-action-button_1kpli_487", _e = "_select--has-leading-icon_1kpli_490", de = "_select--has-action-button_1kpli_493", pe = "_select--has-second-action-button_1kpli_496", fe = "_select--has-affix_1kpli_499", ue = "_select--is-ready_1kpli_511", he = "_select--placeholder_1kpli_523", be = "_chevron_1kpli_532", ke = "_chevron--small_1kpli_536", me = "_chevron--disabled_1kpli_539", e = {
|
|
11
|
-
root: J,
|
|
12
|
-
hint: K,
|
|
13
|
-
label: Q,
|
|
14
|
-
wrapper: T,
|
|
15
|
-
affix: U,
|
|
16
|
-
"affix--small": "_affix--small_1kpli_225",
|
|
17
|
-
affixSmall: X,
|
|
18
|
-
"affix--disabled": "_affix--disabled_1kpli_237",
|
|
19
|
-
affixDisabled: Y,
|
|
20
|
-
prefix: Z,
|
|
21
|
-
"affix--readonly": "_affix--readonly_1kpli_243",
|
|
22
|
-
affixReadonly: z,
|
|
23
|
-
suffix: G,
|
|
24
|
-
"action-button": "_action-button_1kpli_260",
|
|
25
|
-
actionButton: ee,
|
|
26
|
-
"label--hidden": "_label--hidden_1kpli_277",
|
|
27
|
-
labelHidden: le,
|
|
28
|
-
feedback: te,
|
|
29
|
-
"select-wrapper": "_select-wrapper_1kpli_309",
|
|
30
|
-
selectWrapper: se,
|
|
31
|
-
select: ne,
|
|
32
|
-
"select--invalid": "_select--invalid_1kpli_428",
|
|
33
|
-
selectInvalid: ae,
|
|
34
|
-
"select--small": "_select--small_1kpli_435",
|
|
35
|
-
selectSmall: ie,
|
|
36
|
-
"input--has-leading-icon": "_input--has-leading-icon_1kpli_481",
|
|
37
|
-
inputHasLeadingIcon: ce,
|
|
38
|
-
"input--has-action-button": "_input--has-action-button_1kpli_484",
|
|
39
|
-
inputHasActionButton: oe,
|
|
40
|
-
"input--has-second-action-button": "_input--has-second-action-button_1kpli_487",
|
|
41
|
-
inputHasSecondActionButton: re,
|
|
42
|
-
"select--has-leading-icon": "_select--has-leading-icon_1kpli_490",
|
|
43
|
-
selectHasLeadingIcon: _e,
|
|
44
|
-
"select--has-action-button": "_select--has-action-button_1kpli_493",
|
|
45
|
-
selectHasActionButton: de,
|
|
46
|
-
"select--has-second-action-button": "_select--has-second-action-button_1kpli_496",
|
|
47
|
-
selectHasSecondActionButton: pe,
|
|
48
|
-
"select--has-affix": "_select--has-affix_1kpli_499",
|
|
49
|
-
selectHasAffix: fe,
|
|
50
|
-
"select--is-ready": "_select--is-ready_1kpli_511",
|
|
51
|
-
selectIsReady: ue,
|
|
52
|
-
"select--placeholder": "_select--placeholder_1kpli_523",
|
|
53
|
-
selectPlaceholder: he,
|
|
54
|
-
chevron: be,
|
|
55
|
-
"chevron--small": "_chevron--small_1kpli_536",
|
|
56
|
-
chevronSmall: ke,
|
|
57
|
-
"chevron--disabled": "_chevron--disabled_1kpli_539",
|
|
58
|
-
chevronDisabled: me
|
|
59
|
-
}, xe = ({
|
|
60
|
-
id: l,
|
|
61
|
-
label: a,
|
|
62
|
-
options: n
|
|
63
|
-
}) => {
|
|
64
|
-
if (!l)
|
|
65
|
-
throw new Error(
|
|
66
|
-
u(
|
|
67
|
-
"DSSelect",
|
|
68
|
-
'A unique "id" prop is required. Please add an unique "id" prop to the DSSelect component.'
|
|
69
|
-
)
|
|
70
|
-
);
|
|
71
|
-
if (!a)
|
|
72
|
-
throw new Error(
|
|
73
|
-
u(
|
|
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
|
-
u(
|
|
81
|
-
"DSSelect",
|
|
82
|
-
'Options are always required. Please add an "options" prop to the DSSelect component.'
|
|
83
|
-
)
|
|
84
|
-
);
|
|
85
|
-
}, ve = (l, a, n) => l === "" || a !== void 0 && a !== "" ? !1 : !(n !== void 0 && n !== ""), Ae = ({
|
|
86
|
-
id: l,
|
|
87
|
-
label: a,
|
|
88
|
-
options: n,
|
|
89
|
-
className: H,
|
|
90
|
-
defaultValue: h,
|
|
91
|
-
disabled: b = !1,
|
|
92
|
-
hideLabel: w = !1,
|
|
93
|
-
hint: d,
|
|
94
|
-
invalid: r = !1,
|
|
95
|
-
placeholder: p = "Select",
|
|
96
|
-
required: k = !1,
|
|
97
|
-
size: m = "medium",
|
|
98
|
-
systemFeedback: f,
|
|
99
|
-
value: x,
|
|
100
|
-
...D
|
|
101
|
-
}) => {
|
|
102
|
-
process.env.NODE_ENV !== "production" && xe({
|
|
103
|
-
id: l,
|
|
104
|
-
label: a,
|
|
105
|
-
options: n
|
|
106
|
-
});
|
|
107
|
-
const o = C(null), [I, j] = q(
|
|
108
|
-
ve(p, h, x)
|
|
109
|
-
);
|
|
110
|
-
W(() => {
|
|
111
|
-
if (!o.current)
|
|
112
|
-
return;
|
|
113
|
-
const i = () => {
|
|
114
|
-
if (!o.current)
|
|
115
|
-
return;
|
|
116
|
-
const c = o.current.value;
|
|
117
|
-
j(c === "");
|
|
118
|
-
}, s = o.current;
|
|
119
|
-
return s.addEventListener("change", i), () => {
|
|
120
|
-
s.removeEventListener("change", i);
|
|
121
|
-
};
|
|
122
|
-
}, []);
|
|
123
|
-
const A = F(w), v = `${l}-label`, S = `${l}-feedback`, g = `${l}-hint`, B = d ? ` ${g}` : "", N = (i) => [
|
|
124
|
-
p && /* @__PURE__ */ t.jsx("option", { value: "", children: p }, `${l}-hidden-option-disabled-placeholder`),
|
|
125
|
-
...i.map((s) => {
|
|
126
|
-
if ("options" in s) {
|
|
127
|
-
const { label: c, options: $ } = s;
|
|
128
|
-
return /* @__PURE__ */ t.jsx("optgroup", { label: c, children: $.map(y) }, c);
|
|
129
|
-
} else
|
|
130
|
-
return y(s);
|
|
131
|
-
})
|
|
132
|
-
], y = ({ label: i, value: s, isDisabled: c }) => /* @__PURE__ */ t.jsx("option", { value: s, disabled: c, children: i }, s), P = _(e.root, H), E = _(e.select, {
|
|
133
|
-
[e.selectSmall]: m === "small",
|
|
134
|
-
[e.selectInvalid]: r,
|
|
135
|
-
[e.selectPlaceholder]: I
|
|
136
|
-
}), L = _(e.label, {
|
|
137
|
-
// hide label only visually to keep them available for assistive technologies
|
|
138
|
-
[e.labelHidden]: A
|
|
139
|
-
}), R = _(e.chevron, {
|
|
140
|
-
[e.chevronSmall]: m === "small",
|
|
141
|
-
[e.chevronDisabled]: b
|
|
142
|
-
});
|
|
143
|
-
return /* @__PURE__ */ t.jsxs("div", { className: P, children: [
|
|
144
|
-
/* @__PURE__ */ t.jsxs("label", { className: L, id: v, htmlFor: l, children: [
|
|
145
|
-
a,
|
|
146
|
-
k && /* @__PURE__ */ t.jsx(M, {})
|
|
147
|
-
] }),
|
|
148
|
-
d && /* @__PURE__ */ t.jsx("div", { className: e.hint, id: g, children: d }),
|
|
149
|
-
r && f && /* @__PURE__ */ t.jsx(
|
|
150
|
-
V,
|
|
151
|
-
{
|
|
152
|
-
className: e.feedback,
|
|
153
|
-
message: f,
|
|
154
|
-
type: "invalid",
|
|
155
|
-
id: S,
|
|
156
|
-
"aria-live": "assertive"
|
|
157
|
-
}
|
|
158
|
-
),
|
|
159
|
-
/* @__PURE__ */ t.jsxs("div", { className: e.selectWrapper, children: [
|
|
160
|
-
/* @__PURE__ */ t.jsx(
|
|
161
|
-
"select",
|
|
162
|
-
{
|
|
163
|
-
...D,
|
|
164
|
-
id: l,
|
|
165
|
-
ref: o,
|
|
166
|
-
className: E,
|
|
167
|
-
"aria-labelledby": `${v}${B}`,
|
|
168
|
-
"aria-describedby": r && f ? S : void 0,
|
|
169
|
-
"aria-invalid": r,
|
|
170
|
-
defaultValue: h,
|
|
171
|
-
value: x,
|
|
172
|
-
disabled: b,
|
|
173
|
-
required: k,
|
|
174
|
-
children: N(n)
|
|
175
|
-
}
|
|
176
|
-
),
|
|
177
|
-
/* @__PURE__ */ t.jsx(
|
|
178
|
-
O,
|
|
179
|
-
{
|
|
180
|
-
name: "chevron-down",
|
|
181
|
-
className: R,
|
|
182
|
-
"aria-hidden": "true"
|
|
183
|
-
}
|
|
184
|
-
)
|
|
185
|
-
] })
|
|
186
|
-
] });
|
|
187
|
-
};
|
|
188
|
-
export {
|
|
189
|
-
Ae as DSSelect
|
|
190
|
-
};
|
package/switch.BwGtQdnx.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as t } from "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
-
import { c as u } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import { DSIcon as b } from "./icon.CmAhxgHK.js";
|
|
6
|
-
import { DSSpinner as p } from "./spinner.CSzQEBx2.js";
|
|
7
|
-
import './assets/switch.DVlaePGM.css';const f = "_root_ik5go_63", x = "_root--label-right_ik5go_91", j = "_root--stretched_ik5go_94", S = "_loader_ik5go_104", w = "_thumb_ik5go_157", C = "_root--checked_ik5go_172", o = {
|
|
8
|
-
root: f,
|
|
9
|
-
"root--label-right": "_root--label-right_ik5go_91",
|
|
10
|
-
rootLabelRight: x,
|
|
11
|
-
"root--stretched": "_root--stretched_ik5go_94",
|
|
12
|
-
rootStretched: j,
|
|
13
|
-
switch: "_switch_ik5go_99",
|
|
14
|
-
loader: S,
|
|
15
|
-
thumb: w,
|
|
16
|
-
"root--checked": "_root--checked_ik5go_172",
|
|
17
|
-
rootChecked: C
|
|
18
|
-
}, E = ({
|
|
19
|
-
children: i,
|
|
20
|
-
aria: h,
|
|
21
|
-
alignLabel: l = "left",
|
|
22
|
-
checked: e = !1,
|
|
23
|
-
className: _,
|
|
24
|
-
dataTrackingid: n,
|
|
25
|
-
disabled: s = !1,
|
|
26
|
-
loading: r = !1,
|
|
27
|
-
stretched: d = !1,
|
|
28
|
-
onClick: a,
|
|
29
|
-
...m
|
|
30
|
-
}) => {
|
|
31
|
-
const k = u(o.root, _, {
|
|
32
|
-
[o.rootChecked]: e === !0,
|
|
33
|
-
[o.rootStretched]: d === !0,
|
|
34
|
-
[o.rootLabelRight]: l === "right"
|
|
35
|
-
}), g = (c) => {
|
|
36
|
-
if (s || r) {
|
|
37
|
-
c.preventDefault();
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
a && a(c);
|
|
41
|
-
};
|
|
42
|
-
return /* @__PURE__ */ t.jsxs(
|
|
43
|
-
"button",
|
|
44
|
-
{
|
|
45
|
-
className: k,
|
|
46
|
-
"data-trackingid": n,
|
|
47
|
-
onClick: g,
|
|
48
|
-
...h,
|
|
49
|
-
...m,
|
|
50
|
-
type: "button",
|
|
51
|
-
role: "switch",
|
|
52
|
-
"aria-checked": e,
|
|
53
|
-
"aria-disabled": s || r,
|
|
54
|
-
"aria-busy": r,
|
|
55
|
-
children: [
|
|
56
|
-
/* @__PURE__ */ t.jsx("span", { children: i }),
|
|
57
|
-
!r && /* @__PURE__ */ t.jsx("span", { className: o.switch, children: /* @__PURE__ */ t.jsx("span", { className: o.thumb, children: /* @__PURE__ */ t.jsx(b, { name: "check", "aria-hidden": "true" }) }) }),
|
|
58
|
-
r && /* @__PURE__ */ t.jsx("span", { className: o.loader, children: /* @__PURE__ */ t.jsx(p, { aria: { "aria-label": "Loading state" } }) })
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
};
|
|
63
|
-
export {
|
|
64
|
-
E as DSSwitch
|
|
65
|
-
};
|