@graphcommerce/next-ui 7.1.0-canary.32 → 7.1.0-canary.34

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,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 7.1.0-canary.34
4
+
5
+ ## 7.1.0-canary.33
6
+
3
7
  ## 7.1.0-canary.32
4
8
 
5
9
  ## 7.1.0-canary.31
@@ -0,0 +1,24 @@
1
+ extend input GraphCommerceConfig {
2
+ """
3
+ Configuration for the SidebarGallery component
4
+ """
5
+ sidebarGallery: SidebarGalleryConfig
6
+ }
7
+
8
+ """
9
+ Enumeration of all possible positions for the sidebar gallery thumbnails.
10
+ """
11
+ enum SidebarGalleryPaginationVariant {
12
+ DOTS
13
+ THUMBNAILS_BOTTOM
14
+ }
15
+
16
+ """
17
+ SidebarGalleryConfig will contain all configuration values for the Sidebar Gallery component.
18
+ """
19
+ input SidebarGalleryConfig {
20
+ """
21
+ Variant used for the pagination
22
+ """
23
+ paginationVariant: SidebarGalleryPaginationVariant
24
+ }
@@ -3,11 +3,12 @@ import {
3
3
  MotionImageAspect,
4
4
  MotionImageAspectProps,
5
5
  Scroller,
6
- ScrollerButton,
7
- ScrollerButtonProps,
8
6
  ScrollerDots,
7
+ ScrollerButton,
9
8
  ScrollerProvider,
10
9
  unstable_usePreventScroll as usePreventScroll,
10
+ ScrollerButtonProps,
11
+ ScrollerThumbnails,
11
12
  } from '@graphcommerce/framer-scroller'
12
13
  import { dvh } from '@graphcommerce/framer-utils'
13
14
  import {
@@ -30,7 +31,7 @@ import { iconChevronLeft, iconChevronRight, iconFullscreen, iconFullscreenExit }
30
31
 
31
32
  const MotionBox = styled(m.div)({})
32
33
 
33
- type OwnerState = { zoomed: boolean }
34
+ type OwnerState = { zoomed: boolean; disableZoom: boolean }
34
35
  const name = 'SidebarGallery' as const
35
36
  const parts = [
36
37
  'row',
@@ -68,8 +69,8 @@ export function SidebarGallery(props: SidebarGalleryProps) {
68
69
  aspectRatio: [width, height] = [1, 1],
69
70
  sx,
70
71
  routeHash = 'gallery',
71
- disableZoom,
72
72
  showButtons,
73
+ disableZoom = false,
73
74
  } = props
74
75
 
75
76
  const router = useRouter()
@@ -102,7 +103,7 @@ export function SidebarGallery(props: SidebarGalleryProps) {
102
103
  }
103
104
  }
104
105
 
105
- const classes = withState({ zoomed })
106
+ const classes = withState({ zoomed, disableZoom })
106
107
  const theme = useTheme()
107
108
  const windowRef = useRef(typeof window !== 'undefined' ? window : null)
108
109
 
@@ -317,7 +318,6 @@ export function SidebarGallery(props: SidebarGalleryProps) {
317
318
  className={classes.bottomCenter}
318
319
  sx={{
319
320
  display: 'flex',
320
- px: theme.page.horizontal,
321
321
  gap: theme.spacings.xxs,
322
322
  position: 'absolute',
323
323
  bottom: theme.spacings.xxs,
@@ -329,11 +329,15 @@ export function SidebarGallery(props: SidebarGalleryProps) {
329
329
  },
330
330
  }}
331
331
  >
332
- <ScrollerDots layout='position' layoutDependency={zoomed} />
332
+ {import.meta.graphCommerce.sidebarGallery?.paginationVariant ===
333
+ 'THUMBNAILS_BOTTOM' ? (
334
+ <ScrollerThumbnails images={images} />
335
+ ) : (
336
+ <ScrollerDots />
337
+ )}
333
338
  </Box>
334
339
  </MotionBox>
335
340
  </TrapFocus>
336
-
337
341
  <Box
338
342
  className={classes.sidebarWrapper}
339
343
  sx={[
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": "7.1.0-canary.32",
5
+ "version": "7.1.0-canary.34",
6
6
  "author": "",
7
7
  "license": "MIT",
8
8
  "sideEffects": false,
@@ -18,18 +18,18 @@
18
18
  "@emotion/react": "^11.11.1",
19
19
  "@emotion/server": "^11.11.0",
20
20
  "@emotion/styled": "^11.11.0",
21
- "@graphcommerce/framer-next-pages": "7.1.0-canary.32",
22
- "@graphcommerce/framer-scroller": "7.1.0-canary.32",
23
- "@graphcommerce/framer-utils": "7.1.0-canary.32",
24
- "@graphcommerce/image": "7.1.0-canary.32",
21
+ "@graphcommerce/framer-next-pages": "7.1.0-canary.34",
22
+ "@graphcommerce/framer-scroller": "7.1.0-canary.34",
23
+ "@graphcommerce/framer-utils": "7.1.0-canary.34",
24
+ "@graphcommerce/image": "7.1.0-canary.34",
25
25
  "cookie": "^0.5.0",
26
26
  "react-is": "^18.2.0",
27
27
  "schema-dts": "^1.1.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@graphcommerce/eslint-config-pwa": "7.1.0-canary.32",
31
- "@graphcommerce/prettier-config-pwa": "7.1.0-canary.32",
32
- "@graphcommerce/typescript-config-pwa": "7.1.0-canary.32",
30
+ "@graphcommerce/eslint-config-pwa": "7.1.0-canary.34",
31
+ "@graphcommerce/prettier-config-pwa": "7.1.0-canary.34",
32
+ "@graphcommerce/typescript-config-pwa": "7.1.0-canary.34",
33
33
  "@types/cookie": "^0.5.2",
34
34
  "@types/react-is": "^18.2.1",
35
35
  "typescript": "5.2.2"