@uoguelph/web-components 1.9.0-rc.12 → 1.9.0-rc.3

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,18 +1,19 @@
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-BxVomqf1.js";
2
- import { a as X } from "./slot-BV603yHh.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-CvkmaYxh.js";
2
+ import { a as W } from "./slot-CDMqA0vX.js";
3
+ import { t as X } from "./bundle-mjs-BpzLJ4dA.js";
3
4
  function E(a, t) {
4
- return a === t || (a == null ? void 0 : a[j]) === t;
5
+ return a === t || (a == null ? void 0 : a[z]) === t;
5
6
  }
6
7
  function B(a = {}, t, s, c) {
7
- return S(() => {
8
- var i, n;
8
+ return q(() => {
9
+ var i, r;
9
10
  return D(() => {
10
- i = n, n = [], F(() => {
11
- a !== s(...n) && (t(a, ...n), i && E(s(...i), a) && t(null, ...i));
11
+ i = r, r = [], F(() => {
12
+ a !== s(...r) && (t(a, ...r), i && E(s(...i), a) && t(null, ...i));
12
13
  });
13
14
  }), () => {
14
15
  T(() => {
15
- n && E(s(...n), a) && t(null, ...n);
16
+ r && E(s(...r), a) && t(null, ...r);
16
17
  });
17
18
  };
18
19
  }), a;
@@ -22,18 +23,18 @@ const Z = (a) => Array.from(a.querySelectorAll('a[href], area[href], input:not([
22
23
  }, ee = (a, t) => {
23
24
  a.key === "Escape" && t(!1);
24
25
  }, te = (a, t, s, c, i) => {
25
- var n;
26
+ var r;
26
27
  if (t() && !s().contains(a.relatedTarget) && !c().contains(a.relatedTarget))
27
28
  if (a.preventDefault(), a.target === i()) {
28
29
  const d = Z(c());
29
- (n = d[d.length - 1]) == null || n.focus();
30
+ (r = d[d.length - 1]) == null || r.focus();
30
31
  } else
31
32
  i().focus();
32
33
  };
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) {
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) {
35
36
  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);
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);
37
38
  _(() => {
38
39
  i() && s(!0);
39
40
  }), _(() => {
@@ -68,89 +69,89 @@ function re(a, t) {
68
69
  }
69
70
  document.body.style.overflow = s() ? "hidden" : "";
70
71
  });
71
- var r = se();
72
- y(r, "tabindex", -1), r.__click = [$, k, s], r.__keyup = [ee, s], r.__focusout = [
72
+ var n = se();
73
+ y(n, "tabindex", -1), n.__click = [$, k, s], n.__keyup = [ee, s], n.__focusout = [
73
74
  te,
74
75
  s,
75
76
  f,
76
77
  b,
77
78
  m
78
79
  ];
79
- var w = x(r);
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")));
81
- var g = x(w);
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)] top-1/2", s() && c() && "translate-y-[-50%] top-1/2")));
82
+ var g = O(w);
82
83
  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(() => {
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));
88
- }), K(a, r), L({
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
+ }), K(a, n), L({
89
90
  get isOpen() {
90
91
  return s();
91
92
  },
92
93
  set isOpen(e) {
93
- s(e), l();
94
+ s(e), o();
94
95
  },
95
96
  get centered() {
96
97
  return c();
97
98
  },
98
99
  set centered(e) {
99
- c(e), l();
100
+ c(e), o();
100
101
  },
101
102
  get autoOpen() {
102
103
  return i();
103
104
  },
104
105
  set autoOpen(e) {
105
- i(e), l();
106
+ i(e), o();
106
107
  },
107
108
  get label() {
108
- return n();
109
+ return r();
109
110
  },
110
111
  set label(e) {
111
- n(e), l();
112
+ r(e), o();
112
113
  },
113
114
  get alertDialog() {
114
115
  return d();
115
116
  },
116
117
  set alertDialog(e) {
117
- d(e), l();
118
+ d(e), o();
118
119
  },
119
120
  get staticBackdrop() {
120
121
  return k();
121
122
  },
122
123
  set staticBackdrop(e) {
123
- k(e), l();
124
+ k(e), o();
124
125
  },
125
126
  get dismissButton() {
126
127
  return m();
127
128
  },
128
129
  set dismissButton(e) {
129
- m(e), l();
130
+ m(e), o();
130
131
  },
131
132
  get container() {
132
133
  return f();
133
134
  },
134
135
  set container(e) {
135
- f(e), l();
136
+ f(e), o();
136
137
  },
137
138
  get el() {
138
139
  return b();
139
140
  },
140
141
  set el(e) {
141
- b(e), l();
142
+ b(e), o();
142
143
  },
143
144
  get inertElements() {
144
145
  return p();
145
146
  },
146
147
  set inertElements(e) {
147
- p(e), l();
148
+ p(e), o();
148
149
  }
149
150
  });
150
151
  }
151
- z(["click", "keyup", "focusout"]);
152
+ j(["click", "keyup", "focusout"]);
152
153
  customElements.define("uofg-modal", R(
153
- re,
154
+ ne,
154
155
  {
155
156
  label: {
156
157
  attribute: "label",
@@ -216,5 +217,5 @@ customElements.define("uofg-modal", R(
216
217
  }
217
218
  ));
218
219
  export {
219
- re as default
220
+ ne as default
220
221
  };
@@ -1,4 +1,4 @@
1
- import { B as w, A as d, aD as f, aE as v, aF as n } from "./bundle-mjs-BxVomqf1.js";
1
+ import { A as w, z as d, aC as f, aD as v, aE as n } from "./font-awesome-icon-CvkmaYxh.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.12",
3
+ "version": "1.9.0-rc.3",
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,53 +0,0 @@
1
- import { _ as d, $ as g, a0 as b, ai as h, a8 as m, H as v, a4 as y, aG as k, u as c, C as E, aH as l, l as u, an as T, aI as x, aJ as A, m as C, aK as F } from "./bundle-mjs-BxVomqf1.js";
2
- function N(t, s, ...a) {
3
- var r = t, n = h, e;
4
- d(() => {
5
- n !== (n = s()) && (e && (m(e), e = null), e = b(() => (
6
- /** @type {SnippetFn} */
7
- n(r, ...a)
8
- )));
9
- }, g), v && (r = y);
10
- }
11
- function R(t = !1) {
12
- const s = (
13
- /** @type {ComponentContextLegacy} */
14
- T
15
- ), a = s.l.u;
16
- if (!a) return;
17
- let r = () => A(s.s);
18
- if (t) {
19
- let n = 0, e = (
20
- /** @type {Record<string, any>} */
21
- {}
22
- );
23
- const _ = C(() => {
24
- let i = !1;
25
- const o = s.s;
26
- for (const f in o)
27
- o[f] !== e[f] && (e[f] = o[f], i = !0);
28
- return i && n++, n;
29
- });
30
- r = () => u(_);
31
- }
32
- a.b.length && k(() => {
33
- p(s, r), l(a.b);
34
- }), c(() => {
35
- const n = E(() => a.m.map(x));
36
- return () => {
37
- for (const e of n)
38
- typeof e == "function" && e();
39
- };
40
- }), a.a.length && c(() => {
41
- p(s, r), 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
- F();
50
- export {
51
- R as i,
52
- N as s
53
- };