@epam/ai-dial-ui-kit 0.3.0-rc.2 → 0.3.0-rc.4

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,11 +1,11 @@
1
1
  import { jsx as r, jsxs as p, Fragment as Z } from "react/jsx-runtime";
2
2
  import l from "classnames";
3
- import { IconCircleCheck as Ae, IconAlertTriangle as Pe, IconAlertCircle as Ve, IconInfoCircle as je, IconX as Y, IconMinus as We, IconCheck as ce, IconExclamationCircle as Oe, IconClipboardX as Be, IconChevronsLeft as ze, IconChevronsRight as He, IconEyeOff as _e, IconEye as $e, IconSearch as Ge } from "@tabler/icons-react";
4
- import * as R from "react";
5
- import { createContext as Ke, useState as F, useRef as de, useMemo as Ue, useContext as Ze, forwardRef as ue, isValidElement as Xe, cloneElement as qe, useCallback as T, useEffect as ee, useId as Qe } from "react";
6
- import { useFloating as re, offset as pe, flip as me, shift as fe, arrow as Ye, autoUpdate as he, useHover as xe, useFocus as Je, useDismiss as ne, useRole as te, useInteractions as se, useMergeRefs as ge, FloatingPortal as ae, FloatingArrow as er, FloatingOverlay as rr, FloatingFocusManager as ye, autoPlacement as nr, size as tr, useClick as sr } from "@floating-ui/react";
7
- import { createPortal as ar } from "react-dom";
8
- const $ = ({ errorText: e }) => e && /* @__PURE__ */ r("span", { className: "text-error dial-tiny mt-1", children: e }), G = ({
3
+ import { IconCircleCheck as Ae, IconAlertTriangle as Ve, IconAlertCircle as Oe, IconInfoCircle as je, IconX as J, IconMinus as We, IconCheck as ce, IconExclamationCircle as Be, IconClipboardX as ze, IconChevronsLeft as He, IconChevronsRight as _e, IconEyeOff as $e, IconEye as Ge, IconSearch as Ke } from "@tabler/icons-react";
4
+ import * as L from "react";
5
+ import { createContext as Ue, useState as F, useRef as de, useMemo as Ze, useContext as Xe, forwardRef as ue, isValidElement as qe, cloneElement as Qe, useCallback as R, useEffect as ee, useId as Ye } from "react";
6
+ import { useFloating as re, offset as pe, flip as fe, shift as me, arrow as Je, autoUpdate as he, useHover as xe, useFocus as er, useDismiss as ne, useRole as te, useInteractions as se, useMergeRefs as ge, FloatingPortal as ae, FloatingArrow as rr, FloatingOverlay as nr, FloatingFocusManager as Ce, autoPlacement as tr, size as sr, useClick as ar } from "@floating-ui/react";
7
+ import { createPortal as or } from "react-dom";
8
+ const K = ({ errorText: e }) => e && /* @__PURE__ */ r("span", { className: "text-error dial-tiny mt-1", children: e }), $ = ({
9
9
  fieldTitle: e,
10
10
  htmlFor: n,
11
11
  optional: t,
@@ -25,14 +25,14 @@ const $ = ({ errorText: e }) => e && /* @__PURE__ */ r("span", { className: "tex
25
25
  t && /* @__PURE__ */ r("span", { className: "ml-1", children: s ?? "(Optional)" })
26
26
  ]
27
27
  }
28
- ) : null, E = ({ icon: e, className: n }) => e ? /* @__PURE__ */ r("span", { className: l("flex-shrink-0", n), children: e }) : null;
29
- var S = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e.Tertiary = "tertiary", e.Danger = "danger", e))(S || {});
30
- const or = {
31
- [S.Primary]: "dial-primary-button",
32
- [S.Secondary]: "dial-secondary-button",
33
- [S.Tertiary]: "dial-tertiary-button",
34
- [S.Danger]: "dial-danger-button"
35
- }, B = ({
28
+ ) : null, M = ({ icon: e, className: n }) => e ? /* @__PURE__ */ r("span", { className: l("flex-shrink-0", n), children: e }) : null;
29
+ var D = /* @__PURE__ */ ((e) => (e.Primary = "primary", e.Secondary = "secondary", e.Tertiary = "tertiary", e.Danger = "danger", e))(D || {});
30
+ const lr = {
31
+ [D.Primary]: "dial-primary-button",
32
+ [D.Secondary]: "dial-secondary-button",
33
+ [D.Tertiary]: "dial-tertiary-button",
34
+ [D.Danger]: "dial-danger-button"
35
+ }, V = ({
36
36
  title: e,
37
37
  variant: n,
38
38
  cssClass: t,
@@ -43,16 +43,16 @@ const or = {
43
43
  iconAfter: u,
44
44
  iconBefore: d,
45
45
  hideTitleOnMobile: i,
46
- ariaLabel: m
46
+ ariaLabel: f
47
47
  }) => {
48
- const f = l(
48
+ const m = l(
49
49
  "dial-small-semi",
50
50
  u ? "mr-2" : "",
51
51
  d ? "ml-2" : "",
52
52
  i ? "hidden sm:inline" : "inline",
53
53
  s
54
54
  ), g = l(
55
- n && or[n],
55
+ n && lr[n],
56
56
  t,
57
57
  "focus-visible:outline outline-offset-0"
58
58
  );
@@ -64,28 +64,28 @@ const or = {
64
64
  className: g,
65
65
  onClick: (x) => o?.(x),
66
66
  disabled: c,
67
- "aria-label": e || m,
67
+ "aria-label": e || f,
68
68
  children: [
69
- /* @__PURE__ */ r(E, { icon: d }),
70
- e && /* @__PURE__ */ r("span", { className: f, children: e }),
71
- /* @__PURE__ */ r(E, { icon: u })
69
+ /* @__PURE__ */ r(M, { icon: d }),
70
+ e && /* @__PURE__ */ r("span", { className: m, children: e }),
71
+ /* @__PURE__ */ r(M, { icon: u })
72
72
  ]
73
73
  }
74
74
  );
75
75
  };
76
- var j = /* @__PURE__ */ ((e) => (e.Info = "info", e.Success = "success", e.Warning = "warning", e.Error = "error", e))(j || {});
77
- const lr = {
76
+ var B = /* @__PURE__ */ ((e) => (e.Info = "info", e.Success = "success", e.Warning = "warning", e.Error = "error", e))(B || {});
77
+ const ir = {
78
78
  info: /* @__PURE__ */ r(je, { size: 24, stroke: 2 }),
79
- error: /* @__PURE__ */ r(Ve, { size: 24, stroke: 2 }),
80
- warning: /* @__PURE__ */ r(Pe, { size: 24, stroke: 2 }),
79
+ error: /* @__PURE__ */ r(Oe, { size: 24, stroke: 2 }),
80
+ warning: /* @__PURE__ */ r(Ve, { size: 24, stroke: 2 }),
81
81
  success: /* @__PURE__ */ r(Ae, { size: 24, stroke: 2 })
82
- }, ir = {
83
- [j.Info]: "bg-info border-info text-info",
84
- [j.Success]: "bg-success border-success text-success",
85
- [j.Warning]: "bg-warning border-warning text-warning",
86
- [j.Error]: "bg-error border-error text-error"
87
- }, cr = "items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex", ln = ({
88
- variant: e = j.Info,
82
+ }, cr = {
83
+ [B.Info]: "bg-info border-info text-info",
84
+ [B.Success]: "bg-success border-success text-success",
85
+ [B.Warning]: "bg-warning border-warning text-warning",
86
+ [B.Error]: "bg-error border-error text-error"
87
+ }, dr = "items-center justify-between gap-2 p-3 border border-solid dial-small-150 rounded flex", dn = ({
88
+ variant: e = B.Info,
89
89
  message: n,
90
90
  cssClass: t,
91
91
  closable: s = !1,
@@ -95,27 +95,27 @@ const lr = {
95
95
  {
96
96
  role: "alert",
97
97
  className: l(
98
- cr,
99
- ir[e],
98
+ dr,
99
+ cr[e],
100
100
  t
101
101
  ),
102
102
  children: [
103
103
  /* @__PURE__ */ p("div", { className: "flex items-center gap-2", children: [
104
- /* @__PURE__ */ r(E, { icon: lr[e] }),
104
+ /* @__PURE__ */ r(M, { icon: ir[e] }),
105
105
  /* @__PURE__ */ r("div", { className: "text-primary", children: n })
106
106
  ] }),
107
107
  s && /* @__PURE__ */ r(
108
- B,
108
+ V,
109
109
  {
110
110
  cssClass: "ml-2 text-secondary hover:text-primary",
111
111
  ariaLabel: "Close alert",
112
- iconBefore: /* @__PURE__ */ r(Y, { size: 16 }),
112
+ iconBefore: /* @__PURE__ */ r(J, { size: 16 }),
113
113
  onClick: (o) => a?.(o)
114
114
  }
115
115
  )
116
116
  ]
117
117
  }
118
- ), dr = "flex items-center justify-center text-secondary", ur = "shrink-0 grow-0 basis-auto animate-spin-steps", pr = (e) => /* @__PURE__ */ R.createElement("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ R.createElement("path", { d: "M24 39V46.5", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ R.createElement("path", { opacity: 0.4, d: "M9 24H1.5", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ R.createElement("path", { opacity: 0.5, d: "M8.0918 8.0918L13.3994 13.3994", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ R.createElement("path", { opacity: 0.6, d: "M24 1.5V9", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ R.createElement("path", { opacity: 0.7, d: "M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ R.createElement("path", { opacity: 0.8, d: "M46.5 24H39", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ R.createElement("path", { opacity: 0.9, d: "M34.6055 34.6055L39.9082 39.9082", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ R.createElement("path", { opacity: 0.3, d: "M13.3936 34.6055L8.08594 39.9131", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" })), mr = ({
118
+ ), ur = "flex items-center justify-center text-secondary", pr = "shrink-0 grow-0 basis-auto animate-spin-steps", fr = (e) => /* @__PURE__ */ L.createElement("svg", { viewBox: "0 0 48 48", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ L.createElement("path", { d: "M24 39V46.5", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ L.createElement("path", { opacity: 0.4, d: "M9 24H1.5", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ L.createElement("path", { opacity: 0.5, d: "M8.0918 8.0918L13.3994 13.3994", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ L.createElement("path", { opacity: 0.6, d: "M24 1.5V9", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ L.createElement("path", { opacity: 0.7, d: "M39.9121 8.08594L37.2607 10.7373L34.6094 13.3887", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ L.createElement("path", { opacity: 0.8, d: "M46.5 24H39", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ L.createElement("path", { opacity: 0.9, d: "M34.6055 34.6055L39.9082 39.9082", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ L.createElement("path", { opacity: 0.3, d: "M13.3936 34.6055L8.08594 39.9131", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" })), mr = ({
119
119
  size: e = 18,
120
120
  cssClass: n,
121
121
  iconClass: t,
@@ -127,78 +127,78 @@ const lr = {
127
127
  role: "status",
128
128
  "aria-label": a,
129
129
  className: l({
130
- [dr]: !0,
130
+ [ur]: !0,
131
131
  "w-full h-full": s,
132
132
  [n || ""]: !!n
133
133
  }),
134
134
  children: /* @__PURE__ */ r(
135
- E,
135
+ M,
136
136
  {
137
137
  icon: /* @__PURE__ */ r(
138
- pr,
138
+ fr,
139
139
  {
140
140
  width: e,
141
141
  height: e,
142
- className: l(ur, t),
142
+ className: l(pr, t),
143
143
  role: "img"
144
144
  }
145
145
  )
146
146
  }
147
147
  )
148
148
  }
149
- ), fr = 7, hr = 2, Ce = Ke(null), be = () => {
150
- const e = Ze(Ce);
149
+ ), hr = 7, xr = 2, ye = Ue(null), be = () => {
150
+ const e = Xe(ye);
151
151
  if (e == null)
152
152
  throw new Error("Tooltip components must be wrapped in <Tooltip />");
153
153
  return e;
154
- }, xr = ({
154
+ }, gr = ({
155
155
  initialOpen: e = !1,
156
156
  placement: n = "bottom",
157
157
  isTriggerClickable: t = !1,
158
158
  open: s,
159
159
  onOpenChange: a
160
160
  } = {}) => {
161
- const [o, c] = F(e), u = de(null), d = s ?? o, i = a ?? c, m = re({
161
+ const [o, c] = F(e), u = de(null), d = s ?? o, i = a ?? c, f = re({
162
162
  placement: n,
163
163
  open: d,
164
164
  onOpenChange: i,
165
165
  whileElementsMounted: he,
166
166
  middleware: [
167
- pe(fr + hr),
168
- me({
167
+ pe(hr + xr),
168
+ fe({
169
169
  crossAxis: n.includes("-"),
170
170
  fallbackAxisSideDirection: "start",
171
171
  padding: 5
172
172
  }),
173
- fe({ padding: 5 }),
174
- Ye({
173
+ me({ padding: 5 }),
174
+ Je({
175
175
  element: u
176
176
  })
177
177
  ]
178
- }), f = xe(m.context, {
178
+ }), m = xe(f.context, {
179
179
  move: !1,
180
180
  enabled: s == null,
181
181
  mouseOnly: t,
182
182
  delay: { open: 500, close: 0 }
183
- }), g = Je(m.context, {
183
+ }), g = er(f.context, {
184
184
  enabled: s == null
185
- }), x = ne(m.context), v = te(m.context, { role: "tooltip" }), C = se([f, g, x, v]);
186
- return Ue(
185
+ }), x = ne(f.context), v = te(f.context, { role: "tooltip" }), y = se([m, g, x, v]);
186
+ return Ze(
187
187
  () => ({
188
188
  open: d,
189
189
  setOpen: i,
190
190
  arrowRef: u,
191
- ...C,
192
- ...m
191
+ ...y,
192
+ ...f
193
193
  }),
194
- [d, i, C, m]
194
+ [d, i, y, f]
195
195
  );
196
- }, gr = ({
196
+ }, Cr = ({
197
197
  children: e,
198
198
  ...n
199
199
  }) => {
200
- const t = xr(n);
201
- return /* @__PURE__ */ r(Ce.Provider, { value: t, children: e });
200
+ const t = gr(n);
201
+ return /* @__PURE__ */ r(ye.Provider, { value: t, children: e });
202
202
  }, yr = ue(function({ style: n, ...t }, s) {
203
203
  const a = be(), o = ge([a.refs.setFloating, s]);
204
204
  return a.open ? /* @__PURE__ */ r(ae, { id: "tooltip-portal", children: /* @__PURE__ */ p(
@@ -217,7 +217,7 @@ const lr = {
217
217
  children: [
218
218
  t.children,
219
219
  /* @__PURE__ */ r(
220
- er,
220
+ rr,
221
221
  {
222
222
  ref: a.arrowRef,
223
223
  context: a.context,
@@ -229,9 +229,9 @@ const lr = {
229
229
  ]
230
230
  }
231
231
  ) }) : null;
232
- }), Cr = ue(function({ children: n, asChild: t = !1, ...s }, a) {
232
+ }), br = ue(function({ children: n, asChild: t = !1, ...s }, a) {
233
233
  const o = be(), u = n && typeof n == "object" && "ref" in n && n.ref !== void 0 ? n.ref : void 0, d = ge([o.refs.setReference, a, u]);
234
- return t && Xe(n) ? qe(
234
+ return t && qe(n) ? Qe(
235
235
  n,
236
236
  o.getReferenceProps({
237
237
  ref: d,
@@ -247,15 +247,15 @@ const lr = {
247
247
  children: n
248
248
  }
249
249
  );
250
- }), P = ({
250
+ }), O = ({
251
251
  hideTooltip: e,
252
252
  tooltip: n,
253
253
  children: t,
254
254
  triggerClassName: s,
255
255
  contentClassName: a,
256
256
  ...o
257
- }) => /* @__PURE__ */ p(gr, { ...o, children: [
258
- /* @__PURE__ */ r(Cr, { className: l(s, "truncate"), children: t }),
257
+ }) => /* @__PURE__ */ p(Cr, { ...o, children: [
258
+ /* @__PURE__ */ r(br, { className: l(s, "truncate"), children: t }),
259
259
  /* @__PURE__ */ r(
260
260
  yr,
261
261
  {
@@ -268,10 +268,10 @@ const lr = {
268
268
  children: n
269
269
  }
270
270
  )
271
- ] }), W = 18, z = {
272
- size: W,
271
+ ] }), z = 18, _ = {
272
+ size: z,
273
273
  stroke: 2
274
- }, cn = ({
274
+ }, un = ({
275
275
  label: e,
276
276
  id: n,
277
277
  checked: t,
@@ -280,9 +280,9 @@ const lr = {
280
280
  ariaLabel: o,
281
281
  onChange: c
282
282
  }) => {
283
- const u = T(
284
- (f) => {
285
- c?.(f.target.checked, n);
283
+ const u = R(
284
+ (m) => {
285
+ c?.(m.target.checked, n);
286
286
  },
287
287
  [c, n]
288
288
  ), d = l(
@@ -294,8 +294,8 @@ const lr = {
294
294
  a ? "bg-layer-4 border-icon-secondary" : ""
295
295
  );
296
296
  return /* @__PURE__ */ p("label", { className: d, htmlFor: n, children: [
297
- s ? /* @__PURE__ */ r(We, { className: i, ...z }) : t ? /* @__PURE__ */ r(ce, { className: i, ...z }) : null,
298
- e && /* @__PURE__ */ r(P, { tooltip: e, triggerClassName: "flex-1 min-w-0", children: /* @__PURE__ */ r("p", { className: "text-primary w-full truncate", children: e }) }),
297
+ s ? /* @__PURE__ */ r(We, { className: i, ..._ }) : t ? /* @__PURE__ */ r(ce, { className: i, ..._ }) : null,
298
+ e && /* @__PURE__ */ r(O, { tooltip: e, triggerClassName: "flex-1 min-w-0", children: /* @__PURE__ */ r("p", { className: "text-primary w-full truncate", children: e }) }),
299
299
  /* @__PURE__ */ r(
300
300
  "input",
301
301
  {
@@ -313,60 +313,60 @@ const lr = {
313
313
  )
314
314
  ] });
315
315
  };
316
- var D = /* @__PURE__ */ ((e) => (e.VALID = "valid", e.ERROR = "error", e))(D || {});
317
- const br = (e, n) => {
316
+ var I = /* @__PURE__ */ ((e) => (e.VALID = "valid", e.ERROR = "error", e))(I || {});
317
+ const vr = (e, n) => {
318
318
  if (n === e.id)
319
319
  switch (e.status) {
320
- case D.VALID:
320
+ case I.VALID:
321
321
  return "border-accent-secondary text-primary";
322
- case D.ERROR:
322
+ case I.ERROR:
323
323
  return "border-red-900 text-primary";
324
324
  default:
325
325
  return "border-accent-primary text-primary";
326
326
  }
327
327
  switch (e.status) {
328
- case D.VALID:
328
+ case I.VALID:
329
329
  return "border-primary text-white";
330
- case D.ERROR:
330
+ case I.ERROR:
331
331
  return "border-red-900 text-error";
332
332
  default:
333
333
  return "border-primary text-secondary";
334
334
  }
335
- }, vr = (e, n) => {
335
+ }, wr = (e, n) => {
336
336
  if (n === e.id)
337
337
  switch (e.status) {
338
- case D.VALID:
338
+ case I.VALID:
339
339
  return "bg-accent-secondary";
340
- case D.ERROR:
340
+ case I.ERROR:
341
341
  return "bg-red-400";
342
342
  default:
343
343
  return "bg-accent-primary";
344
344
  }
345
345
  switch (e.status) {
346
- case D.VALID:
346
+ case I.VALID:
347
347
  return "bg-accent-secondary";
348
- case D.ERROR:
348
+ case I.ERROR:
349
349
  return "bg-red-400";
350
350
  default:
351
351
  return "bg-layer-4";
352
352
  }
353
- }, wr = ({
353
+ }, Nr = ({
354
354
  step: e,
355
355
  index: n,
356
356
  currentStep: t,
357
357
  onChangeStep: s
358
358
  }) => {
359
- 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", c = () => t === e.id && e.status === D.ERROR ? /* @__PURE__ */ r(Oe, { stroke: 2, size: 16 }) : t !== e.id && e.status === D.VALID ? /* @__PURE__ */ r(ce, { stroke: 2, size: 16 }) : n + 1;
359
+ 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", c = () => t === e.id && e.status === I.ERROR ? /* @__PURE__ */ r(Be, { stroke: 2, size: 16 }) : t !== e.id && e.status === I.VALID ? /* @__PURE__ */ r(ce, { stroke: 2, size: 16 }) : n + 1;
360
360
  return /* @__PURE__ */ p(
361
361
  "button",
362
362
  {
363
- className: l(a, br(e, t)),
363
+ className: l(a, vr(e, t)),
364
364
  onClick: () => s(e.id),
365
365
  children: [
366
366
  /* @__PURE__ */ r(
367
367
  "span",
368
368
  {
369
- className: l(o, vr(e, t)),
369
+ className: l(o, wr(e, t)),
370
370
  children: c()
371
371
  }
372
372
  ),
@@ -374,17 +374,17 @@ const br = (e, n) => {
374
374
  ]
375
375
  }
376
376
  );
377
- }, dn = ({
377
+ }, pn = ({
378
378
  steps: e,
379
379
  currentStep: n,
380
380
  onChangeStep: t
381
381
  }) => {
382
382
  const s = (a) => {
383
383
  const o = e.findIndex((u) => u.id === n), c = e.findIndex((u) => u.id === a);
384
- (a !== n && e[o].status === D.VALID || c < o) && t(a);
384
+ (a !== n && e[o].status === I.VALID || c < o) && t(a);
385
385
  };
386
386
  return /* @__PURE__ */ r("div", { id: "steps", className: "flex gap-x-3", children: e.map((a, o) => /* @__PURE__ */ r(
387
- wr,
387
+ Nr,
388
388
  {
389
389
  currentStep: n,
390
390
  onChangeStep: s,
@@ -393,7 +393,7 @@ const br = (e, n) => {
393
393
  },
394
394
  a.id
395
395
  )) });
396
- }, Nr = ({
396
+ }, kr = ({
397
397
  name: e,
398
398
  value: n,
399
399
  title: t,
@@ -404,9 +404,9 @@ const br = (e, n) => {
404
404
  labelCssClass: u,
405
405
  disabled: d,
406
406
  onChange: i,
407
- descriptionCssClass: m
407
+ descriptionCssClass: f
408
408
  }) => {
409
- const f = `${o}-desc`, g = l(
409
+ const m = `${o}-desc`, g = l(
410
410
  "dial-small cursor-pointer",
411
411
  d ? "text-secondary" : "text-primary",
412
412
  u
@@ -414,9 +414,9 @@ const br = (e, n) => {
414
414
  "cursor-pointer dial-input-radio",
415
415
  t && "mr-2",
416
416
  c
417
- ), v = l("flex flex-col", !!s && "mb-2"), C = l(
417
+ ), v = l("flex flex-col", !!s && "mb-2"), y = l(
418
418
  "dial-tiny mt-2 ml-[26px] text-secondary",
419
- m
419
+ f
420
420
  );
421
421
  return /* @__PURE__ */ p("div", { className: v, children: [
422
422
  /* @__PURE__ */ p("div", { className: "flex flex-row items-center", children: [
@@ -429,7 +429,7 @@ const br = (e, n) => {
429
429
  value: n,
430
430
  checked: a,
431
431
  disabled: d,
432
- "aria-describedby": a && s ? f : void 0,
432
+ "aria-describedby": a && s ? m : void 0,
433
433
  className: x,
434
434
  onChange: (N) => {
435
435
  d || N.target.checked && i?.(n);
@@ -438,14 +438,14 @@ const br = (e, n) => {
438
438
  ),
439
439
  t ? /* @__PURE__ */ r("label", { className: g, htmlFor: o, children: t }) : null
440
440
  ] }),
441
- a && s && /* @__PURE__ */ r("div", { id: f, className: C, children: s })
441
+ a && s && /* @__PURE__ */ r("div", { id: m, className: y, children: s })
442
442
  ] });
443
443
  };
444
- var J = /* @__PURE__ */ ((e) => (e.Row = "Row", e.Column = "Column", e))(J || {});
445
- const kr = "flex flex-col gap-2", Dr = "flex", Ir = "pb-1 mt-2", Rr = {
446
- [J.Column]: "flex-col gap-y-3",
447
- [J.Row]: "flex-row gap-x-6"
448
- }, un = ({
444
+ var X = /* @__PURE__ */ ((e) => (e.Row = "Row", e.Column = "Column", e))(X || {});
445
+ const Dr = "flex flex-col gap-2", Ir = "flex", Rr = "pb-1 mt-2", Er = {
446
+ [X.Column]: "flex-col gap-y-3",
447
+ [X.Row]: "flex-row gap-x-6"
448
+ }, Sr = ({
449
449
  fieldTitle: e,
450
450
  radioCssClass: n,
451
451
  labelCssClass: t,
@@ -455,8 +455,8 @@ const kr = "flex flex-col gap-2", Dr = "flex", Ir = "pb-1 mt-2", Rr = {
455
455
  activeRadioButton: c,
456
456
  orientation: u,
457
457
  onChange: d
458
- }) => /* @__PURE__ */ p("div", { className: kr, children: [
459
- e && /* @__PURE__ */ r(G, { fieldTitle: e, htmlFor: a }),
458
+ }) => /* @__PURE__ */ p("div", { className: Dr, children: [
459
+ e && /* @__PURE__ */ r($, { fieldTitle: e, htmlFor: a }),
460
460
  /* @__PURE__ */ r(
461
461
  "div",
462
462
  {
@@ -464,12 +464,12 @@ const kr = "flex flex-col gap-2", Dr = "flex", Ir = "pb-1 mt-2", Rr = {
464
464
  "aria-label": e,
465
465
  "aria-disabled": s || void 0,
466
466
  className: l(
467
- Dr,
468
- Rr[u]
467
+ Ir,
468
+ Er[u]
469
469
  ),
470
470
  children: o.map((i) => /* @__PURE__ */ p("div", { className: "flex flex-col", children: [
471
471
  /* @__PURE__ */ r(
472
- Nr,
472
+ kr,
473
473
  {
474
474
  name: a,
475
475
  value: i.id,
@@ -482,28 +482,28 @@ const kr = "flex flex-col gap-2", Dr = "flex", Ir = "pb-1 mt-2", Rr = {
482
482
  onChange: () => d(i.id)
483
483
  }
484
484
  ),
485
- i.id === c && i.content ? /* @__PURE__ */ r("div", { className: Ir, children: i.content }) : null
485
+ i.id === c && i.content ? /* @__PURE__ */ r("div", { className: Rr, children: i.content }) : null
486
486
  ] }, i.id))
487
487
  }
488
488
  )
489
- ] }), pn = ({
489
+ ] }), fn = ({
490
490
  icon: e,
491
491
  title: n,
492
492
  description: t
493
493
  }) => /* @__PURE__ */ p("div", { className: "h-full w-full flex flex-col items-center justify-center text-secondary", children: [
494
- e || /* @__PURE__ */ r(Be, { width: 60, height: 60 }),
494
+ e || /* @__PURE__ */ r(ze, { width: 60, height: 60 }),
495
495
  /* @__PURE__ */ r("span", { className: "small mt-2 text-primary", children: n }),
496
496
  t && /* @__PURE__ */ r("span", { className: "mt-1 text-primary", children: t })
497
- ] }), Er = 60, mn = ({
497
+ ] }), Lr = 60, mn = ({
498
498
  containerCssClass: e,
499
499
  children: n,
500
500
  width: t,
501
501
  title: s,
502
- iconSize: a = W,
502
+ iconSize: a = z,
503
503
  titleCssClass: o,
504
504
  additionalButtons: c
505
505
  }) => {
506
- const [u, d] = F(t), [i, m] = F(!0), f = l([
506
+ const [u, d] = F(t), [i, f] = F(!0), m = l([
507
507
  "transform rotate-180 [writing-mode:tb-rl]",
508
508
  i && "hidden",
509
509
  o
@@ -511,7 +511,7 @@ const kr = "flex flex-col gap-2", Dr = "flex", Ir = "pb-1 mt-2", Rr = {
511
511
  "flex flex-row gap-2 cursor-pointer text-secondary",
512
512
  i ? "justify-end" : "justify-center"
513
513
  ]), x = () => {
514
- d(i ? Er : t), m(!i);
514
+ d(i ? Lr : t), f(!i);
515
515
  };
516
516
  return /* @__PURE__ */ p(
517
517
  "div",
@@ -532,25 +532,25 @@ const kr = "flex flex-col gap-2", Dr = "flex", Ir = "pb-1 mt-2", Rr = {
532
532
  children: n
533
533
  }
534
534
  ),
535
- /* @__PURE__ */ r("div", { className: f, children: s }),
535
+ /* @__PURE__ */ r("div", { className: m, children: s }),
536
536
  /* @__PURE__ */ p("div", { className: g, children: [
537
537
  i && c,
538
538
  /* @__PURE__ */ r(
539
- B,
539
+ V,
540
540
  {
541
541
  cssClass: "hover:text-icon-accent-primary",
542
542
  onClick: x,
543
543
  iconBefore: i ? /* @__PURE__ */ r(
544
- ze,
544
+ He,
545
545
  {
546
546
  size: a,
547
- stroke: z.stroke
547
+ stroke: _.stroke
548
548
  }
549
549
  ) : /* @__PURE__ */ r(
550
- He,
550
+ _e,
551
551
  {
552
552
  size: a,
553
- stroke: z.stroke
553
+ stroke: _.stroke
554
554
  }
555
555
  )
556
556
  }
@@ -559,7 +559,7 @@ const kr = "flex flex-col gap-2", Dr = "flex", Ir = "pb-1 mt-2", Rr = {
559
559
  ]
560
560
  }
561
561
  );
562
- }, fn = ({
562
+ }, hn = ({
563
563
  label: e,
564
564
  text: n,
565
565
  children: t,
@@ -567,37 +567,34 @@ const kr = "flex flex-col gap-2", Dr = "flex", Ir = "pb-1 mt-2", Rr = {
567
567
  }) => /* @__PURE__ */ p(
568
568
  "div",
569
569
  {
570
- className: l(
571
- "flex flex-col text-secondary",
572
- t ? "" : "max-w-[200px]"
573
- ),
570
+ className: l("flex flex-col", t ? "" : "max-w-[200px]"),
574
571
  children: [
575
- /* @__PURE__ */ r("label", { className: "dial-tiny mb-2", children: e }),
572
+ /* @__PURE__ */ r("label", { className: "dial-tiny mb-2 text-secondary", children: e }),
576
573
  t || /* @__PURE__ */ p("div", { className: "flex flex-row items-center", children: [
577
- /* @__PURE__ */ r(P, { triggerClassName: "text-primary", tooltip: n, children: n }),
574
+ /* @__PURE__ */ r(O, { triggerClassName: "text-primary", tooltip: n, children: n }),
578
575
  s || null
579
576
  ] })
580
577
  ]
581
578
  }
582
579
  );
583
580
  var oe = /* @__PURE__ */ ((e) => (e.Default = "default", e))(oe || {});
584
- const Lr = {
581
+ const Fr = {
585
582
  [oe.Default]: "border-icon-secondary bg-layer-3"
586
583
  // TODO: Add other variants here once they are finalized with the UI/UX team
587
- }, Sr = ({
584
+ }, Mr = ({
588
585
  tag: e,
589
586
  cssClass: n,
590
587
  remove: t,
591
588
  variant: s = oe.Default
592
589
  }) => {
593
- const a = Lr[s], o = l(
590
+ const a = Fr[s], o = l(
594
591
  "flex items-center gap-1 tiny border rounded p-1 h-[22px] text-primary",
595
592
  n,
596
593
  a
597
594
  );
598
595
  return /* @__PURE__ */ p("div", { className: o, children: [
599
596
  /* @__PURE__ */ r("span", { children: e }),
600
- t && /* @__PURE__ */ r(B, { iconAfter: /* @__PURE__ */ r(Y, { size: 16 }), onClick: t })
597
+ t && /* @__PURE__ */ r(V, { iconAfter: /* @__PURE__ */ r(J, { size: 16 }), onClick: t })
601
598
  ] }, e);
602
599
  }, ve = ({
603
600
  ariaLabel: e,
@@ -605,14 +602,14 @@ const Lr = {
605
602
  size: t = 24,
606
603
  onClose: s
607
604
  }) => /* @__PURE__ */ r(
608
- B,
605
+ V,
609
606
  {
610
607
  ariaLabel: e,
611
608
  cssClass: l("text-secondary hover:text-accent-primary", n),
612
609
  onClick: s,
613
- iconBefore: /* @__PURE__ */ r(Y, { size: t })
610
+ iconBefore: /* @__PURE__ */ r(J, { size: t })
614
611
  }
615
- ), Fr = ({
612
+ ), Pr = ({
616
613
  value: e,
617
614
  textareaId: n,
618
615
  placeholder: t,
@@ -621,7 +618,7 @@ const Lr = {
621
618
  invalid: o,
622
619
  readonly: c,
623
620
  onChange: u
624
- }) => /* @__PURE__ */ r(P, { tooltip: e, triggerClassName: "flex", children: /* @__PURE__ */ r(
621
+ }) => /* @__PURE__ */ r(O, { tooltip: e, triggerClassName: "flex", children: /* @__PURE__ */ r(
625
622
  "textarea",
626
623
  {
627
624
  id: n,
@@ -637,7 +634,7 @@ const Lr = {
637
634
  ),
638
635
  onChange: (d) => !c && u?.(d.currentTarget.value)
639
636
  }
640
- ) }), Mr = [
637
+ ) }), Tr = [
641
638
  "ArrowLeft",
642
639
  "ArrowRight",
643
640
  "ArrowUp",
@@ -649,8 +646,8 @@ const Lr = {
649
646
  "Escape",
650
647
  "Home",
651
648
  "End"
652
- ], Tr = (e, n, t, s) => {
653
- if ((n === "number" || t !== void 0 || s !== void 0) && !Mr.includes(e.key) && !(e.key === "-" && e.currentTarget.selectionStart === 0 && (t === void 0 || t < 0)) && !(e.key === "." && n === "number" && !e.currentTarget.value.includes("."))) {
649
+ ], Ar = (e, n, t, s) => {
650
+ if ((n === "number" || t !== void 0 || s !== void 0) && !Tr.includes(e.key) && !(e.key === "-" && e.currentTarget.selectionStart === 0 && (t === void 0 || t < 0)) && !(e.key === "." && n === "number" && !e.currentTarget.value.includes("."))) {
654
651
  if (!/^[0-9]$/.test(e.key)) {
655
652
  e.preventDefault();
656
653
  return;
@@ -669,7 +666,7 @@ const Lr = {
669
666
  }
670
667
  }
671
668
  }
672
- }, X = ({
669
+ }, q = ({
673
670
  iconBefore: e,
674
671
  iconAfter: n,
675
672
  hideBorder: t,
@@ -680,27 +677,27 @@ const Lr = {
680
677
  containerCssClass: u,
681
678
  tooltipTriggerClassName: d,
682
679
  type: i = "text",
683
- disabled: m,
684
- readonly: f,
680
+ disabled: f,
681
+ readonly: m,
685
682
  invalid: g,
686
683
  onChange: x,
687
684
  min: v,
688
- max: C,
685
+ max: y,
689
686
  prefix: k,
690
687
  suffix: N,
691
688
  textBeforeInput: b,
692
- textAfterInput: y
689
+ textAfterInput: C
693
690
  }) => {
694
- const w = (M) => M.target.blur(), A = i === "number" || v !== void 0 || C !== void 0, H = (M) => {
695
- Tr(M, i, v, C);
696
- }, K = (M) => {
697
- const I = M.currentTarget.value;
698
- if (A && I !== "") {
699
- const V = parseFloat(I);
700
- if (isNaN(V) && I !== "-" && I !== "." || !isNaN(V) && (v !== void 0 && V < v || C !== void 0 && V > C))
691
+ const w = (E) => E.target.blur(), A = i === "number" || v !== void 0 || y !== void 0, P = (E) => {
692
+ Ar(E, i, v, y);
693
+ }, j = (E) => {
694
+ const S = E.currentTarget.value;
695
+ if (A && S !== "") {
696
+ const W = parseFloat(S);
697
+ if (isNaN(W) && S !== "-" && S !== "." || !isNaN(W) && (v !== void 0 && W < v || y !== void 0 && W > y))
701
698
  return;
702
699
  }
703
- x?.(I);
700
+ x?.(S);
704
701
  };
705
702
  return /* @__PURE__ */ p(
706
703
  "div",
@@ -709,15 +706,15 @@ const Lr = {
709
706
  "dial-input-field flex flex-row items-center justify-between py-2",
710
707
  t ? "dial-input-no-border" : "dial-input",
711
708
  g && "dial-input-error",
712
- m && "dial-input-disable",
713
- f && "dial-input-readonly",
709
+ f && "dial-input-disable",
710
+ m && "dial-input-readonly",
714
711
  !b && "pl-3",
715
- !y && "pr-3",
712
+ !C && "pr-3",
716
713
  u
717
714
  ),
718
715
  children: [
719
716
  b && /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
720
- X,
717
+ q,
721
718
  {
722
719
  hideBorder: !0,
723
720
  containerCssClass: "rounded-r-none border-r-0",
@@ -731,9 +728,9 @@ const Lr = {
731
728
  " ",
732
729
  k
733
730
  ] }),
734
- /* @__PURE__ */ r(E, { icon: e }),
731
+ /* @__PURE__ */ r(M, { icon: e }),
735
732
  /* @__PURE__ */ r(
736
- P,
733
+ O,
737
734
  {
738
735
  tooltip: s,
739
736
  triggerClassName: l(d, "flex-1"),
@@ -745,36 +742,36 @@ const Lr = {
745
742
  id: a,
746
743
  placeholder: o,
747
744
  value: s ?? "",
748
- disabled: m,
745
+ disabled: f,
749
746
  className: l("border-0 bg-transparent", c),
750
- onChange: (M) => !f && K?.(M),
751
- onKeyDown: H,
747
+ onChange: (E) => !m && j?.(E),
748
+ onKeyDown: P,
752
749
  onWheel: w,
753
750
  min: v,
754
- max: C
751
+ max: y
755
752
  }
756
753
  )
757
754
  }
758
755
  ),
759
- /* @__PURE__ */ r(E, { icon: n }),
756
+ /* @__PURE__ */ r(M, { icon: n }),
760
757
  N && /* @__PURE__ */ p("p", { className: "text-secondary dial-small", children: [
761
758
  " ",
762
759
  N
763
760
  ] }),
764
- y && /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
765
- X,
761
+ C && /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
762
+ q,
766
763
  {
767
764
  hideBorder: !0,
768
765
  containerCssClass: "rounded-l-none border-l-0",
769
- value: y,
766
+ value: C,
770
767
  disabled: !0,
771
- elementId: y + "textAfter"
768
+ elementId: C + "textAfter"
772
769
  }
773
770
  ) })
774
771
  ]
775
772
  }
776
773
  );
777
- }, Ar = /^0+\.(\d+)?$/, Pr = /^0+/, we = ({
774
+ }, Vr = /^0+\.(\d+)?$/, Or = /^0+/, we = ({
778
775
  fieldTitle: e,
779
776
  errorText: n,
780
777
  optional: t,
@@ -785,40 +782,40 @@ const Lr = {
785
782
  readonly: u,
786
783
  defaultEmptyText: d,
787
784
  min: i,
788
- max: m,
789
- ...f
785
+ max: f,
786
+ ...m
790
787
  }) => /* @__PURE__ */ p("div", { className: l("flex flex-col", c), children: [
791
788
  /* @__PURE__ */ r(
792
- G,
789
+ $,
793
790
  {
794
791
  fieldTitle: e,
795
792
  optional: t,
796
793
  htmlFor: o
797
794
  }
798
795
  ),
799
- u ? /* @__PURE__ */ r("span", { children: f.value || (d ?? "None") }) : /* @__PURE__ */ p(Z, { children: [
796
+ u ? /* @__PURE__ */ r("span", { children: m.value || (d ?? "None") }) : /* @__PURE__ */ p(Z, { children: [
800
797
  /* @__PURE__ */ r(
801
- X,
798
+ q,
802
799
  {
803
800
  elementId: o,
804
801
  cssClass: s,
805
802
  containerCssClass: a,
806
803
  invalid: n != null,
807
804
  min: i,
808
- max: m,
809
- ...f
805
+ max: f,
806
+ ...m
810
807
  }
811
808
  ),
812
- /* @__PURE__ */ r($, { errorText: n })
809
+ /* @__PURE__ */ r(K, { errorText: n })
813
810
  ] })
814
- ] }), hn = ({
811
+ ] }), xn = ({
815
812
  onChange: e,
816
813
  value: n,
817
814
  min: t,
818
815
  max: s,
819
816
  ...a
820
817
  }) => {
821
- const o = (c) => String(c)?.match(Ar) ? String(c)?.replace(Pr, "0") : Number(c);
818
+ const o = (c) => String(c)?.match(Vr) ? String(c)?.replace(Or, "0") : Number(c);
822
819
  return /* @__PURE__ */ r(
823
820
  we,
824
821
  {
@@ -830,7 +827,7 @@ const Lr = {
830
827
  ...a
831
828
  }
832
829
  );
833
- }, xn = ({
830
+ }, gn = ({
834
831
  onChange: e,
835
832
  ...n
836
833
  }) => /* @__PURE__ */ r(
@@ -840,7 +837,7 @@ const Lr = {
840
837
  onChange: (t) => e?.(t),
841
838
  ...n
842
839
  }
843
- ), gn = ({
840
+ ), Cn = ({
844
841
  fieldTitle: e,
845
842
  optional: n,
846
843
  elementId: t,
@@ -849,7 +846,7 @@ const Lr = {
849
846
  ...o
850
847
  }) => /* @__PURE__ */ p("div", { className: "flex flex-col", children: [
851
848
  /* @__PURE__ */ r(
852
- G,
849
+ $,
853
850
  {
854
851
  fieldTitle: e,
855
852
  optional: n,
@@ -857,14 +854,14 @@ const Lr = {
857
854
  }
858
855
  ),
859
856
  /* @__PURE__ */ r(
860
- Fr,
857
+ Pr,
861
858
  {
862
859
  textareaId: t,
863
860
  cssClass: s,
864
861
  ...o
865
862
  }
866
863
  ),
867
- /* @__PURE__ */ r($, { errorText: a })
864
+ /* @__PURE__ */ r(K, { errorText: a })
868
865
  ] }), yn = ({
869
866
  title: e,
870
867
  switchId: n,
@@ -877,7 +874,7 @@ const Lr = {
877
874
  t ? "flex-row-reverse" : "flex-row",
878
875
  s ? "pointer-events-none" : "",
879
876
  s ? t ? "bg-controls-disable" : "bg-layer-4" : t ? "bg-accent-primary" : "bg-layer-4"
880
- ), c = T(
877
+ ), c = R(
881
878
  (u) => {
882
879
  u.stopPropagation(), a?.(!t);
883
880
  },
@@ -907,12 +904,12 @@ const Lr = {
907
904
  e && /* @__PURE__ */ r("span", { className: "pl-2 dial-small text-primary", children: e })
908
905
  ] });
909
906
  };
910
- var O = /* @__PURE__ */ ((e) => (e.Sm = "sm", e.Md = "md", e.Lg = "lg", e))(O || {});
911
- const Vr = "z-[52] flex items-center justify-center bg-blackout md:p-4", jr = "divide-tertiary divide-y", Wr = "flex flex-row justify-between py-4 px-6 items-center", Or = {
912
- [O.Sm]: "dial-sm-popup",
913
- [O.Md]: "dial-md-popup",
914
- [O.Lg]: "dial-lg-popup"
915
- }, Br = ({
907
+ var H = /* @__PURE__ */ ((e) => (e.Sm = "sm", e.Md = "md", e.Lg = "lg", e))(H || {});
908
+ const jr = "z-[52] flex items-center justify-center bg-blackout md:p-4", Wr = "divide-tertiary divide-y", Br = "flex flex-row justify-between py-4 px-6 items-center", zr = {
909
+ [H.Sm]: "dial-sm-popup",
910
+ [H.Md]: "dial-md-popup",
911
+ [H.Lg]: "dial-lg-popup"
912
+ }, Ne = ({
916
913
  open: e = !1,
917
914
  title: n,
918
915
  portalId: t,
@@ -923,14 +920,14 @@ const Vr = "z-[52] flex items-center justify-center bg-blackout md:p-4", jr = "d
923
920
  children: u,
924
921
  footer: d,
925
922
  onClose: i,
926
- size: m = O.Md
923
+ size: f = H.Md
927
924
  }) => {
928
- const { refs: f, context: g } = re({
925
+ const { refs: m, context: g } = re({
929
926
  open: e,
930
927
  onOpenChange: (b) => {
931
928
  b || i?.(null);
932
929
  }
933
- }), x = te(g, { role: "dialog" }), v = ne(g, { outsidePress: !0 }), { getFloatingProps: C } = se([x, v]);
930
+ }), x = te(g, { role: "dialog" }), v = ne(g, { outsidePress: !0 }), { getFloatingProps: y } = se([x, v]);
934
931
  if (!e) return null;
935
932
  const k = typeof n == "string" ? "dial-popup-heading" : void 0, N = (b) => b ? typeof b == "string" ? /* @__PURE__ */ r(
936
933
  "h3",
@@ -940,25 +937,25 @@ const Vr = "z-[52] flex items-center justify-center bg-blackout md:p-4", jr = "d
940
937
  "flex-1 min-w-0 mr-3 truncate dial-h3 text-primary",
941
938
  o
942
939
  ),
943
- children: /* @__PURE__ */ r(P, { tooltip: b, children: b })
940
+ children: /* @__PURE__ */ r(O, { tooltip: b, children: b })
944
941
  }
945
942
  ) : b : /* @__PURE__ */ r("span", {});
946
- return /* @__PURE__ */ r(ae, { id: t, children: /* @__PURE__ */ r(rr, { className: l(Vr, a), children: /* @__PURE__ */ r(ye, { context: g, children: /* @__PURE__ */ p(
943
+ return /* @__PURE__ */ r(ae, { id: t, children: /* @__PURE__ */ r(nr, { className: l(jr, a), children: /* @__PURE__ */ r(Ce, { context: g, children: /* @__PURE__ */ p(
947
944
  "div",
948
945
  {
949
- ref: f.setFloating,
950
- ...C(),
946
+ ref: m.setFloating,
947
+ ...y(),
951
948
  role: "dialog",
952
949
  "aria-modal": "true",
953
950
  "aria-labelledby": k,
954
951
  className: l(
955
952
  "dial-popup",
956
- Or[m],
957
- c && jr,
953
+ zr[f],
954
+ c && Wr,
958
955
  s
959
956
  ),
960
957
  children: [
961
- /* @__PURE__ */ p("div", { className: Wr, children: [
958
+ /* @__PURE__ */ p("div", { className: Br, children: [
962
959
  N(n),
963
960
  /* @__PURE__ */ r(
964
961
  ve,
@@ -974,95 +971,285 @@ const Vr = "z-[52] flex items-center justify-center bg-blackout md:p-4", jr = "d
974
971
  }
975
972
  ) }) }) });
976
973
  };
977
- var q = /* @__PURE__ */ ((e) => (e.Info = "info", e.Danger = "danger", e))(q || {});
978
- const zr = "flex justify-end gap-2 px-6 py-4", Hr = "text-secondary dial-small-150 px-6 py-4", _r = "Cancel", le = {
979
- [q.Info]: {
980
- confirmVariant: S.Primary,
981
- cancelVariant: S.Secondary
974
+ var Q = /* @__PURE__ */ ((e) => (e.Info = "info", e.Danger = "danger", e))(Q || {});
975
+ const Hr = "flex justify-end gap-2 px-6 py-4", _r = "text-secondary dial-small-150 px-6 py-4", $r = "Cancel", le = {
976
+ [Q.Info]: {
977
+ confirmVariant: D.Primary,
978
+ cancelVariant: D.Secondary
982
979
  },
983
- [q.Danger]: {
980
+ [Q.Danger]: {
984
981
  container: "border-t-4 border-error",
985
- confirmVariant: S.Danger,
986
- cancelVariant: S.Secondary
982
+ confirmVariant: D.Danger,
983
+ cancelVariant: D.Secondary
987
984
  }
988
- }, Cn = ({
985
+ }, bn = ({
989
986
  title: e,
990
987
  description: n,
991
988
  descriptionCssClass: t,
992
989
  open: s = !1,
993
990
  confirmLabel: a,
994
- cancelLabel: o = _r,
991
+ cancelLabel: o = $r,
995
992
  isLoading: c = !1,
996
993
  disableConfirmButton: u = !1,
997
994
  cssClass: d,
998
995
  confirmClassName: i,
999
- onClose: m,
1000
- onConfirm: f,
996
+ onClose: f,
997
+ onConfirm: m,
1001
998
  onCancel: g,
1002
999
  children: x,
1003
1000
  dividers: v = !1,
1004
- variant: C = q.Info,
1005
- size: k = O.Sm
1001
+ variant: y = Q.Info,
1002
+ size: k = H.Sm
1006
1003
  }) => {
1007
- const N = c ? null : /* @__PURE__ */ p("div", { className: zr, children: [
1004
+ const N = c ? null : /* @__PURE__ */ p("div", { className: Hr, children: [
1008
1005
  /* @__PURE__ */ r(
1009
- B,
1006
+ V,
1010
1007
  {
1011
- variant: S.Secondary,
1008
+ variant: D.Secondary,
1012
1009
  title: o,
1013
- onClick: () => g ? g() : m?.()
1010
+ onClick: () => g ? g() : f?.()
1014
1011
  }
1015
1012
  ),
1016
1013
  /* @__PURE__ */ r(
1017
- B,
1014
+ V,
1018
1015
  {
1019
- variant: le[C].confirmVariant,
1016
+ variant: le[y].confirmVariant,
1020
1017
  cssClass: i,
1021
1018
  title: a,
1022
1019
  disable: u,
1023
- onClick: () => f()
1020
+ onClick: () => m()
1024
1021
  }
1025
1022
  )
1026
- ] }), b = T(() => c ? /* @__PURE__ */ r("div", { className: "px-6 py-4 h-[120px]", children: /* @__PURE__ */ r(mr, { size: 50 }) }) : x ?? (n ? /* @__PURE__ */ r(
1023
+ ] }), b = R(() => c ? /* @__PURE__ */ r("div", { className: "px-6 py-4 h-[120px]", children: /* @__PURE__ */ r(mr, { size: 50 }) }) : x ?? (n ? /* @__PURE__ */ r(
1027
1024
  "div",
1028
1025
  {
1029
- className: l(Hr, t),
1026
+ className: l(_r, t),
1030
1027
  children: n
1031
1028
  }
1032
1029
  ) : null), [x, n, c, t]);
1033
1030
  return /* @__PURE__ */ r(
1034
- Br,
1031
+ Ne,
1035
1032
  {
1036
1033
  open: s,
1037
1034
  title: e,
1038
- cssClass: l(le[C].container, d),
1035
+ cssClass: l(le[y].container, d),
1039
1036
  dividers: v,
1040
- onClose: () => m?.(),
1037
+ onClose: () => f?.(),
1041
1038
  footer: N,
1042
1039
  size: k,
1043
1040
  children: b()
1044
1041
  }
1045
1042
  );
1046
- }, $r = ({ onClick: e }) => /* @__PURE__ */ r(
1047
- _e,
1043
+ }, ke = ({ selectedItems: e, listCssClass: n, listElementCssClass: t }) => !!e?.length && /* @__PURE__ */ r(
1044
+ "ul",
1045
+ {
1046
+ className: l(
1047
+ "flex-row items-center truncate flex-wrap",
1048
+ "flex gap-x-2 gap-y-1",
1049
+ n
1050
+ ),
1051
+ children: e?.map((s) => /* @__PURE__ */ r(
1052
+ "li",
1053
+ {
1054
+ className: l([
1055
+ "tiny bg-layer-3 rounded p-1 border border-primary max-w-[200px] truncate",
1056
+ t
1057
+ ]),
1058
+ children: /* @__PURE__ */ r(O, { tooltip: s, children: /* @__PURE__ */ r(
1059
+ "button",
1060
+ {
1061
+ "aria-label": "autocomplete-action",
1062
+ type: "button",
1063
+ className: "truncate w-full",
1064
+ children: s
1065
+ }
1066
+ ) })
1067
+ },
1068
+ s
1069
+ ))
1070
+ }
1071
+ ), ie = (e) => /* @__PURE__ */ L.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ L.createElement("path", { d: "M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z", fill: "currentColor" })), Gr = ({
1072
+ children: e,
1073
+ open: n,
1074
+ readonly: t,
1075
+ selectedValue: s,
1076
+ valueCssClasses: a,
1077
+ inputCssClasses: o,
1078
+ onOpen: c,
1079
+ elementId: u,
1080
+ errorText: d,
1081
+ emptyValueText: i
1082
+ }) => {
1083
+ const f = Array.isArray(s) && s.length > 0, m = typeof s == "string" && !!s.trim(), g = f || m ? s : i, x = t ? void 0 : c;
1084
+ return /* @__PURE__ */ p(Z, { children: [
1085
+ f ? /* @__PURE__ */ r("div", { className: "w-full", onClick: x, children: /* @__PURE__ */ p(
1086
+ "div",
1087
+ {
1088
+ className: l(
1089
+ "dial-input px-3 py-2 flex flex-row items-center w-full justify-between",
1090
+ t && "dial-input-disable"
1091
+ ),
1092
+ children: [
1093
+ /* @__PURE__ */ r(ke, { selectedItems: g }),
1094
+ !t && /* @__PURE__ */ r("div", { className: "ml-1", children: /* @__PURE__ */ r(
1095
+ M,
1096
+ {
1097
+ icon: /* @__PURE__ */ r(
1098
+ ie,
1099
+ {
1100
+ role: "img",
1101
+ width: z,
1102
+ height: z
1103
+ }
1104
+ )
1105
+ }
1106
+ ) })
1107
+ ]
1108
+ }
1109
+ ) }) : /* @__PURE__ */ p(Z, { children: [
1110
+ /* @__PURE__ */ r(
1111
+ "button",
1112
+ {
1113
+ type: "button",
1114
+ className: "w-full",
1115
+ onClick: x,
1116
+ "aria-label": "open-popup",
1117
+ id: u,
1118
+ children: /* @__PURE__ */ p(
1119
+ "div",
1120
+ {
1121
+ className: l(
1122
+ "dial-input px-3 py-2 dial-input-field flex flex-row items-center w-full justify-between",
1123
+ o,
1124
+ t && "dial-input-disable",
1125
+ d && "dial-input-error"
1126
+ ),
1127
+ children: [
1128
+ /* @__PURE__ */ r(O, { tooltip: String(g), children: /* @__PURE__ */ r("span", { className: a, children: g }) }),
1129
+ !t && /* @__PURE__ */ r("div", { className: "flex-shrink-0", children: /* @__PURE__ */ r(
1130
+ M,
1131
+ {
1132
+ icon: /* @__PURE__ */ r(
1133
+ ie,
1134
+ {
1135
+ role: "img",
1136
+ width: z,
1137
+ height: z
1138
+ }
1139
+ )
1140
+ }
1141
+ ) })
1142
+ ]
1143
+ }
1144
+ )
1145
+ }
1146
+ ),
1147
+ d && /* @__PURE__ */ r(K, { errorText: d })
1148
+ ] }),
1149
+ n && or(e, document.body)
1150
+ ] });
1151
+ }, vn = ({
1152
+ fieldTitle: e,
1153
+ htmlFor: n,
1154
+ readonly: t,
1155
+ selectedValue: s,
1156
+ radioButtons: a,
1157
+ customInputValue: o,
1158
+ valueCssClasses: c,
1159
+ inputCssClasses: u,
1160
+ emptyValueText: d,
1161
+ onClose: i,
1162
+ title: f,
1163
+ portalId: m,
1164
+ onApply: g,
1165
+ cancelButtonTitle: x = "Cancel",
1166
+ applyButtonTitle: v = "Apply",
1167
+ isValid: y,
1168
+ selectedRadioValue: k,
1169
+ onChangeRadioField: N,
1170
+ id: b
1171
+ }) => {
1172
+ const [C, w] = F(!1), A = R(() => {
1173
+ t || w(!0);
1174
+ }, [t]), P = R(() => {
1175
+ w(!1), i?.();
1176
+ }, [i]), j = R(() => {
1177
+ g(), P();
1178
+ }, [g, P]);
1179
+ return /* @__PURE__ */ p("div", { className: "flex flex-col", children: [
1180
+ /* @__PURE__ */ r($, { fieldTitle: e, htmlFor: n }),
1181
+ /* @__PURE__ */ r(
1182
+ Gr,
1183
+ {
1184
+ readonly: t,
1185
+ open: C,
1186
+ selectedValue: o ?? a.find((E) => E.id === s)?.name,
1187
+ valueCssClasses: c,
1188
+ inputCssClasses: l(u, "py-2", "px-3"),
1189
+ emptyValueText: d,
1190
+ onOpen: A,
1191
+ children: /* @__PURE__ */ r(
1192
+ Ne,
1193
+ {
1194
+ open: C,
1195
+ onClose: P,
1196
+ title: f,
1197
+ portalId: m,
1198
+ footer: /* @__PURE__ */ p("div", { className: "flex flex-row items-center justify-end gap-2 px-6 py-4", children: [
1199
+ /* @__PURE__ */ r(
1200
+ V,
1201
+ {
1202
+ variant: D.Secondary,
1203
+ title: x,
1204
+ onClick: P
1205
+ }
1206
+ ),
1207
+ /* @__PURE__ */ r(
1208
+ V,
1209
+ {
1210
+ variant: D.Primary,
1211
+ title: v,
1212
+ onClick: j,
1213
+ disable: !y
1214
+ }
1215
+ )
1216
+ ] }),
1217
+ children: /* @__PURE__ */ r("div", { className: "px-6 py-4", children: /* @__PURE__ */ r(
1218
+ Sr,
1219
+ {
1220
+ radioButtons: a,
1221
+ labelCssClass: "dial-small",
1222
+ activeRadioButton: k,
1223
+ onChange: N,
1224
+ elementId: b,
1225
+ orientation: X.Column
1226
+ }
1227
+ ) })
1228
+ }
1229
+ )
1230
+ }
1231
+ )
1232
+ ] });
1233
+ }, Kr = ({ onClick: e }) => /* @__PURE__ */ r(
1234
+ $e,
1048
1235
  {
1049
- ...z,
1236
+ ..._,
1050
1237
  className: "text-primary",
1051
1238
  onClick: e
1052
1239
  }
1053
- ), Gr = ({ onClick: e }) => /* @__PURE__ */ r($e, { ...z, className: "text-primary", onClick: e }), Kr = ({ ...e }) => {
1054
- const [n, t] = F(!1), s = T((a) => {
1240
+ ), Ur = ({ onClick: e }) => /* @__PURE__ */ r(Ge, { ..._, className: "text-primary", onClick: e }), Zr = ({ ...e }) => {
1241
+ const [n, t] = F(!1), s = R((a) => {
1055
1242
  t(a);
1056
1243
  }, []);
1057
1244
  return /* @__PURE__ */ r(
1058
- X,
1245
+ q,
1059
1246
  {
1060
1247
  type: n ? "text" : "password",
1061
1248
  ...e,
1062
- iconAfter: n ? /* @__PURE__ */ r($r, { onClick: () => s(!1) }) : /* @__PURE__ */ r(Gr, { onClick: () => s(!0) })
1249
+ iconAfter: n ? /* @__PURE__ */ r(Kr, { onClick: () => s(!1) }) : /* @__PURE__ */ r(Ur, { onClick: () => s(!0) })
1063
1250
  }
1064
1251
  );
1065
- }, bn = ({
1252
+ }, wn = ({
1066
1253
  fieldTitle: e,
1067
1254
  optional: n,
1068
1255
  elementCssClass: t,
@@ -1071,7 +1258,7 @@ const zr = "flex justify-end gap-2 px-6 py-4", Hr = "text-secondary dial-small-1
1071
1258
  ...o
1072
1259
  }) => /* @__PURE__ */ p("div", { className: "flex flex-col", children: [
1073
1260
  /* @__PURE__ */ r(
1074
- G,
1261
+ $,
1075
1262
  {
1076
1263
  fieldTitle: e,
1077
1264
  optional: n,
@@ -1079,7 +1266,7 @@ const zr = "flex justify-end gap-2 px-6 py-4", Hr = "text-secondary dial-small-1
1079
1266
  }
1080
1267
  ),
1081
1268
  /* @__PURE__ */ r(
1082
- Kr,
1269
+ Zr,
1083
1270
  {
1084
1271
  cssClass: t,
1085
1272
  elementId: s,
@@ -1087,23 +1274,23 @@ const zr = "flex justify-end gap-2 px-6 py-4", Hr = "text-secondary dial-small-1
1087
1274
  ...o
1088
1275
  }
1089
1276
  ),
1090
- /* @__PURE__ */ r($, { errorText: a })
1277
+ /* @__PURE__ */ r(K, { errorText: a })
1091
1278
  ] });
1092
- var Q = /* @__PURE__ */ ((e) => (e.Small = "small", e.Base = "base", e))(Q || {});
1093
- const Ur = {
1094
- [Q.Small]: {
1279
+ var Y = /* @__PURE__ */ ((e) => (e.Small = "small", e.Base = "base", e))(Y || {});
1280
+ const Xr = {
1281
+ [Y.Small]: {
1095
1282
  textClass: "text-xs px-1",
1096
1283
  containerClass: "px-[6px] py-1 h-[22px]",
1097
1284
  iconSize: 10,
1098
1285
  iconStroke: 1
1099
1286
  },
1100
- [Q.Base]: {
1287
+ [Y.Base]: {
1101
1288
  textClass: "text-sm px-2",
1102
1289
  containerClass: "px-3 py-2 h-[38px]",
1103
1290
  iconSize: 18,
1104
1291
  iconStroke: 1.5
1105
1292
  }
1106
- }, vn = ({
1293
+ }, Nn = ({
1107
1294
  elementId: e,
1108
1295
  value: n,
1109
1296
  placeholder: t,
@@ -1113,18 +1300,18 @@ const Ur = {
1113
1300
  cssClass: c,
1114
1301
  containerCssClass: u,
1115
1302
  onChange: d,
1116
- size: i = Q.Base
1303
+ size: i = Y.Base
1117
1304
  }) => {
1118
- const [m, f] = F(n || "");
1305
+ const [f, m] = F(n || "");
1119
1306
  ee(() => {
1120
- f(n || "");
1307
+ m(n || "");
1121
1308
  }, [n]);
1122
- const g = T(
1123
- (C) => {
1124
- f(C), d?.(C);
1309
+ const g = R(
1310
+ (y) => {
1311
+ m(y), d?.(y);
1125
1312
  },
1126
1313
  [d]
1127
- ), x = Ur[i], v = T(() => {
1314
+ ), x = Xr[i], v = R(() => {
1128
1315
  g("");
1129
1316
  }, [g]);
1130
1317
  return /* @__PURE__ */ p(
@@ -1140,11 +1327,11 @@ const Ur = {
1140
1327
  ),
1141
1328
  children: [
1142
1329
  /* @__PURE__ */ r(
1143
- E,
1330
+ M,
1144
1331
  {
1145
1332
  className: l(s ? "text-secondary" : "text-primary"),
1146
1333
  icon: /* @__PURE__ */ r(
1147
- Ge,
1334
+ Ke,
1148
1335
  {
1149
1336
  size: x.iconSize,
1150
1337
  stroke: x.iconStroke
@@ -1159,7 +1346,7 @@ const Ur = {
1159
1346
  type: "text",
1160
1347
  autoComplete: "off",
1161
1348
  placeholder: t,
1162
- value: m ?? "",
1349
+ value: f ?? "",
1163
1350
  disabled: s,
1164
1351
  readOnly: a,
1165
1352
  className: l(
@@ -1167,15 +1354,15 @@ const Ur = {
1167
1354
  c,
1168
1355
  x.textClass
1169
1356
  ),
1170
- onChange: (C) => !a && g(C.currentTarget.value)
1357
+ onChange: (y) => !a && g(y.currentTarget.value)
1171
1358
  }
1172
1359
  ),
1173
- m && !a && !s && /* @__PURE__ */ r(
1174
- E,
1360
+ f && !a && !s && /* @__PURE__ */ r(
1361
+ M,
1175
1362
  {
1176
1363
  className: "text-primary cursor-pointer",
1177
1364
  icon: /* @__PURE__ */ r(
1178
- Y,
1365
+ J,
1179
1366
  {
1180
1367
  size: x.iconSize,
1181
1368
  stroke: x.iconStroke,
@@ -1189,115 +1376,7 @@ const Ur = {
1189
1376
  ]
1190
1377
  }
1191
1378
  );
1192
- }, Ne = ({ selectedItems: e, listCssClass: n, listElementCssClass: t }) => !!e?.length && /* @__PURE__ */ r(
1193
- "ul",
1194
- {
1195
- className: l(
1196
- "flex-row items-center truncate flex-wrap",
1197
- "flex gap-x-2 gap-y-1",
1198
- n
1199
- ),
1200
- children: e?.map((s) => /* @__PURE__ */ r(
1201
- "li",
1202
- {
1203
- className: l([
1204
- "tiny bg-layer-3 rounded p-1 border border-primary max-w-[200px] truncate",
1205
- t
1206
- ]),
1207
- children: /* @__PURE__ */ r(P, { tooltip: s, children: /* @__PURE__ */ r(
1208
- "button",
1209
- {
1210
- "aria-label": "autocomplete-action",
1211
- type: "button",
1212
- className: "truncate w-full",
1213
- children: s
1214
- }
1215
- ) })
1216
- },
1217
- s
1218
- ))
1219
- }
1220
- ), ie = (e) => /* @__PURE__ */ R.createElement("svg", { width: 18, height: 18, viewBox: "0 0 18 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, /* @__PURE__ */ R.createElement("path", { d: "M2.25 13.5V12C2.25 11.5858 2.58579 11.25 3 11.25C3.41421 11.25 3.75 11.5858 3.75 12V13.5C3.75 13.6989 3.82907 13.8896 3.96973 14.0303C4.11038 14.1709 4.30109 14.25 4.5 14.25H6C6.41421 14.25 6.75 14.5858 6.75 15C6.75 15.4142 6.41421 15.75 6 15.75H4.5C3.90326 15.75 3.33114 15.5128 2.90918 15.0908C2.48722 14.6689 2.25 14.0967 2.25 13.5ZM14.25 6V4.5C14.25 4.30109 14.1709 4.11038 14.0303 3.96973C13.8896 3.82907 13.6989 3.75 13.5 3.75H12C11.5858 3.75 11.25 3.41421 11.25 3C11.25 2.58579 11.5858 2.25 12 2.25H13.5C14.0967 2.25 14.6689 2.48722 15.0908 2.90918C15.5128 3.33114 15.75 3.90326 15.75 4.5V6C15.75 6.41421 15.4142 6.75 15 6.75C14.5858 6.75 14.25 6.41421 14.25 6Z", fill: "currentColor" })), wn = ({
1221
- children: e,
1222
- open: n,
1223
- readonly: t,
1224
- selectedValue: s,
1225
- valueCssClasses: a,
1226
- inputCssClasses: o,
1227
- onOpen: c,
1228
- elementId: u,
1229
- errorText: d,
1230
- emptyValueText: i
1231
- }) => {
1232
- const m = Array.isArray(s) && s.length > 0, f = typeof s == "string" && !!s.trim(), g = m || f ? s : i, x = t ? void 0 : c;
1233
- return /* @__PURE__ */ p(Z, { children: [
1234
- m ? /* @__PURE__ */ r("div", { className: "w-full", onClick: x, children: /* @__PURE__ */ p(
1235
- "div",
1236
- {
1237
- className: l(
1238
- "dial-input px-3 py-2 flex flex-row items-center w-full justify-between",
1239
- t && "dial-input-disable"
1240
- ),
1241
- children: [
1242
- /* @__PURE__ */ r(Ne, { selectedItems: g }),
1243
- !t && /* @__PURE__ */ r("div", { className: "ml-1", children: /* @__PURE__ */ r(
1244
- E,
1245
- {
1246
- icon: /* @__PURE__ */ r(
1247
- ie,
1248
- {
1249
- role: "img",
1250
- width: W,
1251
- height: W
1252
- }
1253
- )
1254
- }
1255
- ) })
1256
- ]
1257
- }
1258
- ) }) : /* @__PURE__ */ p(Z, { children: [
1259
- /* @__PURE__ */ r(
1260
- "button",
1261
- {
1262
- type: "button",
1263
- className: "w-full",
1264
- onClick: x,
1265
- "aria-label": "open-popup",
1266
- id: u,
1267
- children: /* @__PURE__ */ p(
1268
- "div",
1269
- {
1270
- className: l(
1271
- "dial-input px-3 py-2 dial-input-field flex flex-row items-center w-full justify-between",
1272
- o,
1273
- t && "dial-input-disable",
1274
- d && "dial-input-error"
1275
- ),
1276
- children: [
1277
- /* @__PURE__ */ r(P, { tooltip: String(g), children: /* @__PURE__ */ r("span", { className: a, children: g }) }),
1278
- !t && /* @__PURE__ */ r("div", { className: "flex-shrink-0", children: /* @__PURE__ */ r(
1279
- E,
1280
- {
1281
- icon: /* @__PURE__ */ r(
1282
- ie,
1283
- {
1284
- role: "img",
1285
- width: W,
1286
- height: W
1287
- }
1288
- )
1289
- }
1290
- ) })
1291
- ]
1292
- }
1293
- )
1294
- }
1295
- ),
1296
- d && /* @__PURE__ */ r($, { errorText: d })
1297
- ] }),
1298
- n && ar(e, document.body)
1299
- ] });
1300
- }, Nn = ({
1379
+ }, kn = ({
1301
1380
  placeholder: e = "",
1302
1381
  selectedItems: n = [],
1303
1382
  updateSelected: t,
@@ -1306,14 +1385,14 @@ const Ur = {
1306
1385
  containerCssClass: o,
1307
1386
  inputCssClass: c
1308
1387
  }) => {
1309
- const [u, d] = F(""), i = T(
1310
- (f) => {
1311
- f.key === "Enter" && (t([...n, f.currentTarget.value]), d("")), (f.key === "Backspace" || f.key === "Delete") && n.length && !u && t(n.slice(0, -1));
1388
+ const [u, d] = F(""), i = R(
1389
+ (m) => {
1390
+ m.key === "Enter" && (t([...n, m.currentTarget.value]), d("")), (m.key === "Backspace" || m.key === "Delete") && n.length && !u && t(n.slice(0, -1));
1312
1391
  },
1313
1392
  [n, t, u]
1314
- ), m = T(
1315
- (f) => {
1316
- d(f.target.value);
1393
+ ), f = R(
1394
+ (m) => {
1395
+ d(m.target.value);
1317
1396
  },
1318
1397
  [d]
1319
1398
  );
@@ -1326,7 +1405,7 @@ const Ur = {
1326
1405
  ]),
1327
1406
  children: [
1328
1407
  /* @__PURE__ */ r(
1329
- Ne,
1408
+ ke,
1330
1409
  {
1331
1410
  selectedItems: n,
1332
1411
  listCssClass: s,
@@ -1341,13 +1420,13 @@ const Ur = {
1341
1420
  className: l(["border-0 bg-transparent p-0", c]),
1342
1421
  placeholder: n?.length ? "" : e,
1343
1422
  onKeyDown: i,
1344
- onChange: m
1423
+ onChange: f
1345
1424
  }
1346
1425
  )
1347
1426
  ]
1348
1427
  }
1349
1428
  );
1350
- }, kn = ({
1429
+ }, Dn = ({
1351
1430
  initialTags: e = [],
1352
1431
  fieldTitle: n,
1353
1432
  optional: t,
@@ -1358,29 +1437,29 @@ const Ur = {
1358
1437
  disabled: u,
1359
1438
  onChange: d
1360
1439
  }) => {
1361
- const i = de(null), [m, f] = F(e), [g, x] = F(""), [v, C] = F(!1), k = (y) => {
1362
- const w = y.trim().replace(/,$/, "");
1363
- if (w && !m.includes(w)) {
1364
- const A = [w, ...m];
1365
- f(A), d?.(A);
1440
+ const i = de(null), [f, m] = F(e), [g, x] = F(""), [v, y] = F(!1), k = (C) => {
1441
+ const w = C.trim().replace(/,$/, "");
1442
+ if (w && !f.includes(w)) {
1443
+ const A = [w, ...f];
1444
+ m(A), d?.(A);
1366
1445
  }
1367
- }, N = (y) => {
1368
- (y.key === "," || y.key === "Enter") && (y.preventDefault(), k(g), x(""));
1369
- }, b = (y) => {
1370
- const w = m.filter((A, H) => H !== y);
1371
- f(w), d?.(w);
1446
+ }, N = (C) => {
1447
+ (C.key === "," || C.key === "Enter") && (C.preventDefault(), k(g), x(""));
1448
+ }, b = (C) => {
1449
+ const w = f.filter((A, P) => P !== C);
1450
+ m(w), d?.(w);
1372
1451
  };
1373
1452
  return ee(() => {
1374
- const y = new ResizeObserver(() => {
1453
+ const C = new ResizeObserver(() => {
1375
1454
  if (i.current) {
1376
1455
  const w = i.current.scrollHeight > i.current.clientHeight + 10;
1377
- C(w);
1456
+ y(w);
1378
1457
  }
1379
1458
  });
1380
- return i.current && y.observe(i.current), () => y.disconnect();
1381
- }, [m]), /* @__PURE__ */ p("div", { className: l("flex flex-col w-full"), children: [
1459
+ return i.current && C.observe(i.current), () => C.disconnect();
1460
+ }, [f]), /* @__PURE__ */ p("div", { className: l("flex flex-col w-full"), children: [
1382
1461
  /* @__PURE__ */ r(
1383
- G,
1462
+ $,
1384
1463
  {
1385
1464
  fieldTitle: n,
1386
1465
  optional: t,
@@ -1404,20 +1483,20 @@ const Ur = {
1404
1483
  v ? "flex-col-reverse" : "flex-row"
1405
1484
  ),
1406
1485
  children: [
1407
- m.map((y, w) => /* @__PURE__ */ r(
1408
- Sr,
1486
+ f.map((C, w) => /* @__PURE__ */ r(
1487
+ Mr,
1409
1488
  {
1410
- tag: y,
1489
+ tag: C,
1411
1490
  remove: u ? void 0 : () => b(w)
1412
1491
  },
1413
- y + w
1492
+ C + w
1414
1493
  )),
1415
1494
  /* @__PURE__ */ r(
1416
1495
  "input",
1417
1496
  {
1418
1497
  type: "text",
1419
1498
  value: g,
1420
- onChange: (y) => x(y.target.value),
1499
+ onChange: (C) => x(C.target.value),
1421
1500
  onKeyDown: N,
1422
1501
  className: l(
1423
1502
  "dial-input-no-border outline-none border-none w-full min-w-[100px] flex-1 p-1"
@@ -1431,99 +1510,99 @@ const Ur = {
1431
1510
  )
1432
1511
  }
1433
1512
  ),
1434
- /* @__PURE__ */ r($, { errorText: o })
1513
+ /* @__PURE__ */ r(K, { errorText: o })
1435
1514
  ] });
1436
1515
  };
1437
- var Zr = /* @__PURE__ */ ((e) => (e.Dropdown = "dropdown", e.Menu = "menu", e))(Zr || {}), _ = /* @__PURE__ */ ((e) => (e.Click = "click", e.Hover = "hover", e.ContextMenu = "contextMenu", e))(_ || {}), ke = /* @__PURE__ */ ((e) => (e.Item = "item", e.Divider = "divider", e))(ke || {});
1438
- const Xr = l(
1516
+ var qr = /* @__PURE__ */ ((e) => (e.Dropdown = "dropdown", e.Menu = "menu", e))(qr || {}), G = /* @__PURE__ */ ((e) => (e.Click = "click", e.Hover = "hover", e.ContextMenu = "contextMenu", e))(G || {}), De = /* @__PURE__ */ ((e) => (e.Item = "item", e.Divider = "divider", e))(De || {});
1517
+ const Qr = l(
1439
1518
  "inline-flex items-center gap-2 align-middle",
1440
1519
  "h-auto px-0 bg-transparent border-0"
1441
- ), qr = l(
1520
+ ), Yr = l(
1442
1521
  "z-[53] overflow-auto rounded bg-layer-0 text-primary shadow focus-visible:outline-none",
1443
1522
  "w-max"
1444
- ), Qr = l(
1523
+ ), Jr = l(
1445
1524
  "flex w-full cursor-pointer items-center gap-3",
1446
1525
  "focus-visible:border-none focus-visible:outline-none",
1447
1526
  "hover:bg-accent-primary-alpha px-3",
1448
1527
  "dial-small h-[34px] rounded text-primary"
1449
- ), Yr = "opacity-75 !cursor-not-allowed", Jr = "text-error", en = "my-1 border-t border-hover", U = 8, Dn = ({
1528
+ ), en = "opacity-75 !cursor-not-allowed", rn = "text-error", nn = "my-1 border-t border-hover", U = 8, In = ({
1450
1529
  children: e,
1451
1530
  menu: n,
1452
1531
  renderOverlay: t,
1453
- trigger: s = [_.Click],
1532
+ trigger: s = [G.Click],
1454
1533
  placement: a,
1455
1534
  disabled: o = !1,
1456
1535
  open: c,
1457
1536
  defaultOpen: u = !1,
1458
1537
  onOpenChange: d,
1459
1538
  closable: i = !1,
1460
- onClose: m,
1461
- cssClass: f,
1539
+ onClose: f,
1540
+ cssClass: m,
1462
1541
  listClassName: g,
1463
1542
  outsidePressIgnoreRef: x,
1464
1543
  outsideClosable: v = !0
1465
1544
  }) => {
1466
- const [C, k] = F(u), N = c !== void 0, b = N ? !!c : C, y = T(
1545
+ const [y, k] = F(u), N = c !== void 0, b = N ? !!c : y, C = R(
1467
1546
  (h) => {
1468
1547
  N || k(h), d?.(h);
1469
1548
  },
1470
1549
  [N, d]
1471
- ), w = Qe(), A = (h) => h ? "clientWidth" in h ? h.clientWidth : h.getBoundingClientRect?.()?.width ?? 0 : 0, H = a === void 0, { refs: K, floatingStyles: M, context: I } = re({
1550
+ ), w = Ye(), A = (h) => h ? "clientWidth" in h ? h.clientWidth : h.getBoundingClientRect?.()?.width ?? 0 : 0, P = a === void 0, { refs: j, floatingStyles: E, context: S } = re({
1472
1551
  placement: a,
1473
1552
  open: b,
1474
- onOpenChange: y,
1553
+ onOpenChange: C,
1475
1554
  whileElementsMounted: he,
1476
1555
  middleware: [
1477
1556
  pe({ mainAxis: U, crossAxis: 0 }),
1478
- H ? nr({
1557
+ P ? tr({
1479
1558
  alignment: "start",
1480
1559
  crossAxis: !0,
1481
1560
  padding: U
1482
- }) : me({ padding: U }),
1483
- fe({ padding: U }),
1484
- tr({
1485
- apply({ availableWidth: h, elements: L }) {
1486
- const Te = A(L.reference);
1487
- L.floating.style.setProperty(
1561
+ }) : fe({ padding: U }),
1562
+ me({ padding: U }),
1563
+ sr({
1564
+ apply({ availableWidth: h, elements: T }) {
1565
+ const Te = A(T.reference);
1566
+ T.floating.style.setProperty(
1488
1567
  "--reference-width",
1489
1568
  `${Te}px`
1490
- ), L.floating.style.maxWidth = `${h}px`;
1569
+ ), T.floating.style.maxWidth = `${h}px`;
1491
1570
  }
1492
1571
  })
1493
1572
  ]
1494
- }), V = sr(I, {
1495
- enabled: s.includes(_.Click) && !o
1496
- }), De = xe(I, {
1497
- enabled: s.includes(_.Hover) && !o,
1573
+ }), W = ar(S, {
1574
+ enabled: s.includes(G.Click) && !o
1575
+ }), Ie = xe(S, {
1576
+ enabled: s.includes(G.Hover) && !o,
1498
1577
  move: !1,
1499
1578
  restMs: 40,
1500
1579
  delay: { open: 80, close: 80 }
1501
- }), Ie = ne(I, {
1580
+ }), Re = ne(S, {
1502
1581
  bubbles: !0,
1503
1582
  referencePress: !1,
1504
1583
  outsidePress: (h) => {
1505
1584
  if (!v) return !1;
1506
- const L = h.target;
1507
- return !(x?.current && L instanceof Node && x.current.contains(L));
1585
+ const T = h.target;
1586
+ return !(x?.current && T instanceof Node && x.current.contains(T));
1508
1587
  }
1509
- }), Re = te(I, { role: "menu" }), { getReferenceProps: Ee, getFloatingProps: Le } = se([
1510
- V,
1511
- De,
1588
+ }), Ee = te(S, { role: "menu" }), { getReferenceProps: Se, getFloatingProps: Le } = se([
1589
+ W,
1512
1590
  Ie,
1513
- Re
1514
- ]), Se = (h) => {
1515
- !s.includes(_.ContextMenu) || o || (h.preventDefault(), y(!0));
1591
+ Re,
1592
+ Ee
1593
+ ]), Fe = (h) => {
1594
+ !s.includes(G.ContextMenu) || o || (h.preventDefault(), C(!0));
1516
1595
  };
1517
1596
  ee(() => {
1518
- o && b && y(!1);
1519
- }, [o, b, y]);
1520
- const Fe = (h) => (L) => {
1521
- h.disabled || (h.onClick?.({ key: h.key, domEvent: L }), n?.onClick?.({ key: h.key, domEvent: L }), y(!1));
1522
- }, Me = t ? t() : n && /* @__PURE__ */ r("div", { role: "none", className: "py-1", children: n.items.map((h) => h.type === ke.Divider ? /* @__PURE__ */ r(
1597
+ o && b && C(!1);
1598
+ }, [o, b, C]);
1599
+ const Me = (h) => (T) => {
1600
+ h.disabled || (h.onClick?.({ key: h.key, domEvent: T }), n?.onClick?.({ key: h.key, domEvent: T }), C(!1));
1601
+ }, Pe = t ? t() : n && /* @__PURE__ */ r("div", { role: "none", className: "py-1", children: n.items.map((h) => h.type === De.Divider ? /* @__PURE__ */ r(
1523
1602
  "div",
1524
1603
  {
1525
1604
  role: "separator",
1526
- className: en
1605
+ className: nn
1527
1606
  },
1528
1607
  h.key
1529
1608
  ) : /* @__PURE__ */ p(
@@ -1533,12 +1612,12 @@ const Xr = l(
1533
1612
  type: "button",
1534
1613
  "aria-disabled": !!h.disabled,
1535
1614
  className: l(
1536
- Qr,
1537
- h.disabled && Yr,
1538
- h.danger && Jr
1615
+ Jr,
1616
+ h.disabled && en,
1617
+ h.danger && rn
1539
1618
  ),
1540
1619
  disabled: h.disabled,
1541
- onClick: Fe(h),
1620
+ onClick: Me(h),
1542
1621
  children: [
1543
1622
  h.icon && /* @__PURE__ */ r(
1544
1623
  "span",
@@ -1547,7 +1626,7 @@ const Xr = l(
1547
1626
  h.danger && "text-error",
1548
1627
  h.disabled && "text-secondary"
1549
1628
  ),
1550
- children: /* @__PURE__ */ r(E, { icon: h.icon })
1629
+ children: /* @__PURE__ */ r(M, { icon: h.icon })
1551
1630
  }
1552
1631
  ),
1553
1632
  /* @__PURE__ */ r(
@@ -1569,24 +1648,24 @@ const Xr = l(
1569
1648
  /* @__PURE__ */ r(
1570
1649
  "span",
1571
1650
  {
1572
- ref: K.setReference,
1651
+ ref: j.setReference,
1573
1652
  className: l(
1574
- Xr,
1653
+ Qr,
1575
1654
  o && "!cursor-not-allowed opacity-75",
1576
- f
1655
+ m
1577
1656
  ),
1578
1657
  "aria-haspopup": "menu",
1579
1658
  "aria-expanded": b,
1580
1659
  "aria-controls": w,
1581
- onContextMenu: Se,
1582
- ...Ee(),
1660
+ onContextMenu: Fe,
1661
+ ...Se(),
1583
1662
  children: e
1584
1663
  }
1585
1664
  ),
1586
1665
  b && /* @__PURE__ */ r(ae, { children: /* @__PURE__ */ r(
1587
- ye,
1666
+ Ce,
1588
1667
  {
1589
- context: I,
1668
+ context: S,
1590
1669
  modal: !1,
1591
1670
  initialFocus: -1,
1592
1671
  returnFocus: !0,
@@ -1594,9 +1673,9 @@ const Xr = l(
1594
1673
  "div",
1595
1674
  {
1596
1675
  id: w,
1597
- ref: K.setFloating,
1598
- style: M,
1599
- className: l(qr, g),
1676
+ ref: j.setFloating,
1677
+ style: E,
1678
+ className: l(Yr, g),
1600
1679
  ...Le(),
1601
1680
  children: [
1602
1681
  i && /* @__PURE__ */ r("div", { className: "flex items-center justify-between px-2 pt-2", children: /* @__PURE__ */ r(
@@ -1604,11 +1683,11 @@ const Xr = l(
1604
1683
  {
1605
1684
  ariaLabel: "Close dropdown",
1606
1685
  onClose: (h) => {
1607
- m?.(h), y(!1);
1686
+ f?.(h), C(!1);
1608
1687
  }
1609
1688
  }
1610
1689
  ) }),
1611
- Me
1690
+ Pe
1612
1691
  ]
1613
1692
  }
1614
1693
  )
@@ -1617,45 +1696,46 @@ const Xr = l(
1617
1696
  ] });
1618
1697
  };
1619
1698
  export {
1620
- j as AlertVariant,
1621
- S as ButtonVariant,
1622
- q as ConfirmationPopupVariant,
1623
- ln as DialAlert,
1624
- Nn as DialAutocompleteInput,
1625
- Ne as DialAutocompleteInputValue,
1626
- B as DialButton,
1627
- cn as DialCheckbox,
1699
+ B as AlertVariant,
1700
+ D as ButtonVariant,
1701
+ Q as ConfirmationPopupVariant,
1702
+ dn as DialAlert,
1703
+ kn as DialAutocompleteInput,
1704
+ ke as DialAutocompleteInputValue,
1705
+ V as DialButton,
1706
+ un as DialCheckbox,
1628
1707
  ve as DialCloseButton,
1629
1708
  mn as DialCollapsibleSidebar,
1630
- Cn as DialConfirmationPopup,
1631
- Dn as DialDropdown,
1632
- $ as DialErrorText,
1633
- G as DialFieldLabel,
1634
- E as DialIcon,
1635
- X as DialInput,
1636
- wn as DialInputPopup,
1637
- fn as DialLabelledText,
1709
+ bn as DialConfirmationPopup,
1710
+ In as DialDropdown,
1711
+ K as DialErrorText,
1712
+ $ as DialFieldLabel,
1713
+ M as DialIcon,
1714
+ q as DialInput,
1715
+ Gr as DialInputPopup,
1716
+ hn as DialLabelledText,
1638
1717
  mr as DialLoader,
1639
- pn as DialNoDataContent,
1640
- hn as DialNumberInputField,
1641
- Kr as DialPasswordInput,
1642
- bn as DialPasswordInputField,
1643
- Br as DialPopup,
1644
- Nr as DialRadioButton,
1645
- un as DialRadioGroup,
1646
- vn as DialSearch,
1647
- dn as DialSteps,
1718
+ fn as DialNoDataContent,
1719
+ xn as DialNumberInputField,
1720
+ Zr as DialPasswordInput,
1721
+ wn as DialPasswordInputField,
1722
+ Ne as DialPopup,
1723
+ kr as DialRadioButton,
1724
+ Sr as DialRadioGroup,
1725
+ vn as DialRadioGroupPopupField,
1726
+ Nn as DialSearch,
1727
+ pn as DialSteps,
1648
1728
  yn as DialSwitch,
1649
- Sr as DialTag,
1650
- kn as DialTagInput,
1651
- gn as DialTextAreaField,
1652
- xn as DialTextInputField,
1653
- Fr as DialTextarea,
1654
- P as DialTooltip,
1655
- Zr as DropdownType,
1656
- O as PopupSize,
1657
- J as RadioGroupOrientation,
1658
- Q as SearchSize,
1659
- D as StepStatus,
1729
+ Mr as DialTag,
1730
+ Dn as DialTagInput,
1731
+ Cn as DialTextAreaField,
1732
+ gn as DialTextInputField,
1733
+ Pr as DialTextarea,
1734
+ O as DialTooltip,
1735
+ qr as DropdownType,
1736
+ H as PopupSize,
1737
+ X as RadioGroupOrientation,
1738
+ Y as SearchSize,
1739
+ I as StepStatus,
1660
1740
  oe as TagVariant
1661
1741
  };