@uoguelph/web-components 1.8.0-rc.0 → 1.9.0-rc.1

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 { aF as d, D as c, B as g, aG as i, u as p, am as m, aH as b, aI as v, w as h, aJ as k } from "./font-awesome-icon-tL6xr2rJ.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
+ };
@@ -0,0 +1,18 @@
1
+ import { H as r, I as l } from "./font-awesome-icon-tL6xr2rJ.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,54 @@
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 w, p as y, a as E, F, s as f, t as a, b as j, d as k, e as z, f as C, g as R, h as S, i as T, j as r, k as d, r as n } from "./font-awesome-icon-tL6xr2rJ.js";
2
+ import { s as U, a as m } from "./slot-dkmGAqBq.js";
3
+ var q = C('<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><!> <span><!></span></div> <div class="flex bg-light-grey"><!></div></div>');
4
+ function A(c, o) {
5
+ const e = U(o);
6
+ y(o, !0);
7
+ let t = E(o, "color", 7, "red");
8
+ var g = q(), s = r(g), b = r(s);
9
+ F(b, { icon: R });
10
+ var x = d(b, 2);
11
+ m(x, o, "title", {}), n(s);
12
+ var l = d(s, 2);
13
+ f(l, 'flex flex-col bg-white px-6 py-3 [&>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'), a(l, "border-b", !(e != null && e.footer));
14
+ var u = r(l);
15
+ m(u, o, "subtitle", {});
16
+ var v = d(u, 2);
17
+ f(v, '[&>slot[name="message"]::slotted(*)]:text-base [&>slot[name="message"]::slotted(a)]:text-blue [&>slot[name="message"]::slotted(a)]:px-1 [&>slot[name="message"]::slotted(a:hover)]:bg-blue [&>slot[name="message"]::slotted(a:hover)]:text-white [&>slot[name="message"]::slotted(a:hover)]:transition-colors [&>slot[name="message"]::slotted(a:hover)]:decoration-transparent');
18
+ var h = r(v);
19
+ m(h, o, "message", {}), n(v), n(l);
20
+ var i = d(l, 2);
21
+ a(i, "px-4", e == null ? void 0 : e.footer), a(i, "py-2", e == null ? void 0 : e.footer);
22
+ var _ = r(i);
23
+ return m(_, o, "footer", {}), n(i), n(g), j(() => {
24
+ a(s, "bg-red", t() === "red"), a(s, "bg-yellow", t() === "yellow"), a(s, "bg-green", t() === "green"), a(s, "bg-blue", t() === "blue"), a(s, "text-white", t() === "red" || t() === "blue" || t() === "green");
25
+ }), k(c, g), z({
26
+ get color() {
27
+ return t();
46
28
  },
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);
29
+ set color(p = "red") {
30
+ t(p), S();
133
31
  }
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];
32
+ });
141
33
  }
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);
34
+ customElements.define("uofg-alert", w(
35
+ A,
36
+ {
37
+ color: {
38
+ attribute: "color",
39
+ reflect: !0,
40
+ type: "String"
41
+ }
42
+ },
43
+ ["title", "subtitle", "message", "footer"],
44
+ [],
45
+ !0,
46
+ (c) => class extends c {
47
+ constructor() {
48
+ super(), T(this.shadowRoot);
49
+ }
150
50
  }
151
- }));
51
+ ));
152
52
  export {
153
- Z as default
53
+ A as default
154
54
  };
@@ -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-tL6xr2rJ.js";
2
+ import { b as B } from "./window-BjFv1LQ0.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
  };