@stihl-design-system/components 1.0.0-RC.2 → 1.0.0-RC.3
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/assets/CustomReactSelect.BdwXfLLO.css +1 -0
- package/assets/RadioGroup.Ur8Ro-XL.css +1 -0
- package/assets/asterisk.C-o6rbGQ.css +1 -0
- package/assets/button.DJvR-58w.css +1 -0
- package/assets/buttonround.BlfQkmMV.css +1 -0
- package/assets/checkbox.BsFEWfQe.css +1 -0
- package/assets/fieldset.xazpUXJX.css +1 -0
- package/assets/heading.CGFucb-C.css +1 -0
- package/assets/input.BcP5kkZ2.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/link.V7pJOW1p.css +1 -0
- package/assets/linkstandalone.D3RbBp23.css +1 -0
- package/assets/radio.CSHQGdpr.css +1 -0
- package/assets/select.D2qBxaHP.css +1 -0
- package/assets/switch.sqve8ApJ.css +1 -0
- package/assets/textarea.BKbocznb.css +1 -0
- package/assets/title.CE0Dm7PI.css +1 -0
- package/asterisk.DU8THnoC.js +8 -0
- package/button.BUUGRxIp.js +135 -0
- package/buttonround.CKc-a-hd.js +118 -0
- package/{checkbox.Bx5D_GAe.js → checkbox.C2Ga9yTK.js} +28 -28
- package/{checkboxgroup.gQwSHy4i.js → checkboxgroup.Cfxz9bk6.js} +3 -3
- package/chunks/{CustomReactSelect.Pvkkof1f.js → CustomReactSelect.uzWNynay.js} +222 -222
- package/chunks/RadioGroup.module.bi3leRes.js +11 -0
- package/chunks/whatsapp.CPpu-7Nn.js +10 -0
- package/{combobox.BOJ7aq_B.js → combobox.BXHAo4Wx.js} +1 -1
- package/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/components/Fieldset/Fieldset.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/RadioGroup/RadioGroup.d.ts +1 -1
- package/customreactselect.CipgVXTR.js +13 -0
- package/fieldset.DGcIKzDI.js +98 -0
- package/{floatingactionbutton.BtQVIj6W.js → floatingactionbutton.DzHD39NY.js} +2 -2
- package/heading.DqGbFfj2.js +50 -0
- package/{icon.CmAhxgHK.js → icon.PX9_1kNB.js} +1 -1
- package/index.es.js +22 -22
- package/input.o8OT6rxJ.js +236 -0
- package/inputpassword.-MXq8baU.js +139 -0
- package/inputsearch.CoYTSjox.js +188 -0
- package/inputstepper.BBMQr6kM.js +290 -0
- package/link.BN6AZfhG.js +115 -0
- package/linkstandalone.4-fyRd08.js +79 -0
- package/{logo.DXWgPUY4.js → logo.C_oJ8isW.js} +25 -24
- package/{optioncheckbox.CYikfEsE.js → optioncheckbox.-DRnW_ch.js} +1 -1
- package/package.json +2 -2
- package/radio.Bhu9OUY-.js +79 -0
- package/{radiogroup.7ptQiohb.js → radiogroup.oILRMrX-.js} +3 -3
- package/select.OGcreXnT.js +190 -0
- package/{spinner.CSzQEBx2.js → spinner.Diy_EeFY.js} +1 -1
- package/styles/scss/lib/_grid-extended.scss +2 -2
- package/styles/scss/lib/_grid-sidebar-sidebar.scss +2 -2
- package/styles/scss/lib/_grid-sidebar.scss +6 -6
- package/styles/scss/lib/_heading.scss +14 -1
- package/styles/scss/lib/_link.scss +9 -9
- package/styles/scss/lib/_text.scss +4 -0
- package/switch.BjoFKMQC.js +65 -0
- package/{systemfeedback.rBgdiL5T.js → systemfeedback.C7iXO5A1.js} +1 -1
- package/textarea.kc_Sfbgr.js +193 -0
- package/title.icX0VDiO.js +36 -0
- package/types/icon-types.d.ts +1 -1
- 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/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/fieldset.yE6WV6Ls.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as e } from "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
-
import { c } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import "react";
|
|
5
|
-
import { Asterisk as y } from "./asterisk.BlYjsfkN.js";
|
|
6
|
-
import { DSHeading as w } from "./heading.C6k7Gakb.js";
|
|
7
|
-
import { DSSystemFeedback as N } from "./systemfeedback.rBgdiL5T.js";
|
|
8
|
-
import { g as j } from "./chunks/helpers.B1JT5ShS.js";
|
|
9
|
-
import './assets/fieldset.DTFs_koU.css';const v = "_root_atnr0_63", E = "_child-wrapper_atnr0_69", M = "_legend_atnr0_76", q = "_legend--utility--m_atnr0_79", C = "_description_atnr0_90", P = "_description--small_atnr0_103", T = "_system-feedback_atnr0_107", t = {
|
|
10
|
-
root: v,
|
|
11
|
-
"child-wrapper": "_child-wrapper_atnr0_69",
|
|
12
|
-
childWrapper: E,
|
|
13
|
-
legend: M,
|
|
14
|
-
"legend--utility--m": "_legend--utility--m_atnr0_79",
|
|
15
|
-
legendUtilityM: q,
|
|
16
|
-
description: C,
|
|
17
|
-
"description--small": "_description--small_atnr0_103",
|
|
18
|
-
descriptionSmall: P,
|
|
19
|
-
"system-feedback": "_system-feedback_atnr0_107",
|
|
20
|
-
systemFeedback: T
|
|
21
|
-
}, U = ({
|
|
22
|
-
description: o,
|
|
23
|
-
id: s,
|
|
24
|
-
legend: l,
|
|
25
|
-
systemFeedback: i
|
|
26
|
-
}) => {
|
|
27
|
-
if (!s && (o || i))
|
|
28
|
-
throw new Error(
|
|
29
|
-
j(
|
|
30
|
-
"DSFieldset",
|
|
31
|
-
'A unique "id" prop is required when providing the description or systemFeedback property. Please add an unique "id" prop to the DSFieldset component.'
|
|
32
|
-
)
|
|
33
|
-
);
|
|
34
|
-
if (!l)
|
|
35
|
-
throw new Error(
|
|
36
|
-
j(
|
|
37
|
-
"DSFieldset",
|
|
38
|
-
"The legend prop is required. Please add the legend prop to the DSFieldset component."
|
|
39
|
-
)
|
|
40
|
-
);
|
|
41
|
-
}, H = ({
|
|
42
|
-
children: o,
|
|
43
|
-
legend: s,
|
|
44
|
-
className: l,
|
|
45
|
-
description: i,
|
|
46
|
-
disabled: S = !1,
|
|
47
|
-
id: d,
|
|
48
|
-
invalid: p = !1,
|
|
49
|
-
required: m = !1,
|
|
50
|
-
systemFeedback: r,
|
|
51
|
-
...b
|
|
52
|
-
}) => {
|
|
53
|
-
process.env.NODE_ENV !== "production" && U({ description: i, id: d, legend: s, systemFeedback: r });
|
|
54
|
-
let n, _, g;
|
|
55
|
-
const a = typeof s == "object" && s !== void 0;
|
|
56
|
-
a && ({ headingSize: n, headingTag: _, headingText: g } = s);
|
|
57
|
-
const h = `${d}-feedback`, f = `${d}-description`, u = [
|
|
58
|
-
r && h,
|
|
59
|
-
i && f
|
|
60
|
-
].filter(Boolean).join(" "), x = !a || n === "small" || n === "small-uppercase", D = c(t.root, l), F = c(t.legend, {
|
|
61
|
-
[t.legendUtilityM]: !a
|
|
62
|
-
}), k = c(t.description, {
|
|
63
|
-
[t.descriptionSmall]: x
|
|
64
|
-
});
|
|
65
|
-
return /* @__PURE__ */ e.jsxs(
|
|
66
|
-
"fieldset",
|
|
67
|
-
{
|
|
68
|
-
className: D,
|
|
69
|
-
disabled: S,
|
|
70
|
-
...b,
|
|
71
|
-
"aria-invalid": p,
|
|
72
|
-
"aria-describedby": u || void 0,
|
|
73
|
-
children: [
|
|
74
|
-
/* @__PURE__ */ e.jsx("legend", { className: F, children: a ? /* @__PURE__ */ e.jsxs(w, { tag: _, size: n, children: [
|
|
75
|
-
g,
|
|
76
|
-
m && /* @__PURE__ */ e.jsx(y, {})
|
|
77
|
-
] }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
78
|
-
s,
|
|
79
|
-
m && /* @__PURE__ */ e.jsx(y, {})
|
|
80
|
-
] }) }),
|
|
81
|
-
i && /* @__PURE__ */ e.jsx("span", { id: f, className: k, children: i }),
|
|
82
|
-
p && r && /* @__PURE__ */ e.jsx(
|
|
83
|
-
N,
|
|
84
|
-
{
|
|
85
|
-
id: h,
|
|
86
|
-
type: "invalid",
|
|
87
|
-
message: r,
|
|
88
|
-
className: t.systemFeedback
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
/* @__PURE__ */ e.jsx("div", { className: t.childWrapper, children: o })
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
};
|
|
96
|
-
export {
|
|
97
|
-
H as DSFieldset
|
|
98
|
-
};
|
package/heading.C6k7Gakb.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as p } from "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
-
import { c } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import './assets/heading.5HpYs7wS.css';const u = "_root_tyh2a_63", h = "_root--x-large_tyh2a_66", d = "_root--large_tyh2a_80", g = "_root--medium_tyh2a_94", i = "_root--medium-uppercase_tyh2a_102", n = "_root--small_tyh2a_110", y = "_root--small-uppercase_tyh2a_118", x = "_root--theme-dark_tyh2a_126", o = {
|
|
5
|
-
root: u,
|
|
6
|
-
"root--x-large": "_root--x-large_tyh2a_66",
|
|
7
|
-
rootXLarge: h,
|
|
8
|
-
"root--large": "_root--large_tyh2a_80",
|
|
9
|
-
rootLarge: d,
|
|
10
|
-
"root--medium": "_root--medium_tyh2a_94",
|
|
11
|
-
rootMedium: g,
|
|
12
|
-
"root--medium-uppercase": "_root--medium-uppercase_tyh2a_102",
|
|
13
|
-
rootMediumUppercase: i,
|
|
14
|
-
"root--small": "_root--small_tyh2a_110",
|
|
15
|
-
rootSmall: n,
|
|
16
|
-
"root--small-uppercase": "_root--small-uppercase_tyh2a_118",
|
|
17
|
-
rootSmallUppercase: y,
|
|
18
|
-
"root--theme-dark": "_root--theme-dark_tyh2a_126",
|
|
19
|
-
rootThemeDark: x
|
|
20
|
-
}, L = ({
|
|
21
|
-
children: t,
|
|
22
|
-
className: a,
|
|
23
|
-
size: r = "medium",
|
|
24
|
-
tag: e = "h2",
|
|
25
|
-
// default tag because of SEO reasons (h1 should be used only once per page)
|
|
26
|
-
theme: m = "light",
|
|
27
|
-
..._
|
|
28
|
-
}) => {
|
|
29
|
-
const s = e, l = c(o.root, a, {
|
|
30
|
-
// sizes
|
|
31
|
-
[o.rootXLarge]: r === "x-large",
|
|
32
|
-
[o.rootLarge]: r === "large",
|
|
33
|
-
[o.rootMedium]: r == "medium",
|
|
34
|
-
[o.rootMediumUppercase]: r == "medium-uppercase",
|
|
35
|
-
[o.rootSmall]: r == "small",
|
|
36
|
-
[o.rootSmallUppercase]: r == "small-uppercase",
|
|
37
|
-
// dark theme
|
|
38
|
-
[o.rootThemeDark]: m === "dark"
|
|
39
|
-
});
|
|
40
|
-
return /* @__PURE__ */ p.jsx(s, { className: l, ..._, children: t });
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
L as DSHeading
|
|
44
|
-
};
|
package/input.vP5xcwzV.js
DELETED
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as n } from "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
-
import { c as l } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import { useState as p, useRef as k, useLayoutEffect as B, useEffect as ia } from "react";
|
|
5
|
-
import { u as sa } from "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
6
|
-
import { Asterisk as ea } from "./asterisk.BlYjsfkN.js";
|
|
7
|
-
import { DSButton as T } from "./button.Di5XtChf.js";
|
|
8
|
-
import { DSIcon as la } from "./icon.CmAhxgHK.js";
|
|
9
|
-
import { DSSystemFeedback as oa } from "./systemfeedback.rBgdiL5T.js";
|
|
10
|
-
import { v as ca, a as da, M as _a, b as ua, s as fa, i as v, c as ra } from "./chunks/Input.utils.Bly6ZzLI.js";
|
|
11
|
-
import './assets/input.GpXQJqEO.css';const ha = "_input_hw550_187", pa = "_input--invalid_hw550_297", ma = "_input--small_hw550_304", ba = "_input--has-leading-icon_hw550_350", wa = "_input--has-action-button_hw550_353", xa = "_input--has-second-action-button_hw550_356", ga = "_input--has-affix_hw550_368", Ia = "_input--is-ready_hw550_380", ya = "_root_hw550_387", Sa = "_hint_hw550_395", Ha = "_label_hw550_395", ka = "_wrapper_hw550_399", va = "_affix_hw550_405", Ca = "_affix--small_hw550_425", Ra = "_affix--disabled_hw550_437", La = "_prefix_hw550_440", ja = "_affix--readonly_hw550_443", Aa = "_suffix_hw550_453", Da = "_leading-icon_hw550_460", Na = "_leading-icon--small_hw550_472", Ba = "_leading-icon--disabled_hw550_475", Ta = "_action-button_hw550_484", Ea = "_label--hidden_hw550_501", Fa = "_feedback_hw550_528", a = {
|
|
12
|
-
input: ha,
|
|
13
|
-
"input--invalid": "_input--invalid_hw550_297",
|
|
14
|
-
inputInvalid: pa,
|
|
15
|
-
"input--small": "_input--small_hw550_304",
|
|
16
|
-
inputSmall: ma,
|
|
17
|
-
"input--has-leading-icon": "_input--has-leading-icon_hw550_350",
|
|
18
|
-
inputHasLeadingIcon: ba,
|
|
19
|
-
"input--has-action-button": "_input--has-action-button_hw550_353",
|
|
20
|
-
inputHasActionButton: wa,
|
|
21
|
-
"input--has-second-action-button": "_input--has-second-action-button_hw550_356",
|
|
22
|
-
inputHasSecondActionButton: xa,
|
|
23
|
-
"input--has-affix": "_input--has-affix_hw550_368",
|
|
24
|
-
inputHasAffix: ga,
|
|
25
|
-
"input--is-ready": "_input--is-ready_hw550_380",
|
|
26
|
-
inputIsReady: Ia,
|
|
27
|
-
root: ya,
|
|
28
|
-
hint: Sa,
|
|
29
|
-
label: Ha,
|
|
30
|
-
wrapper: ka,
|
|
31
|
-
affix: va,
|
|
32
|
-
"affix--small": "_affix--small_hw550_425",
|
|
33
|
-
affixSmall: Ca,
|
|
34
|
-
"affix--disabled": "_affix--disabled_hw550_437",
|
|
35
|
-
affixDisabled: Ra,
|
|
36
|
-
prefix: La,
|
|
37
|
-
"affix--readonly": "_affix--readonly_hw550_443",
|
|
38
|
-
affixReadonly: ja,
|
|
39
|
-
suffix: Aa,
|
|
40
|
-
"leading-icon": "_leading-icon_hw550_460",
|
|
41
|
-
leadingIcon: Da,
|
|
42
|
-
"leading-icon--small": "_leading-icon--small_hw550_472",
|
|
43
|
-
leadingIconSmall: Na,
|
|
44
|
-
"leading-icon--disabled": "_leading-icon--disabled_hw550_475",
|
|
45
|
-
leadingIconDisabled: Ba,
|
|
46
|
-
"action-button": "_action-button_hw550_484",
|
|
47
|
-
actionButton: Ta,
|
|
48
|
-
"label--hidden": "_label--hidden_hw550_501",
|
|
49
|
-
labelHidden: Ea,
|
|
50
|
-
feedback: Fa
|
|
51
|
-
}, Ja = ({
|
|
52
|
-
id: d,
|
|
53
|
-
label: C,
|
|
54
|
-
actionButtonLabel: E,
|
|
55
|
-
actionButtonIconName: u,
|
|
56
|
-
actionButtonIconSource: m,
|
|
57
|
-
actionButtonOnClick: F,
|
|
58
|
-
className: P,
|
|
59
|
-
disabled: i = !1,
|
|
60
|
-
hint: b,
|
|
61
|
-
hideLabel: O = !1,
|
|
62
|
-
invalid: f = !1,
|
|
63
|
-
leadingIconName: r,
|
|
64
|
-
leadingIconSource: h,
|
|
65
|
-
prefix: s,
|
|
66
|
-
readonly: _ = !1,
|
|
67
|
-
required: R = !1,
|
|
68
|
-
size: e = "medium",
|
|
69
|
-
suffix: t,
|
|
70
|
-
systemFeedback: w,
|
|
71
|
-
type: o = "text",
|
|
72
|
-
...$
|
|
73
|
-
}) => {
|
|
74
|
-
process.env.NODE_ENV !== "production" && (ca({
|
|
75
|
-
id: d,
|
|
76
|
-
label: C,
|
|
77
|
-
prefix: s,
|
|
78
|
-
suffix: t,
|
|
79
|
-
leadingIconName: r,
|
|
80
|
-
leadingIconSource: h,
|
|
81
|
-
actionButtonIconName: u,
|
|
82
|
-
actionButtonIconSource: m
|
|
83
|
-
}), da(o));
|
|
84
|
-
const [W, X] = p(!1), [M, V] = p(!1), [x, G] = p(!1), [U, J] = p({}), g = k(null), K = s == null ? void 0 : s.substring(0, _a), I = k(null), Q = t == null ? void 0 : t.substring(0, ua), y = k(null), Y = sa(O);
|
|
85
|
-
B(() => {
|
|
86
|
-
const c = e === "medium" ? 16 : 8, S = {};
|
|
87
|
-
if (I.current) {
|
|
88
|
-
const H = I.current.offsetWidth;
|
|
89
|
-
S.paddingLeft = c + H + "px";
|
|
90
|
-
}
|
|
91
|
-
if (y.current) {
|
|
92
|
-
const H = y.current.offsetWidth;
|
|
93
|
-
S.paddingRight = c + H + "px";
|
|
94
|
-
}
|
|
95
|
-
J(S), X(!0);
|
|
96
|
-
}, [s, t, e, M]), B(() => {
|
|
97
|
-
(async () => {
|
|
98
|
-
"fonts" in document && (await document.fonts.load(
|
|
99
|
-
'1em "STIHL Contraface Digital Text Regular"'
|
|
100
|
-
), V(!0));
|
|
101
|
-
})();
|
|
102
|
-
}, []), ia(() => {
|
|
103
|
-
const c = fa(
|
|
104
|
-
v(o),
|
|
105
|
-
ra(o)
|
|
106
|
-
);
|
|
107
|
-
G(c);
|
|
108
|
-
}, [o]);
|
|
109
|
-
const L = l(a.affix, {
|
|
110
|
-
[a.affixSmall]: e === "small",
|
|
111
|
-
[a.affixDisabled]: i,
|
|
112
|
-
[a.affixReadonly]: _
|
|
113
|
-
}), j = `${d}-label`, A = `${d}-feedback`, D = `${d}-hint`, Z = b ? ` ${D}` : "", q = l(a.root, P), z = l(a.input, {
|
|
114
|
-
// small input
|
|
115
|
-
[a.inputSmall]: e === "small",
|
|
116
|
-
// invalid state
|
|
117
|
-
[a.inputInvalid]: f,
|
|
118
|
-
// leading icon
|
|
119
|
-
[a.inputHasLeadingIcon]: r || h,
|
|
120
|
-
// prefix/suffix
|
|
121
|
-
[a.inputHasAffix]: s || t,
|
|
122
|
-
// action button
|
|
123
|
-
[a.inputHasActionButton]: u || m || x,
|
|
124
|
-
[a.inputIsReady]: W
|
|
125
|
-
}), aa = l(a.label, {
|
|
126
|
-
// hide label only visually to keep them available for assistive technologies
|
|
127
|
-
[a.labelHidden]: Y
|
|
128
|
-
}), na = l(a.leadingIcon, {
|
|
129
|
-
[a.leadingIconSmall]: e === "small",
|
|
130
|
-
[a.leadingIconDisabled]: i
|
|
131
|
-
}), N = l(a.actionButton, {
|
|
132
|
-
[a.actionButtonSmall]: e === "small"
|
|
133
|
-
}), ta = (c) => {
|
|
134
|
-
g.current && !i && !_ && g.current.showPicker(), c.preventDefault();
|
|
135
|
-
};
|
|
136
|
-
return /* @__PURE__ */ n.jsxs("div", { className: q, children: [
|
|
137
|
-
/* @__PURE__ */ n.jsxs("label", { className: aa, id: j, htmlFor: d, children: [
|
|
138
|
-
C,
|
|
139
|
-
R && /* @__PURE__ */ n.jsx(ea, {})
|
|
140
|
-
] }),
|
|
141
|
-
b && /* @__PURE__ */ n.jsx("div", { className: a.hint, id: D, children: b }),
|
|
142
|
-
f && w && /* @__PURE__ */ n.jsx(
|
|
143
|
-
oa,
|
|
144
|
-
{
|
|
145
|
-
className: a.feedback,
|
|
146
|
-
message: w,
|
|
147
|
-
type: "invalid",
|
|
148
|
-
id: A
|
|
149
|
-
}
|
|
150
|
-
),
|
|
151
|
-
/* @__PURE__ */ n.jsxs("div", { className: a.wrapper, children: [
|
|
152
|
-
s && /* @__PURE__ */ n.jsx(
|
|
153
|
-
"span",
|
|
154
|
-
{
|
|
155
|
-
className: l(L, a.prefix),
|
|
156
|
-
ref: I,
|
|
157
|
-
"aria-disabled": i,
|
|
158
|
-
children: K
|
|
159
|
-
}
|
|
160
|
-
),
|
|
161
|
-
!s && (r || h) && /* @__PURE__ */ n.jsx(
|
|
162
|
-
la,
|
|
163
|
-
{
|
|
164
|
-
name: r,
|
|
165
|
-
theme: "light",
|
|
166
|
-
source: h,
|
|
167
|
-
className: na,
|
|
168
|
-
"aria-hidden": "true"
|
|
169
|
-
}
|
|
170
|
-
),
|
|
171
|
-
/* @__PURE__ */ n.jsx(
|
|
172
|
-
"input",
|
|
173
|
-
{
|
|
174
|
-
type: o,
|
|
175
|
-
className: z,
|
|
176
|
-
id: d,
|
|
177
|
-
ref: g,
|
|
178
|
-
...$,
|
|
179
|
-
style: U,
|
|
180
|
-
"aria-labelledby": `${j}${Z}`,
|
|
181
|
-
"aria-describedby": f && w ? A : void 0,
|
|
182
|
-
"aria-invalid": f,
|
|
183
|
-
"aria-disabled": _,
|
|
184
|
-
readOnly: _,
|
|
185
|
-
required: R,
|
|
186
|
-
disabled: i
|
|
187
|
-
}
|
|
188
|
-
),
|
|
189
|
-
t && /* @__PURE__ */ n.jsx(
|
|
190
|
-
"span",
|
|
191
|
-
{
|
|
192
|
-
className: l(L, a.suffix),
|
|
193
|
-
ref: y,
|
|
194
|
-
"aria-disabled": i,
|
|
195
|
-
children: Q
|
|
196
|
-
}
|
|
197
|
-
),
|
|
198
|
-
!t && !x && (u || m) && /* @__PURE__ */ n.jsx(
|
|
199
|
-
T,
|
|
200
|
-
{
|
|
201
|
-
hideLabel: !0,
|
|
202
|
-
theme: "light",
|
|
203
|
-
iconName: u,
|
|
204
|
-
variant: "ghost",
|
|
205
|
-
className: N,
|
|
206
|
-
size: e,
|
|
207
|
-
onClick: F,
|
|
208
|
-
type: "button",
|
|
209
|
-
disabled: i || _,
|
|
210
|
-
children: E
|
|
211
|
-
}
|
|
212
|
-
),
|
|
213
|
-
!t && x && !_ && !i && /* @__PURE__ */ n.jsxs(
|
|
214
|
-
T,
|
|
215
|
-
{
|
|
216
|
-
hideLabel: !0,
|
|
217
|
-
theme: "light",
|
|
218
|
-
iconName: v(o) ? "calendar" : "clock",
|
|
219
|
-
variant: "ghost",
|
|
220
|
-
className: N,
|
|
221
|
-
size: e,
|
|
222
|
-
onClick: ta,
|
|
223
|
-
type: "button",
|
|
224
|
-
children: [
|
|
225
|
-
"Open ",
|
|
226
|
-
v(o) ? "date" : "time",
|
|
227
|
-
" picker"
|
|
228
|
-
]
|
|
229
|
-
}
|
|
230
|
-
)
|
|
231
|
-
] })
|
|
232
|
-
] });
|
|
233
|
-
};
|
|
234
|
-
export {
|
|
235
|
-
Ja as DSInput
|
|
236
|
-
};
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as a } from "./chunks/jsx-runtime.C-kxDJ4g.js";
|
|
3
|
-
import { c as i } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import { useState as D } from "react";
|
|
5
|
-
import { u as C } from "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
6
|
-
import { Asterisk as L } from "./asterisk.BlYjsfkN.js";
|
|
7
|
-
import { DSButton as $ } from "./button.Di5XtChf.js";
|
|
8
|
-
import { DSSystemFeedback as E } from "./systemfeedback.rBgdiL5T.js";
|
|
9
|
-
import { g as b } from "./chunks/helpers.B1JT5ShS.js";
|
|
10
|
-
import './assets/inputpassword.B9J1hCcj.css';const q = "_input_w95w8_187", R = "_input--invalid_w95w8_297", V = "_input--small_w95w8_304", O = "_input--has-leading-icon_w95w8_350", F = "_input--has-action-button_w95w8_353", M = "_input--has-second-action-button_w95w8_356", T = "_input--has-affix_w95w8_368", G = "_input--is-ready_w95w8_380", J = "_root_w95w8_387", K = "_hint_w95w8_395", Q = "_label_w95w8_395", U = "_wrapper_w95w8_399", W = "_action-button_w95w8_405", X = "_label--hidden_w95w8_422", Y = "_feedback_w95w8_449", t = {
|
|
11
|
-
input: q,
|
|
12
|
-
"input--invalid": "_input--invalid_w95w8_297",
|
|
13
|
-
inputInvalid: R,
|
|
14
|
-
"input--small": "_input--small_w95w8_304",
|
|
15
|
-
inputSmall: V,
|
|
16
|
-
"input--has-leading-icon": "_input--has-leading-icon_w95w8_350",
|
|
17
|
-
inputHasLeadingIcon: O,
|
|
18
|
-
"input--has-action-button": "_input--has-action-button_w95w8_353",
|
|
19
|
-
inputHasActionButton: F,
|
|
20
|
-
"input--has-second-action-button": "_input--has-second-action-button_w95w8_356",
|
|
21
|
-
inputHasSecondActionButton: M,
|
|
22
|
-
"input--has-affix": "_input--has-affix_w95w8_368",
|
|
23
|
-
inputHasAffix: T,
|
|
24
|
-
"input--is-ready": "_input--is-ready_w95w8_380",
|
|
25
|
-
inputIsReady: G,
|
|
26
|
-
root: J,
|
|
27
|
-
hint: K,
|
|
28
|
-
label: Q,
|
|
29
|
-
wrapper: U,
|
|
30
|
-
"action-button": "_action-button_w95w8_405",
|
|
31
|
-
actionButton: W,
|
|
32
|
-
"label--hidden": "_label--hidden_w95w8_422",
|
|
33
|
-
labelHidden: X,
|
|
34
|
-
feedback: Y
|
|
35
|
-
}, Z = ({ id: n, label: s }) => {
|
|
36
|
-
if (!n)
|
|
37
|
-
throw new Error(
|
|
38
|
-
b(
|
|
39
|
-
"DSInputPassword",
|
|
40
|
-
'A unique "id" prop is required. Please add an unique "id" prop to the DSInputPassword component.'
|
|
41
|
-
)
|
|
42
|
-
);
|
|
43
|
-
if (!s)
|
|
44
|
-
throw new Error(
|
|
45
|
-
b(
|
|
46
|
-
"DSInputPassword",
|
|
47
|
-
`A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputPassword component. If you don't want to display a label, set hideLabel={true}.`
|
|
48
|
-
)
|
|
49
|
-
);
|
|
50
|
-
}, lt = ({
|
|
51
|
-
id: n,
|
|
52
|
-
label: s,
|
|
53
|
-
autocomplete: h = "new-password",
|
|
54
|
-
className: f,
|
|
55
|
-
disabled: c = !1,
|
|
56
|
-
hidePasswordText: y = "Hide password",
|
|
57
|
-
hint: e,
|
|
58
|
-
hideLabel: S = !1,
|
|
59
|
-
invalid: o = !1,
|
|
60
|
-
readonly: r = !1,
|
|
61
|
-
required: d = !1,
|
|
62
|
-
showPasswordText: x = "Show password",
|
|
63
|
-
size: l = "medium",
|
|
64
|
-
systemFeedback: u,
|
|
65
|
-
...I
|
|
66
|
-
}) => {
|
|
67
|
-
process.env.NODE_ENV !== "production" && Z({
|
|
68
|
-
id: n,
|
|
69
|
-
label: s
|
|
70
|
-
});
|
|
71
|
-
const [p, B] = D(!1), w = `${n}-label`, _ = `${n}-feedback`, m = `${n}-hint`, H = e ? ` ${m}` : "", g = C(S), v = i(t.root, f), P = i(t.input, {
|
|
72
|
-
// small input
|
|
73
|
-
[t.inputSmall]: l === "small",
|
|
74
|
-
// invalid state
|
|
75
|
-
[t.inputInvalid]: o,
|
|
76
|
-
// action button - input password always has an action button
|
|
77
|
-
[t.inputHasActionButton]: !0
|
|
78
|
-
}), N = i(t.label, {
|
|
79
|
-
// hide label only visually to keep them available for assistive technologies
|
|
80
|
-
[t.labelHidden]: g
|
|
81
|
-
}), j = i(t.actionButton, {
|
|
82
|
-
[t.actionButtonSmall]: l === "small"
|
|
83
|
-
}), k = () => {
|
|
84
|
-
B((A) => !A);
|
|
85
|
-
};
|
|
86
|
-
return /* @__PURE__ */ a.jsxs("div", { className: v, children: [
|
|
87
|
-
/* @__PURE__ */ a.jsxs("label", { className: N, id: w, htmlFor: n, children: [
|
|
88
|
-
s,
|
|
89
|
-
d && /* @__PURE__ */ a.jsx(L, {})
|
|
90
|
-
] }),
|
|
91
|
-
e && /* @__PURE__ */ a.jsx("div", { className: t.hint, id: m, children: e }),
|
|
92
|
-
o && u && /* @__PURE__ */ a.jsx(
|
|
93
|
-
E,
|
|
94
|
-
{
|
|
95
|
-
className: t.feedback,
|
|
96
|
-
message: u,
|
|
97
|
-
type: "invalid",
|
|
98
|
-
id: _
|
|
99
|
-
}
|
|
100
|
-
),
|
|
101
|
-
/* @__PURE__ */ a.jsxs("div", { className: t.wrapper, children: [
|
|
102
|
-
/* @__PURE__ */ a.jsx(
|
|
103
|
-
"input",
|
|
104
|
-
{
|
|
105
|
-
className: P,
|
|
106
|
-
id: n,
|
|
107
|
-
...I,
|
|
108
|
-
"aria-labelledby": `${w}${H}`,
|
|
109
|
-
"aria-describedby": o && u ? _ : void 0,
|
|
110
|
-
"aria-invalid": o,
|
|
111
|
-
"aria-disabled": r,
|
|
112
|
-
readOnly: r,
|
|
113
|
-
required: d,
|
|
114
|
-
disabled: c,
|
|
115
|
-
autoComplete: h,
|
|
116
|
-
type: p ? "text" : "password"
|
|
117
|
-
}
|
|
118
|
-
),
|
|
119
|
-
/* @__PURE__ */ a.jsx(
|
|
120
|
-
$,
|
|
121
|
-
{
|
|
122
|
-
hideLabel: !0,
|
|
123
|
-
theme: "light",
|
|
124
|
-
iconName: p ? "eye-closed" : "eye",
|
|
125
|
-
variant: "ghost",
|
|
126
|
-
className: j,
|
|
127
|
-
size: l,
|
|
128
|
-
onClick: k,
|
|
129
|
-
type: "button",
|
|
130
|
-
disabled: c,
|
|
131
|
-
children: p ? y : x
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
] })
|
|
135
|
-
] });
|
|
136
|
-
};
|
|
137
|
-
export {
|
|
138
|
-
lt as DSInputPassword
|
|
139
|
-
};
|