@uoguelph/web-components 1.9.1-rc.5 → 1.9.1-rc.8
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/README.md +1 -1
- package/dist/uofg-web-components/bundle-mjs-DH8HDGzd.js +2528 -0
- package/dist/uofg-web-components/index-3NMKGd5b.js +5209 -0
- package/dist/uofg-web-components/index-O5kp37c8.js +2423 -0
- package/dist/uofg-web-components/index-client-CdY8lBml.js +20 -0
- package/dist/uofg-web-components/{slot-YHqkDhIT.js → slot-B1Z_DMrF.js} +1 -1
- package/dist/uofg-web-components/uofg-alert.esm.js +63 -34
- package/dist/uofg-web-components/uofg-back-to-top.esm.js +25 -18
- package/dist/uofg-web-components/uofg-footer.esm.js +291 -2680
- package/dist/uofg-web-components/uofg-header.esm.js +900 -862
- package/dist/uofg-web-components/uofg-modal.esm.js +136 -102
- package/dist/uofg-web-components/uofg-web-components.esm.js +5 -7
- package/dist/uofg-web-components/{window-8JtdasVs.js → window-CMuesI6s.js} +6 -6
- package/package.json +3 -3
- package/dist/uofg-web-components/bundle-mjs-XDpZcCQJ.js +0 -4898
- package/dist/uofg-web-components/legacy-CQFpMkNv.js +0 -53
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
function B(
|
|
4
|
-
return
|
|
1
|
+
import { x as z, y as j, z as R, A as U, S as K, l as L, c as M, p as N, a as o, B as _, t as V, C as y, d as k, F as Y, D as G, s as H, e as I, g as x, h as w, i as J, j as P, k as l, r as E, b as Q } from "./index-3NMKGd5b.js";
|
|
2
|
+
import { a as W } from "./slot-B1Z_DMrF.js";
|
|
3
|
+
function B(n, t) {
|
|
4
|
+
return n === t || (n == null ? void 0 : n[K]) === t;
|
|
5
5
|
}
|
|
6
|
-
function A(
|
|
7
|
-
return
|
|
8
|
-
var i,
|
|
9
|
-
return
|
|
10
|
-
i =
|
|
11
|
-
|
|
6
|
+
function A(n = {}, t, s, u) {
|
|
7
|
+
return z(() => {
|
|
8
|
+
var i, a;
|
|
9
|
+
return j(() => {
|
|
10
|
+
i = a, a = [], R(() => {
|
|
11
|
+
n !== s(...a) && (t(n, ...a), i && B(s(...i), n) && t(null, ...i));
|
|
12
12
|
});
|
|
13
13
|
}), () => {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
U(() => {
|
|
15
|
+
a && B(s(...a), n) && t(null, ...a);
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
}),
|
|
18
|
+
}), n;
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
!
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
var
|
|
26
|
-
if (
|
|
27
|
-
if (
|
|
28
|
-
const d =
|
|
29
|
-
(
|
|
20
|
+
const X = (n) => Array.from(n.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"])')), Z = (n, t, s) => {
|
|
21
|
+
!t() && n.target === n.currentTarget && s(!1);
|
|
22
|
+
}, $ = (n, t) => {
|
|
23
|
+
n.key === "Escape" && t(!1);
|
|
24
|
+
}, ee = (n, t, s, u, i) => {
|
|
25
|
+
var a;
|
|
26
|
+
if (t() && !s().contains(n.relatedTarget) && !u().contains(n.relatedTarget))
|
|
27
|
+
if (n.preventDefault(), n.target === i()) {
|
|
28
|
+
const d = X(u());
|
|
29
|
+
(a = d[d.length - 1]) == null || a.focus();
|
|
30
30
|
} else
|
|
31
31
|
i().focus();
|
|
32
32
|
};
|
|
33
|
-
var
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
let s =
|
|
37
|
-
|
|
33
|
+
var te = (n, t) => t(!1), ne = V('<div><div part="content"><button aria-label="Close modal"><!></button> <!></div></div>');
|
|
34
|
+
function se(n, t) {
|
|
35
|
+
N(t, !0);
|
|
36
|
+
let s = o(t, "isOpen", 15), u = o(t, "centered", 7), i = o(t, "autoOpen", 7), a = o(t, "label", 7), d = o(t, "alertDialog", 7), v = o(t, "staticBackdrop", 7), g = o(t, "dismissButton", 7), f = o(t, "container", 7), b = o(t, "el", 7), h = o(t, "inertElements", 7);
|
|
37
|
+
_(() => {
|
|
38
38
|
i() && s(!0);
|
|
39
|
-
}),
|
|
39
|
+
}), _(() => {
|
|
40
40
|
if (s()) {
|
|
41
41
|
window.requestAnimationFrame(() => {
|
|
42
42
|
window.requestAnimationFrame(() => {
|
|
@@ -45,121 +45,159 @@ function et(a, e) {
|
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
|
-
let
|
|
49
|
-
for (;
|
|
50
|
-
const
|
|
51
|
-
if (
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
54
|
-
|
|
48
|
+
let e = b();
|
|
49
|
+
for (; e !== null && e !== document.body; ) {
|
|
50
|
+
const m = e.parentElement;
|
|
51
|
+
if (m === null) {
|
|
52
|
+
const c = e.getRootNode();
|
|
53
|
+
if (c instanceof ShadowRoot) {
|
|
54
|
+
e = c.host;
|
|
55
55
|
continue;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
59
|
-
for (const
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
if (m !== null)
|
|
59
|
+
for (const c of m.children)
|
|
60
|
+
c !== e && !c.inert && (c.inert = !0, h().push(c));
|
|
61
|
+
e = m;
|
|
62
62
|
}
|
|
63
63
|
b().dispatchEvent(new CustomEvent("opened", { bubbles: !0, composed: !0 }));
|
|
64
64
|
} else {
|
|
65
|
-
for (const
|
|
66
|
-
|
|
67
|
-
|
|
65
|
+
for (const e of h())
|
|
66
|
+
e.removeAttribute("inert");
|
|
67
|
+
h([]), b().dispatchEvent(new CustomEvent("closed", { bubbles: !0, composed: !0 }));
|
|
68
68
|
}
|
|
69
69
|
document.body.style.overflow = s() ? "hidden" : "";
|
|
70
70
|
});
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
const S = tv({
|
|
72
|
+
slots: {
|
|
73
|
+
base: "bg-opacity-50 fixed top-0 left-0 z-[1000] flex h-screen w-screen bg-black transition-[opacity,visibility]",
|
|
74
|
+
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",
|
|
75
|
+
button: "absolute top-0 right-0 z-[2] flex aspect-square w-8 -translate-x-1/2 translate-y-1/2 items-center justify-center rounded-full border border-black/30 bg-black p-2 text-lg text-black-contrast transition-colors hover:bg-red hover:text-red-contrast focus:bg-red focus:text-red-contrast"
|
|
76
|
+
},
|
|
77
|
+
variants: {
|
|
78
|
+
isOpen: {
|
|
79
|
+
true: {
|
|
80
|
+
base: "visible opacity-100",
|
|
81
|
+
content: "visible opacity-100"
|
|
82
|
+
},
|
|
83
|
+
false: {
|
|
84
|
+
base: "invisible opacity-0",
|
|
85
|
+
content: "invisible opacity-0"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
centered: { true: "" }
|
|
89
|
+
},
|
|
90
|
+
compoundVariants: [
|
|
91
|
+
{
|
|
92
|
+
isOpen: !0,
|
|
93
|
+
centered: !0,
|
|
94
|
+
class: { content: "top-1/2 translate-y-[-50%]" }
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
isOpen: !1,
|
|
98
|
+
centered: !1,
|
|
99
|
+
class: { content: "translate-y-[-50px]" }
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
isOpen: !1,
|
|
103
|
+
centered: !0,
|
|
104
|
+
class: {
|
|
105
|
+
content: "top-1/2 translate-y-[calc(-50%_-_50px)]"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
}), { base: q, content: D, button: F } = S({
|
|
110
|
+
isOpen: s(),
|
|
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,
|
|
75
116
|
s,
|
|
76
117
|
f,
|
|
77
118
|
b,
|
|
78
|
-
|
|
119
|
+
g
|
|
79
120
|
];
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
var C =
|
|
85
|
-
return
|
|
86
|
-
(
|
|
87
|
-
|
|
88
|
-
visible: s(),
|
|
89
|
-
"opacity-100": s(),
|
|
90
|
-
invisible: !s(),
|
|
91
|
-
"opacity-0": !s()
|
|
92
|
-
}), y(n, "role", d() ? "alertdialog" : "dialog"), y(n, "aria-modal", s() ? "true" : ""), y(n, "aria-label", r()), _(v, 1, G(t));
|
|
121
|
+
var O = k(r), p = k(O);
|
|
122
|
+
p.__click = [te, s];
|
|
123
|
+
var T = k(p);
|
|
124
|
+
Y(T, { icon: G }), E(p), A(p, (e) => g(e), () => g());
|
|
125
|
+
var C = H(p, 2);
|
|
126
|
+
return W(C, t, "default", {}), E(O), E(r), A(r, (e) => f(e), () => f()), I(
|
|
127
|
+
(e, m, c) => {
|
|
128
|
+
w(r, 1, e), y(r, "role", d() ? "alertdialog" : "dialog"), y(r, "aria-modal", s() ? "true" : ""), y(r, "aria-label", a()), w(O, 1, m), w(p, 1, c);
|
|
93
129
|
},
|
|
94
130
|
[
|
|
95
|
-
() =>
|
|
131
|
+
() => x(q()),
|
|
132
|
+
() => x(D()),
|
|
133
|
+
() => x(F())
|
|
96
134
|
]
|
|
97
|
-
),
|
|
135
|
+
), J(n, r), P({
|
|
98
136
|
get isOpen() {
|
|
99
137
|
return s();
|
|
100
138
|
},
|
|
101
|
-
set isOpen(
|
|
102
|
-
s(
|
|
139
|
+
set isOpen(e) {
|
|
140
|
+
s(e), l();
|
|
103
141
|
},
|
|
104
142
|
get centered() {
|
|
105
|
-
return
|
|
143
|
+
return u();
|
|
106
144
|
},
|
|
107
|
-
set centered(
|
|
108
|
-
|
|
145
|
+
set centered(e) {
|
|
146
|
+
u(e), l();
|
|
109
147
|
},
|
|
110
148
|
get autoOpen() {
|
|
111
149
|
return i();
|
|
112
150
|
},
|
|
113
|
-
set autoOpen(
|
|
114
|
-
i(
|
|
151
|
+
set autoOpen(e) {
|
|
152
|
+
i(e), l();
|
|
115
153
|
},
|
|
116
154
|
get label() {
|
|
117
|
-
return
|
|
155
|
+
return a();
|
|
118
156
|
},
|
|
119
|
-
set label(
|
|
120
|
-
|
|
157
|
+
set label(e) {
|
|
158
|
+
a(e), l();
|
|
121
159
|
},
|
|
122
160
|
get alertDialog() {
|
|
123
161
|
return d();
|
|
124
162
|
},
|
|
125
|
-
set alertDialog(
|
|
126
|
-
d(
|
|
163
|
+
set alertDialog(e) {
|
|
164
|
+
d(e), l();
|
|
127
165
|
},
|
|
128
166
|
get staticBackdrop() {
|
|
129
|
-
return
|
|
167
|
+
return v();
|
|
130
168
|
},
|
|
131
|
-
set staticBackdrop(
|
|
132
|
-
|
|
169
|
+
set staticBackdrop(e) {
|
|
170
|
+
v(e), l();
|
|
133
171
|
},
|
|
134
172
|
get dismissButton() {
|
|
135
|
-
return
|
|
173
|
+
return g();
|
|
136
174
|
},
|
|
137
|
-
set dismissButton(
|
|
138
|
-
|
|
175
|
+
set dismissButton(e) {
|
|
176
|
+
g(e), l();
|
|
139
177
|
},
|
|
140
178
|
get container() {
|
|
141
179
|
return f();
|
|
142
180
|
},
|
|
143
|
-
set container(
|
|
144
|
-
f(
|
|
181
|
+
set container(e) {
|
|
182
|
+
f(e), l();
|
|
145
183
|
},
|
|
146
184
|
get el() {
|
|
147
185
|
return b();
|
|
148
186
|
},
|
|
149
|
-
set el(
|
|
150
|
-
b(
|
|
187
|
+
set el(e) {
|
|
188
|
+
b(e), l();
|
|
151
189
|
},
|
|
152
190
|
get inertElements() {
|
|
153
|
-
return
|
|
191
|
+
return h();
|
|
154
192
|
},
|
|
155
|
-
set inertElements(
|
|
156
|
-
|
|
193
|
+
set inertElements(e) {
|
|
194
|
+
h(e), l();
|
|
157
195
|
}
|
|
158
196
|
});
|
|
159
197
|
}
|
|
160
|
-
|
|
161
|
-
customElements.define("uofg-modal",
|
|
162
|
-
|
|
198
|
+
L(["click", "keyup", "focusout"]);
|
|
199
|
+
customElements.define("uofg-modal", M(
|
|
200
|
+
se,
|
|
163
201
|
{
|
|
164
202
|
label: {
|
|
165
203
|
attribute: "label",
|
|
@@ -195,23 +233,19 @@ customElements.define("uofg-modal", R(
|
|
|
195
233
|
["default"],
|
|
196
234
|
[],
|
|
197
235
|
!0,
|
|
198
|
-
(
|
|
236
|
+
(n) => class extends n {
|
|
199
237
|
constructor() {
|
|
200
|
-
super(),
|
|
201
|
-
}
|
|
202
|
-
connectedCallback() {
|
|
203
|
-
super.connectedCallback();
|
|
238
|
+
super(), Q(this.shadowRoot), this.el = this, this.inertElements = [], this.isOpen = !1;
|
|
204
239
|
}
|
|
205
240
|
disconnectedCallback() {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
e.removeAttribute("inert");
|
|
241
|
+
for (const t of this.inertElements)
|
|
242
|
+
t.removeAttribute("inert");
|
|
209
243
|
}
|
|
210
244
|
getState() {
|
|
211
245
|
return this.isOpen;
|
|
212
246
|
}
|
|
213
|
-
setState(
|
|
214
|
-
this.isOpen =
|
|
247
|
+
setState(t) {
|
|
248
|
+
this.isOpen = t;
|
|
215
249
|
}
|
|
216
250
|
toggle() {
|
|
217
251
|
return this.isOpen = !this.isOpen, this.isOpen;
|
|
@@ -225,5 +259,5 @@ customElements.define("uofg-modal", R(
|
|
|
225
259
|
}
|
|
226
260
|
));
|
|
227
261
|
export {
|
|
228
|
-
|
|
262
|
+
se as default
|
|
229
263
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import o from "./uofg-
|
|
2
|
-
import f from "./uofg-
|
|
3
|
-
import r from "./uofg-
|
|
4
|
-
|
|
5
|
-
import m from "./uofg-modal.esm.js";
|
|
6
|
-
const i = { UofGHeader: t, UofGFooter: r, UofGModal: m, UofGAlert: o, UofGBackToTop: f };
|
|
1
|
+
import o from "./uofg-back-to-top.esm.js";
|
|
2
|
+
import f from "./uofg-footer.esm.js";
|
|
3
|
+
import r from "./uofg-header.esm.js";
|
|
4
|
+
const m = { UofGHeader: r, UofGFooter: f, UofGBackToTop: o };
|
|
7
5
|
export {
|
|
8
|
-
|
|
6
|
+
m as default
|
|
9
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a6 as n, y as w, x as d, ao as f, ap as v } from "./index-3NMKGd5b.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"]);
|
|
@@ -8,18 +8,18 @@ function m(a, e, c = e) {
|
|
|
8
8
|
});
|
|
9
9
|
var r = !1, t, l = () => {
|
|
10
10
|
r = !1;
|
|
11
|
-
},
|
|
11
|
+
}, o = !0;
|
|
12
12
|
w(() => {
|
|
13
|
-
var
|
|
14
|
-
|
|
13
|
+
var i = e();
|
|
14
|
+
o ? o = !1 : !r && i != null && (r = !0, clearTimeout(t), scrollTo(window.scrollX, i), t = setTimeout(l, 100));
|
|
15
15
|
}), d(s), f(() => {
|
|
16
16
|
removeEventListener("scroll", s);
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function x(a, e) {
|
|
20
20
|
v(window, ["resize"], () => n(() => e(window[a])));
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
x as a,
|
|
24
24
|
m as b
|
|
25
25
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uoguelph/web-components",
|
|
3
|
-
"version": "1.9.1-rc.
|
|
3
|
+
"version": "1.9.1-rc.8",
|
|
4
4
|
"description": "University of Guelph Web Components Library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
|
28
28
|
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
29
29
|
"@tailwindcss/vite": "^4.0.6",
|
|
30
|
-
"@uoguelph/tailwind-theme": "^1.0.0-rc.
|
|
30
|
+
"@uoguelph/tailwind-theme": "^1.0.0-rc.5",
|
|
31
31
|
"autoprefixer": "^10.4.18",
|
|
32
32
|
"eslint": "^9.19.0",
|
|
33
33
|
"eslint-plugin-storybook": "^0.11.2",
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
"bugs": {
|
|
50
50
|
"url": "https://github.com/ccswbs/uofg-components/issues"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "70034c85d1e492583cf3850319ebabb47c06f771"
|
|
53
53
|
}
|