@faststore/ui 1.4.3 → 1.4.7
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 +38 -0
- package/dist/molecules/IconButton/IconButton.d.ts +5 -1
- package/dist/molecules/QuantitySelector/QuantitySelector.d.ts +2 -2
- package/dist/ui.cjs.development.js +26 -27
- 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 +26 -27
- package/dist/ui.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/atoms/Checkbox/stories/Checkbox.stories.tsx +13 -8
- package/src/atoms/List/List.test.tsx +21 -2
- package/src/atoms/List/List.tsx +1 -2
- package/src/atoms/List/stories/List.mdx +2 -11
- package/src/atoms/Radio/stories/Radio.stories.tsx +6 -1
- package/src/atoms/Select/stories/Select.stories.tsx +12 -9
- package/src/atoms/Slider/Slider.tsx +3 -3
- package/src/atoms/Slider/stories/Slider.mdx +2 -2
- package/src/atoms/TextArea/stories/TextArea.stories.tsx +1 -1
- package/src/molecules/Accordion/Accordion.test.tsx +6 -6
- package/src/molecules/Accordion/AccordionButton.tsx +1 -1
- package/src/molecules/Accordion/AccordionItem.tsx +1 -6
- package/src/molecules/Accordion/AccordionPanel.tsx +1 -1
- package/src/molecules/Accordion/stories/Accordion.mdx +3 -3
- package/src/molecules/Banner/Banner.test.tsx +6 -6
- package/src/molecules/Banner/BannerContent.tsx +1 -6
- package/src/molecules/Banner/BannerImage.tsx +1 -6
- package/src/molecules/Banner/BannerLink.tsx +1 -6
- package/src/molecules/Banner/stories/Banner.mdx +4 -4
- package/src/molecules/Breadcrumb/Breadcrumb.test.tsx +12 -7
- package/src/molecules/Breadcrumb/Breadcrumb.tsx +3 -3
- package/src/molecules/Breadcrumb/stories/Breadcrumb.mdx +4 -2
- package/src/molecules/Carousel/Carousel.tsx +2 -2
- package/src/molecules/IconButton/IconButton.test.tsx +6 -2
- package/src/molecules/IconButton/IconButton.tsx +6 -1
- package/src/molecules/IconButton/stories/IconButton.stories.tsx +7 -2
- package/src/molecules/PriceRange/PriceRange.tsx +3 -3
- package/src/molecules/PriceRange/stories/PriceRange.mdx +2 -2
- package/src/molecules/QuantitySelector/QuantitySelector.tsx +2 -2
- package/src/molecules/Table/Table.test.tsx +7 -11
- package/src/molecules/Table/TableBody.tsx +1 -6
- package/src/molecules/Table/TableCell.tsx +1 -1
- package/src/molecules/Table/TableFooter.tsx +1 -6
- package/src/molecules/Table/TableHead.tsx +1 -6
- package/src/molecules/Table/TableRow.tsx +1 -1
- package/src/molecules/Table/stories/Table.mdx +5 -7
- package/src/organisms/Card/Card.test.tsx +6 -6
- package/src/organisms/Card/CardActions.tsx +1 -6
- package/src/organisms/Card/CardContent.tsx +1 -6
- package/src/organisms/Card/CardImage.tsx +1 -1
- package/src/organisms/Card/stories/Card.mdx +3 -3
|
@@ -16,12 +16,7 @@ const TableFooter = forwardRef<HTMLTableSectionElement, TableFooterProps>(
|
|
|
16
16
|
ref
|
|
17
17
|
) {
|
|
18
18
|
return (
|
|
19
|
-
<tfoot
|
|
20
|
-
ref={ref}
|
|
21
|
-
data-testid={testId}
|
|
22
|
-
data-store-table-footer
|
|
23
|
-
{...otherProps}
|
|
24
|
-
>
|
|
19
|
+
<tfoot ref={ref} data-testid={testId} data-table-footer {...otherProps}>
|
|
25
20
|
{children}
|
|
26
21
|
</tfoot>
|
|
27
22
|
)
|
|
@@ -16,12 +16,7 @@ const TableHead = forwardRef<HTMLTableSectionElement, TableHeadProps>(
|
|
|
16
16
|
ref
|
|
17
17
|
) {
|
|
18
18
|
return (
|
|
19
|
-
<thead
|
|
20
|
-
ref={ref}
|
|
21
|
-
data-testid={testId}
|
|
22
|
-
data-store-table-head
|
|
23
|
-
{...otherProps}
|
|
24
|
-
>
|
|
19
|
+
<thead ref={ref} data-testid={testId} data-table-head {...otherProps}>
|
|
25
20
|
{children}
|
|
26
21
|
</thead>
|
|
27
22
|
)
|
|
@@ -15,7 +15,7 @@ const TableRow = forwardRef<HTMLTableRowElement, TableRowProps>(
|
|
|
15
15
|
ref
|
|
16
16
|
) {
|
|
17
17
|
return (
|
|
18
|
-
<tr ref={ref} data-
|
|
18
|
+
<tr ref={ref} data-table-row data-testid={testId} {...otherProps}>
|
|
19
19
|
{children}
|
|
20
20
|
</tr>
|
|
21
21
|
)
|
|
@@ -59,15 +59,13 @@ Besides those attributes, the following props are also supported:
|
|
|
59
59
|
```css
|
|
60
60
|
[data-store-table] {}
|
|
61
61
|
|
|
62
|
-
[data-
|
|
62
|
+
[data-table-head] {}
|
|
63
63
|
|
|
64
|
-
[data-
|
|
64
|
+
[data-table-row] {}
|
|
65
65
|
|
|
66
|
-
[data-
|
|
66
|
+
[data-table-footer] {}
|
|
67
67
|
|
|
68
|
-
[data-
|
|
68
|
+
[data-table-body] {}
|
|
69
69
|
|
|
70
|
-
[data-
|
|
71
|
-
|
|
72
|
-
[data-store-table-cell='data'] {}
|
|
70
|
+
[data-table-cell='(head|data)'] {}
|
|
73
71
|
```
|
|
@@ -47,16 +47,16 @@ describe('Card', () => {
|
|
|
47
47
|
expect(card).toHaveAttribute('data-store-card')
|
|
48
48
|
})
|
|
49
49
|
|
|
50
|
-
it('`CardContent` component should have `data-
|
|
51
|
-
expect(cardContent).toHaveAttribute('data-
|
|
50
|
+
it('`CardContent` component should have `data-card-content` attribute', () => {
|
|
51
|
+
expect(cardContent).toHaveAttribute('data-card-content')
|
|
52
52
|
})
|
|
53
53
|
|
|
54
|
-
it('`CardImage` component should have `data-
|
|
55
|
-
expect(cardImage).toHaveAttribute('data-
|
|
54
|
+
it('`CardImage` component should have `data-card-image` attribute', () => {
|
|
55
|
+
expect(cardImage).toHaveAttribute('data-card-image')
|
|
56
56
|
})
|
|
57
57
|
|
|
58
|
-
it('`CardActions` component should have `data-
|
|
59
|
-
expect(cardActions).toHaveAttribute('data-
|
|
58
|
+
it('`CardActions` component should have `data-card-actions` attribute', () => {
|
|
59
|
+
expect(cardActions).toHaveAttribute('data-card-actions')
|
|
60
60
|
})
|
|
61
61
|
})
|
|
62
62
|
|
|
@@ -14,12 +14,7 @@ const CardActions = forwardRef<HTMLDivElement, CardActionsProps>(
|
|
|
14
14
|
ref
|
|
15
15
|
) {
|
|
16
16
|
return (
|
|
17
|
-
<div
|
|
18
|
-
ref={ref}
|
|
19
|
-
data-store-card-actions
|
|
20
|
-
data-testid={testId}
|
|
21
|
-
{...otherProps}
|
|
22
|
-
>
|
|
17
|
+
<div ref={ref} data-card-actions data-testid={testId} {...otherProps}>
|
|
23
18
|
{children}
|
|
24
19
|
</div>
|
|
25
20
|
)
|
|
@@ -14,12 +14,7 @@ const CardContent = forwardRef<HTMLElement, CardContentProps>(
|
|
|
14
14
|
ref
|
|
15
15
|
) {
|
|
16
16
|
return (
|
|
17
|
-
<section
|
|
18
|
-
ref={ref}
|
|
19
|
-
data-store-card-content
|
|
20
|
-
data-testid={testId}
|
|
21
|
-
{...otherProps}
|
|
22
|
-
>
|
|
17
|
+
<section ref={ref} data-card-content data-testid={testId} {...otherProps}>
|
|
23
18
|
{children}
|
|
24
19
|
</section>
|
|
25
20
|
)
|
|
@@ -13,7 +13,7 @@ const CardImage = forwardRef<HTMLDivElement, CardImageProps>(function CardImage(
|
|
|
13
13
|
ref
|
|
14
14
|
) {
|
|
15
15
|
return (
|
|
16
|
-
<div ref={ref} data-
|
|
16
|
+
<div ref={ref} data-card-image data-testid={testId} {...otherProps}>
|
|
17
17
|
{children}
|
|
18
18
|
</div>
|
|
19
19
|
)
|
|
@@ -45,10 +45,10 @@ All Card-related components support all attributes also supported by the `<div>`
|
|
|
45
45
|
```css
|
|
46
46
|
[data-store-card] {
|
|
47
47
|
}
|
|
48
|
-
[data-
|
|
48
|
+
[data-card-image] {
|
|
49
49
|
}
|
|
50
|
-
[data-
|
|
50
|
+
[data-card-content] {
|
|
51
51
|
}
|
|
52
|
-
[data-
|
|
52
|
+
[data-card-actions] {
|
|
53
53
|
}
|
|
54
54
|
```
|