@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.
@@ -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 x, jsx as e } from "react/jsx-runtime";
3
- import { tv as d } from "tailwind-variants";
4
- import { HeroCaption as k } from "./hero-caption.js";
5
- import { HeroContent as g } from "./hero-content.js";
6
- import { HeroContext as v } from "./hero-context.js";
7
- import { HeroLink as E } from "./hero-link.js";
8
- import { HeroTitle as L } from "./hero-title.js";
9
- import { HeroVideo as T } from "./hero-video.js";
10
- const u = "img";
11
- function H({
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: a,
16
- width: i,
17
- height: m,
16
+ alt: i,
17
+ width: m,
18
+ height: a,
18
19
  alignment: s,
19
20
  children: l,
20
- ...c
21
+ className: c,
22
+ ...f
21
23
  }) {
22
- const f = r ?? u, n = d({
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: p, image: h } = n({ variant: o });
40
- return /* @__PURE__ */ x("div", { className: `uofg-hero ${p()}`, children: [
41
- /* @__PURE__ */ e(f, { ...c, src: t, alt: a, width: i, height: m, className: `uofg-hero-img ${h()}` }),
42
- /* @__PURE__ */ e(v.Provider, { value: { variant: o }, children: /* @__PURE__ */ e(g, { alignment: s, children: l }) })
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
- H.displayName = "Hero";
47
+ w.displayName = "Hero";
46
48
  export {
47
- H as Hero,
48
- k as HeroCaption,
49
- g as HeroContent,
50
- E as HeroLink,
51
- L as HeroTitle,
52
- T as HeroVideo
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": "ce2ef021d35ca523de77ee3b869b5c599edd3f34"
79
+ "gitHead": "993ee71371c77b34040f9fd7f3b508b92a0993b0"
80
80
  }