wj-elements 0.0.11 → 0.0.13
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/localize-20081fd1.js +55 -0
- package/dist/router-links-26e4a166.js +204 -0
- package/dist/style.css +2243 -2
- package/dist/wj-animation.js +35 -23
- package/dist/wj-aside.js +22 -16
- package/dist/wj-avatar.js +49 -30
- package/dist/wj-badge.js +22 -18
- package/dist/wj-breadcrumb.js +102 -50
- package/dist/wj-breadcrumbs.js +36 -19
- package/dist/wj-button-group.js +36 -22
- package/dist/wj-button.js +104 -39
- package/dist/wj-card-content.js +18 -14
- package/dist/wj-card-controls.js +18 -14
- package/dist/wj-card-header.js +20 -14
- package/dist/wj-card-subtitle.js +19 -15
- package/dist/wj-card-title.js +18 -14
- package/dist/wj-card.js +20 -14
- package/dist/wj-carousel-item.js +22 -16
- package/dist/wj-carousel.js +169 -92
- package/dist/wj-checkbox.js +46 -24
- package/dist/wj-chip.js +39 -21
- package/dist/wj-col.js +31 -17
- package/dist/wj-color-picker.js +877 -509
- package/dist/wj-container.js +20 -16
- package/dist/wj-copy-button.js +112 -64
- package/dist/wj-dialog.js +68 -42
- package/dist/wj-divider.js +20 -14
- package/dist/wj-dropdown.js +29 -17
- package/dist/wj-element.js +415 -241
- package/dist/wj-fetchAndParseCSS.js +49 -32
- package/dist/wj-file-upload-item.js +64 -38
- package/dist/wj-file-upload.js +237 -137
- package/dist/wj-footer.js +18 -14
- package/dist/wj-form.js +18 -14
- package/dist/wj-format-digital.js +40 -25
- package/dist/wj-grid.js +20 -16
- package/dist/wj-header.js +22 -16
- package/dist/wj-icon-picker.js +122 -68
- package/dist/wj-icon.js +144 -64
- package/dist/wj-img-comparer.js +72 -41
- package/dist/wj-img.js +31 -19
- package/dist/wj-infinite-scroll.js +90 -52
- package/dist/wj-input-file.js +50 -27
- package/dist/wj-input.js +169 -70
- package/dist/wj-item.js +34 -17
- package/dist/wj-label.js +21 -19
- package/dist/wj-list.js +20 -15
- package/dist/wj-main.js +18 -14
- package/dist/wj-masonry.js +140 -83
- package/dist/wj-master.js +492 -350
- package/dist/wj-menu-button.js +19 -15
- package/dist/wj-menu-item.js +150 -64
- package/dist/wj-menu-label.js +21 -17
- package/dist/wj-menu.js +24 -18
- package/dist/wj-popup.js +1140 -712
- package/dist/wj-progress-bar.js +100 -40
- package/dist/wj-radio-group.js +38 -25
- package/dist/wj-radio.js +46 -22
- package/dist/wj-rate.js +121 -71
- package/dist/wj-relative-time.js +48 -24
- package/dist/wj-route.js +11 -8
- package/dist/wj-router-link.js +22 -17
- package/dist/wj-router-outlet.js +135 -71
- package/dist/wj-routerx.js +1124 -641
- package/dist/wj-row.js +21 -19
- package/dist/wj-slider.js +97 -55
- package/dist/wj-split-view.js +81 -43
- package/dist/wj-store.js +195 -110
- package/dist/wj-textarea.js +86 -37
- package/dist/wj-thumbnail.js +19 -15
- package/dist/wj-toast.js +87 -34
- package/dist/wj-toggle.js +42 -24
- package/dist/wj-toolbar-action.js +27 -16
- package/dist/wj-toolbar.js +26 -19
- package/dist/wj-tooltip.js +40 -24
- package/dist/wj-visually-hidden.js +18 -14
- package/package.json +1 -1
- package/dist/localize-762a9f0f.js +0 -43
- package/dist/router-links-e0087f84.js +0 -146
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
const h = Symbol("routerLinksData"), l = Symbol("unbindRouterLinks"), p = Promise.resolve(), f = /* @__PURE__ */ new Set();
|
|
2
|
-
let u;
|
|
3
|
-
const y = function(t, r, e, n, s) {
|
|
4
|
-
const a = function(c) {
|
|
5
|
-
for (var o = c.target; o; o = o.parentNode)
|
|
6
|
-
o.matches && o.matches(e) && (c.selectorTarget = o, n.call(s, c));
|
|
7
|
-
};
|
|
8
|
-
return a.eventName = r, t.addEventListener(r, a, !1), a;
|
|
9
|
-
};
|
|
10
|
-
function v(t) {
|
|
11
|
-
return !!(t.metaKey || t.altKey || t.ctrlKey || t.shiftKey);
|
|
12
|
-
}
|
|
13
|
-
const A = function(t, r) {
|
|
14
|
-
const e = r.eventName;
|
|
15
|
-
t.removeEventListener(e, r, !1);
|
|
16
|
-
}, q = (t) => {
|
|
17
|
-
if (t.indexOf("-") === -1)
|
|
18
|
-
return t;
|
|
19
|
-
const r = t.split("-");
|
|
20
|
-
let e = "";
|
|
21
|
-
for (let n = 0; n < r.length; n++) {
|
|
22
|
-
const s = r[n];
|
|
23
|
-
e += n ? s.charAt(0).toUpperCase() + s.slice(1) : s;
|
|
24
|
-
}
|
|
25
|
-
return e;
|
|
26
|
-
};
|
|
27
|
-
function L(t, r) {
|
|
28
|
-
t.forEach(function(e) {
|
|
29
|
-
if (e.type === "attributes") {
|
|
30
|
-
const n = e.attributeName;
|
|
31
|
-
(n.indexOf("param-") === 0 || n.indexOf("query-") === 0) && d(e.target, r.ownerEl);
|
|
32
|
-
} else
|
|
33
|
-
e.addedNodes.forEach((n) => {
|
|
34
|
-
n.nodeType === 1 && (n.getAttribute("route") && d(n, r.ownerEl), k(r.ownerEl, n));
|
|
35
|
-
});
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
const C = { childList: !0, subtree: !0, attributes: !0 };
|
|
39
|
-
function b(t, r, e) {
|
|
40
|
-
const n = t.attributes;
|
|
41
|
-
for (let s = 0; s < n.length; s++) {
|
|
42
|
-
const a = n[s];
|
|
43
|
-
if (a.name.indexOf(r) === 0) {
|
|
44
|
-
const c = q(a.name.slice(r.length));
|
|
45
|
-
e[c] = a.value;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return e;
|
|
49
|
-
}
|
|
50
|
-
function N(t, r, e, n, s) {
|
|
51
|
-
let a = s[e];
|
|
52
|
-
return typeof a == "function" && (a = a.call(t, r, n)), a || {};
|
|
53
|
-
}
|
|
54
|
-
function i(t, r, e, n, s) {
|
|
55
|
-
const a = t[h].options, c = N(t, r, n, e, a), o = e.closest(a.selector || "[routerlinks]");
|
|
56
|
-
return o && b(o, s, c), b(e, s, c);
|
|
57
|
-
}
|
|
58
|
-
function g(t, r, e, n) {
|
|
59
|
-
const s = t.hasAttribute("active-class") ? t.getAttribute("active-class") : "active";
|
|
60
|
-
if (s) {
|
|
61
|
-
const a = u.isActive(r, e, n, t.hasAttribute("exact"));
|
|
62
|
-
t.classList.toggle(s, a);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function d(t, r) {
|
|
66
|
-
const e = t.getAttribute("route");
|
|
67
|
-
if (!e)
|
|
68
|
-
return;
|
|
69
|
-
const n = i(r, e, t, "params", "param-"), s = i(r, e, t, "query", "query-");
|
|
70
|
-
try {
|
|
71
|
-
const a = u.generate(e, n, s), c = t.tagName === "A" ? t : t.querySelector("a");
|
|
72
|
-
c && c.setAttribute("href", a), u.state.activeTransition || g(t, e, n, s);
|
|
73
|
-
} catch (a) {
|
|
74
|
-
console.warn(`Error generating link for "${e}": ${a}`);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
function k(t, r) {
|
|
78
|
-
r.querySelectorAll("[route]").forEach((n) => {
|
|
79
|
-
d(n, t);
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function E(t) {
|
|
83
|
-
if (t.button !== 0 || v(t))
|
|
84
|
-
return;
|
|
85
|
-
t.preventDefault();
|
|
86
|
-
const r = t.selectorTarget, e = r.getAttribute("route");
|
|
87
|
-
if (!e)
|
|
88
|
-
return;
|
|
89
|
-
const n = i(this, e, r, "params", "param-"), s = i(this, e, r, "query", "query-"), a = r.hasAttribute("replace") ? "replaceWith" : "transitionTo";
|
|
90
|
-
u[a](e, n, s);
|
|
91
|
-
}
|
|
92
|
-
function S(t, r = {}) {
|
|
93
|
-
const { selector: e = "[routerlinks]" } = r, n = e ? t.querySelectorAll(e) : [t], s = new MutationObserver(L), a = [];
|
|
94
|
-
return s.ownerEl = t, t[h] = { options: r, rootEls: n, observer: s }, n.forEach((c) => {
|
|
95
|
-
a.push(y(c, "click", "[route]", E, t)), k(t, c), s.observe(c, C);
|
|
96
|
-
}), f.add(t), function() {
|
|
97
|
-
f.delete(t), a.forEach((c, o) => A(n[o], c));
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
const m = (t, r = {}) => class extends t {
|
|
101
|
-
connectedCallback() {
|
|
102
|
-
super.connectedCallback && super.connectedCallback(), (this.updateComplete || p).then(() => {
|
|
103
|
-
this[l] = S(this, r);
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
disconnectedCallback() {
|
|
107
|
-
super.disconnectedCallback && super.disconnectedCallback(), this[l] && this[l]();
|
|
108
|
-
}
|
|
109
|
-
}, x = (t, r) => {
|
|
110
|
-
if (typeof t == "function")
|
|
111
|
-
return m(t, r);
|
|
112
|
-
if (t.kind === "class") {
|
|
113
|
-
const { kind: e, elements: n } = t;
|
|
114
|
-
return {
|
|
115
|
-
kind: e,
|
|
116
|
-
elements: n,
|
|
117
|
-
finisher(s) {
|
|
118
|
-
return m(s, r);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
return (e) => x(e, t);
|
|
123
|
-
};
|
|
124
|
-
function R(t) {
|
|
125
|
-
u = t;
|
|
126
|
-
}
|
|
127
|
-
function T() {
|
|
128
|
-
f.forEach((t) => {
|
|
129
|
-
t[h].rootEls.forEach((e) => {
|
|
130
|
-
const n = e.getAttribute("route");
|
|
131
|
-
if (!n)
|
|
132
|
-
return;
|
|
133
|
-
const s = i(t, n, e, "params", "param-"), a = i(t, n, e, "query", "query-");
|
|
134
|
-
g(e, n, s, a);
|
|
135
|
-
});
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
const K = {
|
|
139
|
-
create: R,
|
|
140
|
-
done: T
|
|
141
|
-
};
|
|
142
|
-
export {
|
|
143
|
-
S as b,
|
|
144
|
-
K as r,
|
|
145
|
-
x as w
|
|
146
|
-
};
|