@webority/ui-react 0.6.3 → 0.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/components/ActionIcon.d.ts +5 -1
- package/dist/types/components/AppAccordion.d.ts +1 -1
- package/dist/types/components/AppAutocomplete.d.ts +1 -1
- package/dist/types/components/AppAvatar.d.ts +1 -1
- package/dist/types/components/AppCallout.d.ts +1 -1
- package/dist/types/components/AppChip.d.ts +1 -1
- package/dist/types/components/AppChoiceCard.d.ts +1 -1
- package/dist/types/components/AppChoiceChip.d.ts +10 -24
- package/dist/types/components/AppColorField.d.ts +1 -1
- package/dist/types/components/AppCompareTable.d.ts +1 -1
- package/dist/types/components/AppConfirmDialog.d.ts +1 -1
- package/dist/types/components/AppDataTable.d.ts +1 -1
- package/dist/types/components/AppDatePicker.d.ts +1 -1
- package/dist/types/components/AppDropdown.d.ts +2 -1
- package/dist/types/components/AppEmptyState.d.ts +1 -1
- package/dist/types/components/AppFileAttachment.d.ts +1 -1
- package/dist/types/components/AppFilePicker.d.ts +1 -1
- package/dist/types/components/AppInfoList.d.ts +1 -1
- package/dist/types/components/AppInfoTip.d.ts +2 -1
- package/dist/types/components/AppInput.d.ts +4 -0
- package/dist/types/components/AppKpiTile.d.ts +1 -1
- package/dist/types/components/AppLogoPicker.d.ts +1 -1
- package/dist/types/components/AppModal.d.ts +1 -1
- package/dist/types/components/AppMultiSelect.d.ts +1 -1
- package/dist/types/components/AppPageHeader.d.ts +5 -20
- package/dist/types/components/AppPhoneNumberInput.d.ts +2 -1
- package/dist/types/components/AppPricingCard.d.ts +1 -1
- package/dist/types/components/AppRepeater.d.ts +1 -1
- package/dist/types/components/AppResourceCard.d.ts +1 -1
- package/dist/types/components/AppSegmented.d.ts +1 -1
- package/dist/types/components/AppSelect.d.ts +2 -1
- package/dist/types/components/AppSelectMini.d.ts +2 -1
- package/dist/types/components/AppShell.d.ts +1 -1
- package/dist/types/components/AppSidebarMenu.d.ts +2 -1
- package/dist/types/components/AppSkeleton.d.ts +1 -1
- package/dist/types/components/AppSpinner.d.ts +4 -15
- package/dist/types/components/AppSplash.d.ts +6 -23
- package/dist/types/components/AppStatusBadge.d.ts +4 -13
- package/dist/types/components/AppStepper.d.ts +1 -1
- package/dist/types/components/AppTableEmptyState.d.ts +1 -1
- package/dist/types/components/AppTablePagination.d.ts +1 -1
- package/dist/types/components/AppTabs.d.ts +1 -1
- package/dist/types/components/AppTextarea.d.ts +1 -0
- package/dist/types/components/AppTimeline.d.ts +1 -1
- package/dist/types/components/Icon.d.ts +3 -1
- package/dist/types/components/warnUnknownProps.d.ts +25 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/ui-react.js +732 -609
- package/package.json +3 -3
package/dist/ui-react.js
CHANGED
|
@@ -1,18 +1,34 @@
|
|
|
1
1
|
import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as r,
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { createPortal as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { toast as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
2
|
+
import { forwardRef as r, useCallback as i, useEffect as a, useId as o, useLayoutEffect as s, useRef as c, useState as l } from "react";
|
|
3
|
+
import u from "react-bootstrap/Alert";
|
|
4
|
+
import d from "react-bootstrap/Badge";
|
|
5
|
+
import f from "react-bootstrap/Button";
|
|
6
|
+
import p from "react-bootstrap/Card";
|
|
7
|
+
import m from "react-bootstrap/Form";
|
|
8
|
+
import { createPortal as h } from "react-dom";
|
|
9
|
+
import g from "react-bootstrap/Modal";
|
|
10
|
+
import _ from "react-bootstrap/Dropdown";
|
|
11
|
+
import { toast as v } from "react-toastify";
|
|
12
|
+
import y from "react-bootstrap/Offcanvas";
|
|
13
|
+
import b from "react-bootstrap/Nav";
|
|
14
|
+
//#region src/components/warnUnknownProps.js
|
|
15
|
+
var x = /* @__PURE__ */ new Set(/* @__PURE__ */ "id.title.role.style.className.class.tabIndex.lang.dir.hidden.slot.part.draggable.spellCheck.translate.inert.popover.name.type.value.defaultValue.checked.defaultChecked.placeholder.disabled.readOnly.required.autoFocus.autoComplete.form.formAction.formMethod.formNoValidate.formTarget.min.max.step.minLength.maxLength.pattern.multiple.accept.capture.rows.cols.wrap.list.htmlFor.inputMode.enterKeyHint.href.target.rel.download.ping.referrerPolicy.src.srcSet.alt.width.height.loading.decoding.sizes.crossOrigin.useMap.colSpan.rowSpan.headers.scope.span.key.ref.children.dangerouslySetInnerHTML.suppressHydrationWarning".split(".")), S = () => {
|
|
16
|
+
try {
|
|
17
|
+
return process.env.NODE_ENV !== "production";
|
|
18
|
+
} catch {
|
|
19
|
+
return !0;
|
|
20
|
+
}
|
|
21
|
+
}, C = (e) => e.startsWith("data-") || e.startsWith("aria-") || /^on[A-Z]/.test(e), w = /* @__PURE__ */ new Set();
|
|
22
|
+
function T(e, t) {
|
|
23
|
+
if (!(!S() || !t) && !("as" in t)) for (let n of Object.keys(t)) {
|
|
24
|
+
if (C(n) || x.has(n)) continue;
|
|
25
|
+
let t = `${e}.${n}`;
|
|
26
|
+
w.has(t) || (w.add(t), console.warn(`[@webority/ui-react] <${e}> received an unknown prop "${n}". It is not part of the component's API and is not a valid HTML attribute, so it will either be dropped or land on the DOM — check the prop name against the component catalogue at https://ui.webority.dev.`));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
14
30
|
//#region src/components/Icon.jsx
|
|
15
|
-
var
|
|
31
|
+
var E = {
|
|
16
32
|
activity: "activity",
|
|
17
33
|
"alert-circle": "exclamation-circle",
|
|
18
34
|
"alert-triangle": "exclamation-triangle",
|
|
@@ -81,6 +97,10 @@ var b = {
|
|
|
81
97
|
phone: "telephone",
|
|
82
98
|
plug: "plug",
|
|
83
99
|
plus: "plus-lg",
|
|
100
|
+
minus: "dash-lg",
|
|
101
|
+
"zoom-in": "zoom-in",
|
|
102
|
+
"zoom-out": "zoom-out",
|
|
103
|
+
"two-page": "layout-split",
|
|
84
104
|
"plus-circle": "plus-circle",
|
|
85
105
|
"refresh-cw": "arrow-clockwise",
|
|
86
106
|
repeat: "arrow-repeat",
|
|
@@ -106,9 +126,9 @@ var b = {
|
|
|
106
126
|
"wand-sparkles": "magic",
|
|
107
127
|
x: "x-lg",
|
|
108
128
|
zap: "lightning-charge"
|
|
109
|
-
};
|
|
110
|
-
function
|
|
111
|
-
if (e === "hard-hat") return /* @__PURE__ */ t("svg", {
|
|
129
|
+
}, D = [...Object.keys(E), "hard-hat"].sort();
|
|
130
|
+
function O({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
|
|
131
|
+
if (T("Icon", s), e === "hard-hat") return /* @__PURE__ */ t("svg", {
|
|
112
132
|
width: r,
|
|
113
133
|
height: r,
|
|
114
134
|
viewBox: "0 0 24 24",
|
|
@@ -130,9 +150,9 @@ function x({ name: e, size: r = 16, className: i, color: a, style: o }) {
|
|
|
130
150
|
}), /* @__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" })]
|
|
131
151
|
})
|
|
132
152
|
});
|
|
133
|
-
let
|
|
134
|
-
return
|
|
135
|
-
className: `bi bi-${
|
|
153
|
+
let c = E[e] || e;
|
|
154
|
+
return c ? /* @__PURE__ */ t("i", {
|
|
155
|
+
className: `bi bi-${c}${i ? ` ${i}` : ""}`,
|
|
136
156
|
"data-icon": e,
|
|
137
157
|
"aria-hidden": "true",
|
|
138
158
|
style: {
|
|
@@ -145,20 +165,24 @@ function x({ name: e, size: r = 16, className: i, color: a, style: o }) {
|
|
|
145
165
|
}
|
|
146
166
|
//#endregion
|
|
147
167
|
//#region src/components/ActionIcon.jsx
|
|
148
|
-
function
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
168
|
+
function k({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20, onClick: o, className: s = "", as: c, href: l, ...u }) {
|
|
169
|
+
T("ActionIcon", u);
|
|
170
|
+
let d = [
|
|
171
|
+
"u-action",
|
|
172
|
+
r ? "danger" : "",
|
|
173
|
+
s
|
|
174
|
+
].filter(Boolean).join(" "), f = c ?? (l ? "a" : "button"), p = f === "button";
|
|
175
|
+
return /* @__PURE__ */ t(f, {
|
|
176
|
+
type: p ? "button" : void 0,
|
|
177
|
+
href: p || i ? void 0 : l,
|
|
178
|
+
className: d,
|
|
156
179
|
"aria-label": n,
|
|
157
180
|
title: n,
|
|
158
|
-
disabled: i,
|
|
181
|
+
disabled: p ? i : void 0,
|
|
182
|
+
"aria-disabled": !p && i ? "true" : void 0,
|
|
159
183
|
onClick: o,
|
|
160
|
-
...
|
|
161
|
-
children: /* @__PURE__ */ t(
|
|
184
|
+
...u,
|
|
185
|
+
children: /* @__PURE__ */ t(O, {
|
|
162
186
|
name: e,
|
|
163
187
|
size: a
|
|
164
188
|
})
|
|
@@ -166,20 +190,21 @@ function S({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
|
|
|
166
190
|
}
|
|
167
191
|
//#endregion
|
|
168
192
|
//#region src/components/AppAccordion.jsx
|
|
169
|
-
function
|
|
170
|
-
|
|
193
|
+
function A({ items: e = [], multiple: r = !1, id: i, className: a = "", ...s }) {
|
|
194
|
+
T("AppAccordion", s);
|
|
195
|
+
let c = o(), u = i || c, [d, f] = l(() => {
|
|
171
196
|
let t = e.filter((e) => e.open).map((e, t) => e.key ?? String(t));
|
|
172
197
|
return new Set(r ? t : t.slice(0, 1));
|
|
173
|
-
}),
|
|
174
|
-
|
|
198
|
+
}), p = (e, t) => e.key ?? String(t), m = (e) => {
|
|
199
|
+
f((t) => {
|
|
175
200
|
let n = new Set(r ? t : []);
|
|
176
201
|
return t.has(e) ? n.delete(e) : n.add(e), n;
|
|
177
202
|
});
|
|
178
203
|
};
|
|
179
204
|
return /* @__PURE__ */ t("div", {
|
|
180
|
-
className: `faq-list${
|
|
205
|
+
className: `faq-list${a ? ` ${a}` : ""}`,
|
|
181
206
|
children: e.map((e, r) => {
|
|
182
|
-
let i =
|
|
207
|
+
let i = p(e, r), a = d.has(i), o = `${u}-${r}`, s = `${o}-q`;
|
|
183
208
|
return /* @__PURE__ */ n("div", {
|
|
184
209
|
className: `faq-item${a ? " open" : ""}`,
|
|
185
210
|
children: [/* @__PURE__ */ n("button", {
|
|
@@ -188,10 +213,10 @@ function C({ items: e = [], multiple: r = !1, id: i, className: o = "" }) {
|
|
|
188
213
|
id: s,
|
|
189
214
|
"aria-expanded": a,
|
|
190
215
|
"aria-controls": o,
|
|
191
|
-
onClick: () =>
|
|
216
|
+
onClick: () => m(i),
|
|
192
217
|
children: [e.title, /* @__PURE__ */ t("span", {
|
|
193
218
|
className: "faq-q-icon",
|
|
194
|
-
children: /* @__PURE__ */ t(
|
|
219
|
+
children: /* @__PURE__ */ t(O, {
|
|
195
220
|
name: "chevron-down",
|
|
196
221
|
size: 18
|
|
197
222
|
})
|
|
@@ -211,8 +236,8 @@ function C({ items: e = [], multiple: r = !1, id: i, className: o = "" }) {
|
|
|
211
236
|
}
|
|
212
237
|
//#endregion
|
|
213
238
|
//#region src/components/AppAlert.jsx
|
|
214
|
-
function
|
|
215
|
-
return /* @__PURE__ */ t(
|
|
239
|
+
function j({ variant: e = "info", children: n, className: r = "", onClose: i, dismissible: a, role: o = "alert", ...s }) {
|
|
240
|
+
return T("AppAlert", s), /* @__PURE__ */ t(u, {
|
|
216
241
|
variant: e,
|
|
217
242
|
className: r || void 0,
|
|
218
243
|
onClose: i,
|
|
@@ -225,15 +250,15 @@ function w({ variant: e = "info", children: n, className: r = "", onClose: i, di
|
|
|
225
250
|
}
|
|
226
251
|
//#endregion
|
|
227
252
|
//#region ../elements/dist/ui-elements.js
|
|
228
|
-
var
|
|
253
|
+
var M = {
|
|
229
254
|
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
255
|
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
256
|
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
257
|
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
258
|
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
259
|
};
|
|
235
|
-
Object.keys(
|
|
236
|
-
var
|
|
260
|
+
Object.keys(M);
|
|
261
|
+
var ee = class extends HTMLElement {
|
|
237
262
|
static get observedAttributes() {
|
|
238
263
|
return ["tone", "size"];
|
|
239
264
|
}
|
|
@@ -244,19 +269,21 @@ var E = class extends HTMLElement {
|
|
|
244
269
|
this.isConnected && this.render();
|
|
245
270
|
}
|
|
246
271
|
render() {
|
|
247
|
-
let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n =
|
|
272
|
+
let e = this.getAttribute("tone"), t = this.getAttribute("size") || "72", n = M[e] || M.info;
|
|
248
273
|
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
274
|
}
|
|
250
|
-
},
|
|
251
|
-
function
|
|
252
|
-
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${
|
|
275
|
+
}, N = "data-wui-mirror";
|
|
276
|
+
function P(e, t) {
|
|
277
|
+
let n = e.getAttribute("name"), r = e.querySelector(`:scope > input[${N}]`);
|
|
253
278
|
if (!n) {
|
|
254
279
|
r?.remove();
|
|
255
280
|
return;
|
|
256
281
|
}
|
|
257
|
-
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(
|
|
282
|
+
r || (r = document.createElement("input"), r.type = "hidden", r.setAttribute(N, ""), e.appendChild(r)), r.name = n, r.value = t == null ? "" : String(t);
|
|
283
|
+
for (let t of e.attributes) t.name.startsWith("data-val") && r.setAttribute(t.name, t.value);
|
|
284
|
+
r.disabled = e.hasAttribute("disabled");
|
|
258
285
|
}
|
|
259
|
-
var
|
|
286
|
+
var F = Symbol("wui.trustedHtml"), I = (e) => String(e ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), L = (e) => e?.[F] ? String(e.label ?? "") : I(e == null ? "" : e.label), te = class extends HTMLElement {
|
|
260
287
|
_accessibleName() {
|
|
261
288
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
262
289
|
}
|
|
@@ -284,9 +311,9 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
284
311
|
return this._value;
|
|
285
312
|
}
|
|
286
313
|
set value(e) {
|
|
287
|
-
this._value = e == null ? "" : String(e),
|
|
314
|
+
this._value = e == null ? "" : String(e), P(this, this._value);
|
|
288
315
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
289
|
-
t && (this._label =
|
|
316
|
+
t && (this._label = z(t.label)), this._syncInput();
|
|
290
317
|
}
|
|
291
318
|
set options(e) {
|
|
292
319
|
this._optionsProp = Array.isArray(e) ? e : [], this._renderOptions();
|
|
@@ -316,7 +343,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
316
343
|
e.length && (this._declared = e.map((e) => ({
|
|
317
344
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
318
345
|
label: e.innerHTML,
|
|
319
|
-
[
|
|
346
|
+
[F]: !0,
|
|
320
347
|
selected: e.hasAttribute("selected")
|
|
321
348
|
})));
|
|
322
349
|
}
|
|
@@ -328,8 +355,8 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
328
355
|
let e = this.getAttribute("placeholder") || "Search…";
|
|
329
356
|
this.innerHTML = `
|
|
330
357
|
<div class="search-select">
|
|
331
|
-
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
332
|
-
<input class="search-select-input search-select-ac-input" placeholder="${
|
|
358
|
+
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${R(this._accessibleName())}">
|
|
359
|
+
<input class="search-select-input search-select-ac-input" placeholder="${R(e)}" aria-autocomplete="list" autocomplete="off"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
333
360
|
<span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
|
|
334
361
|
<button type="button" class="search-select-clear" aria-label="Clear" hidden><i class="bi bi-x" aria-hidden="true"></i></button>
|
|
335
362
|
</div>
|
|
@@ -338,7 +365,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
338
365
|
<div class="search-select-empty" hidden>No matches</div>
|
|
339
366
|
<div class="search-select-hint" hidden>Type to search…</div>
|
|
340
367
|
</div>
|
|
341
|
-
</div>`, this._rendered = !0,
|
|
368
|
+
</div>`, this._rendered = !0, P(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
|
|
342
369
|
}
|
|
343
370
|
_refs() {
|
|
344
371
|
return {
|
|
@@ -367,9 +394,9 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
367
394
|
let t = this._refs();
|
|
368
395
|
if (!t.optionsWrap) return;
|
|
369
396
|
let n = (e ?? (t.input ? t.input.value : "")).trim().toLowerCase(), r = this._readOptions();
|
|
370
|
-
!this._remote && n && (r = r.filter((e) =>
|
|
397
|
+
!this._remote && n && (r = r.filter((e) => z(e.label).toLowerCase().includes(n))), t.optionsWrap.innerHTML = r.map((e) => {
|
|
371
398
|
let t = String(e.value) === String(this._value);
|
|
372
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
399
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${R(e.value)}" aria-selected="${t}">${L(e)}</button>`;
|
|
373
400
|
}).join(""), this._active = -1;
|
|
374
401
|
let i = n.length < this._minChars;
|
|
375
402
|
t.hint && (t.hint.hidden = !(this._remote && i && !r.length)), t.empty && (t.empty.hidden = this._loading || r.length > 0 || this._remote && i);
|
|
@@ -390,7 +417,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
390
417
|
}, o = () => {
|
|
391
418
|
e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), this._syncInput();
|
|
392
419
|
}, s = (t) => {
|
|
393
|
-
this._value = t.dataset.value, this._label =
|
|
420
|
+
this._value = t.dataset.value, this._label = z(t.innerHTML), P(this, this._value), e.input.value = this._label, this.dispatchEvent(new Event("change", { bubbles: !0 })), o(), e.input.focus();
|
|
394
421
|
};
|
|
395
422
|
e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", () => {
|
|
396
423
|
let t = e.input.value;
|
|
@@ -413,7 +440,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
413
440
|
let t = e.target.closest(".search-select-option");
|
|
414
441
|
t && r(this._optionEls().indexOf(t));
|
|
415
442
|
}), e.clear?.addEventListener("click", () => {
|
|
416
|
-
this._value = "", this._label = "",
|
|
443
|
+
this._value = "", this._label = "", P(this, ""), e.input.value = "", e.clear.hidden = !0, this._renderOptions(""), this.dispatchEvent(new Event("change", { bubbles: !0 })), e.input.focus();
|
|
417
444
|
}), this._onDocClick = (e) => {
|
|
418
445
|
i() && !this.contains(e.target) && o();
|
|
419
446
|
}, document.addEventListener("click", this._onDocClick), window.addEventListener("resize", () => {
|
|
@@ -423,7 +450,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
423
450
|
disconnectedCallback() {
|
|
424
451
|
this._onDocClick && document.removeEventListener("click", this._onDocClick), clearTimeout(this._timer);
|
|
425
452
|
}
|
|
426
|
-
},
|
|
453
|
+
}, R = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), z = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), B = [
|
|
427
454
|
"January",
|
|
428
455
|
"February",
|
|
429
456
|
"March",
|
|
@@ -444,17 +471,17 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
444
471
|
"Th",
|
|
445
472
|
"Fr",
|
|
446
473
|
"Sa"
|
|
447
|
-
],
|
|
474
|
+
], V = (e) => String(e).padStart(2, "0"), re = (e, t, n) => `${e}-${V(t + 1)}-${V(n)}`, H = (e) => {
|
|
448
475
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
449
476
|
return t ? {
|
|
450
477
|
y: +t[1],
|
|
451
478
|
m: t[2] - 1,
|
|
452
479
|
d: +t[3]
|
|
453
480
|
} : null;
|
|
454
|
-
},
|
|
455
|
-
let t =
|
|
456
|
-
return t ? `${
|
|
457
|
-
},
|
|
481
|
+
}, U = (e) => {
|
|
482
|
+
let t = H(e);
|
|
483
|
+
return t ? `${V(t.d)} ${B[t.m].slice(0, 3)} ${t.y}` : "";
|
|
484
|
+
}, ie = class extends HTMLElement {
|
|
458
485
|
static get observedAttributes() {
|
|
459
486
|
return [
|
|
460
487
|
"value",
|
|
@@ -479,31 +506,31 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
479
506
|
return this._value;
|
|
480
507
|
}
|
|
481
508
|
set value(e) {
|
|
482
|
-
this._value = e || "",
|
|
509
|
+
this._value = e || "", P(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
483
510
|
}
|
|
484
511
|
render() {
|
|
485
512
|
this._value = this.getAttribute("value") || this._value;
|
|
486
|
-
let e = this.getAttribute("placeholder") || "Enter Date", t =
|
|
513
|
+
let e = this.getAttribute("placeholder") || "Enter Date", t = H(this._value);
|
|
487
514
|
t && (this._viewY = t.y, this._viewM = t.m), this.innerHTML = `
|
|
488
515
|
<div class="datepicker">
|
|
489
516
|
<button type="button" class="input datepicker-trigger" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
490
|
-
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ?
|
|
517
|
+
<span data-trigger-label class="${t ? "" : "search-select-placeholder"}">${t ? U(this._value) : e}</span>
|
|
491
518
|
<i class="bi bi-calendar3" aria-hidden="true"></i>
|
|
492
519
|
</button>
|
|
493
520
|
<div class="datepicker-pop" role="dialog" hidden></div>
|
|
494
|
-
</div>`, this._rendered = !0,
|
|
521
|
+
</div>`, this._rendered = !0, P(this, this._value), this._wire();
|
|
495
522
|
}
|
|
496
523
|
_syncFormValue() {
|
|
497
|
-
|
|
524
|
+
P(this, this._value);
|
|
498
525
|
}
|
|
499
526
|
_syncTrigger() {
|
|
500
527
|
let e = this.querySelector("[data-trigger-label]");
|
|
501
528
|
if (!e) return;
|
|
502
|
-
let t =
|
|
503
|
-
e.textContent = t ?
|
|
529
|
+
let t = H(this._value);
|
|
530
|
+
e.textContent = t ? U(this._value) : this.getAttribute("placeholder") || "Enter Date", e.classList.toggle("search-select-placeholder", !t);
|
|
504
531
|
}
|
|
505
532
|
_renderMonth() {
|
|
506
|
-
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 =
|
|
533
|
+
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 = H(this._value), i = H(this.getAttribute("min")), a = H(this.getAttribute("max")), o = (e, t, n) => {
|
|
507
534
|
let r = new Date(e, t, n).getTime();
|
|
508
535
|
return !!(i && r < new Date(i.y, i.m, i.d).getTime() || a && r > new Date(a.y, a.m, a.d).getTime());
|
|
509
536
|
}, s = "";
|
|
@@ -515,7 +542,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
515
542
|
e.innerHTML = `
|
|
516
543
|
<div class="datepicker-head">
|
|
517
544
|
<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>
|
|
518
|
-
<span class="datepicker-month">${
|
|
545
|
+
<span class="datepicker-month">${B[this._viewM]} ${this._viewY}</span>
|
|
519
546
|
<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>
|
|
520
547
|
</div>
|
|
521
548
|
<div class="datepicker-weekdays">${ne.map((e) => `<span>${e}</span>`).join("")}</div>
|
|
@@ -526,6 +553,10 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
526
553
|
let e = this.querySelector(".datepicker-trigger"), t = this.querySelector(".datepicker-pop");
|
|
527
554
|
if (!e || !t) return;
|
|
528
555
|
let n = () => !t.hidden, r = () => {
|
|
556
|
+
if (!H(this._value) && !this._viewNavigated) {
|
|
557
|
+
let e = /* @__PURE__ */ new Date();
|
|
558
|
+
this._viewY = e.getFullYear(), this._viewM = e.getMonth();
|
|
559
|
+
}
|
|
529
560
|
this._renderMonth(), t.hidden = !1, e.setAttribute("aria-expanded", "true");
|
|
530
561
|
}, i = () => {
|
|
531
562
|
t.hidden = !0, e.setAttribute("aria-expanded", "false");
|
|
@@ -533,7 +564,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
533
564
|
e.addEventListener("click", () => n() ? i() : r()), t.addEventListener("click", (e) => {
|
|
534
565
|
let t = e.target.closest("[data-nav]");
|
|
535
566
|
if (t) {
|
|
536
|
-
this._viewM += Number(t.dataset.nav), this._viewM < 0 ? (this._viewM = 11, --this._viewY) : this._viewM > 11 && (this._viewM = 0, this._viewY += 1), this._renderMonth();
|
|
567
|
+
this._viewNavigated = !0, this._viewM += Number(t.dataset.nav), this._viewM < 0 ? (this._viewM = 11, --this._viewY) : this._viewM > 11 && (this._viewM = 0, this._viewY += 1), this._renderMonth();
|
|
537
568
|
return;
|
|
538
569
|
}
|
|
539
570
|
if (e.target.closest("[data-clear]")) {
|
|
@@ -551,7 +582,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
551
582
|
disconnectedCallback() {
|
|
552
583
|
this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey);
|
|
553
584
|
}
|
|
554
|
-
},
|
|
585
|
+
}, ae = class extends HTMLElement {
|
|
555
586
|
_accessibleName() {
|
|
556
587
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
557
588
|
}
|
|
@@ -583,7 +614,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
583
614
|
return this._values.slice();
|
|
584
615
|
}
|
|
585
616
|
set values(e) {
|
|
586
|
-
this._values = Array.isArray(e) ? e.map(String) : [],
|
|
617
|
+
this._values = Array.isArray(e) ? e.map(String) : [], P(this, this._values.join(",")), this._rendered && this._renderControl();
|
|
587
618
|
}
|
|
588
619
|
set options(e) {
|
|
589
620
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -597,7 +628,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
597
628
|
e.length && (this._declared = e.map((e) => ({
|
|
598
629
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
599
630
|
label: e.innerHTML,
|
|
600
|
-
[
|
|
631
|
+
[F]: !0,
|
|
601
632
|
selected: e.hasAttribute("selected")
|
|
602
633
|
})));
|
|
603
634
|
}
|
|
@@ -610,41 +641,41 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
610
641
|
}
|
|
611
642
|
_labelHtmlFor(e) {
|
|
612
643
|
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
613
|
-
return t ?
|
|
644
|
+
return t ? L(t) : I(e);
|
|
614
645
|
}
|
|
615
646
|
render() {
|
|
616
647
|
this._snapshotDeclared();
|
|
617
648
|
let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…";
|
|
618
|
-
|
|
649
|
+
P(this, this._values.join(",")), this.innerHTML = `
|
|
619
650
|
<div class="search-select">
|
|
620
|
-
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
651
|
+
<div class="input search-select-control search-select-multi" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${W(this._accessibleName())}"${this.hasAttribute("disabled") ? " aria-disabled=\"true\"" : ""}>
|
|
621
652
|
<div class="ms-chips" data-chips></div>
|
|
622
653
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
623
654
|
</div>
|
|
624
655
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" aria-multiselectable="true" tabindex="-1" hidden>
|
|
625
|
-
${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${
|
|
656
|
+
${e ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${W(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>` : ""}
|
|
626
657
|
<div class="search-select-options"></div>
|
|
627
658
|
<div class="search-select-empty" hidden>No matches</div>
|
|
628
659
|
</div>
|
|
629
|
-
</div>`, this._rendered = !0,
|
|
660
|
+
</div>`, this._rendered = !0, P(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
|
|
630
661
|
}
|
|
631
662
|
_renderControl() {
|
|
632
663
|
let e = this.querySelector("[data-chips]");
|
|
633
664
|
if (!e) return;
|
|
634
665
|
let t = this.getAttribute("placeholder") || "Select…";
|
|
635
666
|
if (!this._values.length) {
|
|
636
|
-
e.innerHTML = `<span class="search-select-placeholder">${
|
|
667
|
+
e.innerHTML = `<span class="search-select-placeholder">${I(t)}</span>`;
|
|
637
668
|
return;
|
|
638
669
|
}
|
|
639
|
-
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${
|
|
670
|
+
e.innerHTML = this._values.map((e) => `<span class="chip chip-sm"><span class="chip-label">${this._labelHtmlFor(e)}</span><button type="button" class="chip-remove" data-remove="${W(e)}" aria-label="Remove"><i class="bi bi-x" aria-hidden="true"></i></button></span>`).join("");
|
|
640
671
|
}
|
|
641
672
|
_renderOptions(e) {
|
|
642
673
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
643
674
|
if (!t) return;
|
|
644
675
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
645
|
-
r && (i = i.filter((e) =>
|
|
676
|
+
r && (i = i.filter((e) => oe(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
|
|
646
677
|
let t = this._values.includes(String(e.value));
|
|
647
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
678
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${W(e.value)}" aria-selected="${t}"><span class="ms-check"><i class="bi bi-check" aria-hidden="true"></i></span><span class="ms-opt-label">${L(e)}</span></button>`;
|
|
648
679
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1;
|
|
649
680
|
}
|
|
650
681
|
_wire() {
|
|
@@ -663,7 +694,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
663
694
|
}, f = () => {
|
|
664
695
|
t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1);
|
|
665
696
|
}, p = () => {
|
|
666
|
-
|
|
697
|
+
P(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
667
698
|
}, m = (e) => {
|
|
668
699
|
let t = String(e);
|
|
669
700
|
this._values.includes(t) ? this._values = this._values.filter((e) => e !== t) : this._values = [...this._values, t], this._renderControl(), this._renderOptions(n ? n.value : ""), p();
|
|
@@ -707,7 +738,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
707
738
|
disconnectedCallback() {
|
|
708
739
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
709
740
|
}
|
|
710
|
-
},
|
|
741
|
+
}, W = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), oe = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), se = [
|
|
711
742
|
[
|
|
712
743
|
"AF",
|
|
713
744
|
"Afghanistan",
|
|
@@ -1933,11 +1964,11 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1933
1964
|
"Zimbabwe",
|
|
1934
1965
|
"263"
|
|
1935
1966
|
]
|
|
1936
|
-
],
|
|
1967
|
+
], G = (e) => (se.find((t) => t[0] === e) || [
|
|
1937
1968
|
"",
|
|
1938
1969
|
"",
|
|
1939
1970
|
""
|
|
1940
|
-
])[2],
|
|
1971
|
+
])[2], K = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, ce = class extends HTMLElement {
|
|
1941
1972
|
static get observedAttributes() {
|
|
1942
1973
|
return [
|
|
1943
1974
|
"value",
|
|
@@ -1956,25 +1987,25 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1956
1987
|
this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
|
|
1957
1988
|
}
|
|
1958
1989
|
get value() {
|
|
1959
|
-
return `+${
|
|
1990
|
+
return `+${G(this._country)}${this._national}`;
|
|
1960
1991
|
}
|
|
1961
1992
|
set value(e) {
|
|
1962
1993
|
this._national = String(e ?? "").replace(/[^0-9]/g, ""), this._commit();
|
|
1963
1994
|
}
|
|
1964
1995
|
_commit() {
|
|
1965
|
-
|
|
1996
|
+
P(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1966
1997
|
}
|
|
1967
1998
|
render() {
|
|
1968
1999
|
let e = this.getAttribute("placeholder") || "Enter phone number";
|
|
1969
2000
|
this._country = this.getAttribute("country") || this._country;
|
|
1970
|
-
let t =
|
|
2001
|
+
let t = se.map(([e, t, n]) => `<button type="button" role="option" class="country-dropdown-item${e === this._country ? " selected" : ""}" data-iso="${e}"><span class="${K(e)}" aria-hidden="true"></span><span class="country-name-text">${t}<span class="country-code-text">+${n}</span></span></button>`).join("");
|
|
1971
2002
|
this.innerHTML = `
|
|
1972
2003
|
<div class="phone-input-wrap">
|
|
1973
2004
|
<div class="phone-country-adornment">
|
|
1974
2005
|
<button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
1975
|
-
<span class="${
|
|
2006
|
+
<span class="${K(this._country)}" data-flag aria-hidden="true"></span>
|
|
1976
2007
|
<i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
|
|
1977
|
-
<span class="phone-dial" data-dial>+${
|
|
2008
|
+
<span class="phone-dial" data-dial>+${G(this._country)}</span>
|
|
1978
2009
|
</button>
|
|
1979
2010
|
<div class="country-dropdown-menu" role="listbox" hidden>
|
|
1980
2011
|
<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>
|
|
@@ -1982,7 +2013,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1982
2013
|
</div>
|
|
1983
2014
|
</div>
|
|
1984
2015
|
<input type="tel" class="input" placeholder="${le(e)}" value="${le(this._national)}"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
1985
|
-
</div>`, this._rendered = !0,
|
|
2016
|
+
</div>`, this._rendered = !0, P(this, this.value), this._wire();
|
|
1986
2017
|
}
|
|
1987
2018
|
_wire() {
|
|
1988
2019
|
let e = this.querySelector(".country-toggle"), t = this.querySelector(".country-dropdown-menu"), n = this.querySelector(".dropdown-search-input"), r = this.querySelector(".country-list-scroll"), i = this.querySelector(".country-empty"), a = this.querySelector("input[type=tel]"), o = this.querySelector("[data-flag]"), s = this.querySelector("[data-dial]");
|
|
@@ -2006,7 +2037,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2006
2037
|
}
|
|
2007
2038
|
i && (i.hidden = n > 0);
|
|
2008
2039
|
}, p = (e) => {
|
|
2009
|
-
this._country = e, this.setAttribute("country", e), o && (o.className =
|
|
2040
|
+
this._country = e, this.setAttribute("country", e), o && (o.className = K(e)), s && (s.textContent = `+${G(e)}`);
|
|
2010
2041
|
for (let t of r.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
|
|
2011
2042
|
d(), this._commit();
|
|
2012
2043
|
};
|
|
@@ -2017,7 +2048,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2017
2048
|
this._national = a.value.replace(/[^0-9]/g, ""), this._commit();
|
|
2018
2049
|
}), this._onDocClick = (e) => {
|
|
2019
2050
|
c() && !this.contains(e.target) && d();
|
|
2020
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
2051
|
+
}, document.addEventListener("click", this._onDocClick), P(this, this.value);
|
|
2021
2052
|
}
|
|
2022
2053
|
disconnectedCallback() {
|
|
2023
2054
|
this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
@@ -2050,7 +2081,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2050
2081
|
return this._value;
|
|
2051
2082
|
}
|
|
2052
2083
|
set value(e) {
|
|
2053
|
-
this._value = e == null ? "" : String(e),
|
|
2084
|
+
this._value = e == null ? "" : String(e), P(this, this._value), this._syncSelected();
|
|
2054
2085
|
}
|
|
2055
2086
|
set options(e) {
|
|
2056
2087
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -2064,7 +2095,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2064
2095
|
e.length && (this._declared = e.map((e) => ({
|
|
2065
2096
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
2066
2097
|
label: e.innerHTML,
|
|
2067
|
-
[
|
|
2098
|
+
[F]: !0,
|
|
2068
2099
|
selected: e.hasAttribute("selected")
|
|
2069
2100
|
})));
|
|
2070
2101
|
}
|
|
@@ -2074,22 +2105,22 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2074
2105
|
render() {
|
|
2075
2106
|
this._snapshotDeclared();
|
|
2076
2107
|
let e = this._readOptions(), t = this.hasAttribute("searchable"), n = this.getAttribute("placeholder") || "Select...", r = this.getAttribute("search-placeholder") || "Search...", i = e.find((e) => String(e.value) === String(this._value)) || e.find((e) => e.selected);
|
|
2077
|
-
i && (this._value = String(i.value)),
|
|
2108
|
+
i && (this._value = String(i.value)), P(this, this._value);
|
|
2078
2109
|
let a = e.map((e) => {
|
|
2079
2110
|
let t = String(e.value) === String(this._value);
|
|
2080
|
-
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${
|
|
2111
|
+
return `<button type="button" role="option" class="search-select-option${t ? " selected" : ""}" data-value="${q(e.value)}" aria-selected="${t}">${L(e)}</button>`;
|
|
2081
2112
|
}).join("");
|
|
2082
2113
|
this.innerHTML = `
|
|
2083
2114
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}">
|
|
2084
|
-
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
2085
|
-
<span class="${i ? "" : "search-select-placeholder"}" data-label>${i ?
|
|
2115
|
+
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${q(this._accessibleName())}"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
2116
|
+
<span class="${i ? "" : "search-select-placeholder"}" data-label>${i ? L(i) : I(n)}</span>
|
|
2086
2117
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
2087
2118
|
</button>
|
|
2088
2119
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
|
|
2089
|
-
${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${
|
|
2120
|
+
${t ? `<div class="search-select-search"><i class="bi bi-search" aria-hidden="true"></i><input class="search-select-input" placeholder="${q(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>` : ""}
|
|
2090
2121
|
<div class="search-select-options">${a}<div class="search-select-empty" hidden>No matches</div></div>
|
|
2091
2122
|
</div>
|
|
2092
|
-
</div>`, this._rendered = !0,
|
|
2123
|
+
</div>`, this._rendered = !0, P(this, this._value), this._wire();
|
|
2093
2124
|
}
|
|
2094
2125
|
_refs() {
|
|
2095
2126
|
return {
|
|
@@ -2114,7 +2145,7 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2114
2145
|
let t = e.dataset.value === String(this._value);
|
|
2115
2146
|
e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
|
|
2116
2147
|
}
|
|
2117
|
-
e && (e.innerHTML = t ?
|
|
2148
|
+
e && (e.innerHTML = t ? L(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
|
|
2118
2149
|
}
|
|
2119
2150
|
_wire() {
|
|
2120
2151
|
let e = this._refs();
|
|
@@ -2169,14 +2200,14 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2169
2200
|
disconnectedCallback() {
|
|
2170
2201
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
2171
2202
|
}
|
|
2172
|
-
},
|
|
2203
|
+
}, q = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), de = "image/png,image/jpeg,image/webp", fe = {
|
|
2173
2204
|
"image/png": [".png"],
|
|
2174
2205
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
2175
2206
|
"image/webp": [".webp"],
|
|
2176
2207
|
"image/gif": [".gif"],
|
|
2177
2208
|
"image/svg+xml": [".svg"],
|
|
2178
2209
|
"application/pdf": [".pdf"]
|
|
2179
|
-
},
|
|
2210
|
+
}, pe = {
|
|
2180
2211
|
"image/png": "PNG",
|
|
2181
2212
|
"image/jpeg": "JPG",
|
|
2182
2213
|
"image/webp": "WEBP",
|
|
@@ -2190,36 +2221,36 @@ var k = Symbol("wui.trustedHtml"), A = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2190
2221
|
".gif": "GIF",
|
|
2191
2222
|
".svg": "SVG",
|
|
2192
2223
|
".pdf": "PDF"
|
|
2193
|
-
},
|
|
2194
|
-
function
|
|
2224
|
+
}, me = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
2225
|
+
function he(e) {
|
|
2195
2226
|
let t = [];
|
|
2196
|
-
for (let n of
|
|
2197
|
-
let e =
|
|
2227
|
+
for (let n of me(e)) {
|
|
2228
|
+
let e = pe[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
2198
2229
|
t.includes(e) || t.push(e);
|
|
2199
2230
|
}
|
|
2200
2231
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
2201
2232
|
}
|
|
2202
|
-
function
|
|
2203
|
-
let n =
|
|
2233
|
+
function ge(e, t) {
|
|
2234
|
+
let n = me(t);
|
|
2204
2235
|
if (!n.length) return !0;
|
|
2205
2236
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
2206
|
-
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (
|
|
2237
|
+
return n.some((e) => e.startsWith(".") ? i.endsWith(e) : e.endsWith("/*") ? r.startsWith(e.slice(0, -1)) : r && r === e ? !0 : !r && (fe[e] || []).some((e) => i.endsWith(e)));
|
|
2207
2238
|
}
|
|
2208
|
-
function
|
|
2239
|
+
function J(e, t = {}) {
|
|
2209
2240
|
if (!e) return null;
|
|
2210
|
-
let n = t.accept === void 0 ?
|
|
2211
|
-
return
|
|
2241
|
+
let n = t.accept === void 0 ? de : t.accept, r = t.maxSizeMb || 5;
|
|
2242
|
+
return ge(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${he(n)} file.`;
|
|
2212
2243
|
}
|
|
2213
|
-
var
|
|
2244
|
+
var Y = (e, t) => {
|
|
2214
2245
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
2215
2246
|
};
|
|
2216
|
-
function
|
|
2217
|
-
|
|
2247
|
+
function _e() {
|
|
2248
|
+
Y("wui-select", ue), Y("wui-phone", ce), Y("wui-datepicker", ie), Y("wui-autocomplete", te), Y("wui-multiselect", ae), Y("wui-status-icon", ee);
|
|
2218
2249
|
}
|
|
2219
|
-
|
|
2250
|
+
_e();
|
|
2220
2251
|
//#endregion
|
|
2221
2252
|
//#region src/components/RequiredMark.jsx
|
|
2222
|
-
function
|
|
2253
|
+
function X() {
|
|
2223
2254
|
return /* @__PURE__ */ t("span", {
|
|
2224
2255
|
className: "required",
|
|
2225
2256
|
"aria-hidden": "true",
|
|
@@ -2228,22 +2259,23 @@ function G() {
|
|
|
2228
2259
|
}
|
|
2229
2260
|
//#endregion
|
|
2230
2261
|
//#region src/components/AppAutocomplete.jsx
|
|
2231
|
-
function
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
e
|
|
2236
|
-
|
|
2237
|
-
|
|
2262
|
+
function ve({ value: e, onChange: r, options: i, loadOptions: o, placeholder: s = "Search…", minChars: l, debounce: u, disabled: d = !1, name: f, label: p, error: m, hint: h, required: g = !1, fieldClassName: _ = "", ...v }) {
|
|
2263
|
+
T("AppAutocomplete", v);
|
|
2264
|
+
let y = c(null), b = typeof o == "function";
|
|
2265
|
+
return a(() => {
|
|
2266
|
+
let e = y.current;
|
|
2267
|
+
e && !b && (e.options = i || []);
|
|
2268
|
+
}, [i, b]), a(() => {
|
|
2269
|
+
let t = y.current;
|
|
2238
2270
|
t && t.value !== (e ?? "") && (t.value = e ?? "");
|
|
2239
|
-
}, [e]),
|
|
2240
|
-
let e =
|
|
2271
|
+
}, [e]), a(() => {
|
|
2272
|
+
let e = y.current;
|
|
2241
2273
|
if (!e) return;
|
|
2242
2274
|
let t = () => r?.(e.value);
|
|
2243
2275
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
2244
|
-
}, [r]),
|
|
2245
|
-
let e =
|
|
2246
|
-
if (!e || !
|
|
2276
|
+
}, [r]), a(() => {
|
|
2277
|
+
let e = y.current;
|
|
2278
|
+
if (!e || !b) return;
|
|
2247
2279
|
let t = !1, n = async (n) => {
|
|
2248
2280
|
e.loading = !0;
|
|
2249
2281
|
try {
|
|
@@ -2256,21 +2288,21 @@ function ge({ value: e, onChange: r, options: a, loadOptions: o, placeholder: c
|
|
|
2256
2288
|
return e.addEventListener("search", n), () => {
|
|
2257
2289
|
t = !0, e.removeEventListener("search", n);
|
|
2258
2290
|
};
|
|
2259
|
-
}, [
|
|
2291
|
+
}, [b, o]), /* @__PURE__ */ n("div", {
|
|
2260
2292
|
className: `field${_ ? ` ${_}` : ""}`,
|
|
2261
2293
|
children: [
|
|
2262
2294
|
p && /* @__PURE__ */ n("label", {
|
|
2263
2295
|
className: "label",
|
|
2264
2296
|
htmlFor: f,
|
|
2265
|
-
children: [p, g && /* @__PURE__ */ t(
|
|
2297
|
+
children: [p, g && /* @__PURE__ */ t(X, {})]
|
|
2266
2298
|
}),
|
|
2267
2299
|
/* @__PURE__ */ t("wui-autocomplete", {
|
|
2268
2300
|
"aria-label": typeof p == "string" ? p : void 0,
|
|
2269
2301
|
id: f,
|
|
2270
|
-
ref:
|
|
2302
|
+
ref: y,
|
|
2271
2303
|
name: f,
|
|
2272
|
-
placeholder:
|
|
2273
|
-
remote:
|
|
2304
|
+
placeholder: s,
|
|
2305
|
+
remote: b ? "" : void 0,
|
|
2274
2306
|
"min-chars": l == null ? void 0 : String(l),
|
|
2275
2307
|
debounce: u == null ? void 0 : String(u),
|
|
2276
2308
|
disabled: d ? "" : void 0,
|
|
@@ -2288,32 +2320,33 @@ function ge({ value: e, onChange: r, options: a, loadOptions: o, placeholder: c
|
|
|
2288
2320
|
}
|
|
2289
2321
|
//#endregion
|
|
2290
2322
|
//#region src/components/AppAvatar.jsx
|
|
2291
|
-
function
|
|
2323
|
+
function ye(e) {
|
|
2292
2324
|
let t = (e || "").trim();
|
|
2293
2325
|
if (!t) return "?";
|
|
2294
2326
|
let n = t.split(/\s+/).filter(Boolean);
|
|
2295
2327
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
2296
2328
|
}
|
|
2297
|
-
function
|
|
2298
|
-
|
|
2329
|
+
function be({ name: e, src: n, className: r = "", ...i }) {
|
|
2330
|
+
T("AppAvatar", i);
|
|
2331
|
+
let a = ["avatar", r].filter(Boolean).join(" ");
|
|
2299
2332
|
return n ? /* @__PURE__ */ t("span", {
|
|
2300
|
-
className:
|
|
2333
|
+
className: a,
|
|
2301
2334
|
children: /* @__PURE__ */ t("img", {
|
|
2302
2335
|
className: "avatar-img",
|
|
2303
2336
|
src: n,
|
|
2304
2337
|
alt: e || "Profile photo"
|
|
2305
2338
|
})
|
|
2306
2339
|
}) : /* @__PURE__ */ t("span", {
|
|
2307
|
-
className:
|
|
2340
|
+
className: a,
|
|
2308
2341
|
role: "img",
|
|
2309
2342
|
"aria-label": e,
|
|
2310
|
-
children:
|
|
2343
|
+
children: ye(e)
|
|
2311
2344
|
});
|
|
2312
2345
|
}
|
|
2313
2346
|
//#endregion
|
|
2314
2347
|
//#region src/components/AppBadge.jsx
|
|
2315
|
-
function
|
|
2316
|
-
return /* @__PURE__ */ t(
|
|
2348
|
+
function xe({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
2349
|
+
return T("AppBadge", a), /* @__PURE__ */ t(d, {
|
|
2317
2350
|
bg: !1,
|
|
2318
2351
|
className: [
|
|
2319
2352
|
n ? `badge-${n}` : "",
|
|
@@ -2326,17 +2359,17 @@ function ye({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
|
2326
2359
|
}
|
|
2327
2360
|
//#endregion
|
|
2328
2361
|
//#region src/components/AppButton.jsx
|
|
2329
|
-
var
|
|
2362
|
+
var Se = {
|
|
2330
2363
|
primary: "primary",
|
|
2331
2364
|
secondary: "secondary",
|
|
2332
2365
|
outline: "outline-primary",
|
|
2333
2366
|
ghost: "link",
|
|
2334
2367
|
danger: "danger"
|
|
2335
2368
|
};
|
|
2336
|
-
function
|
|
2369
|
+
function Ce(e, n) {
|
|
2337
2370
|
if (!e) return null;
|
|
2338
2371
|
let r = n === "left" ? "me-2" : "ms-2";
|
|
2339
|
-
return typeof e == "string" ? /* @__PURE__ */ t(
|
|
2372
|
+
return typeof e == "string" ? /* @__PURE__ */ t(O, {
|
|
2340
2373
|
name: e,
|
|
2341
2374
|
size: 16,
|
|
2342
2375
|
className: r
|
|
@@ -2345,11 +2378,12 @@ function K(e, n) {
|
|
|
2345
2378
|
children: e
|
|
2346
2379
|
});
|
|
2347
2380
|
}
|
|
2348
|
-
function
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2381
|
+
function Z({ 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: d = "", ...p }) {
|
|
2382
|
+
T("AppButton", p);
|
|
2383
|
+
let m = [c ? "w-100" : "", d].filter(Boolean).join(" ");
|
|
2384
|
+
return /* @__PURE__ */ n(f, {
|
|
2385
|
+
type: (p.as === void 0 || p.as === "button") && p.href === void 0 ? a : void 0,
|
|
2386
|
+
variant: Se[r] ?? "primary",
|
|
2353
2387
|
size: i === "md" ? void 0 : i,
|
|
2354
2388
|
disabled: s || o,
|
|
2355
2389
|
className: m || void 0,
|
|
@@ -2359,20 +2393,20 @@ function q({ children: e, variant: r = "primary", size: i = "md", type: a = "but
|
|
|
2359
2393
|
className: "spinner-border spinner-border-sm me-2",
|
|
2360
2394
|
"aria-hidden": "true"
|
|
2361
2395
|
}),
|
|
2362
|
-
!o &&
|
|
2396
|
+
!o && Ce(l, "left"),
|
|
2363
2397
|
e,
|
|
2364
|
-
!o &&
|
|
2398
|
+
!o && Ce(u, "right")
|
|
2365
2399
|
]
|
|
2366
2400
|
});
|
|
2367
2401
|
}
|
|
2368
2402
|
//#endregion
|
|
2369
2403
|
//#region src/components/AppCallout.jsx
|
|
2370
|
-
function
|
|
2371
|
-
return /* @__PURE__ */ n("div", {
|
|
2404
|
+
function we({ children: e, icon: r = "info", className: i = "", ...a }) {
|
|
2405
|
+
return T("AppCallout", a), /* @__PURE__ */ n("div", {
|
|
2372
2406
|
className: `info-callout${i ? ` ${i}` : ""}`,
|
|
2373
2407
|
children: [r && /* @__PURE__ */ t("span", {
|
|
2374
2408
|
className: "info-callout-icon",
|
|
2375
|
-
children: /* @__PURE__ */ t(
|
|
2409
|
+
children: /* @__PURE__ */ t(O, {
|
|
2376
2410
|
name: r,
|
|
2377
2411
|
size: 18
|
|
2378
2412
|
})
|
|
@@ -2381,15 +2415,16 @@ function xe({ children: e, icon: r = "info", className: i = "" }) {
|
|
|
2381
2415
|
}
|
|
2382
2416
|
//#endregion
|
|
2383
2417
|
//#region src/components/AppCard.jsx
|
|
2384
|
-
function
|
|
2418
|
+
function Te({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body: f = !0, lifted: m = !1, ...h }) {
|
|
2419
|
+
T("AppCard", h);
|
|
2385
2420
|
let g = a != null || r != null || o != null || s != null;
|
|
2386
|
-
return /* @__PURE__ */ n(
|
|
2421
|
+
return /* @__PURE__ */ n(p, {
|
|
2387
2422
|
className: [m ? "card-lifted" : "", l].filter(Boolean).join(" ") || void 0,
|
|
2388
2423
|
...h,
|
|
2389
|
-
children: [g && /* @__PURE__ */ t(
|
|
2424
|
+
children: [g && /* @__PURE__ */ t(p.Header, {
|
|
2390
2425
|
className: d || void 0,
|
|
2391
2426
|
children: a ?? /* @__PURE__ */ n(e, { children: [
|
|
2392
|
-
r != null && /* @__PURE__ */ t(
|
|
2427
|
+
r != null && /* @__PURE__ */ t(p.Title, {
|
|
2393
2428
|
as: "div",
|
|
2394
2429
|
className: i || void 0,
|
|
2395
2430
|
children: r
|
|
@@ -2397,7 +2432,7 @@ function Se({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
|
|
|
2397
2432
|
o,
|
|
2398
2433
|
s
|
|
2399
2434
|
] })
|
|
2400
|
-
}),
|
|
2435
|
+
}), f ? /* @__PURE__ */ t(p.Body, {
|
|
2401
2436
|
className: u || void 0,
|
|
2402
2437
|
children: c
|
|
2403
2438
|
}) : c]
|
|
@@ -2405,10 +2440,11 @@ function Se({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
|
|
|
2405
2440
|
}
|
|
2406
2441
|
//#endregion
|
|
2407
2442
|
//#region src/components/AppCheckbox.jsx
|
|
2408
|
-
var
|
|
2409
|
-
|
|
2443
|
+
var Ee = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
2444
|
+
T("AppCheckbox", s);
|
|
2445
|
+
let l = o(), u = r || i || l;
|
|
2410
2446
|
return /* @__PURE__ */ n("div", {
|
|
2411
|
-
className: `form-check${
|
|
2447
|
+
className: `form-check${a ? ` ${a}` : ""}`,
|
|
2412
2448
|
children: [/* @__PURE__ */ t("input", {
|
|
2413
2449
|
type: "checkbox",
|
|
2414
2450
|
className: "form-check-input",
|
|
@@ -2425,8 +2461,9 @@ var Ce = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
|
2425
2461
|
});
|
|
2426
2462
|
//#endregion
|
|
2427
2463
|
//#region src/components/AppChip.jsx
|
|
2428
|
-
function
|
|
2429
|
-
|
|
2464
|
+
function De({ label: r, children: i, tone: a = "neutral", size: o = "md", leadingIcon: s, avatar: c, onRemove: l, onClick: u, disabled: d = !1, removeLabel: f, className: p = "", ...m }) {
|
|
2465
|
+
T("AppChip", m);
|
|
2466
|
+
let h = r ?? i, g = [
|
|
2430
2467
|
"chip",
|
|
2431
2468
|
a && a !== "neutral" ? a : "",
|
|
2432
2469
|
o === "sm" ? "chip-sm" : "",
|
|
@@ -2434,7 +2471,7 @@ function we({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
2434
2471
|
l ? "chip-removable" : "",
|
|
2435
2472
|
d ? "is-disabled" : "",
|
|
2436
2473
|
p
|
|
2437
|
-
].filter(Boolean).join(" "),
|
|
2474
|
+
].filter(Boolean).join(" "), _ = c ? /* @__PURE__ */ t("span", {
|
|
2438
2475
|
className: "chip-avatar",
|
|
2439
2476
|
children: typeof c == "string" ? /* @__PURE__ */ t("img", {
|
|
2440
2477
|
src: c,
|
|
@@ -2442,32 +2479,32 @@ function we({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
2442
2479
|
}) : c
|
|
2443
2480
|
}) : s ? /* @__PURE__ */ t("span", {
|
|
2444
2481
|
className: "chip-ic",
|
|
2445
|
-
children: /* @__PURE__ */ t(
|
|
2482
|
+
children: /* @__PURE__ */ t(O, {
|
|
2446
2483
|
name: s,
|
|
2447
2484
|
size: o === "sm" ? 12 : 14
|
|
2448
2485
|
})
|
|
2449
2486
|
}) : null;
|
|
2450
2487
|
return /* @__PURE__ */ n("span", {
|
|
2451
|
-
className:
|
|
2488
|
+
className: g,
|
|
2452
2489
|
children: [u ? /* @__PURE__ */ n("button", {
|
|
2453
2490
|
type: "button",
|
|
2454
2491
|
className: "chip-body",
|
|
2455
2492
|
onClick: u,
|
|
2456
2493
|
disabled: d,
|
|
2457
|
-
children: [
|
|
2494
|
+
children: [_, /* @__PURE__ */ t("span", {
|
|
2458
2495
|
className: "chip-label",
|
|
2459
|
-
children:
|
|
2496
|
+
children: h
|
|
2460
2497
|
})]
|
|
2461
|
-
}) : /* @__PURE__ */ n(e, { children: [
|
|
2498
|
+
}) : /* @__PURE__ */ n(e, { children: [_, /* @__PURE__ */ t("span", {
|
|
2462
2499
|
className: "chip-label",
|
|
2463
|
-
children:
|
|
2500
|
+
children: h
|
|
2464
2501
|
})] }), l && /* @__PURE__ */ t("button", {
|
|
2465
2502
|
type: "button",
|
|
2466
2503
|
className: "chip-remove",
|
|
2467
2504
|
onClick: l,
|
|
2468
2505
|
disabled: d,
|
|
2469
|
-
"aria-label": f || (typeof
|
|
2470
|
-
children: /* @__PURE__ */ t(
|
|
2506
|
+
"aria-label": f || (typeof h == "string" ? `Remove ${h}` : "Remove"),
|
|
2507
|
+
children: /* @__PURE__ */ t(O, {
|
|
2471
2508
|
name: "x",
|
|
2472
2509
|
size: o === "sm" ? 12 : 14
|
|
2473
2510
|
})
|
|
@@ -2476,8 +2513,8 @@ function we({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
2476
2513
|
}
|
|
2477
2514
|
//#endregion
|
|
2478
2515
|
//#region src/components/AppChoiceCard.jsx
|
|
2479
|
-
function
|
|
2480
|
-
return /* @__PURE__ */ n("label", {
|
|
2516
|
+
function Oe({ 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 = "", ...y }) {
|
|
2517
|
+
return T("AppChoiceCard", y), /* @__PURE__ */ n("label", {
|
|
2481
2518
|
className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
2482
2519
|
children: [
|
|
2483
2520
|
/* @__PURE__ */ t("input", {
|
|
@@ -2497,7 +2534,7 @@ function Te({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2497
2534
|
})
|
|
2498
2535
|
}) : l || c ? /* @__PURE__ */ t("span", {
|
|
2499
2536
|
className: "struct-card-ic",
|
|
2500
|
-
children: l || /* @__PURE__ */ t(
|
|
2537
|
+
children: l || /* @__PURE__ */ t(O, {
|
|
2501
2538
|
name: c,
|
|
2502
2539
|
size: u
|
|
2503
2540
|
})
|
|
@@ -2514,7 +2551,7 @@ function Te({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2514
2551
|
}),
|
|
2515
2552
|
/* @__PURE__ */ t("span", {
|
|
2516
2553
|
className: "struct-card-check",
|
|
2517
|
-
children: /* @__PURE__ */ t(
|
|
2554
|
+
children: /* @__PURE__ */ t(O, {
|
|
2518
2555
|
name: g,
|
|
2519
2556
|
size: _
|
|
2520
2557
|
})
|
|
@@ -2524,8 +2561,8 @@ function Te({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2524
2561
|
}
|
|
2525
2562
|
//#endregion
|
|
2526
2563
|
//#region src/components/AppChoiceChip.jsx
|
|
2527
|
-
function
|
|
2528
|
-
return /* @__PURE__ */ n("label", {
|
|
2564
|
+
function ke({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
|
|
2565
|
+
return T("AppChoiceChip", d), /* @__PURE__ */ n("label", {
|
|
2529
2566
|
className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
|
|
2530
2567
|
children: [
|
|
2531
2568
|
/* @__PURE__ */ t("input", {
|
|
@@ -2545,15 +2582,16 @@ function Ee({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChang
|
|
|
2545
2582
|
}
|
|
2546
2583
|
//#endregion
|
|
2547
2584
|
//#region src/components/AppColorField.jsx
|
|
2548
|
-
function
|
|
2549
|
-
|
|
2585
|
+
function Ae({ value: e = "#000000", onChange: r, label: i, required: a = !1, error: o, hint: s, name: c, id: l, disabled: u = !1, className: d = "", ...f }) {
|
|
2586
|
+
T("AppColorField", f);
|
|
2587
|
+
let p = l || c;
|
|
2550
2588
|
return /* @__PURE__ */ n("div", {
|
|
2551
2589
|
className: `field${d ? ` ${d}` : ""}`,
|
|
2552
2590
|
children: [
|
|
2553
2591
|
i && /* @__PURE__ */ n("label", {
|
|
2554
2592
|
className: "label",
|
|
2555
|
-
htmlFor:
|
|
2556
|
-
children: [i, a && /* @__PURE__ */ t(
|
|
2593
|
+
htmlFor: p,
|
|
2594
|
+
children: [i, a && /* @__PURE__ */ t(X, {})]
|
|
2557
2595
|
}),
|
|
2558
2596
|
/* @__PURE__ */ n("div", {
|
|
2559
2597
|
className: "color-field",
|
|
@@ -2568,7 +2606,7 @@ function De({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
|
|
|
2568
2606
|
}), /* @__PURE__ */ t("input", {
|
|
2569
2607
|
type: "text",
|
|
2570
2608
|
className: `input color-field-hex${o ? " error" : ""}`,
|
|
2571
|
-
id:
|
|
2609
|
+
id: p,
|
|
2572
2610
|
name: c,
|
|
2573
2611
|
value: e,
|
|
2574
2612
|
onChange: (e) => r?.(e.target.value),
|
|
@@ -2592,10 +2630,11 @@ function De({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
|
|
|
2592
2630
|
}
|
|
2593
2631
|
//#endregion
|
|
2594
2632
|
//#region src/components/AppCompareTable.jsx
|
|
2595
|
-
function
|
|
2596
|
-
|
|
2633
|
+
function je({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
|
|
2634
|
+
T("AppCompareTable", o);
|
|
2635
|
+
let s = (e) => e === !0 ? /* @__PURE__ */ t("span", {
|
|
2597
2636
|
className: "compare-yes",
|
|
2598
|
-
children: /* @__PURE__ */ t(
|
|
2637
|
+
children: /* @__PURE__ */ t(O, {
|
|
2599
2638
|
name: "check",
|
|
2600
2639
|
size: 16
|
|
2601
2640
|
})
|
|
@@ -2620,52 +2659,53 @@ function Oe({ columns: e = [], rows: r = [], caption: i, className: a = "" }) {
|
|
|
2620
2659
|
children: r.label
|
|
2621
2660
|
}), r.values.map((n, r) => /* @__PURE__ */ t("td", {
|
|
2622
2661
|
className: e[r + 1]?.highlight ? "is-highlight" : void 0,
|
|
2623
|
-
children:
|
|
2662
|
+
children: s(n)
|
|
2624
2663
|
}, e[r + 1]?.label ?? r))] }, r.key ?? `${r.label}-${i}`)) })
|
|
2625
2664
|
] })
|
|
2626
2665
|
});
|
|
2627
2666
|
}
|
|
2628
2667
|
//#endregion
|
|
2629
2668
|
//#region src/components/AppInfoTip.jsx
|
|
2630
|
-
function
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2669
|
+
function Q({ label: e, children: r, ...i }) {
|
|
2670
|
+
T("AppInfoTip", i);
|
|
2671
|
+
let [a, u] = l(!1), [d, f] = l(null), p = c(null), m = c(null), g = o();
|
|
2672
|
+
return s(() => {
|
|
2673
|
+
if (!a || !p.current || !m.current) return;
|
|
2674
|
+
let e = p.current.getBoundingClientRect(), t = m.current.offsetWidth, n = m.current.offsetHeight, r = e.left + e.width / 2 - t / 2;
|
|
2635
2675
|
r = Math.max(8, Math.min(r, window.innerWidth - t - 8));
|
|
2636
|
-
let
|
|
2637
|
-
|
|
2638
|
-
top:
|
|
2676
|
+
let i = e.top - n - 8;
|
|
2677
|
+
i < 8 && (i = e.bottom + 8), f({
|
|
2678
|
+
top: i,
|
|
2639
2679
|
left: r
|
|
2640
2680
|
});
|
|
2641
|
-
}, [
|
|
2681
|
+
}, [a]), r ? /* @__PURE__ */ n("span", {
|
|
2642
2682
|
className: "infotip",
|
|
2643
|
-
onMouseLeave: () =>
|
|
2683
|
+
onMouseLeave: () => u(!1),
|
|
2644
2684
|
children: [/* @__PURE__ */ t("button", {
|
|
2645
2685
|
type: "button",
|
|
2646
|
-
ref:
|
|
2686
|
+
ref: p,
|
|
2647
2687
|
className: "infotip-btn",
|
|
2648
2688
|
"aria-label": e,
|
|
2649
|
-
"aria-expanded":
|
|
2650
|
-
"aria-describedby":
|
|
2651
|
-
onMouseEnter: () =>
|
|
2652
|
-
onClick: () =>
|
|
2653
|
-
onFocus: () =>
|
|
2654
|
-
onBlur: () =>
|
|
2655
|
-
children: /* @__PURE__ */ t(
|
|
2689
|
+
"aria-expanded": a,
|
|
2690
|
+
"aria-describedby": a ? g : void 0,
|
|
2691
|
+
onMouseEnter: () => u(!0),
|
|
2692
|
+
onClick: () => u((e) => !e),
|
|
2693
|
+
onFocus: () => u(!0),
|
|
2694
|
+
onBlur: () => u(!1),
|
|
2695
|
+
children: /* @__PURE__ */ t(O, {
|
|
2656
2696
|
name: "info",
|
|
2657
2697
|
size: 16
|
|
2658
2698
|
})
|
|
2659
|
-
}),
|
|
2660
|
-
ref:
|
|
2699
|
+
}), a && h(/* @__PURE__ */ t("span", {
|
|
2700
|
+
ref: m,
|
|
2661
2701
|
className: "infotip-pop is-portal",
|
|
2662
2702
|
role: "tooltip",
|
|
2663
|
-
id:
|
|
2703
|
+
id: g,
|
|
2664
2704
|
style: {
|
|
2665
2705
|
position: "fixed",
|
|
2666
|
-
top:
|
|
2667
|
-
left:
|
|
2668
|
-
visibility:
|
|
2706
|
+
top: d ? d.top : 0,
|
|
2707
|
+
left: d ? d.left : 0,
|
|
2708
|
+
visibility: d ? "visible" : "hidden"
|
|
2669
2709
|
},
|
|
2670
2710
|
children: r
|
|
2671
2711
|
}), document.body)]
|
|
@@ -2673,109 +2713,153 @@ function J({ label: e, children: r }) {
|
|
|
2673
2713
|
}
|
|
2674
2714
|
//#endregion
|
|
2675
2715
|
//#region src/components/AppInput.jsx
|
|
2676
|
-
var
|
|
2677
|
-
|
|
2716
|
+
var Me = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type: u = "text", size: d = "md", leftIcon: f, rightIcon: p, onRightIconClick: h, unit: g, id: _, name: v, className: y = "", fieldClassName: b = "", disabled: x = !1, clearable: S = !1, showCount: C = !1, maxLength: w, ...E }, D) {
|
|
2717
|
+
T("AppInput", E);
|
|
2718
|
+
let [k, A] = l(!1), j = _ || v, M = u === "password", ee = M && k ? "text" : u, N = c(null), P = (e) => {
|
|
2719
|
+
N.current = e, typeof D == "function" ? D(e) : D && (D.current = e);
|
|
2720
|
+
}, F = String(E.value ?? E.defaultValue ?? ""), [I, L] = l(() => !!F), [te, R] = l(() => F.length), z = S && !x, B = S || C, ne = (e) => {
|
|
2721
|
+
L(!!e.target.value), R(e.target.value.length), E.onInput?.(e);
|
|
2722
|
+
}, V = z ? /* @__PURE__ */ t("button", {
|
|
2723
|
+
type: "button",
|
|
2724
|
+
className: "input-clear",
|
|
2725
|
+
onClick: () => {
|
|
2726
|
+
let e = N.current;
|
|
2727
|
+
if (!e) return;
|
|
2728
|
+
let t = Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value")?.set;
|
|
2729
|
+
t ? t.call(e, "") : e.value = "", e.dispatchEvent(new Event("input", { bubbles: !0 })), L(!1), e.focus();
|
|
2730
|
+
},
|
|
2731
|
+
"aria-label": "Clear",
|
|
2732
|
+
tabIndex: -1,
|
|
2733
|
+
hidden: !I,
|
|
2734
|
+
children: /* @__PURE__ */ t(O, {
|
|
2735
|
+
name: "x",
|
|
2736
|
+
size: 16
|
|
2737
|
+
})
|
|
2738
|
+
}) : null, re = [
|
|
2678
2739
|
"input",
|
|
2740
|
+
d === "sm" ? "input-sm" : "",
|
|
2741
|
+
d === "lg" ? "input-lg" : "",
|
|
2679
2742
|
i ? "error" : "",
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2743
|
+
M ? "pw" : "",
|
|
2744
|
+
g ? "num-input" : "",
|
|
2745
|
+
S ? "has-clear" : "",
|
|
2746
|
+
y
|
|
2747
|
+
].filter(Boolean).join(" "), H = /* @__PURE__ */ t(m.Control, {
|
|
2748
|
+
id: j,
|
|
2749
|
+
name: v,
|
|
2750
|
+
type: ee,
|
|
2751
|
+
className: re,
|
|
2752
|
+
disabled: x,
|
|
2689
2753
|
required: r,
|
|
2690
2754
|
"aria-invalid": i ? "true" : "false",
|
|
2691
|
-
|
|
2692
|
-
...
|
|
2693
|
-
|
|
2694
|
-
|
|
2755
|
+
maxLength: w,
|
|
2756
|
+
...E,
|
|
2757
|
+
ref: P,
|
|
2758
|
+
onInput: B ? ne : E.onInput
|
|
2759
|
+
}), U;
|
|
2760
|
+
return U = g ? /* @__PURE__ */ n("div", {
|
|
2695
2761
|
className: "input-with-unit",
|
|
2696
|
-
children: [
|
|
2762
|
+
children: [H, /* @__PURE__ */ t("span", {
|
|
2697
2763
|
className: "unit",
|
|
2698
|
-
children:
|
|
2764
|
+
children: g
|
|
2699
2765
|
})]
|
|
2700
|
-
}) :
|
|
2766
|
+
}) : M ? /* @__PURE__ */ n("div", {
|
|
2701
2767
|
className: "input-wrap",
|
|
2702
|
-
children: [
|
|
2768
|
+
children: [H, /* @__PURE__ */ t("button", {
|
|
2703
2769
|
type: "button",
|
|
2704
2770
|
className: "pw-toggle",
|
|
2705
|
-
onClick: () =>
|
|
2706
|
-
"aria-label":
|
|
2771
|
+
onClick: () => A((e) => !e),
|
|
2772
|
+
"aria-label": k ? "Hide password" : "Show password",
|
|
2707
2773
|
tabIndex: -1,
|
|
2708
|
-
children: /* @__PURE__ */ t(
|
|
2709
|
-
name:
|
|
2774
|
+
children: /* @__PURE__ */ t(O, {
|
|
2775
|
+
name: k ? "eye-off" : "eye",
|
|
2710
2776
|
size: 18
|
|
2711
2777
|
})
|
|
2712
2778
|
})]
|
|
2713
|
-
}) :
|
|
2779
|
+
}) : p ? /* @__PURE__ */ n("div", {
|
|
2714
2780
|
className: "input-wrap",
|
|
2715
|
-
children: [
|
|
2781
|
+
children: [H, /* @__PURE__ */ t("button", {
|
|
2716
2782
|
type: "button",
|
|
2717
2783
|
className: "pw-toggle",
|
|
2718
|
-
onClick:
|
|
2719
|
-
disabled: !
|
|
2784
|
+
onClick: h,
|
|
2785
|
+
disabled: !h,
|
|
2720
2786
|
tabIndex: -1,
|
|
2721
|
-
children: /* @__PURE__ */ t(
|
|
2722
|
-
name:
|
|
2787
|
+
children: /* @__PURE__ */ t(O, {
|
|
2788
|
+
name: p,
|
|
2723
2789
|
size: 18
|
|
2724
2790
|
})
|
|
2725
2791
|
})]
|
|
2726
|
-
}) :
|
|
2792
|
+
}) : S ? /* @__PURE__ */ n("div", {
|
|
2793
|
+
className: f ? "input-icon" : "input-wrap",
|
|
2794
|
+
children: [
|
|
2795
|
+
f && /* @__PURE__ */ t("span", {
|
|
2796
|
+
className: "ic",
|
|
2797
|
+
children: /* @__PURE__ */ t(O, {
|
|
2798
|
+
name: f,
|
|
2799
|
+
size: 16
|
|
2800
|
+
})
|
|
2801
|
+
}),
|
|
2802
|
+
H,
|
|
2803
|
+
V
|
|
2804
|
+
]
|
|
2805
|
+
}) : f ? /* @__PURE__ */ n("div", {
|
|
2727
2806
|
className: "input-icon",
|
|
2728
2807
|
children: [/* @__PURE__ */ t("span", {
|
|
2729
2808
|
className: "ic",
|
|
2730
|
-
children: /* @__PURE__ */ t(
|
|
2731
|
-
name:
|
|
2809
|
+
children: /* @__PURE__ */ t(O, {
|
|
2810
|
+
name: f,
|
|
2732
2811
|
size: 16
|
|
2733
2812
|
})
|
|
2734
|
-
}),
|
|
2735
|
-
}) :
|
|
2736
|
-
className: `field${
|
|
2813
|
+
}), H]
|
|
2814
|
+
}) : H, /* @__PURE__ */ n(m.Group, {
|
|
2815
|
+
className: `field${b ? ` ${b}` : ""}`,
|
|
2737
2816
|
children: [
|
|
2738
|
-
e && /* @__PURE__ */ n(
|
|
2817
|
+
e && /* @__PURE__ */ n(m.Label, {
|
|
2739
2818
|
className: "label",
|
|
2740
|
-
htmlFor:
|
|
2819
|
+
htmlFor: j,
|
|
2741
2820
|
children: [
|
|
2742
2821
|
e,
|
|
2743
|
-
r && /* @__PURE__ */ t(
|
|
2744
|
-
o && /* @__PURE__ */ t(
|
|
2822
|
+
r && /* @__PURE__ */ t(X, {}),
|
|
2823
|
+
o && /* @__PURE__ */ t(Q, {
|
|
2745
2824
|
label: s,
|
|
2746
2825
|
children: o
|
|
2747
2826
|
})
|
|
2748
2827
|
]
|
|
2749
2828
|
}),
|
|
2750
|
-
|
|
2829
|
+
U,
|
|
2751
2830
|
i ? /* @__PURE__ */ t("div", {
|
|
2752
2831
|
className: "field-error",
|
|
2753
2832
|
children: i
|
|
2754
2833
|
}) : a ? /* @__PURE__ */ t("div", {
|
|
2755
2834
|
className: "field-hint",
|
|
2756
2835
|
children: a
|
|
2757
|
-
}) : null
|
|
2836
|
+
}) : null,
|
|
2837
|
+
C && /* @__PURE__ */ n("div", {
|
|
2838
|
+
className: `field-count${w && te >= w ? " at-limit" : ""}`,
|
|
2839
|
+
children: [te, w ? ` / ${w}` : ""]
|
|
2840
|
+
})
|
|
2758
2841
|
]
|
|
2759
2842
|
});
|
|
2760
|
-
}),
|
|
2761
|
-
function
|
|
2762
|
-
|
|
2763
|
-
|
|
2843
|
+
}), Ne = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
|
|
2844
|
+
function Pe({ open: e, title: r, subtitle: i, headerIcon: o, onClose: s, footer: l, size: u, wide: d = !1, side: f = !1, maxWidth: p, hideHeader: m = !1, className: h = "", children: _, ...v }) {
|
|
2845
|
+
T("AppModal", v);
|
|
2846
|
+
let y = c(null);
|
|
2847
|
+
a(() => {
|
|
2764
2848
|
if (!e) return;
|
|
2765
|
-
let t =
|
|
2849
|
+
let t = y.current?.closest(".modal-content");
|
|
2766
2850
|
if (!t) return;
|
|
2767
|
-
let n = () => Array.from(t.querySelectorAll(
|
|
2851
|
+
let n = () => Array.from(t.querySelectorAll(Ne));
|
|
2768
2852
|
(t.querySelector("[data-autofocus]") || n().find((e) => !e.classList.contains("lx-modal-close")) || n()[0] || t).focus?.();
|
|
2769
2853
|
}, [e]);
|
|
2770
|
-
let
|
|
2854
|
+
let b = ["lx-modal-shell", f ? "is-side" : ""].filter(Boolean).join(" "), x = [
|
|
2771
2855
|
"lx-modal",
|
|
2772
2856
|
d ? "lx-modal-wide" : "",
|
|
2773
2857
|
f ? "lx-modal-side" : "",
|
|
2774
|
-
|
|
2858
|
+
h
|
|
2775
2859
|
].filter(Boolean).join(" ");
|
|
2776
|
-
return /* @__PURE__ */ n(
|
|
2860
|
+
return /* @__PURE__ */ n(g, {
|
|
2777
2861
|
show: e,
|
|
2778
|
-
onHide:
|
|
2862
|
+
onHide: s,
|
|
2779
2863
|
animation: !1,
|
|
2780
2864
|
backdrop: !0,
|
|
2781
2865
|
keyboard: !0,
|
|
@@ -2784,10 +2868,10 @@ function X({ open: e, title: r, subtitle: a, headerIcon: o, onClose: c, footer:
|
|
|
2784
2868
|
restoreFocus: !0,
|
|
2785
2869
|
size: u,
|
|
2786
2870
|
centered: !f,
|
|
2787
|
-
className:
|
|
2871
|
+
className: b,
|
|
2788
2872
|
style: p == null ? void 0 : { "--lx-modal-max-width": typeof p == "number" ? `${p}px` : p },
|
|
2789
2873
|
dialogClassName: "lx-rb-dialog",
|
|
2790
|
-
contentClassName:
|
|
2874
|
+
contentClassName: x,
|
|
2791
2875
|
backdropClassName: "lx-modal-dim",
|
|
2792
2876
|
"aria-label": typeof r == "string" ? r : void 0,
|
|
2793
2877
|
children: [
|
|
@@ -2797,7 +2881,7 @@ function X({ open: e, title: r, subtitle: a, headerIcon: o, onClose: c, footer:
|
|
|
2797
2881
|
className: "lx-modal-heading",
|
|
2798
2882
|
children: [o && /* @__PURE__ */ t("span", {
|
|
2799
2883
|
className: "lx-modal-headicon",
|
|
2800
|
-
children: /* @__PURE__ */ t(
|
|
2884
|
+
children: /* @__PURE__ */ t(O, {
|
|
2801
2885
|
name: o,
|
|
2802
2886
|
size: 18
|
|
2803
2887
|
})
|
|
@@ -2806,15 +2890,15 @@ function X({ open: e, title: r, subtitle: a, headerIcon: o, onClose: c, footer:
|
|
|
2806
2890
|
children: [/* @__PURE__ */ t("div", {
|
|
2807
2891
|
className: "lx-modal-title",
|
|
2808
2892
|
children: r
|
|
2809
|
-
}),
|
|
2893
|
+
}), i && /* @__PURE__ */ t("div", {
|
|
2810
2894
|
className: "lx-modal-subtitle",
|
|
2811
|
-
children:
|
|
2895
|
+
children: i
|
|
2812
2896
|
})]
|
|
2813
2897
|
})]
|
|
2814
2898
|
}), /* @__PURE__ */ t("button", {
|
|
2815
2899
|
type: "button",
|
|
2816
2900
|
className: "lx-modal-close",
|
|
2817
|
-
onClick:
|
|
2901
|
+
onClick: s,
|
|
2818
2902
|
"aria-label": "Close",
|
|
2819
2903
|
children: /* @__PURE__ */ t("svg", {
|
|
2820
2904
|
width: "18",
|
|
@@ -2832,7 +2916,7 @@ function X({ open: e, title: r, subtitle: a, headerIcon: o, onClose: c, footer:
|
|
|
2832
2916
|
}),
|
|
2833
2917
|
/* @__PURE__ */ t("div", {
|
|
2834
2918
|
className: "lx-modal-body",
|
|
2835
|
-
ref:
|
|
2919
|
+
ref: y,
|
|
2836
2920
|
children: _
|
|
2837
2921
|
}),
|
|
2838
2922
|
l && /* @__PURE__ */ t("div", {
|
|
@@ -2844,41 +2928,42 @@ function X({ open: e, title: r, subtitle: a, headerIcon: o, onClose: c, footer:
|
|
|
2844
2928
|
}
|
|
2845
2929
|
//#endregion
|
|
2846
2930
|
//#region src/components/ModalIcons.jsx
|
|
2847
|
-
var
|
|
2931
|
+
var $ = (e) => function({ size: n = 72 }) {
|
|
2848
2932
|
return /* @__PURE__ */ t("wui-status-icon", {
|
|
2849
2933
|
tone: e,
|
|
2850
2934
|
size: n
|
|
2851
2935
|
});
|
|
2852
|
-
},
|
|
2853
|
-
success:
|
|
2854
|
-
error:
|
|
2855
|
-
warning:
|
|
2856
|
-
info:
|
|
2857
|
-
delete:
|
|
2936
|
+
}, Fe = {
|
|
2937
|
+
success: $("success"),
|
|
2938
|
+
error: $("error"),
|
|
2939
|
+
warning: $("warning"),
|
|
2940
|
+
info: $("info"),
|
|
2941
|
+
delete: $("delete")
|
|
2858
2942
|
};
|
|
2859
2943
|
//#endregion
|
|
2860
2944
|
//#region src/components/AppConfirmDialog.jsx
|
|
2861
|
-
function
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2945
|
+
function Ie({ open: r, title: i, message: o, confirmLabel: s = "Confirm", cancelLabel: c = "Cancel", danger: u = !1, tone: d, confirmPhrase: f, onConfirm: p, onClose: m, ...h }) {
|
|
2946
|
+
T("AppConfirmDialog", h);
|
|
2947
|
+
let [g, _] = l("");
|
|
2948
|
+
if (a(() => {
|
|
2949
|
+
r || _("");
|
|
2865
2950
|
}, [r]), !r) return null;
|
|
2866
|
-
let
|
|
2867
|
-
return /* @__PURE__ */ t(
|
|
2951
|
+
let v = !!f && g.trim() !== f, y = Fe[d || (u ? "delete" : "info")];
|
|
2952
|
+
return /* @__PURE__ */ t(Pe, {
|
|
2868
2953
|
open: r,
|
|
2869
2954
|
hideHeader: !0,
|
|
2870
|
-
title:
|
|
2955
|
+
title: i,
|
|
2871
2956
|
onClose: m,
|
|
2872
2957
|
className: "lx-confirm",
|
|
2873
2958
|
footer: /* @__PURE__ */ n("div", {
|
|
2874
2959
|
className: "lx-confirm-actions",
|
|
2875
|
-
children: [/* @__PURE__ */ t(
|
|
2960
|
+
children: [/* @__PURE__ */ t(Z, {
|
|
2876
2961
|
variant: "secondary",
|
|
2877
2962
|
onClick: m,
|
|
2878
|
-
children:
|
|
2879
|
-
}), /* @__PURE__ */ t(
|
|
2963
|
+
children: c
|
|
2964
|
+
}), /* @__PURE__ */ t(Z, {
|
|
2880
2965
|
variant: u ? "danger" : "primary",
|
|
2881
|
-
disabled:
|
|
2966
|
+
disabled: v,
|
|
2882
2967
|
onClick: p,
|
|
2883
2968
|
children: s
|
|
2884
2969
|
})]
|
|
@@ -2886,27 +2971,29 @@ function je({ open: r, title: a, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
2886
2971
|
children: /* @__PURE__ */ n("div", {
|
|
2887
2972
|
className: "lx-confirm-content",
|
|
2888
2973
|
children: [
|
|
2889
|
-
|
|
2974
|
+
y && /* @__PURE__ */ t("span", {
|
|
2890
2975
|
className: "lx-confirm-icon",
|
|
2891
|
-
children: /* @__PURE__ */ t(
|
|
2976
|
+
children: /* @__PURE__ */ t(y, { size: 104 })
|
|
2892
2977
|
}),
|
|
2893
2978
|
/* @__PURE__ */ t("h3", {
|
|
2894
2979
|
className: "lx-confirm-title",
|
|
2895
|
-
|
|
2980
|
+
tabIndex: -1,
|
|
2981
|
+
"data-autofocus": !0,
|
|
2982
|
+
children: i
|
|
2896
2983
|
}),
|
|
2897
2984
|
o && /* @__PURE__ */ t("p", {
|
|
2898
2985
|
className: "lx-confirm-msg",
|
|
2899
2986
|
children: o
|
|
2900
2987
|
}),
|
|
2901
|
-
f && /* @__PURE__ */ t(
|
|
2988
|
+
f && /* @__PURE__ */ t(Me, {
|
|
2902
2989
|
fieldClassName: "mt-3 mb-0 w-100 text-start",
|
|
2903
2990
|
label: /* @__PURE__ */ n(e, { children: [
|
|
2904
2991
|
"Type ",
|
|
2905
2992
|
/* @__PURE__ */ t("strong", { children: f }),
|
|
2906
2993
|
" to confirm"
|
|
2907
2994
|
] }),
|
|
2908
|
-
value:
|
|
2909
|
-
onChange: (e) =>
|
|
2995
|
+
value: g,
|
|
2996
|
+
onChange: (e) => _(e.target.value),
|
|
2910
2997
|
"aria-label": `Type ${f} to confirm`
|
|
2911
2998
|
})
|
|
2912
2999
|
]
|
|
@@ -2915,8 +3002,8 @@ function je({ open: r, title: a, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
2915
3002
|
}
|
|
2916
3003
|
//#endregion
|
|
2917
3004
|
//#region src/components/AppSkeleton.jsx
|
|
2918
|
-
function
|
|
2919
|
-
return /* @__PURE__ */ t("span", {
|
|
3005
|
+
function Le({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
|
|
3006
|
+
return T("AppSkeleton", o), /* @__PURE__ */ t("span", {
|
|
2920
3007
|
className: `skeleton${i ? ` ${i}` : ""}`,
|
|
2921
3008
|
"aria-hidden": "true",
|
|
2922
3009
|
style: {
|
|
@@ -2927,7 +3014,7 @@ function Me({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "
|
|
|
2927
3014
|
}
|
|
2928
3015
|
});
|
|
2929
3016
|
}
|
|
2930
|
-
var
|
|
3017
|
+
var Re = [
|
|
2931
3018
|
"r0",
|
|
2932
3019
|
"r1",
|
|
2933
3020
|
"r2",
|
|
@@ -2936,7 +3023,7 @@ var Ne = [
|
|
|
2936
3023
|
"r5",
|
|
2937
3024
|
"r6",
|
|
2938
3025
|
"r7"
|
|
2939
|
-
],
|
|
3026
|
+
], ze = [
|
|
2940
3027
|
"c0",
|
|
2941
3028
|
"c1",
|
|
2942
3029
|
"c2",
|
|
@@ -2946,56 +3033,56 @@ var Ne = [
|
|
|
2946
3033
|
"c6",
|
|
2947
3034
|
"c7"
|
|
2948
3035
|
];
|
|
2949
|
-
function
|
|
2950
|
-
return
|
|
3036
|
+
function Be({ rows: e = 4, cols: n = 5 }) {
|
|
3037
|
+
return Re.slice(0, e).map((e) => /* @__PURE__ */ t("tr", { children: ze.slice(0, n).map((e, n) => /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t(Le, {
|
|
2951
3038
|
width: n === 0 ? "70%" : "50%",
|
|
2952
3039
|
height: 12
|
|
2953
3040
|
}) }, e)) }, e));
|
|
2954
3041
|
}
|
|
2955
3042
|
//#endregion
|
|
2956
3043
|
//#region src/components/AppSelectMini.jsx
|
|
2957
|
-
function
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
3044
|
+
function Ve({ value: e, onChange: n, options: r = [], placeholder: i = "Select...", name: o, ariaLabel: s, id: l, disabled: u, className: d, ...f }) {
|
|
3045
|
+
T("AppSelectMini", f);
|
|
3046
|
+
let p = c(null);
|
|
3047
|
+
return a(() => {
|
|
3048
|
+
p.current && (p.current.options = r.map((e) => ({
|
|
2961
3049
|
value: e.value,
|
|
2962
3050
|
label: e.label ?? e.text ?? ""
|
|
2963
3051
|
})));
|
|
2964
|
-
}, [r]),
|
|
2965
|
-
let t =
|
|
3052
|
+
}, [r]), a(() => {
|
|
3053
|
+
let t = p.current;
|
|
2966
3054
|
t && String(t.value ?? "") !== String(e ?? "") && (t.value = e ?? "");
|
|
2967
|
-
}, [e]),
|
|
2968
|
-
let e =
|
|
3055
|
+
}, [e]), a(() => {
|
|
3056
|
+
let e = p.current;
|
|
2969
3057
|
if (!e) return;
|
|
2970
3058
|
let t = () => n?.(e.value);
|
|
2971
3059
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
2972
3060
|
}, [n]), /* @__PURE__ */ t("wui-select", {
|
|
2973
|
-
ref:
|
|
3061
|
+
ref: p,
|
|
2974
3062
|
name: o,
|
|
2975
3063
|
compact: "",
|
|
2976
3064
|
id: l,
|
|
2977
|
-
placeholder:
|
|
2978
|
-
"aria-label":
|
|
3065
|
+
placeholder: i,
|
|
3066
|
+
"aria-label": s,
|
|
2979
3067
|
disabled: u ? "" : void 0,
|
|
2980
3068
|
className: d
|
|
2981
3069
|
});
|
|
2982
3070
|
}
|
|
2983
3071
|
//#endregion
|
|
2984
3072
|
//#region src/components/AppTablePagination.jsx
|
|
2985
|
-
var
|
|
3073
|
+
var He = [
|
|
2986
3074
|
5,
|
|
2987
3075
|
10,
|
|
2988
3076
|
25,
|
|
2989
3077
|
50
|
|
2990
3078
|
];
|
|
2991
|
-
function
|
|
2992
|
-
return /* @__PURE__ */ n("div", {
|
|
3079
|
+
function Ue({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = He, ...d }) {
|
|
3080
|
+
return T("AppTablePagination", d), /* @__PURE__ */ n("div", {
|
|
2993
3081
|
className: "table-pagination",
|
|
2994
3082
|
children: [
|
|
2995
3083
|
/* @__PURE__ */ n("span", {
|
|
2996
3084
|
className: "tpg-rows",
|
|
2997
|
-
children: ["Rows per page:", /* @__PURE__ */ t(
|
|
2998
|
-
compact: !0,
|
|
3085
|
+
children: ["Rows per page:", /* @__PURE__ */ t(Ve, {
|
|
2999
3086
|
value: i,
|
|
3000
3087
|
onChange: (e) => l(Number(e)),
|
|
3001
3088
|
ariaLabel: "Rows per page",
|
|
@@ -3023,7 +3110,7 @@ function Le({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
|
|
|
3023
3110
|
onClick: () => c(Math.max(1, e - 1)),
|
|
3024
3111
|
disabled: e <= 1,
|
|
3025
3112
|
"aria-label": "Previous page",
|
|
3026
|
-
children: /* @__PURE__ */ t(
|
|
3113
|
+
children: /* @__PURE__ */ t(O, {
|
|
3027
3114
|
name: "arrow-left",
|
|
3028
3115
|
size: 18
|
|
3029
3116
|
})
|
|
@@ -3033,7 +3120,7 @@ function Le({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
|
|
|
3033
3120
|
onClick: () => c(Math.min(r, e + 1)),
|
|
3034
3121
|
disabled: e >= r,
|
|
3035
3122
|
"aria-label": "Next page",
|
|
3036
|
-
children: /* @__PURE__ */ t(
|
|
3123
|
+
children: /* @__PURE__ */ t(O, {
|
|
3037
3124
|
name: "arrow-right",
|
|
3038
3125
|
size: 18
|
|
3039
3126
|
})
|
|
@@ -3044,16 +3131,17 @@ function Le({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
|
|
|
3044
3131
|
}
|
|
3045
3132
|
//#endregion
|
|
3046
3133
|
//#region src/components/AppDataTable.jsx
|
|
3047
|
-
function
|
|
3134
|
+
function We(e) {
|
|
3048
3135
|
return e === "end" ? "lx-cell-end" : e === "num" ? "num" : e === "center" ? "text-center" : "";
|
|
3049
3136
|
}
|
|
3050
|
-
function
|
|
3137
|
+
function Ge(e) {
|
|
3051
3138
|
return e == null || e === "" ? "—" : e;
|
|
3052
3139
|
}
|
|
3053
|
-
function
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3140
|
+
function Ke({ 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: x, ...S }) {
|
|
3141
|
+
T("AppDataTable", S);
|
|
3142
|
+
let C = Math.max(1, r.length + +!!p + +!!v), w = v && i ? i.reduce((e, t) => e + +!!y?.has(a(t)), 0) : 0, E = v && i && i.length > 0 && w === i.length, D = w > 0 && !E, k = (e) => {
|
|
3143
|
+
e && (e.indeterminate = D);
|
|
3144
|
+
}, A = d !== void 0 && f > 0 ? d : u;
|
|
3057
3145
|
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
|
|
3058
3146
|
className: "table-wrap",
|
|
3059
3147
|
children: /* @__PURE__ */ n("table", {
|
|
@@ -3063,18 +3151,18 @@ function Be({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3063
3151
|
v && /* @__PURE__ */ t("th", {
|
|
3064
3152
|
className: "lx-select-cell",
|
|
3065
3153
|
children: /* @__PURE__ */ t("input", {
|
|
3066
|
-
ref:
|
|
3154
|
+
ref: k,
|
|
3067
3155
|
type: "checkbox",
|
|
3068
3156
|
className: "lx-check",
|
|
3069
|
-
checked:
|
|
3070
|
-
onChange: (e) =>
|
|
3157
|
+
checked: E,
|
|
3158
|
+
onChange: (e) => x?.(e.target.checked),
|
|
3071
3159
|
"aria-label": "Select all rows"
|
|
3072
3160
|
})
|
|
3073
3161
|
}),
|
|
3074
3162
|
r.map((e) => {
|
|
3075
3163
|
let r = !!(e.sortable && s), i = o && o.key === e.key;
|
|
3076
3164
|
return /* @__PURE__ */ n("th", {
|
|
3077
|
-
className: (r ? "sortable " : "") +
|
|
3165
|
+
className: (r ? "sortable " : "") + We(e.align),
|
|
3078
3166
|
style: e.width ? { width: e.width } : void 0,
|
|
3079
3167
|
tabIndex: r ? 0 : void 0,
|
|
3080
3168
|
"aria-sort": i ? o.dir === "asc" ? "ascending" : "descending" : r ? "none" : void 0,
|
|
@@ -3084,7 +3172,7 @@ function Be({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3084
3172
|
} : void 0,
|
|
3085
3173
|
children: [e.label, r && /* @__PURE__ */ t("span", {
|
|
3086
3174
|
className: "sort-icon",
|
|
3087
|
-
children: /* @__PURE__ */ t(
|
|
3175
|
+
children: /* @__PURE__ */ t(O, {
|
|
3088
3176
|
name: "chevrons-up-down",
|
|
3089
3177
|
size: 14
|
|
3090
3178
|
})
|
|
@@ -3101,7 +3189,7 @@ function Be({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3101
3189
|
children: "Actions"
|
|
3102
3190
|
})
|
|
3103
3191
|
}))
|
|
3104
|
-
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(
|
|
3192
|
+
] }) }), /* @__PURE__ */ t("tbody", { children: c ? /* @__PURE__ */ t(Be, {
|
|
3105
3193
|
rows: l,
|
|
3106
3194
|
cols: C
|
|
3107
3195
|
}) : i?.length ? i.map((e) => {
|
|
@@ -3120,8 +3208,8 @@ function Be({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3120
3208
|
})
|
|
3121
3209
|
}),
|
|
3122
3210
|
r.map((n) => /* @__PURE__ */ t("td", {
|
|
3123
|
-
className:
|
|
3124
|
-
children: n.render ? n.render(e) :
|
|
3211
|
+
className: We(n.align) + (n.cellClassName ? ` ${n.cellClassName}` : ""),
|
|
3212
|
+
children: n.render ? n.render(e) : Ge(e[n.key])
|
|
3125
3213
|
}, n.key)),
|
|
3126
3214
|
p && /* @__PURE__ */ t("td", { children: /* @__PURE__ */ t("div", {
|
|
3127
3215
|
className: "u-row-actions",
|
|
@@ -3132,10 +3220,10 @@ function Be({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3132
3220
|
}) : /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", {
|
|
3133
3221
|
colSpan: C,
|
|
3134
3222
|
className: "lx-table-empty",
|
|
3135
|
-
children:
|
|
3223
|
+
children: A
|
|
3136
3224
|
}) }) })]
|
|
3137
3225
|
})
|
|
3138
|
-
}), h && !c && h.total > 0 && /* @__PURE__ */ t(
|
|
3226
|
+
}), h && !c && h.total > 0 && /* @__PURE__ */ t(Ue, {
|
|
3139
3227
|
page: h.page,
|
|
3140
3228
|
totalPages: h.totalPages,
|
|
3141
3229
|
pageSize: h.pageSize,
|
|
@@ -3148,20 +3236,21 @@ function Be({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3148
3236
|
}
|
|
3149
3237
|
//#endregion
|
|
3150
3238
|
//#region src/components/AppDatePicker.jsx
|
|
3151
|
-
function
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3239
|
+
function qe({ value: e, onChange: r, label: i, required: s = !1, hint: l, error: u, name: d, min: f, max: p, placeholder: m = "Enter Date", disabled: h, id: g, ariaLabel: _, className: v = "", ...y }) {
|
|
3240
|
+
T("AppDatePicker", y);
|
|
3241
|
+
let b = c(null), x = o(), S = g || d || x;
|
|
3242
|
+
a(() => {
|
|
3243
|
+
let t = b.current;
|
|
3155
3244
|
t && t.value !== (e ?? "") && (t.value = e ?? "");
|
|
3156
|
-
}, [e]),
|
|
3157
|
-
let e =
|
|
3245
|
+
}, [e]), a(() => {
|
|
3246
|
+
let e = b.current;
|
|
3158
3247
|
if (!e) return;
|
|
3159
3248
|
let t = () => r?.(e.value);
|
|
3160
3249
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
3161
3250
|
}, [r]);
|
|
3162
|
-
let
|
|
3163
|
-
ref:
|
|
3164
|
-
id:
|
|
3251
|
+
let C = /* @__PURE__ */ t("wui-datepicker", {
|
|
3252
|
+
ref: b,
|
|
3253
|
+
id: S,
|
|
3165
3254
|
name: d,
|
|
3166
3255
|
min: f,
|
|
3167
3256
|
max: p,
|
|
@@ -3169,21 +3258,21 @@ function Ve({ value: e, onChange: r, label: o, required: c = !1, hint: l, error:
|
|
|
3169
3258
|
"aria-label": _,
|
|
3170
3259
|
"aria-invalid": u ? "true" : void 0,
|
|
3171
3260
|
disabled: h ? "" : void 0,
|
|
3172
|
-
required:
|
|
3261
|
+
required: s ? "" : void 0
|
|
3173
3262
|
});
|
|
3174
|
-
return !
|
|
3263
|
+
return !i && !u && !l ? C : /* @__PURE__ */ n("div", {
|
|
3175
3264
|
className: `field${v ? ` ${v}` : ""}`,
|
|
3176
3265
|
children: [
|
|
3177
|
-
|
|
3266
|
+
i && /* @__PURE__ */ n("label", {
|
|
3178
3267
|
className: "label",
|
|
3179
|
-
htmlFor:
|
|
3180
|
-
children: [
|
|
3268
|
+
htmlFor: S,
|
|
3269
|
+
children: [i, s && /* @__PURE__ */ t("span", {
|
|
3181
3270
|
className: "required",
|
|
3182
3271
|
"aria-hidden": "true",
|
|
3183
3272
|
children: "*"
|
|
3184
3273
|
})]
|
|
3185
3274
|
}),
|
|
3186
|
-
|
|
3275
|
+
C,
|
|
3187
3276
|
u && /* @__PURE__ */ t("div", {
|
|
3188
3277
|
className: "field-error",
|
|
3189
3278
|
children: u
|
|
@@ -3197,7 +3286,7 @@ function Ve({ value: e, onChange: r, label: o, required: c = !1, hint: l, error:
|
|
|
3197
3286
|
}
|
|
3198
3287
|
//#endregion
|
|
3199
3288
|
//#region src/components/AppDropdown.jsx
|
|
3200
|
-
var
|
|
3289
|
+
var Je = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-btn", label: i, align: a = "end", "aria-label": o, className: s, ...c }, l) {
|
|
3201
3290
|
return /* @__PURE__ */ t("button", {
|
|
3202
3291
|
ref: l,
|
|
3203
3292
|
type: "button",
|
|
@@ -3205,23 +3294,23 @@ var He = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
|
|
|
3205
3294
|
title: i,
|
|
3206
3295
|
"aria-label": o,
|
|
3207
3296
|
...c,
|
|
3208
|
-
children: /* @__PURE__ */ t(
|
|
3297
|
+
children: /* @__PURE__ */ t(O, {
|
|
3209
3298
|
name: e,
|
|
3210
3299
|
size: n
|
|
3211
3300
|
})
|
|
3212
3301
|
});
|
|
3213
3302
|
});
|
|
3214
|
-
function
|
|
3215
|
-
return /* @__PURE__ */ n(
|
|
3303
|
+
function Ye({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", label: a, ariaLabel: o, align: s = "end", items: c = [], menuClassName: l = "", linkComponent: u, ...d }) {
|
|
3304
|
+
return T("AppDropdown", d), /* @__PURE__ */ n(_, {
|
|
3216
3305
|
align: s,
|
|
3217
|
-
children: [/* @__PURE__ */ t(
|
|
3218
|
-
as:
|
|
3306
|
+
children: [/* @__PURE__ */ t(_.Toggle, {
|
|
3307
|
+
as: Je,
|
|
3219
3308
|
icon: e,
|
|
3220
3309
|
iconSize: r,
|
|
3221
3310
|
btnClassName: i,
|
|
3222
3311
|
title: a,
|
|
3223
3312
|
"aria-label": o
|
|
3224
|
-
}), /* @__PURE__ */ t(
|
|
3313
|
+
}), /* @__PURE__ */ t(_.Menu, {
|
|
3225
3314
|
className: l,
|
|
3226
3315
|
renderOnMount: !0,
|
|
3227
3316
|
children: c.map((e) => {
|
|
@@ -3235,14 +3324,16 @@ function Ue({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
|
|
|
3235
3324
|
as: "button",
|
|
3236
3325
|
type: "button"
|
|
3237
3326
|
};
|
|
3238
|
-
return /* @__PURE__ */ n(
|
|
3327
|
+
return /* @__PURE__ */ n(_.Item, {
|
|
3239
3328
|
...r,
|
|
3240
3329
|
onClick: e.onClick,
|
|
3241
3330
|
className: e.danger ? "danger" : void 0,
|
|
3242
|
-
children: [e.
|
|
3331
|
+
children: [e.image ? /* @__PURE__ */ t("img", {
|
|
3332
|
+
src: e.image,
|
|
3333
|
+
alt: ""
|
|
3334
|
+
}) : e.icon && /* @__PURE__ */ t(O, {
|
|
3243
3335
|
name: e.icon,
|
|
3244
|
-
size:
|
|
3245
|
-
color: e.danger ? "var(--wui-danger)" : "var(--wui-primary)"
|
|
3336
|
+
size: 16
|
|
3246
3337
|
}), e.label]
|
|
3247
3338
|
}, e.key);
|
|
3248
3339
|
})
|
|
@@ -3251,8 +3342,8 @@ function Ue({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
|
|
|
3251
3342
|
}
|
|
3252
3343
|
//#endregion
|
|
3253
3344
|
//#region src/components/AppEmptyState.jsx
|
|
3254
|
-
function
|
|
3255
|
-
return /* @__PURE__ */ n("div", {
|
|
3345
|
+
function Xe({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
|
|
3346
|
+
return T("AppEmptyState", u), /* @__PURE__ */ n("div", {
|
|
3256
3347
|
className: [
|
|
3257
3348
|
"empty-state",
|
|
3258
3349
|
i === "sm" ? "empty-state-sm" : "",
|
|
@@ -3262,7 +3353,7 @@ function We({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
|
|
|
3262
3353
|
children: [
|
|
3263
3354
|
e ? /* @__PURE__ */ t("div", {
|
|
3264
3355
|
className: "empty-state-icon",
|
|
3265
|
-
children: /* @__PURE__ */ t(
|
|
3356
|
+
children: /* @__PURE__ */ t(O, {
|
|
3266
3357
|
name: e,
|
|
3267
3358
|
size: r
|
|
3268
3359
|
})
|
|
@@ -3284,56 +3375,57 @@ function We({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
|
|
|
3284
3375
|
}
|
|
3285
3376
|
//#endregion
|
|
3286
3377
|
//#region src/components/AppFileAttachment.jsx
|
|
3287
|
-
function
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3378
|
+
function Ze({ label: r = "Attachment", value: i, name: s, onChange: c, accept: u = de, maxSizeMb: d = 5, optional: f = !1, error: p, id: m, ...h }) {
|
|
3379
|
+
T("AppFileAttachment", h);
|
|
3380
|
+
let g = o(), _ = m || s || g, [v, y] = l(null), [b, x] = l("");
|
|
3381
|
+
a(() => {
|
|
3382
|
+
if (i instanceof File) {
|
|
3383
|
+
let e = URL.createObjectURL(i);
|
|
3384
|
+
return y(e), () => URL.revokeObjectURL(e);
|
|
3293
3385
|
}
|
|
3294
|
-
|
|
3295
|
-
}, [
|
|
3386
|
+
y(i?.url || null);
|
|
3387
|
+
}, [i]);
|
|
3296
3388
|
function S(e) {
|
|
3297
3389
|
let t = e.target.files?.[0];
|
|
3298
3390
|
if (e.target.value = "", !t) return;
|
|
3299
|
-
let n =
|
|
3391
|
+
let n = J(t, {
|
|
3300
3392
|
accept: u,
|
|
3301
3393
|
maxSizeMb: d
|
|
3302
3394
|
});
|
|
3303
3395
|
if (n) {
|
|
3304
|
-
|
|
3396
|
+
x(n);
|
|
3305
3397
|
return;
|
|
3306
3398
|
}
|
|
3307
|
-
|
|
3399
|
+
x(""), c(t);
|
|
3308
3400
|
}
|
|
3309
3401
|
function C() {
|
|
3310
|
-
|
|
3402
|
+
x(""), c(null);
|
|
3311
3403
|
}
|
|
3312
|
-
let w =
|
|
3404
|
+
let w = i instanceof File ? i.name : i?.name, E = i instanceof File ? `${(i.size / 1024).toFixed(0)} KB` : null, D = p || b;
|
|
3313
3405
|
return /* @__PURE__ */ n("div", {
|
|
3314
3406
|
className: "field",
|
|
3315
3407
|
children: [
|
|
3316
3408
|
/* @__PURE__ */ n("label", {
|
|
3317
3409
|
className: "label",
|
|
3318
|
-
htmlFor:
|
|
3410
|
+
htmlFor: _,
|
|
3319
3411
|
children: [r, f && /* @__PURE__ */ t("span", {
|
|
3320
3412
|
className: "label-optional",
|
|
3321
3413
|
children: " (optional)"
|
|
3322
3414
|
})]
|
|
3323
3415
|
}),
|
|
3324
|
-
|
|
3416
|
+
i ? /* @__PURE__ */ n("div", {
|
|
3325
3417
|
className: "attach-preview",
|
|
3326
3418
|
children: [/* @__PURE__ */ n("div", {
|
|
3327
3419
|
className: "attach-figure",
|
|
3328
3420
|
children: [/* @__PURE__ */ t("img", {
|
|
3329
|
-
src:
|
|
3421
|
+
src: v,
|
|
3330
3422
|
alt: w
|
|
3331
3423
|
}), /* @__PURE__ */ t("button", {
|
|
3332
3424
|
type: "button",
|
|
3333
3425
|
className: "attach-remove",
|
|
3334
3426
|
"aria-label": "Remove attachment",
|
|
3335
3427
|
onClick: C,
|
|
3336
|
-
children: /* @__PURE__ */ t(
|
|
3428
|
+
children: /* @__PURE__ */ t(O, {
|
|
3337
3429
|
name: "x",
|
|
3338
3430
|
size: 18
|
|
3339
3431
|
})
|
|
@@ -3343,18 +3435,18 @@ function Ge({ label: r = "Attachment", value: o, name: s, onChange: l, accept: u
|
|
|
3343
3435
|
children: [/* @__PURE__ */ t("div", {
|
|
3344
3436
|
className: "attach-name",
|
|
3345
3437
|
children: w
|
|
3346
|
-
}),
|
|
3438
|
+
}), E && /* @__PURE__ */ t("div", {
|
|
3347
3439
|
className: "attach-size",
|
|
3348
|
-
children:
|
|
3440
|
+
children: E
|
|
3349
3441
|
})]
|
|
3350
3442
|
})]
|
|
3351
3443
|
}) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ n("label", {
|
|
3352
3444
|
className: "attach-drop",
|
|
3353
|
-
htmlFor:
|
|
3445
|
+
htmlFor: _,
|
|
3354
3446
|
children: [
|
|
3355
3447
|
/* @__PURE__ */ t("span", {
|
|
3356
3448
|
className: "attach-drop-icon",
|
|
3357
|
-
children: /* @__PURE__ */ t(
|
|
3449
|
+
children: /* @__PURE__ */ t(O, {
|
|
3358
3450
|
name: "image",
|
|
3359
3451
|
size: 18
|
|
3360
3452
|
})
|
|
@@ -3379,63 +3471,64 @@ function Ge({ label: r = "Attachment", value: o, name: s, onChange: l, accept: u
|
|
|
3379
3471
|
})
|
|
3380
3472
|
]
|
|
3381
3473
|
}), /* @__PURE__ */ t("input", {
|
|
3382
|
-
id:
|
|
3474
|
+
id: _,
|
|
3383
3475
|
type: "file",
|
|
3384
3476
|
className: "visually-hidden-input",
|
|
3385
3477
|
name: s,
|
|
3386
3478
|
accept: u,
|
|
3387
3479
|
onChange: S
|
|
3388
3480
|
})] }),
|
|
3389
|
-
|
|
3481
|
+
D && /* @__PURE__ */ t("div", {
|
|
3390
3482
|
className: "field-error",
|
|
3391
|
-
children:
|
|
3483
|
+
children: D
|
|
3392
3484
|
})
|
|
3393
3485
|
]
|
|
3394
3486
|
});
|
|
3395
3487
|
}
|
|
3396
3488
|
//#endregion
|
|
3397
3489
|
//#region src/components/toast.js
|
|
3398
|
-
var
|
|
3490
|
+
var Qe = /* @__PURE__ */ new Set([
|
|
3399
3491
|
"success",
|
|
3400
3492
|
"info",
|
|
3401
3493
|
"warning",
|
|
3402
3494
|
"error"
|
|
3403
3495
|
]);
|
|
3404
|
-
function $(e, t = "success") {
|
|
3405
|
-
let n =
|
|
3406
|
-
|
|
3496
|
+
function $e(e, t = "success") {
|
|
3497
|
+
let n = Qe.has(t) ? t : "success";
|
|
3498
|
+
v[n](e, { toastId: `${n}:${e}` });
|
|
3407
3499
|
}
|
|
3408
|
-
function
|
|
3409
|
-
|
|
3500
|
+
function et(e) {
|
|
3501
|
+
v.error(e, { toastId: `error:${e}` });
|
|
3410
3502
|
}
|
|
3411
3503
|
//#endregion
|
|
3412
3504
|
//#region src/components/AppFilePicker.jsx
|
|
3413
|
-
function
|
|
3414
|
-
|
|
3415
|
-
|
|
3505
|
+
function tt({ label: e, value: r, name: i, onPick: s, accept: u = ".jpg,.jpeg,.png", maxSizeMb: d = 5, required: f, error: p, ...m }) {
|
|
3506
|
+
T("AppFilePicker", m);
|
|
3507
|
+
let [h, g] = l(null), [_, v] = l(!1), y = c(null), b = o(), x = i || b;
|
|
3508
|
+
a(() => {
|
|
3416
3509
|
if (r instanceof File) {
|
|
3417
3510
|
let e = URL.createObjectURL(r);
|
|
3418
|
-
return
|
|
3511
|
+
return g(e), () => URL.revokeObjectURL(e);
|
|
3419
3512
|
}
|
|
3420
|
-
|
|
3513
|
+
g(null);
|
|
3421
3514
|
}, [r]);
|
|
3422
|
-
let S = r?.url ||
|
|
3423
|
-
let t =
|
|
3515
|
+
let S = r?.url || h, C = (e) => {
|
|
3516
|
+
let t = J(e, {
|
|
3424
3517
|
accept: u,
|
|
3425
3518
|
maxSizeMb: d
|
|
3426
3519
|
});
|
|
3427
|
-
return t ? ($(t, "error"), !1) : (
|
|
3520
|
+
return t ? ($e(t, "error"), !1) : (s(e), !0);
|
|
3428
3521
|
}, w = (e) => {
|
|
3429
3522
|
let t = e.target.files?.[0] || null;
|
|
3430
3523
|
t && (C(t) || (e.target.value = ""));
|
|
3431
|
-
},
|
|
3432
|
-
e.preventDefault(),
|
|
3524
|
+
}, E = (e) => {
|
|
3525
|
+
e.preventDefault(), v(!1);
|
|
3433
3526
|
let t = e.dataTransfer.files?.[0];
|
|
3434
3527
|
t && C(t);
|
|
3435
|
-
},
|
|
3436
|
-
id:
|
|
3437
|
-
name:
|
|
3438
|
-
ref:
|
|
3528
|
+
}, D = () => y.current?.click(), k = /* @__PURE__ */ t("input", {
|
|
3529
|
+
id: x,
|
|
3530
|
+
name: i,
|
|
3531
|
+
ref: y,
|
|
3439
3532
|
type: "file",
|
|
3440
3533
|
accept: u,
|
|
3441
3534
|
hidden: !0,
|
|
@@ -3449,8 +3542,8 @@ function Je({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3449
3542
|
children: [
|
|
3450
3543
|
/* @__PURE__ */ n("label", {
|
|
3451
3544
|
className: "label",
|
|
3452
|
-
htmlFor:
|
|
3453
|
-
children: [e, f && /* @__PURE__ */ t(
|
|
3545
|
+
htmlFor: x,
|
|
3546
|
+
children: [e, f && /* @__PURE__ */ t(X, {})]
|
|
3454
3547
|
}),
|
|
3455
3548
|
S ? /* @__PURE__ */ n("div", {
|
|
3456
3549
|
className: `file-preview${p ? " error" : ""}`,
|
|
@@ -3459,7 +3552,7 @@ function Je({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3459
3552
|
type: "button",
|
|
3460
3553
|
className: "file-preview-open",
|
|
3461
3554
|
"aria-label": `Change ${e}`,
|
|
3462
|
-
onClick:
|
|
3555
|
+
onClick: D,
|
|
3463
3556
|
children: [/* @__PURE__ */ t("img", {
|
|
3464
3557
|
src: S,
|
|
3465
3558
|
alt: `${e} preview`,
|
|
@@ -3468,7 +3561,7 @@ function Je({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3468
3561
|
className: "file-preview-overlay",
|
|
3469
3562
|
children: /* @__PURE__ */ n("span", {
|
|
3470
3563
|
className: "file-preview-cta",
|
|
3471
|
-
children: [/* @__PURE__ */ t(
|
|
3564
|
+
children: [/* @__PURE__ */ t(O, {
|
|
3472
3565
|
name: "image",
|
|
3473
3566
|
size: 16
|
|
3474
3567
|
}), " Change image"]
|
|
@@ -3480,30 +3573,30 @@ function Je({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3480
3573
|
className: "file-preview-remove",
|
|
3481
3574
|
"aria-label": `Remove ${e}`,
|
|
3482
3575
|
title: "Remove image",
|
|
3483
|
-
onClick: () =>
|
|
3484
|
-
children: /* @__PURE__ */ t(
|
|
3576
|
+
onClick: () => s(null),
|
|
3577
|
+
children: /* @__PURE__ */ t(O, {
|
|
3485
3578
|
name: "x",
|
|
3486
3579
|
size: 16
|
|
3487
3580
|
})
|
|
3488
3581
|
}),
|
|
3489
|
-
|
|
3582
|
+
k
|
|
3490
3583
|
]
|
|
3491
3584
|
}) : /* @__PURE__ */ n("div", {
|
|
3492
|
-
className: `file-input file-input-tall${
|
|
3585
|
+
className: `file-input file-input-tall${_ ? " dragging" : ""}${p ? " error" : ""}`,
|
|
3493
3586
|
onDragOver: (e) => {
|
|
3494
|
-
e.preventDefault(),
|
|
3587
|
+
e.preventDefault(), _ || v(!0);
|
|
3495
3588
|
},
|
|
3496
3589
|
onDragLeave: (e) => {
|
|
3497
|
-
e.preventDefault(),
|
|
3590
|
+
e.preventDefault(), v(!1);
|
|
3498
3591
|
},
|
|
3499
|
-
onDrop:
|
|
3592
|
+
onDrop: E,
|
|
3500
3593
|
children: [/* @__PURE__ */ n("label", {
|
|
3501
|
-
htmlFor:
|
|
3594
|
+
htmlFor: x,
|
|
3502
3595
|
className: "file-input-zone-label",
|
|
3503
3596
|
children: [
|
|
3504
3597
|
/* @__PURE__ */ t("span", {
|
|
3505
3598
|
className: "file-input-icon",
|
|
3506
|
-
children: /* @__PURE__ */ t(
|
|
3599
|
+
children: /* @__PURE__ */ t(O, {
|
|
3507
3600
|
name: "upload",
|
|
3508
3601
|
size: 24
|
|
3509
3602
|
})
|
|
@@ -3524,7 +3617,7 @@ function Je({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3524
3617
|
]
|
|
3525
3618
|
})
|
|
3526
3619
|
]
|
|
3527
|
-
}),
|
|
3620
|
+
}), k]
|
|
3528
3621
|
}),
|
|
3529
3622
|
p && /* @__PURE__ */ t("div", {
|
|
3530
3623
|
className: "field-error",
|
|
@@ -3535,13 +3628,13 @@ function Je({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3535
3628
|
}
|
|
3536
3629
|
//#endregion
|
|
3537
3630
|
//#region src/components/AppInfoList.jsx
|
|
3538
|
-
function
|
|
3539
|
-
return /* @__PURE__ */ t("div", {
|
|
3631
|
+
function nt({ items: r = [], className: i = "", ...a }) {
|
|
3632
|
+
return T("AppInfoList", a), /* @__PURE__ */ t("div", {
|
|
3540
3633
|
className: `info-list${i ? ` ${i}` : ""}`,
|
|
3541
3634
|
children: r.map((r, i) => {
|
|
3542
3635
|
let a = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
3543
3636
|
className: "info-icon",
|
|
3544
|
-
children: /* @__PURE__ */ t(
|
|
3637
|
+
children: /* @__PURE__ */ t(O, {
|
|
3545
3638
|
name: r.icon,
|
|
3546
3639
|
size: 16
|
|
3547
3640
|
})
|
|
@@ -3568,14 +3661,15 @@ function Ye({ items: r = [], className: i = "" }) {
|
|
|
3568
3661
|
}
|
|
3569
3662
|
//#endregion
|
|
3570
3663
|
//#region src/components/AppKpiTile.jsx
|
|
3571
|
-
function
|
|
3572
|
-
|
|
3664
|
+
function rt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
|
|
3665
|
+
T("AppKpiTile", l);
|
|
3666
|
+
let u = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, d = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
|
|
3573
3667
|
return /* @__PURE__ */ n("div", {
|
|
3574
|
-
className:
|
|
3668
|
+
className: u,
|
|
3575
3669
|
children: [
|
|
3576
3670
|
i && /* @__PURE__ */ t("span", {
|
|
3577
3671
|
className: "kpi-icon",
|
|
3578
|
-
children: /* @__PURE__ */ t(
|
|
3672
|
+
children: /* @__PURE__ */ t(O, {
|
|
3579
3673
|
name: i,
|
|
3580
3674
|
size: 20
|
|
3581
3675
|
})
|
|
@@ -3590,8 +3684,8 @@ function Xe({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
|
|
|
3590
3684
|
}),
|
|
3591
3685
|
a && /* @__PURE__ */ n("div", {
|
|
3592
3686
|
className: `kpi-delta${o === "flat" ? "" : ` ${o}`}`,
|
|
3593
|
-
children: [
|
|
3594
|
-
name:
|
|
3687
|
+
children: [d && /* @__PURE__ */ t(O, {
|
|
3688
|
+
name: d,
|
|
3595
3689
|
size: 13
|
|
3596
3690
|
}), a]
|
|
3597
3691
|
})
|
|
@@ -3600,15 +3694,16 @@ function Xe({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
|
|
|
3600
3694
|
}
|
|
3601
3695
|
//#endregion
|
|
3602
3696
|
//#region src/components/AppLogoPicker.jsx
|
|
3603
|
-
function
|
|
3604
|
-
|
|
3697
|
+
function it({ value: r, fallback: i, name: a, onPick: o, loading: s = !1, accept: l = "image/png,image/jpeg", maxSizeMb: u = 5, overlayIcon: d = "image", overlayLabel: f = "Update photo", ariaLabel: p = "Upload photo", ...m }) {
|
|
3698
|
+
T("AppLogoPicker", m);
|
|
3699
|
+
let h = c(null);
|
|
3605
3700
|
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("button", {
|
|
3606
3701
|
type: "button",
|
|
3607
3702
|
className: "set-uploader",
|
|
3608
|
-
"aria-busy":
|
|
3609
|
-
disabled:
|
|
3703
|
+
"aria-busy": s || void 0,
|
|
3704
|
+
disabled: s,
|
|
3610
3705
|
onClick: () => {
|
|
3611
|
-
|
|
3706
|
+
s || h.current?.click();
|
|
3612
3707
|
},
|
|
3613
3708
|
"aria-label": p,
|
|
3614
3709
|
children: /* @__PURE__ */ n("span", {
|
|
@@ -3620,24 +3715,24 @@ function Ze({ value: r, fallback: i, name: a, onPick: o, loading: c = !1, accept
|
|
|
3620
3715
|
}) : /* @__PURE__ */ t("span", {
|
|
3621
3716
|
className: "set-uploader-logo",
|
|
3622
3717
|
children: i
|
|
3623
|
-
}),
|
|
3718
|
+
}), s ? /* @__PURE__ */ t("span", {
|
|
3624
3719
|
className: "set-uploader-overlay is-loading",
|
|
3625
3720
|
"aria-hidden": "true",
|
|
3626
|
-
children: /* @__PURE__ */ t(
|
|
3721
|
+
children: /* @__PURE__ */ t(O, {
|
|
3627
3722
|
name: "refresh-cw",
|
|
3628
3723
|
size: 22,
|
|
3629
3724
|
className: "lx-spin"
|
|
3630
3725
|
})
|
|
3631
3726
|
}) : /* @__PURE__ */ n("span", {
|
|
3632
3727
|
className: "set-uploader-overlay",
|
|
3633
|
-
children: [/* @__PURE__ */ t(
|
|
3728
|
+
children: [/* @__PURE__ */ t(O, {
|
|
3634
3729
|
name: d,
|
|
3635
3730
|
size: 22
|
|
3636
3731
|
}), /* @__PURE__ */ t("span", { children: f })]
|
|
3637
3732
|
})]
|
|
3638
3733
|
})
|
|
3639
3734
|
}), /* @__PURE__ */ t("input", {
|
|
3640
|
-
ref:
|
|
3735
|
+
ref: h,
|
|
3641
3736
|
type: "file",
|
|
3642
3737
|
name: a,
|
|
3643
3738
|
hidden: !0,
|
|
@@ -3645,33 +3740,34 @@ function Ze({ value: r, fallback: i, name: a, onPick: o, loading: c = !1, accept
|
|
|
3645
3740
|
onChange: (e) => {
|
|
3646
3741
|
let t = e.target.files?.[0];
|
|
3647
3742
|
if (e.target.value = "", !t) return;
|
|
3648
|
-
let n =
|
|
3743
|
+
let n = J(t, {
|
|
3649
3744
|
accept: l,
|
|
3650
3745
|
maxSizeMb: u
|
|
3651
3746
|
});
|
|
3652
3747
|
if (n) {
|
|
3653
|
-
$(n, "error");
|
|
3748
|
+
$e(n, "error");
|
|
3654
3749
|
return;
|
|
3655
3750
|
}
|
|
3656
3751
|
o(t);
|
|
3657
3752
|
},
|
|
3658
|
-
disabled:
|
|
3753
|
+
disabled: s
|
|
3659
3754
|
})] });
|
|
3660
3755
|
}
|
|
3661
3756
|
//#endregion
|
|
3662
3757
|
//#region src/components/AppMultiSelect.jsx
|
|
3663
|
-
function
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3758
|
+
function at({ values: e, onChange: r, options: i, placeholder: o = "Select…", searchPlaceholder: s = "Search…", searchable: l = !0, disabled: u = !1, name: d, label: f, error: p, hint: m, required: h = !1, fieldClassName: g = "", ..._ }) {
|
|
3759
|
+
T("AppMultiSelect", _);
|
|
3760
|
+
let v = c(null);
|
|
3761
|
+
return a(() => {
|
|
3762
|
+
let e = v.current;
|
|
3763
|
+
e && (e.options = i || []);
|
|
3764
|
+
}, [i]), a(() => {
|
|
3765
|
+
let t = v.current;
|
|
3670
3766
|
if (!t) return;
|
|
3671
3767
|
let n = e || [], r = t.values || [];
|
|
3672
3768
|
n.join(",") !== r.join(",") && (t.values = n);
|
|
3673
|
-
}, [e]),
|
|
3674
|
-
let e =
|
|
3769
|
+
}, [e]), a(() => {
|
|
3770
|
+
let e = v.current;
|
|
3675
3771
|
if (!e) return;
|
|
3676
3772
|
let t = () => r?.(e.values);
|
|
3677
3773
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
@@ -3681,15 +3777,15 @@ function Qe({ values: e, onChange: r, options: a, placeholder: o = "Select…",
|
|
|
3681
3777
|
f && /* @__PURE__ */ n("label", {
|
|
3682
3778
|
className: "label",
|
|
3683
3779
|
htmlFor: d,
|
|
3684
|
-
children: [f, h && /* @__PURE__ */ t(
|
|
3780
|
+
children: [f, h && /* @__PURE__ */ t(X, {})]
|
|
3685
3781
|
}),
|
|
3686
3782
|
/* @__PURE__ */ t("wui-multiselect", {
|
|
3687
3783
|
"aria-label": typeof f == "string" ? f : void 0,
|
|
3688
3784
|
id: d,
|
|
3689
|
-
ref:
|
|
3785
|
+
ref: v,
|
|
3690
3786
|
name: d,
|
|
3691
3787
|
placeholder: o,
|
|
3692
|
-
"search-placeholder":
|
|
3788
|
+
"search-placeholder": s,
|
|
3693
3789
|
searchable: l ? "" : void 0,
|
|
3694
3790
|
disabled: u ? "" : void 0,
|
|
3695
3791
|
required: h ? "" : void 0
|
|
@@ -3706,8 +3802,8 @@ function Qe({ values: e, onChange: r, options: a, placeholder: o = "Select…",
|
|
|
3706
3802
|
}
|
|
3707
3803
|
//#endregion
|
|
3708
3804
|
//#region src/components/AppPageHeader.jsx
|
|
3709
|
-
function
|
|
3710
|
-
return /* @__PURE__ */ n("div", {
|
|
3805
|
+
function ot({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
|
|
3806
|
+
return T("AppPageHeader", o), /* @__PURE__ */ n("div", {
|
|
3711
3807
|
className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
|
|
3712
3808
|
children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
|
|
3713
3809
|
className: "page-title",
|
|
@@ -3723,13 +3819,14 @@ function $e({ title: e, subtitle: r, actions: i, className: a = "" }) {
|
|
|
3723
3819
|
}
|
|
3724
3820
|
//#endregion
|
|
3725
3821
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
3726
|
-
function
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3822
|
+
function st({ value: e, onChange: r, country: i, disabled: o = !1, name: s, label: l = "Phone number", placeholder: u = "Enter phone number", required: d = !1, error: f, fieldClassName: p = "", ...m }) {
|
|
3823
|
+
T("AppPhoneNumberInput", m);
|
|
3824
|
+
let h = c(null);
|
|
3825
|
+
return a(() => {
|
|
3826
|
+
let t = h.current;
|
|
3730
3827
|
t && t.value !== (e ?? "") && (t.value = e ?? "");
|
|
3731
|
-
}, [e]),
|
|
3732
|
-
let e =
|
|
3828
|
+
}, [e]), a(() => {
|
|
3829
|
+
let e = h.current;
|
|
3733
3830
|
if (!e) return;
|
|
3734
3831
|
let t = () => r?.(e.value);
|
|
3735
3832
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
@@ -3738,13 +3835,13 @@ function et({ value: e, onChange: r, country: a, disabled: o = !1, name: c, labe
|
|
|
3738
3835
|
children: [
|
|
3739
3836
|
l && /* @__PURE__ */ n("label", {
|
|
3740
3837
|
className: "label",
|
|
3741
|
-
htmlFor:
|
|
3742
|
-
children: [l, d && /* @__PURE__ */ t(
|
|
3838
|
+
htmlFor: s,
|
|
3839
|
+
children: [l, d && /* @__PURE__ */ t(X, {})]
|
|
3743
3840
|
}),
|
|
3744
3841
|
/* @__PURE__ */ t("wui-phone", {
|
|
3745
|
-
ref:
|
|
3746
|
-
name:
|
|
3747
|
-
country:
|
|
3842
|
+
ref: h,
|
|
3843
|
+
name: s,
|
|
3844
|
+
country: i,
|
|
3748
3845
|
placeholder: u,
|
|
3749
3846
|
disabled: o ? "" : void 0
|
|
3750
3847
|
}),
|
|
@@ -3757,8 +3854,8 @@ function et({ value: e, onChange: r, country: a, disabled: o = !1, name: c, labe
|
|
|
3757
3854
|
}
|
|
3758
3855
|
//#endregion
|
|
3759
3856
|
//#region src/components/AppPricingCard.jsx
|
|
3760
|
-
function
|
|
3761
|
-
return /* @__PURE__ */ n("div", {
|
|
3857
|
+
function ct({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s, featured: c = !1, current: l = !1, badge: u = "Most popular", className: d = "", ...f }) {
|
|
3858
|
+
return T("AppPricingCard", f), /* @__PURE__ */ n("div", {
|
|
3762
3859
|
className: [
|
|
3763
3860
|
"plan-card",
|
|
3764
3861
|
c ? "featured" : "",
|
|
@@ -3793,7 +3890,7 @@ function tt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
|
|
|
3793
3890
|
className: r ? void 0 : "excluded",
|
|
3794
3891
|
children: [/* @__PURE__ */ t("span", {
|
|
3795
3892
|
className: "plan-feature-icon",
|
|
3796
|
-
children: /* @__PURE__ */ t(
|
|
3893
|
+
children: /* @__PURE__ */ t(O, {
|
|
3797
3894
|
name: r ? "check" : "x",
|
|
3798
3895
|
size: 16
|
|
3799
3896
|
})
|
|
@@ -3810,10 +3907,11 @@ function tt({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
|
|
|
3810
3907
|
}
|
|
3811
3908
|
//#endregion
|
|
3812
3909
|
//#region src/components/AppRadio.jsx
|
|
3813
|
-
var
|
|
3814
|
-
|
|
3910
|
+
var lt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
3911
|
+
T("AppRadio", s);
|
|
3912
|
+
let l = o(), u = r || i || l;
|
|
3815
3913
|
return /* @__PURE__ */ n("div", {
|
|
3816
|
-
className: `form-check${
|
|
3914
|
+
className: `form-check${a ? ` ${a}` : ""}`,
|
|
3817
3915
|
children: [/* @__PURE__ */ t("input", {
|
|
3818
3916
|
type: "radio",
|
|
3819
3917
|
className: "form-check-input",
|
|
@@ -3830,8 +3928,9 @@ var nt = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
|
3830
3928
|
});
|
|
3831
3929
|
//#endregion
|
|
3832
3930
|
//#region src/components/AppRepeater.jsx
|
|
3833
|
-
function
|
|
3834
|
-
|
|
3931
|
+
function ut({ 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 = "", ...p }) {
|
|
3932
|
+
T("AppRepeater", p);
|
|
3933
|
+
let m = typeof u == "number" && e.length >= u, h = !!a && e.length > l;
|
|
3835
3934
|
return /* @__PURE__ */ n("div", {
|
|
3836
3935
|
className: `repeater${f ? ` ${f}` : ""}`,
|
|
3837
3936
|
children: [
|
|
@@ -3850,7 +3949,7 @@ function rt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
|
|
|
3850
3949
|
className: "repeater-body",
|
|
3851
3950
|
children: r(e, i)
|
|
3852
3951
|
}),
|
|
3853
|
-
|
|
3952
|
+
h && /* @__PURE__ */ t(k, {
|
|
3854
3953
|
icon: "trash-2",
|
|
3855
3954
|
label: `${s} ${i + 1}`,
|
|
3856
3955
|
danger: !0,
|
|
@@ -3859,12 +3958,12 @@ function rt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
|
|
|
3859
3958
|
})
|
|
3860
3959
|
]
|
|
3861
3960
|
}, e.id ?? i)),
|
|
3862
|
-
/* @__PURE__ */ t(
|
|
3961
|
+
/* @__PURE__ */ t(Z, {
|
|
3863
3962
|
variant: "secondary",
|
|
3864
3963
|
size: "sm",
|
|
3865
3964
|
leftIcon: "plus",
|
|
3866
3965
|
className: "repeater-add",
|
|
3867
|
-
disabled:
|
|
3966
|
+
disabled: m,
|
|
3868
3967
|
onClick: i,
|
|
3869
3968
|
children: o
|
|
3870
3969
|
})
|
|
@@ -3873,10 +3972,11 @@ function rt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
|
|
|
3873
3972
|
}
|
|
3874
3973
|
//#endregion
|
|
3875
3974
|
//#region src/components/AppResourceCard.jsx
|
|
3876
|
-
function
|
|
3877
|
-
|
|
3975
|
+
function dt({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
|
|
3976
|
+
T("AppResourceCard", u);
|
|
3977
|
+
let d = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
3878
3978
|
className: "res-card-icon",
|
|
3879
|
-
children: /* @__PURE__ */ t(
|
|
3979
|
+
children: /* @__PURE__ */ t(O, {
|
|
3880
3980
|
name: r,
|
|
3881
3981
|
size: 18
|
|
3882
3982
|
})
|
|
@@ -3889,35 +3989,35 @@ function it({ icon: r, title: i, text: a, href: o, external: s = !1, linkCompone
|
|
|
3889
3989
|
className: "res-card-text",
|
|
3890
3990
|
children: a
|
|
3891
3991
|
})]
|
|
3892
|
-
})] }),
|
|
3992
|
+
})] }), f = `res-card${l ? ` ${l}` : ""}`;
|
|
3893
3993
|
return c && !s ? /* @__PURE__ */ t(c, {
|
|
3894
|
-
className:
|
|
3994
|
+
className: f,
|
|
3895
3995
|
to: o,
|
|
3896
|
-
children:
|
|
3996
|
+
children: d
|
|
3897
3997
|
}) : /* @__PURE__ */ t("a", {
|
|
3898
|
-
className:
|
|
3998
|
+
className: f,
|
|
3899
3999
|
href: o,
|
|
3900
4000
|
target: s ? "_blank" : void 0,
|
|
3901
4001
|
rel: s ? "noopener noreferrer" : void 0,
|
|
3902
|
-
children:
|
|
4002
|
+
children: d
|
|
3903
4003
|
});
|
|
3904
4004
|
}
|
|
3905
4005
|
//#endregion
|
|
3906
4006
|
//#region src/components/AppSearch.jsx
|
|
3907
|
-
function
|
|
3908
|
-
return /* @__PURE__ */ n("div", {
|
|
4007
|
+
function ft({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize: o = 18, className: s = "", ...c }) {
|
|
4008
|
+
return T("AppSearch", c), /* @__PURE__ */ n("div", {
|
|
3909
4009
|
className: [
|
|
3910
4010
|
"search-wrap",
|
|
3911
4011
|
e ? "has-value" : "",
|
|
3912
4012
|
s
|
|
3913
4013
|
].filter(Boolean).join(" "),
|
|
3914
4014
|
children: [
|
|
3915
|
-
/* @__PURE__ */ t(
|
|
4015
|
+
/* @__PURE__ */ t(O, {
|
|
3916
4016
|
name: "search",
|
|
3917
4017
|
size: o,
|
|
3918
4018
|
className: "search-icon"
|
|
3919
4019
|
}),
|
|
3920
|
-
/* @__PURE__ */ t(
|
|
4020
|
+
/* @__PURE__ */ t(m.Control, {
|
|
3921
4021
|
type: "search",
|
|
3922
4022
|
className: "input search-input",
|
|
3923
4023
|
placeholder: i,
|
|
@@ -3931,7 +4031,7 @@ function at({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize
|
|
|
3931
4031
|
className: "search-clear",
|
|
3932
4032
|
"aria-label": "Clear search",
|
|
3933
4033
|
onClick: () => r(""),
|
|
3934
|
-
children: /* @__PURE__ */ t(
|
|
4034
|
+
children: /* @__PURE__ */ t(O, {
|
|
3935
4035
|
name: "x",
|
|
3936
4036
|
size: 16
|
|
3937
4037
|
})
|
|
@@ -3941,24 +4041,25 @@ function at({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize
|
|
|
3941
4041
|
}
|
|
3942
4042
|
//#endregion
|
|
3943
4043
|
//#region src/components/AppSegmented.jsx
|
|
3944
|
-
function
|
|
3945
|
-
|
|
4044
|
+
function pt({ options: e = [], value: r, onChange: i, label: a, name: s, size: c = "md", className: l = "", ...u }) {
|
|
4045
|
+
T("AppSegmented", u);
|
|
4046
|
+
let d = o(), f = s || d;
|
|
3946
4047
|
return /* @__PURE__ */ t("div", {
|
|
3947
4048
|
className: `segmented${c === "sm" ? " segmented-sm" : ""}${l ? ` ${l}` : ""}`,
|
|
3948
4049
|
role: "radiogroup",
|
|
3949
|
-
"aria-label":
|
|
4050
|
+
"aria-label": a,
|
|
3950
4051
|
children: e.map((e) => /* @__PURE__ */ n("label", {
|
|
3951
4052
|
className: "segmented-option",
|
|
3952
4053
|
children: [
|
|
3953
4054
|
/* @__PURE__ */ t("input", {
|
|
3954
4055
|
type: "radio",
|
|
3955
4056
|
className: "segmented-input",
|
|
3956
|
-
name:
|
|
4057
|
+
name: f,
|
|
3957
4058
|
value: e.value,
|
|
3958
4059
|
checked: e.value === r,
|
|
3959
4060
|
onChange: () => i?.(e.value)
|
|
3960
4061
|
}),
|
|
3961
|
-
e.icon && /* @__PURE__ */ t(
|
|
4062
|
+
e.icon && /* @__PURE__ */ t(O, {
|
|
3962
4063
|
name: e.icon,
|
|
3963
4064
|
size: 13
|
|
3964
4065
|
}),
|
|
@@ -3969,52 +4070,53 @@ function ot({ options: e = [], value: r, onChange: i, label: o, name: s, size: c
|
|
|
3969
4070
|
}
|
|
3970
4071
|
//#endregion
|
|
3971
4072
|
//#region src/components/AppSelect.jsx
|
|
3972
|
-
var
|
|
3973
|
-
function
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
4073
|
+
var mt = (e) => e == null ? "" : e.label ?? e.text ?? "";
|
|
4074
|
+
function ht({ value: e, onChange: r, options: i = [], placeholder: o = "Select...", searchPlaceholder: s = "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 = "", ...b }) {
|
|
4075
|
+
T("AppSelect", b);
|
|
4076
|
+
let x = c(null);
|
|
4077
|
+
a(() => {
|
|
4078
|
+
x.current && (x.current.options = i.map((e) => ({
|
|
3977
4079
|
value: e.value,
|
|
3978
|
-
label:
|
|
4080
|
+
label: mt(e)
|
|
3979
4081
|
})));
|
|
3980
|
-
}, [
|
|
3981
|
-
let t =
|
|
4082
|
+
}, [i]), a(() => {
|
|
4083
|
+
let t = x.current;
|
|
3982
4084
|
t && String(t.value ?? "") !== String(e ?? "") && (t.value = e ?? "");
|
|
3983
|
-
}, [e]),
|
|
3984
|
-
let e =
|
|
4085
|
+
}, [e]), a(() => {
|
|
4086
|
+
let e = x.current;
|
|
3985
4087
|
if (!e) return;
|
|
3986
4088
|
let t = () => r?.(e.value);
|
|
3987
4089
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
3988
4090
|
}, [r]);
|
|
3989
|
-
let
|
|
4091
|
+
let S = /* @__PURE__ */ t("wui-select", {
|
|
3990
4092
|
"aria-label": typeof d == "string" ? d : void 0,
|
|
3991
|
-
ref:
|
|
4093
|
+
ref: x,
|
|
3992
4094
|
id: _ || v,
|
|
3993
4095
|
name: v,
|
|
3994
4096
|
placeholder: o,
|
|
3995
|
-
"search-placeholder":
|
|
4097
|
+
"search-placeholder": s,
|
|
3996
4098
|
searchable: l ? "" : void 0,
|
|
3997
4099
|
disabled: u ? "" : void 0,
|
|
3998
4100
|
required: f ? "" : void 0
|
|
3999
4101
|
});
|
|
4000
|
-
if (!d && !p && !m) return
|
|
4001
|
-
let
|
|
4102
|
+
if (!d && !p && !m) return S;
|
|
4103
|
+
let C = _ || v;
|
|
4002
4104
|
return /* @__PURE__ */ n("div", {
|
|
4003
4105
|
className: `field${y ? ` ${y}` : ""}`,
|
|
4004
4106
|
children: [
|
|
4005
4107
|
d && /* @__PURE__ */ n("label", {
|
|
4006
4108
|
className: "label",
|
|
4007
|
-
htmlFor:
|
|
4109
|
+
htmlFor: C,
|
|
4008
4110
|
children: [
|
|
4009
4111
|
d,
|
|
4010
|
-
f && /* @__PURE__ */ t(
|
|
4011
|
-
h && /* @__PURE__ */ t(
|
|
4112
|
+
f && /* @__PURE__ */ t(X, {}),
|
|
4113
|
+
h && /* @__PURE__ */ t(Q, {
|
|
4012
4114
|
label: g,
|
|
4013
4115
|
children: h
|
|
4014
4116
|
})
|
|
4015
4117
|
]
|
|
4016
4118
|
}),
|
|
4017
|
-
|
|
4119
|
+
S,
|
|
4018
4120
|
p ? /* @__PURE__ */ t("div", {
|
|
4019
4121
|
className: "field-error",
|
|
4020
4122
|
children: p
|
|
@@ -4027,23 +4129,24 @@ function ct({ value: e, onChange: r, options: a = [], placeholder: o = "Select..
|
|
|
4027
4129
|
}
|
|
4028
4130
|
//#endregion
|
|
4029
4131
|
//#region src/components/AppShell.jsx
|
|
4030
|
-
function
|
|
4031
|
-
|
|
4032
|
-
|
|
4132
|
+
function gt({ groups: e = [], brand: r, sidebarFooter: i, topbarStart: o, topbarEnd: s, footer: c, children: u, collapsed: d, onCollapsedChange: f, noSidebar: p = !1, navLabel: m = "Main navigation", linkComponent: h, className: g = "", ..._ }) {
|
|
4133
|
+
T("AppShell", _);
|
|
4134
|
+
let [v, y] = l(!1), [b, x] = l(!1), [S, C] = l(!1), w = d ?? v;
|
|
4135
|
+
return a(() => {
|
|
4033
4136
|
let e = () => C(window.scrollY > 4);
|
|
4034
4137
|
return e(), window.addEventListener("scroll", e, { passive: !0 }), () => window.removeEventListener("scroll", e);
|
|
4035
|
-
}, []),
|
|
4036
|
-
if (!
|
|
4138
|
+
}, []), a(() => {
|
|
4139
|
+
if (!b) return;
|
|
4037
4140
|
let e = (e) => {
|
|
4038
|
-
e.key === "Escape" &&
|
|
4141
|
+
e.key === "Escape" && x(!1);
|
|
4039
4142
|
};
|
|
4040
4143
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
4041
|
-
}, [
|
|
4144
|
+
}, [b]), /* @__PURE__ */ n("div", {
|
|
4042
4145
|
className: [
|
|
4043
4146
|
"app-shell",
|
|
4044
4147
|
w ? "collapsed" : "",
|
|
4045
4148
|
p ? "no-sidebar" : "",
|
|
4046
|
-
|
|
4149
|
+
b ? "mobile-open" : "",
|
|
4047
4150
|
g
|
|
4048
4151
|
].filter(Boolean).join(" "),
|
|
4049
4152
|
children: [
|
|
@@ -4062,16 +4165,16 @@ function lt({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbar
|
|
|
4062
4165
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
4063
4166
|
className: "app-nav-group-label",
|
|
4064
4167
|
children: e.label
|
|
4065
|
-
}), e.items.map((e) => /* @__PURE__ */ t(
|
|
4168
|
+
}), e.items.map((e) => /* @__PURE__ */ t(_t, {
|
|
4066
4169
|
item: e,
|
|
4067
4170
|
linkComponent: h,
|
|
4068
|
-
onNavigate: () =>
|
|
4171
|
+
onNavigate: () => x(!1)
|
|
4069
4172
|
}, e.key ?? e.href))]
|
|
4070
4173
|
}, e.label ?? `group-${r}`))
|
|
4071
4174
|
}),
|
|
4072
|
-
|
|
4175
|
+
i && /* @__PURE__ */ t("div", {
|
|
4073
4176
|
className: "app-sidebar-foot",
|
|
4074
|
-
children:
|
|
4177
|
+
children: i
|
|
4075
4178
|
})
|
|
4076
4179
|
]
|
|
4077
4180
|
}),
|
|
@@ -4080,11 +4183,11 @@ function lt({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbar
|
|
|
4080
4183
|
className: "app-sidebar-toggle",
|
|
4081
4184
|
onClick: () => {
|
|
4082
4185
|
let e = !w;
|
|
4083
|
-
|
|
4186
|
+
y(e), f?.(e);
|
|
4084
4187
|
},
|
|
4085
4188
|
"aria-label": w ? "Expand navigation" : "Collapse navigation",
|
|
4086
4189
|
"aria-expanded": !w,
|
|
4087
|
-
children: /* @__PURE__ */ t(
|
|
4190
|
+
children: /* @__PURE__ */ t(O, {
|
|
4088
4191
|
name: "chevron-left",
|
|
4089
4192
|
size: 14
|
|
4090
4193
|
})
|
|
@@ -4099,10 +4202,10 @@ function lt({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbar
|
|
|
4099
4202
|
children: [/* @__PURE__ */ t("button", {
|
|
4100
4203
|
type: "button",
|
|
4101
4204
|
className: "app-topbar-menu",
|
|
4102
|
-
onClick: () =>
|
|
4205
|
+
onClick: () => x(!0),
|
|
4103
4206
|
"aria-label": "Open navigation",
|
|
4104
|
-
"aria-expanded":
|
|
4105
|
-
children: /* @__PURE__ */ t(
|
|
4207
|
+
"aria-expanded": b,
|
|
4208
|
+
children: /* @__PURE__ */ t(O, {
|
|
4106
4209
|
name: "menu",
|
|
4107
4210
|
size: 18
|
|
4108
4211
|
})
|
|
@@ -4116,27 +4219,27 @@ function lt({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbar
|
|
|
4116
4219
|
className: "app-content",
|
|
4117
4220
|
children: u
|
|
4118
4221
|
}),
|
|
4119
|
-
|
|
4222
|
+
c && /* @__PURE__ */ t("footer", {
|
|
4120
4223
|
className: "app-footer",
|
|
4121
|
-
children:
|
|
4224
|
+
children: c
|
|
4122
4225
|
})
|
|
4123
4226
|
]
|
|
4124
4227
|
}),
|
|
4125
4228
|
/* @__PURE__ */ t("button", {
|
|
4126
4229
|
type: "button",
|
|
4127
4230
|
className: "app-scrim",
|
|
4128
|
-
onClick: () =>
|
|
4231
|
+
onClick: () => x(!1),
|
|
4129
4232
|
"aria-label": "Close navigation",
|
|
4130
|
-
tabIndex:
|
|
4233
|
+
tabIndex: b ? 0 : -1
|
|
4131
4234
|
})
|
|
4132
4235
|
]
|
|
4133
4236
|
});
|
|
4134
4237
|
}
|
|
4135
|
-
function
|
|
4238
|
+
function _t({ item: r, linkComponent: i, onNavigate: a }) {
|
|
4136
4239
|
let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
|
|
4137
4240
|
r.icon && /* @__PURE__ */ t("span", {
|
|
4138
4241
|
className: "app-nav-icon",
|
|
4139
|
-
children: /* @__PURE__ */ t(
|
|
4242
|
+
children: /* @__PURE__ */ t(O, {
|
|
4140
4243
|
name: r.icon,
|
|
4141
4244
|
size: 22
|
|
4142
4245
|
})
|
|
@@ -4166,7 +4269,7 @@ function ut({ item: r, linkComponent: i, onNavigate: a }) {
|
|
|
4166
4269
|
}
|
|
4167
4270
|
//#endregion
|
|
4168
4271
|
//#region src/components/AppSidebarMenu.jsx
|
|
4169
|
-
var
|
|
4272
|
+
var vt = {
|
|
4170
4273
|
left: "start",
|
|
4171
4274
|
right: "end",
|
|
4172
4275
|
start: "start",
|
|
@@ -4174,18 +4277,18 @@ var dt = {
|
|
|
4174
4277
|
top: "top",
|
|
4175
4278
|
bottom: "bottom"
|
|
4176
4279
|
};
|
|
4177
|
-
function
|
|
4178
|
-
return /* @__PURE__ */ n(
|
|
4280
|
+
function yt({ 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: v, ...b }) {
|
|
4281
|
+
return T("AppSidebarMenu", b), /* @__PURE__ */ n(y, {
|
|
4179
4282
|
show: e,
|
|
4180
4283
|
onHide: r,
|
|
4181
|
-
placement:
|
|
4284
|
+
placement: vt[i] || "end",
|
|
4182
4285
|
backdrop: d,
|
|
4183
4286
|
scroll: f,
|
|
4184
4287
|
keyboard: p,
|
|
4185
4288
|
responsive: h,
|
|
4186
4289
|
style: u ? { "--asm-width": u } : void 0,
|
|
4187
4290
|
className: `app-sidebar-menu${g ? ` ${g}` : ""}`,
|
|
4188
|
-
"aria-label":
|
|
4291
|
+
"aria-label": v || (typeof a == "string" ? a : void 0),
|
|
4189
4292
|
children: [
|
|
4190
4293
|
s === void 0 ? (a != null || m) && /* @__PURE__ */ n("div", {
|
|
4191
4294
|
className: "drawer-header",
|
|
@@ -4193,23 +4296,23 @@ function ft({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
|
|
|
4193
4296
|
className: "drawer-title",
|
|
4194
4297
|
children: [o && /* @__PURE__ */ t("span", {
|
|
4195
4298
|
className: "drawer-title-ic",
|
|
4196
|
-
children: /* @__PURE__ */ t(
|
|
4299
|
+
children: /* @__PURE__ */ t(O, {
|
|
4197
4300
|
name: o,
|
|
4198
4301
|
size: 18
|
|
4199
4302
|
})
|
|
4200
4303
|
}), a]
|
|
4201
|
-
}), m && /* @__PURE__ */ t(
|
|
4304
|
+
}), m && /* @__PURE__ */ t(Z, {
|
|
4202
4305
|
variant: "ghost",
|
|
4203
4306
|
className: "btn-icon",
|
|
4204
4307
|
onClick: r,
|
|
4205
4308
|
"aria-label": "Close",
|
|
4206
|
-
children: /* @__PURE__ */ t(
|
|
4309
|
+
children: /* @__PURE__ */ t(O, {
|
|
4207
4310
|
name: "x",
|
|
4208
4311
|
size: 16
|
|
4209
4312
|
})
|
|
4210
4313
|
})]
|
|
4211
4314
|
}) : s,
|
|
4212
|
-
/* @__PURE__ */ t(
|
|
4315
|
+
/* @__PURE__ */ t(y.Body, {
|
|
4213
4316
|
className: _,
|
|
4214
4317
|
children: c
|
|
4215
4318
|
}),
|
|
@@ -4222,8 +4325,8 @@ function ft({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
|
|
|
4222
4325
|
}
|
|
4223
4326
|
//#endregion
|
|
4224
4327
|
//#region src/components/AppSpinner.jsx
|
|
4225
|
-
function
|
|
4226
|
-
return /* @__PURE__ */ t("span", {
|
|
4328
|
+
function bt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
|
|
4329
|
+
return T("AppSpinner", i), /* @__PURE__ */ t("span", {
|
|
4227
4330
|
className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
|
|
4228
4331
|
role: "status",
|
|
4229
4332
|
"aria-label": n
|
|
@@ -4231,8 +4334,8 @@ function pt({ size: e = "md", label: n = "Loading", className: r = "" }) {
|
|
|
4231
4334
|
}
|
|
4232
4335
|
//#endregion
|
|
4233
4336
|
//#region src/components/AppSplash.jsx
|
|
4234
|
-
function
|
|
4235
|
-
return /* @__PURE__ */ t("div", {
|
|
4337
|
+
function xt({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
|
|
4338
|
+
return T("AppSplash", s), /* @__PURE__ */ t("div", {
|
|
4236
4339
|
className: `splash${o ? ` ${o}` : ""}`,
|
|
4237
4340
|
role: "status",
|
|
4238
4341
|
"aria-live": "polite",
|
|
@@ -4258,22 +4361,22 @@ function mt({ logo: e, initials: r, text: i, label: a = "Loading", className: o
|
|
|
4258
4361
|
}
|
|
4259
4362
|
//#endregion
|
|
4260
4363
|
//#region src/components/AppStatusBadge.jsx
|
|
4261
|
-
function
|
|
4262
|
-
return e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
|
|
4364
|
+
function St({ label: e, tone: n = "neutral", className: r = "", ...i }) {
|
|
4365
|
+
return T("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
|
|
4263
4366
|
className: `status-label ${n}${r ? ` ${r}` : ""}`,
|
|
4264
4367
|
children: e
|
|
4265
4368
|
});
|
|
4266
4369
|
}
|
|
4267
4370
|
//#endregion
|
|
4268
4371
|
//#region src/components/AppStepper.jsx
|
|
4269
|
-
function
|
|
4270
|
-
return /* @__PURE__ */ t("nav", {
|
|
4372
|
+
function Ct({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
4373
|
+
return T("AppStepper", c), /* @__PURE__ */ t("nav", {
|
|
4271
4374
|
className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
|
|
4272
4375
|
"aria-label": a,
|
|
4273
4376
|
children: r.map((a, s) => {
|
|
4274
4377
|
let c = a.status || "pending", l = `step${c === "pending" ? "" : ` ${c}`}`, u = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
4275
4378
|
className: "step-circle",
|
|
4276
|
-
children: c === "done" ? /* @__PURE__ */ t(
|
|
4379
|
+
children: c === "done" ? /* @__PURE__ */ t(O, {
|
|
4277
4380
|
name: "check",
|
|
4278
4381
|
size: 14
|
|
4279
4382
|
}) : s + 1
|
|
@@ -4313,10 +4416,11 @@ function gt({ steps: r = [], variant: i = "steps", label: a = "Progress", linkCo
|
|
|
4313
4416
|
}
|
|
4314
4417
|
//#endregion
|
|
4315
4418
|
//#region src/components/AppSwitch.jsx
|
|
4316
|
-
var
|
|
4317
|
-
|
|
4419
|
+
var wt = r(function({ label: e, id: r, name: i, className: a = "", ...s }, c) {
|
|
4420
|
+
T("AppSwitch", s);
|
|
4421
|
+
let l = o(), u = r || i || l;
|
|
4318
4422
|
return /* @__PURE__ */ n("div", {
|
|
4319
|
-
className: `form-check form-switch${
|
|
4423
|
+
className: `form-check form-switch${a ? ` ${a}` : ""}`,
|
|
4320
4424
|
children: [/* @__PURE__ */ t("input", {
|
|
4321
4425
|
type: "checkbox",
|
|
4322
4426
|
className: "form-check-input",
|
|
@@ -4333,13 +4437,13 @@ var _t = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
|
4333
4437
|
});
|
|
4334
4438
|
//#endregion
|
|
4335
4439
|
//#region src/components/AppTableEmptyState.jsx
|
|
4336
|
-
function
|
|
4337
|
-
return /* @__PURE__ */ n("div", {
|
|
4440
|
+
function Tt({ icon: e, title: r, text: i, action: a, ...o }) {
|
|
4441
|
+
return T("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
|
|
4338
4442
|
className: "tbl-empty",
|
|
4339
4443
|
children: [
|
|
4340
4444
|
/* @__PURE__ */ t("span", {
|
|
4341
4445
|
className: "tbl-empty-icon",
|
|
4342
|
-
children: /* @__PURE__ */ t(
|
|
4446
|
+
children: /* @__PURE__ */ t(O, {
|
|
4343
4447
|
name: e,
|
|
4344
4448
|
size: 24
|
|
4345
4449
|
})
|
|
@@ -4361,30 +4465,31 @@ function vt({ icon: e, title: r, text: i, action: a }) {
|
|
|
4361
4465
|
}
|
|
4362
4466
|
//#endregion
|
|
4363
4467
|
//#region src/components/AppTabs.jsx
|
|
4364
|
-
function
|
|
4365
|
-
|
|
4366
|
-
|
|
4468
|
+
function Et({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabel: o, className: s = "", ...l }) {
|
|
4469
|
+
T("AppTabs", l);
|
|
4470
|
+
let u = c(null);
|
|
4471
|
+
function d(t) {
|
|
4367
4472
|
let n = e.findIndex((e) => e.key === r);
|
|
4368
4473
|
if (n < 0) return;
|
|
4369
4474
|
let a = null;
|
|
4370
4475
|
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;
|
|
4371
4476
|
t.preventDefault(), i(a.key);
|
|
4372
4477
|
let o = CSS.escape(String(a.key));
|
|
4373
|
-
|
|
4478
|
+
u.current?.querySelector(`[data-rr-ui-event-key="${o}"]`)?.focus();
|
|
4374
4479
|
}
|
|
4375
|
-
return /* @__PURE__ */ t(
|
|
4480
|
+
return /* @__PURE__ */ t(b, {
|
|
4376
4481
|
as: "div",
|
|
4377
4482
|
role: "tablist",
|
|
4378
|
-
ref:
|
|
4483
|
+
ref: u,
|
|
4379
4484
|
activeKey: r,
|
|
4380
4485
|
onSelect: (e) => {
|
|
4381
4486
|
e != null && i(e);
|
|
4382
4487
|
},
|
|
4383
|
-
onKeyDown:
|
|
4488
|
+
onKeyDown: d,
|
|
4384
4489
|
bsPrefix: "app-tabs",
|
|
4385
|
-
className: [a === "pills" ? "app-tabs-pills" : "",
|
|
4490
|
+
className: [a === "pills" ? "app-tabs-pills" : "", s].filter(Boolean).join(" "),
|
|
4386
4491
|
"aria-label": o,
|
|
4387
|
-
children: e.map((e) => /* @__PURE__ */ n(
|
|
4492
|
+
children: e.map((e) => /* @__PURE__ */ n(b.Link, {
|
|
4388
4493
|
as: "button",
|
|
4389
4494
|
type: "button",
|
|
4390
4495
|
eventKey: e.key,
|
|
@@ -4404,58 +4509,76 @@ function yt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
4404
4509
|
}
|
|
4405
4510
|
//#endregion
|
|
4406
4511
|
//#region src/components/AppTextarea.jsx
|
|
4407
|
-
var
|
|
4408
|
-
|
|
4512
|
+
var Dt = r(function({ label: e, required: r = !1, error: a, hint: o, help: l, helpLabel: u = "More information", id: d, name: f, rows: p = 4, autoGrow: h = !1, className: g = "", fieldClassName: _ = "", ...v }, y) {
|
|
4513
|
+
T("AppTextarea", v);
|
|
4514
|
+
let b = d || f, x = [
|
|
4409
4515
|
"textarea",
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4516
|
+
h ? "autosize" : "",
|
|
4517
|
+
a ? "error" : "",
|
|
4518
|
+
g
|
|
4519
|
+
].filter(Boolean).join(" "), S = c(null), C = (e) => {
|
|
4520
|
+
S.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
|
|
4521
|
+
}, w = i(() => {
|
|
4522
|
+
let e = S.current;
|
|
4523
|
+
e && (e.style.height = "auto", e.style.height = `${e.scrollHeight}px`);
|
|
4524
|
+
}, []);
|
|
4525
|
+
s(() => {
|
|
4526
|
+
h && w();
|
|
4527
|
+
}, [
|
|
4528
|
+
h,
|
|
4529
|
+
w,
|
|
4530
|
+
v.value
|
|
4531
|
+
]);
|
|
4532
|
+
let E = (e) => {
|
|
4533
|
+
h && w(), v.onInput?.(e);
|
|
4534
|
+
};
|
|
4535
|
+
return /* @__PURE__ */ n(m.Group, {
|
|
4536
|
+
className: `field${_ ? ` ${_}` : ""}`,
|
|
4415
4537
|
children: [
|
|
4416
|
-
e && /* @__PURE__ */ n(
|
|
4538
|
+
e && /* @__PURE__ */ n(m.Label, {
|
|
4417
4539
|
className: "label",
|
|
4418
|
-
htmlFor:
|
|
4540
|
+
htmlFor: b,
|
|
4419
4541
|
children: [
|
|
4420
4542
|
e,
|
|
4421
|
-
r && /* @__PURE__ */ t(
|
|
4422
|
-
|
|
4423
|
-
label:
|
|
4424
|
-
children:
|
|
4543
|
+
r && /* @__PURE__ */ t(X, {}),
|
|
4544
|
+
l && /* @__PURE__ */ t(Q, {
|
|
4545
|
+
label: u,
|
|
4546
|
+
children: l
|
|
4425
4547
|
})
|
|
4426
4548
|
]
|
|
4427
4549
|
}),
|
|
4428
|
-
/* @__PURE__ */ t(
|
|
4550
|
+
/* @__PURE__ */ t(m.Control, {
|
|
4429
4551
|
as: "textarea",
|
|
4430
|
-
id:
|
|
4431
|
-
name:
|
|
4432
|
-
rows:
|
|
4433
|
-
className:
|
|
4434
|
-
"aria-invalid":
|
|
4552
|
+
id: b,
|
|
4553
|
+
name: f,
|
|
4554
|
+
rows: p,
|
|
4555
|
+
className: x,
|
|
4556
|
+
"aria-invalid": a ? "true" : "false",
|
|
4435
4557
|
required: r,
|
|
4436
|
-
|
|
4437
|
-
|
|
4558
|
+
...v,
|
|
4559
|
+
ref: C,
|
|
4560
|
+
onInput: E
|
|
4438
4561
|
}),
|
|
4439
|
-
|
|
4562
|
+
a ? /* @__PURE__ */ t("div", {
|
|
4440
4563
|
className: "field-error",
|
|
4441
|
-
children: i
|
|
4442
|
-
}) : a ? /* @__PURE__ */ t("div", {
|
|
4443
|
-
className: "field-hint",
|
|
4444
4564
|
children: a
|
|
4565
|
+
}) : o ? /* @__PURE__ */ t("div", {
|
|
4566
|
+
className: "field-hint",
|
|
4567
|
+
children: o
|
|
4445
4568
|
}) : null
|
|
4446
4569
|
]
|
|
4447
4570
|
});
|
|
4448
4571
|
});
|
|
4449
4572
|
//#endregion
|
|
4450
4573
|
//#region src/components/AppTimeline.jsx
|
|
4451
|
-
function
|
|
4452
|
-
return /* @__PURE__ */ t("ol", {
|
|
4574
|
+
function Ot({ items: e = [], className: r = "", ...i }) {
|
|
4575
|
+
return T("AppTimeline", i), /* @__PURE__ */ t("ol", {
|
|
4453
4576
|
className: `timeline${r ? ` ${r}` : ""}`,
|
|
4454
4577
|
children: e.map((e, r) => /* @__PURE__ */ n("li", {
|
|
4455
4578
|
className: `timeline-item${e.tone && e.tone !== "neutral" ? ` ${e.tone}` : ""}`,
|
|
4456
4579
|
children: [/* @__PURE__ */ t("span", {
|
|
4457
4580
|
className: "timeline-dot",
|
|
4458
|
-
children: /* @__PURE__ */ t(
|
|
4581
|
+
children: /* @__PURE__ */ t(O, {
|
|
4459
4582
|
name: e.icon || "circle",
|
|
4460
4583
|
size: 12
|
|
4461
4584
|
})
|
|
@@ -4486,4 +4609,4 @@ function xt({ items: e = [], className: r = "" }) {
|
|
|
4486
4609
|
});
|
|
4487
4610
|
}
|
|
4488
4611
|
//#endregion
|
|
4489
|
-
export {
|
|
4612
|
+
export { k as ActionIcon, A as AppAccordion, j as AppAlert, ve as AppAutocomplete, be as AppAvatar, xe as AppBadge, Z as AppButton, we as AppCallout, Te as AppCard, Ee as AppCheckbox, De as AppChip, Oe as AppChoiceCard, ke as AppChoiceChip, Ae as AppColorField, je as AppCompareTable, Ie as AppConfirmDialog, Ke as AppDataTable, qe as AppDatePicker, Ye as AppDropdown, Xe as AppEmptyState, Ze as AppFileAttachment, tt as AppFilePicker, nt as AppInfoList, Q as AppInfoTip, Me as AppInput, rt as AppKpiTile, it as AppLogoPicker, Pe as AppModal, at as AppMultiSelect, ot as AppPageHeader, st as AppPhoneNumberInput, ct as AppPricingCard, lt as AppRadio, ut as AppRepeater, dt as AppResourceCard, ft as AppSearch, pt as AppSegmented, ht as AppSelect, Ve as AppSelectMini, gt as AppShell, yt as AppSidebarMenu, Le as AppSkeleton, Be as AppSkeletonRows, bt as AppSpinner, xt as AppSplash, St as AppStatusBadge, Ct as AppStepper, wt as AppSwitch, Tt as AppTableEmptyState, Ue as AppTablePagination, Et as AppTabs, Dt as AppTextarea, Ot as AppTimeline, O as Icon, Fe as MODAL_ICONS, X as RequiredMark, et as errorToast, D as iconNames, $e as toast };
|