@epam/ai-dial-ui-kit 0.2.0-rc.12 → 0.2.0-rc.13
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 +452 -359
- package/dist/index.css +2 -2
- package/dist/src/components/RadioButton/RadioButton.d.ts +46 -0
- package/dist/src/components/RadioField/RadioField.d.ts +39 -0
- package/dist/src/components/RadioField/constants.d.ts +5 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/types/radio-field.d.ts +4 -0
- package/package.json +1 -1
package/dist/dial-ui-kit.es.js
CHANGED
|
@@ -1,220 +1,220 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as n, jsxs as u, Fragment as Z } from "react/jsx-runtime";
|
|
2
2
|
import d from "classnames";
|
|
3
|
-
import { IconCircleCheck as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { useFloating as
|
|
6
|
-
const
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
},
|
|
3
|
+
import { IconCircleCheck as X, IconAlertTriangle as Y, IconAlertCircle as q, IconInfoCircle as J, IconX as Q, IconLoader as ee, IconMinus as re, IconCheck as z, IconExclamationCircle as ne, IconEyeOff as te, IconEye as se } from "@tabler/icons-react";
|
|
4
|
+
import { createContext as ae, useState as W, useRef as oe, useMemo as le, useContext as ie, forwardRef as _, isValidElement as ce, cloneElement as de, useCallback as O } from "react";
|
|
5
|
+
import { useFloating as ue, offset as me, flip as pe, shift as fe, arrow as he, autoUpdate as xe, useHover as be, useFocus as ge, useDismiss as ye, useRole as Ce, useInteractions as Ne, useMergeRefs as j, FloatingPortal as we, FloatingArrow as ve } from "@floating-ui/react";
|
|
6
|
+
const N = ({ icon: e, className: r }) => e ? /* @__PURE__ */ n("span", { className: d("flex-shrink-0", r), children: e }) : null;
|
|
7
|
+
var T = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e.Tertiary = "tertiary", e))(T || {});
|
|
8
|
+
const De = {
|
|
9
|
+
[T.Primary]: "dial-primary-button",
|
|
10
|
+
[T.Secondary]: "dial-secondary-button",
|
|
11
|
+
[T.Tertiary]: "dial-tertiary-button"
|
|
12
|
+
}, Ie = ({
|
|
13
13
|
title: e,
|
|
14
14
|
variant: r,
|
|
15
|
-
cssClass:
|
|
15
|
+
cssClass: t,
|
|
16
16
|
ref: s,
|
|
17
|
-
onClick:
|
|
18
|
-
disable:
|
|
17
|
+
onClick: a,
|
|
18
|
+
disable: o,
|
|
19
19
|
iconAfter: l,
|
|
20
|
-
iconBefore:
|
|
21
|
-
hideTitleOnMobile:
|
|
22
|
-
ariaLabel:
|
|
20
|
+
iconBefore: c,
|
|
21
|
+
hideTitleOnMobile: i,
|
|
22
|
+
ariaLabel: m
|
|
23
23
|
}) => {
|
|
24
|
-
const
|
|
24
|
+
const p = d(
|
|
25
25
|
"dial-small-semi",
|
|
26
26
|
l ? "mr-2" : "",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
),
|
|
30
|
-
r &&
|
|
31
|
-
|
|
27
|
+
c ? "ml-2" : "",
|
|
28
|
+
i ? "hidden sm:inline" : "inline"
|
|
29
|
+
), f = d(
|
|
30
|
+
r && De[r],
|
|
31
|
+
t,
|
|
32
32
|
"focus-visible:outline outline-offset-0"
|
|
33
33
|
);
|
|
34
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ u(
|
|
35
35
|
"button",
|
|
36
36
|
{
|
|
37
37
|
ref: s,
|
|
38
38
|
type: "button",
|
|
39
|
-
className:
|
|
40
|
-
onClick: (
|
|
41
|
-
disabled:
|
|
42
|
-
"aria-label": e ||
|
|
39
|
+
className: f,
|
|
40
|
+
onClick: (g) => a?.(g),
|
|
41
|
+
disabled: o,
|
|
42
|
+
"aria-label": e || m,
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
e && /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ n(N, { icon: c }),
|
|
45
|
+
e && /* @__PURE__ */ n("span", { className: p, children: e }),
|
|
46
|
+
/* @__PURE__ */ n(N, { icon: l })
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
|
-
},
|
|
50
|
+
}, V = ({ errorText: e }) => e && /* @__PURE__ */ n("span", { className: "text-error dial-tiny mt-1", children: e }), P = ({
|
|
51
51
|
fieldTitle: e,
|
|
52
52
|
htmlFor: r,
|
|
53
|
-
optional:
|
|
53
|
+
optional: t,
|
|
54
54
|
optionalText: s,
|
|
55
|
-
cssClass:
|
|
56
|
-
}) => e ? /* @__PURE__ */
|
|
55
|
+
cssClass: a
|
|
56
|
+
}) => e ? /* @__PURE__ */ u(
|
|
57
57
|
"label",
|
|
58
58
|
{
|
|
59
59
|
className: d(
|
|
60
60
|
"dial-tiny text-secondary",
|
|
61
|
-
|
|
62
|
-
!
|
|
61
|
+
a,
|
|
62
|
+
!a?.includes("mb") && "mb-2"
|
|
63
63
|
),
|
|
64
64
|
htmlFor: r,
|
|
65
65
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
-
|
|
66
|
+
/* @__PURE__ */ n("span", { className: "min-h-4", children: e }),
|
|
67
|
+
t && /* @__PURE__ */ n("span", { className: "ml-1", children: s ?? "(Optional)" })
|
|
68
68
|
]
|
|
69
69
|
}
|
|
70
70
|
) : null;
|
|
71
|
-
var
|
|
72
|
-
const
|
|
73
|
-
info: /* @__PURE__ */
|
|
74
|
-
error: /* @__PURE__ */
|
|
75
|
-
warning: /* @__PURE__ */
|
|
76
|
-
success: /* @__PURE__ */
|
|
77
|
-
},
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
81
|
-
[
|
|
82
|
-
},
|
|
83
|
-
variant: e =
|
|
71
|
+
var C = /* @__PURE__ */ ((e) => (e.Info = "info", e.Success = "success", e.Warning = "warning", e.Error = "error", e))(C || {});
|
|
72
|
+
const Re = {
|
|
73
|
+
info: /* @__PURE__ */ n(J, { size: 24, stroke: 2 }),
|
|
74
|
+
error: /* @__PURE__ */ n(q, { size: 24, stroke: 2 }),
|
|
75
|
+
warning: /* @__PURE__ */ n(Y, { size: 24, stroke: 2 }),
|
|
76
|
+
success: /* @__PURE__ */ n(X, { size: 24, stroke: 2 })
|
|
77
|
+
}, ke = {
|
|
78
|
+
[C.Info]: "bg-info border-info text-info",
|
|
79
|
+
[C.Success]: "bg-success border-success text-success",
|
|
80
|
+
[C.Warning]: "bg-warning border-warning text-warning",
|
|
81
|
+
[C.Error]: "bg-error border-error text-error"
|
|
82
|
+
}, Ee = "items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex", sr = ({
|
|
83
|
+
variant: e = C.Info,
|
|
84
84
|
message: r,
|
|
85
|
-
cssClass:
|
|
85
|
+
cssClass: t,
|
|
86
86
|
closable: s = !1,
|
|
87
|
-
onClose:
|
|
88
|
-
}) => /* @__PURE__ */
|
|
87
|
+
onClose: a
|
|
88
|
+
}) => /* @__PURE__ */ u(
|
|
89
89
|
"div",
|
|
90
90
|
{
|
|
91
91
|
role: "alert",
|
|
92
92
|
className: d(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
Ee,
|
|
94
|
+
ke[e],
|
|
95
|
+
t
|
|
96
96
|
),
|
|
97
97
|
children: [
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
99
|
+
/* @__PURE__ */ n(N, { icon: Re[e] }),
|
|
100
|
+
/* @__PURE__ */ n("div", { className: "text-primary", children: r })
|
|
101
101
|
] }),
|
|
102
|
-
s && /* @__PURE__ */
|
|
103
|
-
|
|
102
|
+
s && /* @__PURE__ */ n(
|
|
103
|
+
Ie,
|
|
104
104
|
{
|
|
105
105
|
cssClass: "ml-2 text-secondary hover:text-primary",
|
|
106
106
|
ariaLabel: "Close alert",
|
|
107
|
-
iconBefore: /* @__PURE__ */
|
|
108
|
-
onClick: (
|
|
107
|
+
iconBefore: /* @__PURE__ */ n(Q, { size: 16 }),
|
|
108
|
+
onClick: (o) => a?.(o)
|
|
109
109
|
}
|
|
110
110
|
)
|
|
111
111
|
]
|
|
112
112
|
}
|
|
113
|
-
), Te = "flex items-center justify-center text-secondary",
|
|
113
|
+
), Te = "flex items-center justify-center text-secondary", Fe = "shrink-0 grow-0 basis-auto animate-spin-steps", ar = ({
|
|
114
114
|
size: e = 18,
|
|
115
115
|
cssClass: r,
|
|
116
|
-
iconClass:
|
|
116
|
+
iconClass: t,
|
|
117
117
|
fullWidth: s = !0,
|
|
118
|
-
ariaLabel:
|
|
119
|
-
}) => /* @__PURE__ */
|
|
118
|
+
ariaLabel: a = "Loading"
|
|
119
|
+
}) => /* @__PURE__ */ n(
|
|
120
120
|
"div",
|
|
121
121
|
{
|
|
122
122
|
role: "status",
|
|
123
|
-
"aria-label":
|
|
123
|
+
"aria-label": a,
|
|
124
124
|
className: d({
|
|
125
125
|
[Te]: !0,
|
|
126
126
|
"w-full h-full": s,
|
|
127
127
|
[r || ""]: !!r
|
|
128
128
|
}),
|
|
129
|
-
children: /* @__PURE__ */
|
|
130
|
-
|
|
129
|
+
children: /* @__PURE__ */ n(
|
|
130
|
+
N,
|
|
131
131
|
{
|
|
132
|
-
icon: /* @__PURE__ */
|
|
133
|
-
|
|
132
|
+
icon: /* @__PURE__ */ n(
|
|
133
|
+
ee,
|
|
134
134
|
{
|
|
135
135
|
width: e,
|
|
136
136
|
height: e,
|
|
137
|
-
className: d(
|
|
137
|
+
className: d(Fe, t)
|
|
138
138
|
}
|
|
139
139
|
)
|
|
140
140
|
}
|
|
141
141
|
)
|
|
142
142
|
}
|
|
143
|
-
),
|
|
144
|
-
const e =
|
|
143
|
+
), Se = 7, Pe = 2, B = ae(null), M = () => {
|
|
144
|
+
const e = ie(B);
|
|
145
145
|
if (e == null)
|
|
146
146
|
throw new Error("Tooltip components must be wrapped in <Tooltip />");
|
|
147
147
|
return e;
|
|
148
|
-
},
|
|
148
|
+
}, Ae = ({
|
|
149
149
|
initialOpen: e = !1,
|
|
150
150
|
placement: r = "bottom",
|
|
151
|
-
isTriggerClickable:
|
|
151
|
+
isTriggerClickable: t = !1,
|
|
152
152
|
open: s,
|
|
153
|
-
onOpenChange:
|
|
153
|
+
onOpenChange: a
|
|
154
154
|
} = {}) => {
|
|
155
|
-
const [
|
|
155
|
+
const [o, l] = W(e), c = oe(null), i = s ?? o, m = a ?? l, p = ue({
|
|
156
156
|
placement: r,
|
|
157
|
-
open:
|
|
158
|
-
onOpenChange:
|
|
159
|
-
whileElementsMounted:
|
|
157
|
+
open: i,
|
|
158
|
+
onOpenChange: m,
|
|
159
|
+
whileElementsMounted: xe,
|
|
160
160
|
middleware: [
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
me(Se + Pe),
|
|
162
|
+
pe({
|
|
163
163
|
crossAxis: r.includes("-"),
|
|
164
164
|
fallbackAxisSideDirection: "start",
|
|
165
165
|
padding: 5
|
|
166
166
|
}),
|
|
167
167
|
fe({ padding: 5 }),
|
|
168
|
-
|
|
169
|
-
element:
|
|
168
|
+
he({
|
|
169
|
+
element: c
|
|
170
170
|
})
|
|
171
171
|
]
|
|
172
|
-
}),
|
|
172
|
+
}), f = be(p.context, {
|
|
173
173
|
move: !1,
|
|
174
174
|
enabled: s == null,
|
|
175
|
-
mouseOnly:
|
|
175
|
+
mouseOnly: t,
|
|
176
176
|
delay: { open: 500, close: 0 }
|
|
177
|
-
}),
|
|
177
|
+
}), g = ge(p.context, {
|
|
178
178
|
enabled: s == null
|
|
179
|
-
}),
|
|
180
|
-
return
|
|
179
|
+
}), w = ye(p.context), b = Ce(p.context, { role: "tooltip" }), x = Ne([f, g, w, b]);
|
|
180
|
+
return le(
|
|
181
181
|
() => ({
|
|
182
|
-
open:
|
|
183
|
-
setOpen:
|
|
184
|
-
arrowRef:
|
|
185
|
-
...
|
|
186
|
-
...
|
|
182
|
+
open: i,
|
|
183
|
+
setOpen: m,
|
|
184
|
+
arrowRef: c,
|
|
185
|
+
...x,
|
|
186
|
+
...p
|
|
187
187
|
}),
|
|
188
|
-
[
|
|
188
|
+
[i, m, x, p]
|
|
189
189
|
);
|
|
190
|
-
},
|
|
190
|
+
}, Le = ({
|
|
191
191
|
children: e,
|
|
192
192
|
...r
|
|
193
193
|
}) => {
|
|
194
|
-
const
|
|
195
|
-
return /* @__PURE__ */
|
|
196
|
-
},
|
|
197
|
-
const
|
|
198
|
-
return
|
|
194
|
+
const t = Ae(r);
|
|
195
|
+
return /* @__PURE__ */ n(B.Provider, { value: t, children: e });
|
|
196
|
+
}, Oe = _(function({ style: r, ...t }, s) {
|
|
197
|
+
const a = M(), o = j([a.refs.setFloating, s]);
|
|
198
|
+
return a.open ? /* @__PURE__ */ n(we, { id: "tooltip-portal", children: /* @__PURE__ */ u(
|
|
199
199
|
"div",
|
|
200
200
|
{
|
|
201
|
-
ref:
|
|
201
|
+
ref: o,
|
|
202
202
|
style: {
|
|
203
|
-
...
|
|
203
|
+
...a.floatingStyles,
|
|
204
204
|
...r
|
|
205
205
|
},
|
|
206
|
-
...
|
|
206
|
+
...a.getFloatingProps(t),
|
|
207
207
|
className: d(
|
|
208
208
|
"z-[55] whitespace-pre-wrap rounded border border-primary bg-blackout px-2 py-1 dial-tiny shadow max-w-[300px]",
|
|
209
|
-
|
|
209
|
+
a.getFloatingProps(t).className
|
|
210
210
|
),
|
|
211
211
|
children: [
|
|
212
|
-
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
|
|
212
|
+
t.children,
|
|
213
|
+
/* @__PURE__ */ n(
|
|
214
|
+
ve,
|
|
215
215
|
{
|
|
216
|
-
ref:
|
|
217
|
-
context:
|
|
216
|
+
ref: a.arrowRef,
|
|
217
|
+
context: a.context,
|
|
218
218
|
fill: "currentColor",
|
|
219
219
|
strokeWidth: 1,
|
|
220
220
|
className: "stroke-primary w-2 text-[var(--bg-layer-0,_#000000)]"
|
|
@@ -223,103 +223,103 @@ const Ie = {
|
|
|
223
223
|
]
|
|
224
224
|
}
|
|
225
225
|
) }) : null;
|
|
226
|
-
}),
|
|
227
|
-
const
|
|
228
|
-
return
|
|
226
|
+
}), Ve = _(function({ children: r, asChild: t = !1, ...s }, a) {
|
|
227
|
+
const o = M(), c = r && typeof r == "object" && "ref" in r && r.ref !== void 0 ? r.ref : void 0, i = j([o.refs.setReference, a, c]);
|
|
228
|
+
return t && ce(r) ? de(
|
|
229
229
|
r,
|
|
230
|
-
|
|
231
|
-
ref:
|
|
230
|
+
o.getReferenceProps({
|
|
231
|
+
ref: i,
|
|
232
232
|
...s,
|
|
233
233
|
...r.props
|
|
234
234
|
})
|
|
235
|
-
) : /* @__PURE__ */
|
|
235
|
+
) : /* @__PURE__ */ n(
|
|
236
236
|
"span",
|
|
237
237
|
{
|
|
238
|
-
ref:
|
|
239
|
-
...
|
|
238
|
+
ref: i,
|
|
239
|
+
...o.getReferenceProps(s),
|
|
240
240
|
className: s.className ?? "dial-tooltip-trigger text-left",
|
|
241
241
|
children: r
|
|
242
242
|
}
|
|
243
243
|
);
|
|
244
|
-
}),
|
|
244
|
+
}), R = ({
|
|
245
245
|
hideTooltip: e,
|
|
246
246
|
tooltip: r,
|
|
247
|
-
children:
|
|
247
|
+
children: t,
|
|
248
248
|
triggerClassName: s,
|
|
249
|
-
contentClassName:
|
|
250
|
-
...
|
|
251
|
-
}) => e || !r ? /* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
|
|
249
|
+
contentClassName: a,
|
|
250
|
+
...o
|
|
251
|
+
}) => e || !r ? /* @__PURE__ */ n("span", { className: s, children: t }) : /* @__PURE__ */ u(Le, { ...o, children: [
|
|
252
|
+
/* @__PURE__ */ n(Ve, { className: d(s, "truncate"), children: t }),
|
|
253
|
+
/* @__PURE__ */ n(
|
|
254
|
+
Oe,
|
|
255
255
|
{
|
|
256
256
|
className: d(
|
|
257
257
|
"text-primary",
|
|
258
|
-
|
|
258
|
+
a,
|
|
259
259
|
"max-w-[300px]",
|
|
260
260
|
(e || !r) && "hidden"
|
|
261
261
|
),
|
|
262
262
|
children: r
|
|
263
263
|
}
|
|
264
264
|
)
|
|
265
|
-
] }),
|
|
266
|
-
size:
|
|
265
|
+
] }), ze = 18, F = {
|
|
266
|
+
size: ze,
|
|
267
267
|
stroke: 2
|
|
268
|
-
},
|
|
268
|
+
}, or = ({
|
|
269
269
|
label: e,
|
|
270
270
|
id: r,
|
|
271
|
-
checked:
|
|
271
|
+
checked: t,
|
|
272
272
|
indeterminate: s,
|
|
273
|
-
disabled:
|
|
274
|
-
ariaLabel:
|
|
273
|
+
disabled: a,
|
|
274
|
+
ariaLabel: o,
|
|
275
275
|
onChange: l
|
|
276
276
|
}) => {
|
|
277
|
-
const
|
|
278
|
-
(
|
|
279
|
-
|
|
277
|
+
const c = O(
|
|
278
|
+
(p) => {
|
|
279
|
+
p.stopPropagation(), l?.(p.target.checked, r);
|
|
280
280
|
},
|
|
281
281
|
[l, r]
|
|
282
|
-
),
|
|
282
|
+
), i = d(
|
|
283
283
|
"flex flex-row items-center cursor-pointer text-accent-primary small-medium flex-1 min-w-0",
|
|
284
|
-
`${
|
|
285
|
-
|
|
286
|
-
),
|
|
284
|
+
`${t ? "" : 'before:content-[""] before:inline-block before:w-[18px] before:h-[18px] before:border before:border-hover before:rounded before:mr-2'}`,
|
|
285
|
+
a ? "pointer-events-none text-secondary before:border-icon-secondary before:bg-layer-4" : ""
|
|
286
|
+
), m = d(
|
|
287
287
|
"mr-2 border rounded",
|
|
288
|
-
|
|
288
|
+
a ? "bg-layer-4 border-icon-secondary" : ""
|
|
289
289
|
);
|
|
290
|
-
return /* @__PURE__ */
|
|
291
|
-
|
|
292
|
-
e && /* @__PURE__ */
|
|
293
|
-
/* @__PURE__ */
|
|
290
|
+
return /* @__PURE__ */ u("label", { className: i, htmlFor: r, children: [
|
|
291
|
+
t && (s ? /* @__PURE__ */ n(re, { className: m, ...F }) : /* @__PURE__ */ n(z, { className: m, ...F })),
|
|
292
|
+
e && /* @__PURE__ */ n(R, { tooltip: e, triggerClassName: "flex-1 min-w-0", children: /* @__PURE__ */ n("p", { className: "text-primary w-full truncate", children: e }) }),
|
|
293
|
+
/* @__PURE__ */ n(
|
|
294
294
|
"input",
|
|
295
295
|
{
|
|
296
296
|
type: "checkbox",
|
|
297
|
-
onChange:
|
|
297
|
+
onChange: c,
|
|
298
298
|
id: r,
|
|
299
|
-
checked:
|
|
300
|
-
"aria-checked": s ? "mixed" :
|
|
301
|
-
"aria-disabled":
|
|
302
|
-
"aria-label": e ? void 0 :
|
|
299
|
+
checked: t,
|
|
300
|
+
"aria-checked": s ? "mixed" : t,
|
|
301
|
+
"aria-disabled": a || void 0,
|
|
302
|
+
"aria-label": e ? void 0 : o,
|
|
303
303
|
className: "invisible w-0 h-0"
|
|
304
304
|
}
|
|
305
305
|
)
|
|
306
306
|
] });
|
|
307
307
|
};
|
|
308
|
-
var
|
|
309
|
-
const
|
|
308
|
+
var h = /* @__PURE__ */ ((e) => (e.VALID = "valid", e.ERROR = "error", e))(h || {});
|
|
309
|
+
const We = (e, r) => {
|
|
310
310
|
if (r === e.id)
|
|
311
311
|
switch (e.status) {
|
|
312
|
-
case
|
|
312
|
+
case h.VALID:
|
|
313
313
|
return "border-accent-secondary text-primary";
|
|
314
|
-
case
|
|
314
|
+
case h.ERROR:
|
|
315
315
|
return "border-red-900 text-primary";
|
|
316
316
|
default:
|
|
317
317
|
return "border-accent-primary text-primary";
|
|
318
318
|
}
|
|
319
319
|
switch (e.status) {
|
|
320
|
-
case
|
|
320
|
+
case h.VALID:
|
|
321
321
|
return "border-primary text-white";
|
|
322
|
-
case
|
|
322
|
+
case h.ERROR:
|
|
323
323
|
return "border-red-900 text-error";
|
|
324
324
|
default:
|
|
325
325
|
return "border-primary text-secondary";
|
|
@@ -327,17 +327,17 @@ const ze = (e, r) => {
|
|
|
327
327
|
}, _e = (e, r) => {
|
|
328
328
|
if (r === e.id)
|
|
329
329
|
switch (e.status) {
|
|
330
|
-
case
|
|
330
|
+
case h.VALID:
|
|
331
331
|
return "bg-accent-secondary";
|
|
332
|
-
case
|
|
332
|
+
case h.ERROR:
|
|
333
333
|
return "bg-red-400";
|
|
334
334
|
default:
|
|
335
335
|
return "bg-accent-primary";
|
|
336
336
|
}
|
|
337
337
|
switch (e.status) {
|
|
338
|
-
case
|
|
338
|
+
case h.VALID:
|
|
339
339
|
return "bg-accent-secondary";
|
|
340
|
-
case
|
|
340
|
+
case h.ERROR:
|
|
341
341
|
return "bg-red-400";
|
|
342
342
|
default:
|
|
343
343
|
return "bg-layer-4";
|
|
@@ -345,72 +345,163 @@ const ze = (e, r) => {
|
|
|
345
345
|
}, je = ({
|
|
346
346
|
step: e,
|
|
347
347
|
index: r,
|
|
348
|
-
currentStep:
|
|
348
|
+
currentStep: t,
|
|
349
349
|
onChangeStep: s
|
|
350
350
|
}) => {
|
|
351
|
-
const
|
|
352
|
-
return /* @__PURE__ */
|
|
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 = () => t === e.id && e.status === h.ERROR ? /* @__PURE__ */ n(ne, { stroke: 2, size: 16 }) : t !== e.id && e.status === h.VALID ? /* @__PURE__ */ n(z, { stroke: 2, size: 16 }) : r + 1;
|
|
352
|
+
return /* @__PURE__ */ u(
|
|
353
353
|
"button",
|
|
354
354
|
{
|
|
355
|
-
className: d(
|
|
355
|
+
className: d(a, We(e, t)),
|
|
356
356
|
onClick: () => s(e.id),
|
|
357
357
|
children: [
|
|
358
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ n(
|
|
359
359
|
"span",
|
|
360
360
|
{
|
|
361
|
-
className: d(
|
|
361
|
+
className: d(o, _e(e, t)),
|
|
362
362
|
children: l()
|
|
363
363
|
}
|
|
364
364
|
),
|
|
365
|
-
/* @__PURE__ */
|
|
365
|
+
/* @__PURE__ */ n("span", { children: e.name })
|
|
366
366
|
]
|
|
367
367
|
}
|
|
368
368
|
);
|
|
369
|
-
},
|
|
369
|
+
}, lr = ({
|
|
370
370
|
steps: e,
|
|
371
371
|
currentStep: r,
|
|
372
|
-
onChangeStep:
|
|
372
|
+
onChangeStep: t
|
|
373
373
|
}) => {
|
|
374
|
-
const s = (
|
|
375
|
-
const
|
|
376
|
-
(
|
|
374
|
+
const s = (a) => {
|
|
375
|
+
const o = e.findIndex((c) => c.id === r), l = e.findIndex((c) => c.id === a);
|
|
376
|
+
(a !== r && e[o].status === h.VALID || l < o) && t(a);
|
|
377
377
|
};
|
|
378
|
-
return /* @__PURE__ */
|
|
378
|
+
return /* @__PURE__ */ n("div", { id: "steps", className: "flex gap-x-3", children: e.map((a, o) => /* @__PURE__ */ n(
|
|
379
379
|
je,
|
|
380
380
|
{
|
|
381
381
|
currentStep: r,
|
|
382
382
|
onChangeStep: s,
|
|
383
|
-
step:
|
|
384
|
-
index:
|
|
383
|
+
step: a,
|
|
384
|
+
index: o
|
|
385
385
|
},
|
|
386
|
-
|
|
386
|
+
a.id
|
|
387
387
|
)) });
|
|
388
|
-
},
|
|
388
|
+
}, Be = ({
|
|
389
|
+
name: e,
|
|
390
|
+
value: r,
|
|
391
|
+
title: t,
|
|
392
|
+
description: s,
|
|
393
|
+
checked: a = !1,
|
|
394
|
+
inputId: o,
|
|
395
|
+
cssClass: l,
|
|
396
|
+
labelCssClass: c,
|
|
397
|
+
disabled: i,
|
|
398
|
+
onChange: m,
|
|
399
|
+
descriptionCssClass: p
|
|
400
|
+
}) => {
|
|
401
|
+
const f = `${o}-desc`, g = d(
|
|
402
|
+
"dial-small cursor-pointer",
|
|
403
|
+
i ? "text-secondary" : "text-primary",
|
|
404
|
+
c
|
|
405
|
+
), w = d(
|
|
406
|
+
"cursor-pointer dial-input-radio",
|
|
407
|
+
t && "mr-2",
|
|
408
|
+
l
|
|
409
|
+
), b = d("flex flex-col", !!s && "mb-2"), x = d(
|
|
410
|
+
"dial-tiny mt-2 ml-[26px] text-secondary",
|
|
411
|
+
p
|
|
412
|
+
);
|
|
413
|
+
return /* @__PURE__ */ u("div", { className: b, children: [
|
|
414
|
+
/* @__PURE__ */ u("div", { className: "flex flex-row items-center", children: [
|
|
415
|
+
/* @__PURE__ */ n(
|
|
416
|
+
"input",
|
|
417
|
+
{
|
|
418
|
+
type: "radio",
|
|
419
|
+
id: o,
|
|
420
|
+
name: e,
|
|
421
|
+
value: r,
|
|
422
|
+
checked: a,
|
|
423
|
+
disabled: i,
|
|
424
|
+
"aria-describedby": a && s ? f : void 0,
|
|
425
|
+
className: w,
|
|
426
|
+
onChange: (k) => {
|
|
427
|
+
i || k.target.checked && m?.(r);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
),
|
|
431
|
+
t ? /* @__PURE__ */ n("label", { className: g, htmlFor: o, children: t }) : null
|
|
432
|
+
] }),
|
|
433
|
+
a && s && /* @__PURE__ */ n("div", { id: f, className: x, children: s })
|
|
434
|
+
] });
|
|
435
|
+
};
|
|
436
|
+
var L = /* @__PURE__ */ ((e) => (e.Row = "Row", e.Column = "Column", e))(L || {});
|
|
437
|
+
const Me = "flex flex-col", He = "flex mt-1", Ue = {
|
|
438
|
+
[L.Column]: "flex-col gap-y-3",
|
|
439
|
+
[L.Row]: "flex-row gap-x-6"
|
|
440
|
+
}, ir = ({
|
|
441
|
+
fieldTitle: e,
|
|
442
|
+
radioCssClass: r,
|
|
443
|
+
disabled: t,
|
|
444
|
+
elementId: s,
|
|
445
|
+
radioButtons: a,
|
|
446
|
+
activeRadioButton: o,
|
|
447
|
+
orientation: l,
|
|
448
|
+
onChange: c
|
|
449
|
+
}) => /* @__PURE__ */ u("div", { className: Me, children: [
|
|
450
|
+
e && /* @__PURE__ */ n(P, { fieldTitle: e, htmlFor: s }),
|
|
451
|
+
/* @__PURE__ */ n(
|
|
452
|
+
"div",
|
|
453
|
+
{
|
|
454
|
+
role: "radiogroup",
|
|
455
|
+
"aria-label": e,
|
|
456
|
+
"aria-disabled": t || void 0,
|
|
457
|
+
"data-testid": "radiofield-options",
|
|
458
|
+
className: d(
|
|
459
|
+
He,
|
|
460
|
+
Ue[l]
|
|
461
|
+
),
|
|
462
|
+
children: a.map((i) => /* @__PURE__ */ n(
|
|
463
|
+
Be,
|
|
464
|
+
{
|
|
465
|
+
name: s,
|
|
466
|
+
value: i.id,
|
|
467
|
+
inputId: i.id,
|
|
468
|
+
disabled: t,
|
|
469
|
+
cssClass: r,
|
|
470
|
+
title: i.name,
|
|
471
|
+
description: i.description,
|
|
472
|
+
checked: i.id === o,
|
|
473
|
+
onChange: (m) => c(m)
|
|
474
|
+
},
|
|
475
|
+
i.id
|
|
476
|
+
))
|
|
477
|
+
}
|
|
478
|
+
)
|
|
479
|
+
] }), $e = ({
|
|
389
480
|
value: e,
|
|
390
481
|
textareaId: r,
|
|
391
|
-
placeholder:
|
|
482
|
+
placeholder: t,
|
|
392
483
|
cssClass: s = "",
|
|
393
|
-
disabled:
|
|
394
|
-
invalid:
|
|
484
|
+
disabled: a,
|
|
485
|
+
invalid: o,
|
|
395
486
|
readonly: l,
|
|
396
|
-
onChange:
|
|
397
|
-
}) => /* @__PURE__ */
|
|
487
|
+
onChange: c
|
|
488
|
+
}) => /* @__PURE__ */ n(R, { tooltip: e, triggerClassName: "flex", children: /* @__PURE__ */ n(
|
|
398
489
|
"textarea",
|
|
399
490
|
{
|
|
400
491
|
id: r,
|
|
401
|
-
placeholder:
|
|
492
|
+
placeholder: t,
|
|
402
493
|
value: e || "",
|
|
403
|
-
disabled:
|
|
494
|
+
disabled: a,
|
|
404
495
|
className: d(
|
|
405
496
|
"dial-textarea dial-input",
|
|
406
|
-
|
|
407
|
-
|
|
497
|
+
o ? "dial-input-error" : "",
|
|
498
|
+
a && "dial-input-disable",
|
|
408
499
|
l && "dial-input-readonly",
|
|
409
500
|
s
|
|
410
501
|
),
|
|
411
|
-
onChange: (
|
|
502
|
+
onChange: (i) => !l && c?.(i.currentTarget.value)
|
|
412
503
|
}
|
|
413
|
-
) }),
|
|
504
|
+
) }), Ke = [
|
|
414
505
|
"ArrowLeft",
|
|
415
506
|
"ArrowRight",
|
|
416
507
|
"ArrowUp",
|
|
@@ -422,237 +513,237 @@ const ze = (e, r) => {
|
|
|
422
513
|
"Escape",
|
|
423
514
|
"Home",
|
|
424
515
|
"End"
|
|
425
|
-
],
|
|
426
|
-
if ((r === "number" ||
|
|
516
|
+
], Ge = (e, r, t, s) => {
|
|
517
|
+
if ((r === "number" || t !== void 0 || s !== void 0) && !Ke.includes(e.key) && !(e.key === "-" && e.currentTarget.selectionStart === 0 && (t === void 0 || t < 0)) && !(e.key === "." && r === "number" && !e.currentTarget.value.includes("."))) {
|
|
427
518
|
if (!/^[0-9]$/.test(e.key)) {
|
|
428
519
|
e.preventDefault();
|
|
429
520
|
return;
|
|
430
521
|
}
|
|
431
|
-
if (
|
|
432
|
-
const
|
|
433
|
-
if (!isNaN(
|
|
434
|
-
if (
|
|
522
|
+
if (t !== void 0 || s !== void 0) {
|
|
523
|
+
const o = e.currentTarget.value, l = e.currentTarget.selectionStart || 0, c = o.slice(0, l) + e.key + o.slice(l), i = parseFloat(c);
|
|
524
|
+
if (!isNaN(i)) {
|
|
525
|
+
if (t !== void 0 && i < t) {
|
|
435
526
|
e.preventDefault();
|
|
436
527
|
return;
|
|
437
528
|
}
|
|
438
|
-
if (s !== void 0 &&
|
|
529
|
+
if (s !== void 0 && i > s) {
|
|
439
530
|
e.preventDefault();
|
|
440
531
|
return;
|
|
441
532
|
}
|
|
442
533
|
}
|
|
443
534
|
}
|
|
444
535
|
}
|
|
445
|
-
},
|
|
536
|
+
}, S = ({
|
|
446
537
|
iconBeforeInput: e,
|
|
447
538
|
iconAfterInput: r,
|
|
448
|
-
hideBorder:
|
|
539
|
+
hideBorder: t,
|
|
449
540
|
value: s,
|
|
450
|
-
elementId:
|
|
451
|
-
placeholder:
|
|
541
|
+
elementId: a,
|
|
542
|
+
placeholder: o = "",
|
|
452
543
|
cssClass: l = "",
|
|
453
|
-
containerCssClass:
|
|
454
|
-
tooltipTriggerClassName:
|
|
455
|
-
type:
|
|
456
|
-
disabled:
|
|
457
|
-
readonly:
|
|
458
|
-
invalid:
|
|
459
|
-
onChange:
|
|
460
|
-
min:
|
|
461
|
-
max:
|
|
462
|
-
prefix:
|
|
463
|
-
suffix:
|
|
464
|
-
textBeforeInput:
|
|
465
|
-
textAfterInput:
|
|
544
|
+
containerCssClass: c,
|
|
545
|
+
tooltipTriggerClassName: i,
|
|
546
|
+
type: m = "text",
|
|
547
|
+
disabled: p,
|
|
548
|
+
readonly: f,
|
|
549
|
+
invalid: g,
|
|
550
|
+
onChange: w,
|
|
551
|
+
min: b,
|
|
552
|
+
max: x,
|
|
553
|
+
prefix: A,
|
|
554
|
+
suffix: k,
|
|
555
|
+
textBeforeInput: v,
|
|
556
|
+
textAfterInput: D
|
|
466
557
|
}) => {
|
|
467
|
-
const
|
|
468
|
-
|
|
469
|
-
},
|
|
470
|
-
const
|
|
471
|
-
if (
|
|
472
|
-
const
|
|
473
|
-
if (isNaN(
|
|
558
|
+
const U = (y) => y.target.blur(), $ = m === "number" || b !== void 0 || x !== void 0, K = (y) => {
|
|
559
|
+
Ge(y, m, b, x);
|
|
560
|
+
}, G = (y) => {
|
|
561
|
+
const I = y.currentTarget.value;
|
|
562
|
+
if ($ && I !== "") {
|
|
563
|
+
const E = parseFloat(I);
|
|
564
|
+
if (isNaN(E) && I !== "-" && I !== "." || !isNaN(E) && (b !== void 0 && E < b || x !== void 0 && E > x))
|
|
474
565
|
return;
|
|
475
566
|
}
|
|
476
|
-
|
|
567
|
+
w?.(I);
|
|
477
568
|
};
|
|
478
|
-
return /* @__PURE__ */
|
|
569
|
+
return /* @__PURE__ */ u(
|
|
479
570
|
"div",
|
|
480
571
|
{
|
|
481
572
|
className: d(
|
|
482
573
|
"dial-input-field flex flex-row items-center justify-between",
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
!
|
|
488
|
-
!
|
|
489
|
-
|
|
574
|
+
t ? "dial-input-no-border" : "dial-input",
|
|
575
|
+
g && "dial-input-error",
|
|
576
|
+
p && "dial-input-disable",
|
|
577
|
+
f && "dial-input-readonly",
|
|
578
|
+
!v && "pl-1",
|
|
579
|
+
!D && "pr-1",
|
|
580
|
+
c
|
|
490
581
|
),
|
|
491
582
|
children: [
|
|
492
|
-
|
|
493
|
-
|
|
583
|
+
v && /* @__PURE__ */ n(R, { tooltip: v, children: /* @__PURE__ */ n(
|
|
584
|
+
S,
|
|
494
585
|
{
|
|
495
586
|
hideBorder: !0,
|
|
496
587
|
containerCssClass: "rounded-r-none border-r-0",
|
|
497
588
|
cssClass: "px-2 overflow-hidden overflow-ellipsis dial-small",
|
|
498
|
-
value:
|
|
589
|
+
value: v,
|
|
499
590
|
disabled: !0,
|
|
500
|
-
elementId:
|
|
591
|
+
elementId: v + "textBefore"
|
|
501
592
|
}
|
|
502
593
|
) }),
|
|
503
|
-
|
|
594
|
+
A && /* @__PURE__ */ u("p", { className: "text-secondary dial-small pl-2", children: [
|
|
504
595
|
" ",
|
|
505
|
-
|
|
596
|
+
A
|
|
506
597
|
] }),
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
/* @__PURE__ */
|
|
598
|
+
/* @__PURE__ */ n(N, { icon: e, className: "pl-2" }),
|
|
599
|
+
/* @__PURE__ */ n(R, { tooltip: s, triggerClassName: i, children: /* @__PURE__ */ n(
|
|
509
600
|
"input",
|
|
510
601
|
{
|
|
511
|
-
type:
|
|
602
|
+
type: m,
|
|
512
603
|
autoComplete: "off",
|
|
513
|
-
id:
|
|
514
|
-
placeholder:
|
|
604
|
+
id: a,
|
|
605
|
+
placeholder: o,
|
|
515
606
|
value: s ?? "",
|
|
516
607
|
title: s ? String(s) : "",
|
|
517
|
-
disabled:
|
|
608
|
+
disabled: p,
|
|
518
609
|
className: d("border-0 bg-transparent px-2", l),
|
|
519
|
-
onChange: (
|
|
610
|
+
onChange: (y) => !f && G?.(y),
|
|
520
611
|
onKeyDown: K,
|
|
521
|
-
onWheel:
|
|
522
|
-
min:
|
|
523
|
-
max:
|
|
612
|
+
onWheel: U,
|
|
613
|
+
min: b,
|
|
614
|
+
max: x
|
|
524
615
|
}
|
|
525
616
|
) }),
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
|
|
617
|
+
/* @__PURE__ */ n(N, { icon: r, className: "pr-2" }),
|
|
618
|
+
k && /* @__PURE__ */ u("p", { className: "text-secondary dial-small pr-2", children: [
|
|
528
619
|
" ",
|
|
529
|
-
|
|
620
|
+
k
|
|
530
621
|
] }),
|
|
531
|
-
|
|
532
|
-
|
|
622
|
+
D && /* @__PURE__ */ n(R, { tooltip: D, children: /* @__PURE__ */ n(
|
|
623
|
+
S,
|
|
533
624
|
{
|
|
534
625
|
hideBorder: !0,
|
|
535
626
|
containerCssClass: "rounded-l-none border-l-0",
|
|
536
627
|
cssClass: "px-2",
|
|
537
|
-
value:
|
|
628
|
+
value: D,
|
|
538
629
|
disabled: !0,
|
|
539
|
-
elementId:
|
|
630
|
+
elementId: D + "textAfter"
|
|
540
631
|
}
|
|
541
632
|
) })
|
|
542
633
|
]
|
|
543
634
|
}
|
|
544
635
|
);
|
|
545
|
-
},
|
|
636
|
+
}, Ze = /^0+\.(\d+)?$/, Xe = /^0+/, H = ({
|
|
546
637
|
fieldTitle: e,
|
|
547
638
|
errorText: r,
|
|
548
|
-
optional:
|
|
639
|
+
optional: t,
|
|
549
640
|
elementCssClass: s,
|
|
550
|
-
elementContainerCssClass:
|
|
551
|
-
elementId:
|
|
641
|
+
elementContainerCssClass: a,
|
|
642
|
+
elementId: o,
|
|
552
643
|
containerCssClass: l,
|
|
553
|
-
readonly:
|
|
554
|
-
defaultEmptyText:
|
|
555
|
-
min:
|
|
556
|
-
max:
|
|
557
|
-
...
|
|
558
|
-
}) => /* @__PURE__ */
|
|
559
|
-
/* @__PURE__ */
|
|
560
|
-
|
|
644
|
+
readonly: c,
|
|
645
|
+
defaultEmptyText: i,
|
|
646
|
+
min: m,
|
|
647
|
+
max: p,
|
|
648
|
+
...f
|
|
649
|
+
}) => /* @__PURE__ */ u("div", { className: d("flex flex-col", l), children: [
|
|
650
|
+
/* @__PURE__ */ n(
|
|
651
|
+
P,
|
|
561
652
|
{
|
|
562
653
|
fieldTitle: e,
|
|
563
|
-
optional:
|
|
564
|
-
htmlFor:
|
|
654
|
+
optional: t,
|
|
655
|
+
htmlFor: o
|
|
565
656
|
}
|
|
566
657
|
),
|
|
567
|
-
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
|
|
658
|
+
c ? /* @__PURE__ */ n("span", { children: f.value || (i ?? "None") }) : /* @__PURE__ */ u(Z, { children: [
|
|
659
|
+
/* @__PURE__ */ n(
|
|
660
|
+
S,
|
|
570
661
|
{
|
|
571
|
-
elementId:
|
|
662
|
+
elementId: o,
|
|
572
663
|
cssClass: s,
|
|
573
|
-
containerCssClass:
|
|
664
|
+
containerCssClass: a,
|
|
574
665
|
invalid: r != null,
|
|
575
|
-
min:
|
|
576
|
-
max:
|
|
577
|
-
...
|
|
666
|
+
min: m,
|
|
667
|
+
max: p,
|
|
668
|
+
...f
|
|
578
669
|
}
|
|
579
670
|
),
|
|
580
|
-
/* @__PURE__ */
|
|
671
|
+
/* @__PURE__ */ n(V, { errorText: r })
|
|
581
672
|
] })
|
|
582
|
-
] }),
|
|
673
|
+
] }), cr = ({
|
|
583
674
|
onChange: e,
|
|
584
675
|
value: r,
|
|
585
|
-
min:
|
|
676
|
+
min: t,
|
|
586
677
|
max: s,
|
|
587
|
-
...
|
|
678
|
+
...a
|
|
588
679
|
}) => {
|
|
589
|
-
const
|
|
590
|
-
return /* @__PURE__ */
|
|
680
|
+
const o = (l) => String(l)?.match(Ze) ? String(l)?.replace(Xe, "0") : Number(l);
|
|
681
|
+
return /* @__PURE__ */ n(
|
|
591
682
|
H,
|
|
592
683
|
{
|
|
593
684
|
type: "number",
|
|
594
|
-
onChange: (l) => e?.(
|
|
685
|
+
onChange: (l) => e?.(o(l)),
|
|
595
686
|
value: r,
|
|
596
|
-
min:
|
|
687
|
+
min: t,
|
|
597
688
|
max: s,
|
|
598
|
-
...
|
|
689
|
+
...a
|
|
599
690
|
}
|
|
600
691
|
);
|
|
601
|
-
},
|
|
692
|
+
}, dr = ({
|
|
602
693
|
onChange: e,
|
|
603
694
|
...r
|
|
604
|
-
}) => /* @__PURE__ */
|
|
695
|
+
}) => /* @__PURE__ */ n(
|
|
605
696
|
H,
|
|
606
697
|
{
|
|
607
698
|
type: "text",
|
|
608
|
-
onChange: (
|
|
699
|
+
onChange: (t) => e?.(t),
|
|
609
700
|
...r
|
|
610
701
|
}
|
|
611
|
-
),
|
|
702
|
+
), ur = ({
|
|
612
703
|
fieldTitle: e,
|
|
613
704
|
optional: r,
|
|
614
|
-
elementId:
|
|
705
|
+
elementId: t,
|
|
615
706
|
elementCssClass: s,
|
|
616
|
-
errorText:
|
|
617
|
-
...
|
|
618
|
-
}) => /* @__PURE__ */
|
|
619
|
-
/* @__PURE__ */
|
|
620
|
-
|
|
707
|
+
errorText: a,
|
|
708
|
+
...o
|
|
709
|
+
}) => /* @__PURE__ */ u("div", { className: "flex flex-col", children: [
|
|
710
|
+
/* @__PURE__ */ n(
|
|
711
|
+
P,
|
|
621
712
|
{
|
|
622
713
|
fieldTitle: e,
|
|
623
714
|
optional: r,
|
|
624
|
-
htmlFor:
|
|
715
|
+
htmlFor: t
|
|
625
716
|
}
|
|
626
717
|
),
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
|
|
718
|
+
/* @__PURE__ */ n(
|
|
719
|
+
$e,
|
|
629
720
|
{
|
|
630
|
-
textareaId:
|
|
721
|
+
textareaId: t,
|
|
631
722
|
cssClass: s,
|
|
632
|
-
...
|
|
723
|
+
...o
|
|
633
724
|
}
|
|
634
725
|
),
|
|
635
|
-
/* @__PURE__ */
|
|
636
|
-
] }),
|
|
726
|
+
/* @__PURE__ */ n(V, { errorText: a })
|
|
727
|
+
] }), mr = ({
|
|
637
728
|
title: e,
|
|
638
729
|
switchId: r,
|
|
639
|
-
isOn:
|
|
730
|
+
isOn: t = !1,
|
|
640
731
|
disabled: s,
|
|
641
|
-
onChange:
|
|
732
|
+
onChange: a
|
|
642
733
|
}) => {
|
|
643
|
-
const
|
|
734
|
+
const o = d(
|
|
644
735
|
"flex w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",
|
|
645
|
-
|
|
736
|
+
t ? "flex-row-reverse" : "flex-row",
|
|
646
737
|
s ? "pointer-events-none" : "",
|
|
647
|
-
s ?
|
|
648
|
-
), l =
|
|
649
|
-
(
|
|
650
|
-
|
|
738
|
+
s ? t ? "bg-controls-disable" : "bg-layer-4" : t ? "bg-accent-primary" : "bg-layer-4"
|
|
739
|
+
), l = O(
|
|
740
|
+
(c) => {
|
|
741
|
+
c.stopPropagation(), a?.(!t);
|
|
651
742
|
},
|
|
652
|
-
[
|
|
743
|
+
[a, t]
|
|
653
744
|
);
|
|
654
|
-
return /* @__PURE__ */
|
|
655
|
-
/* @__PURE__ */
|
|
745
|
+
return /* @__PURE__ */ u("div", { className: "flex flex-row items-center", children: [
|
|
746
|
+
/* @__PURE__ */ n(
|
|
656
747
|
"input",
|
|
657
748
|
{
|
|
658
749
|
type: "checkbox",
|
|
@@ -660,85 +751,87 @@ const ze = (e, r) => {
|
|
|
660
751
|
id: r,
|
|
661
752
|
disabled: s,
|
|
662
753
|
className: "invisible w-0 h-0",
|
|
663
|
-
checked:
|
|
754
|
+
checked: t
|
|
664
755
|
}
|
|
665
756
|
),
|
|
666
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ n("label", { htmlFor: r, className: o, children: /* @__PURE__ */ n(
|
|
667
758
|
"span",
|
|
668
759
|
{
|
|
669
760
|
className: d(
|
|
670
761
|
"size-3 rounded-full",
|
|
671
|
-
s ?
|
|
762
|
+
s ? t ? "bg-layer-4" : "bg-controls-disable" : "bg-controls-enable-primary"
|
|
672
763
|
)
|
|
673
764
|
}
|
|
674
765
|
) }),
|
|
675
|
-
e && /* @__PURE__ */
|
|
766
|
+
e && /* @__PURE__ */ n("span", { className: "pl-2 dial-small text-primary", children: e })
|
|
676
767
|
] });
|
|
677
|
-
},
|
|
768
|
+
}, Ye = ({ onClick: e }) => /* @__PURE__ */ n(
|
|
678
769
|
te,
|
|
679
770
|
{
|
|
680
|
-
...
|
|
771
|
+
...F,
|
|
681
772
|
className: "text-primary",
|
|
682
773
|
onClick: e
|
|
683
774
|
}
|
|
684
|
-
),
|
|
685
|
-
const [r,
|
|
686
|
-
|
|
775
|
+
), qe = ({ onClick: e }) => /* @__PURE__ */ n(se, { ...F, className: "text-primary", onClick: e }), Je = ({ ...e }) => {
|
|
776
|
+
const [r, t] = W(!1), s = O((a) => {
|
|
777
|
+
t(a);
|
|
687
778
|
}, []);
|
|
688
|
-
return /* @__PURE__ */
|
|
689
|
-
|
|
779
|
+
return /* @__PURE__ */ n(
|
|
780
|
+
S,
|
|
690
781
|
{
|
|
691
782
|
type: r ? "text" : "password",
|
|
692
783
|
...e,
|
|
693
|
-
iconAfterInput: r ? /* @__PURE__ */
|
|
784
|
+
iconAfterInput: r ? /* @__PURE__ */ n(Ye, { onClick: () => s(!1) }) : /* @__PURE__ */ n(qe, { onClick: () => s(!0) })
|
|
694
785
|
}
|
|
695
786
|
);
|
|
696
|
-
},
|
|
787
|
+
}, pr = ({
|
|
697
788
|
fieldTitle: e,
|
|
698
789
|
optional: r,
|
|
699
|
-
elementCssClass:
|
|
790
|
+
elementCssClass: t,
|
|
700
791
|
elementId: s,
|
|
701
|
-
errorText:
|
|
702
|
-
...
|
|
703
|
-
}) => /* @__PURE__ */
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
|
|
792
|
+
errorText: a,
|
|
793
|
+
...o
|
|
794
|
+
}) => /* @__PURE__ */ u("div", { className: "flex flex-col", children: [
|
|
795
|
+
/* @__PURE__ */ n(
|
|
796
|
+
P,
|
|
706
797
|
{
|
|
707
798
|
fieldTitle: e,
|
|
708
799
|
optional: r,
|
|
709
800
|
htmlFor: s
|
|
710
801
|
}
|
|
711
802
|
),
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
-
|
|
803
|
+
/* @__PURE__ */ n(
|
|
804
|
+
Je,
|
|
714
805
|
{
|
|
715
|
-
cssClass:
|
|
806
|
+
cssClass: t,
|
|
716
807
|
elementId: s,
|
|
717
|
-
invalid: !!
|
|
718
|
-
...
|
|
808
|
+
invalid: !!a,
|
|
809
|
+
...o
|
|
719
810
|
}
|
|
720
811
|
),
|
|
721
|
-
/* @__PURE__ */
|
|
812
|
+
/* @__PURE__ */ n(V, { errorText: a })
|
|
722
813
|
] });
|
|
723
814
|
export {
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
815
|
+
C as AlertVariant,
|
|
816
|
+
T as ButtonVariant,
|
|
817
|
+
sr as DialAlert,
|
|
818
|
+
Ie as DialButton,
|
|
819
|
+
or as DialCheckbox,
|
|
820
|
+
V as DialErrorText,
|
|
821
|
+
P as DialFieldLabel,
|
|
822
|
+
N as DialIcon,
|
|
823
|
+
S as DialInput,
|
|
824
|
+
ar as DialLoader,
|
|
825
|
+
cr as DialNumberInputField,
|
|
826
|
+
Je as DialPasswordInput,
|
|
827
|
+
pr as DialPasswordInputField,
|
|
828
|
+
Be as DialRadioButton,
|
|
829
|
+
ir as DialRadioField,
|
|
830
|
+
lr as DialSteps,
|
|
831
|
+
mr as DialSwitch,
|
|
832
|
+
ur as DialTextAreaField,
|
|
833
|
+
dr as DialTextInputField,
|
|
834
|
+
$e as DialTextarea,
|
|
835
|
+
R as DialTooltip,
|
|
836
|
+
h as StepStatus
|
|
744
837
|
};
|