@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.
- package/dist/components/card/card-image.d.ts +2 -2
- package/dist/components/hero/hero.d.ts +2 -2
- package/dist/components/image-overlay/image-overlay.d.ts +4 -4
- package/dist/components/statistics/statistics-item-image.d.ts +2 -2
- package/dist/components/statistics/statistics.d.ts +2 -1
- package/dist/components/story/story-background-image.d.ts +2 -2
- package/dist/components/story/story-foreground-image.d.ts +2 -2
- package/dist/statistics.js +26 -25
- package/package.json +2 -2
|
@@ -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?:
|
|
16
|
+
width?: `${number}` | number;
|
|
17
17
|
/** The height of the image in pixels */
|
|
18
|
-
height?:
|
|
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
|
|
16
|
-
width?: number;
|
|
17
|
-
/** The image
|
|
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?:
|
|
16
|
+
width?: `${number}` | number;
|
|
17
17
|
/** The height of the image in pixels */
|
|
18
|
-
height?:
|
|
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?:
|
|
16
|
+
width?: `${number}` | number;
|
|
17
17
|
/** The height of the image in pixels */
|
|
18
|
-
height?:
|
|
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?:
|
|
16
|
+
width?: `${number}` | number;
|
|
17
17
|
/** The height of the image in pixels */
|
|
18
|
-
height?:
|
|
18
|
+
height?: `${number}` | number;
|
|
19
19
|
/** Additional classes to apply to the component. */
|
|
20
20
|
className?: string;
|
|
21
21
|
} & ComponentPropsWithoutRef<T>;
|
package/dist/statistics.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { twMerge as
|
|
5
|
-
import { tv as
|
|
6
|
-
import { u as
|
|
7
|
-
import { StatisticsContext as
|
|
8
|
-
import { StatisticsItem as
|
|
9
|
-
import { StatisticsItemImage as
|
|
10
|
-
import { StatisticsItemRepresents as
|
|
11
|
-
import { StatisticsItemValue as
|
|
12
|
-
function
|
|
13
|
-
const [i,
|
|
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
|
-
}),
|
|
51
|
-
|
|
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
|
-
|
|
57
|
+
l
|
|
58
58
|
);
|
|
59
59
|
return /* @__PURE__ */ t(
|
|
60
|
-
|
|
60
|
+
v.Provider,
|
|
61
61
|
{
|
|
62
62
|
value: {
|
|
63
63
|
variant: s,
|
|
64
|
-
incrementCount: () =>
|
|
64
|
+
incrementCount: () => c((u) => u + 1)
|
|
65
65
|
},
|
|
66
66
|
children: /* @__PURE__ */ t(
|
|
67
67
|
"dl",
|
|
68
68
|
{
|
|
69
|
-
|
|
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:
|
|
75
|
-
children:
|
|
75
|
+
ref: d,
|
|
76
|
+
children: r
|
|
76
77
|
}
|
|
77
78
|
)
|
|
78
79
|
}
|
|
79
80
|
);
|
|
80
81
|
}
|
|
81
|
-
|
|
82
|
+
b.displayName = "Statistics";
|
|
82
83
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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.
|
|
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": "
|
|
81
|
+
"gitHead": "b9fa3bb5ce330c529ac073bf6683226de313be6a"
|
|
82
82
|
}
|