@uoguelph/web-components 1.9.0-rc.4 → 1.9.0-rc.5

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,40 +1,40 @@
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-Dud1EYGD.js";
2
- import { a as W } from "./slot-Btyq796h.js";
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-BQURLWNp.js";
2
+ import { a as W } from "./slot-CAT5FJeP.js";
3
3
  import { t as X } from "./bundle-mjs-BpzLJ4dA.js";
4
- function E(a, t) {
5
- return a === t || (a == null ? void 0 : a[z]) === t;
4
+ function E(a, e) {
5
+ return a === e || (a == null ? void 0 : a[z]) === e;
6
6
  }
7
- function B(a = {}, t, s, c) {
7
+ function B(a = {}, e, s, c) {
8
8
  return q(() => {
9
- var i, r;
9
+ var i, n;
10
10
  return D(() => {
11
- i = r, r = [], F(() => {
12
- a !== s(...r) && (t(a, ...r), i && E(s(...i), a) && t(null, ...i));
11
+ i = n, n = [], F(() => {
12
+ a !== s(...n) && (e(a, ...n), i && E(s(...i), a) && e(null, ...i));
13
13
  });
14
14
  }), () => {
15
15
  T(() => {
16
- r && E(s(...r), a) && t(null, ...r);
16
+ n && E(s(...n), a) && e(null, ...n);
17
17
  });
18
18
  };
19
19
  }), a;
20
20
  }
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);
23
- }, ee = (a, t) => {
24
- a.key === "Escape" && t(!1);
25
- }, te = (a, t, s, c, i) => {
26
- var r;
27
- if (t() && !s().contains(a.relatedTarget) && !c().contains(a.relatedTarget))
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) => {
26
+ var n;
27
+ if (e() && !s().contains(a.relatedTarget) && !c().contains(a.relatedTarget))
28
28
  if (a.preventDefault(), a.target === i()) {
29
29
  const d = Z(c());
30
- (r = d[d.length - 1]) == null || r.focus();
30
+ (n = d[d.length - 1]) == null || n.focus();
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-black hover:bg-red focus:bg-red rounded-full p-2" aria-label="Close modal"><!></button> <!></div></div>');
35
- function ne(a, t) {
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), 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);
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);
38
38
  _(() => {
39
39
  i() && s(!0);
40
40
  }), _(() => {
@@ -46,112 +46,112 @@ function ne(a, t) {
46
46
  });
47
47
  });
48
48
  });
49
- let e = b();
50
- for (; e !== null && e !== document.body; ) {
51
- const h = e.parentElement;
49
+ let t = b();
50
+ for (; t !== null && t !== document.body; ) {
51
+ const h = t.parentElement;
52
52
  if (h === null) {
53
- const u = e.getRootNode();
53
+ const u = t.getRootNode();
54
54
  if (u instanceof ShadowRoot) {
55
- e = u.host;
55
+ t = u.host;
56
56
  continue;
57
57
  }
58
58
  }
59
59
  if (h !== null)
60
60
  for (const u of h.children)
61
- u !== e && !u.inert && (u.inert = !0, p().push(u));
62
- e = h;
61
+ u !== t && !u.inert && (u.inert = !0, p().push(u));
62
+ t = h;
63
63
  }
64
64
  b().dispatchEvent(new CustomEvent("opened", { bubbles: !0, composed: !0 }));
65
65
  } else {
66
- for (const e of p())
67
- e.removeAttribute("inert");
66
+ for (const t of p())
67
+ t.removeAttribute("inert");
68
68
  p([]), b().dispatchEvent(new CustomEvent("closed", { bubbles: !0, composed: !0 }));
69
69
  }
70
70
  document.body.style.overflow = s() ? "hidden" : "";
71
71
  });
72
- var n = se();
73
- y(n, "tabindex", -1), n.__click = [$, k, s], n.__keyup = [ee, s], n.__focusout = [
74
- te,
72
+ var r = st();
73
+ y(r, "tabindex", -1), r.__click = [$, k, s], r.__keyup = [tt, s], r.__focusout = [
74
+ et,
75
75
  s,
76
76
  f,
77
77
  b,
78
78
  m
79
79
  ];
80
- var w = O(n);
80
+ var w = x(r);
81
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")));
82
- var g = O(w);
83
- g.__click = [ae, s];
84
- var C = O(g);
85
- G(C, { icon: N }), x(g), B(g, (e) => m(e), () => m());
82
+ 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
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
- }), K(a, n), L({
87
+ return W(S, e, "default", {}), O(w), O(r), B(r, (t) => f(t), () => f()), K(() => {
88
+ 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({
90
90
  get isOpen() {
91
91
  return s();
92
92
  },
93
- set isOpen(e) {
94
- s(e), o();
93
+ set isOpen(t) {
94
+ s(t), l();
95
95
  },
96
96
  get centered() {
97
97
  return c();
98
98
  },
99
- set centered(e) {
100
- c(e), o();
99
+ set centered(t) {
100
+ c(t), l();
101
101
  },
102
102
  get autoOpen() {
103
103
  return i();
104
104
  },
105
- set autoOpen(e) {
106
- i(e), o();
105
+ set autoOpen(t) {
106
+ i(t), l();
107
107
  },
108
108
  get label() {
109
- return r();
109
+ return n();
110
110
  },
111
- set label(e) {
112
- r(e), o();
111
+ set label(t) {
112
+ n(t), l();
113
113
  },
114
114
  get alertDialog() {
115
115
  return d();
116
116
  },
117
- set alertDialog(e) {
118
- d(e), o();
117
+ set alertDialog(t) {
118
+ d(t), l();
119
119
  },
120
120
  get staticBackdrop() {
121
121
  return k();
122
122
  },
123
- set staticBackdrop(e) {
124
- k(e), o();
123
+ set staticBackdrop(t) {
124
+ k(t), l();
125
125
  },
126
126
  get dismissButton() {
127
127
  return m();
128
128
  },
129
- set dismissButton(e) {
130
- m(e), o();
129
+ set dismissButton(t) {
130
+ m(t), l();
131
131
  },
132
132
  get container() {
133
133
  return f();
134
134
  },
135
- set container(e) {
136
- f(e), o();
135
+ set container(t) {
136
+ f(t), l();
137
137
  },
138
138
  get el() {
139
139
  return b();
140
140
  },
141
- set el(e) {
142
- b(e), o();
141
+ set el(t) {
142
+ b(t), l();
143
143
  },
144
144
  get inertElements() {
145
145
  return p();
146
146
  },
147
- set inertElements(e) {
148
- p(e), o();
147
+ set inertElements(t) {
148
+ p(t), l();
149
149
  }
150
150
  });
151
151
  }
152
152
  j(["click", "keyup", "focusout"]);
153
153
  customElements.define("uofg-modal", R(
154
- ne,
154
+ rt,
155
155
  {
156
156
  label: {
157
157
  attribute: "label",
@@ -189,21 +189,21 @@ customElements.define("uofg-modal", R(
189
189
  !0,
190
190
  (a) => class extends a {
191
191
  constructor() {
192
- super(), Y(this.shadowRoot), this.el = this, this.inertElements = [];
192
+ super(), G(this.shadowRoot), this.el = this, this.inertElements = [];
193
193
  }
194
194
  connectedCallback() {
195
195
  super.connectedCallback();
196
196
  }
197
197
  disconnectedCallback() {
198
198
  super.disconnectedCallback();
199
- for (const t of this.inertElements)
200
- t.removeAttribute("inert");
199
+ for (const e of this.inertElements)
200
+ e.removeAttribute("inert");
201
201
  }
202
202
  getState() {
203
203
  return this.isOpen;
204
204
  }
205
- setState(t) {
206
- this.isOpen = t;
205
+ setState(e) {
206
+ this.isOpen = e;
207
207
  }
208
208
  toggle() {
209
209
  return this.isOpen = !this.isOpen, this.isOpen;
@@ -217,5 +217,5 @@ customElements.define("uofg-modal", R(
217
217
  }
218
218
  ));
219
219
  export {
220
- ne as default
220
+ rt as default
221
221
  };
@@ -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-Dud1EYGD.js";
1
+ import { A as w, z as d, aC as f, aD as v, aE as n } from "./font-awesome-icon-BQURLWNp.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.4",
3
+ "version": "1.9.0-rc.5",
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,43 +0,0 @@
1
- import { aF as d, D as c, B as g, aG as i, u as p, al as m, aH as b, aI as v, w as h, aJ as k } from "./font-awesome-icon-Dud1EYGD.js";
2
- function x(t = !1) {
3
- const s = (
4
- /** @type {ComponentContextLegacy} */
5
- m
6
- ), e = s.l.u;
7
- if (!e) return;
8
- let f = () => v(s.s);
9
- if (t) {
10
- let n = 0, a = (
11
- /** @type {Record<string, any>} */
12
- {}
13
- );
14
- const _ = h(() => {
15
- let l = !1;
16
- const r = s.s;
17
- for (const o in r)
18
- r[o] !== a[o] && (a[o] = r[o], l = !0);
19
- return l && n++, n;
20
- });
21
- f = () => p(_);
22
- }
23
- e.b.length && d(() => {
24
- u(s, f), i(e.b);
25
- }), c(() => {
26
- const n = g(() => e.m.map(b));
27
- return () => {
28
- for (const a of n)
29
- typeof a == "function" && a();
30
- };
31
- }), e.a.length && c(() => {
32
- u(s, f), i(e.a);
33
- });
34
- }
35
- function u(t, s) {
36
- if (t.l.s)
37
- for (const e of t.l.s) p(e);
38
- s();
39
- }
40
- k();
41
- export {
42
- x as i
43
- };