@uoguelph/react-components 1.0.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.
Files changed (126) hide show
  1. package/README.md +3 -0
  2. package/dist/accordion-button.d.ts +16 -0
  3. package/dist/accordion-button.js +42 -0
  4. package/dist/accordion-content.d.ts +15 -0
  5. package/dist/accordion-content.js +14 -0
  6. package/dist/accordion-context.d.ts +9 -0
  7. package/dist/accordion-context.js +5 -0
  8. package/dist/accordion.d.ts +42 -0
  9. package/dist/accordion.js +16 -0
  10. package/dist/alert-footer.d.ts +16 -0
  11. package/dist/alert-footer.js +10 -0
  12. package/dist/alert-message.d.ts +16 -0
  13. package/dist/alert-message.js +13 -0
  14. package/dist/alert-subtitle.d.ts +16 -0
  15. package/dist/alert-subtitle.js +10 -0
  16. package/dist/alert-title.d.ts +22 -0
  17. package/dist/alert-title.js +50 -0
  18. package/dist/alert.d.ts +70 -0
  19. package/dist/alert.js +18 -0
  20. package/dist/blockquote.d.ts +22 -0
  21. package/dist/blockquote.js +43 -0
  22. package/dist/breadcrumb-home.d.ts +32 -0
  23. package/dist/breadcrumb-home.js +21 -0
  24. package/dist/breadcrumb.d.ts +32 -0
  25. package/dist/breadcrumb.js +30 -0
  26. package/dist/breadcrumbs.d.ts +54 -0
  27. package/dist/breadcrumbs.js +15 -0
  28. package/dist/button.d.ts +51 -0
  29. package/dist/button.js +218 -0
  30. package/dist/card-content.d.ts +15 -0
  31. package/dist/card-content.js +20 -0
  32. package/dist/card-context.d.ts +10 -0
  33. package/dist/card-context.js +5 -0
  34. package/dist/card-footer.d.ts +16 -0
  35. package/dist/card-footer.js +20 -0
  36. package/dist/card-image.d.ts +40 -0
  37. package/dist/card-image.js +45 -0
  38. package/dist/card-title.d.ts +16 -0
  39. package/dist/card-title.js +20 -0
  40. package/dist/card.d.ts +105 -0
  41. package/dist/card.js +45 -0
  42. package/dist/carousel.d.ts +25 -0
  43. package/dist/carousel.js +113 -0
  44. package/dist/checkbox.d.ts +39 -0
  45. package/dist/checkbox.js +99 -0
  46. package/dist/contact-email.d.ts +17 -0
  47. package/dist/contact-email.js +21 -0
  48. package/dist/contact-name.d.ts +16 -0
  49. package/dist/contact-name.js +10 -0
  50. package/dist/contact-phone.d.ts +19 -0
  51. package/dist/contact-phone.js +25 -0
  52. package/dist/contact-title.d.ts +16 -0
  53. package/dist/contact-title.js +10 -0
  54. package/dist/contact.d.ts +73 -0
  55. package/dist/contact.js +18 -0
  56. package/dist/container.d.ts +32 -0
  57. package/dist/container.js +25 -0
  58. package/dist/divider.d.ts +6 -0
  59. package/dist/divider.js +30 -0
  60. package/dist/embedded-video-context.d.ts +10 -0
  61. package/dist/embedded-video-context.js +5 -0
  62. package/dist/embedded-video-modal-button.d.ts +54 -0
  63. package/dist/embedded-video-modal-button.js +25 -0
  64. package/dist/embedded-video.d.ts +81 -0
  65. package/dist/embedded-video.js +108 -0
  66. package/dist/hero-caption.d.ts +15 -0
  67. package/dist/hero-caption.js +8 -0
  68. package/dist/hero-content.d.ts +20 -0
  69. package/dist/hero-content.js +47 -0
  70. package/dist/hero-context.d.ts +9 -0
  71. package/dist/hero-context.js +5 -0
  72. package/dist/hero-link.d.ts +29 -0
  73. package/dist/hero-link.js +26 -0
  74. package/dist/hero-title.d.ts +24 -0
  75. package/dist/hero-title.js +26 -0
  76. package/dist/hero-video.d.ts +22 -0
  77. package/dist/hero-video.js +27 -0
  78. package/dist/hero.d.ts +141 -0
  79. package/dist/hero.js +52 -0
  80. package/dist/image-overlay.d.ts +66 -0
  81. package/dist/image-overlay.js +144 -0
  82. package/dist/index.css +1 -0
  83. package/dist/index.d.ts +11 -0
  84. package/dist/index.js +33 -0
  85. package/dist/info.d.ts +19 -0
  86. package/dist/info.js +24 -0
  87. package/dist/link-carousel-content.d.ts +11 -0
  88. package/dist/link-carousel-content.js +20 -0
  89. package/dist/link-carousel-context.d.ts +30 -0
  90. package/dist/link-carousel-context.js +5 -0
  91. package/dist/link-carousel-item.d.ts +15 -0
  92. package/dist/link-carousel-item.js +21 -0
  93. package/dist/link-carousel-link.d.ts +34 -0
  94. package/dist/link-carousel-link.js +39 -0
  95. package/dist/link-carousel-links.d.ts +11 -0
  96. package/dist/link-carousel-links.js +24 -0
  97. package/dist/link-carousel.d.ts +83 -0
  98. package/dist/link-carousel.js +57 -0
  99. package/dist/link.d.ts +30 -0
  100. package/dist/link.js +28 -0
  101. package/dist/list-item.d.ts +17 -0
  102. package/dist/list-item.js +9 -0
  103. package/dist/list.d.ts +39 -0
  104. package/dist/list.js +31 -0
  105. package/dist/loading-indicator.d.ts +23 -0
  106. package/dist/loading-indicator.js +75 -0
  107. package/dist/math-utils-BwzyIQRL.js +50 -0
  108. package/dist/media-caption.d.ts +110 -0
  109. package/dist/media-caption.js +129 -0
  110. package/dist/modal.d.ts +18 -0
  111. package/dist/modal.js +39 -0
  112. package/dist/navigation-link.d.ts +29 -0
  113. package/dist/navigation-link.js +40 -0
  114. package/dist/navigation.d.ts +40 -0
  115. package/dist/navigation.js +15 -0
  116. package/dist/radio-context.d.ts +9 -0
  117. package/dist/radio-context.js +5 -0
  118. package/dist/radio-group.d.ts +28 -0
  119. package/dist/radio-group.js +37 -0
  120. package/dist/radio.d.ts +13 -0
  121. package/dist/radio.js +36 -0
  122. package/dist/regular-CYeGUuiO.js +91 -0
  123. package/dist/solid-DM6GVhkF.js +80 -0
  124. package/dist/typography.d.ts +29 -0
  125. package/dist/typography.js +31 -0
  126. package/package.json +76 -0
@@ -0,0 +1,83 @@
1
+ import { ElementType } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
3
+ import { PropsWithChildren } from 'react';
4
+
5
+ declare const defaultElement = "a";
6
+
7
+ /**
8
+ * The LinkCarousel component is used to display a column of links that change the content that is displayed once the
9
+ * user hovers on a link. The content must have a defined height otherwise the component will not work as expected.
10
+ * Content should be limited to purely decoration, as the link carousel does not display its content on mobile devices,
11
+ * and is not focus friendly. If your content doesn't match this criteria, use the Carousel component instead, or find
12
+ * another way to display your content.
13
+ */
14
+ export declare function LinkCarousel({ children, className, stack, direction }: LinkCarouselProps): JSX.Element;
15
+
16
+ export declare namespace LinkCarousel {
17
+ var displayName: string;
18
+ }
19
+
20
+ export declare function LinkCarouselContent({ children, className }: LinkCarouselContentProps): JSX.Element;
21
+
22
+ declare type LinkCarouselContentProps = PropsWithChildren<{
23
+ /** Additional classes to apply to the link carousel content container. */
24
+ className?: string;
25
+ }>;
26
+
27
+ declare type LinkCarouselId = string | number;
28
+
29
+ export declare function LinkCarouselItem({ id, children, className }: LinkCarouselItemProps): JSX.Element;
30
+
31
+ declare type LinkCarouselItemProps = PropsWithChildren<{
32
+ /** The unique identifier for the link carousel item. */
33
+ id: LinkCarouselId;
34
+ /** Additional classes to apply to the link carousel item */
35
+ className?: string;
36
+ }>;
37
+
38
+ export declare function LinkCarouselLink<T extends LinkCarouselLinkElementType = typeof defaultElement>({ as, id, children, className, href, ...rest }: LinkCarouselLinkProps<T>): JSX.Element;
39
+
40
+ export declare namespace LinkCarouselLink {
41
+ var displayName: string;
42
+ }
43
+
44
+ declare type LinkCarouselLinkElementType = ElementType<{
45
+ href?: string;
46
+ }, 'a'>;
47
+
48
+ declare type LinkCarouselLinkProps<T extends LinkCarouselLinkElementType = typeof defaultElement> = PropsWithChildren<{
49
+ /**
50
+ * The element type to render as.
51
+ *
52
+ * @default 'a'
53
+ */
54
+ as?: T;
55
+ /** The id of the link, this is used to determine which carousel item is controlled by this link. */
56
+ id: LinkCarouselId;
57
+ /** The URL this links to. */
58
+ href: string;
59
+ /** Additional classes to apply to the link. */
60
+ className?: string;
61
+ }>;
62
+
63
+ export declare function LinkCarouselLinks({ children, className }: LinkCarouselLinksProps): JSX.Element;
64
+
65
+ declare type LinkCarouselLinksProps = PropsWithChildren<{
66
+ /** Additional classes to apply to the link carousel links. */
67
+ className?: string;
68
+ }>;
69
+
70
+ export declare type LinkCarouselProps = PropsWithChildren<{
71
+ /** Additional classes to apply to the link carousel. */
72
+ className?: string;
73
+ /** Whether the carousel links should stack on top of the content, rather than beside it. */
74
+ stack?: boolean;
75
+ /**
76
+ * The side of the carousel that the links should be displayed on.
77
+ *
78
+ * @default 'left'
79
+ */
80
+ direction?: 'left' | 'right';
81
+ }>;
82
+
83
+ export { }
@@ -0,0 +1,57 @@
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { useMemo as p, useState as d, useRef as v, Children as k, isValidElement as w } from "react";
3
+ import { twMerge as C } from "tailwind-merge";
4
+ import { tv as I } from "tailwind-variants";
5
+ import { LinkCarouselContext as L } from "./link-carousel-context.js";
6
+ import { LinkCarouselLink as x } from "./link-carousel-link.js";
7
+ import { LinkCarouselContent as F } from "./link-carousel-content.js";
8
+ import { LinkCarouselItem as S } from "./link-carousel-item.js";
9
+ import { LinkCarouselLinks as $ } from "./link-carousel-links.js";
10
+ function A(r) {
11
+ let t = null;
12
+ function o(i) {
13
+ k.forEach(i, (e) => {
14
+ if (t) return;
15
+ const n = w(e);
16
+ n && e.type === x ? t = e.props.id : n && e.props.children && o(e.props.children);
17
+ });
18
+ }
19
+ return o(r), t;
20
+ }
21
+ function h({ children: r, className: t, stack: o = !1, direction: i = "left" }) {
22
+ const e = p(() => A(r), [r]), [n, l] = d(e), s = v(null), f = (c) => {
23
+ l((m) => (s.current = m, c));
24
+ }, a = I({
25
+ base: "tw:flex tw:w-full tw:relative tw:h-fit tw:overflow-hidden",
26
+ variants: {
27
+ direction: {
28
+ left: "tw:flex-row",
29
+ right: "tw:flex-row-reverse"
30
+ }
31
+ }
32
+ });
33
+ return /* @__PURE__ */ u("div", { className: `uofg-link-carousel ${C(a({ direction: i }), t)}`, children: /* @__PURE__ */ u(
34
+ L.Provider,
35
+ {
36
+ value: {
37
+ previousActiveId: s.current,
38
+ activeId: n,
39
+ setActiveId: f,
40
+ stack: o ?? !1,
41
+ direction: i,
42
+ clearPreviousActiveId: () => {
43
+ s.current = null;
44
+ }
45
+ },
46
+ children: r
47
+ }
48
+ ) });
49
+ }
50
+ h.displayName = "LinkCarousel";
51
+ export {
52
+ h as LinkCarousel,
53
+ F as LinkCarouselContent,
54
+ S as LinkCarouselItem,
55
+ x as LinkCarouselLink,
56
+ $ as LinkCarouselLinks
57
+ };
package/dist/link.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { ElementType } from 'react';
3
+ import { JSX } from 'react/jsx-runtime';
4
+ import { PropsWithChildren } from 'react';
5
+
6
+ declare const defaultElement = "a";
7
+
8
+ export declare function Link<T extends LinkElementType = typeof defaultElement>({ as, href, color, children, className, ...rest }: LinkProps<T>): JSX.Element;
9
+
10
+ export declare namespace Link {
11
+ var displayName: string;
12
+ }
13
+
14
+ declare type LinkElementType = ElementType<{
15
+ href?: string;
16
+ }, 'a'>;
17
+
18
+ export declare type LinkProps<T extends LinkElementType = typeof defaultElement> = PropsWithChildren<LinkPropsAs<T> & ComponentPropsWithoutRef<T> & LinkPropsBase>;
19
+
20
+ declare type LinkPropsAs<T extends LinkElementType> = {
21
+ as?: T;
22
+ };
23
+
24
+ declare type LinkPropsBase = {
25
+ href: string;
26
+ color?: 'base' | 'light' | 'dark';
27
+ className?: string;
28
+ };
29
+
30
+ export { }
package/dist/link.js ADDED
@@ -0,0 +1,28 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { twMerge as a } from "tailwind-merge";
3
+ import { tv as w } from "tailwind-variants";
4
+ const b = "a";
5
+ function p({
6
+ as: t,
7
+ href: o,
8
+ color: i = "base",
9
+ children: n,
10
+ className: e,
11
+ ...r
12
+ }) {
13
+ const s = t ?? b, l = w({
14
+ base: "tw:inline-flex tw:gap-[1em] tw:underline tw:decoration-current tw:transition-colors tw:hover:decoration-transparent tw:focus:ring-2 tw:focus-visible:ring-offset-2 tw:focus-visible:outline-none tw:text-body-copy-link",
15
+ variants: {
16
+ color: {
17
+ base: "tw:text-body-copy-link tw:focus-visible:ring-body-copy-link",
18
+ light: "tw:text-body-copy-link-on-light tw:focus-visible:ring-body-copy-link-on-light",
19
+ dark: "tw:text-body-copy-link-on-dark tw:focus-visible:ring-body-copy-link-on-light"
20
+ }
21
+ }
22
+ });
23
+ return /* @__PURE__ */ c(s, { ...r, href: o, className: a(l({ color: i }), e), children: n });
24
+ }
25
+ p.displayName = "Link";
26
+ export {
27
+ p as Link
28
+ };
@@ -0,0 +1,17 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
3
+ import { PropsWithChildren } from 'react';
4
+
5
+ /** A list item component. */
6
+ export declare function ListItem({ className, children, ...rest }: ListItemProps): JSX.Element;
7
+
8
+ export declare namespace ListItem {
9
+ var displayName: string;
10
+ }
11
+
12
+ declare type ListItemProps = PropsWithChildren<{
13
+ /** Additional classes to apply to the list item. */
14
+ className?: string;
15
+ } & ComponentPropsWithoutRef<'li'>>;
16
+
17
+ export { }
@@ -0,0 +1,9 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { twMerge as m } from "tailwind-merge";
3
+ function l({ className: t, children: e, ...i }) {
4
+ return /* @__PURE__ */ r("li", { ...i, className: m("tw:relative tw:h-fit tw:w-full", t), children: e });
5
+ }
6
+ l.displayName = "ListItem";
7
+ export {
8
+ l as ListItem
9
+ };
package/dist/list.d.ts ADDED
@@ -0,0 +1,39 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
3
+ import { PropsWithChildren } from 'react';
4
+
5
+ declare const defaultElement = "ul";
6
+
7
+ /** A list component. */
8
+ export declare function List<T extends ListElementType = typeof defaultElement>({ as, children, className, ...rest }: ListProps<T>): JSX.Element;
9
+
10
+ export declare namespace List {
11
+ var displayName: string;
12
+ }
13
+
14
+ declare type ListElementType = 'ul' | 'ol';
15
+
16
+ /** A list item component. */
17
+ export declare function ListItem({ className, children, ...rest }: ListItemProps): JSX.Element;
18
+
19
+ export declare namespace ListItem {
20
+ var displayName: string;
21
+ }
22
+
23
+ declare type ListItemProps = PropsWithChildren<{
24
+ /** Additional classes to apply to the list item. */
25
+ className?: string;
26
+ } & ComponentPropsWithoutRef<'li'>>;
27
+
28
+ export declare type ListProps<T extends ListElementType = typeof defaultElement> = PropsWithChildren<{
29
+ /**
30
+ * The element type to render as.
31
+ *
32
+ * @default 'ul'
33
+ */
34
+ as?: T;
35
+ /** Additional classes to apply to the list. */
36
+ className?: string;
37
+ } & ComponentPropsWithoutRef<T>>;
38
+
39
+ export { }
package/dist/list.js ADDED
@@ -0,0 +1,31 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { createContext as a, useContext as c } from "react";
3
+ import { twMerge as f } from "tailwind-merge";
4
+ import { tv as w } from "tailwind-variants";
5
+ import { ListItem as g } from "./list-item.js";
6
+ const d = "ul", o = a(null);
7
+ function p({
8
+ as: i,
9
+ children: l,
10
+ className: n,
11
+ ...r
12
+ }) {
13
+ const e = i ?? d, t = c(o), m = w({
14
+ base: "tw:flex tw:flex-col tw:relative tw:h-fit tw:w-full tw:list-inside tw:gap-2",
15
+ variants: {
16
+ as: {
17
+ ol: "tw:list-decimal",
18
+ ul: "tw:list-disc"
19
+ },
20
+ nested: {
21
+ true: "tw:ml-4"
22
+ }
23
+ }
24
+ });
25
+ return /* @__PURE__ */ s(e, { ...r, className: f(m({ as: e, nested: t == null ? void 0 : t.nested }), n), children: /* @__PURE__ */ s(o.Provider, { value: { nested: typeof t == "object" }, children: l }) });
26
+ }
27
+ p.displayName = "List";
28
+ export {
29
+ p as List,
30
+ g as ListItem
31
+ };
@@ -0,0 +1,23 @@
1
+ import { JSX } from 'react/jsx-runtime';
2
+
3
+ /** A component which can be used as a placeholder while content is loading */
4
+ export declare function LoadingIndicator({ size, color, className }: LoadingIndicatorProps): JSX.Element;
5
+
6
+ export declare type LoadingIndicatorProps = {
7
+ /**
8
+ * The size of the loading indicator
9
+ *
10
+ * @default 'lg'
11
+ */
12
+ size?: 'sm' | 'md' | 'lg';
13
+ /**
14
+ * The color of the loading indicator
15
+ *
16
+ * @default 'red'
17
+ */
18
+ color?: 'blue' | 'red' | 'green' | 'yellow';
19
+ /** Additional classes to add the loading indicator */
20
+ className?: string;
21
+ };
22
+
23
+ export { }
@@ -0,0 +1,75 @@
1
+ import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
+ import { h as w } from "./regular-CYeGUuiO.js";
3
+ import { FontAwesomeIcon as n } from "@fortawesome/react-fontawesome";
4
+ import { twMerge as g } from "tailwind-merge";
5
+ import { tv as m } from "tailwind-variants";
6
+ var h = {
7
+ prefix: "fak",
8
+ iconName: "gryphon-statue",
9
+ icon: [
10
+ 512,
11
+ 512,
12
+ [],
13
+ "e002",
14
+ "M166.4 257.6c-25.6-19.2-43.2-38.4-43.2-38.4s0 33.6-43.2 33.6H46.4c-14.4 0-24 9.6-24 20.8v9.6c0 4.8 4.8 9.6 9.6 9.6h180.8s3.2-1.6 0-3.2c-9.6-8-30.4-22.4-46.4-32zm38.4-62.4c9.6 0 17.6 1.6 25.6 4.8 3.2-17.6 6.4-35.2 1.6-46.4L200 51.2l-19.2 72-38.4 12.8-57.6-48 32 102.4c3.2 11.2 16 24 30.4 36.8 12.8-19.2 33.6-33.6 57.6-32zm-9.6-44.8c4.8-1.6 11.2 1.6 12.8 6.4 1.6 4.8-1.6 11.2-6.4 12.8-4.8 1.6-11.2-1.6-12.8-6.4-1.6-4.8 1.6-11.2 6.4-12.8zm-48 14.4c4.8-1.6 11.2 1.6 12.8 6.4 1.6 4.8-1.6 11.2-6.4 12.8s-11.2-1.6-12.8-6.4 1.6-11.2 6.4-12.8zm81.6 46.4c-6.4-3.2-14.4-4.8-22.4-4.8-20.8 0-40 11.2-49.6 28.8C180.8 256 208 272 208 272s12.8-30.4 20.8-60.8zm1.6-112C256 70.4 224 48 232 17.6c9.6-35.2 86.4-9.6 99.2-3.2 73.6 35.2 112 89.6 112 89.6s27.2 33.6-1.6 25.6c-16-4.8-49.6-27.2-83.2-38.4-35.2-9.6-75.2 0-89.6 24-38.4 62.4 1.6 102.4 1.6 102.4s6.4 6.4 14.4 12.8c6.4 4.8 17.6 9.6 17.6 9.6h-72s16-44.8 16-81.6c0-12.8-20.8-54.4-16-59.2zm267.2 291.2h-11.2v-68.8h11.2c6.4 0 11.2-4.8 11.2-11.2 0-6.4-4.8-11.2-11.2-11.2h-14.4c-9.6 6.4-20.8 11.2-32 11.2H400c-19.2 0-35.2 14.4-35.2 30.4 0 22.4-9.6 44.8-27.2 60.8-6.4 4.8-12.8 9.6-19.2 12.8h180.8c6.4 0 11.2-4.8 11.2-11.2-1.6-6.4-6.4-12.8-12.8-12.8zm-264-86.4c-4.8 0-8-1.6-11.2-3.2l-3.2 3.2-1.6 1.6h-184c-4.8 0-9.6-1.6-14.4-4.8h-8C4.8 300.8 0 305.6 0 312c0 6.4 4.8 11.2 11.2 11.2h11.2V392H11.2C4.8 392 0 396.8 0 403.2c0 6.4 4.8 11.2 11.2 11.2h211.2c-28.8-14.4-48-41.6-48-73.6 0-16 12.8-28.8 28.8-28.8s28.8 12.8 28.8 28.8v1.6c0 16 16 28.8 35.2 28.8 19.2 0 35.2-14.4 35.2-30.4 0-12.8 3.2-25.6 9.6-36.8h-78.4zm216-94.4h-6.4C422.4 96 331.2 100.8 320 100.8c-41.6 8-57.6 38.4-54.4 76.8 3.2 48 59.2 65.6 92.8 65.6 3.2 0 6.4 3.2 6.4 6.4s-1.6 6.4-4.8 6.4H246.4c-11.2 0-20.8 9.6-20.8 20.8v9.6c0 4.8 4.8 9.6 9.6 9.6h89.6c17.6-22.4 44.8-36.8 76.8-36.8h49.6V256c0-4.8 0-9.6-1.6-14.4h3.2c4.8 0 9.6 6.4 9.6 14.4s-4.8 14.4-9.6 14.4H400c-46.4 0-81.6 33.6-81.6 73.6 0 24-20.8 41.6-48 41.6s-48-19.2-48-41.6c0-9.6-8-17.6-17.6-17.6-9.6 0-17.6 8-17.6 17.6 0 40 36.8 73.6 81.6 73.6s81.6-33.6 81.6-73.6c0-24 20.8-41.6 48-41.6h52.8c24 0 41.6-20.8 41.6-44.8 0-28.8-19.2-48-43.2-48z"
15
+ ]
16
+ };
17
+ function T({ size: o = "lg", color: c = "red", className: i }) {
18
+ const a = m({
19
+ slots: {
20
+ base: "tw:flex tw:flex-col tw:items-center tw:justify-center",
21
+ icon: "",
22
+ container: "tw:flex tw:items-center tw:gap-2",
23
+ spinner: "tw:w-[1em] tw:animate-spin",
24
+ loadingText: "tw:font-condensed tw:text-3xl"
25
+ },
26
+ variants: {
27
+ size: {
28
+ sm: {
29
+ icon: "tw:text-4xl",
30
+ loadingText: "tw:text-lg"
31
+ },
32
+ md: {
33
+ icon: "tw:text-6xl",
34
+ loadingText: "tw:text-xl"
35
+ },
36
+ lg: {
37
+ icon: "tw:text-9xl",
38
+ loadingText: "tw:text-2xl"
39
+ }
40
+ },
41
+ color: {
42
+ red: {
43
+ icon: "tw:text-red",
44
+ spinner: "tw:text-red",
45
+ loadingText: "tw:text-red"
46
+ },
47
+ blue: {
48
+ icon: "tw:text-blue",
49
+ spinner: "tw:text-blue",
50
+ loadingText: "tw:text-blue"
51
+ },
52
+ green: {
53
+ icon: "tw:text-green",
54
+ spinner: "tw:text-green",
55
+ loadingText: "tw:text-green"
56
+ },
57
+ yellow: {
58
+ icon: "tw:text-yellow",
59
+ spinner: "tw:text-yellow",
60
+ loadingText: "tw:text-yellow"
61
+ }
62
+ }
63
+ }
64
+ }), { base: l, icon: r, container: s, spinner: x, loadingText: d } = a({ size: o, color: c });
65
+ return /* @__PURE__ */ e("div", { className: `uofg-loading-indicator ${g(l(), i)}`, children: [
66
+ /* @__PURE__ */ t(n, { className: `uofg-loading-indicator-icon ${r()}`, icon: h }),
67
+ /* @__PURE__ */ e("div", { className: `uofg-loading-indicator-container ${s()}`, children: [
68
+ /* @__PURE__ */ t(n, { className: `uofg-loading-indicator-spinner ${x()}`, icon: w }),
69
+ /* @__PURE__ */ t("span", { className: `uofg-loading-indicator-loading-text ${d()}`, children: "Loading" })
70
+ ] })
71
+ ] });
72
+ }
73
+ export {
74
+ T as LoadingIndicator
75
+ };
@@ -0,0 +1,50 @@
1
+ function R(o, r, a) {
2
+ return Math.max(Math.min(o, r), Math.min(o, a));
3
+ }
4
+ function S(o, r) {
5
+ return (o % r + r) % r;
6
+ }
7
+ function g(o, r, a) {
8
+ return o + a * (r - o);
9
+ }
10
+ function j(o, r, a, b, w) {
11
+ function l(n, e, t) {
12
+ return 3 * Math.pow(1 - n, 2) * n * e + 3 * (1 - n) * Math.pow(n, 2) * t + Math.pow(n, 3);
13
+ }
14
+ function k(n, e, t) {
15
+ return 3 * Math.pow(1 - n, 2) * e + 6 * (1 - n) * n * (t - e) + 3 * Math.pow(n, 2) * (1 - t);
16
+ }
17
+ function V(n, e, t, u, s, c) {
18
+ for (let h = 0; h < s; h++) {
19
+ const i = k(e, t, u);
20
+ if (Math.abs(i) > c) {
21
+ const f = l(e, t, u) - n;
22
+ if (e -= f / i, f === 0)
23
+ break;
24
+ } else
25
+ break;
26
+ }
27
+ return e;
28
+ }
29
+ function z(n, e, t, u, s, c, h) {
30
+ let i = e, f = l(e, u, s) - n;
31
+ for (let m = 0; m < c; m++) {
32
+ i = (e + t) / 2;
33
+ const M = l(i, u, s) - n;
34
+ if (Math.abs(M) <= h)
35
+ break;
36
+ M < 0 == f < 0 ? (e = i, f = M) : t = i;
37
+ }
38
+ return i;
39
+ }
40
+ if (o === 0 || o === 1)
41
+ return o;
42
+ let p = z(o, 0, 1, r, b, 4, 1e-4);
43
+ return p = V(o, p, r, b, 4, 1e-3), l(p, a, w);
44
+ }
45
+ export {
46
+ j as b,
47
+ R as c,
48
+ g as l,
49
+ S as m
50
+ };
@@ -0,0 +1,110 @@
1
+ import { ComponentPropsWithoutRef } from 'react';
2
+ import { ElementType } from 'react';
3
+ import { JSX } from 'react/jsx-runtime';
4
+ import { PropsWithChildren } from 'react';
5
+ import { ReactElement } from 'react';
6
+
7
+ declare type ButtonElementType = ElementType<{
8
+ href?: string;
9
+ }, 'a'> | 'button';
10
+
11
+ declare type ButtonProps<T extends ButtonElementType = typeof defaultElement> = PropsWithChildren<ButtonPropsAs<T> & ComponentPropsWithoutRef<T> & ButtonPropsBase>;
12
+
13
+ declare type ButtonPropsAs<T extends ButtonElementType> = {
14
+ as?: T;
15
+ };
16
+
17
+ declare type ButtonPropsBase = {
18
+ /**
19
+ * The color of the button
20
+ *
21
+ * @default 'red'
22
+ */
23
+ color?: 'red' | 'yellow' | 'blue' | 'green' | 'light-grey' | 'dark-grey' | 'black' | 'white';
24
+ /**
25
+ * Whether the button should be outlined
26
+ *
27
+ * @default false
28
+ */
29
+ outlined?: boolean;
30
+ /** Additional classes to apply to the button */
31
+ className?: string;
32
+ /**
33
+ * Whether the button is disabled
34
+ *
35
+ * @default false
36
+ */
37
+ disabled?: boolean;
38
+ };
39
+
40
+ declare const defaultElement = "button";
41
+
42
+ declare const defaultElement_2 = "img";
43
+
44
+ /**
45
+ * The EmbeddedVideo component is used for embedding videos from YouTube and Vimeo. It can be used to render a video
46
+ * directly or as a modal.
47
+ */
48
+ declare function EmbeddedVideo({ src, title, transcript, className, children }: EmbeddedVideoProps): JSX.Element;
49
+
50
+ declare namespace EmbeddedVideo {
51
+ var displayName: string;
52
+ }
53
+
54
+ declare function EmbeddedVideoModalButton({ type, children, className }: EmbeddedVideoModalButtonProps): JSX.Element;
55
+
56
+ declare namespace EmbeddedVideoModalButton {
57
+ var displayName: string;
58
+ }
59
+
60
+ declare type EmbeddedVideoModalButtonProps = PropsWithChildren<{
61
+ /** The type of button to render, either a play button or a color which will be passed to a Button component */
62
+ type: 'play-button' | ButtonProps['color'];
63
+ /** Additional classes to apply to the button */
64
+ className?: string;
65
+ }>;
66
+
67
+ declare type EmbeddedVideoProps = VideoProps & {
68
+ /** If passed the video will render as a modal, with the button being used to open the video. */
69
+ children?: ReactElement<typeof EmbeddedVideoModalButton>;
70
+ };
71
+
72
+ export declare function MediaCaption<T extends MediaCaptionElementType = typeof defaultElement_2>({ as, size, position, background, children, src, className, mediaClassName, ...rest }: MediaCaptionProps<T>): JSX.Element;
73
+
74
+ export declare namespace MediaCaption {
75
+ var displayName: string;
76
+ }
77
+
78
+ declare type MediaCaptionElementType = ElementType<{
79
+ src: string;
80
+ alt?: string;
81
+ height?: number;
82
+ width?: number;
83
+ }, 'img'> | typeof EmbeddedVideo;
84
+
85
+ export declare type MediaCaptionProps<T extends MediaCaptionElementType = typeof defaultElement_2> = PropsWithChildren<MediaCaptionPropsAs<T> & ComponentPropsWithoutRef<T> & MediaCaptionPropsBase>;
86
+
87
+ declare type MediaCaptionPropsAs<T extends MediaCaptionElementType> = {
88
+ as?: T;
89
+ };
90
+
91
+ declare type MediaCaptionPropsBase = {
92
+ size?: 'small' | 'medium' | 'large';
93
+ position?: 'left' | 'right' | 'above';
94
+ background?: 'none' | 'light-grey' | 'dark-grey';
95
+ className?: string;
96
+ mediaClassName?: string;
97
+ };
98
+
99
+ declare type VideoProps = {
100
+ /** The URL of the video to embed. */
101
+ src: string;
102
+ /** The title of the video. */
103
+ title?: string;
104
+ /** The URL to a human readable transcript of the video. */
105
+ transcript?: string;
106
+ /** Additional classes to apply to the video container. */
107
+ className?: string;
108
+ };
109
+
110
+ export { }