@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.
Files changed (51) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/molecules/IconButton/IconButton.d.ts +5 -1
  3. package/dist/molecules/QuantitySelector/QuantitySelector.d.ts +2 -2
  4. package/dist/ui.cjs.development.js +26 -27
  5. package/dist/ui.cjs.development.js.map +1 -1
  6. package/dist/ui.cjs.production.min.js +1 -1
  7. package/dist/ui.cjs.production.min.js.map +1 -1
  8. package/dist/ui.esm.js +26 -27
  9. package/dist/ui.esm.js.map +1 -1
  10. package/package.json +3 -3
  11. package/src/atoms/Checkbox/stories/Checkbox.stories.tsx +13 -8
  12. package/src/atoms/List/List.test.tsx +21 -2
  13. package/src/atoms/List/List.tsx +1 -2
  14. package/src/atoms/List/stories/List.mdx +2 -11
  15. package/src/atoms/Radio/stories/Radio.stories.tsx +6 -1
  16. package/src/atoms/Select/stories/Select.stories.tsx +12 -9
  17. package/src/atoms/Slider/Slider.tsx +3 -3
  18. package/src/atoms/Slider/stories/Slider.mdx +2 -2
  19. package/src/atoms/TextArea/stories/TextArea.stories.tsx +1 -1
  20. package/src/molecules/Accordion/Accordion.test.tsx +6 -6
  21. package/src/molecules/Accordion/AccordionButton.tsx +1 -1
  22. package/src/molecules/Accordion/AccordionItem.tsx +1 -6
  23. package/src/molecules/Accordion/AccordionPanel.tsx +1 -1
  24. package/src/molecules/Accordion/stories/Accordion.mdx +3 -3
  25. package/src/molecules/Banner/Banner.test.tsx +6 -6
  26. package/src/molecules/Banner/BannerContent.tsx +1 -6
  27. package/src/molecules/Banner/BannerImage.tsx +1 -6
  28. package/src/molecules/Banner/BannerLink.tsx +1 -6
  29. package/src/molecules/Banner/stories/Banner.mdx +4 -4
  30. package/src/molecules/Breadcrumb/Breadcrumb.test.tsx +12 -7
  31. package/src/molecules/Breadcrumb/Breadcrumb.tsx +3 -3
  32. package/src/molecules/Breadcrumb/stories/Breadcrumb.mdx +4 -2
  33. package/src/molecules/Carousel/Carousel.tsx +2 -2
  34. package/src/molecules/IconButton/IconButton.test.tsx +6 -2
  35. package/src/molecules/IconButton/IconButton.tsx +6 -1
  36. package/src/molecules/IconButton/stories/IconButton.stories.tsx +7 -2
  37. package/src/molecules/PriceRange/PriceRange.tsx +3 -3
  38. package/src/molecules/PriceRange/stories/PriceRange.mdx +2 -2
  39. package/src/molecules/QuantitySelector/QuantitySelector.tsx +2 -2
  40. package/src/molecules/Table/Table.test.tsx +7 -11
  41. package/src/molecules/Table/TableBody.tsx +1 -6
  42. package/src/molecules/Table/TableCell.tsx +1 -1
  43. package/src/molecules/Table/TableFooter.tsx +1 -6
  44. package/src/molecules/Table/TableHead.tsx +1 -6
  45. package/src/molecules/Table/TableRow.tsx +1 -1
  46. package/src/molecules/Table/stories/Table.mdx +5 -7
  47. package/src/organisms/Card/Card.test.tsx +6 -6
  48. package/src/organisms/Card/CardActions.tsx +1 -6
  49. package/src/organisms/Card/CardContent.tsx +1 -6
  50. package/src/organisms/Card/CardImage.tsx +1 -1
  51. package/src/organisms/Card/stories/Card.mdx +3 -3
@@ -35,7 +35,7 @@ const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(
35
35
  return (
36
36
  <Cell
37
37
  ref={ref}
38
- data-store-table-cell={variant}
38
+ data-table-cell={variant}
39
39
  data-testid={testId}
40
40
  scope={scope}
41
41
  {...otherProps}
@@ -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-store-table-row data-testid={testId} {...otherProps}>
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-store-table-head] {}
62
+ [data-table-head] {}
63
63
 
64
- [data-store-table-row] {}
64
+ [data-table-row] {}
65
65
 
66
- [data-store-table-footer] {}
66
+ [data-table-footer] {}
67
67
 
68
- [data-store-table-body] {}
68
+ [data-table-body] {}
69
69
 
70
- [data-store-table-cell='head'] {}
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-store-card-content` attribute', () => {
51
- expect(cardContent).toHaveAttribute('data-store-card-content')
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-store-card-image` attribute', () => {
55
- expect(cardImage).toHaveAttribute('data-store-card-image')
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-store-card-actions` attribute', () => {
59
- expect(cardActions).toHaveAttribute('data-store-card-actions')
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-store-card-image data-testid={testId} {...otherProps}>
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-store-card-image] {
48
+ [data-card-image] {
49
49
  }
50
- [data-store-card-content] {
50
+ [data-card-content] {
51
51
  }
52
- [data-store-card-actions] {
52
+ [data-card-actions] {
53
53
  }
54
54
  ```