@webority/ui-react 0.6.4 → 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/ui-react.js
CHANGED
|
@@ -1,34 +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
14
|
//#region src/components/warnUnknownProps.js
|
|
15
|
-
var
|
|
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
16
|
try {
|
|
17
17
|
return process.env.NODE_ENV !== "production";
|
|
18
18
|
} catch {
|
|
19
19
|
return !0;
|
|
20
20
|
}
|
|
21
|
-
},
|
|
22
|
-
function
|
|
23
|
-
if (!(!
|
|
24
|
-
if (
|
|
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
25
|
let t = `${e}.${n}`;
|
|
26
|
-
|
|
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
27
|
}
|
|
28
28
|
}
|
|
29
29
|
//#endregion
|
|
30
30
|
//#region src/components/Icon.jsx
|
|
31
|
-
var
|
|
31
|
+
var E = {
|
|
32
32
|
activity: "activity",
|
|
33
33
|
"alert-circle": "exclamation-circle",
|
|
34
34
|
"alert-triangle": "exclamation-triangle",
|
|
@@ -97,6 +97,10 @@ var T = {
|
|
|
97
97
|
phone: "telephone",
|
|
98
98
|
plug: "plug",
|
|
99
99
|
plus: "plus-lg",
|
|
100
|
+
minus: "dash-lg",
|
|
101
|
+
"zoom-in": "zoom-in",
|
|
102
|
+
"zoom-out": "zoom-out",
|
|
103
|
+
"two-page": "layout-split",
|
|
100
104
|
"plus-circle": "plus-circle",
|
|
101
105
|
"refresh-cw": "arrow-clockwise",
|
|
102
106
|
repeat: "arrow-repeat",
|
|
@@ -122,9 +126,9 @@ var T = {
|
|
|
122
126
|
"wand-sparkles": "magic",
|
|
123
127
|
x: "x-lg",
|
|
124
128
|
zap: "lightning-charge"
|
|
125
|
-
},
|
|
126
|
-
function
|
|
127
|
-
if (
|
|
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", {
|
|
128
132
|
width: r,
|
|
129
133
|
height: r,
|
|
130
134
|
viewBox: "0 0 24 24",
|
|
@@ -146,7 +150,7 @@ function D({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
|
|
|
146
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" })]
|
|
147
151
|
})
|
|
148
152
|
});
|
|
149
|
-
let c =
|
|
153
|
+
let c = E[e] || e;
|
|
150
154
|
return c ? /* @__PURE__ */ t("i", {
|
|
151
155
|
className: `bi bi-${c}${i ? ` ${i}` : ""}`,
|
|
152
156
|
"data-icon": e,
|
|
@@ -161,8 +165,8 @@ function D({ name: e, size: r = 16, className: i, color: a, style: o, ...s }) {
|
|
|
161
165
|
}
|
|
162
166
|
//#endregion
|
|
163
167
|
//#region src/components/ActionIcon.jsx
|
|
164
|
-
function
|
|
165
|
-
|
|
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);
|
|
166
170
|
let d = [
|
|
167
171
|
"u-action",
|
|
168
172
|
r ? "danger" : "",
|
|
@@ -178,7 +182,7 @@ function O({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
|
|
|
178
182
|
"aria-disabled": !p && i ? "true" : void 0,
|
|
179
183
|
onClick: o,
|
|
180
184
|
...u,
|
|
181
|
-
children: /* @__PURE__ */ t(
|
|
185
|
+
children: /* @__PURE__ */ t(O, {
|
|
182
186
|
name: e,
|
|
183
187
|
size: a
|
|
184
188
|
})
|
|
@@ -186,9 +190,9 @@ function O({ icon: e, label: n, danger: r = !1, disabled: i = !1, size: a = 20,
|
|
|
186
190
|
}
|
|
187
191
|
//#endregion
|
|
188
192
|
//#region src/components/AppAccordion.jsx
|
|
189
|
-
function
|
|
190
|
-
|
|
191
|
-
let
|
|
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(() => {
|
|
192
196
|
let t = e.filter((e) => e.open).map((e, t) => e.key ?? String(t));
|
|
193
197
|
return new Set(r ? t : t.slice(0, 1));
|
|
194
198
|
}), p = (e, t) => e.key ?? String(t), m = (e) => {
|
|
@@ -198,7 +202,7 @@ function k({ items: e = [], multiple: r = !1, id: i, className: o = "", ...s })
|
|
|
198
202
|
});
|
|
199
203
|
};
|
|
200
204
|
return /* @__PURE__ */ t("div", {
|
|
201
|
-
className: `faq-list${
|
|
205
|
+
className: `faq-list${a ? ` ${a}` : ""}`,
|
|
202
206
|
children: e.map((e, r) => {
|
|
203
207
|
let i = p(e, r), a = d.has(i), o = `${u}-${r}`, s = `${o}-q`;
|
|
204
208
|
return /* @__PURE__ */ n("div", {
|
|
@@ -212,7 +216,7 @@ function k({ items: e = [], multiple: r = !1, id: i, className: o = "", ...s })
|
|
|
212
216
|
onClick: () => m(i),
|
|
213
217
|
children: [e.title, /* @__PURE__ */ t("span", {
|
|
214
218
|
className: "faq-q-icon",
|
|
215
|
-
children: /* @__PURE__ */ t(
|
|
219
|
+
children: /* @__PURE__ */ t(O, {
|
|
216
220
|
name: "chevron-down",
|
|
217
221
|
size: 18
|
|
218
222
|
})
|
|
@@ -232,8 +236,8 @@ function k({ items: e = [], multiple: r = !1, id: i, className: o = "", ...s })
|
|
|
232
236
|
}
|
|
233
237
|
//#endregion
|
|
234
238
|
//#region src/components/AppAlert.jsx
|
|
235
|
-
function
|
|
236
|
-
return
|
|
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, {
|
|
237
241
|
variant: e,
|
|
238
242
|
className: r || void 0,
|
|
239
243
|
onClose: i,
|
|
@@ -246,14 +250,14 @@ function A({ variant: e = "info", children: n, className: r = "", onClose: i, di
|
|
|
246
250
|
}
|
|
247
251
|
//#endregion
|
|
248
252
|
//#region ../elements/dist/ui-elements.js
|
|
249
|
-
var
|
|
253
|
+
var M = {
|
|
250
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>",
|
|
251
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>",
|
|
252
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>",
|
|
253
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>",
|
|
254
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>"
|
|
255
259
|
};
|
|
256
|
-
Object.keys(
|
|
260
|
+
Object.keys(M);
|
|
257
261
|
var ee = class extends HTMLElement {
|
|
258
262
|
static get observedAttributes() {
|
|
259
263
|
return ["tone", "size"];
|
|
@@ -265,19 +269,21 @@ var ee = class extends HTMLElement {
|
|
|
265
269
|
this.isConnected && this.render();
|
|
266
270
|
}
|
|
267
271
|
render() {
|
|
268
|
-
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;
|
|
269
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>`;
|
|
270
274
|
}
|
|
271
|
-
},
|
|
272
|
-
function
|
|
273
|
-
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}]`);
|
|
274
278
|
if (!n) {
|
|
275
279
|
r?.remove();
|
|
276
280
|
return;
|
|
277
281
|
}
|
|
278
|
-
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");
|
|
279
285
|
}
|
|
280
|
-
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 {
|
|
281
287
|
_accessibleName() {
|
|
282
288
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
283
289
|
}
|
|
@@ -305,9 +311,9 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
305
311
|
return this._value;
|
|
306
312
|
}
|
|
307
313
|
set value(e) {
|
|
308
|
-
this._value = e == null ? "" : String(e),
|
|
314
|
+
this._value = e == null ? "" : String(e), P(this, this._value);
|
|
309
315
|
let t = this._readOptions().find((e) => String(e.value) === this._value);
|
|
310
|
-
t && (this._label =
|
|
316
|
+
t && (this._label = z(t.label)), this._syncInput();
|
|
311
317
|
}
|
|
312
318
|
set options(e) {
|
|
313
319
|
this._optionsProp = Array.isArray(e) ? e : [], this._renderOptions();
|
|
@@ -337,7 +343,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
337
343
|
e.length && (this._declared = e.map((e) => ({
|
|
338
344
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
339
345
|
label: e.innerHTML,
|
|
340
|
-
[
|
|
346
|
+
[F]: !0,
|
|
341
347
|
selected: e.hasAttribute("selected")
|
|
342
348
|
})));
|
|
343
349
|
}
|
|
@@ -349,8 +355,8 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
349
355
|
let e = this.getAttribute("placeholder") || "Search…";
|
|
350
356
|
this.innerHTML = `
|
|
351
357
|
<div class="search-select">
|
|
352
|
-
<div class="input search-select-control search-select-ac" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
353
|
-
<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" : ""} />
|
|
354
360
|
<span class="search-select-spinner spinner-border spinner-border-sm" role="status" aria-hidden="true" hidden></span>
|
|
355
361
|
<button type="button" class="search-select-clear" aria-label="Clear" hidden><i class="bi bi-x" aria-hidden="true"></i></button>
|
|
356
362
|
</div>
|
|
@@ -359,7 +365,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
359
365
|
<div class="search-select-empty" hidden>No matches</div>
|
|
360
366
|
<div class="search-select-hint" hidden>Type to search…</div>
|
|
361
367
|
</div>
|
|
362
|
-
</div>`, this._rendered = !0,
|
|
368
|
+
</div>`, this._rendered = !0, P(this, this._value), this._wire(), this._syncInput(), this._renderOptions();
|
|
363
369
|
}
|
|
364
370
|
_refs() {
|
|
365
371
|
return {
|
|
@@ -388,9 +394,9 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
388
394
|
let t = this._refs();
|
|
389
395
|
if (!t.optionsWrap) return;
|
|
390
396
|
let n = (e ?? (t.input ? t.input.value : "")).trim().toLowerCase(), r = this._readOptions();
|
|
391
|
-
!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) => {
|
|
392
398
|
let t = String(e.value) === String(this._value);
|
|
393
|
-
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>`;
|
|
394
400
|
}).join(""), this._active = -1;
|
|
395
401
|
let i = n.length < this._minChars;
|
|
396
402
|
t.hint && (t.hint.hidden = !(this._remote && i && !r.length)), t.empty && (t.empty.hidden = this._loading || r.length > 0 || this._remote && i);
|
|
@@ -411,7 +417,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
411
417
|
}, o = () => {
|
|
412
418
|
e.menu.hidden = !0, e.control.setAttribute("aria-expanded", "false"), e.control.classList.remove("open"), r(-1), this._syncInput();
|
|
413
419
|
}, s = (t) => {
|
|
414
|
-
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();
|
|
415
421
|
};
|
|
416
422
|
e.input.addEventListener("focus", () => a()), e.input.addEventListener("input", () => {
|
|
417
423
|
let t = e.input.value;
|
|
@@ -434,7 +440,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
434
440
|
let t = e.target.closest(".search-select-option");
|
|
435
441
|
t && r(this._optionEls().indexOf(t));
|
|
436
442
|
}), e.clear?.addEventListener("click", () => {
|
|
437
|
-
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();
|
|
438
444
|
}), this._onDocClick = (e) => {
|
|
439
445
|
i() && !this.contains(e.target) && o();
|
|
440
446
|
}, document.addEventListener("click", this._onDocClick), window.addEventListener("resize", () => {
|
|
@@ -444,7 +450,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
444
450
|
disconnectedCallback() {
|
|
445
451
|
this._onDocClick && document.removeEventListener("click", this._onDocClick), clearTimeout(this._timer);
|
|
446
452
|
}
|
|
447
|
-
},
|
|
453
|
+
}, R = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), z = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), B = [
|
|
448
454
|
"January",
|
|
449
455
|
"February",
|
|
450
456
|
"March",
|
|
@@ -457,7 +463,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
457
463
|
"October",
|
|
458
464
|
"November",
|
|
459
465
|
"December"
|
|
460
|
-
],
|
|
466
|
+
], ne = [
|
|
461
467
|
"Su",
|
|
462
468
|
"Mo",
|
|
463
469
|
"Tu",
|
|
@@ -465,17 +471,17 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
465
471
|
"Th",
|
|
466
472
|
"Fr",
|
|
467
473
|
"Sa"
|
|
468
|
-
],
|
|
474
|
+
], V = (e) => String(e).padStart(2, "0"), re = (e, t, n) => `${e}-${V(t + 1)}-${V(n)}`, H = (e) => {
|
|
469
475
|
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e || "");
|
|
470
476
|
return t ? {
|
|
471
477
|
y: +t[1],
|
|
472
478
|
m: t[2] - 1,
|
|
473
479
|
d: +t[3]
|
|
474
480
|
} : null;
|
|
475
|
-
},
|
|
476
|
-
let t =
|
|
477
|
-
return t ? `${
|
|
478
|
-
},
|
|
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 {
|
|
479
485
|
static get observedAttributes() {
|
|
480
486
|
return [
|
|
481
487
|
"value",
|
|
@@ -500,46 +506,46 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
500
506
|
return this._value;
|
|
501
507
|
}
|
|
502
508
|
set value(e) {
|
|
503
|
-
this._value = e || "",
|
|
509
|
+
this._value = e || "", P(this, this._value), this._syncTrigger(), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
504
510
|
}
|
|
505
511
|
render() {
|
|
506
512
|
this._value = this.getAttribute("value") || this._value;
|
|
507
|
-
let e = this.getAttribute("placeholder") || "Enter Date", t =
|
|
513
|
+
let e = this.getAttribute("placeholder") || "Enter Date", t = H(this._value);
|
|
508
514
|
t && (this._viewY = t.y, this._viewM = t.m), this.innerHTML = `
|
|
509
515
|
<div class="datepicker">
|
|
510
516
|
<button type="button" class="input datepicker-trigger" aria-haspopup="dialog" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
511
|
-
<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>
|
|
512
518
|
<i class="bi bi-calendar3" aria-hidden="true"></i>
|
|
513
519
|
</button>
|
|
514
520
|
<div class="datepicker-pop" role="dialog" hidden></div>
|
|
515
|
-
</div>`, this._rendered = !0,
|
|
521
|
+
</div>`, this._rendered = !0, P(this, this._value), this._wire();
|
|
516
522
|
}
|
|
517
523
|
_syncFormValue() {
|
|
518
|
-
|
|
524
|
+
P(this, this._value);
|
|
519
525
|
}
|
|
520
526
|
_syncTrigger() {
|
|
521
527
|
let e = this.querySelector("[data-trigger-label]");
|
|
522
528
|
if (!e) return;
|
|
523
|
-
let t =
|
|
524
|
-
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);
|
|
525
531
|
}
|
|
526
532
|
_renderMonth() {
|
|
527
|
-
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) => {
|
|
528
534
|
let r = new Date(e, t, n).getTime();
|
|
529
535
|
return !!(i && r < new Date(i.y, i.m, i.d).getTime() || a && r > new Date(a.y, a.m, a.d).getTime());
|
|
530
536
|
}, s = "";
|
|
531
537
|
for (let e = 0; e < t; e++) s += "<span class=\"datepicker-day is-outside\"></span>";
|
|
532
538
|
for (let e = 1; e <= n; e++) {
|
|
533
|
-
let t =
|
|
539
|
+
let t = re(this._viewY, this._viewM, e), n = r && r.y === this._viewY && r.m === this._viewM && r.d === e, i = o(this._viewY, this._viewM, e);
|
|
534
540
|
s += `<button type="button" class="datepicker-day${n ? " selected" : ""}" data-iso="${t}"${i ? " disabled" : ""}>${e}</button>`;
|
|
535
541
|
}
|
|
536
542
|
e.innerHTML = `
|
|
537
543
|
<div class="datepicker-head">
|
|
538
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>
|
|
539
|
-
<span class="datepicker-month">${
|
|
545
|
+
<span class="datepicker-month">${B[this._viewM]} ${this._viewY}</span>
|
|
540
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>
|
|
541
547
|
</div>
|
|
542
|
-
<div class="datepicker-weekdays">${
|
|
548
|
+
<div class="datepicker-weekdays">${ne.map((e) => `<span>${e}</span>`).join("")}</div>
|
|
543
549
|
<div class="datepicker-grid">${s}</div>
|
|
544
550
|
<div class="datepicker-foot"><button type="button" class="datepicker-link" data-clear>Clear</button></div>`;
|
|
545
551
|
}
|
|
@@ -547,6 +553,10 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
547
553
|
let e = this.querySelector(".datepicker-trigger"), t = this.querySelector(".datepicker-pop");
|
|
548
554
|
if (!e || !t) return;
|
|
549
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
|
+
}
|
|
550
560
|
this._renderMonth(), t.hidden = !1, e.setAttribute("aria-expanded", "true");
|
|
551
561
|
}, i = () => {
|
|
552
562
|
t.hidden = !0, e.setAttribute("aria-expanded", "false");
|
|
@@ -554,7 +564,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
554
564
|
e.addEventListener("click", () => n() ? i() : r()), t.addEventListener("click", (e) => {
|
|
555
565
|
let t = e.target.closest("[data-nav]");
|
|
556
566
|
if (t) {
|
|
557
|
-
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();
|
|
558
568
|
return;
|
|
559
569
|
}
|
|
560
570
|
if (e.target.closest("[data-clear]")) {
|
|
@@ -572,7 +582,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
572
582
|
disconnectedCallback() {
|
|
573
583
|
this._onDocClick && document.removeEventListener("click", this._onDocClick), this._onDocKey && document.removeEventListener("keydown", this._onDocKey);
|
|
574
584
|
}
|
|
575
|
-
},
|
|
585
|
+
}, ae = class extends HTMLElement {
|
|
576
586
|
_accessibleName() {
|
|
577
587
|
return this.getAttribute("aria-label") || this.getAttribute("placeholder") || "Select";
|
|
578
588
|
}
|
|
@@ -604,7 +614,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
604
614
|
return this._values.slice();
|
|
605
615
|
}
|
|
606
616
|
set values(e) {
|
|
607
|
-
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();
|
|
608
618
|
}
|
|
609
619
|
set options(e) {
|
|
610
620
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -618,7 +628,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
618
628
|
e.length && (this._declared = e.map((e) => ({
|
|
619
629
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
620
630
|
label: e.innerHTML,
|
|
621
|
-
[
|
|
631
|
+
[F]: !0,
|
|
622
632
|
selected: e.hasAttribute("selected")
|
|
623
633
|
})));
|
|
624
634
|
}
|
|
@@ -631,41 +641,41 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
631
641
|
}
|
|
632
642
|
_labelHtmlFor(e) {
|
|
633
643
|
let t = this._readOptions().find((t) => String(t.value) === String(e));
|
|
634
|
-
return t ?
|
|
644
|
+
return t ? L(t) : I(e);
|
|
635
645
|
}
|
|
636
646
|
render() {
|
|
637
647
|
this._snapshotDeclared();
|
|
638
648
|
let e = this.hasAttribute("searchable"), t = this.getAttribute("search-placeholder") || "Search…";
|
|
639
|
-
|
|
649
|
+
P(this, this._values.join(",")), this.innerHTML = `
|
|
640
650
|
<div class="search-select">
|
|
641
|
-
<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\"" : ""}>
|
|
642
652
|
<div class="ms-chips" data-chips></div>
|
|
643
653
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
644
654
|
</div>
|
|
645
655
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" aria-multiselectable="true" tabindex="-1" hidden>
|
|
646
|
-
${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>` : ""}
|
|
647
657
|
<div class="search-select-options"></div>
|
|
648
658
|
<div class="search-select-empty" hidden>No matches</div>
|
|
649
659
|
</div>
|
|
650
|
-
</div>`, this._rendered = !0,
|
|
660
|
+
</div>`, this._rendered = !0, P(this, this._values.join(",")), this._renderControl(), this._renderOptions(), this._wire();
|
|
651
661
|
}
|
|
652
662
|
_renderControl() {
|
|
653
663
|
let e = this.querySelector("[data-chips]");
|
|
654
664
|
if (!e) return;
|
|
655
665
|
let t = this.getAttribute("placeholder") || "Select…";
|
|
656
666
|
if (!this._values.length) {
|
|
657
|
-
e.innerHTML = `<span class="search-select-placeholder">${
|
|
667
|
+
e.innerHTML = `<span class="search-select-placeholder">${I(t)}</span>`;
|
|
658
668
|
return;
|
|
659
669
|
}
|
|
660
|
-
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("");
|
|
661
671
|
}
|
|
662
672
|
_renderOptions(e) {
|
|
663
673
|
let t = this.querySelector(".search-select-options"), n = this.querySelector(".search-select-empty");
|
|
664
674
|
if (!t) return;
|
|
665
675
|
let r = (e || "").trim().toLowerCase(), i = this._readOptions();
|
|
666
|
-
r && (i = i.filter((e) =>
|
|
676
|
+
r && (i = i.filter((e) => oe(e.label).toLowerCase().includes(r))), t.innerHTML = i.map((e) => {
|
|
667
677
|
let t = this._values.includes(String(e.value));
|
|
668
|
-
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>`;
|
|
669
679
|
}).join(""), n && (n.hidden = i.length > 0), this._active = -1;
|
|
670
680
|
}
|
|
671
681
|
_wire() {
|
|
@@ -684,7 +694,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
684
694
|
}, f = () => {
|
|
685
695
|
t.hidden = !0, e.setAttribute("aria-expanded", "false"), e.classList.remove("open"), l(-1);
|
|
686
696
|
}, p = () => {
|
|
687
|
-
|
|
697
|
+
P(this, this._values.join(",")), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
688
698
|
}, m = (e) => {
|
|
689
699
|
let t = String(e);
|
|
690
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();
|
|
@@ -728,7 +738,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
728
738
|
disconnectedCallback() {
|
|
729
739
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
730
740
|
}
|
|
731
|
-
},
|
|
741
|
+
}, W = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), oe = (e) => String(e ?? "").replace(/<[^>]*>/g, ""), se = [
|
|
732
742
|
[
|
|
733
743
|
"AF",
|
|
734
744
|
"Afghanistan",
|
|
@@ -1954,11 +1964,11 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1954
1964
|
"Zimbabwe",
|
|
1955
1965
|
"263"
|
|
1956
1966
|
]
|
|
1957
|
-
],
|
|
1967
|
+
], G = (e) => (se.find((t) => t[0] === e) || [
|
|
1958
1968
|
"",
|
|
1959
1969
|
"",
|
|
1960
1970
|
""
|
|
1961
|
-
])[2],
|
|
1971
|
+
])[2], K = (e) => `wui-flag wui-flag-${String(e).toLowerCase()}`, ce = class extends HTMLElement {
|
|
1962
1972
|
static get observedAttributes() {
|
|
1963
1973
|
return [
|
|
1964
1974
|
"value",
|
|
@@ -1977,33 +1987,33 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
1977
1987
|
this._rendered && (e === "country" && (this._country = n || "IN"), this.render());
|
|
1978
1988
|
}
|
|
1979
1989
|
get value() {
|
|
1980
|
-
return `+${
|
|
1990
|
+
return `+${G(this._country)}${this._national}`;
|
|
1981
1991
|
}
|
|
1982
1992
|
set value(e) {
|
|
1983
1993
|
this._national = String(e ?? "").replace(/[^0-9]/g, ""), this._commit();
|
|
1984
1994
|
}
|
|
1985
1995
|
_commit() {
|
|
1986
|
-
|
|
1996
|
+
P(this, this.value), this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1987
1997
|
}
|
|
1988
1998
|
render() {
|
|
1989
1999
|
let e = this.getAttribute("placeholder") || "Enter phone number";
|
|
1990
2000
|
this._country = this.getAttribute("country") || this._country;
|
|
1991
|
-
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("");
|
|
1992
2002
|
this.innerHTML = `
|
|
1993
2003
|
<div class="phone-input-wrap">
|
|
1994
2004
|
<div class="phone-country-adornment">
|
|
1995
2005
|
<button type="button" class="country-toggle" aria-haspopup="listbox" aria-expanded="false"${this.hasAttribute("disabled") ? " disabled" : ""}>
|
|
1996
|
-
<span class="${
|
|
2006
|
+
<span class="${K(this._country)}" data-flag aria-hidden="true"></span>
|
|
1997
2007
|
<i class="bi bi-chevron-down phone-chevron" aria-hidden="true"></i>
|
|
1998
|
-
<span class="phone-dial" data-dial>+${
|
|
2008
|
+
<span class="phone-dial" data-dial>+${G(this._country)}</span>
|
|
1999
2009
|
</button>
|
|
2000
2010
|
<div class="country-dropdown-menu" role="listbox" hidden>
|
|
2001
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>
|
|
2002
2012
|
<div class="country-list-scroll">${t}<div class="country-empty" hidden>No countries found</div></div>
|
|
2003
2013
|
</div>
|
|
2004
2014
|
</div>
|
|
2005
|
-
<input type="tel" class="input" placeholder="${
|
|
2006
|
-
</div>`, this._rendered = !0,
|
|
2015
|
+
<input type="tel" class="input" placeholder="${le(e)}" value="${le(this._national)}"${this.hasAttribute("disabled") ? " disabled" : ""} />
|
|
2016
|
+
</div>`, this._rendered = !0, P(this, this.value), this._wire();
|
|
2007
2017
|
}
|
|
2008
2018
|
_wire() {
|
|
2009
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]");
|
|
@@ -2027,7 +2037,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2027
2037
|
}
|
|
2028
2038
|
i && (i.hidden = n > 0);
|
|
2029
2039
|
}, p = (e) => {
|
|
2030
|
-
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)}`);
|
|
2031
2041
|
for (let t of r.querySelectorAll(".country-dropdown-item")) t.classList.toggle("selected", t.dataset.iso === e);
|
|
2032
2042
|
d(), this._commit();
|
|
2033
2043
|
};
|
|
@@ -2038,12 +2048,12 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2038
2048
|
this._national = a.value.replace(/[^0-9]/g, ""), this._commit();
|
|
2039
2049
|
}), this._onDocClick = (e) => {
|
|
2040
2050
|
c() && !this.contains(e.target) && d();
|
|
2041
|
-
}, document.addEventListener("click", this._onDocClick),
|
|
2051
|
+
}, document.addEventListener("click", this._onDocClick), P(this, this.value);
|
|
2042
2052
|
}
|
|
2043
2053
|
disconnectedCallback() {
|
|
2044
2054
|
this._reposition && (window.removeEventListener("scroll", this._reposition, !0), window.removeEventListener("resize", this._reposition)), this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
2045
2055
|
}
|
|
2046
|
-
},
|
|
2056
|
+
}, le = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), ue = class extends HTMLElement {
|
|
2047
2057
|
static get observedAttributes() {
|
|
2048
2058
|
return [
|
|
2049
2059
|
"value",
|
|
@@ -2071,7 +2081,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2071
2081
|
return this._value;
|
|
2072
2082
|
}
|
|
2073
2083
|
set value(e) {
|
|
2074
|
-
this._value = e == null ? "" : String(e),
|
|
2084
|
+
this._value = e == null ? "" : String(e), P(this, this._value), this._syncSelected();
|
|
2075
2085
|
}
|
|
2076
2086
|
set options(e) {
|
|
2077
2087
|
this._optionsProp = Array.isArray(e) ? e : null, this.isConnected && this.render();
|
|
@@ -2085,7 +2095,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2085
2095
|
e.length && (this._declared = e.map((e) => ({
|
|
2086
2096
|
value: e.getAttribute("value") ?? e.textContent.trim(),
|
|
2087
2097
|
label: e.innerHTML,
|
|
2088
|
-
[
|
|
2098
|
+
[F]: !0,
|
|
2089
2099
|
selected: e.hasAttribute("selected")
|
|
2090
2100
|
})));
|
|
2091
2101
|
}
|
|
@@ -2095,22 +2105,22 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2095
2105
|
render() {
|
|
2096
2106
|
this._snapshotDeclared();
|
|
2097
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);
|
|
2098
|
-
i && (this._value = String(i.value)),
|
|
2108
|
+
i && (this._value = String(i.value)), P(this, this._value);
|
|
2099
2109
|
let a = e.map((e) => {
|
|
2100
2110
|
let t = String(e.value) === String(this._value);
|
|
2101
|
-
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>`;
|
|
2102
2112
|
}).join("");
|
|
2103
2113
|
this.innerHTML = `
|
|
2104
2114
|
<div class="search-select${this.hasAttribute("compact") ? " search-select-compact" : ""}">
|
|
2105
|
-
<button type="button" role="combobox" class="input search-select-control" aria-haspopup="listbox" aria-expanded="false" aria-label="${
|
|
2106
|
-
<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>
|
|
2107
2117
|
<i class="bi bi-chevron-down search-select-caret" aria-hidden="true"></i>
|
|
2108
2118
|
</button>
|
|
2109
2119
|
<div class="search-select-menu search-select-menu-fixed" role="listbox" tabindex="-1" hidden>
|
|
2110
|
-
${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>` : ""}
|
|
2111
2121
|
<div class="search-select-options">${a}<div class="search-select-empty" hidden>No matches</div></div>
|
|
2112
2122
|
</div>
|
|
2113
|
-
</div>`, this._rendered = !0,
|
|
2123
|
+
</div>`, this._rendered = !0, P(this, this._value), this._wire();
|
|
2114
2124
|
}
|
|
2115
2125
|
_refs() {
|
|
2116
2126
|
return {
|
|
@@ -2135,7 +2145,7 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2135
2145
|
let t = e.dataset.value === String(this._value);
|
|
2136
2146
|
e.classList.toggle("selected", t), e.setAttribute("aria-selected", String(t));
|
|
2137
2147
|
}
|
|
2138
|
-
e && (e.innerHTML = t ?
|
|
2148
|
+
e && (e.innerHTML = t ? L(t) : e.innerHTML, e.classList.toggle("search-select-placeholder", !t));
|
|
2139
2149
|
}
|
|
2140
2150
|
_wire() {
|
|
2141
2151
|
let e = this._refs();
|
|
@@ -2190,14 +2200,14 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2190
2200
|
disconnectedCallback() {
|
|
2191
2201
|
this._onDocClick && document.removeEventListener("click", this._onDocClick);
|
|
2192
2202
|
}
|
|
2193
|
-
},
|
|
2203
|
+
}, q = (e) => String(e ?? "").replace(/"/g, """).replace(/</g, "<"), de = "image/png,image/jpeg,image/webp", fe = {
|
|
2194
2204
|
"image/png": [".png"],
|
|
2195
2205
|
"image/jpeg": [".jpg", ".jpeg"],
|
|
2196
2206
|
"image/webp": [".webp"],
|
|
2197
2207
|
"image/gif": [".gif"],
|
|
2198
2208
|
"image/svg+xml": [".svg"],
|
|
2199
2209
|
"application/pdf": [".pdf"]
|
|
2200
|
-
},
|
|
2210
|
+
}, pe = {
|
|
2201
2211
|
"image/png": "PNG",
|
|
2202
2212
|
"image/jpeg": "JPG",
|
|
2203
2213
|
"image/webp": "WEBP",
|
|
@@ -2211,36 +2221,36 @@ var N = Symbol("wui.trustedHtml"), P = (e) => String(e ?? "").replace(/&/g, "&am
|
|
|
2211
2221
|
".gif": "GIF",
|
|
2212
2222
|
".svg": "SVG",
|
|
2213
2223
|
".pdf": "PDF"
|
|
2214
|
-
},
|
|
2224
|
+
}, me = (e) => String(e || "").split(",").map((e) => e.trim().toLowerCase()).filter(Boolean);
|
|
2215
2225
|
function he(e) {
|
|
2216
2226
|
let t = [];
|
|
2217
|
-
for (let n of
|
|
2218
|
-
let e =
|
|
2227
|
+
for (let n of me(e)) {
|
|
2228
|
+
let e = pe[n] || (n.startsWith(".") ? n.slice(1).toUpperCase() : n.toUpperCase());
|
|
2219
2229
|
t.includes(e) || t.push(e);
|
|
2220
2230
|
}
|
|
2221
2231
|
return t.length <= 1 ? t[0] || "supported" : `${t.slice(0, -1).join(", ")} or ${t[t.length - 1]}`;
|
|
2222
2232
|
}
|
|
2223
2233
|
function ge(e, t) {
|
|
2224
|
-
let n =
|
|
2234
|
+
let n = me(t);
|
|
2225
2235
|
if (!n.length) return !0;
|
|
2226
2236
|
let r = (e.type || "").toLowerCase(), i = (e.name || "").toLowerCase();
|
|
2227
|
-
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)));
|
|
2228
2238
|
}
|
|
2229
|
-
function
|
|
2239
|
+
function J(e, t = {}) {
|
|
2230
2240
|
if (!e) return null;
|
|
2231
|
-
let n = t.accept === void 0 ?
|
|
2241
|
+
let n = t.accept === void 0 ? de : t.accept, r = t.maxSizeMb || 5;
|
|
2232
2242
|
return ge(e, n) ? e.size > r * 1024 * 1024 ? `Keep the file under ${r} MB.` : null : `Choose a ${he(n)} file.`;
|
|
2233
2243
|
}
|
|
2234
|
-
var
|
|
2244
|
+
var Y = (e, t) => {
|
|
2235
2245
|
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
2236
2246
|
};
|
|
2237
2247
|
function _e() {
|
|
2238
|
-
|
|
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);
|
|
2239
2249
|
}
|
|
2240
2250
|
_e();
|
|
2241
2251
|
//#endregion
|
|
2242
2252
|
//#region src/components/RequiredMark.jsx
|
|
2243
|
-
function
|
|
2253
|
+
function X() {
|
|
2244
2254
|
return /* @__PURE__ */ t("span", {
|
|
2245
2255
|
className: "required",
|
|
2246
2256
|
"aria-hidden": "true",
|
|
@@ -2249,21 +2259,21 @@ function Y() {
|
|
|
2249
2259
|
}
|
|
2250
2260
|
//#endregion
|
|
2251
2261
|
//#region src/components/AppAutocomplete.jsx
|
|
2252
|
-
function ve({ value: e, onChange: r, options:
|
|
2253
|
-
|
|
2254
|
-
let y =
|
|
2255
|
-
return
|
|
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(() => {
|
|
2256
2266
|
let e = y.current;
|
|
2257
|
-
e && !b && (e.options =
|
|
2258
|
-
}, [
|
|
2267
|
+
e && !b && (e.options = i || []);
|
|
2268
|
+
}, [i, b]), a(() => {
|
|
2259
2269
|
let t = y.current;
|
|
2260
2270
|
t && t.value !== (e ?? "") && (t.value = e ?? "");
|
|
2261
|
-
}, [e]),
|
|
2271
|
+
}, [e]), a(() => {
|
|
2262
2272
|
let e = y.current;
|
|
2263
2273
|
if (!e) return;
|
|
2264
2274
|
let t = () => r?.(e.value);
|
|
2265
2275
|
return e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
2266
|
-
}, [r]),
|
|
2276
|
+
}, [r]), a(() => {
|
|
2267
2277
|
let e = y.current;
|
|
2268
2278
|
if (!e || !b) return;
|
|
2269
2279
|
let t = !1, n = async (n) => {
|
|
@@ -2284,14 +2294,14 @@ function ve({ value: e, onChange: r, options: a, loadOptions: o, placeholder: c
|
|
|
2284
2294
|
p && /* @__PURE__ */ n("label", {
|
|
2285
2295
|
className: "label",
|
|
2286
2296
|
htmlFor: f,
|
|
2287
|
-
children: [p, g && /* @__PURE__ */ t(
|
|
2297
|
+
children: [p, g && /* @__PURE__ */ t(X, {})]
|
|
2288
2298
|
}),
|
|
2289
2299
|
/* @__PURE__ */ t("wui-autocomplete", {
|
|
2290
2300
|
"aria-label": typeof p == "string" ? p : void 0,
|
|
2291
2301
|
id: f,
|
|
2292
2302
|
ref: y,
|
|
2293
2303
|
name: f,
|
|
2294
|
-
placeholder:
|
|
2304
|
+
placeholder: s,
|
|
2295
2305
|
remote: b ? "" : void 0,
|
|
2296
2306
|
"min-chars": l == null ? void 0 : String(l),
|
|
2297
2307
|
debounce: u == null ? void 0 : String(u),
|
|
@@ -2317,7 +2327,7 @@ function ye(e) {
|
|
|
2317
2327
|
return n.length === 1 ? n[0].slice(0, 2).toUpperCase() : (n[0][0] + n[n.length - 1][0]).toUpperCase();
|
|
2318
2328
|
}
|
|
2319
2329
|
function be({ name: e, src: n, className: r = "", ...i }) {
|
|
2320
|
-
|
|
2330
|
+
T("AppAvatar", i);
|
|
2321
2331
|
let a = ["avatar", r].filter(Boolean).join(" ");
|
|
2322
2332
|
return n ? /* @__PURE__ */ t("span", {
|
|
2323
2333
|
className: a,
|
|
@@ -2336,7 +2346,7 @@ function be({ name: e, src: n, className: r = "", ...i }) {
|
|
|
2336
2346
|
//#endregion
|
|
2337
2347
|
//#region src/components/AppBadge.jsx
|
|
2338
2348
|
function xe({ children: e, tone: n, dot: r = !1, className: i = "", ...a }) {
|
|
2339
|
-
return
|
|
2349
|
+
return T("AppBadge", a), /* @__PURE__ */ t(d, {
|
|
2340
2350
|
bg: !1,
|
|
2341
2351
|
className: [
|
|
2342
2352
|
n ? `badge-${n}` : "",
|
|
@@ -2359,7 +2369,7 @@ var Se = {
|
|
|
2359
2369
|
function Ce(e, n) {
|
|
2360
2370
|
if (!e) return null;
|
|
2361
2371
|
let r = n === "left" ? "me-2" : "ms-2";
|
|
2362
|
-
return typeof e == "string" ? /* @__PURE__ */ t(
|
|
2372
|
+
return typeof e == "string" ? /* @__PURE__ */ t(O, {
|
|
2363
2373
|
name: e,
|
|
2364
2374
|
size: 16,
|
|
2365
2375
|
className: r
|
|
@@ -2368,10 +2378,10 @@ function Ce(e, n) {
|
|
|
2368
2378
|
children: e
|
|
2369
2379
|
});
|
|
2370
2380
|
}
|
|
2371
|
-
function
|
|
2372
|
-
|
|
2373
|
-
let m = [c ? "w-100" : "",
|
|
2374
|
-
return /* @__PURE__ */ n(
|
|
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, {
|
|
2375
2385
|
type: (p.as === void 0 || p.as === "button") && p.href === void 0 ? a : void 0,
|
|
2376
2386
|
variant: Se[r] ?? "primary",
|
|
2377
2387
|
size: i === "md" ? void 0 : i,
|
|
@@ -2392,11 +2402,11 @@ function X({ children: e, variant: r = "primary", size: i = "md", type: a = "but
|
|
|
2392
2402
|
//#endregion
|
|
2393
2403
|
//#region src/components/AppCallout.jsx
|
|
2394
2404
|
function we({ children: e, icon: r = "info", className: i = "", ...a }) {
|
|
2395
|
-
return
|
|
2405
|
+
return T("AppCallout", a), /* @__PURE__ */ n("div", {
|
|
2396
2406
|
className: `info-callout${i ? ` ${i}` : ""}`,
|
|
2397
2407
|
children: [r && /* @__PURE__ */ t("span", {
|
|
2398
2408
|
className: "info-callout-icon",
|
|
2399
|
-
children: /* @__PURE__ */ t(
|
|
2409
|
+
children: /* @__PURE__ */ t(O, {
|
|
2400
2410
|
name: r,
|
|
2401
2411
|
size: 18
|
|
2402
2412
|
})
|
|
@@ -2405,16 +2415,16 @@ function we({ children: e, icon: r = "info", className: i = "", ...a }) {
|
|
|
2405
2415
|
}
|
|
2406
2416
|
//#endregion
|
|
2407
2417
|
//#region src/components/AppCard.jsx
|
|
2408
|
-
function Te({ title: r, titleClassName: i = "", header: a, headerExtra: o, headerActions: s, children: c, className: l = "", bodyClassName: u = "", headerClassName: d = "", body:
|
|
2409
|
-
|
|
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);
|
|
2410
2420
|
let g = a != null || r != null || o != null || s != null;
|
|
2411
|
-
return /* @__PURE__ */ n(
|
|
2421
|
+
return /* @__PURE__ */ n(p, {
|
|
2412
2422
|
className: [m ? "card-lifted" : "", l].filter(Boolean).join(" ") || void 0,
|
|
2413
2423
|
...h,
|
|
2414
|
-
children: [g && /* @__PURE__ */ t(
|
|
2424
|
+
children: [g && /* @__PURE__ */ t(p.Header, {
|
|
2415
2425
|
className: d || void 0,
|
|
2416
2426
|
children: a ?? /* @__PURE__ */ n(e, { children: [
|
|
2417
|
-
r != null && /* @__PURE__ */ t(
|
|
2427
|
+
r != null && /* @__PURE__ */ t(p.Title, {
|
|
2418
2428
|
as: "div",
|
|
2419
2429
|
className: i || void 0,
|
|
2420
2430
|
children: r
|
|
@@ -2422,7 +2432,7 @@ function Te({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
|
|
|
2422
2432
|
o,
|
|
2423
2433
|
s
|
|
2424
2434
|
] })
|
|
2425
|
-
}),
|
|
2435
|
+
}), f ? /* @__PURE__ */ t(p.Body, {
|
|
2426
2436
|
className: u || void 0,
|
|
2427
2437
|
children: c
|
|
2428
2438
|
}) : c]
|
|
@@ -2430,11 +2440,11 @@ function Te({ title: r, titleClassName: i = "", header: a, headerExtra: o, heade
|
|
|
2430
2440
|
}
|
|
2431
2441
|
//#endregion
|
|
2432
2442
|
//#region src/components/AppCheckbox.jsx
|
|
2433
|
-
var Ee = r(function({ label: e, id: r, name: i, className:
|
|
2434
|
-
|
|
2435
|
-
let l =
|
|
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;
|
|
2436
2446
|
return /* @__PURE__ */ n("div", {
|
|
2437
|
-
className: `form-check${
|
|
2447
|
+
className: `form-check${a ? ` ${a}` : ""}`,
|
|
2438
2448
|
children: [/* @__PURE__ */ t("input", {
|
|
2439
2449
|
type: "checkbox",
|
|
2440
2450
|
className: "form-check-input",
|
|
@@ -2452,7 +2462,7 @@ var Ee = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
|
2452
2462
|
//#endregion
|
|
2453
2463
|
//#region src/components/AppChip.jsx
|
|
2454
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 }) {
|
|
2455
|
-
|
|
2465
|
+
T("AppChip", m);
|
|
2456
2466
|
let h = r ?? i, g = [
|
|
2457
2467
|
"chip",
|
|
2458
2468
|
a && a !== "neutral" ? a : "",
|
|
@@ -2469,7 +2479,7 @@ function De({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
2469
2479
|
}) : c
|
|
2470
2480
|
}) : s ? /* @__PURE__ */ t("span", {
|
|
2471
2481
|
className: "chip-ic",
|
|
2472
|
-
children: /* @__PURE__ */ t(
|
|
2482
|
+
children: /* @__PURE__ */ t(O, {
|
|
2473
2483
|
name: s,
|
|
2474
2484
|
size: o === "sm" ? 12 : 14
|
|
2475
2485
|
})
|
|
@@ -2494,7 +2504,7 @@ function De({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
2494
2504
|
onClick: l,
|
|
2495
2505
|
disabled: d,
|
|
2496
2506
|
"aria-label": f || (typeof h == "string" ? `Remove ${h}` : "Remove"),
|
|
2497
|
-
children: /* @__PURE__ */ t(
|
|
2507
|
+
children: /* @__PURE__ */ t(O, {
|
|
2498
2508
|
name: "x",
|
|
2499
2509
|
size: o === "sm" ? 12 : 14
|
|
2500
2510
|
})
|
|
@@ -2504,7 +2514,7 @@ function De({ label: r, children: i, tone: a = "neutral", size: o = "md", leadin
|
|
|
2504
2514
|
//#endregion
|
|
2505
2515
|
//#region src/components/AppChoiceCard.jsx
|
|
2506
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 }) {
|
|
2507
|
-
return
|
|
2517
|
+
return T("AppChoiceCard", y), /* @__PURE__ */ n("label", {
|
|
2508
2518
|
className: `struct-card${d ? " struct-card-img-card" : ""}${o ? " checked" : ""}${v ? ` ${v}` : ""}`,
|
|
2509
2519
|
children: [
|
|
2510
2520
|
/* @__PURE__ */ t("input", {
|
|
@@ -2524,7 +2534,7 @@ function Oe({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2524
2534
|
})
|
|
2525
2535
|
}) : l || c ? /* @__PURE__ */ t("span", {
|
|
2526
2536
|
className: "struct-card-ic",
|
|
2527
|
-
children: l || /* @__PURE__ */ t(
|
|
2537
|
+
children: l || /* @__PURE__ */ t(O, {
|
|
2528
2538
|
name: c,
|
|
2529
2539
|
size: u
|
|
2530
2540
|
})
|
|
@@ -2541,7 +2551,7 @@ function Oe({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2541
2551
|
}),
|
|
2542
2552
|
/* @__PURE__ */ t("span", {
|
|
2543
2553
|
className: "struct-card-check",
|
|
2544
|
-
children: /* @__PURE__ */ t(
|
|
2554
|
+
children: /* @__PURE__ */ t(O, {
|
|
2545
2555
|
name: g,
|
|
2546
2556
|
size: _
|
|
2547
2557
|
})
|
|
@@ -2552,7 +2562,7 @@ function Oe({ name: r, multiple: i = !1, value: a, checked: o, onChange: s, icon
|
|
|
2552
2562
|
//#endregion
|
|
2553
2563
|
//#region src/components/AppChoiceChip.jsx
|
|
2554
2564
|
function ke({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChange: s, children: c, count: l, className: u = "", ...d }) {
|
|
2555
|
-
return
|
|
2565
|
+
return T("AppChoiceChip", d), /* @__PURE__ */ n("label", {
|
|
2556
2566
|
className: `choice-chip${o ? " checked" : ""}${u ? ` ${u}` : ""}`,
|
|
2557
2567
|
children: [
|
|
2558
2568
|
/* @__PURE__ */ t("input", {
|
|
@@ -2573,7 +2583,7 @@ function ke({ multiple: e = !0, label: r, name: i, value: a, checked: o, onChang
|
|
|
2573
2583
|
//#endregion
|
|
2574
2584
|
//#region src/components/AppColorField.jsx
|
|
2575
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 }) {
|
|
2576
|
-
|
|
2586
|
+
T("AppColorField", f);
|
|
2577
2587
|
let p = l || c;
|
|
2578
2588
|
return /* @__PURE__ */ n("div", {
|
|
2579
2589
|
className: `field${d ? ` ${d}` : ""}`,
|
|
@@ -2581,7 +2591,7 @@ function Ae({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
|
|
|
2581
2591
|
i && /* @__PURE__ */ n("label", {
|
|
2582
2592
|
className: "label",
|
|
2583
2593
|
htmlFor: p,
|
|
2584
|
-
children: [i, a && /* @__PURE__ */ t(
|
|
2594
|
+
children: [i, a && /* @__PURE__ */ t(X, {})]
|
|
2585
2595
|
}),
|
|
2586
2596
|
/* @__PURE__ */ n("div", {
|
|
2587
2597
|
className: "color-field",
|
|
@@ -2621,10 +2631,10 @@ function Ae({ value: e = "#000000", onChange: r, label: i, required: a = !1, err
|
|
|
2621
2631
|
//#endregion
|
|
2622
2632
|
//#region src/components/AppCompareTable.jsx
|
|
2623
2633
|
function je({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o }) {
|
|
2624
|
-
|
|
2634
|
+
T("AppCompareTable", o);
|
|
2625
2635
|
let s = (e) => e === !0 ? /* @__PURE__ */ t("span", {
|
|
2626
2636
|
className: "compare-yes",
|
|
2627
|
-
children: /* @__PURE__ */ t(
|
|
2637
|
+
children: /* @__PURE__ */ t(O, {
|
|
2628
2638
|
name: "check",
|
|
2629
2639
|
size: 16
|
|
2630
2640
|
})
|
|
@@ -2656,19 +2666,19 @@ function je({ columns: e = [], rows: r = [], caption: i, className: a = "", ...o
|
|
|
2656
2666
|
}
|
|
2657
2667
|
//#endregion
|
|
2658
2668
|
//#region src/components/AppInfoTip.jsx
|
|
2659
|
-
function
|
|
2660
|
-
|
|
2661
|
-
let [
|
|
2662
|
-
return
|
|
2663
|
-
if (!
|
|
2664
|
-
let e = p.current.getBoundingClientRect(), t =
|
|
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;
|
|
2665
2675
|
r = Math.max(8, Math.min(r, window.innerWidth - t - 8));
|
|
2666
2676
|
let i = e.top - n - 8;
|
|
2667
2677
|
i < 8 && (i = e.bottom + 8), f({
|
|
2668
2678
|
top: i,
|
|
2669
2679
|
left: r
|
|
2670
2680
|
});
|
|
2671
|
-
}, [
|
|
2681
|
+
}, [a]), r ? /* @__PURE__ */ n("span", {
|
|
2672
2682
|
className: "infotip",
|
|
2673
2683
|
onMouseLeave: () => u(!1),
|
|
2674
2684
|
children: [/* @__PURE__ */ t("button", {
|
|
@@ -2676,18 +2686,18 @@ function Z({ label: e, children: r, ...i }) {
|
|
|
2676
2686
|
ref: p,
|
|
2677
2687
|
className: "infotip-btn",
|
|
2678
2688
|
"aria-label": e,
|
|
2679
|
-
"aria-expanded":
|
|
2680
|
-
"aria-describedby":
|
|
2689
|
+
"aria-expanded": a,
|
|
2690
|
+
"aria-describedby": a ? g : void 0,
|
|
2681
2691
|
onMouseEnter: () => u(!0),
|
|
2682
2692
|
onClick: () => u((e) => !e),
|
|
2683
2693
|
onFocus: () => u(!0),
|
|
2684
2694
|
onBlur: () => u(!1),
|
|
2685
|
-
children: /* @__PURE__ */ t(
|
|
2695
|
+
children: /* @__PURE__ */ t(O, {
|
|
2686
2696
|
name: "info",
|
|
2687
2697
|
size: 16
|
|
2688
2698
|
})
|
|
2689
|
-
}),
|
|
2690
|
-
ref:
|
|
2699
|
+
}), a && h(/* @__PURE__ */ t("span", {
|
|
2700
|
+
ref: m,
|
|
2691
2701
|
className: "infotip-pop is-portal",
|
|
2692
2702
|
role: "tooltip",
|
|
2693
2703
|
id: g,
|
|
@@ -2703,96 +2713,138 @@ function Z({ label: e, children: r, ...i }) {
|
|
|
2703
2713
|
}
|
|
2704
2714
|
//#endregion
|
|
2705
2715
|
//#region src/components/AppInput.jsx
|
|
2706
|
-
var Me = r(function({ label: e, required: r = !1, error: i, hint: a, help: o, helpLabel: s = "More information", type:
|
|
2707
|
-
|
|
2708
|
-
let [
|
|
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 = [
|
|
2709
2739
|
"input",
|
|
2740
|
+
d === "sm" ? "input-sm" : "",
|
|
2741
|
+
d === "lg" ? "input-lg" : "",
|
|
2710
2742
|
i ? "error" : "",
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
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,
|
|
2720
2753
|
required: r,
|
|
2721
2754
|
"aria-invalid": i ? "true" : "false",
|
|
2722
|
-
|
|
2723
|
-
...
|
|
2724
|
-
|
|
2725
|
-
|
|
2755
|
+
maxLength: w,
|
|
2756
|
+
...E,
|
|
2757
|
+
ref: P,
|
|
2758
|
+
onInput: B ? ne : E.onInput
|
|
2759
|
+
}), U;
|
|
2760
|
+
return U = g ? /* @__PURE__ */ n("div", {
|
|
2726
2761
|
className: "input-with-unit",
|
|
2727
|
-
children: [
|
|
2762
|
+
children: [H, /* @__PURE__ */ t("span", {
|
|
2728
2763
|
className: "unit",
|
|
2729
|
-
children:
|
|
2764
|
+
children: g
|
|
2730
2765
|
})]
|
|
2731
|
-
}) :
|
|
2766
|
+
}) : M ? /* @__PURE__ */ n("div", {
|
|
2732
2767
|
className: "input-wrap",
|
|
2733
|
-
children: [
|
|
2768
|
+
children: [H, /* @__PURE__ */ t("button", {
|
|
2734
2769
|
type: "button",
|
|
2735
2770
|
className: "pw-toggle",
|
|
2736
|
-
onClick: () =>
|
|
2737
|
-
"aria-label":
|
|
2771
|
+
onClick: () => A((e) => !e),
|
|
2772
|
+
"aria-label": k ? "Hide password" : "Show password",
|
|
2738
2773
|
tabIndex: -1,
|
|
2739
|
-
children: /* @__PURE__ */ t(
|
|
2740
|
-
name:
|
|
2774
|
+
children: /* @__PURE__ */ t(O, {
|
|
2775
|
+
name: k ? "eye-off" : "eye",
|
|
2741
2776
|
size: 18
|
|
2742
2777
|
})
|
|
2743
2778
|
})]
|
|
2744
|
-
}) :
|
|
2779
|
+
}) : p ? /* @__PURE__ */ n("div", {
|
|
2745
2780
|
className: "input-wrap",
|
|
2746
|
-
children: [
|
|
2781
|
+
children: [H, /* @__PURE__ */ t("button", {
|
|
2747
2782
|
type: "button",
|
|
2748
2783
|
className: "pw-toggle",
|
|
2749
|
-
onClick:
|
|
2750
|
-
disabled: !
|
|
2784
|
+
onClick: h,
|
|
2785
|
+
disabled: !h,
|
|
2751
2786
|
tabIndex: -1,
|
|
2752
|
-
children: /* @__PURE__ */ t(
|
|
2753
|
-
name:
|
|
2787
|
+
children: /* @__PURE__ */ t(O, {
|
|
2788
|
+
name: p,
|
|
2754
2789
|
size: 18
|
|
2755
2790
|
})
|
|
2756
2791
|
})]
|
|
2757
|
-
}) :
|
|
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", {
|
|
2758
2806
|
className: "input-icon",
|
|
2759
2807
|
children: [/* @__PURE__ */ t("span", {
|
|
2760
2808
|
className: "ic",
|
|
2761
|
-
children: /* @__PURE__ */ t(
|
|
2762
|
-
name:
|
|
2809
|
+
children: /* @__PURE__ */ t(O, {
|
|
2810
|
+
name: f,
|
|
2763
2811
|
size: 16
|
|
2764
2812
|
})
|
|
2765
|
-
}),
|
|
2766
|
-
}) :
|
|
2767
|
-
className: `field${
|
|
2813
|
+
}), H]
|
|
2814
|
+
}) : H, /* @__PURE__ */ n(m.Group, {
|
|
2815
|
+
className: `field${b ? ` ${b}` : ""}`,
|
|
2768
2816
|
children: [
|
|
2769
|
-
e && /* @__PURE__ */ n(
|
|
2817
|
+
e && /* @__PURE__ */ n(m.Label, {
|
|
2770
2818
|
className: "label",
|
|
2771
|
-
htmlFor:
|
|
2819
|
+
htmlFor: j,
|
|
2772
2820
|
children: [
|
|
2773
2821
|
e,
|
|
2774
|
-
r && /* @__PURE__ */ t(
|
|
2775
|
-
o && /* @__PURE__ */ t(
|
|
2822
|
+
r && /* @__PURE__ */ t(X, {}),
|
|
2823
|
+
o && /* @__PURE__ */ t(Q, {
|
|
2776
2824
|
label: s,
|
|
2777
2825
|
children: o
|
|
2778
2826
|
})
|
|
2779
2827
|
]
|
|
2780
2828
|
}),
|
|
2781
|
-
|
|
2829
|
+
U,
|
|
2782
2830
|
i ? /* @__PURE__ */ t("div", {
|
|
2783
2831
|
className: "field-error",
|
|
2784
2832
|
children: i
|
|
2785
2833
|
}) : a ? /* @__PURE__ */ t("div", {
|
|
2786
2834
|
className: "field-hint",
|
|
2787
2835
|
children: a
|
|
2788
|
-
}) : null
|
|
2836
|
+
}) : null,
|
|
2837
|
+
C && /* @__PURE__ */ n("div", {
|
|
2838
|
+
className: `field-count${w && te >= w ? " at-limit" : ""}`,
|
|
2839
|
+
children: [te, w ? ` / ${w}` : ""]
|
|
2840
|
+
})
|
|
2789
2841
|
]
|
|
2790
2842
|
});
|
|
2791
2843
|
}), Ne = "a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"])";
|
|
2792
|
-
function Pe({ open: e, title: r, subtitle:
|
|
2793
|
-
|
|
2794
|
-
let y =
|
|
2795
|
-
|
|
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(() => {
|
|
2796
2848
|
if (!e) return;
|
|
2797
2849
|
let t = y.current?.closest(".modal-content");
|
|
2798
2850
|
if (!t) return;
|
|
@@ -2803,11 +2855,11 @@ function Pe({ open: e, title: r, subtitle: a, headerIcon: o, onClose: c, footer:
|
|
|
2803
2855
|
"lx-modal",
|
|
2804
2856
|
d ? "lx-modal-wide" : "",
|
|
2805
2857
|
f ? "lx-modal-side" : "",
|
|
2806
|
-
|
|
2858
|
+
h
|
|
2807
2859
|
].filter(Boolean).join(" ");
|
|
2808
|
-
return /* @__PURE__ */ n(
|
|
2860
|
+
return /* @__PURE__ */ n(g, {
|
|
2809
2861
|
show: e,
|
|
2810
|
-
onHide:
|
|
2862
|
+
onHide: s,
|
|
2811
2863
|
animation: !1,
|
|
2812
2864
|
backdrop: !0,
|
|
2813
2865
|
keyboard: !0,
|
|
@@ -2829,7 +2881,7 @@ function Pe({ open: e, title: r, subtitle: a, headerIcon: o, onClose: c, footer:
|
|
|
2829
2881
|
className: "lx-modal-heading",
|
|
2830
2882
|
children: [o && /* @__PURE__ */ t("span", {
|
|
2831
2883
|
className: "lx-modal-headicon",
|
|
2832
|
-
children: /* @__PURE__ */ t(
|
|
2884
|
+
children: /* @__PURE__ */ t(O, {
|
|
2833
2885
|
name: o,
|
|
2834
2886
|
size: 18
|
|
2835
2887
|
})
|
|
@@ -2838,15 +2890,15 @@ function Pe({ open: e, title: r, subtitle: a, headerIcon: o, onClose: c, footer:
|
|
|
2838
2890
|
children: [/* @__PURE__ */ t("div", {
|
|
2839
2891
|
className: "lx-modal-title",
|
|
2840
2892
|
children: r
|
|
2841
|
-
}),
|
|
2893
|
+
}), i && /* @__PURE__ */ t("div", {
|
|
2842
2894
|
className: "lx-modal-subtitle",
|
|
2843
|
-
children:
|
|
2895
|
+
children: i
|
|
2844
2896
|
})]
|
|
2845
2897
|
})]
|
|
2846
2898
|
}), /* @__PURE__ */ t("button", {
|
|
2847
2899
|
type: "button",
|
|
2848
2900
|
className: "lx-modal-close",
|
|
2849
|
-
onClick:
|
|
2901
|
+
onClick: s,
|
|
2850
2902
|
"aria-label": "Close",
|
|
2851
2903
|
children: /* @__PURE__ */ t("svg", {
|
|
2852
2904
|
width: "18",
|
|
@@ -2876,40 +2928,40 @@ function Pe({ open: e, title: r, subtitle: a, headerIcon: o, onClose: c, footer:
|
|
|
2876
2928
|
}
|
|
2877
2929
|
//#endregion
|
|
2878
2930
|
//#region src/components/ModalIcons.jsx
|
|
2879
|
-
var
|
|
2931
|
+
var $ = (e) => function({ size: n = 72 }) {
|
|
2880
2932
|
return /* @__PURE__ */ t("wui-status-icon", {
|
|
2881
2933
|
tone: e,
|
|
2882
2934
|
size: n
|
|
2883
2935
|
});
|
|
2884
2936
|
}, Fe = {
|
|
2885
|
-
success:
|
|
2886
|
-
error:
|
|
2887
|
-
warning:
|
|
2888
|
-
info:
|
|
2889
|
-
delete:
|
|
2937
|
+
success: $("success"),
|
|
2938
|
+
error: $("error"),
|
|
2939
|
+
warning: $("warning"),
|
|
2940
|
+
info: $("info"),
|
|
2941
|
+
delete: $("delete")
|
|
2890
2942
|
};
|
|
2891
2943
|
//#endregion
|
|
2892
2944
|
//#region src/components/AppConfirmDialog.jsx
|
|
2893
|
-
function Ie({ open: r, title:
|
|
2894
|
-
|
|
2895
|
-
let [g, _] =
|
|
2896
|
-
if (
|
|
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(() => {
|
|
2897
2949
|
r || _("");
|
|
2898
2950
|
}, [r]), !r) return null;
|
|
2899
2951
|
let v = !!f && g.trim() !== f, y = Fe[d || (u ? "delete" : "info")];
|
|
2900
2952
|
return /* @__PURE__ */ t(Pe, {
|
|
2901
2953
|
open: r,
|
|
2902
2954
|
hideHeader: !0,
|
|
2903
|
-
title:
|
|
2955
|
+
title: i,
|
|
2904
2956
|
onClose: m,
|
|
2905
2957
|
className: "lx-confirm",
|
|
2906
2958
|
footer: /* @__PURE__ */ n("div", {
|
|
2907
2959
|
className: "lx-confirm-actions",
|
|
2908
|
-
children: [/* @__PURE__ */ t(
|
|
2960
|
+
children: [/* @__PURE__ */ t(Z, {
|
|
2909
2961
|
variant: "secondary",
|
|
2910
2962
|
onClick: m,
|
|
2911
|
-
children:
|
|
2912
|
-
}), /* @__PURE__ */ t(
|
|
2963
|
+
children: c
|
|
2964
|
+
}), /* @__PURE__ */ t(Z, {
|
|
2913
2965
|
variant: u ? "danger" : "primary",
|
|
2914
2966
|
disabled: v,
|
|
2915
2967
|
onClick: p,
|
|
@@ -2927,7 +2979,7 @@ function Ie({ open: r, title: a, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
2927
2979
|
className: "lx-confirm-title",
|
|
2928
2980
|
tabIndex: -1,
|
|
2929
2981
|
"data-autofocus": !0,
|
|
2930
|
-
children:
|
|
2982
|
+
children: i
|
|
2931
2983
|
}),
|
|
2932
2984
|
o && /* @__PURE__ */ t("p", {
|
|
2933
2985
|
className: "lx-confirm-msg",
|
|
@@ -2951,7 +3003,7 @@ function Ie({ open: r, title: a, message: o, confirmLabel: s = "Confirm", cancel
|
|
|
2951
3003
|
//#endregion
|
|
2952
3004
|
//#region src/components/AppSkeleton.jsx
|
|
2953
3005
|
function Le({ width: e = "100%", height: n = 14, radius: r = 6, className: i = "", style: a, ...o }) {
|
|
2954
|
-
return
|
|
3006
|
+
return T("AppSkeleton", o), /* @__PURE__ */ t("span", {
|
|
2955
3007
|
className: `skeleton${i ? ` ${i}` : ""}`,
|
|
2956
3008
|
"aria-hidden": "true",
|
|
2957
3009
|
style: {
|
|
@@ -2989,18 +3041,18 @@ function Be({ rows: e = 4, cols: n = 5 }) {
|
|
|
2989
3041
|
}
|
|
2990
3042
|
//#endregion
|
|
2991
3043
|
//#region src/components/AppSelectMini.jsx
|
|
2992
|
-
function Ve({ value: e, onChange: n, options: r = [], placeholder:
|
|
2993
|
-
|
|
2994
|
-
let p =
|
|
2995
|
-
return
|
|
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(() => {
|
|
2996
3048
|
p.current && (p.current.options = r.map((e) => ({
|
|
2997
3049
|
value: e.value,
|
|
2998
3050
|
label: e.label ?? e.text ?? ""
|
|
2999
3051
|
})));
|
|
3000
|
-
}, [r]),
|
|
3052
|
+
}, [r]), a(() => {
|
|
3001
3053
|
let t = p.current;
|
|
3002
3054
|
t && String(t.value ?? "") !== String(e ?? "") && (t.value = e ?? "");
|
|
3003
|
-
}, [e]),
|
|
3055
|
+
}, [e]), a(() => {
|
|
3004
3056
|
let e = p.current;
|
|
3005
3057
|
if (!e) return;
|
|
3006
3058
|
let t = () => n?.(e.value);
|
|
@@ -3010,8 +3062,8 @@ function Ve({ value: e, onChange: n, options: r = [], placeholder: a = "Select..
|
|
|
3010
3062
|
name: o,
|
|
3011
3063
|
compact: "",
|
|
3012
3064
|
id: l,
|
|
3013
|
-
placeholder:
|
|
3014
|
-
"aria-label":
|
|
3065
|
+
placeholder: i,
|
|
3066
|
+
"aria-label": s,
|
|
3015
3067
|
disabled: u ? "" : void 0,
|
|
3016
3068
|
className: d
|
|
3017
3069
|
});
|
|
@@ -3025,7 +3077,7 @@ var He = [
|
|
|
3025
3077
|
50
|
|
3026
3078
|
];
|
|
3027
3079
|
function Ue({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRow: s, onPageChange: c, onPageSizeChange: l, pageSizes: u = He, ...d }) {
|
|
3028
|
-
return
|
|
3080
|
+
return T("AppTablePagination", d), /* @__PURE__ */ n("div", {
|
|
3029
3081
|
className: "table-pagination",
|
|
3030
3082
|
children: [
|
|
3031
3083
|
/* @__PURE__ */ n("span", {
|
|
@@ -3058,7 +3110,7 @@ function Ue({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
|
|
|
3058
3110
|
onClick: () => c(Math.max(1, e - 1)),
|
|
3059
3111
|
disabled: e <= 1,
|
|
3060
3112
|
"aria-label": "Previous page",
|
|
3061
|
-
children: /* @__PURE__ */ t(
|
|
3113
|
+
children: /* @__PURE__ */ t(O, {
|
|
3062
3114
|
name: "arrow-left",
|
|
3063
3115
|
size: 18
|
|
3064
3116
|
})
|
|
@@ -3068,7 +3120,7 @@ function Ue({ page: e, totalPages: r, pageSize: i, total: a, firstRow: o, lastRo
|
|
|
3068
3120
|
onClick: () => c(Math.min(r, e + 1)),
|
|
3069
3121
|
disabled: e >= r,
|
|
3070
3122
|
"aria-label": "Next page",
|
|
3071
|
-
children: /* @__PURE__ */ t(
|
|
3123
|
+
children: /* @__PURE__ */ t(O, {
|
|
3072
3124
|
name: "arrow-right",
|
|
3073
3125
|
size: 18
|
|
3074
3126
|
})
|
|
@@ -3086,9 +3138,9 @@ function Ge(e) {
|
|
|
3086
3138
|
return e == null || e === "" ? "—" : e;
|
|
3087
3139
|
}
|
|
3088
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 }) {
|
|
3089
|
-
|
|
3090
|
-
let C = Math.max(1, r.length + +!!p + +!!v),
|
|
3091
|
-
e && (e.indeterminate =
|
|
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);
|
|
3092
3144
|
}, A = d !== void 0 && f > 0 ? d : u;
|
|
3093
3145
|
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
|
|
3094
3146
|
className: "table-wrap",
|
|
@@ -3120,7 +3172,7 @@ function Ke({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3120
3172
|
} : void 0,
|
|
3121
3173
|
children: [e.label, r && /* @__PURE__ */ t("span", {
|
|
3122
3174
|
className: "sort-icon",
|
|
3123
|
-
children: /* @__PURE__ */ t(
|
|
3175
|
+
children: /* @__PURE__ */ t(O, {
|
|
3124
3176
|
name: "chevrons-up-down",
|
|
3125
3177
|
size: 14
|
|
3126
3178
|
})
|
|
@@ -3184,13 +3236,13 @@ function Ke({ columns: r, rows: i, rowKey: a = (e) => e.id, sort: o, onSort: s,
|
|
|
3184
3236
|
}
|
|
3185
3237
|
//#endregion
|
|
3186
3238
|
//#region src/components/AppDatePicker.jsx
|
|
3187
|
-
function qe({ value: e, onChange: r, label:
|
|
3188
|
-
|
|
3189
|
-
let b =
|
|
3190
|
-
|
|
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(() => {
|
|
3191
3243
|
let t = b.current;
|
|
3192
3244
|
t && t.value !== (e ?? "") && (t.value = e ?? "");
|
|
3193
|
-
}, [e]),
|
|
3245
|
+
}, [e]), a(() => {
|
|
3194
3246
|
let e = b.current;
|
|
3195
3247
|
if (!e) return;
|
|
3196
3248
|
let t = () => r?.(e.value);
|
|
@@ -3206,15 +3258,15 @@ function qe({ value: e, onChange: r, label: o, required: c = !1, hint: l, error:
|
|
|
3206
3258
|
"aria-label": _,
|
|
3207
3259
|
"aria-invalid": u ? "true" : void 0,
|
|
3208
3260
|
disabled: h ? "" : void 0,
|
|
3209
|
-
required:
|
|
3261
|
+
required: s ? "" : void 0
|
|
3210
3262
|
});
|
|
3211
|
-
return !
|
|
3263
|
+
return !i && !u && !l ? C : /* @__PURE__ */ n("div", {
|
|
3212
3264
|
className: `field${v ? ` ${v}` : ""}`,
|
|
3213
3265
|
children: [
|
|
3214
|
-
|
|
3266
|
+
i && /* @__PURE__ */ n("label", {
|
|
3215
3267
|
className: "label",
|
|
3216
3268
|
htmlFor: S,
|
|
3217
|
-
children: [
|
|
3269
|
+
children: [i, s && /* @__PURE__ */ t("span", {
|
|
3218
3270
|
className: "required",
|
|
3219
3271
|
"aria-hidden": "true",
|
|
3220
3272
|
children: "*"
|
|
@@ -3242,23 +3294,23 @@ var Je = r(function({ icon: e, iconSize: n = 20, btnClassName: r = "topbar-icon-
|
|
|
3242
3294
|
title: i,
|
|
3243
3295
|
"aria-label": o,
|
|
3244
3296
|
...c,
|
|
3245
|
-
children: /* @__PURE__ */ t(
|
|
3297
|
+
children: /* @__PURE__ */ t(O, {
|
|
3246
3298
|
name: e,
|
|
3247
3299
|
size: n
|
|
3248
3300
|
})
|
|
3249
3301
|
});
|
|
3250
3302
|
});
|
|
3251
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 }) {
|
|
3252
|
-
return
|
|
3304
|
+
return T("AppDropdown", d), /* @__PURE__ */ n(_, {
|
|
3253
3305
|
align: s,
|
|
3254
|
-
children: [/* @__PURE__ */ t(
|
|
3306
|
+
children: [/* @__PURE__ */ t(_.Toggle, {
|
|
3255
3307
|
as: Je,
|
|
3256
3308
|
icon: e,
|
|
3257
3309
|
iconSize: r,
|
|
3258
3310
|
btnClassName: i,
|
|
3259
3311
|
title: a,
|
|
3260
3312
|
"aria-label": o
|
|
3261
|
-
}), /* @__PURE__ */ t(
|
|
3313
|
+
}), /* @__PURE__ */ t(_.Menu, {
|
|
3262
3314
|
className: l,
|
|
3263
3315
|
renderOnMount: !0,
|
|
3264
3316
|
children: c.map((e) => {
|
|
@@ -3272,14 +3324,14 @@ function Ye({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
|
|
|
3272
3324
|
as: "button",
|
|
3273
3325
|
type: "button"
|
|
3274
3326
|
};
|
|
3275
|
-
return /* @__PURE__ */ n(
|
|
3327
|
+
return /* @__PURE__ */ n(_.Item, {
|
|
3276
3328
|
...r,
|
|
3277
3329
|
onClick: e.onClick,
|
|
3278
3330
|
className: e.danger ? "danger" : void 0,
|
|
3279
3331
|
children: [e.image ? /* @__PURE__ */ t("img", {
|
|
3280
3332
|
src: e.image,
|
|
3281
3333
|
alt: ""
|
|
3282
|
-
}) : e.icon && /* @__PURE__ */ t(
|
|
3334
|
+
}) : e.icon && /* @__PURE__ */ t(O, {
|
|
3283
3335
|
name: e.icon,
|
|
3284
3336
|
size: 16
|
|
3285
3337
|
}), e.label]
|
|
@@ -3291,7 +3343,7 @@ function Ye({ icon: e, iconSize: r, toggleClassName: i = "topbar-icon-btn", labe
|
|
|
3291
3343
|
//#endregion
|
|
3292
3344
|
//#region src/components/AppEmptyState.jsx
|
|
3293
3345
|
function Xe({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, action: s, className: c = "", style: l, ...u }) {
|
|
3294
|
-
return
|
|
3346
|
+
return T("AppEmptyState", u), /* @__PURE__ */ n("div", {
|
|
3295
3347
|
className: [
|
|
3296
3348
|
"empty-state",
|
|
3297
3349
|
i === "sm" ? "empty-state-sm" : "",
|
|
@@ -3301,7 +3353,7 @@ function Xe({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
|
|
|
3301
3353
|
children: [
|
|
3302
3354
|
e ? /* @__PURE__ */ t("div", {
|
|
3303
3355
|
className: "empty-state-icon",
|
|
3304
|
-
children: /* @__PURE__ */ t(
|
|
3356
|
+
children: /* @__PURE__ */ t(O, {
|
|
3305
3357
|
name: e,
|
|
3306
3358
|
size: r
|
|
3307
3359
|
})
|
|
@@ -3323,20 +3375,20 @@ function Xe({ icon: e, iconSize: r = 24, size: i = "md", title: a, text: o, acti
|
|
|
3323
3375
|
}
|
|
3324
3376
|
//#endregion
|
|
3325
3377
|
//#region src/components/AppFileAttachment.jsx
|
|
3326
|
-
function Ze({ label: r = "Attachment", value:
|
|
3327
|
-
|
|
3328
|
-
let g =
|
|
3329
|
-
|
|
3330
|
-
if (
|
|
3331
|
-
let e = URL.createObjectURL(
|
|
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);
|
|
3332
3384
|
return y(e), () => URL.revokeObjectURL(e);
|
|
3333
3385
|
}
|
|
3334
|
-
y(
|
|
3335
|
-
}, [
|
|
3386
|
+
y(i?.url || null);
|
|
3387
|
+
}, [i]);
|
|
3336
3388
|
function S(e) {
|
|
3337
3389
|
let t = e.target.files?.[0];
|
|
3338
3390
|
if (e.target.value = "", !t) return;
|
|
3339
|
-
let n =
|
|
3391
|
+
let n = J(t, {
|
|
3340
3392
|
accept: u,
|
|
3341
3393
|
maxSizeMb: d
|
|
3342
3394
|
});
|
|
@@ -3344,12 +3396,12 @@ function Ze({ label: r = "Attachment", value: o, name: s, onChange: l, accept: u
|
|
|
3344
3396
|
x(n);
|
|
3345
3397
|
return;
|
|
3346
3398
|
}
|
|
3347
|
-
x(""),
|
|
3399
|
+
x(""), c(t);
|
|
3348
3400
|
}
|
|
3349
3401
|
function C() {
|
|
3350
|
-
x(""),
|
|
3402
|
+
x(""), c(null);
|
|
3351
3403
|
}
|
|
3352
|
-
let
|
|
3404
|
+
let w = i instanceof File ? i.name : i?.name, E = i instanceof File ? `${(i.size / 1024).toFixed(0)} KB` : null, D = p || b;
|
|
3353
3405
|
return /* @__PURE__ */ n("div", {
|
|
3354
3406
|
className: "field",
|
|
3355
3407
|
children: [
|
|
@@ -3361,19 +3413,19 @@ function Ze({ label: r = "Attachment", value: o, name: s, onChange: l, accept: u
|
|
|
3361
3413
|
children: " (optional)"
|
|
3362
3414
|
})]
|
|
3363
3415
|
}),
|
|
3364
|
-
|
|
3416
|
+
i ? /* @__PURE__ */ n("div", {
|
|
3365
3417
|
className: "attach-preview",
|
|
3366
3418
|
children: [/* @__PURE__ */ n("div", {
|
|
3367
3419
|
className: "attach-figure",
|
|
3368
3420
|
children: [/* @__PURE__ */ t("img", {
|
|
3369
3421
|
src: v,
|
|
3370
|
-
alt:
|
|
3422
|
+
alt: w
|
|
3371
3423
|
}), /* @__PURE__ */ t("button", {
|
|
3372
3424
|
type: "button",
|
|
3373
3425
|
className: "attach-remove",
|
|
3374
3426
|
"aria-label": "Remove attachment",
|
|
3375
3427
|
onClick: C,
|
|
3376
|
-
children: /* @__PURE__ */ t(
|
|
3428
|
+
children: /* @__PURE__ */ t(O, {
|
|
3377
3429
|
name: "x",
|
|
3378
3430
|
size: 18
|
|
3379
3431
|
})
|
|
@@ -3382,7 +3434,7 @@ function Ze({ label: r = "Attachment", value: o, name: s, onChange: l, accept: u
|
|
|
3382
3434
|
className: "attach-meta",
|
|
3383
3435
|
children: [/* @__PURE__ */ t("div", {
|
|
3384
3436
|
className: "attach-name",
|
|
3385
|
-
children:
|
|
3437
|
+
children: w
|
|
3386
3438
|
}), E && /* @__PURE__ */ t("div", {
|
|
3387
3439
|
className: "attach-size",
|
|
3388
3440
|
children: E
|
|
@@ -3394,7 +3446,7 @@ function Ze({ label: r = "Attachment", value: o, name: s, onChange: l, accept: u
|
|
|
3394
3446
|
children: [
|
|
3395
3447
|
/* @__PURE__ */ t("span", {
|
|
3396
3448
|
className: "attach-drop-icon",
|
|
3397
|
-
children: /* @__PURE__ */ t(
|
|
3449
|
+
children: /* @__PURE__ */ t(O, {
|
|
3398
3450
|
name: "image",
|
|
3399
3451
|
size: 18
|
|
3400
3452
|
})
|
|
@@ -3426,9 +3478,9 @@ function Ze({ label: r = "Attachment", value: o, name: s, onChange: l, accept: u
|
|
|
3426
3478
|
accept: u,
|
|
3427
3479
|
onChange: S
|
|
3428
3480
|
})] }),
|
|
3429
|
-
|
|
3481
|
+
D && /* @__PURE__ */ t("div", {
|
|
3430
3482
|
className: "field-error",
|
|
3431
|
-
children:
|
|
3483
|
+
children: D
|
|
3432
3484
|
})
|
|
3433
3485
|
]
|
|
3434
3486
|
});
|
|
@@ -3441,19 +3493,19 @@ var Qe = /* @__PURE__ */ new Set([
|
|
|
3441
3493
|
"warning",
|
|
3442
3494
|
"error"
|
|
3443
3495
|
]);
|
|
3444
|
-
function $(e, t = "success") {
|
|
3496
|
+
function $e(e, t = "success") {
|
|
3445
3497
|
let n = Qe.has(t) ? t : "success";
|
|
3446
|
-
|
|
3498
|
+
v[n](e, { toastId: `${n}:${e}` });
|
|
3447
3499
|
}
|
|
3448
|
-
function
|
|
3449
|
-
|
|
3500
|
+
function et(e) {
|
|
3501
|
+
v.error(e, { toastId: `error:${e}` });
|
|
3450
3502
|
}
|
|
3451
3503
|
//#endregion
|
|
3452
3504
|
//#region src/components/AppFilePicker.jsx
|
|
3453
|
-
function
|
|
3454
|
-
|
|
3455
|
-
let [h, g] =
|
|
3456
|
-
|
|
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(() => {
|
|
3457
3509
|
if (r instanceof File) {
|
|
3458
3510
|
let e = URL.createObjectURL(r);
|
|
3459
3511
|
return g(e), () => URL.revokeObjectURL(e);
|
|
@@ -3461,21 +3513,21 @@ function et({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3461
3513
|
g(null);
|
|
3462
3514
|
}, [r]);
|
|
3463
3515
|
let S = r?.url || h, C = (e) => {
|
|
3464
|
-
let t =
|
|
3516
|
+
let t = J(e, {
|
|
3465
3517
|
accept: u,
|
|
3466
3518
|
maxSizeMb: d
|
|
3467
3519
|
});
|
|
3468
|
-
return t ? ($(t, "error"), !1) : (
|
|
3469
|
-
},
|
|
3520
|
+
return t ? ($e(t, "error"), !1) : (s(e), !0);
|
|
3521
|
+
}, w = (e) => {
|
|
3470
3522
|
let t = e.target.files?.[0] || null;
|
|
3471
3523
|
t && (C(t) || (e.target.value = ""));
|
|
3472
3524
|
}, E = (e) => {
|
|
3473
3525
|
e.preventDefault(), v(!1);
|
|
3474
3526
|
let t = e.dataTransfer.files?.[0];
|
|
3475
3527
|
t && C(t);
|
|
3476
|
-
},
|
|
3528
|
+
}, D = () => y.current?.click(), k = /* @__PURE__ */ t("input", {
|
|
3477
3529
|
id: x,
|
|
3478
|
-
name:
|
|
3530
|
+
name: i,
|
|
3479
3531
|
ref: y,
|
|
3480
3532
|
type: "file",
|
|
3481
3533
|
accept: u,
|
|
@@ -3483,7 +3535,7 @@ function et({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3483
3535
|
onClick: (e) => {
|
|
3484
3536
|
e.currentTarget.value = "";
|
|
3485
3537
|
},
|
|
3486
|
-
onChange:
|
|
3538
|
+
onChange: w
|
|
3487
3539
|
});
|
|
3488
3540
|
return /* @__PURE__ */ n("div", {
|
|
3489
3541
|
className: "field",
|
|
@@ -3491,7 +3543,7 @@ function et({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3491
3543
|
/* @__PURE__ */ n("label", {
|
|
3492
3544
|
className: "label",
|
|
3493
3545
|
htmlFor: x,
|
|
3494
|
-
children: [e, f && /* @__PURE__ */ t(
|
|
3546
|
+
children: [e, f && /* @__PURE__ */ t(X, {})]
|
|
3495
3547
|
}),
|
|
3496
3548
|
S ? /* @__PURE__ */ n("div", {
|
|
3497
3549
|
className: `file-preview${p ? " error" : ""}`,
|
|
@@ -3500,7 +3552,7 @@ function et({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3500
3552
|
type: "button",
|
|
3501
3553
|
className: "file-preview-open",
|
|
3502
3554
|
"aria-label": `Change ${e}`,
|
|
3503
|
-
onClick:
|
|
3555
|
+
onClick: D,
|
|
3504
3556
|
children: [/* @__PURE__ */ t("img", {
|
|
3505
3557
|
src: S,
|
|
3506
3558
|
alt: `${e} preview`,
|
|
@@ -3509,7 +3561,7 @@ function et({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3509
3561
|
className: "file-preview-overlay",
|
|
3510
3562
|
children: /* @__PURE__ */ n("span", {
|
|
3511
3563
|
className: "file-preview-cta",
|
|
3512
|
-
children: [/* @__PURE__ */ t(
|
|
3564
|
+
children: [/* @__PURE__ */ t(O, {
|
|
3513
3565
|
name: "image",
|
|
3514
3566
|
size: 16
|
|
3515
3567
|
}), " Change image"]
|
|
@@ -3521,8 +3573,8 @@ function et({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3521
3573
|
className: "file-preview-remove",
|
|
3522
3574
|
"aria-label": `Remove ${e}`,
|
|
3523
3575
|
title: "Remove image",
|
|
3524
|
-
onClick: () =>
|
|
3525
|
-
children: /* @__PURE__ */ t(
|
|
3576
|
+
onClick: () => s(null),
|
|
3577
|
+
children: /* @__PURE__ */ t(O, {
|
|
3526
3578
|
name: "x",
|
|
3527
3579
|
size: 16
|
|
3528
3580
|
})
|
|
@@ -3544,7 +3596,7 @@ function et({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3544
3596
|
children: [
|
|
3545
3597
|
/* @__PURE__ */ t("span", {
|
|
3546
3598
|
className: "file-input-icon",
|
|
3547
|
-
children: /* @__PURE__ */ t(
|
|
3599
|
+
children: /* @__PURE__ */ t(O, {
|
|
3548
3600
|
name: "upload",
|
|
3549
3601
|
size: 24
|
|
3550
3602
|
})
|
|
@@ -3576,13 +3628,13 @@ function et({ label: e, value: r, name: o, onPick: l, accept: u = ".jpg,.jpeg,.p
|
|
|
3576
3628
|
}
|
|
3577
3629
|
//#endregion
|
|
3578
3630
|
//#region src/components/AppInfoList.jsx
|
|
3579
|
-
function
|
|
3580
|
-
return
|
|
3631
|
+
function nt({ items: r = [], className: i = "", ...a }) {
|
|
3632
|
+
return T("AppInfoList", a), /* @__PURE__ */ t("div", {
|
|
3581
3633
|
className: `info-list${i ? ` ${i}` : ""}`,
|
|
3582
3634
|
children: r.map((r, i) => {
|
|
3583
3635
|
let a = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
3584
3636
|
className: "info-icon",
|
|
3585
|
-
children: /* @__PURE__ */ t(
|
|
3637
|
+
children: /* @__PURE__ */ t(O, {
|
|
3586
3638
|
name: r.icon,
|
|
3587
3639
|
size: 16
|
|
3588
3640
|
})
|
|
@@ -3609,15 +3661,15 @@ function tt({ items: r = [], className: i = "", ...a }) {
|
|
|
3609
3661
|
}
|
|
3610
3662
|
//#endregion
|
|
3611
3663
|
//#region src/components/AppKpiTile.jsx
|
|
3612
|
-
function
|
|
3613
|
-
|
|
3664
|
+
function rt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat", inline: s = !1, className: c = "", ...l }) {
|
|
3665
|
+
T("AppKpiTile", l);
|
|
3614
3666
|
let u = `kpi${s ? " kpi-inline" : ""}${c ? ` ${c}` : ""}`, d = o === "up" ? "arrow-up" : o === "down" ? "arrow-down" : null;
|
|
3615
3667
|
return /* @__PURE__ */ n("div", {
|
|
3616
3668
|
className: u,
|
|
3617
3669
|
children: [
|
|
3618
3670
|
i && /* @__PURE__ */ t("span", {
|
|
3619
3671
|
className: "kpi-icon",
|
|
3620
|
-
children: /* @__PURE__ */ t(
|
|
3672
|
+
children: /* @__PURE__ */ t(O, {
|
|
3621
3673
|
name: i,
|
|
3622
3674
|
size: 20
|
|
3623
3675
|
})
|
|
@@ -3632,7 +3684,7 @@ function nt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
|
|
|
3632
3684
|
}),
|
|
3633
3685
|
a && /* @__PURE__ */ n("div", {
|
|
3634
3686
|
className: `kpi-delta${o === "flat" ? "" : ` ${o}`}`,
|
|
3635
|
-
children: [d && /* @__PURE__ */ t(
|
|
3687
|
+
children: [d && /* @__PURE__ */ t(O, {
|
|
3636
3688
|
name: d,
|
|
3637
3689
|
size: 13
|
|
3638
3690
|
}), a]
|
|
@@ -3642,16 +3694,16 @@ function nt({ label: e, value: r, icon: i, delta: a, deltaDirection: o = "flat",
|
|
|
3642
3694
|
}
|
|
3643
3695
|
//#endregion
|
|
3644
3696
|
//#region src/components/AppLogoPicker.jsx
|
|
3645
|
-
function
|
|
3646
|
-
|
|
3647
|
-
let h =
|
|
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);
|
|
3648
3700
|
return /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("button", {
|
|
3649
3701
|
type: "button",
|
|
3650
3702
|
className: "set-uploader",
|
|
3651
|
-
"aria-busy":
|
|
3652
|
-
disabled:
|
|
3703
|
+
"aria-busy": s || void 0,
|
|
3704
|
+
disabled: s,
|
|
3653
3705
|
onClick: () => {
|
|
3654
|
-
|
|
3706
|
+
s || h.current?.click();
|
|
3655
3707
|
},
|
|
3656
3708
|
"aria-label": p,
|
|
3657
3709
|
children: /* @__PURE__ */ n("span", {
|
|
@@ -3663,17 +3715,17 @@ function rt({ value: r, fallback: i, name: a, onPick: o, loading: c = !1, accept
|
|
|
3663
3715
|
}) : /* @__PURE__ */ t("span", {
|
|
3664
3716
|
className: "set-uploader-logo",
|
|
3665
3717
|
children: i
|
|
3666
|
-
}),
|
|
3718
|
+
}), s ? /* @__PURE__ */ t("span", {
|
|
3667
3719
|
className: "set-uploader-overlay is-loading",
|
|
3668
3720
|
"aria-hidden": "true",
|
|
3669
|
-
children: /* @__PURE__ */ t(
|
|
3721
|
+
children: /* @__PURE__ */ t(O, {
|
|
3670
3722
|
name: "refresh-cw",
|
|
3671
3723
|
size: 22,
|
|
3672
3724
|
className: "lx-spin"
|
|
3673
3725
|
})
|
|
3674
3726
|
}) : /* @__PURE__ */ n("span", {
|
|
3675
3727
|
className: "set-uploader-overlay",
|
|
3676
|
-
children: [/* @__PURE__ */ t(
|
|
3728
|
+
children: [/* @__PURE__ */ t(O, {
|
|
3677
3729
|
name: d,
|
|
3678
3730
|
size: 22
|
|
3679
3731
|
}), /* @__PURE__ */ t("span", { children: f })]
|
|
@@ -3688,33 +3740,33 @@ function rt({ value: r, fallback: i, name: a, onPick: o, loading: c = !1, accept
|
|
|
3688
3740
|
onChange: (e) => {
|
|
3689
3741
|
let t = e.target.files?.[0];
|
|
3690
3742
|
if (e.target.value = "", !t) return;
|
|
3691
|
-
let n =
|
|
3743
|
+
let n = J(t, {
|
|
3692
3744
|
accept: l,
|
|
3693
3745
|
maxSizeMb: u
|
|
3694
3746
|
});
|
|
3695
3747
|
if (n) {
|
|
3696
|
-
$(n, "error");
|
|
3748
|
+
$e(n, "error");
|
|
3697
3749
|
return;
|
|
3698
3750
|
}
|
|
3699
3751
|
o(t);
|
|
3700
3752
|
},
|
|
3701
|
-
disabled:
|
|
3753
|
+
disabled: s
|
|
3702
3754
|
})] });
|
|
3703
3755
|
}
|
|
3704
3756
|
//#endregion
|
|
3705
3757
|
//#region src/components/AppMultiSelect.jsx
|
|
3706
|
-
function
|
|
3707
|
-
|
|
3708
|
-
let v =
|
|
3709
|
-
return
|
|
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(() => {
|
|
3710
3762
|
let e = v.current;
|
|
3711
|
-
e && (e.options =
|
|
3712
|
-
}, [
|
|
3763
|
+
e && (e.options = i || []);
|
|
3764
|
+
}, [i]), a(() => {
|
|
3713
3765
|
let t = v.current;
|
|
3714
3766
|
if (!t) return;
|
|
3715
3767
|
let n = e || [], r = t.values || [];
|
|
3716
3768
|
n.join(",") !== r.join(",") && (t.values = n);
|
|
3717
|
-
}, [e]),
|
|
3769
|
+
}, [e]), a(() => {
|
|
3718
3770
|
let e = v.current;
|
|
3719
3771
|
if (!e) return;
|
|
3720
3772
|
let t = () => r?.(e.values);
|
|
@@ -3725,7 +3777,7 @@ function it({ values: e, onChange: r, options: a, placeholder: o = "Select…",
|
|
|
3725
3777
|
f && /* @__PURE__ */ n("label", {
|
|
3726
3778
|
className: "label",
|
|
3727
3779
|
htmlFor: d,
|
|
3728
|
-
children: [f, h && /* @__PURE__ */ t(
|
|
3780
|
+
children: [f, h && /* @__PURE__ */ t(X, {})]
|
|
3729
3781
|
}),
|
|
3730
3782
|
/* @__PURE__ */ t("wui-multiselect", {
|
|
3731
3783
|
"aria-label": typeof f == "string" ? f : void 0,
|
|
@@ -3733,7 +3785,7 @@ function it({ values: e, onChange: r, options: a, placeholder: o = "Select…",
|
|
|
3733
3785
|
ref: v,
|
|
3734
3786
|
name: d,
|
|
3735
3787
|
placeholder: o,
|
|
3736
|
-
"search-placeholder":
|
|
3788
|
+
"search-placeholder": s,
|
|
3737
3789
|
searchable: l ? "" : void 0,
|
|
3738
3790
|
disabled: u ? "" : void 0,
|
|
3739
3791
|
required: h ? "" : void 0
|
|
@@ -3750,8 +3802,8 @@ function it({ values: e, onChange: r, options: a, placeholder: o = "Select…",
|
|
|
3750
3802
|
}
|
|
3751
3803
|
//#endregion
|
|
3752
3804
|
//#region src/components/AppPageHeader.jsx
|
|
3753
|
-
function
|
|
3754
|
-
return
|
|
3805
|
+
function ot({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
|
|
3806
|
+
return T("AppPageHeader", o), /* @__PURE__ */ n("div", {
|
|
3755
3807
|
className: `page-header${i ? " d-flex align-items-end justify-content-between" : ""}${a ? ` ${a}` : ""}`,
|
|
3756
3808
|
children: [/* @__PURE__ */ n("div", { children: [/* @__PURE__ */ t("div", {
|
|
3757
3809
|
className: "page-title",
|
|
@@ -3767,13 +3819,13 @@ function at({ title: e, subtitle: r, actions: i, className: a = "", ...o }) {
|
|
|
3767
3819
|
}
|
|
3768
3820
|
//#endregion
|
|
3769
3821
|
//#region src/components/AppPhoneNumberInput.jsx
|
|
3770
|
-
function
|
|
3771
|
-
|
|
3772
|
-
let h =
|
|
3773
|
-
return
|
|
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(() => {
|
|
3774
3826
|
let t = h.current;
|
|
3775
3827
|
t && t.value !== (e ?? "") && (t.value = e ?? "");
|
|
3776
|
-
}, [e]),
|
|
3828
|
+
}, [e]), a(() => {
|
|
3777
3829
|
let e = h.current;
|
|
3778
3830
|
if (!e) return;
|
|
3779
3831
|
let t = () => r?.(e.value);
|
|
@@ -3783,13 +3835,13 @@ function ot({ value: e, onChange: r, country: a, disabled: o = !1, name: c, labe
|
|
|
3783
3835
|
children: [
|
|
3784
3836
|
l && /* @__PURE__ */ n("label", {
|
|
3785
3837
|
className: "label",
|
|
3786
|
-
htmlFor:
|
|
3787
|
-
children: [l, d && /* @__PURE__ */ t(
|
|
3838
|
+
htmlFor: s,
|
|
3839
|
+
children: [l, d && /* @__PURE__ */ t(X, {})]
|
|
3788
3840
|
}),
|
|
3789
3841
|
/* @__PURE__ */ t("wui-phone", {
|
|
3790
3842
|
ref: h,
|
|
3791
|
-
name:
|
|
3792
|
-
country:
|
|
3843
|
+
name: s,
|
|
3844
|
+
country: i,
|
|
3793
3845
|
placeholder: u,
|
|
3794
3846
|
disabled: o ? "" : void 0
|
|
3795
3847
|
}),
|
|
@@ -3802,8 +3854,8 @@ function ot({ value: e, onChange: r, country: a, disabled: o = !1, name: c, labe
|
|
|
3802
3854
|
}
|
|
3803
3855
|
//#endregion
|
|
3804
3856
|
//#region src/components/AppPricingCard.jsx
|
|
3805
|
-
function
|
|
3806
|
-
return
|
|
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", {
|
|
3807
3859
|
className: [
|
|
3808
3860
|
"plan-card",
|
|
3809
3861
|
c ? "featured" : "",
|
|
@@ -3838,7 +3890,7 @@ function st({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
|
|
|
3838
3890
|
className: r ? void 0 : "excluded",
|
|
3839
3891
|
children: [/* @__PURE__ */ t("span", {
|
|
3840
3892
|
className: "plan-feature-icon",
|
|
3841
|
-
children: /* @__PURE__ */ t(
|
|
3893
|
+
children: /* @__PURE__ */ t(O, {
|
|
3842
3894
|
name: r ? "check" : "x",
|
|
3843
3895
|
size: 16
|
|
3844
3896
|
})
|
|
@@ -3855,11 +3907,11 @@ function st({ name: e, price: r, unit: i, tagline: a, features: o = [], cta: s,
|
|
|
3855
3907
|
}
|
|
3856
3908
|
//#endregion
|
|
3857
3909
|
//#region src/components/AppRadio.jsx
|
|
3858
|
-
var
|
|
3859
|
-
|
|
3860
|
-
let l =
|
|
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;
|
|
3861
3913
|
return /* @__PURE__ */ n("div", {
|
|
3862
|
-
className: `form-check${
|
|
3914
|
+
className: `form-check${a ? ` ${a}` : ""}`,
|
|
3863
3915
|
children: [/* @__PURE__ */ t("input", {
|
|
3864
3916
|
type: "radio",
|
|
3865
3917
|
className: "form-check-input",
|
|
@@ -3876,8 +3928,8 @@ var ct = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
|
3876
3928
|
});
|
|
3877
3929
|
//#endregion
|
|
3878
3930
|
//#region src/components/AppRepeater.jsx
|
|
3879
|
-
function
|
|
3880
|
-
|
|
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);
|
|
3881
3933
|
let m = typeof u == "number" && e.length >= u, h = !!a && e.length > l;
|
|
3882
3934
|
return /* @__PURE__ */ n("div", {
|
|
3883
3935
|
className: `repeater${f ? ` ${f}` : ""}`,
|
|
@@ -3897,7 +3949,7 @@ function lt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
|
|
|
3897
3949
|
className: "repeater-body",
|
|
3898
3950
|
children: r(e, i)
|
|
3899
3951
|
}),
|
|
3900
|
-
h && /* @__PURE__ */ t(
|
|
3952
|
+
h && /* @__PURE__ */ t(k, {
|
|
3901
3953
|
icon: "trash-2",
|
|
3902
3954
|
label: `${s} ${i + 1}`,
|
|
3903
3955
|
danger: !0,
|
|
@@ -3906,7 +3958,7 @@ function lt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
|
|
|
3906
3958
|
})
|
|
3907
3959
|
]
|
|
3908
3960
|
}, e.id ?? i)),
|
|
3909
|
-
/* @__PURE__ */ t(
|
|
3961
|
+
/* @__PURE__ */ t(Z, {
|
|
3910
3962
|
variant: "secondary",
|
|
3911
3963
|
size: "sm",
|
|
3912
3964
|
leftIcon: "plus",
|
|
@@ -3920,11 +3972,11 @@ function lt({ rows: e = [], renderRow: r, onAdd: i, onRemove: a, addLabel: o = "
|
|
|
3920
3972
|
}
|
|
3921
3973
|
//#endregion
|
|
3922
3974
|
//#region src/components/AppResourceCard.jsx
|
|
3923
|
-
function
|
|
3924
|
-
|
|
3975
|
+
function dt({ icon: r, title: i, text: a, href: o, external: s = !1, linkComponent: c, className: l = "", ...u }) {
|
|
3976
|
+
T("AppResourceCard", u);
|
|
3925
3977
|
let d = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
3926
3978
|
className: "res-card-icon",
|
|
3927
|
-
children: /* @__PURE__ */ t(
|
|
3979
|
+
children: /* @__PURE__ */ t(O, {
|
|
3928
3980
|
name: r,
|
|
3929
3981
|
size: 18
|
|
3930
3982
|
})
|
|
@@ -3952,20 +4004,20 @@ function ut({ icon: r, title: i, text: a, href: o, external: s = !1, linkCompone
|
|
|
3952
4004
|
}
|
|
3953
4005
|
//#endregion
|
|
3954
4006
|
//#region src/components/AppSearch.jsx
|
|
3955
|
-
function
|
|
3956
|
-
return
|
|
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", {
|
|
3957
4009
|
className: [
|
|
3958
4010
|
"search-wrap",
|
|
3959
4011
|
e ? "has-value" : "",
|
|
3960
4012
|
s
|
|
3961
4013
|
].filter(Boolean).join(" "),
|
|
3962
4014
|
children: [
|
|
3963
|
-
/* @__PURE__ */ t(
|
|
4015
|
+
/* @__PURE__ */ t(O, {
|
|
3964
4016
|
name: "search",
|
|
3965
4017
|
size: o,
|
|
3966
4018
|
className: "search-icon"
|
|
3967
4019
|
}),
|
|
3968
|
-
/* @__PURE__ */ t(
|
|
4020
|
+
/* @__PURE__ */ t(m.Control, {
|
|
3969
4021
|
type: "search",
|
|
3970
4022
|
className: "input search-input",
|
|
3971
4023
|
placeholder: i,
|
|
@@ -3979,7 +4031,7 @@ function dt({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize
|
|
|
3979
4031
|
className: "search-clear",
|
|
3980
4032
|
"aria-label": "Clear search",
|
|
3981
4033
|
onClick: () => r(""),
|
|
3982
|
-
children: /* @__PURE__ */ t(
|
|
4034
|
+
children: /* @__PURE__ */ t(O, {
|
|
3983
4035
|
name: "x",
|
|
3984
4036
|
size: 16
|
|
3985
4037
|
})
|
|
@@ -3989,13 +4041,13 @@ function dt({ value: e, onValueChange: r, placeholder: i, ariaLabel: a, iconSize
|
|
|
3989
4041
|
}
|
|
3990
4042
|
//#endregion
|
|
3991
4043
|
//#region src/components/AppSegmented.jsx
|
|
3992
|
-
function
|
|
3993
|
-
|
|
3994
|
-
let d =
|
|
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;
|
|
3995
4047
|
return /* @__PURE__ */ t("div", {
|
|
3996
4048
|
className: `segmented${c === "sm" ? " segmented-sm" : ""}${l ? ` ${l}` : ""}`,
|
|
3997
4049
|
role: "radiogroup",
|
|
3998
|
-
"aria-label":
|
|
4050
|
+
"aria-label": a,
|
|
3999
4051
|
children: e.map((e) => /* @__PURE__ */ n("label", {
|
|
4000
4052
|
className: "segmented-option",
|
|
4001
4053
|
children: [
|
|
@@ -4007,7 +4059,7 @@ function ft({ options: e = [], value: r, onChange: i, label: o, name: s, size: c
|
|
|
4007
4059
|
checked: e.value === r,
|
|
4008
4060
|
onChange: () => i?.(e.value)
|
|
4009
4061
|
}),
|
|
4010
|
-
e.icon && /* @__PURE__ */ t(
|
|
4062
|
+
e.icon && /* @__PURE__ */ t(O, {
|
|
4011
4063
|
name: e.icon,
|
|
4012
4064
|
size: 13
|
|
4013
4065
|
}),
|
|
@@ -4018,19 +4070,19 @@ function ft({ options: e = [], value: r, onChange: i, label: o, name: s, size: c
|
|
|
4018
4070
|
}
|
|
4019
4071
|
//#endregion
|
|
4020
4072
|
//#region src/components/AppSelect.jsx
|
|
4021
|
-
var
|
|
4022
|
-
function
|
|
4023
|
-
|
|
4024
|
-
let x =
|
|
4025
|
-
|
|
4026
|
-
x.current && (x.current.options =
|
|
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) => ({
|
|
4027
4079
|
value: e.value,
|
|
4028
|
-
label:
|
|
4080
|
+
label: mt(e)
|
|
4029
4081
|
})));
|
|
4030
|
-
}, [
|
|
4082
|
+
}, [i]), a(() => {
|
|
4031
4083
|
let t = x.current;
|
|
4032
4084
|
t && String(t.value ?? "") !== String(e ?? "") && (t.value = e ?? "");
|
|
4033
|
-
}, [e]),
|
|
4085
|
+
}, [e]), a(() => {
|
|
4034
4086
|
let e = x.current;
|
|
4035
4087
|
if (!e) return;
|
|
4036
4088
|
let t = () => r?.(e.value);
|
|
@@ -4042,7 +4094,7 @@ function mt({ value: e, onChange: r, options: a = [], placeholder: o = "Select..
|
|
|
4042
4094
|
id: _ || v,
|
|
4043
4095
|
name: v,
|
|
4044
4096
|
placeholder: o,
|
|
4045
|
-
"search-placeholder":
|
|
4097
|
+
"search-placeholder": s,
|
|
4046
4098
|
searchable: l ? "" : void 0,
|
|
4047
4099
|
disabled: u ? "" : void 0,
|
|
4048
4100
|
required: f ? "" : void 0
|
|
@@ -4057,8 +4109,8 @@ function mt({ value: e, onChange: r, options: a = [], placeholder: o = "Select..
|
|
|
4057
4109
|
htmlFor: C,
|
|
4058
4110
|
children: [
|
|
4059
4111
|
d,
|
|
4060
|
-
f && /* @__PURE__ */ t(
|
|
4061
|
-
h && /* @__PURE__ */ t(
|
|
4112
|
+
f && /* @__PURE__ */ t(X, {}),
|
|
4113
|
+
h && /* @__PURE__ */ t(Q, {
|
|
4062
4114
|
label: g,
|
|
4063
4115
|
children: h
|
|
4064
4116
|
})
|
|
@@ -4077,13 +4129,13 @@ function mt({ value: e, onChange: r, options: a = [], placeholder: o = "Select..
|
|
|
4077
4129
|
}
|
|
4078
4130
|
//#endregion
|
|
4079
4131
|
//#region src/components/AppShell.jsx
|
|
4080
|
-
function
|
|
4081
|
-
|
|
4082
|
-
let [v, y] =
|
|
4083
|
-
return
|
|
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(() => {
|
|
4084
4136
|
let e = () => C(window.scrollY > 4);
|
|
4085
4137
|
return e(), window.addEventListener("scroll", e, { passive: !0 }), () => window.removeEventListener("scroll", e);
|
|
4086
|
-
}, []),
|
|
4138
|
+
}, []), a(() => {
|
|
4087
4139
|
if (!b) return;
|
|
4088
4140
|
let e = (e) => {
|
|
4089
4141
|
e.key === "Escape" && x(!1);
|
|
@@ -4092,7 +4144,7 @@ function ht({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbar
|
|
|
4092
4144
|
}, [b]), /* @__PURE__ */ n("div", {
|
|
4093
4145
|
className: [
|
|
4094
4146
|
"app-shell",
|
|
4095
|
-
|
|
4147
|
+
w ? "collapsed" : "",
|
|
4096
4148
|
p ? "no-sidebar" : "",
|
|
4097
4149
|
b ? "mobile-open" : "",
|
|
4098
4150
|
g
|
|
@@ -4113,16 +4165,16 @@ function ht({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbar
|
|
|
4113
4165
|
children: [e.label && /* @__PURE__ */ t("div", {
|
|
4114
4166
|
className: "app-nav-group-label",
|
|
4115
4167
|
children: e.label
|
|
4116
|
-
}), e.items.map((e) => /* @__PURE__ */ t(
|
|
4168
|
+
}), e.items.map((e) => /* @__PURE__ */ t(_t, {
|
|
4117
4169
|
item: e,
|
|
4118
4170
|
linkComponent: h,
|
|
4119
4171
|
onNavigate: () => x(!1)
|
|
4120
4172
|
}, e.key ?? e.href))]
|
|
4121
4173
|
}, e.label ?? `group-${r}`))
|
|
4122
4174
|
}),
|
|
4123
|
-
|
|
4175
|
+
i && /* @__PURE__ */ t("div", {
|
|
4124
4176
|
className: "app-sidebar-foot",
|
|
4125
|
-
children:
|
|
4177
|
+
children: i
|
|
4126
4178
|
})
|
|
4127
4179
|
]
|
|
4128
4180
|
}),
|
|
@@ -4130,12 +4182,12 @@ function ht({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbar
|
|
|
4130
4182
|
type: "button",
|
|
4131
4183
|
className: "app-sidebar-toggle",
|
|
4132
4184
|
onClick: () => {
|
|
4133
|
-
let e = !
|
|
4185
|
+
let e = !w;
|
|
4134
4186
|
y(e), f?.(e);
|
|
4135
4187
|
},
|
|
4136
|
-
"aria-label":
|
|
4137
|
-
"aria-expanded": !
|
|
4138
|
-
children: /* @__PURE__ */ t(
|
|
4188
|
+
"aria-label": w ? "Expand navigation" : "Collapse navigation",
|
|
4189
|
+
"aria-expanded": !w,
|
|
4190
|
+
children: /* @__PURE__ */ t(O, {
|
|
4139
4191
|
name: "chevron-left",
|
|
4140
4192
|
size: 14
|
|
4141
4193
|
})
|
|
@@ -4153,7 +4205,7 @@ function ht({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbar
|
|
|
4153
4205
|
onClick: () => x(!0),
|
|
4154
4206
|
"aria-label": "Open navigation",
|
|
4155
4207
|
"aria-expanded": b,
|
|
4156
|
-
children: /* @__PURE__ */ t(
|
|
4208
|
+
children: /* @__PURE__ */ t(O, {
|
|
4157
4209
|
name: "menu",
|
|
4158
4210
|
size: 18
|
|
4159
4211
|
})
|
|
@@ -4167,9 +4219,9 @@ function ht({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbar
|
|
|
4167
4219
|
className: "app-content",
|
|
4168
4220
|
children: u
|
|
4169
4221
|
}),
|
|
4170
|
-
|
|
4222
|
+
c && /* @__PURE__ */ t("footer", {
|
|
4171
4223
|
className: "app-footer",
|
|
4172
|
-
children:
|
|
4224
|
+
children: c
|
|
4173
4225
|
})
|
|
4174
4226
|
]
|
|
4175
4227
|
}),
|
|
@@ -4183,11 +4235,11 @@ function ht({ groups: e = [], brand: r, sidebarFooter: a, topbarStart: o, topbar
|
|
|
4183
4235
|
]
|
|
4184
4236
|
});
|
|
4185
4237
|
}
|
|
4186
|
-
function
|
|
4238
|
+
function _t({ item: r, linkComponent: i, onNavigate: a }) {
|
|
4187
4239
|
let o = `app-nav-item${r.active ? " active" : ""}`, s = /* @__PURE__ */ n(e, { children: [
|
|
4188
4240
|
r.icon && /* @__PURE__ */ t("span", {
|
|
4189
4241
|
className: "app-nav-icon",
|
|
4190
|
-
children: /* @__PURE__ */ t(
|
|
4242
|
+
children: /* @__PURE__ */ t(O, {
|
|
4191
4243
|
name: r.icon,
|
|
4192
4244
|
size: 22
|
|
4193
4245
|
})
|
|
@@ -4217,7 +4269,7 @@ function gt({ item: r, linkComponent: i, onNavigate: a }) {
|
|
|
4217
4269
|
}
|
|
4218
4270
|
//#endregion
|
|
4219
4271
|
//#region src/components/AppSidebarMenu.jsx
|
|
4220
|
-
var
|
|
4272
|
+
var vt = {
|
|
4221
4273
|
left: "start",
|
|
4222
4274
|
right: "end",
|
|
4223
4275
|
start: "start",
|
|
@@ -4225,18 +4277,18 @@ var _t = {
|
|
|
4225
4277
|
top: "top",
|
|
4226
4278
|
bottom: "bottom"
|
|
4227
4279
|
};
|
|
4228
|
-
function
|
|
4229
|
-
return
|
|
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, {
|
|
4230
4282
|
show: e,
|
|
4231
4283
|
onHide: r,
|
|
4232
|
-
placement:
|
|
4284
|
+
placement: vt[i] || "end",
|
|
4233
4285
|
backdrop: d,
|
|
4234
4286
|
scroll: f,
|
|
4235
4287
|
keyboard: p,
|
|
4236
4288
|
responsive: h,
|
|
4237
4289
|
style: u ? { "--asm-width": u } : void 0,
|
|
4238
4290
|
className: `app-sidebar-menu${g ? ` ${g}` : ""}`,
|
|
4239
|
-
"aria-label":
|
|
4291
|
+
"aria-label": v || (typeof a == "string" ? a : void 0),
|
|
4240
4292
|
children: [
|
|
4241
4293
|
s === void 0 ? (a != null || m) && /* @__PURE__ */ n("div", {
|
|
4242
4294
|
className: "drawer-header",
|
|
@@ -4244,23 +4296,23 @@ function vt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
|
|
|
4244
4296
|
className: "drawer-title",
|
|
4245
4297
|
children: [o && /* @__PURE__ */ t("span", {
|
|
4246
4298
|
className: "drawer-title-ic",
|
|
4247
|
-
children: /* @__PURE__ */ t(
|
|
4299
|
+
children: /* @__PURE__ */ t(O, {
|
|
4248
4300
|
name: o,
|
|
4249
4301
|
size: 18
|
|
4250
4302
|
})
|
|
4251
4303
|
}), a]
|
|
4252
|
-
}), m && /* @__PURE__ */ t(
|
|
4304
|
+
}), m && /* @__PURE__ */ t(Z, {
|
|
4253
4305
|
variant: "ghost",
|
|
4254
4306
|
className: "btn-icon",
|
|
4255
4307
|
onClick: r,
|
|
4256
4308
|
"aria-label": "Close",
|
|
4257
|
-
children: /* @__PURE__ */ t(
|
|
4309
|
+
children: /* @__PURE__ */ t(O, {
|
|
4258
4310
|
name: "x",
|
|
4259
4311
|
size: 16
|
|
4260
4312
|
})
|
|
4261
4313
|
})]
|
|
4262
4314
|
}) : s,
|
|
4263
|
-
/* @__PURE__ */ t(
|
|
4315
|
+
/* @__PURE__ */ t(y.Body, {
|
|
4264
4316
|
className: _,
|
|
4265
4317
|
children: c
|
|
4266
4318
|
}),
|
|
@@ -4273,8 +4325,8 @@ function vt({ show: e, onHide: r, side: i = "right", title: a, titleIcon: o, hea
|
|
|
4273
4325
|
}
|
|
4274
4326
|
//#endregion
|
|
4275
4327
|
//#region src/components/AppSpinner.jsx
|
|
4276
|
-
function
|
|
4277
|
-
return
|
|
4328
|
+
function bt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
|
|
4329
|
+
return T("AppSpinner", i), /* @__PURE__ */ t("span", {
|
|
4278
4330
|
className: `spinner-border${e === "sm" ? " spinner-border-sm" : ""}${r ? ` ${r}` : ""}`,
|
|
4279
4331
|
role: "status",
|
|
4280
4332
|
"aria-label": n
|
|
@@ -4282,8 +4334,8 @@ function yt({ size: e = "md", label: n = "Loading", className: r = "", ...i }) {
|
|
|
4282
4334
|
}
|
|
4283
4335
|
//#endregion
|
|
4284
4336
|
//#region src/components/AppSplash.jsx
|
|
4285
|
-
function
|
|
4286
|
-
return
|
|
4337
|
+
function xt({ logo: e, initials: r, text: i, label: a = "Loading", className: o = "", ...s }) {
|
|
4338
|
+
return T("AppSplash", s), /* @__PURE__ */ t("div", {
|
|
4287
4339
|
className: `splash${o ? ` ${o}` : ""}`,
|
|
4288
4340
|
role: "status",
|
|
4289
4341
|
"aria-live": "polite",
|
|
@@ -4309,22 +4361,22 @@ function bt({ logo: e, initials: r, text: i, label: a = "Loading", className: o
|
|
|
4309
4361
|
}
|
|
4310
4362
|
//#endregion
|
|
4311
4363
|
//#region src/components/AppStatusBadge.jsx
|
|
4312
|
-
function
|
|
4313
|
-
return
|
|
4364
|
+
function St({ label: e, tone: n = "neutral", className: r = "", ...i }) {
|
|
4365
|
+
return T("AppStatusBadge", i), e == null || e === "" ? "—" : /* @__PURE__ */ t("span", {
|
|
4314
4366
|
className: `status-label ${n}${r ? ` ${r}` : ""}`,
|
|
4315
4367
|
children: e
|
|
4316
4368
|
});
|
|
4317
4369
|
}
|
|
4318
4370
|
//#endregion
|
|
4319
4371
|
//#region src/components/AppStepper.jsx
|
|
4320
|
-
function
|
|
4321
|
-
return
|
|
4372
|
+
function Ct({ steps: r = [], variant: i = "steps", label: a = "Progress", linkComponent: o, className: s = "", ...c }) {
|
|
4373
|
+
return T("AppStepper", c), /* @__PURE__ */ t("nav", {
|
|
4322
4374
|
className: [i === "journey" ? "stepper stepper-journey" : "stepper", s].filter(Boolean).join(" "),
|
|
4323
4375
|
"aria-label": a,
|
|
4324
4376
|
children: r.map((a, s) => {
|
|
4325
4377
|
let c = a.status || "pending", l = `step${c === "pending" ? "" : ` ${c}`}`, u = /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("span", {
|
|
4326
4378
|
className: "step-circle",
|
|
4327
|
-
children: c === "done" ? /* @__PURE__ */ t(
|
|
4379
|
+
children: c === "done" ? /* @__PURE__ */ t(O, {
|
|
4328
4380
|
name: "check",
|
|
4329
4381
|
size: 14
|
|
4330
4382
|
}) : s + 1
|
|
@@ -4364,11 +4416,11 @@ function St({ steps: r = [], variant: i = "steps", label: a = "Progress", linkCo
|
|
|
4364
4416
|
}
|
|
4365
4417
|
//#endregion
|
|
4366
4418
|
//#region src/components/AppSwitch.jsx
|
|
4367
|
-
var
|
|
4368
|
-
|
|
4369
|
-
let l =
|
|
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;
|
|
4370
4422
|
return /* @__PURE__ */ n("div", {
|
|
4371
|
-
className: `form-check form-switch${
|
|
4423
|
+
className: `form-check form-switch${a ? ` ${a}` : ""}`,
|
|
4372
4424
|
children: [/* @__PURE__ */ t("input", {
|
|
4373
4425
|
type: "checkbox",
|
|
4374
4426
|
className: "form-check-input",
|
|
@@ -4385,13 +4437,13 @@ var Ct = r(function({ label: e, id: r, name: i, className: o = "", ...s }, c) {
|
|
|
4385
4437
|
});
|
|
4386
4438
|
//#endregion
|
|
4387
4439
|
//#region src/components/AppTableEmptyState.jsx
|
|
4388
|
-
function
|
|
4389
|
-
return
|
|
4440
|
+
function Tt({ icon: e, title: r, text: i, action: a, ...o }) {
|
|
4441
|
+
return T("AppTableEmptyState", o), /* @__PURE__ */ n("div", {
|
|
4390
4442
|
className: "tbl-empty",
|
|
4391
4443
|
children: [
|
|
4392
4444
|
/* @__PURE__ */ t("span", {
|
|
4393
4445
|
className: "tbl-empty-icon",
|
|
4394
|
-
children: /* @__PURE__ */ t(
|
|
4446
|
+
children: /* @__PURE__ */ t(O, {
|
|
4395
4447
|
name: e,
|
|
4396
4448
|
size: 24
|
|
4397
4449
|
})
|
|
@@ -4413,9 +4465,9 @@ function wt({ icon: e, title: r, text: i, action: a, ...o }) {
|
|
|
4413
4465
|
}
|
|
4414
4466
|
//#endregion
|
|
4415
4467
|
//#region src/components/AppTabs.jsx
|
|
4416
|
-
function
|
|
4417
|
-
|
|
4418
|
-
let u =
|
|
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);
|
|
4419
4471
|
function d(t) {
|
|
4420
4472
|
let n = e.findIndex((e) => e.key === r);
|
|
4421
4473
|
if (n < 0) return;
|
|
@@ -4425,7 +4477,7 @@ function Tt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
4425
4477
|
let o = CSS.escape(String(a.key));
|
|
4426
4478
|
u.current?.querySelector(`[data-rr-ui-event-key="${o}"]`)?.focus();
|
|
4427
4479
|
}
|
|
4428
|
-
return /* @__PURE__ */ t(
|
|
4480
|
+
return /* @__PURE__ */ t(b, {
|
|
4429
4481
|
as: "div",
|
|
4430
4482
|
role: "tablist",
|
|
4431
4483
|
ref: u,
|
|
@@ -4435,9 +4487,9 @@ function Tt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
4435
4487
|
},
|
|
4436
4488
|
onKeyDown: d,
|
|
4437
4489
|
bsPrefix: "app-tabs",
|
|
4438
|
-
className: [a === "pills" ? "app-tabs-pills" : "",
|
|
4490
|
+
className: [a === "pills" ? "app-tabs-pills" : "", s].filter(Boolean).join(" "),
|
|
4439
4491
|
"aria-label": o,
|
|
4440
|
-
children: e.map((e) => /* @__PURE__ */ n(
|
|
4492
|
+
children: e.map((e) => /* @__PURE__ */ n(b.Link, {
|
|
4441
4493
|
as: "button",
|
|
4442
4494
|
type: "button",
|
|
4443
4495
|
eventKey: e.key,
|
|
@@ -4457,59 +4509,76 @@ function Tt({ tabs: e, value: r, onChange: i, variant: a = "underline", ariaLabe
|
|
|
4457
4509
|
}
|
|
4458
4510
|
//#endregion
|
|
4459
4511
|
//#region src/components/AppTextarea.jsx
|
|
4460
|
-
var
|
|
4461
|
-
|
|
4462
|
-
let
|
|
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 = [
|
|
4463
4515
|
"textarea",
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
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${_ ? ` ${_}` : ""}`,
|
|
4469
4537
|
children: [
|
|
4470
|
-
e && /* @__PURE__ */ n(
|
|
4538
|
+
e && /* @__PURE__ */ n(m.Label, {
|
|
4471
4539
|
className: "label",
|
|
4472
|
-
htmlFor:
|
|
4540
|
+
htmlFor: b,
|
|
4473
4541
|
children: [
|
|
4474
4542
|
e,
|
|
4475
|
-
r && /* @__PURE__ */ t(
|
|
4476
|
-
|
|
4477
|
-
label:
|
|
4478
|
-
children:
|
|
4543
|
+
r && /* @__PURE__ */ t(X, {}),
|
|
4544
|
+
l && /* @__PURE__ */ t(Q, {
|
|
4545
|
+
label: u,
|
|
4546
|
+
children: l
|
|
4479
4547
|
})
|
|
4480
4548
|
]
|
|
4481
4549
|
}),
|
|
4482
|
-
/* @__PURE__ */ t(
|
|
4550
|
+
/* @__PURE__ */ t(m.Control, {
|
|
4483
4551
|
as: "textarea",
|
|
4484
|
-
id:
|
|
4485
|
-
name:
|
|
4486
|
-
rows:
|
|
4487
|
-
className:
|
|
4488
|
-
"aria-invalid":
|
|
4552
|
+
id: b,
|
|
4553
|
+
name: f,
|
|
4554
|
+
rows: p,
|
|
4555
|
+
className: x,
|
|
4556
|
+
"aria-invalid": a ? "true" : "false",
|
|
4489
4557
|
required: r,
|
|
4490
|
-
|
|
4491
|
-
|
|
4558
|
+
...v,
|
|
4559
|
+
ref: C,
|
|
4560
|
+
onInput: E
|
|
4492
4561
|
}),
|
|
4493
|
-
|
|
4562
|
+
a ? /* @__PURE__ */ t("div", {
|
|
4494
4563
|
className: "field-error",
|
|
4495
|
-
children: i
|
|
4496
|
-
}) : a ? /* @__PURE__ */ t("div", {
|
|
4497
|
-
className: "field-hint",
|
|
4498
4564
|
children: a
|
|
4565
|
+
}) : o ? /* @__PURE__ */ t("div", {
|
|
4566
|
+
className: "field-hint",
|
|
4567
|
+
children: o
|
|
4499
4568
|
}) : null
|
|
4500
4569
|
]
|
|
4501
4570
|
});
|
|
4502
4571
|
});
|
|
4503
4572
|
//#endregion
|
|
4504
4573
|
//#region src/components/AppTimeline.jsx
|
|
4505
|
-
function
|
|
4506
|
-
return
|
|
4574
|
+
function Ot({ items: e = [], className: r = "", ...i }) {
|
|
4575
|
+
return T("AppTimeline", i), /* @__PURE__ */ t("ol", {
|
|
4507
4576
|
className: `timeline${r ? ` ${r}` : ""}`,
|
|
4508
4577
|
children: e.map((e, r) => /* @__PURE__ */ n("li", {
|
|
4509
4578
|
className: `timeline-item${e.tone && e.tone !== "neutral" ? ` ${e.tone}` : ""}`,
|
|
4510
4579
|
children: [/* @__PURE__ */ t("span", {
|
|
4511
4580
|
className: "timeline-dot",
|
|
4512
|
-
children: /* @__PURE__ */ t(
|
|
4581
|
+
children: /* @__PURE__ */ t(O, {
|
|
4513
4582
|
name: e.icon || "circle",
|
|
4514
4583
|
size: 12
|
|
4515
4584
|
})
|
|
@@ -4540,4 +4609,4 @@ function Dt({ items: e = [], className: r = "", ...i }) {
|
|
|
4540
4609
|
});
|
|
4541
4610
|
}
|
|
4542
4611
|
//#endregion
|
|
4543
|
-
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 };
|