@uoguelph/web-components 1.7.5-rc.0 → 1.7.6-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.
@@ -0,0 +1,2 @@
1
+ import { aK as a } from "./font-awesome-icon-G0qfxDx-.js";
2
+ a();
@@ -0,0 +1,42 @@
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-G0qfxDx-.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
+ };
@@ -0,0 +1,10 @@
1
+ import { H as n, I as s } from "./font-awesome-icon-G0qfxDx-.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
+ };
@@ -1,154 +1,26 @@
1
- import { c as A, S as B, i as D, a as G, s as H, F as I, f as J, b as $, e as v, d as K, g as h, h as w, j as L, k as m, m as M, u as x, l as q, n as y, t as p, o as d, p as N, q as O } from "./font-awesome-icon-DNx_vc4u.js";
2
- const P = (e) => ({}), R = (e) => ({}), Q = (e) => ({}), T = (e) => ({}), V = (e) => ({}), U = (e) => ({}), W = (e) => ({}), z = (e) => ({});
3
- function X(e) {
4
- let s, f, r, c, g, u, j, k, b, o;
5
- r = new I({ props: { icon: J } });
6
- const C = (
7
- /*#slots*/
8
- e[1].title
9
- ), l = $(
10
- C,
11
- e,
12
- /*$$scope*/
13
- e[0],
14
- z
15
- ), E = (
16
- /*#slots*/
17
- e[1].subtitle
18
- ), n = $(
19
- E,
20
- e,
21
- /*$$scope*/
22
- e[0],
23
- U
24
- ), F = (
25
- /*#slots*/
26
- e[1].message
27
- ), a = $(
28
- F,
29
- e,
30
- /*$$scope*/
31
- e[0],
32
- T
33
- ), S = (
34
- /*#slots*/
35
- e[1].footer
36
- ), i = $(
37
- S,
38
- e,
39
- /*$$scope*/
40
- e[0],
41
- R
42
- );
43
- return {
44
- c() {
45
- s = v("div"), f = v("div"), K(r.$$.fragment), c = h(), l && l.c(), g = h(), u = v("div"), n && n.c(), j = h(), a && a.c(), k = h(), b = v("div"), i && i.c(), w(f, "class", "flex items-center bg-uofg-red p-8 text-4xl text-white [&>svg]:mr-4 [&>svg]:h-[1.5em] [&>svg]:fill-current"), w(u, "class", 'flex flex-col bg-white px-8 py-6 [&>slot[name="message"]::slotted(*)]:text-2xl [&>slot[name="subtitle"]::slotted(*)]:mb-8 [&>slot[name="subtitle"]::slotted(*)]:text-4xl [&>slot[name="subtitle"]::slotted(*)]:font-bold'), w(b, "class", "flex bg-uofg-grey px-8 py-4 text-2xl"), w(s, "class", "flex flex-col text-3xl");
46
- },
47
- m(t, _) {
48
- L(t, s, _), m(s, f), M(r, f, null), m(f, c), l && l.m(f, null), m(s, g), m(s, u), n && n.m(u, null), m(u, j), a && a.m(u, null), m(s, k), m(s, b), i && i.m(b, null), o = !0;
49
- },
50
- p(t, [_]) {
51
- l && l.p && (!o || _ & /*$$scope*/
52
- 1) && x(
53
- l,
54
- C,
55
- t,
56
- /*$$scope*/
57
- t[0],
58
- o ? y(
59
- C,
60
- /*$$scope*/
61
- t[0],
62
- _,
63
- W
64
- ) : q(
65
- /*$$scope*/
66
- t[0]
67
- ),
68
- z
69
- ), n && n.p && (!o || _ & /*$$scope*/
70
- 1) && x(
71
- n,
72
- E,
73
- t,
74
- /*$$scope*/
75
- t[0],
76
- o ? y(
77
- E,
78
- /*$$scope*/
79
- t[0],
80
- _,
81
- V
82
- ) : q(
83
- /*$$scope*/
84
- t[0]
85
- ),
86
- U
87
- ), a && a.p && (!o || _ & /*$$scope*/
88
- 1) && x(
89
- a,
90
- F,
91
- t,
92
- /*$$scope*/
93
- t[0],
94
- o ? y(
95
- F,
96
- /*$$scope*/
97
- t[0],
98
- _,
99
- Q
100
- ) : q(
101
- /*$$scope*/
102
- t[0]
103
- ),
104
- T
105
- ), i && i.p && (!o || _ & /*$$scope*/
106
- 1) && x(
107
- i,
108
- S,
109
- t,
110
- /*$$scope*/
111
- t[0],
112
- o ? y(
113
- S,
114
- /*$$scope*/
115
- t[0],
116
- _,
117
- P
118
- ) : q(
119
- /*$$scope*/
120
- t[0]
121
- ),
122
- R
123
- );
124
- },
125
- i(t) {
126
- o || (p(r.$$.fragment, t), p(l, t), p(n, t), p(a, t), p(i, t), o = !0);
127
- },
128
- o(t) {
129
- d(r.$$.fragment, t), d(l, t), d(n, t), d(a, t), d(i, t), o = !1;
130
- },
131
- d(t) {
132
- t && N(s), O(r), l && l.d(t), n && n.d(t), a && a.d(t), i && i.d(t);
133
- }
134
- };
1
+ import { c as g, F as u, s as b, a as _, t as p, f as h, b as w, d as s, e as a, r as l } from "./font-awesome-icon-G0qfxDx-.js";
2
+ import "./legacy-DEy5AMhA.js";
3
+ import { s as o } from "./slot-CsZns-iM.js";
4
+ var y = p('<div class="flex flex-col"><div class="flex items-center bg-red p-4 text-lg text-white [&amp;>svg]:mr-4 [&amp;>svg]:h-[1.5em] [&amp;>svg]:fill-current"><!> <!></div> <div><!> <!></div> <div class="flex bg-light-grey px-4 py-2 text-lg"><!></div></div>');
5
+ function E(i, e) {
6
+ var r = y(), d = s(r), n = s(d);
7
+ u(n, { icon: h });
8
+ var c = a(n, 2);
9
+ o(c, e, "title", {}), l(d);
10
+ var t = a(d, 2);
11
+ b(t, 'flex flex-col bg-white px-6 py-3 [&>slot[name="message"]::slotted(*)]:text-base [&>slot[name="subtitle"]::slotted(*)]:mb-4 [&>slot[name="subtitle"]::slotted(*)]:text-xl [&>slot[name="subtitle"]::slotted(*)]:font-bold');
12
+ var m = s(t);
13
+ o(m, e, "subtitle", {});
14
+ var f = a(m, 2);
15
+ o(f, e, "message", {}), l(t);
16
+ var v = a(t, 2), x = s(v);
17
+ o(x, e, "footer", {}), l(v), l(r), _(i, r);
135
18
  }
136
- function Y(e, s, f) {
137
- let { $$slots: r = {}, $$scope: c } = s;
138
- return e.$$set = (g) => {
139
- "$$scope" in g && f(0, c = g.$$scope);
140
- }, [c, r];
141
- }
142
- class Z extends B {
143
- constructor(s) {
144
- super(), D(this, s, Y, X, H, {});
145
- }
146
- }
147
- customElements.define("uofg-alert", A(Z, {}, ["title", "subtitle", "message", "footer"], [], !0, (e) => class extends e {
19
+ customElements.define("uofg-alert", g(E, {}, ["title", "subtitle", "message", "footer"], [], !0, (i) => class extends i {
148
20
  constructor() {
149
- super(), G(this.shadowRoot);
21
+ super(), w(this.shadowRoot);
150
22
  }
151
23
  }));
152
24
  export {
153
- Z as default
25
+ E as default
154
26
  };
@@ -1,84 +1,28 @@
1
- import { c as y, S as T, i as k, a as $, s as v, r as j, F as C, v as q, e as m, d as z, g as F, h as p, j as O, k as g, m as S, w as h, t as U, o as Y, p as B, q as E, x as J } from "./font-awesome-icon-DNx_vc4u.js";
2
- import { t as x } from "./bundle-mjs-BpzLJ4dA.js";
3
- const R = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : (
4
- // @ts-ignore Node typings have this
5
- global
6
- ), { window: b } = R;
7
- function X(e) {
8
- let n = !1, l = () => {
9
- n = !1;
10
- }, a, t, r, s, w, c, u, i, d, _;
11
- return j(
12
- /*onwindowscroll*/
13
- e[3]
14
- ), s = new C({ props: { icon: q } }), {
15
- c() {
16
- t = m("button"), r = m("span"), z(s.$$.fragment), w = F(), c = m("span"), c.textContent = "Back to top of page", p(r, "aria-hidden", "true"), p(c, "class", "sr-only"), p(t, "class", u = x(
17
- "flex z-10 justify-center items-center text-4xl w-16 h-16 border border-white bg-black fixed bottom-8 right-8 text-white hover:bg-uofg-red focus:bg-uofg-red transition",
18
- /*visible*/
19
- e[1] ? "opacity-100" : "opacity-0"
20
- ));
21
- },
22
- m(o, f) {
23
- O(o, t, f), g(t, r), S(s, r, null), g(t, w), g(t, c), i = !0, d || (_ = [
24
- h(b, "scroll", () => {
25
- n = !0, clearTimeout(a), a = setTimeout(l, 100), e[3]();
26
- }),
27
- h(
28
- t,
29
- "click",
30
- /*scrollToTop*/
31
- e[2]
32
- )
33
- ], d = !0);
34
- },
35
- p(o, [f]) {
36
- f & /*scrollY*/
37
- 1 && !n && (n = !0, clearTimeout(a), scrollTo(
38
- b.pageXOffset,
39
- /*scrollY*/
40
- o[0]
41
- ), a = setTimeout(l, 100)), (!i || f & /*visible*/
42
- 2 && u !== (u = x(
43
- "flex z-10 justify-center items-center text-4xl w-16 h-16 border border-white bg-black fixed bottom-8 right-8 text-white hover:bg-uofg-red focus:bg-uofg-red transition",
44
- /*visible*/
45
- o[1] ? "opacity-100" : "opacity-0"
46
- ))) && p(t, "class", u);
47
- },
48
- i(o) {
49
- i || (U(s.$$.fragment, o), i = !0);
50
- },
51
- o(o) {
52
- Y(s.$$.fragment, o), i = !1;
53
- },
54
- d(o) {
55
- o && B(t), E(s), d = !1, J(_);
56
- }
57
- };
58
- }
59
- function A(e, n, l) {
60
- let a = !1, t = 0;
61
- const r = () => {
62
- window.scroll({ top: 0, left: 0, behavior: "smooth" });
63
- };
64
- function s() {
65
- l(0, t = b.pageYOffset);
66
- }
67
- return e.$$.update = () => {
68
- e.$$.dirty & /*scrollY*/
69
- 1 && l(1, a = t > 50);
70
- }, [t, a, r, s];
71
- }
72
- class D extends T {
73
- constructor(n) {
74
- super(), k(this, n, A, X, v, {});
75
- }
1
+ import { g as b, c as m, p as h, h as _, F as g, i as v, a as w, j as x, t as k, k as y, l as n, m as T, n as e, b as j, o as c, d as i, s as F, q as U, u as q, r as l, v as z } from "./font-awesome-icon-G0qfxDx-.js";
2
+ import { b as B } from "./window-SgJU2JpL.js";
3
+ import { t as C } from "./bundle-mjs-BpzLJ4dA.js";
4
+ const E = () => {
5
+ window.scroll({ top: 0, left: 0, behavior: "smooth" });
6
+ };
7
+ var J = k('<button><span aria-hidden="true"><!></span> <span class="sr-only">Back to top of page</span></button>');
8
+ function R(s, p) {
9
+ h(p, !0);
10
+ let o = c(!1), a = c(0);
11
+ _(() => {
12
+ n(o, e(a) > 50);
13
+ });
14
+ var t = J();
15
+ t.__click = [E];
16
+ const d = U(() => q(C("flex z-10 justify-center items-center text-lg w-10 h-10 border border-white bg-black fixed bottom-8 right-8 text-white hover:bg-red focus:bg-red transition", e(o) ? "opacity-100" : "opacity-0")));
17
+ var r = i(t), u = i(r);
18
+ g(u, { icon: y }), l(r), z(2), l(t), v(() => F(t, e(d))), B("y", () => e(a), (f) => n(a, T(f))), w(s, t), x();
76
19
  }
77
- customElements.define("uofg-back-to-top", y(D, {}, [], [], !0, (e) => class extends e {
20
+ b(["click"]);
21
+ customElements.define("uofg-back-to-top", m(R, {}, [], [], !0, (s) => class extends s {
78
22
  constructor() {
79
- super(), $(this.shadowRoot);
23
+ super(), j(this.shadowRoot);
80
24
  }
81
25
  }));
82
26
  export {
83
- D as default
27
+ R as default
84
28
  };