@uoguelph/react-components 1.2.12 → 1.2.13

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.
Files changed (51) hide show
  1. package/dist/blockquote-author-link.js +8 -8
  2. package/dist/breadcrumb-home.js +13 -13
  3. package/dist/breadcrumb.js +13 -13
  4. package/dist/breadcrumbs.js +5 -5
  5. package/dist/card-content.js +4 -4
  6. package/dist/card-footer.js +1 -1
  7. package/dist/card-image.js +16 -16
  8. package/dist/card-title.js +5 -5
  9. package/dist/card.js +1 -1
  10. package/dist/carousel.js +30 -30
  11. package/dist/checkbox.js +26 -26
  12. package/dist/contact-email.js +8 -8
  13. package/dist/contact-name.js +6 -6
  14. package/dist/contact-phone.js +9 -9
  15. package/dist/contact-title.js +4 -4
  16. package/dist/contact.js +12 -12
  17. package/dist/container.js +7 -7
  18. package/dist/divider.js +10 -10
  19. package/dist/embedded-video-modal-button.js +30 -13
  20. package/dist/hero.js +19 -19
  21. package/dist/image-overlay.js +19 -19
  22. package/dist/info.js +2 -2
  23. package/dist/layout-content.js +3 -3
  24. package/dist/layout.js +8 -8
  25. package/dist/link-carousel-link.js +6 -6
  26. package/dist/link.js +3 -3
  27. package/dist/list-item.js +5 -5
  28. package/dist/list.js +1 -1
  29. package/dist/modal.js +27 -16
  30. package/dist/radio-group.js +13 -13
  31. package/dist/radio.js +8 -8
  32. package/dist/statistics-item-image.js +12 -2
  33. package/dist/statistics-item-represents.js +2 -5
  34. package/dist/statistics-item-value.js +2 -5
  35. package/dist/statistics-item.js +2 -2
  36. package/dist/statistics.js +33 -33
  37. package/dist/story-background-image.js +12 -2
  38. package/dist/story-background.js +2 -2
  39. package/dist/story-body.js +2 -2
  40. package/dist/story-footer.js +3 -3
  41. package/dist/story-foreground-content.js +2 -5
  42. package/dist/story-foreground-image.js +13 -3
  43. package/dist/story-foreground.js +2 -2
  44. package/dist/story.js +2 -2
  45. package/dist/tab-list.js +7 -7
  46. package/dist/tab-panel.js +8 -8
  47. package/dist/tab-panels.js +4 -4
  48. package/dist/tab.js +1 -1
  49. package/dist/tabs.js +6 -6
  50. package/dist/text-input.js +18 -18
  51. package/package.json +2 -2
@@ -1,23 +1,40 @@
1
- import { jsxs as d, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
2
  import { g as i } from "./solid-D4xgBves.js";
3
3
  import { FontAwesomeIcon as s } from "@fortawesome/react-fontawesome";
4
4
  import { useContext as m } from "react";
5
5
  import { twMerge as l } from "tailwind-merge";
6
- import { Button as g } from "./button.js";
7
- import { EmbeddedVideoContext as a } from "./embedded-video-context.js";
8
- function f({ type: e, children: u, className: r }) {
9
- const o = m(a);
10
- if (e === "play-button") {
11
- const n = l(
6
+ import { Button as a } from "./button.js";
7
+ import { EmbeddedVideoContext as g } from "./embedded-video-context.js";
8
+ function f({ type: t, children: r, className: u }) {
9
+ const o = m(g);
10
+ if (t === "play-button") {
11
+ const d = l(
12
12
  "uog:flex uog:aspect-square uog:w-24 uog:items-center uog:justify-center uog:rounded-full uog:bg-red uog:text-4xl uog:text-white uog:transition-colors uog:hover:bg-red-focus uog:focus:bg-red-focus",
13
- r
13
+ u
14
+ );
15
+ return /* @__PURE__ */ n(
16
+ "button",
17
+ {
18
+ type: "button",
19
+ className: `uofg-embedded-video-play-button ${d}`,
20
+ onClick: () => o == null ? void 0 : o.setModalOpen(!0),
21
+ children: [
22
+ /* @__PURE__ */ e(s, { icon: i }),
23
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "Show Video" })
24
+ ]
25
+ }
14
26
  );
15
- return /* @__PURE__ */ d("button", { type: "button", className: n, onClick: () => o == null ? void 0 : o.setModalOpen(!0), children: [
16
- /* @__PURE__ */ t(s, { icon: i }),
17
- /* @__PURE__ */ t("span", { className: "sr-only", children: "Show Video" })
18
- ] });
19
27
  }
20
- return /* @__PURE__ */ t(g, { type: "button", color: e, className: r, onClick: () => o == null ? void 0 : o.setModalOpen(!0), children: u });
28
+ return /* @__PURE__ */ e(
29
+ a,
30
+ {
31
+ type: "button",
32
+ color: t,
33
+ className: `uofg-embedded-video-play-button ${u}`,
34
+ onClick: () => o == null ? void 0 : o.setModalOpen(!0),
35
+ children: r
36
+ }
37
+ );
21
38
  }
22
39
  f.displayName = "EmbeddedVideoModalButton";
23
40
  export {
package/dist/hero.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { jsxs as p, jsx as o } from "react/jsx-runtime";
2
- import { tv as x } from "tailwind-variants";
3
- import { HeroCaption as y } from "./hero-caption.js";
4
- import { HeroContent as d } from "./hero-content.js";
5
- import { HeroContext as h } from "./hero-context.js";
6
- import { HeroLink as I } from "./hero-link.js";
7
- import { HeroTitle as P } from "./hero-title.js";
8
- import { HeroVideo as V } from "./hero-video.js";
2
+ import { tv as h } from "tailwind-variants";
3
+ import { HeroCaption as k } from "./hero-caption.js";
4
+ import { HeroContent as x } from "./hero-content.js";
5
+ import { HeroContext as d } from "./hero-context.js";
6
+ import { HeroLink as E } from "./hero-link.js";
7
+ import { HeroTitle as L } from "./hero-title.js";
8
+ import { HeroVideo as T } from "./hero-video.js";
9
9
  const v = "img";
10
10
  function H({
11
11
  as: r,
@@ -15,10 +15,10 @@ function H({
15
15
  width: i,
16
16
  height: m,
17
17
  alignment: s,
18
- children: l,
19
- ...g
18
+ children: g,
19
+ ...l
20
20
  }) {
21
- const c = r ?? v, u = x({
21
+ const u = r ?? v, c = h({
22
22
  slots: {
23
23
  base: "uog:relative uog:flex uog:w-full uog:flex-col uog:overflow-hidden",
24
24
  image: "uog:aspect-[16/9] uog:w-full uog:object-cover uog:md:aspect-[2.625]"
@@ -35,18 +35,18 @@ function H({
35
35
  }
36
36
  }
37
37
  }
38
- }), { base: n, image: f } = u({ variant: e });
39
- return /* @__PURE__ */ p("div", { className: n(), children: [
40
- /* @__PURE__ */ o(c, { ...g, src: t, alt: a, width: i, height: m, className: f() }),
41
- /* @__PURE__ */ o(h.Provider, { value: { variant: e }, children: /* @__PURE__ */ o(d, { alignment: s, children: l }) })
38
+ }), { base: f, image: n } = c({ variant: e });
39
+ return /* @__PURE__ */ p("div", { className: `uofg-hero ${f()}`, children: [
40
+ /* @__PURE__ */ o(u, { ...l, src: t, alt: a, width: i, height: m, className: `uofg-hero-img ${n()}` }),
41
+ /* @__PURE__ */ o(d.Provider, { value: { variant: e }, children: /* @__PURE__ */ o(x, { alignment: s, children: g }) })
42
42
  ] });
43
43
  }
44
44
  H.displayName = "Hero";
45
45
  export {
46
46
  H as Hero,
47
- y as HeroCaption,
48
- d as HeroContent,
49
- I as HeroLink,
50
- P as HeroTitle,
51
- V as HeroVideo
47
+ k as HeroCaption,
48
+ x as HeroContent,
49
+ E as HeroLink,
50
+ L as HeroTitle,
51
+ T as HeroVideo
52
52
  };
@@ -1,22 +1,22 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import { twMerge as k } from "tailwind-merge";
3
3
  import { tv as w } from "tailwind-variants";
4
4
  const z = "img";
5
5
  function x({
6
- as: a,
6
+ as: t,
7
7
  src: r,
8
- width: l,
9
- height: g,
10
- alt: n,
11
- children: i,
8
+ width: g,
9
+ height: l,
10
+ alt: i,
11
+ children: n,
12
12
  className: u,
13
13
  verticalAlignment: s = "center",
14
14
  horizontalAlignment: c = "center",
15
- overlay: t = "none",
15
+ overlay: o = "none",
16
16
  blurred: m = !1,
17
17
  ...v
18
18
  }) {
19
- const d = a ?? z, f = w({
19
+ const d = t ?? z, f = w({
20
20
  slots: {
21
21
  base: "uog:min-h-[50rem] uog:relative uog:flex uog:h-fit uog:w-full uog:flex-col",
22
22
  imageWrapper: "uog:absolute uog:z-10 uog:h-full uog:w-full",
@@ -113,29 +113,29 @@ function x({
113
113
  }
114
114
  ]
115
115
  }), {
116
- base: h,
117
- imageWrapper: y,
116
+ base: y,
117
+ imageWrapper: h,
118
118
  image: b,
119
119
  overlay: p,
120
120
  container: A
121
- } = f({ blurred: m, overlay: t, verticalAlignment: s, horizontalAlignment: c });
122
- return /* @__PURE__ */ o("div", { className: h(), children: [
123
- /* @__PURE__ */ o("div", { className: y(), children: [
121
+ } = f({ blurred: m, overlay: o, verticalAlignment: s, horizontalAlignment: c });
122
+ return /* @__PURE__ */ a("div", { className: `uofg-image-overlay ${y()}`, children: [
123
+ /* @__PURE__ */ a("div", { className: `uofg-image-overlay-wrapper ${h()}`, children: [
124
124
  /* @__PURE__ */ e(
125
125
  d,
126
126
  {
127
127
  ...v,
128
- className: k(b(), u),
128
+ className: `uofg-image-overlay-image ${k(b(), u)}`,
129
129
  src: r,
130
- width: l,
131
- height: g,
132
- alt: n,
130
+ width: g,
131
+ height: l,
132
+ alt: i,
133
133
  sizes: "100vw"
134
134
  }
135
135
  ),
136
- t !== "none" && /* @__PURE__ */ e("div", { className: p() })
136
+ o !== "none" && /* @__PURE__ */ e("div", { className: `uofg-image-overlay-overlay ${p()}` })
137
137
  ] }),
138
- /* @__PURE__ */ e("div", { className: A(), children: i })
138
+ /* @__PURE__ */ e("div", { className: `uofg-image-overlay-content ${A()}`, children: n })
139
139
  ] });
140
140
  }
141
141
  x.displayName = "ImageOverlay";
package/dist/info.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { tv as g } from "tailwind-variants";
3
- function u({ children: r, color: o = "red" }) {
3
+ function u({ children: o, color: r = "red" }) {
4
4
  const e = g({
5
5
  base: "uog:flex uog:flex-col uog:gap-1 uog:border-l-4 uog:pl-4",
6
6
  variants: {
@@ -16,7 +16,7 @@ function u({ children: r, color: o = "red" }) {
16
16
  }
17
17
  }
18
18
  });
19
- return /* @__PURE__ */ l("div", { className: e({ color: o }), children: r });
19
+ return /* @__PURE__ */ l("div", { className: `uofg-info ${e({ color: r })}`, children: o });
20
20
  }
21
21
  u.displayName = "Info";
22
22
  export {
@@ -1,9 +1,9 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { twMerge as a } from "tailwind-merge";
3
- import { Container as m } from "./container.js";
3
+ import { Container as u } from "./container.js";
4
4
  function c({ children: t, className: e, container: r = !0 }) {
5
- const o = a("uofg-layout-content uog:pb-4 uog:flex-1", e);
6
- return r ? /* @__PURE__ */ n(m, { id: "content", as: "main", className: o, children: t }) : /* @__PURE__ */ n("main", { id: "content", className: o, children: t });
5
+ const o = `uofg-layout-content ${a("uofg-layout-content uog:pb-4 uog:flex-1", e)}`;
6
+ return r ? /* @__PURE__ */ n(u, { id: "content", as: "main", className: o, children: t }) : /* @__PURE__ */ n("main", { id: "content", className: o, children: t });
7
7
  }
8
8
  export {
9
9
  c as LayoutContent
package/dist/layout.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsxs as t, Fragment as u, jsx as o } from "react/jsx-runtime";
2
- import { Transition as l } from "@headlessui/react";
3
- import { tv as s } from "tailwind-variants";
4
- import { LoadingIndicator as c } from "./loading-indicator.js";
2
+ import { Transition as g } from "@headlessui/react";
3
+ import { tv as c } from "tailwind-variants";
4
+ import { LoadingIndicator as s } from "./loading-indicator.js";
5
5
  import { LayoutContent as y } from "./layout-content.js";
6
6
  function a({ children: n, loading: e }) {
7
- const r = s({
7
+ const r = c({
8
8
  slots: {
9
9
  placeholder: [
10
10
  "uog:text-uog-color-red",
@@ -39,12 +39,12 @@ function a({ children: n, loading: e }) {
39
39
  "uog:focus:px-2"
40
40
  ]
41
41
  }
42
- }), { placeholder: i, skipLink: g } = r();
42
+ }), { placeholder: i, skipLink: l } = r();
43
43
  return /* @__PURE__ */ t(u, { children: [
44
- /* @__PURE__ */ o(l, { show: !!e, children: /* @__PURE__ */ o("div", { className: i(), children: /* @__PURE__ */ o(c, { children: typeof e != "boolean" && e }) }) }),
44
+ /* @__PURE__ */ o(g, { show: !!e, children: /* @__PURE__ */ o("div", { className: `uofg-layout-placeholder ${i()}`, children: /* @__PURE__ */ o(s, { children: typeof e != "boolean" && e }) }) }),
45
45
  !e && /* @__PURE__ */ t(u, { children: [
46
- /* @__PURE__ */ o("a", { className: g(), href: "#content", children: "Skip to main content" }),
47
- /* @__PURE__ */ o("div", { className: "flex flex-1 flex-col", children: n })
46
+ /* @__PURE__ */ o("a", { className: l(), href: "#content", children: "Skip to main content" }),
47
+ /* @__PURE__ */ o("div", { className: "uofg-layout flex flex-1 flex-col", children: n })
48
48
  ] })
49
49
  ] });
50
50
  }
@@ -1,4 +1,4 @@
1
- import { jsxs as m, jsx as l } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as m } from "react/jsx-runtime";
2
2
  import { c } from "./solid-D4xgBves.js";
3
3
  import { FontAwesomeIcon as f } from "@fortawesome/react-fontawesome";
4
4
  import { useContext as g } from "react";
@@ -14,7 +14,7 @@ function x({
14
14
  href: s,
15
15
  ...i
16
16
  }) {
17
- const a = t ?? b, o = g(C), u = p({
17
+ const u = t ?? b, o = g(C), a = p({
18
18
  base: "uog:w-full uog:flex-1 uog:text-2xl uog:bg-black uog:flex uog:items-center uog:justify-between uog:text-black-contrast uog:p-6",
19
19
  variants: {
20
20
  stack: {
@@ -22,18 +22,18 @@ function x({
22
22
  }
23
23
  }
24
24
  });
25
- return /* @__PURE__ */ m(
26
- a,
25
+ return /* @__PURE__ */ l(
26
+ u,
27
27
  {
28
28
  ...i,
29
29
  href: s,
30
- className: k(u({ stack: o == null ? void 0 : o.stack }), n),
30
+ className: `uofg-link-carousel-link ${k(a({ stack: o == null ? void 0 : o.stack }), n)}`,
31
31
  onMouseEnter: () => {
32
32
  o == null || o.setActiveId(e);
33
33
  },
34
34
  children: [
35
35
  r,
36
- /* @__PURE__ */ l(f, { icon: c })
36
+ /* @__PURE__ */ m(f, { icon: c })
37
37
  ]
38
38
  }
39
39
  );
package/dist/link.js CHANGED
@@ -8,9 +8,9 @@ function b({
8
8
  color: n = "base",
9
9
  children: e,
10
10
  className: t,
11
- ...r
11
+ ...l
12
12
  }) {
13
- const s = o ?? a, l = c({
13
+ const r = o ?? a, s = c({
14
14
  base: "uog:inline-flex uog:gap-[1em] uog:underline uog:decoration-current uog:transition-colors uog:hover:decoration-transparent uog:focus:ring-2 uog:focus-visible:ring-offset-2 uog:focus-visible:outline-none uog:text-body-copy-link",
15
15
  variants: {
16
16
  color: {
@@ -20,7 +20,7 @@ function b({
20
20
  }
21
21
  }
22
22
  });
23
- return /* @__PURE__ */ u(s, { ...r, href: i, className: g(l({ color: n }), t), children: e });
23
+ return /* @__PURE__ */ u(r, { ...l, href: i, className: `uofg-link ${g(s({ color: n }), t)}`, children: e });
24
24
  }
25
25
  b.displayName = "Link";
26
26
  export {
package/dist/list-item.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { twMerge as r } from "tailwind-merge";
3
- function m({ className: t, children: e, ...i }) {
4
- return /* @__PURE__ */ o("li", { ...i, className: r("uog:relative uog:h-fit uog:w-full", t), children: e });
2
+ import { twMerge as m } from "tailwind-merge";
3
+ function r({ className: t, children: e, ...i }) {
4
+ return /* @__PURE__ */ o("li", { ...i, className: `uofg-list-item ${m("uog:relative uog:h-fit uog:w-full", t)}`, children: e });
5
5
  }
6
- m.displayName = "ListItem";
6
+ r.displayName = "ListItem";
7
7
  export {
8
- m as ListItem
8
+ r as ListItem
9
9
  };
package/dist/list.js CHANGED
@@ -55,7 +55,7 @@ function v({
55
55
  level: l.parent === e ? l.level % 3 : 0,
56
56
  nested: l.level > 0
57
57
  });
58
- return /* @__PURE__ */ t(o, { ...a, className: c(u, r), children: /* @__PURE__ */ t(
58
+ return /* @__PURE__ */ t(o, { ...a, className: `uofg-list ${c(u, r)}`, children: /* @__PURE__ */ t(
59
59
  s.Provider,
60
60
  {
61
61
  value: {
package/dist/modal.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsxs as e, jsx as o } from "react/jsx-runtime";
2
2
  import { e as f } from "./solid-D4xgBves.js";
3
3
  import { FontAwesomeIcon as b } from "@fortawesome/react-fontawesome";
4
- import { Dialog as x, DialogBackdrop as h, CloseButton as w, DialogPanel as y } from "@headlessui/react";
4
+ import { Dialog as x, DialogBackdrop as w, CloseButton as h, DialogPanel as y } from "@headlessui/react";
5
5
  import { tv as N } from "tailwind-variants";
6
- function v({ open: t, onClose: a = () => {
7
- }, role: u = "dialog", labelledBy: r, centered: g, children: l }) {
6
+ function k({ open: u, onClose: a = () => {
7
+ }, role: r = "dialog", labelledBy: t, centered: l, children: g }) {
8
8
  const s = N({
9
9
  slots: {
10
10
  base: "uog:ease-out uog:relative uog:z-50 uog:transition uog:duration-300 uog:data-[closed]:opacity-0",
@@ -21,19 +21,30 @@ function v({ open: t, onClose: a = () => {
21
21
  }
22
22
  }
23
23
  }
24
- }), { base: i, backdrop: n, wrapper: c, panelWrapper: d, panel: p, closeButton: m } = s({ centered: g });
25
- return /* @__PURE__ */ e(x, { transition: !0, open: t, role: u, onClose: a, className: i(), "aria-labelledby": r, children: [
26
- /* @__PURE__ */ o(h, { transition: !0, className: n() }),
27
- /* @__PURE__ */ o("div", { className: c(), children: /* @__PURE__ */ e("div", { className: d(), children: [
28
- /* @__PURE__ */ e(w, { onClick: a, className: m(), children: [
29
- /* @__PURE__ */ o(b, { icon: f }),
30
- /* @__PURE__ */ o("span", { className: "uog:md:sr-only uog:text-base", children: "Close Modal" })
31
- ] }),
32
- /* @__PURE__ */ o(y, { className: p(), children: l })
33
- ] }) })
34
- ] });
24
+ }), { base: i, backdrop: n, wrapper: d, panelWrapper: c, panel: p, closeButton: m } = s({ centered: l });
25
+ return /* @__PURE__ */ e(
26
+ x,
27
+ {
28
+ transition: !0,
29
+ open: u,
30
+ role: r,
31
+ onClose: a,
32
+ className: `uofg-modal ${i()}`,
33
+ "aria-labelledby": t,
34
+ children: [
35
+ /* @__PURE__ */ o(w, { transition: !0, className: `uofg-modal-backdrop ${n()}` }),
36
+ /* @__PURE__ */ o("div", { className: `uofg-modal-wrapper ${d()}`, children: /* @__PURE__ */ e("div", { className: `uofg-modal-panel-wrapper ${c()}`, children: [
37
+ /* @__PURE__ */ e(h, { onClick: a, className: `uofg-modal-close-button ${m()}`, children: [
38
+ /* @__PURE__ */ o(b, { icon: f }),
39
+ /* @__PURE__ */ o("span", { className: "uog:md:sr-only uog:text-base", children: "Close Modal" })
40
+ ] }),
41
+ /* @__PURE__ */ o(y, { className: `uofg-modal-panel ${p()}`, children: g })
42
+ ] }) })
43
+ ]
44
+ }
45
+ );
35
46
  }
36
- v.displayName = "Modal";
47
+ k.displayName = "Modal";
37
48
  export {
38
- v as Modal
49
+ k as Modal
39
50
  };
@@ -1,11 +1,11 @@
1
- import { jsx as r } from "react/jsx-runtime";
1
+ import { jsx as t } from "react/jsx-runtime";
2
2
  import { RadioGroup as d } from "@headlessui/react";
3
- import { useState as c, useMemo as f } from "react";
3
+ import { useState as f, useMemo as c } from "react";
4
4
  import { tv as n } from "tailwind-variants";
5
5
  import { RadioContext as x } from "./radio-context.js";
6
- import { Radio as y } from "./radio.js";
7
- function R({ name: s, inline: a = !1, onChange: o, children: i }) {
8
- const [l, e] = c(null), m = f(() => ({ setSelected: e }), [e]), u = n({
6
+ import { Radio as j } from "./radio.js";
7
+ function R({ name: a, inline: s = !1, onChange: o, children: i }) {
8
+ const [l, e] = f(null), u = c(() => ({ setSelected: e }), [e]), m = n({
9
9
  slots: {
10
10
  base: "uog:flex uog:gap-2"
11
11
  },
@@ -16,22 +16,22 @@ function R({ name: s, inline: a = !1, onChange: o, children: i }) {
16
16
  }
17
17
  }
18
18
  }
19
- }), { base: p } = u({ inline: a });
20
- return /* @__PURE__ */ r(
19
+ }), { base: p } = m({ inline: s });
20
+ return /* @__PURE__ */ t(
21
21
  d,
22
22
  {
23
- name: s,
23
+ name: a,
24
24
  value: l,
25
- onChange: (t) => {
26
- e(t), o == null || o(t);
25
+ onChange: (r) => {
26
+ e(r), o == null || o(r);
27
27
  },
28
- className: p(),
29
- children: /* @__PURE__ */ r(x.Provider, { value: m, children: i })
28
+ className: `uofg-radio-group ${p()}`,
29
+ children: /* @__PURE__ */ t(x.Provider, { value: u, children: i })
30
30
  }
31
31
  );
32
32
  }
33
33
  R.displayName = "RadioGroup";
34
34
  export {
35
- y as Radio,
35
+ j as Radio,
36
36
  R as RadioGroup
37
37
  };
package/dist/radio.js CHANGED
@@ -1,9 +1,9 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { Field as n, Radio as d, Label as f } from "@headlessui/react";
1
+ import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
+ import { Field as d, Radio as f, Label as n } from "@headlessui/react";
3
3
  import { useContext as m, useEffect as b, Fragment as p } from "react";
4
4
  import { tv as h } from "tailwind-variants";
5
5
  import { RadioContext as x } from "./radio-context.js";
6
- function k({ selected: i, children: u, value: r }) {
6
+ function j({ selected: i, children: u, value: r }) {
7
7
  const o = m(x);
8
8
  b(() => {
9
9
  i && (o == null || o.setSelected(r));
@@ -25,12 +25,12 @@ function k({ selected: i, children: u, value: r }) {
25
25
  }
26
26
  }
27
27
  }
28
- }), { field: l, radio: g, circle: t } = a();
29
- return /* @__PURE__ */ c(n, { className: l(), children: [
30
- /* @__PURE__ */ e(d, { value: r, as: p, children: ({ checked: s }) => /* @__PURE__ */ e("span", { className: g({ checked: s }), children: /* @__PURE__ */ e("span", { className: t({ checked: s }) }) }) }),
31
- /* @__PURE__ */ e(f, { children: u })
28
+ }), { field: l, radio: g, circle: c } = a();
29
+ return /* @__PURE__ */ t(d, { className: `uofg-radio-field ${l()}`, children: [
30
+ /* @__PURE__ */ e(f, { value: r, as: p, children: ({ checked: s }) => /* @__PURE__ */ e("span", { className: `uofg-radio ${g({ checked: s })}`, children: /* @__PURE__ */ e("span", { className: `uofg-radio-circle ${c({ checked: s })}` }) }) }),
31
+ /* @__PURE__ */ e(n, { className: "uofg-radio-label", children: u })
32
32
  ] });
33
33
  }
34
34
  export {
35
- k as Radio
35
+ j as Radio
36
36
  };
@@ -10,8 +10,18 @@ function f({
10
10
  className: o,
11
11
  ...c
12
12
  }) {
13
- const n = e ?? g, l = r("uofg-statistics-item-image uog:w-full", o);
14
- return /* @__PURE__ */ t("dd", { className: "contents", children: /* @__PURE__ */ t(n, { src: s, alt: m, width: a, height: i, className: l, ...c }) });
13
+ const n = e ?? g, l = r("uog:w-full", o);
14
+ return /* @__PURE__ */ t("dd", { className: "contents", children: /* @__PURE__ */ t(
15
+ n,
16
+ {
17
+ src: s,
18
+ alt: m,
19
+ width: a,
20
+ height: i,
21
+ className: `uofg-statistics-item-image ${l}`,
22
+ ...c
23
+ }
24
+ ) });
15
25
  }
16
26
  f.displayName = "StatisticsItemImage";
17
27
  export {
@@ -1,11 +1,8 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { twMerge as r } from "tailwind-merge";
3
3
  function i({ children: t, className: e }) {
4
- const s = r(
5
- "uofg-statistics-item-represents uog:text-normal uog:p-6 uog:pt-0 uog:text-lg uog:font-normal",
6
- e
7
- );
8
- return /* @__PURE__ */ o("dd", { className: s, children: t });
4
+ const s = r("uog:text-normal uog:p-6 uog:pt-0 uog:text-lg uog:font-normal", e);
5
+ return /* @__PURE__ */ o("dd", { className: `uofg-statistics-item-represents ${s}`, children: t });
9
6
  }
10
7
  i.displayName = "StatisticsItemRepresents";
11
8
  export {
@@ -1,11 +1,8 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import { twMerge as a } from "tailwind-merge";
3
3
  function i({ children: t, className: o }) {
4
- const e = a(
5
- "uofg-statistics-item-value uog:break-auto uog:p-6 uog:pb-0 uog:text-3xl uog:leading-tight uog:font-bold",
6
- o
7
- );
8
- return /* @__PURE__ */ s("dt", { className: e, children: t });
4
+ const e = a("uog:break-auto uog:p-6 uog:pb-0 uog:text-3xl uog:leading-tight uog:font-bold", o);
5
+ return /* @__PURE__ */ s("dt", { className: `uofg-statistics-item-value ${e}`, children: t });
9
6
  }
10
7
  i.displayName = "StatisticsItemValue";
11
8
  export {
@@ -9,7 +9,7 @@ function n({ children: t, className: r }) {
9
9
  o == null || o.incrementCount();
10
10
  }, []);
11
11
  const e = a({
12
- base: "uofg-statistics-item uog:relative uog:flex uog:flex-1 uog:flex-col uog:justify-around uog:gap-2",
12
+ base: "uog:relative uog:flex uog:flex-1 uog:flex-col uog:justify-around uog:gap-2",
13
13
  variants: {
14
14
  variant: {
15
15
  "solid-colors-full": [
@@ -53,7 +53,7 @@ function n({ children: t, className: r }) {
53
53
  }
54
54
  ]
55
55
  });
56
- return /* @__PURE__ */ l("div", { className: s(e({ variant: o == null ? void 0 : o.variant }), r), children: t });
56
+ return /* @__PURE__ */ l("div", { className: `uofg-statistics-item ${s(e({ variant: o == null ? void 0 : o.variant }), r)}`, children: t });
57
57
  }
58
58
  n.displayName = "StatisticsItem";
59
59
  export {
@@ -1,16 +1,16 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useState as d } from "react";
3
- import { twMerge as a } from "tailwind-merge";
4
- import { tv as m } from "tailwind-variants";
5
- import { u as f } from "./use-resize-observer-DmddO4OQ.js";
6
- import { StatisticsContext as n } from "./statistics-context.js";
7
- import { StatisticsItem as T } from "./statistics-item.js";
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { useState as a } from "react";
3
+ import { twMerge as m } from "tailwind-merge";
4
+ import { tv as f } from "tailwind-variants";
5
+ import { u as n } from "./use-resize-observer-DmddO4OQ.js";
6
+ import { StatisticsContext as p } from "./statistics-context.js";
7
+ import { StatisticsItem as I } from "./statistics-item.js";
8
8
  import { StatisticsItemImage as F } from "./statistics-item-image.js";
9
- import { StatisticsItemRepresents as R } from "./statistics-item-represents.js";
10
- import { StatisticsItemValue as V } from "./statistics-item-value.js";
11
- function p({ children: e, variant: o, className: r }) {
12
- const [i, l] = d(0), [u, s] = f(), g = m({
13
- base: "uofg-statistics uog:mx-auto uog:my-0 uog:flex uog:flex-col uog:flex-wrap uog:sm:flex-row",
9
+ import { StatisticsItemRepresents as N } from "./statistics-item-represents.js";
10
+ import { StatisticsItemValue as j } from "./statistics-item-value.js";
11
+ function v({ children: t, variant: o, className: r }) {
12
+ const [s, l] = a(0), [u, i] = n(), g = f({
13
+ base: "uog:mx-auto uog:my-0 uog:flex uog:flex-col uog:flex-wrap uog:sm:flex-row",
14
14
  variants: {
15
15
  divisibleByTwo: {
16
16
  true: ""
@@ -46,42 +46,42 @@ function p({ children: e, variant: o, className: r }) {
46
46
  class: "uog:grid uog:grid-cols-1 uog:sm:grid-cols-3"
47
47
  }
48
48
  ]
49
- });
50
- return /* @__PURE__ */ t(
51
- n.Provider,
49
+ }), c = m(
50
+ g({
51
+ variant: o,
52
+ divisibleByTwo: s % 2 === 0,
53
+ divisibleByThree: s % 3 === 0,
54
+ divisibleByFour: s % 4 === 0
55
+ }),
56
+ r
57
+ );
58
+ return /* @__PURE__ */ e(
59
+ p.Provider,
52
60
  {
53
61
  value: {
54
62
  variant: o,
55
- incrementCount: () => l((c) => c + 1)
63
+ incrementCount: () => l((d) => d + 1)
56
64
  },
57
- children: /* @__PURE__ */ t(
65
+ children: /* @__PURE__ */ e(
58
66
  "dl",
59
67
  {
60
- className: a(
61
- g({
62
- variant: o,
63
- divisibleByTwo: i % 2 === 0,
64
- divisibleByThree: i % 3 === 0,
65
- divisibleByFour: i % 4 === 0
66
- }),
67
- r
68
- ),
68
+ className: `uofg-statistics ${c}`,
69
69
  style: (
70
70
  /* @ts-expect-error TypeScript doesn't like CSS Variables */
71
- o === "solid-colors-full" ? { "--statistic-bg-width": (s == null ? void 0 : s.contentRect.width) + "px" } : void 0
71
+ o === "solid-colors-full" ? { "--statistic-bg-width": (i == null ? void 0 : i.contentRect.width) + "px" } : void 0
72
72
  ),
73
73
  ref: u,
74
- children: e
74
+ children: t
75
75
  }
76
76
  )
77
77
  }
78
78
  );
79
79
  }
80
- p.displayName = "Statistics";
80
+ v.displayName = "Statistics";
81
81
  export {
82
- p as Statistics,
83
- T as StatisticsItem,
82
+ v as Statistics,
83
+ I as StatisticsItem,
84
84
  F as StatisticsItemImage,
85
- R as StatisticsItemRepresents,
86
- V as StatisticsItemValue
85
+ N as StatisticsItemRepresents,
86
+ j as StatisticsItemValue
87
87
  };