@webority/ui-elements 0.34.0 → 0.35.1

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.
Files changed (62) hide show
  1. package/dist/WuiAutocomplete-ByxnwJNQ.js +283 -0
  2. package/dist/WuiCommandPalette-CtZ04JxZ.js +130 -0
  3. package/dist/WuiConsentBanner-oVe-jxCO.js +399 -0
  4. package/dist/WuiContextMenu-Bx_U2X3t.js +211 -0
  5. package/dist/WuiCountrySelect-CUAwKnL9.js +28 -0
  6. package/dist/WuiDatePicker-DkNbc-z7.js +325 -0
  7. package/dist/WuiDateRange-BocnVO6L.js +233 -0
  8. package/dist/WuiDock-BSDY9g8Q.js +57 -0
  9. package/dist/WuiImageCrop-1yaAONTk.js +462 -0
  10. package/dist/WuiMultiSelect-BrCGRNCt.js +416 -0
  11. package/dist/WuiOtp-D8-4Pqil.js +128 -0
  12. package/dist/WuiPhone-BvbhiP2r.js +731 -0
  13. package/dist/WuiSelect-BXrpiuXG.js +214 -0
  14. package/dist/WuiSlider-BcU0psYf.js +256 -0
  15. package/dist/WuiSortable-JjJqstSU.js +280 -0
  16. package/dist/WuiTagInput-D1ay3OcL.js +158 -0
  17. package/dist/WuiTimePicker-C7n-VFGt.js +370 -0
  18. package/dist/WuiTour-R5O9l--J.js +205 -0
  19. package/dist/WuiTree-Ds-8tNgs.js +393 -0
  20. package/dist/WuiWizardStep-BU5w9_Ds.js +221 -0
  21. package/dist/anchorOverlay-DluGZ8ef.js +23 -0
  22. package/dist/calendarMath-BAF2Jkg_.js +42 -0
  23. package/dist/countries-B-M_LTgS.js +1234 -0
  24. package/dist/elementBase-Bg1xpvup.js +9 -0
  25. package/dist/elements/autocomplete.js +6 -0
  26. package/dist/elements/command-palette.js +6 -0
  27. package/dist/elements/consent-banner.js +6 -0
  28. package/dist/elements/context-menu.js +6 -0
  29. package/dist/elements/country-select.js +6 -0
  30. package/dist/elements/date-range.js +6 -0
  31. package/dist/elements/datepicker.js +6 -0
  32. package/dist/elements/dock.js +6 -0
  33. package/dist/elements/image-crop.js +6 -0
  34. package/dist/elements/kanban.js +6 -0
  35. package/dist/elements/multiselect.js +6 -0
  36. package/dist/elements/otp.js +6 -0
  37. package/dist/elements/phone.js +6 -0
  38. package/dist/elements/select.js +6 -0
  39. package/dist/elements/slider.js +6 -0
  40. package/dist/elements/sortable.js +6 -0
  41. package/dist/elements/status-icon.js +6 -0
  42. package/dist/elements/taginput.js +6 -0
  43. package/dist/elements/timepicker.js +6 -0
  44. package/dist/elements/tour.js +6 -0
  45. package/dist/elements/tree.js +6 -0
  46. package/dist/elements/wizard.js +5 -0
  47. package/dist/formMirror-jGf5M4gk.js +29 -0
  48. package/dist/formatters-DusKbTyV.js +138 -0
  49. package/dist/helpers.js +5 -0
  50. package/dist/iconGlyphs.g-Cpg1BUHm.js +215 -0
  51. package/dist/kanban-BeVAItir.js +972 -0
  52. package/dist/listboxKeyNav-zts_8d5e.js +36 -0
  53. package/dist/optionLabel-Dn-I7zyp.js +16 -0
  54. package/dist/statusIcons-C3zjycpa.js +37 -0
  55. package/dist/textMatch-DEUjlkdy.js +27 -0
  56. package/dist/themeTransition-BpCuMnjk.js +589 -0
  57. package/dist/tokenCommit-VWz-2jEf.js +20 -0
  58. package/dist/ui-elements.global.js +118 -129
  59. package/dist/ui-elements.js +253 -8864
  60. package/dist/ui-phone.global.js +14 -0
  61. package/dist/wuiHttp-m0yQadwQ.js +117 -0
  62. 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 { t } from "../WuiAutocomplete-ByxnwJNQ.js";
3
+ //#region src/elements/autocomplete.js
4
+ e("wui-autocomplete", t);
5
+ //#endregion
6
+ export { t as WuiAutocomplete };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiCommandPalette-CtZ04JxZ.js";
3
+ //#region src/elements/command-palette.js
4
+ e("wui-command-palette", t);
5
+ //#endregion
6
+ export { t as WuiCommandPalette };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiConsentBanner-oVe-jxCO.js";
3
+ //#region src/elements/consent-banner.js
4
+ e("wui-consent-banner", t);
5
+ //#endregion
6
+ export { t as WuiConsentBanner };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiContextMenu-Bx_U2X3t.js";
3
+ //#region src/elements/context-menu.js
4
+ e("wui-context-menu", t);
5
+ //#endregion
6
+ export { t as WuiContextMenu };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiCountrySelect-CUAwKnL9.js";
3
+ //#region src/elements/country-select.js
4
+ e("wui-country-select", t);
5
+ //#endregion
6
+ export { t as WuiCountrySelect };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiDateRange-BocnVO6L.js";
3
+ //#region src/elements/date-range.js
4
+ e("wui-date-range", t);
5
+ //#endregion
6
+ export { t as WuiDateRange };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiDatePicker-DkNbc-z7.js";
3
+ //#region src/elements/datepicker.js
4
+ e("wui-datepicker", t);
5
+ //#endregion
6
+ export { t as WuiDatePicker };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiDock-BSDY9g8Q.js";
3
+ //#region src/elements/dock.js
4
+ e("wui-dock", t);
5
+ //#endregion
6
+ export { t as WuiDock };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiImageCrop-1yaAONTk.js";
3
+ //#region src/elements/image-crop.js
4
+ e("wui-image-crop", t);
5
+ //#endregion
6
+ export { t as WuiImageCrop };
@@ -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 };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiMultiSelect-BrCGRNCt.js";
3
+ //#region src/elements/multiselect.js
4
+ e("wui-multiselect", t);
5
+ //#endregion
6
+ export { t as WuiMultiSelect };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiOtp-D8-4Pqil.js";
3
+ //#region src/elements/otp.js
4
+ e("wui-otp", t);
5
+ //#endregion
6
+ export { t as WuiOtp };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiPhone-BvbhiP2r.js";
3
+ //#region src/elements/phone.js
4
+ e("wui-phone", t);
5
+ //#endregion
6
+ export { t as WuiPhone };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiSelect-BXrpiuXG.js";
3
+ //#region src/elements/select.js
4
+ e("wui-select", t);
5
+ //#endregion
6
+ export { t as WuiSelect };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiSlider-BcU0psYf.js";
3
+ //#region src/elements/slider.js
4
+ e("wui-slider", t);
5
+ //#endregion
6
+ export { t as WuiSlider };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiSortable-JjJqstSU.js";
3
+ //#region src/elements/sortable.js
4
+ e("wui-sortable", t);
5
+ //#endregion
6
+ export { t as WuiSortable };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { n as t, t as n } from "../statusIcons-C3zjycpa.js";
3
+ //#region src/elements/status-icon.js
4
+ e("wui-status-icon", t);
5
+ //#endregion
6
+ export { n as STATUS_TONES, t as WuiStatusIcon };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiTagInput-D1ay3OcL.js";
3
+ //#region src/elements/taginput.js
4
+ e("wui-taginput", t);
5
+ //#endregion
6
+ export { t as WuiTagInput };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiTimePicker-C7n-VFGt.js";
3
+ //#region src/elements/timepicker.js
4
+ e("wui-timepicker", t);
5
+ //#endregion
6
+ export { t as WuiTimePicker };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { n as t, t as n } from "../WuiTour-R5O9l--J.js";
3
+ //#region src/elements/tour.js
4
+ e("wui-tour", n);
5
+ //#endregion
6
+ export { n as WuiTour, t as createLocalSeenStore };
@@ -0,0 +1,6 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { t } from "../WuiTree-Ds-8tNgs.js";
3
+ //#region src/elements/tree.js
4
+ e("wui-tree", t);
5
+ //#endregion
6
+ export { t as WuiTree };
@@ -0,0 +1,5 @@
1
+ import { n as e } from "../elementBase-Bg1xpvup.js";
2
+ import { n as t, t as n } from "../WuiWizardStep-BU5w9_Ds.js";
3
+ e("wui-wizard-step", n), e("wui-wizard", t);
4
+ //#endregion
5
+ export { t as WuiWizard, n as WuiWizardStep };
@@ -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 };
@@ -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 };