@stenajs-webui/forms 21.40.3 → 21.41.1
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/dist/index.es.js +209 -198
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.es.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { jsx as o, jsxs as h, Fragment as R } from "react/jsx-runtime";
|
|
3
3
|
import { Box as wt, Space as m, ScreenReaderOnlyText as q, Text as A, Row as T, parseFloatElseUndefined as P, getDataProps as It } from "@stenajs-webui/core";
|
|
4
4
|
import * as Bt from "react";
|
|
5
|
-
import { forwardRef as M, useRef as U, useCallback as w, useEffect as
|
|
5
|
+
import { forwardRef as M, useRef as U, useCallback as w, useEffect as D, useMemo as gt, useState as kt, useId as E } from "react";
|
|
6
6
|
import x from "classnames";
|
|
7
|
-
import { Icon as
|
|
7
|
+
import { Icon as G, stenaCheck as X, stenaExclamationTriangle as J, InputSpinner as Q, UpDownButtons as Tt, FlatButton as K, stenaMinus as St, stenaPlus as Nt, TextInputButton as v, stenaEyeShow as Rt, stenaEyeHide as $t, stenaAngleDown as qt } from "@stenajs-webui/elements";
|
|
8
|
+
import { cssColor as L } from "@stenajs-webui/theme";
|
|
8
9
|
import { FontAwesomeIcon as At } from "@fortawesome/react-fontawesome";
|
|
9
10
|
import { isNil as S } from "lodash-es";
|
|
10
|
-
import { cssColor as Q } from "@stenajs-webui/theme";
|
|
11
11
|
const Pt = "_knob_1d6s8_56", Ht = "_filler_1d6s8_61", Wt = "_checked_1d6s8_75", $ = {
|
|
12
12
|
switch: "_switch_1d6s8_1",
|
|
13
13
|
knob: Pt,
|
|
@@ -55,7 +55,7 @@ const Pt = "_knob_1d6s8_56", Ht = "_filler_1d6s8_61", Wt = "_checked_1d6s8_75",
|
|
|
55
55
|
children: t
|
|
56
56
|
}
|
|
57
57
|
)
|
|
58
|
-
] }) }) }), Mt = "_checkbox_1t23r_1", Ut = "_standard_1t23r_40", Lt = "_small_1t23r_52",
|
|
58
|
+
] }) }) }), Mt = "_checkbox_1t23r_1", Ut = "_standard_1t23r_40", Lt = "_small_1t23r_52", z = {
|
|
59
59
|
checkbox: Mt,
|
|
60
60
|
standard: Ut,
|
|
61
61
|
small: Lt
|
|
@@ -67,27 +67,27 @@ const Pt = "_knob_1d6s8_56", Ht = "_filler_1d6s8_61", Wt = "_checked_1d6s8_75",
|
|
|
67
67
|
value: r = !1,
|
|
68
68
|
size: l = "standard",
|
|
69
69
|
className: c,
|
|
70
|
-
...
|
|
71
|
-
},
|
|
72
|
-
const
|
|
73
|
-
|
|
70
|
+
...i
|
|
71
|
+
}, d) => {
|
|
72
|
+
const s = U(null), _ = (u) => {
|
|
73
|
+
s.current = u, s.current && (s.current.indeterminate = !!t), d && (typeof d == "function" ? d(u) : d.current = u);
|
|
74
74
|
}, p = w(
|
|
75
|
-
(
|
|
76
|
-
e && e(
|
|
75
|
+
(u) => {
|
|
76
|
+
e && e(u), n && n(u.target.checked);
|
|
77
77
|
},
|
|
78
78
|
[e, n]
|
|
79
79
|
);
|
|
80
|
-
return
|
|
81
|
-
|
|
82
|
-
}, [t,
|
|
80
|
+
return D(() => {
|
|
81
|
+
s.current && (s.current.indeterminate = !!t);
|
|
82
|
+
}, [t, s]), /* @__PURE__ */ o(
|
|
83
83
|
"input",
|
|
84
84
|
{
|
|
85
85
|
type: "checkbox",
|
|
86
|
-
className: x(
|
|
86
|
+
className: x(z.checkbox, z[l], c),
|
|
87
87
|
checked: r,
|
|
88
88
|
onChange: p,
|
|
89
|
-
ref:
|
|
90
|
-
...
|
|
89
|
+
ref: _,
|
|
90
|
+
...i
|
|
91
91
|
}
|
|
92
92
|
);
|
|
93
93
|
}
|
|
@@ -98,9 +98,9 @@ const Pt = "_knob_1d6s8_56", Ht = "_filler_1d6s8_61", Wt = "_checked_1d6s8_75",
|
|
|
98
98
|
wrapperRef: r,
|
|
99
99
|
textColor: l,
|
|
100
100
|
screenReaderLabel: c,
|
|
101
|
-
...
|
|
101
|
+
...i
|
|
102
102
|
}) => /* @__PURE__ */ o("div", { ref: r, children: /* @__PURE__ */ o("label", { children: /* @__PURE__ */ h(T, { alignItems: "center", children: [
|
|
103
|
-
/* @__PURE__ */ o(jt, { ...
|
|
103
|
+
/* @__PURE__ */ o(jt, { ...i, ref: n }),
|
|
104
104
|
/* @__PURE__ */ o(m, {}),
|
|
105
105
|
c ? /* @__PURE__ */ o(q, { children: c }) : null,
|
|
106
106
|
/* @__PURE__ */ o(
|
|
@@ -113,7 +113,7 @@ const Pt = "_knob_1d6s8_56", Ht = "_filler_1d6s8_61", Wt = "_checked_1d6s8_75",
|
|
|
113
113
|
}
|
|
114
114
|
),
|
|
115
115
|
t
|
|
116
|
-
] }) }) }), Kt = "_radiobutton_a19yk_1", zt = "_standard_a19yk_46", Ot = "_small_a19yk_56",
|
|
116
|
+
] }) }) }), Kt = "_radiobutton_a19yk_1", zt = "_standard_a19yk_46", Ot = "_small_a19yk_56", O = {
|
|
117
117
|
radiobutton: Kt,
|
|
118
118
|
standard: zt,
|
|
119
119
|
small: Ot
|
|
@@ -125,10 +125,10 @@ const Pt = "_knob_1d6s8_56", Ht = "_filler_1d6s8_61", Wt = "_checked_1d6s8_75",
|
|
|
125
125
|
name: r,
|
|
126
126
|
className: l,
|
|
127
127
|
...c
|
|
128
|
-
},
|
|
129
|
-
const
|
|
130
|
-
(
|
|
131
|
-
t && t(
|
|
128
|
+
}, i) => {
|
|
129
|
+
const d = w(
|
|
130
|
+
(s) => {
|
|
131
|
+
t && t(s), e && e(s.target.value);
|
|
132
132
|
},
|
|
133
133
|
[t, e]
|
|
134
134
|
);
|
|
@@ -137,9 +137,9 @@ const Pt = "_knob_1d6s8_56", Ht = "_filler_1d6s8_61", Wt = "_checked_1d6s8_75",
|
|
|
137
137
|
{
|
|
138
138
|
type: "radio",
|
|
139
139
|
name: r,
|
|
140
|
-
className: x(
|
|
141
|
-
onChange:
|
|
142
|
-
ref:
|
|
140
|
+
className: x(O.radiobutton, O[n], l),
|
|
141
|
+
onChange: d,
|
|
142
|
+
ref: i,
|
|
143
143
|
...c
|
|
144
144
|
}
|
|
145
145
|
);
|
|
@@ -157,42 +157,53 @@ const Pt = "_knob_1d6s8_56", Ht = "_filler_1d6s8_61", Wt = "_checked_1d6s8_75",
|
|
|
157
157
|
size: r = "medium",
|
|
158
158
|
className: l,
|
|
159
159
|
icon: c,
|
|
160
|
-
contentRight:
|
|
161
|
-
style:
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
160
|
+
contentRight: i,
|
|
161
|
+
style: d,
|
|
162
|
+
disabled: s,
|
|
163
|
+
radioButtonClassName: _,
|
|
164
|
+
...p
|
|
165
|
+
}) => {
|
|
166
|
+
const u = s ? L("--swui-text-disabled-color") : void 0;
|
|
167
|
+
return /* @__PURE__ */ o(
|
|
168
|
+
"label",
|
|
169
|
+
{
|
|
170
|
+
className: x(
|
|
171
|
+
W.radioButtonBox,
|
|
172
|
+
W[n],
|
|
173
|
+
W[r],
|
|
174
|
+
l
|
|
175
|
+
),
|
|
176
|
+
style: d,
|
|
177
|
+
children: /* @__PURE__ */ h(T, { justifyContent: "space-between", flexGrow: 1, children: [
|
|
178
|
+
/* @__PURE__ */ h(T, { alignItems: "center", children: [
|
|
179
|
+
/* @__PURE__ */ o(
|
|
180
|
+
Y,
|
|
181
|
+
{
|
|
182
|
+
...p,
|
|
183
|
+
disabled: s,
|
|
184
|
+
className: _
|
|
185
|
+
}
|
|
186
|
+
),
|
|
187
|
+
/* @__PURE__ */ o(m, {}),
|
|
188
|
+
e ? /* @__PURE__ */ o(q, { children: e }) : null,
|
|
189
|
+
/* @__PURE__ */ o(A, { color: u, "aria-hidden": !!e, children: t })
|
|
190
|
+
] }),
|
|
191
|
+
/* @__PURE__ */ h(
|
|
192
|
+
T,
|
|
193
|
+
{
|
|
194
|
+
alignItems: "center",
|
|
195
|
+
width: c ? "48px" : void 0,
|
|
196
|
+
justifyContent: "center",
|
|
197
|
+
children: [
|
|
198
|
+
c && /* @__PURE__ */ o(G, { icon: c, size: 24, color: u }),
|
|
199
|
+
!c && i
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
)
|
|
203
|
+
] })
|
|
204
|
+
}
|
|
205
|
+
);
|
|
206
|
+
}, Ce = ({
|
|
196
207
|
label: t,
|
|
197
208
|
inputRef: e,
|
|
198
209
|
wrapperRef: n,
|
|
@@ -212,31 +223,31 @@ const Pt = "_knob_1d6s8_56", Ht = "_filler_1d6s8_61", Wt = "_checked_1d6s8_75",
|
|
|
212
223
|
children: t
|
|
213
224
|
}
|
|
214
225
|
)
|
|
215
|
-
] }) }) }), Qt = (t, e, n, r, l, c,
|
|
216
|
-
const
|
|
217
|
-
|
|
218
|
-
}, p = (
|
|
219
|
-
|
|
226
|
+
] }) }) }), Qt = (t, e, n, r, l, c, i, d) => {
|
|
227
|
+
const s = U(!1), _ = (a) => {
|
|
228
|
+
s.current || c == null || c(a.target.value ?? ""), i == null || i(a);
|
|
229
|
+
}, p = (a) => {
|
|
230
|
+
s.current = !1, d == null || d(a);
|
|
220
231
|
};
|
|
221
232
|
return {
|
|
222
233
|
onKeyDownHandler: w(
|
|
223
|
-
(
|
|
224
|
-
const { key: f } =
|
|
234
|
+
(a) => {
|
|
235
|
+
const { key: f } = a;
|
|
225
236
|
if (f === "Enter")
|
|
226
|
-
|
|
237
|
+
s.current = !0, n == null || n(), c == null || c(a.currentTarget.value ?? "");
|
|
227
238
|
else if (f === "Escape")
|
|
228
|
-
|
|
239
|
+
s.current = !0, r == null || r(), a.preventDefault(), a.stopPropagation();
|
|
229
240
|
else if (l) {
|
|
230
241
|
const y = (I, B) => {
|
|
231
|
-
|
|
242
|
+
s.current = !0, t.current.blur(), l(I), B.preventDefault(), B.stopPropagation();
|
|
232
243
|
};
|
|
233
|
-
|
|
244
|
+
a.shiftKey && f === "Tab" ? y("left", a) : f === "Tab" ? y("right", a) : f === "ArrowUp" ? y("up", a) : f === "ArrowDown" ? y("down", a) : f === "ArrowRight" ? t.current.value.length === t.current.selectionStart && y("right", a) : f === "ArrowLeft" && t.current.selectionStart === 0 && y("left", a);
|
|
234
245
|
}
|
|
235
|
-
e && e(
|
|
246
|
+
e && e(a);
|
|
236
247
|
},
|
|
237
248
|
[r, l, e, t, n, c]
|
|
238
249
|
),
|
|
239
|
-
onBlurHandler:
|
|
250
|
+
onBlurHandler: _,
|
|
240
251
|
onFocusHandler: p
|
|
241
252
|
};
|
|
242
253
|
};
|
|
@@ -244,7 +255,7 @@ function Yt(t) {
|
|
|
244
255
|
return t.tagName === "TEXTAREA" || t.tagName === "INPUT" && (t.type === "text" || t.type === "search" || t.type === "url" || t.type === "tel" || t.type === "password");
|
|
245
256
|
}
|
|
246
257
|
const Zt = (t, e, n) => {
|
|
247
|
-
|
|
258
|
+
D(() => {
|
|
248
259
|
t.current && Yt(t.current) && (n ? t.current.setSelectionRange(0, t.current.value.length) : e && t.current.setSelectionRange(
|
|
249
260
|
t.current.value.length,
|
|
250
261
|
t.current.value.length
|
|
@@ -256,24 +267,24 @@ const Zt = (t, e, n) => {
|
|
|
256
267
|
onChange: r,
|
|
257
268
|
onValueChange: l,
|
|
258
269
|
selectAllOnMount: c,
|
|
259
|
-
moveCursorToEndOnMount:
|
|
260
|
-
onDone:
|
|
261
|
-
onMove:
|
|
262
|
-
onFocus:
|
|
270
|
+
moveCursorToEndOnMount: i,
|
|
271
|
+
onDone: d,
|
|
272
|
+
onMove: s,
|
|
273
|
+
onFocus: _,
|
|
263
274
|
onBlur: p,
|
|
264
|
-
onKeyDown:
|
|
265
|
-
autoFocus:
|
|
275
|
+
onKeyDown: u,
|
|
276
|
+
autoFocus: a
|
|
266
277
|
}) => {
|
|
267
|
-
Zt(t, !!
|
|
278
|
+
Zt(t, !!i, !!c);
|
|
268
279
|
const { onKeyDownHandler: f, onFocusHandler: y, onBlurHandler: I } = Qt(
|
|
269
280
|
t,
|
|
270
|
-
|
|
281
|
+
u,
|
|
271
282
|
e,
|
|
272
283
|
n,
|
|
273
|
-
|
|
274
|
-
|
|
284
|
+
s,
|
|
285
|
+
d,
|
|
275
286
|
p,
|
|
276
|
-
|
|
287
|
+
_
|
|
277
288
|
), B = w(
|
|
278
289
|
(g) => {
|
|
279
290
|
r == null || r(g), l == null || l(g.target.value);
|
|
@@ -285,9 +296,9 @@ const Zt = (t, e, n) => {
|
|
|
285
296
|
onChange: B,
|
|
286
297
|
onFocus: y,
|
|
287
298
|
onKeyDown: f,
|
|
288
|
-
autoFocus: c ||
|
|
299
|
+
autoFocus: c || a
|
|
289
300
|
};
|
|
290
|
-
}, Vt = "_textInput_1qe61_1", te = "_onlyTop_1qe61_11", ee = "_disabled_1qe61_15", ne = "_onlyBottom_1qe61_20", re = "_onlyLeft_1qe61_28", oe = "_onlyRight_1qe61_37", le = "_input_1qe61_50", ce = "_alwaysShowPlaceholder_1qe61_74", se = "_icon_1qe61_85", ie = "_standard_1qe61_95",
|
|
301
|
+
}, Vt = "_textInput_1qe61_1", te = "_onlyTop_1qe61_11", ee = "_disabled_1qe61_15", ne = "_onlyBottom_1qe61_20", re = "_onlyLeft_1qe61_28", oe = "_onlyRight_1qe61_37", le = "_input_1qe61_50", ce = "_alwaysShowPlaceholder_1qe61_74", se = "_icon_1qe61_85", ie = "_standard_1qe61_95", de = "_success_1qe61_96", ae = "_loading_1qe61_108", ue = "_modified_1qe61_113", _e = "_error_1qe61_122", pe = "_warning_1qe61_131", fe = "_hideBorder_1qe61_145", he = "_clickable_1qe61_152", b = {
|
|
291
302
|
textInput: Vt,
|
|
292
303
|
onlyTop: te,
|
|
293
304
|
disabled: ee,
|
|
@@ -298,8 +309,8 @@ const Zt = (t, e, n) => {
|
|
|
298
309
|
alwaysShowPlaceholder: ce,
|
|
299
310
|
icon: se,
|
|
300
311
|
standard: ie,
|
|
301
|
-
success:
|
|
302
|
-
loading:
|
|
312
|
+
success: de,
|
|
313
|
+
loading: ae,
|
|
303
314
|
modified: ue,
|
|
304
315
|
error: _e,
|
|
305
316
|
warning: pe,
|
|
@@ -312,17 +323,17 @@ const Zt = (t, e, n) => {
|
|
|
312
323
|
content: r,
|
|
313
324
|
spaceOnLeft: l,
|
|
314
325
|
spaceOnRight: c,
|
|
315
|
-
disableContentPadding:
|
|
316
|
-
disableContentPaddingLeft:
|
|
317
|
-
disableContentPaddingRight:
|
|
326
|
+
disableContentPadding: i,
|
|
327
|
+
disableContentPaddingLeft: d,
|
|
328
|
+
disableContentPaddingRight: s
|
|
318
329
|
}) => !r && !e && !t ? null : t ? /* @__PURE__ */ h(R, { children: [
|
|
319
330
|
l ? /* @__PURE__ */ o(m, { num: 0.25 }) : null,
|
|
320
331
|
t,
|
|
321
332
|
c ? /* @__PURE__ */ o(m, { num: 0.25 }) : null
|
|
322
333
|
] }) : r ? /* @__PURE__ */ h(R, { children: [
|
|
323
|
-
l && !(
|
|
334
|
+
l && !(i || d) ? /* @__PURE__ */ o(m, {}) : null,
|
|
324
335
|
r || null,
|
|
325
|
-
c && !(
|
|
336
|
+
c && !(i || s) ? /* @__PURE__ */ o(m, {}) : null
|
|
326
337
|
] }) : /* @__PURE__ */ h(R, { children: [
|
|
327
338
|
l ? /* @__PURE__ */ o(m, {}) : null,
|
|
328
339
|
e && /* @__PURE__ */ o(
|
|
@@ -340,13 +351,13 @@ const Zt = (t, e, n) => {
|
|
|
340
351
|
disabled: r,
|
|
341
352
|
className: l,
|
|
342
353
|
buttonLeft: c,
|
|
343
|
-
buttonRight:
|
|
344
|
-
contentLeft:
|
|
345
|
-
contentRight:
|
|
346
|
-
disableContentPadding:
|
|
354
|
+
buttonRight: i,
|
|
355
|
+
contentLeft: d,
|
|
356
|
+
contentRight: s,
|
|
357
|
+
disableContentPadding: _,
|
|
347
358
|
disableContentPaddingLeft: p,
|
|
348
|
-
disableContentPaddingRight:
|
|
349
|
-
iconLeft:
|
|
359
|
+
disableContentPaddingRight: u,
|
|
360
|
+
iconLeft: a,
|
|
350
361
|
iconRight: f,
|
|
351
362
|
moveCursorToEndOnMount: y,
|
|
352
363
|
selectAllOnMount: I,
|
|
@@ -360,14 +371,14 @@ const Zt = (t, e, n) => {
|
|
|
360
371
|
onMove: ct,
|
|
361
372
|
onChange: st,
|
|
362
373
|
onKeyDown: it,
|
|
363
|
-
hideBorder:
|
|
364
|
-
onFocus:
|
|
374
|
+
hideBorder: dt,
|
|
375
|
+
onFocus: at,
|
|
365
376
|
onBlur: ut,
|
|
366
377
|
borderRadiusVariant: _t = "normalBorder",
|
|
367
378
|
width: pt,
|
|
368
379
|
alwaysShowPlaceholder: ft,
|
|
369
380
|
...ht
|
|
370
|
-
} = t, yt = U(null),
|
|
381
|
+
} = t, yt = U(null), j = n ?? yt, mt = Ct(j, {
|
|
371
382
|
onEnter: ot,
|
|
372
383
|
onEsc: lt,
|
|
373
384
|
onChange: st,
|
|
@@ -376,11 +387,11 @@ const Zt = (t, e, n) => {
|
|
|
376
387
|
moveCursorToEndOnMount: y,
|
|
377
388
|
onDone: rt,
|
|
378
389
|
onMove: ct,
|
|
379
|
-
onFocus:
|
|
390
|
+
onFocus: at,
|
|
380
391
|
onBlur: ut,
|
|
381
392
|
onKeyDown: it,
|
|
382
393
|
autoFocus: B
|
|
383
|
-
}), xt = e === "success" ?
|
|
394
|
+
}), xt = e === "success" ? X : e === "warning" || e === "error" ? J : f, bt = e === "loading" ? /* @__PURE__ */ o(Q, {}) : s;
|
|
384
395
|
return /* @__PURE__ */ h(
|
|
385
396
|
"div",
|
|
386
397
|
{
|
|
@@ -392,7 +403,7 @@ const Zt = (t, e, n) => {
|
|
|
392
403
|
[b.disabled]: r
|
|
393
404
|
},
|
|
394
405
|
{
|
|
395
|
-
[b.hideBorder]:
|
|
406
|
+
[b.hideBorder]: dt
|
|
396
407
|
},
|
|
397
408
|
et
|
|
398
409
|
),
|
|
@@ -401,11 +412,11 @@ const Zt = (t, e, n) => {
|
|
|
401
412
|
/* @__PURE__ */ o(
|
|
402
413
|
H,
|
|
403
414
|
{
|
|
404
|
-
content:
|
|
405
|
-
disableContentPadding:
|
|
415
|
+
content: d,
|
|
416
|
+
disableContentPadding: _,
|
|
406
417
|
disableContentPaddingLeft: p,
|
|
407
|
-
disableContentPaddingRight:
|
|
408
|
-
icon:
|
|
418
|
+
disableContentPaddingRight: u,
|
|
419
|
+
icon: a,
|
|
409
420
|
spaceOnLeft: !0,
|
|
410
421
|
button: c
|
|
411
422
|
}
|
|
@@ -422,7 +433,7 @@ const Zt = (t, e, n) => {
|
|
|
422
433
|
),
|
|
423
434
|
type: "text",
|
|
424
435
|
disabled: r,
|
|
425
|
-
ref:
|
|
436
|
+
ref: j,
|
|
426
437
|
autoFocus: B,
|
|
427
438
|
...ht,
|
|
428
439
|
...mt
|
|
@@ -432,12 +443,12 @@ const Zt = (t, e, n) => {
|
|
|
432
443
|
H,
|
|
433
444
|
{
|
|
434
445
|
content: bt,
|
|
435
|
-
disableContentPadding:
|
|
446
|
+
disableContentPadding: _,
|
|
436
447
|
disableContentPaddingLeft: p,
|
|
437
|
-
disableContentPaddingRight:
|
|
448
|
+
disableContentPaddingRight: u,
|
|
438
449
|
icon: xt,
|
|
439
450
|
spaceOnRight: !0,
|
|
440
|
-
button:
|
|
451
|
+
button: i
|
|
441
452
|
}
|
|
442
453
|
)
|
|
443
454
|
]
|
|
@@ -456,8 +467,8 @@ const Zt = (t, e, n) => {
|
|
|
456
467
|
if (!e)
|
|
457
468
|
t(String(F(n, r, l)));
|
|
458
469
|
else {
|
|
459
|
-
const
|
|
460
|
-
t(String(F(
|
|
470
|
+
const i = (P(e) || 0) + n;
|
|
471
|
+
t(String(F(i, r, l)));
|
|
461
472
|
}
|
|
462
473
|
}, V = ({
|
|
463
474
|
onValueChange: t,
|
|
@@ -482,17 +493,17 @@ const Zt = (t, e, n) => {
|
|
|
482
493
|
min: r,
|
|
483
494
|
step: l = 1,
|
|
484
495
|
contentRight: c,
|
|
485
|
-
disabled:
|
|
486
|
-
className:
|
|
487
|
-
hideButtons:
|
|
488
|
-
...
|
|
496
|
+
disabled: i,
|
|
497
|
+
className: d,
|
|
498
|
+
hideButtons: s,
|
|
499
|
+
..._
|
|
489
500
|
}) => {
|
|
490
501
|
const p = w(
|
|
491
502
|
(f) => {
|
|
492
503
|
C({ onValueChange: e, value: t, numSteps: f, min: r, max: n });
|
|
493
504
|
},
|
|
494
505
|
[t, n, r, e]
|
|
495
|
-
),
|
|
506
|
+
), u = w(
|
|
496
507
|
(f) => {
|
|
497
508
|
V({ onValueChange: e, newValue: f, min: r, max: n });
|
|
498
509
|
},
|
|
@@ -501,7 +512,7 @@ const Zt = (t, e, n) => {
|
|
|
501
512
|
return /* @__PURE__ */ o(
|
|
502
513
|
Z,
|
|
503
514
|
{
|
|
504
|
-
contentRight:
|
|
515
|
+
contentRight: s ? c : /* @__PURE__ */ h(R, { children: [
|
|
505
516
|
c && /* @__PURE__ */ h(R, { children: [
|
|
506
517
|
c,
|
|
507
518
|
/* @__PURE__ */ o(m, {})
|
|
@@ -509,23 +520,23 @@ const Zt = (t, e, n) => {
|
|
|
509
520
|
/* @__PURE__ */ o(
|
|
510
521
|
Tt,
|
|
511
522
|
{
|
|
512
|
-
onClickUp:
|
|
513
|
-
onClickDown:
|
|
523
|
+
onClickUp: i ? void 0 : () => p(l),
|
|
524
|
+
onClickDown: i ? void 0 : () => p(-l),
|
|
514
525
|
iconColor: "var(--swui-textinput-text-color)",
|
|
515
|
-
disabled:
|
|
526
|
+
disabled: i
|
|
516
527
|
}
|
|
517
528
|
)
|
|
518
529
|
] }),
|
|
519
530
|
value: t,
|
|
520
|
-
onValueChange:
|
|
521
|
-
disableContentPaddingRight: !
|
|
531
|
+
onValueChange: u,
|
|
532
|
+
disableContentPaddingRight: !s,
|
|
522
533
|
type: "number",
|
|
523
534
|
min: r,
|
|
524
535
|
max: n,
|
|
525
536
|
step: l,
|
|
526
|
-
className: x(me.numericTextInputInput,
|
|
527
|
-
disabled:
|
|
528
|
-
...
|
|
537
|
+
className: x(me.numericTextInputInput, d),
|
|
538
|
+
disabled: i,
|
|
539
|
+
..._
|
|
529
540
|
}
|
|
530
541
|
);
|
|
531
542
|
}, Ve = (t, e) => {
|
|
@@ -566,27 +577,27 @@ const Zt = (t, e, n) => {
|
|
|
566
577
|
max: r,
|
|
567
578
|
min: l,
|
|
568
579
|
step: c = 1,
|
|
569
|
-
...
|
|
580
|
+
...i
|
|
570
581
|
}) => {
|
|
571
|
-
const
|
|
572
|
-
(
|
|
573
|
-
C({ onValueChange: e, value: n, numSteps:
|
|
582
|
+
const d = w(
|
|
583
|
+
(_) => {
|
|
584
|
+
C({ onValueChange: e, value: n, numSteps: _, min: l, max: r });
|
|
574
585
|
},
|
|
575
586
|
[n, r, l, e]
|
|
576
|
-
),
|
|
577
|
-
(
|
|
578
|
-
V({ onValueChange: e, newValue:
|
|
587
|
+
), s = w(
|
|
588
|
+
(_) => {
|
|
589
|
+
V({ onValueChange: e, newValue: _, min: l, max: r });
|
|
579
590
|
},
|
|
580
591
|
[r, l, e]
|
|
581
592
|
);
|
|
582
593
|
return /* @__PURE__ */ h(T, { role: "group", children: [
|
|
583
594
|
/* @__PURE__ */ o(
|
|
584
|
-
|
|
595
|
+
K,
|
|
585
596
|
{
|
|
586
597
|
leftIcon: St,
|
|
587
598
|
"aria-label": "Decrease",
|
|
588
599
|
disabled: t || be(n, l),
|
|
589
|
-
onClick: () =>
|
|
600
|
+
onClick: () => d(-c)
|
|
590
601
|
}
|
|
591
602
|
),
|
|
592
603
|
/* @__PURE__ */ o(m, {}),
|
|
@@ -594,23 +605,23 @@ const Zt = (t, e, n) => {
|
|
|
594
605
|
xe,
|
|
595
606
|
{
|
|
596
607
|
hideButtons: !0,
|
|
597
|
-
onValueChange:
|
|
608
|
+
onValueChange: s,
|
|
598
609
|
value: n,
|
|
599
610
|
max: r,
|
|
600
611
|
min: l,
|
|
601
612
|
step: c,
|
|
602
613
|
disabled: t,
|
|
603
|
-
...
|
|
614
|
+
...i
|
|
604
615
|
}
|
|
605
616
|
),
|
|
606
617
|
/* @__PURE__ */ o(m, {}),
|
|
607
618
|
/* @__PURE__ */ o(
|
|
608
|
-
|
|
619
|
+
K,
|
|
609
620
|
{
|
|
610
621
|
leftIcon: Nt,
|
|
611
622
|
"aria-label": "Increase",
|
|
612
623
|
disabled: t || we(n, r),
|
|
613
|
-
onClick: () =>
|
|
624
|
+
onClick: () => d(c)
|
|
614
625
|
}
|
|
615
626
|
)
|
|
616
627
|
] });
|
|
@@ -642,7 +653,7 @@ const Zt = (t, e, n) => {
|
|
|
642
653
|
A,
|
|
643
654
|
{
|
|
644
655
|
variant: "bold",
|
|
645
|
-
color:
|
|
656
|
+
color: L(t ? "--silver" : "--tjara"),
|
|
646
657
|
size: "small",
|
|
647
658
|
whiteSpace: "nowrap",
|
|
648
659
|
...It(n),
|
|
@@ -680,13 +691,13 @@ const Zt = (t, e, n) => {
|
|
|
680
691
|
label: r,
|
|
681
692
|
screenReaderLabel: l,
|
|
682
693
|
borderVariant: c = "normalBorder",
|
|
683
|
-
variant:
|
|
684
|
-
children:
|
|
685
|
-
...
|
|
694
|
+
variant: i = "normal",
|
|
695
|
+
children: d,
|
|
696
|
+
...s
|
|
686
697
|
}) => {
|
|
687
|
-
const
|
|
688
|
-
(
|
|
689
|
-
t == null || t(
|
|
698
|
+
const _ = E(), p = n ?? _, u = w(
|
|
699
|
+
(a) => {
|
|
700
|
+
t == null || t(a), e == null || e(a.target.value);
|
|
690
701
|
},
|
|
691
702
|
[t, e]
|
|
692
703
|
);
|
|
@@ -695,7 +706,7 @@ const Zt = (t, e, n) => {
|
|
|
695
706
|
{
|
|
696
707
|
className: x(
|
|
697
708
|
k.labelledSelect,
|
|
698
|
-
k[
|
|
709
|
+
k[i],
|
|
699
710
|
k[c]
|
|
700
711
|
),
|
|
701
712
|
children: [
|
|
@@ -712,18 +723,18 @@ const Zt = (t, e, n) => {
|
|
|
712
723
|
"select",
|
|
713
724
|
{
|
|
714
725
|
id: p,
|
|
715
|
-
onChange:
|
|
716
|
-
className: x(k.select, k[
|
|
717
|
-
...
|
|
718
|
-
children:
|
|
726
|
+
onChange: u,
|
|
727
|
+
className: x(k.select, k[i]),
|
|
728
|
+
...s,
|
|
729
|
+
children: d
|
|
719
730
|
}
|
|
720
731
|
),
|
|
721
732
|
/* @__PURE__ */ o("div", { className: x(k.iconWrapper), children: /* @__PURE__ */ o(
|
|
722
|
-
|
|
733
|
+
G,
|
|
723
734
|
{
|
|
724
735
|
icon: qt,
|
|
725
736
|
size: 24,
|
|
726
|
-
color:
|
|
737
|
+
color: L("--modern-blue")
|
|
727
738
|
}
|
|
728
739
|
) })
|
|
729
740
|
]
|
|
@@ -747,19 +758,19 @@ const Zt = (t, e, n) => {
|
|
|
747
758
|
screenReaderLabel: r,
|
|
748
759
|
size: l = "medium",
|
|
749
760
|
value: c,
|
|
750
|
-
onChange:
|
|
751
|
-
disabled:
|
|
752
|
-
onValueChange:
|
|
753
|
-
borderRadiusVariant:
|
|
761
|
+
onChange: i,
|
|
762
|
+
disabled: d,
|
|
763
|
+
onValueChange: s,
|
|
764
|
+
borderRadiusVariant: _ = "normalBorder",
|
|
754
765
|
variant: p = "normal",
|
|
755
|
-
width:
|
|
756
|
-
...
|
|
766
|
+
width: u,
|
|
767
|
+
...a
|
|
757
768
|
}, f) => {
|
|
758
|
-
const y =
|
|
769
|
+
const y = E(), I = n ?? y, B = w(
|
|
759
770
|
(g) => {
|
|
760
|
-
|
|
771
|
+
i == null || i(g), s == null || s(g.target.value);
|
|
761
772
|
},
|
|
762
|
-
[
|
|
773
|
+
[i, s]
|
|
763
774
|
);
|
|
764
775
|
return /* @__PURE__ */ h(
|
|
765
776
|
"div",
|
|
@@ -767,11 +778,11 @@ const Zt = (t, e, n) => {
|
|
|
767
778
|
className: x(
|
|
768
779
|
N.labelledTextInput,
|
|
769
780
|
N[p],
|
|
770
|
-
N[
|
|
781
|
+
N[_],
|
|
771
782
|
N[l],
|
|
772
|
-
|
|
783
|
+
d && N.disabled
|
|
773
784
|
),
|
|
774
|
-
style:
|
|
785
|
+
style: u ? { width: u } : void 0,
|
|
775
786
|
children: [
|
|
776
787
|
/* @__PURE__ */ o(
|
|
777
788
|
tt,
|
|
@@ -790,8 +801,8 @@ const Zt = (t, e, n) => {
|
|
|
790
801
|
type: "text",
|
|
791
802
|
value: c,
|
|
792
803
|
onChange: B,
|
|
793
|
-
disabled:
|
|
794
|
-
...
|
|
804
|
+
disabled: d,
|
|
805
|
+
...a
|
|
795
806
|
}
|
|
796
807
|
)
|
|
797
808
|
]
|
|
@@ -805,16 +816,16 @@ const Zt = (t, e, n) => {
|
|
|
805
816
|
wrapperStyle: r,
|
|
806
817
|
contentLeft: l,
|
|
807
818
|
contentRight: c,
|
|
808
|
-
disableContentPadding:
|
|
809
|
-
disableContentPaddingLeft:
|
|
810
|
-
disableContentPaddingRight:
|
|
811
|
-
iconRight:
|
|
819
|
+
disableContentPadding: i,
|
|
820
|
+
disableContentPaddingLeft: d,
|
|
821
|
+
disableContentPaddingRight: s,
|
|
822
|
+
iconRight: _,
|
|
812
823
|
iconLeft: p,
|
|
813
|
-
onClickLeft:
|
|
814
|
-
onClickRight:
|
|
824
|
+
onClickLeft: u,
|
|
825
|
+
onClickRight: a,
|
|
815
826
|
children: f
|
|
816
827
|
}) => {
|
|
817
|
-
const y = t === "success" ?
|
|
828
|
+
const y = t === "success" ? X : t === "warning" || t === "error" ? J : _, I = t === "loading" ? /* @__PURE__ */ o(Q, {}) : c;
|
|
818
829
|
return /* @__PURE__ */ h(
|
|
819
830
|
"div",
|
|
820
831
|
{
|
|
@@ -833,11 +844,11 @@ const Zt = (t, e, n) => {
|
|
|
833
844
|
H,
|
|
834
845
|
{
|
|
835
846
|
content: l,
|
|
836
|
-
disableContentPadding:
|
|
837
|
-
disableContentPaddingLeft:
|
|
838
|
-
disableContentPaddingRight:
|
|
847
|
+
disableContentPadding: i,
|
|
848
|
+
disableContentPaddingLeft: d,
|
|
849
|
+
disableContentPaddingRight: s,
|
|
839
850
|
spaceOnLeft: !0,
|
|
840
|
-
button: p ? /* @__PURE__ */ o(v, { onClick:
|
|
851
|
+
button: p ? /* @__PURE__ */ o(v, { onClick: u, icon: p }) : void 0
|
|
841
852
|
}
|
|
842
853
|
),
|
|
843
854
|
/* @__PURE__ */ o(T, { alignItems: "center", children: f }),
|
|
@@ -845,11 +856,11 @@ const Zt = (t, e, n) => {
|
|
|
845
856
|
H,
|
|
846
857
|
{
|
|
847
858
|
content: I,
|
|
848
|
-
disableContentPadding:
|
|
849
|
-
disableContentPaddingLeft:
|
|
850
|
-
disableContentPaddingRight:
|
|
859
|
+
disableContentPadding: i,
|
|
860
|
+
disableContentPaddingLeft: d,
|
|
861
|
+
disableContentPaddingRight: s,
|
|
851
862
|
spaceOnRight: !0,
|
|
852
|
-
button: y ? /* @__PURE__ */ o(v, { onClick:
|
|
863
|
+
button: y ? /* @__PURE__ */ o(v, { onClick: a, icon: y }) : void 0
|
|
853
864
|
}
|
|
854
865
|
)
|
|
855
866
|
]
|
|
@@ -865,28 +876,28 @@ const Zt = (t, e, n) => {
|
|
|
865
876
|
onChange: r,
|
|
866
877
|
resize: l = "none",
|
|
867
878
|
readOnly: c = !1,
|
|
868
|
-
rows:
|
|
869
|
-
disabled:
|
|
870
|
-
...
|
|
871
|
-
},
|
|
879
|
+
rows: i,
|
|
880
|
+
disabled: d,
|
|
881
|
+
...s
|
|
882
|
+
}, _) => {
|
|
872
883
|
const p = w(
|
|
873
|
-
(
|
|
874
|
-
r && r(
|
|
884
|
+
(u) => {
|
|
885
|
+
r && r(u), n && n(u.target.value);
|
|
875
886
|
},
|
|
876
887
|
[r, n]
|
|
877
888
|
);
|
|
878
889
|
return /* @__PURE__ */ o(
|
|
879
890
|
"textarea",
|
|
880
891
|
{
|
|
881
|
-
disabled:
|
|
882
|
-
rows:
|
|
892
|
+
disabled: d,
|
|
893
|
+
rows: i,
|
|
883
894
|
readOnly: c,
|
|
884
895
|
className: x(je.textArea, t),
|
|
885
896
|
style: { resize: l },
|
|
886
897
|
onChange: p,
|
|
887
898
|
value: e,
|
|
888
|
-
ref:
|
|
889
|
-
...
|
|
899
|
+
ref: _,
|
|
900
|
+
...s
|
|
890
901
|
}
|
|
891
902
|
);
|
|
892
903
|
}
|