@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.
- package/README.md +3 -0
- package/dist/accordion-button.d.ts +16 -0
- package/dist/accordion-button.js +42 -0
- package/dist/accordion-content.d.ts +15 -0
- package/dist/accordion-content.js +14 -0
- package/dist/accordion-context.d.ts +9 -0
- package/dist/accordion-context.js +5 -0
- package/dist/accordion.d.ts +42 -0
- package/dist/accordion.js +16 -0
- package/dist/alert-footer.d.ts +16 -0
- package/dist/alert-footer.js +10 -0
- package/dist/alert-message.d.ts +16 -0
- package/dist/alert-message.js +13 -0
- package/dist/alert-subtitle.d.ts +16 -0
- package/dist/alert-subtitle.js +10 -0
- package/dist/alert-title.d.ts +22 -0
- package/dist/alert-title.js +50 -0
- package/dist/alert.d.ts +70 -0
- package/dist/alert.js +18 -0
- package/dist/blockquote.d.ts +22 -0
- package/dist/blockquote.js +43 -0
- package/dist/breadcrumb-home.d.ts +32 -0
- package/dist/breadcrumb-home.js +21 -0
- package/dist/breadcrumb.d.ts +32 -0
- package/dist/breadcrumb.js +30 -0
- package/dist/breadcrumbs.d.ts +54 -0
- package/dist/breadcrumbs.js +15 -0
- package/dist/button.d.ts +51 -0
- package/dist/button.js +218 -0
- package/dist/card-content.d.ts +15 -0
- package/dist/card-content.js +20 -0
- package/dist/card-context.d.ts +10 -0
- package/dist/card-context.js +5 -0
- package/dist/card-footer.d.ts +16 -0
- package/dist/card-footer.js +20 -0
- package/dist/card-image.d.ts +40 -0
- package/dist/card-image.js +45 -0
- package/dist/card-title.d.ts +16 -0
- package/dist/card-title.js +20 -0
- package/dist/card.d.ts +105 -0
- package/dist/card.js +45 -0
- package/dist/carousel.d.ts +25 -0
- package/dist/carousel.js +113 -0
- package/dist/checkbox.d.ts +39 -0
- package/dist/checkbox.js +99 -0
- package/dist/contact-email.d.ts +17 -0
- package/dist/contact-email.js +21 -0
- package/dist/contact-name.d.ts +16 -0
- package/dist/contact-name.js +10 -0
- package/dist/contact-phone.d.ts +19 -0
- package/dist/contact-phone.js +25 -0
- package/dist/contact-title.d.ts +16 -0
- package/dist/contact-title.js +10 -0
- package/dist/contact.d.ts +73 -0
- package/dist/contact.js +18 -0
- package/dist/container.d.ts +32 -0
- package/dist/container.js +25 -0
- package/dist/divider.d.ts +6 -0
- package/dist/divider.js +30 -0
- package/dist/embedded-video-context.d.ts +10 -0
- package/dist/embedded-video-context.js +5 -0
- package/dist/embedded-video-modal-button.d.ts +54 -0
- package/dist/embedded-video-modal-button.js +25 -0
- package/dist/embedded-video.d.ts +81 -0
- package/dist/embedded-video.js +108 -0
- package/dist/hero-caption.d.ts +15 -0
- package/dist/hero-caption.js +8 -0
- package/dist/hero-content.d.ts +20 -0
- package/dist/hero-content.js +47 -0
- package/dist/hero-context.d.ts +9 -0
- package/dist/hero-context.js +5 -0
- package/dist/hero-link.d.ts +29 -0
- package/dist/hero-link.js +26 -0
- package/dist/hero-title.d.ts +24 -0
- package/dist/hero-title.js +26 -0
- package/dist/hero-video.d.ts +22 -0
- package/dist/hero-video.js +27 -0
- package/dist/hero.d.ts +141 -0
- package/dist/hero.js +52 -0
- package/dist/image-overlay.d.ts +66 -0
- package/dist/image-overlay.js +144 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +33 -0
- package/dist/info.d.ts +19 -0
- package/dist/info.js +24 -0
- package/dist/link-carousel-content.d.ts +11 -0
- package/dist/link-carousel-content.js +20 -0
- package/dist/link-carousel-context.d.ts +30 -0
- package/dist/link-carousel-context.js +5 -0
- package/dist/link-carousel-item.d.ts +15 -0
- package/dist/link-carousel-item.js +21 -0
- package/dist/link-carousel-link.d.ts +34 -0
- package/dist/link-carousel-link.js +39 -0
- package/dist/link-carousel-links.d.ts +11 -0
- package/dist/link-carousel-links.js +24 -0
- package/dist/link-carousel.d.ts +83 -0
- package/dist/link-carousel.js +57 -0
- package/dist/link.d.ts +30 -0
- package/dist/link.js +28 -0
- package/dist/list-item.d.ts +17 -0
- package/dist/list-item.js +9 -0
- package/dist/list.d.ts +39 -0
- package/dist/list.js +31 -0
- package/dist/loading-indicator.d.ts +23 -0
- package/dist/loading-indicator.js +75 -0
- package/dist/math-utils-BwzyIQRL.js +50 -0
- package/dist/media-caption.d.ts +110 -0
- package/dist/media-caption.js +129 -0
- package/dist/modal.d.ts +18 -0
- package/dist/modal.js +39 -0
- package/dist/navigation-link.d.ts +29 -0
- package/dist/navigation-link.js +40 -0
- package/dist/navigation.d.ts +40 -0
- package/dist/navigation.js +15 -0
- package/dist/radio-context.d.ts +9 -0
- package/dist/radio-context.js +5 -0
- package/dist/radio-group.d.ts +28 -0
- package/dist/radio-group.js +37 -0
- package/dist/radio.d.ts +13 -0
- package/dist/radio.js +36 -0
- package/dist/regular-CYeGUuiO.js +91 -0
- package/dist/solid-DM6GVhkF.js +80 -0
- package/dist/typography.d.ts +29 -0
- package/dist/typography.js +31 -0
- package/package.json +76 -0
package/dist/carousel.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsxs as m, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { b as j, c as I } from "./solid-DM6GVhkF.js";
|
|
3
|
+
import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { Children as A, useRef as d, useState as F, useEffect as L } from "react";
|
|
5
|
+
import { tv as S } from "tailwind-variants";
|
|
6
|
+
import { l as q, b as M, m as C, c as R } from "./math-utils-BwzyIQRL.js";
|
|
7
|
+
const z = (l, u, e) => {
|
|
8
|
+
const o = l.scrollLeft, n = performance.now();
|
|
9
|
+
return new Promise((r) => {
|
|
10
|
+
const w = (t) => {
|
|
11
|
+
const f = t - n, i = M(Math.min(f / e, 1), 0.25, 0, 0.25, 1);
|
|
12
|
+
l.scrollLeft = q(o, u, i), f < e ? requestAnimationFrame(w) : r();
|
|
13
|
+
};
|
|
14
|
+
requestAnimationFrame(w);
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
function H({ children: l, display: u = 1, loop: e = "none" }) {
|
|
18
|
+
const o = A.count(l), n = Math.max(u, 1), r = d(null), w = d(0), [t, f] = F(0), i = o - n, h = d(!1);
|
|
19
|
+
L(() => {
|
|
20
|
+
var s;
|
|
21
|
+
if (!r.current)
|
|
22
|
+
return;
|
|
23
|
+
const c = ((s = r.current) == null ? void 0 : s.offsetWidth) / n;
|
|
24
|
+
(e === "jump" || e === "none") && (h.current = !0, z(r.current, c * t, 250).then(() => {
|
|
25
|
+
h.current = !1;
|
|
26
|
+
})), w.current = t;
|
|
27
|
+
}, [t, e, i, n]);
|
|
28
|
+
const x = (c) => {
|
|
29
|
+
if (h.current) return;
|
|
30
|
+
let s;
|
|
31
|
+
switch (e) {
|
|
32
|
+
case "none":
|
|
33
|
+
s = R(t + c, 0, i);
|
|
34
|
+
break;
|
|
35
|
+
case "jump":
|
|
36
|
+
s = C(t + c, i + 1);
|
|
37
|
+
break;
|
|
38
|
+
case "continuous":
|
|
39
|
+
s = C(t + c, o);
|
|
40
|
+
break;
|
|
41
|
+
default:
|
|
42
|
+
s = 0;
|
|
43
|
+
}
|
|
44
|
+
f(s);
|
|
45
|
+
}, g = S({
|
|
46
|
+
slots: {
|
|
47
|
+
base: "tw:relative tw:flex tw:h-fit tw:min-h-[7rem] tw:w-full tw:flex-col-reverse",
|
|
48
|
+
contentContainer: "tw:grid tw:w-full tw:flex-1 tw:grid-cols-[repeat(var(--items),calc(100%/var(--display)))] tw:overflow-x-hidden [&>*]:[grid-row:1]",
|
|
49
|
+
controlContainer: "tw:md:contents tw:flex tw:h-16 tw:w-full tw:pt-8",
|
|
50
|
+
control: "tw:sm:text-6xl tw:md:absolute tw:flex tw:h-full tw:w-16 tw:flex-1 tw:items-center tw:justify-center tw:text-3xl tw:text-yellow tw:transition-[transform,color,opacity,visibility] tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:focus-visible:outline-none tw:hocus-visible:text-black tw:focus-visible:text-black"
|
|
51
|
+
},
|
|
52
|
+
variants: {
|
|
53
|
+
showControls: {
|
|
54
|
+
true: {
|
|
55
|
+
base: "tw:sm:px-16"
|
|
56
|
+
},
|
|
57
|
+
false: {
|
|
58
|
+
control: "tw:pointer-events-none tw:invisible tw:opacity-0"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
direction: {
|
|
62
|
+
left: {
|
|
63
|
+
control: "tw:left-0 tw:hocus-visible:-translate-x-1 tw:focus-visible:-translate-x-1"
|
|
64
|
+
},
|
|
65
|
+
right: {
|
|
66
|
+
control: "tw:right-0 tw:hocus-visible:translate-x-1 tw:focus-visible:translate-x-1"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}), b = o > n, { base: y, contentContainer: k, controlContainer: N, control: v } = g({ showControls: b });
|
|
71
|
+
return /* @__PURE__ */ m("div", { className: y(), children: [
|
|
72
|
+
b && /* @__PURE__ */ m("div", { className: N(), children: [
|
|
73
|
+
/* @__PURE__ */ m(
|
|
74
|
+
"button",
|
|
75
|
+
{
|
|
76
|
+
onClick: () => x(-1),
|
|
77
|
+
className: v({ showControls: !(e === "none" && t === 0), direction: "left" }),
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ a("span", { className: "tw:sr-only", children: "Shift left" }),
|
|
80
|
+
/* @__PURE__ */ a(p, { icon: j })
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ m(
|
|
85
|
+
"button",
|
|
86
|
+
{
|
|
87
|
+
onClick: () => x(1),
|
|
88
|
+
className: v({ showControls: !(e === "none" && t === i), direction: "right" }),
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ a("span", { className: "tw:sr-only", children: "Shift right" }),
|
|
91
|
+
/* @__PURE__ */ a(p, { icon: I })
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] }),
|
|
96
|
+
/* @__PURE__ */ a(
|
|
97
|
+
"div",
|
|
98
|
+
{
|
|
99
|
+
className: k(),
|
|
100
|
+
ref: r,
|
|
101
|
+
style: {
|
|
102
|
+
// Define CSS variables for the grid layout
|
|
103
|
+
"--items": o,
|
|
104
|
+
"--display": n
|
|
105
|
+
},
|
|
106
|
+
children: l
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
] });
|
|
110
|
+
}
|
|
111
|
+
export {
|
|
112
|
+
H as Carousel
|
|
113
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
import { JSX } from 'react/jsx-runtime';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
/** The Checkbox component is used to allow the user to select one or more options from a list of choices. */
|
|
6
|
+
export declare function Checkbox({ checked, label, description, color, disabled, onChange, ...rest }: CheckboxProps): JSX.Element;
|
|
7
|
+
|
|
8
|
+
export declare namespace Checkbox {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export declare type CheckboxProps = {
|
|
13
|
+
/**
|
|
14
|
+
* Whether the checkbox is checked initially
|
|
15
|
+
*
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
checked?: boolean;
|
|
19
|
+
/** The label for the checkbox */
|
|
20
|
+
label?: ReactNode;
|
|
21
|
+
/** The description for the checkbox */
|
|
22
|
+
description?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* The color of the checkbox
|
|
25
|
+
*
|
|
26
|
+
* @default 'red'
|
|
27
|
+
*/
|
|
28
|
+
color?: 'red' | 'yellow' | 'blue' | 'green' | 'light-grey' | 'dark-grey' | 'black' | 'white';
|
|
29
|
+
/**
|
|
30
|
+
* Whether the checkbox is disabled
|
|
31
|
+
*
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
/** The function to call when the checkbox is toggled */
|
|
36
|
+
onChange?: (value: boolean) => void;
|
|
37
|
+
} & InputHTMLAttributes<HTMLInputElement>;
|
|
38
|
+
|
|
39
|
+
export { }
|
package/dist/checkbox.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { e as m } from "./regular-CYeGUuiO.js";
|
|
3
|
+
import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { Field as y, Checkbox as v, Label as N, Description as C } from "@headlessui/react";
|
|
5
|
+
import { useState as j } from "react";
|
|
6
|
+
import { tv as F } from "tailwind-variants";
|
|
7
|
+
function z({
|
|
8
|
+
checked: l = !1,
|
|
9
|
+
label: c,
|
|
10
|
+
description: i,
|
|
11
|
+
color: w = "red",
|
|
12
|
+
disabled: r = !1,
|
|
13
|
+
onChange: t,
|
|
14
|
+
...a
|
|
15
|
+
}) {
|
|
16
|
+
const [b, n] = j(l), g = F({
|
|
17
|
+
slots: {
|
|
18
|
+
base: "tw:flex tw:flex-col tw:gap-0.5 tw:cursor-pointer",
|
|
19
|
+
container: "tw:flex tw:items-center tw:gap-2",
|
|
20
|
+
box: "tw:group tw:rounded tw:flex tw:size-4 tw:items-center tw:justify-center tw:border tw:bg-white tw:p-3 tw:transition-colors tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:focus-visible:outline-none",
|
|
21
|
+
check: "tw:h-5 tw:w-5 tw:opacity-0 tw:transition-opacity tw:group-ui-checked:opacity-100 tw:user-select-none",
|
|
22
|
+
label: "tw:text-body-copy",
|
|
23
|
+
description: "tw:text-sm tw:text-dark-grey"
|
|
24
|
+
},
|
|
25
|
+
variants: {
|
|
26
|
+
color: {
|
|
27
|
+
red: {
|
|
28
|
+
box: "tw:focus-visible:ring-red tw:ui-checked:bg-red",
|
|
29
|
+
check: "tw:text-red-contrast"
|
|
30
|
+
},
|
|
31
|
+
yellow: {
|
|
32
|
+
box: "tw:focus-visible:ring-yellow tw:ui-checked:bg-yellow",
|
|
33
|
+
check: "tw:text-yellow-contrast"
|
|
34
|
+
},
|
|
35
|
+
blue: {
|
|
36
|
+
box: "tw:focus-visible:ring-blue tw:ui-checked:bg-blue",
|
|
37
|
+
check: "tw:text-blue-contrast"
|
|
38
|
+
},
|
|
39
|
+
green: {
|
|
40
|
+
box: "tw:focus-visible:ring-green tw:ui-checked:bg-green",
|
|
41
|
+
check: "tw:text-green-contrast"
|
|
42
|
+
},
|
|
43
|
+
"light-grey": {
|
|
44
|
+
box: "tw:focus-visible:ring-light-grey tw:ui-checked:bg-light-grey",
|
|
45
|
+
check: "tw:text-light-grey-contrast"
|
|
46
|
+
},
|
|
47
|
+
"dark-grey": {
|
|
48
|
+
box: "tw:focus-visible:ring-dark-grey tw:ui-checked:bg-dark-grey",
|
|
49
|
+
check: "tw:text-dark-grey-contrast"
|
|
50
|
+
},
|
|
51
|
+
black: {
|
|
52
|
+
box: "tw:focus-visible:ring-black tw:ui-checked:bg-black",
|
|
53
|
+
check: "tw:text-black-contrast"
|
|
54
|
+
},
|
|
55
|
+
white: {
|
|
56
|
+
box: "tw:focus-visible:ring-white tw:ui-checked:bg-white",
|
|
57
|
+
check: "tw:text-white-contrast"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
disabled: {
|
|
61
|
+
true: {
|
|
62
|
+
base: "tw:opacity-60",
|
|
63
|
+
label: "tw:text-dark-grey"
|
|
64
|
+
},
|
|
65
|
+
false: {}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}), {
|
|
69
|
+
base: h,
|
|
70
|
+
container: d,
|
|
71
|
+
box: k,
|
|
72
|
+
check: u,
|
|
73
|
+
label: x,
|
|
74
|
+
description: f
|
|
75
|
+
} = g({ color: w, disabled: r });
|
|
76
|
+
return /* @__PURE__ */ s(y, { className: h(), children: [
|
|
77
|
+
/* @__PURE__ */ s("div", { className: d(), children: [
|
|
78
|
+
/* @__PURE__ */ e(
|
|
79
|
+
v,
|
|
80
|
+
{
|
|
81
|
+
checked: b,
|
|
82
|
+
onChange: (o) => {
|
|
83
|
+
n(o), t == null || t(o);
|
|
84
|
+
},
|
|
85
|
+
disabled: r,
|
|
86
|
+
className: k(),
|
|
87
|
+
...a,
|
|
88
|
+
children: /* @__PURE__ */ e(p, { className: u(), icon: m })
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
c && /* @__PURE__ */ e(N, { className: x(), children: c })
|
|
92
|
+
] }),
|
|
93
|
+
i && /* @__PURE__ */ e(C, { className: f(), children: i })
|
|
94
|
+
] });
|
|
95
|
+
}
|
|
96
|
+
z.displayName = "Checkbox";
|
|
97
|
+
export {
|
|
98
|
+
z as Checkbox
|
|
99
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/** The ContactEmail component is used to display an email address. */
|
|
4
|
+
export declare function ContactEmail({ email, className }: ContactEmailProps): JSX.Element;
|
|
5
|
+
|
|
6
|
+
export declare namespace ContactEmail {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare type ContactEmailProps = {
|
|
11
|
+
/** Additional classes to apply to the email */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** The email address to display */
|
|
14
|
+
email: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { g as c } from "./regular-CYeGUuiO.js";
|
|
3
|
+
import { FontAwesomeIcon as a } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { twMerge as l } from "tailwind-merge";
|
|
5
|
+
import { tv as m } from "tailwind-variants";
|
|
6
|
+
function f({ email: t, className: i }) {
|
|
7
|
+
const n = m({
|
|
8
|
+
slots: {
|
|
9
|
+
container: "tw:flex tw:items-center tw:gap-1",
|
|
10
|
+
link: "tw:underline tw:decoration-current tw:hocus-visible:decoration-transparent tw:transition-colors tw:text-body-copy-link-on-light tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:focus-visible:outline-none"
|
|
11
|
+
}
|
|
12
|
+
}), { container: e, link: r } = n();
|
|
13
|
+
return /* @__PURE__ */ s("div", { className: l(e(), i), children: [
|
|
14
|
+
/* @__PURE__ */ o(a, { icon: c }),
|
|
15
|
+
/* @__PURE__ */ o("a", { className: r(), href: `mailto:${t}`, children: t })
|
|
16
|
+
] });
|
|
17
|
+
}
|
|
18
|
+
f.displayName = "ContactEmail";
|
|
19
|
+
export {
|
|
20
|
+
f as ContactEmail
|
|
21
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
/** The ContactName component is used to display the name of a contact. */
|
|
5
|
+
export declare function ContactName({ children, className }: ContactNameProps): JSX.Element;
|
|
6
|
+
|
|
7
|
+
export declare namespace ContactName {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export declare type ContactNameProps = PropsWithChildren<{
|
|
12
|
+
/** Additional classes to apply to the name */
|
|
13
|
+
className?: string;
|
|
14
|
+
}>;
|
|
15
|
+
|
|
16
|
+
export { }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { twMerge as m } from "tailwind-merge";
|
|
3
|
+
function n({ children: t, className: o }) {
|
|
4
|
+
const a = m("tw:text-body-copy-bold tw:font-bold", o);
|
|
5
|
+
return /* @__PURE__ */ e("span", { className: a, children: t });
|
|
6
|
+
}
|
|
7
|
+
n.displayName = "ContactName";
|
|
8
|
+
export {
|
|
9
|
+
n as ContactName
|
|
10
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/** The ContactPhone component is used to display a phone number. */
|
|
4
|
+
export declare function ContactPhone({ number, extension, className }: ContactPhoneProps): JSX.Element;
|
|
5
|
+
|
|
6
|
+
export declare namespace ContactPhone {
|
|
7
|
+
var displayName: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export declare type ContactPhoneProps = {
|
|
11
|
+
/** Additional classes to apply to the phone number */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** The phone number to display */
|
|
14
|
+
number: string;
|
|
15
|
+
/** The phone number extension to display */
|
|
16
|
+
extension?: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { d as a } from "./solid-DM6GVhkF.js";
|
|
3
|
+
import { FontAwesomeIcon as l } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { twMerge as f } from "tailwind-merge";
|
|
5
|
+
import { tv as m } from "tailwind-variants";
|
|
6
|
+
function w({ number: t, extension: o, className: i }) {
|
|
7
|
+
const r = m({
|
|
8
|
+
slots: {
|
|
9
|
+
container: "tw:flex tw:items-center tw:gap-1",
|
|
10
|
+
link: "tw:underline tw:decoration-current tw:hocus-visible:decoration-transparent tw:transition-colors tw:text-body-copy-link-on-light tw:focus-visible:ring-2 tw:focus-visible:ring-offset-2 tw:focus-visible:outline-none"
|
|
11
|
+
}
|
|
12
|
+
}), { container: s, link: c } = r();
|
|
13
|
+
return /* @__PURE__ */ n("div", { className: f(s(), i), children: [
|
|
14
|
+
/* @__PURE__ */ e(l, { icon: a }),
|
|
15
|
+
/* @__PURE__ */ e("a", { className: c(), href: `tel:${t}`, children: t }),
|
|
16
|
+
o && /* @__PURE__ */ n("span", { children: [
|
|
17
|
+
" - Ext. ",
|
|
18
|
+
o
|
|
19
|
+
] })
|
|
20
|
+
] });
|
|
21
|
+
}
|
|
22
|
+
w.displayName = "ContactPhone";
|
|
23
|
+
export {
|
|
24
|
+
w as ContactPhone
|
|
25
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
/** The ContactTitle component is used to display a title for a contact. */
|
|
5
|
+
export declare function ContactTitle({ children, className }: ContactTitleProps): JSX.Element;
|
|
6
|
+
|
|
7
|
+
export declare namespace ContactTitle {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export declare type ContactTitleProps = PropsWithChildren<{
|
|
12
|
+
/** Additional classes to apply to the title */
|
|
13
|
+
className?: string;
|
|
14
|
+
}>;
|
|
15
|
+
|
|
16
|
+
export { }
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { twMerge as a } from "tailwind-merge";
|
|
3
|
+
function i({ children: t, className: o }) {
|
|
4
|
+
const e = a("tw:text-body-copy", o);
|
|
5
|
+
return /* @__PURE__ */ r("span", { className: e, children: t });
|
|
6
|
+
}
|
|
7
|
+
i.displayName = "ContactTitle";
|
|
8
|
+
export {
|
|
9
|
+
i as ContactTitle
|
|
10
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The Contact component is a container used to group contact information like name, title, phone number, and email
|
|
6
|
+
* address in a styled, organized layout
|
|
7
|
+
*/
|
|
8
|
+
export declare function Contact({ children, className }: ContactProps): JSX.Element;
|
|
9
|
+
|
|
10
|
+
export declare namespace Contact {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** The ContactEmail component is used to display an email address. */
|
|
15
|
+
export declare function ContactEmail({ email, className }: ContactEmailProps): JSX.Element;
|
|
16
|
+
|
|
17
|
+
export declare namespace ContactEmail {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare type ContactEmailProps = {
|
|
22
|
+
/** Additional classes to apply to the email */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** The email address to display */
|
|
25
|
+
email: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** The ContactName component is used to display the name of a contact. */
|
|
29
|
+
export declare function ContactName({ children, className }: ContactNameProps): JSX.Element;
|
|
30
|
+
|
|
31
|
+
export declare namespace ContactName {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare type ContactNameProps = PropsWithChildren<{
|
|
36
|
+
/** Additional classes to apply to the name */
|
|
37
|
+
className?: string;
|
|
38
|
+
}>;
|
|
39
|
+
|
|
40
|
+
/** The ContactPhone component is used to display a phone number. */
|
|
41
|
+
export declare function ContactPhone({ number, extension, className }: ContactPhoneProps): JSX.Element;
|
|
42
|
+
|
|
43
|
+
export declare namespace ContactPhone {
|
|
44
|
+
var displayName: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare type ContactPhoneProps = {
|
|
48
|
+
/** Additional classes to apply to the phone number */
|
|
49
|
+
className?: string;
|
|
50
|
+
/** The phone number to display */
|
|
51
|
+
number: string;
|
|
52
|
+
/** The phone number extension to display */
|
|
53
|
+
extension?: string;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export declare type ContactProps = PropsWithChildren<{
|
|
57
|
+
/** Additional classes to apply to the contact */
|
|
58
|
+
className?: string;
|
|
59
|
+
}>;
|
|
60
|
+
|
|
61
|
+
/** The ContactTitle component is used to display a title for a contact. */
|
|
62
|
+
export declare function ContactTitle({ children, className }: ContactTitleProps): JSX.Element;
|
|
63
|
+
|
|
64
|
+
export declare namespace ContactTitle {
|
|
65
|
+
var displayName: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare type ContactTitleProps = PropsWithChildren<{
|
|
69
|
+
/** Additional classes to apply to the title */
|
|
70
|
+
className?: string;
|
|
71
|
+
}>;
|
|
72
|
+
|
|
73
|
+
export { }
|
package/dist/contact.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { twMerge as a } from "tailwind-merge";
|
|
3
|
+
import { ContactEmail as x } from "./contact-email.js";
|
|
4
|
+
import { ContactName as l } from "./contact-name.js";
|
|
5
|
+
import { ContactPhone as C } from "./contact-phone.js";
|
|
6
|
+
import { ContactTitle as s } from "./contact-title.js";
|
|
7
|
+
function c({ children: t, className: o }) {
|
|
8
|
+
const e = a("tw:bg-light-grey-bg tw:mb-2 tw:flex tw:flex-col tw:p-4 tw:text-body-copy", o);
|
|
9
|
+
return /* @__PURE__ */ r("div", { className: e, children: t });
|
|
10
|
+
}
|
|
11
|
+
c.displayName = "Contact";
|
|
12
|
+
export {
|
|
13
|
+
c as Contact,
|
|
14
|
+
x as ContactEmail,
|
|
15
|
+
l as ContactName,
|
|
16
|
+
C as ContactPhone,
|
|
17
|
+
s as ContactTitle
|
|
18
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
|
+
import { PropsWithChildren } from 'react';
|
|
5
|
+
|
|
6
|
+
/** The Container component is a layout component that wraps content and applies padding and max-width styles. */
|
|
7
|
+
export declare function Container<T extends ElementType = typeof defaultElement>({ as, centered, children, className, ...rest }: ContainerProps<T>): JSX.Element;
|
|
8
|
+
|
|
9
|
+
export declare namespace Container {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export declare type ContainerProps<T extends ElementType = typeof defaultElement> = PropsWithChildren<ContainerPropsAs<T> & ComponentPropsWithoutRef<T> & ContainerPropsBase>;
|
|
14
|
+
|
|
15
|
+
declare type ContainerPropsAs<T extends ElementType> = {
|
|
16
|
+
as?: T;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
declare type ContainerPropsBase = {
|
|
20
|
+
/**
|
|
21
|
+
* Whether the container content should be horizontally centered
|
|
22
|
+
*
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
centered?: boolean;
|
|
26
|
+
/** Additional classes to apply to the container */
|
|
27
|
+
className?: string;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
declare const defaultElement = "div";
|
|
31
|
+
|
|
32
|
+
export { }
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { twMerge as s } from "tailwind-merge";
|
|
3
|
+
import { tv as w } from "tailwind-variants";
|
|
4
|
+
const c = "div";
|
|
5
|
+
function p({
|
|
6
|
+
as: t,
|
|
7
|
+
centered: e = !1,
|
|
8
|
+
children: n,
|
|
9
|
+
className: o,
|
|
10
|
+
...r
|
|
11
|
+
}) {
|
|
12
|
+
const a = t ?? c, m = w({
|
|
13
|
+
base: "tw:max-w-[--tw-max-content-width] tw:container tw:px-4 tw:pt-2 tw:pb-4",
|
|
14
|
+
variants: {
|
|
15
|
+
centered: {
|
|
16
|
+
true: "tw:mx-auto"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
return /* @__PURE__ */ i(a, { ...r, className: s(m({ centered: e }), o), children: n });
|
|
21
|
+
}
|
|
22
|
+
p.displayName = "Container";
|
|
23
|
+
export {
|
|
24
|
+
p as Container
|
|
25
|
+
};
|
package/dist/divider.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsxs as e, Fragment as c, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { tv as d } from "tailwind-variants";
|
|
3
|
+
const b = () => {
|
|
4
|
+
const s = d({
|
|
5
|
+
slots: {
|
|
6
|
+
base: "tw:mx-auto tw:my-7 tw:h-1 tw:w-3/4 tw:border-0 tw:flex",
|
|
7
|
+
red: "tw:bg-red",
|
|
8
|
+
yellow: "tw:bg-yellow",
|
|
9
|
+
black: "tw:bg-black",
|
|
10
|
+
hr: "tw:border-0"
|
|
11
|
+
},
|
|
12
|
+
compoundSlots: [
|
|
13
|
+
{
|
|
14
|
+
slots: ["red", "yellow", "black"],
|
|
15
|
+
class: "tw:flex-1 tw:h-full"
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}), { base: t, red: r, yellow: o, black: a, hr: w } = s();
|
|
19
|
+
return /* @__PURE__ */ e(c, { children: [
|
|
20
|
+
/* @__PURE__ */ e("div", { className: t(), children: [
|
|
21
|
+
/* @__PURE__ */ l("div", { className: a() }),
|
|
22
|
+
/* @__PURE__ */ l("div", { className: r() }),
|
|
23
|
+
/* @__PURE__ */ l("div", { className: o() })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ l("hr", { className: w() })
|
|
26
|
+
] });
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
b as Divider
|
|
30
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
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 type ButtonElementType = ElementType<{
|
|
7
|
+
href?: string;
|
|
8
|
+
}, 'a'> | 'button';
|
|
9
|
+
|
|
10
|
+
declare type ButtonProps<T extends ButtonElementType = typeof defaultElement> = PropsWithChildren<ButtonPropsAs<T> & ComponentPropsWithoutRef<T> & ButtonPropsBase>;
|
|
11
|
+
|
|
12
|
+
declare type ButtonPropsAs<T extends ButtonElementType> = {
|
|
13
|
+
as?: T;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
declare type ButtonPropsBase = {
|
|
17
|
+
/**
|
|
18
|
+
* The color of the button
|
|
19
|
+
*
|
|
20
|
+
* @default 'red'
|
|
21
|
+
*/
|
|
22
|
+
color?: 'red' | 'yellow' | 'blue' | 'green' | 'light-grey' | 'dark-grey' | 'black' | 'white';
|
|
23
|
+
/**
|
|
24
|
+
* Whether the button should be outlined
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
outlined?: boolean;
|
|
29
|
+
/** Additional classes to apply to the button */
|
|
30
|
+
className?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the button is disabled
|
|
33
|
+
*
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
declare const defaultElement = "button";
|
|
40
|
+
|
|
41
|
+
export declare function EmbeddedVideoModalButton({ type, children, className }: EmbeddedVideoModalButtonProps): JSX.Element;
|
|
42
|
+
|
|
43
|
+
export declare namespace EmbeddedVideoModalButton {
|
|
44
|
+
var displayName: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
declare type EmbeddedVideoModalButtonProps = PropsWithChildren<{
|
|
48
|
+
/** The type of button to render, either a play button or a color which will be passed to a Button component */
|
|
49
|
+
type: 'play-button' | ButtonProps['color'];
|
|
50
|
+
/** Additional classes to apply to the button */
|
|
51
|
+
className?: string;
|
|
52
|
+
}>;
|
|
53
|
+
|
|
54
|
+
export { }
|