@graphcommerce/next-ui 3.18.2 → 3.20.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.
Files changed (97) hide show
  1. package/AppShell/AppShellSticky/index.tsx +3 -19
  2. package/AppShell/DesktopNavActions.tsx +3 -4
  3. package/AppShell/DesktopNavBar.tsx +4 -4
  4. package/AppShell/FixedFab.tsx +1 -6
  5. package/AppShell/GlobalHead.tsx +36 -0
  6. package/AppShell/Logo.tsx +11 -20
  7. package/AppShell/MenuFab.tsx +19 -7
  8. package/AppShell/MenuFabSecondaryItem.tsx +3 -3
  9. package/AppShell/PlaceholderFab/index.tsx +8 -27
  10. package/AppShell/index.tsx +19 -0
  11. package/AppShell/useFabAnimation.tsx +3 -2
  12. package/AppShell/useFixedFabAnimation.tsx +3 -2
  13. package/Blog/BlogAuthor/index.tsx +10 -6
  14. package/Blog/BlogHeader/index.tsx +7 -3
  15. package/Blog/BlogList/index.tsx +1 -1
  16. package/Blog/BlogListItem/index.tsx +2 -1
  17. package/Blog/BlogTitle/index.tsx +5 -5
  18. package/Button/index.tsx +26 -21
  19. package/ButtonLink/index.tsx +1 -1
  20. package/CHANGELOG.md +76 -0
  21. package/ChipMenu/index.tsx +2 -2
  22. package/FlagAvatar/index.tsx +3 -3
  23. package/{AppShell/Footer/index.tsx → Footer/Footer.tsx} +4 -4
  24. package/{AppShell/Footer → Footer}/SocialIcon.tsx +3 -3
  25. package/Footer/index.ts +2 -0
  26. package/Form/InputCheckmark.tsx +3 -3
  27. package/Form/index.tsx +8 -3
  28. package/FramerScroller/components/SidebarGallery.tsx +25 -21
  29. package/FramerScroller/components/SidebarSlider.tsx +1 -3
  30. package/FullPageMessage/index.tsx +1 -1
  31. package/IconHeader/index.tsx +2 -15
  32. package/Layout/components/LayoutHeader.tsx +151 -0
  33. package/Layout/components/LayoutHeaderBack.tsx +50 -0
  34. package/Layout/components/LayoutHeaderClose.tsx +27 -0
  35. package/Layout/components/LayoutHeaderContent.tsx +182 -0
  36. package/Layout/components/LayoutHeadertypes.ts +10 -0
  37. package/Layout/components/LayoutProvider.tsx +17 -0
  38. package/{Title/index.tsx → Layout/components/LayoutTitle.tsx} +24 -15
  39. package/Layout/context/layoutContext.tsx +7 -0
  40. package/Layout/hooks/useScrollY.tsx +6 -0
  41. package/Layout/index.ts +5 -0
  42. package/Layout/types.ts +5 -0
  43. package/LayoutDefault/components/LayoutDefault.tsx +90 -0
  44. package/LayoutDefault/index.ts +1 -0
  45. package/LayoutOverlay/components/LayoutOverlay.tsx +25 -0
  46. package/LayoutOverlay/components/LayoutOverlayBase.tsx +352 -0
  47. package/LayoutOverlay/components/LayoutOverlayHeader.tsx +5 -0
  48. package/LayoutOverlay/hooks/useOverlayPosition.ts +70 -0
  49. package/LayoutOverlay/index.ts +2 -0
  50. package/Page/App.tsx +2 -0
  51. package/PageMeta/index.tsx +3 -0
  52. package/Pagination/index.tsx +0 -1
  53. package/Row/ButtonLinkList/index.tsx +1 -1
  54. package/Row/ColumnOneBoxed/index.tsx +1 -1
  55. package/Row/ColumnTwoWithTop/index.tsx +3 -3
  56. package/Row/ContentLinks/index.tsx +3 -3
  57. package/Row/HeroBanner/index.tsx +28 -21
  58. package/Row/IconBlocks/index.tsx +1 -1
  59. package/Row/ImageText/index.tsx +12 -5
  60. package/Row/ImageTextBoxed/index.tsx +3 -1
  61. package/Row/ParagraphWithSidebarSlide/index.tsx +2 -0
  62. package/Row/SpecialBanner/index.tsx +11 -7
  63. package/Row/index.tsx +1 -1
  64. package/Snackbar/MessageSnackbarImpl.tsx +1 -1
  65. package/StarRatingField/index.tsx +3 -4
  66. package/Stepper/Stepper.tsx +1 -1
  67. package/Styles/breakpointVal.tsx +22 -0
  68. package/Styles/classesPicker.ts +41 -0
  69. package/Styles/responsiveVal.tsx +1 -1
  70. package/SvgImage/SvgImageSimple.tsx +14 -11
  71. package/SvgImage/index.tsx +9 -11
  72. package/TextInputNumber/index.tsx +3 -4
  73. package/Theme/types.ts +14 -12
  74. package/ToggleButton/index.tsx +3 -8
  75. package/UspList/UspListItem.tsx +4 -2
  76. package/icons/index.tsx +2 -0
  77. package/index.ts +9 -42
  78. package/package.json +8 -9
  79. package/AppShell/AppShellHeader/appShellHeaderContext.tsx +0 -11
  80. package/AppShell/AppShellHeader/index.tsx +0 -438
  81. package/AppShell/AppShellHeader/useAppShellHeaderContext.tsx +0 -6
  82. package/AppShell/AppShellProvider/index.tsx +0 -18
  83. package/AppShell/AppShellTitle/index.tsx +0 -45
  84. package/AppShell/ForwardButton.tsx +0 -53
  85. package/AppShell/FullPageShellBase.tsx +0 -82
  86. package/AppShell/MinimalPageShellBase.tsx +0 -22
  87. package/AppShell/PageShellHeader/index.tsx +0 -14
  88. package/AppShell/SheetShellBase/index.tsx +0 -114
  89. package/AppShell/SheetShellBase/useSheetStyles.ts +0 -18
  90. package/AppShell/SheetShellDragIndicator/index.tsx +0 -55
  91. package/AppShell/SheetShellHeader/index.tsx +0 -28
  92. package/AppShell/ShellBase.tsx +0 -45
  93. package/Debug/DebugSpacer.tsx +0 -51
  94. package/FramerNextPagesSlider/Slide.tsx +0 -71
  95. package/FramerNextPagesSlider/Slider.tsx +0 -39
  96. package/FramerNextPagesSlider/index.ts +0 -1
  97. package/FramerNextPagesSlider/types.ts +0 -3
@@ -2,6 +2,7 @@ import { makeStyles, Theme } from '@material-ui/core'
2
2
  import React from 'react'
3
3
  import Row from '..'
4
4
  import { UseStyles } from '../../Styles'
5
+ import { responsiveVal } from '../../Styles/responsiveVal'
5
6
 
6
7
  const useStyles = makeStyles(
7
8
  (theme: Theme) => ({
@@ -13,12 +14,15 @@ const useStyles = makeStyles(
13
14
  : theme.palette.background.paper,
14
15
  justifyItems: 'center',
15
16
  columnGap: theme.spacings.lg,
16
- padding: `${theme.spacings.xl} 0`,
17
+ paddingTop: theme.spacings.lg,
18
+ paddingBottom: theme.spacings.lg,
17
19
  [theme.breakpoints.up('md')]: {
18
- padding: 0,
20
+ paddingTop: 0,
21
+ paddingBottom: 0,
19
22
  background: 'none',
20
23
  gridTemplateColumns: '1fr 1fr',
21
24
  },
25
+ borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
22
26
  },
23
27
  asset: {
24
28
  height: '100%',
@@ -27,6 +31,7 @@ const useStyles = makeStyles(
27
31
  height: '100%',
28
32
  width: '100%',
29
33
  objectFit: 'cover',
34
+ borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
30
35
  },
31
36
  },
32
37
  copy: {
@@ -64,9 +69,11 @@ export default function ImageText(props: ImageTextProps) {
64
69
  const classes = useStyles(props)
65
70
 
66
71
  return (
67
- <Row className={classes.wrapper}>
68
- <div className={classes.asset}>{item}</div>
69
- <div className={classes.copy}>{children}</div>
72
+ <Row maxWidth={false}>
73
+ <Row className={classes.wrapper}>
74
+ <div className={classes.asset}>{item}</div>
75
+ <div className={classes.copy}>{children}</div>
76
+ </Row>{' '}
70
77
  </Row>
71
78
  )
72
79
  }
@@ -2,7 +2,7 @@ import { makeStyles, Theme } from '@material-ui/core'
2
2
  import React from 'react'
3
3
  import Row from '..'
4
4
  import { UseStyles } from '../../Styles'
5
- import responsiveVal from '../../Styles/responsiveVal'
5
+ import { responsiveVal } from '../../Styles/responsiveVal'
6
6
 
7
7
  const useStyles = makeStyles(
8
8
  (theme: Theme) => ({
@@ -17,6 +17,8 @@ const useStyles = makeStyles(
17
17
  gridTemplateColumns: '1fr auto',
18
18
  columnGap: `${theme.spacings.lg}`,
19
19
  },
20
+ borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
21
+ overflow: 'hidden',
20
22
  },
21
23
  asset: {
22
24
  height: '100%',
@@ -1,6 +1,7 @@
1
1
  import { ContainerProps, makeStyles, Theme } from '@material-ui/core'
2
2
  import Row from '..'
3
3
  import { UseStyles } from '../../Styles'
4
+ import { responsiveVal } from '../../Styles/responsiveVal'
4
5
 
5
6
  const useStyles = makeStyles(
6
7
  (theme: Theme) => ({
@@ -27,6 +28,7 @@ const useStyles = makeStyles(
27
28
  filter: 'brightness(100%)',
28
29
  height: '100%',
29
30
  },
31
+ borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
30
32
  },
31
33
  },
32
34
  copy: {
@@ -1,23 +1,26 @@
1
1
  import { ContainerProps, makeStyles, Theme, Typography } from '@material-ui/core'
2
2
  import Row from '..'
3
3
  import { UseStyles } from '../../Styles'
4
- import responsiveVal from '../../Styles/responsiveVal'
4
+ import { responsiveVal } from '../../Styles/responsiveVal'
5
5
 
6
6
  const useStyles = makeStyles(
7
7
  (theme: Theme) => ({
8
+ root: {},
8
9
  wrapper: {
9
10
  display: 'grid',
10
11
  background: theme.palette.background.paper,
11
12
  justifyItems: 'center',
12
13
  columnGap: `${theme.spacings.lg}`,
13
- padding: `${theme.spacings.lg} 0`,
14
+ paddingTop: theme.spacings.lg,
15
+ paddingBottom: theme.spacings.lg,
14
16
  justifySelf: 'start',
17
+ borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
15
18
  [theme.breakpoints.up('md')]: {
16
19
  padding: 0,
17
20
  background: 'none',
18
21
  justifySelf: 'center',
19
22
  gridTemplateColumns: '1fr 1fr',
20
- columnGap: `${theme.spacings.md}`,
23
+ columnGap: `${theme.spacings.lg}`,
21
24
  },
22
25
  },
23
26
  asset: {
@@ -28,6 +31,7 @@ const useStyles = makeStyles(
28
31
  width: responsiveVal(200, 900),
29
32
  height: 'auto',
30
33
  objectFit: 'cover',
34
+ borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
31
35
  },
32
36
  [theme.breakpoints.up('lg')]: {
33
37
  width: responsiveVal(250, 900),
@@ -87,11 +91,11 @@ export type SpecialBannerProps = UseStyles<typeof useStyles> &
87
91
 
88
92
  export default function SpecialBanner(props: SpecialBannerProps) {
89
93
  const { asset, topic, pageLinks, children, ...containerProps } = props
90
- const classes = useStyles(props)
94
+ const { root, ...classes } = useStyles(props)
91
95
 
92
96
  return (
93
- <Row maxWidth={false} {...containerProps}>
94
- <div className={classes.wrapper}>
97
+ <Row maxWidth={false} {...containerProps} classes={{ root }}>
98
+ <Row maxWidth={false} className={classes.wrapper} disableGutters>
95
99
  <div className={classes.asset}>{asset}</div>
96
100
  <div className={classes.copy}>
97
101
  {topic && (
@@ -102,7 +106,7 @@ export default function SpecialBanner(props: SpecialBannerProps) {
102
106
  <div className={classes.textContainer}>{children}</div>
103
107
  <div className={classes.links}>{pageLinks}</div>
104
108
  </div>
105
- </div>
109
+ </Row>
106
110
  </Row>
107
111
  )
108
112
  }
package/Row/index.tsx CHANGED
@@ -2,7 +2,7 @@ import { Container, styled } from '@material-ui/core'
2
2
 
3
3
  const Row = styled(Container)(
4
4
  ({ theme }) => ({
5
- marginBottom: theme.spacings.xl,
5
+ marginBottom: theme.spacings.xxl,
6
6
  }),
7
7
  { name: 'Row' },
8
8
  )
@@ -141,7 +141,7 @@ export default function MessageSnackbarImpl(props: MessageSnackbarImplProps) {
141
141
  }
142
142
 
143
143
  let icon = iconCheckmark
144
- if (severity == 'error') icon = iconSadFace
144
+ if (severity === 'error') icon = iconSadFace
145
145
 
146
146
  return (
147
147
  <Portal>
@@ -1,13 +1,12 @@
1
+ import { makeStyles, Theme } from '@material-ui/core'
1
2
  import { Rating, RatingProps } from '@material-ui/lab'
2
3
  import React from 'react'
3
- import { SvgImageSimple } from '..'
4
+ import SvgImageSimple from '../SvgImage/SvgImageSimple'
4
5
  import { iconStar } from '../icons'
5
- import { makeStyles, Theme } from '@material-ui/core'
6
6
 
7
7
  export type StarRatingFieldProps = {
8
8
  id?: string
9
9
  onChange?: (id: string, value: number) => void
10
- iconSize?: number
11
10
  } & Omit<RatingProps, 'id' | 'onChange'>
12
11
 
13
12
  const useStyles = makeStyles(
@@ -29,7 +28,7 @@ const useStyles = makeStyles(
29
28
  )
30
29
 
31
30
  export default function StarRatingField(props: StarRatingFieldProps) {
32
- const { id, onChange = () => {}, iconSize = 20, ...ratingProps } = props
31
+ const { id, onChange = () => {}, ...ratingProps } = props
33
32
  const classes = useStyles(props)
34
33
 
35
34
  return (
@@ -2,7 +2,7 @@ import { makeStyles, Theme } from '@material-ui/core'
2
2
  import clsx from 'clsx'
3
3
  import React from 'react'
4
4
  import { UseStyles } from '../Styles'
5
- import responsiveVal from '../Styles/responsiveVal'
5
+ import { responsiveVal } from '../Styles/responsiveVal'
6
6
 
7
7
  const useStyles = makeStyles(
8
8
  (theme: Theme) => ({
@@ -0,0 +1,22 @@
1
+ export function breakpointVal(
2
+ property: string,
3
+ min: number,
4
+ max: number,
5
+ breakpointsObject: Record<string, number>,
6
+ ) {
7
+ const minSize = 320
8
+ const breakpoints = Object.values(breakpointsObject)
9
+ const spread = breakpoints[breakpoints.length - 1] - minSize
10
+
11
+ return Object.fromEntries(
12
+ breakpoints.map((breakpoint, index) => {
13
+ // Get the size between this breakpoint and the previous breakpoint
14
+ const between = (breakpoint + (breakpoints[index + 1] ?? breakpoint)) / 2
15
+ // Calculate the size of the value
16
+ const size = Math.max(min, ((between - minSize) / spread) * (max - min) + min)
17
+ const value = `${Math.round(size * 100) / 100}px`
18
+
19
+ return [`@media (min-width: ${breakpoint}px )`, { [property]: value }]
20
+ }),
21
+ )
22
+ }
@@ -0,0 +1,41 @@
1
+ import { capitalize } from '@material-ui/core'
2
+ import clsx from 'clsx'
3
+
4
+ /**
5
+ * This will pick classNames from the classes object based on the given value object.sf
6
+ *
7
+ * Example:
8
+ *
9
+ * ```tsx
10
+ * const classes = makeStyles({
11
+ * root: {},
12
+ * rootColorRed: { color: 'red' }
13
+ * rootFloating: { display: 'inline-block' }
14
+ * })
15
+ *
16
+ * function MyComponent() {
17
+ * const classes = useStyles(props)
18
+ * const classNames = pickClasses(classes, { color: 'red', floating: true })
19
+ *
20
+ * return <div {...className('root')}>Hello</div>
21
+ * }
22
+ * ```
23
+ */
24
+ export function classesPicker<K extends string>(
25
+ classes: Record<string, string>,
26
+ values: Record<string, boolean | string | undefined>,
27
+ ) {
28
+ return (className: K, addClassName?: string) => {
29
+ const mapped: Record<string, string> = Object.fromEntries(
30
+ Object.entries(values)
31
+ .map(([key, value]) =>
32
+ typeof value === 'boolean' || typeof value === 'undefined'
33
+ ? [classes[`${className}${capitalize(key)}`], !!value]
34
+ : [classes[`${className}${capitalize(key)}${capitalize(value)}`], true],
35
+ )
36
+ .filter((v) => !!v[0] && v[1]),
37
+ )
38
+
39
+ return { className: clsx(classes[className], mapped, addClassName) }
40
+ }
41
+ }
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * E.g.: `responsiveVal(16, 22)` -> Will render 16px at 320px window width, 22 ad 1280 window width
5
5
  */
6
- export default function responsiveVal(
6
+ export function responsiveVal(
7
7
  min: number,
8
8
  max: number,
9
9
  maxBreakpoint = 1280,
@@ -1,13 +1,13 @@
1
- import { Image, ImageProps, isStaticImport, isStaticRequire } from '@graphcommerce/image'
2
- import { makeStyles, capitalize, Theme } from '@material-ui/core'
1
+ import { ImageProps, isStaticImport, isStaticRequire } from '@graphcommerce/image'
2
+ import { makeStyles, capitalize } from '@material-ui/core'
3
3
  import clsx from 'clsx'
4
4
  import { forwardRef } from 'react'
5
- import responsiveVal from '../Styles/responsiveVal'
5
+ import { responsiveVal } from '../Styles/responsiveVal'
6
6
 
7
7
  export type SvgImageShade = 'muted' | 'default' | 'inverted'
8
8
 
9
9
  const useStyles = makeStyles(
10
- (theme: Theme) => ({
10
+ {
11
11
  image: {
12
12
  userSelect: 'none',
13
13
  width: responsiveVal(22, 24),
@@ -29,7 +29,7 @@ const useStyles = makeStyles(
29
29
  sizeSmall: {
30
30
  width: responsiveVal(12, 16),
31
31
  height: responsiveVal(12, 16),
32
- strokeWidth: 2.3,
32
+ strokeWidth: 2.1,
33
33
  },
34
34
  sizeLarge: {
35
35
  width: responsiveVal(24, 28),
@@ -39,16 +39,16 @@ const useStyles = makeStyles(
39
39
  sizeXl: {
40
40
  width: responsiveVal(38, 62),
41
41
  height: responsiveVal(38, 62),
42
- strokeWidth: 1.5,
42
+ strokeWidth: 1.4,
43
43
  },
44
44
  sizeXxl: {
45
45
  width: responsiveVal(96, 148),
46
46
  height: responsiveVal(96, 148),
47
- strokeWidth: 1,
47
+ strokeWidth: 0.8,
48
48
  },
49
49
  muted: {},
50
50
  inverted: {},
51
- }),
51
+ },
52
52
  { name: 'SvgImageSimple' },
53
53
  )
54
54
 
@@ -60,8 +60,9 @@ type SvgImageSimpleProps = Omit<ImageProps, 'fixed'> & {
60
60
  inverted?: boolean
61
61
  }
62
62
 
63
- const SvgImageSimple = forwardRef<HTMLImageElement, SvgImageSimpleProps>((props, ref) => {
63
+ const SvgImageSimple = forwardRef<SVGSVGElement, SvgImageSimpleProps>((props, ref) => {
64
64
  const {
65
+ style,
65
66
  className,
66
67
  size = 'medium',
67
68
  muted,
@@ -72,13 +73,14 @@ const SvgImageSimple = forwardRef<HTMLImageElement, SvgImageSimpleProps>((props,
72
73
  } = props
73
74
  const classes = useStyles()
74
75
 
75
- let src = imageProps.src
76
+ let { src } = imageProps
76
77
  let staticSrc = ''
77
78
  if (isStaticImport(src)) staticSrc = (isStaticRequire(src) ? src.default : src).src
78
79
  src = typeof src === 'string' ? src : staticSrc
79
80
 
80
81
  return (
81
82
  <svg
83
+ ref={ref}
82
84
  className={clsx(
83
85
  className,
84
86
  classes.image,
@@ -87,8 +89,9 @@ const SvgImageSimple = forwardRef<HTMLImageElement, SvgImageSimpleProps>((props,
87
89
  inverted && classes.inverted,
88
90
  )}
89
91
  aria-hidden='true'
92
+ style={style}
90
93
  >
91
- <use href={`${src}#icon`}></use>
94
+ <use href={`${src}#icon`} />
92
95
  </svg>
93
96
  )
94
97
  })
@@ -61,16 +61,14 @@ export default function SvgImage(props: SvgImageProps) {
61
61
  })
62
62
 
63
63
  return (
64
- <>
65
- <Image
66
- layout='fixed'
67
- unoptimized
68
- src={src}
69
- className={classes.root}
70
- // height={24}
71
- // width={24}
72
- {...imageProps}
73
- />
74
- </>
64
+ <Image
65
+ layout='fixed'
66
+ unoptimized
67
+ src={src}
68
+ className={classes.root}
69
+ // height={24}
70
+ // width={24}
71
+ {...imageProps}
72
+ />
75
73
  )
76
74
  }
@@ -5,18 +5,17 @@ import {
5
5
  OutlinedTextFieldProps,
6
6
  TextField,
7
7
  TextFieldProps,
8
- Theme,
9
8
  useForkRef,
10
9
  } from '@material-ui/core'
11
10
  import clsx from 'clsx'
12
11
  import React, { ChangeEvent, Ref, useCallback, useEffect, useRef, useState } from 'react'
13
12
  import { UseStyles } from '../Styles'
14
- import responsiveVal from '../Styles/responsiveVal'
13
+ import { responsiveVal } from '../Styles/responsiveVal'
15
14
  import SvgImageSimple from '../SvgImage/SvgImageSimple'
16
15
  import { iconMin, iconPlus } from '../icons'
17
16
 
18
17
  const useStyles = makeStyles(
19
- (theme: Theme) => ({
18
+ {
20
19
  quantity: {
21
20
  width: responsiveVal(80, 120),
22
21
  backgroundColor: 'inherit',
@@ -34,7 +33,7 @@ const useStyles = makeStyles(
34
33
  adornedStart: {
35
34
  paddingLeft: responsiveVal(7, 14),
36
35
  },
37
- }),
36
+ },
38
37
  { name: 'TextInputNumber' },
39
38
  )
40
39
 
package/Theme/types.ts CHANGED
@@ -7,7 +7,7 @@ declare module '@material-ui/core/styles/createPalette' {
7
7
  }
8
8
 
9
9
  declare module '@material-ui/core/styles/createTheme' {
10
- interface Theme {
10
+ interface ThemeOptions {
11
11
  spacings: {
12
12
  xxs: string
13
13
  xs: string
@@ -20,14 +20,15 @@ declare module '@material-ui/core/styles/createTheme' {
20
20
  page: {
21
21
  horizontal: string
22
22
  vertical: string
23
- headerInnerHeight: {
24
- xs: string
25
- sm: string
26
- md: string
27
- }
23
+ }
24
+ appShell: {
25
+ headerHeightSm: string
26
+ headerHeightMd: string
27
+ appBarHeightMd: string
28
+ appBarInnerHeightMd: string
28
29
  }
29
30
  }
30
- interface ThemeOptions {
31
+ interface Theme {
31
32
  spacings: {
32
33
  xxs: string
33
34
  xs: string
@@ -40,11 +41,12 @@ declare module '@material-ui/core/styles/createTheme' {
40
41
  page: {
41
42
  horizontal: string | number
42
43
  vertical: string | number
43
- headerInnerHeight: {
44
- xs: string
45
- sm: string
46
- md: string
47
- }
44
+ }
45
+ appShell: {
46
+ headerHeightSm: string
47
+ headerHeightMd: string
48
+ appBarHeightMd: string
49
+ appBarInnerHeightMd: string
48
50
  }
49
51
  }
50
52
  }
@@ -1,10 +1,9 @@
1
- // @inheritedComponent ButtonBase
2
-
3
- import { capitalize, lighten, makeStyles, Theme } from '@material-ui/core'
1
+ import { makeStyles, Theme } from '@material-ui/core'
4
2
  import clsx from 'clsx'
5
3
  import React, { FormEvent } from 'react'
6
4
  import Button, { ButtonProps } from '../Button'
7
5
  import { UseStyles } from '../Styles'
6
+ import { responsiveVal } from '../Styles/responsiveVal'
8
7
 
9
8
  type StyleProps = { selected?: boolean; color?: ButtonProps['color'] }
10
9
 
@@ -12,11 +11,7 @@ export const useStyles = makeStyles(
12
11
  (theme: Theme) => ({
13
12
  /* Styles applied to the root element. */
14
13
  root: {
15
- backgroundColor:
16
- theme.palette.type === 'light'
17
- ? theme.palette.background.default
18
- : lighten(theme.palette.background.default, theme.palette.action.hoverOpacity),
19
- borderRadius: 4,
14
+ borderRadius: responsiveVal(theme.shape.borderRadius * 2, theme.shape.borderRadius * 3),
20
15
  border: `1px solid ${theme.palette.divider}`,
21
16
  '&$disabled': {
22
17
  borderWidth: 2,
@@ -1,8 +1,8 @@
1
1
  import { makeStyles, Theme } from '@material-ui/core'
2
2
  import clsx from 'clsx'
3
3
  import React from 'react'
4
- import { responsiveVal } from '..'
5
4
  import { UseStyles } from '../Styles'
5
+ import { responsiveVal } from '../Styles/responsiveVal'
6
6
 
7
7
  const useStyles = makeStyles(
8
8
  (theme: Theme) => ({
@@ -10,13 +10,15 @@ const useStyles = makeStyles(
10
10
  display: 'grid',
11
11
  gridAutoFlow: 'column',
12
12
  alignItems: 'center',
13
- gridTemplateColumns: `${responsiveVal(22, 32)} auto`,
13
+ gridTemplateColumns: `${responsiveVal(32, 38)} auto`,
14
14
  gap: theme.spacings.xs,
15
15
  '& > p': {
16
16
  ...theme.typography.body2,
17
17
  },
18
18
  },
19
19
  icon: {
20
+ display: 'flex',
21
+
20
22
  '& > * > img': {
21
23
  display: 'block',
22
24
  },
package/icons/index.tsx CHANGED
@@ -24,6 +24,7 @@ export { default as iconPhone } from './smartphone.svg'
24
24
  export { default as iconPlus } from './plus.svg'
25
25
  export { default as iconClose } from './close.svg'
26
26
  export { default as iconFullscreen } from './maximise.svg'
27
+ export { default as iconOrderBefore } from './calendar.svg'
27
28
  export { default as iconBox } from './box.svg'
28
29
  export { default as iconHome } from './home-alt.svg'
29
30
  export { default as iconId } from './credit-card.svg'
@@ -34,3 +35,4 @@ export { default as iconShutdown } from './power.svg'
34
35
  export { default as iconParty } from './happy-face.svg'
35
36
  export { default as iconStar } from './star.svg'
36
37
  export { default as iconEmailOutline } from './envelope-alt.svg'
38
+ export { default as icon404 } from './explore.svg'
package/index.ts CHANGED
@@ -1,42 +1,15 @@
1
+ export * from './AppShell'
2
+ export * from './Layout'
3
+ export * from './LayoutDefault'
4
+ export * from './LayoutOverlay'
5
+ export * from './Footer'
6
+
1
7
  export * from './AnimatedRow'
2
8
  export { default as AnimatedRow } from './AnimatedRow'
3
9
  export * from './ApolloError/ApolloErrorAlert'
4
10
  export { default as ApolloErrorAlert } from './ApolloError/ApolloErrorAlert'
5
11
  export * from './ApolloError/ApolloErrorFullPage'
6
12
  export { default as ApolloErrorFullPage } from './ApolloError/ApolloErrorFullPage'
7
- export * from './AppShell/AppShellHeader'
8
- export { default as AppShellHeader } from './AppShell/AppShellHeader'
9
- export { default as AppShellProvider } from './AppShell/AppShellProvider'
10
- export { default as AppShellSticky } from './AppShell/AppShellSticky'
11
- export { default as AppShellTitle } from './AppShell/AppShellTitle'
12
- export { default as DesktopNavActions } from './AppShell/DesktopNavActions'
13
- export * from './AppShell/DesktopNavBar'
14
- export { default as DesktopNavBar } from './AppShell/DesktopNavBar'
15
- export { default as FixedFab } from './AppShell/FixedFab'
16
- export * from './AppShell/ForwardButton'
17
- export { default as ForwardButton } from './AppShell/ForwardButton'
18
- export * from './AppShell/FullPageShellBase'
19
- export { default as Logo } from './AppShell/Logo'
20
- export * from './AppShell/Logo'
21
- export { default as FullPageShellBase } from './AppShell/FullPageShellBase'
22
- export * from './AppShell/Menu'
23
- export * from './AppShell/MenuFab'
24
- export { default as MenuFab } from './AppShell/MenuFab'
25
- export * from './AppShell/MenuFabSecondaryItem'
26
- export { default as Footer } from './AppShell/Footer'
27
- export { default as MenuFabSecondaryItem } from './AppShell/MenuFabSecondaryItem'
28
- export { default as SocialIcon } from './AppShell/Footer/SocialIcon'
29
- export * from './AppShell/PageShellHeader'
30
- export { default as PlaceholderFab } from './AppShell/PlaceholderFab'
31
- export { default as PageShellHeader } from './AppShell/PageShellHeader'
32
- export * from './AppShell/SheetShellBase'
33
- export { default as SheetShellBase } from './AppShell/SheetShellBase'
34
- export { default as SheetShellDragIndicator } from './AppShell/SheetShellDragIndicator'
35
- export { default as SheetShellHeader } from './AppShell/SheetShellHeader'
36
- export * from './AppShell/ShellBase'
37
- export { default as ShellBase } from './AppShell/ShellBase'
38
- export { default as useFabAnimation } from './AppShell/useFabAnimation'
39
- export { default as useFixedFabAnimation } from './AppShell/useFixedFabAnimation'
40
13
  export * from './AspectRatioContainer'
41
14
  export { default as AspectRationContainer } from './AspectRatioContainer'
42
15
  export * from './Blog/BlogContent'
@@ -45,7 +18,6 @@ export * from './Blog/BlogHeader'
45
18
  export { default as BlogHeader } from './Blog/BlogHeader'
46
19
  export * from './Blog/BlogTitle'
47
20
  export { default as BlogTitle } from './Blog/BlogTitle'
48
- export * from './Blog/BlogTags'
49
21
  export { default as BlogTags } from './Blog/BlogTags'
50
22
  export * from './Blog/BlogAuthor'
51
23
  export { default as BlogAuthor } from './Blog/BlogAuthor'
@@ -61,8 +33,6 @@ export * from './ChipMenu'
61
33
  export { default as ChipMenu } from './ChipMenu'
62
34
  export * from './ContainerWithHeader'
63
35
  export { default as ContainerWithHeader } from './ContainerWithHeader'
64
- export * from './Debug/DebugSpacer'
65
- export { default as DebugSpacer } from './Debug/DebugSpacer'
66
36
  export * from './FlagAvatar'
67
37
  export { default as FlagAvatar } from './FlagAvatar'
68
38
  export * from './Form'
@@ -73,10 +43,6 @@ export { default as FormHeader } from './Form/FormHeader'
73
43
  export { default as FormRow } from './Form/FormRow'
74
44
  export * from './Form/InputCheckmark'
75
45
  export { default as InputCheckmark } from './Form/InputCheckmark'
76
- export * from './FramerNextPagesSlider/Slide'
77
- export { default as Slide } from './FramerNextPagesSlider/Slide'
78
- export * from './FramerNextPagesSlider/Slider'
79
- export { default as Slider } from './FramerNextPagesSlider/Slider'
80
46
  export * from './FramerScroller/components/SidebarGallery'
81
47
  export { default as SidebarGallery } from './FramerScroller/components/SidebarGallery'
82
48
  export * from './FramerScroller/components/SidebarSlider'
@@ -145,7 +111,9 @@ export * from './Stepper/Stepper'
145
111
  export { default as Stepper } from './Stepper/Stepper'
146
112
  export { default as StyledBadge } from './StyledBadge'
147
113
  export * from './Styles'
148
- export { default as responsiveVal } from './Styles/responsiveVal'
114
+ export * from './Styles/breakpointVal'
115
+ export * from './Styles/responsiveVal'
116
+ export * from './Styles/classesPicker'
149
117
  export * from './SvgImage'
150
118
  export { default as SvgImage } from './SvgImage'
151
119
  export { default as SvgImageSimple } from './SvgImage/SvgImageSimple'
@@ -153,7 +121,6 @@ export * from './TextInputNumber'
153
121
  export { default as TextInputNumber } from './TextInputNumber'
154
122
  export * from './TimeAgo'
155
123
  export { default as TimeAgo } from './TimeAgo'
156
- export { default as Title } from './Title'
157
124
  export { default as ToggleButton } from './ToggleButton'
158
125
  export type { ToggleButtonProps } from './ToggleButton'
159
126
  export { default as ToggleButtonGroup } from './ToggleButtonGroup'