@graphcommerce/next-ui 4.8.0 → 4.8.1

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## 4.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1477](https://github.com/graphcommerce-org/graphcommerce/pull/1477) [`a9df81310`](https://github.com/graphcommerce-org/graphcommerce/commit/a9df81310c051876dd82fb2819105dece47cc213) Thanks [@paales](https://github.com/paales)! - Revert faulty background color on LayoutDefault
8
+
9
+ * [#1477](https://github.com/graphcommerce-org/graphcommerce/pull/1477) [`f167f9963`](https://github.com/graphcommerce-org/graphcommerce/commit/f167f99630966a7de43717937d43669e66132494) Thanks [@paales](https://github.com/paales)! - LayoutOverlay performance improvements
10
+
11
+ * Updated dependencies [[`55c2dcde7`](https://github.com/graphcommerce-org/graphcommerce/commit/55c2dcde7869ee51b84494af653b3edfd43904a4), [`597e2f413`](https://github.com/graphcommerce-org/graphcommerce/commit/597e2f413bdb5b76793b40ab631ce61390e26e81), [`f167f9963`](https://github.com/graphcommerce-org/graphcommerce/commit/f167f99630966a7de43717937d43669e66132494)]:
12
+ - @graphcommerce/framer-scroller@2.1.12
13
+ - @graphcommerce/framer-next-pages@3.2.2
14
+ - @graphcommerce/framer-utils@3.1.3
15
+ - @graphcommerce/image@3.1.6
16
+
3
17
  ## 4.8.0
4
18
 
5
19
  ### Minor Changes
@@ -58,7 +58,7 @@ export function LayoutDefault(props: LayoutDefaultProps) {
58
58
  display: 'grid',
59
59
  gridTemplateRows: `auto auto 1fr auto`,
60
60
  gridTemplateColumns: '100%',
61
- background: theme.palette.background.paper,
61
+ background: theme.palette.background.default,
62
62
  }),
63
63
  ...(Array.isArray(sx) ? sx : [sx]),
64
64
  ]}
@@ -177,7 +177,6 @@ export function LayoutOverlayBase(incommingProps: LayoutOverlayBaseProps) {
177
177
  useEffect(() => positions.open.visible.onChange((o) => o === 0 && closeOverlay()))
178
178
 
179
179
  // Measure the offset of the overlay in the scroller.
180
-
181
180
  const offsetY = useMotionValue(0)
182
181
  useEffect(() => {
183
182
  if (!overlayRef.current) return () => {}
@@ -195,21 +194,20 @@ export function LayoutOverlayBase(incommingProps: LayoutOverlayBaseProps) {
195
194
 
196
195
  const onClickAway = useCallback(
197
196
  (event: React.MouseEvent<HTMLDivElement>) => {
198
- const isTarget = event.target === scrollerRef.current || event.target === beforeRef.current
197
+ const isTarget =
198
+ event.target === scrollerRef.current ||
199
+ event.target === beforeRef.current ||
200
+ event.target === overlayRef.current
199
201
  if (isTarget && snap.get()) closeOverlay()
200
202
  },
201
203
  [closeOverlay, scrollerRef, snap],
202
204
  )
203
205
 
204
- const pointerEvents = useTransform(position, (p) =>
205
- p === OverlayPosition.CLOSED ? 'none' : 'auto',
206
- )
207
-
208
206
  return (
209
207
  <>
210
208
  <MotionDiv
211
209
  className={classes.backdrop}
212
- style={{ opacity: positions.open.visible, pointerEvents }}
210
+ style={{ opacity: positions.open.visible }}
213
211
  sx={[
214
212
  {
215
213
  zIndex: -1,
@@ -233,7 +231,6 @@ export function LayoutOverlayBase(incommingProps: LayoutOverlayBaseProps) {
233
231
  grid={false}
234
232
  hideScrollbar
235
233
  onClick={onClickAway}
236
- style={{ pointerEvents }}
237
234
  sx={[
238
235
  (theme) => ({
239
236
  overscrollBehavior: 'contain',
@@ -320,9 +317,9 @@ export function LayoutOverlayBase(incommingProps: LayoutOverlayBaseProps) {
320
317
  <Box
321
318
  className={classes.overlay}
322
319
  ref={overlayRef}
320
+ onClick={onClickAway}
323
321
  sx={(theme) => ({
324
322
  display: 'grid',
325
- pointerEvents: 'none',
326
323
  gridArea: 'overlay',
327
324
  scrollSnapAlign: 'start',
328
325
  scrollSnapStop: 'always',
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": "4.8.0",
5
+ "version": "4.8.1",
6
6
  "author": "",
7
7
  "license": "MIT",
8
8
  "sideEffects": false,
@@ -19,10 +19,10 @@
19
19
  "@emotion/react": "^11.9.0",
20
20
  "@emotion/server": "^11.4.0",
21
21
  "@emotion/styled": "^11.6.0",
22
- "@graphcommerce/framer-next-pages": "3.2.1",
23
- "@graphcommerce/framer-scroller": "2.1.11",
24
- "@graphcommerce/framer-utils": "3.1.2",
25
- "@graphcommerce/image": "3.1.5",
22
+ "@graphcommerce/framer-next-pages": "3.2.2",
23
+ "@graphcommerce/framer-scroller": "2.1.12",
24
+ "@graphcommerce/framer-utils": "3.1.3",
25
+ "@graphcommerce/image": "3.1.6",
26
26
  "react-is": "^17.0.0",
27
27
  "react-schemaorg": "^2.0.0",
28
28
  "schema-dts": "^1.1.0"