@graphcommerce/next-ui 3.2.2 → 3.2.3

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.
@@ -1,6 +1,7 @@
1
1
  import { Scroller, ScrollerButton, ScrollerProvider } from '@graphcommerce/framer-scroller'
2
2
  import { Link, makeStyles, Theme } from '@material-ui/core'
3
3
  import clsx from 'clsx'
4
+ import { m } from 'framer-motion'
4
5
  import PageLink from 'next/link'
5
6
  import { useRouter } from 'next/router'
6
7
  import React from 'react'
@@ -25,20 +26,33 @@ const useStyles = makeStyles(
25
26
  padding: '0 40px',
26
27
  minHeight: 40,
27
28
  },
28
- prevNext: {
29
- pointerEvents: 'all',
29
+ prevNextBtnWrapper: {
30
30
  position: 'absolute',
31
- background: theme.palette.background.default,
32
- top: 5,
33
- [theme.breakpoints.down('sm')]: { display: 'none' },
34
- boxShadow: 'none',
31
+ top: 0,
35
32
  },
36
- prev: {
33
+ left: {
37
34
  left: 0,
38
35
  },
39
- next: {
36
+ right: {
40
37
  right: 0,
41
38
  },
39
+ prevNextBtn: {
40
+ pointerEvents: 'all',
41
+ background: theme.palette.background.default,
42
+ boxShadow: 'none',
43
+ height: 48,
44
+ [theme.breakpoints.down('sm')]: {
45
+ display: 'none',
46
+ },
47
+ },
48
+ prevBtn: {
49
+ borderTopLeftRadius: 0,
50
+ borderBottomLeftRadius: 0,
51
+ },
52
+ nextBtn: {
53
+ borderTopRightRadius: 0,
54
+ borderBottomRightRadius: 0,
55
+ },
42
56
  link: {
43
57
  whiteSpace: 'nowrap',
44
58
  color: 'black',
@@ -89,22 +103,44 @@ export default function DesktopNavBar(props: MenuTabsProps) {
89
103
  </Link>
90
104
  </PageLink>
91
105
  ))}
106
+ </Scroller>
107
+
108
+ <m.div className={clsx(classes.prevNextBtnWrapper, classes.left)}>
92
109
  <ScrollerButton
93
110
  direction='left'
94
111
  size='small'
95
- className={clsx(classes.prevNext, classes.prev)}
112
+ classes={{ root: clsx(classes.prevNextBtn, classes.prevBtn) }}
96
113
  >
97
114
  <SvgImageSimple src={iconChevronLeft} />
98
115
  </ScrollerButton>
116
+ </m.div>
117
+
118
+ <m.div className={clsx(classes.prevNextBtnWrapper, classes.right)}>
99
119
  <ScrollerButton
100
120
  direction='right'
101
121
  size='small'
102
- className={clsx(classes.prevNext, classes.next)}
122
+ classes={{ root: clsx(classes.prevNextBtn, classes.nextBtn) }}
103
123
  >
104
124
  <SvgImageSimple src={iconChevronRight} />
105
125
  </ScrollerButton>
106
- </Scroller>
126
+ </m.div>
107
127
  </div>
128
+
129
+ {/* <ScrollerButton
130
+ direction='left'
131
+ size='small'
132
+ className={clsx(classes.prevNext, classes.prev)}
133
+ >
134
+ <SvgImageSimple src={iconChevronLeft} />
135
+ </ScrollerButton>
136
+
137
+ <ScrollerButton
138
+ direction='right'
139
+ size='small'
140
+ className={clsx(classes.prevNext, classes.next)}
141
+ >
142
+ <SvgImageSimple src={iconChevronRight} />
143
+ </ScrollerButton> */}
108
144
  </ScrollerProvider>
109
145
  )
110
146
  }
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
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
+ ## [3.2.3](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.2.2...@graphcommerce/next-ui@3.2.3) (2021-10-11)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **desktop-nav-bar:** prev/next button alignment in menu ([c7fabf0](https://github.com/ho-nl/m2-pwa/commit/c7fabf0474100aaf40a7526858fa2b01566b3250))
12
+ * **section-heeader-filter-items:** remove large paddings ([18f4d77](https://github.com/ho-nl/m2-pwa/commit/18f4d77e4eb1b029bf2e5656b753e2f18fde90ab))
13
+
14
+
15
+
16
+
17
+
6
18
  ## [3.2.2](https://github.com/ho-nl/m2-pwa/compare/@graphcommerce/next-ui@3.2.1...@graphcommerce/next-ui@3.2.2) (2021-10-11)
7
19
 
8
20
 
@@ -55,6 +55,9 @@ export const useChipMenuStyles = makeStyles(
55
55
  outline: 'none',
56
56
  },
57
57
  },
58
+ sectionHeaderWrapper: {
59
+ marginTop: 10,
60
+ },
58
61
  }),
59
62
  { name: 'ChipMenu' },
60
63
  )
@@ -109,7 +112,6 @@ export default function ChipMenu(props: ChipMenuProps) {
109
112
  selectedAndMenuHidden && classes.chipSelected,
110
113
  )}
111
114
  />
112
-
113
115
  <Menu
114
116
  anchorEl={openEl}
115
117
  open={!!openEl}
@@ -122,7 +124,12 @@ export default function ChipMenu(props: ChipMenuProps) {
122
124
  anchorOrigin={{ horizontal: 'left', vertical: 'bottom' }}
123
125
  classes={{ paper: classes.menuPaper, list: classes.menuList }}
124
126
  >
125
- <SectionHeader labelLeft={label ?? ''} labelRight={labelRight ?? ''} usePadding />
127
+ <SectionHeader
128
+ labelLeft={label ?? ''}
129
+ labelRight={labelRight ?? ''}
130
+ usePadding
131
+ classes={{ sectionHeaderWrapper: classes.sectionHeaderWrapper }}
132
+ />
126
133
  {children}
127
134
  </Menu>
128
135
  </>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphcommerce/next-ui",
3
- "version": "3.2.2",
3
+ "version": "3.2.3",
4
4
  "author": "",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -55,5 +55,5 @@
55
55
  "project": "./tsconfig.json"
56
56
  }
57
57
  },
58
- "gitHead": "be6fb6e501c76d846b06935bf61e949f82f0c50f"
58
+ "gitHead": "23efb6abb9e5bb287434d07dbba664511b2c5e36"
59
59
  }