@sb1/ffe-cards-react 17.5.10 → 17.6.1
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/es/StippledCard/StippledCard.js +6 -3
- package/lib/StippledCard/StippledCard.js +6 -3
- package/lib/components/CardName.js +2 -1
- package/lib/components/ComponentBase.js +2 -1
- package/lib/components/Subtext.js +2 -1
- package/lib/components/Text.js +2 -1
- package/lib/components/Title.js +2 -1
- package/lib/mergeRefs.js +2 -1
- package/package.json +3 -3
- package/types/CardBase.d.ts +8 -8
- package/types/GroupCard/GroupCardElement.d.ts +3 -3
- package/types/GroupCard/GroupCardFooter.d.ts +2 -2
- package/types/GroupCard/GroupCardTitle.d.ts +3 -3
- package/types/IconCard/IconCard.d.ts +4 -4
- package/types/IllustrationCard/IllustrationCard.d.ts +4 -4
- package/types/ImageCard/ImageCard.d.ts +2 -2
- package/types/StippledCard/StippledCard.d.ts +12 -11
- package/types/TextCard/TextCard.d.ts +3 -3
- package/types/components/CardAction.d.ts +3 -3
- package/types/components/WithCardAction.d.ts +1 -1
- package/es/tsconfig.esm.tsbuildinfo +0 -1
- package/lib/tsconfig.cjs.tsbuildinfo +0 -1
- package/types/tsconfig.types.tsbuildinfo +0 -1
|
@@ -25,14 +25,14 @@ import classNames from 'classnames';
|
|
|
25
25
|
import { CardName, Subtext, Text, Title, WithCardAction } from '../components';
|
|
26
26
|
import { fixedForwardRef } from '../fixedForwardRef';
|
|
27
27
|
function StippledCardWithForwardRef(props, ref) {
|
|
28
|
-
var className = props.className, condensed = props.condensed, img = props.img, noMargin = props.noMargin, children = props.children, rest = __rest(props, ["className", "condensed", "img", "noMargin", "children"]);
|
|
28
|
+
var className = props.className, condensed = props.condensed, img = props.img, noMargin = props.noMargin, rightImg = props.rightImg, children = props.children, rest = __rest(props, ["className", "condensed", "img", "noMargin", "rightImg", "children"]);
|
|
29
29
|
return (React.createElement(WithCardAction, __assign({ baseClassName: "ffe-stippled-card", className: classNames('ffe-stippled-card', { 'ffe-stippled-card--condensed': condensed }, { 'ffe-stippled-card--no-margin': noMargin }, className) }, rest, { ref: ref }), function (_a) {
|
|
30
30
|
var CardAction = _a.CardAction;
|
|
31
31
|
return (React.createElement(React.Fragment, null,
|
|
32
32
|
img && (React.createElement("div", { className: classNames('ffe-stippled-card__img', {
|
|
33
33
|
'ffe-stippled-card__img--icon': (img === null || img === void 0 ? void 0 : img.type) === 'icon',
|
|
34
34
|
}), "aria-hidden": (img === null || img === void 0 ? void 0 : img.type) === 'icon' }, img === null || img === void 0 ? void 0 : img.element)),
|
|
35
|
-
React.createElement("div",
|
|
35
|
+
React.createElement("div", { className: 'ffe-stippled-card__content' }, typeof children === 'function'
|
|
36
36
|
? children({
|
|
37
37
|
CardName: CardName,
|
|
38
38
|
Title: Title,
|
|
@@ -40,7 +40,10 @@ function StippledCardWithForwardRef(props, ref) {
|
|
|
40
40
|
Subtext: Subtext,
|
|
41
41
|
CardAction: CardAction,
|
|
42
42
|
})
|
|
43
|
-
: children)
|
|
43
|
+
: children),
|
|
44
|
+
rightImg && (React.createElement("div", { className: classNames('ffe-stippled-card__img', {
|
|
45
|
+
'ffe-stippled-card__img--icon': (rightImg === null || rightImg === void 0 ? void 0 : rightImg.type) === 'icon',
|
|
46
|
+
}), "aria-hidden": (rightImg === null || rightImg === void 0 ? void 0 : rightImg.type) === 'icon' }, rightImg === null || rightImg === void 0 ? void 0 : rightImg.element))));
|
|
44
47
|
}));
|
|
45
48
|
}
|
|
46
49
|
export var StippledCard = fixedForwardRef(StippledCardWithForwardRef);
|
|
@@ -31,14 +31,14 @@ var classnames_1 = __importDefault(require("classnames"));
|
|
|
31
31
|
var components_1 = require("../components");
|
|
32
32
|
var fixedForwardRef_1 = require("../fixedForwardRef");
|
|
33
33
|
function StippledCardWithForwardRef(props, ref) {
|
|
34
|
-
var className = props.className, condensed = props.condensed, img = props.img, noMargin = props.noMargin, children = props.children, rest = __rest(props, ["className", "condensed", "img", "noMargin", "children"]);
|
|
34
|
+
var className = props.className, condensed = props.condensed, img = props.img, noMargin = props.noMargin, rightImg = props.rightImg, children = props.children, rest = __rest(props, ["className", "condensed", "img", "noMargin", "rightImg", "children"]);
|
|
35
35
|
return (react_1.default.createElement(components_1.WithCardAction, __assign({ baseClassName: "ffe-stippled-card", className: (0, classnames_1.default)('ffe-stippled-card', { 'ffe-stippled-card--condensed': condensed }, { 'ffe-stippled-card--no-margin': noMargin }, className) }, rest, { ref: ref }), function (_a) {
|
|
36
36
|
var CardAction = _a.CardAction;
|
|
37
37
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
38
38
|
img && (react_1.default.createElement("div", { className: (0, classnames_1.default)('ffe-stippled-card__img', {
|
|
39
39
|
'ffe-stippled-card__img--icon': (img === null || img === void 0 ? void 0 : img.type) === 'icon',
|
|
40
40
|
}), "aria-hidden": (img === null || img === void 0 ? void 0 : img.type) === 'icon' }, img === null || img === void 0 ? void 0 : img.element)),
|
|
41
|
-
react_1.default.createElement("div",
|
|
41
|
+
react_1.default.createElement("div", { className: 'ffe-stippled-card__content' }, typeof children === 'function'
|
|
42
42
|
? children({
|
|
43
43
|
CardName: components_1.CardName,
|
|
44
44
|
Title: components_1.Title,
|
|
@@ -46,7 +46,10 @@ function StippledCardWithForwardRef(props, ref) {
|
|
|
46
46
|
Subtext: components_1.Subtext,
|
|
47
47
|
CardAction: CardAction,
|
|
48
48
|
})
|
|
49
|
-
: children)
|
|
49
|
+
: children),
|
|
50
|
+
rightImg && (react_1.default.createElement("div", { className: (0, classnames_1.default)('ffe-stippled-card__img', {
|
|
51
|
+
'ffe-stippled-card__img--icon': (rightImg === null || rightImg === void 0 ? void 0 : rightImg.type) === 'icon',
|
|
52
|
+
}), "aria-hidden": (rightImg === null || rightImg === void 0 ? void 0 : rightImg.type) === 'icon' }, rightImg === null || rightImg === void 0 ? void 0 : rightImg.element))));
|
|
50
53
|
}));
|
|
51
54
|
}
|
|
52
55
|
exports.StippledCard = (0, fixedForwardRef_1.fixedForwardRef)(StippledCardWithForwardRef);
|
|
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.CardName =
|
|
28
|
+
exports.CardName = void 0;
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
var ComponentBase_1 = require("./ComponentBase");
|
|
@@ -33,3 +33,4 @@ function CardName(props) {
|
|
|
33
33
|
var className = props.className, rest = __rest(props, ["className"]);
|
|
34
34
|
return (react_1.default.createElement(ComponentBase_1.ComponentBase, __assign({ className: (0, classnames_1.default)('ffe-card-body__card-name', className) }, rest)));
|
|
35
35
|
}
|
|
36
|
+
exports.CardName = CardName;
|
|
@@ -25,9 +25,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.ComponentBase =
|
|
28
|
+
exports.ComponentBase = void 0;
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
function ComponentBase(props) {
|
|
31
31
|
var _a = props.as, Comp = _a === void 0 ? 'p' : _a, rest = __rest(props, ["as"]);
|
|
32
32
|
return react_1.default.createElement(Comp, __assign({}, rest));
|
|
33
33
|
}
|
|
34
|
+
exports.ComponentBase = ComponentBase;
|
|
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.Subtext =
|
|
28
|
+
exports.Subtext = void 0;
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
var ComponentBase_1 = require("./ComponentBase");
|
|
@@ -33,3 +33,4 @@ function Subtext(props) {
|
|
|
33
33
|
var className = props.className, rest = __rest(props, ["className"]);
|
|
34
34
|
return (react_1.default.createElement(ComponentBase_1.ComponentBase, __assign({ className: (0, classnames_1.default)('ffe-card-body__subtext', className) }, rest)));
|
|
35
35
|
}
|
|
36
|
+
exports.Subtext = Subtext;
|
package/lib/components/Text.js
CHANGED
|
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.Text =
|
|
28
|
+
exports.Text = void 0;
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
var ComponentBase_1 = require("./ComponentBase");
|
|
@@ -33,3 +33,4 @@ function Text(props) {
|
|
|
33
33
|
var className = props.className, rest = __rest(props, ["className"]);
|
|
34
34
|
return (react_1.default.createElement(ComponentBase_1.ComponentBase, __assign({ className: (0, classnames_1.default)('ffe-card-body__text', className) }, rest)));
|
|
35
35
|
}
|
|
36
|
+
exports.Text = Text;
|
package/lib/components/Title.js
CHANGED
|
@@ -25,7 +25,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.Title =
|
|
28
|
+
exports.Title = void 0;
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
var ComponentBase_1 = require("./ComponentBase");
|
|
@@ -35,3 +35,4 @@ function Title(props) {
|
|
|
35
35
|
'ffe-card-body__title--overflow-ellipsis': overflowEllipsis,
|
|
36
36
|
}, className) }, rest)));
|
|
37
37
|
}
|
|
38
|
+
exports.Title = Title;
|
package/lib/mergeRefs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.mergeRefs =
|
|
3
|
+
exports.mergeRefs = void 0;
|
|
4
4
|
function mergeRefs(refs) {
|
|
5
5
|
return function (value) {
|
|
6
6
|
refs.forEach(function (ref) {
|
|
@@ -14,3 +14,4 @@ function mergeRefs(refs) {
|
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
+
exports.mergeRefs = mergeRefs;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-cards-react",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.6.1",
|
|
4
4
|
"description": "React implementation of ffe-react",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SpareBank 1",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test:watch": "ffe-buildtool jest --watch"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@sb1/ffe-cards": "^20.
|
|
29
|
+
"@sb1/ffe-cards": "^20.4.1"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@sb1/ffe-buildtool": "^0.9.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "7110be1a43ed8022465ccb49a09d1efb0bab7687"
|
|
44
44
|
}
|
package/types/CardBase.d.ts
CHANGED
|
@@ -11,13 +11,13 @@ export type CardBaseProps<As extends ElementType = 'div'> = Omit<ComponentAsProp
|
|
|
11
11
|
noPadding?: boolean;
|
|
12
12
|
children: WithCardActionProps['children'] | React.ReactNode;
|
|
13
13
|
};
|
|
14
|
-
export declare const CardBase: <As extends ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
15
|
-
shadow?: boolean;
|
|
14
|
+
export declare const CardBase: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
15
|
+
shadow?: boolean | undefined;
|
|
16
16
|
/** No margin on card */
|
|
17
|
-
noMargin?: boolean;
|
|
18
|
-
textCenter?: boolean;
|
|
19
|
-
bgColor?: BgColor;
|
|
20
|
-
bgDarkmodeColor?: BgColorDarkmode;
|
|
21
|
-
noPadding?: boolean;
|
|
22
|
-
children: WithCardActionProps[
|
|
17
|
+
noMargin?: boolean | undefined;
|
|
18
|
+
textCenter?: boolean | undefined;
|
|
19
|
+
bgColor?: BgColor | undefined;
|
|
20
|
+
bgDarkmodeColor?: BgColorDarkmode | undefined;
|
|
21
|
+
noPadding?: boolean | undefined;
|
|
22
|
+
children: WithCardActionProps['children'] | React.ReactNode;
|
|
23
23
|
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -7,10 +7,10 @@ export type GroupCardElementProps<As extends ElementType = 'div'> = Omit<Compone
|
|
|
7
7
|
noSeparator?: boolean;
|
|
8
8
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
9
9
|
};
|
|
10
|
-
export declare const GroupCardElement: <As extends ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
10
|
+
export declare const GroupCardElement: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
11
11
|
/** No padding on the element */
|
|
12
|
-
noPadding?: boolean;
|
|
12
|
+
noPadding?: boolean | undefined;
|
|
13
13
|
/** Visible border between the elements*/
|
|
14
|
-
noSeparator?: boolean;
|
|
14
|
+
noSeparator?: boolean | undefined;
|
|
15
15
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
16
16
|
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -5,8 +5,8 @@ export type GroupCardFooterProps<As extends ElementType = 'div'> = Omit<Componen
|
|
|
5
5
|
noPadding?: boolean;
|
|
6
6
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
7
7
|
};
|
|
8
|
-
export declare const GroupCardFooter: <As extends ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
8
|
+
export declare const GroupCardFooter: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
9
9
|
/** No padding on the element */
|
|
10
|
-
noPadding?: boolean;
|
|
10
|
+
noPadding?: boolean | undefined;
|
|
11
11
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
12
12
|
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -7,10 +7,10 @@ export type GroupCardTitleProps<As extends ElementType = 'div'> = Omit<Component
|
|
|
7
7
|
noSeparator?: boolean;
|
|
8
8
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
9
9
|
};
|
|
10
|
-
export declare const GroupCardTitle: <As extends ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
10
|
+
export declare const GroupCardTitle: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
11
11
|
/** No padding on the element */
|
|
12
|
-
noPadding?: boolean;
|
|
12
|
+
noPadding?: boolean | undefined;
|
|
13
13
|
/** Visible border underneath title*/
|
|
14
|
-
noSeparator?: boolean;
|
|
14
|
+
noSeparator?: boolean | undefined;
|
|
15
15
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
16
16
|
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -11,14 +11,14 @@ export type IconCardProps<As extends ElementType = 'div'> = Omit<ComponentAsProp
|
|
|
11
11
|
noMargin?: boolean;
|
|
12
12
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
13
13
|
};
|
|
14
|
-
export declare const IconCard: <As extends ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
14
|
+
export declare const IconCard: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
15
15
|
/** Element of icon */
|
|
16
16
|
icon: ReactElement;
|
|
17
17
|
/** Smaller icon and less space */
|
|
18
|
-
condensed?: boolean;
|
|
18
|
+
condensed?: boolean | undefined;
|
|
19
19
|
/** Position icon at left (default) or right of the card content */
|
|
20
|
-
iconPosition?: "
|
|
20
|
+
iconPosition?: "left" | "right" | undefined;
|
|
21
21
|
/** No margin on card */
|
|
22
|
-
noMargin?: boolean;
|
|
22
|
+
noMargin?: boolean | undefined;
|
|
23
23
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
24
24
|
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -11,14 +11,14 @@ export type IllustrationCardProps<As extends ElementType = 'div'> = Omit<Compone
|
|
|
11
11
|
noMargin?: boolean;
|
|
12
12
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
13
13
|
};
|
|
14
|
-
export declare const IllustrationCard: <As extends ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
14
|
+
export declare const IllustrationCard: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
15
15
|
/** Element of illustration */
|
|
16
16
|
img: ReactElement;
|
|
17
17
|
/** Smaller illustration and less space */
|
|
18
|
-
condensed?: boolean;
|
|
18
|
+
condensed?: boolean | undefined;
|
|
19
19
|
/** Position illustration at left (default) or right of the card content */
|
|
20
|
-
illustrationPosition?: "
|
|
20
|
+
illustrationPosition?: "left" | "right" | undefined;
|
|
21
21
|
/** No margin on card */
|
|
22
|
-
noMargin?: boolean;
|
|
22
|
+
noMargin?: boolean | undefined;
|
|
23
23
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
24
24
|
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -9,12 +9,12 @@ export type ImageCardProps<As extends ElementType = 'div'> = Omit<ComponentAsPro
|
|
|
9
9
|
noMargin?: boolean;
|
|
10
10
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
11
11
|
};
|
|
12
|
-
export declare const ImageCard: <As extends ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
12
|
+
export declare const ImageCard: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
13
13
|
/** The src for the image */
|
|
14
14
|
imageSrc: string;
|
|
15
15
|
/** The alt text for the image */
|
|
16
16
|
imageAltText: string;
|
|
17
17
|
/** No margin on card */
|
|
18
|
-
noMargin?: boolean;
|
|
18
|
+
noMargin?: boolean | undefined;
|
|
19
19
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
20
20
|
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
import React, { ElementType, ReactNode } from 'react';
|
|
2
2
|
import { CardRenderProps, ComponentAsPropParams } from '../types';
|
|
3
|
+
type Img = {
|
|
4
|
+
element: ReactNode;
|
|
5
|
+
type: 'icon' | 'custom';
|
|
6
|
+
};
|
|
3
7
|
export type StippledCardProps<As extends ElementType = 'div'> = Omit<ComponentAsPropParams<As>, 'children'> & {
|
|
4
8
|
/** Smaller icon and less space */
|
|
5
9
|
condensed?: boolean;
|
|
6
10
|
/** Image to be rendered*/
|
|
7
|
-
img?:
|
|
8
|
-
|
|
9
|
-
type: 'icon' | 'custom';
|
|
10
|
-
};
|
|
11
|
+
img?: Img;
|
|
12
|
+
rightImg?: Img;
|
|
11
13
|
/** No margin on card */
|
|
12
14
|
noMargin?: boolean;
|
|
13
15
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
14
16
|
};
|
|
15
|
-
export declare const StippledCard: <As extends ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
17
|
+
export declare const StippledCard: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
16
18
|
/** Smaller icon and less space */
|
|
17
|
-
condensed?: boolean;
|
|
19
|
+
condensed?: boolean | undefined;
|
|
18
20
|
/** Image to be rendered*/
|
|
19
|
-
img?:
|
|
20
|
-
|
|
21
|
-
type: "icon" | "custom";
|
|
22
|
-
};
|
|
21
|
+
img?: Img | undefined;
|
|
22
|
+
rightImg?: Img | undefined;
|
|
23
23
|
/** No margin on card */
|
|
24
|
-
noMargin?: boolean;
|
|
24
|
+
noMargin?: boolean | undefined;
|
|
25
25
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
26
26
|
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -8,11 +8,11 @@ export type TextCardProps<As extends ElementType = 'div'> = Omit<ComponentAsProp
|
|
|
8
8
|
/** Function that's passed available subcomponents as arguments, or regular children */
|
|
9
9
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
10
10
|
};
|
|
11
|
-
export declare const TextCard: <As extends ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
11
|
+
export declare const TextCard: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
12
12
|
/** Left-aligned text on the card */
|
|
13
|
-
leftAlign?: boolean;
|
|
13
|
+
leftAlign?: boolean | undefined;
|
|
14
14
|
/** No margin on card */
|
|
15
|
-
noMargin?: boolean;
|
|
15
|
+
noMargin?: boolean | undefined;
|
|
16
16
|
/** Function that's passed available subcomponents as arguments, or regular children */
|
|
17
17
|
children: React.ReactNode | ((cardRenderProps: CardRenderProps) => React.ReactNode);
|
|
18
18
|
} & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React, { ElementType
|
|
1
|
+
import React, { ElementType } from 'react';
|
|
2
2
|
import { ComponentAsPropParams } from '../types';
|
|
3
3
|
export type CardActionProps<As extends ElementType = 'a'> = ComponentAsPropParams<As>;
|
|
4
|
-
export declare const CardAction: <As extends ElementType>(props: {
|
|
4
|
+
export declare const CardAction: <As extends React.ElementType>(props: {
|
|
5
5
|
as?: As | undefined;
|
|
6
6
|
} & import("../types").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "a" : As>, "as" & {
|
|
7
|
-
ref: ForwardedRef<any>;
|
|
7
|
+
ref: React.ForwardedRef<any>;
|
|
8
8
|
}> & React.RefAttributes<any>) => React.JSX.Element;
|
|
@@ -7,7 +7,7 @@ export type WithCardActionProps<As extends ElementType = 'div'> = Omit<Component
|
|
|
7
7
|
CardAction: typeof CardAction;
|
|
8
8
|
}) => React.ReactNode;
|
|
9
9
|
};
|
|
10
|
-
export declare const WithCardAction: <As extends ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
10
|
+
export declare const WithCardAction: <As extends React.ElementType>(props: Omit<ComponentAsPropParams<As>, "children"> & {
|
|
11
11
|
baseClassName: string;
|
|
12
12
|
children: (props: {
|
|
13
13
|
CardAction: typeof CardAction;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["../src/CardBase.tsx","../src/fixedForwardRef.tsx","../src/index.ts","../src/mergeRefs.ts","../src/types.ts","../src/GroupCard/GroupCard.tsx","../src/GroupCard/GroupCardElement.tsx","../src/GroupCard/GroupCardFooter.tsx","../src/GroupCard/GroupCardTitle.tsx","../src/IconCard/IconCard.tsx","../src/IllustrationCard/IllustrationCard.tsx","../src/ImageCard/ImageCard.tsx","../src/StippledCard/StippledCard.tsx","../src/TextCard/TextCard.tsx","../src/components/CardAction.tsx","../src/components/CardName.tsx","../src/components/ComponentBase.tsx","../src/components/Subtext.tsx","../src/components/Text.tsx","../src/components/Title.tsx","../src/components/WithCardAction.tsx","../src/components/index.ts"],"version":"5.6.3"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["../src/CardBase.tsx","../src/fixedForwardRef.tsx","../src/index.ts","../src/mergeRefs.ts","../src/types.ts","../src/GroupCard/GroupCard.tsx","../src/GroupCard/GroupCardElement.tsx","../src/GroupCard/GroupCardFooter.tsx","../src/GroupCard/GroupCardTitle.tsx","../src/IconCard/IconCard.tsx","../src/IllustrationCard/IllustrationCard.tsx","../src/ImageCard/ImageCard.tsx","../src/StippledCard/StippledCard.tsx","../src/TextCard/TextCard.tsx","../src/components/CardAction.tsx","../src/components/CardName.tsx","../src/components/ComponentBase.tsx","../src/components/Subtext.tsx","../src/components/Text.tsx","../src/components/Title.tsx","../src/components/WithCardAction.tsx","../src/components/index.ts"],"version":"5.6.3"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"root":["../src/CardBase.tsx","../src/fixedForwardRef.tsx","../src/index.ts","../src/mergeRefs.ts","../src/types.ts","../src/GroupCard/GroupCard.tsx","../src/GroupCard/GroupCardElement.tsx","../src/GroupCard/GroupCardFooter.tsx","../src/GroupCard/GroupCardTitle.tsx","../src/IconCard/IconCard.tsx","../src/IllustrationCard/IllustrationCard.tsx","../src/ImageCard/ImageCard.tsx","../src/StippledCard/StippledCard.tsx","../src/TextCard/TextCard.tsx","../src/components/CardAction.tsx","../src/components/CardName.tsx","../src/components/ComponentBase.tsx","../src/components/Subtext.tsx","../src/components/Text.tsx","../src/components/Title.tsx","../src/components/WithCardAction.tsx","../src/components/index.ts"],"version":"5.6.3"}
|