@uoguelph/react-components 1.2.1 → 1.2.3
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/dist/accordion-button.js +1 -1
- package/dist/alert-title.js +4 -4
- package/dist/blockquote-content.js +1 -1
- package/dist/breadcrumb-home.js +6 -6
- package/dist/breadcrumb.js +5 -5
- package/dist/carousel.js +1 -1
- package/dist/checkbox.js +7 -7
- package/dist/components/dismissible-alert/dismissible-alert.d.ts +10 -0
- package/dist/components/footer/footer-link.d.ts +6 -0
- package/dist/components/footer/footer.d.ts +15 -0
- package/dist/components/header/header-link.d.ts +6 -0
- package/dist/components/header/header-menu-item.d.ts +3 -0
- package/dist/components/header/header-menu.d.ts +6 -0
- package/dist/components/header/header.d.ts +28 -0
- package/dist/components/layout/layout-content.d.ts +12 -0
- package/dist/components/layout/layout.d.ts +13 -0
- package/dist/components/loading-indicator/loading-indicator.d.ts +4 -3
- package/dist/components/select/select-button.d.ts +10 -0
- package/dist/components/select/select-option.d.ts +10 -0
- package/dist/components/select/select-options.d.ts +10 -0
- package/dist/components/select/select.d.ts +7 -0
- package/dist/contact-email.js +1 -1
- package/dist/contact-phone.js +1 -1
- package/dist/dismissible-alert.d.ts +2 -0
- package/dist/dismissible-alert.js +827 -0
- package/dist/embedded-video-modal-button.js +8 -8
- package/dist/footer-link.d.ts +2 -0
- package/dist/footer-link.js +7 -0
- package/dist/footer.d.ts +2 -0
- package/dist/footer.js +9 -0
- package/dist/header-link.d.ts +2 -0
- package/dist/header-link.js +7 -0
- package/dist/header-menu-item.d.ts +2 -0
- package/dist/header-menu-item.js +7 -0
- package/dist/header-menu.d.ts +2 -0
- package/dist/header-menu.js +7 -0
- package/dist/header.d.ts +2 -0
- package/dist/header.js +13 -0
- package/dist/hero-video.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +25 -11
- package/dist/layout-content.d.ts +2 -0
- package/dist/layout-content.js +10 -0
- package/dist/layout.d.ts +2 -0
- package/dist/layout.js +55 -0
- package/dist/loading-indicator.js +28 -39
- package/dist/modal.js +1 -1
- package/dist/{regular-BRNZck7j.js → regular-23gOebKJ.js} +5 -5
- package/dist/select-button.d.ts +2 -0
- package/dist/select-button.js +40 -0
- package/dist/select-option.d.ts +2 -0
- package/dist/select-option.js +48 -0
- package/dist/select-options.d.ts +2 -0
- package/dist/select-options.js +31 -0
- package/dist/select.d.ts +2 -0
- package/dist/select.js +9 -0
- package/dist/{solid-DM6GVhkF.js → solid-D4xgBves.js} +16 -5
- package/dist/statistics.js +27 -37
- package/dist/text-input.js +1 -1
- package/dist/use-dismissible-CWEoUQGp.js +26 -0
- package/dist/use-resize-observer-DmddO4OQ.js +15 -0
- package/dist/utils/use-dismissible.d.ts +5 -0
- package/package.json +4 -2
package/dist/accordion-button.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { f as g, a as c } from "./regular-
|
|
2
|
+
import { f as g, a as c } from "./regular-23gOebKJ.js";
|
|
3
3
|
import { FontAwesomeIcon as l } from "@fortawesome/react-fontawesome";
|
|
4
4
|
import { DisclosureButton as a } from "@headlessui/react";
|
|
5
5
|
import { useContext as b } from "react";
|
package/dist/alert-title.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { g as l } from "./regular-23gOebKJ.js";
|
|
3
3
|
import { FontAwesomeIcon as u } from "@fortawesome/react-fontawesome";
|
|
4
4
|
import { twMerge as s } from "tailwind-merge";
|
|
5
5
|
import { tv as m } from "tailwind-variants";
|
|
6
6
|
function x({ color: e = "red", className: o, children: r }) {
|
|
7
|
-
const
|
|
7
|
+
const g = m({
|
|
8
8
|
slots: {
|
|
9
9
|
container: "uog:flex uog:items-center uog:gap-2 uog:p-4 uog:text-xl",
|
|
10
10
|
icon: "uog:h-[1.5em]",
|
|
@@ -38,8 +38,8 @@ function x({ color: e = "red", className: o, children: r }) {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
}), { container:
|
|
42
|
-
return /* @__PURE__ */ c("div", { className: `uofg-alert-title-container ${s(
|
|
41
|
+
}), { container: n, icon: a, text: i } = g({ color: e });
|
|
42
|
+
return /* @__PURE__ */ c("div", { className: `uofg-alert-title-container ${s(n(), o)}`, children: [
|
|
43
43
|
/* @__PURE__ */ t(u, { className: `uofg-alert-title-icon ${a()}`, icon: l }),
|
|
44
44
|
/* @__PURE__ */ t("div", { className: `uofg-alert-title ${i()}`, children: r })
|
|
45
45
|
] });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { f as r, a as m } from "./solid-
|
|
2
|
+
import { f as r, a as m } from "./solid-D4xgBves.js";
|
|
3
3
|
import { FontAwesomeIcon as c } from "@fortawesome/react-fontawesome";
|
|
4
4
|
import { useContext as a } from "react";
|
|
5
5
|
import { twMerge as g } from "tailwind-merge";
|
package/dist/breadcrumb-home.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { FontAwesomeIcon as
|
|
1
|
+
import { jsx as o, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { b as a } from "./regular-23gOebKJ.js";
|
|
3
|
+
import { FontAwesomeIcon as c } from "@fortawesome/react-fontawesome";
|
|
4
4
|
import { twJoin as s } from "tailwind-merge";
|
|
5
5
|
function l({
|
|
6
6
|
href: r = "/",
|
|
@@ -9,9 +9,9 @@ function l({
|
|
|
9
9
|
className: e,
|
|
10
10
|
...m
|
|
11
11
|
}) {
|
|
12
|
-
const
|
|
13
|
-
return /* @__PURE__ */ o("li", { children: /* @__PURE__ */
|
|
14
|
-
/* @__PURE__ */ o(
|
|
12
|
+
const i = s("uog:h-[1em] uog:fill-black");
|
|
13
|
+
return /* @__PURE__ */ o("li", { children: /* @__PURE__ */ n("a", { ...m, href: r, className: e, children: [
|
|
14
|
+
/* @__PURE__ */ o(c, { icon: a, className: i }),
|
|
15
15
|
/* @__PURE__ */ o("span", { className: "uog:sr-only", children: "U of G Homepage" })
|
|
16
16
|
] }) });
|
|
17
17
|
}
|
package/dist/breadcrumb.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { FontAwesomeIcon as
|
|
4
|
-
import { twMerge as
|
|
2
|
+
import { c as g } from "./regular-23gOebKJ.js";
|
|
3
|
+
import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
|
|
4
|
+
import { twMerge as d } from "tailwind-merge";
|
|
5
5
|
import { tv as f } from "tailwind-variants";
|
|
6
6
|
const b = "a";
|
|
7
7
|
function x({
|
|
@@ -19,8 +19,8 @@ function x({
|
|
|
19
19
|
}
|
|
20
20
|
}), { container: s, icon: m, link: u } = i();
|
|
21
21
|
return /* @__PURE__ */ l("li", { className: s(), children: [
|
|
22
|
-
/* @__PURE__ */ o(
|
|
23
|
-
r ? /* @__PURE__ */ o(c, { ...a, className:
|
|
22
|
+
/* @__PURE__ */ o(p, { icon: g, className: m() }),
|
|
23
|
+
r ? /* @__PURE__ */ o(c, { ...a, className: d(u(), t), href: r, children: n }) : /* @__PURE__ */ o("span", { children: n })
|
|
24
24
|
] });
|
|
25
25
|
}
|
|
26
26
|
x.displayName = "Breadcrumb";
|
package/dist/carousel.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as g, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { b as k, c as I } from "./solid-
|
|
2
|
+
import { b as k, c as I } from "./solid-D4xgBves.js";
|
|
3
3
|
import { FontAwesomeIcon as p } from "@fortawesome/react-fontawesome";
|
|
4
4
|
import { Children as A, useRef as d, useState as F, useEffect as L } from "react";
|
|
5
5
|
import { tv as S } from "tailwind-variants";
|
package/dist/checkbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { d as p } from "./regular-23gOebKJ.js";
|
|
3
3
|
import { FontAwesomeIcon as y } from "@fortawesome/react-fontawesome";
|
|
4
4
|
import { Field as w, Checkbox as v, Label as N, Description as C } from "@headlessui/react";
|
|
5
5
|
import { useState as j } from "react";
|
|
@@ -56,9 +56,9 @@ function z({
|
|
|
56
56
|
}), {
|
|
57
57
|
base: h,
|
|
58
58
|
container: x,
|
|
59
|
-
box:
|
|
60
|
-
check:
|
|
61
|
-
label:
|
|
59
|
+
box: d,
|
|
60
|
+
check: f,
|
|
61
|
+
label: k,
|
|
62
62
|
description: m
|
|
63
63
|
} = b({ color: r, disabled: s });
|
|
64
64
|
return /* @__PURE__ */ i(w, { className: h(), children: [
|
|
@@ -71,12 +71,12 @@ function z({
|
|
|
71
71
|
n(u), o == null || o(u);
|
|
72
72
|
},
|
|
73
73
|
disabled: s,
|
|
74
|
-
className:
|
|
74
|
+
className: d(),
|
|
75
75
|
...l,
|
|
76
|
-
children: /* @__PURE__ */ e(y, { className:
|
|
76
|
+
children: /* @__PURE__ */ e(y, { className: f(), icon: p })
|
|
77
77
|
}
|
|
78
78
|
),
|
|
79
|
-
c && /* @__PURE__ */ e(N, { className:
|
|
79
|
+
c && /* @__PURE__ */ e(N, { className: k(), children: c })
|
|
80
80
|
] }),
|
|
81
81
|
t && /* @__PURE__ */ e(C, { className: m(), children: t })
|
|
82
82
|
] });
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type AlertObject = {
|
|
2
|
+
title: string;
|
|
3
|
+
description: string;
|
|
4
|
+
timestamp: string;
|
|
5
|
+
};
|
|
6
|
+
export type DismissibleAlertProps = {
|
|
7
|
+
/** Whether to use the testing app armor test ID */
|
|
8
|
+
alert?: AlertObject;
|
|
9
|
+
};
|
|
10
|
+
export declare function DismissibleAlert({ alert }: DismissibleAlertProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
+
export type FooterLinkProps = PropsWithChildren<{
|
|
3
|
+
/** The URL for the header link */
|
|
4
|
+
href?: string;
|
|
5
|
+
} & HTMLAttributes<HTMLAnchorElement>>;
|
|
6
|
+
export declare function FooterLink({ href, children, ...rest }: FooterLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
+
declare module 'react/jsx-runtime' {
|
|
3
|
+
namespace JSX {
|
|
4
|
+
interface IntrinsicElements {
|
|
5
|
+
'uofg-footer': HTMLAttributes<any>;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export type FooterProps = PropsWithChildren<{}>;
|
|
10
|
+
/**
|
|
11
|
+
* A React component wrapper for the footer component from the uoguelph/web-components package, as such that package
|
|
12
|
+
* must be included in your page for this to function correctly.
|
|
13
|
+
*/
|
|
14
|
+
export declare function Footer({ children }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { FooterLink } from './footer-link';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
+
export type HeaderLinkProps = PropsWithChildren<{
|
|
3
|
+
/** The URL for the header link */
|
|
4
|
+
href?: string;
|
|
5
|
+
} & HTMLAttributes<HTMLAnchorElement>>;
|
|
6
|
+
export declare function HeaderLink({ href, children, ...rest }: HeaderLinkProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
+
export type HeaderMenuProps = PropsWithChildren<{
|
|
3
|
+
/** The title of the header menu */
|
|
4
|
+
title: string;
|
|
5
|
+
} & HTMLAttributes<any>>;
|
|
6
|
+
export declare function HeaderMenu({ title, children, ...rest }: HeaderMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
+
declare module 'react/jsx-runtime' {
|
|
3
|
+
namespace JSX {
|
|
4
|
+
interface IntrinsicElements {
|
|
5
|
+
'uofg-header': {
|
|
6
|
+
'variant'?: string;
|
|
7
|
+
'page-title'?: string;
|
|
8
|
+
'page-url'?: string;
|
|
9
|
+
} & HTMLAttributes<any>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export type HeaderProps = PropsWithChildren<{
|
|
14
|
+
/** The title of the department or topic the page which contains the header belongs to */
|
|
15
|
+
title?: string;
|
|
16
|
+
/** The URL to the home page of the department or topic this page belongs to */
|
|
17
|
+
url?: string;
|
|
18
|
+
/** The variant of the header */
|
|
19
|
+
variant?: 'dual-brand';
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* A React component wrapper for the header component from the uoguelph/web-components package, as such that package
|
|
23
|
+
* must be included in your page for this to function correctly.
|
|
24
|
+
*/
|
|
25
|
+
export declare function Header({ title, url, variant, children }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export { HeaderLink } from './header-link';
|
|
27
|
+
export { HeaderMenu } from './header-menu';
|
|
28
|
+
export { HeaderMenuItem } from './header-menu-item';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export type LayoutContentProps = PropsWithChildren<{
|
|
3
|
+
/** Additional classes to apply to the component. */
|
|
4
|
+
className?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Whether the content should be rendered as a Container component.
|
|
7
|
+
*
|
|
8
|
+
* @default true
|
|
9
|
+
*/
|
|
10
|
+
container?: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function LayoutContent({ children, className, container }: LayoutContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export type LayoutProps = PropsWithChildren<{
|
|
3
|
+
/**
|
|
4
|
+
* Whether the content of the layout should be hidden, and a loading indicator should be shown in its place. If set to
|
|
5
|
+
* a string, it will be used as the message displayed in the loading indicator
|
|
6
|
+
*/
|
|
7
|
+
loading?: boolean | string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function Layout({ children, loading }: LayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare namespace Layout {
|
|
11
|
+
var displayName: string;
|
|
12
|
+
}
|
|
13
|
+
export { LayoutContent } from './layout-content';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export type LoadingIndicatorProps = PropsWithChildren<{
|
|
2
3
|
/**
|
|
3
4
|
* The size of the loading indicator
|
|
4
5
|
*
|
|
@@ -13,6 +14,6 @@ export type LoadingIndicatorProps = {
|
|
|
13
14
|
color?: 'blue' | 'red' | 'green' | 'yellow';
|
|
14
15
|
/** Additional classes to add the loading indicator */
|
|
15
16
|
className?: string;
|
|
16
|
-
}
|
|
17
|
+
}>;
|
|
17
18
|
/** A component which can be used as a placeholder while content is loading */
|
|
18
|
-
export declare function LoadingIndicator({ size, color, className }: LoadingIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function LoadingIndicator({ size, color, className, children }: LoadingIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ListboxButtonProps } from '@headlessui/react';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
export type SelectButtonProps<T extends ElementType> = ListboxButtonProps<T> & {
|
|
4
|
+
/** Additional classes to apply to the component. */
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function SelectButton<T extends ElementType>({ children, className, ...rest }: SelectButtonProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace SelectButton {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ListboxOptionProps } from '@headlessui/react';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
export type SelectOptionProps<T extends ElementType> = ListboxOptionProps<T> & {
|
|
4
|
+
/** Additional classes to apply to the component. */
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function SelectOption<T extends ElementType>({ children, className, ...rest }: SelectOptionProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace SelectOption {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ListboxOptionsProps } from '@headlessui/react';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
export type SelectOptionsProps<T extends ElementType> = ListboxOptionsProps<T> & {
|
|
4
|
+
/** Additional classes to apply to the component. */
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function SelectOptions<T extends ElementType>({ children, className, ...rest }: SelectOptionsProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace SelectOptions {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ListboxProps } from '@headlessui/react';
|
|
2
|
+
import { ElementType } from 'react';
|
|
3
|
+
export type SelectProps<T extends ElementType> = ListboxProps<T>;
|
|
4
|
+
export declare function Select<T extends ElementType>({ children, ...rest }: SelectProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare namespace Select {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
package/dist/contact-email.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as s, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { e as c } from "./regular-23gOebKJ.js";
|
|
3
3
|
import { FontAwesomeIcon as a } from "@fortawesome/react-fontawesome";
|
|
4
4
|
import { twMerge as l } from "tailwind-merge";
|
|
5
5
|
import { tv as u } from "tailwind-variants";
|
package/dist/contact-phone.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { d as a } from "./solid-
|
|
2
|
+
import { d as a } from "./solid-D4xgBves.js";
|
|
3
3
|
import { FontAwesomeIcon as l } from "@fortawesome/react-fontawesome";
|
|
4
4
|
import { twMerge as u } from "tailwind-merge";
|
|
5
5
|
import { tv as g } from "tailwind-variants";
|