@graphcommerce/next-ui 6.2.0-canary.87 → 6.2.0-canary.89

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.
@@ -2,7 +2,6 @@ import { Box, Link, SxProps, Theme, Typography } from '@mui/material'
2
2
  import React from 'react'
3
3
  import { extendableComponent } from '../../Styles'
4
4
  import { breakpointVal } from '../../Styles/breakpointVal'
5
- import { responsiveVal } from '../../Styles/responsiveVal'
6
5
  import { useDateTimeFormat } from '../../hooks'
7
6
 
8
7
  export type BlogListItemProps = {
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.2.0-canary.89
4
+
5
+ ## 6.2.0-canary.88
6
+
3
7
  ## 6.2.0-canary.87
4
8
 
5
9
  ## 6.2.0-canary.86
@@ -24,7 +24,7 @@ export const OverlayPanelActions = (props: PanelActionsProps) => {
24
24
  <>
25
25
  <LayoutOverlayHeader
26
26
  noAlign
27
- sx={{ '&.noAlign': { mb: 0 } }}
27
+ sx={[{ '&.noAlign': { mb: 0 } }, ...(Array.isArray(sx) ? sx : [sx])]}
28
28
  switchPoint={-10000}
29
29
  size='small'
30
30
  primary={
@@ -10,7 +10,7 @@ export type PopperPanelProps = PanelProps & {
10
10
 
11
11
  export function PopperPanel(props: PopperPanelProps) {
12
12
  const { activeEl, children, ...actionsProps } = props
13
- const ref = useRef(null)
13
+ const ref = useRef<HTMLDivElement>(null)
14
14
  const movement = useHandleClickNotDrag(ref)
15
15
  const handleClickAway = () => {
16
16
  if (movement.get() === 'drag') return
@@ -9,7 +9,7 @@ import { iconClose } from '../icons'
9
9
  import { PanelActionsProps } from './types'
10
10
 
11
11
  export function PopperPanelActions(props: PanelActionsProps) {
12
- const { title, children, onReset, onClose, onApply, sx } = props
12
+ const { title, children, onReset, onClose, onApply, sx = [] } = props
13
13
 
14
14
  const fabSize = useFabSize('small')
15
15
  const svgSize = useIconSvgSize('large')
@@ -18,7 +18,7 @@ export function PopperPanelActions(props: PanelActionsProps) {
18
18
  <>
19
19
  <LayoutHeader
20
20
  noAlign
21
- sx={{ '&.noAlign': { mb: 0 } }}
21
+ sx={[{ '&.noAlign': { mb: 0 } }, ...(Array.isArray(sx) ? sx : [sx])]}
22
22
  switchPoint={-10000}
23
23
  size='small'
24
24
  primary={
@@ -14,37 +14,40 @@ const name = 'IconBlock' as const
14
14
  const parts = ['block', 'link', 'title'] as const
15
15
  const { classes } = extendableComponent(name, parts)
16
16
 
17
- export const IconBlock = React.forwardRef<HTMLAnchorElement, IconBlockProps>((props, ref) => {
18
- const { title, children, icon, href = '#', sx = [], ...buttonProps } = props
17
+ export const IconBlock = React.forwardRef<HTMLAnchorElement & HTMLButtonElement, IconBlockProps>(
18
+ (props, ref) => {
19
+ const { title, children, icon, href = '#', sx = [], ...buttonProps } = props
19
20
 
20
- return (
21
- <Button
22
- href={href}
23
- variant='outlined'
24
- color='primary'
25
- className={classes.block}
26
- {...buttonProps}
27
- sx={[
28
- (theme) => ({
29
- padding: `${theme.spacings.sm}`,
30
- textAlign: 'center',
31
- '& > *': {
32
- display: 'grid',
33
- gridAutoFlow: 'row',
34
- justifyItems: 'center',
35
- gap: `${theme.spacings.xxs}`,
36
- },
37
- }),
38
- ...(Array.isArray(sx) ? sx : [sx]),
39
- ]}
40
- >
41
- <Box>
42
- {icon}
43
- <Typography variant='subtitle1' className={classes.title} component='span'>
44
- {title}
45
- </Typography>
46
- {children}
47
- </Box>
48
- </Button>
49
- )
50
- })
21
+ return (
22
+ <Button
23
+ ref={ref}
24
+ href={href}
25
+ variant='outlined'
26
+ color='primary'
27
+ className={classes.block}
28
+ {...buttonProps}
29
+ sx={[
30
+ (theme) => ({
31
+ padding: `${theme.spacings.sm}`,
32
+ textAlign: 'center',
33
+ '& > *': {
34
+ display: 'grid',
35
+ gridAutoFlow: 'row',
36
+ justifyItems: 'center',
37
+ gap: `${theme.spacings.xxs}`,
38
+ },
39
+ }),
40
+ ...(Array.isArray(sx) ? sx : [sx]),
41
+ ]}
42
+ >
43
+ <Box>
44
+ {icon}
45
+ <Typography variant='subtitle1' className={classes.title} component='span'>
46
+ {title}
47
+ </Typography>
48
+ {children}
49
+ </Box>
50
+ </Button>
51
+ )
52
+ },
53
+ )
@@ -1,7 +1,7 @@
1
1
  import { spreadLinear, spreadVal } from '../spreadVal'
2
2
 
3
3
  it('generates the right spreadVal', () => {
4
- const s = (val: any) => JSON.stringify(val)
4
+ const s = (val: unknown) => JSON.stringify(val)
5
5
 
6
6
  expect(s(spreadLinear(15, 18, 'xl'))).toMatchInlineSnapshot(`"[15,15.53,16.2,17.28,18]"`)
7
7
  expect(s(spreadLinear(15, 18))).toMatchInlineSnapshot(`"[15,16.31,18,18,18]"`)
@@ -3,6 +3,7 @@ import {
3
3
  IconButtonProps,
4
4
  SxProps,
5
5
  Box,
6
+ // eslint-disable-next-line @typescript-eslint/no-restricted-imports
6
7
  TextField,
7
8
  TextFieldProps,
8
9
  useForkRef,
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": "6.2.0-canary.87",
5
+ "version": "6.2.0-canary.89",
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": "6.2.0-canary.87",
22
- "@graphcommerce/framer-scroller": "6.2.0-canary.87",
23
- "@graphcommerce/framer-utils": "6.2.0-canary.87",
24
- "@graphcommerce/image": "6.2.0-canary.87",
21
+ "@graphcommerce/framer-next-pages": "6.2.0-canary.89",
22
+ "@graphcommerce/framer-scroller": "6.2.0-canary.89",
23
+ "@graphcommerce/framer-utils": "6.2.0-canary.89",
24
+ "@graphcommerce/image": "6.2.0-canary.89",
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": "6.2.0-canary.87",
31
- "@graphcommerce/prettier-config-pwa": "6.2.0-canary.87",
32
- "@graphcommerce/typescript-config-pwa": "6.2.0-canary.87",
30
+ "@graphcommerce/eslint-config-pwa": "6.2.0-canary.89",
31
+ "@graphcommerce/prettier-config-pwa": "6.2.0-canary.89",
32
+ "@graphcommerce/typescript-config-pwa": "6.2.0-canary.89",
33
33
  "@types/cookie": "^0.5.1",
34
34
  "@types/react-is": "^18.2.1",
35
35
  "typescript": "5.1.3"