@uoguelph/react-components 1.6.0-rc.9 → 1.6.1-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/dist/accordion.js +12 -12
- package/dist/components/accordion/accordion.d.ts +2 -1
- package/dist/embedded-video.js +10 -10
- package/package.json +2 -2
package/dist/accordion.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { Disclosure as
|
|
4
|
-
import { twMerge as
|
|
5
|
-
import { AccordionContext as
|
|
6
|
-
import { AccordionButton as
|
|
7
|
-
import { AccordionContent as
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
return /* @__PURE__ */ o(
|
|
3
|
+
import { Disclosure as e } from "@headlessui/react";
|
|
4
|
+
import { twMerge as m } from "tailwind-merge";
|
|
5
|
+
import { AccordionContext as d } from "./accordion-context.js";
|
|
6
|
+
import { AccordionButton as A } from "./accordion-button.js";
|
|
7
|
+
import { AccordionContent as v } from "./accordion-content.js";
|
|
8
|
+
function p({ id: r, children: c, className: i }) {
|
|
9
|
+
const n = m("my-2 [&_p:last-child]:mb-0", i);
|
|
10
|
+
return /* @__PURE__ */ o(e, { children: ({ open: t }) => /* @__PURE__ */ o("div", { id: r, className: `uofg-accordion ${n}`, children: /* @__PURE__ */ o(d.Provider, { value: { isOpen: t }, children: c }) }) });
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
p.displayName = "Accordion";
|
|
13
13
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
p as Accordion,
|
|
15
|
+
A as AccordionButton,
|
|
16
|
+
v as AccordionContent
|
|
17
17
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
export type AccordionProps = PropsWithChildren<{
|
|
3
|
+
id?: string;
|
|
3
4
|
/** Additional classes to apply to the accordion. */
|
|
4
5
|
className?: string;
|
|
5
6
|
}>;
|
|
@@ -7,7 +8,7 @@ export type AccordionProps = PropsWithChildren<{
|
|
|
7
8
|
* The Accordion component is used for organizing information into collapsible sections which respond to user
|
|
8
9
|
* interaction.
|
|
9
10
|
*/
|
|
10
|
-
export declare function Accordion({ children, className }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function Accordion({ id, children, className }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export declare namespace Accordion {
|
|
12
13
|
var displayName: string;
|
|
13
14
|
}
|
package/dist/embedded-video.js
CHANGED
|
@@ -45,7 +45,7 @@ function N(l) {
|
|
|
45
45
|
return { type: e, id: t };
|
|
46
46
|
}
|
|
47
47
|
function u({ src: l, title: e, transcript: t, className: o }) {
|
|
48
|
-
const { id:
|
|
48
|
+
const { id: d, type: i } = N(l), r = b({
|
|
49
49
|
slots: {
|
|
50
50
|
base: f("flex flex-col", o),
|
|
51
51
|
iframe: "aspect-video h-full w-full",
|
|
@@ -53,30 +53,30 @@ function u({ src: l, title: e, transcript: t, className: o }) {
|
|
|
53
53
|
}
|
|
54
54
|
}), { base: a, iframe: s, transcriptButton: c } = r();
|
|
55
55
|
return /* @__PURE__ */ m("div", { className: a(), children: [
|
|
56
|
-
|
|
56
|
+
i === "youtube" && d && /* @__PURE__ */ n(
|
|
57
57
|
"iframe",
|
|
58
58
|
{
|
|
59
59
|
className: s(),
|
|
60
60
|
allowFullScreen: !0,
|
|
61
|
-
src: `https://www.youtube.com/embed/${
|
|
61
|
+
src: `https://www.youtube.com/embed/${d}`,
|
|
62
62
|
title: e ?? "YouTube Embedded Video Player"
|
|
63
63
|
}
|
|
64
64
|
),
|
|
65
|
-
|
|
65
|
+
i === "vimeo" && d && /* @__PURE__ */ n(
|
|
66
66
|
"iframe",
|
|
67
67
|
{
|
|
68
68
|
className: s(),
|
|
69
69
|
allowFullScreen: !0,
|
|
70
|
-
src: `https://player.vimeo.com/video/${
|
|
70
|
+
src: `https://player.vimeo.com/video/${d}`,
|
|
71
71
|
title: e ?? "Vimeo Embedded Video Player"
|
|
72
72
|
}
|
|
73
73
|
),
|
|
74
74
|
t && /* @__PURE__ */ n(h, { as: "a", color: "black", className: c(), href: t, download: !0, children: "Download Transcript" })
|
|
75
75
|
] });
|
|
76
76
|
}
|
|
77
|
-
function E({ src: l, title: e, transcript: t, className: o, children:
|
|
78
|
-
const [
|
|
79
|
-
if (
|
|
77
|
+
function E({ src: l, title: e, transcript: t, className: o, children: d }) {
|
|
78
|
+
const [i, r] = g(!1);
|
|
79
|
+
if (d) {
|
|
80
80
|
const a = b({
|
|
81
81
|
slots: {
|
|
82
82
|
container: "flex w-screen max-w-6xl flex-col gap-4 bg-grey-dark-bg p-4 text-grey-dark-contrast lg:max-w-7xl",
|
|
@@ -85,8 +85,8 @@ function E({ src: l, title: e, transcript: t, className: o, children: i }) {
|
|
|
85
85
|
}
|
|
86
86
|
}), { container: s, video: c, title: p } = a();
|
|
87
87
|
return /* @__PURE__ */ m(w, { children: [
|
|
88
|
-
/* @__PURE__ */ n(y.Provider, { value: { modalOpen:
|
|
89
|
-
/* @__PURE__ */ n(x, { open:
|
|
88
|
+
/* @__PURE__ */ n(y.Provider, { value: { modalOpen: i, setModalOpen: r }, children: d }),
|
|
89
|
+
/* @__PURE__ */ n(x, { open: i, onClose: () => r(!1), centered: !0, children: /* @__PURE__ */ m("div", { className: `uofg-embedded-video-container ${s()}`, children: [
|
|
90
90
|
/* @__PURE__ */ n("span", { className: `uofg-embedded-video-title ${p()}`, children: e }),
|
|
91
91
|
/* @__PURE__ */ n(
|
|
92
92
|
u,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uoguelph/react-components",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.1-rc.0",
|
|
4
4
|
"description": "University of Guelph React Components Library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"bugs": {
|
|
79
79
|
"url": "https://github.com/ccswbs/uofg-components/issues"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "192b96deff904832b05759997eec1c3d222ca4a2"
|
|
82
82
|
}
|