@epam/ai-dial-ui-kit 0.2.0-rc.20 → 0.2.0-rc.22
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/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +268 -256
- package/dist/index.css +1 -1
- package/dist/src/components/Input/Input.d.ts +4 -4
- package/dist/src/components/InputField/InputField.d.ts +4 -4
- package/dist/src/components/NoDataContent/NoDataContent.d.ts +22 -0
- package/dist/src/components/TextAreaField/TextAreaField.d.ts +2 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/models/field-control-props.d.ts +2 -2
- package/package.json +1 -1
package/dist/dial-ui-kit.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as f, Fragment as ae } from "react/jsx-runtime";
|
|
2
2
|
import i from "classnames";
|
|
3
|
-
import { IconCircleCheck as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { useFloating as G, offset as
|
|
6
|
-
const W = ({ errorText: e }) => e && /* @__PURE__ */ r("span", { className: "text-error dial-tiny mt-1", children: e }),
|
|
3
|
+
import { IconCircleCheck as le, IconAlertTriangle as oe, IconAlertCircle as ie, IconInfoCircle as ce, IconX as M, IconLoader as de, IconMinus as ue, IconCheck as U, IconExclamationCircle as me, IconClipboardX as fe, IconEyeOff as pe, IconEye as xe, IconSearch as he } from "@tabler/icons-react";
|
|
4
|
+
import { createContext as ge, useState as _, useRef as be, useMemo as ye, useContext as Ce, forwardRef as $, isValidElement as ve, cloneElement as Ne, useCallback as S, useEffect as we } from "react";
|
|
5
|
+
import { useFloating as G, offset as De, flip as Ie, shift as ke, arrow as Re, autoUpdate as Se, useHover as Fe, useFocus as Ee, useDismiss as K, useRole as Z, useInteractions as X, useMergeRefs as q, FloatingPortal as Q, FloatingArrow as Te, FloatingOverlay as Pe, FloatingFocusManager as Ae } from "@floating-ui/react";
|
|
6
|
+
const W = ({ errorText: e }) => e && /* @__PURE__ */ r("span", { className: "text-error dial-tiny mt-1", children: e }), O = ({
|
|
7
7
|
fieldTitle: e,
|
|
8
8
|
htmlFor: n,
|
|
9
9
|
optional: t,
|
|
10
10
|
optionalText: s,
|
|
11
11
|
cssClass: a
|
|
12
|
-
}) => e ? /* @__PURE__ */
|
|
12
|
+
}) => e ? /* @__PURE__ */ f(
|
|
13
13
|
"label",
|
|
14
14
|
{
|
|
15
15
|
className: i(
|
|
@@ -25,7 +25,7 @@ const W = ({ errorText: e }) => e && /* @__PURE__ */ r("span", { className: "tex
|
|
|
25
25
|
}
|
|
26
26
|
) : null, D = ({ icon: e, className: n }) => e ? /* @__PURE__ */ r("span", { className: i("flex-shrink-0", n), children: e }) : null;
|
|
27
27
|
var v = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e.Tertiary = "tertiary", e.Danger = "danger", e))(v || {});
|
|
28
|
-
const
|
|
28
|
+
const Le = {
|
|
29
29
|
[v.Primary]: "dial-primary-button",
|
|
30
30
|
[v.Secondary]: "dial-secondary-button",
|
|
31
31
|
[v.Tertiary]: "dial-tertiary-button",
|
|
@@ -36,68 +36,68 @@ const ze = {
|
|
|
36
36
|
cssClass: t,
|
|
37
37
|
ref: s,
|
|
38
38
|
onClick: a,
|
|
39
|
-
disable:
|
|
40
|
-
iconAfter:
|
|
39
|
+
disable: l,
|
|
40
|
+
iconAfter: o,
|
|
41
41
|
iconBefore: c,
|
|
42
42
|
hideTitleOnMobile: d,
|
|
43
43
|
ariaLabel: u
|
|
44
44
|
}) => {
|
|
45
45
|
const m = i(
|
|
46
46
|
"dial-small-semi",
|
|
47
|
-
|
|
47
|
+
o ? "mr-2" : "",
|
|
48
48
|
c ? "ml-2" : "",
|
|
49
49
|
d ? "hidden sm:inline" : "inline"
|
|
50
50
|
), x = i(
|
|
51
|
-
n &&
|
|
51
|
+
n && Le[n],
|
|
52
52
|
t,
|
|
53
53
|
"focus-visible:outline outline-offset-0"
|
|
54
54
|
);
|
|
55
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ f(
|
|
56
56
|
"button",
|
|
57
57
|
{
|
|
58
58
|
ref: s,
|
|
59
59
|
type: "button",
|
|
60
60
|
className: x,
|
|
61
61
|
onClick: (h) => a?.(h),
|
|
62
|
-
disabled:
|
|
62
|
+
disabled: l,
|
|
63
63
|
"aria-label": e || u,
|
|
64
64
|
children: [
|
|
65
65
|
/* @__PURE__ */ r(D, { icon: c }),
|
|
66
66
|
e && /* @__PURE__ */ r("span", { className: m, children: e }),
|
|
67
|
-
/* @__PURE__ */ r(D, { icon:
|
|
67
|
+
/* @__PURE__ */ r(D, { icon: o })
|
|
68
68
|
]
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
};
|
|
72
72
|
var k = /* @__PURE__ */ ((e) => (e.Info = "info", e.Success = "success", e.Warning = "warning", e.Error = "error", e))(k || {});
|
|
73
|
-
const
|
|
73
|
+
const ze = {
|
|
74
74
|
info: /* @__PURE__ */ r(ce, { size: 24, stroke: 2 }),
|
|
75
75
|
error: /* @__PURE__ */ r(ie, { size: 24, stroke: 2 }),
|
|
76
|
-
warning: /* @__PURE__ */ r(
|
|
77
|
-
success: /* @__PURE__ */ r(
|
|
78
|
-
},
|
|
76
|
+
warning: /* @__PURE__ */ r(oe, { size: 24, stroke: 2 }),
|
|
77
|
+
success: /* @__PURE__ */ r(le, { size: 24, stroke: 2 })
|
|
78
|
+
}, Be = {
|
|
79
79
|
[k.Info]: "bg-info border-info text-info",
|
|
80
80
|
[k.Success]: "bg-success border-success text-success",
|
|
81
81
|
[k.Warning]: "bg-warning border-warning text-warning",
|
|
82
82
|
[k.Error]: "bg-error border-error text-error"
|
|
83
|
-
},
|
|
83
|
+
}, Oe = "items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex", kr = ({
|
|
84
84
|
variant: e = k.Info,
|
|
85
85
|
message: n,
|
|
86
86
|
cssClass: t,
|
|
87
87
|
closable: s = !1,
|
|
88
88
|
onClose: a
|
|
89
|
-
}) => /* @__PURE__ */
|
|
89
|
+
}) => /* @__PURE__ */ f(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
92
|
role: "alert",
|
|
93
93
|
className: i(
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
Oe,
|
|
95
|
+
Be[e],
|
|
96
96
|
t
|
|
97
97
|
),
|
|
98
98
|
children: [
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */ r(D, { icon:
|
|
99
|
+
/* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
|
|
100
|
+
/* @__PURE__ */ r(D, { icon: ze[e] }),
|
|
101
101
|
/* @__PURE__ */ r("div", { className: "text-primary", children: n })
|
|
102
102
|
] }),
|
|
103
103
|
s && /* @__PURE__ */ r(
|
|
@@ -105,13 +105,13 @@ const Ae = {
|
|
|
105
105
|
{
|
|
106
106
|
cssClass: "ml-2 text-secondary hover:text-primary",
|
|
107
107
|
ariaLabel: "Close alert",
|
|
108
|
-
iconBefore: /* @__PURE__ */ r(
|
|
109
|
-
onClick: (
|
|
108
|
+
iconBefore: /* @__PURE__ */ r(M, { size: 16 }),
|
|
109
|
+
onClick: (l) => a?.(l)
|
|
110
110
|
}
|
|
111
111
|
)
|
|
112
112
|
]
|
|
113
113
|
}
|
|
114
|
-
),
|
|
114
|
+
), Ve = "flex items-center justify-center text-secondary", je = "shrink-0 grow-0 basis-auto animate-spin-steps", Me = ({
|
|
115
115
|
size: e = 18,
|
|
116
116
|
cssClass: n,
|
|
117
117
|
iconClass: t,
|
|
@@ -123,7 +123,7 @@ const Ae = {
|
|
|
123
123
|
role: "status",
|
|
124
124
|
"aria-label": a,
|
|
125
125
|
className: i({
|
|
126
|
-
[
|
|
126
|
+
[Ve]: !0,
|
|
127
127
|
"w-full h-full": s,
|
|
128
128
|
[n || ""]: !!n
|
|
129
129
|
}),
|
|
@@ -135,71 +135,71 @@ const Ae = {
|
|
|
135
135
|
{
|
|
136
136
|
width: e,
|
|
137
137
|
height: e,
|
|
138
|
-
className: i(
|
|
138
|
+
className: i(je, t)
|
|
139
139
|
}
|
|
140
140
|
)
|
|
141
141
|
}
|
|
142
142
|
)
|
|
143
143
|
}
|
|
144
|
-
),
|
|
145
|
-
const e =
|
|
144
|
+
), _e = 7, We = 2, Y = ge(null), J = () => {
|
|
145
|
+
const e = Ce(Y);
|
|
146
146
|
if (e == null)
|
|
147
147
|
throw new Error("Tooltip components must be wrapped in <Tooltip />");
|
|
148
148
|
return e;
|
|
149
|
-
},
|
|
149
|
+
}, He = ({
|
|
150
150
|
initialOpen: e = !1,
|
|
151
151
|
placement: n = "bottom",
|
|
152
152
|
isTriggerClickable: t = !1,
|
|
153
153
|
open: s,
|
|
154
154
|
onOpenChange: a
|
|
155
155
|
} = {}) => {
|
|
156
|
-
const [
|
|
156
|
+
const [l, o] = _(e), c = be(null), d = s ?? l, u = a ?? o, m = G({
|
|
157
157
|
placement: n,
|
|
158
158
|
open: d,
|
|
159
159
|
onOpenChange: u,
|
|
160
160
|
whileElementsMounted: Se,
|
|
161
161
|
middleware: [
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
De(_e + We),
|
|
163
|
+
Ie({
|
|
164
164
|
crossAxis: n.includes("-"),
|
|
165
165
|
fallbackAxisSideDirection: "start",
|
|
166
166
|
padding: 5
|
|
167
167
|
}),
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
ke({ padding: 5 }),
|
|
169
|
+
Re({
|
|
170
170
|
element: c
|
|
171
171
|
})
|
|
172
172
|
]
|
|
173
|
-
}), x =
|
|
173
|
+
}), x = Fe(m.context, {
|
|
174
174
|
move: !1,
|
|
175
175
|
enabled: s == null,
|
|
176
176
|
mouseOnly: t,
|
|
177
177
|
delay: { open: 500, close: 0 }
|
|
178
|
-
}), h =
|
|
178
|
+
}), h = Ee(m.context, {
|
|
179
179
|
enabled: s == null
|
|
180
|
-
}), g = K(m.context), y = Z(m.context, { role: "tooltip" }),
|
|
181
|
-
return
|
|
180
|
+
}), g = K(m.context), y = Z(m.context, { role: "tooltip" }), p = X([x, h, g, y]);
|
|
181
|
+
return ye(
|
|
182
182
|
() => ({
|
|
183
183
|
open: d,
|
|
184
184
|
setOpen: u,
|
|
185
185
|
arrowRef: c,
|
|
186
|
-
...
|
|
186
|
+
...p,
|
|
187
187
|
...m
|
|
188
188
|
}),
|
|
189
|
-
[d, u,
|
|
189
|
+
[d, u, p, m]
|
|
190
190
|
);
|
|
191
|
-
},
|
|
191
|
+
}, Ue = ({
|
|
192
192
|
children: e,
|
|
193
193
|
...n
|
|
194
194
|
}) => {
|
|
195
|
-
const t =
|
|
195
|
+
const t = He(n);
|
|
196
196
|
return /* @__PURE__ */ r(Y.Provider, { value: t, children: e });
|
|
197
|
-
},
|
|
198
|
-
const a = J(),
|
|
199
|
-
return a.open ? /* @__PURE__ */ r(
|
|
197
|
+
}, $e = $(function({ style: n, ...t }, s) {
|
|
198
|
+
const a = J(), l = q([a.refs.setFloating, s]);
|
|
199
|
+
return a.open ? /* @__PURE__ */ r(Q, { id: "tooltip-portal", children: /* @__PURE__ */ f(
|
|
200
200
|
"div",
|
|
201
201
|
{
|
|
202
|
-
ref:
|
|
202
|
+
ref: l,
|
|
203
203
|
style: {
|
|
204
204
|
...a.floatingStyles,
|
|
205
205
|
...n
|
|
@@ -212,7 +212,7 @@ const Ae = {
|
|
|
212
212
|
children: [
|
|
213
213
|
t.children,
|
|
214
214
|
/* @__PURE__ */ r(
|
|
215
|
-
|
|
215
|
+
Te,
|
|
216
216
|
{
|
|
217
217
|
ref: a.arrowRef,
|
|
218
218
|
context: a.context,
|
|
@@ -224,11 +224,11 @@ const Ae = {
|
|
|
224
224
|
]
|
|
225
225
|
}
|
|
226
226
|
) }) : null;
|
|
227
|
-
}),
|
|
228
|
-
const
|
|
229
|
-
return t &&
|
|
227
|
+
}), Ge = $(function({ children: n, asChild: t = !1, ...s }, a) {
|
|
228
|
+
const l = J(), c = n && typeof n == "object" && "ref" in n && n.ref !== void 0 ? n.ref : void 0, d = q([l.refs.setReference, a, c]);
|
|
229
|
+
return t && ve(n) ? Ne(
|
|
230
230
|
n,
|
|
231
|
-
|
|
231
|
+
l.getReferenceProps({
|
|
232
232
|
ref: d,
|
|
233
233
|
...s,
|
|
234
234
|
...n.props
|
|
@@ -237,22 +237,22 @@ const Ae = {
|
|
|
237
237
|
"span",
|
|
238
238
|
{
|
|
239
239
|
ref: d,
|
|
240
|
-
...
|
|
240
|
+
...l.getReferenceProps(s),
|
|
241
241
|
className: s.className ?? "dial-tooltip-trigger text-left",
|
|
242
242
|
children: n
|
|
243
243
|
}
|
|
244
244
|
);
|
|
245
|
-
}),
|
|
245
|
+
}), V = ({
|
|
246
246
|
hideTooltip: e,
|
|
247
247
|
tooltip: n,
|
|
248
248
|
children: t,
|
|
249
249
|
triggerClassName: s,
|
|
250
250
|
contentClassName: a,
|
|
251
|
-
...
|
|
252
|
-
}) => /* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */ r(
|
|
251
|
+
...l
|
|
252
|
+
}) => /* @__PURE__ */ f(Ue, { ...l, children: [
|
|
253
|
+
/* @__PURE__ */ r(Ge, { className: i(s, "truncate"), children: t }),
|
|
254
254
|
/* @__PURE__ */ r(
|
|
255
|
-
|
|
255
|
+
$e,
|
|
256
256
|
{
|
|
257
257
|
className: i(
|
|
258
258
|
"text-primary",
|
|
@@ -263,23 +263,23 @@ const Ae = {
|
|
|
263
263
|
children: n
|
|
264
264
|
}
|
|
265
265
|
)
|
|
266
|
-
] }),
|
|
267
|
-
size:
|
|
266
|
+
] }), Ke = 18, A = {
|
|
267
|
+
size: Ke,
|
|
268
268
|
stroke: 2
|
|
269
|
-
},
|
|
269
|
+
}, Rr = ({
|
|
270
270
|
label: e,
|
|
271
271
|
id: n,
|
|
272
272
|
checked: t,
|
|
273
273
|
indeterminate: s,
|
|
274
274
|
disabled: a,
|
|
275
|
-
ariaLabel:
|
|
276
|
-
onChange:
|
|
275
|
+
ariaLabel: l,
|
|
276
|
+
onChange: o
|
|
277
277
|
}) => {
|
|
278
|
-
const c =
|
|
278
|
+
const c = S(
|
|
279
279
|
(m) => {
|
|
280
|
-
m.stopPropagation(),
|
|
280
|
+
m.stopPropagation(), o?.(m.target.checked, n);
|
|
281
281
|
},
|
|
282
|
-
[
|
|
282
|
+
[o, n]
|
|
283
283
|
), d = i(
|
|
284
284
|
"flex flex-row items-center cursor-pointer text-accent-primary small-medium flex-1 min-w-0",
|
|
285
285
|
`${t ? "" : 'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded before:mr-2'}`,
|
|
@@ -288,9 +288,9 @@ const Ae = {
|
|
|
288
288
|
"mr-2 border rounded",
|
|
289
289
|
a ? "bg-layer-4 border-icon-secondary" : ""
|
|
290
290
|
);
|
|
291
|
-
return /* @__PURE__ */
|
|
291
|
+
return /* @__PURE__ */ f("label", { className: d, htmlFor: n, children: [
|
|
292
292
|
t && (s ? /* @__PURE__ */ r(ue, { className: u, ...A }) : /* @__PURE__ */ r(U, { className: u, ...A })),
|
|
293
|
-
e && /* @__PURE__ */ r(
|
|
293
|
+
e && /* @__PURE__ */ r(V, { tooltip: e, triggerClassName: "flex-1 min-w-0", children: /* @__PURE__ */ r("p", { className: "text-primary w-full truncate", children: e }) }),
|
|
294
294
|
/* @__PURE__ */ r(
|
|
295
295
|
"input",
|
|
296
296
|
{
|
|
@@ -300,14 +300,14 @@ const Ae = {
|
|
|
300
300
|
checked: t,
|
|
301
301
|
"aria-checked": s ? "mixed" : t,
|
|
302
302
|
"aria-disabled": a || void 0,
|
|
303
|
-
"aria-label": e ? void 0 :
|
|
303
|
+
"aria-label": e ? void 0 : l,
|
|
304
304
|
className: "invisible w-0 h-0"
|
|
305
305
|
}
|
|
306
306
|
)
|
|
307
307
|
] });
|
|
308
308
|
};
|
|
309
309
|
var C = /* @__PURE__ */ ((e) => (e.VALID = "valid", e.ERROR = "error", e))(C || {});
|
|
310
|
-
const
|
|
310
|
+
const Ze = (e, n) => {
|
|
311
311
|
if (n === e.id)
|
|
312
312
|
switch (e.status) {
|
|
313
313
|
case C.VALID:
|
|
@@ -325,7 +325,7 @@ const Ke = (e, n) => {
|
|
|
325
325
|
default:
|
|
326
326
|
return "border-primary text-secondary";
|
|
327
327
|
}
|
|
328
|
-
},
|
|
328
|
+
}, Xe = (e, n) => {
|
|
329
329
|
if (n === e.id)
|
|
330
330
|
switch (e.status) {
|
|
331
331
|
case C.VALID:
|
|
@@ -349,40 +349,40 @@ const Ke = (e, n) => {
|
|
|
349
349
|
currentStep: t,
|
|
350
350
|
onChangeStep: s
|
|
351
351
|
}) => {
|
|
352
|
-
const a = "h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny border-t-2 cursor-pointer",
|
|
353
|
-
return /* @__PURE__ */
|
|
352
|
+
const a = "h-[32px] flex flex-1 min-w-[180px] items-center dial-tiny border-t-2 cursor-pointer", l = "w-[22px] h-[22px] flex justify-center items-center mr-2 rounded-full text-white", o = () => t === e.id && e.status === C.ERROR ? /* @__PURE__ */ r(me, { stroke: 2, size: 16 }) : t !== e.id && e.status === C.VALID ? /* @__PURE__ */ r(U, { stroke: 2, size: 16 }) : n + 1;
|
|
353
|
+
return /* @__PURE__ */ f(
|
|
354
354
|
"button",
|
|
355
355
|
{
|
|
356
|
-
className: i(a,
|
|
356
|
+
className: i(a, Ze(e, t)),
|
|
357
357
|
onClick: () => s(e.id),
|
|
358
358
|
children: [
|
|
359
359
|
/* @__PURE__ */ r(
|
|
360
360
|
"span",
|
|
361
361
|
{
|
|
362
|
-
className: i(
|
|
363
|
-
children:
|
|
362
|
+
className: i(l, Xe(e, t)),
|
|
363
|
+
children: o()
|
|
364
364
|
}
|
|
365
365
|
),
|
|
366
366
|
/* @__PURE__ */ r("span", { children: e.name })
|
|
367
367
|
]
|
|
368
368
|
}
|
|
369
369
|
);
|
|
370
|
-
},
|
|
370
|
+
}, Sr = ({
|
|
371
371
|
steps: e,
|
|
372
372
|
currentStep: n,
|
|
373
373
|
onChangeStep: t
|
|
374
374
|
}) => {
|
|
375
375
|
const s = (a) => {
|
|
376
|
-
const
|
|
377
|
-
(a !== n && e[
|
|
376
|
+
const l = e.findIndex((c) => c.id === n), o = e.findIndex((c) => c.id === a);
|
|
377
|
+
(a !== n && e[l].status === C.VALID || o < l) && t(a);
|
|
378
378
|
};
|
|
379
|
-
return /* @__PURE__ */ r("div", { id: "steps", className: "flex gap-x-3", children: e.map((a,
|
|
379
|
+
return /* @__PURE__ */ r("div", { id: "steps", className: "flex gap-x-3", children: e.map((a, l) => /* @__PURE__ */ r(
|
|
380
380
|
qe,
|
|
381
381
|
{
|
|
382
382
|
currentStep: n,
|
|
383
383
|
onChangeStep: s,
|
|
384
384
|
step: a,
|
|
385
|
-
index:
|
|
385
|
+
index: l
|
|
386
386
|
},
|
|
387
387
|
a.id
|
|
388
388
|
)) });
|
|
@@ -392,32 +392,32 @@ const Ke = (e, n) => {
|
|
|
392
392
|
title: t,
|
|
393
393
|
description: s,
|
|
394
394
|
checked: a = !1,
|
|
395
|
-
inputId:
|
|
396
|
-
cssClass:
|
|
395
|
+
inputId: l,
|
|
396
|
+
cssClass: o,
|
|
397
397
|
labelCssClass: c,
|
|
398
398
|
disabled: d,
|
|
399
399
|
onChange: u,
|
|
400
400
|
descriptionCssClass: m
|
|
401
401
|
}) => {
|
|
402
|
-
const x = `${
|
|
402
|
+
const x = `${l}-desc`, h = i(
|
|
403
403
|
"dial-small cursor-pointer",
|
|
404
404
|
d ? "text-secondary" : "text-primary",
|
|
405
405
|
c
|
|
406
406
|
), g = i(
|
|
407
407
|
"cursor-pointer dial-input-radio",
|
|
408
408
|
t && "mr-2",
|
|
409
|
-
|
|
410
|
-
), y = i("flex flex-col", !!s && "mb-2"),
|
|
409
|
+
o
|
|
410
|
+
), y = i("flex flex-col", !!s && "mb-2"), p = i(
|
|
411
411
|
"dial-tiny mt-2 ml-[26px] text-secondary",
|
|
412
412
|
m
|
|
413
413
|
);
|
|
414
|
-
return /* @__PURE__ */
|
|
415
|
-
/* @__PURE__ */
|
|
414
|
+
return /* @__PURE__ */ f("div", { className: y, children: [
|
|
415
|
+
/* @__PURE__ */ f("div", { className: "flex flex-row items-center", children: [
|
|
416
416
|
/* @__PURE__ */ r(
|
|
417
417
|
"input",
|
|
418
418
|
{
|
|
419
419
|
type: "radio",
|
|
420
|
-
id:
|
|
420
|
+
id: l,
|
|
421
421
|
name: e,
|
|
422
422
|
value: n,
|
|
423
423
|
checked: a,
|
|
@@ -429,27 +429,27 @@ const Ke = (e, n) => {
|
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
),
|
|
432
|
-
t ? /* @__PURE__ */ r("label", { className: h, htmlFor:
|
|
432
|
+
t ? /* @__PURE__ */ r("label", { className: h, htmlFor: l, children: t }) : null
|
|
433
433
|
] }),
|
|
434
|
-
a && s && /* @__PURE__ */ r("div", { id: x, className:
|
|
434
|
+
a && s && /* @__PURE__ */ r("div", { id: x, className: p, children: s })
|
|
435
435
|
] });
|
|
436
436
|
};
|
|
437
437
|
var j = /* @__PURE__ */ ((e) => (e.Row = "Row", e.Column = "Column", e))(j || {});
|
|
438
|
-
const
|
|
438
|
+
const Ye = "flex flex-col gap-2", Je = "flex", er = "pb-1 mt-2", rr = {
|
|
439
439
|
[j.Column]: "flex-col gap-y-3",
|
|
440
440
|
[j.Row]: "flex-row gap-x-6"
|
|
441
|
-
},
|
|
441
|
+
}, Fr = ({
|
|
442
442
|
fieldTitle: e,
|
|
443
443
|
radioCssClass: n,
|
|
444
444
|
labelCssClass: t,
|
|
445
445
|
disabled: s,
|
|
446
446
|
elementId: a,
|
|
447
|
-
radioButtons:
|
|
448
|
-
activeRadioButton:
|
|
447
|
+
radioButtons: l,
|
|
448
|
+
activeRadioButton: o,
|
|
449
449
|
orientation: c,
|
|
450
450
|
onChange: d
|
|
451
|
-
}) => /* @__PURE__ */
|
|
452
|
-
e && /* @__PURE__ */ r(
|
|
451
|
+
}) => /* @__PURE__ */ f("div", { className: Ye, children: [
|
|
452
|
+
e && /* @__PURE__ */ r(O, { fieldTitle: e, htmlFor: a }),
|
|
453
453
|
/* @__PURE__ */ r(
|
|
454
454
|
"div",
|
|
455
455
|
{
|
|
@@ -457,10 +457,10 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
457
457
|
"aria-label": e,
|
|
458
458
|
"aria-disabled": s || void 0,
|
|
459
459
|
className: i(
|
|
460
|
-
|
|
461
|
-
|
|
460
|
+
Je,
|
|
461
|
+
rr[c]
|
|
462
462
|
),
|
|
463
|
-
children:
|
|
463
|
+
children: l.map((u) => /* @__PURE__ */ f("div", { className: "flex flex-col", children: [
|
|
464
464
|
/* @__PURE__ */ r(
|
|
465
465
|
Qe,
|
|
466
466
|
{
|
|
@@ -471,15 +471,23 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
471
471
|
cssClass: n,
|
|
472
472
|
labelCssClass: t,
|
|
473
473
|
title: u.name,
|
|
474
|
-
checked: u.id ===
|
|
474
|
+
checked: u.id === o,
|
|
475
475
|
onChange: () => d(u.id)
|
|
476
476
|
}
|
|
477
477
|
),
|
|
478
|
-
u.id ===
|
|
478
|
+
u.id === o && u.content ? /* @__PURE__ */ r("div", { className: er, children: u.content }) : null
|
|
479
479
|
] }, u.id))
|
|
480
480
|
}
|
|
481
481
|
)
|
|
482
|
-
] }),
|
|
482
|
+
] }), Er = ({
|
|
483
|
+
icon: e,
|
|
484
|
+
title: n,
|
|
485
|
+
description: t
|
|
486
|
+
}) => /* @__PURE__ */ f("div", { className: "h-full w-full flex flex-col items-center justify-center text-secondary", children: [
|
|
487
|
+
e || /* @__PURE__ */ r(fe, { width: 60, height: 60 }),
|
|
488
|
+
/* @__PURE__ */ r("span", { className: "small mt-2 text-primary", children: n }),
|
|
489
|
+
t && /* @__PURE__ */ r("span", { className: "mt-1 text-primary", children: t })
|
|
490
|
+
] }), nr = ({
|
|
483
491
|
ariaLabel: e,
|
|
484
492
|
cssClass: n,
|
|
485
493
|
size: t = 24,
|
|
@@ -490,18 +498,18 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
490
498
|
ariaLabel: e,
|
|
491
499
|
cssClass: i("text-secondary hover:text-accent-primary", n),
|
|
492
500
|
onClick: s,
|
|
493
|
-
iconBefore: /* @__PURE__ */ r(
|
|
501
|
+
iconBefore: /* @__PURE__ */ r(M, { size: t })
|
|
494
502
|
}
|
|
495
|
-
),
|
|
503
|
+
), tr = ({
|
|
496
504
|
value: e,
|
|
497
505
|
textareaId: n,
|
|
498
506
|
placeholder: t,
|
|
499
507
|
cssClass: s = "",
|
|
500
508
|
disabled: a,
|
|
501
|
-
invalid:
|
|
502
|
-
readonly:
|
|
509
|
+
invalid: l,
|
|
510
|
+
readonly: o,
|
|
503
511
|
onChange: c
|
|
504
|
-
}) => /* @__PURE__ */ r(
|
|
512
|
+
}) => /* @__PURE__ */ r(V, { tooltip: e, triggerClassName: "flex", children: /* @__PURE__ */ r(
|
|
505
513
|
"textarea",
|
|
506
514
|
{
|
|
507
515
|
id: n,
|
|
@@ -510,14 +518,14 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
510
518
|
disabled: a,
|
|
511
519
|
className: i(
|
|
512
520
|
"dial-textarea dial-input px-3 py-2",
|
|
513
|
-
|
|
521
|
+
l ? "dial-input-error" : "",
|
|
514
522
|
a && "dial-input-disable",
|
|
515
|
-
|
|
523
|
+
o && "dial-input-readonly",
|
|
516
524
|
s
|
|
517
525
|
),
|
|
518
|
-
onChange: (d) => !
|
|
526
|
+
onChange: (d) => !o && c?.(d.currentTarget.value)
|
|
519
527
|
}
|
|
520
|
-
) }),
|
|
528
|
+
) }), sr = [
|
|
521
529
|
"ArrowLeft",
|
|
522
530
|
"ArrowRight",
|
|
523
531
|
"ArrowUp",
|
|
@@ -529,14 +537,14 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
529
537
|
"Escape",
|
|
530
538
|
"Home",
|
|
531
539
|
"End"
|
|
532
|
-
],
|
|
533
|
-
if ((n === "number" || t !== void 0 || s !== void 0) && !
|
|
540
|
+
], ar = (e, n, t, s) => {
|
|
541
|
+
if ((n === "number" || t !== void 0 || s !== void 0) && !sr.includes(e.key) && !(e.key === "-" && e.currentTarget.selectionStart === 0 && (t === void 0 || t < 0)) && !(e.key === "." && n === "number" && !e.currentTarget.value.includes("."))) {
|
|
534
542
|
if (!/^[0-9]$/.test(e.key)) {
|
|
535
543
|
e.preventDefault();
|
|
536
544
|
return;
|
|
537
545
|
}
|
|
538
546
|
if (t !== void 0 || s !== void 0) {
|
|
539
|
-
const
|
|
547
|
+
const l = e.currentTarget.value, o = e.currentTarget.selectionStart || 0, c = l.slice(0, o) + e.key + l.slice(o), d = parseFloat(c);
|
|
540
548
|
if (!isNaN(d)) {
|
|
541
549
|
if (t !== void 0 && d < t) {
|
|
542
550
|
e.preventDefault();
|
|
@@ -550,13 +558,13 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
550
558
|
}
|
|
551
559
|
}
|
|
552
560
|
}, L = ({
|
|
553
|
-
|
|
554
|
-
|
|
561
|
+
iconBefore: e,
|
|
562
|
+
iconAfter: n,
|
|
555
563
|
hideBorder: t,
|
|
556
564
|
value: s,
|
|
557
565
|
elementId: a,
|
|
558
|
-
placeholder:
|
|
559
|
-
cssClass:
|
|
566
|
+
placeholder: l = "",
|
|
567
|
+
cssClass: o = "",
|
|
560
568
|
containerCssClass: c,
|
|
561
569
|
tooltipTriggerClassName: d,
|
|
562
570
|
type: u = "text",
|
|
@@ -565,38 +573,38 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
565
573
|
invalid: h,
|
|
566
574
|
onChange: g,
|
|
567
575
|
min: y,
|
|
568
|
-
max:
|
|
576
|
+
max: p,
|
|
569
577
|
prefix: N,
|
|
570
578
|
suffix: w,
|
|
571
579
|
textBeforeInput: b,
|
|
572
580
|
textAfterInput: E
|
|
573
581
|
}) => {
|
|
574
|
-
const re = (I) => I.target.blur(), ne = u === "number" || y !== void 0 ||
|
|
575
|
-
|
|
582
|
+
const re = (I) => I.target.blur(), ne = u === "number" || y !== void 0 || p !== void 0, te = (I) => {
|
|
583
|
+
ar(I, u, y, p);
|
|
576
584
|
}, se = (I) => {
|
|
577
|
-
const
|
|
578
|
-
if (ne &&
|
|
579
|
-
const
|
|
580
|
-
if (isNaN(
|
|
585
|
+
const F = I.currentTarget.value;
|
|
586
|
+
if (ne && F !== "") {
|
|
587
|
+
const T = parseFloat(F);
|
|
588
|
+
if (isNaN(T) && F !== "-" && F !== "." || !isNaN(T) && (y !== void 0 && T < y || p !== void 0 && T > p))
|
|
581
589
|
return;
|
|
582
590
|
}
|
|
583
|
-
g?.(
|
|
591
|
+
g?.(F);
|
|
584
592
|
};
|
|
585
|
-
return /* @__PURE__ */
|
|
593
|
+
return /* @__PURE__ */ f(
|
|
586
594
|
"div",
|
|
587
595
|
{
|
|
588
596
|
className: i(
|
|
589
|
-
"dial-input-field flex flex-row items-center justify-between
|
|
597
|
+
"dial-input-field flex flex-row items-center justify-between py-2",
|
|
590
598
|
t ? "dial-input-no-border" : "dial-input",
|
|
591
599
|
h && "dial-input-error",
|
|
592
600
|
m && "dial-input-disable",
|
|
593
601
|
x && "dial-input-readonly",
|
|
594
|
-
!b && "pl-
|
|
595
|
-
!E && "pr-
|
|
602
|
+
!b && "pl-3",
|
|
603
|
+
!E && "pr-3",
|
|
596
604
|
c
|
|
597
605
|
),
|
|
598
606
|
children: [
|
|
599
|
-
b && /* @__PURE__ */ r(
|
|
607
|
+
b && /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
600
608
|
L,
|
|
601
609
|
{
|
|
602
610
|
hideBorder: !0,
|
|
@@ -607,35 +615,41 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
607
615
|
elementId: b + "textBefore"
|
|
608
616
|
}
|
|
609
617
|
) }),
|
|
610
|
-
N && /* @__PURE__ */
|
|
618
|
+
N && /* @__PURE__ */ f("p", { className: "text-secondary dial-small", children: [
|
|
611
619
|
" ",
|
|
612
620
|
N
|
|
613
621
|
] }),
|
|
614
622
|
/* @__PURE__ */ r(D, { icon: e }),
|
|
615
|
-
/* @__PURE__ */ r(
|
|
616
|
-
|
|
623
|
+
/* @__PURE__ */ r(
|
|
624
|
+
V,
|
|
617
625
|
{
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
626
|
+
tooltip: s,
|
|
627
|
+
triggerClassName: i(d, "flex-1"),
|
|
628
|
+
children: /* @__PURE__ */ r(
|
|
629
|
+
"input",
|
|
630
|
+
{
|
|
631
|
+
type: u,
|
|
632
|
+
autoComplete: "off",
|
|
633
|
+
id: a,
|
|
634
|
+
placeholder: l,
|
|
635
|
+
value: s ?? "",
|
|
636
|
+
disabled: m,
|
|
637
|
+
className: i("border-0 bg-transparent px-2", o),
|
|
638
|
+
onChange: (I) => !x && se?.(I),
|
|
639
|
+
onKeyDown: te,
|
|
640
|
+
onWheel: re,
|
|
641
|
+
min: y,
|
|
642
|
+
max: p
|
|
643
|
+
}
|
|
644
|
+
)
|
|
631
645
|
}
|
|
632
|
-
)
|
|
646
|
+
),
|
|
633
647
|
/* @__PURE__ */ r(D, { icon: n }),
|
|
634
|
-
w && /* @__PURE__ */
|
|
648
|
+
w && /* @__PURE__ */ f("p", { className: "text-secondary dial-small", children: [
|
|
635
649
|
" ",
|
|
636
650
|
w
|
|
637
651
|
] }),
|
|
638
|
-
E && /* @__PURE__ */ r(
|
|
652
|
+
E && /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
639
653
|
L,
|
|
640
654
|
{
|
|
641
655
|
hideBorder: !0,
|
|
@@ -649,33 +663,33 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
649
663
|
]
|
|
650
664
|
}
|
|
651
665
|
);
|
|
652
|
-
},
|
|
666
|
+
}, lr = /^0+\.(\d+)?$/, or = /^0+/, ee = ({
|
|
653
667
|
fieldTitle: e,
|
|
654
668
|
errorText: n,
|
|
655
669
|
optional: t,
|
|
656
670
|
elementCssClass: s,
|
|
657
671
|
elementContainerCssClass: a,
|
|
658
|
-
elementId:
|
|
659
|
-
containerCssClass:
|
|
672
|
+
elementId: l,
|
|
673
|
+
containerCssClass: o,
|
|
660
674
|
readonly: c,
|
|
661
675
|
defaultEmptyText: d,
|
|
662
676
|
min: u,
|
|
663
677
|
max: m,
|
|
664
678
|
...x
|
|
665
|
-
}) => /* @__PURE__ */
|
|
679
|
+
}) => /* @__PURE__ */ f("div", { className: i("flex flex-col", o), children: [
|
|
666
680
|
/* @__PURE__ */ r(
|
|
667
|
-
|
|
681
|
+
O,
|
|
668
682
|
{
|
|
669
683
|
fieldTitle: e,
|
|
670
684
|
optional: t,
|
|
671
|
-
htmlFor:
|
|
685
|
+
htmlFor: l
|
|
672
686
|
}
|
|
673
687
|
),
|
|
674
|
-
c ? /* @__PURE__ */ r("span", { children: x.value || (d ?? "None") }) : /* @__PURE__ */
|
|
688
|
+
c ? /* @__PURE__ */ r("span", { children: x.value || (d ?? "None") }) : /* @__PURE__ */ f(ae, { children: [
|
|
675
689
|
/* @__PURE__ */ r(
|
|
676
690
|
L,
|
|
677
691
|
{
|
|
678
|
-
elementId:
|
|
692
|
+
elementId: l,
|
|
679
693
|
cssClass: s,
|
|
680
694
|
containerCssClass: a,
|
|
681
695
|
invalid: n != null,
|
|
@@ -686,26 +700,26 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
686
700
|
),
|
|
687
701
|
/* @__PURE__ */ r(W, { errorText: n })
|
|
688
702
|
] })
|
|
689
|
-
] }),
|
|
703
|
+
] }), Tr = ({
|
|
690
704
|
onChange: e,
|
|
691
705
|
value: n,
|
|
692
706
|
min: t,
|
|
693
707
|
max: s,
|
|
694
708
|
...a
|
|
695
709
|
}) => {
|
|
696
|
-
const
|
|
710
|
+
const l = (o) => String(o)?.match(lr) ? String(o)?.replace(or, "0") : Number(o);
|
|
697
711
|
return /* @__PURE__ */ r(
|
|
698
712
|
ee,
|
|
699
713
|
{
|
|
700
714
|
type: "number",
|
|
701
|
-
onChange: (
|
|
715
|
+
onChange: (o) => e?.(l(o)),
|
|
702
716
|
value: n,
|
|
703
717
|
min: t,
|
|
704
718
|
max: s,
|
|
705
719
|
...a
|
|
706
720
|
}
|
|
707
721
|
);
|
|
708
|
-
},
|
|
722
|
+
}, Pr = ({
|
|
709
723
|
onChange: e,
|
|
710
724
|
...n
|
|
711
725
|
}) => /* @__PURE__ */ r(
|
|
@@ -715,16 +729,16 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
715
729
|
onChange: (t) => e?.(t),
|
|
716
730
|
...n
|
|
717
731
|
}
|
|
718
|
-
),
|
|
732
|
+
), Ar = ({
|
|
719
733
|
fieldTitle: e,
|
|
720
734
|
optional: n,
|
|
721
735
|
elementId: t,
|
|
722
736
|
elementCssClass: s,
|
|
723
737
|
errorText: a,
|
|
724
|
-
...
|
|
725
|
-
}) => /* @__PURE__ */
|
|
738
|
+
...l
|
|
739
|
+
}) => /* @__PURE__ */ f("div", { className: "flex flex-col", children: [
|
|
726
740
|
/* @__PURE__ */ r(
|
|
727
|
-
|
|
741
|
+
O,
|
|
728
742
|
{
|
|
729
743
|
fieldTitle: e,
|
|
730
744
|
optional: n,
|
|
@@ -732,45 +746,45 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
732
746
|
}
|
|
733
747
|
),
|
|
734
748
|
/* @__PURE__ */ r(
|
|
735
|
-
|
|
749
|
+
tr,
|
|
736
750
|
{
|
|
737
751
|
textareaId: t,
|
|
738
752
|
cssClass: s,
|
|
739
|
-
...
|
|
753
|
+
...l
|
|
740
754
|
}
|
|
741
755
|
),
|
|
742
756
|
/* @__PURE__ */ r(W, { errorText: a })
|
|
743
|
-
] }),
|
|
757
|
+
] }), Lr = ({
|
|
744
758
|
title: e,
|
|
745
759
|
switchId: n,
|
|
746
760
|
isOn: t = !1,
|
|
747
761
|
disabled: s,
|
|
748
762
|
onChange: a
|
|
749
763
|
}) => {
|
|
750
|
-
const
|
|
764
|
+
const l = i(
|
|
751
765
|
"flex w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",
|
|
752
766
|
t ? "flex-row-reverse" : "flex-row",
|
|
753
767
|
s ? "pointer-events-none" : "",
|
|
754
768
|
s ? t ? "bg-controls-disable" : "bg-layer-4" : t ? "bg-accent-primary" : "bg-layer-4"
|
|
755
|
-
),
|
|
769
|
+
), o = S(
|
|
756
770
|
(c) => {
|
|
757
771
|
c.stopPropagation(), a?.(!t);
|
|
758
772
|
},
|
|
759
773
|
[a, t]
|
|
760
774
|
);
|
|
761
|
-
return /* @__PURE__ */
|
|
775
|
+
return /* @__PURE__ */ f("div", { className: "flex flex-row items-center", children: [
|
|
762
776
|
/* @__PURE__ */ r(
|
|
763
777
|
"input",
|
|
764
778
|
{
|
|
765
779
|
type: "checkbox",
|
|
766
|
-
onChange:
|
|
780
|
+
onChange: o,
|
|
767
781
|
id: n,
|
|
768
782
|
disabled: s,
|
|
769
783
|
className: "invisible w-0 h-0",
|
|
770
784
|
checked: t
|
|
771
785
|
}
|
|
772
786
|
),
|
|
773
|
-
/* @__PURE__ */ r("label", { htmlFor: n, className:
|
|
787
|
+
/* @__PURE__ */ r("label", { htmlFor: n, className: l, children: /* @__PURE__ */ r(
|
|
774
788
|
"span",
|
|
775
789
|
{
|
|
776
790
|
className: i(
|
|
@@ -783,18 +797,18 @@ const Xe = "flex flex-col gap-2", Ye = "flex", Je = "pb-1 mt-2", er = {
|
|
|
783
797
|
] });
|
|
784
798
|
};
|
|
785
799
|
var R = /* @__PURE__ */ ((e) => (e.Sm = "sm", e.Md = "md", e.Lg = "lg", e))(R || {});
|
|
786
|
-
const
|
|
800
|
+
const ir = "z-[52] flex items-center justify-center bg-blackout md:p-4", cr = "relative max-h-full rounded bg-layer-3 flex flex-col shadow w-full h-full md:h-auto", dr = "divide-tertiary divide-y", ur = "flex flex-row justify-between py-4 px-6 items-center", mr = {
|
|
787
801
|
[R.Sm]: "max-w-full md:max-w-[400px]",
|
|
788
802
|
[R.Md]: "max-w-full md:max-w-[800px]",
|
|
789
803
|
[R.Lg]: "max-w-full md:max-w-[1200px]"
|
|
790
|
-
},
|
|
804
|
+
}, fr = ({
|
|
791
805
|
open: e = !1,
|
|
792
806
|
title: n,
|
|
793
807
|
portalId: t,
|
|
794
808
|
cssClass: s,
|
|
795
809
|
overlayClass: a,
|
|
796
|
-
headingClass:
|
|
797
|
-
dividers:
|
|
810
|
+
headingClass: l,
|
|
811
|
+
dividers: o = !0,
|
|
798
812
|
children: c,
|
|
799
813
|
footer: d,
|
|
800
814
|
onClose: u,
|
|
@@ -805,7 +819,7 @@ const or = "z-[52] flex items-center justify-center bg-blackout md:p-4", lr = "r
|
|
|
805
819
|
onOpenChange: (b) => {
|
|
806
820
|
b || u?.(null);
|
|
807
821
|
}
|
|
808
|
-
}), g = Z(h, { role: "dialog" }), y = K(h, { outsidePress: !0 }), { getFloatingProps:
|
|
822
|
+
}), g = Z(h, { role: "dialog" }), y = K(h, { outsidePress: !0 }), { getFloatingProps: p } = X([g, y]);
|
|
809
823
|
if (!e) return null;
|
|
810
824
|
const N = typeof n == "string" ? "dial-popup-heading" : void 0, w = (b) => b ? typeof b == "string" ? /* @__PURE__ */ r(
|
|
811
825
|
"h3",
|
|
@@ -813,35 +827,33 @@ const or = "z-[52] flex items-center justify-center bg-blackout md:p-4", lr = "r
|
|
|
813
827
|
id: N,
|
|
814
828
|
className: i(
|
|
815
829
|
"flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",
|
|
816
|
-
|
|
830
|
+
l
|
|
817
831
|
),
|
|
818
|
-
children: /* @__PURE__ */ r(
|
|
832
|
+
children: /* @__PURE__ */ r(V, { tooltip: b, children: b })
|
|
819
833
|
}
|
|
820
834
|
) : b : /* @__PURE__ */ r("span", {});
|
|
821
|
-
return /* @__PURE__ */ r(
|
|
835
|
+
return /* @__PURE__ */ r(Q, { id: t, children: /* @__PURE__ */ r(Pe, { className: i(ir, a), children: /* @__PURE__ */ r(Ae, { context: h, children: /* @__PURE__ */ f(
|
|
822
836
|
"div",
|
|
823
837
|
{
|
|
824
838
|
ref: x.setFloating,
|
|
825
|
-
...
|
|
839
|
+
...p(),
|
|
826
840
|
role: "dialog",
|
|
827
841
|
"aria-modal": "true",
|
|
828
842
|
"aria-labelledby": N,
|
|
829
843
|
className: i(
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
844
|
+
cr,
|
|
845
|
+
mr[m],
|
|
846
|
+
o && dr,
|
|
833
847
|
s
|
|
834
848
|
),
|
|
835
849
|
children: [
|
|
836
|
-
/* @__PURE__ */
|
|
850
|
+
/* @__PURE__ */ f("div", { className: ur, children: [
|
|
837
851
|
w(n),
|
|
838
852
|
/* @__PURE__ */ r(
|
|
839
|
-
|
|
853
|
+
nr,
|
|
840
854
|
{
|
|
841
|
-
cssClass: "text-secondary hover:text-accent-primary",
|
|
842
855
|
ariaLabel: "Close dialog",
|
|
843
|
-
|
|
844
|
-
onClick: (b) => u?.(b)
|
|
856
|
+
onClose: (b) => u?.(b)
|
|
845
857
|
}
|
|
846
858
|
)
|
|
847
859
|
] }),
|
|
@@ -851,13 +863,13 @@ const or = "z-[52] flex items-center justify-center bg-blackout md:p-4", lr = "r
|
|
|
851
863
|
}
|
|
852
864
|
) }) }) });
|
|
853
865
|
};
|
|
854
|
-
var
|
|
855
|
-
const
|
|
856
|
-
[
|
|
866
|
+
var z = /* @__PURE__ */ ((e) => (e.Info = "info", e.Danger = "danger", e))(z || {});
|
|
867
|
+
const pr = "flex justify-end gap-2 px-6 py-4", xr = "text-secondary dial-small-150 px-6 py-4", hr = "Cancel", H = {
|
|
868
|
+
[z.Info]: {
|
|
857
869
|
confirmVariant: v.Primary,
|
|
858
870
|
cancelVariant: v.Secondary
|
|
859
871
|
},
|
|
860
|
-
[
|
|
872
|
+
[z.Danger]: {
|
|
861
873
|
container: "border-t-4 border-error",
|
|
862
874
|
confirmVariant: v.Danger,
|
|
863
875
|
cancelVariant: v.Secondary
|
|
@@ -868,8 +880,8 @@ const mr = "flex justify-end gap-2 px-6 py-4", pr = "text-secondary dial-small-1
|
|
|
868
880
|
descriptionCssClass: t,
|
|
869
881
|
open: s = !1,
|
|
870
882
|
confirmLabel: a,
|
|
871
|
-
cancelLabel:
|
|
872
|
-
isLoading:
|
|
883
|
+
cancelLabel: l = hr,
|
|
884
|
+
isLoading: o = !1,
|
|
873
885
|
disableConfirmButton: c = !1,
|
|
874
886
|
cssClass: d,
|
|
875
887
|
confirmClassName: u,
|
|
@@ -878,41 +890,41 @@ const mr = "flex justify-end gap-2 px-6 py-4", pr = "text-secondary dial-small-1
|
|
|
878
890
|
onCancel: h,
|
|
879
891
|
children: g,
|
|
880
892
|
dividers: y = !1,
|
|
881
|
-
variant:
|
|
893
|
+
variant: p = z.Info,
|
|
882
894
|
size: N = R.Sm
|
|
883
895
|
}) => {
|
|
884
|
-
const w =
|
|
896
|
+
const w = o ? null : /* @__PURE__ */ f("div", { className: pr, children: [
|
|
885
897
|
/* @__PURE__ */ r(
|
|
886
898
|
P,
|
|
887
899
|
{
|
|
888
900
|
variant: v.Secondary,
|
|
889
|
-
title:
|
|
901
|
+
title: l,
|
|
890
902
|
onClick: () => h ? h() : m?.()
|
|
891
903
|
}
|
|
892
904
|
),
|
|
893
905
|
/* @__PURE__ */ r(
|
|
894
906
|
P,
|
|
895
907
|
{
|
|
896
|
-
variant: H[
|
|
908
|
+
variant: H[p].confirmVariant,
|
|
897
909
|
cssClass: u,
|
|
898
910
|
title: a,
|
|
899
911
|
disable: c,
|
|
900
912
|
onClick: () => x()
|
|
901
913
|
}
|
|
902
914
|
)
|
|
903
|
-
] }), b =
|
|
915
|
+
] }), b = S(() => o ? /* @__PURE__ */ r("div", { className: "px-6 py-4 h-[120px]", children: /* @__PURE__ */ r(Me, { size: 50 }) }) : g ?? (n ? /* @__PURE__ */ r(
|
|
904
916
|
"div",
|
|
905
917
|
{
|
|
906
|
-
className: i(
|
|
918
|
+
className: i(xr, t),
|
|
907
919
|
children: n
|
|
908
920
|
}
|
|
909
|
-
) : null), [g, n,
|
|
921
|
+
) : null), [g, n, o, t]);
|
|
910
922
|
return /* @__PURE__ */ r(
|
|
911
|
-
|
|
923
|
+
fr,
|
|
912
924
|
{
|
|
913
925
|
open: s,
|
|
914
926
|
title: e,
|
|
915
|
-
cssClass: i(H[
|
|
927
|
+
cssClass: i(H[p].container, d),
|
|
916
928
|
dividers: y,
|
|
917
929
|
onClose: () => m?.(),
|
|
918
930
|
footer: w,
|
|
@@ -920,15 +932,15 @@ const mr = "flex justify-end gap-2 px-6 py-4", pr = "text-secondary dial-small-1
|
|
|
920
932
|
children: b()
|
|
921
933
|
}
|
|
922
934
|
);
|
|
923
|
-
},
|
|
935
|
+
}, gr = ({ onClick: e }) => /* @__PURE__ */ r(
|
|
924
936
|
pe,
|
|
925
937
|
{
|
|
926
938
|
...A,
|
|
927
939
|
className: "text-primary",
|
|
928
940
|
onClick: e
|
|
929
941
|
}
|
|
930
|
-
),
|
|
931
|
-
const [n, t] = _(!1), s =
|
|
942
|
+
), br = ({ onClick: e }) => /* @__PURE__ */ r(xe, { ...A, className: "text-primary", onClick: e }), yr = ({ ...e }) => {
|
|
943
|
+
const [n, t] = _(!1), s = S((a) => {
|
|
932
944
|
t(a);
|
|
933
945
|
}, []);
|
|
934
946
|
return /* @__PURE__ */ r(
|
|
@@ -936,19 +948,19 @@ const mr = "flex justify-end gap-2 px-6 py-4", pr = "text-secondary dial-small-1
|
|
|
936
948
|
{
|
|
937
949
|
type: n ? "text" : "password",
|
|
938
950
|
...e,
|
|
939
|
-
|
|
951
|
+
iconAfter: n ? /* @__PURE__ */ r(gr, { onClick: () => s(!1) }) : /* @__PURE__ */ r(br, { onClick: () => s(!0) })
|
|
940
952
|
}
|
|
941
953
|
);
|
|
942
|
-
},
|
|
954
|
+
}, Br = ({
|
|
943
955
|
fieldTitle: e,
|
|
944
956
|
optional: n,
|
|
945
957
|
elementCssClass: t,
|
|
946
958
|
elementId: s,
|
|
947
959
|
errorText: a,
|
|
948
|
-
...
|
|
949
|
-
}) => /* @__PURE__ */
|
|
960
|
+
...l
|
|
961
|
+
}) => /* @__PURE__ */ f("div", { className: "flex flex-col", children: [
|
|
950
962
|
/* @__PURE__ */ r(
|
|
951
|
-
|
|
963
|
+
O,
|
|
952
964
|
{
|
|
953
965
|
fieldTitle: e,
|
|
954
966
|
optional: n,
|
|
@@ -956,60 +968,60 @@ const mr = "flex justify-end gap-2 px-6 py-4", pr = "text-secondary dial-small-1
|
|
|
956
968
|
}
|
|
957
969
|
),
|
|
958
970
|
/* @__PURE__ */ r(
|
|
959
|
-
|
|
971
|
+
yr,
|
|
960
972
|
{
|
|
961
973
|
cssClass: t,
|
|
962
974
|
elementId: s,
|
|
963
975
|
invalid: !!a,
|
|
964
|
-
...
|
|
976
|
+
...l
|
|
965
977
|
}
|
|
966
978
|
),
|
|
967
979
|
/* @__PURE__ */ r(W, { errorText: a })
|
|
968
980
|
] });
|
|
969
|
-
var
|
|
970
|
-
const
|
|
971
|
-
[
|
|
981
|
+
var B = /* @__PURE__ */ ((e) => (e.Small = "small", e.Base = "base", e))(B || {});
|
|
982
|
+
const Cr = {
|
|
983
|
+
[B.Small]: {
|
|
972
984
|
textClass: "text-xs px-1",
|
|
973
985
|
containerClass: "px-[6px] py-1 h-[22px]",
|
|
974
986
|
iconSize: 10,
|
|
975
987
|
iconStroke: 1
|
|
976
988
|
},
|
|
977
|
-
[
|
|
989
|
+
[B.Base]: {
|
|
978
990
|
textClass: "text-sm px-2",
|
|
979
991
|
containerClass: "px-3 py-2 h-[38px]",
|
|
980
992
|
iconSize: 18,
|
|
981
993
|
iconStroke: 1.5
|
|
982
994
|
}
|
|
983
|
-
},
|
|
995
|
+
}, Or = ({
|
|
984
996
|
elementId: e,
|
|
985
997
|
value: n,
|
|
986
998
|
placeholder: t,
|
|
987
999
|
disabled: s,
|
|
988
1000
|
readonly: a,
|
|
989
|
-
invalid:
|
|
990
|
-
cssClass:
|
|
1001
|
+
invalid: l,
|
|
1002
|
+
cssClass: o,
|
|
991
1003
|
containerCssClass: c,
|
|
992
1004
|
onChange: d,
|
|
993
|
-
size: u =
|
|
1005
|
+
size: u = B.Base
|
|
994
1006
|
}) => {
|
|
995
1007
|
const [m, x] = _(n || "");
|
|
996
|
-
|
|
1008
|
+
we(() => {
|
|
997
1009
|
x(n || "");
|
|
998
1010
|
}, [n]);
|
|
999
|
-
const h =
|
|
1000
|
-
(
|
|
1001
|
-
x(
|
|
1011
|
+
const h = S(
|
|
1012
|
+
(p) => {
|
|
1013
|
+
x(p), d?.(p);
|
|
1002
1014
|
},
|
|
1003
1015
|
[d]
|
|
1004
|
-
), g =
|
|
1016
|
+
), g = Cr[u], y = S(() => {
|
|
1005
1017
|
h("");
|
|
1006
1018
|
}, [h]);
|
|
1007
|
-
return /* @__PURE__ */
|
|
1019
|
+
return /* @__PURE__ */ f(
|
|
1008
1020
|
"div",
|
|
1009
1021
|
{
|
|
1010
1022
|
className: i(
|
|
1011
1023
|
"dial-input flex flex-row items-center justify-between",
|
|
1012
|
-
|
|
1024
|
+
l && "dial-input-error",
|
|
1013
1025
|
s && "dial-input-disable",
|
|
1014
1026
|
a && "dial-input-readonly",
|
|
1015
1027
|
g.containerClass,
|
|
@@ -1021,7 +1033,7 @@ const br = {
|
|
|
1021
1033
|
{
|
|
1022
1034
|
className: i(s ? "text-secondary" : "text-primary"),
|
|
1023
1035
|
icon: /* @__PURE__ */ r(
|
|
1024
|
-
|
|
1036
|
+
he,
|
|
1025
1037
|
{
|
|
1026
1038
|
size: g.iconSize,
|
|
1027
1039
|
stroke: g.iconStroke
|
|
@@ -1037,15 +1049,14 @@ const br = {
|
|
|
1037
1049
|
autoComplete: "off",
|
|
1038
1050
|
placeholder: t,
|
|
1039
1051
|
value: m ?? "",
|
|
1040
|
-
title: m ? String(m) : "",
|
|
1041
1052
|
disabled: s,
|
|
1042
1053
|
readOnly: a,
|
|
1043
1054
|
className: i(
|
|
1044
1055
|
"border-0 bg-transparent w-full",
|
|
1045
|
-
|
|
1056
|
+
o,
|
|
1046
1057
|
g.textClass
|
|
1047
1058
|
),
|
|
1048
|
-
onChange: (
|
|
1059
|
+
onChange: (p) => !a && h(p.currentTarget.value)
|
|
1049
1060
|
}
|
|
1050
1061
|
),
|
|
1051
1062
|
m && !a && !s && /* @__PURE__ */ r(
|
|
@@ -1053,7 +1064,7 @@ const br = {
|
|
|
1053
1064
|
{
|
|
1054
1065
|
className: "text-primary cursor-pointer",
|
|
1055
1066
|
icon: /* @__PURE__ */ r(
|
|
1056
|
-
|
|
1067
|
+
M,
|
|
1057
1068
|
{
|
|
1058
1069
|
size: g.iconSize,
|
|
1059
1070
|
stroke: g.iconStroke,
|
|
@@ -1071,30 +1082,31 @@ const br = {
|
|
|
1071
1082
|
export {
|
|
1072
1083
|
k as AlertVariant,
|
|
1073
1084
|
v as ButtonVariant,
|
|
1074
|
-
|
|
1075
|
-
|
|
1085
|
+
z as ConfirmationPopupVariant,
|
|
1086
|
+
kr as DialAlert,
|
|
1076
1087
|
P as DialButton,
|
|
1077
|
-
|
|
1078
|
-
|
|
1088
|
+
Rr as DialCheckbox,
|
|
1089
|
+
nr as DialCloseButton,
|
|
1079
1090
|
zr as DialConfirmationPopup,
|
|
1080
1091
|
W as DialErrorText,
|
|
1081
|
-
|
|
1092
|
+
O as DialFieldLabel,
|
|
1082
1093
|
D as DialIcon,
|
|
1083
1094
|
L as DialInput,
|
|
1084
1095
|
Me as DialLoader,
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1096
|
+
Er as DialNoDataContent,
|
|
1097
|
+
Tr as DialNumberInputField,
|
|
1098
|
+
yr as DialPasswordInput,
|
|
1099
|
+
Br as DialPasswordInputField,
|
|
1100
|
+
fr as DialPopup,
|
|
1089
1101
|
Qe as DialRadioButton,
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1102
|
+
Fr as DialRadioGroup,
|
|
1103
|
+
Or as DialSearch,
|
|
1104
|
+
Sr as DialSteps,
|
|
1105
|
+
Lr as DialSwitch,
|
|
1106
|
+
Ar as DialTextAreaField,
|
|
1107
|
+
Pr as DialTextInputField,
|
|
1108
|
+
tr as DialTextarea,
|
|
1109
|
+
V as DialTooltip,
|
|
1098
1110
|
R as PopupSize,
|
|
1099
1111
|
j as RadioGroupOrientation,
|
|
1100
1112
|
C as StepStatus
|