@webority/ui-elements 0.33.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/WuiAutocomplete-ByxnwJNQ.js +283 -0
- package/dist/WuiCommandPalette-CtZ04JxZ.js +130 -0
- package/dist/WuiConsentBanner-oVe-jxCO.js +399 -0
- package/dist/WuiContextMenu-Bx_U2X3t.js +211 -0
- package/dist/WuiCountrySelect-CUAwKnL9.js +28 -0
- package/dist/WuiDatePicker-DkNbc-z7.js +325 -0
- package/dist/WuiDateRange-BocnVO6L.js +233 -0
- package/dist/WuiDock-BSDY9g8Q.js +57 -0
- package/dist/WuiImageCrop-1yaAONTk.js +462 -0
- package/dist/WuiMultiSelect-BrCGRNCt.js +416 -0
- package/dist/WuiOtp-D8-4Pqil.js +128 -0
- package/dist/WuiPhone-BvbhiP2r.js +731 -0
- package/dist/WuiSelect-BXrpiuXG.js +214 -0
- package/dist/WuiSlider-BcU0psYf.js +256 -0
- package/dist/WuiSortable-JjJqstSU.js +280 -0
- package/dist/WuiTagInput-D1ay3OcL.js +158 -0
- package/dist/WuiTimePicker-C7n-VFGt.js +370 -0
- package/dist/WuiTour-R5O9l--J.js +205 -0
- package/dist/WuiTree-Ds-8tNgs.js +393 -0
- package/dist/WuiWizardStep-BU5w9_Ds.js +221 -0
- package/dist/anchorOverlay-DluGZ8ef.js +23 -0
- package/dist/calendarMath-BAF2Jkg_.js +42 -0
- package/dist/countries-B-M_LTgS.js +1234 -0
- package/dist/elementBase-Bg1xpvup.js +9 -0
- package/dist/elements/autocomplete.js +6 -0
- package/dist/elements/command-palette.js +6 -0
- package/dist/elements/consent-banner.js +6 -0
- package/dist/elements/context-menu.js +6 -0
- package/dist/elements/country-select.js +6 -0
- package/dist/elements/date-range.js +6 -0
- package/dist/elements/datepicker.js +6 -0
- package/dist/elements/dock.js +6 -0
- package/dist/elements/image-crop.js +6 -0
- package/dist/elements/kanban.js +6 -0
- package/dist/elements/multiselect.js +6 -0
- package/dist/elements/otp.js +6 -0
- package/dist/elements/phone.js +6 -0
- package/dist/elements/select.js +6 -0
- package/dist/elements/slider.js +6 -0
- package/dist/elements/sortable.js +6 -0
- package/dist/elements/status-icon.js +6 -0
- package/dist/elements/taginput.js +6 -0
- package/dist/elements/timepicker.js +6 -0
- package/dist/elements/tour.js +6 -0
- package/dist/elements/tree.js +6 -0
- package/dist/elements/wizard.js +5 -0
- package/dist/{fileViewerMedia-BYBcznPT.js → fileViewerMedia-DPk_YcvC.js} +4 -0
- package/dist/formMirror-jGf5M4gk.js +29 -0
- package/dist/formatters-DusKbTyV.js +138 -0
- package/dist/helpers.js +5 -0
- package/dist/iconGlyphs.g-Cpg1BUHm.js +215 -0
- package/dist/kanban-BeVAItir.js +972 -0
- package/dist/listboxKeyNav-zts_8d5e.js +36 -0
- package/dist/optionLabel-Dn-I7zyp.js +16 -0
- package/dist/statusIcons-C3zjycpa.js +37 -0
- package/dist/textMatch-DEUjlkdy.js +27 -0
- package/dist/themeTransition-BpCuMnjk.js +589 -0
- package/dist/tokenCommit-VWz-2jEf.js +20 -0
- package/dist/ui-elements.global.js +118 -129
- package/dist/ui-elements.js +253 -8864
- package/dist/ui-file-viewer.global.js +1 -1
- package/dist/ui-file-viewer.js +6 -2
- package/dist/ui-phone.global.js +14 -0
- package/dist/wuiHttp-m0yQadwQ.js +117 -0
- package/package.json +28 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/defineElement.js
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
typeof customElements < "u" && !customElements.get(e) && customElements.define(e, t);
|
|
4
|
+
}
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/elementBase.js
|
|
7
|
+
var t = typeof HTMLElement > "u" ? class {} : HTMLElement;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { e as n, t };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { n as e } from "../elementBase-Bg1xpvup.js";
|
|
2
|
+
import { a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "../kanban-BeVAItir.js";
|
|
3
|
+
//#region src/elements/kanban.js
|
|
4
|
+
e("wui-kanban", n);
|
|
5
|
+
//#endregion
|
|
6
|
+
export { h as KANBAN_DRAG_THRESHOLD_PX, u as KANBAN_LONG_PRESS_MS, p as KANBAN_PHONE_QUERY, s as KANBAN_STORAGE_PREFIX, t as KANBAN_SUMMARY_FORMATS, d as KANBAN_TEXT, m as KANBAN_TONES, n as WuiKanban, c as kanbanCardLabel, g as kanbanOverflow, r as kanbanStorageKey, i as kanbanSummaryFormat, f as kanbanVisibleLimit, l as readKanbanCollapsed, o as sumKanbanValues, a as writeKanbanCollapsed };
|
|
@@ -63,6 +63,10 @@ var l = (e) => e instanceof Element && e.closest("input, textarea, select, butto
|
|
|
63
63
|
]) o.addEventListener(e, () => this._syncPlay());
|
|
64
64
|
o.addEventListener("timeupdate", () => this._syncTime()), o.addEventListener("durationchange", () => this._syncTime()), o.addEventListener("volumechange", () => this._syncVolume()), o.addEventListener("ratechange", () => this._syncSpeed()), this._onKeyDown = (e) => this._keyDown(e), r.addEventListener("keydown", this._onKeyDown), this._syncPlay(), this._syncTime(), this._syncVolume(), this._syncSpeed(), this._syncCaptions();
|
|
65
65
|
}
|
|
66
|
+
seekTo(e) {
|
|
67
|
+
let t = this.media.duration;
|
|
68
|
+
this.media.currentTime = Math.min(Math.max(e, 0), Number.isFinite(t) ? t : Infinity);
|
|
69
|
+
}
|
|
66
70
|
togglePlay() {
|
|
67
71
|
this.media.paused || this.media.ended ? this.media.play().catch((e) => {
|
|
68
72
|
console.warn("[wui-file-viewer] play refused:", e?.message);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/formMirror.js
|
|
2
|
+
var e = "data-wui-mirror";
|
|
3
|
+
function t(e, t, n, r) {
|
|
4
|
+
t.name = n, t.value = r == null ? "" : String(r);
|
|
5
|
+
for (let n of [...t.attributes]) n.name.startsWith("data-val") && !e.hasAttribute(n.name) && t.removeAttribute(n.name);
|
|
6
|
+
for (let n of e.attributes) n.name.startsWith("data-val") && t.setAttribute(n.name, n.value);
|
|
7
|
+
t.disabled = e.hasAttribute("disabled");
|
|
8
|
+
}
|
|
9
|
+
function n(t) {
|
|
10
|
+
let n = document.createElement("input");
|
|
11
|
+
return n.type = "hidden", n.setAttribute(e, ""), t.appendChild(n), n;
|
|
12
|
+
}
|
|
13
|
+
function r(r, i) {
|
|
14
|
+
let a = r.getAttribute("name"), o = r.querySelector(`:scope > input[${e}]`);
|
|
15
|
+
if (!a) {
|
|
16
|
+
o?.remove();
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
o ||= n(r), t(r, o, a, i);
|
|
20
|
+
}
|
|
21
|
+
function i(r, i) {
|
|
22
|
+
let a = r.getAttribute("name"), o = [...r.querySelectorAll(`:scope > input[${e}]`)], s = [...r.attributes].some((e) => e.name.startsWith("data-val")), c = a ? i.length > 0 ? i : s ? [""] : [] : [];
|
|
23
|
+
for (let e of o.splice(c.length)) e.remove();
|
|
24
|
+
c.forEach((e, i) => {
|
|
25
|
+
t(r, o[i] ?? n(r), a, e);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { i as n, r as t };
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
//#region src/formatters.js
|
|
2
|
+
var e = [
|
|
3
|
+
"number",
|
|
4
|
+
"currency",
|
|
5
|
+
"percent",
|
|
6
|
+
"compact",
|
|
7
|
+
"duration",
|
|
8
|
+
"date"
|
|
9
|
+
], t = ["INR"], n = ["rupees", "paise"], r = [
|
|
10
|
+
"ms",
|
|
11
|
+
"s",
|
|
12
|
+
"min",
|
|
13
|
+
"h"
|
|
14
|
+
], i = [
|
|
15
|
+
"day",
|
|
16
|
+
"month",
|
|
17
|
+
"year",
|
|
18
|
+
"datetime",
|
|
19
|
+
"time"
|
|
20
|
+
], a = "Asia/Kolkata", o = "-", s = "−", c = "₹", l = 330 * 60 * 1e3, u = [
|
|
21
|
+
"Jan",
|
|
22
|
+
"Feb",
|
|
23
|
+
"Mar",
|
|
24
|
+
"Apr",
|
|
25
|
+
"May",
|
|
26
|
+
"Jun",
|
|
27
|
+
"Jul",
|
|
28
|
+
"Aug",
|
|
29
|
+
"Sep",
|
|
30
|
+
"Oct",
|
|
31
|
+
"Nov",
|
|
32
|
+
"Dec"
|
|
33
|
+
], d = [
|
|
34
|
+
[1e7, "Cr"],
|
|
35
|
+
[1e5, "L"],
|
|
36
|
+
[1e3, "K"]
|
|
37
|
+
], f = (e, t) => Number.isInteger(e) && e >= 0 && e <= 20 ? e : t, p = /* @__PURE__ */ new Map(), m = (e) => (p.has(e) || p.set(e, new Intl.NumberFormat("en-IN", {
|
|
38
|
+
minimumFractionDigits: 0,
|
|
39
|
+
maximumFractionDigits: e
|
|
40
|
+
})), p.get(e)), h = /* @__PURE__ */ new Map(), g = (e) => (h.has(e) || h.set(e, new Intl.NumberFormat("en-IN", {
|
|
41
|
+
minimumFractionDigits: e,
|
|
42
|
+
maximumFractionDigits: e
|
|
43
|
+
})), h.get(e)), _ = (e) => typeof e == "number" && Number.isFinite(e), v = (e) => e < 0 && !Object.is(Math.abs(e), 0) ? s : "", y = (e, t) => t === "paise" ? e / 100 : e;
|
|
44
|
+
function b(e, { decimals: t } = {}) {
|
|
45
|
+
if (!_(e)) return "-";
|
|
46
|
+
let n = m(f(t, 2)).format(Math.abs(e));
|
|
47
|
+
return n === "0" ? "0" : v(e) + n;
|
|
48
|
+
}
|
|
49
|
+
function x(e, { unit: t = "rupees", decimals: n } = {}) {
|
|
50
|
+
if (!_(e)) return "-";
|
|
51
|
+
let r = y(e, t), i = g(f(n, 0)).format(Math.abs(r));
|
|
52
|
+
return (Number(i.replace(/,/g, "")) === 0 ? "" : v(r)) + c + i;
|
|
53
|
+
}
|
|
54
|
+
var S = (e) => e > 0 && e < .1 ? Math.min(20, 1 - Math.floor(Math.log10(e))) : 2;
|
|
55
|
+
function C(e, { currency: t, unit: n = "rupees" } = {}) {
|
|
56
|
+
if (!_(e)) return "-";
|
|
57
|
+
let r = t ? y(e, n) : e, i = t ? c : "", a = Math.abs(r), o = d.findIndex(([e]) => a >= e);
|
|
58
|
+
if (o === -1) {
|
|
59
|
+
let e = m(S(a)).format(a);
|
|
60
|
+
if (e !== "1,000") return (e === "0" ? "" : v(r)) + i + e;
|
|
61
|
+
o = d.length - 1;
|
|
62
|
+
}
|
|
63
|
+
let [s, l] = d[o], u = a / s, f = u >= 100 ? 0 : u >= 10 ? 1 : 2, p = Number(u.toFixed(f));
|
|
64
|
+
return p >= 100 && o > 0 && (--o, [s, l] = d[o], u = a / s, f = u >= 100 ? 0 : u >= 10 ? 1 : 2, p = Number(u.toFixed(f))), `${v(r)}${i}${m(f).format(p)} ${l}`;
|
|
65
|
+
}
|
|
66
|
+
function w(e, { decimals: t } = {}) {
|
|
67
|
+
return _(e) ? `${b(e * 100, { decimals: f(t, 1) })}%` : "-";
|
|
68
|
+
}
|
|
69
|
+
function T(e, { unit: t = "s" } = {}) {
|
|
70
|
+
if (!_(e)) return "-";
|
|
71
|
+
let n = {
|
|
72
|
+
ms: 1,
|
|
73
|
+
s: 1e3,
|
|
74
|
+
min: 6e4,
|
|
75
|
+
h: 36e5
|
|
76
|
+
}[t] ?? 1e3, r = Math.abs(e * n), i = v(e);
|
|
77
|
+
if (Math.round(r) < 1e3) return `${i}${m(0).format(r)} ms`;
|
|
78
|
+
let a = r / 1e3;
|
|
79
|
+
if (a < 10) return `${i}${m(1).format(a)}s`;
|
|
80
|
+
let o = Math.round(a);
|
|
81
|
+
if (o < 60) return `${i}${o}s`;
|
|
82
|
+
let s = (e) => String(e).padStart(2, "0"), c = Math.floor(o / 60);
|
|
83
|
+
if (c < 60) return `${i}${c}m ${s(o % 60)}s`;
|
|
84
|
+
let l = Math.floor(c / 60);
|
|
85
|
+
return `${i}${m(0).format(l)}h ${s(c % 60)}m`;
|
|
86
|
+
}
|
|
87
|
+
function E(e) {
|
|
88
|
+
if (e instanceof Date) return e.getTime();
|
|
89
|
+
if (_(e)) return e;
|
|
90
|
+
if (typeof e != "string") return NaN;
|
|
91
|
+
let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e.trim());
|
|
92
|
+
if (t) {
|
|
93
|
+
let [e, n, r] = [
|
|
94
|
+
Number(t[1]),
|
|
95
|
+
Number(t[2]),
|
|
96
|
+
Number(t[3])
|
|
97
|
+
], i = new Date(Date.UTC(2e3, n - 1, r));
|
|
98
|
+
return i.setUTCFullYear(e), i.getUTCFullYear() === e && i.getUTCMonth() === n - 1 && i.getUTCDate() === r ? i.getTime() - l : NaN;
|
|
99
|
+
}
|
|
100
|
+
return Date.parse(e);
|
|
101
|
+
}
|
|
102
|
+
function D(e) {
|
|
103
|
+
let t = new Date(e + l);
|
|
104
|
+
return {
|
|
105
|
+
year: t.getUTCFullYear(),
|
|
106
|
+
month: t.getUTCMonth(),
|
|
107
|
+
day: t.getUTCDate(),
|
|
108
|
+
hour: t.getUTCHours(),
|
|
109
|
+
minute: t.getUTCMinutes()
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function O(e, { pattern: t = "day" } = {}) {
|
|
113
|
+
let n = E(e);
|
|
114
|
+
if (!Number.isFinite(n)) return "-";
|
|
115
|
+
let r = D(n), i = (e) => String(e).padStart(2, "0"), a = `${i(r.day)}-${u[r.month]}-${r.year}`, o = `${i(r.hour)}:${i(r.minute)}`;
|
|
116
|
+
switch (t) {
|
|
117
|
+
case "month": return `${u[r.month]}-${r.year}`;
|
|
118
|
+
case "year": return String(r.year);
|
|
119
|
+
case "datetime": return `${a} ${o}`;
|
|
120
|
+
case "time": return o;
|
|
121
|
+
default: return a;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function k(e, t) {
|
|
125
|
+
if (e == null || e === "") return "-";
|
|
126
|
+
let n = t?.style;
|
|
127
|
+
if (n === "date") return O(e, t);
|
|
128
|
+
if (typeof e != "number") return String(e);
|
|
129
|
+
switch (n) {
|
|
130
|
+
case "currency": return x(e, t);
|
|
131
|
+
case "percent": return w(e, t);
|
|
132
|
+
case "compact": return C(e, t);
|
|
133
|
+
case "duration": return T(e, t);
|
|
134
|
+
default: return b(e, t);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { e as a, C as c, T as d, b as f, E as h, o as i, x as l, k as m, i as n, a as o, w as p, r, n as s, t, O as u };
|
package/dist/helpers.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, n as c, o as l, p as u, r as d, s as f, t as p, u as m } from "./formatters-DusKbTyV.js";
|
|
2
|
+
import { t as h } from "./iconGlyphs.g-Cpg1BUHm.js";
|
|
3
|
+
import { t as g } from "./textMatch-DEUjlkdy.js";
|
|
4
|
+
import { A as _, B as v, C as y, D as b, E as x, F as S, G as C, H as w, I as T, J as E, K as D, L as O, M as k, N as A, O as j, P as M, Q as N, R as P, S as F, T as I, U as L, V as R, W as z, X as B, Y as V, Z as H, _ as U, a as W, b as G, c as K, d as q, f as J, g as Y, h as X, i as Z, j as Q, k as $, l as ee, m as te, n as ne, o as re, p as ie, q as ae, s as oe, t as se, u as ce, v as le, w as ue, x as de, y as fe, z as pe } from "./themeTransition-BpCuMnjk.js";
|
|
5
|
+
export { z as AVATAR_ACCEPT, C as AVATAR_MAX_SIZE_MB, D as AVATAR_OUTPUT_SIZE, ae as AVATAR_OUTPUT_TYPE, E as AVATAR_PREVIEW_SIZES, V as AVATAR_TEXT, w as COPY_FEEDBACK_MS, p as CURRENCIES, c as DATE_PATTERNS, M as DEFAULT_IMAGE_ACCEPT, S as DEFAULT_MAX_SIZE_MB, fe as DEFAULT_PASSWORD_RULES, G as DEFAULT_REQUIREMENTS_TITLE, se as DEFAULT_THEME_EFFECT, ne as DEFAULT_THEME_STORAGE_KEY, d as DURATION_UNITS, a as EMPTY_VALUE, e as FORMAT_STYLES, l as IST_TIME_ZONE, ue as MASK_INPUT_TYPES, I as MASK_NAMES, f as MONEY_UNITS, Z as THEME_CHANGE_EVENT, W as THEME_EFFECTS, re as THEME_EFFECT_DURATION, oe as THEME_LIVE_NAME, K as THEME_MODES, ee as THEME_SWITCHING_CLASS, T as acceptLabel, ce as applyTheme, x as attachInputMask, B as avatarCropOptions, H as avatarUnreadableMessage, de as buildPasswordRules, L as copyTextToClipboard, F as evaluatePassword, t as formatCompact, o as formatCurrency, m as formatDate, n as formatDuration, b as formatMasked, r as formatNumber, u as formatPercent, s as formatValue, h as glyphSvg, j as initInputMasks, N as isHeicFile, O as isImageFile, P as isImageOnlyAccept, $ as isMaskPattern, pe as isPdfFile, _ as maskedPostValue, g as matchSegments, v as matchesAccept, q as nextTheme, y as passwordSatisfies, Q as postedMasked, k as rawMasked, J as readStoredTheme, A as resolveMask, ie as resolveTheme, te as storeTheme, X as themeBootScript, Y as themeKeyframes, i as toInstant, U as transitionTheme, R as validateFile, le as watchSystemTheme };
|