@faststore/ui 1.9.4 → 1.9.8
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 +11 -0
- package/dist/ui.cjs.development.js.map +1 -1
- package/dist/ui.cjs.production.min.js.map +1 -1
- package/dist/ui.esm.js.map +1 -1
- package/package.json +5 -4
- package/src/molecules/Accordion/Accordion.test.tsx +3 -3
- package/src/molecules/Bullets/Bullets.test.tsx +6 -6
- package/src/molecules/Modal/ModalContent.tsx +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faststore/ui",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.8",
|
|
4
4
|
"description": "A lightweight, framework agnostic component library for React",
|
|
5
5
|
"author": "emersonlaurentino",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,8 +22,9 @@
|
|
|
22
22
|
"src"
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
|
-
"develop": "
|
|
26
|
-
"build": "
|
|
25
|
+
"develop": "tsc --watch",
|
|
26
|
+
"build": "tsc",
|
|
27
|
+
"lint": "eslint src/**/*.{ts,tsx}",
|
|
27
28
|
"test": "tsdx test --passWithNoTests",
|
|
28
29
|
"storybook": "start-storybook -p 6006 --no-manager-cache",
|
|
29
30
|
"size": "size-limit",
|
|
@@ -89,5 +90,5 @@
|
|
|
89
90
|
"tsdx": "^0.14.1",
|
|
90
91
|
"typescript": "^4.2.4"
|
|
91
92
|
},
|
|
92
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "f8e0cb3d43978426228addcc28055e537eaf7752"
|
|
93
94
|
}
|
|
@@ -76,7 +76,7 @@ describe('Accordion', () => {
|
|
|
76
76
|
|
|
77
77
|
it('should show panel specified by `indices`', () => {
|
|
78
78
|
const { getAllByTestId } = render(
|
|
79
|
-
<Accordion indices={[1]} onChange={() =>
|
|
79
|
+
<Accordion indices={[1]} onChange={() => null}>
|
|
80
80
|
<AccordionItem>
|
|
81
81
|
<AccordionButton />
|
|
82
82
|
<AccordionPanel testId="store-accordion-panel-mock" />
|
|
@@ -97,13 +97,13 @@ describe('Accordion', () => {
|
|
|
97
97
|
it('should prevent duplicate IDs when using the `prefixID` attribute', () => {
|
|
98
98
|
const { getAllByTestId } = render(
|
|
99
99
|
<>
|
|
100
|
-
<Accordion indices={[]} onChange={() =>
|
|
100
|
+
<Accordion indices={[]} onChange={() => null}>
|
|
101
101
|
<AccordionItem prefixId="filter">
|
|
102
102
|
<AccordionButton testId="data-accordion-button" />
|
|
103
103
|
<AccordionPanel testId="data-accordion-panel" />
|
|
104
104
|
</AccordionItem>
|
|
105
105
|
</Accordion>
|
|
106
|
-
<Accordion indices={[]} onChange={() =>
|
|
106
|
+
<Accordion indices={[]} onChange={() => null}>
|
|
107
107
|
<AccordionItem prefixId="footer">
|
|
108
108
|
<AccordionButton testId="data-accordion-button" />
|
|
109
109
|
<AccordionPanel testId="data-accordion-panel" />
|
|
@@ -7,7 +7,7 @@ import Bullets from './Bullets'
|
|
|
7
7
|
describe('Bullets', () => {
|
|
8
8
|
it('should have `data-store-bullets` attribute', () => {
|
|
9
9
|
const { getByTestId } = render(
|
|
10
|
-
<Bullets totalQuantity={5} activeBullet={2} onClick={() =>
|
|
10
|
+
<Bullets totalQuantity={5} activeBullet={2} onClick={() => null} />
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
expect(getByTestId('store-bullets')).toHaveAttribute('data-store-bullets')
|
|
@@ -15,7 +15,7 @@ describe('Bullets', () => {
|
|
|
15
15
|
|
|
16
16
|
it('should render 5 bullets with `data-bullet-item` attribute', () => {
|
|
17
17
|
const { queryAllByTestId } = render(
|
|
18
|
-
<Bullets totalQuantity={5} activeBullet={2} onClick={() =>
|
|
18
|
+
<Bullets totalQuantity={5} activeBullet={2} onClick={() => null} />
|
|
19
19
|
)
|
|
20
20
|
|
|
21
21
|
const bulletItems = queryAllByTestId('store-bullets-item')
|
|
@@ -29,7 +29,7 @@ describe('Bullets', () => {
|
|
|
29
29
|
|
|
30
30
|
it('should render only the currently active bullet with an `aria-selected` equal to true', () => {
|
|
31
31
|
const { queryAllByTestId } = render(
|
|
32
|
-
<Bullets totalQuantity={5} activeBullet={2} onClick={() =>
|
|
32
|
+
<Bullets totalQuantity={5} activeBullet={2} onClick={() => null} />
|
|
33
33
|
)
|
|
34
34
|
|
|
35
35
|
const bulletItems = queryAllByTestId('store-bullets-item')
|
|
@@ -78,7 +78,7 @@ describe('Bullets', () => {
|
|
|
78
78
|
describe('Accessibility', () => {
|
|
79
79
|
it('should have no violations on a default use case', async () => {
|
|
80
80
|
const { getByTestId } = render(
|
|
81
|
-
<Bullets totalQuantity={5} activeBullet={2} onClick={() =>
|
|
81
|
+
<Bullets totalQuantity={5} activeBullet={2} onClick={() => null} />
|
|
82
82
|
)
|
|
83
83
|
|
|
84
84
|
expect(await axe(getByTestId('store-bullets'))).toHaveNoViolations()
|
|
@@ -91,7 +91,7 @@ describe('Bullets', () => {
|
|
|
91
91
|
<Bullets
|
|
92
92
|
totalQuantity={1}
|
|
93
93
|
activeBullet={0}
|
|
94
|
-
onClick={() =>
|
|
94
|
+
onClick={() => null}
|
|
95
95
|
ariaControlsGenerator={(idx: number) => `item-${idx + 1}`}
|
|
96
96
|
/>
|
|
97
97
|
</>
|
|
@@ -108,7 +108,7 @@ describe('Bullets', () => {
|
|
|
108
108
|
<Bullets
|
|
109
109
|
totalQuantity={2}
|
|
110
110
|
activeBullet={0}
|
|
111
|
-
onClick={() =>
|
|
111
|
+
onClick={() => null}
|
|
112
112
|
ariaControlsGenerator={(idx: number) => `item-${idx + 1}`}
|
|
113
113
|
/>
|
|
114
114
|
</>
|