@epam/ai-dial-ui-kit 0.3.0-rc.0 → 0.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dial-ui-kit.cjs.js +1 -1
- package/dist/dial-ui-kit.es.js +491 -382
- package/dist/index.css +1 -1
- package/dist/src/components/Tag/Tag.d.ts +28 -0
- package/dist/src/components/Tag/constants.d.ts +3 -0
- package/dist/src/components/TagInput/TagInput.d.ts +39 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/types/tag.d.ts +3 -0
- package/package.json +1 -1
package/dist/dial-ui-kit.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
1
|
+
import { jsx as r, jsxs as m, Fragment as Z } from "react/jsx-runtime";
|
|
2
2
|
import i from "classnames";
|
|
3
|
-
import { IconCircleCheck as
|
|
4
|
-
import * as
|
|
5
|
-
import { createContext as
|
|
6
|
-
import { useFloating as
|
|
7
|
-
import { createPortal as
|
|
8
|
-
const
|
|
3
|
+
import { IconCircleCheck as me, IconAlertTriangle as fe, IconAlertCircle as he, IconInfoCircle as xe, IconX as $, IconMinus as ge, IconCheck as Y, IconExclamationCircle as ye, IconClipboardX as Ce, IconChevronsLeft as be, IconChevronsRight as ve, IconEyeOff as we, IconEye as Ne, IconSearch as ke } from "@tabler/icons-react";
|
|
4
|
+
import * as N from "react";
|
|
5
|
+
import { createContext as De, useState as S, useRef as J, useMemo as Ie, useContext as Re, forwardRef as ee, isValidElement as Se, cloneElement as Ee, useCallback as E, useEffect as re } from "react";
|
|
6
|
+
import { useFloating as te, offset as Le, flip as Te, shift as Fe, arrow as Ve, autoUpdate as Ae, useHover as je, useFocus as Me, useDismiss as ne, useRole as ae, useInteractions as se, useMergeRefs as oe, FloatingPortal as le, FloatingArrow as Pe, FloatingOverlay as Oe, FloatingFocusManager as We } from "@floating-ui/react";
|
|
7
|
+
import { createPortal as ze } from "react-dom";
|
|
8
|
+
const W = ({ errorText: e }) => e && /* @__PURE__ */ r("span", { className: "text-error dial-tiny mt-1", children: e }), z = ({
|
|
9
9
|
fieldTitle: e,
|
|
10
10
|
htmlFor: t,
|
|
11
11
|
optional: n,
|
|
12
12
|
optionalText: a,
|
|
13
13
|
cssClass: s
|
|
14
|
-
}) => e ? /* @__PURE__ */
|
|
14
|
+
}) => e ? /* @__PURE__ */ m(
|
|
15
15
|
"label",
|
|
16
16
|
{
|
|
17
17
|
className: i(
|
|
@@ -25,87 +25,87 @@ const z = ({ errorText: e }) => e && /* @__PURE__ */ r("span", { className: "tex
|
|
|
25
25
|
n && /* @__PURE__ */ r("span", { className: "ml-1", children: a ?? "(Optional)" })
|
|
26
26
|
]
|
|
27
27
|
}
|
|
28
|
-
) : null,
|
|
29
|
-
var
|
|
28
|
+
) : null, R = ({ icon: e, className: t }) => e ? /* @__PURE__ */ r("span", { className: i("flex-shrink-0", t), children: e }) : null;
|
|
29
|
+
var I = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e.Tertiary = "tertiary", e.Danger = "danger", e))(I || {});
|
|
30
30
|
const Be = {
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
},
|
|
31
|
+
[I.Primary]: "dial-primary-button",
|
|
32
|
+
[I.Secondary]: "dial-secondary-button",
|
|
33
|
+
[I.Tertiary]: "dial-tertiary-button",
|
|
34
|
+
[I.Danger]: "dial-danger-button"
|
|
35
|
+
}, j = ({
|
|
36
36
|
title: e,
|
|
37
37
|
variant: t,
|
|
38
38
|
cssClass: n,
|
|
39
39
|
textCssClass: a,
|
|
40
40
|
ref: s,
|
|
41
41
|
onClick: o,
|
|
42
|
-
disable:
|
|
42
|
+
disable: c,
|
|
43
43
|
iconAfter: u,
|
|
44
44
|
iconBefore: d,
|
|
45
|
-
hideTitleOnMobile:
|
|
46
|
-
ariaLabel:
|
|
45
|
+
hideTitleOnMobile: l,
|
|
46
|
+
ariaLabel: p
|
|
47
47
|
}) => {
|
|
48
48
|
const f = i(
|
|
49
49
|
"dial-small-semi",
|
|
50
50
|
u ? "mr-2" : "",
|
|
51
51
|
d ? "ml-2" : "",
|
|
52
|
-
|
|
52
|
+
l ? "hidden sm:inline" : "inline",
|
|
53
53
|
a
|
|
54
54
|
), x = i(
|
|
55
55
|
t && Be[t],
|
|
56
56
|
n,
|
|
57
57
|
"focus-visible:outline outline-offset-0"
|
|
58
58
|
);
|
|
59
|
-
return /* @__PURE__ */
|
|
59
|
+
return /* @__PURE__ */ m(
|
|
60
60
|
"button",
|
|
61
61
|
{
|
|
62
62
|
ref: s,
|
|
63
63
|
type: "button",
|
|
64
64
|
className: x,
|
|
65
65
|
onClick: (h) => o?.(h),
|
|
66
|
-
disabled:
|
|
67
|
-
"aria-label": e ||
|
|
66
|
+
disabled: c,
|
|
67
|
+
"aria-label": e || p,
|
|
68
68
|
children: [
|
|
69
|
-
/* @__PURE__ */ r(
|
|
69
|
+
/* @__PURE__ */ r(R, { icon: d }),
|
|
70
70
|
e && /* @__PURE__ */ r("span", { className: f, children: e }),
|
|
71
|
-
/* @__PURE__ */ r(
|
|
71
|
+
/* @__PURE__ */ r(R, { icon: u })
|
|
72
72
|
]
|
|
73
73
|
}
|
|
74
74
|
);
|
|
75
75
|
};
|
|
76
|
-
var
|
|
77
|
-
const
|
|
78
|
-
info: /* @__PURE__ */ r(
|
|
79
|
-
error: /* @__PURE__ */ r(
|
|
80
|
-
warning: /* @__PURE__ */ r(
|
|
81
|
-
success: /* @__PURE__ */ r(
|
|
82
|
-
},
|
|
83
|
-
[
|
|
84
|
-
[
|
|
85
|
-
[
|
|
86
|
-
[
|
|
87
|
-
},
|
|
88
|
-
variant: e =
|
|
76
|
+
var F = /* @__PURE__ */ ((e) => (e.Info = "info", e.Success = "success", e.Warning = "warning", e.Error = "error", e))(F || {});
|
|
77
|
+
const He = {
|
|
78
|
+
info: /* @__PURE__ */ r(xe, { size: 24, stroke: 2 }),
|
|
79
|
+
error: /* @__PURE__ */ r(he, { size: 24, stroke: 2 }),
|
|
80
|
+
warning: /* @__PURE__ */ r(fe, { size: 24, stroke: 2 }),
|
|
81
|
+
success: /* @__PURE__ */ r(me, { size: 24, stroke: 2 })
|
|
82
|
+
}, _e = {
|
|
83
|
+
[F.Info]: "bg-info border-info text-info",
|
|
84
|
+
[F.Success]: "bg-success border-success text-success",
|
|
85
|
+
[F.Warning]: "bg-warning border-warning text-warning",
|
|
86
|
+
[F.Error]: "bg-error border-error text-error"
|
|
87
|
+
}, Ke = "items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex", Mr = ({
|
|
88
|
+
variant: e = F.Info,
|
|
89
89
|
message: t,
|
|
90
90
|
cssClass: n,
|
|
91
91
|
closable: a = !1,
|
|
92
92
|
onClose: s
|
|
93
|
-
}) => /* @__PURE__ */
|
|
93
|
+
}) => /* @__PURE__ */ m(
|
|
94
94
|
"div",
|
|
95
95
|
{
|
|
96
96
|
role: "alert",
|
|
97
97
|
className: i(
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
Ke,
|
|
99
|
+
_e[e],
|
|
100
100
|
n
|
|
101
101
|
),
|
|
102
102
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */ r(
|
|
103
|
+
/* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
104
|
+
/* @__PURE__ */ r(R, { icon: He[e] }),
|
|
105
105
|
/* @__PURE__ */ r("div", { className: "text-primary", children: t })
|
|
106
106
|
] }),
|
|
107
107
|
a && /* @__PURE__ */ r(
|
|
108
|
-
|
|
108
|
+
j,
|
|
109
109
|
{
|
|
110
110
|
cssClass: "ml-2 text-secondary hover:text-primary",
|
|
111
111
|
ariaLabel: "Close alert",
|
|
@@ -115,7 +115,7 @@ const ze = {
|
|
|
115
115
|
)
|
|
116
116
|
]
|
|
117
117
|
}
|
|
118
|
-
),
|
|
118
|
+
), $e = "flex items-center justify-center text-secondary", Ge = "shrink-0 grow-0 basis-auto animate-spin-steps", Ze = (e) => /* @__PURE__ */ N.createElement("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ N.createElement("path", { d: "M24 39V46.5", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ N.createElement("path", { opacity: 0.4, d: "M9 24H1.5", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ N.createElement("path", { opacity: 0.5, d: "M8.0918 8.0918L13.3994 13.3994", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ N.createElement("path", { opacity: 0.6, d: "M24 1.5V9", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ N.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__ */ N.createElement("path", { opacity: 0.8, d: "M46.5 24H39", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ N.createElement("path", { opacity: 0.9, d: "M34.6055 34.6055L39.9082 39.9082", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ N.createElement("path", { opacity: 0.3, d: "M13.3936 34.6055L8.08594 39.9131", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" })), Ue = ({
|
|
119
119
|
size: e = 18,
|
|
120
120
|
cssClass: t,
|
|
121
121
|
iconClass: n,
|
|
@@ -127,81 +127,81 @@ const ze = {
|
|
|
127
127
|
role: "status",
|
|
128
128
|
"aria-label": s,
|
|
129
129
|
className: i({
|
|
130
|
-
[
|
|
130
|
+
[$e]: !0,
|
|
131
131
|
"w-full h-full": a,
|
|
132
132
|
[t || ""]: !!t
|
|
133
133
|
}),
|
|
134
134
|
children: /* @__PURE__ */ r(
|
|
135
|
-
|
|
135
|
+
R,
|
|
136
136
|
{
|
|
137
137
|
icon: /* @__PURE__ */ r(
|
|
138
|
-
|
|
138
|
+
Ze,
|
|
139
139
|
{
|
|
140
140
|
width: e,
|
|
141
141
|
height: e,
|
|
142
|
-
className: i(
|
|
142
|
+
className: i(Ge, n),
|
|
143
143
|
role: "img"
|
|
144
144
|
}
|
|
145
145
|
)
|
|
146
146
|
}
|
|
147
147
|
)
|
|
148
148
|
}
|
|
149
|
-
),
|
|
150
|
-
const e =
|
|
149
|
+
), Xe = 7, qe = 2, ie = De(null), ce = () => {
|
|
150
|
+
const e = Re(ie);
|
|
151
151
|
if (e == null)
|
|
152
152
|
throw new Error("Tooltip components must be wrapped in <Tooltip />");
|
|
153
153
|
return e;
|
|
154
|
-
},
|
|
154
|
+
}, Qe = ({
|
|
155
155
|
initialOpen: e = !1,
|
|
156
156
|
placement: t = "bottom",
|
|
157
157
|
isTriggerClickable: n = !1,
|
|
158
158
|
open: a,
|
|
159
159
|
onOpenChange: s
|
|
160
160
|
} = {}) => {
|
|
161
|
-
const [o,
|
|
161
|
+
const [o, c] = S(e), u = J(null), d = a ?? o, l = s ?? c, p = te({
|
|
162
162
|
placement: t,
|
|
163
163
|
open: d,
|
|
164
|
-
onOpenChange:
|
|
165
|
-
whileElementsMounted:
|
|
164
|
+
onOpenChange: l,
|
|
165
|
+
whileElementsMounted: Ae,
|
|
166
166
|
middleware: [
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
Le(Xe + qe),
|
|
168
|
+
Te({
|
|
169
169
|
crossAxis: t.includes("-"),
|
|
170
170
|
fallbackAxisSideDirection: "start",
|
|
171
171
|
padding: 5
|
|
172
172
|
}),
|
|
173
173
|
Fe({ padding: 5 }),
|
|
174
|
-
|
|
174
|
+
Ve({
|
|
175
175
|
element: u
|
|
176
176
|
})
|
|
177
177
|
]
|
|
178
|
-
}), f =
|
|
178
|
+
}), f = je(p.context, {
|
|
179
179
|
move: !1,
|
|
180
180
|
enabled: a == null,
|
|
181
181
|
mouseOnly: n,
|
|
182
182
|
delay: { open: 500, close: 0 }
|
|
183
|
-
}), x =
|
|
183
|
+
}), x = Me(p.context, {
|
|
184
184
|
enabled: a == null
|
|
185
|
-
}), h =
|
|
186
|
-
return
|
|
185
|
+
}), h = ne(p.context), C = ae(p.context, { role: "tooltip" }), g = se([f, x, h, C]);
|
|
186
|
+
return Ie(
|
|
187
187
|
() => ({
|
|
188
188
|
open: d,
|
|
189
|
-
setOpen:
|
|
189
|
+
setOpen: l,
|
|
190
190
|
arrowRef: u,
|
|
191
191
|
...g,
|
|
192
|
-
...
|
|
192
|
+
...p
|
|
193
193
|
}),
|
|
194
|
-
[d,
|
|
194
|
+
[d, l, g, p]
|
|
195
195
|
);
|
|
196
|
-
},
|
|
196
|
+
}, Ye = ({
|
|
197
197
|
children: e,
|
|
198
198
|
...t
|
|
199
199
|
}) => {
|
|
200
|
-
const n =
|
|
201
|
-
return /* @__PURE__ */ r(
|
|
202
|
-
},
|
|
203
|
-
const s =
|
|
204
|
-
return s.open ? /* @__PURE__ */ r(
|
|
200
|
+
const n = Qe(t);
|
|
201
|
+
return /* @__PURE__ */ r(ie.Provider, { value: n, children: e });
|
|
202
|
+
}, Je = ee(function({ style: t, ...n }, a) {
|
|
203
|
+
const s = ce(), o = oe([s.refs.setFloating, a]);
|
|
204
|
+
return s.open ? /* @__PURE__ */ r(le, { id: "tooltip-portal", children: /* @__PURE__ */ m(
|
|
205
205
|
"div",
|
|
206
206
|
{
|
|
207
207
|
ref: o,
|
|
@@ -217,7 +217,7 @@ const ze = {
|
|
|
217
217
|
children: [
|
|
218
218
|
n.children,
|
|
219
219
|
/* @__PURE__ */ r(
|
|
220
|
-
|
|
220
|
+
Pe,
|
|
221
221
|
{
|
|
222
222
|
ref: s.arrowRef,
|
|
223
223
|
context: s.context,
|
|
@@ -229,9 +229,9 @@ const ze = {
|
|
|
229
229
|
]
|
|
230
230
|
}
|
|
231
231
|
) }) : null;
|
|
232
|
-
}),
|
|
233
|
-
const o =
|
|
234
|
-
return n &&
|
|
232
|
+
}), er = ee(function({ children: t, asChild: n = !1, ...a }, s) {
|
|
233
|
+
const o = ce(), u = t && typeof t == "object" && "ref" in t && t.ref !== void 0 ? t.ref : void 0, d = oe([o.refs.setReference, s, u]);
|
|
234
|
+
return n && Se(t) ? Ee(
|
|
235
235
|
t,
|
|
236
236
|
o.getReferenceProps({
|
|
237
237
|
ref: d,
|
|
@@ -247,17 +247,17 @@ const ze = {
|
|
|
247
247
|
children: t
|
|
248
248
|
}
|
|
249
249
|
);
|
|
250
|
-
}),
|
|
250
|
+
}), T = ({
|
|
251
251
|
hideTooltip: e,
|
|
252
252
|
tooltip: t,
|
|
253
253
|
children: n,
|
|
254
254
|
triggerClassName: a,
|
|
255
255
|
contentClassName: s,
|
|
256
256
|
...o
|
|
257
|
-
}) => /* @__PURE__ */
|
|
258
|
-
/* @__PURE__ */ r(
|
|
257
|
+
}) => /* @__PURE__ */ m(Ye, { ...o, children: [
|
|
258
|
+
/* @__PURE__ */ r(er, { className: i(a, "truncate"), children: n }),
|
|
259
259
|
/* @__PURE__ */ r(
|
|
260
|
-
|
|
260
|
+
Je,
|
|
261
261
|
{
|
|
262
262
|
className: i(
|
|
263
263
|
"text-primary",
|
|
@@ -268,34 +268,34 @@ const ze = {
|
|
|
268
268
|
children: t
|
|
269
269
|
}
|
|
270
270
|
)
|
|
271
|
-
] }),
|
|
272
|
-
size:
|
|
271
|
+
] }), V = 18, M = {
|
|
272
|
+
size: V,
|
|
273
273
|
stroke: 2
|
|
274
|
-
},
|
|
274
|
+
}, Pr = ({
|
|
275
275
|
label: e,
|
|
276
276
|
id: t,
|
|
277
277
|
checked: n,
|
|
278
278
|
indeterminate: a,
|
|
279
279
|
disabled: s,
|
|
280
280
|
ariaLabel: o,
|
|
281
|
-
onChange:
|
|
281
|
+
onChange: c
|
|
282
282
|
}) => {
|
|
283
|
-
const u =
|
|
284
|
-
(
|
|
285
|
-
|
|
283
|
+
const u = E(
|
|
284
|
+
(p) => {
|
|
285
|
+
p.stopPropagation(), c?.(p.target.checked, t);
|
|
286
286
|
},
|
|
287
|
-
[
|
|
287
|
+
[c, t]
|
|
288
288
|
), d = i(
|
|
289
289
|
"flex flex-row items-center cursor-pointer text-accent-primary small-medium flex-1 min-w-0",
|
|
290
290
|
`${n ? "" : 'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded before:mr-2'}`,
|
|
291
291
|
s ? "pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4" : ""
|
|
292
|
-
),
|
|
292
|
+
), l = i(
|
|
293
293
|
"mr-2 border rounded",
|
|
294
294
|
s ? "bg-layer-4 border-icon-secondary" : ""
|
|
295
295
|
);
|
|
296
|
-
return /* @__PURE__ */
|
|
297
|
-
n && (a ? /* @__PURE__ */ r(
|
|
298
|
-
e && /* @__PURE__ */ r(
|
|
296
|
+
return /* @__PURE__ */ m("label", { className: d, htmlFor: t, children: [
|
|
297
|
+
n && (a ? /* @__PURE__ */ r(ge, { className: l, ...M }) : /* @__PURE__ */ r(Y, { className: l, ...M })),
|
|
298
|
+
e && /* @__PURE__ */ r(T, { tooltip: e, triggerClassName: "flex-1 min-w-0", children: /* @__PURE__ */ r("p", { className: "text-primary w-full truncate", children: e }) }),
|
|
299
299
|
/* @__PURE__ */ r(
|
|
300
300
|
"input",
|
|
301
301
|
{
|
|
@@ -311,78 +311,78 @@ const ze = {
|
|
|
311
311
|
)
|
|
312
312
|
] });
|
|
313
313
|
};
|
|
314
|
-
var
|
|
315
|
-
const
|
|
314
|
+
var w = /* @__PURE__ */ ((e) => (e.VALID = "valid", e.ERROR = "error", e))(w || {});
|
|
315
|
+
const rr = (e, t) => {
|
|
316
316
|
if (t === e.id)
|
|
317
317
|
switch (e.status) {
|
|
318
|
-
case
|
|
318
|
+
case w.VALID:
|
|
319
319
|
return "border-accent-secondary text-primary";
|
|
320
|
-
case
|
|
320
|
+
case w.ERROR:
|
|
321
321
|
return "border-red-900 text-primary";
|
|
322
322
|
default:
|
|
323
323
|
return "border-accent-primary text-primary";
|
|
324
324
|
}
|
|
325
325
|
switch (e.status) {
|
|
326
|
-
case
|
|
326
|
+
case w.VALID:
|
|
327
327
|
return "border-primary text-white";
|
|
328
|
-
case
|
|
328
|
+
case w.ERROR:
|
|
329
329
|
return "border-red-900 text-error";
|
|
330
330
|
default:
|
|
331
331
|
return "border-primary text-secondary";
|
|
332
332
|
}
|
|
333
|
-
},
|
|
333
|
+
}, tr = (e, t) => {
|
|
334
334
|
if (t === e.id)
|
|
335
335
|
switch (e.status) {
|
|
336
|
-
case
|
|
336
|
+
case w.VALID:
|
|
337
337
|
return "bg-accent-secondary";
|
|
338
|
-
case
|
|
338
|
+
case w.ERROR:
|
|
339
339
|
return "bg-red-400";
|
|
340
340
|
default:
|
|
341
341
|
return "bg-accent-primary";
|
|
342
342
|
}
|
|
343
343
|
switch (e.status) {
|
|
344
|
-
case
|
|
344
|
+
case w.VALID:
|
|
345
345
|
return "bg-accent-secondary";
|
|
346
|
-
case
|
|
346
|
+
case w.ERROR:
|
|
347
347
|
return "bg-red-400";
|
|
348
348
|
default:
|
|
349
349
|
return "bg-layer-4";
|
|
350
350
|
}
|
|
351
|
-
},
|
|
351
|
+
}, nr = ({
|
|
352
352
|
step: e,
|
|
353
353
|
index: t,
|
|
354
354
|
currentStep: n,
|
|
355
355
|
onChangeStep: a
|
|
356
356
|
}) => {
|
|
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",
|
|
358
|
-
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", c = () => n === e.id && e.status === w.ERROR ? /* @__PURE__ */ r(ye, { stroke: 2, size: 16 }) : n !== e.id && e.status === w.VALID ? /* @__PURE__ */ r(Y, { stroke: 2, size: 16 }) : t + 1;
|
|
358
|
+
return /* @__PURE__ */ m(
|
|
359
359
|
"button",
|
|
360
360
|
{
|
|
361
|
-
className: i(s,
|
|
361
|
+
className: i(s, rr(e, n)),
|
|
362
362
|
onClick: () => a(e.id),
|
|
363
363
|
children: [
|
|
364
364
|
/* @__PURE__ */ r(
|
|
365
365
|
"span",
|
|
366
366
|
{
|
|
367
|
-
className: i(o,
|
|
368
|
-
children:
|
|
367
|
+
className: i(o, tr(e, n)),
|
|
368
|
+
children: c()
|
|
369
369
|
}
|
|
370
370
|
),
|
|
371
371
|
/* @__PURE__ */ r("span", { children: e.name })
|
|
372
372
|
]
|
|
373
373
|
}
|
|
374
374
|
);
|
|
375
|
-
},
|
|
375
|
+
}, Or = ({
|
|
376
376
|
steps: e,
|
|
377
377
|
currentStep: t,
|
|
378
378
|
onChangeStep: n
|
|
379
379
|
}) => {
|
|
380
380
|
const a = (s) => {
|
|
381
|
-
const o = e.findIndex((u) => u.id === t),
|
|
382
|
-
(s !== t && e[o].status ===
|
|
381
|
+
const o = e.findIndex((u) => u.id === t), c = e.findIndex((u) => u.id === s);
|
|
382
|
+
(s !== t && e[o].status === w.VALID || c < o) && n(s);
|
|
383
383
|
};
|
|
384
384
|
return /* @__PURE__ */ r("div", { id: "steps", className: "flex gap-x-3", children: e.map((s, o) => /* @__PURE__ */ r(
|
|
385
|
-
|
|
385
|
+
nr,
|
|
386
386
|
{
|
|
387
387
|
currentStep: t,
|
|
388
388
|
onChangeStep: a,
|
|
@@ -391,18 +391,18 @@ const er = (e, t) => {
|
|
|
391
391
|
},
|
|
392
392
|
s.id
|
|
393
393
|
)) });
|
|
394
|
-
},
|
|
394
|
+
}, ar = ({
|
|
395
395
|
name: e,
|
|
396
396
|
value: t,
|
|
397
397
|
title: n,
|
|
398
398
|
description: a,
|
|
399
399
|
checked: s = !1,
|
|
400
400
|
inputId: o,
|
|
401
|
-
cssClass:
|
|
401
|
+
cssClass: c,
|
|
402
402
|
labelCssClass: u,
|
|
403
403
|
disabled: d,
|
|
404
|
-
onChange:
|
|
405
|
-
descriptionCssClass:
|
|
404
|
+
onChange: l,
|
|
405
|
+
descriptionCssClass: p
|
|
406
406
|
}) => {
|
|
407
407
|
const f = `${o}-desc`, x = i(
|
|
408
408
|
"dial-small cursor-pointer",
|
|
@@ -411,13 +411,13 @@ const er = (e, t) => {
|
|
|
411
411
|
), h = i(
|
|
412
412
|
"cursor-pointer dial-input-radio",
|
|
413
413
|
n && "mr-2",
|
|
414
|
-
|
|
414
|
+
c
|
|
415
415
|
), C = i("flex flex-col", !!a && "mb-2"), g = i(
|
|
416
416
|
"dial-tiny mt-2 ml-[26px] text-secondary",
|
|
417
|
-
|
|
417
|
+
p
|
|
418
418
|
);
|
|
419
|
-
return /* @__PURE__ */
|
|
420
|
-
/* @__PURE__ */
|
|
419
|
+
return /* @__PURE__ */ m("div", { className: C, children: [
|
|
420
|
+
/* @__PURE__ */ m("div", { className: "flex flex-row items-center", children: [
|
|
421
421
|
/* @__PURE__ */ r(
|
|
422
422
|
"input",
|
|
423
423
|
{
|
|
@@ -430,7 +430,7 @@ const er = (e, t) => {
|
|
|
430
430
|
"aria-describedby": s && a ? f : void 0,
|
|
431
431
|
className: h,
|
|
432
432
|
onChange: (D) => {
|
|
433
|
-
d || D.target.checked &&
|
|
433
|
+
d || D.target.checked && l?.(t);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
),
|
|
@@ -439,22 +439,22 @@ const er = (e, t) => {
|
|
|
439
439
|
s && a && /* @__PURE__ */ r("div", { id: f, className: g, children: a })
|
|
440
440
|
] });
|
|
441
441
|
};
|
|
442
|
-
var
|
|
443
|
-
const
|
|
444
|
-
[
|
|
445
|
-
[
|
|
446
|
-
},
|
|
442
|
+
var U = /* @__PURE__ */ ((e) => (e.Row = "Row", e.Column = "Column", e))(U || {});
|
|
443
|
+
const sr = "flex flex-col gap-2", or = "flex", lr = "pb-1 mt-2", ir = {
|
|
444
|
+
[U.Column]: "flex-col gap-y-3",
|
|
445
|
+
[U.Row]: "flex-row gap-x-6"
|
|
446
|
+
}, Wr = ({
|
|
447
447
|
fieldTitle: e,
|
|
448
448
|
radioCssClass: t,
|
|
449
449
|
labelCssClass: n,
|
|
450
450
|
disabled: a,
|
|
451
451
|
elementId: s,
|
|
452
452
|
radioButtons: o,
|
|
453
|
-
activeRadioButton:
|
|
453
|
+
activeRadioButton: c,
|
|
454
454
|
orientation: u,
|
|
455
455
|
onChange: d
|
|
456
|
-
}) => /* @__PURE__ */
|
|
457
|
-
e && /* @__PURE__ */ r(
|
|
456
|
+
}) => /* @__PURE__ */ m("div", { className: sr, children: [
|
|
457
|
+
e && /* @__PURE__ */ r(z, { fieldTitle: e, htmlFor: s }),
|
|
458
458
|
/* @__PURE__ */ r(
|
|
459
459
|
"div",
|
|
460
460
|
{
|
|
@@ -462,56 +462,56 @@ const ar = "flex flex-col gap-2", sr = "flex", or = "pb-1 mt-2", lr = {
|
|
|
462
462
|
"aria-label": e,
|
|
463
463
|
"aria-disabled": a || void 0,
|
|
464
464
|
className: i(
|
|
465
|
-
|
|
466
|
-
|
|
465
|
+
or,
|
|
466
|
+
ir[u]
|
|
467
467
|
),
|
|
468
|
-
children: o.map((
|
|
468
|
+
children: o.map((l) => /* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
469
469
|
/* @__PURE__ */ r(
|
|
470
|
-
|
|
470
|
+
ar,
|
|
471
471
|
{
|
|
472
472
|
name: s,
|
|
473
|
-
value:
|
|
474
|
-
inputId:
|
|
473
|
+
value: l.id,
|
|
474
|
+
inputId: l.id,
|
|
475
475
|
disabled: a,
|
|
476
476
|
cssClass: t,
|
|
477
477
|
labelCssClass: n,
|
|
478
|
-
title:
|
|
479
|
-
checked:
|
|
480
|
-
onChange: () => d(
|
|
478
|
+
title: l.name,
|
|
479
|
+
checked: l.id === c,
|
|
480
|
+
onChange: () => d(l.id)
|
|
481
481
|
}
|
|
482
482
|
),
|
|
483
|
-
|
|
484
|
-
] },
|
|
483
|
+
l.id === c && l.content ? /* @__PURE__ */ r("div", { className: lr, children: l.content }) : null
|
|
484
|
+
] }, l.id))
|
|
485
485
|
}
|
|
486
486
|
)
|
|
487
|
-
] }),
|
|
487
|
+
] }), zr = ({
|
|
488
488
|
icon: e,
|
|
489
489
|
title: t,
|
|
490
490
|
description: n
|
|
491
|
-
}) => /* @__PURE__ */
|
|
492
|
-
e || /* @__PURE__ */ r(
|
|
491
|
+
}) => /* @__PURE__ */ m("div", { className: "h-full w-full flex flex-col items-center justify-center text-secondary", children: [
|
|
492
|
+
e || /* @__PURE__ */ r(Ce, { width: 60, height: 60 }),
|
|
493
493
|
/* @__PURE__ */ r("span", { className: "small mt-2 text-primary", children: t }),
|
|
494
494
|
n && /* @__PURE__ */ r("span", { className: "mt-1 text-primary", children: n })
|
|
495
|
-
] }),
|
|
495
|
+
] }), cr = 60, Br = ({
|
|
496
496
|
containerCssClass: e,
|
|
497
497
|
children: t,
|
|
498
498
|
width: n,
|
|
499
499
|
title: a,
|
|
500
|
-
iconSize: s =
|
|
500
|
+
iconSize: s = V,
|
|
501
501
|
titleCssClass: o,
|
|
502
|
-
additionalButtons:
|
|
502
|
+
additionalButtons: c
|
|
503
503
|
}) => {
|
|
504
|
-
const [u, d] =
|
|
504
|
+
const [u, d] = S(n), [l, p] = S(!0), f = i([
|
|
505
505
|
"transform rotate-180 [writing-mode:tb-rl]",
|
|
506
|
-
|
|
506
|
+
l && "hidden",
|
|
507
507
|
o
|
|
508
508
|
]), x = i([
|
|
509
509
|
"flex flex-row gap-2 cursor-pointer text-secondary",
|
|
510
|
-
|
|
510
|
+
l ? "justify-end" : "justify-center"
|
|
511
511
|
]), h = () => {
|
|
512
|
-
d(
|
|
512
|
+
d(l ? cr : n), p(!l);
|
|
513
513
|
};
|
|
514
|
-
return /* @__PURE__ */
|
|
514
|
+
return /* @__PURE__ */ m(
|
|
515
515
|
"div",
|
|
516
516
|
{
|
|
517
517
|
className: i([
|
|
@@ -525,30 +525,30 @@ const ar = "flex flex-col gap-2", sr = "flex", or = "pb-1 mt-2", lr = {
|
|
|
525
525
|
{
|
|
526
526
|
className: i([
|
|
527
527
|
"flex-1 min-h-0 overflow-auto",
|
|
528
|
-
!
|
|
528
|
+
!l && "hidden"
|
|
529
529
|
]),
|
|
530
530
|
children: t
|
|
531
531
|
}
|
|
532
532
|
),
|
|
533
533
|
/* @__PURE__ */ r("div", { className: f, children: a }),
|
|
534
|
-
/* @__PURE__ */
|
|
535
|
-
|
|
534
|
+
/* @__PURE__ */ m("div", { className: x, children: [
|
|
535
|
+
l && c,
|
|
536
536
|
/* @__PURE__ */ r(
|
|
537
|
-
|
|
537
|
+
j,
|
|
538
538
|
{
|
|
539
539
|
cssClass: "hover:text-icon-accent-primary",
|
|
540
540
|
onClick: h,
|
|
541
|
-
iconBefore:
|
|
542
|
-
|
|
541
|
+
iconBefore: l ? /* @__PURE__ */ r(
|
|
542
|
+
be,
|
|
543
543
|
{
|
|
544
544
|
size: s,
|
|
545
|
-
stroke:
|
|
545
|
+
stroke: M.stroke
|
|
546
546
|
}
|
|
547
547
|
) : /* @__PURE__ */ r(
|
|
548
|
-
|
|
548
|
+
ve,
|
|
549
549
|
{
|
|
550
550
|
size: s,
|
|
551
|
-
stroke:
|
|
551
|
+
stroke: M.stroke
|
|
552
552
|
}
|
|
553
553
|
)
|
|
554
554
|
}
|
|
@@ -557,12 +557,12 @@ const ar = "flex flex-col gap-2", sr = "flex", or = "pb-1 mt-2", lr = {
|
|
|
557
557
|
]
|
|
558
558
|
}
|
|
559
559
|
);
|
|
560
|
-
},
|
|
560
|
+
}, Hr = ({
|
|
561
561
|
label: e,
|
|
562
562
|
text: t,
|
|
563
563
|
children: n,
|
|
564
564
|
postfix: a
|
|
565
|
-
}) => /* @__PURE__ */
|
|
565
|
+
}) => /* @__PURE__ */ m(
|
|
566
566
|
"div",
|
|
567
567
|
{
|
|
568
568
|
className: i(
|
|
@@ -571,35 +571,55 @@ const ar = "flex flex-col gap-2", sr = "flex", or = "pb-1 mt-2", lr = {
|
|
|
571
571
|
),
|
|
572
572
|
children: [
|
|
573
573
|
/* @__PURE__ */ r("label", { className: "dial-tiny mb-2", children: e }),
|
|
574
|
-
n || /* @__PURE__ */
|
|
575
|
-
/* @__PURE__ */ r(
|
|
574
|
+
n || /* @__PURE__ */ m("div", { className: "flex flex-row items-center", children: [
|
|
575
|
+
/* @__PURE__ */ r(T, { triggerClassName: "text-primary", tooltip: t, children: t }),
|
|
576
576
|
a || null
|
|
577
577
|
] })
|
|
578
578
|
]
|
|
579
579
|
}
|
|
580
|
-
)
|
|
580
|
+
);
|
|
581
|
+
var X = /* @__PURE__ */ ((e) => (e.Default = "default", e))(X || {});
|
|
582
|
+
const dr = {
|
|
583
|
+
[X.Default]: "border-icon-secondary bg-layer-3"
|
|
584
|
+
// TODO: Add other variants here once they are finalized with the UI/UX team
|
|
585
|
+
}, ur = ({
|
|
586
|
+
tag: e,
|
|
587
|
+
cssClass: t,
|
|
588
|
+
remove: n,
|
|
589
|
+
variant: a = X.Default
|
|
590
|
+
}) => {
|
|
591
|
+
const s = dr[a], o = i(
|
|
592
|
+
"flex items-center gap-1 tiny border rounded p-1 h-[22px] text-primary",
|
|
593
|
+
t,
|
|
594
|
+
s
|
|
595
|
+
);
|
|
596
|
+
return /* @__PURE__ */ m("div", { className: o, children: [
|
|
597
|
+
/* @__PURE__ */ r("span", { children: e }),
|
|
598
|
+
n && /* @__PURE__ */ r(j, { iconAfter: /* @__PURE__ */ r($, { size: 16 }), onClick: n })
|
|
599
|
+
] }, e);
|
|
600
|
+
}, pr = ({
|
|
581
601
|
ariaLabel: e,
|
|
582
602
|
cssClass: t,
|
|
583
603
|
size: n = 24,
|
|
584
604
|
onClose: a
|
|
585
605
|
}) => /* @__PURE__ */ r(
|
|
586
|
-
|
|
606
|
+
j,
|
|
587
607
|
{
|
|
588
608
|
ariaLabel: e,
|
|
589
609
|
cssClass: i("text-secondary hover:text-accent-primary", t),
|
|
590
610
|
onClick: a,
|
|
591
611
|
iconBefore: /* @__PURE__ */ r($, { size: n })
|
|
592
612
|
}
|
|
593
|
-
),
|
|
613
|
+
), mr = ({
|
|
594
614
|
value: e,
|
|
595
615
|
textareaId: t,
|
|
596
616
|
placeholder: n,
|
|
597
617
|
cssClass: a = "",
|
|
598
618
|
disabled: s,
|
|
599
619
|
invalid: o,
|
|
600
|
-
readonly:
|
|
620
|
+
readonly: c,
|
|
601
621
|
onChange: u
|
|
602
|
-
}) => /* @__PURE__ */ r(
|
|
622
|
+
}) => /* @__PURE__ */ r(T, { tooltip: e, triggerClassName: "flex", children: /* @__PURE__ */ r(
|
|
603
623
|
"textarea",
|
|
604
624
|
{
|
|
605
625
|
id: t,
|
|
@@ -610,12 +630,12 @@ const ar = "flex flex-col gap-2", sr = "flex", or = "pb-1 mt-2", lr = {
|
|
|
610
630
|
"dial-textarea dial-input px-3 py-2",
|
|
611
631
|
o ? "dial-input-error" : "",
|
|
612
632
|
s && "dial-input-disable",
|
|
613
|
-
|
|
633
|
+
c && "dial-input-readonly",
|
|
614
634
|
a
|
|
615
635
|
),
|
|
616
|
-
onChange: (d) => !
|
|
636
|
+
onChange: (d) => !c && u?.(d.currentTarget.value)
|
|
617
637
|
}
|
|
618
|
-
) }),
|
|
638
|
+
) }), fr = [
|
|
619
639
|
"ArrowLeft",
|
|
620
640
|
"ArrowRight",
|
|
621
641
|
"ArrowUp",
|
|
@@ -627,14 +647,14 @@ const ar = "flex flex-col gap-2", sr = "flex", or = "pb-1 mt-2", lr = {
|
|
|
627
647
|
"Escape",
|
|
628
648
|
"Home",
|
|
629
649
|
"End"
|
|
630
|
-
],
|
|
631
|
-
if ((t === "number" || n !== void 0 || a !== void 0) && !
|
|
650
|
+
], hr = (e, t, n, a) => {
|
|
651
|
+
if ((t === "number" || n !== void 0 || a !== void 0) && !fr.includes(e.key) && !(e.key === "-" && e.currentTarget.selectionStart === 0 && (n === void 0 || n < 0)) && !(e.key === "." && t === "number" && !e.currentTarget.value.includes("."))) {
|
|
632
652
|
if (!/^[0-9]$/.test(e.key)) {
|
|
633
653
|
e.preventDefault();
|
|
634
654
|
return;
|
|
635
655
|
}
|
|
636
656
|
if (n !== void 0 || a !== void 0) {
|
|
637
|
-
const o = e.currentTarget.value,
|
|
657
|
+
const o = e.currentTarget.value, c = e.currentTarget.selectionStart || 0, u = o.slice(0, c) + e.key + o.slice(c), d = parseFloat(u);
|
|
638
658
|
if (!isNaN(d)) {
|
|
639
659
|
if (n !== void 0 && d < n) {
|
|
640
660
|
e.preventDefault();
|
|
@@ -647,18 +667,18 @@ const ar = "flex flex-col gap-2", sr = "flex", or = "pb-1 mt-2", lr = {
|
|
|
647
667
|
}
|
|
648
668
|
}
|
|
649
669
|
}
|
|
650
|
-
},
|
|
670
|
+
}, H = ({
|
|
651
671
|
iconBefore: e,
|
|
652
672
|
iconAfter: t,
|
|
653
673
|
hideBorder: n,
|
|
654
674
|
value: a,
|
|
655
675
|
elementId: s,
|
|
656
676
|
placeholder: o = "",
|
|
657
|
-
cssClass:
|
|
677
|
+
cssClass: c = "",
|
|
658
678
|
containerCssClass: u,
|
|
659
679
|
tooltipTriggerClassName: d,
|
|
660
|
-
type:
|
|
661
|
-
disabled:
|
|
680
|
+
type: l = "text",
|
|
681
|
+
disabled: p,
|
|
662
682
|
readonly: f,
|
|
663
683
|
invalid: x,
|
|
664
684
|
onChange: h,
|
|
@@ -666,168 +686,168 @@ const ar = "flex flex-col gap-2", sr = "flex", or = "pb-1 mt-2", lr = {
|
|
|
666
686
|
max: g,
|
|
667
687
|
prefix: k,
|
|
668
688
|
suffix: D,
|
|
669
|
-
textBeforeInput:
|
|
670
|
-
textAfterInput:
|
|
689
|
+
textBeforeInput: b,
|
|
690
|
+
textAfterInput: y
|
|
671
691
|
}) => {
|
|
672
|
-
const
|
|
673
|
-
|
|
674
|
-
},
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
677
|
-
const
|
|
678
|
-
if (isNaN(
|
|
692
|
+
const v = (L) => L.target.blur(), P = l === "number" || C !== void 0 || g !== void 0, G = (L) => {
|
|
693
|
+
hr(L, l, C, g);
|
|
694
|
+
}, pe = (L) => {
|
|
695
|
+
const O = L.currentTarget.value;
|
|
696
|
+
if (P && O !== "") {
|
|
697
|
+
const B = parseFloat(O);
|
|
698
|
+
if (isNaN(B) && O !== "-" && O !== "." || !isNaN(B) && (C !== void 0 && B < C || g !== void 0 && B > g))
|
|
679
699
|
return;
|
|
680
700
|
}
|
|
681
|
-
h?.(
|
|
701
|
+
h?.(O);
|
|
682
702
|
};
|
|
683
|
-
return /* @__PURE__ */
|
|
703
|
+
return /* @__PURE__ */ m(
|
|
684
704
|
"div",
|
|
685
705
|
{
|
|
686
706
|
className: i(
|
|
687
707
|
"dial-input-field flex flex-row items-center justify-between py-2",
|
|
688
708
|
n ? "dial-input-no-border" : "dial-input",
|
|
689
709
|
x && "dial-input-error",
|
|
690
|
-
|
|
710
|
+
p && "dial-input-disable",
|
|
691
711
|
f && "dial-input-readonly",
|
|
692
|
-
!
|
|
693
|
-
!
|
|
712
|
+
!b && "pl-3",
|
|
713
|
+
!y && "pr-3",
|
|
694
714
|
u
|
|
695
715
|
),
|
|
696
716
|
children: [
|
|
697
|
-
|
|
698
|
-
|
|
717
|
+
b && /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
718
|
+
H,
|
|
699
719
|
{
|
|
700
720
|
hideBorder: !0,
|
|
701
721
|
containerCssClass: "rounded-r-none border-r-0",
|
|
702
722
|
cssClass: "overflow-hidden overflow-ellipsis dial-small",
|
|
703
|
-
value:
|
|
723
|
+
value: b,
|
|
704
724
|
disabled: !0,
|
|
705
|
-
elementId:
|
|
725
|
+
elementId: b + "textBefore"
|
|
706
726
|
}
|
|
707
727
|
) }),
|
|
708
|
-
k && /* @__PURE__ */
|
|
728
|
+
k && /* @__PURE__ */ m("p", { className: "text-secondary dial-small", children: [
|
|
709
729
|
" ",
|
|
710
730
|
k
|
|
711
731
|
] }),
|
|
712
|
-
/* @__PURE__ */ r(
|
|
732
|
+
/* @__PURE__ */ r(R, { icon: e }),
|
|
713
733
|
/* @__PURE__ */ r(
|
|
714
|
-
|
|
734
|
+
T,
|
|
715
735
|
{
|
|
716
736
|
tooltip: a,
|
|
717
737
|
triggerClassName: i(d, "flex-1"),
|
|
718
738
|
children: /* @__PURE__ */ r(
|
|
719
739
|
"input",
|
|
720
740
|
{
|
|
721
|
-
type:
|
|
741
|
+
type: l,
|
|
722
742
|
autoComplete: "off",
|
|
723
743
|
id: s,
|
|
724
744
|
placeholder: o,
|
|
725
745
|
value: a ?? "",
|
|
726
|
-
disabled:
|
|
727
|
-
className: i("border-0 bg-transparent",
|
|
728
|
-
onChange: (L) => !f &&
|
|
729
|
-
onKeyDown:
|
|
730
|
-
onWheel:
|
|
746
|
+
disabled: p,
|
|
747
|
+
className: i("border-0 bg-transparent", c),
|
|
748
|
+
onChange: (L) => !f && pe?.(L),
|
|
749
|
+
onKeyDown: G,
|
|
750
|
+
onWheel: v,
|
|
731
751
|
min: C,
|
|
732
752
|
max: g
|
|
733
753
|
}
|
|
734
754
|
)
|
|
735
755
|
}
|
|
736
756
|
),
|
|
737
|
-
/* @__PURE__ */ r(
|
|
738
|
-
D && /* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ r(R, { icon: t }),
|
|
758
|
+
D && /* @__PURE__ */ m("p", { className: "text-secondary dial-small", children: [
|
|
739
759
|
" ",
|
|
740
760
|
D
|
|
741
761
|
] }),
|
|
742
|
-
|
|
743
|
-
|
|
762
|
+
y && /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
763
|
+
H,
|
|
744
764
|
{
|
|
745
765
|
hideBorder: !0,
|
|
746
766
|
containerCssClass: "rounded-l-none border-l-0",
|
|
747
|
-
value:
|
|
767
|
+
value: y,
|
|
748
768
|
disabled: !0,
|
|
749
|
-
elementId:
|
|
769
|
+
elementId: y + "textAfter"
|
|
750
770
|
}
|
|
751
771
|
) })
|
|
752
772
|
]
|
|
753
773
|
}
|
|
754
774
|
);
|
|
755
|
-
},
|
|
775
|
+
}, xr = /^0+\.(\d+)?$/, gr = /^0+/, de = ({
|
|
756
776
|
fieldTitle: e,
|
|
757
777
|
errorText: t,
|
|
758
778
|
optional: n,
|
|
759
779
|
elementCssClass: a,
|
|
760
780
|
elementContainerCssClass: s,
|
|
761
781
|
elementId: o,
|
|
762
|
-
containerCssClass:
|
|
782
|
+
containerCssClass: c,
|
|
763
783
|
readonly: u,
|
|
764
784
|
defaultEmptyText: d,
|
|
765
|
-
min:
|
|
766
|
-
max:
|
|
785
|
+
min: l,
|
|
786
|
+
max: p,
|
|
767
787
|
...f
|
|
768
|
-
}) => /* @__PURE__ */
|
|
788
|
+
}) => /* @__PURE__ */ m("div", { className: i("flex flex-col", c), children: [
|
|
769
789
|
/* @__PURE__ */ r(
|
|
770
|
-
|
|
790
|
+
z,
|
|
771
791
|
{
|
|
772
792
|
fieldTitle: e,
|
|
773
793
|
optional: n,
|
|
774
794
|
htmlFor: o
|
|
775
795
|
}
|
|
776
796
|
),
|
|
777
|
-
u ? /* @__PURE__ */ r("span", { children: f.value || (d ?? "None") }) : /* @__PURE__ */
|
|
797
|
+
u ? /* @__PURE__ */ r("span", { children: f.value || (d ?? "None") }) : /* @__PURE__ */ m(Z, { children: [
|
|
778
798
|
/* @__PURE__ */ r(
|
|
779
|
-
|
|
799
|
+
H,
|
|
780
800
|
{
|
|
781
801
|
elementId: o,
|
|
782
802
|
cssClass: a,
|
|
783
803
|
containerCssClass: s,
|
|
784
804
|
invalid: t != null,
|
|
785
|
-
min:
|
|
786
|
-
max:
|
|
805
|
+
min: l,
|
|
806
|
+
max: p,
|
|
787
807
|
...f
|
|
788
808
|
}
|
|
789
809
|
),
|
|
790
|
-
/* @__PURE__ */ r(
|
|
810
|
+
/* @__PURE__ */ r(W, { errorText: t })
|
|
791
811
|
] })
|
|
792
|
-
] }),
|
|
812
|
+
] }), _r = ({
|
|
793
813
|
onChange: e,
|
|
794
814
|
value: t,
|
|
795
815
|
min: n,
|
|
796
816
|
max: a,
|
|
797
817
|
...s
|
|
798
818
|
}) => {
|
|
799
|
-
const o = (
|
|
819
|
+
const o = (c) => String(c)?.match(xr) ? String(c)?.replace(gr, "0") : Number(c);
|
|
800
820
|
return /* @__PURE__ */ r(
|
|
801
|
-
|
|
821
|
+
de,
|
|
802
822
|
{
|
|
803
823
|
type: "number",
|
|
804
|
-
onChange: (
|
|
824
|
+
onChange: (c) => e?.(o(c)),
|
|
805
825
|
value: t,
|
|
806
826
|
min: n,
|
|
807
827
|
max: a,
|
|
808
828
|
...s
|
|
809
829
|
}
|
|
810
830
|
);
|
|
811
|
-
},
|
|
831
|
+
}, Kr = ({
|
|
812
832
|
onChange: e,
|
|
813
833
|
...t
|
|
814
834
|
}) => /* @__PURE__ */ r(
|
|
815
|
-
|
|
835
|
+
de,
|
|
816
836
|
{
|
|
817
837
|
type: "text",
|
|
818
838
|
onChange: (n) => e?.(n),
|
|
819
839
|
...t
|
|
820
840
|
}
|
|
821
|
-
),
|
|
841
|
+
), $r = ({
|
|
822
842
|
fieldTitle: e,
|
|
823
843
|
optional: t,
|
|
824
844
|
elementId: n,
|
|
825
845
|
elementCssClass: a,
|
|
826
846
|
errorText: s,
|
|
827
847
|
...o
|
|
828
|
-
}) => /* @__PURE__ */
|
|
848
|
+
}) => /* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
829
849
|
/* @__PURE__ */ r(
|
|
830
|
-
|
|
850
|
+
z,
|
|
831
851
|
{
|
|
832
852
|
fieldTitle: e,
|
|
833
853
|
optional: t,
|
|
@@ -835,15 +855,15 @@ const ar = "flex flex-col gap-2", sr = "flex", or = "pb-1 mt-2", lr = {
|
|
|
835
855
|
}
|
|
836
856
|
),
|
|
837
857
|
/* @__PURE__ */ r(
|
|
838
|
-
|
|
858
|
+
mr,
|
|
839
859
|
{
|
|
840
860
|
textareaId: n,
|
|
841
861
|
cssClass: a,
|
|
842
862
|
...o
|
|
843
863
|
}
|
|
844
864
|
),
|
|
845
|
-
/* @__PURE__ */ r(
|
|
846
|
-
] }),
|
|
865
|
+
/* @__PURE__ */ r(W, { errorText: s })
|
|
866
|
+
] }), Gr = ({
|
|
847
867
|
title: e,
|
|
848
868
|
switchId: t,
|
|
849
869
|
isOn: n = !1,
|
|
@@ -855,18 +875,18 @@ const ar = "flex flex-col gap-2", sr = "flex", or = "pb-1 mt-2", lr = {
|
|
|
855
875
|
n ? "flex-row-reverse" : "flex-row",
|
|
856
876
|
a ? "pointer-events-none" : "",
|
|
857
877
|
a ? n ? "bg-controls-disable" : "bg-layer-4" : n ? "bg-accent-primary" : "bg-layer-4"
|
|
858
|
-
),
|
|
878
|
+
), c = E(
|
|
859
879
|
(u) => {
|
|
860
880
|
u.stopPropagation(), s?.(!n);
|
|
861
881
|
},
|
|
862
882
|
[s, n]
|
|
863
883
|
);
|
|
864
|
-
return /* @__PURE__ */
|
|
884
|
+
return /* @__PURE__ */ m("div", { className: "flex flex-row items-center", children: [
|
|
865
885
|
/* @__PURE__ */ r(
|
|
866
886
|
"input",
|
|
867
887
|
{
|
|
868
888
|
type: "checkbox",
|
|
869
|
-
onChange:
|
|
889
|
+
onChange: c,
|
|
870
890
|
id: t,
|
|
871
891
|
disabled: a,
|
|
872
892
|
className: "invisible w-0 h-0",
|
|
@@ -885,32 +905,32 @@ const ar = "flex flex-col gap-2", sr = "flex", or = "pb-1 mt-2", lr = {
|
|
|
885
905
|
e && /* @__PURE__ */ r("span", { className: "pl-2 dial-small text-primary", children: e })
|
|
886
906
|
] });
|
|
887
907
|
};
|
|
888
|
-
var
|
|
889
|
-
const
|
|
890
|
-
[
|
|
891
|
-
[
|
|
892
|
-
[
|
|
893
|
-
},
|
|
908
|
+
var A = /* @__PURE__ */ ((e) => (e.Sm = "sm", e.Md = "md", e.Lg = "lg", e))(A || {});
|
|
909
|
+
const yr = "z-[52] flex items-center justify-center bg-blackout md:p-4", Cr = "divide-tertiary divide-y", br = "flex flex-row justify-between py-4 px-6 items-center", vr = {
|
|
910
|
+
[A.Sm]: "dial-sm-popup",
|
|
911
|
+
[A.Md]: "dial-md-popup",
|
|
912
|
+
[A.Lg]: "dial-lg-popup"
|
|
913
|
+
}, wr = ({
|
|
894
914
|
open: e = !1,
|
|
895
915
|
title: t,
|
|
896
916
|
portalId: n,
|
|
897
917
|
cssClass: a,
|
|
898
918
|
overlayClass: s,
|
|
899
919
|
headingClass: o,
|
|
900
|
-
dividers:
|
|
920
|
+
dividers: c = !0,
|
|
901
921
|
children: u,
|
|
902
922
|
footer: d,
|
|
903
|
-
onClose:
|
|
904
|
-
size:
|
|
923
|
+
onClose: l,
|
|
924
|
+
size: p = A.Md
|
|
905
925
|
}) => {
|
|
906
|
-
const { refs: f, context: x } =
|
|
926
|
+
const { refs: f, context: x } = te({
|
|
907
927
|
open: e,
|
|
908
|
-
onOpenChange: (
|
|
909
|
-
|
|
928
|
+
onOpenChange: (b) => {
|
|
929
|
+
b || l?.(null);
|
|
910
930
|
}
|
|
911
|
-
}), h =
|
|
931
|
+
}), h = ae(x, { role: "dialog" }), C = ne(x, { outsidePress: !0 }), { getFloatingProps: g } = se([h, C]);
|
|
912
932
|
if (!e) return null;
|
|
913
|
-
const k = typeof t == "string" ? "dial-popup-heading" : void 0, D = (
|
|
933
|
+
const k = typeof t == "string" ? "dial-popup-heading" : void 0, D = (b) => b ? typeof b == "string" ? /* @__PURE__ */ r(
|
|
914
934
|
"h3",
|
|
915
935
|
{
|
|
916
936
|
id: k,
|
|
@@ -918,10 +938,10 @@ const hr = "z-[52] flex items-center justify-center bg-blackout md:p-4", xr = "d
|
|
|
918
938
|
"flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",
|
|
919
939
|
o
|
|
920
940
|
),
|
|
921
|
-
children: /* @__PURE__ */ r(
|
|
941
|
+
children: /* @__PURE__ */ r(T, { tooltip: b, children: b })
|
|
922
942
|
}
|
|
923
|
-
) :
|
|
924
|
-
return /* @__PURE__ */ r(
|
|
943
|
+
) : b : /* @__PURE__ */ r("span", {});
|
|
944
|
+
return /* @__PURE__ */ r(le, { id: n, children: /* @__PURE__ */ r(Oe, { className: i(yr, s), children: /* @__PURE__ */ r(We, { context: x, children: /* @__PURE__ */ m(
|
|
925
945
|
"div",
|
|
926
946
|
{
|
|
927
947
|
ref: f.setFloating,
|
|
@@ -931,18 +951,18 @@ const hr = "z-[52] flex items-center justify-center bg-blackout md:p-4", xr = "d
|
|
|
931
951
|
"aria-labelledby": k,
|
|
932
952
|
className: i(
|
|
933
953
|
"dial-popup",
|
|
934
|
-
|
|
935
|
-
|
|
954
|
+
vr[p],
|
|
955
|
+
c && Cr,
|
|
936
956
|
a
|
|
937
957
|
),
|
|
938
958
|
children: [
|
|
939
|
-
/* @__PURE__ */
|
|
959
|
+
/* @__PURE__ */ m("div", { className: br, children: [
|
|
940
960
|
D(t),
|
|
941
961
|
/* @__PURE__ */ r(
|
|
942
|
-
|
|
962
|
+
pr,
|
|
943
963
|
{
|
|
944
964
|
ariaLabel: "Close dialog",
|
|
945
|
-
onClose: (
|
|
965
|
+
onClose: (b) => l?.(b)
|
|
946
966
|
}
|
|
947
967
|
)
|
|
948
968
|
] }),
|
|
@@ -952,16 +972,16 @@ const hr = "z-[52] flex items-center justify-center bg-blackout md:p-4", xr = "d
|
|
|
952
972
|
}
|
|
953
973
|
) }) }) });
|
|
954
974
|
};
|
|
955
|
-
var
|
|
956
|
-
const
|
|
957
|
-
[
|
|
958
|
-
confirmVariant:
|
|
959
|
-
cancelVariant:
|
|
975
|
+
var _ = /* @__PURE__ */ ((e) => (e.Info = "info", e.Danger = "danger", e))(_ || {});
|
|
976
|
+
const Nr = "flex justify-end gap-2 px-6 py-4", kr = "text-secondary dial-small-150 px-6 py-4", Dr = "Cancel", q = {
|
|
977
|
+
[_.Info]: {
|
|
978
|
+
confirmVariant: I.Primary,
|
|
979
|
+
cancelVariant: I.Secondary
|
|
960
980
|
},
|
|
961
|
-
[
|
|
981
|
+
[_.Danger]: {
|
|
962
982
|
container: "border-t-4 border-error",
|
|
963
|
-
confirmVariant:
|
|
964
|
-
cancelVariant:
|
|
983
|
+
confirmVariant: I.Danger,
|
|
984
|
+
cancelVariant: I.Secondary
|
|
965
985
|
}
|
|
966
986
|
}, Zr = ({
|
|
967
987
|
title: e,
|
|
@@ -969,87 +989,87 @@ const br = "flex justify-end gap-2 px-6 py-4", vr = "text-secondary dial-small-1
|
|
|
969
989
|
descriptionCssClass: n,
|
|
970
990
|
open: a = !1,
|
|
971
991
|
confirmLabel: s,
|
|
972
|
-
cancelLabel: o =
|
|
973
|
-
isLoading:
|
|
992
|
+
cancelLabel: o = Dr,
|
|
993
|
+
isLoading: c = !1,
|
|
974
994
|
disableConfirmButton: u = !1,
|
|
975
995
|
cssClass: d,
|
|
976
|
-
confirmClassName:
|
|
977
|
-
onClose:
|
|
996
|
+
confirmClassName: l,
|
|
997
|
+
onClose: p,
|
|
978
998
|
onConfirm: f,
|
|
979
999
|
onCancel: x,
|
|
980
1000
|
children: h,
|
|
981
1001
|
dividers: C = !1,
|
|
982
|
-
variant: g =
|
|
983
|
-
size: k =
|
|
1002
|
+
variant: g = _.Info,
|
|
1003
|
+
size: k = A.Sm
|
|
984
1004
|
}) => {
|
|
985
|
-
const D =
|
|
1005
|
+
const D = c ? null : /* @__PURE__ */ m("div", { className: Nr, children: [
|
|
986
1006
|
/* @__PURE__ */ r(
|
|
987
|
-
|
|
1007
|
+
j,
|
|
988
1008
|
{
|
|
989
|
-
variant:
|
|
1009
|
+
variant: I.Secondary,
|
|
990
1010
|
title: o,
|
|
991
|
-
onClick: () => x ? x() :
|
|
1011
|
+
onClick: () => x ? x() : p?.()
|
|
992
1012
|
}
|
|
993
1013
|
),
|
|
994
1014
|
/* @__PURE__ */ r(
|
|
995
|
-
|
|
1015
|
+
j,
|
|
996
1016
|
{
|
|
997
|
-
variant:
|
|
998
|
-
cssClass:
|
|
1017
|
+
variant: q[g].confirmVariant,
|
|
1018
|
+
cssClass: l,
|
|
999
1019
|
title: s,
|
|
1000
1020
|
disable: u,
|
|
1001
1021
|
onClick: () => f()
|
|
1002
1022
|
}
|
|
1003
1023
|
)
|
|
1004
|
-
] }),
|
|
1024
|
+
] }), b = E(() => c ? /* @__PURE__ */ r("div", { className: "px-6 py-4 h-[120px]", children: /* @__PURE__ */ r(Ue, { size: 50 }) }) : h ?? (t ? /* @__PURE__ */ r(
|
|
1005
1025
|
"div",
|
|
1006
1026
|
{
|
|
1007
|
-
className: i(
|
|
1027
|
+
className: i(kr, n),
|
|
1008
1028
|
children: t
|
|
1009
1029
|
}
|
|
1010
|
-
) : null), [h, t,
|
|
1030
|
+
) : null), [h, t, c, n]);
|
|
1011
1031
|
return /* @__PURE__ */ r(
|
|
1012
|
-
|
|
1032
|
+
wr,
|
|
1013
1033
|
{
|
|
1014
1034
|
open: a,
|
|
1015
1035
|
title: e,
|
|
1016
|
-
cssClass: i(
|
|
1036
|
+
cssClass: i(q[g].container, d),
|
|
1017
1037
|
dividers: C,
|
|
1018
|
-
onClose: () =>
|
|
1038
|
+
onClose: () => p?.(),
|
|
1019
1039
|
footer: D,
|
|
1020
1040
|
size: k,
|
|
1021
|
-
children:
|
|
1041
|
+
children: b()
|
|
1022
1042
|
}
|
|
1023
1043
|
);
|
|
1024
|
-
},
|
|
1025
|
-
|
|
1044
|
+
}, Ir = ({ onClick: e }) => /* @__PURE__ */ r(
|
|
1045
|
+
we,
|
|
1026
1046
|
{
|
|
1027
|
-
...
|
|
1047
|
+
...M,
|
|
1028
1048
|
className: "text-primary",
|
|
1029
1049
|
onClick: e
|
|
1030
1050
|
}
|
|
1031
|
-
),
|
|
1032
|
-
const [t, n] =
|
|
1051
|
+
), Rr = ({ onClick: e }) => /* @__PURE__ */ r(Ne, { ...M, className: "text-primary", onClick: e }), Sr = ({ ...e }) => {
|
|
1052
|
+
const [t, n] = S(!1), a = E((s) => {
|
|
1033
1053
|
n(s);
|
|
1034
1054
|
}, []);
|
|
1035
1055
|
return /* @__PURE__ */ r(
|
|
1036
|
-
|
|
1056
|
+
H,
|
|
1037
1057
|
{
|
|
1038
1058
|
type: t ? "text" : "password",
|
|
1039
1059
|
...e,
|
|
1040
|
-
iconAfter: t ? /* @__PURE__ */ r(
|
|
1060
|
+
iconAfter: t ? /* @__PURE__ */ r(Ir, { onClick: () => a(!1) }) : /* @__PURE__ */ r(Rr, { onClick: () => a(!0) })
|
|
1041
1061
|
}
|
|
1042
1062
|
);
|
|
1043
|
-
},
|
|
1063
|
+
}, Ur = ({
|
|
1044
1064
|
fieldTitle: e,
|
|
1045
1065
|
optional: t,
|
|
1046
1066
|
elementCssClass: n,
|
|
1047
1067
|
elementId: a,
|
|
1048
1068
|
errorText: s,
|
|
1049
1069
|
...o
|
|
1050
|
-
}) => /* @__PURE__ */
|
|
1070
|
+
}) => /* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
1051
1071
|
/* @__PURE__ */ r(
|
|
1052
|
-
|
|
1072
|
+
z,
|
|
1053
1073
|
{
|
|
1054
1074
|
fieldTitle: e,
|
|
1055
1075
|
optional: t,
|
|
@@ -1057,7 +1077,7 @@ const br = "flex justify-end gap-2 px-6 py-4", vr = "text-secondary dial-small-1
|
|
|
1057
1077
|
}
|
|
1058
1078
|
),
|
|
1059
1079
|
/* @__PURE__ */ r(
|
|
1060
|
-
|
|
1080
|
+
Sr,
|
|
1061
1081
|
{
|
|
1062
1082
|
cssClass: n,
|
|
1063
1083
|
elementId: a,
|
|
@@ -1065,47 +1085,47 @@ const br = "flex justify-end gap-2 px-6 py-4", vr = "text-secondary dial-small-1
|
|
|
1065
1085
|
...o
|
|
1066
1086
|
}
|
|
1067
1087
|
),
|
|
1068
|
-
/* @__PURE__ */ r(
|
|
1088
|
+
/* @__PURE__ */ r(W, { errorText: s })
|
|
1069
1089
|
] });
|
|
1070
|
-
var
|
|
1071
|
-
const
|
|
1072
|
-
[
|
|
1090
|
+
var K = /* @__PURE__ */ ((e) => (e.Small = "small", e.Base = "base", e))(K || {});
|
|
1091
|
+
const Er = {
|
|
1092
|
+
[K.Small]: {
|
|
1073
1093
|
textClass: "text-xs px-1",
|
|
1074
1094
|
containerClass: "px-[6px] py-1 h-[22px]",
|
|
1075
1095
|
iconSize: 10,
|
|
1076
1096
|
iconStroke: 1
|
|
1077
1097
|
},
|
|
1078
|
-
[
|
|
1098
|
+
[K.Base]: {
|
|
1079
1099
|
textClass: "text-sm px-2",
|
|
1080
1100
|
containerClass: "px-3 py-2 h-[38px]",
|
|
1081
1101
|
iconSize: 18,
|
|
1082
1102
|
iconStroke: 1.5
|
|
1083
1103
|
}
|
|
1084
|
-
},
|
|
1104
|
+
}, Xr = ({
|
|
1085
1105
|
elementId: e,
|
|
1086
1106
|
value: t,
|
|
1087
1107
|
placeholder: n,
|
|
1088
1108
|
disabled: a,
|
|
1089
1109
|
readonly: s,
|
|
1090
1110
|
invalid: o,
|
|
1091
|
-
cssClass:
|
|
1111
|
+
cssClass: c,
|
|
1092
1112
|
containerCssClass: u,
|
|
1093
1113
|
onChange: d,
|
|
1094
|
-
size:
|
|
1114
|
+
size: l = K.Base
|
|
1095
1115
|
}) => {
|
|
1096
|
-
const [
|
|
1097
|
-
|
|
1116
|
+
const [p, f] = S(t || "");
|
|
1117
|
+
re(() => {
|
|
1098
1118
|
f(t || "");
|
|
1099
1119
|
}, [t]);
|
|
1100
|
-
const x =
|
|
1120
|
+
const x = E(
|
|
1101
1121
|
(g) => {
|
|
1102
1122
|
f(g), d?.(g);
|
|
1103
1123
|
},
|
|
1104
1124
|
[d]
|
|
1105
|
-
), h =
|
|
1125
|
+
), h = Er[l], C = E(() => {
|
|
1106
1126
|
x("");
|
|
1107
1127
|
}, [x]);
|
|
1108
|
-
return /* @__PURE__ */
|
|
1128
|
+
return /* @__PURE__ */ m(
|
|
1109
1129
|
"div",
|
|
1110
1130
|
{
|
|
1111
1131
|
className: i(
|
|
@@ -1118,11 +1138,11 @@ const Ir = {
|
|
|
1118
1138
|
),
|
|
1119
1139
|
children: [
|
|
1120
1140
|
/* @__PURE__ */ r(
|
|
1121
|
-
|
|
1141
|
+
R,
|
|
1122
1142
|
{
|
|
1123
1143
|
className: i(a ? "text-secondary" : "text-primary"),
|
|
1124
1144
|
icon: /* @__PURE__ */ r(
|
|
1125
|
-
|
|
1145
|
+
ke,
|
|
1126
1146
|
{
|
|
1127
1147
|
size: h.iconSize,
|
|
1128
1148
|
stroke: h.iconStroke
|
|
@@ -1137,19 +1157,19 @@ const Ir = {
|
|
|
1137
1157
|
type: "text",
|
|
1138
1158
|
autoComplete: "off",
|
|
1139
1159
|
placeholder: n,
|
|
1140
|
-
value:
|
|
1160
|
+
value: p ?? "",
|
|
1141
1161
|
disabled: a,
|
|
1142
1162
|
readOnly: s,
|
|
1143
1163
|
className: i(
|
|
1144
1164
|
"border-0 bg-transparent w-full",
|
|
1145
|
-
|
|
1165
|
+
c,
|
|
1146
1166
|
h.textClass
|
|
1147
1167
|
),
|
|
1148
1168
|
onChange: (g) => !s && x(g.currentTarget.value)
|
|
1149
1169
|
}
|
|
1150
1170
|
),
|
|
1151
|
-
|
|
1152
|
-
|
|
1171
|
+
p && !s && !a && /* @__PURE__ */ r(
|
|
1172
|
+
R,
|
|
1153
1173
|
{
|
|
1154
1174
|
className: "text-primary cursor-pointer",
|
|
1155
1175
|
icon: /* @__PURE__ */ r(
|
|
@@ -1167,7 +1187,7 @@ const Ir = {
|
|
|
1167
1187
|
]
|
|
1168
1188
|
}
|
|
1169
1189
|
);
|
|
1170
|
-
},
|
|
1190
|
+
}, ue = ({ selectedItems: e, listCssClass: t, listElementCssClass: n }) => !!e?.length && /* @__PURE__ */ r(
|
|
1171
1191
|
"ul",
|
|
1172
1192
|
{
|
|
1173
1193
|
className: i(
|
|
@@ -1182,7 +1202,7 @@ const Ir = {
|
|
|
1182
1202
|
"tiny bg-layer-3 rounded p-1 border border-primary max-w-[200px] truncate",
|
|
1183
1203
|
n
|
|
1184
1204
|
]),
|
|
1185
|
-
children: /* @__PURE__ */ r(
|
|
1205
|
+
children: /* @__PURE__ */ r(T, { tooltip: a, children: /* @__PURE__ */ r(
|
|
1186
1206
|
"button",
|
|
1187
1207
|
{
|
|
1188
1208
|
"aria-label": "autocomplete-action",
|
|
@@ -1195,21 +1215,21 @@ const Ir = {
|
|
|
1195
1215
|
a
|
|
1196
1216
|
))
|
|
1197
1217
|
}
|
|
1198
|
-
),
|
|
1218
|
+
), Q = (e) => /* @__PURE__ */ N.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ N.createElement("path", { d: "M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z", fill: "currentColor" })), qr = ({
|
|
1199
1219
|
children: e,
|
|
1200
1220
|
open: t,
|
|
1201
1221
|
readonly: n,
|
|
1202
1222
|
selectedValue: a,
|
|
1203
1223
|
valueCssClasses: s,
|
|
1204
1224
|
inputCssClasses: o,
|
|
1205
|
-
onOpen:
|
|
1225
|
+
onOpen: c,
|
|
1206
1226
|
elementId: u,
|
|
1207
1227
|
errorText: d,
|
|
1208
|
-
emptyValueText:
|
|
1228
|
+
emptyValueText: l
|
|
1209
1229
|
}) => {
|
|
1210
|
-
const
|
|
1211
|
-
return /* @__PURE__ */
|
|
1212
|
-
|
|
1230
|
+
const p = Array.isArray(a) && a.length > 0, f = typeof a == "string" && !!a.trim(), x = p || f ? a : l, h = n ? void 0 : c;
|
|
1231
|
+
return /* @__PURE__ */ m(Z, { children: [
|
|
1232
|
+
p ? /* @__PURE__ */ r("div", { className: "w-full", onClick: h, children: /* @__PURE__ */ m(
|
|
1213
1233
|
"div",
|
|
1214
1234
|
{
|
|
1215
1235
|
className: i(
|
|
@@ -1217,23 +1237,23 @@ const Ir = {
|
|
|
1217
1237
|
n && "dial-input-disable"
|
|
1218
1238
|
),
|
|
1219
1239
|
children: [
|
|
1220
|
-
/* @__PURE__ */ r(
|
|
1240
|
+
/* @__PURE__ */ r(ue, { selectedItems: x }),
|
|
1221
1241
|
!n && /* @__PURE__ */ r("div", { className: "ml-1", children: /* @__PURE__ */ r(
|
|
1222
|
-
|
|
1242
|
+
R,
|
|
1223
1243
|
{
|
|
1224
1244
|
icon: /* @__PURE__ */ r(
|
|
1225
|
-
|
|
1245
|
+
Q,
|
|
1226
1246
|
{
|
|
1227
1247
|
role: "img",
|
|
1228
|
-
width:
|
|
1229
|
-
height:
|
|
1248
|
+
width: V,
|
|
1249
|
+
height: V
|
|
1230
1250
|
}
|
|
1231
1251
|
)
|
|
1232
1252
|
}
|
|
1233
1253
|
) })
|
|
1234
1254
|
]
|
|
1235
1255
|
}
|
|
1236
|
-
) }) : /* @__PURE__ */
|
|
1256
|
+
) }) : /* @__PURE__ */ m(Z, { children: [
|
|
1237
1257
|
/* @__PURE__ */ r(
|
|
1238
1258
|
"button",
|
|
1239
1259
|
{
|
|
@@ -1242,7 +1262,7 @@ const Ir = {
|
|
|
1242
1262
|
onClick: h,
|
|
1243
1263
|
"aria-label": "open-popup",
|
|
1244
1264
|
id: u,
|
|
1245
|
-
children: /* @__PURE__ */
|
|
1265
|
+
children: /* @__PURE__ */ m(
|
|
1246
1266
|
"div",
|
|
1247
1267
|
{
|
|
1248
1268
|
className: i(
|
|
@@ -1252,16 +1272,16 @@ const Ir = {
|
|
|
1252
1272
|
d && "dial-input-error"
|
|
1253
1273
|
),
|
|
1254
1274
|
children: [
|
|
1255
|
-
/* @__PURE__ */ r(
|
|
1275
|
+
/* @__PURE__ */ r(T, { tooltip: String(x), children: /* @__PURE__ */ r("span", { className: s, children: x }) }),
|
|
1256
1276
|
!n && /* @__PURE__ */ r("div", { className: "flex-shrink-0", children: /* @__PURE__ */ r(
|
|
1257
|
-
|
|
1277
|
+
R,
|
|
1258
1278
|
{
|
|
1259
1279
|
icon: /* @__PURE__ */ r(
|
|
1260
|
-
|
|
1280
|
+
Q,
|
|
1261
1281
|
{
|
|
1262
1282
|
role: "img",
|
|
1263
|
-
width:
|
|
1264
|
-
height:
|
|
1283
|
+
width: V,
|
|
1284
|
+
height: V
|
|
1265
1285
|
}
|
|
1266
1286
|
)
|
|
1267
1287
|
}
|
|
@@ -1271,31 +1291,31 @@ const Ir = {
|
|
|
1271
1291
|
)
|
|
1272
1292
|
}
|
|
1273
1293
|
),
|
|
1274
|
-
d && /* @__PURE__ */ r(
|
|
1294
|
+
d && /* @__PURE__ */ r(W, { errorText: d })
|
|
1275
1295
|
] }),
|
|
1276
|
-
t &&
|
|
1296
|
+
t && ze(e, document.body)
|
|
1277
1297
|
] });
|
|
1278
|
-
},
|
|
1298
|
+
}, Qr = ({
|
|
1279
1299
|
placeholder: e = "",
|
|
1280
1300
|
selectedItems: t = [],
|
|
1281
1301
|
updateSelected: n,
|
|
1282
1302
|
listCssClass: a,
|
|
1283
1303
|
listElementCssClass: s,
|
|
1284
1304
|
containerCssClass: o,
|
|
1285
|
-
inputCssClass:
|
|
1305
|
+
inputCssClass: c
|
|
1286
1306
|
}) => {
|
|
1287
|
-
const [u, d] =
|
|
1307
|
+
const [u, d] = S(""), l = E(
|
|
1288
1308
|
(f) => {
|
|
1289
1309
|
f.key === "Enter" && (n([...t, f.currentTarget.value]), d("")), (f.key === "Backspace" || f.key === "Delete") && t.length && !u && n(t.slice(0, -1));
|
|
1290
1310
|
},
|
|
1291
1311
|
[t, n, u]
|
|
1292
|
-
),
|
|
1312
|
+
), p = E(
|
|
1293
1313
|
(f) => {
|
|
1294
1314
|
d(f.target.value);
|
|
1295
1315
|
},
|
|
1296
1316
|
[d]
|
|
1297
1317
|
);
|
|
1298
|
-
return /* @__PURE__ */
|
|
1318
|
+
return /* @__PURE__ */ m(
|
|
1299
1319
|
"div",
|
|
1300
1320
|
{
|
|
1301
1321
|
className: i([
|
|
@@ -1304,7 +1324,7 @@ const Ir = {
|
|
|
1304
1324
|
]),
|
|
1305
1325
|
children: [
|
|
1306
1326
|
/* @__PURE__ */ r(
|
|
1307
|
-
|
|
1327
|
+
ue,
|
|
1308
1328
|
{
|
|
1309
1329
|
selectedItems: t,
|
|
1310
1330
|
listCssClass: a,
|
|
@@ -1316,51 +1336,140 @@ const Ir = {
|
|
|
1316
1336
|
{
|
|
1317
1337
|
type: "text",
|
|
1318
1338
|
value: u,
|
|
1319
|
-
className: i(["border-0 bg-transparent p-0",
|
|
1339
|
+
className: i(["border-0 bg-transparent p-0", c]),
|
|
1320
1340
|
placeholder: t?.length ? "" : e,
|
|
1321
|
-
onKeyDown:
|
|
1322
|
-
onChange:
|
|
1341
|
+
onKeyDown: l,
|
|
1342
|
+
onChange: p
|
|
1323
1343
|
}
|
|
1324
1344
|
)
|
|
1325
1345
|
]
|
|
1326
1346
|
}
|
|
1327
1347
|
);
|
|
1348
|
+
}, Yr = ({
|
|
1349
|
+
initialTags: e = [],
|
|
1350
|
+
fieldTitle: t,
|
|
1351
|
+
optional: n,
|
|
1352
|
+
elementId: a,
|
|
1353
|
+
placeholder: s,
|
|
1354
|
+
errorText: o,
|
|
1355
|
+
invalid: c,
|
|
1356
|
+
disabled: u,
|
|
1357
|
+
onChange: d
|
|
1358
|
+
}) => {
|
|
1359
|
+
const l = J(null), [p, f] = S(e), [x, h] = S(""), [C, g] = S(!1), k = (y) => {
|
|
1360
|
+
const v = y.trim().replace(/,$/, "");
|
|
1361
|
+
if (v && !p.includes(v)) {
|
|
1362
|
+
const P = [v, ...p];
|
|
1363
|
+
f(P), d?.(P);
|
|
1364
|
+
}
|
|
1365
|
+
}, D = (y) => {
|
|
1366
|
+
(y.key === "," || y.key === "Enter") && (y.preventDefault(), k(x), h(""));
|
|
1367
|
+
}, b = (y) => {
|
|
1368
|
+
const v = p.filter((P, G) => G !== y);
|
|
1369
|
+
f(v), d?.(v);
|
|
1370
|
+
};
|
|
1371
|
+
return re(() => {
|
|
1372
|
+
const y = new ResizeObserver(() => {
|
|
1373
|
+
if (l.current) {
|
|
1374
|
+
const v = l.current.scrollHeight > l.current.clientHeight + 10;
|
|
1375
|
+
g(v);
|
|
1376
|
+
}
|
|
1377
|
+
});
|
|
1378
|
+
return l.current && y.observe(l.current), () => y.disconnect();
|
|
1379
|
+
}, [p]), /* @__PURE__ */ m("div", { className: i("flex flex-col w-full"), children: [
|
|
1380
|
+
/* @__PURE__ */ r(
|
|
1381
|
+
z,
|
|
1382
|
+
{
|
|
1383
|
+
fieldTitle: t,
|
|
1384
|
+
optional: n,
|
|
1385
|
+
htmlFor: a
|
|
1386
|
+
}
|
|
1387
|
+
),
|
|
1388
|
+
/* @__PURE__ */ r(
|
|
1389
|
+
"div",
|
|
1390
|
+
{
|
|
1391
|
+
className: i(
|
|
1392
|
+
"dial-input min-h-[38px] p-[6px]",
|
|
1393
|
+
c && "dial-input-error",
|
|
1394
|
+
u && "dial-input-disable"
|
|
1395
|
+
),
|
|
1396
|
+
children: /* @__PURE__ */ m(
|
|
1397
|
+
"div",
|
|
1398
|
+
{
|
|
1399
|
+
ref: l,
|
|
1400
|
+
className: i(
|
|
1401
|
+
"flex flex-wrap gap-2 items-center",
|
|
1402
|
+
C ? "flex-col-reverse" : "flex-row"
|
|
1403
|
+
),
|
|
1404
|
+
children: [
|
|
1405
|
+
p.map((y, v) => /* @__PURE__ */ r(
|
|
1406
|
+
ur,
|
|
1407
|
+
{
|
|
1408
|
+
tag: y,
|
|
1409
|
+
remove: u ? void 0 : () => b(v)
|
|
1410
|
+
},
|
|
1411
|
+
y + v
|
|
1412
|
+
)),
|
|
1413
|
+
/* @__PURE__ */ r(
|
|
1414
|
+
"input",
|
|
1415
|
+
{
|
|
1416
|
+
type: "text",
|
|
1417
|
+
value: x,
|
|
1418
|
+
onChange: (y) => h(y.target.value),
|
|
1419
|
+
onKeyDown: D,
|
|
1420
|
+
className: i(
|
|
1421
|
+
"dial-input-no-border outline-none border-none w-full min-w-[100px] flex-1 p-1"
|
|
1422
|
+
),
|
|
1423
|
+
placeholder: s,
|
|
1424
|
+
disabled: u
|
|
1425
|
+
}
|
|
1426
|
+
)
|
|
1427
|
+
]
|
|
1428
|
+
}
|
|
1429
|
+
)
|
|
1430
|
+
}
|
|
1431
|
+
),
|
|
1432
|
+
/* @__PURE__ */ r(W, { errorText: o })
|
|
1433
|
+
] });
|
|
1328
1434
|
};
|
|
1329
1435
|
export {
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1436
|
+
F as AlertVariant,
|
|
1437
|
+
I as ButtonVariant,
|
|
1438
|
+
_ as ConfirmationPopupVariant,
|
|
1439
|
+
Mr as DialAlert,
|
|
1440
|
+
Qr as DialAutocompleteInput,
|
|
1441
|
+
ue as DialAutocompleteInputValue,
|
|
1442
|
+
j as DialButton,
|
|
1443
|
+
Pr as DialCheckbox,
|
|
1444
|
+
pr as DialCloseButton,
|
|
1445
|
+
Br as DialCollapsibleSidebar,
|
|
1340
1446
|
Zr as DialConfirmationPopup,
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1447
|
+
W as DialErrorText,
|
|
1448
|
+
z as DialFieldLabel,
|
|
1449
|
+
R as DialIcon,
|
|
1450
|
+
H as DialInput,
|
|
1451
|
+
qr as DialInputPopup,
|
|
1452
|
+
Hr as DialLabelledText,
|
|
1347
1453
|
Ue as DialLoader,
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1454
|
+
zr as DialNoDataContent,
|
|
1455
|
+
_r as DialNumberInputField,
|
|
1456
|
+
Sr as DialPasswordInput,
|
|
1457
|
+
Ur as DialPasswordInputField,
|
|
1458
|
+
wr as DialPopup,
|
|
1459
|
+
ar as DialRadioButton,
|
|
1460
|
+
Wr as DialRadioGroup,
|
|
1461
|
+
Xr as DialSearch,
|
|
1462
|
+
Or as DialSteps,
|
|
1463
|
+
Gr as DialSwitch,
|
|
1464
|
+
ur as DialTag,
|
|
1465
|
+
Yr as DialTagInput,
|
|
1466
|
+
$r as DialTextAreaField,
|
|
1467
|
+
Kr as DialTextInputField,
|
|
1468
|
+
mr as DialTextarea,
|
|
1469
|
+
T as DialTooltip,
|
|
1470
|
+
A as PopupSize,
|
|
1471
|
+
U as RadioGroupOrientation,
|
|
1472
|
+
K as SearchSize,
|
|
1473
|
+
w as StepStatus,
|
|
1474
|
+
X as TagVariant
|
|
1366
1475
|
};
|