@epam/ai-dial-ui-kit 0.2.0-rc.16 → 0.2.0-rc.17

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