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