@graphcommerce/next-ui 4.2.1 → 4.2.4

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 (77) hide show
  1. package/AnimatedRow/{index.tsx → AnimatedRow.tsx} +0 -0
  2. package/Blog/BlogAuthor/{index.tsx → BlogAuthor.tsx} +2 -2
  3. package/Blog/BlogContent/{index.tsx → BlogContent.tsx} +0 -0
  4. package/Blog/BlogHeader/{index.tsx → BlogHeader.tsx} +0 -0
  5. package/Blog/BlogList/{index.tsx → BlogList.tsx} +1 -1
  6. package/Blog/BlogListItem/{index.tsx → BlogListItem.tsx} +0 -0
  7. package/Blog/BlogTags/BlogTag.tsx +2 -2
  8. package/Blog/BlogTags/{index.tsx → BlogTags.tsx} +0 -0
  9. package/Blog/BlogTitle/{index.tsx → BlogTitle.tsx} +0 -0
  10. package/Button/{index.tsx → index.ts} +0 -0
  11. package/CHANGELOG.md +727 -1435
  12. package/ChipMenu/{index.tsx → ChipMenu.tsx} +4 -2
  13. package/ContainerWithHeader/{index.tsx → ContainerWithHeader.tsx} +1 -1
  14. package/FlagAvatar/{index.tsx → FlagAvatar.tsx} +0 -0
  15. package/FramerScroller/SidebarGallery.tsx +1 -1
  16. package/FramerScroller/SidebarSlider.tsx +1 -1
  17. package/FullPageMessage/{index.tsx → FullPageMessage.tsx} +0 -0
  18. package/Highlight/{index.tsx → Highlight.tsx} +0 -0
  19. package/IconHeader/{index.tsx → IconHeader.tsx} +0 -0
  20. package/JsonLd/{index.tsx → JsonLd.tsx} +0 -0
  21. package/Layout/components/LayoutHeader.tsx +3 -3
  22. package/Layout/components/LayoutHeaderBack.tsx +1 -1
  23. package/Layout/components/LayoutHeaderClose.tsx +1 -1
  24. package/Layout/components/LayoutHeaderContent.tsx +1 -1
  25. package/Layout/components/LayoutProvider.tsx +2 -2
  26. package/Layout/context/layoutContext.tsx +1 -3
  27. package/Layout/hooks/useScrollY.tsx +1 -1
  28. package/LayoutDefault/components/LayoutDefault.tsx +14 -4
  29. package/LayoutOverlay/components/LayoutOverlayBase.tsx +1 -1
  30. package/LayoutParts/MenuFab.tsx +1 -0
  31. package/Page/types.ts +1 -0
  32. package/PageLoadIndicator/{index.tsx → PageLoadIndicator.tsx} +0 -0
  33. package/PageMeta/PageMeta.tsx +91 -0
  34. package/Pagination/{index.tsx → Pagination.tsx} +0 -0
  35. package/RenderType/{index.tsx → RenderType.tsx} +0 -0
  36. package/Row/ButtonLinkList/ButtonLinkList.tsx +2 -2
  37. package/Row/ColumnOne/{index.tsx → ColumnOne.tsx} +0 -0
  38. package/Row/ColumnOneBoxed/{index.tsx → ColumnOneBoxed.tsx} +1 -1
  39. package/Row/ColumnOneCentered/{index.tsx → ColumnOneCentered.tsx} +1 -1
  40. package/Row/ColumnThree/{index.tsx → ColumnThree.tsx} +1 -1
  41. package/Row/ColumnTwo/{index.tsx → ColumnTwo.tsx} +1 -1
  42. package/Row/ColumnTwoSpread/{index.tsx → ColumnTwoSpread.tsx} +1 -1
  43. package/Row/ColumnTwoWithTop/{index.tsx → ColumnTwoWithTop.tsx} +1 -1
  44. package/Row/ContentLinks/{index.tsx → ContentLinks.tsx} +0 -0
  45. package/Row/HeroBanner/{index.tsx → HeroBanner.tsx} +1 -1
  46. package/Row/IconBlocks/{IconBlock/index.tsx → IconBlock.tsx} +1 -1
  47. package/Row/IconBlocks/{index.tsx → IconBlocks.tsx} +1 -1
  48. package/Row/ImageText/{index.tsx → ImageText.tsx} +1 -1
  49. package/Row/ImageTextBoxed/{index.tsx → ImageTextBoxed.tsx} +1 -1
  50. package/Row/ParagraphWithSidebarSlide/{index.tsx → ParagraphWithSidebarSlide.tsx} +1 -1
  51. package/Row/Quote/{index.tsx → Quote.tsx} +1 -1
  52. package/Row/{index.tsx → Row.tsx} +0 -0
  53. package/Row/SpecialBanner/{index.tsx → SpecialBanner.tsx} +1 -1
  54. package/Row/index.ts +18 -0
  55. package/SectionContainer/{index.tsx → SectionContainer.tsx} +1 -1
  56. package/SectionHeader/{index.tsx → SectionHeader.tsx} +0 -0
  57. package/Separator/{index.tsx → Separator.tsx} +0 -0
  58. package/Snackbar/MessageSnackbarImpl.tsx +2 -1
  59. package/StarRatingField/{index.tsx → StarRatingField.tsx} +0 -0
  60. package/Styles/{index.tsx → index.ts} +0 -9
  61. package/Styles/withTheme.tsx +1 -0
  62. package/TextInputNumber/{index.tsx → TextInputNumber.tsx} +1 -5
  63. package/Theme/MuiButton.ts +3 -3
  64. package/Theme/MuiFab.ts +1 -1
  65. package/Theme/MuiSlider.ts +1 -0
  66. package/Theme/themeDefaults.ts +1 -1
  67. package/TimeAgo/{index.tsx → TimeAgo.tsx} +0 -0
  68. package/ToggleButton/{index.tsx → ToggleButton.tsx} +1 -0
  69. package/ToggleButtonGroup/{index.tsx → ToggleButtonGroup.tsx} +8 -6
  70. package/UspList/{index.tsx → UspList.tsx} +0 -0
  71. package/docs/components/ComponentChild.tsx +1 -0
  72. package/docs/components/ComponentChildVariant.tsx +1 -0
  73. package/docs/components/ComponentChildVariantExtendable.tsx +1 -0
  74. package/icons/{index.tsx → index.ts} +0 -0
  75. package/index.ts +28 -45
  76. package/package.json +9 -10
  77. package/PageMeta/index.tsx +0 -43
@@ -33,14 +33,13 @@ const ToggleButtonGroup = React.forwardRef<HTMLDivElement, ToggleButtonGroupProp
33
33
 
34
34
  const classes = withState({ orientation, size })
35
35
 
36
- /* eslint-disable @typescript-eslint/no-unsafe-argument */
37
- const handleChange = (event, buttonValue) => {
36
+ const handleChange = (event: React.MouseEvent<HTMLElement, MouseEvent>, buttonValue: unknown) => {
38
37
  if (!onChange) return
39
38
 
40
- const index = value && value.indexOf(buttonValue)
39
+ const index = Boolean(value) && (value.indexOf(buttonValue) as number)
41
40
  let newValue: string[]
42
41
 
43
- if (value && index >= 0) {
42
+ if (value && index && index >= 0) {
44
43
  newValue = value.slice()
45
44
  newValue.splice(index, 1)
46
45
  } else {
@@ -49,7 +48,10 @@ const ToggleButtonGroup = React.forwardRef<HTMLDivElement, ToggleButtonGroupProp
49
48
  onChange(event, newValue)
50
49
  }
51
50
 
52
- const handleExclusiveChange = (event, buttonValue) => {
51
+ const handleExclusiveChange = (
52
+ event: React.MouseEvent<HTMLElement, MouseEvent>,
53
+ buttonValue: unknown,
54
+ ) => {
53
55
  if (!onChange || value === buttonValue) return
54
56
  if (required) onChange(event, buttonValue)
55
57
  else onChange(event, value === buttonValue ? null : buttonValue)
@@ -101,7 +103,7 @@ const ToggleButtonGroup = React.forwardRef<HTMLDivElement, ToggleButtonGroupProp
101
103
  onChange: exclusive ? handleExclusiveChange : handleChange,
102
104
  selected:
103
105
  child.props.selected === undefined
104
- ? isValueSelected(child.props.value, value)
106
+ ? isValueSelected(child.props.value as string, value as string | string[])
105
107
  : child.props.selected,
106
108
  })
107
109
  })}
File without changes
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
1
2
  import { extendableComponent } from '@graphcommerce/next-ui'
2
3
  import { styled } from '@mui/material'
3
4
  import { ComponentProps } from 'react'
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
1
2
  import { extendableComponent } from '@graphcommerce/next-ui'
2
3
  import { styled } from '@mui/material'
3
4
  import { ComponentProps } from 'react'
@@ -1,3 +1,4 @@
1
+ /* eslint-disable import/no-extraneous-dependencies */
1
2
  import { ExtendableComponent, extendableComponent } from '@graphcommerce/next-ui'
2
3
  import { styled } from '@mui/material'
3
4
  import { ComponentProps } from 'react'
File without changes
package/index.ts CHANGED
@@ -1,15 +1,15 @@
1
- export * from './AnimatedRow'
2
- export * from './Blog/BlogAuthor'
3
- export * from './Blog/BlogContent'
4
- export * from './Blog/BlogHeader'
5
- export * from './Blog/BlogList'
6
- export * from './Blog/BlogListItem'
7
- export * from './Blog/BlogTags'
8
- export * from './Blog/BlogTitle'
1
+ export * from './AnimatedRow/AnimatedRow'
2
+ export * from './Blog/BlogAuthor/BlogAuthor'
3
+ export * from './Blog/BlogContent/BlogContent'
4
+ export * from './Blog/BlogHeader/BlogHeader'
5
+ export * from './Blog/BlogList/BlogList'
6
+ export * from './Blog/BlogListItem/BlogListItem'
7
+ export * from './Blog/BlogTags/BlogTags'
8
+ export * from './Blog/BlogTitle/BlogTitle'
9
9
  export * from './Button'
10
- export * from './ChipMenu'
11
- export * from './ContainerWithHeader'
12
- export * from './FlagAvatar'
10
+ export * from './ChipMenu/ChipMenu'
11
+ export * from './ContainerWithHeader/ContainerWithHeader'
12
+ export * from './FlagAvatar/FlagAvatar'
13
13
  export * from './Footer'
14
14
  export * from './Form/Form'
15
15
  export * from './Form/FormActions'
@@ -18,51 +18,34 @@ export * from './Form/FormHeader'
18
18
  export * from './Form/FormRow'
19
19
  export * from './Form/InputCheckmark'
20
20
  export * from './FramerScroller'
21
- export * from './FullPageMessage'
22
- export * from './Highlight'
23
- export * from './IconHeader'
21
+ export * from './FullPageMessage/FullPageMessage'
22
+ export * from './Highlight/Highlight'
23
+ export * from './IconHeader/IconHeader'
24
24
  export * from './icons'
25
- export * from './JsonLd'
25
+ export * from './JsonLd/JsonLd'
26
26
  export * from './Layout'
27
27
  export * from './LayoutDefault'
28
28
  export * from './LayoutOverlay'
29
29
  export * from './LayoutParts'
30
30
  export * from './Page'
31
- export * from './PageLoadIndicator'
32
- export * from './PageMeta'
33
- export * from './Pagination'
34
- export * from './RenderType'
31
+ export * from './PageLoadIndicator/PageLoadIndicator'
32
+ export * from './PageMeta/PageMeta'
33
+ export * from './Pagination/Pagination'
34
+ export * from './RenderType/RenderType'
35
35
  export * from './Row'
36
- export * from './Row/ButtonLinkList'
37
- export * from './Row/ColumnOne'
38
- export * from './Row/ColumnOneBoxed'
39
- export * from './Row/ColumnOneCentered'
40
- export * from './Row/ColumnThree'
41
- export * from './Row/ColumnTwo'
42
- export * from './Row/ColumnTwoSpread'
43
- export * from './Row/ColumnTwoWithTop'
44
- export * from './Row/ContentLinks'
45
- export * from './Row/HeroBanner'
46
- export * from './Row/IconBlocks'
47
- export * from './Row/IconBlocks/IconBlock'
48
- export * from './Row/ImageText'
49
- export * from './Row/ImageTextBoxed'
50
- export * from './Row/ParagraphWithSidebarSlide'
51
- export * from './Row/Quote'
52
- export * from './Row/SpecialBanner'
53
- export * from './SectionContainer'
54
- export * from './SectionHeader'
55
- export * from './Separator'
36
+ export * from './SectionContainer/SectionContainer'
37
+ export * from './SectionHeader/SectionHeader'
38
+ export * from './Separator/Separator'
56
39
  export * from './Snackbar/MessageSnackbar'
57
40
  export * from './Snackbar/MessageSnackbarImpl'
58
- export * from './StarRatingField'
41
+ export * from './StarRatingField/StarRatingField'
59
42
  export * from './Stepper/Stepper'
60
43
  export * from './Styles'
61
44
  export * from './IconSvg'
62
- export * from './TextInputNumber'
45
+ export * from './TextInputNumber/TextInputNumber'
63
46
  export * from './Theme'
64
- export * from './TimeAgo'
65
- export * from './ToggleButton'
66
- export * from './ToggleButtonGroup'
67
- export * from './UspList'
47
+ export * from './TimeAgo/TimeAgo'
48
+ export * from './ToggleButton/ToggleButton'
49
+ export * from './ToggleButtonGroup/ToggleButtonGroup'
50
+ export * from './UspList/UspList'
68
51
  export * from './UspList/UspListItem'
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.2.1",
5
+ "version": "4.2.4",
6
6
  "author": "",
7
7
  "license": "MIT",
8
8
  "sideEffects": false,
@@ -16,13 +16,13 @@
16
16
  "dependencies": {
17
17
  "@emotion/babel-preset-css-prop": "^11.2.0",
18
18
  "@emotion/cache": "^11.7.1",
19
- "@emotion/react": "^11.7.1",
19
+ "@emotion/react": "^11.8.2",
20
20
  "@emotion/server": "^11.4.0",
21
21
  "@emotion/styled": "^11.6.0",
22
- "@graphcommerce/framer-next-pages": "^3.1.1",
23
- "@graphcommerce/framer-scroller": "^2.0.5",
24
- "@graphcommerce/framer-utils": "^3.0.3",
25
- "@graphcommerce/image": "^3.1.0",
22
+ "@graphcommerce/framer-next-pages": "^3.1.2",
23
+ "@graphcommerce/framer-scroller": "^2.0.6",
24
+ "@graphcommerce/framer-utils": "^3.0.4",
25
+ "@graphcommerce/image": "^3.1.1",
26
26
  "react-is": "^17.0.2",
27
27
  "react-schemaorg": "^2.0.0",
28
28
  "schema-dts": "^1.1.0",
@@ -30,7 +30,6 @@
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@lingui/macro": "^3.13.2",
33
- "@mui/base": "^5.0.0-alpha.68",
34
33
  "@mui/lab": "^5.0.0-alpha.68",
35
34
  "@mui/material": "^5.4.1",
36
35
  "framer-motion": "^6.2.4",
@@ -39,11 +38,11 @@
39
38
  "react-dom": "^17.0.2"
40
39
  },
41
40
  "devDependencies": {
42
- "@graphcommerce/eslint-config-pwa": "^4.0.4",
43
- "@graphcommerce/prettier-config-pwa": "^4.0.2",
41
+ "@graphcommerce/eslint-config-pwa": "^4.0.5",
42
+ "@graphcommerce/prettier-config-pwa": "^4.0.3",
44
43
  "@graphcommerce/typescript-config-pwa": "^4.0.2",
45
44
  "@playwright/test": "^1.19.1",
46
45
  "@types/react-is": "^17.0.3",
47
- "typescript": "^4.5.5"
46
+ "typescript": "^4.6.2"
48
47
  }
49
48
  }
@@ -1,43 +0,0 @@
1
- import { usePageContext } from '@graphcommerce/framer-next-pages'
2
- import Head from 'next/head'
3
-
4
- // https://developers.google.com/search/docs/advanced/robots/robots_meta_tag#directives
5
- export type MetaRobots =
6
- | 'noindex'
7
- | 'nofollow'
8
- | 'noarchive'
9
- | 'nosnippet'
10
- | 'notranslate'
11
- | 'noimageindex'
12
- | `unavailable_after:${string}`
13
- | `max-snippet:${number}`
14
- | `max-image-preview:${'none' | 'standard' | 'large'}`
15
- | `max-video-preview:${number}`
16
- type MetaRobotsAll = ['all' | 'none']
17
-
18
- export type PageMetaProps = {
19
- title: string
20
- canonical?: `http://${string}` | `https://${string}` | string
21
- metaDescription?: string
22
- metaRobots?: MetaRobotsAll | MetaRobots[]
23
- }
24
-
25
- export function PageMeta(props: PageMetaProps) {
26
- const { active } = usePageContext()
27
- const { title, canonical, metaDescription, metaRobots = ['all'] } = props
28
-
29
- if (!(canonical ?? 'http').startsWith('http'))
30
- throw new Error(`canonical must start with http:// or https://, '${canonical}' given`)
31
-
32
- if (!active) return null
33
- return (
34
- <Head>
35
- <title>{title.trim()}</title>
36
- {metaDescription && (
37
- <meta name='description' content={metaDescription.trim()} key='meta-description' />
38
- )}
39
- <meta name='robots' content={metaRobots.join(',')} key='meta-robots' />
40
- {canonical && <link rel='canonical' href={canonical} key='canonical' />}
41
- </Head>
42
- )
43
- }