@uoguelph/react-components 1.6.0-rc.6 → 1.6.0-rc.8

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.
@@ -13,9 +13,9 @@ export type CardImageProps<T extends CardImageElementType = typeof defaultCardIm
13
13
  /** An accessible description of the image, used primarily for screen readers */
14
14
  alt: string;
15
15
  /** The width of the image in pixels */
16
- width?: string;
16
+ width?: `${number}` | number;
17
17
  /** The height of the image in pixels */
18
- height?: string;
18
+ height?: `${number}` | number;
19
19
  /** Additional classes to apply to the image */
20
20
  className?: string;
21
21
  } & ComponentPropsWithoutRef<T>;
@@ -24,9 +24,9 @@ export type HeroProps<T extends HeroElementType = typeof defaultElement> = Props
24
24
  /** The alt text for the image */
25
25
  alt: string;
26
26
  /** The width of the image in pixels */
27
- width?: number;
27
+ width?: `${number}` | number;
28
28
  /** The height of the image in pixels */
29
- height?: number;
29
+ height?: `${number}` | number;
30
30
  /**
31
31
  * The alignment of the hero content, only applies to the spotlight variant
32
32
  *
@@ -12,10 +12,10 @@ export type ImageOverlayProps<T extends ImageOverlayElementType = typeof default
12
12
  src: string;
13
13
  /** The image alt text. */
14
14
  alt: string;
15
- /** The image width in pixels. */
16
- width?: number;
17
- /** The image height in pixels. */
18
- height?: number;
15
+ /** The width of the image in pixels */
16
+ width?: `${number}` | number;
17
+ /** The height of the image in pixels */
18
+ height?: `${number}` | number;
19
19
  /** Additional classes to apply to the image. */
20
20
  className?: string;
21
21
  /**
@@ -13,9 +13,9 @@ export type StatisticsItemImageProps<T extends StatisticsItemImageElementType =
13
13
  /** An accessible description of the image, used primarily for screen readers */
14
14
  alt: string;
15
15
  /** The width of the image in pixels */
16
- width?: string;
16
+ width?: `${number}` | number;
17
17
  /** The height of the image in pixels */
18
- height?: string;
18
+ height?: `${number}` | number;
19
19
  /** Additional classes to apply to the image */
20
20
  className?: string;
21
21
  } & ComponentPropsWithoutRef<T>;
@@ -1,12 +1,13 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  export type StatisticsProps = PropsWithChildren<{
3
+ id: string;
3
4
  /** The variant of the statistics */
4
5
  variant: 'solid-colors-full' | 'solid-colors-no-gap' | 'solid-colors' | 'light-grey' | 'left-border';
5
6
  /** Additional classes to apply to the statistics */
6
7
  className?: string;
7
8
  }>;
8
9
  /** The Statistic component is used to display a list of statistics in a grid layout. */
9
- export declare function Statistics({ children, variant, className }: StatisticsProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function Statistics({ id, children, variant, className }: StatisticsProps): import("react/jsx-runtime").JSX.Element;
10
11
  export declare namespace Statistics {
11
12
  var displayName: string;
12
13
  }
@@ -13,9 +13,9 @@ export type StoryBackgroundImageProps<T extends StoryBackgroundImageElementType
13
13
  /** An accessible description of the image, used primarily for screen readers */
14
14
  alt: string;
15
15
  /** The width of the image in pixels */
16
- width?: string;
16
+ width?: `${number}` | number;
17
17
  /** The height of the image in pixels */
18
- height?: string;
18
+ height?: `${number}` | number;
19
19
  /** Additional classes to apply to the component. */
20
20
  className?: string;
21
21
  } & ComponentPropsWithoutRef<T>;
@@ -13,9 +13,9 @@ export type StoryForegroundImageProps<T extends StoryForegroundImageElementType
13
13
  /** An accessible description of the image, used primarily for screen readers */
14
14
  alt: string;
15
15
  /** The width of the image in pixels */
16
- width?: string;
16
+ width?: `${number}` | number;
17
17
  /** The height of the image in pixels */
18
- height?: string;
18
+ height?: `${number}` | number;
19
19
  /** Additional classes to apply to the component. */
20
20
  className?: string;
21
21
  } & ComponentPropsWithoutRef<T>;
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
- import { useState as u } from "react";
4
- import { twMerge as f } from "tailwind-merge";
5
- import { tv as g } from "tailwind-variants";
6
- import { u as n } from "./use-resize-observer-DmddO4OQ.js";
7
- import { StatisticsContext as p } from "./statistics-context.js";
8
- import { StatisticsItem as I } from "./statistics-item.js";
9
- import { StatisticsItemImage as F } from "./statistics-item-image.js";
10
- import { StatisticsItemRepresents as N } from "./statistics-item-represents.js";
11
- import { StatisticsItemValue as j } from "./statistics-item-value.js";
12
- function v({ children: o, variant: s, className: r }) {
13
- const [i, l] = u(0), [c, e] = n(), d = g({
3
+ import { useState as f } from "react";
4
+ import { twMerge as g } from "tailwind-merge";
5
+ import { tv as n } from "tailwind-variants";
6
+ import { u as p } from "./use-resize-observer-DmddO4OQ.js";
7
+ import { StatisticsContext as v } from "./statistics-context.js";
8
+ import { StatisticsItem as C } from "./statistics-item.js";
9
+ import { StatisticsItemImage as R } from "./statistics-item-image.js";
10
+ import { StatisticsItemRepresents as V } from "./statistics-item-represents.js";
11
+ import { StatisticsItemValue as z } from "./statistics-item-value.js";
12
+ function b({ id: o, children: r, variant: s, className: l }) {
13
+ const [i, c] = f(0), [d, e] = p(), a = n({
14
14
  base: "mx-auto my-0 flex flex-col flex-wrap sm:flex-row",
15
15
  variants: {
16
16
  divisibleByTwo: {
@@ -47,42 +47,43 @@ function v({ children: o, variant: s, className: r }) {
47
47
  class: "grid grid-cols-1 sm:grid-cols-3"
48
48
  }
49
49
  ]
50
- }), a = f(
51
- d({
50
+ }), m = g(
51
+ a({
52
52
  variant: s,
53
53
  divisibleByTwo: i % 2 === 0,
54
54
  divisibleByThree: i % 3 === 0,
55
55
  divisibleByFour: i % 4 === 0
56
56
  }),
57
- r
57
+ l
58
58
  );
59
59
  return /* @__PURE__ */ t(
60
- p.Provider,
60
+ v.Provider,
61
61
  {
62
62
  value: {
63
63
  variant: s,
64
- incrementCount: () => l((m) => m + 1)
64
+ incrementCount: () => c((u) => u + 1)
65
65
  },
66
66
  children: /* @__PURE__ */ t(
67
67
  "dl",
68
68
  {
69
- className: `uofg-statistics ${a}`,
69
+ id: o,
70
+ className: `uofg-statistics ${m}`,
70
71
  style: (
71
72
  /* @ts-expect-error TypeScript doesn't like CSS Variables */
72
73
  s === "solid-colors-full" ? { "--statistic-bg-width": (e == null ? void 0 : e.contentRect.width) + "px" } : void 0
73
74
  ),
74
- ref: c,
75
- children: o
75
+ ref: d,
76
+ children: r
76
77
  }
77
78
  )
78
79
  }
79
80
  );
80
81
  }
81
- v.displayName = "Statistics";
82
+ b.displayName = "Statistics";
82
83
  export {
83
- v as Statistics,
84
- I as StatisticsItem,
85
- F as StatisticsItemImage,
86
- N as StatisticsItemRepresents,
87
- j as StatisticsItemValue
84
+ b as Statistics,
85
+ C as StatisticsItem,
86
+ R as StatisticsItemImage,
87
+ V as StatisticsItemRepresents,
88
+ z as StatisticsItemValue
88
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uoguelph/react-components",
3
- "version": "1.6.0-rc.6",
3
+ "version": "1.6.0-rc.8",
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": "c2ab871bf9ac3a1133a8e0111e5a50d25dc43f9e"
81
+ "gitHead": "b9fa3bb5ce330c529ac073bf6683226de313be6a"
82
82
  }