@uoguelph/web-components 1.9.1-rc.1 → 1.9.1-rc.11

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,20 @@
1
+ import { av as t, aB as a, aC as o, B as c, z as u } from "./index-COoEfbwQ.js";
2
+ function f(e) {
3
+ t === null && a(), o && t.l !== null ? l(t).m.push(e) : c(() => {
4
+ const n = u(e);
5
+ if (typeof n == "function") return (
6
+ /** @type {() => void} */
7
+ n
8
+ );
9
+ });
10
+ }
11
+ function l(e) {
12
+ var n = (
13
+ /** @type {ComponentContextLegacy} */
14
+ e.l
15
+ );
16
+ return n.u ?? (n.u = { a: [], b: [], m: [] });
17
+ }
18
+ export {
19
+ f as o
20
+ };
@@ -0,0 +1,53 @@
1
+ import { ar as d, a3 as g, as as v, a9 as b, at as h, E as m, au as y, av as k, aw as E, B as c, z as x, ax as A, ay as l, m as u, az as T, o as z, aA as F } from "./index-COoEfbwQ.js";
2
+ function R(t, s, ...a) {
3
+ var r = t, n = b, e;
4
+ d(() => {
5
+ n !== (n = s()) && (e && (h(e), e = null), e = v(() => (
6
+ /** @type {SnippetFn} */
7
+ n(r, ...a)
8
+ )));
9
+ }, g), m && (r = y);
10
+ }
11
+ function w(t = !1) {
12
+ const s = (
13
+ /** @type {ComponentContextLegacy} */
14
+ k
15
+ ), a = s.l.u;
16
+ if (!a) return;
17
+ let r = () => T(s.s);
18
+ if (t) {
19
+ let n = 0, e = (
20
+ /** @type {Record<string, any>} */
21
+ {}
22
+ );
23
+ const _ = z(() => {
24
+ let i = !1;
25
+ const f = s.s;
26
+ for (const o in f)
27
+ f[o] !== e[o] && (e[o] = f[o], i = !0);
28
+ return i && n++, n;
29
+ });
30
+ r = () => u(_);
31
+ }
32
+ a.b.length && E(() => {
33
+ p(s, r), l(a.b);
34
+ }), c(() => {
35
+ const n = x(() => a.m.map(A));
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
+ w as i,
52
+ R as s
53
+ };
@@ -1,4 +1,4 @@
1
- import { E as r, G as l } from "./bundle-mjs-BTgoI2Ah.js";
1
+ import { E as r, G as l } from "./index-COoEfbwQ.js";
2
2
  function d(i, t, e, s, o) {
3
3
  var a;
4
4
  r && l();
@@ -1,41 +1,70 @@
1
- import { c as p, p as y, t as w, F as E, s as n, a as F, b as S, d as j, e as k, f as z, g as d, h as a, i as C, j as J, k as R, r as o, l as T } from "./bundle-mjs-BTgoI2Ah.js";
2
- import { s as U, a as i } from "./slot-E9j-JIta.js";
3
- var q = w('<div class="flex flex-col"><div><!> <!></div> <div><!> <span><!></span></div> <div><!></div></div>');
4
- function A(c, t) {
5
- const e = U(t);
6
- k(t, !0);
7
- let s = y(t, "color", 7, "red");
8
- var m = q(), l = a(m), b = a(l);
9
- E(b, { icon: z });
10
- var x = d(b, 2);
11
- i(x, t, "title", {}), o(l);
12
- var r = d(l, 2);
13
- n(r, 1, 'border-grey-muted flex flex-col border border-t-0 bg-white px-6 py-3 [&>slot[name="subtitle"]::slotted(*)]:mb-4 [&>slot[name="subtitle"]::slotted(*)]:text-xl [&>slot[name="subtitle"]::slotted(*)]:font-bold', null, {}, { "border-b": !(e != null && e.footer) });
14
- var f = a(r);
15
- i(f, t, "subtitle", {});
16
- var g = d(f, 2);
17
- n(g, 1, '[&>slot[name="message"]::slotted(*)]:text-base [&>slot[name="message"]::slotted(a)]:text-blue-text [&>slot[name="message"]::slotted(a)]:px-1 [&>slot[name="message"]::slotted(a:hover)]:bg-blue [&>slot[name="message"]::slotted(a:hover)]:text-blue-contrast [&>slot[name="message"]::slotted(a:hover)]:decoration-transparent [&>slot[name="message"]::slotted(a:hover)]:transition-colors');
18
- var h = a(g);
19
- i(h, t, "message", {}), o(g), o(r);
20
- var u = d(r, 2);
21
- n(u, 1, "bg-grey-light text-grey-light-contrast flex", null, {}, {
22
- "px-4": e == null ? void 0 : e.footer,
23
- "py-2": e == null ? void 0 : e.footer
1
+ import { c as q, p as A, a as B, b as p, t as D, F as G, f as H, s as c, d as s, e as I, g as o, h as a, i as J, j as K, k as L, r as l } from "./index-COoEfbwQ.js";
2
+ import { s as N, a as d } from "./slot-PkqRrLOL.js";
3
+ import { o as O } from "./index-client-B8yHTd41.js";
4
+ import { c as P } from "./index-O5kp37c8.js";
5
+ var Q = D("<div><div><!> <!></div> <div><!> <span><!></span></div> <div><!></div></div>");
6
+ function V(m, t) {
7
+ const e = N(t);
8
+ A(t, !0);
9
+ let g = B(t, "color", 7, "red");
10
+ O(() => {
11
+ p(t.$$host.shadowRoot);
24
12
  });
25
- var _ = a(u);
26
- return i(_, t, "footer", {}), o(u), o(m), F((v) => n(l, 1, J(v)), [
27
- () => C("flex items-center p-4 text-lg [&>svg]:mr-4 [&>svg]:h-[1.5em] [&>svg]:fill-current", s() === "red" && "bg-red text-red-contrast", s() === "yellow" && "bg-yellow text-yellow-contrast", s() === "blue" && "bg-blue text-blue-contrast", s() === "green" && "bg-green text-green-contrast")
28
- ]), S(c, m), j({
13
+ const y = P({
14
+ slots: {
15
+ base: "flex flex-col",
16
+ title: "flex items-center p-4 text-lg [&>svg]:mr-4 [&>svg]:h-[1.5em] [&>svg]:fill-current",
17
+ content: 'border-grey-muted flex flex-col border border-t-0 bg-white px-6 py-3 [&>slot[name="subtitle"]::slotted(*)]:mb-4 [&>slot[name="subtitle"]::slotted(*)]:text-xl [&>slot[name="subtitle"]::slotted(*)]:font-bold',
18
+ message: '[&>slot[name="message"]::slotted(a)]:text-blue-text [&>slot[name="message"]::slotted(*)]:text-base [&>slot[name="message"]::slotted(a)]:px-1 [&>slot[name="message"]::slotted(a:hover)]:bg-blue [&>slot[name="message"]::slotted(a:hover)]:text-blue-contrast [&>slot[name="message"]::slotted(a:hover)]:decoration-transparent [&>slot[name="message"]::slotted(a:hover)]:transition-colors',
19
+ footer: "bg-grey-light text-grey-light-contrast flex"
20
+ },
21
+ variants: {
22
+ color: {
23
+ red: { title: "bg-red text-red-contrast" },
24
+ yellow: { title: "bg-yellow text-yellow-contrast" },
25
+ blue: { title: "bg-blue text-blue-contrast" },
26
+ green: { title: "bg-green text-green-contrast" }
27
+ }
28
+ }
29
+ }), { base: w, title: E, content: F, message: R, footer: S } = y({ color: g() });
30
+ var r = Q(), n = s(r), f = s(n);
31
+ G(f, { icon: H });
32
+ var j = c(f, 2);
33
+ d(j, t, "title", {}), l(n);
34
+ var i = c(n, 2);
35
+ let x;
36
+ var h = s(i);
37
+ d(h, t, "subtitle", {});
38
+ var u = c(h, 2), k = s(u);
39
+ d(k, t, "message", {}), l(u), l(i);
40
+ var b = c(i, 2);
41
+ let _;
42
+ var z = s(b);
43
+ return d(z, t, "footer", {}), l(b), l(r), I(
44
+ (v, C, M, T, U) => {
45
+ a(r, 1, v), a(n, 1, C), x = a(i, 1, M, null, x, { "border-b": !(e != null && e.footer) }), a(u, 1, T), _ = a(b, 1, U, null, _, {
46
+ "px-4": e == null ? void 0 : e.footer,
47
+ "py-2": e == null ? void 0 : e.footer
48
+ });
49
+ },
50
+ [
51
+ () => o(w()),
52
+ () => o(E()),
53
+ () => o(F()),
54
+ () => o(R()),
55
+ () => o(S())
56
+ ]
57
+ ), J(m, r), K({
29
58
  get color() {
30
- return s();
59
+ return g();
31
60
  },
32
61
  set color(v = "red") {
33
- s(v), R();
62
+ g(v), L();
34
63
  }
35
64
  });
36
65
  }
37
- customElements.define("uofg-alert", p(
38
- A,
66
+ customElements.define("uofg-alert", q(
67
+ V,
39
68
  {
40
69
  color: {
41
70
  attribute: "color",
@@ -46,12 +75,12 @@ customElements.define("uofg-alert", p(
46
75
  ["title", "subtitle", "message", "footer"],
47
76
  [],
48
77
  !0,
49
- (c) => class extends c {
78
+ (m) => class extends m {
50
79
  constructor() {
51
- super(), T(this.shadowRoot);
80
+ super(), p(this.shadowRoot);
52
81
  }
53
82
  }
54
83
  ));
55
84
  export {
56
- A as default
85
+ V as default
57
86
  };
@@ -1,28 +1,35 @@
1
- import { m as u, c as b, e as h, u as m, t as _, F as x, n as w, a as g, i as v, o, q as n, s as k, j as y, b as T, d as j, h as l, v as i, w as F, r as p, x as U, l as q } from "./bundle-mjs-BTgoI2Ah.js";
2
- import { b as z } from "./window-Bnb7gJSm.js";
3
- const B = () => {
1
+ import { l as b, c as u, t as f, F as m, e as v, m as o, i as h, j as _, p as g, n as x, g as w, o as k, h as y, q as T, u as j, v as F, d as c, r as i, w as U, b as q } from "./index-COoEfbwQ.js";
2
+ import { b as z } from "./window-Do2AuJP2.js";
3
+ import { c as B } from "./index-O5kp37c8.js";
4
+ const C = () => {
4
5
  window.scroll({ top: 0, left: 0, behavior: "smooth" });
5
6
  };
6
- var C = _('<button><span aria-hidden="true"><!></span> <span class="sr-only">Back to top of page</span></button>');
7
- function E(e, d) {
8
- h(d, !0);
9
- let r = n(!1), s = n(0);
10
- m(() => {
11
- i(r, o(s) > 50);
7
+ var E = f('<button><span aria-hidden="true"><!></span> <span class="sr-only">Back to top of page</span></button>');
8
+ function R(e, n) {
9
+ g(n, !0);
10
+ let s = F(0), l = k(() => o(s) > 50);
11
+ const p = B({
12
+ base: "fixed right-8 bottom-8 z-10 flex h-10 w-10 items-center justify-center border border-white bg-black text-lg text-black-contrast transition hover:bg-red hover:text-red-contrast focus:bg-red focus:text-red-contrast",
13
+ variants: {
14
+ visible: {
15
+ true: "visible opacity-100",
16
+ false: "invisible opacity-0"
17
+ }
18
+ }
12
19
  });
13
- var t = C();
14
- t.__click = [B];
15
- var c = l(t), f = l(c);
16
- x(f, { icon: w }), p(c), U(2), p(t), g((a) => k(t, 1, y(a)), [
17
- () => v("fixed right-8 bottom-8 z-10 flex h-10 w-10 items-center justify-center border border-white bg-black text-lg text-black-contrast transition hover:bg-red hover:text-red-contrast focus:bg-red focus:text-red-contrast", o(r) ? "opacity-100" : "opacity-0")
18
- ]), z("y", () => o(s), (a) => i(s, F(a))), T(e, t), j();
20
+ var t = E();
21
+ t.__click = [C];
22
+ var r = c(t), d = c(r);
23
+ m(d, { icon: x }), i(r), U(2), i(t), v((a) => y(t, 1, a), [
24
+ () => w(p({ visible: o(l) }))
25
+ ]), z("y", () => o(s), (a) => T(s, j(a))), h(e, t), _();
19
26
  }
20
- u(["click"]);
21
- customElements.define("uofg-back-to-top", b(E, {}, [], [], !0, (e) => class extends e {
27
+ b(["click"]);
28
+ customElements.define("uofg-back-to-top", u(R, {}, [], [], !0, (e) => class extends e {
22
29
  constructor() {
23
30
  super(), q(this.shadowRoot);
24
31
  }
25
32
  }));
26
33
  export {
27
- E as default
34
+ R as default
28
35
  };