@uoguelph/web-components 2.0.8-rc.0 → 2.0.9-rc.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/uofg-web-components/index-BxiW26Pq.js +8728 -0
- package/dist/uofg-web-components/{index-C6ZIYhZ_.js → index-CsiSOAU0.js} +25 -25
- package/dist/uofg-web-components/{index-client-Cf3Y5mtB.js → index-client-DG7fHzcC.js} +1 -1
- package/dist/uofg-web-components/legacy-Bte-v9mf.js +98 -0
- package/dist/uofg-web-components/{slot-DaIvQlrl.js → slot-DAai__2s.js} +1 -1
- package/dist/uofg-web-components/uofg-alert.esm.js +36 -52
- package/dist/uofg-web-components/uofg-back-to-top.esm.js +17 -23
- package/dist/uofg-web-components/uofg-footer.esm.js +217 -232
- package/dist/uofg-web-components/uofg-header.esm.js +783 -840
- package/dist/uofg-web-components/uofg-modal.esm.js +106 -142
- package/dist/uofg-web-components/uofg-web-components.css +1 -1
- package/dist/uofg-web-components/window-Br-wveUj.js +25 -0
- package/package.json +1 -1
- package/dist/uofg-web-components/index-CEFM1xyC.js +0 -7830
- package/dist/uofg-web-components/legacy-eE7eSuBp.js +0 -101
- package/dist/uofg-web-components/window-BAHesVQ-.js +0 -25
|
@@ -1,74 +1,75 @@
|
|
|
1
|
-
import { w as
|
|
2
|
-
import { a as
|
|
3
|
-
function B(
|
|
4
|
-
return
|
|
1
|
+
import { w as K, x as L, y as M, z as N, S as V, l as Y, c as G, p as H, a as o, A as _, f as I, B as h, e as x, F as J, C as P, s as Q, t as W, g as k, h as w, i as X, j as Z, k as l, r as E, b as $ } from "./index-BxiW26Pq.js";
|
|
2
|
+
import { a as ee } from "./slot-DAai__2s.js";
|
|
3
|
+
function B(s, t) {
|
|
4
|
+
return s === t || (s == null ? void 0 : s[V]) === t;
|
|
5
5
|
}
|
|
6
|
-
function A(
|
|
7
|
-
return
|
|
8
|
-
var
|
|
9
|
-
return
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
function A(s = {}, t, n, g) {
|
|
7
|
+
return K(() => {
|
|
8
|
+
var u, i;
|
|
9
|
+
return L(() => {
|
|
10
|
+
u = i, i = [], M(() => {
|
|
11
|
+
s !== n(...i) && (t(s, ...i), u && B(n(...u), s) && t(null, ...u));
|
|
12
12
|
});
|
|
13
13
|
}), () => {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
N(() => {
|
|
15
|
+
i && B(n(...i), s) && t(null, ...i);
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
}),
|
|
18
|
+
}), s;
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
20
|
+
const te = (s) => Array.from(s.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"])'));
|
|
21
|
+
var se = I('<div><div part="content"><button aria-label="Close modal"><!></button> <!></div></div>');
|
|
22
|
+
function ne(s, t) {
|
|
23
|
+
H(t, !0);
|
|
24
|
+
let n = o(t, "isOpen", 15), g = o(t, "centered", 7), u = o(t, "autoOpen", 7), i = o(t, "label", 7), y = o(t, "alertDialog", 7), v = o(t, "staticBackdrop", 7), f = o(t, "dismissButton", 7), b = o(t, "container", 7), d = o(t, "el", 7), m = o(t, "inertElements", 7);
|
|
25
|
+
const S = (e) => {
|
|
26
|
+
!v() && e.target === e.currentTarget && n(!1);
|
|
27
|
+
}, q = (e) => {
|
|
28
|
+
e.key === "Escape" && n(!1);
|
|
29
|
+
}, F = (e) => {
|
|
30
|
+
var c;
|
|
31
|
+
if (n() && !b().contains(e.relatedTarget) && !d().contains(e.relatedTarget))
|
|
32
|
+
if (e.preventDefault(), e.target === f()) {
|
|
33
|
+
const r = te(d());
|
|
34
|
+
(c = r[r.length - 1]) == null || c.focus();
|
|
35
|
+
} else
|
|
36
|
+
f().focus();
|
|
37
|
+
};
|
|
38
|
+
_(() => {
|
|
39
|
+
u() && n(!0);
|
|
40
|
+
}), _(() => {
|
|
41
|
+
if (n()) {
|
|
41
42
|
window.requestAnimationFrame(() => {
|
|
42
43
|
window.requestAnimationFrame(() => {
|
|
43
44
|
window.requestAnimationFrame(() => {
|
|
44
|
-
|
|
45
|
+
b().focus();
|
|
45
46
|
});
|
|
46
47
|
});
|
|
47
48
|
});
|
|
48
|
-
let e =
|
|
49
|
+
let e = d();
|
|
49
50
|
for (; e !== null && e !== document.body; ) {
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
e =
|
|
51
|
+
const c = e.parentElement;
|
|
52
|
+
if (c === null) {
|
|
53
|
+
const r = e.getRootNode();
|
|
54
|
+
if (r instanceof ShadowRoot) {
|
|
55
|
+
e = r.host;
|
|
55
56
|
continue;
|
|
56
57
|
}
|
|
57
58
|
}
|
|
58
|
-
if (
|
|
59
|
-
for (const
|
|
60
|
-
|
|
61
|
-
e =
|
|
59
|
+
if (c !== null)
|
|
60
|
+
for (const r of c.children)
|
|
61
|
+
r !== e && !r.inert && (r.inert = !0, m().push(r));
|
|
62
|
+
e = c;
|
|
62
63
|
}
|
|
63
|
-
|
|
64
|
+
d().dispatchEvent(new CustomEvent("opened", { bubbles: !0, composed: !0 }));
|
|
64
65
|
} else {
|
|
65
|
-
for (const e of
|
|
66
|
+
for (const e of m())
|
|
66
67
|
e.removeAttribute("inert");
|
|
67
|
-
|
|
68
|
+
m([]), d().dispatchEvent(new CustomEvent("closed", { bubbles: !0, composed: !0 }));
|
|
68
69
|
}
|
|
69
|
-
document.body.style.overflow =
|
|
70
|
+
document.body.style.overflow = n() ? "hidden" : "";
|
|
70
71
|
});
|
|
71
|
-
const
|
|
72
|
+
const T = tv({
|
|
72
73
|
slots: {
|
|
73
74
|
base: "bg-opacity-50 fixed top-0 left-0 z-[1000] flex h-screen w-screen bg-black transition-[opacity,visibility]",
|
|
74
75
|
content: "absolute left-1/2 z-1 h-fit max-h-full w-full max-w-full -translate-x-1/2 overflow-auto transition-transform motion-reduce:transition-none sm:w-fit sm:p-8",
|
|
@@ -76,14 +77,8 @@ function se(n, t) {
|
|
|
76
77
|
},
|
|
77
78
|
variants: {
|
|
78
79
|
isOpen: {
|
|
79
|
-
true: {
|
|
80
|
-
|
|
81
|
-
content: "visible opacity-100"
|
|
82
|
-
},
|
|
83
|
-
false: {
|
|
84
|
-
base: "invisible opacity-0",
|
|
85
|
-
content: "invisible opacity-0"
|
|
86
|
-
}
|
|
80
|
+
true: { base: "visible opacity-100", content: "visible opacity-100" },
|
|
81
|
+
false: { base: "invisible opacity-0", content: "invisible opacity-0" }
|
|
87
82
|
},
|
|
88
83
|
centered: { true: "" }
|
|
89
84
|
},
|
|
@@ -101,71 +96,40 @@ function se(n, t) {
|
|
|
101
96
|
{
|
|
102
97
|
isOpen: !1,
|
|
103
98
|
centered: !0,
|
|
104
|
-
class: {
|
|
105
|
-
content: "top-1/2 translate-y-[calc(-50%_-_50px)]"
|
|
106
|
-
}
|
|
99
|
+
class: { content: "top-1/2 translate-y-[calc(-50%_-_50px)]" }
|
|
107
100
|
}
|
|
108
101
|
]
|
|
109
|
-
}), { base:
|
|
110
|
-
|
|
111
|
-
centered: u()
|
|
112
|
-
});
|
|
113
|
-
var r = ne();
|
|
114
|
-
y(r, "tabindex", -1), r.__click = [Z, v, s], r.__keyup = [$, s], r.__focusout = [
|
|
115
|
-
ee,
|
|
116
|
-
s,
|
|
117
|
-
f,
|
|
118
|
-
b,
|
|
119
|
-
g
|
|
120
|
-
];
|
|
121
|
-
var O = k(r), p = k(O);
|
|
122
|
-
p.__click = [te, s];
|
|
123
|
-
var C = k(p);
|
|
124
|
-
Y(C, {
|
|
125
|
-
get icon() {
|
|
126
|
-
return G;
|
|
127
|
-
}
|
|
128
|
-
}), _(p), A(p, (e) => g(e), () => g());
|
|
129
|
-
var D = H(p, 2);
|
|
130
|
-
return W(D, t, "default", {}), _(O), _(r), A(r, (e) => f(e), () => f()), I(
|
|
131
|
-
(e, m, c) => {
|
|
132
|
-
x(r, 1, e), y(r, "role", d() ? "alertdialog" : "dialog"), y(r, "aria-modal", s() ? "true" : ""), y(r, "aria-label", a()), x(O, 1, m), x(p, 1, c);
|
|
133
|
-
},
|
|
134
|
-
[
|
|
135
|
-
() => w(q()),
|
|
136
|
-
() => w(F()),
|
|
137
|
-
() => w(T())
|
|
138
|
-
]
|
|
139
|
-
), J(n, r), P({
|
|
102
|
+
}), { base: C, content: D, button: z } = T({ isOpen: n(), centered: g() });
|
|
103
|
+
var j = {
|
|
140
104
|
get isOpen() {
|
|
141
|
-
return
|
|
105
|
+
return n();
|
|
142
106
|
},
|
|
143
107
|
set isOpen(e) {
|
|
144
|
-
|
|
108
|
+
n(e), l();
|
|
145
109
|
},
|
|
146
110
|
get centered() {
|
|
147
|
-
return
|
|
111
|
+
return g();
|
|
148
112
|
},
|
|
149
113
|
set centered(e) {
|
|
150
|
-
|
|
114
|
+
g(e), l();
|
|
151
115
|
},
|
|
152
116
|
get autoOpen() {
|
|
153
|
-
return
|
|
117
|
+
return u();
|
|
154
118
|
},
|
|
155
119
|
set autoOpen(e) {
|
|
156
|
-
|
|
120
|
+
u(e), l();
|
|
157
121
|
},
|
|
158
122
|
get label() {
|
|
159
|
-
return
|
|
123
|
+
return i();
|
|
160
124
|
},
|
|
161
125
|
set label(e) {
|
|
162
|
-
|
|
126
|
+
i(e), l();
|
|
163
127
|
},
|
|
164
128
|
get alertDialog() {
|
|
165
|
-
return
|
|
129
|
+
return y();
|
|
166
130
|
},
|
|
167
131
|
set alertDialog(e) {
|
|
168
|
-
|
|
132
|
+
y(e), l();
|
|
169
133
|
},
|
|
170
134
|
get staticBackdrop() {
|
|
171
135
|
return v();
|
|
@@ -174,60 +138,60 @@ function se(n, t) {
|
|
|
174
138
|
v(e), l();
|
|
175
139
|
},
|
|
176
140
|
get dismissButton() {
|
|
177
|
-
return
|
|
141
|
+
return f();
|
|
178
142
|
},
|
|
179
143
|
set dismissButton(e) {
|
|
180
|
-
|
|
144
|
+
f(e), l();
|
|
181
145
|
},
|
|
182
146
|
get container() {
|
|
183
|
-
return
|
|
147
|
+
return b();
|
|
184
148
|
},
|
|
185
149
|
set container(e) {
|
|
186
|
-
|
|
150
|
+
b(e), l();
|
|
187
151
|
},
|
|
188
152
|
get el() {
|
|
189
|
-
return
|
|
153
|
+
return d();
|
|
190
154
|
},
|
|
191
155
|
set el(e) {
|
|
192
|
-
|
|
156
|
+
d(e), l();
|
|
193
157
|
},
|
|
194
158
|
get inertElements() {
|
|
195
|
-
return
|
|
159
|
+
return m();
|
|
196
160
|
},
|
|
197
161
|
set inertElements(e) {
|
|
198
|
-
|
|
162
|
+
m(e), l();
|
|
199
163
|
}
|
|
200
|
-
});
|
|
164
|
+
}, a = se();
|
|
165
|
+
h(a, "tabindex", -1), a.__click = S, a.__keyup = q, a.__focusout = F;
|
|
166
|
+
var O = x(a), p = x(O);
|
|
167
|
+
p.__click = () => n(!1);
|
|
168
|
+
var R = x(p);
|
|
169
|
+
J(R, {
|
|
170
|
+
get icon() {
|
|
171
|
+
return P;
|
|
172
|
+
}
|
|
173
|
+
}), E(p), A(p, (e) => f(e), () => f());
|
|
174
|
+
var U = Q(p, 2);
|
|
175
|
+
return ee(U, t, "default", {}), E(O), E(a), A(a, (e) => b(e), () => b()), W(
|
|
176
|
+
(e, c, r) => {
|
|
177
|
+
w(a, 1, e), h(a, "role", y() ? "alertdialog" : "dialog"), h(a, "aria-modal", n() ? "true" : ""), h(a, "aria-label", i()), w(O, 1, c), w(p, 1, r);
|
|
178
|
+
},
|
|
179
|
+
[
|
|
180
|
+
() => k(C()),
|
|
181
|
+
() => k(D()),
|
|
182
|
+
() => k(z())
|
|
183
|
+
]
|
|
184
|
+
), X(s, a), Z(j);
|
|
201
185
|
}
|
|
202
|
-
|
|
203
|
-
customElements.define("uofg-modal",
|
|
204
|
-
|
|
186
|
+
Y(["click", "keyup", "focusout"]);
|
|
187
|
+
customElements.define("uofg-modal", G(
|
|
188
|
+
ne,
|
|
205
189
|
{
|
|
206
|
-
label: {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
},
|
|
211
|
-
alertDialog: {
|
|
212
|
-
attribute: "alert-dialog",
|
|
213
|
-
reflect: !0,
|
|
214
|
-
type: "String"
|
|
215
|
-
},
|
|
216
|
-
centered: {
|
|
217
|
-
attribute: "centered",
|
|
218
|
-
reflect: !0,
|
|
219
|
-
type: "Boolean"
|
|
220
|
-
},
|
|
221
|
-
autoOpen: {
|
|
222
|
-
attribute: "auto-open",
|
|
223
|
-
reflect: !0,
|
|
224
|
-
type: "Boolean"
|
|
225
|
-
},
|
|
226
|
-
staticBackdrop: {
|
|
227
|
-
attribute: "static-backdrop",
|
|
228
|
-
reflect: !0,
|
|
229
|
-
type: "Boolean"
|
|
230
|
-
},
|
|
190
|
+
label: { attribute: "label", reflect: !0, type: "String" },
|
|
191
|
+
alertDialog: { attribute: "alert-dialog", reflect: !0, type: "String" },
|
|
192
|
+
centered: { attribute: "centered", reflect: !0, type: "Boolean" },
|
|
193
|
+
autoOpen: { attribute: "auto-open", reflect: !0, type: "Boolean" },
|
|
194
|
+
staticBackdrop: { attribute: "static-backdrop", reflect: !0, type: "Boolean" },
|
|
231
195
|
isOpen: {},
|
|
232
196
|
dismissButton: {},
|
|
233
197
|
container: {},
|
|
@@ -237,9 +201,9 @@ customElements.define("uofg-modal", M(
|
|
|
237
201
|
["default"],
|
|
238
202
|
[],
|
|
239
203
|
!0,
|
|
240
|
-
(
|
|
204
|
+
(s) => class extends s {
|
|
241
205
|
constructor() {
|
|
242
|
-
super(),
|
|
206
|
+
super(), $(this.shadowRoot), this.el = this, this.inertElements = [], this.isOpen = !1;
|
|
243
207
|
}
|
|
244
208
|
disconnectedCallback() {
|
|
245
209
|
for (const t of this.inertElements)
|
|
@@ -263,5 +227,5 @@ customElements.define("uofg-modal", M(
|
|
|
263
227
|
}
|
|
264
228
|
));
|
|
265
229
|
export {
|
|
266
|
-
|
|
230
|
+
ne as default
|
|
267
231
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{font-size:62.5%}body{font-size:1.6rem;margin:0;padding:0}uofg-header{display:block;width:100%}uofg-header *{display:none}uofg-header:defined{height:fit-content!important}uofg-header:not(:defined){height:5rem!important;background-color:#000}@media screen and (min-width:
|
|
1
|
+
:root{font-size:62.5%}body{font-size:1.6rem;margin:0;padding:0}uofg-header{display:block;width:100%}uofg-header *{display:none}uofg-header:defined{height:fit-content!important}uofg-header:not(:defined){height:5rem!important;background-color:#000}@media screen and (min-width:1024px){uofg-header:not(:defined){height:14rem!important;background:linear-gradient(180deg,#fff,#fff 28%,#000 28%,#000)}}uofg-header:not(:defined):has(*),uofg-header:not(:defined)[page-title]{height:10rem!important;background:linear-gradient(0deg,#ddd,#ddd 50%,#000 50%,#000)}@media screen and (min-width:1024px){uofg-header:not(:defined):has(*),uofg-header:not(:defined)[page-title]{height:18rem!important;background:linear-gradient(180deg,#fff,#fff 22%,#000 22%,#000 78%,#ddd 78%,#ddd)}}uofg-header:not(:defined):has(*)[variant=dual-brand],uofg-header:not(:defined)[page-title][variant=dual-brand]{height:11.5rem!important}@media screen and (min-width:1024px){uofg-header:not(:defined):has(*)[variant=dual-brand],uofg-header:not(:defined)[page-title][variant=dual-brand]{height:14rem!important}}uofg-footer{display:block}uofg-modal{display:block;position:fixed;visibility:hidden;z-index:1000}uofg-alert{display:block;max-width:100rem}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { a4 as n, x as u, w as d, ak as f, al as v } from "./index-BxiW26Pq.js";
|
|
2
|
+
function m(a, e, c = e) {
|
|
3
|
+
var w = a === "x", l = () => n(() => {
|
|
4
|
+
r = !0, clearTimeout(t), t = setTimeout(s, 100), c(window[w ? "scrollX" : "scrollY"]);
|
|
5
|
+
});
|
|
6
|
+
addEventListener("scroll", l, {
|
|
7
|
+
passive: !0
|
|
8
|
+
});
|
|
9
|
+
var r = !1, t, s = () => {
|
|
10
|
+
r = !1;
|
|
11
|
+
}, i = !0;
|
|
12
|
+
u(() => {
|
|
13
|
+
var o = e();
|
|
14
|
+
i ? i = !1 : !r && o != null && (r = !0, clearTimeout(t), scrollTo(window.scrollX, o), t = setTimeout(s, 100));
|
|
15
|
+
}), d(l), f(() => {
|
|
16
|
+
removeEventListener("scroll", l);
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function x(a, e) {
|
|
20
|
+
v(window, ["resize"], () => n(() => e(window[a])));
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
x as a,
|
|
24
|
+
m as b
|
|
25
|
+
};
|