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