@epam/ai-dial-ui-kit 0.2.0-rc.28 → 0.2.0-rc.29

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