@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.
- package/Blog/BlogListItem/BlogListItem.tsx +0 -1
- package/CHANGELOG.md +4 -0
- package/OverlayOrPopperChip/OverlayPanelActions.tsx +1 -1
- package/OverlayOrPopperChip/PopperPanel.tsx +1 -1
- package/OverlayOrPopperChip/PopperPanelActions.tsx +2 -2
- package/Row/IconBlocks/IconBlock.tsx +36 -33
- package/Styles/__tests__/spreadVal.test.ts +1 -1
- package/TextInputNumber/TextInputNumber.tsx +1 -0
- package/package.json +8 -8
|
@@ -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
|
@@ -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>(
|
|
18
|
-
|
|
17
|
+
export const IconBlock = React.forwardRef<HTMLAnchorElement & HTMLButtonElement, IconBlockProps>(
|
|
18
|
+
(props, ref) => {
|
|
19
|
+
const { title, children, icon, href = '#', sx = [], ...buttonProps } = props
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{title}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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:
|
|
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]"`)
|
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.
|
|
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.
|
|
22
|
-
"@graphcommerce/framer-scroller": "6.2.0-canary.
|
|
23
|
-
"@graphcommerce/framer-utils": "6.2.0-canary.
|
|
24
|
-
"@graphcommerce/image": "6.2.0-canary.
|
|
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.
|
|
31
|
-
"@graphcommerce/prettier-config-pwa": "6.2.0-canary.
|
|
32
|
-
"@graphcommerce/typescript-config-pwa": "6.2.0-canary.
|
|
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"
|