@stihl-design-system/components 1.0.0-RC.12 → 1.0.0-RC.14
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/{accordion.Rvtiu8Y4.js → accordion.C6_sqiW2.js} +1 -1
- package/{arialiveregions.Cyycgs8g.js → arialiveregions.2dxodwBP.js} +1 -1
- package/assets/TabPane.zywjfwo8.css +1 -0
- package/assets/Tabs.DUqlqP6R.css +1 -0
- package/assets/numberindicator.BJ9vFpnd.css +1 -0
- package/{button.M4nXjcUn.js → button.BfcWQZhx.js} +1 -1
- package/{checkbox.Cb2_ey6U.js → checkbox.Dt0OWryN.js} +1 -1
- package/{checkboxgroup.DBDmB-zR.js → checkboxgroup.je32bRPr.js} +2 -2
- package/{chip.C_1tGqvZ.js → chip.CpnDX4Ro.js} +1 -1
- package/{chipgroup.BvTj1ziW.js → chipgroup.Cy76KMWu.js} +17 -16
- package/chunks/{Accordion.CB6jB3s_.js → Accordion.Bza3TO4Y.js} +1 -1
- package/chunks/AriaLiveRegions.utils.Bq6Mp2bE.js +40 -0
- package/chunks/{CheckboxGroup.S6i5EOc4.js → CheckboxGroup.C_2ZwEQJ.js} +38 -35
- package/chunks/{Chip.CMlPUyOJ.js → Chip.BvlKC503.js} +30 -24
- package/chunks/{CustomReactSelect.Cg_XW3YK.js → CustomReactSelect.CB41lklE.js} +335 -335
- package/chunks/{Dialog.CudsqNag.js → Dialog.ClBjJWOh.js} +2 -2
- package/chunks/{Drawer.ueG2Bzr9.js → Drawer.ReDW3ohH.js} +2 -2
- package/chunks/{Fieldset.Cjmkgxxk.js → Fieldset.Ct_JFRs9.js} +2 -2
- package/chunks/{Input.utils.ChV6RJsh.js → Input.utils.DYbmWlx6.js} +19 -21
- package/chunks/{InputPassword.CNLbBFjx.js → InputPassword.Cvk5J8w1.js} +18 -18
- package/chunks/{InputSearch.CHA6mkX_.js → InputSearch.BIIW-ERk.js} +4 -4
- package/chunks/{InputStepper.xmWGU9pU.js → InputStepper.DGzR3KY6.js} +49 -47
- package/chunks/{Notification.o6pagKQy.js → Notification.uAEjPywP.js} +31 -32
- package/chunks/RadioGroup.D10-pe9H.js +146 -0
- package/chunks/{Select.E6gLFYLk.js → Select.DsLnW29U.js} +3 -3
- package/chunks/TabPane.CYuUi0oL.js +51 -0
- package/chunks/Tabs.D_JAsvoh.js +270 -0
- package/chunks/{Textarea.DUBSOpNL.js → Textarea.Dh9R9YdZ.js} +19 -18
- package/chunks/{Toast.DyEi2GEP.js → Toast.j7LPnQ36.js} +1 -1
- package/chunks/has-window.ut_-aShB.js +5 -0
- package/chunks/helpers.CcqWV-wZ.js +8 -0
- package/chunks/{useBreakpoint.5xBNDiCf.js → useBreakpoint.B8XxjSVJ.js} +9 -9
- package/chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js +7 -0
- package/{combobox.DUzv8jzM.js → combobox.D6zXg976.js} +1 -1
- package/components/AriaLiveRegions/AriaLiveRegions.utils.d.ts +2 -2
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +1 -1
- package/components/Input/Input.d.ts +6 -0
- package/components/InputPassword/InputPassword.d.ts +3 -3
- package/components/Notification/Notification.d.ts +2 -6
- package/components/NumberIndicator/NumberIndicator.d.ts +12 -0
- package/components/NumberIndicator/NumberIndicator.test.d.ts +1 -0
- package/components/NumberIndicator/NumberIndicator.utils.d.ts +2 -0
- package/components/Tabs/TabPane/TabPane.d.ts +10 -0
- package/components/Tabs/TabPane/TabPane.utils.d.ts +3 -0
- package/components/Tabs/TabPane/TabPane.utils.test.d.ts +1 -0
- package/components/Tabs/Tabs.d.ts +42 -0
- package/components/Tabs/Tabs.test.d.ts +1 -0
- package/components/Tabs/Tabs.utils.d.ts +11 -0
- package/components/Tabs/Tabs.utils.test.d.ts +1 -0
- package/{customreactselect.CXmBRqQ9.js → customreactselect.BcjDvZG6.js} +2 -2
- package/{dialog.DYlBUsOD.js → dialog.BkVOgeWY.js} +2 -2
- package/{drawer.CvhbP1ra.js → drawer.DM_NKGTQ.js} +2 -2
- package/{fieldset.CtUGEdLv.js → fieldset.CSNoVbL1.js} +1 -1
- package/index.d.ts +4 -2
- package/index.es.js +134 -127
- package/{input.BEnCFNM-.js → input.BbnmbMCI.js} +49 -47
- package/{inputpassword.B-D_jB9w.js → inputpassword.KnZRwWCQ.js} +3 -3
- package/{inputsearch.CaSpklR1.js → inputsearch.DgYJPZ2v.js} +4 -4
- package/inputstepper.T_of1Gz0.js +15 -0
- package/{link.DREJAoPG.js → link.L8O_InKe.js} +1 -1
- package/{notification.JWhrkEcE.js → notification.Bt9TbAAt.js} +2 -2
- package/numberindicator.UU7FSouT.js +26 -0
- package/numberindicator.d.ts +2 -0
- package/package.json +4 -4
- package/{radio.DEILy_lV.js → radio.B-2uuWHq.js} +1 -1
- package/{radiogroup.DeU-HdlP.js → radiogroup.DM_lF4hI.js} +3 -3
- package/{select.BYraFJzz.js → select.COLuwr89.js} +2 -2
- package/{skiptocontent.BxvpIB7H.js → skiptocontent.DxogCFvU.js} +2 -2
- package/styles/scss/ds/lib/theme.scss +2 -0
- package/tabpane.BnQBzVXw.js +8 -0
- package/tabpane.d.ts +2 -0
- package/tabs.BaELlVri.js +15 -0
- package/tabs.d.ts +2 -0
- package/textarea.Wcl_pVBb.js +13 -0
- package/{toast.n1QUINSA.js → toast.DQlMWU6I.js} +2 -2
- package/{toastmanager.B7EZ4JSI.js → toastmanager.DxHFtr5C.js} +17 -17
- package/utils/helpers.d.ts +7 -0
- package/utils/index.d.ts +1 -0
- package/utils/isAnimationDisabled.d.ts +1 -0
- package/chunks/AriaLiveRegions.utils.BGSZafnS.js +0 -34
- package/chunks/RadioGroup.Crj7NoOs.js +0 -137
- package/chunks/has-document.r9i9TxKV.js +0 -5
- package/chunks/helpers.B1JT5ShS.js +0 -7
- package/inputstepper.C7KD1-0S.js +0 -13
- package/textarea.CBvH0ljM.js +0 -12
- package/utils/has-document.d.ts +0 -1
|
@@ -2,55 +2,57 @@
|
|
|
2
2
|
import { j as t } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as l } from "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import { useState as r, useRef as k, useEffect as sn } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
5
|
+
import { h as en } from "./chunks/has-window.ut_-aShB.js";
|
|
6
|
+
import { u as ln } from "./chunks/useBreakpoint.B8XxjSVJ.js";
|
|
7
|
+
import { u as B } from "./chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
8
|
+
import { Asterisk as on } from "./asterisk.DpzETKdT.js";
|
|
9
|
+
import { DSButton as E } from "./button.BfcWQZhx.js";
|
|
10
|
+
import { D as dn } from "./chunks/Icon.BCmt_XBG.js";
|
|
11
|
+
import { DSSystemFeedback as un } from "./systemfeedback.C3Pfxxpp.js";
|
|
12
|
+
import { v as cn, b as fn, M as hn, a as pn, s as _n, c as rn, i as v } from "./chunks/Input.utils.DYbmWlx6.js";
|
|
13
|
+
import './assets/input.BAkFKPW3.css';const mn = "ds-input_input_yfh6h_1", yn = "ds-input_input--invalid_yfh6h_113", bn = "ds-input_input--small_yfh6h_120", xn = "ds-input_input--has-leading-icon_yfh6h_173", gn = "ds-input_input--has-action-button_yfh6h_176", In = "ds-input_input--has-second-action-button_yfh6h_179", Sn = "ds-input_input--has-affix_yfh6h_191", Hn = "ds-input_input--is-ready_yfh6h_205", Dn = "ds-input_root_yfh6h_212", kn = "ds-input_hint_yfh6h_220", vn = "ds-input_label_yfh6h_220", Cn = "ds-input_wrapper_yfh6h_224", Rn = "ds-input_affix_yfh6h_230", jn = "ds-input_affix--small_yfh6h_251", Ln = "ds-input_affix--disabled_yfh6h_264", An = "ds-input_prefix_yfh6h_272", Nn = "ds-input_affix--readonly_yfh6h_275", wn = "ds-input_suffix_yfh6h_285", Bn = "ds-input_leading-icon_yfh6h_292", En = "ds-input_leading-icon--small_yfh6h_304", Tn = "ds-input_leading-icon--disabled_yfh6h_307", Fn = "ds-input_action-button_yfh6h_316", Pn = "ds-input_label--hidden_yfh6h_334", On = "ds-input_label--disabled_yfh6h_347", $n = "ds-input_feedback_yfh6h_367", n = {
|
|
14
|
+
input: mn,
|
|
13
15
|
"input--invalid": "ds-input_input--invalid_yfh6h_113",
|
|
14
|
-
inputInvalid:
|
|
16
|
+
inputInvalid: yn,
|
|
15
17
|
"input--small": "ds-input_input--small_yfh6h_120",
|
|
16
|
-
inputSmall:
|
|
18
|
+
inputSmall: bn,
|
|
17
19
|
"input--has-leading-icon": "ds-input_input--has-leading-icon_yfh6h_173",
|
|
18
|
-
inputHasLeadingIcon:
|
|
20
|
+
inputHasLeadingIcon: xn,
|
|
19
21
|
"input--has-action-button": "ds-input_input--has-action-button_yfh6h_176",
|
|
20
|
-
inputHasActionButton:
|
|
22
|
+
inputHasActionButton: gn,
|
|
21
23
|
"input--has-second-action-button": "ds-input_input--has-second-action-button_yfh6h_179",
|
|
22
|
-
inputHasSecondActionButton:
|
|
24
|
+
inputHasSecondActionButton: In,
|
|
23
25
|
"input--has-affix": "ds-input_input--has-affix_yfh6h_191",
|
|
24
|
-
inputHasAffix:
|
|
26
|
+
inputHasAffix: Sn,
|
|
25
27
|
"input--is-ready": "ds-input_input--is-ready_yfh6h_205",
|
|
26
|
-
inputIsReady:
|
|
27
|
-
root:
|
|
28
|
-
hint:
|
|
29
|
-
label:
|
|
30
|
-
wrapper:
|
|
31
|
-
affix:
|
|
28
|
+
inputIsReady: Hn,
|
|
29
|
+
root: Dn,
|
|
30
|
+
hint: kn,
|
|
31
|
+
label: vn,
|
|
32
|
+
wrapper: Cn,
|
|
33
|
+
affix: Rn,
|
|
32
34
|
"affix--small": "ds-input_affix--small_yfh6h_251",
|
|
33
|
-
affixSmall:
|
|
35
|
+
affixSmall: jn,
|
|
34
36
|
"affix--disabled": "ds-input_affix--disabled_yfh6h_264",
|
|
35
|
-
affixDisabled:
|
|
36
|
-
prefix:
|
|
37
|
+
affixDisabled: Ln,
|
|
38
|
+
prefix: An,
|
|
37
39
|
"affix--readonly": "ds-input_affix--readonly_yfh6h_275",
|
|
38
|
-
affixReadonly:
|
|
39
|
-
suffix:
|
|
40
|
+
affixReadonly: Nn,
|
|
41
|
+
suffix: wn,
|
|
40
42
|
"leading-icon": "ds-input_leading-icon_yfh6h_292",
|
|
41
43
|
leadingIcon: Bn,
|
|
42
44
|
"leading-icon--small": "ds-input_leading-icon--small_yfh6h_304",
|
|
43
|
-
leadingIconSmall:
|
|
45
|
+
leadingIconSmall: En,
|
|
44
46
|
"leading-icon--disabled": "ds-input_leading-icon--disabled_yfh6h_307",
|
|
45
|
-
leadingIconDisabled:
|
|
47
|
+
leadingIconDisabled: Tn,
|
|
46
48
|
"action-button": "ds-input_action-button_yfh6h_316",
|
|
47
|
-
actionButton:
|
|
49
|
+
actionButton: Fn,
|
|
48
50
|
"label--hidden": "ds-input_label--hidden_yfh6h_334",
|
|
49
|
-
labelHidden:
|
|
51
|
+
labelHidden: Pn,
|
|
50
52
|
"label--disabled": "ds-input_label--disabled_yfh6h_347",
|
|
51
|
-
labelDisabled:
|
|
52
|
-
feedback:
|
|
53
|
-
},
|
|
53
|
+
labelDisabled: On,
|
|
54
|
+
feedback: $n
|
|
55
|
+
}, qn = ({
|
|
54
56
|
id: u,
|
|
55
57
|
label: C,
|
|
56
58
|
actionButtonLabel: T,
|
|
@@ -73,7 +75,7 @@ import './assets/input.BAkFKPW3.css';const rn = "ds-input_input_yfh6h_1", mn = "
|
|
|
73
75
|
type: o = "text",
|
|
74
76
|
...$
|
|
75
77
|
}) => {
|
|
76
|
-
process.env.NODE_ENV !== "production" && (
|
|
78
|
+
process.env.NODE_ENV !== "production" && (cn({
|
|
77
79
|
id: u,
|
|
78
80
|
label: C,
|
|
79
81
|
prefix: s,
|
|
@@ -82,9 +84,9 @@ import './assets/input.BAkFKPW3.css';const rn = "ds-input_input_yfh6h_1", mn = "
|
|
|
82
84
|
leadingIconSource: _,
|
|
83
85
|
actionButtonIconName: f,
|
|
84
86
|
actionButtonIconSource: m
|
|
85
|
-
}),
|
|
86
|
-
const [W, X] = r(!1), [M, V] = r(!1), [x, G] = r(!1), [U, J] = r({}), g = k(null), K = s == null ? void 0 : s.substring(0,
|
|
87
|
-
|
|
87
|
+
}), fn(o));
|
|
88
|
+
const [W, X] = r(!1), [M, V] = r(!1), [x, G] = r(!1), [U, J] = r({}), g = k(null), K = s == null ? void 0 : s.substring(0, hn), I = k(null), Q = a == null ? void 0 : a.substring(0, pn), S = k(null), Y = ln(O);
|
|
89
|
+
B(() => {
|
|
88
90
|
const d = e === "medium" ? 16 : 8, H = {};
|
|
89
91
|
if (I.current) {
|
|
90
92
|
const D = I.current.offsetWidth;
|
|
@@ -95,16 +97,16 @@ import './assets/input.BAkFKPW3.css';const rn = "ds-input_input_yfh6h_1", mn = "
|
|
|
95
97
|
H.paddingInlineEnd = d + D + "px";
|
|
96
98
|
}
|
|
97
99
|
J(H), X(!0);
|
|
98
|
-
}, [s, a, e, M]),
|
|
99
|
-
(async () => {
|
|
100
|
+
}, [s, a, e, M]), B(() => {
|
|
101
|
+
en && (async () => {
|
|
100
102
|
"fonts" in document && (await document.fonts.load(
|
|
101
103
|
'1em "STIHL Contraface Digital Text Regular"'
|
|
102
104
|
), V(!0));
|
|
103
105
|
})();
|
|
104
106
|
}, []), sn(() => {
|
|
105
|
-
const d =
|
|
107
|
+
const d = _n(
|
|
106
108
|
v(o),
|
|
107
|
-
|
|
109
|
+
rn(o)
|
|
108
110
|
);
|
|
109
111
|
G(d);
|
|
110
112
|
}, [o]);
|
|
@@ -131,7 +133,7 @@ import './assets/input.BAkFKPW3.css';const rn = "ds-input_input_yfh6h_1", mn = "
|
|
|
131
133
|
}), tn = l(n.leadingIcon, {
|
|
132
134
|
[n.leadingIconSmall]: e === "small",
|
|
133
135
|
[n.leadingIconDisabled]: i
|
|
134
|
-
}),
|
|
136
|
+
}), w = l(n.actionButton, {
|
|
135
137
|
[n.actionButtonSmall]: e === "small"
|
|
136
138
|
}), an = (d) => {
|
|
137
139
|
g.current && !i && !c && g.current.showPicker(), d.preventDefault();
|
|
@@ -139,11 +141,11 @@ import './assets/input.BAkFKPW3.css';const rn = "ds-input_input_yfh6h_1", mn = "
|
|
|
139
141
|
return /* @__PURE__ */ t.jsxs("div", { className: q, children: [
|
|
140
142
|
/* @__PURE__ */ t.jsxs("label", { className: nn, id: L, htmlFor: u, children: [
|
|
141
143
|
C,
|
|
142
|
-
R && /* @__PURE__ */ t.jsx(
|
|
144
|
+
R && /* @__PURE__ */ t.jsx(on, {})
|
|
143
145
|
] }),
|
|
144
146
|
y && /* @__PURE__ */ t.jsx("div", { className: n.hint, id: N, children: y }),
|
|
145
147
|
h && b && /* @__PURE__ */ t.jsx(
|
|
146
|
-
|
|
148
|
+
un,
|
|
147
149
|
{
|
|
148
150
|
className: n.feedback,
|
|
149
151
|
message: b,
|
|
@@ -162,7 +164,7 @@ import './assets/input.BAkFKPW3.css';const rn = "ds-input_input_yfh6h_1", mn = "
|
|
|
162
164
|
}
|
|
163
165
|
),
|
|
164
166
|
!s && (p || _) && /* @__PURE__ */ t.jsx(
|
|
165
|
-
|
|
167
|
+
dn,
|
|
166
168
|
{
|
|
167
169
|
name: p,
|
|
168
170
|
theme: "light",
|
|
@@ -205,7 +207,7 @@ import './assets/input.BAkFKPW3.css';const rn = "ds-input_input_yfh6h_1", mn = "
|
|
|
205
207
|
theme: "light",
|
|
206
208
|
iconName: f,
|
|
207
209
|
variant: "ghost",
|
|
208
|
-
className:
|
|
210
|
+
className: w,
|
|
209
211
|
size: e,
|
|
210
212
|
onClick: F,
|
|
211
213
|
type: "button",
|
|
@@ -220,7 +222,7 @@ import './assets/input.BAkFKPW3.css';const rn = "ds-input_input_yfh6h_1", mn = "
|
|
|
220
222
|
theme: "light",
|
|
221
223
|
iconName: v(o) ? "calendar" : "clock",
|
|
222
224
|
variant: "ghost",
|
|
223
|
-
className:
|
|
225
|
+
className: w,
|
|
224
226
|
size: e,
|
|
225
227
|
onClick: an,
|
|
226
228
|
type: "button",
|
|
@@ -235,5 +237,5 @@ import './assets/input.BAkFKPW3.css';const rn = "ds-input_input_yfh6h_1", mn = "
|
|
|
235
237
|
] });
|
|
236
238
|
};
|
|
237
239
|
export {
|
|
238
|
-
|
|
240
|
+
qn as DSInput
|
|
239
241
|
};
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./chunks/useBreakpoint.
|
|
5
|
+
import "./chunks/useBreakpoint.B8XxjSVJ.js";
|
|
6
6
|
import "./asterisk.DpzETKdT.js";
|
|
7
|
-
import "./button.
|
|
7
|
+
import "./button.BfcWQZhx.js";
|
|
8
8
|
import "./systemfeedback.C3Pfxxpp.js";
|
|
9
|
-
import { D as n } from "./chunks/InputPassword.
|
|
9
|
+
import { D as n } from "./chunks/InputPassword.Cvk5J8w1.js";
|
|
10
10
|
export {
|
|
11
11
|
n as DSInputPassword
|
|
12
12
|
};
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./chunks/helpers.
|
|
6
|
-
import "./chunks/useBreakpoint.
|
|
5
|
+
import "./chunks/helpers.CcqWV-wZ.js";
|
|
6
|
+
import "./chunks/useBreakpoint.B8XxjSVJ.js";
|
|
7
7
|
import "./asterisk.DpzETKdT.js";
|
|
8
|
-
import "./button.
|
|
8
|
+
import "./button.BfcWQZhx.js";
|
|
9
9
|
import "./systemfeedback.C3Pfxxpp.js";
|
|
10
|
-
import { D as s } from "./chunks/InputSearch.
|
|
10
|
+
import { D as s } from "./chunks/InputSearch.BIIW-ERk.js";
|
|
11
11
|
export {
|
|
12
12
|
s as DSInputSearch
|
|
13
13
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./chunks/has-window.ut_-aShB.js";
|
|
6
|
+
import "./chunks/useBreakpoint.B8XxjSVJ.js";
|
|
7
|
+
import "./chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
8
|
+
import "./asterisk.DpzETKdT.js";
|
|
9
|
+
import "./button.BfcWQZhx.js";
|
|
10
|
+
import "./chunks/Input.utils.DYbmWlx6.js";
|
|
11
|
+
import "./systemfeedback.C3Pfxxpp.js";
|
|
12
|
+
import { D as a } from "./chunks/InputStepper.DGzR3KY6.js";
|
|
13
|
+
export {
|
|
14
|
+
a as DSInputStepper
|
|
15
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as h } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as e } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import { u as n } from "./chunks/useBreakpoint.
|
|
4
|
+
import { u as n } from "./chunks/useBreakpoint.B8XxjSVJ.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import { D as H } from "./chunks/Icon.BCmt_XBG.js";
|
|
7
7
|
import './assets/link.DDJj0D1U.css';const S = "ds-link_root_1i5hz_1", x = "ds-link_root--highlight_1i5hz_75", b = "ds-link_root--dark-highlight_1i5hz_75", j = "ds-link_root--filled_1i5hz_151", L = "ds-link_root--outline_1i5hz_179", C = "ds-link_root--ghost_1i5hz_206", N = "ds-link_root--ghost-flush_1i5hz_231", T = "ds-link_root--small_1i5hz_237", B = "ds-link_root--dark-filled_1i5hz_317", E = "ds-link_root--dark-outline_1i5hz_374", R = "ds-link_root--dark-ghost_1i5hz_430", V = "ds-link_root--dark-ghost-flush_1i5hz_484", q = "ds-link_root--icon-left_1i5hz_546", w = "ds-link_root--icon-only_1i5hz_562", A = "ds-link_root--icon-only-small_1i5hz_571", J = "ds-link_label--hidden_1i5hz_582", o = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import "./button.
|
|
4
|
+
import "./button.BfcWQZhx.js";
|
|
5
5
|
import "./chunks/Icon.BCmt_XBG.js";
|
|
6
|
-
import { D as e } from "./chunks/Notification.
|
|
6
|
+
import { D as e } from "./chunks/Notification.uAEjPywP.js";
|
|
7
7
|
export {
|
|
8
8
|
e as DSNotification
|
|
9
9
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as c } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as a } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import './assets/numberindicator.BJ9vFpnd.css';const m = "ds-number-indicator_root_t83wm_1", g = "ds-number-indicator_root--has-content_t83wm_25", _ = "ds-number-indicator_root--highlight_t83wm_30", n = {
|
|
5
|
+
root: m,
|
|
6
|
+
"root--has-content": "ds-number-indicator_root--has-content_t83wm_25",
|
|
7
|
+
rootHasContent: g,
|
|
8
|
+
"root--highlight": "ds-number-indicator_root--highlight_t83wm_30",
|
|
9
|
+
rootHighlight: _
|
|
10
|
+
}, u = ({
|
|
11
|
+
label: t,
|
|
12
|
+
className: r,
|
|
13
|
+
variant: s = "default",
|
|
14
|
+
...i
|
|
15
|
+
}) => {
|
|
16
|
+
const o = typeof t == "string" && t.trim().length > 0, e = o ? t.trim().substring(0, 4) : null, h = a(n.root, r, {
|
|
17
|
+
[n.rootHasContent]: o,
|
|
18
|
+
// It is not possible to allow the `default` variant to be applied when there is no content.
|
|
19
|
+
// The "minimized" version "dot" should always be orange and never grey.
|
|
20
|
+
[n.rootHighlight]: s === "highlight" || !o
|
|
21
|
+
});
|
|
22
|
+
return /* @__PURE__ */ c.jsx("span", { className: h, ...i, children: e });
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
u as NumberIndicator
|
|
26
|
+
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stihl-design-system/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.0.0-RC.
|
|
4
|
+
"version": "1.0.0-RC.14",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
-
"homepage": "https://
|
|
6
|
+
"homepage": "https://designsystem.stihl.de/",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"stihl",
|
|
9
9
|
"design",
|
|
@@ -139,8 +139,8 @@
|
|
|
139
139
|
},
|
|
140
140
|
"peerDependencies": {
|
|
141
141
|
"classnames": "^2.5.1",
|
|
142
|
-
"react": ">=17.0.0 <
|
|
143
|
-
"react-dom": ">=17.0.0 <
|
|
142
|
+
"react": ">=17.0.0 <20",
|
|
143
|
+
"react-dom": ">=17.0.0 <20",
|
|
144
144
|
"react-intersection-observer": "^9.10.2",
|
|
145
145
|
"react-select": "^5.8.1"
|
|
146
146
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { j as i } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as h } from "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import { forwardRef as $, useRef as C, useState as E, useEffect as L, useCallback as O } from "react";
|
|
5
|
-
import { u as P } from "./chunks/useBreakpoint.
|
|
5
|
+
import { u as P } from "./chunks/useBreakpoint.B8XxjSVJ.js";
|
|
6
6
|
import './assets/radio.X-RTl_jo.css';const v = (o) => o.replace(/\s+/g, ""), U = "ds-radio_root_tdhm5_1", q = "ds-radio_root--disabled_tdhm5_21", z = "ds-radio_root--with-custom-area_tdhm5_24", F = "ds-radio_radio_tdhm5_28", G = "ds-radio_dot_tdhm5_45", J = "ds-radio_radio--invalid_tdhm5_69", K = "ds-radio_label_tdhm5_74", M = "ds-radio_label--bold_tdhm5_88", Q = "ds-radio_label--hidden_tdhm5_99", T = "ds-radio_label--with-custom-area_tdhm5_111", X = "ds-radio_custom-area_tdhm5_115", Y = "ds-radio_hint_tdhm5_123", Z = "ds-radio_hint--visible_tdhm5_146", tt = "ds-radio_hint--unchecked-hidden_tdhm5_150", dt = "ds-radio_hint--hidden_tdhm5_155", et = "ds-radio_input_tdhm5_168", t = {
|
|
7
7
|
root: U,
|
|
8
8
|
"root--disabled": "ds-radio_root--disabled_tdhm5_21",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./chunks/Fieldset.
|
|
6
|
-
import "./radio.
|
|
7
|
-
import { D as a } from "./chunks/RadioGroup.
|
|
5
|
+
import "./chunks/Fieldset.Ct_JFRs9.js";
|
|
6
|
+
import "./radio.B-2uuWHq.js";
|
|
7
|
+
import { D as a } from "./chunks/RadioGroup.D10-pe9H.js";
|
|
8
8
|
export {
|
|
9
9
|
a as DSRadioGroup
|
|
10
10
|
};
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./chunks/useBreakpoint.
|
|
5
|
+
import "./chunks/useBreakpoint.B8XxjSVJ.js";
|
|
6
6
|
import "./asterisk.DpzETKdT.js";
|
|
7
7
|
import "./chunks/Icon.BCmt_XBG.js";
|
|
8
8
|
import "./systemfeedback.C3Pfxxpp.js";
|
|
9
|
-
import { D as s } from "./chunks/Select.
|
|
9
|
+
import { D as s } from "./chunks/Select.DsLnW29U.js";
|
|
10
10
|
export {
|
|
11
11
|
s as DSSelect
|
|
12
12
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as k } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as p } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import { g as s } from "./chunks/helpers.
|
|
4
|
+
import { g as s } from "./chunks/helpers.CcqWV-wZ.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import { DSLink as c } from "./link.
|
|
6
|
+
import { DSLink as c } from "./link.L8O_InKe.js";
|
|
7
7
|
import './assets/skiptocontent.PTL3256m.css';const h = "ds-skip-to-content_root_uqkjt_1", m = "ds-skip-to-content_root--dark_uqkjt_8", r = {
|
|
8
8
|
root: h,
|
|
9
9
|
"root--dark": "ds-skip-to-content_root--dark_uqkjt_8",
|
|
@@ -69,6 +69,7 @@ $theme-light-background-color-sustainability: $color-core-forest-light;
|
|
|
69
69
|
$theme-light-background-color-tertiary: $color-core-grey-light;
|
|
70
70
|
$theme-light-background-color-transparent-hover: $color-core-black-opacity-10;
|
|
71
71
|
$theme-light-background-color-transparent-pressed: $color-core-black-opacity-10;
|
|
72
|
+
$theme-light-background-color-transparent: $color-core-black-opacity-10;
|
|
72
73
|
$theme-light-border-color-feedback-error: $color-core-red-base;
|
|
73
74
|
$theme-light-border-color-feedback-info: $color-core-grey-dark;
|
|
74
75
|
$theme-light-border-color-feedback-success: $color-core-green-base;
|
|
@@ -127,6 +128,7 @@ $theme-dark-background-color-sustainability: $color-core-grey-deep;
|
|
|
127
128
|
$theme-dark-background-color-tertiary: $color-core-grey-ultra-deep;
|
|
128
129
|
$theme-dark-background-color-transparent-hover: $color-core-white-opacity-15;
|
|
129
130
|
$theme-dark-background-color-transparent-pressed: $color-core-white-opacity-15;
|
|
131
|
+
$theme-dark-background-color-transparent: $color-core-white-opacity-15;
|
|
130
132
|
$theme-dark-border-color-feedback-error: $color-core-red-base;
|
|
131
133
|
$theme-dark-border-color-feedback-info: $color-core-grey-dark;
|
|
132
134
|
$theme-dark-border-color-feedback-success: $color-core-green-base;
|
package/tabpane.d.ts
ADDED
package/tabs.BaELlVri.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./chunks/has-window.ut_-aShB.js";
|
|
6
|
+
import "./chunks/helpers.CcqWV-wZ.js";
|
|
7
|
+
import { D as f } from "./chunks/Tabs.D_JAsvoh.js";
|
|
8
|
+
import "./chunks/useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
9
|
+
import "./button.BfcWQZhx.js";
|
|
10
|
+
import "./chunks/Icon.BCmt_XBG.js";
|
|
11
|
+
import "./numberindicator.UU7FSouT.js";
|
|
12
|
+
import "./chunks/TabPane.CYuUi0oL.js";
|
|
13
|
+
export {
|
|
14
|
+
f as DSTabs
|
|
15
|
+
};
|
package/tabs.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import "./chunks/has-window.ut_-aShB.js";
|
|
6
|
+
import "./chunks/helpers.CcqWV-wZ.js";
|
|
7
|
+
import "./chunks/useBreakpoint.B8XxjSVJ.js";
|
|
8
|
+
import "./asterisk.DpzETKdT.js";
|
|
9
|
+
import "./systemfeedback.C3Pfxxpp.js";
|
|
10
|
+
import { D } from "./chunks/Textarea.Dh9R9YdZ.js";
|
|
11
|
+
export {
|
|
12
|
+
D as DSTextarea
|
|
13
|
+
};
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./button.
|
|
5
|
+
import "./button.BfcWQZhx.js";
|
|
6
6
|
import "./chunks/Icon.BCmt_XBG.js";
|
|
7
|
-
import { D as s } from "./chunks/Toast.
|
|
7
|
+
import { D as s } from "./chunks/Toast.j7LPnQ36.js";
|
|
8
8
|
export {
|
|
9
9
|
s as DSToast
|
|
10
10
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as g } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { createContext as y, useContext as C, useState as S, useRef as O, useEffect as A, useMemo as j } from "react";
|
|
4
|
-
import { g as a } from "./chunks/helpers.
|
|
5
|
-
import { b as
|
|
6
|
-
import { D as _, s as U } from "./chunks/Toast.
|
|
7
|
-
import { h as q } from "./chunks/has-
|
|
4
|
+
import { g as a } from "./chunks/helpers.CcqWV-wZ.js";
|
|
5
|
+
import { b as D, g as E } from "./chunks/AriaLiveRegions.utils.Bq6Mp2bE.js";
|
|
6
|
+
import { D as _, s as U } from "./chunks/Toast.j7LPnQ36.js";
|
|
7
|
+
import { h as q } from "./chunks/has-window.ut_-aShB.js";
|
|
8
8
|
const Q = () => {
|
|
9
|
-
if (!
|
|
9
|
+
if (!D() || !E())
|
|
10
10
|
throw new Error(
|
|
11
11
|
a(
|
|
12
12
|
"DSToast",
|
|
@@ -23,7 +23,7 @@ const Q = () => {
|
|
|
23
23
|
'The destructured "toast" element should only be used once in the DOM.'
|
|
24
24
|
)
|
|
25
25
|
);
|
|
26
|
-
}, i = "data-ds-toast-timeout-id",
|
|
26
|
+
}, i = "data-ds-toast-timeout-id", w = "closing", B = 1e4, x = y(void 0), H = () => {
|
|
27
27
|
const n = C(x);
|
|
28
28
|
if (!n)
|
|
29
29
|
throw new Error(
|
|
@@ -33,7 +33,7 @@ const Q = () => {
|
|
|
33
33
|
)
|
|
34
34
|
);
|
|
35
35
|
return n;
|
|
36
|
-
},
|
|
36
|
+
}, J = ({
|
|
37
37
|
children: n
|
|
38
38
|
}) => {
|
|
39
39
|
const [u, c] = S([]), [s, l] = S(null), o = O(null);
|
|
@@ -44,10 +44,10 @@ const Q = () => {
|
|
|
44
44
|
}, [u]), A(() => {
|
|
45
45
|
s && (L(s.message, s.variant), I());
|
|
46
46
|
}, [s]);
|
|
47
|
-
const
|
|
47
|
+
const T = () => {
|
|
48
48
|
var e;
|
|
49
49
|
return ((e = o.current) == null ? void 0 : e.getAttribute(i)) || null;
|
|
50
|
-
},
|
|
50
|
+
}, m = (e) => {
|
|
51
51
|
var t;
|
|
52
52
|
(t = o.current) == null || t.setAttribute(i, e);
|
|
53
53
|
}, p = () => {
|
|
@@ -55,10 +55,10 @@ const Q = () => {
|
|
|
55
55
|
return (e = o.current) == null ? void 0 : e.removeAttribute(i);
|
|
56
56
|
}, L = (e, t) => {
|
|
57
57
|
if (t === "warning") {
|
|
58
|
-
const r =
|
|
58
|
+
const r = D();
|
|
59
59
|
r && (r.innerText = e);
|
|
60
60
|
} else if (t === "success" || t === "info") {
|
|
61
|
-
const r =
|
|
61
|
+
const r = E();
|
|
62
62
|
r && (r.innerText = e);
|
|
63
63
|
}
|
|
64
64
|
}, d = (e, t) => {
|
|
@@ -78,20 +78,20 @@ const Q = () => {
|
|
|
78
78
|
f();
|
|
79
79
|
}, f = () => {
|
|
80
80
|
var t;
|
|
81
|
-
const e =
|
|
81
|
+
const e = T();
|
|
82
82
|
e && (clearTimeout(e), (t = o.current) == null || t.removeAttribute(i));
|
|
83
83
|
}, h = () => {
|
|
84
84
|
const e = setTimeout(() => {
|
|
85
85
|
v();
|
|
86
86
|
}, B);
|
|
87
|
-
|
|
87
|
+
m(String(e));
|
|
88
88
|
}, R = () => {
|
|
89
|
-
|
|
89
|
+
T() !== w && o.current && h();
|
|
90
90
|
}, I = () => {
|
|
91
91
|
var e;
|
|
92
92
|
k(), s && ((e = o.current) != null && e.showPopover) && (o.current.showPopover(), h());
|
|
93
93
|
}, v = () => {
|
|
94
|
-
f(),
|
|
94
|
+
f(), m(w), o.current && (o.current.addEventListener(
|
|
95
95
|
"animationend",
|
|
96
96
|
() => {
|
|
97
97
|
var e;
|
|
@@ -114,6 +114,6 @@ const Q = () => {
|
|
|
114
114
|
] });
|
|
115
115
|
};
|
|
116
116
|
export {
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
J as DSToastProvider,
|
|
118
|
+
H as useDSToast
|
|
119
119
|
};
|
package/utils/helpers.d.ts
CHANGED
|
@@ -17,6 +17,13 @@ export declare const pixelToRem: (px: number) => number;
|
|
|
17
17
|
* @returns {string} A message with a standardized format: "[STIHL Design System] - [componentName]: message".
|
|
18
18
|
*/
|
|
19
19
|
export declare const generateDSMessage: (componentName: string, message: string) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Generates a message for a required prop that is missing from a component.
|
|
22
|
+
*
|
|
23
|
+
* @param {string} propName - The name of the prop that is required.
|
|
24
|
+
* @param {string} componentName - The name of the component that is missing the required prop.
|
|
25
|
+
*/
|
|
26
|
+
export declare const requiredPropMessage: (propName: string, componentName: string) => string;
|
|
20
27
|
/**
|
|
21
28
|
* Retrieves the closest ancestor of the given element that matches a specified selector.
|
|
22
29
|
*
|
package/utils/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isAnimationDisabled: () => boolean;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { g as i } from "./helpers.B1JT5ShS.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { h as s } from "./has-document.r9i9TxKV.js";
|
|
5
|
-
const e = "ds-alert-live-region", t = "ds-status-live-region", g = () => document.getElementById(e), c = () => document.getElementById(t), m = () => {
|
|
6
|
-
if (!s)
|
|
7
|
-
return;
|
|
8
|
-
const n = document.querySelectorAll(
|
|
9
|
-
`#${e}`
|
|
10
|
-
), o = document.querySelectorAll(
|
|
11
|
-
`#${t}`
|
|
12
|
-
);
|
|
13
|
-
if (n.length > 1)
|
|
14
|
-
throw new Error(
|
|
15
|
-
i(
|
|
16
|
-
"DSAriaLiveRegions",
|
|
17
|
-
`The DSAriaLiveRegions component with id="${e}" should only be present once on the page. Found ${n.length} instances.`
|
|
18
|
-
)
|
|
19
|
-
);
|
|
20
|
-
if (o.length > 1)
|
|
21
|
-
throw new Error(
|
|
22
|
-
i(
|
|
23
|
-
"DSAriaLiveRegions",
|
|
24
|
-
`The DSAriaLiveRegions component with id="${t}" should only be present once on the page. Found ${o.length} instances.`
|
|
25
|
-
)
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
e as A,
|
|
30
|
-
t as a,
|
|
31
|
-
g as b,
|
|
32
|
-
c as g,
|
|
33
|
-
m as v
|
|
34
|
-
};
|