@uoguelph/web-components 1.9.1-rc.8 → 1.9.1-rc.9

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.
@@ -1,7 +1,7 @@
1
- import { au as t, aA as a, aB as o, B as u, z as c } from "./index-3NMKGd5b.js";
1
+ import { aw as t, aC as a, aD as o, B as c, z as u } from "./index-Dk-X_ehd.js";
2
2
  function f(e) {
3
- t === null && a(), o && t.l !== null ? l(t).m.push(e) : u(() => {
4
- const n = c(e);
3
+ t === null && a(), o && t.l !== null ? l(t).m.push(e) : c(() => {
4
+ const n = u(e);
5
5
  if (typeof n == "function") return (
6
6
  /** @type {() => void} */
7
7
  n
@@ -0,0 +1,53 @@
1
+ import { as as d, a4 as g, at as v, aa as b, au as h, E as m, av as y, aw as k, ax as E, B as c, z as x, ay as A, az as l, m as u, aA as T, o as z, aB as B } from "./index-Dk-X_ehd.js";
2
+ function N(t, s, ...a) {
3
+ var o = t, n = b, e;
4
+ d(() => {
5
+ n !== (n = s()) && (e && (h(e), e = null), e = v(() => (
6
+ /** @type {SnippetFn} */
7
+ n(o, ...a)
8
+ )));
9
+ }, g), m && (o = y);
10
+ }
11
+ function R(t = !1) {
12
+ const s = (
13
+ /** @type {ComponentContextLegacy} */
14
+ k
15
+ ), a = s.l.u;
16
+ if (!a) return;
17
+ let o = () => T(s.s);
18
+ if (t) {
19
+ let n = 0, e = (
20
+ /** @type {Record<string, any>} */
21
+ {}
22
+ );
23
+ const _ = z(() => {
24
+ let i = !1;
25
+ const f = s.s;
26
+ for (const r in f)
27
+ f[r] !== e[r] && (e[r] = f[r], i = !0);
28
+ return i && n++, n;
29
+ });
30
+ o = () => u(_);
31
+ }
32
+ a.b.length && E(() => {
33
+ p(s, o), l(a.b);
34
+ }), c(() => {
35
+ const n = x(() => a.m.map(A));
36
+ return () => {
37
+ for (const e of n)
38
+ typeof e == "function" && e();
39
+ };
40
+ }), a.a.length && c(() => {
41
+ p(s, o), l(a.a);
42
+ });
43
+ }
44
+ function p(t, s) {
45
+ if (t.l.s)
46
+ for (const a of t.l.s) u(a);
47
+ s();
48
+ }
49
+ B();
50
+ export {
51
+ R as i,
52
+ N as s
53
+ };
@@ -1,4 +1,4 @@
1
- import { E as r, G as l } from "./index-3NMKGd5b.js";
1
+ import { E as r, G as l } from "./index-Dk-X_ehd.js";
2
2
  function d(i, t, e, s, o) {
3
3
  var a;
4
4
  r && l();
@@ -1,6 +1,6 @@
1
- import { c as q, p as A, a as B, b as p, t as D, F as G, f as H, s as c, d as s, e as I, g as o, h as a, i as J, j as K, k as L, r as l } from "./index-3NMKGd5b.js";
2
- import { s as N, a as d } from "./slot-B1Z_DMrF.js";
3
- import { o as O } from "./index-client-CdY8lBml.js";
1
+ import { c as q, p as A, a as B, b as p, t as D, F as G, f as H, s as c, d as s, e as I, g as o, h as a, i as J, j as K, k as L, r as l } from "./index-Dk-X_ehd.js";
2
+ import { s as N, a as d } from "./slot-UHCm4Itl.js";
3
+ import { o as O } from "./index-client-CoqRyo72.js";
4
4
  import { c as P } from "./index-O5kp37c8.js";
5
5
  var Q = D("<div><div><!> <!></div> <div><!> <span><!></span></div> <div><!></div></div>");
6
6
  function V(m, t) {
@@ -1,5 +1,5 @@
1
- import { l as b, c as u, t as f, F as m, e as v, m as o, i as h, j as _, p as g, n as x, g as w, o as k, h as y, q as T, u as j, v as F, d as c, r as i, w as U, b as q } from "./index-3NMKGd5b.js";
2
- import { b as z } from "./window-CMuesI6s.js";
1
+ import { l as b, c as u, t as f, F as m, e as v, m as o, i as h, j as _, p as g, n as x, g as w, o as k, h as y, q as T, u as j, v as F, d as c, r as i, w as U, b as q } from "./index-Dk-X_ehd.js";
2
+ import { b as z } from "./window-Caxf2Dvv.js";
3
3
  import { c as B } from "./index-O5kp37c8.js";
4
4
  const C = () => {
5
5
  window.scroll({ top: 0, left: 0, behavior: "smooth" });
@@ -1,7 +1,7 @@
1
- import { c as z, p as I, a as T, t as $, H as D, e as y, g as V, h as N, i as u, j as S, k as U, r as n, d as g, C as X, m as h, I as L, J as E, K as ce, L as ue, M as fe, N as he, O as de, P as pe, Q as ve, R as B, T as ge, U as we, V as A, F as xe, W as me, X as be, Y as W, s as M, Z as J, _ as Z, $ as K, w as O, a0 as R, v as _e, u as Q, q as ke, b as ye } from "./index-3NMKGd5b.js";
2
- import { o as Me } from "./index-client-CdY8lBml.js";
1
+ import { c as z, p as I, a as T, t as $, H as D, e as y, g as V, h as N, i as u, j as S, k as U, r as n, d as g, C as X, m as h, I as L, J as E, K as ce, L as ue, M as fe, N as he, O as de, P as pe, Q as ve, R as B, T as ge, U as we, V as A, F as xe, W as me, X as be, Y as _e, Z as ke, _ as W, s as M, $ as J, a0 as Z, a1 as K, w as O, a2 as R, v as ye, u as Q, q as Me, b as $e } from "./index-Dk-X_ehd.js";
2
+ import { o as Ce } from "./index-client-CoqRyo72.js";
3
3
  import { c as Y } from "./index-O5kp37c8.js";
4
- import { i as j, t as $e, a as Ce, s as Le } from "./bundle-mjs-DH8HDGzd.js";
4
+ import { i as j, s as Le } from "./legacy-D1B9KfqA.js";
5
5
  var Ve = $("<li><a> </a></li>"), Ne = $("<ul></ul>");
6
6
  function te(d, e) {
7
7
  I(e, !0);
@@ -217,7 +217,7 @@ function oe(d, e) {
217
217
  X(p, "href", v()), X(p, "aria-label", o()), N(p, 1, a);
218
218
  },
219
219
  [
220
- () => V($e(m(), x()))
220
+ () => V(me(m(), x()))
221
221
  ],
222
222
  A
223
223
  ), u(f, b);
@@ -227,7 +227,7 @@ z(oe, {}, [], [], !0);
227
227
  var Oe = $("<a><!></a>");
228
228
  function P(d, e) {
229
229
  I(e, !0);
230
- let i = T(e, "href", 7), l = T(e, "label", 7), m = T(e, "children", 7), c = T(e, "class", 7), f = be(e, [
230
+ let i = T(e, "href", 7), l = T(e, "label", 7), m = T(e, "children", 7), c = T(e, "class", 7), f = ke(e, [
231
231
  "$$slots",
232
232
  "$$events",
233
233
  "$$legacy",
@@ -237,11 +237,11 @@ function P(d, e) {
237
237
  "children",
238
238
  "class"
239
239
  ]);
240
- const s = Ce("w-fit underline decoration-transparent transition-colors hover:decoration-black-contrast focus:decoration-black-contrast", c());
240
+ const s = be("w-fit underline decoration-transparent transition-colors hover:decoration-black-contrast focus:decoration-black-contrast", c());
241
241
  var r = Oe();
242
242
  let t;
243
243
  var v = g(r);
244
- return Le(v, m), n(r), y(() => t = me(r, t, {
244
+ return Le(v, m), n(r), y(() => t = _e(r, t, {
245
245
  ...f,
246
246
  class: s,
247
247
  href: i(),
@@ -411,10 +411,10 @@ function We(d, e) {
411
411
  wrapper: "mb-6 grid grid-rows-5 items-center gap-0 not-italic md:mb-0"
412
412
  }
413
413
  });
414
- let l = _e(Q([]));
415
- Me(() => {
414
+ let l = ye(Q([]));
415
+ Ce(() => {
416
416
  const a = () => {
417
- ke(l, Q(Array.from(e.$$host.children).filter((k) => k.tagName === "A").map((k) => ({
417
+ Me(l, Q(Array.from(e.$$host.children).filter((k) => k.tagName === "A").map((k) => ({
418
418
  text: k.textContent ?? "",
419
419
  href: k.getAttribute("href") ?? ""
420
420
  }))));
@@ -480,7 +480,7 @@ function We(d, e) {
480
480
  }
481
481
  customElements.define("uofg-footer", z(We, {}, [], [], !0, (d) => class extends d {
482
482
  constructor() {
483
- super(), ye(this.shadowRoot);
483
+ super(), $e(this.shadowRoot);
484
484
  }
485
485
  }));
486
486
  export {
@@ -5,11 +5,11 @@ var jt = (e) => {
5
5
  var he = (e, t, a) => t in e ? fe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
6
6
  var At = (e, t, a) => he(e, typeof t != "symbol" ? t + "" : t, a), kt = (e, t, a) => t.has(e) || jt("Cannot " + a);
7
7
  var D = (e, t, a) => (kt(e, t, "read from private field"), a ? a.call(e) : t.get(e)), ft = (e, t, a) => t.has(e) ? jt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), Mt = (e, t, a, s) => (kt(e, t, "write to private field"), s ? s.call(e, a) : t.set(e, a), a), Ht = (e, t, a) => (kt(e, t, "access private method"), a);
8
- import { x as Zt, z as Pt, a1 as Et, a2 as de, a3 as pe, a4 as ge, a5 as be, a6 as xe, a7 as me, A as _e, a8 as Q, a9 as Tt, aa as Ft, ab as we, ac as ye, c as F, p as O, a as H, ad as Wt, t as S, s as W, d as $, _ as N, e as Z, ae as $e, i as m, j as G, k as E, af as ut, ag as Bt, ah as vt, r as b, ai as Ut, Z as dt, Y as ct, h as T, g as B, C as X, l as ke, aj as _t, I as A, ak as Me, al as Se, H as U, V as R, m as r, W as at, F as q, am as wt, K as yt, J as nt, an as zt, B as qt, v as ot, q as J, u as ht, b as Le } from "./index-3NMKGd5b.js";
9
- import { a as Ce } from "./window-CMuesI6s.js";
10
- import { s as Lt, i as $t, t as Ot } from "./bundle-mjs-DH8HDGzd.js";
8
+ import { x as Zt, z as Pt, a3 as Et, a4 as de, a5 as pe, a6 as ge, a7 as be, a8 as xe, a9 as me, A as _e, aa as Q, ab as Tt, ac as Ft, ad as we, ae as ye, c as F, p as O, a as H, af as Wt, t as S, s as W, d as $, a0 as N, e as Z, ag as $e, i as m, j as G, k as E, ah as ut, ai as Bt, aj as vt, r as b, ak as Ut, $ as dt, _ as ct, h as T, g as B, C as X, l as ke, al as _t, I as A, am as Me, an as Se, H as U, V as R, m as r, Y as at, F as q, ao as wt, K as yt, J as nt, ap as zt, W as qt, B as Ot, v as ot, q as J, u as ht, b as Le } from "./index-Dk-X_ehd.js";
9
+ import { a as Ce } from "./window-Caxf2Dvv.js";
10
+ import { s as Lt, i as $t } from "./legacy-D1B9KfqA.js";
11
11
  import { c as Nt } from "./index-O5kp37c8.js";
12
- import { o as Gt } from "./index-client-CdY8lBml.js";
12
+ import { o as Gt } from "./index-client-CoqRyo72.js";
13
13
  function Ve(e, t, a) {
14
14
  Zt(() => {
15
15
  var s = Pt(() => t(e, a == null ? void 0 : a()) || {});
@@ -949,7 +949,7 @@ function ne(e, t) {
949
949
  [
950
950
  () => {
951
951
  var l;
952
- return B(Ot("relative flex w-full justify-between bg-black px-[calc((100%-1320px)/2)] text-lg text-black-contrast lg:h-25", ((l = _()) == null ? void 0 : l.variant) === "dual-brand" ? "h-[7.5rem]" : "h-12.5"));
952
+ return B(qt("relative flex w-full justify-between bg-black px-[calc((100%-1320px)/2)] text-lg text-black-contrast lg:h-25", ((l = _()) == null ? void 0 : l.variant) === "dual-brand" ? "h-[7.5rem]" : "h-12.5"));
953
953
  }
954
954
  ],
955
955
  R
@@ -1026,7 +1026,7 @@ function ie(e, t) {
1026
1026
  });
1027
1027
  }
1028
1028
  F(ie, { items: {} }, [], [], !0);
1029
- var wa = S('<span class="flex w-full items-center justify-between gap-2 [&amp;>svg]:transition-transform"><span class="mr-auto"> </span> <!></span>'), ya = S("<li><a> </a></li>"), $a = S('<ul class="flex w-full flex-col bg-white text-black [&amp;>li]:contents"></ul>'), ka = S("<a> </a>"), Ma = S("<li><!></li>"), Sa = S('<ul class="absolute top-full right-0 z-50 flex max-h-[calc(100vh-5rem)] w-full flex-col overflow-y-auto bg-white px-4 py-3 whitespace-normal text-black shadow-md lg:w-[30rem] [&amp;>li]:contents"></ul>'), La = S("<li><!></li>");
1029
+ var wa = S('<span class="flex w-full items-center justify-between gap-2"><span class="mr-auto"> </span> <!></span>'), ya = S("<li><a> </a></li>"), $a = S('<ul class="flex w-full flex-col bg-white text-black [&amp;>li]:contents"></ul>'), ka = S("<a> </a>"), Ma = S("<li><!></li>"), Sa = S('<ul class="absolute top-full right-0 z-50 flex max-h-[calc(100vh-5rem)] w-full flex-col overflow-y-auto bg-white px-4 py-3 whitespace-normal text-black shadow-md lg:w-[30rem] [&amp;>li]:contents"></ul>'), La = S("<li><!></li>");
1030
1030
  function ce(e, t) {
1031
1031
  O(t, !0);
1032
1032
  let a = H(t, "items", 7);
@@ -1054,12 +1054,15 @@ function ce(e, t) {
1054
1054
  autoCollapse: !1,
1055
1055
  button: (i) => {
1056
1056
  et(i, {
1057
- class: "border-grey/50 hover:bg-grey-muted focus:bg-grey-muted aria-expanded:bg-grey-muted flex w-full items-center justify-between gap-2 border-0 border-b border-solid p-2 transition-colors [&_svg]:aria-expanded:rotate-180",
1057
+ class: "group border-grey/50 hover:bg-grey-muted focus:bg-grey-muted aria-expanded:bg-grey-muted flex w-full items-center justify-between gap-2 border-0 border-b border-solid p-2 transition-colors",
1058
1058
  children: (y, h) => {
1059
1059
  var V = wa(), C = $(V), k = $(C, !0);
1060
1060
  b(C);
1061
1061
  var d = W(C, 2);
1062
- q(d, { icon: wt }), b(V), Z(() => A(k, r(n).text)), m(y, V);
1062
+ q(d, {
1063
+ icon: wt,
1064
+ class: "transition-transform group-aria-expanded:rotate-180"
1065
+ }), b(V), Z(() => A(k, r(n).text)), m(y, V);
1063
1066
  },
1064
1067
  $$slots: { default: !0 }
1065
1068
  });
@@ -1118,7 +1121,7 @@ function ue(e, t) {
1118
1121
  O(t, !0);
1119
1122
  const [a, s] = ut(), _ = () => vt(p, "$headerState", a), p = _t("header-state");
1120
1123
  let o = H(t, "items", 7), w = H(t, "title", 7), M = H(t, "url", 7), u = ot(void 0), n = ot(void 0), l = ot(void 0), f, g = ot(void 0);
1121
- qt(() => {
1124
+ Ot(() => {
1122
1125
  var d;
1123
1126
  clearTimeout(f), ((d = _()) == null ? void 0 : d.mode) === "desktop" && r(u) - r(n) < r(l) && (f = setTimeout(
1124
1127
  () => {
@@ -1188,7 +1191,7 @@ function ue(e, t) {
1188
1191
  b(h), b(c), b(x), Z((d) => T(x, 1, d), [
1189
1192
  () => {
1190
1193
  var d;
1191
- return B(Ot("align-items bg-grey-muted text-grey-muted-contrast relative block justify-end px-[calc((100%-1320px)/2)] text-lg lg:whitespace-nowrap", ((d = _()) == null ? void 0 : d.variant) === "dual-brand" ? "h-10" : "h-[5rem] lg:h-10"));
1194
+ return B(qt("align-items bg-grey-muted text-grey-muted-contrast relative block justify-end px-[calc((100%-1320px)/2)] text-lg lg:whitespace-nowrap", ((d = _()) == null ? void 0 : d.variant) === "dual-brand" ? "h-10" : "h-[5rem] lg:h-10"));
1192
1195
  }
1193
1196
  ]), bt(h, "clientWidth", (d) => J(l, d)), bt(c, "clientWidth", (d) => J(u, d)), m(e, x);
1194
1197
  var k = G({
@@ -1251,7 +1254,7 @@ function Na(e, t) {
1251
1254
  return V.observe(t.$$host, { childList: !0, subtree: !0 }), () => {
1252
1255
  V.disconnect();
1253
1256
  };
1254
- }), qt(() => {
1257
+ }), Ot(() => {
1255
1258
  n.set({
1256
1259
  mode: r(M) >= u ? "desktop" : "mobile",
1257
1260
  variant: w()
@@ -1,5 +1,5 @@
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";
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-Dk-X_ehd.js";
2
+ import { a as W } from "./slot-UHCm4Itl.js";
3
3
  function B(n, t) {
4
4
  return n === t || (n == null ? void 0 : n[K]) === t;
5
5
  }
@@ -1,4 +1,4 @@
1
- import { a6 as n, y as w, x as d, ao as f, ap as v } from "./index-3NMKGd5b.js";
1
+ import { a8 as n, y as w, x as d, aq as f, ar as v } from "./index-Dk-X_ehd.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,10 +8,10 @@ function m(a, e, c = e) {
8
8
  });
9
9
  var r = !1, t, l = () => {
10
10
  r = !1;
11
- }, o = !0;
11
+ }, i = !0;
12
12
  w(() => {
13
- var i = e();
14
- o ? o = !1 : !r && i != null && (r = !0, clearTimeout(t), scrollTo(window.scrollX, i), t = setTimeout(l, 100));
13
+ var o = e();
14
+ i ? i = !1 : !r && o != null && (r = !0, clearTimeout(t), scrollTo(window.scrollX, o), t = setTimeout(l, 100));
15
15
  }), d(s), f(() => {
16
16
  removeEventListener("scroll", s);
17
17
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uoguelph/web-components",
3
- "version": "1.9.1-rc.8",
3
+ "version": "1.9.1-rc.9",
4
4
  "description": "University of Guelph Web Components Library",
5
5
  "type": "module",
6
6
  "files": [
@@ -49,5 +49,5 @@
49
49
  "bugs": {
50
50
  "url": "https://github.com/ccswbs/uofg-components/issues"
51
51
  },
52
- "gitHead": "70034c85d1e492583cf3850319ebabb47c06f771"
52
+ "gitHead": "2b263f1b1dfc7304a154b2dba842178289683eb1"
53
53
  }