@uoguelph/web-components 1.2.2-rc.3 → 1.3.0-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/uofg-footer.esm.js → uofg-footer.esm.js} +42 -44
- package/dist/{uofg-web-components/uofg-header.esm.js → uofg-header.esm.js} +444 -456
- package/dist/uofg-web-components.css +1 -0
- package/dist/uofg-web-components.esm.js +56 -0
- package/package.json +9 -3
- package/dist/uofg-web-components/uofg-web-components.css +0 -1
- package/dist/uofg-web-components/uofg-web-components.esm.js +0 -8
- /package/dist/{uofg-web-components/index-Bx5sKUFM.js → index-Bx5sKUFM.js} +0 -0
- /package/dist/{uofg-web-components/uofg-alert.esm.js → uofg-alert.esm.js} +0 -0
- /package/dist/{uofg-web-components/uofg-modal.esm.js → uofg-modal.esm.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{font-size:62.5%}body{font-size:1.6rem;font-family:sans-serif;margin:0;padding:0}uofg-header:not(:defined){display:block;width:100%;height:5rem!important;background-color:#000}uofg-header:not(:defined) *{display:none}uofg-header:not(:defined):has(*){height:10rem!important}@media screen and (min-width: 1024px){uofg-header:not(:defined){height:14rem!important}uofg-header:not(:defined):has(*){height:18rem!important}}uofg-footer:defined{display:block}uofg-footer:not(:defined){display:none}uofg-modal:defined{display:block;position:fixed;visibility:hidden;z-index:1000}uofg-modal:not(:defined){display:none}uofg-alert:defined{display:block;max-width:100rem}uofg-alert:not(:defined){display:none}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const d = (e, n) => {
|
|
2
|
+
const o = e[n];
|
|
3
|
+
return o ? typeof o == "function" ? o() : Promise.resolve(o) : new Promise((i, t) => {
|
|
4
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(t.bind(null, new Error("Unknown variable dynamic import: " + n)));
|
|
5
|
+
});
|
|
6
|
+
};
|
|
7
|
+
let r = null;
|
|
8
|
+
function s(e) {
|
|
9
|
+
d(/* @__PURE__ */ Object.assign({ "./components/uofg-alert.svelte": () => import("./uofg-alert.esm.js"), "./components/uofg-footer.svelte": () => import("./uofg-footer.esm.js"), "./components/uofg-header.svelte": () => import("./uofg-header.esm.js"), "./components/uofg-modal.svelte": () => import("./uofg-modal.esm.js") }), `./components/${e}.svelte`).then(() => {
|
|
10
|
+
console.log(`Loaded UofG web component: ${e}`);
|
|
11
|
+
}).catch((n) => {
|
|
12
|
+
console.error(`Failed to load UofG web component: ${e}, ${n.message}`);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function f(e) {
|
|
16
|
+
typeof document < "u" && typeof MutationObserver == "function" && (r == null || r.observe(e ?? document.body, { subtree: !0, childList: !0 }));
|
|
17
|
+
}
|
|
18
|
+
function u() {
|
|
19
|
+
r == null || r.disconnect();
|
|
20
|
+
}
|
|
21
|
+
function a(e) {
|
|
22
|
+
var o, i;
|
|
23
|
+
const n = /* @__PURE__ */ new Set();
|
|
24
|
+
if (typeof window < "u") {
|
|
25
|
+
const t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, (c) => c.tagName.startsWith("UOFG-") ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP);
|
|
26
|
+
for (; t.nextNode(); ) {
|
|
27
|
+
const c = (i = (o = t == null ? void 0 : t.currentNode) == null ? void 0 : o.tagName) == null ? void 0 : i.toLowerCase();
|
|
28
|
+
n.add(c);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return n;
|
|
32
|
+
}
|
|
33
|
+
if (typeof window < "u") {
|
|
34
|
+
for (const e of a(document.body))
|
|
35
|
+
s(e);
|
|
36
|
+
typeof MutationObserver == "function" && (r = new MutationObserver((e) => {
|
|
37
|
+
for (const n of e)
|
|
38
|
+
for (const o of n.addedNodes) {
|
|
39
|
+
if (o.nodeType !== Node.ELEMENT_NODE)
|
|
40
|
+
return;
|
|
41
|
+
if (o.tagName.startsWith("UOFG-")) {
|
|
42
|
+
const t = o.tagName.toLowerCase();
|
|
43
|
+
s(t);
|
|
44
|
+
}
|
|
45
|
+
const i = a(o);
|
|
46
|
+
for (const t of i)
|
|
47
|
+
s(t);
|
|
48
|
+
}
|
|
49
|
+
})), f();
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
s as loadComponent,
|
|
53
|
+
a as scan,
|
|
54
|
+
u as stopWatchingDOM,
|
|
55
|
+
f as watchDOM
|
|
56
|
+
};
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uoguelph/web-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0-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
|
-
"
|
|
6
|
+
"exports": {
|
|
7
|
+
"./dist/uofg-web-components/*": "./dist/*",
|
|
8
|
+
".": "./dist/uofg-web-components.esm.js",
|
|
9
|
+
"./*.js": "./dist/*.esm.js",
|
|
10
|
+
"./*": "./dist/*.esm.js",
|
|
11
|
+
"./stylesheet": "./dist/uofg-web-components.css",
|
|
12
|
+
"./package.json": "./package.json"
|
|
13
|
+
},
|
|
8
14
|
"files": [
|
|
9
15
|
"dist/"
|
|
10
16
|
],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
:root{font-size:62.5%}body{font-size:1.6rem;font-family:sans-serif;margin:0;padding:0}uofg-header{display:block;width:100%;height:5rem!important;background-color:#000}uofg-header *{display:none}uofg-header:has(*){height:10rem!important}@media screen and (min-width: 1024px){uofg-header{height:14rem!important}uofg-header:has(*){height:18rem!important}}uofg-menu{display:block}uofg-footer{display:block}uofg-modal{display:block;position:fixed;visibility:hidden;z-index:1000}uofg-alert{display:block;max-width:100rem}uofg-card{display:block}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|