@cakemail-org/ui-components-v2 2.2.124 → 2.2.125
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/cjs/components/index.d.ts +4 -0
- package/dist/cjs/components/resourceCard/ResourceCardGrid.d.ts +5 -0
- package/dist/cjs/components/resourceCard/gridTypes.d.ts +14 -0
- package/dist/cjs/components/resourceCard/index.d.ts +5 -0
- package/dist/cjs/components/resourceCard/types.d.ts +18 -0
- package/dist/cjs/index.js +200 -62
- package/dist/esm/components/index.d.ts +4 -0
- package/dist/esm/components/resourceCard/ResourceCardGrid.d.ts +5 -0
- package/dist/esm/components/resourceCard/gridTypes.d.ts +14 -0
- package/dist/esm/components/resourceCard/index.d.ts +5 -0
- package/dist/esm/components/resourceCard/types.d.ts +18 -0
- package/dist/esm/index.js +198 -63
- package/package.json +1 -1
|
@@ -35,6 +35,10 @@ export * from "./logo";
|
|
|
35
35
|
export * from "./metricCard";
|
|
36
36
|
export * from "./modal";
|
|
37
37
|
export * from "./overlay";
|
|
38
|
+
export * from "./resourceCard";
|
|
39
|
+
export { ResourceCardGrid } from "./resourceCard/ResourceCardGrid";
|
|
40
|
+
export { computeResourceCardGridColumns } from "./resourceCard/gridTypes";
|
|
41
|
+
export type { TResourceCardGrid } from "./resourceCard/gridTypes";
|
|
38
42
|
export * from "./radio";
|
|
39
43
|
export * from "./resourceEdit";
|
|
40
44
|
export * from "./scopePicker";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TResourceCardGrid } from "./gridTypes";
|
|
3
|
+
import "./gridStyles.scss";
|
|
4
|
+
export declare function ResourceCardGrid({ children, maxCardWidth, minCardWidth, gap, className, }: TResourceCardGrid): React.JSX.Element;
|
|
5
|
+
export default ResourceCardGrid;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export type TResourceCardGrid = {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
maxCardWidth?: number;
|
|
5
|
+
minCardWidth?: number;
|
|
6
|
+
gap?: number;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare function computeResourceCardGridColumns({ containerWidth, maxCardWidth, minCardWidth, gap, }: {
|
|
10
|
+
containerWidth: number;
|
|
11
|
+
maxCardWidth: number;
|
|
12
|
+
minCardWidth: number;
|
|
13
|
+
gap: number;
|
|
14
|
+
}): number;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./styles.scss";
|
|
3
|
+
import { TResourceCard } from "./types";
|
|
4
|
+
export declare function ResourceCard({ title, description, chip, support, imageUrl, primaryAction, primaryActionLabel, secondaryAction, secondaryActionLabel, additionalActions, className, }: TResourceCard): React.JSX.Element;
|
|
5
|
+
export default ResourceCard;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { TDropMenuItem } from "../dropMenu/types";
|
|
3
|
+
export type TResourceCardAdditionalAction = Omit<TDropMenuItem, "isMultiSelect" | "selected"> & {
|
|
4
|
+
renderedText?: string;
|
|
5
|
+
};
|
|
6
|
+
export type TResourceCard = {
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
chip?: ReactNode;
|
|
10
|
+
support?: ReactNode;
|
|
11
|
+
imageUrl?: string;
|
|
12
|
+
primaryAction?: () => void;
|
|
13
|
+
primaryActionLabel?: string;
|
|
14
|
+
secondaryAction?: () => void;
|
|
15
|
+
secondaryActionLabel?: string;
|
|
16
|
+
additionalActions?: TResourceCardAdditionalAction[];
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|