@faststore/ui 1.3.33 → 1.3.37
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/CHANGELOG.md +41 -0
- package/dist/index.d.ts +2 -0
- package/dist/organisms/Card/Card.d.ts +10 -0
- package/dist/organisms/Card/CardActions.d.ts +10 -0
- package/dist/organisms/Card/CardContent.d.ts +14 -0
- package/dist/organisms/Card/CardImage.d.ts +10 -0
- package/dist/organisms/Card/index.d.ts +8 -0
- package/dist/organisms/Card/stories/Card.stories.d.ts +4 -0
- package/dist/ui.cjs.development.js +55 -0
- package/dist/ui.cjs.development.js.map +1 -1
- package/dist/ui.cjs.production.min.js +1 -1
- package/dist/ui.cjs.production.min.js.map +1 -1
- package/dist/ui.esm.js +52 -1
- package/dist/ui.esm.js.map +1 -1
- package/dist/utils/toHaveNoIncomplete.d.ts +17 -0
- package/package.json +6 -3
- package/src/index.ts +12 -0
- package/src/molecules/Modal/Modal.test.tsx +8 -0
- package/src/organisms/Card/Card.test.tsx +68 -0
- package/src/organisms/Card/Card.tsx +22 -0
- package/src/organisms/Card/CardActions.tsx +29 -0
- package/src/organisms/Card/CardContent.tsx +40 -0
- package/src/organisms/Card/CardImage.tsx +22 -0
- package/src/organisms/Card/index.tsx +11 -0
- package/src/organisms/Card/stories/Card.mdx +54 -0
- package/src/organisms/Card/stories/Card.stories.tsx +62 -0
- package/src/setupTests.ts +3 -0
- package/src/utils/toHaveNoIncomplete.ts +76 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,47 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.3.37 (2021-12-15)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **ui:** Card component ([#1079](https://github.com/vtex/faststore/issues/1079)) ([7f10a5d](https://github.com/vtex/faststore/commit/7f10a5dcec21f7c9d59ba645755fe298e96269df))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 1.3.36 (2021-12-15)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* expose JS files only ([#1081](https://github.com/vtex/faststore/issues/1081)) ([e363c12](https://github.com/vtex/faststore/commit/e363c120f22b10da81ceb3e2d8fcc58c1b4665af))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## 1.3.35 (2021-12-14)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package @faststore/ui
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## 1.3.34 (2021-12-11)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
* **docs:** Fix algolia search ([#1078](https://github.com/vtex/faststore/issues/1078)) ([986074f](https://github.com/vtex/faststore/commit/986074f061365d812650a82748ca5a9fc1dac6d5))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
6
47
|
## 1.3.33 (2021-12-10)
|
|
7
48
|
|
|
8
49
|
**Note:** Version bump only for package @faststore/ui
|
package/dist/index.d.ts
CHANGED
|
@@ -60,5 +60,7 @@ export { default as Form } from './molecules/Form';
|
|
|
60
60
|
export type { FormProps } from './molecules/Form';
|
|
61
61
|
export { default as Alert } from './molecules/Alert';
|
|
62
62
|
export type { AlertProps } from './molecules/Alert';
|
|
63
|
+
export { default as Card, CardImage, CardContent, CardActions, } from './organisms/Card';
|
|
64
|
+
export type { CardProps, CardImageProps, CardContentProps, CardActionsProps, } from './organisms/Card';
|
|
63
65
|
export { default as useSlider } from './hooks/useSlider';
|
|
64
66
|
export type { UseSliderArgs, SliderState, SliderDispatch, SlideDirection, } from './hooks/useSlider';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
|
+
*/
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default Card;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { HTMLAttributes } from 'react';
|
|
3
|
+
export interface CardActionsProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
|
+
*/
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const CardActions: React.ForwardRefExoticComponent<CardActionsProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default CardActions;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HTMLAttributes, AriaAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
|
+
*/
|
|
7
|
+
testId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Defines a string value that labels the current element.
|
|
10
|
+
*/
|
|
11
|
+
'aria-label'?: AriaAttributes['aria-label'];
|
|
12
|
+
}
|
|
13
|
+
declare const CardContent: React.ForwardRefExoticComponent<CardContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export default CardContent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface CardImageProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* ID to find this component in testing tools (e.g.: cypress, testing library, and jest).
|
|
6
|
+
*/
|
|
7
|
+
testId?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const CardImage: React.ForwardRefExoticComponent<CardImageProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default CardImage;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default } from './Card';
|
|
2
|
+
export type { CardProps } from './Card';
|
|
3
|
+
export { default as CardImage } from './CardImage';
|
|
4
|
+
export type { CardImageProps } from './CardImage';
|
|
5
|
+
export { default as CardContent } from './CardContent';
|
|
6
|
+
export type { CardContentProps } from './CardContent';
|
|
7
|
+
export { default as CardActions } from './CardActions';
|
|
8
|
+
export type { CardActionsProps } from './CardActions';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { CardProps } from '../Card';
|
|
2
|
+
export declare const Card: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react").ReactFramework, CardProps>;
|
|
3
|
+
declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react").ReactFramework, import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
@@ -1493,6 +1493,57 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert({
|
|
|
1493
1493
|
}, otherProps), children);
|
|
1494
1494
|
});
|
|
1495
1495
|
|
|
1496
|
+
const Card = /*#__PURE__*/React.forwardRef(function Card({
|
|
1497
|
+
testId = 'store-card',
|
|
1498
|
+
children,
|
|
1499
|
+
...otherProps
|
|
1500
|
+
}, ref) {
|
|
1501
|
+
return React__default.createElement("article", Object.assign({
|
|
1502
|
+
ref: ref,
|
|
1503
|
+
"data-store-card": true,
|
|
1504
|
+
"data-testid": testId
|
|
1505
|
+
}, otherProps), children);
|
|
1506
|
+
});
|
|
1507
|
+
|
|
1508
|
+
const CardImage = /*#__PURE__*/React.forwardRef(function CardImage({
|
|
1509
|
+
testId = 'store-card-image',
|
|
1510
|
+
children,
|
|
1511
|
+
...otherProps
|
|
1512
|
+
}, ref) {
|
|
1513
|
+
return React__default.createElement("div", Object.assign({
|
|
1514
|
+
ref: ref,
|
|
1515
|
+
"data-store-card-image": true,
|
|
1516
|
+
"data-testid": testId
|
|
1517
|
+
}, otherProps), children);
|
|
1518
|
+
});
|
|
1519
|
+
|
|
1520
|
+
const CardContent = /*#__PURE__*/React.forwardRef(function CardContent({
|
|
1521
|
+
testId = 'store-card-content',
|
|
1522
|
+
'aria-label': ariaLabel = 'Card content',
|
|
1523
|
+
children,
|
|
1524
|
+
...otherProps
|
|
1525
|
+
}, ref) {
|
|
1526
|
+
return React__default.createElement("div", Object.assign({
|
|
1527
|
+
ref: ref,
|
|
1528
|
+
role: "region",
|
|
1529
|
+
"aria-label": ariaLabel,
|
|
1530
|
+
"data-store-card-content": true,
|
|
1531
|
+
"data-testid": testId
|
|
1532
|
+
}, otherProps), children);
|
|
1533
|
+
});
|
|
1534
|
+
|
|
1535
|
+
const CardActions = /*#__PURE__*/React.forwardRef(function CardActions({
|
|
1536
|
+
testId = 'store-card-actions',
|
|
1537
|
+
children,
|
|
1538
|
+
...otherProps
|
|
1539
|
+
}, ref) {
|
|
1540
|
+
return React__default.createElement("div", Object.assign({
|
|
1541
|
+
ref: ref,
|
|
1542
|
+
"data-store-card-actions": true,
|
|
1543
|
+
"data-testid": testId
|
|
1544
|
+
}, otherProps), children);
|
|
1545
|
+
});
|
|
1546
|
+
|
|
1496
1547
|
exports.Accordion = Accordion;
|
|
1497
1548
|
exports.AccordionButton = AccordionButton;
|
|
1498
1549
|
exports.AccordionItem = AccordionItem;
|
|
@@ -1506,6 +1557,10 @@ exports.BannerLink = BannerLink;
|
|
|
1506
1557
|
exports.Breadcrumb = Breadcrumb;
|
|
1507
1558
|
exports.Bullets = Bullets;
|
|
1508
1559
|
exports.Button = Button;
|
|
1560
|
+
exports.Card = Card;
|
|
1561
|
+
exports.CardActions = CardActions;
|
|
1562
|
+
exports.CardContent = CardContent;
|
|
1563
|
+
exports.CardImage = CardImage;
|
|
1509
1564
|
exports.Carousel = Carousel;
|
|
1510
1565
|
exports.Checkbox = Checkbox;
|
|
1511
1566
|
exports.Form = Form;
|