@uoguelph/react-components 1.4.0 → 1.4.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/components/hero/hero.d.ts +1 -1
- package/dist/hero.js +28 -26
- package/package.json +2 -2
|
@@ -35,7 +35,7 @@ export type HeroProps<T extends HeroElementType = typeof defaultElement> = Props
|
|
|
35
35
|
alignment?: 'left' | 'center' | 'right' | 'fullWidth';
|
|
36
36
|
} & ComponentPropsWithoutRef<T>>;
|
|
37
37
|
/** The Hero component is a layout component that displays a large image with accompanying content. */
|
|
38
|
-
export declare function Hero<T extends HeroElementType = typeof defaultElement>({ as, variant, src, alt, width, height, alignment, children, ...rest }: HeroProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare function Hero<T extends HeroElementType = typeof defaultElement>({ as, variant, src, alt, width, height, alignment, children, className, ...rest }: HeroProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
export declare namespace Hero {
|
|
40
40
|
var displayName: string;
|
|
41
41
|
}
|
package/dist/hero.js
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { twMerge as d } from "tailwind-merge";
|
|
4
|
+
import { tv as v } from "tailwind-variants";
|
|
5
|
+
import { HeroCaption as I } from "./hero-caption.js";
|
|
6
|
+
import { HeroContent as u } from "./hero-content.js";
|
|
7
|
+
import { HeroContext as H } from "./hero-context.js";
|
|
8
|
+
import { HeroLink as M } from "./hero-link.js";
|
|
9
|
+
import { HeroTitle as T } from "./hero-title.js";
|
|
10
|
+
import { HeroVideo as q } from "./hero-video.js";
|
|
11
|
+
const b = "img";
|
|
12
|
+
function w({
|
|
12
13
|
as: r,
|
|
13
14
|
variant: o = "basic",
|
|
14
15
|
src: t,
|
|
15
|
-
alt:
|
|
16
|
-
width:
|
|
17
|
-
height:
|
|
16
|
+
alt: i,
|
|
17
|
+
width: m,
|
|
18
|
+
height: a,
|
|
18
19
|
alignment: s,
|
|
19
20
|
children: l,
|
|
20
|
-
|
|
21
|
+
className: c,
|
|
22
|
+
...f
|
|
21
23
|
}) {
|
|
22
|
-
const
|
|
24
|
+
const n = r ?? b, p = v({
|
|
23
25
|
slots: {
|
|
24
26
|
base: "relative flex w-full flex-col overflow-hidden",
|
|
25
27
|
image: "aspect-[16/9] w-full object-cover md:aspect-[2.625]"
|
|
@@ -36,18 +38,18 @@ function H({
|
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
}
|
|
39
|
-
}), { base:
|
|
40
|
-
return /* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */ e(
|
|
42
|
-
/* @__PURE__ */ e(
|
|
41
|
+
}), { base: h, image: x } = p({ variant: o });
|
|
42
|
+
return /* @__PURE__ */ g("div", { className: `uofg-hero ${d(h(), c)}`, children: [
|
|
43
|
+
/* @__PURE__ */ e(n, { ...f, src: t, alt: i, width: m, height: a, className: `uofg-hero-img ${x()}` }),
|
|
44
|
+
/* @__PURE__ */ e(H.Provider, { value: { variant: o }, children: /* @__PURE__ */ e(u, { alignment: s, children: l }) })
|
|
43
45
|
] });
|
|
44
46
|
}
|
|
45
|
-
|
|
47
|
+
w.displayName = "Hero";
|
|
46
48
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
w as Hero,
|
|
50
|
+
I as HeroCaption,
|
|
51
|
+
u as HeroContent,
|
|
52
|
+
M as HeroLink,
|
|
53
|
+
T as HeroTitle,
|
|
54
|
+
q as HeroVideo
|
|
53
55
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uoguelph/react-components",
|
|
3
|
-
"version": "1.4.0",
|
|
3
|
+
"version": "1.4.1-rc.0",
|
|
4
4
|
"description": "University of Guelph React Components Library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"bugs": {
|
|
77
77
|
"url": "https://github.com/ccswbs/uofg-components/issues"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "993ee71371c77b34040f9fd7f3b508b92a0993b0"
|
|
80
80
|
}
|