@uoguelph/web-components 1.9.0-rc.4 → 1.9.0-rc.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/uofg-web-components/{font-awesome-icon-Dud1EYGD.js → font-awesome-icon-BQURLWNp.js} +624 -629
- package/dist/uofg-web-components/legacy-DxV08m0s.js +53 -0
- package/dist/uofg-web-components/{slot-Btyq796h.js → slot-CAT5FJeP.js} +1 -1
- package/dist/uofg-web-components/uofg-alert.esm.js +31 -30
- package/dist/uofg-web-components/uofg-back-to-top.esm.js +9 -9
- package/dist/uofg-web-components/uofg-footer.esm.js +204 -117
- package/dist/uofg-web-components/uofg-header.esm.js +635 -648
- package/dist/uofg-web-components/uofg-modal.esm.js +69 -69
- package/dist/uofg-web-components/{window-CAd-bPmb.js → window-DSxbAs0w.js} +1 -1
- package/package.json +1 -1
- package/dist/uofg-web-components/legacy-DI2J6sTz.js +0 -43
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { z as q, A as D, B as F, C as T, S as z,
|
|
2
|
-
import { a as W } from "./slot-
|
|
1
|
+
import { z as q, A as D, B as F, C as T, S as z, o as j, c as R, p as U, a as o, u as _, D as y, F as J, b as K, d as L, e as M, f as N, j as x, E as Y, h as l, i as G, k as H, t as v, s as I, l as P, m as Q, n as V, r as O } from "./font-awesome-icon-BQURLWNp.js";
|
|
2
|
+
import { a as W } from "./slot-CAT5FJeP.js";
|
|
3
3
|
import { t as X } from "./bundle-mjs-BpzLJ4dA.js";
|
|
4
|
-
function E(a,
|
|
5
|
-
return a ===
|
|
4
|
+
function E(a, e) {
|
|
5
|
+
return a === e || (a == null ? void 0 : a[z]) === e;
|
|
6
6
|
}
|
|
7
|
-
function B(a = {},
|
|
7
|
+
function B(a = {}, e, s, c) {
|
|
8
8
|
return q(() => {
|
|
9
|
-
var i,
|
|
9
|
+
var i, n;
|
|
10
10
|
return D(() => {
|
|
11
|
-
i =
|
|
12
|
-
a !== s(...
|
|
11
|
+
i = n, n = [], F(() => {
|
|
12
|
+
a !== s(...n) && (e(a, ...n), i && E(s(...i), a) && e(null, ...i));
|
|
13
13
|
});
|
|
14
14
|
}), () => {
|
|
15
15
|
T(() => {
|
|
16
|
-
|
|
16
|
+
n && E(s(...n), a) && e(null, ...n);
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
}), a;
|
|
20
20
|
}
|
|
21
|
-
const Z = (a) => Array.from(a.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [contenteditable], audio[controls], video[controls], details, summary, [tabindex]:not([tabindex="-1"])')), $ = (a,
|
|
22
|
-
!
|
|
23
|
-
},
|
|
24
|
-
a.key === "Escape" &&
|
|
25
|
-
},
|
|
26
|
-
var
|
|
27
|
-
if (
|
|
21
|
+
const Z = (a) => Array.from(a.querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [contenteditable], audio[controls], video[controls], details, summary, [tabindex]:not([tabindex="-1"])')), $ = (a, e, s) => {
|
|
22
|
+
!e() && a.target === a.currentTarget && s(!1);
|
|
23
|
+
}, tt = (a, e) => {
|
|
24
|
+
a.key === "Escape" && e(!1);
|
|
25
|
+
}, et = (a, e, s, c, i) => {
|
|
26
|
+
var n;
|
|
27
|
+
if (e() && !s().contains(a.relatedTarget) && !c().contains(a.relatedTarget))
|
|
28
28
|
if (a.preventDefault(), a.target === i()) {
|
|
29
29
|
const d = Z(c());
|
|
30
|
-
(
|
|
30
|
+
(n = d[d.length - 1]) == null || n.focus();
|
|
31
31
|
} else
|
|
32
32
|
i().focus();
|
|
33
33
|
};
|
|
34
|
-
var
|
|
35
|
-
function
|
|
36
|
-
U(
|
|
37
|
-
let s =
|
|
34
|
+
var at = (a, e) => e(!1), st = N('<div class="fixed left-0 top-0 z-[1000] flex h-screen w-screen bg-black bg-opacity-50 transition-[opacity,visibility]"><div part="content"><button class="absolute right-0 top-0 -translate-x-1/2 translate-y-1/2 z-[2] flex aspect-square w-8 items-center justify-center border border-black/30 text-black-contrast text-lg transition-colors bg-black hover:bg-red focus:bg-red hover:text-red-contrast focus:text-red-contrast rounded-full p-2" aria-label="Close modal"><!></button> <!></div></div>');
|
|
35
|
+
function rt(a, e) {
|
|
36
|
+
U(e, !0);
|
|
37
|
+
let s = o(e, "isOpen", 15), c = o(e, "centered", 7), i = o(e, "autoOpen", 7), n = o(e, "label", 7), d = o(e, "alertDialog", 7), k = o(e, "staticBackdrop", 7), m = o(e, "dismissButton", 7), f = o(e, "container", 7), b = o(e, "el", 7), p = o(e, "inertElements", 7);
|
|
38
38
|
_(() => {
|
|
39
39
|
i() && s(!0);
|
|
40
40
|
}), _(() => {
|
|
@@ -46,112 +46,112 @@ function ne(a, t) {
|
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
|
-
let
|
|
50
|
-
for (;
|
|
51
|
-
const h =
|
|
49
|
+
let t = b();
|
|
50
|
+
for (; t !== null && t !== document.body; ) {
|
|
51
|
+
const h = t.parentElement;
|
|
52
52
|
if (h === null) {
|
|
53
|
-
const u =
|
|
53
|
+
const u = t.getRootNode();
|
|
54
54
|
if (u instanceof ShadowRoot) {
|
|
55
|
-
|
|
55
|
+
t = u.host;
|
|
56
56
|
continue;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
if (h !== null)
|
|
60
60
|
for (const u of h.children)
|
|
61
|
-
u !==
|
|
62
|
-
|
|
61
|
+
u !== t && !u.inert && (u.inert = !0, p().push(u));
|
|
62
|
+
t = h;
|
|
63
63
|
}
|
|
64
64
|
b().dispatchEvent(new CustomEvent("opened", { bubbles: !0, composed: !0 }));
|
|
65
65
|
} else {
|
|
66
|
-
for (const
|
|
67
|
-
|
|
66
|
+
for (const t of p())
|
|
67
|
+
t.removeAttribute("inert");
|
|
68
68
|
p([]), b().dispatchEvent(new CustomEvent("closed", { bubbles: !0, composed: !0 }));
|
|
69
69
|
}
|
|
70
70
|
document.body.style.overflow = s() ? "hidden" : "";
|
|
71
71
|
});
|
|
72
|
-
var
|
|
73
|
-
y(
|
|
74
|
-
|
|
72
|
+
var r = st();
|
|
73
|
+
y(r, "tabindex", -1), r.__click = [$, k, s], r.__keyup = [tt, s], r.__focusout = [
|
|
74
|
+
et,
|
|
75
75
|
s,
|
|
76
76
|
f,
|
|
77
77
|
b,
|
|
78
78
|
m
|
|
79
79
|
];
|
|
80
|
-
var w =
|
|
80
|
+
var w = x(r);
|
|
81
81
|
const A = Q(() => V(X("z-1 absolute left-1/2 h-fit max-h-full max-w-full -translate-x-1/2 overflow-auto w-full sm:w-fit sm:p-8 transition-transform motion-reduce:transition-none", s() && "visible opacity-100", !s() && !c() && "translate-y-[-50px]", !s() && c() && "translate-y-[calc(-50%_-_50px)] top-1/2", s() && c() && "translate-y-[-50%] top-1/2")));
|
|
82
|
-
var g =
|
|
83
|
-
g.__click = [
|
|
84
|
-
var C =
|
|
85
|
-
|
|
82
|
+
var g = x(w);
|
|
83
|
+
g.__click = [at, s];
|
|
84
|
+
var C = x(g);
|
|
85
|
+
J(C, { icon: Y }), O(g), B(g, (t) => m(t), () => m());
|
|
86
86
|
var S = H(g, 2);
|
|
87
|
-
return W(S,
|
|
88
|
-
y(
|
|
89
|
-
}),
|
|
87
|
+
return W(S, e, "default", {}), O(w), O(r), B(r, (t) => f(t), () => f()), K(() => {
|
|
88
|
+
y(r, "role", d() ? "alertdialog" : "dialog"), y(r, "aria-modal", s() ? "true" : ""), y(r, "aria-label", n()), v(r, "visible", s()), v(r, "opacity-100", s()), v(r, "invisible", !s()), v(r, "opacity-0", !s()), I(w, P(A));
|
|
89
|
+
}), L(a, r), M({
|
|
90
90
|
get isOpen() {
|
|
91
91
|
return s();
|
|
92
92
|
},
|
|
93
|
-
set isOpen(
|
|
94
|
-
s(
|
|
93
|
+
set isOpen(t) {
|
|
94
|
+
s(t), l();
|
|
95
95
|
},
|
|
96
96
|
get centered() {
|
|
97
97
|
return c();
|
|
98
98
|
},
|
|
99
|
-
set centered(
|
|
100
|
-
c(
|
|
99
|
+
set centered(t) {
|
|
100
|
+
c(t), l();
|
|
101
101
|
},
|
|
102
102
|
get autoOpen() {
|
|
103
103
|
return i();
|
|
104
104
|
},
|
|
105
|
-
set autoOpen(
|
|
106
|
-
i(
|
|
105
|
+
set autoOpen(t) {
|
|
106
|
+
i(t), l();
|
|
107
107
|
},
|
|
108
108
|
get label() {
|
|
109
|
-
return
|
|
109
|
+
return n();
|
|
110
110
|
},
|
|
111
|
-
set label(
|
|
112
|
-
|
|
111
|
+
set label(t) {
|
|
112
|
+
n(t), l();
|
|
113
113
|
},
|
|
114
114
|
get alertDialog() {
|
|
115
115
|
return d();
|
|
116
116
|
},
|
|
117
|
-
set alertDialog(
|
|
118
|
-
d(
|
|
117
|
+
set alertDialog(t) {
|
|
118
|
+
d(t), l();
|
|
119
119
|
},
|
|
120
120
|
get staticBackdrop() {
|
|
121
121
|
return k();
|
|
122
122
|
},
|
|
123
|
-
set staticBackdrop(
|
|
124
|
-
k(
|
|
123
|
+
set staticBackdrop(t) {
|
|
124
|
+
k(t), l();
|
|
125
125
|
},
|
|
126
126
|
get dismissButton() {
|
|
127
127
|
return m();
|
|
128
128
|
},
|
|
129
|
-
set dismissButton(
|
|
130
|
-
m(
|
|
129
|
+
set dismissButton(t) {
|
|
130
|
+
m(t), l();
|
|
131
131
|
},
|
|
132
132
|
get container() {
|
|
133
133
|
return f();
|
|
134
134
|
},
|
|
135
|
-
set container(
|
|
136
|
-
f(
|
|
135
|
+
set container(t) {
|
|
136
|
+
f(t), l();
|
|
137
137
|
},
|
|
138
138
|
get el() {
|
|
139
139
|
return b();
|
|
140
140
|
},
|
|
141
|
-
set el(
|
|
142
|
-
b(
|
|
141
|
+
set el(t) {
|
|
142
|
+
b(t), l();
|
|
143
143
|
},
|
|
144
144
|
get inertElements() {
|
|
145
145
|
return p();
|
|
146
146
|
},
|
|
147
|
-
set inertElements(
|
|
148
|
-
p(
|
|
147
|
+
set inertElements(t) {
|
|
148
|
+
p(t), l();
|
|
149
149
|
}
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
152
|
j(["click", "keyup", "focusout"]);
|
|
153
153
|
customElements.define("uofg-modal", R(
|
|
154
|
-
|
|
154
|
+
rt,
|
|
155
155
|
{
|
|
156
156
|
label: {
|
|
157
157
|
attribute: "label",
|
|
@@ -189,21 +189,21 @@ customElements.define("uofg-modal", R(
|
|
|
189
189
|
!0,
|
|
190
190
|
(a) => class extends a {
|
|
191
191
|
constructor() {
|
|
192
|
-
super(),
|
|
192
|
+
super(), G(this.shadowRoot), this.el = this, this.inertElements = [];
|
|
193
193
|
}
|
|
194
194
|
connectedCallback() {
|
|
195
195
|
super.connectedCallback();
|
|
196
196
|
}
|
|
197
197
|
disconnectedCallback() {
|
|
198
198
|
super.disconnectedCallback();
|
|
199
|
-
for (const
|
|
200
|
-
|
|
199
|
+
for (const e of this.inertElements)
|
|
200
|
+
e.removeAttribute("inert");
|
|
201
201
|
}
|
|
202
202
|
getState() {
|
|
203
203
|
return this.isOpen;
|
|
204
204
|
}
|
|
205
|
-
setState(
|
|
206
|
-
this.isOpen =
|
|
205
|
+
setState(e) {
|
|
206
|
+
this.isOpen = e;
|
|
207
207
|
}
|
|
208
208
|
toggle() {
|
|
209
209
|
return this.isOpen = !this.isOpen, this.isOpen;
|
|
@@ -217,5 +217,5 @@ customElements.define("uofg-modal", R(
|
|
|
217
217
|
}
|
|
218
218
|
));
|
|
219
219
|
export {
|
|
220
|
-
|
|
220
|
+
rt as default
|
|
221
221
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as w, z as d, aC as f, aD as v, aE as n } from "./font-awesome-icon-
|
|
1
|
+
import { A as w, z as d, aC as f, aD as v, aE as n } from "./font-awesome-icon-BQURLWNp.js";
|
|
2
2
|
function m(a, e, c = e) {
|
|
3
3
|
var u = a === "x", s = () => n(() => {
|
|
4
4
|
r = !0, clearTimeout(t), t = setTimeout(l, 100), c(window[u ? "scrollX" : "scrollY"]);
|
package/package.json
CHANGED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { aF as d, D as c, B as g, aG as i, u as p, al as m, aH as b, aI as v, w as h, aJ as k } from "./font-awesome-icon-Dud1EYGD.js";
|
|
2
|
-
function x(t = !1) {
|
|
3
|
-
const s = (
|
|
4
|
-
/** @type {ComponentContextLegacy} */
|
|
5
|
-
m
|
|
6
|
-
), e = s.l.u;
|
|
7
|
-
if (!e) return;
|
|
8
|
-
let f = () => v(s.s);
|
|
9
|
-
if (t) {
|
|
10
|
-
let n = 0, a = (
|
|
11
|
-
/** @type {Record<string, any>} */
|
|
12
|
-
{}
|
|
13
|
-
);
|
|
14
|
-
const _ = h(() => {
|
|
15
|
-
let l = !1;
|
|
16
|
-
const r = s.s;
|
|
17
|
-
for (const o in r)
|
|
18
|
-
r[o] !== a[o] && (a[o] = r[o], l = !0);
|
|
19
|
-
return l && n++, n;
|
|
20
|
-
});
|
|
21
|
-
f = () => p(_);
|
|
22
|
-
}
|
|
23
|
-
e.b.length && d(() => {
|
|
24
|
-
u(s, f), i(e.b);
|
|
25
|
-
}), c(() => {
|
|
26
|
-
const n = g(() => e.m.map(b));
|
|
27
|
-
return () => {
|
|
28
|
-
for (const a of n)
|
|
29
|
-
typeof a == "function" && a();
|
|
30
|
-
};
|
|
31
|
-
}), e.a.length && c(() => {
|
|
32
|
-
u(s, f), i(e.a);
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
function u(t, s) {
|
|
36
|
-
if (t.l.s)
|
|
37
|
-
for (const e of t.l.s) p(e);
|
|
38
|
-
s();
|
|
39
|
-
}
|
|
40
|
-
k();
|
|
41
|
-
export {
|
|
42
|
-
x as i
|
|
43
|
-
};
|