@uoguelph/web-components 1.9.0-rc.8 → 1.9.0-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.
@@ -5,10 +5,9 @@ var Ft = (e) => {
5
5
  var pe = (e, t, a) => t in e ? he(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a;
6
6
  var wt = (e, t, a) => pe(e, typeof t != "symbol" ? t + "" : t, a), Mt = (e, t, a) => t.has(e) || Ft("Cannot " + a);
7
7
  var O = (e, t, a) => (Mt(e, t, "read from private field"), a ? a.call(e) : t.get(e)), ct = (e, t, a) => t.has(e) ? Ft("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, a), Ct = (e, t, a, l) => (Mt(e, t, "write to private field"), l ? l.call(e, a) : t.set(e, a), a), Pt = (e, t, a) => (Mt(e, t, "access private method"), a);
8
- import { Z as ge, _ as Dt, $ as be, a0 as xe, a1 as me, a2 as Lt, G as K, H as Rt, a3 as kt, a4 as Kt, a5 as _e, a6 as ye, a7 as we, a8 as Me, a9 as Ce, aa as Ut, ab as zt, ac as Wt, z as Zt, B as gt, ad as ke, ae as $e, af as Se, ag as Le, C as Ne, ah as at, ai as Ae, aj as Bt, ak as qt, al as Ee, am as $t, an as Ve, ao as Ze, u as jt, o as je, c as U, p as Y, a as V, Y as j, b as E, ap as He, d as x, e as tt, h as Z, f as k, j as y, k as W, aq as R, ar as T, s as nt, n as it, D as I, as as X, r as m, at as Te, au as Fe, I as q, l as r, J as rt, K as H, X as st, t as Nt, F as G, av as bt, L as xt, aw as Ht, ax as mt, ay as _t, az as Jt, q as et, w as At, x as ut, m as Pe, aA as Re, aB as Ue, i as ze } from "./font-awesome-icon-DS3QHgPg.js";
9
- import { a as We } from "./window-CLG-P9gm.js";
10
- import { s as It, i as Tt } from "./legacy-znqGHd23.js";
11
- import { t as lt } from "./bundle-mjs-BpzLJ4dA.js";
8
+ import { _ as ge, $ as Dt, a0 as be, a1 as xe, a2 as me, a3 as Lt, H as K, I as Rt, a4 as kt, a5 as Kt, a6 as _e, a7 as ye, a8 as we, a9 as Me, aa as Ce, ab as Ut, ac as zt, ad as Wt, A as Zt, C as gt, ae as ke, af as $e, ag as Se, ah as Le, D as Ne, ai as at, aj as Ae, ak as Bt, al as qt, am as Ee, an as $t, ao as Ve, ap as Ze, u as jt, q as je, c as U, p as Y, a as V, Z as j, b as E, aq as He, d as x, e as tt, h as Z, f as k, j as y, k as W, ar as R, as as T, s as nt, n as it, E as I, at as X, r as m, au as Te, av as Fe, J as q, l as r, K as rt, o as st, L as H, X as lt, t as Nt, F as G, aw as bt, M as xt, ax as Ht, ay as mt, az as _t, aA as Jt, v as et, x as At, y as ut, m as Pe, aB as Re, aC as Ue, i as ze } from "./bundle-mjs-BDxvNl4x.js";
9
+ import { a as We } from "./window-B5VNuvDD.js";
10
+ import { s as It, i as Tt } from "./legacy-CiXHZGcB.js";
12
11
  function Be(e, t, a, l, d, n) {
13
12
  let f = K;
14
13
  K && Rt();
@@ -539,7 +538,7 @@ function ee(e, t) {
539
538
  var f = na(), C = y(f);
540
539
  {
541
540
  var p = (v) => {
542
- var g = st(() => lt("flex h-full items-center justify-center gap-2 px-2 transition-colors hover:bg-grey-muted aria-expanded:bg-grey-muted hover:text-grey-muted-contrast aria-expanded:text-grey-muted-contrast", r(n).icon && "[&_svg]:aria-expanded:rotate-180)} aspect-square")), u = st(() => r(n).icon ? r(n).text : void 0);
541
+ var g = lt(() => st("flex h-full items-center justify-center gap-2 px-2 transition-colors hover:bg-grey-muted aria-expanded:bg-grey-muted hover:text-grey-muted-contrast aria-expanded:text-grey-muted-contrast", r(n).icon && "[&_svg]:aria-expanded:rotate-180)} aspect-square")), u = lt(() => r(n).icon ? r(n).text : void 0);
543
542
  Q(v, {
544
543
  class: "relative h-full",
545
544
  get buttonClass() {
@@ -579,7 +578,7 @@ function ee(e, t) {
579
578
  var A = y(N, !0);
580
579
  m(N), m(M), E(() => {
581
580
  L = X(N, L, {
582
- class: lt("border-0 border-b border-solid border-grey/50 p-2 transition-colors hover:bg-yellow hover:text-yellow-contrast", r(n).highlight && "bg-yellow text-yellow-contrast"),
581
+ class: st("border-0 border-b border-solid border-grey/50 p-2 transition-colors hover:bg-yellow hover:text-yellow-contrast", r(n).highlight && "bg-yellow text-yellow-contrast"),
583
582
  href: r(b).href,
584
583
  ...r(b).attributes
585
584
  }), H(A, r(b).text);
@@ -590,7 +589,7 @@ function ee(e, t) {
590
589
  });
591
590
  }, s = (v) => {
592
591
  var g = oa();
593
- const u = st(() => it(lt("flex h-full items-center justify-center gap-2 px-2 transition-colors hover:bg-grey-muted hover:text-grey-muted-contrast", r(n).highlight && "bg-yellow text-yellow-contrast")));
592
+ const u = lt(() => it(st("flex h-full items-center justify-center gap-2 px-2 transition-colors hover:bg-grey-muted hover:text-grey-muted-contrast", r(n).highlight && "bg-yellow text-yellow-contrast")));
594
593
  var h = y(g, !0);
595
594
  m(g), E(() => {
596
595
  nt(g, r(u)), I(g, "href", r(n).href), H(h, r(n).text);
@@ -659,9 +658,9 @@ function le(e, t) {
659
658
  });
660
659
  }
661
660
  var s = W(C, 2);
662
- const v = st(() => {
661
+ const v = lt(() => {
663
662
  var c, i;
664
- return it(lt("flex items-center h-full w-fit transition-opacity focus:opacity-75 hover:opacity-75 min-[1320px]:absolute min-[1320px]:left-[max(calc((100%-1320px)/2),7.5rem)] [&>svg]:block [&>svg]:w-auto", ((c = d()) == null ? void 0 : c.mode) === "desktop" ? "[&>svg]:h-22" : ((i = d()) == null ? void 0 : i.variant) === "dual-brand" ? "[&>svg]:h-[7.5rem] px-2" : "[&>svg]:h-[5rem]"));
663
+ return it(st("flex items-center h-full w-fit transition-opacity focus:opacity-75 hover:opacity-75 min-[1320px]:absolute min-[1320px]:left-[max(calc((100%-1320px)/2),7.5rem)] [&>svg]:block [&>svg]:w-auto", ((c = d()) == null ? void 0 : c.mode) === "desktop" ? "[&>svg]:h-22" : ((i = d()) == null ? void 0 : i.variant) === "dual-brand" ? "[&>svg]:h-[7.5rem] px-2" : "[&>svg]:h-[5rem]"));
665
664
  });
666
665
  var g = y(s);
667
666
  {
@@ -721,7 +720,7 @@ function ie(e) {
721
720
  var v = ya(), g = y(v);
722
721
  {
723
722
  var u = (c) => {
724
- var i = st(() => r(s).icon ? r(s).text : void 0);
723
+ var i = lt(() => r(s).icon ? r(s).text : void 0);
725
724
  Q(c, {
726
725
  class: "h-full w-fit",
727
726
  get label() {
@@ -840,9 +839,9 @@ function ce(e, t) {
840
839
  const [a, l] = mt(), d = () => _t(n, "$headerState", a), n = Ht("header-state");
841
840
  Tt();
842
841
  var f = La();
843
- const C = st(() => {
842
+ const C = lt(() => {
844
843
  var u;
845
- return it(lt("relative w-full justify-between flex lg:h-25 bg-black px-[calc((100%-1320px)/2)] text-lg text-black-contrast", ((u = d()) == null ? void 0 : u.variant) === "dual-brand" ? "h-[7.5rem]" : "h-12.5"));
844
+ return it(st("relative w-full justify-between flex lg:h-25 bg-black px-[calc((100%-1320px)/2)] text-lg text-black-contrast", ((u = d()) == null ? void 0 : u.variant) === "dual-brand" ? "h-[7.5rem]" : "h-12.5"));
846
845
  });
847
846
  var p = y(f);
848
847
  le(p, {});
@@ -1046,7 +1045,7 @@ function fe(e, t) {
1046
1045
  var c = Ua();
1047
1046
  const i = Pe(() => {
1048
1047
  var w;
1049
- return it(lt("block align-items relative justify-end bg-grey-muted text-grey-muted-contrast px-[calc((100%-1320px)/2)] text-lg lg:whitespace-nowrap", ((w = d()) == null ? void 0 : w.variant) === "dual-brand" ? "h-10" : "h-[5rem] lg:h-10"));
1048
+ return it(st("block align-items relative justify-end bg-grey-muted text-grey-muted-contrast px-[calc((100%-1320px)/2)] text-lg lg:whitespace-nowrap", ((w = d()) == null ? void 0 : w.variant) === "dual-brand" ? "h-10" : "h-[5rem] lg:h-10"));
1050
1049
  });
1051
1050
  var _ = y(c), o = y(_);
1052
1051
  {
@@ -1,40 +1,39 @@
1
- import { z as q, A as D, B as F, C as T, S as z, o as j, c as R, p as U, a as o, u as _, D as y, F as J, b as K, d as L, e as M, f as N, j as x, E as Y, h as l, i as G, k as H, t as v, s as I, l as P, m as Q, n as V, r as O } from "./font-awesome-icon-DS3QHgPg.js";
2
- import { a as W } from "./slot-C9Xuadhw.js";
3
- import { t as X } from "./bundle-mjs-BpzLJ4dA.js";
4
- function E(a, e) {
5
- return a === e || (a == null ? void 0 : a[z]) === e;
1
+ import { A as S, B as D, C as F, D as T, S as j, q as z, c as R, p as U, a as o, u as _, E as y, F as G, b as J, d as K, e as L, f as M, j as x, G as N, h as l, i as Y, k as H, t as v, s as I, l as P, m as Q, n as V, o as W, r as O } from "./bundle-mjs-BDxvNl4x.js";
2
+ import { a as X } from "./slot-DDCVqxeF.js";
3
+ function E(a, t) {
4
+ return a === t || (a == null ? void 0 : a[j]) === t;
6
5
  }
7
- function B(a = {}, e, s, c) {
8
- return q(() => {
6
+ function B(a = {}, t, s, c) {
7
+ return S(() => {
9
8
  var i, n;
10
9
  return D(() => {
11
10
  i = n, n = [], F(() => {
12
- a !== s(...n) && (e(a, ...n), i && E(s(...i), a) && e(null, ...i));
11
+ a !== s(...n) && (t(a, ...n), i && E(s(...i), a) && t(null, ...i));
13
12
  });
14
13
  }), () => {
15
14
  T(() => {
16
- n && E(s(...n), a) && e(null, ...n);
15
+ n && E(s(...n), a) && t(null, ...n);
17
16
  });
18
17
  };
19
18
  }), a;
20
19
  }
21
- const Z = (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"])')), $ = (a, e, s) => {
22
- !e() && a.target === a.currentTarget && s(!1);
23
- }, tt = (a, e) => {
24
- a.key === "Escape" && e(!1);
25
- }, et = (a, e, s, c, i) => {
20
+ const Z = (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"])')), $ = (a, t, s) => {
21
+ !t() && a.target === a.currentTarget && s(!1);
22
+ }, ee = (a, t) => {
23
+ a.key === "Escape" && t(!1);
24
+ }, te = (a, t, s, c, i) => {
26
25
  var n;
27
- if (e() && !s().contains(a.relatedTarget) && !c().contains(a.relatedTarget))
26
+ if (t() && !s().contains(a.relatedTarget) && !c().contains(a.relatedTarget))
28
27
  if (a.preventDefault(), a.target === i()) {
29
28
  const d = Z(c());
30
29
  (n = d[d.length - 1]) == null || n.focus();
31
30
  } else
32
31
  i().focus();
33
32
  };
34
- var at = (a, e) => e(!1), st = N('<div class="fixed left-0 top-0 z-[1000] flex h-screen w-screen bg-black bg-opacity-50 transition-[opacity,visibility]"><div part="content"><button class="absolute right-0 top-0 -translate-x-1/2 translate-y-1/2 z-[2] flex aspect-square w-8 items-center justify-center border border-black/30 text-black-contrast text-lg transition-colors bg-black hover:bg-red focus:bg-red hover:text-red-contrast focus:text-red-contrast rounded-full p-2" aria-label="Close modal"><!></button> <!></div></div>');
35
- function rt(a, e) {
36
- U(e, !0);
37
- let s = o(e, "isOpen", 15), c = o(e, "centered", 7), i = o(e, "autoOpen", 7), n = o(e, "label", 7), d = o(e, "alertDialog", 7), k = o(e, "staticBackdrop", 7), m = o(e, "dismissButton", 7), f = o(e, "container", 7), b = o(e, "el", 7), p = o(e, "inertElements", 7);
33
+ var ae = (a, t) => t(!1), se = M('<div class="fixed left-0 top-0 z-[1000] flex h-screen w-screen bg-black bg-opacity-50 transition-[opacity,visibility]"><div part="content"><button class="absolute right-0 top-0 -translate-x-1/2 translate-y-1/2 z-[2] flex aspect-square w-8 items-center justify-center border border-black/30 text-black-contrast text-lg transition-colors bg-black hover:bg-red focus:bg-red hover:text-red-contrast focus:text-red-contrast rounded-full p-2" aria-label="Close modal"><!></button> <!></div></div>');
34
+ function re(a, t) {
35
+ U(t, !0);
36
+ let s = o(t, "isOpen", 15), c = o(t, "centered", 7), i = o(t, "autoOpen", 7), n = o(t, "label", 7), d = o(t, "alertDialog", 7), k = o(t, "staticBackdrop", 7), m = o(t, "dismissButton", 7), f = o(t, "container", 7), b = o(t, "el", 7), p = o(t, "inertElements", 7);
38
37
  _(() => {
39
38
  i() && s(!0);
40
39
  }), _(() => {
@@ -46,112 +45,112 @@ function rt(a, e) {
46
45
  });
47
46
  });
48
47
  });
49
- let t = b();
50
- for (; t !== null && t !== document.body; ) {
51
- const h = t.parentElement;
48
+ let e = b();
49
+ for (; e !== null && e !== document.body; ) {
50
+ const h = e.parentElement;
52
51
  if (h === null) {
53
- const u = t.getRootNode();
52
+ const u = e.getRootNode();
54
53
  if (u instanceof ShadowRoot) {
55
- t = u.host;
54
+ e = u.host;
56
55
  continue;
57
56
  }
58
57
  }
59
58
  if (h !== null)
60
59
  for (const u of h.children)
61
- u !== t && !u.inert && (u.inert = !0, p().push(u));
62
- t = h;
60
+ u !== e && !u.inert && (u.inert = !0, p().push(u));
61
+ e = h;
63
62
  }
64
63
  b().dispatchEvent(new CustomEvent("opened", { bubbles: !0, composed: !0 }));
65
64
  } else {
66
- for (const t of p())
67
- t.removeAttribute("inert");
65
+ for (const e of p())
66
+ e.removeAttribute("inert");
68
67
  p([]), b().dispatchEvent(new CustomEvent("closed", { bubbles: !0, composed: !0 }));
69
68
  }
70
69
  document.body.style.overflow = s() ? "hidden" : "";
71
70
  });
72
- var r = st();
73
- y(r, "tabindex", -1), r.__click = [$, k, s], r.__keyup = [tt, s], r.__focusout = [
74
- et,
71
+ var r = se();
72
+ y(r, "tabindex", -1), r.__click = [$, k, s], r.__keyup = [ee, s], r.__focusout = [
73
+ te,
75
74
  s,
76
75
  f,
77
76
  b,
78
77
  m
79
78
  ];
80
79
  var w = x(r);
81
- const A = Q(() => V(X("z-1 absolute left-1/2 h-fit max-h-full max-w-full -translate-x-1/2 overflow-auto w-full sm:w-fit sm:p-8 transition-transform motion-reduce:transition-none", s() && "visible opacity-100", !s() && !c() && "translate-y-[-50px]", !s() && c() && "translate-y-[calc(-50%_-_50px)] top-1/2", s() && c() && "translate-y-[-50%] top-1/2")));
80
+ const A = Q(() => V(W("z-1 absolute left-1/2 h-fit max-h-full max-w-full -translate-x-1/2 overflow-auto w-full sm:w-fit sm:p-8 transition-transform motion-reduce:transition-none", s() && "visible opacity-100", !s() && !c() && "translate-y-[-50px]", !s() && c() && "translate-y-[calc(-50%_-_50px)] top-1/2", s() && c() && "translate-y-[-50%] top-1/2")));
82
81
  var g = x(w);
83
- g.__click = [at, s];
84
- var C = x(g);
85
- J(C, { icon: Y }), O(g), B(g, (t) => m(t), () => m());
86
- var S = H(g, 2);
87
- return W(S, e, "default", {}), O(w), O(r), B(r, (t) => f(t), () => f()), K(() => {
82
+ g.__click = [ae, s];
83
+ var q = x(g);
84
+ G(q, { icon: N }), O(g), B(g, (e) => m(e), () => m());
85
+ var C = H(g, 2);
86
+ return X(C, t, "default", {}), O(w), O(r), B(r, (e) => f(e), () => f()), J(() => {
88
87
  y(r, "role", d() ? "alertdialog" : "dialog"), y(r, "aria-modal", s() ? "true" : ""), y(r, "aria-label", n()), v(r, "visible", s()), v(r, "opacity-100", s()), v(r, "invisible", !s()), v(r, "opacity-0", !s()), I(w, P(A));
89
- }), L(a, r), M({
88
+ }), K(a, r), L({
90
89
  get isOpen() {
91
90
  return s();
92
91
  },
93
- set isOpen(t) {
94
- s(t), l();
92
+ set isOpen(e) {
93
+ s(e), l();
95
94
  },
96
95
  get centered() {
97
96
  return c();
98
97
  },
99
- set centered(t) {
100
- c(t), l();
98
+ set centered(e) {
99
+ c(e), l();
101
100
  },
102
101
  get autoOpen() {
103
102
  return i();
104
103
  },
105
- set autoOpen(t) {
106
- i(t), l();
104
+ set autoOpen(e) {
105
+ i(e), l();
107
106
  },
108
107
  get label() {
109
108
  return n();
110
109
  },
111
- set label(t) {
112
- n(t), l();
110
+ set label(e) {
111
+ n(e), l();
113
112
  },
114
113
  get alertDialog() {
115
114
  return d();
116
115
  },
117
- set alertDialog(t) {
118
- d(t), l();
116
+ set alertDialog(e) {
117
+ d(e), l();
119
118
  },
120
119
  get staticBackdrop() {
121
120
  return k();
122
121
  },
123
- set staticBackdrop(t) {
124
- k(t), l();
122
+ set staticBackdrop(e) {
123
+ k(e), l();
125
124
  },
126
125
  get dismissButton() {
127
126
  return m();
128
127
  },
129
- set dismissButton(t) {
130
- m(t), l();
128
+ set dismissButton(e) {
129
+ m(e), l();
131
130
  },
132
131
  get container() {
133
132
  return f();
134
133
  },
135
- set container(t) {
136
- f(t), l();
134
+ set container(e) {
135
+ f(e), l();
137
136
  },
138
137
  get el() {
139
138
  return b();
140
139
  },
141
- set el(t) {
142
- b(t), l();
140
+ set el(e) {
141
+ b(e), l();
143
142
  },
144
143
  get inertElements() {
145
144
  return p();
146
145
  },
147
- set inertElements(t) {
148
- p(t), l();
146
+ set inertElements(e) {
147
+ p(e), l();
149
148
  }
150
149
  });
151
150
  }
152
- j(["click", "keyup", "focusout"]);
151
+ z(["click", "keyup", "focusout"]);
153
152
  customElements.define("uofg-modal", R(
154
- rt,
153
+ re,
155
154
  {
156
155
  label: {
157
156
  attribute: "label",
@@ -189,21 +188,21 @@ customElements.define("uofg-modal", R(
189
188
  !0,
190
189
  (a) => class extends a {
191
190
  constructor() {
192
- super(), G(this.shadowRoot), this.el = this, this.inertElements = [];
191
+ super(), Y(this.shadowRoot), this.el = this, this.inertElements = [];
193
192
  }
194
193
  connectedCallback() {
195
194
  super.connectedCallback();
196
195
  }
197
196
  disconnectedCallback() {
198
197
  super.disconnectedCallback();
199
- for (const e of this.inertElements)
200
- e.removeAttribute("inert");
198
+ for (const t of this.inertElements)
199
+ t.removeAttribute("inert");
201
200
  }
202
201
  getState() {
203
202
  return this.isOpen;
204
203
  }
205
- setState(e) {
206
- this.isOpen = e;
204
+ setState(t) {
205
+ this.isOpen = t;
207
206
  }
208
207
  toggle() {
209
208
  return this.isOpen = !this.isOpen, this.isOpen;
@@ -217,5 +216,5 @@ customElements.define("uofg-modal", R(
217
216
  }
218
217
  ));
219
218
  export {
220
- rt as default
219
+ re as default
221
220
  };
@@ -1,4 +1,4 @@
1
- import { A as w, z as d, aC as f, aD as v, aE as n } from "./font-awesome-icon-DS3QHgPg.js";
1
+ import { B as w, A as d, aD as f, aE as v, aF as n } from "./bundle-mjs-BDxvNl4x.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,6 +1,6 @@
1
1
  {
2
2
  "name": "@uoguelph/web-components",
3
- "version": "1.9.0-rc.8",
3
+ "version": "1.9.0-rc.9",
4
4
  "description": "University of Guelph Web Components Library",
5
5
  "module": "dist/uofg-web-components/uofg-web-components.esm.js",
6
6
  "type": "module",
@@ -1,17 +0,0 @@
1
- function u() {
2
- let t = 0, r, n, e = "";
3
- for (; t < arguments.length; )
4
- (r = arguments[t++]) && (n = l(r)) && (e && (e += " "), e += n);
5
- return e;
6
- }
7
- const l = (t) => {
8
- if (typeof t == "string")
9
- return t;
10
- let r, n = "";
11
- for (let e = 0; e < t.length; e++)
12
- t[e] && (r = l(t[e])) && (n && (n += " "), n += r);
13
- return n;
14
- };
15
- export {
16
- u as t
17
- };