@epam/ai-dial-ui-kit 0.2.0-rc.19 → 0.2.0-rc.20

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