@stihl-design-system/components 1.0.0-RC.27 → 1.0.0-RC.28
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/{accordion.CBaDU14g.js → accordion.B9X4Vlig.js} +1 -1
- package/{actionbutton.DEJsLxnQ.js → actionbutton.7x4F7a0U.js} +1 -1
- package/{actionlink.Cs6BTCA3.js → actionlink.CV0n19ik.js} +1 -1
- package/assets/Accordion.BHWEZCmu.css +1 -0
- package/assets/CustomReactSelect.Dq5Hoqv2.css +1 -0
- package/assets/{Fieldset.Cy5r0K7n.css → Fieldset.CW9dBvAo.css} +1 -1
- package/assets/InputFile.BVgHILAZ.css +1 -0
- package/assets/InputPassword.CBpkWGy7.css +1 -0
- package/assets/InputSearch.CnPJYH8L.css +1 -0
- package/assets/InputStepper.U2h9Kd0t.css +1 -0
- package/assets/Select.U7xsC0o1.css +1 -0
- package/assets/Slider.DzwSjDPV.css +1 -0
- package/assets/Textarea.C4IEEOFR.css +1 -0
- package/assets/input.CuIHvnD5.css +1 -0
- package/assets/radio.ipbv7OMF.css +1 -0
- package/{checkboxgroup.YK8H0YoX.js → checkboxgroup.Bylq97Q9.js} +2 -2
- package/chunks/Accordion.BvHroAyn.js +154 -0
- package/chunks/ActionButton.BlhiiU3l.js +165 -0
- package/chunks/ActionLink.BvFL6rgb.js +138 -0
- package/chunks/{CheckboxGroup.DHzpgOWp.js → CheckboxGroup.D4MQD0i0.js} +1 -1
- package/chunks/{CustomReactSelect.BPnzhvw1.js → CustomReactSelect.D9B928kB.js} +408 -409
- package/chunks/Fieldset.BgZMYAH-.js +74 -0
- package/chunks/Header.BSvyYrIV.js +368 -0
- package/chunks/InputFile.rC7NJYrU.js +218 -0
- package/chunks/InputPassword.5-r36K86.js +132 -0
- package/chunks/InputSearch.D4Q99_nR.js +170 -0
- package/chunks/InputStepper.EsPAGCFJ.js +259 -0
- package/chunks/{RadioGroup.c7YYJdUe.js → RadioGroup.CRP8_vsg.js} +2 -2
- package/chunks/Select.lveq1iBY.js +158 -0
- package/chunks/Slider.D9MHH4cZ.js +292 -0
- package/chunks/Textarea.BRfh8ykm.js +161 -0
- package/combobox.pMk_oggm.js +60 -0
- package/components/Combobox/Combobox.d.ts +4 -0
- package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +1 -1
- package/{customreactselect.Bu1i8wkh.js → customreactselect.-DGMZMFu.js} +2 -3
- package/{fieldset.DM9ELUJa.js → fieldset.BR9fZReW.js} +1 -1
- package/{header.WhQHSuB1.js → header.Z4Oxj_xL.js} +1 -1
- package/index.es.js +17 -17
- package/input.DAneVu7p.js +199 -0
- package/{inputfile.Cmkxf4Vq.js → inputfile.CB-QTIDn.js} +2 -3
- package/{inputpassword.CaJBCMA0.js → inputpassword.B_A0JDkz.js} +2 -3
- package/{inputsearch.B06DhYzo.js → inputsearch.DUgTkPWm.js} +2 -3
- package/{inputstepper.DNY7nzP8.js → inputstepper.DKmlBa0Y.js} +2 -3
- package/package.json +1 -1
- package/partials/index.js +24 -24
- package/{radio.Be4pFOLf.js → radio.z-Mi3J6t.js} +20 -20
- package/{radiogroup.BRjwP01C.js → radiogroup.Bk36A24U.js} +3 -3
- package/{select.3zE96eWc.js → select.4wUa3vMT.js} +2 -3
- package/{slider.CTCf7Xdm.js → slider.BicJfJzc.js} +2 -2
- package/styles/scss/ds/index.scss +1 -0
- package/styles/scss/ds/lib/ds-internal/_index.scss +1 -0
- package/styles/scss/ds/lib/ds-internal/_input.scss +187 -0
- package/styles/scss/ds/lib/input.scss +26 -0
- package/{textarea.B_3fPtmd.js → textarea.BynOgkpo.js} +2 -3
- package/{topbar.2b8fjmA4.js → topbar.Bccms0xZ.js} +1 -1
- package/assets/Accordion.DOcfZwq8.css +0 -1
- package/assets/CustomReactSelect.B9f_KYFg.css +0 -1
- package/assets/InputFile.Dqjz53mb.css +0 -1
- package/assets/InputPassword.BuVQ9dRy.css +0 -1
- package/assets/InputSearch.Dwtb3Mhw.css +0 -1
- package/assets/InputStepper.CBt99L83.css +0 -1
- package/assets/Select.CghDnBUQ.css +0 -1
- package/assets/Slider.C8i4U4iT.css +0 -1
- package/assets/Textarea.BgtH-TTe.css +0 -1
- package/assets/input.DFwunFjw.css +0 -1
- package/assets/radio.BCB51D_y.css +0 -1
- package/chunks/Accordion.eVOD7J_8.js +0 -154
- package/chunks/ActionButton.Ck1rGqgm.js +0 -165
- package/chunks/ActionLink.DnUNjoAT.js +0 -138
- package/chunks/Fieldset.BX46NuLh.js +0 -74
- package/chunks/Header.Djs1adPW.js +0 -361
- package/chunks/InputFile.vkkg5Pab.js +0 -220
- package/chunks/InputPassword.D42uUEGy.js +0 -136
- package/chunks/InputSearch.aIbUXVQU.js +0 -174
- package/chunks/InputStepper.DFEdUWm7.js +0 -263
- package/chunks/Select.B_EHpk22.js +0 -162
- package/chunks/Slider.DMSwmGwD.js +0 -292
- package/chunks/Textarea.Ce26v6ht.js +0 -163
- package/combobox.AaK6QjRl.js +0 -58
- package/input.DhxUW3zc.js +0 -203
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as v, jsxs as we } from "react/jsx-runtime";
|
|
3
|
-
import { d as xe } from "./index.CgTHIF3K.js";
|
|
4
|
-
import { c as me } from "./index.CEyLAtio.js";
|
|
5
|
-
import { forwardRef as Be, useRef as Fe, useState as Ie, useEffect as He } from "react";
|
|
6
|
-
import { u as Re } from "./useBreakpoint.CMOR9ZOB.js";
|
|
7
|
-
import { Asterisk as je } from "../asterisk.CR60hx8S.js";
|
|
8
|
-
import { D as We } from "./Icon.C0161Glk.js";
|
|
9
|
-
import { DSSystemFeedback as ze } from "../systemfeedback.CLQCbTF6.js";
|
|
10
|
-
import { g as pe, r as Me } from "./helpers.BbWkXTr3.js";
|
|
11
|
-
import '../assets/Select.CghDnBUQ.css';const Te = "ds-select_root_1c9y3_1", Oe = "ds-select_hint_1c9y3_10", Ze = "ds-select_label_1c9y3_10", Je = "ds-select_label--hidden_1c9y3_100", Ke = "ds-select_label--disabled_1c9y3_113", Qe = "ds-select_feedback_1c9y3_133", Ue = "ds-select_select-wrapper_1c9y3_138", Xe = "ds-select_select_1c9y3_138", Ye = "ds-select_select--small_1c9y3_152", Ge = "ds-select_select--invalid_1c9y3_264", el = "ds-select_select--placeholder_1c9y3_379", ll = "ds-select_chevron_1c9y3_418", tl = "ds-select_chevron--small_1c9y3_422", sl = "ds-select_chevron--disabled_1c9y3_425", t = {
|
|
12
|
-
root: Te,
|
|
13
|
-
hint: Oe,
|
|
14
|
-
label: Ze,
|
|
15
|
-
labelHidden: Je,
|
|
16
|
-
labelDisabled: Ke,
|
|
17
|
-
feedback: Qe,
|
|
18
|
-
selectWrapper: Ue,
|
|
19
|
-
select: Xe,
|
|
20
|
-
selectSmall: Ye,
|
|
21
|
-
selectInvalid: Ge,
|
|
22
|
-
selectPlaceholder: el,
|
|
23
|
-
chevron: ll,
|
|
24
|
-
chevronSmall: tl,
|
|
25
|
-
chevronDisabled: sl
|
|
26
|
-
}, _l = ["medium", "small"], al = ({
|
|
27
|
-
id: n,
|
|
28
|
-
label: s,
|
|
29
|
-
options: e
|
|
30
|
-
}) => {
|
|
31
|
-
if (!n)
|
|
32
|
-
throw new Error(pe("DSSelect", 'A unique "id" prop is required. Please add a unique "id" prop to the DSSelect component.'));
|
|
33
|
-
if (!s)
|
|
34
|
-
throw new Error(pe("DSSelect", `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}.`));
|
|
35
|
-
if (Array.isArray(e)) {
|
|
36
|
-
if (e.length === 0)
|
|
37
|
-
throw new Error(pe("DSSelect", "The options array must not be empty."));
|
|
38
|
-
} else throw new Error(pe("DSSelect", Me("options", "DSSelect")));
|
|
39
|
-
}, cl = (n, s, e) => n === "" || s !== void 0 && s !== "" ? !1 : !(e !== void 0 && e !== ""), ol = Be((n, s) => {
|
|
40
|
-
const e = xe.c(127);
|
|
41
|
-
let i, d, r, l, f, b, S, D, a, Z, J, K, Q, U, X, o;
|
|
42
|
-
e[0] !== n ? ({
|
|
43
|
-
id: l,
|
|
44
|
-
label: f,
|
|
45
|
-
options: S,
|
|
46
|
-
className: i,
|
|
47
|
-
defaultValue: d,
|
|
48
|
-
disabled: Z,
|
|
49
|
-
hideLabel: J,
|
|
50
|
-
hint: r,
|
|
51
|
-
invalid: K,
|
|
52
|
-
placeholder: Q,
|
|
53
|
-
required: U,
|
|
54
|
-
size: X,
|
|
55
|
-
systemFeedback: a,
|
|
56
|
-
value: o,
|
|
57
|
-
onChange: b,
|
|
58
|
-
...D
|
|
59
|
-
} = n, e[0] = n, e[1] = i, e[2] = d, e[3] = r, e[4] = l, e[5] = f, e[6] = b, e[7] = S, e[8] = D, e[9] = a, e[10] = Z, e[11] = J, e[12] = K, e[13] = Q, e[14] = U, e[15] = X, e[16] = o) : (i = e[1], d = e[2], r = e[3], l = e[4], f = e[5], b = e[6], S = e[7], D = e[8], a = e[9], Z = e[10], J = e[11], K = e[12], Q = e[13], U = e[14], X = e[15], o = e[16]);
|
|
60
|
-
const h = Z === void 0 ? !1 : Z, Pe = J === void 0 ? !1 : J, c = K === void 0 ? !1 : K, y = Q === void 0 ? "Select" : Q, g = U === void 0 ? !1 : U, le = X === void 0 ? "medium" : X;
|
|
61
|
-
process.env.NODE_ENV !== "production" && al({
|
|
62
|
-
id: l,
|
|
63
|
-
label: f,
|
|
64
|
-
options: S
|
|
65
|
-
});
|
|
66
|
-
const qe = Fe(null), [ue, Ne] = Ie(o);
|
|
67
|
-
let te;
|
|
68
|
-
e[17] !== d || e[18] !== y || e[19] !== o ? (te = cl(y, d, o), e[17] = d, e[18] = y, e[19] = o, e[20] = te) : te = e[20];
|
|
69
|
-
const [Y, Ce] = Ie(te);
|
|
70
|
-
let se, ae;
|
|
71
|
-
e[21] !== o ? (se = () => {
|
|
72
|
-
Ne(o);
|
|
73
|
-
}, ae = [o], e[21] = o, e[22] = se, e[23] = ae) : (se = e[22], ae = e[23]), He(se, ae);
|
|
74
|
-
let ce;
|
|
75
|
-
e[24] !== s ? (ce = (ee) => {
|
|
76
|
-
qe.current = ee, typeof s == "function" ? s(ee) : s && (s.current = ee);
|
|
77
|
-
}, e[24] = s, e[25] = ce) : ce = e[25];
|
|
78
|
-
const _e = ce, G = Re(Pe), w = `${l}-label`, m = `${l}-feedback`, N = `${l}-hint`, ve = r ? ` ${N}` : "";
|
|
79
|
-
let oe;
|
|
80
|
-
e[26] !== c || e[27] !== a || e[28] !== m ? (oe = [c && a && m].filter(Boolean).join(" ") || void 0, e[26] = c, e[27] = a, e[28] = m, e[29] = oe) : oe = e[29];
|
|
81
|
-
const Se = oe;
|
|
82
|
-
let k, E, I, P, q, C, $, L, V, A, x, B, F, H, R, j, p, u, _;
|
|
83
|
-
if (e[30] !== Se || e[31] !== ve || e[32] !== i || e[33] !== d || e[34] !== h || e[35] !== _e || e[36] !== G || e[37] !== r || e[38] !== N || e[39] !== l || e[40] !== c || e[41] !== Y || e[42] !== f || e[43] !== b || e[44] !== S || e[45] !== y || e[46] !== g || e[47] !== D || e[48] !== w || e[49] !== ue || e[50] !== le || e[51] !== a || e[52] !== m) {
|
|
84
|
-
const ee = (he) => [y && /* @__PURE__ */ v("option", { value: "", children: y }, `${l}-hidden-option-disabled-placeholder`), ...he.map((O) => {
|
|
85
|
-
if ("options" in O) {
|
|
86
|
-
const {
|
|
87
|
-
label: Ee,
|
|
88
|
-
options: Ae
|
|
89
|
-
} = O;
|
|
90
|
-
return /* @__PURE__ */ v("optgroup", { label: Ee, children: Ae.map(ke) }, Ee);
|
|
91
|
-
} else
|
|
92
|
-
return ke(O);
|
|
93
|
-
})], ke = il;
|
|
94
|
-
let re;
|
|
95
|
-
e[72] !== i ? (re = me(t.root, i), e[72] = i, e[73] = re) : re = e[73];
|
|
96
|
-
const $e = re, ye = le === "small";
|
|
97
|
-
let ne;
|
|
98
|
-
e[74] !== c || e[75] !== Y || e[76] !== ye ? (ne = me(t.select, {
|
|
99
|
-
[t.selectSmall]: ye,
|
|
100
|
-
[t.selectInvalid]: c,
|
|
101
|
-
[t.selectPlaceholder]: Y
|
|
102
|
-
}), e[74] = c, e[75] = Y, e[76] = ye, e[77] = ne) : ne = e[77];
|
|
103
|
-
const Le = ne;
|
|
104
|
-
let de;
|
|
105
|
-
e[78] !== h || e[79] !== G ? (de = me(t.label, {
|
|
106
|
-
[t.labelHidden]: G,
|
|
107
|
-
[t.labelDisabled]: h
|
|
108
|
-
}), e[78] = h, e[79] = G, e[80] = de) : de = e[80];
|
|
109
|
-
const De = de, ge = le === "small";
|
|
110
|
-
let fe;
|
|
111
|
-
e[81] !== h || e[82] !== ge ? (fe = me(t.chevron, {
|
|
112
|
-
[t.chevronSmall]: ge,
|
|
113
|
-
[t.chevronDisabled]: h
|
|
114
|
-
}), e[81] = h, e[82] = ge, e[83] = fe) : fe = e[83], k = fe;
|
|
115
|
-
let be;
|
|
116
|
-
e[84] !== b ? (be = (he) => {
|
|
117
|
-
const {
|
|
118
|
-
value: O
|
|
119
|
-
} = he.target;
|
|
120
|
-
Ce(O === ""), Ne(O), b && b(he);
|
|
121
|
-
}, e[84] = b, e[85] = be) : be = e[85];
|
|
122
|
-
const Ve = be;
|
|
123
|
-
j = $e;
|
|
124
|
-
let T;
|
|
125
|
-
e[86] !== g ? (T = g && /* @__PURE__ */ v(je, {}), e[86] = g, e[87] = T) : T = e[87], e[88] !== l || e[89] !== f || e[90] !== De || e[91] !== w || e[92] !== T ? (p = /* @__PURE__ */ we("label", { className: De, id: w, htmlFor: l, children: [
|
|
126
|
-
f,
|
|
127
|
-
T
|
|
128
|
-
] }), e[88] = l, e[89] = f, e[90] = De, e[91] = w, e[92] = T, e[93] = p) : p = e[93], e[94] !== r || e[95] !== N ? (u = r && /* @__PURE__ */ v("div", { className: t.hint, id: N, children: r }), e[94] = r, e[95] = N, e[96] = u) : u = e[96], e[97] !== c || e[98] !== a || e[99] !== m ? (_ = c && a && /* @__PURE__ */ v(ze, { className: t.feedback, message: a, type: "invalid", id: m, "aria-live": "assertive" }), e[97] = c, e[98] = a, e[99] = m, e[100] = _) : _ = e[100], R = t.selectWrapper, E = D, I = l, P = _e, q = Le, C = `${w}${ve}`, $ = Se, L = c, V = d, A = ue, x = h, B = g, F = Ve, H = ee(S), e[30] = Se, e[31] = ve, e[32] = i, e[33] = d, e[34] = h, e[35] = _e, e[36] = G, e[37] = r, e[38] = N, e[39] = l, e[40] = c, e[41] = Y, e[42] = f, e[43] = b, e[44] = S, e[45] = y, e[46] = g, e[47] = D, e[48] = w, e[49] = ue, e[50] = le, e[51] = a, e[52] = m, e[53] = k, e[54] = E, e[55] = I, e[56] = P, e[57] = q, e[58] = C, e[59] = $, e[60] = L, e[61] = V, e[62] = A, e[63] = x, e[64] = B, e[65] = F, e[66] = H, e[67] = R, e[68] = j, e[69] = p, e[70] = u, e[71] = _;
|
|
129
|
-
} else
|
|
130
|
-
k = e[53], E = e[54], I = e[55], P = e[56], q = e[57], C = e[58], $ = e[59], L = e[60], V = e[61], A = e[62], x = e[63], B = e[64], F = e[65], H = e[66], R = e[67], j = e[68], p = e[69], u = e[70], _ = e[71];
|
|
131
|
-
let W;
|
|
132
|
-
e[101] !== E || e[102] !== I || e[103] !== P || e[104] !== q || e[105] !== C || e[106] !== $ || e[107] !== L || e[108] !== V || e[109] !== A || e[110] !== x || e[111] !== B || e[112] !== F || e[113] !== H ? (W = /* @__PURE__ */ v("select", { ...E, id: I, ref: P, className: q, "aria-labelledby": C, "aria-describedby": $, "aria-invalid": L, defaultValue: V, value: A, disabled: x, required: B, onChange: F, children: H }), e[101] = E, e[102] = I, e[103] = P, e[104] = q, e[105] = C, e[106] = $, e[107] = L, e[108] = V, e[109] = A, e[110] = x, e[111] = B, e[112] = F, e[113] = H, e[114] = W) : W = e[114];
|
|
133
|
-
let z;
|
|
134
|
-
e[115] !== k ? (z = /* @__PURE__ */ v(We, { name: "chevron-down", className: k, "aria-hidden": "true" }), e[115] = k, e[116] = z) : z = e[116];
|
|
135
|
-
let M;
|
|
136
|
-
e[117] !== R || e[118] !== W || e[119] !== z ? (M = /* @__PURE__ */ we("div", { className: R, children: [
|
|
137
|
-
W,
|
|
138
|
-
z
|
|
139
|
-
] }), e[117] = R, e[118] = W, e[119] = z, e[120] = M) : M = e[120];
|
|
140
|
-
let ie;
|
|
141
|
-
return e[121] !== j || e[122] !== p || e[123] !== u || e[124] !== _ || e[125] !== M ? (ie = /* @__PURE__ */ we("div", { className: j, children: [
|
|
142
|
-
p,
|
|
143
|
-
u,
|
|
144
|
-
_,
|
|
145
|
-
M
|
|
146
|
-
] }), e[121] = j, e[122] = p, e[123] = u, e[124] = _, e[125] = M, e[126] = ie) : ie = e[126], ie;
|
|
147
|
-
});
|
|
148
|
-
ol.displayName = "DSSelect";
|
|
149
|
-
function il(n) {
|
|
150
|
-
const {
|
|
151
|
-
label: s,
|
|
152
|
-
value: e,
|
|
153
|
-
isDisabled: i
|
|
154
|
-
} = n;
|
|
155
|
-
return /* @__PURE__ */ v("option", { value: e, disabled: i, children: s }, e);
|
|
156
|
-
}
|
|
157
|
-
export {
|
|
158
|
-
ol as D,
|
|
159
|
-
_l as S,
|
|
160
|
-
cl as g,
|
|
161
|
-
al as v
|
|
162
|
-
};
|
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as b, jsxs as Se } from "react/jsx-runtime";
|
|
3
|
-
import { d as nt } from "./index.CgTHIF3K.js";
|
|
4
|
-
import { c as T } from "./index.CEyLAtio.js";
|
|
5
|
-
import { forwardRef as ot, useState as Xe, useRef as ct } from "react";
|
|
6
|
-
import { u as dt } from "./useBreakpoint.CMOR9ZOB.js";
|
|
7
|
-
import { DSInput as ut } from "../input.DhxUW3zc.js";
|
|
8
|
-
import { g as Je } from "./helpers.BbWkXTr3.js";
|
|
9
|
-
import '../assets/Slider.C8i4U4iT.css';const pt = "ds-slider_root_84q0h_1", mt = "ds-slider_hint_84q0h_10", bt = "ds-slider_label_84q0h_10", ht = "ds-slider_number-input_84q0h_13", ft = "ds-slider_label-hint-input-wrapper_84q0h_17", _t = "ds-slider_label--hidden_84q0h_37", Tt = "ds-slider_label--disabled_84q0h_50", xt = "ds-slider_number-input--small_84q0h_79", vt = "ds-slider_min-max-label-wrapper_84q0h_84", gt = "ds-slider_min-max-label-wrapper--disabled_84q0h_98", kt = "ds-slider_min-label_84q0h_103", Nt = "ds-slider_max-label_84q0h_107", St = "ds-slider_slider-wrapper_84q0h_111", yt = "ds-slider_slider_84q0h_111", Dt = "ds-slider_value-tooltip_84q0h_135", It = "ds-slider_proxy-thumb_84q0h_139", qt = "ds-slider_proxy-thumb--disabled_84q0h_206", Mt = "ds-slider_custom-track_84q0h_235", Lt = "ds-slider_custom-track--progress_84q0h_240", Vt = "ds-slider_custom-track--runnable_84q0h_252", wt = "ds-slider_custom-track--disabled_84q0h_266", Ct = "ds-slider_tick-wrapper_84q0h_286", Wt = "ds-slider_tick_84q0h_286", $t = "ds-slider_value-tooltip--visible_84q0h_358", Pt = "ds-slider_value-tooltip--disabled_84q0h_361", a = {
|
|
10
|
-
root: pt,
|
|
11
|
-
hint: mt,
|
|
12
|
-
label: bt,
|
|
13
|
-
numberInput: ht,
|
|
14
|
-
labelHintInputWrapper: ft,
|
|
15
|
-
labelHidden: _t,
|
|
16
|
-
labelDisabled: Tt,
|
|
17
|
-
numberInputSmall: xt,
|
|
18
|
-
minMaxLabelWrapper: vt,
|
|
19
|
-
minMaxLabelWrapperDisabled: gt,
|
|
20
|
-
minLabel: kt,
|
|
21
|
-
maxLabel: Nt,
|
|
22
|
-
sliderWrapper: St,
|
|
23
|
-
slider: yt,
|
|
24
|
-
valueTooltip: Dt,
|
|
25
|
-
proxyThumb: It,
|
|
26
|
-
proxyThumbDisabled: qt,
|
|
27
|
-
customTrack: Mt,
|
|
28
|
-
customTrackProgress: Lt,
|
|
29
|
-
customTrackRunnable: Vt,
|
|
30
|
-
customTrackDisabled: wt,
|
|
31
|
-
tickWrapper: Ct,
|
|
32
|
-
tick: Wt,
|
|
33
|
-
valueTooltipVisible: $t,
|
|
34
|
-
valueTooltipDisabled: Pt
|
|
35
|
-
}, At = 11, Qe = 4, Ye = (p) => p.toString().length, Et = (p, r, e) => {
|
|
36
|
-
if (r === 0)
|
|
37
|
-
return !0;
|
|
38
|
-
const m = 1e-10, n = (p - e) / r;
|
|
39
|
-
return Math.abs(Math.round(n) - n) < m;
|
|
40
|
-
}, Rt = (p, r, e, m) => {
|
|
41
|
-
var o;
|
|
42
|
-
const n = parseFloat(r), h = e, c = Math.round((p - h) / n);
|
|
43
|
-
let d = h + c * n;
|
|
44
|
-
d = Math.min(Math.max(d, e), m);
|
|
45
|
-
const v = ((o = n.toString().split(".")[1]) == null ? void 0 : o.length) || 0;
|
|
46
|
-
return parseFloat(d.toFixed(v));
|
|
47
|
-
}, Ft = (p, r, e) => {
|
|
48
|
-
const m = (p - r) / (e - r) * 100, n = `calc(-0.24 * ${m}px + 10px)`;
|
|
49
|
-
return `calc(${m}% + ${n})`;
|
|
50
|
-
}, Ht = ({
|
|
51
|
-
id: p,
|
|
52
|
-
label: r
|
|
53
|
-
}) => {
|
|
54
|
-
if (!p)
|
|
55
|
-
throw new Error(Je("DSSlider", 'A unique "id" prop is required. Please add a unique "id" prop to the DSSlider component.'));
|
|
56
|
-
if (!r)
|
|
57
|
-
throw new Error(Je("DSSlider", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSSlider component. If you don't want to display a label, set hideLabel={true}.`));
|
|
58
|
-
}, Bt = ot((p, r) => {
|
|
59
|
-
const e = nt.c(154);
|
|
60
|
-
let m, n, h, c, d, v, o, S, U, G, X, J, Q, Y, Z, g;
|
|
61
|
-
e[0] !== p ? ({
|
|
62
|
-
id: c,
|
|
63
|
-
label: d,
|
|
64
|
-
className: m,
|
|
65
|
-
defaultValue: n,
|
|
66
|
-
disabled: U,
|
|
67
|
-
hideLabel: G,
|
|
68
|
-
hideNumberInput: X,
|
|
69
|
-
hint: h,
|
|
70
|
-
isTooltipAlwaysVisible: J,
|
|
71
|
-
max: Q,
|
|
72
|
-
min: Y,
|
|
73
|
-
numberInputProps: v,
|
|
74
|
-
step: Z,
|
|
75
|
-
value: g,
|
|
76
|
-
onChange: o,
|
|
77
|
-
...S
|
|
78
|
-
} = p, e[0] = p, e[1] = m, e[2] = n, e[3] = h, e[4] = c, e[5] = d, e[6] = v, e[7] = o, e[8] = S, e[9] = U, e[10] = G, e[11] = X, e[12] = J, e[13] = Q, e[14] = Y, e[15] = Z, e[16] = g) : (m = e[1], n = e[2], h = e[3], c = e[4], d = e[5], v = e[6], o = e[7], S = e[8], U = e[9], G = e[10], X = e[11], J = e[12], Q = e[13], Y = e[14], Z = e[15], g = e[16]);
|
|
79
|
-
const l = U === void 0 ? !1 : U, Ze = G === void 0 ? !1 : G, y = X === void 0 ? !1 : X, ye = J === void 0 ? !1 : J, et = Q === void 0 ? 100 : Q, tt = Y === void 0 ? 0 : Y, ee = Z === void 0 ? 1 : Z;
|
|
80
|
-
process.env.NODE_ENV !== "production" && Ht({
|
|
81
|
-
id: c,
|
|
82
|
-
label: d
|
|
83
|
-
});
|
|
84
|
-
const i = Number(et), t = Number(tt), u = Number(ee), De = dt(Ze), D = `${c}-label`, Ie = `${c}-hint`, qe = `${c}-number-input`;
|
|
85
|
-
let se;
|
|
86
|
-
e[17] !== n || e[18] !== t || e[19] !== g ? (se = g || n || t.toString() || "0", e[17] = n, e[18] = t, e[19] = g, e[20] = se) : se = e[20];
|
|
87
|
-
const [I, le] = Xe(se), [x, ae] = Xe(g || n || t || 0), st = ct(null);
|
|
88
|
-
let ie;
|
|
89
|
-
e[21] !== r ? (ie = (s) => {
|
|
90
|
-
st.current = s, typeof r == "function" ? r(s) : r && (r.current = s);
|
|
91
|
-
}, e[21] = r, e[22] = ie) : ie = e[22];
|
|
92
|
-
const Me = ie;
|
|
93
|
-
let re;
|
|
94
|
-
e[23] !== v ? (re = v || {}, e[23] = v, e[24] = re) : re = e[24];
|
|
95
|
-
const {
|
|
96
|
-
size: Ge,
|
|
97
|
-
suffix: Le
|
|
98
|
-
} = re, ne = Ge === void 0 ? "medium" : Ge;
|
|
99
|
-
let oe;
|
|
100
|
-
e[25] !== o ? (oe = (s) => {
|
|
101
|
-
const f = parseFloat(s.target.value);
|
|
102
|
-
ae(f), le(s.target.value), o && o(s);
|
|
103
|
-
}, e[25] = o, e[26] = oe) : oe = e[26];
|
|
104
|
-
const Ve = oe;
|
|
105
|
-
let ce;
|
|
106
|
-
e[27] === Symbol.for("react.memo_cache_sentinel") ? (ce = (s) => {
|
|
107
|
-
const f = s.target.value;
|
|
108
|
-
if (le(f), /^-?\d+(\.\d+)?$/.test(f)) {
|
|
109
|
-
const _ = parseFloat(f);
|
|
110
|
-
Number.isNaN(_) || ae(_);
|
|
111
|
-
}
|
|
112
|
-
}, e[27] = ce) : ce = e[27];
|
|
113
|
-
const lt = ce;
|
|
114
|
-
let k;
|
|
115
|
-
if (e[28] !== I || e[29] !== o || e[30] !== i || e[31] !== t || e[32] !== ee) {
|
|
116
|
-
k = (f) => {
|
|
117
|
-
const te = parseFloat(I);
|
|
118
|
-
if (Number.isNaN(te)) {
|
|
119
|
-
s(f);
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
let _ = Math.min(Math.max(te, t), i);
|
|
123
|
-
Et(_, parseFloat(ee), t) || (_ = Rt(_, ee, t, i)), le(_.toString()), ae(_), o && o(f);
|
|
124
|
-
};
|
|
125
|
-
const s = (f) => {
|
|
126
|
-
le(t.toString()), ae(t), o && o(f);
|
|
127
|
-
};
|
|
128
|
-
e[28] = I, e[29] = o, e[30] = i, e[31] = t, e[32] = ee, e[33] = k;
|
|
129
|
-
} else
|
|
130
|
-
k = e[33];
|
|
131
|
-
const q = (u === 0 ? !1 : (i - t) / u <= At) && (i - t) / u || 0;
|
|
132
|
-
let de;
|
|
133
|
-
if (e[34] !== i || e[35] !== t || e[36] !== u || e[37] !== q) {
|
|
134
|
-
let s;
|
|
135
|
-
e[39] !== i || e[40] !== t || e[41] !== u ? (s = (f, te) => {
|
|
136
|
-
const _ = t + te * u, rt = Ft(_, t, i);
|
|
137
|
-
return /* @__PURE__ */ b("span", { className: a.tick, style: {
|
|
138
|
-
left: rt
|
|
139
|
-
} }, _);
|
|
140
|
-
}, e[39] = i, e[40] = t, e[41] = u, e[42] = s) : s = e[42], de = Array.from({
|
|
141
|
-
length: q + 1
|
|
142
|
-
}, s), e[34] = i, e[35] = t, e[36] = u, e[37] = q, e[38] = de;
|
|
143
|
-
} else
|
|
144
|
-
de = e[38];
|
|
145
|
-
const we = de;
|
|
146
|
-
let ue;
|
|
147
|
-
e[43] !== i || e[44] !== t || e[45] !== x ? (ue = () => {
|
|
148
|
-
if (t === i)
|
|
149
|
-
throw new Error("Min and max values cannot be the same.");
|
|
150
|
-
const s = (x - t) / (i - t) * 100;
|
|
151
|
-
return Math.max(0, Math.min(s, 100));
|
|
152
|
-
}, e[43] = i, e[44] = t, e[45] = x, e[46] = ue) : ue = e[46];
|
|
153
|
-
const N = ue;
|
|
154
|
-
let pe;
|
|
155
|
-
e[47] !== N ? (pe = () => {
|
|
156
|
-
const s = N();
|
|
157
|
-
return s < 50 ? `calc(${s}% + 4px)` : `calc(${s}% - 4px)`;
|
|
158
|
-
}, e[47] = N, e[48] = pe) : pe = e[48];
|
|
159
|
-
const at = pe;
|
|
160
|
-
let me;
|
|
161
|
-
e[49] !== N ? (me = () => {
|
|
162
|
-
const s = 100 - N();
|
|
163
|
-
return s < 50 ? `calc(${s}% + 4px)` : `calc(${s}% - 4px)`;
|
|
164
|
-
}, e[49] = N, e[50] = me) : me = e[50];
|
|
165
|
-
const it = me;
|
|
166
|
-
let be;
|
|
167
|
-
e[51] !== m ? (be = T(a.slider, m), e[51] = m, e[52] = be) : be = e[52];
|
|
168
|
-
const Ce = be;
|
|
169
|
-
let he;
|
|
170
|
-
e[53] !== l || e[54] !== De ? (he = T(a.label, {
|
|
171
|
-
[a.labelHidden]: De,
|
|
172
|
-
[a.labelDisabled]: l
|
|
173
|
-
}), e[53] = l, e[54] = De, e[55] = he) : he = e[55];
|
|
174
|
-
const We = he, $e = ne === "small";
|
|
175
|
-
let fe;
|
|
176
|
-
e[56] !== $e ? (fe = T(a.numberInput, {
|
|
177
|
-
[a.numberInputSmall]: $e
|
|
178
|
-
}), e[56] = $e, e[57] = fe) : fe = e[57];
|
|
179
|
-
const Pe = fe;
|
|
180
|
-
let _e;
|
|
181
|
-
e[58] !== l ? (_e = T(a.minMaxLabelWrapper, {
|
|
182
|
-
[a.minMaxLabelWrapperDisabled]: l
|
|
183
|
-
}), e[58] = l, e[59] = _e) : _e = e[59];
|
|
184
|
-
const Ae = _e;
|
|
185
|
-
let Te;
|
|
186
|
-
e[60] !== l ? (Te = T(a.customTrack, a.customTrackProgress, {
|
|
187
|
-
[a.customTrackDisabled]: l
|
|
188
|
-
}), e[60] = l, e[61] = Te) : Te = e[61];
|
|
189
|
-
const Ee = Te;
|
|
190
|
-
let xe;
|
|
191
|
-
e[62] !== l ? (xe = T(a.customTrack, a.customTrackRunnable, {
|
|
192
|
-
[a.customTrackDisabled]: l
|
|
193
|
-
}), e[62] = l, e[63] = xe) : xe = e[63];
|
|
194
|
-
const Re = xe;
|
|
195
|
-
let ve;
|
|
196
|
-
e[64] !== l ? (ve = T(a.proxyThumb, {
|
|
197
|
-
[a.proxyThumbDisabled]: l
|
|
198
|
-
}), e[64] = l, e[65] = ve) : ve = e[65];
|
|
199
|
-
const Fe = ve;
|
|
200
|
-
let ge;
|
|
201
|
-
e[66] !== l || e[67] !== ye ? (ge = T(a.valueTooltip, {
|
|
202
|
-
[a.valueTooltipVisible]: ye,
|
|
203
|
-
[a.valueTooltipDisabled]: l
|
|
204
|
-
}), e[66] = l, e[67] = ye, e[68] = ge) : ge = e[68];
|
|
205
|
-
const He = ge;
|
|
206
|
-
let M;
|
|
207
|
-
e[69] !== c || e[70] !== d || e[71] !== We || e[72] !== D ? (M = /* @__PURE__ */ b("label", { className: We, htmlFor: c, id: D, children: d }), e[69] = c, e[70] = d, e[71] = We, e[72] = D, e[73] = M) : M = e[73];
|
|
208
|
-
let L;
|
|
209
|
-
e[74] !== h || e[75] !== Ie ? (L = h && /* @__PURE__ */ b("div", { className: a.hint, id: Ie, children: h }), e[74] = h, e[75] = Ie, e[76] = L) : L = e[76];
|
|
210
|
-
let V;
|
|
211
|
-
e[77] !== l || e[78] !== k || e[79] !== y || e[80] !== qe || e[81] !== I || e[82] !== d || e[83] !== Pe || e[84] !== ne || e[85] !== Le || e[86] !== i || e[87] !== t || e[88] !== u ? (V = !y && /* @__PURE__ */ b(ut, { id: qe, className: Pe, type: "number", min: t, max: i, step: u, inputMode: "decimal", autoComplete: "off", disabled: l, hideLabel: !0, value: I, onChange: lt, onBlur: k, onKeyDown: (s) => {
|
|
212
|
-
s.key === "Enter" && (s.preventDefault(), k(s));
|
|
213
|
-
}, label: d, size: ne, suffix: Le }), e[77] = l, e[78] = k, e[79] = y, e[80] = qe, e[81] = I, e[82] = d, e[83] = Pe, e[84] = ne, e[85] = Le, e[86] = i, e[87] = t, e[88] = u, e[89] = V) : V = e[89];
|
|
214
|
-
let w;
|
|
215
|
-
e[90] !== M || e[91] !== L || e[92] !== V ? (w = /* @__PURE__ */ Se("div", { className: a.labelHintInputWrapper, children: [
|
|
216
|
-
M,
|
|
217
|
-
L,
|
|
218
|
-
V
|
|
219
|
-
] }), e[90] = M, e[91] = L, e[92] = V, e[93] = w) : w = e[93];
|
|
220
|
-
const Be = Ye(t) < Qe;
|
|
221
|
-
let C;
|
|
222
|
-
e[94] !== Be ? (C = T({
|
|
223
|
-
[a.minLabel]: Be
|
|
224
|
-
}), e[94] = Be, e[95] = C) : C = e[95];
|
|
225
|
-
let W;
|
|
226
|
-
e[96] !== t || e[97] !== C ? (W = /* @__PURE__ */ b("div", { className: C, children: t }), e[96] = t, e[97] = C, e[98] = W) : W = e[98];
|
|
227
|
-
const Oe = Ye(i) < Qe;
|
|
228
|
-
let $;
|
|
229
|
-
e[99] !== Oe ? ($ = T({
|
|
230
|
-
[a.maxLabel]: Oe
|
|
231
|
-
}), e[99] = Oe, e[100] = $) : $ = e[100];
|
|
232
|
-
let P;
|
|
233
|
-
e[101] !== i || e[102] !== $ ? (P = /* @__PURE__ */ b("div", { className: $, children: i }), e[101] = i, e[102] = $, e[103] = P) : P = e[103];
|
|
234
|
-
let A;
|
|
235
|
-
e[104] !== Ae || e[105] !== W || e[106] !== P ? (A = /* @__PURE__ */ Se("div", { className: Ae, children: [
|
|
236
|
-
W,
|
|
237
|
-
P
|
|
238
|
-
] }), e[104] = Ae, e[105] = W, e[106] = P, e[107] = A) : A = e[107];
|
|
239
|
-
const ze = `${N()}`;
|
|
240
|
-
let ke;
|
|
241
|
-
e[108] !== ze ? (ke = {
|
|
242
|
-
"--ds-input-slider-thumb-position": ze
|
|
243
|
-
}, e[108] = ze, e[109] = ke) : ke = e[109];
|
|
244
|
-
const Ke = ke, je = at();
|
|
245
|
-
let E;
|
|
246
|
-
e[110] !== je ? (E = {
|
|
247
|
-
width: je
|
|
248
|
-
}, e[110] = je, e[111] = E) : E = e[111];
|
|
249
|
-
let R;
|
|
250
|
-
e[112] !== Ee || e[113] !== E ? (R = /* @__PURE__ */ b("div", { className: Ee, style: E }), e[112] = Ee, e[113] = E, e[114] = R) : R = e[114];
|
|
251
|
-
const Ue = it();
|
|
252
|
-
let F;
|
|
253
|
-
e[115] !== Ue ? (F = {
|
|
254
|
-
width: Ue
|
|
255
|
-
}, e[115] = Ue, e[116] = F) : F = e[116];
|
|
256
|
-
let H;
|
|
257
|
-
e[117] !== Re || e[118] !== F ? (H = /* @__PURE__ */ b("div", { className: Re, style: F }), e[117] = Re, e[118] = F, e[119] = H) : H = e[119];
|
|
258
|
-
let B;
|
|
259
|
-
e[120] !== l || e[121] !== Me || e[122] !== Ve || e[123] !== c || e[124] !== i || e[125] !== t || e[126] !== u || e[127] !== S || e[128] !== Ce || e[129] !== D || e[130] !== x ? (B = /* @__PURE__ */ b("input", { ...S, id: c, type: "range", ref: Me, className: Ce, min: t, max: i, step: u, value: x, disabled: l, "aria-labelledby": D, onChange: Ve }), e[120] = l, e[121] = Me, e[122] = Ve, e[123] = c, e[124] = i, e[125] = t, e[126] = u, e[127] = S, e[128] = Ce, e[129] = D, e[130] = x, e[131] = B) : B = e[131];
|
|
260
|
-
let O;
|
|
261
|
-
e[132] !== q || e[133] !== we ? (O = q > 0 && /* @__PURE__ */ b("div", { className: a.tickWrapper, children: we }), e[132] = q, e[133] = we, e[134] = O) : O = e[134];
|
|
262
|
-
let z;
|
|
263
|
-
e[135] !== Fe ? (z = /* @__PURE__ */ b("div", { className: Fe }), e[135] = Fe, e[136] = z) : z = e[136];
|
|
264
|
-
let K;
|
|
265
|
-
e[137] !== l || e[138] !== y || e[139] !== x || e[140] !== He ? (K = y && /* @__PURE__ */ b("div", { className: He, "aria-disabled": l, children: x }), e[137] = l, e[138] = y, e[139] = x, e[140] = He, e[141] = K) : K = e[141];
|
|
266
|
-
let j;
|
|
267
|
-
e[142] !== Ke || e[143] !== R || e[144] !== H || e[145] !== B || e[146] !== O || e[147] !== z || e[148] !== K ? (j = /* @__PURE__ */ Se("div", { className: a.sliderWrapper, style: Ke, children: [
|
|
268
|
-
R,
|
|
269
|
-
H,
|
|
270
|
-
B,
|
|
271
|
-
O,
|
|
272
|
-
z,
|
|
273
|
-
K
|
|
274
|
-
] }), e[142] = Ke, e[143] = R, e[144] = H, e[145] = B, e[146] = O, e[147] = z, e[148] = K, e[149] = j) : j = e[149];
|
|
275
|
-
let Ne;
|
|
276
|
-
return e[150] !== w || e[151] !== A || e[152] !== j ? (Ne = /* @__PURE__ */ Se("div", { className: a.root, children: [
|
|
277
|
-
w,
|
|
278
|
-
A,
|
|
279
|
-
j
|
|
280
|
-
] }), e[150] = w, e[151] = A, e[152] = j, e[153] = Ne) : Ne = e[153], Ne;
|
|
281
|
-
});
|
|
282
|
-
Bt.displayName = "DSSlider";
|
|
283
|
-
export {
|
|
284
|
-
Bt as D,
|
|
285
|
-
Qe as L,
|
|
286
|
-
At as M,
|
|
287
|
-
Ft as a,
|
|
288
|
-
Ye as g,
|
|
289
|
-
Et as i,
|
|
290
|
-
Rt as s,
|
|
291
|
-
Ht as v
|
|
292
|
-
};
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as d, jsx as p, Fragment as le } from "react/jsx-runtime";
|
|
3
|
-
import { c as A } from "./index.CEyLAtio.js";
|
|
4
|
-
import { forwardRef as ie, useState as i, useRef as ce, useEffect as m } from "react";
|
|
5
|
-
import { g as q, p as z } from "./helpers.BbWkXTr3.js";
|
|
6
|
-
import { u as de } from "./useBreakpoint.CMOR9ZOB.js";
|
|
7
|
-
import "./index.CgTHIF3K.js";
|
|
8
|
-
import { Asterisk as ue } from "../asterisk.CR60hx8S.js";
|
|
9
|
-
import { DSSystemFeedback as fe } from "../systemfeedback.CLQCbTF6.js";
|
|
10
|
-
import '../assets/Textarea.BgtH-TTe.css';const be = "ds-textarea_textarea_1y99f_1", _e = "ds-textarea_textarea--small_1y99f_9", he = "ds-textarea_textarea--invalid_1y99f_121", pe = "ds-textarea_textarea--resize-auto_1y99f_145", me = "ds-textarea_root_1y99f_155", xe = "ds-textarea_hint_1y99f_164", ye = "ds-textarea_label_1y99f_164", ve = "ds-textarea_label--hidden_1y99f_272", Ce = "ds-textarea_label--disabled_1y99f_285", Se = "ds-textarea_feedback_1y99f_305", Ae = "ds-textarea_char-count_1y99f_310", Ie = "ds-textarea_char-count-announcer_1y99f_326", a = {
|
|
11
|
-
textarea: be,
|
|
12
|
-
textareaSmall: _e,
|
|
13
|
-
textareaInvalid: he,
|
|
14
|
-
textareaResizeAuto: pe,
|
|
15
|
-
root: me,
|
|
16
|
-
hint: xe,
|
|
17
|
-
label: ye,
|
|
18
|
-
labelHidden: ve,
|
|
19
|
-
labelDisabled: Ce,
|
|
20
|
-
feedback: Se,
|
|
21
|
-
charCount: Ae,
|
|
22
|
-
charCountAnnouncer: Ie
|
|
23
|
-
}, Ve = ["medium", "small"], Te = ({
|
|
24
|
-
id: r,
|
|
25
|
-
label: u
|
|
26
|
-
}) => {
|
|
27
|
-
if (!r)
|
|
28
|
-
throw new Error(q("DSTextarea", 'A unique "id" prop is required. Please add a unique "id" prop to the DSTextarea component.'));
|
|
29
|
-
if (!u)
|
|
30
|
-
throw new Error(q("DSTextarea", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSTextarea component. If you don't want to display a label, set hideLabel={true}.`));
|
|
31
|
-
}, De = ie(({
|
|
32
|
-
id: r,
|
|
33
|
-
label: u,
|
|
34
|
-
charsLimitText: M = "Character limit reached",
|
|
35
|
-
charsRemainingText: O = "Characters remaining:",
|
|
36
|
-
className: F,
|
|
37
|
-
defaultValue: X,
|
|
38
|
-
disabled: I = !1,
|
|
39
|
-
hint: x,
|
|
40
|
-
hideLabel: Z = !1,
|
|
41
|
-
invalid: s = !1,
|
|
42
|
-
maxLength: e,
|
|
43
|
-
readonly: T = !1,
|
|
44
|
-
required: D = !1,
|
|
45
|
-
resize: f = "vertical",
|
|
46
|
-
size: G = "medium",
|
|
47
|
-
systemFeedback: n,
|
|
48
|
-
value: y,
|
|
49
|
-
wrapperClassName: J,
|
|
50
|
-
onChange: w,
|
|
51
|
-
onInput: R,
|
|
52
|
-
...K
|
|
53
|
-
}, b) => {
|
|
54
|
-
process.env.NODE_ENV !== "production" && Te({
|
|
55
|
-
id: r,
|
|
56
|
-
label: u
|
|
57
|
-
});
|
|
58
|
-
const [Q, N] = i(X || ""), [l, E] = i(0), [U, g] = i(0), [W, $] = i("off"), [k, v] = i(n), [C, S] = i(s), H = y !== void 0, _ = H ? y : Q, o = ce(null), Y = (t) => {
|
|
59
|
-
o.current = t, typeof b == "function" ? b(t) : b && (b.current = t);
|
|
60
|
-
}, L = de(Z);
|
|
61
|
-
m(() => {
|
|
62
|
-
if (!e || e <= 0)
|
|
63
|
-
return;
|
|
64
|
-
l >= e * 0.8 ? $("polite") : $("off");
|
|
65
|
-
const t = setTimeout(() => {
|
|
66
|
-
g(e - l || 0);
|
|
67
|
-
}, 1e3);
|
|
68
|
-
return () => clearTimeout(t);
|
|
69
|
-
}, [l]), m(() => {
|
|
70
|
-
N(_ || ""), c(), e && e > 0 && (E(_.toString().length || 0), g(e - _.toString().length || 0));
|
|
71
|
-
}, [y]), m(() => {
|
|
72
|
-
s && n ? (v(n), S(s)) : !s && e && e >= 0 && l >= e ? (S(!0), v(M)) : (v(n), S(s));
|
|
73
|
-
}, [s, C, n, l]), m(() => {
|
|
74
|
-
if (f === "auto")
|
|
75
|
-
return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
|
|
76
|
-
}, [f, o.current]);
|
|
77
|
-
const ee = A(a.root, J), te = A(a.textarea, F, {
|
|
78
|
-
// small textarea
|
|
79
|
-
[a.textareaSmall]: G === "small",
|
|
80
|
-
// invalid state
|
|
81
|
-
[a.textareaInvalid]: C,
|
|
82
|
-
// resize handling
|
|
83
|
-
[a.textareaResizeAuto]: f === "auto"
|
|
84
|
-
}), ae = A(a.label, {
|
|
85
|
-
// hide label only visually to keep them available for assistive technologies
|
|
86
|
-
[a.labelHidden]: L,
|
|
87
|
-
[a.labelDisabled]: I
|
|
88
|
-
}), V = `${r}-label`, P = `${r}-feedback`, j = `${r}-hint`, B = `${r}-char-count-announcer`, re = x ? ` ${j}` : "", c = () => {
|
|
89
|
-
if (o.current && f === "auto") {
|
|
90
|
-
o.current.style.height = "auto";
|
|
91
|
-
const t = z(o.current.scrollHeight), h = z(2);
|
|
92
|
-
o.current.style.height = `${// We need to add 2px (border-top & border-bottom) to the scrollHeight to prevent the textarea
|
|
93
|
-
// from jumping as soon as the user starts typing.
|
|
94
|
-
t + h}rem`;
|
|
95
|
-
}
|
|
96
|
-
}, se = () => {
|
|
97
|
-
const t = [];
|
|
98
|
-
return e && e > 0 && t.push(B), s && n && t.push(P), t.length > 0 ? t.join(" ") : void 0;
|
|
99
|
-
}, oe = (t) => {
|
|
100
|
-
var h;
|
|
101
|
-
R && R(t), e && e > 0 && E(((h = o.current) == null ? void 0 : h.value.length) || 0), c();
|
|
102
|
-
}, ne = (t) => {
|
|
103
|
-
w && w(t), H || N(t.target.value);
|
|
104
|
-
};
|
|
105
|
-
return /* @__PURE__ */ d("div", { className: ee, children: [
|
|
106
|
-
/* @__PURE__ */ d("label", { className: ae, id: V, htmlFor: r, children: [
|
|
107
|
-
u,
|
|
108
|
-
D && /* @__PURE__ */ p(ue, {})
|
|
109
|
-
] }),
|
|
110
|
-
x && /* @__PURE__ */ p("div", { className: a.hint, id: j, children: x }),
|
|
111
|
-
C && k && /* @__PURE__ */ p(fe, { className: a.feedback, message: k, type: "invalid", id: P }),
|
|
112
|
-
/* @__PURE__ */ p(
|
|
113
|
-
"textarea",
|
|
114
|
-
{
|
|
115
|
-
className: te,
|
|
116
|
-
id: r,
|
|
117
|
-
...K,
|
|
118
|
-
ref: Y,
|
|
119
|
-
"aria-labelledby": `${V}${re}`,
|
|
120
|
-
"aria-describedby": se(),
|
|
121
|
-
"aria-invalid": s,
|
|
122
|
-
"aria-disabled": T,
|
|
123
|
-
maxLength: e,
|
|
124
|
-
readOnly: T,
|
|
125
|
-
required: D,
|
|
126
|
-
disabled: I,
|
|
127
|
-
value: _,
|
|
128
|
-
defaultValue: void 0,
|
|
129
|
-
rows: void 0,
|
|
130
|
-
cols: void 0,
|
|
131
|
-
onChange: ne,
|
|
132
|
-
onInput: oe
|
|
133
|
-
}
|
|
134
|
-
),
|
|
135
|
-
e !== void 0 && e > 0 && /* @__PURE__ */ d(le, { children: [
|
|
136
|
-
/* @__PURE__ */ d("div", { className: a.charCount, "aria-hidden": "true", children: [
|
|
137
|
-
l,
|
|
138
|
-
"/",
|
|
139
|
-
e
|
|
140
|
-
] }),
|
|
141
|
-
/* @__PURE__ */ d(
|
|
142
|
-
"div",
|
|
143
|
-
{
|
|
144
|
-
className: a.charCountAnnouncer,
|
|
145
|
-
id: B,
|
|
146
|
-
"aria-live": W,
|
|
147
|
-
"aria-atomic": "true",
|
|
148
|
-
children: [
|
|
149
|
-
O,
|
|
150
|
-
" ",
|
|
151
|
-
U
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
)
|
|
155
|
-
] })
|
|
156
|
-
] });
|
|
157
|
-
});
|
|
158
|
-
De.displayName = "DSTextarea";
|
|
159
|
-
export {
|
|
160
|
-
De as D,
|
|
161
|
-
Ve as T,
|
|
162
|
-
Te as v
|
|
163
|
-
};
|
package/combobox.AaK6QjRl.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as S } from "react/jsx-runtime";
|
|
3
|
-
import { d as h } from "./chunks/index.CgTHIF3K.js";
|
|
4
|
-
import { v as q, c as L } from "./chunks/CustomReactSelect.BPnzhvw1.js";
|
|
5
|
-
import { forwardRef as R } from "react";
|
|
6
|
-
const j = R((b, x) => {
|
|
7
|
-
const o = h.c(28);
|
|
8
|
-
let l, e, t, s, i, n, a, d, c, r, m;
|
|
9
|
-
o[0] !== b ? ({
|
|
10
|
-
id: e,
|
|
11
|
-
label: t,
|
|
12
|
-
className: l,
|
|
13
|
-
disabled: i,
|
|
14
|
-
dropdownOnFocus: n,
|
|
15
|
-
hideLabel: a,
|
|
16
|
-
invalid: d,
|
|
17
|
-
lang: c,
|
|
18
|
-
required: r,
|
|
19
|
-
variant: m,
|
|
20
|
-
...s
|
|
21
|
-
} = b, o[0] = b, o[1] = l, o[2] = e, o[3] = t, o[4] = s, o[5] = i, o[6] = n, o[7] = a, o[8] = d, o[9] = c, o[10] = r, o[11] = m) : (l = o[1], e = o[2], t = o[3], s = o[4], i = o[5], n = o[6], a = o[7], d = o[8], c = o[9], r = o[10], m = o[11]);
|
|
22
|
-
const C = i === void 0 ? !1 : i, p = n === void 0 ? !1 : n, O = a === void 0 ? !1 : a, N = d === void 0 ? !1 : d, g = c === void 0 ? "en" : c, w = r === void 0 ? !1 : r, F = m === void 0 ? "single" : m;
|
|
23
|
-
if (process.env.NODE_ENV !== "production") {
|
|
24
|
-
const {
|
|
25
|
-
options: M
|
|
26
|
-
} = s;
|
|
27
|
-
q({
|
|
28
|
-
id: e,
|
|
29
|
-
label: t,
|
|
30
|
-
options: M
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
const v = F === "multi", D = !p || v;
|
|
34
|
-
let f;
|
|
35
|
-
o[12] !== l || o[13] !== C || o[14] !== p || o[15] !== O || o[16] !== e || o[17] !== N || o[18] !== v || o[19] !== t || o[20] !== g || o[21] !== x || o[22] !== w || o[23] !== s || o[24] !== D ? (f = {
|
|
36
|
-
id: e,
|
|
37
|
-
label: t,
|
|
38
|
-
className: l,
|
|
39
|
-
disabled: C,
|
|
40
|
-
hideLabel: O,
|
|
41
|
-
isMulti: v,
|
|
42
|
-
invalid: N,
|
|
43
|
-
lang: g,
|
|
44
|
-
openMenuOnClick: p,
|
|
45
|
-
openMenuOnFocus: p,
|
|
46
|
-
isClearable: D,
|
|
47
|
-
required: w,
|
|
48
|
-
ref: x,
|
|
49
|
-
...s
|
|
50
|
-
}, o[12] = l, o[13] = C, o[14] = p, o[15] = O, o[16] = e, o[17] = N, o[18] = v, o[19] = t, o[20] = g, o[21] = x, o[22] = w, o[23] = s, o[24] = D, o[25] = f) : f = o[25];
|
|
51
|
-
const E = f;
|
|
52
|
-
let u;
|
|
53
|
-
return o[26] !== E ? (u = /* @__PURE__ */ S(L, { ...E }), o[26] = E, o[27] = u) : u = o[27], u;
|
|
54
|
-
});
|
|
55
|
-
j.displayName = "DSCombobox";
|
|
56
|
-
export {
|
|
57
|
-
j as DSCombobox
|
|
58
|
-
};
|