@webority/ui-react 0.3.0 → 0.4.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/README.md +23 -0
- package/dist/types/components/ActionIcon.d.ts +27 -0
- package/dist/types/components/AppAccordion.d.ts +27 -0
- package/dist/types/components/AppAlert.d.ts +21 -0
- package/dist/types/components/AppAutocomplete.d.ts +48 -0
- package/dist/types/components/AppAvatar.d.ts +13 -0
- package/dist/types/components/AppBadge.d.ts +19 -0
- package/dist/types/components/AppButton.d.ts +13 -0
- package/dist/types/components/AppCallout.d.ts +19 -0
- package/dist/types/components/AppCard.d.ts +29 -0
- package/dist/types/components/AppCheckbox.d.ts +17 -0
- package/dist/types/components/AppChip.d.ts +37 -0
- package/dist/types/components/AppChoiceCard.d.ts +36 -0
- package/dist/types/components/AppChoiceChip.d.ts +24 -0
- package/dist/types/components/AppColorField.d.ts +35 -0
- package/dist/types/components/AppCompareTable.d.ts +32 -0
- package/dist/types/components/AppConfirmDialog.d.ts +27 -0
- package/dist/types/components/AppDataTable.d.ts +46 -0
- package/dist/types/components/AppDatePicker.d.ts +43 -0
- package/dist/types/components/AppDropdown.d.ts +11 -0
- package/dist/types/components/AppEmptyState.d.ts +31 -0
- package/dist/types/components/AppFileAttachment.d.ts +36 -0
- package/dist/types/components/AppFilePicker.d.ts +25 -0
- package/dist/types/components/AppInfoList.d.ts +24 -0
- package/dist/types/components/AppInfoTip.d.ts +4 -0
- package/dist/types/components/AppInput.d.ts +31 -0
- package/dist/types/components/AppKpiTile.d.ts +22 -0
- package/dist/types/components/AppLogoPicker.d.ts +31 -0
- package/dist/types/components/AppModal.d.ts +35 -0
- package/dist/types/components/AppMultiSelect.d.ts +38 -0
- package/dist/types/components/AppPageHeader.d.ts +22 -0
- package/dist/types/components/AppPhoneNumberInput.d.ts +13 -0
- package/dist/types/components/AppPricingCard.d.ts +38 -0
- package/dist/types/components/AppRadio.d.ts +17 -0
- package/dist/types/components/AppRepeater.d.ts +40 -0
- package/dist/types/components/AppResourceCard.d.ts +28 -0
- package/dist/types/components/AppSearch.d.ts +20 -0
- package/dist/types/components/AppSegmented.d.ts +35 -0
- package/dist/types/components/AppSelect.d.ts +19 -0
- package/dist/types/components/AppSelectMini.d.ts +11 -0
- package/dist/types/components/AppShell.d.ts +52 -0
- package/dist/types/components/AppSidebarMenu.d.ts +19 -0
- package/dist/types/components/AppSkeleton.d.ts +21 -0
- package/dist/types/components/AppSpinner.d.ts +17 -0
- package/dist/types/components/AppSplash.d.ts +25 -0
- package/dist/types/components/AppStatusBadge.d.ts +15 -0
- package/dist/types/components/AppStepper.d.ts +35 -0
- package/dist/types/components/AppSwitch.d.ts +17 -0
- package/dist/types/components/AppTableEmptyState.d.ts +15 -0
- package/dist/types/components/AppTablePagination.d.ts +25 -0
- package/dist/types/components/AppTabs.d.ts +30 -0
- package/dist/types/components/AppTextarea.d.ts +22 -0
- package/dist/types/components/AppTimeline.d.ts +26 -0
- package/dist/types/components/Icon.d.ts +7 -0
- package/dist/types/components/ModalIcons.d.ts +33 -0
- package/dist/types/components/RequiredMark.d.ts +7 -0
- package/dist/types/components/toast.d.ts +3 -0
- package/dist/types/index.d.ts +56 -0
- package/dist/types/lib/useListboxMenu.d.ts +46 -0
- package/dist/types/lib/usePagination.d.ts +11 -0
- package/dist/types/lib/usePopover.d.ts +7 -0
- package/dist/types/lib/useTableSort.d.ts +25 -0
- package/dist/ui-react.js +1203 -883
- package/package.json +13 -10
package/dist/ui-react.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import r from "react
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { createPortal as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import k from "react-bootstrap/Nav";
|
|
2
|
+
import { forwardRef as r, useEffect as i, useId as a, useLayoutEffect as o, useRef as s, useState as c } from "react";
|
|
3
|
+
import l from "react-bootstrap/Alert";
|
|
4
|
+
import u from "react-bootstrap/Badge";
|
|
5
|
+
import d from "react-bootstrap/Button";
|
|
6
|
+
import f from "react-bootstrap/Card";
|
|
7
|
+
import p from "react-bootstrap/Form";
|
|
8
|
+
import { createPortal as m } from "react-dom";
|
|
9
|
+
import h from "react-bootstrap/Modal";
|
|
10
|
+
import g from "react-bootstrap/Dropdown";
|
|
11
|
+
import { toast as _ } from "react-toastify";
|
|
12
|
+
import v from "react-bootstrap/Offcanvas";
|
|
13
|
+
import y from "react-bootstrap/Nav";
|
|
15
14
|
//#region src/components/Icon.jsx
|
|
16
|
-
var
|
|
15
|
+
var b = {
|
|
17
16
|
activity: "activity",
|
|
18
17
|
"alert-circle": "exclamation-circle",
|
|
19
18
|
"alert-triangle": "exclamation-triangle",
|
|
@@ -108,7 +107,7 @@ var ee = {
|
|
|
108
107
|
x: "x-lg",
|
|
109
108
|
zap: "lightning-charge"
|
|
110
109
|
};
|
|
111
|
-
function
|
|
110
|
+
function x({ name: e, size: r = 16, className: i, color: a, style: o }) {
|
|
112
111
|
if (e === "hard-hat") return /* @__PURE__ */ t("svg", {
|
|
113
112
|
width: r,
|
|
114
113
|
height: r,
|
|
@@ -131,7 +130,7 @@ function A({ name: e, size: r = 16, className: i, color: a, style: o }) {
|
|
|
131
130
|
}), /* @__PURE__ */ t("path", { d: "M3.2 22.5C3.2 17.4 7.5 14.9 11 14.7L12 17.4l1-2.7C16.5 14.9 20.8 17.4 20.8 22.5z" })]
|
|
132
131
|
})
|
|
133
132
|
});
|
|
134
|
-
let s =
|
|
133
|
+
let s = b[e] || e;
|
|
135
134
|
return s ? /* @__PURE__ */ t("i", {
|
|
136
135
|
className: `bi bi-${s}${i ? ` ${i}` : ""}`,
|
|
137
136
|
"data-icon": e,
|
|
@@ -146,7 +145,7 @@ function A({ name: e, size: r = 16, className: i, color: a, style: o }) {
|
|
|
146
145
|
}
|
|
147
146
|
//#endregion
|
|
148
147
|
//#region src/components/ActionIcon.jsx
|
|
149
|
-
function
|
|
148
|
+
function S({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20, onClick: o, className: s = "", ...c }) {
|
|
150
149
|
return /* @__PURE__ */ t("button", {
|
|
151
150
|
type: "button",
|
|
152
151
|
className: [
|
|
@@ -159,30 +158,96 @@ function te({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
|
|
|
159
158
|
disabled: i,
|
|
160
159
|
onClick: o,
|
|
161
160
|
...c,
|
|
162
|
-
children: /* @__PURE__ */ t(
|
|
161
|
+
children: /* @__PURE__ */ t(x, {
|
|
163
162
|
name: e,
|
|
164
|
-
size: a
|
|
165
|
-
|
|
163
|
+
size: a
|
|
164
|
+
})
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/components/AppAccordion.jsx
|
|
169
|
+
function C({ items: e = [], multiple: r = !1, id: i, className: o = "" }) {
|
|
170
|
+
let s = a(), l = i || s, [u, d] = c(() => {
|
|
171
|
+
let t = e.filter((e) => e.open).map((e, t) => e.key ?? String(t));
|
|
172
|
+
return new Set(r ? t : t.slice(0, 1));
|
|
173
|
+
}), f = (e, t) => e.key ?? String(t), p = (e) => {
|
|
174
|
+
d((t) => {
|
|
175
|
+
let n = new Set(r ? t : []);
|
|
176
|
+
return t.has(e) ? n.delete(e) : n.add(e), n;
|
|
177
|
+
});
|
|
178
|
+
};
|
|
179
|
+
return /* @__PURE__ */ t("div", {
|
|
180
|
+
className: `faq-list${o ? ` ${o}` : ""}`,
|
|
181
|
+
children: e.map((e, r) => {
|
|
182
|
+
let i = f(e, r), a = u.has(i), o = `${l}-${r}`, s = `${o}-q`;
|
|
183
|
+
return /* @__PURE__ */ n("div", {
|
|
184
|
+
className: `faq-item${a ? " open" : ""}`,
|
|
185
|
+
children: [/* @__PURE__ */ n("button", {
|
|
186
|
+
type: "button",
|
|
187
|
+
className: "faq-q",
|
|
188
|
+
id: s,
|
|
189
|
+
"aria-expanded": a,
|
|
190
|
+
"aria-controls": o,
|
|
191
|
+
onClick: () => p(i),
|
|
192
|
+
children: [e.title, /* @__PURE__ */ t("span", {
|
|
193
|
+
className: "faq-q-icon",
|
|
194
|
+
children: /* @__PURE__ */ t(x, {
|
|
195
|
+
name: "chevron-down",
|
|
196
|
+
size: 18
|
|
197
|
+
})
|
|
198
|
+
})]
|
|
199
|
+
}), /* @__PURE__ */ t("section", {
|
|
200
|
+
className: "faq-a-wrap",
|
|
201
|
+
id: o,
|
|
202
|
+
"aria-labelledby": s,
|
|
203
|
+
children: /* @__PURE__ */ t("div", {
|
|
204
|
+
className: "faq-a-inner",
|
|
205
|
+
children: e.content
|
|
206
|
+
})
|
|
207
|
+
})]
|
|
208
|
+
}, i);
|
|
166
209
|
})
|
|
167
210
|
});
|
|
168
211
|
}
|
|
169
212
|
//#endregion
|
|
170
213
|
//#region src/components/AppAlert.jsx
|
|
171
|
-
function
|
|
172
|
-
return /* @__PURE__ */ t(
|
|
214
|
+
function w({ variant: e = "info", children: n, className: r = "", onClose: i, dismissible: a, role: o = "alert", ...s }) {
|
|
215
|
+
return /* @__PURE__ */ t(l, {
|
|
173
216
|
variant: e,
|
|
174
|
-
className:
|
|
175
|
-
onClose:
|
|
176
|
-
dismissible:
|
|
217
|
+
className: r || void 0,
|
|
218
|
+
onClose: i,
|
|
219
|
+
dismissible: a ?? typeof i == "function",
|
|
177
220
|
transition: !1,
|
|
178
|
-
role:
|
|
179
|
-
...
|
|
221
|
+
role: o,
|
|
222
|
+
...s,
|
|
180
223
|
children: n
|
|
181
224
|
});
|
|
182
225
|
}
|
|
183
226
|
//#endregion
|
|
184
227
|
//#region ../elements/dist/ui-elements.js
|
|
185
|
-
var
|
|
228
|
+
var T = {
|
|
229
|
+
success: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-success-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-success-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_success_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-success-active)\"/>\n<rect x=\"108.758\" y=\"67.5986\" width=\"75.5044\" height=\"49.155\" transform=\"rotate(45 108.758 67.5986)\" fill=\"var(--wui-success)\"/>\n<path d=\"M87.895 96.1046C89.7154 97.9249 89.7154 101.046 87.895 102.866L84.1243 106.637C82.3039 108.457 79.1833 108.457 77.3629 106.637L60.8496 89.9934C59.0293 88.173 59.0293 85.0524 60.8496 83.232L64.6204 79.4613C66.4408 77.6409 69.5614 77.6409 71.3817 79.4613L87.895 96.1046Z\" fill=\"white\"/>\n<path d=\"M102.324 67.3672C104.144 65.5469 107.265 65.5469 109.085 67.3672L112.856 71.138C114.676 72.9583 114.676 76.079 112.856 77.8993L84.2499 106.375C82.4296 108.195 79.3089 108.195 77.4886 106.375L73.7178 102.604C71.8975 100.784 71.8975 97.6633 73.7178 95.8429L102.324 67.3672Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_success_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
|
|
230
|
+
error: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_error_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<rect x=\"110.758\" y=\"62\" width=\"75.5044\" height=\"69.9535\" transform=\"rotate(45 110.758 62)\" fill=\"var(--wui-danger-active)\"/>\n<g clip-path=\"url(#wui_error_clip1)\">\n<path d=\"M95.9285 87.0037L112.943 69.9887C114.823 68.1087 114.823 65.0608 112.943 63.1838L110.675 60.9155C108.795 59.0349 105.747 59.0349 103.87 60.9155L86.8552 77.9298L69.8403 60.9119C67.9603 59.032 64.9124 59.032 63.0353 60.9119L60.7635 63.1802C58.8835 65.0608 58.8835 68.1087 60.7635 69.9858L77.7814 87.0037L60.767 104.018C58.8865 105.899 58.8865 108.947 60.767 110.824L63.0353 113.092C64.9153 114.972 67.9632 114.972 69.8403 113.092L86.8552 96.0769L103.87 113.092C105.75 114.972 108.798 114.972 110.675 113.092L112.943 110.824C114.823 108.943 114.823 105.895 112.943 104.018L95.9285 87.0037Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_error_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_error_clip1\"><rect width=\"55\" height=\"55\" fill=\"white\" transform=\"translate(59.3535 59.502)\"/></clipPath></defs>",
|
|
231
|
+
warning: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-warning-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-warning-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_warning_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-warning)\"/>\n<path d=\"M93.7812 60.9731L156.173 123.365L113.082 166.456L60 113.5L97 109L93.7812 60.9731Z\" fill=\"var(--wui-warning-active)\"/>\n<path d=\"M116.145 101.611L96.0431 62.7255C94.8912 60.6967 93.0607 59.1479 90.8656 58.3543C88.6768 57.5543 86.2768 57.5607 84.0945 58.3671C83.0001 58.7767 81.9953 59.3655 81.125 60.1079C80.2545 60.8567 79.5122 61.7527 78.9425 62.7703L57.8933 101.554C56.1525 104.594 56.1717 108.331 57.9317 111.358C59.6981 114.392 62.9427 116.248 66.4435 116.242H107.563C111.051 116.248 114.283 114.398 116.049 111.39C116.952 109.854 117.4 108.133 117.4 106.418C117.4 104.76 116.984 103.102 116.145 101.611ZM87.0064 105.714C85.0672 105.714 83.4929 104.146 83.4929 102.207C83.4929 100.267 85.0672 98.6993 87.0064 98.6993C88.9392 98.6993 90.5136 100.267 90.5136 102.207C90.5136 104.146 88.9392 105.714 87.0064 105.714ZM90.9104 78.098L88.0432 95.3266C88.0049 95.8706 87.5504 96.2994 87.0064 96.2994C86.4561 96.2994 86.0016 95.8706 85.9633 95.3266L83.0961 78.098C83.0385 77.8101 83.0065 77.522 83.0065 77.2405C83.0065 76.3125 83.3137 75.4037 83.8833 74.6485C84.6321 73.6629 85.7713 73.0549 87.0064 72.9717C88.2352 73.0549 89.3744 73.6629 90.1232 74.6485C90.872 75.6341 91.16 76.8885 90.9104 78.098Z\" fill=\"white\"/>\n</g>\n<defs><clipPath id=\"wui_warning_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
|
|
232
|
+
info: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-info-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-info-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_info_clip)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-info)\"/>\n<path d=\"M104.999 67.5L111.454 64L163.495 116.041L115.739 163.797L62.999 111L101.897 104.102L104.999 67.5Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M87 121C105.778 121 121 105.778 121 87C121 68.2223 105.778 53 87 53C68.2223 53 53 68.2223 53 87C53 105.778 68.2223 121 87 121Z\" fill=\"white\"/>\n<path d=\"M87 75.542C89.3472 75.542 91.25 73.6392 91.25 71.292C91.25 68.9448 89.3472 67.042 87 67.042C84.6528 67.042 82.75 68.9448 82.75 71.292C82.75 73.6392 84.6528 75.542 87 75.542Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M86.9992 106.992C86.0975 106.992 85.2327 106.634 84.5951 105.996C83.9574 105.359 83.5992 104.494 83.5992 103.592V86.592C82.6975 86.592 81.8327 86.2338 81.1951 85.5962C80.5574 84.9585 80.1992 84.0937 80.1992 83.192C80.1992 82.2903 80.5574 81.4255 81.1951 80.7878C81.8327 80.1502 82.6975 79.792 83.5992 79.792H86.9992C87.901 79.792 88.7658 80.1502 89.4034 80.7878C90.041 81.4255 90.3992 82.2903 90.3992 83.192V103.592C90.3992 104.494 90.041 105.359 89.4034 105.996C88.7658 106.634 87.901 106.992 86.9992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n<path d=\"M90.3992 106.992H83.5992C82.6975 106.992 81.8327 106.634 81.1951 105.996C80.5574 105.358 80.1992 104.494 80.1992 103.592C80.1992 102.69 80.5574 101.825 81.1951 101.188C81.8327 100.55 82.6975 100.192 83.5992 100.192H90.3992C91.301 100.192 92.1658 100.55 92.8034 101.188C93.441 101.825 93.7992 102.69 93.7992 103.592C93.7992 104.494 93.441 105.358 92.8034 105.996C92.1658 106.634 91.301 106.992 90.3992 106.992Z\" fill=\"var(--wui-info-active)\"/>\n</g>\n<defs><clipPath id=\"wui_info_clip\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath></defs>",
|
|
233
|
+
delete: "<rect width=\"174\" height=\"174\" rx=\"87\" fill=\"var(--wui-danger-5)\"/>\n<rect x=\"24\" y=\"24\" width=\"126\" height=\"126\" rx=\"63\" stroke=\"var(--wui-danger-20)\" stroke-width=\"16\"/>\n<g clip-path=\"url(#wui_delete_clip0)\">\n<rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"var(--wui-danger)\"/>\n<path d=\"M114.529 67.5672L163.249 116.287L116.354 163.183L67.6336 114.463L100.999 81.0975L64.999 77.5L58.999 69.5L114.529 67.5672Z\" fill=\"var(--wui-danger-active)\"/>\n<path d=\"M103.5 79L100.5 105.5L76 113L69.5 83.5L103.5 79Z\" fill=\"var(--wui-danger)\"/>\n<g clip-path=\"url(#wui_delete_clip1)\">\n<path d=\"M113.652 66.9993C108.895 66.5266 104.139 66.1721 99.3522 65.9061V65.8766L98.7022 62.0357C98.259 59.3175 97.609 55.2402 90.6954 55.2402H82.9545C76.0704 55.2402 75.4204 59.1402 74.9477 62.0061L74.3272 65.788C71.5795 65.9652 68.8318 66.1425 66.084 66.4084L60.0568 66.9993C58.8159 67.1175 57.9295 68.2107 58.0477 69.4221C58.1659 70.6334 59.2295 71.5198 60.4704 71.4016L66.4977 70.8107C81.9795 69.2743 97.5795 69.8652 113.239 71.4311C113.327 71.4311 113.386 71.4311 113.475 71.4311C114.598 71.4311 115.573 70.5743 115.691 69.4221C115.779 68.2107 114.893 67.1175 113.652 66.9993Z\" fill=\"white\"/>\n<path d=\"M108.216 75.5971C107.507 74.8585 106.532 74.4448 105.527 74.4448H68.1816C67.177 74.4448 66.1725 74.8585 65.4929 75.5971C64.8134 76.3357 64.4293 77.3403 64.4884 78.3744L66.3202 108.688C66.6452 113.179 67.0588 118.793 77.3702 118.793H96.3384C106.65 118.793 107.063 113.208 107.388 108.688L109.22 78.4039C109.279 77.3403 108.895 76.3357 108.216 75.5971ZM91.7588 103.99H81.9202C80.7088 103.99 79.7043 102.986 79.7043 101.774C79.7043 100.563 80.7088 99.5585 81.9202 99.5585H91.7588C92.9702 99.5585 93.9747 100.563 93.9747 101.774C93.9747 102.986 92.9702 103.99 91.7588 103.99ZM94.2406 92.1721H79.4679C78.2566 92.1721 77.252 91.1676 77.252 89.9562C77.252 88.7448 78.2566 87.7403 79.4679 87.7403H94.2406C95.452 87.7403 96.4566 88.7448 96.4566 89.9562C96.4566 91.1676 95.452 92.1721 94.2406 92.1721Z\" fill=\"white\"/>\n</g>\n</g>\n<defs><clipPath id=\"wui_delete_clip0\"><rect x=\"32\" y=\"32\" width=\"110\" height=\"110\" rx=\"55\" fill=\"white\"/></clipPath><clipPath id=\"wui_delete_clip1\"><rect width=\"65\" height=\"65\" fill=\"white\" transform=\"translate(54.3535 54.502)\"/></clipPath></defs>"
|
|
234
|
+
};
|
|
235
|
+
Object.keys(T);
|
|
236
|
+
var E = class extends HTMLElement {
|
|
237
|
+
static get observedAttributes() {
|
|
238
|
+
return ["tone", "size"];
|
|
239
|
+
}
|
|
240
|
+
connectedCallback() {
|
|
241
|
+
this.render();
|
|
242
|
+
}
|
|
243
|
+
attributeChangedCallback() {
|
|
244
|
+
this.isConnected && this.render();
|
|
245
|
+
}
|
|
246
|
+
render() {
|
|
247
|
+
let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = T[e] || T.info;
|
|
248
|
+
this.innerHTML = `<svg width="${t}" height="${t}" viewBox="0 0 174 174" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${n}</svg>`;
|
|
249
|
+
}
|
|
250
|
+
}, D = class extends HTMLElement {
|
|
186
251
|
static formAssociated = !0;
|
|
187
252
|
static get observedAttributes() {
|
|
188
253
|
return [
|
|
@@ -209,7 +274,7 @@ var re = class extends HTMLElement {
|
|
|
209
274
|
set value(e) {
|
|
210
275
|
this._value = e == null ? "" : String(e), this._internals?.setFormValue(this._value);
|
|
211
276
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
212
|
-
t && (this._label =
|
|
277
|
+
t && (this._label = k(t.label)), this._syncInput();
|
|
213
278
|
}
|
|
214
279
|
set options(e) {
|
|
215
280
|
this._optionsProp = Array.isArray(e) ? e : [], this._renderOptions();
|
|
@@ -251,7 +316,7 @@ var re = class extends HTMLElement {
|
|
|
251
316
|
this.innerHTML = `
|
|
252
317
|
<div class="search-select">
|
|
253
318
|
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false">
|
|
254
|
-
<input class="search-select-input search-select-ac-input" placeholder="${
|
|
319
|
+
<input class="search-select-input search-select-ac-input" placeholder="${O(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
255
320
|
<span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
|
|
256
321
|
<button type="button" class="search-select-clear" aria-label="Clear" hidden><i class="bi bi-x" aria-hidden="true"></i></button>
|
|
257
322
|
</div>
|
|
@@ -289,9 +354,9 @@ var re = class extends HTMLElement {
|
|
|
289
354
|
let t = this._refs();
|
|
290
355
|
if (!t.optionsWrap) return;
|
|
291
356
|
let n = (e ?? (t.input ? t.input.value : "")).trim().toLowerCase(), r = this._readOptions();
|
|
292
|
-
!this._remote && n && (r = r.filter((e) =>
|
|
357
|
+
!this._remote && n && (r = r.filter((e) => k(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
|
|
293
358
|
let t = String(e.value) === String(this._value);
|
|
294
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
359
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${O(e.value)}" aria-selected="${t}">${e.label}</button>`;
|
|
295
360
|
}).join(""), this._active = -1;
|
|
296
361
|
let i = n.length < this._minChars;
|
|
297
362
|
t.hint && (t.hint.hidden = !(this._remote && i && !r.length)), t.empty && (t.empty.hidden = this._loading || r.length > 0 || this._remote && i);
|
|
@@ -312,7 +377,7 @@ var re = class extends HTMLElement {
|
|
|
312
377
|
}, o = () => {
|
|
313
378
|
e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), this._syncInput();
|
|
314
379
|
}, s = (t) => {
|
|
315
|
-
this._value = t.dataset.value, this._label =
|
|
380
|
+
this._value = t.dataset.value, this._label = k(t.innerHTML), this._internals?.setFormValue(this._value), e.input.value = this._label, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.input.focus();
|
|
316
381
|
};
|
|
317
382
|
e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", () => {
|
|
318
383
|
let t = e.input.value;
|
|
@@ -345,7 +410,7 @@ var re = class extends HTMLElement {
|
|
|
345
410
|
disconnectedCallback() {
|
|
346
411
|
this._onDocClick && document.removeEventListener("click", this._onDocClick), clearTimeout(this._timer);
|
|
347
412
|
}
|
|
348
|
-
},
|
|
413
|
+
}, O = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), k = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), A = [
|
|
349
414
|
"January",
|
|
350
415
|
"February",
|
|
351
416
|
"March",
|
|
@@ -358,7 +423,7 @@ var re = class extends HTMLElement {
|
|
|
358
423
|
"October",
|
|
359
424
|
"November",
|
|
360
425
|
"December"
|
|
361
|
-
],
|
|
426
|
+
], ee = [
|
|
362
427
|
"Su",
|
|
363
428
|
"Mo",
|
|
364
429
|
"Tu",
|
|
@@ -366,17 +431,17 @@ var re = class extends HTMLElement {
|
|
|
366
431
|
"Th",
|
|
367
432
|
"Fr",
|
|
368
433
|
"Sa"
|
|
369
|
-
],
|
|
434
|
+
], j = (e) => String(e).padStart(2, "0"), te = (e, t, n) => `${e}-${j(t + 1)}-${j(n)}`, M = (e) => {
|
|
370
435
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
371
436
|
return t ? {
|
|
372
437
|
y: +t[1],
|
|
373
438
|
m: t[2] - 1,
|
|
374
439
|
d: +t[3]
|
|
375
440
|
} : null;
|
|
376
|
-
},
|
|
377
|
-
let t =
|
|
378
|
-
return t ? `${
|
|
379
|
-
},
|
|
441
|
+
}, N = (e) => {
|
|
442
|
+
let t = M(e);
|
|
443
|
+
return t ? `${j(t.d)} ${A[t.m].slice(0, 3)} ${t.y}` : "";
|
|
444
|
+
}, ne = class extends HTMLElement {
|
|
380
445
|
static formAssociated = !0;
|
|
381
446
|
static get observedAttributes() {
|
|
382
447
|
return [
|
|
@@ -406,11 +471,11 @@ var re = class extends HTMLElement {
|
|
|
406
471
|
}
|
|
407
472
|
render() {
|
|
408
473
|
this._value = this.getAttribute("value") || this._value;
|
|
409
|
-
let e = this.getAttribute("placeholder") || "Enter Date", t =
|
|
474
|
+
let e = this.getAttribute("placeholder") || "Enter Date", t = M(this._value);
|
|
410
475
|
t && (this._viewY = t.y, this._viewM = t.m), this.innerHTML = `
|
|
411
476
|
<div class="datepicker">
|
|
412
477
|
<button type="button" class="input datepicker-trigger" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
413
|
-
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ?
|
|
478
|
+
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? N(this._value) : e}</span>
|
|
414
479
|
<i class="bi bi-calendar3" aria-hidden="true"></i>
|
|
415
480
|
</button>
|
|
416
481
|
<div class="datepicker-pop" role="dialog" hidden></div>
|
|
@@ -422,26 +487,26 @@ var re = class extends HTMLElement {
|
|
|
422
487
|
_syncTrigger() {
|
|
423
488
|
let e = this.querySelector("[data-trigger-label]");
|
|
424
489
|
if (!e) return;
|
|
425
|
-
let t =
|
|
426
|
-
e.textContent = t ?
|
|
490
|
+
let t = M(this._value);
|
|
491
|
+
e.textContent = t ? N(this._value) : this.getAttribute("placeholder") || "Enter Date", e.classList.toggle("search-select-placeholder", !t);
|
|
427
492
|
}
|
|
428
493
|
_renderMonth() {
|
|
429
|
-
let e = this.querySelector(".datepicker-pop"), t = new Date(this._viewY, this._viewM, 1).getDay(), n = new Date(this._viewY, this._viewM + 1, 0).getDate(), r =
|
|
494
|
+
let e = this.querySelector(".datepicker-pop"), t = new Date(this._viewY, this._viewM, 1).getDay(), n = new Date(this._viewY, this._viewM + 1, 0).getDate(), r = M(this._value), i = M(this.getAttribute("min")), a = M(this.getAttribute("max")), o = (e, t, n) => {
|
|
430
495
|
let r = new Date(e, t, n).getTime();
|
|
431
496
|
return !!(i && r < new Date(i.y, i.m, i.d).getTime() || a && r > new Date(a.y, a.m, a.d).getTime());
|
|
432
497
|
}, s = "";
|
|
433
498
|
for (let e = 0; e < t; e++) s += "<span class=\"datepicker-day is-outside\"></span>";
|
|
434
499
|
for (let e = 1; e <= n; e++) {
|
|
435
|
-
let t =
|
|
500
|
+
let t = te(this._viewY, this._viewM, e), n = r && r.y === this._viewY && r.m === this._viewM && r.d === e, i = o(this._viewY, this._viewM, e);
|
|
436
501
|
s += `<button type="button" class="datepicker-day${n ? " selected" : ""}" data-iso="${t}"${i ? " disabled" : ""}>${e}</button>`;
|
|
437
502
|
}
|
|
438
503
|
e.innerHTML = `
|
|
439
504
|
<div class="datepicker-head">
|
|
440
505
|
<button type="button" class="datepicker-nav-btn" data-nav="-1" aria-label="Previous month"><i class="bi bi-chevron-left" aria-hidden="true"></i></button>
|
|
441
|
-
<span class="datepicker-month">${
|
|
506
|
+
<span class="datepicker-month">${A[this._viewM]} ${this._viewY}</span>
|
|
442
507
|
<button type="button" class="datepicker-nav-btn" data-nav="1" aria-label="Next month"><i class="bi bi-chevron-right" aria-hidden="true"></i></button>
|
|
443
508
|
</div>
|
|
444
|
-
<div class="datepicker-weekdays">${
|
|
509
|
+
<div class="datepicker-weekdays">${ee.map((e) => `<span>${e}</span>`).join("")}</div>
|
|
445
510
|
<div class="datepicker-grid">${s}</div>
|
|
446
511
|
<div class="datepicker-foot"><button type="button" class="datepicker-link" data-clear>Clear</button></div>`;
|
|
447
512
|
}
|
|
@@ -474,7 +539,7 @@ var re = class extends HTMLElement {
|
|
|
474
539
|
disconnectedCallback() {
|
|
475
540
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
476
541
|
}
|
|
477
|
-
},
|
|
542
|
+
}, re = class extends HTMLElement {
|
|
478
543
|
static formAssociated = !0;
|
|
479
544
|
static get observedAttributes() {
|
|
480
545
|
return [
|
|
@@ -537,7 +602,7 @@ var re = class extends HTMLElement {
|
|
|
537
602
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
538
603
|
</div>
|
|
539
604
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" aria-multiselectable="true" tabindex="-1" hidden>
|
|
540
|
-
${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${
|
|
605
|
+
${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${P(t)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
|
|
541
606
|
<div class="search-select-options"></div>
|
|
542
607
|
<div class="search-select-empty" hidden>No matches</div>
|
|
543
608
|
</div>
|
|
@@ -548,18 +613,18 @@ var re = class extends HTMLElement {
|
|
|
548
613
|
if (!e) return;
|
|
549
614
|
let t = this.getAttribute("placeholder") || "Select…";
|
|
550
615
|
if (!this._values.length) {
|
|
551
|
-
e.innerHTML = `<span class="search-select-placeholder">${
|
|
616
|
+
e.innerHTML = `<span class="search-select-placeholder">${ie(t)}</span>`;
|
|
552
617
|
return;
|
|
553
618
|
}
|
|
554
|
-
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelFor(e)}</span><button type="button" class="chip-remove" data-remove="${
|
|
619
|
+
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelFor(e)}</span><button type="button" class="chip-remove" data-remove="${P(e)}" aria-label="Remove"><i class="bi bi-x" aria-hidden="true"></i></button></span>`).join("");
|
|
555
620
|
}
|
|
556
621
|
_renderOptions(e) {
|
|
557
622
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
558
623
|
if (!t) return;
|
|
559
624
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
560
|
-
r && (i = i.filter((e) =>
|
|
625
|
+
r && (i = i.filter((e) => ae(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
|
|
561
626
|
let t = this._values.includes(String(e.value));
|
|
562
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
627
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${P(e.value)}" aria-selected="${t}"><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span><span class="ms-opt-label">${e.label}</span></button>`;
|
|
563
628
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1;
|
|
564
629
|
}
|
|
565
630
|
_wire() {
|
|
@@ -616,7 +681,7 @@ var re = class extends HTMLElement {
|
|
|
616
681
|
disconnectedCallback() {
|
|
617
682
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
618
683
|
}
|
|
619
|
-
},
|
|
684
|
+
}, P = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), ie = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<"), ae = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), F = [
|
|
620
685
|
[
|
|
621
686
|
"AF",
|
|
622
687
|
"Afghanistan",
|
|
@@ -1842,11 +1907,11 @@ var re = class extends HTMLElement {
|
|
|
1842
1907
|
"Zimbabwe",
|
|
1843
1908
|
"263"
|
|
1844
1909
|
]
|
|
1845
|
-
],
|
|
1910
|
+
], I = (e) => (F.find((t) => t[0] === e) || [
|
|
1846
1911
|
"",
|
|
1847
1912
|
"",
|
|
1848
1913
|
""
|
|
1849
|
-
])[2],
|
|
1914
|
+
])[2], L = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, oe = class extends HTMLElement {
|
|
1850
1915
|
static formAssociated = !0;
|
|
1851
1916
|
static get observedAttributes() {
|
|
1852
1917
|
return [
|
|
@@ -1866,7 +1931,7 @@ var re = class extends HTMLElement {
|
|
|
1866
1931
|
this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
|
|
1867
1932
|
}
|
|
1868
1933
|
get value() {
|
|
1869
|
-
return `+${
|
|
1934
|
+
return `+${I(this._country)}${this._national}`;
|
|
1870
1935
|
}
|
|
1871
1936
|
set value(e) {
|
|
1872
1937
|
this._national = String(e ?? "").replace(/[^0-9]/g, ""), this._commit();
|
|
@@ -1877,21 +1942,21 @@ var re = class extends HTMLElement {
|
|
|
1877
1942
|
render() {
|
|
1878
1943
|
let e = this.getAttribute("placeholder") || "Enter phone number";
|
|
1879
1944
|
this._country = this.getAttribute("country") || this._country;
|
|
1880
|
-
let t =
|
|
1945
|
+
let t = F.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${L(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
|
|
1881
1946
|
this.innerHTML = `
|
|
1882
1947
|
<div class="phone-input-wrap">
|
|
1883
1948
|
<div class="phone-country-adornment">
|
|
1884
1949
|
<button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
1885
|
-
<span class="${
|
|
1950
|
+
<span class="${L(this._country)}" data-flag aria-hidden="true"></span>
|
|
1886
1951
|
<i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
|
|
1887
|
-
<span class="phone-dial" data-dial>+${
|
|
1952
|
+
<span class="phone-dial" data-dial>+${I(this._country)}</span>
|
|
1888
1953
|
</button>
|
|
1889
1954
|
<div class="country-dropdown-menu" role="listbox" hidden>
|
|
1890
1955
|
<div class="dropdown-search-wrapper"><span class="dropdown-search-icon"><i class="bi bi-search" aria-hidden="true"></i></span><input type="text" class="dropdown-search-input" placeholder="Search country or code" aria-label="Search countries" /></div>
|
|
1891
1956
|
<div class="country-list-scroll">${t}<div class="country-empty" hidden>No countries found</div></div>
|
|
1892
1957
|
</div>
|
|
1893
1958
|
</div>
|
|
1894
|
-
<input type="tel" class="input" placeholder="${
|
|
1959
|
+
<input type="tel" class="input" placeholder="${R(e)}" value="${R(this._national)}"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
1895
1960
|
</div>`, this._rendered = !0, this._wire();
|
|
1896
1961
|
}
|
|
1897
1962
|
_wire() {
|
|
@@ -1916,7 +1981,7 @@ var re = class extends HTMLElement {
|
|
|
1916
1981
|
}
|
|
1917
1982
|
i && (i.hidden = n > 0);
|
|
1918
1983
|
}, p = (e) => {
|
|
1919
|
-
this._country = e, this.setAttribute("country", e), o && (o.className =
|
|
1984
|
+
this._country = e, this.setAttribute("country", e), o && (o.className = L(e)), s && (s.textContent = `+${I(e)}`);
|
|
1920
1985
|
for (let t of r.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
|
|
1921
1986
|
d(), this._commit();
|
|
1922
1987
|
};
|
|
@@ -1932,7 +1997,7 @@ var re = class extends HTMLElement {
|
|
|
1932
1997
|
disconnectedCallback() {
|
|
1933
1998
|
this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
1934
1999
|
}
|
|
1935
|
-
},
|
|
2000
|
+
}, R = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), se = class extends HTMLElement {
|
|
1936
2001
|
static formAssociated = !0;
|
|
1937
2002
|
static get observedAttributes() {
|
|
1938
2003
|
return [
|
|
@@ -1983,7 +2048,7 @@ var re = class extends HTMLElement {
|
|
|
1983
2048
|
i && (this._value = String(i.value)), this._internals?.setFormValue(this._value);
|
|
1984
2049
|
let a = e.map((e) => {
|
|
1985
2050
|
let t = String(e.value) === String(this._value);
|
|
1986
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
2051
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${z(e.value)}" aria-selected="${t}">${e.label}</button>`;
|
|
1987
2052
|
}).join("");
|
|
1988
2053
|
this.innerHTML = `
|
|
1989
2054
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}">
|
|
@@ -1992,7 +2057,7 @@ var re = class extends HTMLElement {
|
|
|
1992
2057
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
1993
2058
|
</button>
|
|
1994
2059
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
|
|
1995
|
-
${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${
|
|
2060
|
+
${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${z(r)}" aria-autocomplete="list" /><button type="button" class="search-select-clear" aria-label="Clear search" hidden><i class="bi bi-x" aria-hidden="true"></i></button></div>` : ""}
|
|
1996
2061
|
<div class="search-select-options">${a}<div class="search-select-empty" hidden>No matches</div></div>
|
|
1997
2062
|
</div>
|
|
1998
2063
|
</div>`, this._rendered = !0, this._wire();
|
|
@@ -2071,44 +2136,85 @@ var re = class extends HTMLElement {
|
|
|
2071
2136
|
disconnectedCallback() {
|
|
2072
2137
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
2073
2138
|
}
|
|
2074
|
-
},
|
|
2139
|
+
}, z = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), B = "image/png,image/jpeg,image/webp", ce = {
|
|
2140
|
+
"image/png": [".png"],
|
|
2141
|
+
"image/jpeg": [".jpg", ".jpeg"],
|
|
2142
|
+
"image/webp": [".webp"],
|
|
2143
|
+
"image/gif": [".gif"],
|
|
2144
|
+
"image/svg+xml": [".svg"],
|
|
2145
|
+
"application/pdf": [".pdf"]
|
|
2146
|
+
}, le = {
|
|
2147
|
+
"image/png": "PNG",
|
|
2148
|
+
"image/jpeg": "JPG",
|
|
2149
|
+
"image/webp": "WEBP",
|
|
2150
|
+
"image/gif": "GIF",
|
|
2151
|
+
"image/svg+xml": "SVG",
|
|
2152
|
+
"application/pdf": "PDF",
|
|
2153
|
+
".png": "PNG",
|
|
2154
|
+
".jpg": "JPG",
|
|
2155
|
+
".jpeg": "JPG",
|
|
2156
|
+
".webp": "WEBP",
|
|
2157
|
+
".gif": "GIF",
|
|
2158
|
+
".svg": "SVG",
|
|
2159
|
+
".pdf": "PDF"
|
|
2160
|
+
}, V = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
2161
|
+
function ue(e) {
|
|
2162
|
+
let t = [];
|
|
2163
|
+
for (let n of V(e)) {
|
|
2164
|
+
let e = le[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
2165
|
+
t.includes(e) || t.push(e);
|
|
2166
|
+
}
|
|
2167
|
+
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
2168
|
+
}
|
|
2169
|
+
function de(e, t) {
|
|
2170
|
+
let n = V(t);
|
|
2171
|
+
if (!n.length) return !0;
|
|
2172
|
+
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
2173
|
+
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (ce[e] || []).some((e) => i.endsWith(e)));
|
|
2174
|
+
}
|
|
2175
|
+
function H(e, t = {}) {
|
|
2176
|
+
if (!e) return null;
|
|
2177
|
+
let n = t.accept === void 0 ? B : t.accept, r = t.maxSizeMb || 5;
|
|
2178
|
+
return de(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${ue(n)} file.`;
|
|
2179
|
+
}
|
|
2180
|
+
var U = (e, t) => {
|
|
2075
2181
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
2076
2182
|
};
|
|
2077
|
-
function
|
|
2078
|
-
|
|
2183
|
+
function fe() {
|
|
2184
|
+
U("wui-select", se), U("wui-phone", oe), U("wui-datepicker", ne), U("wui-autocomplete", D), U("wui-multiselect", re), U("wui-status-icon", E);
|
|
2079
2185
|
}
|
|
2080
|
-
|
|
2186
|
+
fe();
|
|
2081
2187
|
//#endregion
|
|
2082
2188
|
//#region src/components/RequiredMark.jsx
|
|
2083
|
-
function
|
|
2084
|
-
return /* @__PURE__ */
|
|
2189
|
+
function W() {
|
|
2190
|
+
return /* @__PURE__ */ t("span", {
|
|
2085
2191
|
className: "required",
|
|
2086
2192
|
"aria-hidden": "true",
|
|
2087
|
-
children:
|
|
2193
|
+
children: "*"
|
|
2088
2194
|
});
|
|
2089
2195
|
}
|
|
2090
2196
|
//#endregion
|
|
2091
2197
|
//#region src/components/AppAutocomplete.jsx
|
|
2092
|
-
function
|
|
2093
|
-
let v =
|
|
2094
|
-
return
|
|
2198
|
+
function pe({ value: e, onChange: r, options: a, loadOptions: o, placeholder: c = "Search…", minChars: l, debounce: u, disabled: d = !1, name: f, label: p, error: m, hint: h, required: g = !1, fieldClassName: _ = "" }) {
|
|
2199
|
+
let v = s(null), y = typeof o == "function";
|
|
2200
|
+
return i(() => {
|
|
2095
2201
|
let e = v.current;
|
|
2096
|
-
e && !y && (e.options =
|
|
2097
|
-
}, [
|
|
2202
|
+
e && !y && (e.options = a || []);
|
|
2203
|
+
}, [a, y]), i(() => {
|
|
2098
2204
|
let t = v.current;
|
|
2099
2205
|
t && t.value !== (e ?? "") && (t.value = e ?? "");
|
|
2100
|
-
}, [e]),
|
|
2206
|
+
}, [e]), i(() => {
|
|
2101
2207
|
let e = v.current;
|
|
2102
2208
|
if (!e) return;
|
|
2103
2209
|
let t = () => r?.(e.value);
|
|
2104
2210
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
2105
|
-
}, [r]),
|
|
2211
|
+
}, [r]), i(() => {
|
|
2106
2212
|
let e = v.current;
|
|
2107
2213
|
if (!e || !y) return;
|
|
2108
2214
|
let t = !1, n = async (n) => {
|
|
2109
2215
|
e.loading = !0;
|
|
2110
2216
|
try {
|
|
2111
|
-
let r = await
|
|
2217
|
+
let r = await o(n.detail.query);
|
|
2112
2218
|
t || (e.options = r || []);
|
|
2113
2219
|
} finally {
|
|
2114
2220
|
t || (e.loading = !1);
|
|
@@ -2117,21 +2223,21 @@ function me({ value: e, onChange: r, options: i, loadOptions: a, placeholder: s
|
|
|
2117
2223
|
return e.addEventListener("search", n), () => {
|
|
2118
2224
|
t = !0, e.removeEventListener("search", n);
|
|
2119
2225
|
};
|
|
2120
|
-
}, [y,
|
|
2226
|
+
}, [y, o]), /* @__PURE__ */ n("div", {
|
|
2121
2227
|
className: `field${_ ? ` ${_}` : ""}`,
|
|
2122
2228
|
children: [
|
|
2123
2229
|
p && /* @__PURE__ */ n("label", {
|
|
2124
2230
|
className: "label",
|
|
2125
2231
|
htmlFor: f,
|
|
2126
|
-
children: [p, g && /* @__PURE__ */ t(
|
|
2232
|
+
children: [p, g && /* @__PURE__ */ t(W, {})]
|
|
2127
2233
|
}),
|
|
2128
2234
|
/* @__PURE__ */ t("wui-autocomplete", {
|
|
2129
2235
|
id: f,
|
|
2130
2236
|
ref: v,
|
|
2131
2237
|
name: f,
|
|
2132
|
-
placeholder:
|
|
2238
|
+
placeholder: c,
|
|
2133
2239
|
remote: y ? "" : void 0,
|
|
2134
|
-
"min-chars":
|
|
2240
|
+
"min-chars": l == null ? void 0 : String(l),
|
|
2135
2241
|
debounce: u == null ? void 0 : String(u),
|
|
2136
2242
|
disabled: d ? "" : void 0
|
|
2137
2243
|
}),
|
|
@@ -2147,13 +2253,13 @@ function me({ value: e, onChange: r, options: i, loadOptions: a, placeholder: s
|
|
|
2147
2253
|
}
|
|
2148
2254
|
//#endregion
|
|
2149
2255
|
//#region src/components/AppAvatar.jsx
|
|
2150
|
-
function
|
|
2256
|
+
function me(e) {
|
|
2151
2257
|
let t = (e || "").trim();
|
|
2152
2258
|
if (!t) return "?";
|
|
2153
2259
|
let n = t.split(/\s+/).filter(Boolean);
|
|
2154
2260
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
2155
2261
|
}
|
|
2156
|
-
function
|
|
2262
|
+
function he({ name: e, src: n, className: r = "" }) {
|
|
2157
2263
|
let i = ["avatar", r].filter(Boolean).join(" ");
|
|
2158
2264
|
return n ? /* @__PURE__ */ t("span", {
|
|
2159
2265
|
className: i,
|
|
@@ -2166,13 +2272,13 @@ function ge({ name: e, src: n, className: r = "" }) {
|
|
|
2166
2272
|
className: i,
|
|
2167
2273
|
role: "img",
|
|
2168
2274
|
"aria-label": e,
|
|
2169
|
-
children:
|
|
2275
|
+
children: me(e)
|
|
2170
2276
|
});
|
|
2171
2277
|
}
|
|
2172
2278
|
//#endregion
|
|
2173
2279
|
//#region src/components/AppBadge.jsx
|
|
2174
|
-
function
|
|
2175
|
-
return /* @__PURE__ */ t(
|
|
2280
|
+
function ge({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
2281
|
+
return /* @__PURE__ */ t(u, {
|
|
2176
2282
|
bg: !1,
|
|
2177
2283
|
className: [
|
|
2178
2284
|
n ? `badge-${n}` : "",
|
|
@@ -2185,18 +2291,25 @@ function _e({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
|
2185
2291
|
}
|
|
2186
2292
|
//#endregion
|
|
2187
2293
|
//#region src/components/AppButton.jsx
|
|
2188
|
-
var
|
|
2294
|
+
var _e = {
|
|
2189
2295
|
primary: "primary",
|
|
2190
2296
|
secondary: "secondary",
|
|
2191
2297
|
outline: "outline-primary",
|
|
2192
2298
|
ghost: "link",
|
|
2193
2299
|
danger: "danger"
|
|
2194
2300
|
};
|
|
2195
|
-
function
|
|
2196
|
-
|
|
2197
|
-
|
|
2301
|
+
function G(e, n) {
|
|
2302
|
+
return e ? typeof e == "string" ? /* @__PURE__ */ t(x, {
|
|
2303
|
+
name: e,
|
|
2304
|
+
size: 16,
|
|
2305
|
+
className: n === "left" ? "me-2" : "ms-2"
|
|
2306
|
+
}) : e : null;
|
|
2307
|
+
}
|
|
2308
|
+
function K({ children: e, variant: r = "primary", size: i = "md", type: a = "button", loading: o = !1, disabled: s = !1, block: c = !1, leftIcon: l = null, rightIcon: u = null, className: f = "", ...p }) {
|
|
2309
|
+
let m = [c ? "w-100" : "", f].filter(Boolean).join(" ");
|
|
2310
|
+
return /* @__PURE__ */ n(d, {
|
|
2198
2311
|
type: a,
|
|
2199
|
-
variant:
|
|
2312
|
+
variant: _e[r] ?? "primary",
|
|
2200
2313
|
size: i === "md" ? void 0 : i,
|
|
2201
2314
|
disabled: s || o,
|
|
2202
2315
|
className: m || void 0,
|
|
@@ -2206,23 +2319,37 @@ function W({ children: e, variant: r = "primary", size: i = "md", type: a = "but
|
|
|
2206
2319
|
className: "spinner-border spinner-border-sm me-2",
|
|
2207
2320
|
"aria-hidden": "true"
|
|
2208
2321
|
}),
|
|
2209
|
-
!o && l,
|
|
2322
|
+
!o && G(l, "left"),
|
|
2210
2323
|
e,
|
|
2211
|
-
!o && u
|
|
2324
|
+
!o && G(u, "right")
|
|
2212
2325
|
]
|
|
2213
2326
|
});
|
|
2214
2327
|
}
|
|
2215
2328
|
//#endregion
|
|
2329
|
+
//#region src/components/AppCallout.jsx
|
|
2330
|
+
function ve({ children: e, icon: r = "info", className: i = "" }) {
|
|
2331
|
+
return /* @__PURE__ */ n("div", {
|
|
2332
|
+
className: `info-callout${i ? ` ${i}` : ""}`,
|
|
2333
|
+
children: [r && /* @__PURE__ */ t("span", {
|
|
2334
|
+
className: "info-callout-icon",
|
|
2335
|
+
children: /* @__PURE__ */ t(x, {
|
|
2336
|
+
name: r,
|
|
2337
|
+
size: 18
|
|
2338
|
+
})
|
|
2339
|
+
}), /* @__PURE__ */ t("div", { children: e })]
|
|
2340
|
+
});
|
|
2341
|
+
}
|
|
2342
|
+
//#endregion
|
|
2216
2343
|
//#region src/components/AppCard.jsx
|
|
2217
|
-
function ye({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body:
|
|
2344
|
+
function ye({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body: p = !0, lifted: m = !1, ...h }) {
|
|
2218
2345
|
let g = a != null || r != null || o != null || s != null;
|
|
2219
|
-
return /* @__PURE__ */ n(
|
|
2346
|
+
return /* @__PURE__ */ n(f, {
|
|
2220
2347
|
className: [m ? "card-lifted" : "", l].filter(Boolean).join(" ") || void 0,
|
|
2221
2348
|
...h,
|
|
2222
|
-
children: [g && /* @__PURE__ */ t(
|
|
2349
|
+
children: [g && /* @__PURE__ */ t(f.Header, {
|
|
2223
2350
|
className: d || void 0,
|
|
2224
2351
|
children: a ?? /* @__PURE__ */ n(e, { children: [
|
|
2225
|
-
r != null && /* @__PURE__ */ t(
|
|
2352
|
+
r != null && /* @__PURE__ */ t(f.Title, {
|
|
2226
2353
|
as: "div",
|
|
2227
2354
|
className: i || void 0,
|
|
2228
2355
|
children: r
|
|
@@ -2230,7 +2357,7 @@ function ye({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
|
|
|
2230
2357
|
o,
|
|
2231
2358
|
s
|
|
2232
2359
|
] })
|
|
2233
|
-
}),
|
|
2360
|
+
}), p ? /* @__PURE__ */ t(f.Body, {
|
|
2234
2361
|
className: u || void 0,
|
|
2235
2362
|
children: c
|
|
2236
2363
|
}) : c]
|
|
@@ -2238,17 +2365,17 @@ function ye({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
|
|
|
2238
2365
|
}
|
|
2239
2366
|
//#endregion
|
|
2240
2367
|
//#region src/components/AppCheckbox.jsx
|
|
2241
|
-
var be =
|
|
2242
|
-
let l =
|
|
2368
|
+
var be = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
2369
|
+
let l = a(), u = r || i || l;
|
|
2243
2370
|
return /* @__PURE__ */ n("div", {
|
|
2244
|
-
className: `form-check${
|
|
2371
|
+
className: `form-check${o ? ` ${o}` : ""}`,
|
|
2245
2372
|
children: [/* @__PURE__ */ t("input", {
|
|
2246
2373
|
type: "checkbox",
|
|
2247
2374
|
className: "form-check-input",
|
|
2248
2375
|
id: u,
|
|
2249
2376
|
name: i,
|
|
2250
2377
|
ref: c,
|
|
2251
|
-
...
|
|
2378
|
+
...s
|
|
2252
2379
|
}), e != null && /* @__PURE__ */ t("label", {
|
|
2253
2380
|
className: "form-check-label",
|
|
2254
2381
|
htmlFor: u,
|
|
@@ -2275,10 +2402,9 @@ function xe({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
2275
2402
|
}) : c
|
|
2276
2403
|
}) : s ? /* @__PURE__ */ t("span", {
|
|
2277
2404
|
className: "chip-ic",
|
|
2278
|
-
children: /* @__PURE__ */ t(
|
|
2405
|
+
children: /* @__PURE__ */ t(x, {
|
|
2279
2406
|
name: s,
|
|
2280
|
-
size: o === "sm" ? 12 : 14
|
|
2281
|
-
variant: "Linear"
|
|
2407
|
+
size: o === "sm" ? 12 : 14
|
|
2282
2408
|
})
|
|
2283
2409
|
}) : null;
|
|
2284
2410
|
return /* @__PURE__ */ n("span", {
|
|
@@ -2301,19 +2427,18 @@ function xe({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
2301
2427
|
onClick: l,
|
|
2302
2428
|
disabled: d,
|
|
2303
2429
|
"aria-label": f || (typeof m == "string" ? `Remove ${m}` : "Remove"),
|
|
2304
|
-
children: /* @__PURE__ */ t(
|
|
2430
|
+
children: /* @__PURE__ */ t(x, {
|
|
2305
2431
|
name: "x",
|
|
2306
|
-
size: o === "sm" ? 12 : 14
|
|
2307
|
-
variant: "Linear"
|
|
2432
|
+
size: o === "sm" ? 12 : 14
|
|
2308
2433
|
})
|
|
2309
2434
|
})]
|
|
2310
2435
|
});
|
|
2311
2436
|
}
|
|
2312
2437
|
//#endregion
|
|
2313
2438
|
//#region src/components/AppChoiceCard.jsx
|
|
2314
|
-
function Se({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon: c, iconNode: l, iconSize: u = 18, image: d, imageAlt: f = "", children: p, title: m, description: h, checkIcon: g = "check", checkSize: _ = 12,
|
|
2439
|
+
function Se({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon: c, iconNode: l, iconSize: u = 18, image: d, imageAlt: f = "", children: p, title: m, description: h, checkIcon: g = "check", checkSize: _ = 12, className: v = "" }) {
|
|
2315
2440
|
return /* @__PURE__ */ n("label", {
|
|
2316
|
-
className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${
|
|
2441
|
+
className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
2317
2442
|
children: [
|
|
2318
2443
|
/* @__PURE__ */ t("input", {
|
|
2319
2444
|
type: i ? "checkbox" : "radio",
|
|
@@ -2332,7 +2457,7 @@ function Se({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2332
2457
|
})
|
|
2333
2458
|
}) : l || c ? /* @__PURE__ */ t("span", {
|
|
2334
2459
|
className: "struct-card-ic",
|
|
2335
|
-
children: l || /* @__PURE__ */ t(
|
|
2460
|
+
children: l || /* @__PURE__ */ t(x, {
|
|
2336
2461
|
name: c,
|
|
2337
2462
|
size: u
|
|
2338
2463
|
})
|
|
@@ -2349,10 +2474,9 @@ function Se({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2349
2474
|
}),
|
|
2350
2475
|
/* @__PURE__ */ t("span", {
|
|
2351
2476
|
className: "struct-card-check",
|
|
2352
|
-
children: /* @__PURE__ */ t(
|
|
2477
|
+
children: /* @__PURE__ */ t(x, {
|
|
2353
2478
|
name: g,
|
|
2354
|
-
size: _
|
|
2355
|
-
variant: v
|
|
2479
|
+
size: _
|
|
2356
2480
|
})
|
|
2357
2481
|
})
|
|
2358
2482
|
]
|
|
@@ -2360,23 +2484,112 @@ function Se({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2360
2484
|
}
|
|
2361
2485
|
//#endregion
|
|
2362
2486
|
//#region src/components/AppChoiceChip.jsx
|
|
2363
|
-
function Ce({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c,
|
|
2487
|
+
function Ce({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "" }) {
|
|
2364
2488
|
return /* @__PURE__ */ n("label", {
|
|
2365
|
-
className: `choice-chip${o ? " checked" : ""}${
|
|
2366
|
-
children: [
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2489
|
+
className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
|
|
2490
|
+
children: [
|
|
2491
|
+
/* @__PURE__ */ t("input", {
|
|
2492
|
+
type: e ? "checkbox" : "radio",
|
|
2493
|
+
name: i,
|
|
2494
|
+
value: a,
|
|
2495
|
+
checked: o,
|
|
2496
|
+
onChange: s
|
|
2497
|
+
}),
|
|
2498
|
+
/* @__PURE__ */ t("span", { children: r ?? c }),
|
|
2499
|
+
l != null && /* @__PURE__ */ t("span", {
|
|
2500
|
+
className: "count",
|
|
2501
|
+
children: l
|
|
2502
|
+
})
|
|
2503
|
+
]
|
|
2504
|
+
});
|
|
2505
|
+
}
|
|
2506
|
+
//#endregion
|
|
2507
|
+
//#region src/components/AppColorField.jsx
|
|
2508
|
+
function we({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: o, hint: s, name: c, id: l, disabled: u = !1, className: d = "" }) {
|
|
2509
|
+
let f = l || c;
|
|
2510
|
+
return /* @__PURE__ */ n("div", {
|
|
2511
|
+
className: `field${d ? ` ${d}` : ""}`,
|
|
2512
|
+
children: [
|
|
2513
|
+
i && /* @__PURE__ */ n("label", {
|
|
2514
|
+
className: "label",
|
|
2515
|
+
htmlFor: f,
|
|
2516
|
+
children: [i, a && /* @__PURE__ */ t(W, {})]
|
|
2517
|
+
}),
|
|
2518
|
+
/* @__PURE__ */ n("div", {
|
|
2519
|
+
className: "color-field",
|
|
2520
|
+
children: [/* @__PURE__ */ t("input", {
|
|
2521
|
+
type: "color",
|
|
2522
|
+
className: "color-field-swatch",
|
|
2523
|
+
value: ((e) => /^#[0-9a-f]{6}$/i.test(e))(e) ? e : "#000000",
|
|
2524
|
+
onChange: (e) => r?.(e.target.value),
|
|
2525
|
+
disabled: u,
|
|
2526
|
+
"aria-label": `${i || "Colour"} — colour picker`,
|
|
2527
|
+
tabIndex: -1
|
|
2528
|
+
}), /* @__PURE__ */ t("input", {
|
|
2529
|
+
type: "text",
|
|
2530
|
+
className: `input color-field-hex${o ? " error" : ""}`,
|
|
2531
|
+
id: f,
|
|
2532
|
+
name: c,
|
|
2533
|
+
value: e,
|
|
2534
|
+
onChange: (e) => r?.(e.target.value),
|
|
2535
|
+
placeholder: "#4F46E5",
|
|
2536
|
+
spellCheck: !1,
|
|
2537
|
+
maxLength: 7,
|
|
2538
|
+
required: a,
|
|
2539
|
+
disabled: u,
|
|
2540
|
+
"aria-invalid": o ? "true" : "false"
|
|
2541
|
+
})]
|
|
2542
|
+
}),
|
|
2543
|
+
o ? /* @__PURE__ */ t("div", {
|
|
2544
|
+
className: "field-error",
|
|
2545
|
+
children: o
|
|
2546
|
+
}) : s ? /* @__PURE__ */ t("div", {
|
|
2547
|
+
className: "field-hint",
|
|
2548
|
+
children: s
|
|
2549
|
+
}) : null
|
|
2550
|
+
]
|
|
2551
|
+
});
|
|
2552
|
+
}
|
|
2553
|
+
//#endregion
|
|
2554
|
+
//#region src/components/AppCompareTable.jsx
|
|
2555
|
+
function Te({ columns: e = [], rows: r = [], caption: i, className: a = "" }) {
|
|
2556
|
+
let o = (e) => e === !0 ? /* @__PURE__ */ t("span", {
|
|
2557
|
+
className: "compare-yes",
|
|
2558
|
+
children: /* @__PURE__ */ t(x, {
|
|
2559
|
+
name: "check",
|
|
2560
|
+
size: 16
|
|
2561
|
+
})
|
|
2562
|
+
}) : e === !1 ? /* @__PURE__ */ t("span", {
|
|
2563
|
+
className: "compare-no",
|
|
2564
|
+
children: "—"
|
|
2565
|
+
}) : e;
|
|
2566
|
+
return /* @__PURE__ */ t("div", {
|
|
2567
|
+
className: `compare-table${a ? ` ${a}` : ""}`,
|
|
2568
|
+
children: /* @__PURE__ */ n("table", { children: [
|
|
2569
|
+
i && /* @__PURE__ */ t("caption", {
|
|
2570
|
+
className: "visually-hidden",
|
|
2571
|
+
children: i
|
|
2572
|
+
}),
|
|
2573
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { children: e.map((e) => /* @__PURE__ */ t("th", {
|
|
2574
|
+
scope: "col",
|
|
2575
|
+
className: e.highlight ? "is-highlight" : void 0,
|
|
2576
|
+
children: e.label
|
|
2577
|
+
}, e.label)) }) }),
|
|
2578
|
+
/* @__PURE__ */ t("tbody", { children: r.map((r, i) => /* @__PURE__ */ n("tr", { children: [/* @__PURE__ */ t("th", {
|
|
2579
|
+
scope: "row",
|
|
2580
|
+
children: r.label
|
|
2581
|
+
}), r.values.map((n, r) => /* @__PURE__ */ t("td", {
|
|
2582
|
+
className: e[r + 1]?.highlight ? "is-highlight" : void 0,
|
|
2583
|
+
children: o(n)
|
|
2584
|
+
}, e[r + 1]?.label ?? r))] }, r.key ?? `${r.label}-${i}`)) })
|
|
2585
|
+
] })
|
|
2373
2586
|
});
|
|
2374
2587
|
}
|
|
2375
2588
|
//#endregion
|
|
2376
2589
|
//#region src/components/AppInfoTip.jsx
|
|
2377
|
-
function
|
|
2378
|
-
let [i,
|
|
2379
|
-
return
|
|
2590
|
+
function q({ label: e, children: r }) {
|
|
2591
|
+
let [i, l] = c(!1), [u, d] = c(null), f = s(null), p = s(null), h = a();
|
|
2592
|
+
return o(() => {
|
|
2380
2593
|
if (!i || !f.current || !p.current) return;
|
|
2381
2594
|
let e = f.current.getBoundingClientRect(), t = p.current.offsetWidth, n = p.current.offsetHeight, r = e.left + e.width / 2 - t / 2;
|
|
2382
2595
|
r = Math.max(8, Math.min(r, window.innerWidth - t - 8));
|
|
@@ -2387,33 +2600,32 @@ function G({ label: e, children: r }) {
|
|
|
2387
2600
|
});
|
|
2388
2601
|
}, [i]), r ? /* @__PURE__ */ n("span", {
|
|
2389
2602
|
className: "infotip",
|
|
2390
|
-
onMouseLeave: () =>
|
|
2603
|
+
onMouseLeave: () => l(!1),
|
|
2391
2604
|
children: [/* @__PURE__ */ t("button", {
|
|
2392
2605
|
type: "button",
|
|
2393
2606
|
ref: f,
|
|
2394
2607
|
className: "infotip-btn",
|
|
2395
2608
|
"aria-label": e,
|
|
2396
2609
|
"aria-expanded": i,
|
|
2397
|
-
"aria-describedby": i ?
|
|
2398
|
-
onMouseEnter: () =>
|
|
2399
|
-
onClick: () =>
|
|
2400
|
-
onFocus: () =>
|
|
2401
|
-
onBlur: () =>
|
|
2402
|
-
children: /* @__PURE__ */ t(
|
|
2610
|
+
"aria-describedby": i ? h : void 0,
|
|
2611
|
+
onMouseEnter: () => l(!0),
|
|
2612
|
+
onClick: () => l((e) => !e),
|
|
2613
|
+
onFocus: () => l(!0),
|
|
2614
|
+
onBlur: () => l(!1),
|
|
2615
|
+
children: /* @__PURE__ */ t(x, {
|
|
2403
2616
|
name: "info",
|
|
2404
|
-
size: 16
|
|
2405
|
-
variant: "Bulk"
|
|
2617
|
+
size: 16
|
|
2406
2618
|
})
|
|
2407
|
-
}), i &&
|
|
2619
|
+
}), i && m(/* @__PURE__ */ t("span", {
|
|
2408
2620
|
ref: p,
|
|
2409
2621
|
className: "infotip-pop is-portal",
|
|
2410
2622
|
role: "tooltip",
|
|
2411
|
-
id:
|
|
2623
|
+
id: h,
|
|
2412
2624
|
style: {
|
|
2413
2625
|
position: "fixed",
|
|
2414
|
-
top:
|
|
2415
|
-
left:
|
|
2416
|
-
visibility:
|
|
2626
|
+
top: u ? u.top : 0,
|
|
2627
|
+
left: u ? u.left : 0,
|
|
2628
|
+
visibility: u ? "visible" : "hidden"
|
|
2417
2629
|
},
|
|
2418
2630
|
children: r
|
|
2419
2631
|
}), document.body)]
|
|
@@ -2421,84 +2633,81 @@ function G({ label: e, children: r }) {
|
|
|
2421
2633
|
}
|
|
2422
2634
|
//#endregion
|
|
2423
2635
|
//#region src/components/AppInput.jsx
|
|
2424
|
-
var
|
|
2425
|
-
let [
|
|
2636
|
+
var J = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type: l = "text", leftIcon: u, rightIcon: d, onRightIconClick: f, unit: m, id: h, name: g, className: _ = "", fieldClassName: v = "", disabled: y = !1, ...b }, S) {
|
|
2637
|
+
let [C, w] = c(!1), T = h || g, E = l === "password", D = E && C ? "text" : l, O = [
|
|
2426
2638
|
"input",
|
|
2427
2639
|
i ? "error" : "",
|
|
2428
|
-
|
|
2429
|
-
|
|
2640
|
+
E ? "pw" : "",
|
|
2641
|
+
m ? "num-input" : "",
|
|
2430
2642
|
_
|
|
2431
|
-
].filter(Boolean).join(" "),
|
|
2432
|
-
id:
|
|
2643
|
+
].filter(Boolean).join(" "), k = /* @__PURE__ */ t(p.Control, {
|
|
2644
|
+
id: T,
|
|
2433
2645
|
name: g,
|
|
2434
|
-
type:
|
|
2435
|
-
className:
|
|
2646
|
+
type: D,
|
|
2647
|
+
className: O,
|
|
2436
2648
|
disabled: y,
|
|
2437
2649
|
required: r,
|
|
2438
2650
|
"aria-invalid": i ? "true" : "false",
|
|
2439
|
-
ref:
|
|
2651
|
+
ref: S,
|
|
2440
2652
|
...b
|
|
2441
|
-
}),
|
|
2442
|
-
return
|
|
2653
|
+
}), A;
|
|
2654
|
+
return A = m ? /* @__PURE__ */ n("div", {
|
|
2443
2655
|
className: "input-with-unit",
|
|
2444
|
-
children: [
|
|
2656
|
+
children: [k, /* @__PURE__ */ t("span", {
|
|
2445
2657
|
className: "unit",
|
|
2446
|
-
children:
|
|
2658
|
+
children: m
|
|
2447
2659
|
})]
|
|
2448
|
-
}) :
|
|
2660
|
+
}) : E ? /* @__PURE__ */ n("div", {
|
|
2449
2661
|
className: "input-wrap",
|
|
2450
|
-
children: [
|
|
2662
|
+
children: [k, /* @__PURE__ */ t("button", {
|
|
2451
2663
|
type: "button",
|
|
2452
2664
|
className: "pw-toggle",
|
|
2453
|
-
onClick: () =>
|
|
2454
|
-
"aria-label":
|
|
2665
|
+
onClick: () => w((e) => !e),
|
|
2666
|
+
"aria-label": C ? "Hide password" : "Show password",
|
|
2455
2667
|
tabIndex: -1,
|
|
2456
|
-
children: /* @__PURE__ */ t(
|
|
2457
|
-
name:
|
|
2458
|
-
size: 18
|
|
2459
|
-
variant: "Linear"
|
|
2668
|
+
children: /* @__PURE__ */ t(x, {
|
|
2669
|
+
name: C ? "eye-off" : "eye",
|
|
2670
|
+
size: 18
|
|
2460
2671
|
})
|
|
2461
2672
|
})]
|
|
2462
2673
|
}) : d ? /* @__PURE__ */ n("div", {
|
|
2463
2674
|
className: "input-wrap",
|
|
2464
|
-
children: [
|
|
2675
|
+
children: [k, /* @__PURE__ */ t("button", {
|
|
2465
2676
|
type: "button",
|
|
2466
2677
|
className: "pw-toggle",
|
|
2467
2678
|
onClick: f,
|
|
2468
2679
|
disabled: !f,
|
|
2469
2680
|
tabIndex: -1,
|
|
2470
|
-
children: /* @__PURE__ */ t(
|
|
2681
|
+
children: /* @__PURE__ */ t(x, {
|
|
2471
2682
|
name: d,
|
|
2472
|
-
size: 18
|
|
2473
|
-
variant: "Linear"
|
|
2683
|
+
size: 18
|
|
2474
2684
|
})
|
|
2475
2685
|
})]
|
|
2476
|
-
}) :
|
|
2686
|
+
}) : u ? /* @__PURE__ */ n("div", {
|
|
2477
2687
|
className: "input-icon",
|
|
2478
2688
|
children: [/* @__PURE__ */ t("span", {
|
|
2479
2689
|
className: "ic",
|
|
2480
|
-
children: /* @__PURE__ */ t(
|
|
2481
|
-
name:
|
|
2482
|
-
size: 16
|
|
2483
|
-
variant: "Linear"
|
|
2690
|
+
children: /* @__PURE__ */ t(x, {
|
|
2691
|
+
name: u,
|
|
2692
|
+
size: 16
|
|
2484
2693
|
})
|
|
2485
|
-
}),
|
|
2486
|
-
}) :
|
|
2694
|
+
}), k]
|
|
2695
|
+
}) : k, /* @__PURE__ */ n(p.Group, {
|
|
2487
2696
|
className: `field${v ? ` ${v}` : ""}`,
|
|
2488
2697
|
children: [
|
|
2489
|
-
e && /* @__PURE__ */ n(
|
|
2698
|
+
e && /* @__PURE__ */ n(p.Label, {
|
|
2490
2699
|
className: "label",
|
|
2491
|
-
htmlFor:
|
|
2700
|
+
htmlFor: T,
|
|
2492
2701
|
children: [
|
|
2493
2702
|
e,
|
|
2494
|
-
o && /* @__PURE__ */ t(
|
|
2703
|
+
o && /* @__PURE__ */ t(q, {
|
|
2495
2704
|
label: s,
|
|
2496
2705
|
children: o
|
|
2497
2706
|
}),
|
|
2498
|
-
r && /* @__PURE__ */ t(
|
|
2707
|
+
r && /* @__PURE__ */ t(W, {})
|
|
2499
2708
|
]
|
|
2500
2709
|
}),
|
|
2501
|
-
|
|
2710
|
+
A,
|
|
2502
2711
|
i ? /* @__PURE__ */ t("div", {
|
|
2503
2712
|
className: "field-error",
|
|
2504
2713
|
children: i
|
|
@@ -2508,62 +2717,64 @@ var K = i(function({ label: e, required: r = !1, error: i, hint: a, help: o, hel
|
|
|
2508
2717
|
}) : null
|
|
2509
2718
|
]
|
|
2510
2719
|
});
|
|
2511
|
-
}),
|
|
2512
|
-
function
|
|
2513
|
-
let
|
|
2720
|
+
}), Ee = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
|
|
2721
|
+
function Y({ open: e, title: r, subtitle: a, headerIcon: o, onClose: c, footer: l, size: u, wide: d = !1, side: f = !1, maxWidth: p, hideHeader: m = !1, className: g = "", children: _ }) {
|
|
2722
|
+
let v = s(null);
|
|
2723
|
+
i(() => {
|
|
2514
2724
|
if (!e) return;
|
|
2515
|
-
let t =
|
|
2516
|
-
|
|
2517
|
-
let n = () => Array.from(t.querySelectorAll
|
|
2518
|
-
(t.querySelector
|
|
2519
|
-
}, [
|
|
2725
|
+
let t = v.current?.closest(".modal-content");
|
|
2726
|
+
if (!t) return;
|
|
2727
|
+
let n = () => Array.from(t.querySelectorAll(Ee));
|
|
2728
|
+
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("lx-modal-close")) || n()[0] || t).focus?.();
|
|
2729
|
+
}, [e]);
|
|
2730
|
+
let y = ["lx-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), b = [
|
|
2520
2731
|
"lx-modal",
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2732
|
+
d ? "lx-modal-wide" : "",
|
|
2733
|
+
f ? "lx-modal-side" : "",
|
|
2734
|
+
g
|
|
2524
2735
|
].filter(Boolean).join(" ");
|
|
2525
|
-
return /* @__PURE__ */ n(
|
|
2736
|
+
return /* @__PURE__ */ n(h, {
|
|
2526
2737
|
show: e,
|
|
2527
|
-
onHide:
|
|
2738
|
+
onHide: c,
|
|
2528
2739
|
animation: !1,
|
|
2529
2740
|
backdrop: !0,
|
|
2530
2741
|
keyboard: !0,
|
|
2531
2742
|
autoFocus: !1,
|
|
2532
2743
|
enforceFocus: !0,
|
|
2533
2744
|
restoreFocus: !0,
|
|
2534
|
-
|
|
2535
|
-
|
|
2745
|
+
size: u,
|
|
2746
|
+
centered: !f,
|
|
2747
|
+
className: y,
|
|
2748
|
+
style: p == null ? void 0 : { "--lx-modal-max-width": typeof p == "number" ? `${p}px` : p },
|
|
2536
2749
|
dialogClassName: "lx-rb-dialog",
|
|
2537
|
-
contentClassName:
|
|
2750
|
+
contentClassName: b,
|
|
2538
2751
|
backdropClassName: "lx-modal-dim",
|
|
2539
|
-
onEntered: h,
|
|
2540
2752
|
"aria-label": typeof r == "string" ? r : void 0,
|
|
2541
2753
|
children: [
|
|
2542
|
-
!
|
|
2754
|
+
!m && /* @__PURE__ */ n("div", {
|
|
2543
2755
|
className: "lx-modal-header",
|
|
2544
2756
|
children: [/* @__PURE__ */ n("div", {
|
|
2545
2757
|
className: "lx-modal-heading",
|
|
2546
2758
|
children: [o && /* @__PURE__ */ t("span", {
|
|
2547
2759
|
className: "lx-modal-headicon",
|
|
2548
|
-
children: /* @__PURE__ */ t(
|
|
2760
|
+
children: /* @__PURE__ */ t(x, {
|
|
2549
2761
|
name: o,
|
|
2550
|
-
size: 18
|
|
2551
|
-
variant: "Bulk"
|
|
2762
|
+
size: 18
|
|
2552
2763
|
})
|
|
2553
2764
|
}), /* @__PURE__ */ n("div", {
|
|
2554
2765
|
className: "lx-modal-headtext",
|
|
2555
2766
|
children: [/* @__PURE__ */ t("div", {
|
|
2556
2767
|
className: "lx-modal-title",
|
|
2557
2768
|
children: r
|
|
2558
|
-
}),
|
|
2769
|
+
}), a && /* @__PURE__ */ t("div", {
|
|
2559
2770
|
className: "lx-modal-subtitle",
|
|
2560
|
-
children:
|
|
2771
|
+
children: a
|
|
2561
2772
|
})]
|
|
2562
2773
|
})]
|
|
2563
2774
|
}), /* @__PURE__ */ t("button", {
|
|
2564
2775
|
type: "button",
|
|
2565
2776
|
className: "lx-modal-close",
|
|
2566
|
-
onClick:
|
|
2777
|
+
onClick: c,
|
|
2567
2778
|
"aria-label": "Close",
|
|
2568
2779
|
children: /* @__PURE__ */ t("svg", {
|
|
2569
2780
|
width: "18",
|
|
@@ -2581,395 +2792,52 @@ function q({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer:
|
|
|
2581
2792
|
}),
|
|
2582
2793
|
/* @__PURE__ */ t("div", {
|
|
2583
2794
|
className: "lx-modal-body",
|
|
2584
|
-
|
|
2795
|
+
ref: v,
|
|
2796
|
+
children: _
|
|
2585
2797
|
}),
|
|
2586
|
-
|
|
2798
|
+
l && /* @__PURE__ */ t("div", {
|
|
2587
2799
|
className: "lx-modal-footer",
|
|
2588
|
-
children:
|
|
2800
|
+
children: l
|
|
2589
2801
|
})
|
|
2590
2802
|
]
|
|
2591
2803
|
});
|
|
2592
2804
|
}
|
|
2593
2805
|
//#endregion
|
|
2594
2806
|
//#region src/components/ModalIcons.jsx
|
|
2595
|
-
|
|
2596
|
-
return /* @__PURE__ */
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
viewBox: "0 0 174 174",
|
|
2600
|
-
fill: "none",
|
|
2601
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2602
|
-
"aria-hidden": "true",
|
|
2603
|
-
children: [
|
|
2604
|
-
/* @__PURE__ */ t("rect", {
|
|
2605
|
-
width: "174",
|
|
2606
|
-
height: "174",
|
|
2607
|
-
rx: "87",
|
|
2608
|
-
fill: "var(--wui-success-5)"
|
|
2609
|
-
}),
|
|
2610
|
-
/* @__PURE__ */ t("rect", {
|
|
2611
|
-
x: "24",
|
|
2612
|
-
y: "24",
|
|
2613
|
-
width: "126",
|
|
2614
|
-
height: "126",
|
|
2615
|
-
rx: "63",
|
|
2616
|
-
stroke: "var(--wui-success-20)",
|
|
2617
|
-
strokeWidth: "16"
|
|
2618
|
-
}),
|
|
2619
|
-
/* @__PURE__ */ n("g", {
|
|
2620
|
-
clipPath: "url(#ki_success_clip)",
|
|
2621
|
-
children: [
|
|
2622
|
-
/* @__PURE__ */ t("rect", {
|
|
2623
|
-
x: "32",
|
|
2624
|
-
y: "32",
|
|
2625
|
-
width: "110",
|
|
2626
|
-
height: "110",
|
|
2627
|
-
rx: "55",
|
|
2628
|
-
fill: "var(--wui-success-active)"
|
|
2629
|
-
}),
|
|
2630
|
-
/* @__PURE__ */ t("rect", {
|
|
2631
|
-
x: "108.758",
|
|
2632
|
-
y: "67.5986",
|
|
2633
|
-
width: "75.5044",
|
|
2634
|
-
height: "49.155",
|
|
2635
|
-
transform: "rotate(45 108.758 67.5986)",
|
|
2636
|
-
fill: "var(--wui-success)"
|
|
2637
|
-
}),
|
|
2638
|
-
/* @__PURE__ */ t("path", {
|
|
2639
|
-
d: "M87.895 96.1046C89.7154 97.9249 89.7154 101.046 87.895 102.866L84.1243 106.637C82.3039 108.457 79.1833 108.457 77.3629 106.637L60.8496 89.9934C59.0293 88.173 59.0293 85.0524 60.8496 83.232L64.6204 79.4613C66.4408 77.6409 69.5614 77.6409 71.3817 79.4613L87.895 96.1046Z",
|
|
2640
|
-
fill: "white"
|
|
2641
|
-
}),
|
|
2642
|
-
/* @__PURE__ */ t("path", {
|
|
2643
|
-
d: "M102.324 67.3672C104.144 65.5469 107.265 65.5469 109.085 67.3672L112.856 71.138C114.676 72.9583 114.676 76.079 112.856 77.8993L84.2499 106.375C82.4296 108.195 79.3089 108.195 77.4886 106.375L73.7178 102.604C71.8975 100.784 71.8975 97.6633 73.7178 95.8429L102.324 67.3672Z",
|
|
2644
|
-
fill: "white"
|
|
2645
|
-
})
|
|
2646
|
-
]
|
|
2647
|
-
}),
|
|
2648
|
-
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t("clipPath", {
|
|
2649
|
-
id: "ki_success_clip",
|
|
2650
|
-
children: /* @__PURE__ */ t("rect", {
|
|
2651
|
-
x: "32",
|
|
2652
|
-
y: "32",
|
|
2653
|
-
width: "110",
|
|
2654
|
-
height: "110",
|
|
2655
|
-
rx: "55",
|
|
2656
|
-
fill: "white"
|
|
2657
|
-
})
|
|
2658
|
-
}) })
|
|
2659
|
-
]
|
|
2807
|
+
var X = (e) => function({ size: n = 72 }) {
|
|
2808
|
+
return /* @__PURE__ */ t("wui-status-icon", {
|
|
2809
|
+
tone: e,
|
|
2810
|
+
size: n
|
|
2660
2811
|
});
|
|
2661
|
-
}
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
fill: "none",
|
|
2668
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2669
|
-
"aria-hidden": "true",
|
|
2670
|
-
children: [
|
|
2671
|
-
/* @__PURE__ */ t("rect", {
|
|
2672
|
-
width: "174",
|
|
2673
|
-
height: "174",
|
|
2674
|
-
rx: "87",
|
|
2675
|
-
fill: "var(--wui-danger-5)"
|
|
2676
|
-
}),
|
|
2677
|
-
/* @__PURE__ */ t("rect", {
|
|
2678
|
-
x: "24",
|
|
2679
|
-
y: "24",
|
|
2680
|
-
width: "126",
|
|
2681
|
-
height: "126",
|
|
2682
|
-
rx: "63",
|
|
2683
|
-
stroke: "var(--wui-danger-20)",
|
|
2684
|
-
strokeWidth: "16"
|
|
2685
|
-
}),
|
|
2686
|
-
/* @__PURE__ */ n("g", {
|
|
2687
|
-
clipPath: "url(#ki_error_clip0)",
|
|
2688
|
-
children: [
|
|
2689
|
-
/* @__PURE__ */ t("rect", {
|
|
2690
|
-
x: "32",
|
|
2691
|
-
y: "32",
|
|
2692
|
-
width: "110",
|
|
2693
|
-
height: "110",
|
|
2694
|
-
rx: "55",
|
|
2695
|
-
fill: "var(--wui-danger)"
|
|
2696
|
-
}),
|
|
2697
|
-
/* @__PURE__ */ t("rect", {
|
|
2698
|
-
x: "110.758",
|
|
2699
|
-
y: "62",
|
|
2700
|
-
width: "75.5044",
|
|
2701
|
-
height: "69.9535",
|
|
2702
|
-
transform: "rotate(45 110.758 62)",
|
|
2703
|
-
fill: "var(--wui-danger-active)"
|
|
2704
|
-
}),
|
|
2705
|
-
/* @__PURE__ */ t("g", {
|
|
2706
|
-
clipPath: "url(#ki_error_clip1)",
|
|
2707
|
-
children: /* @__PURE__ */ t("path", {
|
|
2708
|
-
d: "M95.9285 87.0037L112.943 69.9887C114.823 68.1087 114.823 65.0608 112.943 63.1838L110.675 60.9155C108.795 59.0349 105.747 59.0349 103.87 60.9155L86.8552 77.9298L69.8403 60.9119C67.9603 59.032 64.9124 59.032 63.0353 60.9119L60.7635 63.1802C58.8835 65.0608 58.8835 68.1087 60.7635 69.9858L77.7814 87.0037L60.767 104.018C58.8865 105.899 58.8865 108.947 60.767 110.824L63.0353 113.092C64.9153 114.972 67.9632 114.972 69.8403 113.092L86.8552 96.0769L103.87 113.092C105.75 114.972 108.798 114.972 110.675 113.092L112.943 110.824C114.823 108.943 114.823 105.895 112.943 104.018L95.9285 87.0037Z",
|
|
2709
|
-
fill: "white"
|
|
2710
|
-
})
|
|
2711
|
-
})
|
|
2712
|
-
]
|
|
2713
|
-
}),
|
|
2714
|
-
/* @__PURE__ */ n("defs", { children: [/* @__PURE__ */ t("clipPath", {
|
|
2715
|
-
id: "ki_error_clip0",
|
|
2716
|
-
children: /* @__PURE__ */ t("rect", {
|
|
2717
|
-
x: "32",
|
|
2718
|
-
y: "32",
|
|
2719
|
-
width: "110",
|
|
2720
|
-
height: "110",
|
|
2721
|
-
rx: "55",
|
|
2722
|
-
fill: "white"
|
|
2723
|
-
})
|
|
2724
|
-
}), /* @__PURE__ */ t("clipPath", {
|
|
2725
|
-
id: "ki_error_clip1",
|
|
2726
|
-
children: /* @__PURE__ */ t("rect", {
|
|
2727
|
-
width: "55",
|
|
2728
|
-
height: "55",
|
|
2729
|
-
fill: "white",
|
|
2730
|
-
transform: "translate(59.3535 59.502)"
|
|
2731
|
-
})
|
|
2732
|
-
})] })
|
|
2733
|
-
]
|
|
2734
|
-
});
|
|
2735
|
-
}
|
|
2736
|
-
function De({ size: e = 72 }) {
|
|
2737
|
-
return /* @__PURE__ */ n("svg", {
|
|
2738
|
-
width: e,
|
|
2739
|
-
height: e,
|
|
2740
|
-
viewBox: "0 0 174 174",
|
|
2741
|
-
fill: "none",
|
|
2742
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2743
|
-
"aria-hidden": "true",
|
|
2744
|
-
children: [
|
|
2745
|
-
/* @__PURE__ */ t("rect", {
|
|
2746
|
-
width: "174",
|
|
2747
|
-
height: "174",
|
|
2748
|
-
rx: "87",
|
|
2749
|
-
fill: "var(--wui-warning-5)"
|
|
2750
|
-
}),
|
|
2751
|
-
/* @__PURE__ */ t("rect", {
|
|
2752
|
-
x: "24",
|
|
2753
|
-
y: "24",
|
|
2754
|
-
width: "126",
|
|
2755
|
-
height: "126",
|
|
2756
|
-
rx: "63",
|
|
2757
|
-
stroke: "var(--wui-warning-20)",
|
|
2758
|
-
strokeWidth: "16"
|
|
2759
|
-
}),
|
|
2760
|
-
/* @__PURE__ */ n("g", {
|
|
2761
|
-
clipPath: "url(#ki_warning_clip)",
|
|
2762
|
-
children: [
|
|
2763
|
-
/* @__PURE__ */ t("rect", {
|
|
2764
|
-
x: "32",
|
|
2765
|
-
y: "32",
|
|
2766
|
-
width: "110",
|
|
2767
|
-
height: "110",
|
|
2768
|
-
rx: "55",
|
|
2769
|
-
fill: "var(--wui-warning)"
|
|
2770
|
-
}),
|
|
2771
|
-
/* @__PURE__ */ t("path", {
|
|
2772
|
-
d: "M93.7812 60.9731L156.173 123.365L113.082 166.456L60 113.5L97 109L93.7812 60.9731Z",
|
|
2773
|
-
fill: "var(--wui-warning-active)"
|
|
2774
|
-
}),
|
|
2775
|
-
/* @__PURE__ */ t("path", {
|
|
2776
|
-
d: "M116.145 101.611L96.0431 62.7255C94.8912 60.6967 93.0607 59.1479 90.8656 58.3543C88.6768 57.5543 86.2768 57.5607 84.0945 58.3671C83.0001 58.7767 81.9953 59.3655 81.125 60.1079C80.2545 60.8567 79.5122 61.7527 78.9425 62.7703L57.8933 101.554C56.1525 104.594 56.1717 108.331 57.9317 111.358C59.6981 114.392 62.9427 116.248 66.4435 116.242H107.563C111.051 116.248 114.283 114.398 116.049 111.39C116.952 109.854 117.4 108.133 117.4 106.418C117.4 104.76 116.984 103.102 116.145 101.611ZM87.0064 105.714C85.0672 105.714 83.4929 104.146 83.4929 102.207C83.4929 100.267 85.0672 98.6993 87.0064 98.6993C88.9392 98.6993 90.5136 100.267 90.5136 102.207C90.5136 104.146 88.9392 105.714 87.0064 105.714ZM90.9104 78.098L88.0432 95.3266C88.0049 95.8706 87.5504 96.2994 87.0064 96.2994C86.4561 96.2994 86.0016 95.8706 85.9633 95.3266L83.0961 78.098C83.0385 77.8101 83.0065 77.522 83.0065 77.2405C83.0065 76.3125 83.3137 75.4037 83.8833 74.6485C84.6321 73.6629 85.7713 73.0549 87.0064 72.9717C88.2352 73.0549 89.3744 73.6629 90.1232 74.6485C90.872 75.6341 91.16 76.8885 90.9104 78.098Z",
|
|
2777
|
-
fill: "white"
|
|
2778
|
-
})
|
|
2779
|
-
]
|
|
2780
|
-
}),
|
|
2781
|
-
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t("clipPath", {
|
|
2782
|
-
id: "ki_warning_clip",
|
|
2783
|
-
children: /* @__PURE__ */ t("rect", {
|
|
2784
|
-
x: "32",
|
|
2785
|
-
y: "32",
|
|
2786
|
-
width: "110",
|
|
2787
|
-
height: "110",
|
|
2788
|
-
rx: "55",
|
|
2789
|
-
fill: "white"
|
|
2790
|
-
})
|
|
2791
|
-
}) })
|
|
2792
|
-
]
|
|
2793
|
-
});
|
|
2794
|
-
}
|
|
2795
|
-
function Oe({ size: e = 72 }) {
|
|
2796
|
-
return /* @__PURE__ */ n("svg", {
|
|
2797
|
-
width: e,
|
|
2798
|
-
height: e,
|
|
2799
|
-
viewBox: "0 0 174 174",
|
|
2800
|
-
fill: "none",
|
|
2801
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2802
|
-
"aria-hidden": "true",
|
|
2803
|
-
children: [
|
|
2804
|
-
/* @__PURE__ */ t("rect", {
|
|
2805
|
-
width: "174",
|
|
2806
|
-
height: "174",
|
|
2807
|
-
rx: "87",
|
|
2808
|
-
fill: "var(--wui-info-5)"
|
|
2809
|
-
}),
|
|
2810
|
-
/* @__PURE__ */ t("rect", {
|
|
2811
|
-
x: "24",
|
|
2812
|
-
y: "24",
|
|
2813
|
-
width: "126",
|
|
2814
|
-
height: "126",
|
|
2815
|
-
rx: "63",
|
|
2816
|
-
stroke: "var(--wui-info-20)",
|
|
2817
|
-
strokeWidth: "16"
|
|
2818
|
-
}),
|
|
2819
|
-
/* @__PURE__ */ n("g", {
|
|
2820
|
-
clipPath: "url(#ki_info_clip)",
|
|
2821
|
-
children: [
|
|
2822
|
-
/* @__PURE__ */ t("rect", {
|
|
2823
|
-
x: "32",
|
|
2824
|
-
y: "32",
|
|
2825
|
-
width: "110",
|
|
2826
|
-
height: "110",
|
|
2827
|
-
rx: "55",
|
|
2828
|
-
fill: "var(--wui-info)"
|
|
2829
|
-
}),
|
|
2830
|
-
/* @__PURE__ */ t("path", {
|
|
2831
|
-
d: "M104.999 67.5L111.454 64L163.495 116.041L115.739 163.797L62.999 111L101.897 104.102L104.999 67.5Z",
|
|
2832
|
-
fill: "var(--wui-info-active)"
|
|
2833
|
-
}),
|
|
2834
|
-
/* @__PURE__ */ t("path", {
|
|
2835
|
-
d: "M87 121C105.778 121 121 105.778 121 87C121 68.2223 105.778 53 87 53C68.2223 53 53 68.2223 53 87C53 105.778 68.2223 121 87 121Z",
|
|
2836
|
-
fill: "white"
|
|
2837
|
-
}),
|
|
2838
|
-
/* @__PURE__ */ t("path", {
|
|
2839
|
-
d: "M87 75.542C89.3472 75.542 91.25 73.6392 91.25 71.292C91.25 68.9448 89.3472 67.042 87 67.042C84.6528 67.042 82.75 68.9448 82.75 71.292C82.75 73.6392 84.6528 75.542 87 75.542Z",
|
|
2840
|
-
fill: "var(--wui-info-active)"
|
|
2841
|
-
}),
|
|
2842
|
-
/* @__PURE__ */ t("path", {
|
|
2843
|
-
d: "M86.9992 106.992C86.0975 106.992 85.2327 106.634 84.5951 105.996C83.9574 105.359 83.5992 104.494 83.5992 103.592V86.592C82.6975 86.592 81.8327 86.2338 81.1951 85.5962C80.5574 84.9585 80.1992 84.0937 80.1992 83.192C80.1992 82.2903 80.5574 81.4255 81.1951 80.7878C81.8327 80.1502 82.6975 79.792 83.5992 79.792H86.9992C87.901 79.792 88.7658 80.1502 89.4034 80.7878C90.041 81.4255 90.3992 82.2903 90.3992 83.192V103.592C90.3992 104.494 90.041 105.359 89.4034 105.996C88.7658 106.634 87.901 106.992 86.9992 106.992Z",
|
|
2844
|
-
fill: "var(--wui-info-active)"
|
|
2845
|
-
}),
|
|
2846
|
-
/* @__PURE__ */ t("path", {
|
|
2847
|
-
d: "M90.3992 106.992H83.5992C82.6975 106.992 81.8327 106.634 81.1951 105.996C80.5574 105.358 80.1992 104.494 80.1992 103.592C80.1992 102.69 80.5574 101.825 81.1951 101.188C81.8327 100.55 82.6975 100.192 83.5992 100.192H90.3992C91.301 100.192 92.1658 100.55 92.8034 101.188C93.441 101.825 93.7992 102.69 93.7992 103.592C93.7992 104.494 93.441 105.358 92.8034 105.996C92.1658 106.634 91.301 106.992 90.3992 106.992Z",
|
|
2848
|
-
fill: "var(--wui-info-active)"
|
|
2849
|
-
})
|
|
2850
|
-
]
|
|
2851
|
-
}),
|
|
2852
|
-
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t("clipPath", {
|
|
2853
|
-
id: "ki_info_clip",
|
|
2854
|
-
children: /* @__PURE__ */ t("rect", {
|
|
2855
|
-
x: "32",
|
|
2856
|
-
y: "32",
|
|
2857
|
-
width: "110",
|
|
2858
|
-
height: "110",
|
|
2859
|
-
rx: "55",
|
|
2860
|
-
fill: "white"
|
|
2861
|
-
})
|
|
2862
|
-
}) })
|
|
2863
|
-
]
|
|
2864
|
-
});
|
|
2865
|
-
}
|
|
2866
|
-
function ke({ size: e = 72 }) {
|
|
2867
|
-
return /* @__PURE__ */ n("svg", {
|
|
2868
|
-
width: e,
|
|
2869
|
-
height: e,
|
|
2870
|
-
viewBox: "0 0 174 174",
|
|
2871
|
-
fill: "none",
|
|
2872
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2873
|
-
"aria-hidden": "true",
|
|
2874
|
-
children: [
|
|
2875
|
-
/* @__PURE__ */ t("rect", {
|
|
2876
|
-
width: "174",
|
|
2877
|
-
height: "174",
|
|
2878
|
-
rx: "87",
|
|
2879
|
-
fill: "var(--wui-danger-5)"
|
|
2880
|
-
}),
|
|
2881
|
-
/* @__PURE__ */ t("rect", {
|
|
2882
|
-
x: "24",
|
|
2883
|
-
y: "24",
|
|
2884
|
-
width: "126",
|
|
2885
|
-
height: "126",
|
|
2886
|
-
rx: "63",
|
|
2887
|
-
stroke: "var(--wui-danger-20)",
|
|
2888
|
-
strokeWidth: "16"
|
|
2889
|
-
}),
|
|
2890
|
-
/* @__PURE__ */ n("g", {
|
|
2891
|
-
clipPath: "url(#ki_delete_clip0)",
|
|
2892
|
-
children: [
|
|
2893
|
-
/* @__PURE__ */ t("rect", {
|
|
2894
|
-
x: "32",
|
|
2895
|
-
y: "32",
|
|
2896
|
-
width: "110",
|
|
2897
|
-
height: "110",
|
|
2898
|
-
rx: "55",
|
|
2899
|
-
fill: "var(--wui-danger)"
|
|
2900
|
-
}),
|
|
2901
|
-
/* @__PURE__ */ t("path", {
|
|
2902
|
-
d: "M114.529 67.5672L163.249 116.287L116.354 163.183L67.6336 114.463L100.999 81.0975L64.999 77.5L58.999 69.5L114.529 67.5672Z",
|
|
2903
|
-
fill: "var(--wui-danger-active)"
|
|
2904
|
-
}),
|
|
2905
|
-
/* @__PURE__ */ t("path", {
|
|
2906
|
-
d: "M103.5 79L100.5 105.5L76 113L69.5 83.5L103.5 79Z",
|
|
2907
|
-
fill: "var(--wui-danger)"
|
|
2908
|
-
}),
|
|
2909
|
-
/* @__PURE__ */ n("g", {
|
|
2910
|
-
clipPath: "url(#ki_delete_clip1)",
|
|
2911
|
-
children: [/* @__PURE__ */ t("path", {
|
|
2912
|
-
d: "M113.652 66.9993C108.895 66.5266 104.139 66.1721 99.3522 65.9061V65.8766L98.7022 62.0357C98.259 59.3175 97.609 55.2402 90.6954 55.2402H82.9545C76.0704 55.2402 75.4204 59.1402 74.9477 62.0061L74.3272 65.788C71.5795 65.9652 68.8318 66.1425 66.084 66.4084L60.0568 66.9993C58.8159 67.1175 57.9295 68.2107 58.0477 69.4221C58.1659 70.6334 59.2295 71.5198 60.4704 71.4016L66.4977 70.8107C81.9795 69.2743 97.5795 69.8652 113.239 71.4311C113.327 71.4311 113.386 71.4311 113.475 71.4311C114.598 71.4311 115.573 70.5743 115.691 69.4221C115.779 68.2107 114.893 67.1175 113.652 66.9993Z",
|
|
2913
|
-
fill: "white"
|
|
2914
|
-
}), /* @__PURE__ */ t("path", {
|
|
2915
|
-
d: "M108.216 75.5971C107.507 74.8585 106.532 74.4448 105.527 74.4448H68.1816C67.177 74.4448 66.1725 74.8585 65.4929 75.5971C64.8134 76.3357 64.4293 77.3403 64.4884 78.3744L66.3202 108.688C66.6452 113.179 67.0588 118.793 77.3702 118.793H96.3384C106.65 118.793 107.063 113.208 107.388 108.688L109.22 78.4039C109.279 77.3403 108.895 76.3357 108.216 75.5971ZM91.7588 103.99H81.9202C80.7088 103.99 79.7043 102.986 79.7043 101.774C79.7043 100.563 80.7088 99.5585 81.9202 99.5585H91.7588C92.9702 99.5585 93.9747 100.563 93.9747 101.774C93.9747 102.986 92.9702 103.99 91.7588 103.99ZM94.2406 92.1721H79.4679C78.2566 92.1721 77.252 91.1676 77.252 89.9562C77.252 88.7448 78.2566 87.7403 79.4679 87.7403H94.2406C95.452 87.7403 96.4566 88.7448 96.4566 89.9562C96.4566 91.1676 95.452 92.1721 94.2406 92.1721Z",
|
|
2916
|
-
fill: "white"
|
|
2917
|
-
})]
|
|
2918
|
-
})
|
|
2919
|
-
]
|
|
2920
|
-
}),
|
|
2921
|
-
/* @__PURE__ */ n("defs", { children: [/* @__PURE__ */ t("clipPath", {
|
|
2922
|
-
id: "ki_delete_clip0",
|
|
2923
|
-
children: /* @__PURE__ */ t("rect", {
|
|
2924
|
-
x: "32",
|
|
2925
|
-
y: "32",
|
|
2926
|
-
width: "110",
|
|
2927
|
-
height: "110",
|
|
2928
|
-
rx: "55",
|
|
2929
|
-
fill: "white"
|
|
2930
|
-
})
|
|
2931
|
-
}), /* @__PURE__ */ t("clipPath", {
|
|
2932
|
-
id: "ki_delete_clip1",
|
|
2933
|
-
children: /* @__PURE__ */ t("rect", {
|
|
2934
|
-
width: "65",
|
|
2935
|
-
height: "65",
|
|
2936
|
-
fill: "white",
|
|
2937
|
-
transform: "translate(54.3535 54.502)"
|
|
2938
|
-
})
|
|
2939
|
-
})] })
|
|
2940
|
-
]
|
|
2941
|
-
});
|
|
2942
|
-
}
|
|
2943
|
-
var J = {
|
|
2944
|
-
success: Te,
|
|
2945
|
-
error: Ee,
|
|
2946
|
-
warning: De,
|
|
2947
|
-
info: Oe,
|
|
2948
|
-
delete: ke
|
|
2812
|
+
}, Z = {
|
|
2813
|
+
success: X("success"),
|
|
2814
|
+
error: X("error"),
|
|
2815
|
+
warning: X("warning"),
|
|
2816
|
+
info: X("info"),
|
|
2817
|
+
delete: X("delete")
|
|
2949
2818
|
};
|
|
2950
2819
|
//#endregion
|
|
2951
2820
|
//#region src/components/AppConfirmDialog.jsx
|
|
2952
|
-
function
|
|
2953
|
-
let [h, g] =
|
|
2954
|
-
if (
|
|
2821
|
+
function De({ open: r, title: a, message: o, confirmLabel: s = "Confirm", cancelLabel: l = "Cancel", danger: u = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m }) {
|
|
2822
|
+
let [h, g] = c("");
|
|
2823
|
+
if (i(() => {
|
|
2955
2824
|
r || g("");
|
|
2956
2825
|
}, [r]), !r) return null;
|
|
2957
|
-
let _ = !!f && h.trim() !== f, v =
|
|
2958
|
-
return /* @__PURE__ */ t(
|
|
2826
|
+
let _ = !!f && h.trim() !== f, v = Z[d || (u ? "delete" : "info")];
|
|
2827
|
+
return /* @__PURE__ */ t(Y, {
|
|
2959
2828
|
open: r,
|
|
2960
2829
|
hideHeader: !0,
|
|
2961
|
-
title:
|
|
2962
|
-
maxWidth: 440,
|
|
2830
|
+
title: a,
|
|
2963
2831
|
onClose: m,
|
|
2964
2832
|
className: "lx-confirm",
|
|
2965
2833
|
footer: /* @__PURE__ */ n("div", {
|
|
2966
2834
|
className: "lx-confirm-actions",
|
|
2967
|
-
children: [/* @__PURE__ */ t(
|
|
2835
|
+
children: [/* @__PURE__ */ t(K, {
|
|
2968
2836
|
variant: "secondary",
|
|
2969
2837
|
onClick: m,
|
|
2970
|
-
children:
|
|
2971
|
-
}), /* @__PURE__ */ t(
|
|
2972
|
-
variant:
|
|
2838
|
+
children: l
|
|
2839
|
+
}), /* @__PURE__ */ t(K, {
|
|
2840
|
+
variant: u ? "danger" : "primary",
|
|
2973
2841
|
disabled: _,
|
|
2974
2842
|
onClick: p,
|
|
2975
2843
|
children: s
|
|
@@ -2984,13 +2852,13 @@ function Ae({ open: r, title: i, message: a, confirmLabel: s = "Confirm", cancel
|
|
|
2984
2852
|
}),
|
|
2985
2853
|
/* @__PURE__ */ t("h3", {
|
|
2986
2854
|
className: "lx-confirm-title",
|
|
2987
|
-
children:
|
|
2855
|
+
children: a
|
|
2988
2856
|
}),
|
|
2989
|
-
|
|
2857
|
+
o && /* @__PURE__ */ t("p", {
|
|
2990
2858
|
className: "lx-confirm-msg",
|
|
2991
|
-
children:
|
|
2859
|
+
children: o
|
|
2992
2860
|
}),
|
|
2993
|
-
f && /* @__PURE__ */ t(
|
|
2861
|
+
f && /* @__PURE__ */ t(J, {
|
|
2994
2862
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
2995
2863
|
label: /* @__PURE__ */ n(e, { children: [
|
|
2996
2864
|
"Type ",
|
|
@@ -3007,7 +2875,7 @@ function Ae({ open: r, title: i, message: a, confirmLabel: s = "Confirm", cancel
|
|
|
3007
2875
|
}
|
|
3008
2876
|
//#endregion
|
|
3009
2877
|
//#region src/components/AppSkeleton.jsx
|
|
3010
|
-
function
|
|
2878
|
+
function Q({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a }) {
|
|
3011
2879
|
return /* @__PURE__ */ t("span", {
|
|
3012
2880
|
className: `skeleton${i ? ` ${i}` : ""}`,
|
|
3013
2881
|
"aria-hidden": "true",
|
|
@@ -3019,7 +2887,7 @@ function Y({ width: e = "100%", height: n = 14, radius: r = 6, className: i = ""
|
|
|
3019
2887
|
}
|
|
3020
2888
|
});
|
|
3021
2889
|
}
|
|
3022
|
-
var
|
|
2890
|
+
var Oe = [
|
|
3023
2891
|
"r0",
|
|
3024
2892
|
"r1",
|
|
3025
2893
|
"r2",
|
|
@@ -3028,7 +2896,7 @@ var je = [
|
|
|
3028
2896
|
"r5",
|
|
3029
2897
|
"r6",
|
|
3030
2898
|
"r7"
|
|
3031
|
-
],
|
|
2899
|
+
], ke = [
|
|
3032
2900
|
"c0",
|
|
3033
2901
|
"c1",
|
|
3034
2902
|
"c2",
|
|
@@ -3038,54 +2906,54 @@ var je = [
|
|
|
3038
2906
|
"c6",
|
|
3039
2907
|
"c7"
|
|
3040
2908
|
];
|
|
3041
|
-
function
|
|
3042
|
-
return
|
|
2909
|
+
function Ae({ rows: e = 4, cols: n = 5 }) {
|
|
2910
|
+
return Oe.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: ke.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(Q, {
|
|
3043
2911
|
width: n === 0 ? "70%" : "50%",
|
|
3044
2912
|
height: 12
|
|
3045
2913
|
}) }, e)) }, e));
|
|
3046
2914
|
}
|
|
3047
2915
|
//#endregion
|
|
3048
2916
|
//#region src/components/AppSelectMini.jsx
|
|
3049
|
-
function
|
|
3050
|
-
let d =
|
|
3051
|
-
return
|
|
2917
|
+
function je({ value: e, onChange: n, options: r = [], placeholder: a = "Select...", name: o, ariaLabel: c, id: l, disabled: u }) {
|
|
2918
|
+
let d = s(null);
|
|
2919
|
+
return i(() => {
|
|
3052
2920
|
d.current && (d.current.options = r.map((e) => ({
|
|
3053
2921
|
value: e.value,
|
|
3054
2922
|
label: e.label ?? e.text ?? ""
|
|
3055
2923
|
})));
|
|
3056
|
-
}, [r]),
|
|
2924
|
+
}, [r]), i(() => {
|
|
3057
2925
|
let t = d.current;
|
|
3058
2926
|
t && String(t.value ?? "") !== String(e ?? "") && (t.value = e ?? "");
|
|
3059
|
-
}, [e]),
|
|
2927
|
+
}, [e]), i(() => {
|
|
3060
2928
|
let e = d.current;
|
|
3061
2929
|
if (!e) return;
|
|
3062
2930
|
let t = () => n?.(e.value);
|
|
3063
2931
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
3064
2932
|
}, [n]), /* @__PURE__ */ t("wui-select", {
|
|
3065
2933
|
ref: d,
|
|
3066
|
-
name:
|
|
2934
|
+
name: o,
|
|
3067
2935
|
compact: "",
|
|
3068
|
-
id:
|
|
3069
|
-
placeholder:
|
|
3070
|
-
"aria-label":
|
|
2936
|
+
id: l,
|
|
2937
|
+
placeholder: a,
|
|
2938
|
+
"aria-label": c,
|
|
3071
2939
|
disabled: u ? "" : void 0
|
|
3072
2940
|
});
|
|
3073
2941
|
}
|
|
3074
2942
|
//#endregion
|
|
3075
2943
|
//#region src/components/AppTablePagination.jsx
|
|
3076
|
-
var
|
|
2944
|
+
var Me = [
|
|
3077
2945
|
5,
|
|
3078
2946
|
10,
|
|
3079
2947
|
25,
|
|
3080
2948
|
50
|
|
3081
2949
|
];
|
|
3082
|
-
function
|
|
2950
|
+
function Ne({ page: e, pageCount: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = Me }) {
|
|
3083
2951
|
return /* @__PURE__ */ n("div", {
|
|
3084
2952
|
className: "table-pagination",
|
|
3085
2953
|
children: [
|
|
3086
2954
|
/* @__PURE__ */ n("span", {
|
|
3087
2955
|
className: "tpg-rows",
|
|
3088
|
-
children: ["Rows per page:", /* @__PURE__ */ t(
|
|
2956
|
+
children: ["Rows per page:", /* @__PURE__ */ t(je, {
|
|
3089
2957
|
compact: !0,
|
|
3090
2958
|
value: i,
|
|
3091
2959
|
onChange: (e) => l(Number(e)),
|
|
@@ -3114,10 +2982,9 @@ function Pe({ page: e, pageCount: r, pageSize: i, total: a, firstRow: o, lastRow
|
|
|
3114
2982
|
onClick: () => c(Math.max(0, e - 1)),
|
|
3115
2983
|
disabled: e === 0,
|
|
3116
2984
|
"aria-label": "Previous page",
|
|
3117
|
-
children: /* @__PURE__ */ t(
|
|
2985
|
+
children: /* @__PURE__ */ t(x, {
|
|
3118
2986
|
name: "arrow-left",
|
|
3119
|
-
size: 18
|
|
3120
|
-
variant: "Linear"
|
|
2987
|
+
size: 18
|
|
3121
2988
|
})
|
|
3122
2989
|
}), /* @__PURE__ */ t("button", {
|
|
3123
2990
|
type: "button",
|
|
@@ -3125,10 +2992,9 @@ function Pe({ page: e, pageCount: r, pageSize: i, total: a, firstRow: o, lastRow
|
|
|
3125
2992
|
onClick: () => c(Math.min(r - 1, e + 1)),
|
|
3126
2993
|
disabled: e >= r - 1,
|
|
3127
2994
|
"aria-label": "Next page",
|
|
3128
|
-
children: /* @__PURE__ */ t(
|
|
2995
|
+
children: /* @__PURE__ */ t(x, {
|
|
3129
2996
|
name: "arrow-right",
|
|
3130
|
-
size: 18
|
|
3131
|
-
variant: "Linear"
|
|
2997
|
+
size: 18
|
|
3132
2998
|
})
|
|
3133
2999
|
})]
|
|
3134
3000
|
})
|
|
@@ -3137,16 +3003,16 @@ function Pe({ page: e, pageCount: r, pageSize: i, total: a, firstRow: o, lastRow
|
|
|
3137
3003
|
}
|
|
3138
3004
|
//#endregion
|
|
3139
3005
|
//#region src/components/AppDataTable.jsx
|
|
3140
|
-
function
|
|
3141
|
-
return e === "end" ? "lx-cell-end" : e === "num" ? "
|
|
3006
|
+
function Pe(e) {
|
|
3007
|
+
return e === "end" ? "lx-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
3142
3008
|
}
|
|
3143
|
-
function
|
|
3009
|
+
function Fe(e) {
|
|
3144
3010
|
return e == null || e === "" ? "—" : e;
|
|
3145
3011
|
}
|
|
3146
|
-
function
|
|
3147
|
-
let
|
|
3148
|
-
e && (e.indeterminate =
|
|
3149
|
-
},
|
|
3012
|
+
function Ie({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s, loading: c = !1, skeletonRows: l = 5, empty: u = "No records found.", emptyFiltered: d, sourceCount: f, rowActions: p, rowActionsLabel: m, pagination: h, ariaLabel: g, className: _ = "", selectable: v = !1, selectedIds: y, onToggleRow: b, onToggleAll: S }) {
|
|
3013
|
+
let C = Math.max(1, r.length + +!!p + +!!v), w = v && i ? i.reduce((e, t) => e + +!!y?.has(a(t)), 0) : 0, T = v && i && i.length > 0 && w === i.length, E = w > 0 && !T, D = (e) => {
|
|
3014
|
+
e && (e.indeterminate = E);
|
|
3015
|
+
}, O = d !== void 0 && f > 0 ? d : u;
|
|
3150
3016
|
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
|
|
3151
3017
|
className: "table-wrap",
|
|
3152
3018
|
children: /* @__PURE__ */ n("table", {
|
|
@@ -3156,20 +3022,19 @@ function Le({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3156
3022
|
v && /* @__PURE__ */ t("th", {
|
|
3157
3023
|
className: "lx-select-cell",
|
|
3158
3024
|
children: /* @__PURE__ */ t("input", {
|
|
3159
|
-
ref:
|
|
3025
|
+
ref: D,
|
|
3160
3026
|
type: "checkbox",
|
|
3161
3027
|
className: "lx-check",
|
|
3162
|
-
checked:
|
|
3163
|
-
onChange: (e) =>
|
|
3028
|
+
checked: T,
|
|
3029
|
+
onChange: (e) => S?.(e.target.checked),
|
|
3164
3030
|
"aria-label": "Select all rows"
|
|
3165
3031
|
})
|
|
3166
3032
|
}),
|
|
3167
3033
|
r.map((e) => {
|
|
3168
3034
|
let r = !!(e.sortable && s), i = o && o.key === e.key;
|
|
3169
3035
|
return /* @__PURE__ */ n("th", {
|
|
3170
|
-
className: (r ? "
|
|
3036
|
+
className: (r ? "sortable " : "") + Pe(e.align),
|
|
3171
3037
|
style: e.width ? { width: e.width } : void 0,
|
|
3172
|
-
role: r ? "button" : void 0,
|
|
3173
3038
|
tabIndex: r ? 0 : void 0,
|
|
3174
3039
|
"aria-sort": i ? o.dir === "asc" ? "ascending" : "descending" : r ? "none" : void 0,
|
|
3175
3040
|
onClick: r ? () => s(e.key) : void 0,
|
|
@@ -3177,11 +3042,10 @@ function Le({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3177
3042
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), s(e.key));
|
|
3178
3043
|
} : void 0,
|
|
3179
3044
|
children: [e.label, r && /* @__PURE__ */ t("span", {
|
|
3180
|
-
className:
|
|
3181
|
-
children: /* @__PURE__ */ t(
|
|
3045
|
+
className: "sort-icon",
|
|
3046
|
+
children: /* @__PURE__ */ t(x, {
|
|
3182
3047
|
name: "chevrons-up-down",
|
|
3183
|
-
size: 14
|
|
3184
|
-
variant: "Linear"
|
|
3048
|
+
size: 14
|
|
3185
3049
|
})
|
|
3186
3050
|
})]
|
|
3187
3051
|
}, e.key);
|
|
@@ -3196,9 +3060,9 @@ function Le({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3196
3060
|
children: "Actions"
|
|
3197
3061
|
})
|
|
3198
3062
|
}))
|
|
3199
|
-
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(
|
|
3063
|
+
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(Ae, {
|
|
3200
3064
|
rows: l,
|
|
3201
|
-
cols:
|
|
3065
|
+
cols: C
|
|
3202
3066
|
}) : i?.length ? i.map((e) => {
|
|
3203
3067
|
let i = a(e);
|
|
3204
3068
|
return /* @__PURE__ */ n("tr", {
|
|
@@ -3215,8 +3079,8 @@ function Le({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3215
3079
|
})
|
|
3216
3080
|
}),
|
|
3217
3081
|
r.map((n) => /* @__PURE__ */ t("td", {
|
|
3218
|
-
className:
|
|
3219
|
-
children: n.render ? n.render(e) :
|
|
3082
|
+
className: Pe(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
|
|
3083
|
+
children: n.render ? n.render(e) : Fe(e[n.key])
|
|
3220
3084
|
}, n.key)),
|
|
3221
3085
|
p && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", {
|
|
3222
3086
|
className: "u-row-actions",
|
|
@@ -3225,12 +3089,12 @@ function Le({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3225
3089
|
]
|
|
3226
3090
|
}, i);
|
|
3227
3091
|
}) : /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
3228
|
-
colSpan:
|
|
3092
|
+
colSpan: C,
|
|
3229
3093
|
className: "lx-table-empty",
|
|
3230
|
-
children:
|
|
3094
|
+
children: O
|
|
3231
3095
|
}) }) })]
|
|
3232
3096
|
})
|
|
3233
|
-
}), h && !c && h.total > 0 && /* @__PURE__ */ t(
|
|
3097
|
+
}), h && !c && h.total > 0 && /* @__PURE__ */ t(Ne, {
|
|
3234
3098
|
page: h.page,
|
|
3235
3099
|
pageCount: h.pageCount,
|
|
3236
3100
|
pageSize: h.pageSize,
|
|
@@ -3243,12 +3107,12 @@ function Le({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3243
3107
|
}
|
|
3244
3108
|
//#endregion
|
|
3245
3109
|
//#region src/components/AppDatePicker.jsx
|
|
3246
|
-
function
|
|
3247
|
-
let y =
|
|
3248
|
-
|
|
3110
|
+
function Le({ value: e, onChange: r, label: o, required: c = !1, hint: l, error: u, name: d, min: f, max: p, placeholder: m = "Enter Date", disabled: h, id: g, ariaLabel: _, className: v = "" }) {
|
|
3111
|
+
let y = s(null), b = a(), x = g || d || b;
|
|
3112
|
+
i(() => {
|
|
3249
3113
|
let t = y.current;
|
|
3250
3114
|
t && t.value !== (e ?? "") && (t.value = e ?? "");
|
|
3251
|
-
}, [e]),
|
|
3115
|
+
}, [e]), i(() => {
|
|
3252
3116
|
let e = y.current;
|
|
3253
3117
|
if (!e) return;
|
|
3254
3118
|
let t = () => r?.(e.value);
|
|
@@ -3265,13 +3129,13 @@ function Re({ value: e, onChange: r, label: i, required: a = !1, hint: c, error:
|
|
|
3265
3129
|
"aria-invalid": u ? "true" : void 0,
|
|
3266
3130
|
disabled: h ? "" : void 0
|
|
3267
3131
|
});
|
|
3268
|
-
return !
|
|
3132
|
+
return !o && !u && !l ? S : /* @__PURE__ */ n("div", {
|
|
3269
3133
|
className: `field${v ? ` ${v}` : ""}`,
|
|
3270
3134
|
children: [
|
|
3271
|
-
|
|
3135
|
+
o && /* @__PURE__ */ n("label", {
|
|
3272
3136
|
className: "label",
|
|
3273
3137
|
htmlFor: x,
|
|
3274
|
-
children: [
|
|
3138
|
+
children: [o, c && /* @__PURE__ */ t("span", {
|
|
3275
3139
|
className: "required",
|
|
3276
3140
|
"aria-hidden": "true",
|
|
3277
3141
|
children: "*"
|
|
@@ -3282,16 +3146,16 @@ function Re({ value: e, onChange: r, label: i, required: a = !1, hint: c, error:
|
|
|
3282
3146
|
className: "field-error",
|
|
3283
3147
|
children: u
|
|
3284
3148
|
}),
|
|
3285
|
-
!u &&
|
|
3149
|
+
!u && l && /* @__PURE__ */ t("div", {
|
|
3286
3150
|
className: "field-hint",
|
|
3287
|
-
children:
|
|
3151
|
+
children: l
|
|
3288
3152
|
})
|
|
3289
3153
|
]
|
|
3290
3154
|
});
|
|
3291
3155
|
}
|
|
3292
3156
|
//#endregion
|
|
3293
3157
|
//#region src/components/AppDropdown.jsx
|
|
3294
|
-
var
|
|
3158
|
+
var Re = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
|
|
3295
3159
|
return /* @__PURE__ */ t("button", {
|
|
3296
3160
|
ref: l,
|
|
3297
3161
|
type: "button",
|
|
@@ -3299,24 +3163,23 @@ var ze = i(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
|
|
|
3299
3163
|
title: i,
|
|
3300
3164
|
"aria-label": o,
|
|
3301
3165
|
...c,
|
|
3302
|
-
children: /* @__PURE__ */ t(
|
|
3166
|
+
children: /* @__PURE__ */ t(x, {
|
|
3303
3167
|
name: e,
|
|
3304
|
-
size: n
|
|
3305
|
-
variant: "Bulk"
|
|
3168
|
+
size: n
|
|
3306
3169
|
})
|
|
3307
3170
|
});
|
|
3308
3171
|
});
|
|
3309
|
-
function
|
|
3310
|
-
return /* @__PURE__ */ n(
|
|
3172
|
+
function ze({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u }) {
|
|
3173
|
+
return /* @__PURE__ */ n(g, {
|
|
3311
3174
|
align: s,
|
|
3312
|
-
children: [/* @__PURE__ */ t(
|
|
3313
|
-
as:
|
|
3175
|
+
children: [/* @__PURE__ */ t(g.Toggle, {
|
|
3176
|
+
as: Re,
|
|
3314
3177
|
icon: e,
|
|
3315
3178
|
iconSize: r,
|
|
3316
3179
|
btnClassName: i,
|
|
3317
3180
|
title: a,
|
|
3318
3181
|
"aria-label": o
|
|
3319
|
-
}), /* @__PURE__ */ t(
|
|
3182
|
+
}), /* @__PURE__ */ t(g.Menu, {
|
|
3320
3183
|
className: l,
|
|
3321
3184
|
renderOnMount: !0,
|
|
3322
3185
|
children: c.map((e) => {
|
|
@@ -3330,15 +3193,14 @@ function Be({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
|
|
|
3330
3193
|
as: "button",
|
|
3331
3194
|
type: "button"
|
|
3332
3195
|
};
|
|
3333
|
-
return /* @__PURE__ */ n(
|
|
3196
|
+
return /* @__PURE__ */ n(g.Item, {
|
|
3334
3197
|
...r,
|
|
3335
3198
|
onClick: e.onClick,
|
|
3336
3199
|
className: e.danger ? "danger" : void 0,
|
|
3337
|
-
children: [e.icon && /* @__PURE__ */ t(
|
|
3200
|
+
children: [e.icon && /* @__PURE__ */ t(x, {
|
|
3338
3201
|
name: e.icon,
|
|
3339
3202
|
size: 14,
|
|
3340
|
-
color: e.danger ? "var(--wui-danger)" : "var(--wui-primary)"
|
|
3341
|
-
variant: "Linear"
|
|
3203
|
+
color: e.danger ? "var(--wui-danger)" : "var(--wui-primary)"
|
|
3342
3204
|
}), e.label]
|
|
3343
3205
|
}, e.key);
|
|
3344
3206
|
})
|
|
@@ -3347,133 +3209,110 @@ function Be({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
|
|
|
3347
3209
|
}
|
|
3348
3210
|
//#endregion
|
|
3349
3211
|
//#region src/components/AppEmptyState.jsx
|
|
3350
|
-
function
|
|
3212
|
+
function Be({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l }) {
|
|
3351
3213
|
return /* @__PURE__ */ n("div", {
|
|
3352
3214
|
className: [
|
|
3353
3215
|
"empty-state",
|
|
3354
|
-
|
|
3355
|
-
|
|
3216
|
+
i === "sm" ? "empty-state-sm" : "",
|
|
3217
|
+
c
|
|
3356
3218
|
].filter(Boolean).join(" "),
|
|
3357
|
-
style:
|
|
3219
|
+
style: l,
|
|
3358
3220
|
children: [
|
|
3359
3221
|
/* @__PURE__ */ t("div", {
|
|
3360
3222
|
className: "empty-state-icon",
|
|
3361
|
-
children: /* @__PURE__ */ t(
|
|
3223
|
+
children: /* @__PURE__ */ t(x, {
|
|
3362
3224
|
name: e,
|
|
3363
|
-
size: r
|
|
3364
|
-
variant: i
|
|
3225
|
+
size: r
|
|
3365
3226
|
})
|
|
3366
3227
|
}),
|
|
3367
|
-
|
|
3228
|
+
a != null && /* @__PURE__ */ t("div", {
|
|
3368
3229
|
className: "empty-state-title",
|
|
3369
|
-
children:
|
|
3230
|
+
children: a
|
|
3370
3231
|
}),
|
|
3371
|
-
|
|
3232
|
+
o != null && /* @__PURE__ */ t("div", {
|
|
3372
3233
|
className: "empty-state-message",
|
|
3373
|
-
children:
|
|
3234
|
+
children: o
|
|
3374
3235
|
}),
|
|
3375
|
-
|
|
3236
|
+
s && /* @__PURE__ */ t("div", {
|
|
3376
3237
|
className: "empty-state-action",
|
|
3377
|
-
children:
|
|
3238
|
+
children: s
|
|
3378
3239
|
})
|
|
3379
3240
|
]
|
|
3380
3241
|
});
|
|
3381
3242
|
}
|
|
3382
3243
|
//#endregion
|
|
3383
|
-
//#region src/components/icons.jsx
|
|
3384
|
-
function Q(e) {
|
|
3385
|
-
function n({ size: n = 24, color: r = "currentColor", variant: i = "Bulk", ...a }) {
|
|
3386
|
-
return /* @__PURE__ */ t(e, {
|
|
3387
|
-
size: n,
|
|
3388
|
-
color: r,
|
|
3389
|
-
variant: i,
|
|
3390
|
-
...a
|
|
3391
|
-
});
|
|
3392
|
-
}
|
|
3393
|
-
return n.displayName = `Bulk(${e.displayName || "Icon"})`, n;
|
|
3394
|
-
}
|
|
3395
|
-
Q(T), Q(C), Q(b), Q(w), Q(S), Q(E), Q(y), Q(x);
|
|
3396
|
-
function He({ size: e = 16, color: n = "currentColor", ...r }) {
|
|
3397
|
-
return /* @__PURE__ */ t(v, {
|
|
3398
|
-
size: e,
|
|
3399
|
-
color: n,
|
|
3400
|
-
variant: "Linear",
|
|
3401
|
-
style: { transform: "rotate(45deg)" },
|
|
3402
|
-
...r
|
|
3403
|
-
});
|
|
3404
|
-
}
|
|
3405
|
-
//#endregion
|
|
3406
3244
|
//#region src/components/AppFileAttachment.jsx
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
return _(e), () => URL.revokeObjectURL(e);
|
|
3245
|
+
function Ve({ label: r = "Attachment", value: o, name: s, onChange: l, accept: u = B, maxSizeMb: d = 5, optional: f = !1, error: p, id: m }) {
|
|
3246
|
+
let h = a(), g = m || s || h, [_, v] = c(null), [y, b] = c("");
|
|
3247
|
+
i(() => {
|
|
3248
|
+
if (o instanceof File) {
|
|
3249
|
+
let e = URL.createObjectURL(o);
|
|
3250
|
+
return v(e), () => URL.revokeObjectURL(e);
|
|
3414
3251
|
}
|
|
3415
|
-
|
|
3416
|
-
}, [
|
|
3417
|
-
function
|
|
3252
|
+
v(o?.url || null);
|
|
3253
|
+
}, [o]);
|
|
3254
|
+
function S(e) {
|
|
3418
3255
|
let t = e.target.files?.[0];
|
|
3419
|
-
if (e.target.value = "", t)
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
}
|
|
3428
|
-
y(""), a(t);
|
|
3256
|
+
if (e.target.value = "", !t) return;
|
|
3257
|
+
let n = H(t, {
|
|
3258
|
+
accept: u,
|
|
3259
|
+
maxSizeMb: d
|
|
3260
|
+
});
|
|
3261
|
+
if (n) {
|
|
3262
|
+
b(n);
|
|
3263
|
+
return;
|
|
3429
3264
|
}
|
|
3265
|
+
b(""), l(t);
|
|
3430
3266
|
}
|
|
3431
|
-
function
|
|
3432
|
-
|
|
3267
|
+
function C() {
|
|
3268
|
+
b(""), l(null);
|
|
3433
3269
|
}
|
|
3434
|
-
let
|
|
3270
|
+
let w = o instanceof File ? o.name : o?.name, T = o instanceof File ? `${(o.size / 1024).toFixed(0)} KB` : null, E = p || y;
|
|
3435
3271
|
return /* @__PURE__ */ n("div", {
|
|
3436
3272
|
className: "field",
|
|
3437
3273
|
children: [
|
|
3438
3274
|
/* @__PURE__ */ n("label", {
|
|
3439
3275
|
className: "label",
|
|
3440
|
-
htmlFor:
|
|
3441
|
-
children: [r,
|
|
3276
|
+
htmlFor: g,
|
|
3277
|
+
children: [r, f && /* @__PURE__ */ t("span", {
|
|
3442
3278
|
className: "label-optional",
|
|
3443
3279
|
children: " (optional)"
|
|
3444
3280
|
})]
|
|
3445
3281
|
}),
|
|
3446
|
-
|
|
3282
|
+
o ? /* @__PURE__ */ n("div", {
|
|
3447
3283
|
className: "attach-preview",
|
|
3448
3284
|
children: [/* @__PURE__ */ n("div", {
|
|
3449
3285
|
className: "attach-figure",
|
|
3450
3286
|
children: [/* @__PURE__ */ t("img", {
|
|
3451
|
-
src:
|
|
3452
|
-
alt:
|
|
3287
|
+
src: _,
|
|
3288
|
+
alt: w
|
|
3453
3289
|
}), /* @__PURE__ */ t("button", {
|
|
3454
3290
|
type: "button",
|
|
3455
3291
|
className: "attach-remove",
|
|
3456
3292
|
"aria-label": "Remove attachment",
|
|
3457
|
-
onClick:
|
|
3458
|
-
children: /* @__PURE__ */ t(
|
|
3293
|
+
onClick: C,
|
|
3294
|
+
children: /* @__PURE__ */ t(x, {
|
|
3295
|
+
name: "x",
|
|
3296
|
+
size: 18
|
|
3297
|
+
})
|
|
3459
3298
|
})]
|
|
3460
3299
|
}), /* @__PURE__ */ n("div", {
|
|
3461
3300
|
className: "attach-meta",
|
|
3462
3301
|
children: [/* @__PURE__ */ t("div", {
|
|
3463
3302
|
className: "attach-name",
|
|
3464
|
-
children:
|
|
3465
|
-
}),
|
|
3303
|
+
children: w
|
|
3304
|
+
}), T && /* @__PURE__ */ t("div", {
|
|
3466
3305
|
className: "attach-size",
|
|
3467
|
-
children:
|
|
3306
|
+
children: T
|
|
3468
3307
|
})]
|
|
3469
3308
|
})]
|
|
3470
3309
|
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("label", {
|
|
3471
3310
|
className: "attach-drop",
|
|
3472
|
-
htmlFor:
|
|
3311
|
+
htmlFor: g,
|
|
3473
3312
|
children: [
|
|
3474
3313
|
/* @__PURE__ */ t("span", {
|
|
3475
3314
|
className: "attach-drop-icon",
|
|
3476
|
-
children: /* @__PURE__ */ t(
|
|
3315
|
+
children: /* @__PURE__ */ t(x, {
|
|
3477
3316
|
name: "image",
|
|
3478
3317
|
size: 18
|
|
3479
3318
|
})
|
|
@@ -3487,7 +3326,7 @@ function We({ label: r = "Attachment", value: i, onChange: a, accept: c = Ue, ma
|
|
|
3487
3326
|
className: "attach-drop-hint",
|
|
3488
3327
|
children: [
|
|
3489
3328
|
"PNG, JPG or WEBP, up to ",
|
|
3490
|
-
|
|
3329
|
+
d,
|
|
3491
3330
|
" MB"
|
|
3492
3331
|
]
|
|
3493
3332
|
})]
|
|
@@ -3498,105 +3337,98 @@ function We({ label: r = "Attachment", value: i, onChange: a, accept: c = Ue, ma
|
|
|
3498
3337
|
})
|
|
3499
3338
|
]
|
|
3500
3339
|
}), /* @__PURE__ */ t("input", {
|
|
3501
|
-
id:
|
|
3340
|
+
id: g,
|
|
3502
3341
|
type: "file",
|
|
3503
3342
|
className: "visually-hidden-input",
|
|
3504
|
-
|
|
3505
|
-
|
|
3343
|
+
name: s,
|
|
3344
|
+
accept: u,
|
|
3345
|
+
onChange: S
|
|
3506
3346
|
})] }),
|
|
3507
|
-
|
|
3347
|
+
E && /* @__PURE__ */ t("div", {
|
|
3508
3348
|
className: "field-error",
|
|
3509
|
-
children:
|
|
3349
|
+
children: E
|
|
3510
3350
|
})
|
|
3511
3351
|
]
|
|
3512
3352
|
});
|
|
3513
3353
|
}
|
|
3514
|
-
var Ge = [
|
|
3515
|
-
".jpg",
|
|
3516
|
-
".jpeg",
|
|
3517
|
-
".png"
|
|
3518
|
-
];
|
|
3519
|
-
function Ke(e) {
|
|
3520
|
-
if (!e) return null;
|
|
3521
|
-
let t = (e.name || "").toLowerCase();
|
|
3522
|
-
return Ge.some((e) => t.endsWith(e)) ? e.size > 5242880 ? "File size must be less than 5 MB." : null : "Use a JPG or PNG image.";
|
|
3523
|
-
}
|
|
3524
3354
|
//#endregion
|
|
3525
3355
|
//#region src/components/toast.js
|
|
3526
|
-
var
|
|
3356
|
+
var He = /* @__PURE__ */ new Set([
|
|
3527
3357
|
"success",
|
|
3528
3358
|
"info",
|
|
3529
3359
|
"warning",
|
|
3530
3360
|
"error"
|
|
3531
3361
|
]);
|
|
3532
3362
|
function $(e, t = "success") {
|
|
3533
|
-
let n =
|
|
3534
|
-
|
|
3363
|
+
let n = He.has(t) ? t : "success";
|
|
3364
|
+
_[n](e, { toastId: `${n}:${e}` });
|
|
3535
3365
|
}
|
|
3536
|
-
function
|
|
3537
|
-
|
|
3366
|
+
function Ue(e) {
|
|
3367
|
+
_.error(e, { toastId: `error:${e}` });
|
|
3538
3368
|
}
|
|
3539
3369
|
//#endregion
|
|
3540
3370
|
//#region src/components/AppFilePicker.jsx
|
|
3541
|
-
function
|
|
3542
|
-
let [
|
|
3543
|
-
|
|
3371
|
+
function We({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.png", maxSizeMb: d = 5, required: f, error: p }) {
|
|
3372
|
+
let [m, h] = c(null), [g, _] = c(!1), v = s(null), y = a(), b = o || y;
|
|
3373
|
+
i(() => {
|
|
3544
3374
|
if (r instanceof File) {
|
|
3545
3375
|
let e = URL.createObjectURL(r);
|
|
3546
|
-
return
|
|
3376
|
+
return h(e), () => URL.revokeObjectURL(e);
|
|
3547
3377
|
}
|
|
3548
|
-
|
|
3378
|
+
h(null);
|
|
3549
3379
|
}, [r]);
|
|
3550
|
-
let
|
|
3551
|
-
let t =
|
|
3552
|
-
|
|
3553
|
-
|
|
3380
|
+
let S = r?.url || m, C = (e) => {
|
|
3381
|
+
let t = H(e, {
|
|
3382
|
+
accept: u,
|
|
3383
|
+
maxSizeMb: d
|
|
3384
|
+
});
|
|
3385
|
+
return t ? ($(t, "error"), !1) : (l(e), !0);
|
|
3386
|
+
}, w = (e) => {
|
|
3554
3387
|
let t = e.target.files?.[0] || null;
|
|
3555
|
-
t && (
|
|
3556
|
-
},
|
|
3557
|
-
e.preventDefault(),
|
|
3388
|
+
t && (C(t) || (e.target.value = ""));
|
|
3389
|
+
}, T = (e) => {
|
|
3390
|
+
e.preventDefault(), _(!1);
|
|
3558
3391
|
let t = e.dataTransfer.files?.[0];
|
|
3559
|
-
t &&
|
|
3560
|
-
},
|
|
3561
|
-
id:
|
|
3562
|
-
name:
|
|
3563
|
-
ref:
|
|
3392
|
+
t && C(t);
|
|
3393
|
+
}, E = () => v.current?.click(), D = /* @__PURE__ */ t("input", {
|
|
3394
|
+
id: b,
|
|
3395
|
+
name: o,
|
|
3396
|
+
ref: v,
|
|
3564
3397
|
type: "file",
|
|
3565
|
-
accept:
|
|
3398
|
+
accept: u,
|
|
3566
3399
|
hidden: !0,
|
|
3567
3400
|
onClick: (e) => {
|
|
3568
3401
|
e.currentTarget.value = "";
|
|
3569
3402
|
},
|
|
3570
|
-
onChange:
|
|
3403
|
+
onChange: w
|
|
3571
3404
|
});
|
|
3572
3405
|
return /* @__PURE__ */ n("div", {
|
|
3573
3406
|
className: "field",
|
|
3574
3407
|
children: [
|
|
3575
3408
|
/* @__PURE__ */ n("label", {
|
|
3576
3409
|
className: "label",
|
|
3577
|
-
htmlFor:
|
|
3578
|
-
children: [e,
|
|
3410
|
+
htmlFor: b,
|
|
3411
|
+
children: [e, f && /* @__PURE__ */ t(W, {})]
|
|
3579
3412
|
}),
|
|
3580
|
-
|
|
3581
|
-
className: `file-preview${
|
|
3413
|
+
S ? /* @__PURE__ */ n("div", {
|
|
3414
|
+
className: `file-preview${p ? " error" : ""}`,
|
|
3582
3415
|
children: [
|
|
3583
3416
|
/* @__PURE__ */ n("button", {
|
|
3584
3417
|
type: "button",
|
|
3585
3418
|
className: "file-preview-open",
|
|
3586
3419
|
"aria-label": `Change ${e}`,
|
|
3587
|
-
onClick:
|
|
3420
|
+
onClick: E,
|
|
3588
3421
|
children: [/* @__PURE__ */ t("img", {
|
|
3589
|
-
src:
|
|
3422
|
+
src: S,
|
|
3590
3423
|
alt: `${e} preview`,
|
|
3591
3424
|
className: "file-preview-img"
|
|
3592
3425
|
}), /* @__PURE__ */ t("span", {
|
|
3593
3426
|
className: "file-preview-overlay",
|
|
3594
3427
|
children: /* @__PURE__ */ n("span", {
|
|
3595
3428
|
className: "file-preview-cta",
|
|
3596
|
-
children: [/* @__PURE__ */ t(
|
|
3429
|
+
children: [/* @__PURE__ */ t(x, {
|
|
3597
3430
|
name: "image",
|
|
3598
|
-
size: 16
|
|
3599
|
-
variant: "Linear"
|
|
3431
|
+
size: 16
|
|
3600
3432
|
}), " Change image"]
|
|
3601
3433
|
})
|
|
3602
3434
|
})]
|
|
@@ -3606,34 +3438,32 @@ function Ye({ label: e, value: r, name: i, onPick: a, accept: c = ".jpg,.jpeg,.p
|
|
|
3606
3438
|
className: "file-preview-remove",
|
|
3607
3439
|
"aria-label": `Remove ${e}`,
|
|
3608
3440
|
title: "Remove image",
|
|
3609
|
-
onClick: () =>
|
|
3610
|
-
children: /* @__PURE__ */ t(
|
|
3441
|
+
onClick: () => l(null),
|
|
3442
|
+
children: /* @__PURE__ */ t(x, {
|
|
3611
3443
|
name: "x",
|
|
3612
|
-
size: 16
|
|
3613
|
-
variant: "Linear"
|
|
3444
|
+
size: 16
|
|
3614
3445
|
})
|
|
3615
3446
|
}),
|
|
3616
|
-
|
|
3447
|
+
D
|
|
3617
3448
|
]
|
|
3618
3449
|
}) : /* @__PURE__ */ n("div", {
|
|
3619
|
-
className: `file-input file-input-tall${
|
|
3450
|
+
className: `file-input file-input-tall${g ? " dragging" : ""}${p ? " error" : ""}`,
|
|
3620
3451
|
onDragOver: (e) => {
|
|
3621
|
-
e.preventDefault(),
|
|
3452
|
+
e.preventDefault(), g || _(!0);
|
|
3622
3453
|
},
|
|
3623
3454
|
onDragLeave: (e) => {
|
|
3624
|
-
e.preventDefault(),
|
|
3455
|
+
e.preventDefault(), _(!1);
|
|
3625
3456
|
},
|
|
3626
|
-
onDrop:
|
|
3457
|
+
onDrop: T,
|
|
3627
3458
|
children: [/* @__PURE__ */ n("label", {
|
|
3628
|
-
htmlFor:
|
|
3459
|
+
htmlFor: b,
|
|
3629
3460
|
className: "file-input-zone-label",
|
|
3630
3461
|
children: [
|
|
3631
3462
|
/* @__PURE__ */ t("span", {
|
|
3632
3463
|
className: "file-input-icon",
|
|
3633
|
-
children: /* @__PURE__ */ t(
|
|
3464
|
+
children: /* @__PURE__ */ t(x, {
|
|
3634
3465
|
name: "upload",
|
|
3635
|
-
size: 24
|
|
3636
|
-
variant: "Linear"
|
|
3466
|
+
size: 24
|
|
3637
3467
|
})
|
|
3638
3468
|
}),
|
|
3639
3469
|
/* @__PURE__ */ n("span", {
|
|
@@ -3643,91 +3473,162 @@ function Ye({ label: e, value: r, name: i, onPick: a, accept: c = ".jpg,.jpeg,.p
|
|
|
3643
3473
|
children: "Click to upload"
|
|
3644
3474
|
}), " or drag & drop"]
|
|
3645
3475
|
}),
|
|
3646
|
-
/* @__PURE__ */
|
|
3476
|
+
/* @__PURE__ */ n("span", {
|
|
3647
3477
|
className: "file-input-text",
|
|
3648
|
-
children:
|
|
3478
|
+
children: [
|
|
3479
|
+
"JPG, JPEG or PNG · up to ",
|
|
3480
|
+
d,
|
|
3481
|
+
" MB"
|
|
3482
|
+
]
|
|
3649
3483
|
})
|
|
3650
3484
|
]
|
|
3651
|
-
}),
|
|
3485
|
+
}), D]
|
|
3652
3486
|
}),
|
|
3653
|
-
|
|
3487
|
+
p && /* @__PURE__ */ t("div", {
|
|
3654
3488
|
className: "field-error",
|
|
3655
|
-
children:
|
|
3489
|
+
children: p
|
|
3490
|
+
})
|
|
3491
|
+
]
|
|
3492
|
+
});
|
|
3493
|
+
}
|
|
3494
|
+
//#endregion
|
|
3495
|
+
//#region src/components/AppInfoList.jsx
|
|
3496
|
+
function Ge({ items: r = [], className: i = "" }) {
|
|
3497
|
+
return /* @__PURE__ */ t("div", {
|
|
3498
|
+
className: `info-list${i ? ` ${i}` : ""}`,
|
|
3499
|
+
children: r.map((r, i) => {
|
|
3500
|
+
let a = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
3501
|
+
className: "info-icon",
|
|
3502
|
+
children: /* @__PURE__ */ t(x, {
|
|
3503
|
+
name: r.icon,
|
|
3504
|
+
size: 16
|
|
3505
|
+
})
|
|
3506
|
+
}), /* @__PURE__ */ n("span", {
|
|
3507
|
+
className: "info-meta",
|
|
3508
|
+
children: [/* @__PURE__ */ t("span", {
|
|
3509
|
+
className: "info-key",
|
|
3510
|
+
children: r.label
|
|
3511
|
+
}), /* @__PURE__ */ t("span", {
|
|
3512
|
+
className: "info-value",
|
|
3513
|
+
children: r.value
|
|
3514
|
+
})]
|
|
3515
|
+
})] }), o = r.key ?? `${r.label}-${i}`;
|
|
3516
|
+
return r.href ? /* @__PURE__ */ t("a", {
|
|
3517
|
+
className: "info-row",
|
|
3518
|
+
href: r.href,
|
|
3519
|
+
children: a
|
|
3520
|
+
}, o) : /* @__PURE__ */ t("div", {
|
|
3521
|
+
className: "info-row",
|
|
3522
|
+
children: a
|
|
3523
|
+
}, o);
|
|
3524
|
+
})
|
|
3525
|
+
});
|
|
3526
|
+
}
|
|
3527
|
+
//#endregion
|
|
3528
|
+
//#region src/components/AppKpiTile.jsx
|
|
3529
|
+
function Ke({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "" }) {
|
|
3530
|
+
let l = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, u = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
|
|
3531
|
+
return /* @__PURE__ */ n("div", {
|
|
3532
|
+
className: l,
|
|
3533
|
+
children: [
|
|
3534
|
+
i && /* @__PURE__ */ t("span", {
|
|
3535
|
+
className: "kpi-icon",
|
|
3536
|
+
children: /* @__PURE__ */ t(x, {
|
|
3537
|
+
name: i,
|
|
3538
|
+
size: 20
|
|
3539
|
+
})
|
|
3540
|
+
}),
|
|
3541
|
+
/* @__PURE__ */ t("div", {
|
|
3542
|
+
className: "kpi-label",
|
|
3543
|
+
children: e
|
|
3544
|
+
}),
|
|
3545
|
+
/* @__PURE__ */ t("div", {
|
|
3546
|
+
className: "kpi-value",
|
|
3547
|
+
children: r
|
|
3548
|
+
}),
|
|
3549
|
+
a && /* @__PURE__ */ n("div", {
|
|
3550
|
+
className: `kpi-delta${o === "flat" ? "" : ` ${o}`}`,
|
|
3551
|
+
children: [u && /* @__PURE__ */ t(x, {
|
|
3552
|
+
name: u,
|
|
3553
|
+
size: 13
|
|
3554
|
+
}), a]
|
|
3656
3555
|
})
|
|
3657
3556
|
]
|
|
3658
3557
|
});
|
|
3659
3558
|
}
|
|
3660
3559
|
//#endregion
|
|
3661
3560
|
//#region src/components/AppLogoPicker.jsx
|
|
3662
|
-
function
|
|
3663
|
-
let
|
|
3561
|
+
function qe({ value: r, fallback: i, name: a, onPick: o, loading: c = !1, accept: l = "image/png,image/jpeg", maxSizeMb: u = 5, overlayIcon: d = "image", overlayLabel: f = "Update photo", ariaLabel: p = "Upload photo" }) {
|
|
3562
|
+
let m = s(null);
|
|
3664
3563
|
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("button", {
|
|
3665
3564
|
type: "button",
|
|
3666
3565
|
className: "set-uploader",
|
|
3667
|
-
"aria-busy":
|
|
3668
|
-
disabled:
|
|
3566
|
+
"aria-busy": c || void 0,
|
|
3567
|
+
disabled: c,
|
|
3669
3568
|
onClick: () => {
|
|
3670
|
-
|
|
3569
|
+
c || m.current?.click();
|
|
3671
3570
|
},
|
|
3672
|
-
"aria-label":
|
|
3673
|
-
children: /* @__PURE__ */ n("
|
|
3571
|
+
"aria-label": p,
|
|
3572
|
+
children: /* @__PURE__ */ n("span", {
|
|
3674
3573
|
className: "set-uploader-ring",
|
|
3675
3574
|
children: [r ? /* @__PURE__ */ t("img", {
|
|
3676
3575
|
className: "set-uploader-img",
|
|
3677
3576
|
src: r,
|
|
3678
3577
|
alt: ""
|
|
3679
|
-
}) : /* @__PURE__ */ t("
|
|
3578
|
+
}) : /* @__PURE__ */ t("span", {
|
|
3680
3579
|
className: "set-uploader-logo",
|
|
3681
3580
|
children: i
|
|
3682
|
-
}),
|
|
3581
|
+
}), c ? /* @__PURE__ */ t("span", {
|
|
3683
3582
|
className: "set-uploader-overlay is-loading",
|
|
3684
3583
|
"aria-hidden": "true",
|
|
3685
|
-
children: /* @__PURE__ */ t(
|
|
3584
|
+
children: /* @__PURE__ */ t(x, {
|
|
3686
3585
|
name: "refresh-cw",
|
|
3687
3586
|
size: 22,
|
|
3688
|
-
variant: "Linear",
|
|
3689
3587
|
className: "lx-spin"
|
|
3690
3588
|
})
|
|
3691
|
-
}) : /* @__PURE__ */ n("
|
|
3589
|
+
}) : /* @__PURE__ */ n("span", {
|
|
3692
3590
|
className: "set-uploader-overlay",
|
|
3693
|
-
children: [/* @__PURE__ */ t(
|
|
3694
|
-
name:
|
|
3695
|
-
size: 22
|
|
3696
|
-
|
|
3697
|
-
}), /* @__PURE__ */ t("span", { children: u })]
|
|
3591
|
+
children: [/* @__PURE__ */ t(x, {
|
|
3592
|
+
name: d,
|
|
3593
|
+
size: 22
|
|
3594
|
+
}), /* @__PURE__ */ t("span", { children: f })]
|
|
3698
3595
|
})]
|
|
3699
3596
|
})
|
|
3700
3597
|
}), /* @__PURE__ */ t("input", {
|
|
3701
|
-
ref:
|
|
3598
|
+
ref: m,
|
|
3702
3599
|
type: "file",
|
|
3600
|
+
name: a,
|
|
3703
3601
|
hidden: !0,
|
|
3704
|
-
accept:
|
|
3602
|
+
accept: l,
|
|
3705
3603
|
onChange: (e) => {
|
|
3706
3604
|
let t = e.target.files?.[0];
|
|
3707
3605
|
if (e.target.value = "", !t) return;
|
|
3708
|
-
let n =
|
|
3606
|
+
let n = H(t, {
|
|
3607
|
+
accept: l,
|
|
3608
|
+
maxSizeMb: u
|
|
3609
|
+
});
|
|
3709
3610
|
if (n) {
|
|
3710
3611
|
$(n, "error");
|
|
3711
3612
|
return;
|
|
3712
3613
|
}
|
|
3713
|
-
|
|
3614
|
+
o(t);
|
|
3714
3615
|
},
|
|
3715
|
-
disabled:
|
|
3616
|
+
disabled: c
|
|
3716
3617
|
})] });
|
|
3717
3618
|
}
|
|
3718
3619
|
//#endregion
|
|
3719
3620
|
//#region src/components/AppMultiSelect.jsx
|
|
3720
|
-
function
|
|
3721
|
-
let _ =
|
|
3722
|
-
return
|
|
3621
|
+
function Je({ values: e, onChange: r, options: a, placeholder: o = "Select…", searchPlaceholder: c = "Search…", searchable: l = !0, disabled: u = !1, name: d, label: f, error: p, hint: m, required: h = !1, fieldClassName: g = "" }) {
|
|
3622
|
+
let _ = s(null);
|
|
3623
|
+
return i(() => {
|
|
3723
3624
|
let e = _.current;
|
|
3724
|
-
e && (e.options =
|
|
3725
|
-
}, [
|
|
3625
|
+
e && (e.options = a || []);
|
|
3626
|
+
}, [a]), i(() => {
|
|
3726
3627
|
let t = _.current;
|
|
3727
3628
|
if (!t) return;
|
|
3728
3629
|
let n = e || [], r = t.values || [];
|
|
3729
3630
|
n.join(",") !== r.join(",") && (t.values = n);
|
|
3730
|
-
}, [e]),
|
|
3631
|
+
}, [e]), i(() => {
|
|
3731
3632
|
let e = _.current;
|
|
3732
3633
|
if (!e) return;
|
|
3733
3634
|
let t = () => r?.(e.values);
|
|
@@ -3738,15 +3639,15 @@ function Ze({ values: e, onChange: r, options: i, placeholder: a = "Select…",
|
|
|
3738
3639
|
f && /* @__PURE__ */ n("label", {
|
|
3739
3640
|
className: "label",
|
|
3740
3641
|
htmlFor: d,
|
|
3741
|
-
children: [f, h && /* @__PURE__ */ t(
|
|
3642
|
+
children: [f, h && /* @__PURE__ */ t(W, {})]
|
|
3742
3643
|
}),
|
|
3743
3644
|
/* @__PURE__ */ t("wui-multiselect", {
|
|
3744
3645
|
id: d,
|
|
3745
3646
|
ref: _,
|
|
3746
3647
|
name: d,
|
|
3747
|
-
placeholder:
|
|
3748
|
-
"search-placeholder":
|
|
3749
|
-
searchable:
|
|
3648
|
+
placeholder: o,
|
|
3649
|
+
"search-placeholder": c,
|
|
3650
|
+
searchable: l ? "" : void 0,
|
|
3750
3651
|
disabled: u ? "" : void 0
|
|
3751
3652
|
}),
|
|
3752
3653
|
p ? /* @__PURE__ */ t("div", {
|
|
@@ -3761,7 +3662,7 @@ function Ze({ values: e, onChange: r, options: i, placeholder: a = "Select…",
|
|
|
3761
3662
|
}
|
|
3762
3663
|
//#endregion
|
|
3763
3664
|
//#region src/components/AppPageHeader.jsx
|
|
3764
|
-
function
|
|
3665
|
+
function Ye({ title: e, subtitle: r, actions: i, className: a = "" }) {
|
|
3765
3666
|
return /* @__PURE__ */ n("div", {
|
|
3766
3667
|
className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
|
|
3767
3668
|
children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
|
|
@@ -3778,12 +3679,12 @@ function Qe({ title: e, subtitle: r, actions: i, className: a = "" }) {
|
|
|
3778
3679
|
}
|
|
3779
3680
|
//#endregion
|
|
3780
3681
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
3781
|
-
function
|
|
3782
|
-
let m =
|
|
3783
|
-
return
|
|
3682
|
+
function Xe({ value: e, onChange: r, country: a, disabled: o = !1, name: c, label: l = "Phone number", placeholder: u = "Enter phone number", required: d = !1, error: f, fieldClassName: p = "" }) {
|
|
3683
|
+
let m = s(null);
|
|
3684
|
+
return i(() => {
|
|
3784
3685
|
let t = m.current;
|
|
3785
3686
|
t && t.value !== (e ?? "") && (t.value = e ?? "");
|
|
3786
|
-
}, [e]),
|
|
3687
|
+
}, [e]), i(() => {
|
|
3787
3688
|
let e = m.current;
|
|
3788
3689
|
if (!e) return;
|
|
3789
3690
|
let t = () => r?.(e.value);
|
|
@@ -3791,17 +3692,17 @@ function $e({ value: e, onChange: r, country: i, disabled: a = !1, name: s, labe
|
|
|
3791
3692
|
}, [r]), /* @__PURE__ */ n("div", {
|
|
3792
3693
|
className: `field app-phone-number-input${p ? ` ${p}` : ""}`,
|
|
3793
3694
|
children: [
|
|
3794
|
-
|
|
3695
|
+
l && /* @__PURE__ */ n("label", {
|
|
3795
3696
|
className: "label",
|
|
3796
|
-
htmlFor:
|
|
3797
|
-
children: [
|
|
3697
|
+
htmlFor: c,
|
|
3698
|
+
children: [l, d && /* @__PURE__ */ t(W, {})]
|
|
3798
3699
|
}),
|
|
3799
3700
|
/* @__PURE__ */ t("wui-phone", {
|
|
3800
3701
|
ref: m,
|
|
3801
|
-
name:
|
|
3802
|
-
country:
|
|
3702
|
+
name: c,
|
|
3703
|
+
country: a,
|
|
3803
3704
|
placeholder: u,
|
|
3804
|
-
disabled:
|
|
3705
|
+
disabled: o ? "" : void 0
|
|
3805
3706
|
}),
|
|
3806
3707
|
f && /* @__PURE__ */ t("div", {
|
|
3807
3708
|
className: "field-error",
|
|
@@ -3811,18 +3712,71 @@ function $e({ value: e, onChange: r, country: i, disabled: a = !1, name: s, labe
|
|
|
3811
3712
|
});
|
|
3812
3713
|
}
|
|
3813
3714
|
//#endregion
|
|
3715
|
+
//#region src/components/AppPricingCard.jsx
|
|
3716
|
+
function Ze({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s, featured: c = !1, current: l = !1, badge: u = "Most popular", className: d = "" }) {
|
|
3717
|
+
return /* @__PURE__ */ n("div", {
|
|
3718
|
+
className: [
|
|
3719
|
+
"plan-card",
|
|
3720
|
+
c ? "featured" : "",
|
|
3721
|
+
l ? "current" : "",
|
|
3722
|
+
d
|
|
3723
|
+
].filter(Boolean).join(" "),
|
|
3724
|
+
children: [
|
|
3725
|
+
c && u && /* @__PURE__ */ t("span", {
|
|
3726
|
+
className: "plan-badge",
|
|
3727
|
+
children: u
|
|
3728
|
+
}),
|
|
3729
|
+
/* @__PURE__ */ t("div", {
|
|
3730
|
+
className: "plan-name",
|
|
3731
|
+
children: e
|
|
3732
|
+
}),
|
|
3733
|
+
/* @__PURE__ */ n("div", {
|
|
3734
|
+
className: "plan-price",
|
|
3735
|
+
children: [r, i && /* @__PURE__ */ t("span", {
|
|
3736
|
+
className: "plan-price-unit",
|
|
3737
|
+
children: i
|
|
3738
|
+
})]
|
|
3739
|
+
}),
|
|
3740
|
+
a && /* @__PURE__ */ t("div", {
|
|
3741
|
+
className: "plan-tagline",
|
|
3742
|
+
children: a
|
|
3743
|
+
}),
|
|
3744
|
+
o.length > 0 && /* @__PURE__ */ t("ul", {
|
|
3745
|
+
className: "plan-features",
|
|
3746
|
+
children: o.map((e) => {
|
|
3747
|
+
let r = e.included !== !1;
|
|
3748
|
+
return /* @__PURE__ */ n("li", {
|
|
3749
|
+
className: r ? void 0 : "excluded",
|
|
3750
|
+
children: [/* @__PURE__ */ t("span", {
|
|
3751
|
+
className: "plan-feature-icon",
|
|
3752
|
+
children: /* @__PURE__ */ t(x, {
|
|
3753
|
+
name: r ? "check" : "x",
|
|
3754
|
+
size: 16
|
|
3755
|
+
})
|
|
3756
|
+
}), e.text]
|
|
3757
|
+
}, e.text);
|
|
3758
|
+
})
|
|
3759
|
+
}),
|
|
3760
|
+
s && /* @__PURE__ */ t("div", {
|
|
3761
|
+
className: "plan-cta",
|
|
3762
|
+
children: s
|
|
3763
|
+
})
|
|
3764
|
+
]
|
|
3765
|
+
});
|
|
3766
|
+
}
|
|
3767
|
+
//#endregion
|
|
3814
3768
|
//#region src/components/AppRadio.jsx
|
|
3815
|
-
var
|
|
3816
|
-
let l =
|
|
3769
|
+
var Qe = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
3770
|
+
let l = a(), u = r || i || l;
|
|
3817
3771
|
return /* @__PURE__ */ n("div", {
|
|
3818
|
-
className: `form-check${
|
|
3772
|
+
className: `form-check${o ? ` ${o}` : ""}`,
|
|
3819
3773
|
children: [/* @__PURE__ */ t("input", {
|
|
3820
3774
|
type: "radio",
|
|
3821
3775
|
className: "form-check-input",
|
|
3822
3776
|
id: u,
|
|
3823
3777
|
name: i,
|
|
3824
3778
|
ref: c,
|
|
3825
|
-
...
|
|
3779
|
+
...s
|
|
3826
3780
|
}), e != null && /* @__PURE__ */ t("label", {
|
|
3827
3781
|
className: "form-check-label",
|
|
3828
3782
|
htmlFor: u,
|
|
@@ -3831,6 +3785,84 @@ var et = i(function({ label: e, id: r, name: i, className: a = "", ...o }, c) {
|
|
|
3831
3785
|
});
|
|
3832
3786
|
});
|
|
3833
3787
|
//#endregion
|
|
3788
|
+
//#region src/components/AppRepeater.jsx
|
|
3789
|
+
function $e({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "Add another", removeLabel: s = "Remove row", emptyText: c, min: l = 0, max: u, numbered: d = !0, className: f = "" }) {
|
|
3790
|
+
let p = typeof u == "number" && e.length >= u, m = !!a && e.length > l;
|
|
3791
|
+
return /* @__PURE__ */ n("div", {
|
|
3792
|
+
className: `repeater${f ? ` ${f}` : ""}`,
|
|
3793
|
+
children: [
|
|
3794
|
+
e.length === 0 && c && /* @__PURE__ */ t("div", {
|
|
3795
|
+
className: "repeater-empty",
|
|
3796
|
+
children: c
|
|
3797
|
+
}),
|
|
3798
|
+
e.map((e, i) => /* @__PURE__ */ n("div", {
|
|
3799
|
+
className: "repeater-row",
|
|
3800
|
+
children: [
|
|
3801
|
+
d && /* @__PURE__ */ t("span", {
|
|
3802
|
+
className: "repeater-index",
|
|
3803
|
+
children: i + 1
|
|
3804
|
+
}),
|
|
3805
|
+
/* @__PURE__ */ t("div", {
|
|
3806
|
+
className: "repeater-body",
|
|
3807
|
+
children: r(e, i)
|
|
3808
|
+
}),
|
|
3809
|
+
m && /* @__PURE__ */ t(S, {
|
|
3810
|
+
icon: "trash-2",
|
|
3811
|
+
label: `${s} ${i + 1}`,
|
|
3812
|
+
danger: !0,
|
|
3813
|
+
className: "repeater-remove",
|
|
3814
|
+
onClick: () => a(i)
|
|
3815
|
+
})
|
|
3816
|
+
]
|
|
3817
|
+
}, e.id ?? i)),
|
|
3818
|
+
/* @__PURE__ */ t(K, {
|
|
3819
|
+
variant: "secondary",
|
|
3820
|
+
size: "sm",
|
|
3821
|
+
leftIcon: /* @__PURE__ */ t(x, {
|
|
3822
|
+
name: "plus",
|
|
3823
|
+
size: 14,
|
|
3824
|
+
className: "me-1"
|
|
3825
|
+
}),
|
|
3826
|
+
className: "repeater-add",
|
|
3827
|
+
disabled: p,
|
|
3828
|
+
onClick: i,
|
|
3829
|
+
children: o
|
|
3830
|
+
})
|
|
3831
|
+
]
|
|
3832
|
+
});
|
|
3833
|
+
}
|
|
3834
|
+
//#endregion
|
|
3835
|
+
//#region src/components/AppResourceCard.jsx
|
|
3836
|
+
function et({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "" }) {
|
|
3837
|
+
let u = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
3838
|
+
className: "res-card-icon",
|
|
3839
|
+
children: /* @__PURE__ */ t(x, {
|
|
3840
|
+
name: r,
|
|
3841
|
+
size: 18
|
|
3842
|
+
})
|
|
3843
|
+
}), /* @__PURE__ */ n("span", {
|
|
3844
|
+
className: "res-card-body",
|
|
3845
|
+
children: [/* @__PURE__ */ t("span", {
|
|
3846
|
+
className: "res-card-title",
|
|
3847
|
+
children: i
|
|
3848
|
+
}), a && /* @__PURE__ */ t("span", {
|
|
3849
|
+
className: "res-card-text",
|
|
3850
|
+
children: a
|
|
3851
|
+
})]
|
|
3852
|
+
})] }), d = `res-card${l ? ` ${l}` : ""}`;
|
|
3853
|
+
return c && !s ? /* @__PURE__ */ t(c, {
|
|
3854
|
+
className: d,
|
|
3855
|
+
to: o,
|
|
3856
|
+
children: u
|
|
3857
|
+
}) : /* @__PURE__ */ t("a", {
|
|
3858
|
+
className: d,
|
|
3859
|
+
href: o,
|
|
3860
|
+
target: s ? "_blank" : void 0,
|
|
3861
|
+
rel: s ? "noopener noreferrer" : void 0,
|
|
3862
|
+
children: u
|
|
3863
|
+
});
|
|
3864
|
+
}
|
|
3865
|
+
//#endregion
|
|
3834
3866
|
//#region src/components/AppSearch.jsx
|
|
3835
3867
|
function tt({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize: o = 18, className: s = "", ...c }) {
|
|
3836
3868
|
return /* @__PURE__ */ n("div", {
|
|
@@ -3840,12 +3872,12 @@ function tt({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize
|
|
|
3840
3872
|
s
|
|
3841
3873
|
].filter(Boolean).join(" "),
|
|
3842
3874
|
children: [
|
|
3843
|
-
/* @__PURE__ */ t(
|
|
3875
|
+
/* @__PURE__ */ t(x, {
|
|
3844
3876
|
name: "search",
|
|
3845
3877
|
size: o,
|
|
3846
3878
|
className: "search-icon"
|
|
3847
3879
|
}),
|
|
3848
|
-
/* @__PURE__ */ t(
|
|
3880
|
+
/* @__PURE__ */ t(p.Control, {
|
|
3849
3881
|
type: "search",
|
|
3850
3882
|
className: "input search-input",
|
|
3851
3883
|
placeholder: i,
|
|
@@ -3859,29 +3891,56 @@ function tt({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize
|
|
|
3859
3891
|
className: "search-clear",
|
|
3860
3892
|
"aria-label": "Clear search",
|
|
3861
3893
|
onClick: () => r(""),
|
|
3862
|
-
children: /* @__PURE__ */ t(
|
|
3894
|
+
children: /* @__PURE__ */ t(x, {
|
|
3863
3895
|
name: "x",
|
|
3864
|
-
size: 16
|
|
3865
|
-
variant: "Bulk"
|
|
3896
|
+
size: 16
|
|
3866
3897
|
})
|
|
3867
3898
|
})
|
|
3868
3899
|
]
|
|
3869
3900
|
});
|
|
3870
3901
|
}
|
|
3871
3902
|
//#endregion
|
|
3903
|
+
//#region src/components/AppSegmented.jsx
|
|
3904
|
+
function nt({ options: e = [], value: r, onChange: i, label: o, name: s, size: c = "md", className: l = "" }) {
|
|
3905
|
+
let u = a(), d = s || u;
|
|
3906
|
+
return /* @__PURE__ */ t("div", {
|
|
3907
|
+
className: `segmented${c === "sm" ? " segmented-sm" : ""}${l ? ` ${l}` : ""}`,
|
|
3908
|
+
role: "radiogroup",
|
|
3909
|
+
"aria-label": o,
|
|
3910
|
+
children: e.map((e) => /* @__PURE__ */ n("label", {
|
|
3911
|
+
className: "segmented-option",
|
|
3912
|
+
children: [
|
|
3913
|
+
/* @__PURE__ */ t("input", {
|
|
3914
|
+
type: "radio",
|
|
3915
|
+
className: "segmented-input",
|
|
3916
|
+
name: d,
|
|
3917
|
+
value: e.value,
|
|
3918
|
+
checked: e.value === r,
|
|
3919
|
+
onChange: () => i?.(e.value)
|
|
3920
|
+
}),
|
|
3921
|
+
e.icon && /* @__PURE__ */ t(x, {
|
|
3922
|
+
name: e.icon,
|
|
3923
|
+
size: 13
|
|
3924
|
+
}),
|
|
3925
|
+
e.label
|
|
3926
|
+
]
|
|
3927
|
+
}, e.value))
|
|
3928
|
+
});
|
|
3929
|
+
}
|
|
3930
|
+
//#endregion
|
|
3872
3931
|
//#region src/components/AppSelect.jsx
|
|
3873
|
-
var
|
|
3874
|
-
function
|
|
3875
|
-
let b =
|
|
3876
|
-
|
|
3877
|
-
b.current && (b.current.options =
|
|
3932
|
+
var rt = (e) => e == null ? "" : e.label ?? e.text ?? "";
|
|
3933
|
+
function it({ value: e, onChange: r, options: a = [], placeholder: o = "Select...", searchPlaceholder: c = "Search...", searchable: l = !1, disabled: u, label: d, required: f = !1, error: p, hint: m, help: h, helpLabel: g = "More information", id: _, name: v, fieldClassName: y = "" }) {
|
|
3934
|
+
let b = s(null);
|
|
3935
|
+
i(() => {
|
|
3936
|
+
b.current && (b.current.options = a.map((e) => ({
|
|
3878
3937
|
value: e.value,
|
|
3879
|
-
label:
|
|
3938
|
+
label: rt(e)
|
|
3880
3939
|
})));
|
|
3881
|
-
}, [
|
|
3940
|
+
}, [a]), i(() => {
|
|
3882
3941
|
let t = b.current;
|
|
3883
3942
|
t && String(t.value ?? "") !== String(e ?? "") && (t.value = e ?? "");
|
|
3884
|
-
}, [e]),
|
|
3943
|
+
}, [e]), i(() => {
|
|
3885
3944
|
let e = b.current;
|
|
3886
3945
|
if (!e) return;
|
|
3887
3946
|
let t = () => r?.(e.value);
|
|
@@ -3891,9 +3950,9 @@ function rt({ value: e, onChange: r, options: i = [], placeholder: a = "Select..
|
|
|
3891
3950
|
ref: b,
|
|
3892
3951
|
id: _ || v,
|
|
3893
3952
|
name: v,
|
|
3894
|
-
placeholder:
|
|
3895
|
-
"search-placeholder":
|
|
3896
|
-
searchable:
|
|
3953
|
+
placeholder: o,
|
|
3954
|
+
"search-placeholder": c,
|
|
3955
|
+
searchable: l ? "" : void 0,
|
|
3897
3956
|
disabled: u ? "" : void 0
|
|
3898
3957
|
});
|
|
3899
3958
|
if (!d && !p && !m) return x;
|
|
@@ -3906,11 +3965,11 @@ function rt({ value: e, onChange: r, options: i = [], placeholder: a = "Select..
|
|
|
3906
3965
|
htmlFor: S,
|
|
3907
3966
|
children: [
|
|
3908
3967
|
d,
|
|
3909
|
-
h && /* @__PURE__ */ t(
|
|
3968
|
+
h && /* @__PURE__ */ t(q, {
|
|
3910
3969
|
label: g,
|
|
3911
3970
|
children: h
|
|
3912
3971
|
}),
|
|
3913
|
-
f && /* @__PURE__ */ t(
|
|
3972
|
+
f && /* @__PURE__ */ t(W, {})
|
|
3914
3973
|
]
|
|
3915
3974
|
}),
|
|
3916
3975
|
x,
|
|
@@ -3925,8 +3984,147 @@ function rt({ value: e, onChange: r, options: i = [], placeholder: a = "Select..
|
|
|
3925
3984
|
});
|
|
3926
3985
|
}
|
|
3927
3986
|
//#endregion
|
|
3987
|
+
//#region src/components/AppShell.jsx
|
|
3988
|
+
function at({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbarEnd: s, footer: l, children: u, collapsed: d, onCollapsedChange: f, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "" }) {
|
|
3989
|
+
let [_, v] = c(!1), [y, b] = c(!1), [S, C] = c(!1), w = d ?? _;
|
|
3990
|
+
return i(() => {
|
|
3991
|
+
let e = () => C(window.scrollY > 4);
|
|
3992
|
+
return e(), window.addEventListener("scroll", e, { passive: !0 }), () => window.removeEventListener("scroll", e);
|
|
3993
|
+
}, []), i(() => {
|
|
3994
|
+
if (!y) return;
|
|
3995
|
+
let e = (e) => {
|
|
3996
|
+
e.key === "Escape" && b(!1);
|
|
3997
|
+
};
|
|
3998
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
3999
|
+
}, [y]), /* @__PURE__ */ n("div", {
|
|
4000
|
+
className: [
|
|
4001
|
+
"app-shell",
|
|
4002
|
+
w ? "collapsed" : "",
|
|
4003
|
+
p ? "no-sidebar" : "",
|
|
4004
|
+
y ? "mobile-open" : "",
|
|
4005
|
+
g
|
|
4006
|
+
].filter(Boolean).join(" "),
|
|
4007
|
+
children: [
|
|
4008
|
+
/* @__PURE__ */ n("aside", {
|
|
4009
|
+
className: "app-sidebar",
|
|
4010
|
+
children: [
|
|
4011
|
+
r && /* @__PURE__ */ t("div", {
|
|
4012
|
+
className: "app-sidebar-brand",
|
|
4013
|
+
children: r
|
|
4014
|
+
}),
|
|
4015
|
+
/* @__PURE__ */ t("nav", {
|
|
4016
|
+
className: "app-sidebar-scroll",
|
|
4017
|
+
"aria-label": m,
|
|
4018
|
+
children: e.map((e, r) => /* @__PURE__ */ n("div", {
|
|
4019
|
+
className: "app-nav-group",
|
|
4020
|
+
children: [e.label && /* @__PURE__ */ t("div", {
|
|
4021
|
+
className: "app-nav-group-label",
|
|
4022
|
+
children: e.label
|
|
4023
|
+
}), e.items.map((e) => /* @__PURE__ */ t(ot, {
|
|
4024
|
+
item: e,
|
|
4025
|
+
linkComponent: h,
|
|
4026
|
+
onNavigate: () => b(!1)
|
|
4027
|
+
}, e.key ?? e.href))]
|
|
4028
|
+
}, e.label ?? `group-${r}`))
|
|
4029
|
+
}),
|
|
4030
|
+
a && /* @__PURE__ */ t("div", {
|
|
4031
|
+
className: "app-sidebar-foot",
|
|
4032
|
+
children: a
|
|
4033
|
+
})
|
|
4034
|
+
]
|
|
4035
|
+
}),
|
|
4036
|
+
!p && /* @__PURE__ */ t("button", {
|
|
4037
|
+
type: "button",
|
|
4038
|
+
className: "app-sidebar-toggle",
|
|
4039
|
+
onClick: () => {
|
|
4040
|
+
let e = !w;
|
|
4041
|
+
v(e), f?.(e);
|
|
4042
|
+
},
|
|
4043
|
+
"aria-label": w ? "Expand navigation" : "Collapse navigation",
|
|
4044
|
+
"aria-expanded": !w,
|
|
4045
|
+
children: /* @__PURE__ */ t(x, {
|
|
4046
|
+
name: "chevron-left",
|
|
4047
|
+
size: 14
|
|
4048
|
+
})
|
|
4049
|
+
}),
|
|
4050
|
+
/* @__PURE__ */ n("div", {
|
|
4051
|
+
className: "app-main",
|
|
4052
|
+
children: [
|
|
4053
|
+
/* @__PURE__ */ n("header", {
|
|
4054
|
+
className: `app-topbar${S ? " scrolled" : ""}`,
|
|
4055
|
+
children: [/* @__PURE__ */ n("div", {
|
|
4056
|
+
className: "app-topbar-start",
|
|
4057
|
+
children: [/* @__PURE__ */ t("button", {
|
|
4058
|
+
type: "button",
|
|
4059
|
+
className: "app-topbar-menu",
|
|
4060
|
+
onClick: () => b(!0),
|
|
4061
|
+
"aria-label": "Open navigation",
|
|
4062
|
+
"aria-expanded": y,
|
|
4063
|
+
children: /* @__PURE__ */ t(x, {
|
|
4064
|
+
name: "menu",
|
|
4065
|
+
size: 18
|
|
4066
|
+
})
|
|
4067
|
+
}), o]
|
|
4068
|
+
}), /* @__PURE__ */ t("div", {
|
|
4069
|
+
className: "app-topbar-end",
|
|
4070
|
+
children: s
|
|
4071
|
+
})]
|
|
4072
|
+
}),
|
|
4073
|
+
/* @__PURE__ */ t("main", {
|
|
4074
|
+
className: "app-content",
|
|
4075
|
+
children: u
|
|
4076
|
+
}),
|
|
4077
|
+
l && /* @__PURE__ */ t("footer", {
|
|
4078
|
+
className: "app-footer",
|
|
4079
|
+
children: l
|
|
4080
|
+
})
|
|
4081
|
+
]
|
|
4082
|
+
}),
|
|
4083
|
+
/* @__PURE__ */ t("button", {
|
|
4084
|
+
type: "button",
|
|
4085
|
+
className: "app-scrim",
|
|
4086
|
+
onClick: () => b(!1),
|
|
4087
|
+
"aria-label": "Close navigation",
|
|
4088
|
+
tabIndex: y ? 0 : -1
|
|
4089
|
+
})
|
|
4090
|
+
]
|
|
4091
|
+
});
|
|
4092
|
+
}
|
|
4093
|
+
function ot({ item: r, linkComponent: i, onNavigate: a }) {
|
|
4094
|
+
let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
|
|
4095
|
+
r.icon && /* @__PURE__ */ t("span", {
|
|
4096
|
+
className: "app-nav-icon",
|
|
4097
|
+
children: /* @__PURE__ */ t(x, {
|
|
4098
|
+
name: r.icon,
|
|
4099
|
+
size: 22
|
|
4100
|
+
})
|
|
4101
|
+
}),
|
|
4102
|
+
/* @__PURE__ */ t("span", {
|
|
4103
|
+
className: "app-nav-text",
|
|
4104
|
+
children: r.label
|
|
4105
|
+
}),
|
|
4106
|
+
r.badge != null && /* @__PURE__ */ t("span", {
|
|
4107
|
+
className: "app-nav-badge",
|
|
4108
|
+
children: r.badge
|
|
4109
|
+
})
|
|
4110
|
+
] }), c = r.active ? "page" : void 0;
|
|
4111
|
+
return i ? /* @__PURE__ */ t(i, {
|
|
4112
|
+
className: o,
|
|
4113
|
+
to: r.href,
|
|
4114
|
+
"aria-current": c,
|
|
4115
|
+
onClick: a,
|
|
4116
|
+
children: s
|
|
4117
|
+
}) : /* @__PURE__ */ t("a", {
|
|
4118
|
+
className: o,
|
|
4119
|
+
href: r.href,
|
|
4120
|
+
"aria-current": c,
|
|
4121
|
+
onClick: a,
|
|
4122
|
+
children: s
|
|
4123
|
+
});
|
|
4124
|
+
}
|
|
4125
|
+
//#endregion
|
|
3928
4126
|
//#region src/components/AppSidebarMenu.jsx
|
|
3929
|
-
var
|
|
4127
|
+
var st = {
|
|
3930
4128
|
left: "start",
|
|
3931
4129
|
right: "end",
|
|
3932
4130
|
start: "start",
|
|
@@ -3934,18 +4132,18 @@ var it = {
|
|
|
3934
4132
|
top: "top",
|
|
3935
4133
|
bottom: "bottom"
|
|
3936
4134
|
};
|
|
3937
|
-
function
|
|
3938
|
-
return /* @__PURE__ */ n(
|
|
4135
|
+
function ct({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, header: s, children: c, footer: l, width: u, backdrop: d = !0, scroll: f = !1, keyboard: p = !0, closeButton: m = !0, responsive: h, className: g = "", bodyClassName: _ = "", ariaLabel: y }) {
|
|
4136
|
+
return /* @__PURE__ */ n(v, {
|
|
3939
4137
|
show: e,
|
|
3940
4138
|
onHide: r,
|
|
3941
|
-
placement:
|
|
4139
|
+
placement: st[i] || "end",
|
|
3942
4140
|
backdrop: d,
|
|
3943
4141
|
scroll: f,
|
|
3944
4142
|
keyboard: p,
|
|
3945
4143
|
responsive: h,
|
|
3946
4144
|
style: u ? { "--asm-width": u } : void 0,
|
|
3947
4145
|
className: `app-sidebar-menu${g ? ` ${g}` : ""}`,
|
|
3948
|
-
"aria-label":
|
|
4146
|
+
"aria-label": y || (typeof a == "string" ? a : void 0),
|
|
3949
4147
|
children: [
|
|
3950
4148
|
s === void 0 ? (a != null || m) && /* @__PURE__ */ n("div", {
|
|
3951
4149
|
className: "drawer-header",
|
|
@@ -3953,22 +4151,23 @@ function at({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
|
|
|
3953
4151
|
className: "drawer-title",
|
|
3954
4152
|
children: [o && /* @__PURE__ */ t("span", {
|
|
3955
4153
|
className: "drawer-title-ic",
|
|
3956
|
-
children: /* @__PURE__ */ t(
|
|
4154
|
+
children: /* @__PURE__ */ t(x, {
|
|
3957
4155
|
name: o,
|
|
3958
|
-
size: 18
|
|
3959
|
-
variant: "Bulk"
|
|
4156
|
+
size: 18
|
|
3960
4157
|
})
|
|
3961
4158
|
}), a]
|
|
3962
|
-
}), m && /* @__PURE__ */ t(
|
|
4159
|
+
}), m && /* @__PURE__ */ t(K, {
|
|
3963
4160
|
variant: "ghost",
|
|
3964
4161
|
className: "btn-icon",
|
|
3965
4162
|
onClick: r,
|
|
3966
4163
|
"aria-label": "Close",
|
|
3967
|
-
|
|
3968
|
-
|
|
4164
|
+
children: /* @__PURE__ */ t(x, {
|
|
4165
|
+
name: "x",
|
|
4166
|
+
size: 16
|
|
4167
|
+
})
|
|
3969
4168
|
})]
|
|
3970
4169
|
}) : s,
|
|
3971
|
-
/* @__PURE__ */ t(
|
|
4170
|
+
/* @__PURE__ */ t(v.Body, {
|
|
3972
4171
|
className: _,
|
|
3973
4172
|
children: c
|
|
3974
4173
|
}),
|
|
@@ -3980,26 +4179,109 @@ function at({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
|
|
|
3980
4179
|
});
|
|
3981
4180
|
}
|
|
3982
4181
|
//#endregion
|
|
4182
|
+
//#region src/components/AppSpinner.jsx
|
|
4183
|
+
function lt({ size: e = "md", label: n = "Loading", className: r = "" }) {
|
|
4184
|
+
return /* @__PURE__ */ t("span", {
|
|
4185
|
+
className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
|
|
4186
|
+
role: "status",
|
|
4187
|
+
"aria-label": n
|
|
4188
|
+
});
|
|
4189
|
+
}
|
|
4190
|
+
//#endregion
|
|
4191
|
+
//#region src/components/AppSplash.jsx
|
|
4192
|
+
function ut({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "" }) {
|
|
4193
|
+
return /* @__PURE__ */ t("div", {
|
|
4194
|
+
className: `splash${o ? ` ${o}` : ""}`,
|
|
4195
|
+
role: "status",
|
|
4196
|
+
"aria-live": "polite",
|
|
4197
|
+
"aria-label": a,
|
|
4198
|
+
children: /* @__PURE__ */ n("div", {
|
|
4199
|
+
className: "splash-inner",
|
|
4200
|
+
children: [
|
|
4201
|
+
e || r && /* @__PURE__ */ t("span", {
|
|
4202
|
+
className: "splash-mark",
|
|
4203
|
+
children: r
|
|
4204
|
+
}),
|
|
4205
|
+
/* @__PURE__ */ t("span", {
|
|
4206
|
+
className: "splash-bar",
|
|
4207
|
+
"aria-hidden": "true"
|
|
4208
|
+
}),
|
|
4209
|
+
i && /* @__PURE__ */ t("span", {
|
|
4210
|
+
className: "splash-text",
|
|
4211
|
+
children: i
|
|
4212
|
+
})
|
|
4213
|
+
]
|
|
4214
|
+
})
|
|
4215
|
+
});
|
|
4216
|
+
}
|
|
4217
|
+
//#endregion
|
|
3983
4218
|
//#region src/components/AppStatusBadge.jsx
|
|
3984
|
-
function
|
|
4219
|
+
function dt({ label: e, tone: n = "neutral", className: r = "" }) {
|
|
3985
4220
|
return e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
|
|
3986
4221
|
className: `status-label ${n}${r ? ` ${r}` : ""}`,
|
|
3987
4222
|
children: e
|
|
3988
4223
|
});
|
|
3989
4224
|
}
|
|
3990
4225
|
//#endregion
|
|
4226
|
+
//#region src/components/AppStepper.jsx
|
|
4227
|
+
function ft({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "" }) {
|
|
4228
|
+
return /* @__PURE__ */ t("nav", {
|
|
4229
|
+
className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
|
|
4230
|
+
"aria-label": a,
|
|
4231
|
+
children: r.map((a, s) => {
|
|
4232
|
+
let c = a.status || "pending", l = `step${c === "pending" ? "" : ` ${c}`}`, u = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
4233
|
+
className: "step-circle",
|
|
4234
|
+
children: c === "done" ? /* @__PURE__ */ t(x, {
|
|
4235
|
+
name: "check",
|
|
4236
|
+
size: 14
|
|
4237
|
+
}) : s + 1
|
|
4238
|
+
}), i === "journey" ? /* @__PURE__ */ n("span", {
|
|
4239
|
+
className: "step-text",
|
|
4240
|
+
children: [/* @__PURE__ */ t("span", {
|
|
4241
|
+
className: "step-index",
|
|
4242
|
+
children: `Step ${s + 1}`
|
|
4243
|
+
}), /* @__PURE__ */ t("span", {
|
|
4244
|
+
className: "step-label",
|
|
4245
|
+
children: a.label
|
|
4246
|
+
})]
|
|
4247
|
+
}) : /* @__PURE__ */ t("span", {
|
|
4248
|
+
className: "step-label",
|
|
4249
|
+
children: a.label
|
|
4250
|
+
})] }), d = c === "active" ? "step" : void 0, f = a.key ?? `${a.label}-${s}`, p = a.href ? o ? /* @__PURE__ */ t(o, {
|
|
4251
|
+
className: l,
|
|
4252
|
+
to: a.href,
|
|
4253
|
+
"aria-current": d,
|
|
4254
|
+
children: u
|
|
4255
|
+
}, f) : /* @__PURE__ */ t("a", {
|
|
4256
|
+
className: l,
|
|
4257
|
+
href: a.href,
|
|
4258
|
+
"aria-current": d,
|
|
4259
|
+
children: u
|
|
4260
|
+
}, f) : /* @__PURE__ */ t("div", {
|
|
4261
|
+
className: l,
|
|
4262
|
+
"aria-current": d,
|
|
4263
|
+
children: u
|
|
4264
|
+
}, f);
|
|
4265
|
+
return i === "journey" && s < r.length - 1 ? [p, /* @__PURE__ */ t("span", {
|
|
4266
|
+
className: `step-line${c === "done" ? " done" : ""}`,
|
|
4267
|
+
"aria-hidden": "true"
|
|
4268
|
+
}, `${f}-line`)] : p;
|
|
4269
|
+
})
|
|
4270
|
+
});
|
|
4271
|
+
}
|
|
4272
|
+
//#endregion
|
|
3991
4273
|
//#region src/components/AppSwitch.jsx
|
|
3992
|
-
var
|
|
3993
|
-
let l =
|
|
4274
|
+
var pt = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
4275
|
+
let l = a(), u = r || i || l;
|
|
3994
4276
|
return /* @__PURE__ */ n("div", {
|
|
3995
|
-
className: `form-check form-switch${
|
|
4277
|
+
className: `form-check form-switch${o ? ` ${o}` : ""}`,
|
|
3996
4278
|
children: [/* @__PURE__ */ t("input", {
|
|
3997
4279
|
type: "checkbox",
|
|
3998
4280
|
className: "form-check-input",
|
|
3999
4281
|
id: u,
|
|
4000
4282
|
name: i,
|
|
4001
4283
|
ref: c,
|
|
4002
|
-
...
|
|
4284
|
+
...s
|
|
4003
4285
|
}), e != null && /* @__PURE__ */ t("label", {
|
|
4004
4286
|
className: "form-check-label",
|
|
4005
4287
|
htmlFor: u,
|
|
@@ -4009,16 +4291,15 @@ var st = i(function({ label: e, id: r, name: i, className: a = "", ...o }, c) {
|
|
|
4009
4291
|
});
|
|
4010
4292
|
//#endregion
|
|
4011
4293
|
//#region src/components/AppTableEmptyState.jsx
|
|
4012
|
-
function
|
|
4294
|
+
function mt({ icon: e, title: r, text: i, action: a }) {
|
|
4013
4295
|
return /* @__PURE__ */ n("div", {
|
|
4014
4296
|
className: "tbl-empty",
|
|
4015
4297
|
children: [
|
|
4016
4298
|
/* @__PURE__ */ t("span", {
|
|
4017
4299
|
className: "tbl-empty-icon",
|
|
4018
|
-
children: /* @__PURE__ */ t(
|
|
4300
|
+
children: /* @__PURE__ */ t(x, {
|
|
4019
4301
|
name: e,
|
|
4020
|
-
size: 24
|
|
4021
|
-
variant: "Bulk"
|
|
4302
|
+
size: 24
|
|
4022
4303
|
})
|
|
4023
4304
|
}),
|
|
4024
4305
|
/* @__PURE__ */ t("div", {
|
|
@@ -4038,8 +4319,8 @@ function ct({ icon: e, title: r, text: i, action: a }) {
|
|
|
4038
4319
|
}
|
|
4039
4320
|
//#endregion
|
|
4040
4321
|
//#region src/components/AppTabs.jsx
|
|
4041
|
-
function
|
|
4042
|
-
let
|
|
4322
|
+
function ht({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: c = "" }) {
|
|
4323
|
+
let l = s(null);
|
|
4043
4324
|
function u(t) {
|
|
4044
4325
|
let n = e.findIndex((e) => e.key === r);
|
|
4045
4326
|
if (n < 0) return;
|
|
@@ -4047,12 +4328,12 @@ function lt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
4047
4328
|
if (t.key === "ArrowRight" ? a = e[(n + 1) % e.length] : t.key === "ArrowLeft" ? a = e[(n - 1 + e.length) % e.length] : t.key === "Home" ? a = e[0] : t.key === "End" && (a = e[e.length - 1]), !a) return;
|
|
4048
4329
|
t.preventDefault(), i(a.key);
|
|
4049
4330
|
let o = CSS.escape(String(a.key));
|
|
4050
|
-
|
|
4331
|
+
l.current?.querySelector(`[data-rr-ui-event-key="${o}"]`)?.focus();
|
|
4051
4332
|
}
|
|
4052
|
-
return /* @__PURE__ */ t(
|
|
4333
|
+
return /* @__PURE__ */ t(y, {
|
|
4053
4334
|
as: "div",
|
|
4054
4335
|
role: "tablist",
|
|
4055
|
-
ref:
|
|
4336
|
+
ref: l,
|
|
4056
4337
|
activeKey: r,
|
|
4057
4338
|
onSelect: (e) => {
|
|
4058
4339
|
e != null && i(e);
|
|
@@ -4061,10 +4342,10 @@ function lt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
4061
4342
|
className: [
|
|
4062
4343
|
"app-tabs",
|
|
4063
4344
|
a === "pills" ? "app-tabs-pills" : "",
|
|
4064
|
-
|
|
4345
|
+
c
|
|
4065
4346
|
].filter(Boolean).join(" "),
|
|
4066
4347
|
"aria-label": o,
|
|
4067
|
-
children: e.map((e) => /* @__PURE__ */ n(
|
|
4348
|
+
children: e.map((e) => /* @__PURE__ */ n(y.Link, {
|
|
4068
4349
|
as: "button",
|
|
4069
4350
|
type: "button",
|
|
4070
4351
|
eventKey: e.key,
|
|
@@ -4084,28 +4365,28 @@ function lt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
4084
4365
|
}
|
|
4085
4366
|
//#endregion
|
|
4086
4367
|
//#region src/components/AppTextarea.jsx
|
|
4087
|
-
var
|
|
4368
|
+
var gt = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", id: c, name: l, rows: u = 4, className: d = "", fieldClassName: f = "", ...m }, h) {
|
|
4088
4369
|
let g = c || l, _ = [
|
|
4089
4370
|
"textarea",
|
|
4090
4371
|
i ? "error" : "",
|
|
4091
4372
|
d
|
|
4092
4373
|
].filter(Boolean).join(" ");
|
|
4093
|
-
return /* @__PURE__ */ n(
|
|
4374
|
+
return /* @__PURE__ */ n(p.Group, {
|
|
4094
4375
|
className: `field${f ? ` ${f}` : ""}`,
|
|
4095
4376
|
children: [
|
|
4096
|
-
e && /* @__PURE__ */ n(
|
|
4377
|
+
e && /* @__PURE__ */ n(p.Label, {
|
|
4097
4378
|
className: "label",
|
|
4098
4379
|
htmlFor: g,
|
|
4099
4380
|
children: [
|
|
4100
4381
|
e,
|
|
4101
|
-
o && /* @__PURE__ */ t(
|
|
4382
|
+
o && /* @__PURE__ */ t(q, {
|
|
4102
4383
|
label: s,
|
|
4103
4384
|
children: o
|
|
4104
4385
|
}),
|
|
4105
|
-
r && /* @__PURE__ */ t(
|
|
4386
|
+
r && /* @__PURE__ */ t(W, {})
|
|
4106
4387
|
]
|
|
4107
4388
|
}),
|
|
4108
|
-
/* @__PURE__ */ t(
|
|
4389
|
+
/* @__PURE__ */ t(p.Control, {
|
|
4109
4390
|
as: "textarea",
|
|
4110
4391
|
id: g,
|
|
4111
4392
|
name: l,
|
|
@@ -4113,7 +4394,7 @@ var ut = i(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
4113
4394
|
className: _,
|
|
4114
4395
|
"aria-invalid": i ? "true" : "false",
|
|
4115
4396
|
ref: h,
|
|
4116
|
-
...
|
|
4397
|
+
...m
|
|
4117
4398
|
}),
|
|
4118
4399
|
i ? /* @__PURE__ */ t("div", {
|
|
4119
4400
|
className: "field-error",
|
|
@@ -4126,4 +4407,43 @@ var ut = i(function({ label: e, required: r = !1, error: i, hint: a, help: o, he
|
|
|
4126
4407
|
});
|
|
4127
4408
|
});
|
|
4128
4409
|
//#endregion
|
|
4129
|
-
|
|
4410
|
+
//#region src/components/AppTimeline.jsx
|
|
4411
|
+
function _t({ items: e = [], className: r = "" }) {
|
|
4412
|
+
return /* @__PURE__ */ t("ol", {
|
|
4413
|
+
className: `timeline${r ? ` ${r}` : ""}`,
|
|
4414
|
+
children: e.map((e, r) => /* @__PURE__ */ n("li", {
|
|
4415
|
+
className: `timeline-item${e.tone && e.tone !== "neutral" ? ` ${e.tone}` : ""}`,
|
|
4416
|
+
children: [/* @__PURE__ */ t("span", {
|
|
4417
|
+
className: "timeline-dot",
|
|
4418
|
+
children: /* @__PURE__ */ t(x, {
|
|
4419
|
+
name: e.icon || "circle",
|
|
4420
|
+
size: 12
|
|
4421
|
+
})
|
|
4422
|
+
}), /* @__PURE__ */ n("div", {
|
|
4423
|
+
className: "timeline-body",
|
|
4424
|
+
children: [
|
|
4425
|
+
/* @__PURE__ */ t("div", {
|
|
4426
|
+
className: "timeline-title",
|
|
4427
|
+
children: e.title
|
|
4428
|
+
}),
|
|
4429
|
+
(e.at || e.by) && /* @__PURE__ */ n("div", {
|
|
4430
|
+
className: "timeline-meta",
|
|
4431
|
+
children: [e.at && /* @__PURE__ */ t("span", {
|
|
4432
|
+
className: "timeline-at",
|
|
4433
|
+
children: e.at
|
|
4434
|
+
}), e.by && /* @__PURE__ */ t("span", {
|
|
4435
|
+
className: "timeline-by",
|
|
4436
|
+
children: e.by
|
|
4437
|
+
})]
|
|
4438
|
+
}),
|
|
4439
|
+
e.note && /* @__PURE__ */ t("p", {
|
|
4440
|
+
className: "timeline-note",
|
|
4441
|
+
children: e.note
|
|
4442
|
+
})
|
|
4443
|
+
]
|
|
4444
|
+
})]
|
|
4445
|
+
}, e.key ?? `${e.at}-${r}`))
|
|
4446
|
+
});
|
|
4447
|
+
}
|
|
4448
|
+
//#endregion
|
|
4449
|
+
export { S as ActionIcon, C as AppAccordion, w as AppAlert, pe as AppAutocomplete, he as AppAvatar, ge as AppBadge, K as AppButton, ve as AppCallout, ye as AppCard, be as AppCheckbox, xe as AppChip, Se as AppChoiceCard, Ce as AppChoiceChip, we as AppColorField, Te as AppCompareTable, De as AppConfirmDialog, Ie as AppDataTable, Le as AppDatePicker, ze as AppDropdown, Be as AppEmptyState, Ve as AppFileAttachment, We as AppFilePicker, Ge as AppInfoList, q as AppInfoTip, J as AppInput, Ke as AppKpiTile, qe as AppLogoPicker, Y as AppModal, Je as AppMultiSelect, Ye as AppPageHeader, Xe as AppPhoneNumberInput, Ze as AppPricingCard, Qe as AppRadio, $e as AppRepeater, et as AppResourceCard, tt as AppSearch, nt as AppSegmented, it as AppSelect, je as AppSelectMini, at as AppShell, ct as AppSidebarMenu, Q as AppSkeleton, Ae as AppSkeletonRows, lt as AppSpinner, ut as AppSplash, dt as AppStatusBadge, ft as AppStepper, pt as AppSwitch, mt as AppTableEmptyState, Ne as AppTablePagination, ht as AppTabs, gt as AppTextarea, _t as AppTimeline, x as Icon, Z as MODAL_ICONS, W as RequiredMark, Ue as errorToast, $ as toast };
|