@epam/ai-dial-ui-kit 0.2.0-rc.12 → 0.2.0-rc.14
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 +429 -334
- package/dist/index.css +2 -2
- package/dist/src/components/RadioButton/RadioButton.d.ts +46 -0
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +51 -0
- package/dist/src/components/RadioGroup/constants.d.ts +5 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/types/radio-group.d.ts +4 -0
- package/package.json +1 -1
package/dist/dial-ui-kit.es.js
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { IconCircleCheck as
|
|
4
|
-
import { createContext as
|
|
5
|
-
import { useFloating as
|
|
6
|
-
const
|
|
7
|
-
var
|
|
8
|
-
const
|
|
9
|
-
[
|
|
10
|
-
[
|
|
11
|
-
[
|
|
12
|
-
},
|
|
1
|
+
import { jsx as n, jsxs as m, Fragment as Z } from "react/jsx-runtime";
|
|
2
|
+
import u from "classnames";
|
|
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, Fragment as ue } from "react";
|
|
5
|
+
import { useFloating as me, offset as pe, flip as fe, shift as he, arrow as xe, autoUpdate as be, useHover as ge, useFocus as Ce, useDismiss as ye, useRole as Ne, useInteractions as we, useMergeRefs as j, FloatingPortal as ve, FloatingArrow as De } from "@floating-ui/react";
|
|
6
|
+
const N = ({ icon: e, className: r }) => e ? /* @__PURE__ */ n("span", { className: u("flex-shrink-0", r), children: e }) : null;
|
|
7
|
+
var F = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e.Tertiary = "tertiary", e))(F || {});
|
|
8
|
+
const Ie = {
|
|
9
|
+
[F.Primary]: "dial-primary-button",
|
|
10
|
+
[F.Secondary]: "dial-secondary-button",
|
|
11
|
+
[F.Tertiary]: "dial-tertiary-button"
|
|
12
|
+
}, Re = ({
|
|
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
20
|
iconBefore: i,
|
|
21
21
|
hideTitleOnMobile: c,
|
|
22
|
-
ariaLabel:
|
|
22
|
+
ariaLabel: d
|
|
23
23
|
}) => {
|
|
24
|
-
const
|
|
24
|
+
const p = u(
|
|
25
25
|
"dial-small-semi",
|
|
26
26
|
l ? "mr-2" : "",
|
|
27
27
|
i ? "ml-2" : "",
|
|
28
28
|
c ? "hidden sm:inline" : "inline"
|
|
29
|
-
),
|
|
30
|
-
r &&
|
|
31
|
-
|
|
29
|
+
), f = u(
|
|
30
|
+
r && Ie[r],
|
|
31
|
+
t,
|
|
32
32
|
"focus-visible:outline outline-offset-0"
|
|
33
33
|
);
|
|
34
34
|
return /* @__PURE__ */ m(
|
|
@@ -36,185 +36,185 @@ const ve = {
|
|
|
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 || d,
|
|
43
43
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
e && /* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ n(N, { icon: i }),
|
|
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:
|
|
55
|
+
cssClass: a
|
|
56
56
|
}) => e ? /* @__PURE__ */ m(
|
|
57
57
|
"label",
|
|
58
58
|
{
|
|
59
|
-
className:
|
|
59
|
+
className: u(
|
|
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
71
|
var y = /* @__PURE__ */ ((e) => (e.Info = "info", e.Success = "success", e.Warning = "warning", e.Error = "error", e))(y || {});
|
|
72
|
-
const
|
|
73
|
-
info: /* @__PURE__ */
|
|
74
|
-
error: /* @__PURE__ */
|
|
75
|
-
warning: /* @__PURE__ */
|
|
76
|
-
success: /* @__PURE__ */
|
|
77
|
-
},
|
|
72
|
+
const ke = {
|
|
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
|
+
}, Ee = {
|
|
78
78
|
[y.Info]: "bg-info border-info text-info",
|
|
79
79
|
[y.Success]: "bg-success border-success text-success",
|
|
80
80
|
[y.Warning]: "bg-warning border-warning text-warning",
|
|
81
81
|
[y.Error]: "bg-error border-error text-error"
|
|
82
|
-
},
|
|
82
|
+
}, Fe = "items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex", or = ({
|
|
83
83
|
variant: e = y.Info,
|
|
84
84
|
message: r,
|
|
85
|
-
cssClass:
|
|
85
|
+
cssClass: t,
|
|
86
86
|
closable: s = !1,
|
|
87
|
-
onClose:
|
|
87
|
+
onClose: a
|
|
88
88
|
}) => /* @__PURE__ */ m(
|
|
89
89
|
"div",
|
|
90
90
|
{
|
|
91
91
|
role: "alert",
|
|
92
|
-
className:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
className: u(
|
|
93
|
+
Fe,
|
|
94
|
+
Ee[e],
|
|
95
|
+
t
|
|
96
96
|
),
|
|
97
97
|
children: [
|
|
98
98
|
/* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ n(N, { icon: ke[e] }),
|
|
100
|
+
/* @__PURE__ */ n("div", { className: "text-primary", children: r })
|
|
101
101
|
] }),
|
|
102
|
-
s && /* @__PURE__ */
|
|
103
|
-
|
|
102
|
+
s && /* @__PURE__ */ n(
|
|
103
|
+
Re,
|
|
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", Se = "shrink-0 grow-0 basis-auto animate-spin-steps", lr = ({
|
|
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":
|
|
124
|
-
className:
|
|
123
|
+
"aria-label": a,
|
|
124
|
+
className: u({
|
|
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:
|
|
137
|
+
className: u(Se, t)
|
|
138
138
|
}
|
|
139
139
|
)
|
|
140
140
|
}
|
|
141
141
|
)
|
|
142
142
|
}
|
|
143
|
-
),
|
|
144
|
-
const e =
|
|
143
|
+
), Pe = 7, Ae = 2, M = ae(null), B = () => {
|
|
144
|
+
const e = ie(M);
|
|
145
145
|
if (e == null)
|
|
146
146
|
throw new Error("Tooltip components must be wrapped in <Tooltip />");
|
|
147
147
|
return e;
|
|
148
|
-
},
|
|
148
|
+
}, Le = ({
|
|
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), i = oe(null), c = s ?? o, d = a ?? l, p = me({
|
|
156
156
|
placement: r,
|
|
157
157
|
open: c,
|
|
158
|
-
onOpenChange:
|
|
159
|
-
whileElementsMounted:
|
|
158
|
+
onOpenChange: d,
|
|
159
|
+
whileElementsMounted: be,
|
|
160
160
|
middleware: [
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
pe(Pe + Ae),
|
|
162
|
+
fe({
|
|
163
163
|
crossAxis: r.includes("-"),
|
|
164
164
|
fallbackAxisSideDirection: "start",
|
|
165
165
|
padding: 5
|
|
166
166
|
}),
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
he({ padding: 5 }),
|
|
168
|
+
xe({
|
|
169
169
|
element: i
|
|
170
170
|
})
|
|
171
171
|
]
|
|
172
|
-
}),
|
|
172
|
+
}), f = ge(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 = Ce(p.context, {
|
|
178
178
|
enabled: s == null
|
|
179
|
-
}),
|
|
180
|
-
return
|
|
179
|
+
}), w = ye(p.context), b = Ne(p.context, { role: "tooltip" }), x = we([f, g, w, b]);
|
|
180
|
+
return le(
|
|
181
181
|
() => ({
|
|
182
182
|
open: c,
|
|
183
|
-
setOpen:
|
|
183
|
+
setOpen: d,
|
|
184
184
|
arrowRef: i,
|
|
185
|
-
...
|
|
186
|
-
...
|
|
185
|
+
...x,
|
|
186
|
+
...p
|
|
187
187
|
}),
|
|
188
|
-
[c,
|
|
188
|
+
[c, d, x, p]
|
|
189
189
|
);
|
|
190
|
-
},
|
|
190
|
+
}, Oe = ({
|
|
191
191
|
children: e,
|
|
192
192
|
...r
|
|
193
193
|
}) => {
|
|
194
|
-
const
|
|
195
|
-
return /* @__PURE__ */
|
|
196
|
-
},
|
|
197
|
-
const
|
|
198
|
-
return
|
|
194
|
+
const t = Le(r);
|
|
195
|
+
return /* @__PURE__ */ n(M.Provider, { value: t, children: e });
|
|
196
|
+
}, Ve = _(function({ style: r, ...t }, s) {
|
|
197
|
+
const a = B(), o = j([a.refs.setFloating, s]);
|
|
198
|
+
return a.open ? /* @__PURE__ */ n(ve, { id: "tooltip-portal", children: /* @__PURE__ */ m(
|
|
199
199
|
"div",
|
|
200
200
|
{
|
|
201
|
-
ref:
|
|
201
|
+
ref: o,
|
|
202
202
|
style: {
|
|
203
|
-
...
|
|
203
|
+
...a.floatingStyles,
|
|
204
204
|
...r
|
|
205
205
|
},
|
|
206
|
-
...
|
|
207
|
-
className:
|
|
206
|
+
...a.getFloatingProps(t),
|
|
207
|
+
className: u(
|
|
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
|
+
De,
|
|
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,194 +223,287 @@ const Ie = {
|
|
|
223
223
|
]
|
|
224
224
|
}
|
|
225
225
|
) }) : null;
|
|
226
|
-
}),
|
|
227
|
-
const
|
|
228
|
-
return
|
|
226
|
+
}), ze = _(function({ children: r, asChild: t = !1, ...s }, a) {
|
|
227
|
+
const o = B(), i = r && typeof r == "object" && "ref" in r && r.ref !== void 0 ? r.ref : void 0, c = j([o.refs.setReference, a, i]);
|
|
228
|
+
return t && ce(r) ? de(
|
|
229
229
|
r,
|
|
230
|
-
|
|
230
|
+
o.getReferenceProps({
|
|
231
231
|
ref: c,
|
|
232
232
|
...s,
|
|
233
233
|
...r.props
|
|
234
234
|
})
|
|
235
|
-
) : /* @__PURE__ */
|
|
235
|
+
) : /* @__PURE__ */ n(
|
|
236
236
|
"span",
|
|
237
237
|
{
|
|
238
238
|
ref: c,
|
|
239
|
-
...
|
|
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__ */ m(Oe, { ...o, children: [
|
|
252
|
+
/* @__PURE__ */ n(ze, { className: u(s, "truncate"), children: t }),
|
|
253
|
+
/* @__PURE__ */ n(
|
|
254
|
+
Ve,
|
|
255
255
|
{
|
|
256
|
-
className:
|
|
256
|
+
className: u(
|
|
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
|
+
] }), We = 18, T = {
|
|
266
|
+
size: We,
|
|
267
267
|
stroke: 2
|
|
268
|
-
},
|
|
268
|
+
}, ir = ({
|
|
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 i =
|
|
278
|
-
(
|
|
279
|
-
|
|
277
|
+
const i = O(
|
|
278
|
+
(p) => {
|
|
279
|
+
p.stopPropagation(), l?.(p.target.checked, r);
|
|
280
280
|
},
|
|
281
281
|
[l, r]
|
|
282
|
-
), c =
|
|
282
|
+
), c = u(
|
|
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
|
+
), d = u(
|
|
287
287
|
"mr-2 border rounded",
|
|
288
|
-
|
|
288
|
+
a ? "bg-layer-4 border-icon-secondary" : ""
|
|
289
289
|
);
|
|
290
290
|
return /* @__PURE__ */ m("label", { className: c, htmlFor: r, children: [
|
|
291
|
-
|
|
292
|
-
e && /* @__PURE__ */
|
|
293
|
-
/* @__PURE__ */
|
|
291
|
+
t && (s ? /* @__PURE__ */ n(re, { className: d, ...T }) : /* @__PURE__ */ n(z, { className: d, ...T })),
|
|
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
297
|
onChange: i,
|
|
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 _e = (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";
|
|
326
326
|
}
|
|
327
|
-
},
|
|
327
|
+
}, je = (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";
|
|
344
344
|
}
|
|
345
|
-
},
|
|
345
|
+
}, Me = ({
|
|
346
346
|
step: e,
|
|
347
347
|
index: r,
|
|
348
|
-
currentStep:
|
|
348
|
+
currentStep: t,
|
|
349
349
|
onChangeStep: s
|
|
350
350
|
}) => {
|
|
351
|
-
const
|
|
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
352
|
return /* @__PURE__ */ m(
|
|
353
353
|
"button",
|
|
354
354
|
{
|
|
355
|
-
className:
|
|
355
|
+
className: u(a, _e(e, t)),
|
|
356
356
|
onClick: () => s(e.id),
|
|
357
357
|
children: [
|
|
358
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ n(
|
|
359
359
|
"span",
|
|
360
360
|
{
|
|
361
|
-
className:
|
|
361
|
+
className: u(o, je(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
|
+
}, cr = ({
|
|
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((i) => i.id === r), l = e.findIndex((i) => i.id === a);
|
|
376
|
+
(a !== r && e[o].status === h.VALID || l < o) && t(a);
|
|
377
377
|
};
|
|
378
|
-
return /* @__PURE__ */
|
|
379
|
-
|
|
378
|
+
return /* @__PURE__ */ n("div", { id: "steps", className: "flex gap-x-3", children: e.map((a, o) => /* @__PURE__ */ n(
|
|
379
|
+
Me,
|
|
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: i,
|
|
397
|
+
disabled: c,
|
|
398
|
+
onChange: d,
|
|
399
|
+
descriptionCssClass: p
|
|
400
|
+
}) => {
|
|
401
|
+
const f = `${o}-desc`, g = u(
|
|
402
|
+
"dial-small cursor-pointer",
|
|
403
|
+
c ? "text-secondary" : "text-primary",
|
|
404
|
+
i
|
|
405
|
+
), w = u(
|
|
406
|
+
"cursor-pointer dial-input-radio",
|
|
407
|
+
t && "mr-2",
|
|
408
|
+
l
|
|
409
|
+
), b = u("flex flex-col", !!s && "mb-2"), x = u(
|
|
410
|
+
"dial-tiny mt-2 ml-[26px] text-secondary",
|
|
411
|
+
p
|
|
412
|
+
);
|
|
413
|
+
return /* @__PURE__ */ m("div", { className: b, children: [
|
|
414
|
+
/* @__PURE__ */ m("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: c,
|
|
424
|
+
"aria-describedby": a && s ? f : void 0,
|
|
425
|
+
className: w,
|
|
426
|
+
onChange: (k) => {
|
|
427
|
+
c || k.target.checked && d?.(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 He = "flex flex-col gap-2", $e = "flex", Ue = "pb-1", Ke = {
|
|
438
|
+
[L.Column]: "flex-col gap-y-3",
|
|
439
|
+
[L.Row]: "flex-row gap-x-6"
|
|
440
|
+
}, dr = ({
|
|
441
|
+
fieldTitle: e,
|
|
442
|
+
radioCssClass: r,
|
|
443
|
+
labelCssClass: t,
|
|
444
|
+
disabled: s,
|
|
445
|
+
elementId: a,
|
|
446
|
+
radioButtons: o,
|
|
447
|
+
activeRadioButton: l,
|
|
448
|
+
orientation: i,
|
|
449
|
+
onChange: c
|
|
450
|
+
}) => /* @__PURE__ */ m("div", { className: He, children: [
|
|
451
|
+
e && /* @__PURE__ */ n(P, { fieldTitle: e, htmlFor: a }),
|
|
452
|
+
/* @__PURE__ */ n(
|
|
453
|
+
"div",
|
|
454
|
+
{
|
|
455
|
+
role: "radiogroup",
|
|
456
|
+
"aria-label": e,
|
|
457
|
+
"aria-disabled": s || void 0,
|
|
458
|
+
className: u(
|
|
459
|
+
$e,
|
|
460
|
+
Ke[i]
|
|
461
|
+
),
|
|
462
|
+
children: o.map((d) => /* @__PURE__ */ m(ue, { children: [
|
|
463
|
+
/* @__PURE__ */ n(
|
|
464
|
+
Be,
|
|
465
|
+
{
|
|
466
|
+
name: a,
|
|
467
|
+
value: d.id,
|
|
468
|
+
inputId: d.id,
|
|
469
|
+
disabled: s,
|
|
470
|
+
cssClass: r,
|
|
471
|
+
labelCssClass: t,
|
|
472
|
+
title: d.name,
|
|
473
|
+
checked: d.id === l,
|
|
474
|
+
onChange: () => c(d.id)
|
|
475
|
+
}
|
|
476
|
+
),
|
|
477
|
+
d.id === l && d.content ? /* @__PURE__ */ n("div", { className: Ue, children: d.content }) : null
|
|
478
|
+
] }, d.id))
|
|
479
|
+
}
|
|
480
|
+
)
|
|
481
|
+
] }), Ge = ({
|
|
389
482
|
value: e,
|
|
390
483
|
textareaId: r,
|
|
391
|
-
placeholder:
|
|
484
|
+
placeholder: t,
|
|
392
485
|
cssClass: s = "",
|
|
393
|
-
disabled:
|
|
394
|
-
invalid:
|
|
486
|
+
disabled: a,
|
|
487
|
+
invalid: o,
|
|
395
488
|
readonly: l,
|
|
396
489
|
onChange: i
|
|
397
|
-
}) => /* @__PURE__ */
|
|
490
|
+
}) => /* @__PURE__ */ n(R, { tooltip: e, triggerClassName: "flex", children: /* @__PURE__ */ n(
|
|
398
491
|
"textarea",
|
|
399
492
|
{
|
|
400
493
|
id: r,
|
|
401
|
-
placeholder:
|
|
494
|
+
placeholder: t,
|
|
402
495
|
value: e || "",
|
|
403
|
-
disabled:
|
|
404
|
-
className:
|
|
496
|
+
disabled: a,
|
|
497
|
+
className: u(
|
|
405
498
|
"dial-textarea dial-input",
|
|
406
|
-
|
|
407
|
-
|
|
499
|
+
o ? "dial-input-error" : "",
|
|
500
|
+
a && "dial-input-disable",
|
|
408
501
|
l && "dial-input-readonly",
|
|
409
502
|
s
|
|
410
503
|
),
|
|
411
504
|
onChange: (c) => !l && i?.(c.currentTarget.value)
|
|
412
505
|
}
|
|
413
|
-
) }),
|
|
506
|
+
) }), Ze = [
|
|
414
507
|
"ArrowLeft",
|
|
415
508
|
"ArrowRight",
|
|
416
509
|
"ArrowUp",
|
|
@@ -422,16 +515,16 @@ const ze = (e, r) => {
|
|
|
422
515
|
"Escape",
|
|
423
516
|
"Home",
|
|
424
517
|
"End"
|
|
425
|
-
],
|
|
426
|
-
if ((r === "number" ||
|
|
518
|
+
], Xe = (e, r, t, s) => {
|
|
519
|
+
if ((r === "number" || t !== void 0 || s !== void 0) && !Ze.includes(e.key) && !(e.key === "-" && e.currentTarget.selectionStart === 0 && (t === void 0 || t < 0)) && !(e.key === "." && r === "number" && !e.currentTarget.value.includes("."))) {
|
|
427
520
|
if (!/^[0-9]$/.test(e.key)) {
|
|
428
521
|
e.preventDefault();
|
|
429
522
|
return;
|
|
430
523
|
}
|
|
431
|
-
if (
|
|
432
|
-
const
|
|
524
|
+
if (t !== void 0 || s !== void 0) {
|
|
525
|
+
const o = e.currentTarget.value, l = e.currentTarget.selectionStart || 0, i = o.slice(0, l) + e.key + o.slice(l), c = parseFloat(i);
|
|
433
526
|
if (!isNaN(c)) {
|
|
434
|
-
if (
|
|
527
|
+
if (t !== void 0 && c < t) {
|
|
435
528
|
e.preventDefault();
|
|
436
529
|
return;
|
|
437
530
|
}
|
|
@@ -442,217 +535,217 @@ const ze = (e, r) => {
|
|
|
442
535
|
}
|
|
443
536
|
}
|
|
444
537
|
}
|
|
445
|
-
},
|
|
538
|
+
}, S = ({
|
|
446
539
|
iconBeforeInput: e,
|
|
447
540
|
iconAfterInput: r,
|
|
448
|
-
hideBorder:
|
|
541
|
+
hideBorder: t,
|
|
449
542
|
value: s,
|
|
450
|
-
elementId:
|
|
451
|
-
placeholder:
|
|
543
|
+
elementId: a,
|
|
544
|
+
placeholder: o = "",
|
|
452
545
|
cssClass: l = "",
|
|
453
546
|
containerCssClass: i,
|
|
454
547
|
tooltipTriggerClassName: c,
|
|
455
|
-
type:
|
|
456
|
-
disabled:
|
|
457
|
-
readonly:
|
|
458
|
-
invalid:
|
|
459
|
-
onChange:
|
|
460
|
-
min:
|
|
461
|
-
max:
|
|
462
|
-
prefix:
|
|
463
|
-
suffix:
|
|
464
|
-
textBeforeInput:
|
|
465
|
-
textAfterInput:
|
|
548
|
+
type: d = "text",
|
|
549
|
+
disabled: p,
|
|
550
|
+
readonly: f,
|
|
551
|
+
invalid: g,
|
|
552
|
+
onChange: w,
|
|
553
|
+
min: b,
|
|
554
|
+
max: x,
|
|
555
|
+
prefix: A,
|
|
556
|
+
suffix: k,
|
|
557
|
+
textBeforeInput: v,
|
|
558
|
+
textAfterInput: D
|
|
466
559
|
}) => {
|
|
467
|
-
const
|
|
468
|
-
|
|
469
|
-
},
|
|
470
|
-
const
|
|
471
|
-
if (U &&
|
|
472
|
-
const
|
|
473
|
-
if (isNaN(
|
|
560
|
+
const $ = (C) => C.target.blur(), U = d === "number" || b !== void 0 || x !== void 0, K = (C) => {
|
|
561
|
+
Xe(C, d, b, x);
|
|
562
|
+
}, G = (C) => {
|
|
563
|
+
const I = C.currentTarget.value;
|
|
564
|
+
if (U && I !== "") {
|
|
565
|
+
const E = parseFloat(I);
|
|
566
|
+
if (isNaN(E) && I !== "-" && I !== "." || !isNaN(E) && (b !== void 0 && E < b || x !== void 0 && E > x))
|
|
474
567
|
return;
|
|
475
568
|
}
|
|
476
|
-
|
|
569
|
+
w?.(I);
|
|
477
570
|
};
|
|
478
571
|
return /* @__PURE__ */ m(
|
|
479
572
|
"div",
|
|
480
573
|
{
|
|
481
|
-
className:
|
|
574
|
+
className: u(
|
|
482
575
|
"dial-input-field flex flex-row items-center justify-between",
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
!
|
|
488
|
-
!
|
|
576
|
+
t ? "dial-input-no-border" : "dial-input",
|
|
577
|
+
g && "dial-input-error",
|
|
578
|
+
p && "dial-input-disable",
|
|
579
|
+
f && "dial-input-readonly",
|
|
580
|
+
!v && "pl-1",
|
|
581
|
+
!D && "pr-1",
|
|
489
582
|
i
|
|
490
583
|
),
|
|
491
584
|
children: [
|
|
492
|
-
|
|
493
|
-
|
|
585
|
+
v && /* @__PURE__ */ n(R, { tooltip: v, children: /* @__PURE__ */ n(
|
|
586
|
+
S,
|
|
494
587
|
{
|
|
495
588
|
hideBorder: !0,
|
|
496
589
|
containerCssClass: "rounded-r-none border-r-0",
|
|
497
590
|
cssClass: "px-2 overflow-hidden overflow-ellipsis dial-small",
|
|
498
|
-
value:
|
|
591
|
+
value: v,
|
|
499
592
|
disabled: !0,
|
|
500
|
-
elementId:
|
|
593
|
+
elementId: v + "textBefore"
|
|
501
594
|
}
|
|
502
595
|
) }),
|
|
503
|
-
|
|
596
|
+
A && /* @__PURE__ */ m("p", { className: "text-secondary dial-small pl-2", children: [
|
|
504
597
|
" ",
|
|
505
|
-
|
|
598
|
+
A
|
|
506
599
|
] }),
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
/* @__PURE__ */
|
|
600
|
+
/* @__PURE__ */ n(N, { icon: e, className: "pl-2" }),
|
|
601
|
+
/* @__PURE__ */ n(R, { tooltip: s, triggerClassName: c, children: /* @__PURE__ */ n(
|
|
509
602
|
"input",
|
|
510
603
|
{
|
|
511
|
-
type:
|
|
604
|
+
type: d,
|
|
512
605
|
autoComplete: "off",
|
|
513
|
-
id:
|
|
514
|
-
placeholder:
|
|
606
|
+
id: a,
|
|
607
|
+
placeholder: o,
|
|
515
608
|
value: s ?? "",
|
|
516
609
|
title: s ? String(s) : "",
|
|
517
|
-
disabled:
|
|
518
|
-
className:
|
|
519
|
-
onChange: (
|
|
610
|
+
disabled: p,
|
|
611
|
+
className: u("border-0 bg-transparent px-2", l),
|
|
612
|
+
onChange: (C) => !f && G?.(C),
|
|
520
613
|
onKeyDown: K,
|
|
521
|
-
onWheel:
|
|
522
|
-
min:
|
|
523
|
-
max:
|
|
614
|
+
onWheel: $,
|
|
615
|
+
min: b,
|
|
616
|
+
max: x
|
|
524
617
|
}
|
|
525
618
|
) }),
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
|
|
619
|
+
/* @__PURE__ */ n(N, { icon: r, className: "pr-2" }),
|
|
620
|
+
k && /* @__PURE__ */ m("p", { className: "text-secondary dial-small pr-2", children: [
|
|
528
621
|
" ",
|
|
529
|
-
|
|
622
|
+
k
|
|
530
623
|
] }),
|
|
531
|
-
|
|
532
|
-
|
|
624
|
+
D && /* @__PURE__ */ n(R, { tooltip: D, children: /* @__PURE__ */ n(
|
|
625
|
+
S,
|
|
533
626
|
{
|
|
534
627
|
hideBorder: !0,
|
|
535
628
|
containerCssClass: "rounded-l-none border-l-0",
|
|
536
629
|
cssClass: "px-2",
|
|
537
|
-
value:
|
|
630
|
+
value: D,
|
|
538
631
|
disabled: !0,
|
|
539
|
-
elementId:
|
|
632
|
+
elementId: D + "textAfter"
|
|
540
633
|
}
|
|
541
634
|
) })
|
|
542
635
|
]
|
|
543
636
|
}
|
|
544
637
|
);
|
|
545
|
-
},
|
|
638
|
+
}, Ye = /^0+\.(\d+)?$/, qe = /^0+/, H = ({
|
|
546
639
|
fieldTitle: e,
|
|
547
640
|
errorText: r,
|
|
548
|
-
optional:
|
|
641
|
+
optional: t,
|
|
549
642
|
elementCssClass: s,
|
|
550
|
-
elementContainerCssClass:
|
|
551
|
-
elementId:
|
|
643
|
+
elementContainerCssClass: a,
|
|
644
|
+
elementId: o,
|
|
552
645
|
containerCssClass: l,
|
|
553
646
|
readonly: i,
|
|
554
647
|
defaultEmptyText: c,
|
|
555
|
-
min:
|
|
556
|
-
max:
|
|
557
|
-
...
|
|
558
|
-
}) => /* @__PURE__ */ m("div", { className:
|
|
559
|
-
/* @__PURE__ */
|
|
560
|
-
|
|
648
|
+
min: d,
|
|
649
|
+
max: p,
|
|
650
|
+
...f
|
|
651
|
+
}) => /* @__PURE__ */ m("div", { className: u("flex flex-col", l), children: [
|
|
652
|
+
/* @__PURE__ */ n(
|
|
653
|
+
P,
|
|
561
654
|
{
|
|
562
655
|
fieldTitle: e,
|
|
563
|
-
optional:
|
|
564
|
-
htmlFor:
|
|
656
|
+
optional: t,
|
|
657
|
+
htmlFor: o
|
|
565
658
|
}
|
|
566
659
|
),
|
|
567
|
-
i ? /* @__PURE__ */
|
|
568
|
-
/* @__PURE__ */
|
|
569
|
-
|
|
660
|
+
i ? /* @__PURE__ */ n("span", { children: f.value || (c ?? "None") }) : /* @__PURE__ */ m(Z, { children: [
|
|
661
|
+
/* @__PURE__ */ n(
|
|
662
|
+
S,
|
|
570
663
|
{
|
|
571
|
-
elementId:
|
|
664
|
+
elementId: o,
|
|
572
665
|
cssClass: s,
|
|
573
|
-
containerCssClass:
|
|
666
|
+
containerCssClass: a,
|
|
574
667
|
invalid: r != null,
|
|
575
|
-
min:
|
|
576
|
-
max:
|
|
577
|
-
...
|
|
668
|
+
min: d,
|
|
669
|
+
max: p,
|
|
670
|
+
...f
|
|
578
671
|
}
|
|
579
672
|
),
|
|
580
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ n(V, { errorText: r })
|
|
581
674
|
] })
|
|
582
|
-
] }),
|
|
675
|
+
] }), ur = ({
|
|
583
676
|
onChange: e,
|
|
584
677
|
value: r,
|
|
585
|
-
min:
|
|
678
|
+
min: t,
|
|
586
679
|
max: s,
|
|
587
|
-
...
|
|
680
|
+
...a
|
|
588
681
|
}) => {
|
|
589
|
-
const
|
|
590
|
-
return /* @__PURE__ */
|
|
682
|
+
const o = (l) => String(l)?.match(Ye) ? String(l)?.replace(qe, "0") : Number(l);
|
|
683
|
+
return /* @__PURE__ */ n(
|
|
591
684
|
H,
|
|
592
685
|
{
|
|
593
686
|
type: "number",
|
|
594
|
-
onChange: (l) => e?.(
|
|
687
|
+
onChange: (l) => e?.(o(l)),
|
|
595
688
|
value: r,
|
|
596
|
-
min:
|
|
689
|
+
min: t,
|
|
597
690
|
max: s,
|
|
598
|
-
...
|
|
691
|
+
...a
|
|
599
692
|
}
|
|
600
693
|
);
|
|
601
|
-
},
|
|
694
|
+
}, mr = ({
|
|
602
695
|
onChange: e,
|
|
603
696
|
...r
|
|
604
|
-
}) => /* @__PURE__ */
|
|
697
|
+
}) => /* @__PURE__ */ n(
|
|
605
698
|
H,
|
|
606
699
|
{
|
|
607
700
|
type: "text",
|
|
608
|
-
onChange: (
|
|
701
|
+
onChange: (t) => e?.(t),
|
|
609
702
|
...r
|
|
610
703
|
}
|
|
611
|
-
),
|
|
704
|
+
), pr = ({
|
|
612
705
|
fieldTitle: e,
|
|
613
706
|
optional: r,
|
|
614
|
-
elementId:
|
|
707
|
+
elementId: t,
|
|
615
708
|
elementCssClass: s,
|
|
616
|
-
errorText:
|
|
617
|
-
...
|
|
709
|
+
errorText: a,
|
|
710
|
+
...o
|
|
618
711
|
}) => /* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
619
|
-
/* @__PURE__ */
|
|
620
|
-
|
|
712
|
+
/* @__PURE__ */ n(
|
|
713
|
+
P,
|
|
621
714
|
{
|
|
622
715
|
fieldTitle: e,
|
|
623
716
|
optional: r,
|
|
624
|
-
htmlFor:
|
|
717
|
+
htmlFor: t
|
|
625
718
|
}
|
|
626
719
|
),
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
|
|
720
|
+
/* @__PURE__ */ n(
|
|
721
|
+
Ge,
|
|
629
722
|
{
|
|
630
|
-
textareaId:
|
|
723
|
+
textareaId: t,
|
|
631
724
|
cssClass: s,
|
|
632
|
-
...
|
|
725
|
+
...o
|
|
633
726
|
}
|
|
634
727
|
),
|
|
635
|
-
/* @__PURE__ */
|
|
636
|
-
] }),
|
|
728
|
+
/* @__PURE__ */ n(V, { errorText: a })
|
|
729
|
+
] }), fr = ({
|
|
637
730
|
title: e,
|
|
638
731
|
switchId: r,
|
|
639
|
-
isOn:
|
|
732
|
+
isOn: t = !1,
|
|
640
733
|
disabled: s,
|
|
641
|
-
onChange:
|
|
734
|
+
onChange: a
|
|
642
735
|
}) => {
|
|
643
|
-
const
|
|
736
|
+
const o = u(
|
|
644
737
|
"flex w-[36px] h-[18px] cursor-pointer items-center gap-1 rounded-full p-0.5 transition-all duration-200",
|
|
645
|
-
|
|
738
|
+
t ? "flex-row-reverse" : "flex-row",
|
|
646
739
|
s ? "pointer-events-none" : "",
|
|
647
|
-
s ?
|
|
648
|
-
), l =
|
|
740
|
+
s ? t ? "bg-controls-disable" : "bg-layer-4" : t ? "bg-accent-primary" : "bg-layer-4"
|
|
741
|
+
), l = O(
|
|
649
742
|
(i) => {
|
|
650
|
-
i.stopPropagation(),
|
|
743
|
+
i.stopPropagation(), a?.(!t);
|
|
651
744
|
},
|
|
652
|
-
[
|
|
745
|
+
[a, t]
|
|
653
746
|
);
|
|
654
747
|
return /* @__PURE__ */ m("div", { className: "flex flex-row items-center", children: [
|
|
655
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ n(
|
|
656
749
|
"input",
|
|
657
750
|
{
|
|
658
751
|
type: "checkbox",
|
|
@@ -660,85 +753,87 @@ const ze = (e, r) => {
|
|
|
660
753
|
id: r,
|
|
661
754
|
disabled: s,
|
|
662
755
|
className: "invisible w-0 h-0",
|
|
663
|
-
checked:
|
|
756
|
+
checked: t
|
|
664
757
|
}
|
|
665
758
|
),
|
|
666
|
-
/* @__PURE__ */
|
|
759
|
+
/* @__PURE__ */ n("label", { htmlFor: r, className: o, children: /* @__PURE__ */ n(
|
|
667
760
|
"span",
|
|
668
761
|
{
|
|
669
|
-
className:
|
|
762
|
+
className: u(
|
|
670
763
|
"size-3 rounded-full",
|
|
671
|
-
s ?
|
|
764
|
+
s ? t ? "bg-layer-4" : "bg-controls-disable" : "bg-controls-enable-primary"
|
|
672
765
|
)
|
|
673
766
|
}
|
|
674
767
|
) }),
|
|
675
|
-
e && /* @__PURE__ */
|
|
768
|
+
e && /* @__PURE__ */ n("span", { className: "pl-2 dial-small text-primary", children: e })
|
|
676
769
|
] });
|
|
677
|
-
},
|
|
770
|
+
}, Je = ({ onClick: e }) => /* @__PURE__ */ n(
|
|
678
771
|
te,
|
|
679
772
|
{
|
|
680
773
|
...T,
|
|
681
774
|
className: "text-primary",
|
|
682
775
|
onClick: e
|
|
683
776
|
}
|
|
684
|
-
),
|
|
685
|
-
const [r,
|
|
686
|
-
|
|
777
|
+
), Qe = ({ onClick: e }) => /* @__PURE__ */ n(se, { ...T, className: "text-primary", onClick: e }), er = ({ ...e }) => {
|
|
778
|
+
const [r, t] = W(!1), s = O((a) => {
|
|
779
|
+
t(a);
|
|
687
780
|
}, []);
|
|
688
|
-
return /* @__PURE__ */
|
|
689
|
-
|
|
781
|
+
return /* @__PURE__ */ n(
|
|
782
|
+
S,
|
|
690
783
|
{
|
|
691
784
|
type: r ? "text" : "password",
|
|
692
785
|
...e,
|
|
693
|
-
iconAfterInput: r ? /* @__PURE__ */
|
|
786
|
+
iconAfterInput: r ? /* @__PURE__ */ n(Je, { onClick: () => s(!1) }) : /* @__PURE__ */ n(Qe, { onClick: () => s(!0) })
|
|
694
787
|
}
|
|
695
788
|
);
|
|
696
|
-
},
|
|
789
|
+
}, hr = ({
|
|
697
790
|
fieldTitle: e,
|
|
698
791
|
optional: r,
|
|
699
|
-
elementCssClass:
|
|
792
|
+
elementCssClass: t,
|
|
700
793
|
elementId: s,
|
|
701
|
-
errorText:
|
|
702
|
-
...
|
|
794
|
+
errorText: a,
|
|
795
|
+
...o
|
|
703
796
|
}) => /* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
-
|
|
797
|
+
/* @__PURE__ */ n(
|
|
798
|
+
P,
|
|
706
799
|
{
|
|
707
800
|
fieldTitle: e,
|
|
708
801
|
optional: r,
|
|
709
802
|
htmlFor: s
|
|
710
803
|
}
|
|
711
804
|
),
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
-
|
|
805
|
+
/* @__PURE__ */ n(
|
|
806
|
+
er,
|
|
714
807
|
{
|
|
715
|
-
cssClass:
|
|
808
|
+
cssClass: t,
|
|
716
809
|
elementId: s,
|
|
717
|
-
invalid: !!
|
|
718
|
-
...
|
|
810
|
+
invalid: !!a,
|
|
811
|
+
...o
|
|
719
812
|
}
|
|
720
813
|
),
|
|
721
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ n(V, { errorText: a })
|
|
722
815
|
] });
|
|
723
816
|
export {
|
|
724
817
|
y as AlertVariant,
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
818
|
+
F as ButtonVariant,
|
|
819
|
+
or as DialAlert,
|
|
820
|
+
Re as DialButton,
|
|
821
|
+
ir as DialCheckbox,
|
|
822
|
+
V as DialErrorText,
|
|
823
|
+
P as DialFieldLabel,
|
|
824
|
+
N as DialIcon,
|
|
825
|
+
S as DialInput,
|
|
826
|
+
lr as DialLoader,
|
|
827
|
+
ur as DialNumberInputField,
|
|
828
|
+
er as DialPasswordInput,
|
|
829
|
+
hr as DialPasswordInputField,
|
|
830
|
+
Be as DialRadioButton,
|
|
831
|
+
dr as DialRadioGroup,
|
|
832
|
+
cr as DialSteps,
|
|
833
|
+
fr as DialSwitch,
|
|
834
|
+
pr as DialTextAreaField,
|
|
835
|
+
mr as DialTextInputField,
|
|
836
|
+
Ge as DialTextarea,
|
|
837
|
+
R as DialTooltip,
|
|
838
|
+
h as StepStatus
|
|
744
839
|
};
|