@uoguelph/react-components 1.3.13 → 1.4.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.
Files changed (84) hide show
  1. package/dist/accordion-button.js +22 -22
  2. package/dist/accordion-content.js +5 -5
  3. package/dist/accordion.js +3 -3
  4. package/dist/alert-footer.js +6 -6
  5. package/dist/alert-message.js +7 -10
  6. package/dist/alert-subtitle.js +7 -7
  7. package/dist/alert-title.js +23 -23
  8. package/dist/alert.js +7 -7
  9. package/dist/blockquote-author-name.js +1 -1
  10. package/dist/blockquote-author-title.js +2 -2
  11. package/dist/blockquote-author.js +11 -11
  12. package/dist/blockquote-content.js +16 -16
  13. package/dist/breadcrumb-home.js +2 -2
  14. package/dist/breadcrumb.js +15 -15
  15. package/dist/breadcrumbs.js +9 -9
  16. package/dist/button.js +44 -44
  17. package/dist/card-content.js +10 -10
  18. package/dist/card-footer.js +11 -11
  19. package/dist/card-image.js +15 -15
  20. package/dist/card-title.js +5 -5
  21. package/dist/card.js +11 -11
  22. package/dist/carousel.js +51 -51
  23. package/dist/checkbox.js +44 -44
  24. package/dist/contact-email.js +7 -7
  25. package/dist/contact-name.js +1 -1
  26. package/dist/contact-phone.js +11 -11
  27. package/dist/contact-title.js +1 -1
  28. package/dist/contact.js +11 -14
  29. package/dist/container.js +10 -10
  30. package/dist/dismissible-alert.js +2 -2
  31. package/dist/divider.js +18 -18
  32. package/dist/embedded-video-modal-button.js +16 -16
  33. package/dist/embedded-video.js +29 -29
  34. package/dist/hero-caption.js +1 -1
  35. package/dist/hero-content.js +23 -23
  36. package/dist/hero-link.js +1 -1
  37. package/dist/hero-title.js +11 -11
  38. package/dist/hero-video.js +9 -9
  39. package/dist/hero.js +19 -19
  40. package/dist/image-overlay.js +48 -48
  41. package/dist/index.css +1 -1
  42. package/dist/info.js +16 -16
  43. package/dist/layout-content.js +3 -3
  44. package/dist/layout.js +44 -44
  45. package/dist/link-carousel-content.js +11 -11
  46. package/dist/link-carousel-item.js +15 -15
  47. package/dist/link-carousel-link.js +22 -22
  48. package/dist/link-carousel-links.js +14 -14
  49. package/dist/link-carousel.js +21 -21
  50. package/dist/link.js +10 -10
  51. package/dist/list-item.js +6 -6
  52. package/dist/list.js +21 -21
  53. package/dist/loading-indicator.js +29 -29
  54. package/dist/media-caption.js +34 -34
  55. package/dist/modal.js +25 -25
  56. package/dist/navigation-link.js +25 -25
  57. package/dist/navigation.js +8 -11
  58. package/dist/number-input.js +46 -46
  59. package/dist/pagination.js +62 -62
  60. package/dist/radio-group.js +8 -8
  61. package/dist/radio.js +19 -19
  62. package/dist/select-button.js +32 -32
  63. package/dist/select-option.js +29 -29
  64. package/dist/select-options.js +27 -27
  65. package/dist/select.js +7 -7
  66. package/dist/statistics-item-image.js +9 -9
  67. package/dist/statistics-item-represents.js +7 -7
  68. package/dist/statistics-item-value.js +7 -7
  69. package/dist/statistics-item.js +35 -35
  70. package/dist/statistics.js +25 -25
  71. package/dist/story-background-image.js +12 -12
  72. package/dist/story-background.js +7 -7
  73. package/dist/story-body.js +5 -8
  74. package/dist/story-footer.js +12 -12
  75. package/dist/story-foreground-content.js +4 -4
  76. package/dist/story-foreground-image.js +15 -15
  77. package/dist/story-foreground.js +7 -10
  78. package/dist/story.js +5 -5
  79. package/dist/tab-list.js +3 -6
  80. package/dist/tab-panel.js +3 -3
  81. package/dist/tab.js +26 -26
  82. package/dist/text-input.js +32 -32
  83. package/dist/typography.js +22 -22
  84. package/package.json +2 -2
package/dist/button.js CHANGED
@@ -1,150 +1,150 @@
1
1
  "use client";
2
- import { jsx as a } from "react/jsx-runtime";
3
- import { twMerge as n } from "tailwind-merge";
4
- import { tv as b } from "tailwind-variants";
5
- const d = "button";
6
- function f({
7
- as: e,
8
- color: l = "red",
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ import { twMerge as b } from "tailwind-merge";
4
+ import { tv as d } from "tailwind-variants";
5
+ const f = "button";
6
+ function g({
7
+ as: l,
8
+ color: o = "red",
9
9
  outlined: s = !1,
10
- children: u,
11
- className: t,
12
- disabled: o = !1,
13
- ...r
10
+ children: t,
11
+ className: r,
12
+ disabled: e = !1,
13
+ ...c
14
14
  }) {
15
- const c = e ?? d, i = b({
16
- base: "uog:font-medium uog:shadow-sm uog:inline-flex uog:items-center uog:justify-center uog:px-6 uog:py-4 uog:text-lg uog:no-underline uog:transition-colors uog:focus-visible:outline-none uog:cursor-pointer uog:focus-visible:ring-2 uog:focus-visible:ring-offset-2",
15
+ const i = l ?? f, u = d({
16
+ base: "inline-flex cursor-pointer items-center justify-center px-6 py-4 text-lg font-medium no-underline shadow-sm transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
17
17
  variants: {
18
18
  color: {
19
- red: "uog:focus-visible:ring-red",
20
- yellow: "uog:focus-visible:ring-yellow",
21
- blue: "uog:focus-visible:ring-blue",
22
- green: "uog:focus-visible:ring-green",
23
- black: "uog:focus-visible:ring-black"
19
+ red: "focus-visible:ring-red",
20
+ yellow: "focus-visible:ring-yellow",
21
+ blue: "focus-visible:ring-blue",
22
+ green: "focus-visible:ring-green",
23
+ black: "focus-visible:ring-black"
24
24
  },
25
25
  outlined: {
26
- true: "uog:border-2"
26
+ true: "border-2"
27
27
  },
28
28
  disabled: {
29
- true: "uog:cursor-not-allowed uog:opacity-50"
29
+ true: "cursor-not-allowed opacity-50"
30
30
  }
31
31
  },
32
32
  compoundVariants: [
33
33
  {
34
34
  color: "red",
35
35
  outlined: !1,
36
- class: "uog:bg-red uog:text-red-contrast"
36
+ class: "bg-red text-red-contrast"
37
37
  },
38
38
  {
39
39
  color: "red",
40
40
  outlined: !0,
41
- class: "uog:border-red uog:text-red"
41
+ class: "border-red text-red"
42
42
  },
43
43
  {
44
44
  color: "red",
45
45
  outlined: !1,
46
46
  disabled: !1,
47
- class: "uog:hocus-visible:bg-red-focus"
47
+ class: "hocus-visible:bg-red-focus"
48
48
  },
49
49
  {
50
50
  color: "red",
51
51
  outlined: !0,
52
52
  disabled: !1,
53
- class: "uog:hocus-visible:bg-red uog:hocus-visible:text-red-contrast"
53
+ class: "hocus-visible:bg-red hocus-visible:text-red-contrast"
54
54
  },
55
55
  {
56
56
  color: "yellow",
57
57
  outlined: !1,
58
- class: "uog:bg-yellow uog:text-yellow-contrast"
58
+ class: "bg-yellow text-yellow-contrast"
59
59
  },
60
60
  {
61
61
  color: "yellow",
62
62
  outlined: !0,
63
- class: "uog:border-yellow uog:text-yellow"
63
+ class: "border-yellow text-yellow"
64
64
  },
65
65
  {
66
66
  color: "yellow",
67
67
  outlined: !1,
68
68
  disabled: !1,
69
- class: "uog:hocus-visible:bg-yellow-focus"
69
+ class: "hocus-visible:bg-yellow-focus"
70
70
  },
71
71
  {
72
72
  color: "yellow",
73
73
  outlined: !0,
74
74
  disabled: !1,
75
- class: "uog:hocus-visible:bg-yellow uog:hocus-visible:text-yellow-contrast"
75
+ class: "hocus-visible:bg-yellow hocus-visible:text-yellow-contrast"
76
76
  },
77
77
  {
78
78
  color: "blue",
79
79
  outlined: !1,
80
- class: "uog:bg-blue uog:text-blue-contrast"
80
+ class: "bg-blue text-blue-contrast"
81
81
  },
82
82
  {
83
83
  color: "blue",
84
84
  outlined: !0,
85
- class: "uog:border-blue uog:text-blue"
85
+ class: "border-blue text-blue"
86
86
  },
87
87
  {
88
88
  color: "blue",
89
89
  outlined: !1,
90
90
  disabled: !1,
91
- class: "uog:hocus-visible:bg-blue-focus"
91
+ class: "hocus-visible:bg-blue-focus"
92
92
  },
93
93
  {
94
94
  color: "blue",
95
95
  outlined: !0,
96
96
  disabled: !1,
97
- class: "uog:hocus-visible:bg-blue uog:hocus-visible:text-blue-contrast"
97
+ class: "hocus-visible:bg-blue hocus-visible:text-blue-contrast"
98
98
  },
99
99
  {
100
100
  color: "green",
101
101
  outlined: !1,
102
- class: "uog:bg-green uog:text-green-contrast"
102
+ class: "bg-green text-green-contrast"
103
103
  },
104
104
  {
105
105
  color: "green",
106
106
  outlined: !0,
107
- class: "uog:border-green uog:text-green"
107
+ class: "border-green text-green"
108
108
  },
109
109
  {
110
110
  color: "green",
111
111
  outlined: !1,
112
112
  disabled: !1,
113
- class: "uog:hocus-visible:bg-green-focus"
113
+ class: "hocus-visible:bg-green-focus"
114
114
  },
115
115
  {
116
116
  color: "green",
117
117
  outlined: !0,
118
118
  disabled: !1,
119
- class: "uog:hocus-visible:bg-green uog:hocus-visible:text-green-contrast"
119
+ class: "hocus-visible:bg-green hocus-visible:text-green-contrast"
120
120
  },
121
121
  {
122
122
  color: "black",
123
123
  outlined: !1,
124
- class: "uog:bg-black uog:text-black-contrast"
124
+ class: "bg-black text-black-contrast"
125
125
  },
126
126
  {
127
127
  color: "black",
128
128
  outlined: !0,
129
- class: "uog:border-black uog:text-black"
129
+ class: "border-black text-black"
130
130
  },
131
131
  {
132
132
  color: "black",
133
133
  outlined: !1,
134
134
  disabled: !1,
135
- class: "uog:hocus-visible:bg-black-focus"
135
+ class: "hocus-visible:bg-black-focus"
136
136
  },
137
137
  {
138
138
  color: "black",
139
139
  outlined: !0,
140
140
  disabled: !1,
141
- class: "uog:hocus-visible:bg-black uog:hocus-visible:text-black-contrast"
141
+ class: "hocus-visible:bg-black hocus-visible:text-black-contrast"
142
142
  }
143
143
  ]
144
- }), g = n(i({ color: l, outlined: s, disabled: o }), t);
145
- return /* @__PURE__ */ a(c, { className: `uofg-button ${g}`, disabled: o, ...r, children: u });
144
+ }), a = b(u({ color: o, outlined: s, disabled: e }), r);
145
+ return /* @__PURE__ */ n(i, { className: `uofg-button ${a}`, disabled: e, ...c, children: t });
146
146
  }
147
- f.displayName = "Button";
147
+ g.displayName = "Button";
148
148
  export {
149
- f as Button
149
+ g as Button
150
150
  };
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import { jsx as i } from "react/jsx-runtime";
3
3
  import { useContext as n } from "react";
4
- import { twMerge as g } from "tailwind-merge";
5
- import { tv as s } from "tailwind-variants";
6
- import { CardContext as u } from "./card-context.js";
7
- function a({ children: t, className: r }) {
8
- const o = n(u), e = s({
9
- base: "uog:flex uog:flex-col uog:flex-1 uog:gap-2 uog:bg-grey-light-bg uog:p-5 uog:text-grey-light-contrast",
4
+ import { twMerge as s } from "tailwind-merge";
5
+ import { tv as a } from "tailwind-variants";
6
+ import { CardContext as l } from "./card-context.js";
7
+ function c({ children: o, className: r }) {
8
+ const t = n(l), e = a({
9
+ base: "flex flex-1 flex-col gap-2 bg-grey-light-bg p-5 text-grey-light-contrast",
10
10
  variants: {
11
11
  isLink: {
12
- true: "uog:transition-colors uog:group-hocus-visible:bg-yellow uog:group-hocus-visible:text-yellow-contrast"
12
+ true: "transition-colors group-hocus-visible:bg-yellow group-hocus-visible:text-yellow-contrast"
13
13
  }
14
14
  }
15
15
  });
16
- return /* @__PURE__ */ i("div", { className: `uofg-card-content ${g(e({ isLink: (o == null ? void 0 : o.isLink) ?? !1 }), r)}`, children: t });
16
+ return /* @__PURE__ */ i("div", { className: `uofg-card-content ${s(e({ isLink: (t == null ? void 0 : t.isLink) ?? !1 }), r)}`, children: o });
17
17
  }
18
- a.displayName = "CardContent";
18
+ c.displayName = "CardContent";
19
19
  export {
20
- a as CardContent
20
+ c as CardContent
21
21
  };
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import { jsx as a } from "react/jsx-runtime";
3
- import { useContext as g } from "react";
4
- import { twMerge as i } from "tailwind-merge";
5
- import { tv as n } from "tailwind-variants";
6
- import { CardContext as s } from "./card-context.js";
7
- function u({ children: r, className: t }) {
8
- const o = g(s), e = n({
9
- base: "uog:flex uog:gap-2 uog:bg-grey-light uog:px-5 uog:py-2 uog:text-grey-light-contrast uog:transition-colors",
3
+ import { useContext as i } from "react";
4
+ import { twMerge as n } from "tailwind-merge";
5
+ import { tv as s } from "tailwind-variants";
6
+ import { CardContext as c } from "./card-context.js";
7
+ function m({ children: t, className: e }) {
8
+ const r = i(c), o = s({
9
+ base: "flex gap-2 bg-grey-light px-5 py-2 text-grey-light-contrast transition-colors",
10
10
  variants: {
11
11
  centered: {
12
- true: "uog:justify-center"
12
+ true: "justify-center"
13
13
  }
14
14
  }
15
15
  });
16
- return /* @__PURE__ */ a("div", { className: `uofg-card-footer ${i(e({ centered: (o == null ? void 0 : o.centered) ?? !1 }), t)}`, children: r });
16
+ return /* @__PURE__ */ a("div", { className: `uofg-card-footer ${n(o({ centered: (r == null ? void 0 : r.centered) ?? !1 }), e)}`, children: t });
17
17
  }
18
- u.displayName = "CardFooter";
18
+ m.displayName = "CardFooter";
19
19
  export {
20
- u as CardFooter
20
+ m as CardFooter
21
21
  };
@@ -1,42 +1,42 @@
1
1
  "use client";
2
- import { jsx as r } from "react/jsx-runtime";
3
- import { useContext as f } from "react";
4
- import { twMerge as p } from "tailwind-merge";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import { useContext as g } from "react";
4
+ import { twMerge as u } from "tailwind-merge";
5
5
  import { tv as w } from "tailwind-variants";
6
6
  import { CardContext as v } from "./card-context.js";
7
7
  const C = "img";
8
8
  function h({
9
- as: e,
10
- src: a,
9
+ as: a,
10
+ src: o,
11
11
  alt: i,
12
12
  width: n,
13
13
  height: t,
14
14
  className: m,
15
15
  ...s
16
16
  }) {
17
- const g = e ?? C, o = f(v), u = w({
17
+ const l = a ?? C, r = g(v), c = w({
18
18
  slots: {
19
- container: "uog:w-full uog:overflow-hidden",
20
- wrapper: "uog:w-full uog:overflow-hidden",
21
- image: "uog:w-full"
19
+ container: "w-full overflow-hidden",
20
+ wrapper: "w-full overflow-hidden",
21
+ image: "w-full"
22
22
  },
23
23
  variants: {
24
24
  isLink: {
25
25
  true: {
26
- wrapper: "uog:ease-in-out uog:transition-transform uog:duration-200 uog:group-hover:scale-110"
26
+ wrapper: "transition-transform duration-200 ease-in-out group-hover:scale-110"
27
27
  }
28
28
  }
29
29
  }
30
- }), { container: l, wrapper: c, image: d } = u({ isLink: (o == null ? void 0 : o.isLink) ?? !1 });
31
- return /* @__PURE__ */ r("div", { className: `uofg-card-image-container ${l()}`, children: /* @__PURE__ */ r("div", { className: `uofg-card-image-wrapper ${c()}`, children: /* @__PURE__ */ r(
32
- g,
30
+ }), { container: d, wrapper: f, image: p } = c({ isLink: (r == null ? void 0 : r.isLink) ?? !1 });
31
+ return /* @__PURE__ */ e("div", { className: `uofg-card-image-container ${d()}`, children: /* @__PURE__ */ e("div", { className: `uofg-card-image-wrapper ${f()}`, children: /* @__PURE__ */ e(
32
+ l,
33
33
  {
34
34
  ...s,
35
- src: a,
35
+ src: o,
36
36
  alt: i,
37
37
  width: n,
38
38
  height: t,
39
- className: `uofg-card-image ${p(d(), m)}`
39
+ className: `uofg-card-image ${u(p(), m)}`
40
40
  }
41
41
  ) }) });
42
42
  }
@@ -4,18 +4,18 @@ import { useContext as n } from "react";
4
4
  import { twMerge as a } from "tailwind-merge";
5
5
  import { tv as m } from "tailwind-variants";
6
6
  import { CardContext as s } from "./card-context.js";
7
- function u({ children: t, className: r }) {
7
+ function c({ children: t, className: r }) {
8
8
  const e = n(s), o = m({
9
- base: "uog:flex uog:font-bold uog:text-lg",
9
+ base: "flex text-lg font-bold",
10
10
  variants: {
11
11
  centered: {
12
- true: "uog:items-center uog:justify-center"
12
+ true: "items-center justify-center"
13
13
  }
14
14
  }
15
15
  });
16
16
  return /* @__PURE__ */ i("div", { className: `uofg-card-title ${a(o({ centered: (e == null ? void 0 : e.centered) ?? !1 }), r)}`, children: t });
17
17
  }
18
- u.displayName = "CardTitle";
18
+ c.displayName = "CardTitle";
19
19
  export {
20
- u as CardTitle
20
+ c as CardTitle
21
21
  };
package/dist/card.js CHANGED
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
- import { Children as f } from "react";
4
- import { twMerge as l } from "tailwind-merge";
5
- import { tv as c } from "tailwind-variants";
3
+ import { Children as u } from "react";
4
+ import { twMerge as c } from "tailwind-merge";
5
+ import { tv as d } from "tailwind-variants";
6
6
  import { CardContent as w } from "./card-content.js";
7
- import { CardContext as d } from "./card-context.js";
7
+ import { CardContext as p } from "./card-context.js";
8
8
  import { CardFooter as A } from "./card-footer.js";
9
- import { CardImage as p } from "./card-image.js";
9
+ import { CardImage as g } from "./card-image.js";
10
10
  import { CardTitle as F } from "./card-title.js";
11
11
  const C = "div";
12
12
  function v({
@@ -16,8 +16,8 @@ function v({
16
16
  children: o,
17
17
  ...r
18
18
  }) {
19
- const a = i ?? C, u = c({
20
- base: "uog:group uog:ease-in-out uog:focus-visible:ring-light-blue uog:flex uog:flex-col uog:justify-center uog:transition uog:duration-200 uog:focus-visible:ring-2 uog:focus-visible:ring-offset-2 uog:focus-visible:outline-none",
19
+ const a = i ?? C, m = d({
20
+ base: "group focus-visible:ring-light-blue flex flex-col justify-center transition duration-200 ease-in-out focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
21
21
  variants: {
22
22
  isLink: {
23
23
  true: ""
@@ -30,17 +30,17 @@ function v({
30
30
  {
31
31
  isLink: !0,
32
32
  hasImage: !1,
33
- class: "uog:transition-colors uog:group-hover:bg-yellow"
33
+ class: "transition-colors group-hover:bg-yellow"
34
34
  }
35
35
  ]
36
- }), e = "href" in r, g = f.toArray(o).some((m) => m.type === p);
37
- return /* @__PURE__ */ t(a, { ...r, className: `uofg-card ${l(u({ isLink: e, hasImage: g }), n)}`, children: /* @__PURE__ */ t(d.Provider, { value: { isLink: e, centered: s ?? !1 }, children: o }) });
36
+ }), e = "href" in r, f = u.toArray(o).some((l) => l.type === g);
37
+ return /* @__PURE__ */ t(a, { ...r, className: `uofg-card ${c(m({ isLink: e, hasImage: f }), n)}`, children: /* @__PURE__ */ t(p.Provider, { value: { isLink: e, centered: s ?? !1 }, children: o }) });
38
38
  }
39
39
  v.displayName = "Card";
40
40
  export {
41
41
  v as Card,
42
42
  w as CardContent,
43
43
  A as CardFooter,
44
- p as CardImage,
44
+ g as CardImage,
45
45
  F as CardTitle
46
46
  };
package/dist/carousel.js CHANGED
@@ -1,110 +1,110 @@
1
1
  "use client";
2
- import { jsxs as g, jsx as l } from "react/jsx-runtime";
2
+ import { jsxs as m, jsx as a } from "react/jsx-runtime";
3
3
  import { b as k, c as I } from "./solid-D19hAF5t.js";
4
- import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
5
- import { Children as $, useRef as d, useState as A, useEffect as F } from "react";
4
+ import { FontAwesomeIcon as g } from "@fortawesome/react-fontawesome";
5
+ import { Children as $, useRef as x, useState as A, useEffect as F } from "react";
6
6
  import { tv as L } from "tailwind-variants";
7
7
  import { l as S, b as q, m as w, c as M } from "./math-utils-CnAd98v6.js";
8
- const R = (u, m, e) => {
9
- const n = u.scrollLeft, s = performance.now();
8
+ const R = (c, h, t) => {
9
+ const o = c.scrollLeft, n = performance.now();
10
10
  return new Promise((r) => {
11
- const a = (o) => {
12
- const f = o - s, i = q(Math.min(f / e, 1), 0.25, 0, 0.25, 1);
13
- u.scrollLeft = S(n, m, i), f < e ? requestAnimationFrame(a) : r();
11
+ const f = (e) => {
12
+ const u = e - n, i = q(Math.min(u / t, 1), 0.25, 0, 0.25, 1);
13
+ c.scrollLeft = S(o, h, i), u < t ? requestAnimationFrame(f) : r();
14
14
  };
15
- requestAnimationFrame(a);
15
+ requestAnimationFrame(f);
16
16
  });
17
17
  };
18
- function G({ children: u, display: m = 1, loop: e = "none" }) {
19
- const n = $.count(u), s = Math.max(m, 1), r = d(null), a = d(0), [o, f] = A(0), i = n - s, h = d(!1);
18
+ function G({ children: c, display: h = 1, loop: t = "none" }) {
19
+ const o = $.count(c), n = Math.max(h, 1), r = x(null), f = x(0), [e, u] = A(0), i = o - n, d = x(!1);
20
20
  F(() => {
21
- var t;
21
+ var s;
22
22
  if (!r.current)
23
23
  return;
24
- const c = ((t = r.current) == null ? void 0 : t.offsetWidth) / s;
25
- (e === "jump" || e === "none") && (h.current = !0, R(r.current, c * o, 250).then(() => {
26
- h.current = !1;
27
- })), a.current = o;
28
- }, [o, e, i, s]);
29
- const x = (c) => {
30
- if (h.current) return;
31
- let t;
32
- switch (e) {
24
+ const l = ((s = r.current) == null ? void 0 : s.offsetWidth) / n;
25
+ (t === "jump" || t === "none") && (d.current = !0, R(r.current, l * e, 250).then(() => {
26
+ d.current = !1;
27
+ })), f.current = e;
28
+ }, [e, t, i, n]);
29
+ const b = (l) => {
30
+ if (d.current) return;
31
+ let s;
32
+ switch (t) {
33
33
  case "none":
34
- t = M(o + c, 0, i);
34
+ s = M(e + l, 0, i);
35
35
  break;
36
36
  case "jump":
37
- t = w(o + c, i + 1);
37
+ s = w(e + l, i + 1);
38
38
  break;
39
39
  case "continuous":
40
- t = w(o + c, n);
40
+ s = w(e + l, o);
41
41
  break;
42
42
  default:
43
- t = 0;
43
+ s = 0;
44
44
  }
45
- f(t);
45
+ u(s);
46
46
  }, C = L({
47
47
  slots: {
48
- base: "uog:relative uog:flex uog:h-fit uog:min-h-[7rem] uog:w-full uog:flex-col-reverse",
49
- contentContainer: "uog:grid uog:w-full uog:flex-1 uog:grid-cols-[repeat(var(--items),calc(100%/var(--display)))] uog:overflow-x-hidden [&>*]:[grid-row:1]",
50
- controlContainer: "uog:md:contents uog:flex uog:h-16 uog:w-full uog:pt-8",
51
- control: "uog:sm:text-6xl uog:md:absolute uog:flex uog:h-full uog:w-16 uog:flex-1 uog:items-center uog:justify-center uog:text-3xl uog:text-blue uog:transition-[transform,color,opacity,visibility] uog:focus-visible:ring-2 uog:focus-visible:ring-offset-2 uog:focus-visible:outline-none uog:hocus-visible:text-blue-focus"
48
+ base: "relative flex h-fit min-h-[7rem] w-full flex-col-reverse",
49
+ contentContainer: "grid w-full flex-1 grid-cols-[repeat(var(--items),calc(100%/var(--display)))] overflow-x-hidden [&>*]:[grid-row:1]",
50
+ controlContainer: "flex h-16 w-full pt-8 md:contents",
51
+ control: "flex h-full w-16 flex-1 items-center justify-center text-3xl text-blue transition-[transform,color,opacity,visibility] focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none sm:text-6xl md:absolute hocus-visible:text-blue-focus"
52
52
  },
53
53
  variants: {
54
54
  showControls: {
55
55
  true: {
56
- base: "uog:sm:px-16"
56
+ base: "sm:px-16"
57
57
  },
58
58
  false: {
59
- control: "uog:pointer-events-none uog:invisible uog:opacity-0"
59
+ control: "pointer-events-none invisible opacity-0"
60
60
  }
61
61
  },
62
62
  direction: {
63
63
  left: {
64
- control: "uog:left-0 uog:hocus-visible:-translate-x-1 uog:focus-visible:-translate-x-1"
64
+ control: "left-0 focus-visible:-translate-x-1 hocus-visible:-translate-x-1"
65
65
  },
66
66
  right: {
67
- control: "uog:right-0 uog:hocus-visible:translate-x-1 uog:focus-visible:translate-x-1"
67
+ control: "right-0 focus-visible:translate-x-1 hocus-visible:translate-x-1"
68
68
  }
69
69
  }
70
70
  }
71
- }), b = n > s, { base: y, contentContainer: N, controlContainer: j, control: v } = C({ showControls: b });
72
- return /* @__PURE__ */ g("div", { className: `uofg-carousel ${y()}`, children: [
73
- b && /* @__PURE__ */ g("div", { className: `uofg-carousel-control-container ${j()}`, children: [
74
- /* @__PURE__ */ g(
71
+ }), v = o > n, { base: y, contentContainer: N, controlContainer: j, control: p } = C({ showControls: v });
72
+ return /* @__PURE__ */ m("div", { className: `uofg-carousel ${y()}`, children: [
73
+ v && /* @__PURE__ */ m("div", { className: `uofg-carousel-control-container ${j()}`, children: [
74
+ /* @__PURE__ */ m(
75
75
  "button",
76
76
  {
77
- onClick: () => x(-1),
78
- className: `uofg-carousel-shift-left ${v({ showControls: !(e === "none" && o === 0), direction: "left" })}`,
77
+ onClick: () => b(-1),
78
+ className: `uofg-carousel-shift-left ${p({ showControls: !(t === "none" && e === 0), direction: "left" })}`,
79
79
  children: [
80
- /* @__PURE__ */ l("span", { className: "uog:sr-only", children: "Shift left" }),
81
- /* @__PURE__ */ l(p, { icon: k })
80
+ /* @__PURE__ */ a("span", { className: "sr-only", children: "Shift left" }),
81
+ /* @__PURE__ */ a(g, { icon: k })
82
82
  ]
83
83
  }
84
84
  ),
85
- /* @__PURE__ */ g(
85
+ /* @__PURE__ */ m(
86
86
  "button",
87
87
  {
88
- onClick: () => x(1),
89
- className: `uofg-carousel-shift-right ${v({ showControls: !(e === "none" && o === i), direction: "right" })}`,
88
+ onClick: () => b(1),
89
+ className: `uofg-carousel-shift-right ${p({ showControls: !(t === "none" && e === i), direction: "right" })}`,
90
90
  children: [
91
- /* @__PURE__ */ l("span", { className: "uog:sr-only", children: "Shift right" }),
92
- /* @__PURE__ */ l(p, { icon: I })
91
+ /* @__PURE__ */ a("span", { className: "sr-only", children: "Shift right" }),
92
+ /* @__PURE__ */ a(g, { icon: I })
93
93
  ]
94
94
  }
95
95
  )
96
96
  ] }),
97
- /* @__PURE__ */ l(
97
+ /* @__PURE__ */ a(
98
98
  "div",
99
99
  {
100
100
  className: `uofg-carousel-content-container ${N()}`,
101
101
  ref: r,
102
102
  style: {
103
103
  // Define CSS variables for the grid layout
104
- "--items": n,
105
- "--display": s
104
+ "--items": o,
105
+ "--display": n
106
106
  },
107
- children: u
107
+ children: c
108
108
  }
109
109
  )
110
110
  ] });