@stihl-design-system/components 1.0.0-RC.26 → 1.0.0-RC.27
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/assets/CustomReactSelect.B9f_KYFg.css +1 -0
- package/assets/InputPassword.BuVQ9dRy.css +1 -0
- package/assets/InputSearch.Dwtb3Mhw.css +1 -0
- package/assets/InputStepper.CBt99L83.css +1 -0
- package/assets/Select.CghDnBUQ.css +1 -0
- package/assets/Textarea.BgtH-TTe.css +1 -0
- package/assets/banner.D9EiZqqR.css +1 -0
- package/assets/input.DFwunFjw.css +1 -0
- package/assets/radio.BCB51D_y.css +1 -0
- package/assets/scroller.Hszs1Yq4.css +1 -0
- package/banner.CgQdUb_c.js +55 -0
- package/banner.d.ts +2 -0
- package/chipgroup.BWpqUzXF.js +209 -0
- package/chunks/{CustomReactSelect.DWdh3k_q.js → CustomReactSelect.BPnzhvw1.js} +52 -49
- package/chunks/Header.Djs1adPW.js +361 -0
- package/chunks/InputPassword.D42uUEGy.js +136 -0
- package/chunks/InputSearch.aIbUXVQU.js +174 -0
- package/chunks/InputStepper.DFEdUWm7.js +263 -0
- package/chunks/{NavigationTabs.CuOXq0b7.js → NavigationTabs.BofhX8bD.js} +1 -1
- package/chunks/{RadioGroup.okEm_-NA.js → RadioGroup.c7YYJdUe.js} +1 -1
- package/chunks/{Select.D3IUIdPJ.js → Select.B_EHpk22.js} +22 -22
- package/chunks/{Slider.CPG4Btbq.js → Slider.DMSwmGwD.js} +1 -1
- package/chunks/{Tabs.C4qGWCcD.js → Tabs.Bl4K3Kjn.js} +1 -1
- package/chunks/{Textarea.D4vXRg_U.js → Textarea.Ce26v6ht.js} +53 -53
- package/chunks/is-animation-disabled.CUl4N3LI.js +20 -0
- package/{combobox.DIB07SNA.js → combobox.AaK6QjRl.js} +1 -1
- package/components/Banner/Banner.d.ts +32 -0
- package/components/Banner/Banner.utils.d.ts +2 -0
- package/components/Scroller/Scroller.d.ts +20 -0
- package/components/Scroller/Scroller.utils.d.ts +3 -0
- package/components/Tabs/TabList/TabList.d.ts +1 -1
- package/components/Tabs/TabList/TabList.utils.d.ts +0 -4
- package/{customreactselect.BvuvCDyE.js → customreactselect.Bu1i8wkh.js} +1 -1
- package/{header.DLrTpc-W.js → header.WhQHSuB1.js} +1 -1
- package/index.d.ts +4 -0
- package/index.es.js +202 -195
- package/{input.D4OiEI8g.js → input.DhxUW3zc.js} +35 -35
- package/{inputpassword.CYfGcUE-.js → inputpassword.CaJBCMA0.js} +1 -1
- package/{inputsearch.CecX8gHD.js → inputsearch.B06DhYzo.js} +1 -1
- package/{inputstepper.CFgfHjM_.js → inputstepper.DNY7nzP8.js} +1 -1
- package/{navigationtabs.B86G8ODY.js → navigationtabs.DQ1kE-h4.js} +2 -2
- package/package.json +2 -2
- package/partials/index.js +104 -82
- package/partials/lib/partials.d.ts +1 -1
- package/radio.Be4pFOLf.js +134 -0
- package/{radiogroup.C2PkTHnF.js → radiogroup.BRjwP01C.js} +2 -2
- package/scroller.CCA6kFR6.js +123 -0
- package/scroller.d.ts +2 -0
- package/{select.CmGQdpsV.js → select.3zE96eWc.js} +1 -1
- package/{slider.DGmVtnxs.js → slider.CTCf7Xdm.js} +2 -2
- package/tablist.Dzwe0_J4.js +256 -0
- package/{tabs.Dby_2Hyz.js → tabs.yudjJk9d.js} +2 -2
- package/{textarea.yOTo23Pd.js → textarea.B_3fPtmd.js} +1 -1
- package/{topbar.qNB9efbF.js → topbar.2b8fjmA4.js} +1 -1
- package/utils/get-rect.d.ts +4 -0
- package/utils/get-rect.test.d.ts +1 -0
- package/utils/index.d.ts +2 -1
- package/utils/is-animation-disabled.d.ts +14 -0
- package/utils/is-animation-disabled.test.d.ts +1 -0
- package/assets/CustomReactSelect.B8l6al4B.css +0 -1
- package/assets/InputPassword.CkHF5zCh.css +0 -1
- package/assets/InputSearch.BV8Q2EUL.css +0 -1
- package/assets/InputStepper.DzzrAdma.css +0 -1
- package/assets/Select.e1fTfWmm.css +0 -1
- package/assets/Textarea.BGV7Z0Z9.css +0 -1
- package/assets/input.Cj4tF_F7.css +0 -1
- package/assets/radio.CqaNn1Gz.css +0 -1
- package/chipgroup.Bp_v9IQu.js +0 -186
- package/chunks/Header.CsrzyVil.js +0 -356
- package/chunks/InputPassword.BQU09DJh.js +0 -136
- package/chunks/InputSearch.CXL9ThpX.js +0 -174
- package/chunks/InputStepper.BhLQVAlo.js +0 -263
- package/radio.Dm9bDBzM.js +0 -134
- package/tablist.CcCURua8.js +0 -266
- package/utils/isAnimationDisabled.d.ts +0 -1
- /package/components/{Tabs/TabList/TabList.utils.test.d.ts → Banner/Banner.test.d.ts} +0 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as S, jsxs as ft } from "react/jsx-runtime";
|
|
3
|
+
import { d as Bt } from "./index.CgTHIF3K.js";
|
|
4
|
+
import { c as L } from "./index.CEyLAtio.js";
|
|
5
|
+
import { forwardRef as wt, useState as ve, useRef as mt, useEffect as bt } from "react";
|
|
6
|
+
import { h as Lt } from "./has-window.ut_-aShB.js";
|
|
7
|
+
import { u as Et } from "./useBreakpoint.CMOR9ZOB.js";
|
|
8
|
+
import { u as vt } from "./useIsomorphicLayoutEffect.CnJ9AMFS.js";
|
|
9
|
+
import { Asterisk as Rt } from "../asterisk.CR60hx8S.js";
|
|
10
|
+
import { D as gt } from "./Button.CC0qEsuR.js";
|
|
11
|
+
import { M as _t, a as yt } from "./Input.utils.Cnnzvuk4.js";
|
|
12
|
+
import { DSSystemFeedback as Ct } from "../systemfeedback.CLQCbTF6.js";
|
|
13
|
+
import { g as Ge } from "./helpers.BbWkXTr3.js";
|
|
14
|
+
import '../assets/InputStepper.CBt99L83.css';const Ft = "ds-input-stepper_input_g8jky_1", Pt = "ds-input-stepper_input--small_g8jky_9", $t = "ds-input-stepper_input--invalid_g8jky_121", Ht = "ds-input-stepper_input--has-affix_g8jky_197", Vt = "ds-input-stepper_input--is-ready_g8jky_211", Tt = "ds-input-stepper_root_g8jky_222", qt = "ds-input-stepper_hint_g8jky_231", Wt = "ds-input-stepper_label_g8jky_231", Mt = "ds-input-stepper_wrapper_g8jky_235", Xt = "ds-input-stepper_affix_g8jky_241", zt = "ds-input-stepper_affix--small_g8jky_262", Gt = "ds-input-stepper_affix--disabled_g8jky_275", Ot = "ds-input-stepper_prefix_g8jky_283", Ut = "ds-input-stepper_affix--readonly_g8jky_286", Jt = "ds-input-stepper_suffix_g8jky_296", Kt = "ds-input-stepper_action-button_g8jky_303", Qt = "ds-input-stepper_label--hidden_g8jky_321", Yt = "ds-input-stepper_label--disabled_g8jky_334", Zt = "ds-input-stepper_feedback_g8jky_354", en = "ds-input-stepper_second-action-button_g8jky_368", tn = "ds-input-stepper_value-announcer_g8jky_372", t = {
|
|
15
|
+
input: Ft,
|
|
16
|
+
inputSmall: Pt,
|
|
17
|
+
inputInvalid: $t,
|
|
18
|
+
inputHasAffix: Ht,
|
|
19
|
+
inputIsReady: Vt,
|
|
20
|
+
root: Tt,
|
|
21
|
+
hint: qt,
|
|
22
|
+
label: Wt,
|
|
23
|
+
wrapper: Mt,
|
|
24
|
+
affix: Xt,
|
|
25
|
+
affixSmall: zt,
|
|
26
|
+
affixDisabled: Gt,
|
|
27
|
+
prefix: Ot,
|
|
28
|
+
affixReadonly: Ut,
|
|
29
|
+
suffix: Jt,
|
|
30
|
+
actionButton: Kt,
|
|
31
|
+
labelHidden: Qt,
|
|
32
|
+
labelDisabled: Yt,
|
|
33
|
+
feedback: Zt,
|
|
34
|
+
secondActionButton: en,
|
|
35
|
+
valueAnnouncer: tn
|
|
36
|
+
}, nn = ({
|
|
37
|
+
id: E,
|
|
38
|
+
label: k,
|
|
39
|
+
prefix: e,
|
|
40
|
+
suffix: p
|
|
41
|
+
}) => {
|
|
42
|
+
if (!E)
|
|
43
|
+
throw new Error(Ge("DSInputStepper", 'A unique "id" prop is required. Please add a unique "id" prop to the DSInputStepper component.'));
|
|
44
|
+
if (!k)
|
|
45
|
+
throw new Error(Ge("DSInputStepper", `A label is always required for a11y reasons. Please add a descriptive "label" prop to the DSInputStepper component. If you don't want to display a label, set hideLabel={true}.`));
|
|
46
|
+
e && e.length > _t && console.warn(Ge("DSInputStepper", `Prefix length must not exceed ${_t} characters.`)), p && p.length > yt && console.warn(Ge("DSInputStepper", `Suffix length must not exceed ${yt} characters.`));
|
|
47
|
+
}, sn = wt((E, k) => {
|
|
48
|
+
const e = Bt.c(187);
|
|
49
|
+
let p, R, m, s, C, b, _, l, I, i, d, te, ne, se, le, ie, ae, oe, re, ce, ue, y;
|
|
50
|
+
e[0] !== E ? ({
|
|
51
|
+
id: s,
|
|
52
|
+
label: b,
|
|
53
|
+
announcementText: te,
|
|
54
|
+
className: p,
|
|
55
|
+
disabled: se,
|
|
56
|
+
decreaseAmountButtonProps: R,
|
|
57
|
+
hint: m,
|
|
58
|
+
hideLabel: le,
|
|
59
|
+
invalid: ie,
|
|
60
|
+
increaseAmountButtonProps: C,
|
|
61
|
+
prefix: l,
|
|
62
|
+
max: ae,
|
|
63
|
+
min: oe,
|
|
64
|
+
readonly: re,
|
|
65
|
+
required: ce,
|
|
66
|
+
size: ue,
|
|
67
|
+
step: ne,
|
|
68
|
+
suffix: i,
|
|
69
|
+
systemFeedback: d,
|
|
70
|
+
value: y,
|
|
71
|
+
onChange: _,
|
|
72
|
+
...I
|
|
73
|
+
} = E, e[0] = E, e[1] = p, e[2] = R, e[3] = m, e[4] = s, e[5] = C, e[6] = b, e[7] = _, e[8] = l, e[9] = I, e[10] = i, e[11] = d, e[12] = te, e[13] = ne, e[14] = se, e[15] = le, e[16] = ie, e[17] = ae, e[18] = oe, e[19] = re, e[20] = ce, e[21] = ue, e[22] = y) : (p = e[1], R = e[2], m = e[3], s = e[4], C = e[5], b = e[6], _ = e[7], l = e[8], I = e[9], i = e[10], d = e[11], te = e[12], ne = e[13], se = e[14], le = e[15], ie = e[16], ae = e[17], oe = e[18], re = e[19], ce = e[20], ue = e[21], y = e[22]);
|
|
74
|
+
const de = te === void 0 ? "Value changed to" : te, c = se === void 0 ? !1 : se, xt = le === void 0 ? !1 : le, o = ie === void 0 ? !1 : ie, F = ae === void 0 ? 100 : ae, P = oe === void 0 ? 0 : oe, h = re === void 0 ? !1 : re, A = ce === void 0 ? !1 : ce, n = ue === void 0 ? "medium" : ue, pe = ne === void 0 ? 1 : ne;
|
|
75
|
+
process.env.NODE_ENV !== "production" && nn({
|
|
76
|
+
id: s,
|
|
77
|
+
label: b,
|
|
78
|
+
prefix: l,
|
|
79
|
+
suffix: i
|
|
80
|
+
});
|
|
81
|
+
let $;
|
|
82
|
+
e[23] !== R ? ($ = R || {}, e[23] = R, e[24] = $) : $ = e[24];
|
|
83
|
+
let H, fe;
|
|
84
|
+
e[25] !== $ ? ({
|
|
85
|
+
label: fe,
|
|
86
|
+
...H
|
|
87
|
+
} = $, e[25] = $, e[26] = H, e[27] = fe) : (H = e[26], fe = e[27]);
|
|
88
|
+
const Oe = fe === void 0 ? "Decrease" : fe;
|
|
89
|
+
let V;
|
|
90
|
+
e[28] !== C ? (V = C || {}, e[28] = C, e[29] = V) : V = e[29];
|
|
91
|
+
let T, me;
|
|
92
|
+
e[30] !== V ? ({
|
|
93
|
+
label: me,
|
|
94
|
+
...T
|
|
95
|
+
} = V, e[30] = V, e[31] = T, e[32] = me) : (T = e[31], me = e[32]);
|
|
96
|
+
const Ue = me === void 0 ? "Increase" : me, [be, St] = ve(!1), [v, Je] = ve(y), [g, ht] = ve(""), [Ke, kt] = ve(!1);
|
|
97
|
+
let ge;
|
|
98
|
+
e[33] === Symbol.for("react.memo_cache_sentinel") ? (ge = {}, e[33] = ge) : ge = e[33];
|
|
99
|
+
const [_e, It] = ve(ge), x = mt(null);
|
|
100
|
+
let xe;
|
|
101
|
+
e[34] !== k ? (xe = (a) => {
|
|
102
|
+
x.current = a, typeof k == "function" ? k(a) : k && (k.current = a);
|
|
103
|
+
}, e[34] = k, e[35] = xe) : xe = e[35];
|
|
104
|
+
const ye = xe;
|
|
105
|
+
let Se;
|
|
106
|
+
e[36] !== l ? (Se = l == null ? void 0 : l.substring(0, _t), e[36] = l, e[37] = Se) : Se = e[37];
|
|
107
|
+
const Qe = Se, Ye = mt(null);
|
|
108
|
+
let ke;
|
|
109
|
+
e[38] !== i ? (ke = i == null ? void 0 : i.substring(0, yt), e[38] = i, e[39] = ke) : ke = e[39];
|
|
110
|
+
const Ze = ke, et = mt(null), he = Et(xt);
|
|
111
|
+
let Ie, Ae;
|
|
112
|
+
e[40] !== y ? (Ie = () => {
|
|
113
|
+
y && Je(y);
|
|
114
|
+
}, Ae = [y], e[40] = y, e[41] = Ie, e[42] = Ae) : (Ie = e[41], Ae = e[42]), bt(Ie, Ae);
|
|
115
|
+
let De, je;
|
|
116
|
+
e[43] !== g ? (De = () => {
|
|
117
|
+
if (g) {
|
|
118
|
+
const a = setTimeout(() => {
|
|
119
|
+
ht("");
|
|
120
|
+
}, 3e3);
|
|
121
|
+
return () => clearTimeout(a);
|
|
122
|
+
}
|
|
123
|
+
}, je = [g], e[43] = g, e[44] = De, e[45] = je) : (De = e[44], je = e[45]), bt(De, je);
|
|
124
|
+
let Ne, Be;
|
|
125
|
+
e[46] === Symbol.for("react.memo_cache_sentinel") ? (Ne = () => {
|
|
126
|
+
var f;
|
|
127
|
+
const a = ln;
|
|
128
|
+
return (f = x.current) == null || f.addEventListener("wheel", a, {
|
|
129
|
+
passive: !1
|
|
130
|
+
}), () => {
|
|
131
|
+
var u;
|
|
132
|
+
(u = x.current) == null || u.removeEventListener("wheel", a);
|
|
133
|
+
};
|
|
134
|
+
}, Be = [], e[46] = Ne, e[47] = Be) : (Ne = e[46], Be = e[47]), bt(Ne, Be);
|
|
135
|
+
let we;
|
|
136
|
+
e[48] !== n ? (we = () => {
|
|
137
|
+
const a = n === "medium" ? 16 : 8, f = {};
|
|
138
|
+
if (Ye.current) {
|
|
139
|
+
const u = Ye.current.offsetWidth;
|
|
140
|
+
f.paddingInlineStart = a + u + "px";
|
|
141
|
+
}
|
|
142
|
+
if (et.current) {
|
|
143
|
+
const u = et.current.offsetWidth;
|
|
144
|
+
f.paddingInlineEnd = a + u + "px";
|
|
145
|
+
}
|
|
146
|
+
It(f), St(!0);
|
|
147
|
+
}, e[48] = n, e[49] = we) : we = e[49];
|
|
148
|
+
let Le;
|
|
149
|
+
e[50] !== Ke || e[51] !== l || e[52] !== n || e[53] !== i ? (Le = [l, i, n, Ke], e[50] = Ke, e[51] = l, e[52] = n, e[53] = i, e[54] = Le) : Le = e[54], vt(we, Le);
|
|
150
|
+
let Ee, Re;
|
|
151
|
+
e[55] === Symbol.for("react.memo_cache_sentinel") ? (Ee = () => {
|
|
152
|
+
Lt && (async () => {
|
|
153
|
+
"fonts" in document && (await document.fonts.load('1em "STIHL Contraface Digital Text Regular"'), kt(!0));
|
|
154
|
+
})();
|
|
155
|
+
}, Re = [], e[55] = Ee, e[56] = Re) : (Ee = e[55], Re = e[56]), vt(Ee, Re);
|
|
156
|
+
const tt = n === "small";
|
|
157
|
+
let q, W, M, X, z, G, D, O, U, j, N, B, w;
|
|
158
|
+
if (e[57] !== de || e[58] !== p || e[59] !== c || e[60] !== Qe || e[61] !== Ze || e[62] !== ye || e[63] !== he || e[64] !== m || e[65] !== s || e[66] !== _e || e[67] !== v || e[68] !== o || e[69] !== be || e[70] !== b || e[71] !== F || e[72] !== P || e[73] !== _ || e[74] !== l || e[75] !== h || e[76] !== A || e[77] !== I || e[78] !== n || e[79] !== pe || e[80] !== i || e[81] !== d || e[82] !== tt || e[83] !== g) {
|
|
159
|
+
const a = L(t.affix, {
|
|
160
|
+
[t.affixSmall]: tt,
|
|
161
|
+
[t.affixDisabled]: c,
|
|
162
|
+
[t.affixReadonly]: h
|
|
163
|
+
}), f = `${s}-label`, u = `${s}-feedback`, Fe = `${s}-hint`, Y = `${s}-value-announcer`, At = m ? ` ${Fe}` : "";
|
|
164
|
+
let Pe;
|
|
165
|
+
e[97] !== p ? (Pe = L(t.root, p), e[97] = p, e[98] = Pe) : Pe = e[98];
|
|
166
|
+
const Dt = Pe, lt = n === "small", it = l || i;
|
|
167
|
+
let $e;
|
|
168
|
+
e[99] !== o || e[100] !== be || e[101] !== lt || e[102] !== it ? ($e = L(t.input, {
|
|
169
|
+
[t.inputSmall]: lt,
|
|
170
|
+
[t.inputInvalid]: o,
|
|
171
|
+
[t.inputHasAffix]: it,
|
|
172
|
+
[t.inputIsReady]: be
|
|
173
|
+
}), e[99] = o, e[100] = be, e[101] = lt, e[102] = it, e[103] = $e) : $e = e[103];
|
|
174
|
+
const at = $e;
|
|
175
|
+
let He;
|
|
176
|
+
e[104] !== c || e[105] !== he ? (He = L(t.label, {
|
|
177
|
+
[t.labelHidden]: he,
|
|
178
|
+
[t.labelDisabled]: c
|
|
179
|
+
}), e[104] = c, e[105] = he, e[106] = He) : He = e[106];
|
|
180
|
+
const ot = He, rt = n === "small";
|
|
181
|
+
let Ve;
|
|
182
|
+
e[107] !== rt ? (Ve = L(t.secondActionButton, {
|
|
183
|
+
[t.secondActionButtonSmall]: rt
|
|
184
|
+
}), e[107] = rt, e[108] = Ve) : Ve = e[108], q = Ve;
|
|
185
|
+
const ct = n === "small";
|
|
186
|
+
let Te;
|
|
187
|
+
e[109] !== ct ? (Te = L(t.actionButton, {
|
|
188
|
+
[t.actionButtonSmall]: ct
|
|
189
|
+
}), e[109] = ct, e[110] = Te) : Te = e[110], X = Te;
|
|
190
|
+
let qe;
|
|
191
|
+
e[111] !== o || e[112] !== d || e[113] !== u || e[114] !== Y ? (qe = () => {
|
|
192
|
+
const r = [Y];
|
|
193
|
+
return o && d && r.push(u), r.join(" ");
|
|
194
|
+
}, e[111] = o, e[112] = d, e[113] = u, e[114] = Y, e[115] = qe) : qe = e[115];
|
|
195
|
+
const jt = qe;
|
|
196
|
+
let We;
|
|
197
|
+
e[116] !== de ? (We = () => {
|
|
198
|
+
var r;
|
|
199
|
+
if (x.current) {
|
|
200
|
+
Je(x.current.value);
|
|
201
|
+
const Nt = new Event("change", {
|
|
202
|
+
bubbles: !0
|
|
203
|
+
});
|
|
204
|
+
(r = x.current) == null || r.dispatchEvent(Nt), ht(`${de} ${x.current.value}`);
|
|
205
|
+
}
|
|
206
|
+
}, e[116] = de, e[117] = We) : We = e[117];
|
|
207
|
+
const Z = We;
|
|
208
|
+
let Me;
|
|
209
|
+
e[118] !== Z ? (Me = () => {
|
|
210
|
+
var r;
|
|
211
|
+
(r = x.current) == null || r.stepDown(), Z();
|
|
212
|
+
}, e[118] = Z, e[119] = Me) : Me = e[119], W = Me;
|
|
213
|
+
let Xe;
|
|
214
|
+
e[120] !== Z ? (Xe = () => {
|
|
215
|
+
var r;
|
|
216
|
+
(r = x.current) == null || r.stepUp(), Z();
|
|
217
|
+
}, e[120] = Z, e[121] = Xe) : Xe = e[121], M = Xe;
|
|
218
|
+
let ze;
|
|
219
|
+
e[122] !== _ ? (ze = (r) => {
|
|
220
|
+
Je(r.target.value), _ && _(r);
|
|
221
|
+
}, e[122] = _, e[123] = ze) : ze = e[123];
|
|
222
|
+
const ut = ze;
|
|
223
|
+
U = Dt;
|
|
224
|
+
let ee;
|
|
225
|
+
e[124] !== A ? (ee = A && /* @__PURE__ */ S(Rt, {}), e[124] = A, e[125] = ee) : ee = e[125], e[126] !== s || e[127] !== f || e[128] !== b || e[129] !== ot || e[130] !== ee ? (j = /* @__PURE__ */ ft("label", { className: ot, id: f, htmlFor: s, children: [
|
|
226
|
+
b,
|
|
227
|
+
ee
|
|
228
|
+
] }), e[126] = s, e[127] = f, e[128] = b, e[129] = ot, e[130] = ee, e[131] = j) : j = e[131], e[132] !== m || e[133] !== Fe ? (N = m && /* @__PURE__ */ S("div", { className: t.hint, id: Fe, children: m }), e[132] = m, e[133] = Fe, e[134] = N) : N = e[134], e[135] !== g || e[136] !== Y ? (B = /* @__PURE__ */ S("div", { "aria-live": "polite", "aria-atomic": "true", className: t.valueAnnouncer, id: Y, children: g }), e[135] = g, e[136] = Y, e[137] = B) : B = e[137], e[138] !== o || e[139] !== d || e[140] !== u ? (w = o && d && /* @__PURE__ */ S(Ct, { className: t.feedback, message: d, type: "invalid", id: u }), e[138] = o, e[139] = d, e[140] = u, e[141] = w) : w = e[141], z = t.wrapper, G = l && /* @__PURE__ */ S("span", { className: L(a, t.prefix), ref: Ye, "aria-disabled": c, children: Qe });
|
|
229
|
+
const dt = `${f}${At}`, pt = jt();
|
|
230
|
+
e[142] !== c || e[143] !== ye || e[144] !== ut || e[145] !== s || e[146] !== at || e[147] !== _e || e[148] !== v || e[149] !== o || e[150] !== F || e[151] !== P || e[152] !== h || e[153] !== A || e[154] !== I || e[155] !== pe || e[156] !== dt || e[157] !== pt ? (D = /* @__PURE__ */ S("input", { className: at, id: s, ...I, style: _e, ref: ye, "aria-labelledby": dt, "aria-describedby": pt, "aria-invalid": o, "aria-disabled": h, disabled: c, min: P, max: F, readOnly: h, required: A, step: pe, type: "number", value: v, onChange: ut }), e[142] = c, e[143] = ye, e[144] = ut, e[145] = s, e[146] = at, e[147] = _e, e[148] = v, e[149] = o, e[150] = F, e[151] = P, e[152] = h, e[153] = A, e[154] = I, e[155] = pe, e[156] = dt, e[157] = pt, e[158] = D) : D = e[158], O = i && /* @__PURE__ */ S("span", { className: L(a, t.suffix), ref: et, "aria-disabled": c, children: Ze }), e[57] = de, e[58] = p, e[59] = c, e[60] = Qe, e[61] = Ze, e[62] = ye, e[63] = he, e[64] = m, e[65] = s, e[66] = _e, e[67] = v, e[68] = o, e[69] = be, e[70] = b, e[71] = F, e[72] = P, e[73] = _, e[74] = l, e[75] = h, e[76] = A, e[77] = I, e[78] = n, e[79] = pe, e[80] = i, e[81] = d, e[82] = tt, e[83] = g, e[84] = q, e[85] = W, e[86] = M, e[87] = X, e[88] = z, e[89] = G, e[90] = D, e[91] = O, e[92] = U, e[93] = j, e[94] = N, e[95] = B, e[96] = w;
|
|
231
|
+
} else
|
|
232
|
+
q = e[84], W = e[85], M = e[86], X = e[87], z = e[88], G = e[89], D = e[90], O = e[91], U = e[92], j = e[93], N = e[94], B = e[95], w = e[96];
|
|
233
|
+
const nt = c || h || !!v && Number(v) <= Number(P);
|
|
234
|
+
let J;
|
|
235
|
+
e[159] !== q || e[160] !== Oe || e[161] !== W || e[162] !== H || e[163] !== n || e[164] !== nt ? (J = /* @__PURE__ */ S(gt, { ...H, hideLabel: !0, theme: "light", iconName: "minus", variant: "filled", className: q, size: n, onClick: W, disabled: nt, type: "button", children: Oe }), e[159] = q, e[160] = Oe, e[161] = W, e[162] = H, e[163] = n, e[164] = nt, e[165] = J) : J = e[165];
|
|
236
|
+
const st = c || h || !!v && Number(v) >= Number(F);
|
|
237
|
+
let K;
|
|
238
|
+
e[166] !== M || e[167] !== Ue || e[168] !== X || e[169] !== T || e[170] !== n || e[171] !== st ? (K = /* @__PURE__ */ S(gt, { ...T, hideLabel: !0, theme: "light", iconName: "plus", variant: "filled", className: X, size: n, onClick: M, disabled: st, type: "button", children: Ue }), e[166] = M, e[167] = Ue, e[168] = X, e[169] = T, e[170] = n, e[171] = st, e[172] = K) : K = e[172];
|
|
239
|
+
let Q;
|
|
240
|
+
e[173] !== z || e[174] !== G || e[175] !== D || e[176] !== O || e[177] !== J || e[178] !== K ? (Q = /* @__PURE__ */ ft("div", { className: z, children: [
|
|
241
|
+
G,
|
|
242
|
+
D,
|
|
243
|
+
O,
|
|
244
|
+
J,
|
|
245
|
+
K
|
|
246
|
+
] }), e[173] = z, e[174] = G, e[175] = D, e[176] = O, e[177] = J, e[178] = K, e[179] = Q) : Q = e[179];
|
|
247
|
+
let Ce;
|
|
248
|
+
return e[180] !== U || e[181] !== j || e[182] !== N || e[183] !== B || e[184] !== w || e[185] !== Q ? (Ce = /* @__PURE__ */ ft("div", { className: U, children: [
|
|
249
|
+
j,
|
|
250
|
+
N,
|
|
251
|
+
B,
|
|
252
|
+
w,
|
|
253
|
+
Q
|
|
254
|
+
] }), e[180] = U, e[181] = j, e[182] = N, e[183] = B, e[184] = w, e[185] = Q, e[186] = Ce) : Ce = e[186], Ce;
|
|
255
|
+
});
|
|
256
|
+
sn.displayName = "DSInputStepper";
|
|
257
|
+
function ln(E) {
|
|
258
|
+
E.preventDefault();
|
|
259
|
+
}
|
|
260
|
+
export {
|
|
261
|
+
sn as D,
|
|
262
|
+
nn as v
|
|
263
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as v } from "react/jsx-runtime";
|
|
3
3
|
import { d as u } from "./index.CgTHIF3K.js";
|
|
4
4
|
import { useState as T, useEffect as y } from "react";
|
|
5
|
-
import { TabList as h } from "../tablist.
|
|
5
|
+
import { TabList as h } from "../tablist.Dzwe0_J4.js";
|
|
6
6
|
import { g as m, r as E } from "./helpers.BbWkXTr3.js";
|
|
7
7
|
const _ = ["left", "center"], j = ["prev", "next"], S = ({
|
|
8
8
|
aria: a,
|
|
@@ -4,7 +4,7 @@ import { d as $ } from "./index.CgTHIF3K.js";
|
|
|
4
4
|
import { c as J } from "./index.CEyLAtio.js";
|
|
5
5
|
import { forwardRef as K, useState as Q } from "react";
|
|
6
6
|
import { D as W } from "./Fieldset.BX46NuLh.js";
|
|
7
|
-
import { DSRadio as X } from "../radio.
|
|
7
|
+
import { DSRadio as X } from "../radio.Be4pFOLf.js";
|
|
8
8
|
import { g as m, r as V } from "./helpers.BbWkXTr3.js";
|
|
9
9
|
import '../assets/RadioGroup.CM2mYOzc.css';const Y = "ds-radio-group_root_12fot_1", Z = "ds-radio-group_root--horizontal_12fot_9", oo = "ds-radio-group_root--invalid_12fot_12", B = {
|
|
10
10
|
root: Y,
|
|
@@ -8,7 +8,7 @@ import { Asterisk as je } from "../asterisk.CR60hx8S.js";
|
|
|
8
8
|
import { D as We } from "./Icon.C0161Glk.js";
|
|
9
9
|
import { DSSystemFeedback as ze } from "../systemfeedback.CLQCbTF6.js";
|
|
10
10
|
import { g as pe, r as Me } from "./helpers.BbWkXTr3.js";
|
|
11
|
-
import '../assets/Select.
|
|
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
12
|
root: Te,
|
|
13
13
|
hint: Oe,
|
|
14
14
|
label: Ze,
|
|
@@ -17,8 +17,8 @@ import '../assets/Select.e1fTfWmm.css';const Te = "ds-select_root_1g7g9_1", Oe =
|
|
|
17
17
|
feedback: Qe,
|
|
18
18
|
selectWrapper: Ue,
|
|
19
19
|
select: Xe,
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
selectSmall: Ye,
|
|
21
|
+
selectInvalid: Ge,
|
|
22
22
|
selectPlaceholder: el,
|
|
23
23
|
chevron: ll,
|
|
24
24
|
chevronSmall: tl,
|
|
@@ -38,11 +38,11 @@ import '../assets/Select.e1fTfWmm.css';const Te = "ds-select_root_1g7g9_1", Oe =
|
|
|
38
38
|
} else throw new Error(pe("DSSelect", Me("options", "DSSelect")));
|
|
39
39
|
}, cl = (n, s, e) => n === "" || s !== void 0 && s !== "" ? !1 : !(e !== void 0 && e !== ""), ol = Be((n, s) => {
|
|
40
40
|
const e = xe.c(127);
|
|
41
|
-
let i, d, r, l, f, b,
|
|
41
|
+
let i, d, r, l, f, b, S, D, a, Z, J, K, Q, U, X, o;
|
|
42
42
|
e[0] !== n ? ({
|
|
43
43
|
id: l,
|
|
44
44
|
label: f,
|
|
45
|
-
options:
|
|
45
|
+
options: S,
|
|
46
46
|
className: i,
|
|
47
47
|
defaultValue: d,
|
|
48
48
|
disabled: Z,
|
|
@@ -56,16 +56,16 @@ import '../assets/Select.e1fTfWmm.css';const Te = "ds-select_root_1g7g9_1", Oe =
|
|
|
56
56
|
value: o,
|
|
57
57
|
onChange: b,
|
|
58
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] =
|
|
60
|
-
const h = Z === void 0 ? !1 : Z, Pe = J === void 0 ? !1 : J, c = K === void 0 ? !1 : K,
|
|
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
61
|
process.env.NODE_ENV !== "production" && al({
|
|
62
62
|
id: l,
|
|
63
63
|
label: f,
|
|
64
|
-
options:
|
|
64
|
+
options: S
|
|
65
65
|
});
|
|
66
66
|
const qe = Fe(null), [ue, Ne] = Ie(o);
|
|
67
67
|
let te;
|
|
68
|
-
e[17] !== d || e[18] !==
|
|
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
69
|
const [Y, Ce] = Ie(te);
|
|
70
70
|
let se, ae;
|
|
71
71
|
e[21] !== o ? (se = () => {
|
|
@@ -78,10 +78,10 @@ import '../assets/Select.e1fTfWmm.css';const Te = "ds-select_root_1g7g9_1", Oe =
|
|
|
78
78
|
const _e = ce, G = Re(Pe), w = `${l}-label`, m = `${l}-feedback`, N = `${l}-hint`, ve = r ? ` ${N}` : "";
|
|
79
79
|
let oe;
|
|
80
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
|
|
81
|
+
const Se = oe;
|
|
82
82
|
let k, E, I, P, q, C, $, L, V, A, x, B, F, H, R, j, p, u, _;
|
|
83
|
-
if (e[30] !==
|
|
84
|
-
const ee = (he) => [
|
|
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
85
|
if ("options" in O) {
|
|
86
86
|
const {
|
|
87
87
|
label: Ee,
|
|
@@ -93,25 +93,25 @@ import '../assets/Select.e1fTfWmm.css';const Te = "ds-select_root_1g7g9_1", Oe =
|
|
|
93
93
|
})], ke = il;
|
|
94
94
|
let re;
|
|
95
95
|
e[72] !== i ? (re = me(t.root, i), e[72] = i, e[73] = re) : re = e[73];
|
|
96
|
-
const $e = re,
|
|
96
|
+
const $e = re, ye = le === "small";
|
|
97
97
|
let ne;
|
|
98
|
-
e[74] !== c || e[75] !== Y || e[76] !==
|
|
99
|
-
[t.selectSmall]:
|
|
98
|
+
e[74] !== c || e[75] !== Y || e[76] !== ye ? (ne = me(t.select, {
|
|
99
|
+
[t.selectSmall]: ye,
|
|
100
100
|
[t.selectInvalid]: c,
|
|
101
101
|
[t.selectPlaceholder]: Y
|
|
102
|
-
}), e[74] = c, e[75] = Y, e[76] =
|
|
102
|
+
}), e[74] = c, e[75] = Y, e[76] = ye, e[77] = ne) : ne = e[77];
|
|
103
103
|
const Le = ne;
|
|
104
104
|
let de;
|
|
105
105
|
e[78] !== h || e[79] !== G ? (de = me(t.label, {
|
|
106
106
|
[t.labelHidden]: G,
|
|
107
107
|
[t.labelDisabled]: h
|
|
108
108
|
}), e[78] = h, e[79] = G, e[80] = de) : de = e[80];
|
|
109
|
-
const De = de,
|
|
109
|
+
const De = de, ge = le === "small";
|
|
110
110
|
let fe;
|
|
111
|
-
e[81] !== h || e[82] !==
|
|
112
|
-
[t.chevronSmall]:
|
|
111
|
+
e[81] !== h || e[82] !== ge ? (fe = me(t.chevron, {
|
|
112
|
+
[t.chevronSmall]: ge,
|
|
113
113
|
[t.chevronDisabled]: h
|
|
114
|
-
}), e[81] = h, e[82] =
|
|
114
|
+
}), e[81] = h, e[82] = ge, e[83] = fe) : fe = e[83], k = fe;
|
|
115
115
|
let be;
|
|
116
116
|
e[84] !== b ? (be = (he) => {
|
|
117
117
|
const {
|
|
@@ -122,10 +122,10 @@ import '../assets/Select.e1fTfWmm.css';const Te = "ds-select_root_1g7g9_1", Oe =
|
|
|
122
122
|
const Ve = be;
|
|
123
123
|
j = $e;
|
|
124
124
|
let T;
|
|
125
|
-
e[86] !==
|
|
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
126
|
f,
|
|
127
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}`, $ =
|
|
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
129
|
} else
|
|
130
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
131
|
let W;
|
|
@@ -4,7 +4,7 @@ import { d as nt } from "./index.CgTHIF3K.js";
|
|
|
4
4
|
import { c as T } from "./index.CEyLAtio.js";
|
|
5
5
|
import { forwardRef as ot, useState as Xe, useRef as ct } from "react";
|
|
6
6
|
import { u as dt } from "./useBreakpoint.CMOR9ZOB.js";
|
|
7
|
-
import { DSInput as ut } from "../input.
|
|
7
|
+
import { DSInput as ut } from "../input.DhxUW3zc.js";
|
|
8
8
|
import { g as Je } from "./helpers.BbWkXTr3.js";
|
|
9
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
10
|
root: pt,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as N, jsxs as L } from "react/jsx-runtime";
|
|
3
3
|
import { d as M } from "./index.CgTHIF3K.js";
|
|
4
4
|
import { useState as $ } from "react";
|
|
5
|
-
import { TabList as j } from "../tablist.
|
|
5
|
+
import { TabList as j } from "../tablist.Dzwe0_J4.js";
|
|
6
6
|
import { TabPane as B } from "../tabpane.CB-eudyw.js";
|
|
7
7
|
import { g as C } from "./TabPane.utils.DG16Y2uD.js";
|
|
8
8
|
import { g, r as O } from "./helpers.BbWkXTr3.js";
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as d, jsx as
|
|
2
|
+
import { jsxs as d, jsx as p, Fragment as le } from "react/jsx-runtime";
|
|
3
3
|
import { c as A } from "./index.CEyLAtio.js";
|
|
4
|
-
import { forwardRef as ie, useState as i, useRef as ce, useEffect as
|
|
5
|
-
import { g as
|
|
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
6
|
import { u as de } from "./useBreakpoint.CMOR9ZOB.js";
|
|
7
7
|
import "./index.CgTHIF3K.js";
|
|
8
8
|
import { Asterisk as ue } from "../asterisk.CR60hx8S.js";
|
|
9
9
|
import { DSSystemFeedback as fe } from "../systemfeedback.CLQCbTF6.js";
|
|
10
|
-
import '../assets/Textarea.
|
|
11
|
-
textarea:
|
|
12
|
-
textareaInvalid: be,
|
|
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,
|
|
13
12
|
textareaSmall: _e,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
21
|
charCount: Ae,
|
|
22
22
|
charCountAnnouncer: Ie
|
|
23
|
-
},
|
|
23
|
+
}, Ve = ["medium", "small"], Te = ({
|
|
24
24
|
id: r,
|
|
25
25
|
label: u
|
|
26
26
|
}) => {
|
|
27
27
|
if (!r)
|
|
28
|
-
throw new Error(
|
|
28
|
+
throw new Error(q("DSTextarea", 'A unique "id" prop is required. Please add a unique "id" prop to the DSTextarea component.'));
|
|
29
29
|
if (!u)
|
|
30
|
-
throw new Error(
|
|
31
|
-
},
|
|
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
32
|
id: r,
|
|
33
33
|
label: u,
|
|
34
34
|
charsLimitText: M = "Character limit reached",
|
|
@@ -36,41 +36,41 @@ import '../assets/Textarea.BGV7Z0Z9.css';const xe = "ds-textarea_textarea_qx67e_
|
|
|
36
36
|
className: F,
|
|
37
37
|
defaultValue: X,
|
|
38
38
|
disabled: I = !1,
|
|
39
|
-
hint:
|
|
39
|
+
hint: x,
|
|
40
40
|
hideLabel: Z = !1,
|
|
41
41
|
invalid: s = !1,
|
|
42
42
|
maxLength: e,
|
|
43
43
|
readonly: T = !1,
|
|
44
|
-
required:
|
|
44
|
+
required: D = !1,
|
|
45
45
|
resize: f = "vertical",
|
|
46
46
|
size: G = "medium",
|
|
47
47
|
systemFeedback: n,
|
|
48
|
-
value:
|
|
48
|
+
value: y,
|
|
49
49
|
wrapperClassName: J,
|
|
50
|
-
onChange:
|
|
51
|
-
onInput:
|
|
50
|
+
onChange: w,
|
|
51
|
+
onInput: R,
|
|
52
52
|
...K
|
|
53
|
-
},
|
|
53
|
+
}, b) => {
|
|
54
54
|
process.env.NODE_ENV !== "production" && Te({
|
|
55
55
|
id: r,
|
|
56
56
|
label: u
|
|
57
57
|
});
|
|
58
|
-
const [Q,
|
|
59
|
-
o.current = t, typeof
|
|
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
60
|
}, L = de(Z);
|
|
61
|
-
|
|
61
|
+
m(() => {
|
|
62
62
|
if (!e || e <= 0)
|
|
63
63
|
return;
|
|
64
|
-
l >= e * 0.8 ?
|
|
64
|
+
l >= e * 0.8 ? $("polite") : $("off");
|
|
65
65
|
const t = setTimeout(() => {
|
|
66
|
-
|
|
66
|
+
g(e - l || 0);
|
|
67
67
|
}, 1e3);
|
|
68
68
|
return () => clearTimeout(t);
|
|
69
|
-
}, [l]),
|
|
70
|
-
|
|
71
|
-
}, [
|
|
72
|
-
s && n ? (
|
|
73
|
-
}, [s,
|
|
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
74
|
if (f === "auto")
|
|
75
75
|
return c(), window.addEventListener("resize", c), () => window.removeEventListener("resize", c);
|
|
76
76
|
}, [f, o.current]);
|
|
@@ -78,53 +78,53 @@ import '../assets/Textarea.BGV7Z0Z9.css';const xe = "ds-textarea_textarea_qx67e_
|
|
|
78
78
|
// small textarea
|
|
79
79
|
[a.textareaSmall]: G === "small",
|
|
80
80
|
// invalid state
|
|
81
|
-
[a.textareaInvalid]:
|
|
81
|
+
[a.textareaInvalid]: C,
|
|
82
82
|
// resize handling
|
|
83
83
|
[a.textareaResizeAuto]: f === "auto"
|
|
84
84
|
}), ae = A(a.label, {
|
|
85
85
|
// hide label only visually to keep them available for assistive technologies
|
|
86
86
|
[a.labelHidden]: L,
|
|
87
87
|
[a.labelDisabled]: I
|
|
88
|
-
}),
|
|
88
|
+
}), V = `${r}-label`, P = `${r}-feedback`, j = `${r}-hint`, B = `${r}-char-count-announcer`, re = x ? ` ${j}` : "", c = () => {
|
|
89
89
|
if (o.current && f === "auto") {
|
|
90
90
|
o.current.style.height = "auto";
|
|
91
|
-
const t = z(o.current.scrollHeight),
|
|
91
|
+
const t = z(o.current.scrollHeight), h = z(2);
|
|
92
92
|
o.current.style.height = `${// We need to add 2px (border-top & border-bottom) to the scrollHeight to prevent the textarea
|
|
93
93
|
// from jumping as soon as the user starts typing.
|
|
94
|
-
t +
|
|
94
|
+
t + h}rem`;
|
|
95
95
|
}
|
|
96
96
|
}, se = () => {
|
|
97
97
|
const t = [];
|
|
98
|
-
return e && e > 0 && t.push(
|
|
98
|
+
return e && e > 0 && t.push(B), s && n && t.push(P), t.length > 0 ? t.join(" ") : void 0;
|
|
99
99
|
}, oe = (t) => {
|
|
100
|
-
var
|
|
101
|
-
|
|
100
|
+
var h;
|
|
101
|
+
R && R(t), e && e > 0 && E(((h = o.current) == null ? void 0 : h.value.length) || 0), c();
|
|
102
102
|
}, ne = (t) => {
|
|
103
|
-
|
|
103
|
+
w && w(t), H || N(t.target.value);
|
|
104
104
|
};
|
|
105
105
|
return /* @__PURE__ */ d("div", { className: ee, children: [
|
|
106
|
-
/* @__PURE__ */ d("label", { className: ae, id:
|
|
106
|
+
/* @__PURE__ */ d("label", { className: ae, id: V, htmlFor: r, children: [
|
|
107
107
|
u,
|
|
108
|
-
|
|
108
|
+
D && /* @__PURE__ */ p(ue, {})
|
|
109
109
|
] }),
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
/* @__PURE__ */
|
|
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
113
|
"textarea",
|
|
114
114
|
{
|
|
115
115
|
className: te,
|
|
116
116
|
id: r,
|
|
117
117
|
...K,
|
|
118
118
|
ref: Y,
|
|
119
|
-
"aria-labelledby": `${
|
|
119
|
+
"aria-labelledby": `${V}${re}`,
|
|
120
120
|
"aria-describedby": se(),
|
|
121
121
|
"aria-invalid": s,
|
|
122
122
|
"aria-disabled": T,
|
|
123
123
|
maxLength: e,
|
|
124
124
|
readOnly: T,
|
|
125
|
-
required:
|
|
125
|
+
required: D,
|
|
126
126
|
disabled: I,
|
|
127
|
-
value:
|
|
127
|
+
value: _,
|
|
128
128
|
defaultValue: void 0,
|
|
129
129
|
rows: void 0,
|
|
130
130
|
cols: void 0,
|
|
@@ -142,7 +142,7 @@ import '../assets/Textarea.BGV7Z0Z9.css';const xe = "ds-textarea_textarea_qx67e_
|
|
|
142
142
|
"div",
|
|
143
143
|
{
|
|
144
144
|
className: a.charCountAnnouncer,
|
|
145
|
-
id:
|
|
145
|
+
id: B,
|
|
146
146
|
"aria-live": W,
|
|
147
147
|
"aria-atomic": "true",
|
|
148
148
|
children: [
|
|
@@ -155,9 +155,9 @@ import '../assets/Textarea.BGV7Z0Z9.css';const xe = "ds-textarea_textarea_qx67e_
|
|
|
155
155
|
] })
|
|
156
156
|
] });
|
|
157
157
|
});
|
|
158
|
-
|
|
158
|
+
De.displayName = "DSTextarea";
|
|
159
159
|
export {
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
De as D,
|
|
161
|
+
Ve as T,
|
|
162
162
|
Te as v
|
|
163
163
|
};
|