@uoguelph/web-components 1.9.0-rc.9 → 1.9.1-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/README.md +1 -0
- package/dist/uofg-web-components/bundle-mjs-BTgoI2Ah.js +2439 -0
- package/dist/uofg-web-components/{legacy-CiXHZGcB.js → legacy-BVWTAdcf.js} +19 -19
- package/dist/uofg-web-components/{slot-DDCVqxeF.js → slot-E9j-JIta.js} +1 -1
- package/dist/uofg-web-components/uofg-alert.esm.js +32 -29
- package/dist/uofg-web-components/uofg-back-to-top.esm.js +19 -18
- package/dist/uofg-web-components/uofg-footer.esm.js +151 -146
- package/dist/uofg-web-components/uofg-header.esm.js +667 -643
- package/dist/uofg-web-components/uofg-modal.esm.js +85 -76
- package/dist/uofg-web-components/uofg-web-components.css +1 -1
- package/dist/uofg-web-components/uofg-web-components.esm.js +6 -6
- package/dist/uofg-web-components/{window-B5VNuvDD.js → window-Bnb7gJSm.js} +1 -1
- package/package.json +25 -47
- package/dist/uofg-web-components/bundle-mjs-BDxvNl4x.js +0 -2482
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
function
|
|
4
|
-
return a ===
|
|
1
|
+
import { y as q, z as D, A as F, B as T, S as z, m as j, c as R, e as U, p as l, u as E, t as J, C as y, h as w, F as K, D as L, g as M, a as N, i as Y, s as _, j as G, b as H, d as I, k as o, r as x, l as P } from "./bundle-mjs-BTgoI2Ah.js";
|
|
2
|
+
import { a as Q } from "./slot-E9j-JIta.js";
|
|
3
|
+
function B(a, e) {
|
|
4
|
+
return a === e || (a == null ? void 0 : a[z]) === e;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
return
|
|
8
|
-
var i,
|
|
6
|
+
function A(a = {}, e, s, c) {
|
|
7
|
+
return q(() => {
|
|
8
|
+
var i, r;
|
|
9
9
|
return D(() => {
|
|
10
|
-
i =
|
|
11
|
-
a !== s(...
|
|
10
|
+
i = r, r = [], F(() => {
|
|
11
|
+
a !== s(...r) && (e(a, ...r), i && B(s(...i), a) && e(null, ...i));
|
|
12
12
|
});
|
|
13
13
|
}), () => {
|
|
14
14
|
T(() => {
|
|
15
|
-
|
|
15
|
+
r && B(s(...r), a) && e(null, ...r);
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
18
|
}), a;
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
!
|
|
22
|
-
},
|
|
23
|
-
a.key === "Escape" &&
|
|
24
|
-
},
|
|
25
|
-
var
|
|
26
|
-
if (
|
|
20
|
+
const V = (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"])')), W = (a, e, s) => {
|
|
21
|
+
!e() && a.target === a.currentTarget && s(!1);
|
|
22
|
+
}, X = (a, e) => {
|
|
23
|
+
a.key === "Escape" && e(!1);
|
|
24
|
+
}, Z = (a, e, s, c, i) => {
|
|
25
|
+
var r;
|
|
26
|
+
if (e() && !s().contains(a.relatedTarget) && !c().contains(a.relatedTarget))
|
|
27
27
|
if (a.preventDefault(), a.target === i()) {
|
|
28
|
-
const d =
|
|
29
|
-
(
|
|
28
|
+
const d = V(c());
|
|
29
|
+
(r = d[d.length - 1]) == null || r.focus();
|
|
30
30
|
} else
|
|
31
31
|
i().focus();
|
|
32
32
|
};
|
|
33
|
-
var
|
|
34
|
-
function
|
|
35
|
-
U(
|
|
36
|
-
let s =
|
|
37
|
-
|
|
33
|
+
var $ = (a, e) => e(!1), tt = J('<div><div part="content"><button class="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" aria-label="Close modal"><!></button> <!></div></div>');
|
|
34
|
+
function et(a, e) {
|
|
35
|
+
U(e, !0);
|
|
36
|
+
let s = l(e, "isOpen", 15), c = l(e, "centered", 7), i = l(e, "autoOpen", 7), r = l(e, "label", 7), d = l(e, "alertDialog", 7), k = l(e, "staticBackdrop", 7), m = l(e, "dismissButton", 7), f = l(e, "container", 7), b = l(e, "el", 7), p = l(e, "inertElements", 7);
|
|
37
|
+
E(() => {
|
|
38
38
|
i() && s(!0);
|
|
39
|
-
}),
|
|
39
|
+
}), E(() => {
|
|
40
40
|
if (s()) {
|
|
41
41
|
window.requestAnimationFrame(() => {
|
|
42
42
|
window.requestAnimationFrame(() => {
|
|
@@ -45,112 +45,121 @@ function re(a, t) {
|
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
|
-
let
|
|
49
|
-
for (;
|
|
50
|
-
const h =
|
|
48
|
+
let t = b();
|
|
49
|
+
for (; t !== null && t !== document.body; ) {
|
|
50
|
+
const h = t.parentElement;
|
|
51
51
|
if (h === null) {
|
|
52
|
-
const u =
|
|
52
|
+
const u = t.getRootNode();
|
|
53
53
|
if (u instanceof ShadowRoot) {
|
|
54
|
-
|
|
54
|
+
t = u.host;
|
|
55
55
|
continue;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
if (h !== null)
|
|
59
59
|
for (const u of h.children)
|
|
60
|
-
u !==
|
|
61
|
-
|
|
60
|
+
u !== t && !u.inert && (u.inert = !0, p().push(u));
|
|
61
|
+
t = h;
|
|
62
62
|
}
|
|
63
63
|
b().dispatchEvent(new CustomEvent("opened", { bubbles: !0, composed: !0 }));
|
|
64
64
|
} else {
|
|
65
|
-
for (const
|
|
66
|
-
|
|
65
|
+
for (const t of p())
|
|
66
|
+
t.removeAttribute("inert");
|
|
67
67
|
p([]), b().dispatchEvent(new CustomEvent("closed", { bubbles: !0, composed: !0 }));
|
|
68
68
|
}
|
|
69
69
|
document.body.style.overflow = s() ? "hidden" : "";
|
|
70
70
|
});
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
var n = tt();
|
|
72
|
+
let O;
|
|
73
|
+
y(n, "tabindex", -1), n.__click = [W, k, s], n.__keyup = [X, s], n.__focusout = [
|
|
74
|
+
Z,
|
|
74
75
|
s,
|
|
75
76
|
f,
|
|
76
77
|
b,
|
|
77
78
|
m
|
|
78
79
|
];
|
|
79
|
-
var w =
|
|
80
|
-
|
|
81
|
-
var
|
|
82
|
-
g
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
var v = w(n), g = w(v);
|
|
81
|
+
g.__click = [$, s];
|
|
82
|
+
var S = w(g);
|
|
83
|
+
K(S, { icon: L }), x(g), A(g, (t) => m(t), () => m());
|
|
84
|
+
var C = M(g, 2);
|
|
85
|
+
return Q(C, e, "default", {}), x(v), x(n), A(n, (t) => f(t), () => f()), N(
|
|
86
|
+
(t) => {
|
|
87
|
+
O = _(n, 1, "bg-opacity-50 fixed top-0 left-0 z-[1000] flex h-screen w-screen bg-black transition-[opacity,visibility]", null, O, {
|
|
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));
|
|
93
|
+
},
|
|
94
|
+
[
|
|
95
|
+
() => Y("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", s() && "visible opacity-100", !s() && !c() && "translate-y-[-50px]", !s() && c() && "top-1/2 translate-y-[calc(-50%_-_50px)]", s() && c() && "top-1/2 translate-y-[-50%]")
|
|
96
|
+
]
|
|
97
|
+
), H(a, n), I({
|
|
89
98
|
get isOpen() {
|
|
90
99
|
return s();
|
|
91
100
|
},
|
|
92
|
-
set isOpen(
|
|
93
|
-
s(
|
|
101
|
+
set isOpen(t) {
|
|
102
|
+
s(t), o();
|
|
94
103
|
},
|
|
95
104
|
get centered() {
|
|
96
105
|
return c();
|
|
97
106
|
},
|
|
98
|
-
set centered(
|
|
99
|
-
c(
|
|
107
|
+
set centered(t) {
|
|
108
|
+
c(t), o();
|
|
100
109
|
},
|
|
101
110
|
get autoOpen() {
|
|
102
111
|
return i();
|
|
103
112
|
},
|
|
104
|
-
set autoOpen(
|
|
105
|
-
i(
|
|
113
|
+
set autoOpen(t) {
|
|
114
|
+
i(t), o();
|
|
106
115
|
},
|
|
107
116
|
get label() {
|
|
108
|
-
return
|
|
117
|
+
return r();
|
|
109
118
|
},
|
|
110
|
-
set label(
|
|
111
|
-
|
|
119
|
+
set label(t) {
|
|
120
|
+
r(t), o();
|
|
112
121
|
},
|
|
113
122
|
get alertDialog() {
|
|
114
123
|
return d();
|
|
115
124
|
},
|
|
116
|
-
set alertDialog(
|
|
117
|
-
d(
|
|
125
|
+
set alertDialog(t) {
|
|
126
|
+
d(t), o();
|
|
118
127
|
},
|
|
119
128
|
get staticBackdrop() {
|
|
120
129
|
return k();
|
|
121
130
|
},
|
|
122
|
-
set staticBackdrop(
|
|
123
|
-
k(
|
|
131
|
+
set staticBackdrop(t) {
|
|
132
|
+
k(t), o();
|
|
124
133
|
},
|
|
125
134
|
get dismissButton() {
|
|
126
135
|
return m();
|
|
127
136
|
},
|
|
128
|
-
set dismissButton(
|
|
129
|
-
m(
|
|
137
|
+
set dismissButton(t) {
|
|
138
|
+
m(t), o();
|
|
130
139
|
},
|
|
131
140
|
get container() {
|
|
132
141
|
return f();
|
|
133
142
|
},
|
|
134
|
-
set container(
|
|
135
|
-
f(
|
|
143
|
+
set container(t) {
|
|
144
|
+
f(t), o();
|
|
136
145
|
},
|
|
137
146
|
get el() {
|
|
138
147
|
return b();
|
|
139
148
|
},
|
|
140
|
-
set el(
|
|
141
|
-
b(
|
|
149
|
+
set el(t) {
|
|
150
|
+
b(t), o();
|
|
142
151
|
},
|
|
143
152
|
get inertElements() {
|
|
144
153
|
return p();
|
|
145
154
|
},
|
|
146
|
-
set inertElements(
|
|
147
|
-
p(
|
|
155
|
+
set inertElements(t) {
|
|
156
|
+
p(t), o();
|
|
148
157
|
}
|
|
149
158
|
});
|
|
150
159
|
}
|
|
151
|
-
|
|
160
|
+
j(["click", "keyup", "focusout"]);
|
|
152
161
|
customElements.define("uofg-modal", R(
|
|
153
|
-
|
|
162
|
+
et,
|
|
154
163
|
{
|
|
155
164
|
label: {
|
|
156
165
|
attribute: "label",
|
|
@@ -188,21 +197,21 @@ customElements.define("uofg-modal", R(
|
|
|
188
197
|
!0,
|
|
189
198
|
(a) => class extends a {
|
|
190
199
|
constructor() {
|
|
191
|
-
super(),
|
|
200
|
+
super(), P(this.shadowRoot), this.el = this, this.inertElements = [];
|
|
192
201
|
}
|
|
193
202
|
connectedCallback() {
|
|
194
203
|
super.connectedCallback();
|
|
195
204
|
}
|
|
196
205
|
disconnectedCallback() {
|
|
197
206
|
super.disconnectedCallback();
|
|
198
|
-
for (const
|
|
199
|
-
|
|
207
|
+
for (const e of this.inertElements)
|
|
208
|
+
e.removeAttribute("inert");
|
|
200
209
|
}
|
|
201
210
|
getState() {
|
|
202
211
|
return this.isOpen;
|
|
203
212
|
}
|
|
204
|
-
setState(
|
|
205
|
-
this.isOpen =
|
|
213
|
+
setState(e) {
|
|
214
|
+
this.isOpen = e;
|
|
206
215
|
}
|
|
207
216
|
toggle() {
|
|
208
217
|
return this.isOpen = !this.isOpen, this.isOpen;
|
|
@@ -216,5 +225,5 @@ customElements.define("uofg-modal", R(
|
|
|
216
225
|
}
|
|
217
226
|
));
|
|
218
227
|
export {
|
|
219
|
-
|
|
228
|
+
et as default
|
|
220
229
|
};
|
|
@@ -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
|
|
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}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import o from "./uofg-
|
|
2
|
-
import f from "./uofg-
|
|
3
|
-
import r from "./uofg-
|
|
4
|
-
import t from "./uofg-
|
|
5
|
-
import m from "./uofg-
|
|
6
|
-
const i = { UofGHeader:
|
|
1
|
+
import o from "./uofg-alert.esm.js";
|
|
2
|
+
import f from "./uofg-back-to-top.esm.js";
|
|
3
|
+
import r from "./uofg-footer.esm.js";
|
|
4
|
+
import t from "./uofg-header.esm.js";
|
|
5
|
+
import m from "./uofg-modal.esm.js";
|
|
6
|
+
const i = { UofGHeader: t, UofGFooter: r, UofGModal: m, UofGAlert: o, UofGBackToTop: f };
|
|
7
7
|
export {
|
|
8
8
|
i as default
|
|
9
9
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ag as n, z as w, y as d, aC as f, aD as v } from "./bundle-mjs-BTgoI2Ah.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,74 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uoguelph/web-components",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.1-rc.0",
|
|
4
4
|
"description": "University of Guelph Web Components Library",
|
|
5
|
-
"module": "dist/uofg-web-components/uofg-web-components.esm.js",
|
|
6
5
|
"type": "module",
|
|
7
|
-
"unpkg": "dist/uofg-web-components/uofg-web-components.esm.js",
|
|
8
6
|
"files": [
|
|
9
|
-
"dist
|
|
7
|
+
"./dist"
|
|
10
8
|
],
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/uofg-web-components/uofg-web-components.esm.js",
|
|
12
|
+
"default": "./dist/uofg-web-components/uofg-web-components.esm.js"
|
|
13
|
+
},
|
|
14
|
+
"./*": {
|
|
15
|
+
"import": "./dist/uofg-web-components/*.esm.js",
|
|
16
|
+
"default": "./dist/uofg-web-components/*.esm.js"
|
|
17
|
+
},
|
|
18
|
+
"./style": "./dist/uofg-web-components/uofg-web-components.css"
|
|
19
|
+
},
|
|
11
20
|
"scripts": {
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"format": "npx prettier --write .",
|
|
15
|
-
"prepublishOnly": "npm run build && npmignore --auto",
|
|
16
|
-
"storybook": "storybook dev -p 6006",
|
|
17
|
-
"build-storybook": "storybook build",
|
|
18
|
-
"chromatic": "export $(cat .env | xargs) && npx chromatic --project-token=$CHROMACTIC_PROJECT_TOKEN"
|
|
21
|
+
"build": "NODE_ENV=production vite build",
|
|
22
|
+
"prepack": "npm run build"
|
|
19
23
|
},
|
|
20
24
|
"devDependencies": {
|
|
21
|
-
"@chromatic-com/storybook": "^3.2.4",
|
|
22
25
|
"@fortawesome/free-brands-svg-icons": "^6.4.0",
|
|
23
26
|
"@fortawesome/free-regular-svg-icons": "^6.4.0",
|
|
24
27
|
"@fortawesome/free-solid-svg-icons": "^6.4.0",
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
27
|
-
"@
|
|
28
|
-
"@storybook/addon-links": "^8.5.0",
|
|
29
|
-
"@storybook/addon-svelte-csf": "^5.0.0-next.23",
|
|
30
|
-
"@storybook/blocks": "^8.5.0",
|
|
31
|
-
"@storybook/svelte": "^8.5.0",
|
|
32
|
-
"@storybook/svelte-vite": "^8.5.0",
|
|
33
|
-
"@storybook/test": "^8.5.0",
|
|
34
|
-
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
|
28
|
+
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
29
|
+
"@tailwindcss/vite": "^4.0.6",
|
|
30
|
+
"@uoguelph/tailwind-theme": "^1.0.0-rc.0",
|
|
35
31
|
"autoprefixer": "^10.4.18",
|
|
36
|
-
"eslint": "^
|
|
32
|
+
"eslint": "^9.19.0",
|
|
37
33
|
"eslint-plugin-storybook": "^0.11.2",
|
|
38
34
|
"eslint-plugin-svelte": "^2.45.1",
|
|
39
|
-
"npmignore": "^0.3.1",
|
|
40
35
|
"postcss": "^8.4.35",
|
|
41
|
-
"prettier": "^3.3.2",
|
|
42
|
-
"prettier-plugin-svelte": "^3.2.6",
|
|
43
|
-
"prettier-plugin-tailwindcss": "^0.5.12",
|
|
44
|
-
"storybook": "^8.4.0",
|
|
45
36
|
"svelte": "^5.0.0",
|
|
46
37
|
"svelte-check": "^4.0.0",
|
|
47
|
-
"tailwind-merge": "^
|
|
48
|
-
"tailwindcss": "^
|
|
49
|
-
"vite": "^
|
|
50
|
-
"vite-plugin-full-reload": "^1.1.0"
|
|
51
|
-
},
|
|
52
|
-
"publishConfig": {
|
|
53
|
-
"ignore": [
|
|
54
|
-
"!dist/",
|
|
55
|
-
"!loader/",
|
|
56
|
-
"src/",
|
|
57
|
-
"public/",
|
|
58
|
-
"docs/"
|
|
59
|
-
],
|
|
60
|
-
"access": "public"
|
|
38
|
+
"tailwind-merge": "^3.0.1",
|
|
39
|
+
"tailwindcss": "^4.0.6",
|
|
40
|
+
"vite": "^6.0.0"
|
|
61
41
|
},
|
|
62
42
|
"license": "0BSD",
|
|
63
43
|
"author": "",
|
|
64
44
|
"repository": {
|
|
65
45
|
"type": "git",
|
|
66
|
-
"url": "git+https://github.com/ccswbs/
|
|
46
|
+
"url": "git+https://github.com/ccswbs/uofg-components.git"
|
|
67
47
|
},
|
|
68
48
|
"bugs": {
|
|
69
|
-
"url": "https://github.com/ccswbs/
|
|
49
|
+
"url": "https://github.com/ccswbs/uofg-components/issues"
|
|
70
50
|
},
|
|
71
|
-
"
|
|
72
|
-
"tailwind-join": "^0.2.2"
|
|
73
|
-
}
|
|
51
|
+
"gitHead": "7ac6a7335730c5c1c52c410f8de5546f337d6603"
|
|
74
52
|
}
|