@graphcommerce/next-ui 7.1.0-canary.9 → 8.0.0-canary.100

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.
Files changed (39) hide show
  1. package/ActionCard/ActionCard.tsx +2 -0
  2. package/CHANGELOG.md +255 -8
  3. package/Config.graphqls +24 -0
  4. package/Footer/Footer.tsx +97 -94
  5. package/FramerScroller/ItemScroller.tsx +3 -3
  6. package/FramerScroller/SidebarGallery.tsx +181 -162
  7. package/JsonLd/JsonLd.tsx +0 -2
  8. package/LayoutDefault/components/LayoutDefault.tsx +6 -1
  9. package/LayoutParts/DesktopNavBar.tsx +2 -0
  10. package/LayoutParts/Logo.tsx +20 -20
  11. package/LazyHydrate/LazyHydrate.tsx +72 -0
  12. package/LazyHydrate/index.ts +1 -0
  13. package/Navigation/components/NavigationFab.tsx +9 -7
  14. package/Navigation/components/NavigationOverlay.tsx +9 -1
  15. package/Navigation/components/NavigationProvider.tsx +18 -4
  16. package/Overlay/components/OverlayBase.tsx +1 -1
  17. package/Overlay/components/index.ts +1 -0
  18. package/Page/CssAndFramerMotionProvider.tsx +20 -18
  19. package/PageMeta/PageMeta.tsx +20 -13
  20. package/RenderType/filterNonNullableKeys.ts +11 -14
  21. package/Row/ColumnOne/variant/VariantMessage.tsx +12 -0
  22. package/Row/ColumnOne/variant/index.ts +1 -0
  23. package/Row/index.ts +1 -0
  24. package/SkipLink/SkipLink.tsx +38 -0
  25. package/Snackbar/DismissibleSnackbar.tsx +28 -0
  26. package/Snackbar/MessageSnackbarImpl.tsx +19 -2
  27. package/Styles/EmotionProvider.tsx +8 -8
  28. package/Styles/createEmotionCache.ts +14 -0
  29. package/Styles/withEmotionCache.tsx +26 -16
  30. package/TextInputNumber/TextInputNumber.tsx +7 -1
  31. package/Theme/MuiButton.ts +2 -2
  32. package/Theme/MuiChip.ts +2 -2
  33. package/Theme/MuiFab.ts +1 -1
  34. package/Theme/MuiSlider.ts +2 -2
  35. package/Theme/MuiSnackbar.ts +6 -4
  36. package/hooks/useDateTimeFormat.ts +3 -5
  37. package/hooks/useNumberFormat.ts +3 -5
  38. package/index.ts +4 -2
  39. package/package.json +16 -18
@@ -1,6 +1,6 @@
1
- import { ComponentsVariants } from '@mui/material'
1
+ import { ComponentsVariants, Theme } from '@mui/material'
2
2
 
3
- type SnackbarVariants = NonNullable<ComponentsVariants['MuiSnackbar']>
3
+ type SnackbarVariants = NonNullable<ComponentsVariants<Theme>['MuiSnackbar']>
4
4
 
5
5
  /**
6
6
  * The current implementation of the MuiSnackbar will only be 50% wide if no width is specificed,
@@ -22,8 +22,10 @@ export const MuiSnackbar: SnackbarVariants = [
22
22
  },
23
23
  },
24
24
  '&.MuiSnackbar-anchorOriginBottomCenter': {
25
- left: 0,
26
- right: 0,
25
+ [theme.breakpoints.up('md')]: {
26
+ left: theme.page.horizontal,
27
+ right: theme.page.horizontal,
28
+ },
27
29
  transform: 'unset',
28
30
  },
29
31
  }),
@@ -1,3 +1,4 @@
1
+ import { normalizeLocale } from '@graphcommerce/lingui-next'
1
2
  import { useRouter } from 'next/router'
2
3
  import { useMemo } from 'react'
3
4
 
@@ -6,12 +7,9 @@ export type DateTimeFormatProps = Intl.DateTimeFormatOptions
6
7
  export function useDateTimeFormat(props?: DateTimeFormatProps) {
7
8
  const { locale } = useRouter()
8
9
 
9
- // Remove optional dialect from locale, which Intl.NumberFormat does not support.
10
- const strippedLocale = locale?.split('-', 2).join('-')
11
-
12
10
  const formatter = useMemo(
13
- () => new Intl.DateTimeFormat(strippedLocale, props),
14
- [strippedLocale, props],
11
+ () => new Intl.DateTimeFormat(normalizeLocale(locale), props),
12
+ [locale, props],
15
13
  )
16
14
  return formatter
17
15
  }
@@ -1,3 +1,4 @@
1
+ import { normalizeLocale } from '@graphcommerce/lingui-next'
1
2
  import { useRouter } from 'next/router'
2
3
  import { useMemo } from 'react'
3
4
 
@@ -6,12 +7,9 @@ export type NumberFormatProps = Intl.NumberFormatOptions
6
7
  export function useNumberFormat(props?: NumberFormatProps) {
7
8
  const { locale } = useRouter()
8
9
 
9
- // Remove optional dialect from locale, which Intl.NumberFormat does not support.
10
- const strippedLocale = locale?.split('-', 2).join('-')
11
-
12
10
  const formatter = useMemo(
13
- () => new Intl.NumberFormat(strippedLocale, props),
14
- [strippedLocale, props],
11
+ () => new Intl.NumberFormat(normalizeLocale(locale), props),
12
+ [locale, props],
15
13
  )
16
14
  return formatter
17
15
  }
package/index.ts CHANGED
@@ -22,15 +22,14 @@ export * from './Form/InputCheckmark'
22
22
  export * from './FramerScroller'
23
23
  export * from './FullPageMessage/FullPageMessage'
24
24
  export * from './Highlight/Highlight'
25
- export * from './hooks'
26
25
  export * from './IconHeader/IconHeader'
27
- export * from './icons'
28
26
  export * from './IconSvg'
29
27
  export * from './JsonLd/JsonLd'
30
28
  export * from './Layout'
31
29
  export * from './LayoutDefault'
32
30
  export * from './LayoutOverlay'
33
31
  export * from './LayoutParts'
32
+ export * from './LazyHydrate'
34
33
  export * from './Navigation'
35
34
  export * from './Overlay'
36
35
  export * from './OverlayOrPopperChip'
@@ -43,6 +42,7 @@ export * from './Row'
43
42
  export * from './SectionContainer/SectionContainer'
44
43
  export * from './SectionHeader/SectionHeader'
45
44
  export * from './Separator/Separator'
45
+ export * from './SkipLink/SkipLink'
46
46
  export * from './Snackbar/ErrorSnackbar'
47
47
  export * from './Snackbar/MessageSnackbar'
48
48
  export * from './Snackbar/MessageSnackbarImpl'
@@ -56,4 +56,6 @@ export * from './ToggleButton/ToggleButton'
56
56
  export * from './ToggleButtonGroup/ToggleButtonGroup'
57
57
  export * from './UspList/UspList'
58
58
  export * from './UspList/UspListItem'
59
+ export * from './hooks'
60
+ export * from './icons'
59
61
  export * from './utils/cookie'
package/package.json CHANGED
@@ -2,9 +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.9",
6
- "author": "",
7
- "license": "MIT",
5
+ "version": "8.0.0-canary.100",
8
6
  "sideEffects": false,
9
7
  "prettier": "@graphcommerce/prettier-config-pwa",
10
8
  "eslintConfig": {
@@ -15,33 +13,33 @@
15
13
  },
16
14
  "dependencies": {
17
15
  "@emotion/cache": "^11.11.0",
18
- "@emotion/react": "^11.11.1",
16
+ "@emotion/react": "^11.11.3",
19
17
  "@emotion/server": "^11.11.0",
20
18
  "@emotion/styled": "^11.11.0",
21
- "@graphcommerce/framer-next-pages": "7.1.0-canary.9",
22
- "@graphcommerce/framer-scroller": "7.1.0-canary.9",
23
- "@graphcommerce/framer-utils": "7.1.0-canary.9",
24
- "@graphcommerce/image": "7.1.0-canary.9",
25
- "cookie": "^0.5.0",
26
- "react-is": "^18.2.0",
27
- "schema-dts": "^1.1.0"
19
+ "cookie": "^0.6.0",
20
+ "react-is": "^18.2.0"
28
21
  },
29
22
  "devDependencies": {
30
- "@graphcommerce/eslint-config-pwa": "7.1.0-canary.9",
31
- "@graphcommerce/prettier-config-pwa": "7.1.0-canary.9",
32
- "@graphcommerce/typescript-config-pwa": "7.1.0-canary.9",
33
- "@types/cookie": "^0.5.2",
34
- "@types/react-is": "^18.2.1",
35
- "typescript": "5.2.2"
23
+ "@types/cookie": "^0.6.0",
24
+ "@types/react-is": "^18.2.4",
25
+ "typescript": "5.3.3"
36
26
  },
37
27
  "peerDependencies": {
28
+ "@graphcommerce/eslint-config-pwa": "^8.0.0-canary.100",
29
+ "@graphcommerce/framer-next-pages": "^8.0.0-canary.100",
30
+ "@graphcommerce/framer-scroller": "^8.0.0-canary.100",
31
+ "@graphcommerce/framer-utils": "^8.0.0-canary.100",
32
+ "@graphcommerce/image": "^8.0.0-canary.100",
33
+ "@graphcommerce/lingui-next": "^8.0.0-canary.100",
34
+ "@graphcommerce/prettier-config-pwa": "^8.0.0-canary.100",
35
+ "@graphcommerce/typescript-config-pwa": "^8.0.0-canary.100",
38
36
  "@lingui/core": "^4.2.1",
39
37
  "@lingui/macro": "^4.2.1",
40
38
  "@lingui/react": "^4.2.1",
41
39
  "@mui/lab": "^5.0.0-alpha.68",
42
40
  "@mui/material": "^5.10.16",
43
41
  "framer-motion": "^10.0.0",
44
- "next": "^13.2.0",
42
+ "next": "*",
45
43
  "react": "^18.2.0",
46
44
  "react-dom": "^18.2.0"
47
45
  }