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