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