@uoguelph/web-components 1.7.6 → 1.9.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.
@@ -1,11 +1,11 @@
1
- import { w as S, x as D, y as F, z as T, S as z, g as j, c as R, p as U, A as l, B as _, C as y, F as G, i as J, a as K, j as L, t as M, d as O, D as N, E as o, b as Y, e as H, G as v, s as I, n as P, q as Q, u as V, r as x } from "./font-awesome-icon-D_uThmUr.js";
2
- import { s as W } from "./slot-BQDpwPCx.js";
1
+ import { z as q, A as D, B as F, C as T, S as z, l as j, c as R, p as U, a as l, D as _, E as y, F as G, b as J, d as K, e as L, f as M, j as O, G as N, h as o, i as Y, k as H, t as v, s as I, u as P, w as Q, x as V, r as x } from "./font-awesome-icon-AppLwNgo.js";
2
+ import { a as W } from "./slot-CexNersB.js";
3
3
  import { t as X } from "./bundle-mjs-BpzLJ4dA.js";
4
4
  function E(a, t) {
5
5
  return a === t || (a == null ? void 0 : a[z]) === t;
6
6
  }
7
7
  function B(a = {}, t, s, c) {
8
- return S(() => {
8
+ return q(() => {
9
9
  var i, r;
10
10
  return D(() => {
11
11
  i = r, r = [], F(() => {
@@ -19,7 +19,7 @@ function B(a = {}, t, s, c) {
19
19
  }), a;
20
20
  }
21
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, t, s) => {
22
- t() && a.target === a.currentTarget && s(!1);
22
+ !t() && a.target === a.currentTarget && s(!1);
23
23
  }, ee = (a, t) => {
24
24
  a.key === "Escape" && t(!1);
25
25
  }, te = (a, t, s, c, i) => {
@@ -31,10 +31,10 @@ const Z = (a) => Array.from(a.querySelectorAll('a[href], area[href], input:not([
31
31
  } else
32
32
  i().focus();
33
33
  };
34
- 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 text-white text-lg transition-colors bg-dark-grey hover:bg-red focus:bg-red rounded-full p-2" aria-label="Close modal"><!></button> <!></div></div>');
34
+ 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 text-white text-lg transition-colors bg-black hover:bg-red focus:bg-red rounded-full p-2" aria-label="Close modal"><!></button> <!></div></div>');
35
35
  function ne(a, t) {
36
36
  U(t, !0);
37
- let s = l(t, "isOpen", 15), c = l(t, "centered", 7), i = l(t, "autoOpen", 7), r = l(t, "label", 7), d = l(t, "alertDialog", 7), w = l(t, "staticBackdrop", 7), m = l(t, "dismissButton", 7), f = l(t, "container", 7), b = l(t, "el", 7), p = l(t, "inertElements", 7);
37
+ let s = l(t, "isOpen", 15), c = l(t, "centered", 7), i = l(t, "autoOpen", 7), r = l(t, "label", 7), d = l(t, "alertDialog", 7), k = l(t, "staticBackdrop", 7), m = l(t, "dismissButton", 7), f = l(t, "container", 7), b = l(t, "el", 7), p = l(t, "inertElements", 7);
38
38
  _(() => {
39
39
  i() && s(!0);
40
40
  }), _(() => {
@@ -70,22 +70,22 @@ function ne(a, t) {
70
70
  document.body.style.overflow = s() ? "hidden" : "";
71
71
  });
72
72
  var n = se();
73
- y(n, "tabindex", -1), n.__click = [$, w, s], n.__keyup = [ee, s], n.__focusout = [
73
+ y(n, "tabindex", -1), n.__click = [$, k, s], n.__keyup = [ee, s], n.__focusout = [
74
74
  te,
75
75
  s,
76
76
  f,
77
77
  b,
78
78
  m
79
79
  ];
80
- var k = O(n);
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-[calc(-50%_-_50px)]", (!s() && !c() || s() && c()) && "translate-y-[-50px]")));
82
- var g = O(k);
80
+ var w = O(n);
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)]", s() && c() && "translate-y-[50%]")));
82
+ var g = O(w);
83
83
  g.__click = [ae, s];
84
- var q = O(g);
85
- G(q, { icon: N }), x(g), B(g, (e) => m(e), () => m());
86
- var C = H(g, 2);
87
- return W(C, t, "default", {}), x(k), x(n), B(n, (e) => f(e), () => f()), J(() => {
88
- y(n, "role", d() ? "alertdialog" : "dialog"), y(n, "aria-modal", s() ? "true" : ""), y(n, "aria-label", r()), v(n, "visible", s()), v(n, "opacity-100", s()), v(n, "invisible", !s()), v(n, "opacity-0", !s()), I(k, P(A));
84
+ var C = O(g);
85
+ G(C, { icon: N }), x(g), B(g, (e) => m(e), () => m());
86
+ var S = H(g, 2);
87
+ return W(S, t, "default", {}), x(w), x(n), B(n, (e) => f(e), () => f()), J(() => {
88
+ y(n, "role", d() ? "alertdialog" : "dialog"), y(n, "aria-modal", s() ? "true" : ""), y(n, "aria-label", r()), v(n, "visible", s()), v(n, "opacity-100", s()), v(n, "invisible", !s()), v(n, "opacity-0", !s()), I(w, P(A));
89
89
  }), K(a, n), L({
90
90
  get isOpen() {
91
91
  return s();
@@ -118,10 +118,10 @@ function ne(a, t) {
118
118
  d(e), o();
119
119
  },
120
120
  get staticBackdrop() {
121
- return w();
121
+ return k();
122
122
  },
123
123
  set staticBackdrop(e) {
124
- w(e), o();
124
+ k(e), o();
125
125
  },
126
126
  get dismissButton() {
127
127
  return m();
@@ -1,7 +1,7 @@
1
- import { x as u, w as d, aD as f, aE as v, aF as n } from "./font-awesome-icon-D_uThmUr.js";
1
+ import { A as w, z as d, aD as f, aE as v, aF as n } from "./font-awesome-icon-AppLwNgo.js";
2
2
  function m(a, e, c = e) {
3
- var w = a === "x", s = () => n(() => {
4
- r = !0, clearTimeout(t), t = setTimeout(l, 100), c(window[w ? "scrollX" : "scrollY"]);
3
+ var u = a === "x", s = () => n(() => {
4
+ r = !0, clearTimeout(t), t = setTimeout(l, 100), c(window[u ? "scrollX" : "scrollY"]);
5
5
  });
6
6
  addEventListener("scroll", s, {
7
7
  passive: !0
@@ -9,17 +9,17 @@ function m(a, e, c = e) {
9
9
  var r = !1, t, l = () => {
10
10
  r = !1;
11
11
  }, i = !0;
12
- u(() => {
12
+ w(() => {
13
13
  var o = e();
14
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
  });
18
18
  }
19
- function x(a, e) {
19
+ function T(a, e) {
20
20
  v(window, ["resize"], () => n(() => e(window[a])));
21
21
  }
22
22
  export {
23
- x as a,
23
+ T 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.7.6",
3
+ "version": "1.9.0-rc.0",
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,2 +0,0 @@
1
- import { aK as a } from "./font-awesome-icon-D_uThmUr.js";
2
- a();
@@ -1,42 +0,0 @@
1
- import { aG as d, B as i, y as g, aH as l, n as p, an as m, aI as b, aJ as v, q as h } from "./font-awesome-icon-D_uThmUr.js";
2
- function y(t = !1) {
3
- const n = (
4
- /** @type {ComponentContextLegacy} */
5
- m
6
- ), e = n.l.u;
7
- if (!e) return;
8
- let f = () => v(n.s);
9
- if (t) {
10
- let a = 0, s = (
11
- /** @type {Record<string, any>} */
12
- {}
13
- );
14
- const _ = h(() => {
15
- let c = !1;
16
- const r = n.s;
17
- for (const o in r)
18
- r[o] !== s[o] && (s[o] = r[o], c = !0);
19
- return c && a++, a;
20
- });
21
- f = () => p(_);
22
- }
23
- e.b.length && d(() => {
24
- u(n, f), l(e.b);
25
- }), i(() => {
26
- const a = g(() => e.m.map(b));
27
- return () => {
28
- for (const s of a)
29
- typeof s == "function" && s();
30
- };
31
- }), e.a.length && i(() => {
32
- u(n, f), l(e.a);
33
- });
34
- }
35
- function u(t, n) {
36
- if (t.l.s)
37
- for (const e of t.l.s) p(e);
38
- n();
39
- }
40
- export {
41
- y as i
42
- };
@@ -1,10 +0,0 @@
1
- import { H as n, I as s } from "./font-awesome-icon-D_uThmUr.js";
2
- function u(l, f, e, i, d) {
3
- var r;
4
- n && s();
5
- var t = (r = f.$$slots) == null ? void 0 : r[e], a = !1;
6
- t === !0 && (t = f[e === "default" ? "children" : e], a = !0), t === void 0 || t(l, a ? () => i : i);
7
- }
8
- export {
9
- u as s
10
- };