@graphcommerce/next-ui 11.0.0-canary.69 → 11.0.0-canary.72
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.
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// @vitest-environment happy-dom
|
|
2
|
+
|
|
3
|
+
import { createTheme, ThemeProvider } from '@mui/material'
|
|
4
|
+
import { cleanup, render } from '@testing-library/react'
|
|
5
|
+
import { afterEach, expect, it } from 'vitest'
|
|
6
|
+
import { ActionCardAccordion } from './ActionCardAccordion'
|
|
7
|
+
|
|
8
|
+
const theme = createTheme({ cssVariables: true })
|
|
9
|
+
|
|
10
|
+
afterEach(() => cleanup())
|
|
11
|
+
|
|
12
|
+
it('renders a button in right without a button around it', () => {
|
|
13
|
+
const { container } = render(
|
|
14
|
+
<ThemeProvider theme={theme}>
|
|
15
|
+
<ActionCardAccordion
|
|
16
|
+
summary='Sort by'
|
|
17
|
+
details={null}
|
|
18
|
+
right={<button type='button'>Clear</button>}
|
|
19
|
+
/>
|
|
20
|
+
</ThemeProvider>,
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
expect(container.querySelector('button button')).toBeNull()
|
|
24
|
+
})
|
|
@@ -39,6 +39,8 @@ export function ActionCardAccordion(props: ActionCardAccordionProps) {
|
|
|
39
39
|
)}
|
|
40
40
|
>
|
|
41
41
|
<AccordionSummary
|
|
42
|
+
// MUI renders the summary as a button, and `right` can hold a button
|
|
43
|
+
component='div'
|
|
42
44
|
onClick={(e) => e.preventDefault()}
|
|
43
45
|
expandIcon={<IconSvg src={iconChevronDown} />}
|
|
44
46
|
sx={{
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 11.0.0-canary.72
|
|
4
|
+
|
|
5
|
+
## 11.0.0-canary.71
|
|
6
|
+
|
|
7
|
+
### Patch Changes
|
|
8
|
+
|
|
9
|
+
- [#2735](https://github.com/graphcommerce-org/graphcommerce/pull/2735) [`758b863`](https://github.com/graphcommerce-org/graphcommerce/commit/758b863f005a812c79f6bbe9cf98e2a6a03a265a) - Fix hydration error #418 on a category page with an active filter or sort: `ActionCardAccordion` renders its summary as a `div`, so the clear button in `right` is not a button in a button. ([@bramvanderholst](https://github.com/bramvanderholst))
|
|
10
|
+
|
|
11
|
+
## 11.0.0-canary.70
|
|
12
|
+
|
|
3
13
|
## 11.0.0-canary.69
|
|
4
14
|
|
|
5
15
|
## 11.0.0-canary.68
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@graphcommerce/next-ui",
|
|
3
3
|
"homepage": "https://www.graphcommerce.org/",
|
|
4
4
|
"repository": "github:graphcommerce-org/graphcommerce",
|
|
5
|
-
"version": "11.0.0-canary.
|
|
5
|
+
"version": "11.0.0-canary.72",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"prettier": "@graphcommerce/prettier-config-pwa",
|
|
8
8
|
"eslintConfig": {
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"@emotion/react": "^11.14.0",
|
|
44
44
|
"@emotion/server": "^11.11.0",
|
|
45
45
|
"@emotion/styled": "^11.14.1",
|
|
46
|
-
"@graphcommerce/eslint-config-pwa": "^11.0.0-canary.
|
|
47
|
-
"@graphcommerce/framer-next-pages": "^11.0.0-canary.
|
|
48
|
-
"@graphcommerce/framer-scroller": "^11.0.0-canary.
|
|
49
|
-
"@graphcommerce/framer-utils": "^11.0.0-canary.
|
|
50
|
-
"@graphcommerce/image": "^11.0.0-canary.
|
|
51
|
-
"@graphcommerce/prettier-config-pwa": "^11.0.0-canary.
|
|
52
|
-
"@graphcommerce/typescript-config-pwa": "^11.0.0-canary.
|
|
46
|
+
"@graphcommerce/eslint-config-pwa": "^11.0.0-canary.72",
|
|
47
|
+
"@graphcommerce/framer-next-pages": "^11.0.0-canary.72",
|
|
48
|
+
"@graphcommerce/framer-scroller": "^11.0.0-canary.72",
|
|
49
|
+
"@graphcommerce/framer-utils": "^11.0.0-canary.72",
|
|
50
|
+
"@graphcommerce/image": "^11.0.0-canary.72",
|
|
51
|
+
"@graphcommerce/prettier-config-pwa": "^11.0.0-canary.72",
|
|
52
|
+
"@graphcommerce/typescript-config-pwa": "^11.0.0-canary.72",
|
|
53
53
|
"@lingui/core": "^6",
|
|
54
54
|
"@lingui/react": "^6",
|
|
55
55
|
"@mui/lab": "7.0.1-beta.25",
|