@uoguelph/web-components 1.8.0-rc.0 → 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.
@@ -0,0 +1,43 @@
1
+ import { aG as d, D as c, B as g, aH as i, u as p, an as m, aI as b, aJ as v, w as h, aK as k } from "./font-awesome-icon-AppLwNgo.js";
2
+ function x(n = !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 (n) {
10
+ let t = 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 && t++, t;
20
+ });
21
+ f = () => p(_);
22
+ }
23
+ e.b.length && d(() => {
24
+ u(s, f), i(e.b);
25
+ }), c(() => {
26
+ const t = g(() => e.m.map(b));
27
+ return () => {
28
+ for (const a of t)
29
+ typeof a == "function" && a();
30
+ };
31
+ }), e.a.length && c(() => {
32
+ u(s, f), i(e.a);
33
+ });
34
+ }
35
+ function u(n, s) {
36
+ if (n.l.s)
37
+ for (const e of n.l.s) p(e);
38
+ s();
39
+ }
40
+ k();
41
+ export {
42
+ x as i
43
+ };
@@ -0,0 +1,18 @@
1
+ import { H as r, I as l } from "./font-awesome-icon-AppLwNgo.js";
2
+ function d(i, t, e, s, o) {
3
+ var a;
4
+ r && l();
5
+ var n = (a = t.$$slots) == null ? void 0 : a[e], f = !1;
6
+ n === !0 && (n = t[e === "default" ? "children" : e], f = !0), n === void 0 || n(i, f ? () => s : s);
7
+ }
8
+ function c(i) {
9
+ const t = {};
10
+ i.children && (t.default = !0);
11
+ for (const e in i.$$slots)
12
+ t[e] = !0;
13
+ return t;
14
+ }
15
+ export {
16
+ d as a,
17
+ c as s
18
+ };
@@ -1,154 +1,52 @@
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-B0B9COBP.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");
1
+ import { c as h, p, a as y, F as w, s as E, t as r, b as F, d as j, e as k, f as z, g as C, h as R, i as S, j as i, k as d, r as n } from "./font-awesome-icon-AppLwNgo.js";
2
+ import { s as T, a as c } from "./slot-CexNersB.js";
3
+ var U = z('<div class="flex flex-col"><div class="flex items-center p-4 text-lg [&amp;>svg]:mr-4 [&amp;>svg]:h-[1.5em] [&amp;>svg]:fill-current"><!> <!></div> <div><!> <!></div> <div class="flex bg-light-grey text-lg"><!></div></div>');
4
+ function q(g, l) {
5
+ const e = T(l);
6
+ p(l, !0);
7
+ let t = y(l, "color", 7, "red");
8
+ var f = U(), a = i(f), m = i(a);
9
+ w(m, { icon: C });
10
+ var u = d(m, 2);
11
+ c(u, l, "title", {}), n(a);
12
+ var o = d(a, 2);
13
+ E(o, '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 border-light-grey border-t-0 border'), r(o, "border-b", !(e != null && e.footer));
14
+ var b = i(o);
15
+ c(b, l, "subtitle", {});
16
+ var v = d(b, 2);
17
+ c(v, l, "message", {}), n(o);
18
+ var s = d(o, 2);
19
+ r(s, "px-4", e == null ? void 0 : e.footer), r(s, "py-2", e == null ? void 0 : e.footer);
20
+ var x = i(s);
21
+ return c(x, l, "footer", {}), n(s), n(f), F(() => {
22
+ r(a, "bg-red", t() === "red"), r(a, "bg-yellow", t() === "yellow"), r(a, "bg-green", t() === "green"), r(a, "bg-blue", t() === "blue"), r(a, "text-white", t() === "red" || t() === "blue" || t() === "green");
23
+ }), j(g, f), k({
24
+ get color() {
25
+ return t();
46
26
  },
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);
27
+ set color(_ = "red") {
28
+ t(_), R();
133
29
  }
134
- };
135
- }
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];
30
+ });
141
31
  }
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 {
148
- constructor() {
149
- super(), G(this.shadowRoot);
32
+ customElements.define("uofg-alert", h(
33
+ q,
34
+ {
35
+ color: {
36
+ attribute: "color",
37
+ reflect: !0,
38
+ type: "String"
39
+ }
40
+ },
41
+ ["title", "subtitle", "message", "footer"],
42
+ [],
43
+ !0,
44
+ (g) => class extends g {
45
+ constructor() {
46
+ super(), S(this.shadowRoot);
47
+ }
150
48
  }
151
- }));
49
+ ));
152
50
  export {
153
- Z as default
51
+ q as default
154
52
  };
@@ -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-B0B9COBP.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 { l as b, c as m, p as h, m as _, F as w, b as v, d as g, e as x, f as y, n as k, o as n, q as T, u as e, i as j, v as c, j as i, s as F, w as U, x as q, r as l, y as z } from "./font-awesome-icon-AppLwNgo.js";
2
+ import { b as B } from "./window-CPkdhWRF.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 = y('<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 a = c(!1), o = c(0);
11
+ _(() => {
12
+ n(a, e(o) > 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(a) ? "opacity-100" : "opacity-0")));
17
+ var r = i(t), f = i(r);
18
+ w(f, { icon: k }), l(r), z(2), l(t), v(() => F(t, e(d))), B("y", () => e(o), (u) => n(o, T(u))), g(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
  };