@xyo-network/react-card 3.0.0 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/CardContentEx.tsx","../../src/components/CardEx.tsx","../../src/components/FullWidthCard/FullWidthCard.tsx","../../src/components/PageCard.tsx","../../src/components/SimpleCard/SimpleCard.tsx"],"sourcesContent":["import { CardContent, CardContentProps, styled } from '@mui/material'\nimport { useShareForwardedRef } from '@xyo-network/react-shared'\nimport React, { forwardRef, useEffect } from 'react'\n\nconst CardContentExRoot = styled(CardContent, {\n name: 'CardContentEx',\n shouldForwardProp: (prop: string) => !['variant', 'removePadding'].includes(prop),\n slot: 'Root',\n})<CardContentExProps>(({ variant, removePadding }) => ({\n ...((variant === 'scrollable' || removePadding) && {\n [':last-child']: {\n paddingBottom: 0,\n },\n overflow: 'auto',\n paddingTop: 0,\n ...(removePadding && { padding: 0 }),\n }),\n}))\n\nexport type CardContentExProps = CardContentProps & {\n refreshRef?: number\n removePadding?: boolean\n scrollToTop?: number\n variant?: 'scrollable' | 'normal'\n}\n\nexport const CardContentExWithRef = forwardRef<HTMLDivElement | null, CardContentExProps>(({ scrollToTop = 0, refreshRef = 0, ...props }, ref) => {\n const sharedRef = useShareForwardedRef<HTMLDivElement>(ref, refreshRef)\n\n useEffect(() => {\n if (sharedRef && scrollToTop) {\n sharedRef.current?.scroll({ behavior: 'smooth', top: 0 })\n }\n }, [sharedRef, scrollToTop])\n\n return <CardContentExRoot ref={sharedRef} {...props} />\n})\n\nCardContentExWithRef.displayName = 'CardContentEx'\n\nexport const CardContentEx = CardContentExWithRef\n","import { Card, CardProps } from '@mui/material'\nimport { useGradientStyles } from '@xyo-network/react-shared'\nimport React, { forwardRef } from 'react'\n\nexport interface CardExProps extends CardProps {\n gradient?: 'border' | 'background'\n}\n\nexport const CardExWithRef = forwardRef<HTMLDivElement, CardExProps>(({ style, gradient, ...props }, ref) => {\n const { styles } = useGradientStyles()\n const gradientStyle\n = gradient === 'border'\n ? styles.border\n : gradient === 'background'\n ? styles.background\n : {}\n return (\n <Card\n style={{\n ...gradientStyle,\n ...style,\n }}\n ref={ref}\n {...props}\n />\n )\n})\n\nCardExWithRef.displayName = 'CardEx'\n\nexport const CardEx = CardExWithRef\n","import { ArrowForwardRounded as ArrowForwardRoundedIcon } from '@mui/icons-material'\nimport { alpha, Card, CardActions, CardContent, CardMedia, CardProps, Grid, IconButton, Typography, useTheme, Zoom } from '@mui/material'\nimport { FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useIsMobile } from '@xyo-network/react-shared'\nimport React, { ReactNode, useState } from 'react'\nimport { To, useNavigate } from 'react-router-dom'\n\nexport interface FullWidthCardProps extends CardProps {\n cardIsButton?: boolean\n desc?: ReactNode\n href?: string\n linkText?: string\n media?: string\n name: ReactNode\n small?: boolean\n to?: To\n}\n\nexport const FullWidthCard: React.FC<FullWidthCardProps> = ({ cardIsButton, desc, href, media, name, small, to, ...props }) => {\n const theme = useTheme()\n const [raised, setRaised] = useState(false)\n const navigate = useNavigate()\n const isMobile = useIsMobile()\n\n const localRouteChange = (to: To | undefined) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n to ? navigate(to) : navigate('/404')\n }\n const externalRouteChange = (href: string | undefined) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n href ? window.open(href) : navigate('/404')\n }\n\n return (\n <Card\n elevation={raised ? 3 : 0}\n style={{ height: '100%', width: '100%' }}\n {...props}\n sx={{\n '&:hover': {\n cursor: 'pointer',\n },\n 'backgroundColor': alpha(theme.palette.primary.light, 0.05),\n }}\n onMouseEnter={() =>\n isMobile\n ? null\n : cardIsButton\n ? setRaised(true)\n : null}\n onMouseLeave={() =>\n isMobile\n ? null\n : cardIsButton\n ? setRaised(false)\n : null}\n onClick={() =>\n cardIsButton\n ? href\n ? externalRouteChange(href)\n : to\n ? localRouteChange(to)\n : navigate('/404')\n : null}\n >\n {media\n ? <CardMedia component=\"img\" height=\"100\" image={media} alt=\"\" />\n : null}\n\n <CardContent>\n <Grid container alignItems=\"center\" paddingY={2} paddingX={2}>\n <Grid item xs={12} md={6}>\n {typeof name === 'string'\n ? (\n <Typography fontWeight={700} variant=\"h2\" textAlign=\"left\" paddingBottom={1}>\n {name}\n </Typography>\n )\n : name}\n </Grid>\n <Grid item xs={12} md={5}>\n <Typography variant=\"body1\" fontWeight={400} textAlign=\"left\">\n {desc}\n </Typography>\n </Grid>\n <Grid item xs={1} display={isMobile ? 'none' : 'flex'} justifyContent=\"center\">\n <Zoom in={raised}>\n <IconButton\n color=\"primary\"\n size={small ? 'small' : 'medium'}\n onClick={() =>\n href\n ? externalRouteChange(href)\n : to\n ? localRouteChange(to)\n : navigate('/404')}\n disableFocusRipple\n disableRipple\n disableTouchRipple\n >\n <ArrowForwardRoundedIcon fontSize={small ? 'small' : 'medium'} />\n </IconButton>\n </Zoom>\n </Grid>\n </Grid>\n </CardContent>\n <CardActions sx={{ display: { md: isMobile ? 'flex' : 'none' } }}>\n <FlexGrowCol alignItems=\"flex-end\">\n <IconButton\n color=\"primary\"\n size={small ? 'small' : 'medium'}\n onClick={() =>\n href\n ? externalRouteChange(href)\n : to\n ? localRouteChange(to)\n : navigate('/404')}\n disableFocusRipple\n disableRipple\n disableTouchRipple\n >\n <ArrowForwardRoundedIcon fontSize={small ? 'small' : 'medium'} />\n </IconButton>\n </FlexGrowCol>\n </CardActions>\n </Card>\n )\n}\n","import { Refresh as RefreshIcon } from '@mui/icons-material'\nimport { CardHeader, CardHeaderProps, IconButton } from '@mui/material'\nimport { TypographyEx } from '@xyo-network/react-shared'\nimport React, { forwardRef, ReactNode } from 'react'\n\nimport { CardEx, CardExProps } from './CardEx.tsx'\n\nexport interface PageCardProps extends CardExProps {\n action?: ReactNode\n onRefresh?: () => void\n subheader?: CardHeaderProps['subheader']\n}\n\nconst PageCardWithRef = forwardRef<HTMLDivElement, PageCardProps>(({ subheader, title, onRefresh, children, action, style, ...props }, ref) => {\n return (\n <CardEx style={{ backgroundColor: 'transparent', position: 'relative', ...style }} elevation={0} ref={ref} {...props}>\n <CardHeader\n title={(\n <TypographyEx variant=\"h5\" gutterBottom>\n {title}\n </TypographyEx>\n )}\n subheader={<TypographyEx variant=\"subtitle1\">{subheader}</TypographyEx>}\n action={\n action ?? (\n <>\n {onRefresh\n ? (\n <IconButton onClick={() => onRefresh?.()}>\n <RefreshIcon />\n </IconButton>\n )\n : null}\n </>\n )\n }\n />\n {children}\n </CardEx>\n )\n})\n\nPageCardWithRef.displayName = 'PageCard'\n\nexport const PageCard = PageCardWithRef\n","import { ArrowForwardRounded as ArrowForwardRoundedIcon } from '@mui/icons-material'\nimport { alpha, CardActions, CardContent, CardMedia, IconButton, Typography, useTheme } from '@mui/material'\nimport { FlexCol, FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useIsMobile } from '@xyo-network/react-shared'\nimport React, { ReactNode, useState } from 'react'\nimport { To, useNavigate } from 'react-router-dom'\n\nimport { CardEx, CardExProps } from '../CardEx.tsx'\n\nexport interface SimpleCardProps extends CardExProps {\n desc?: ReactNode\n headline?: ReactNode\n href?: string\n iconImage?: string\n interactionVariant?: 'button' | 'card'\n media?: string\n small?: boolean\n subtitle?: string\n to?: To\n}\n\nexport const SimpleCard: React.FC<SimpleCardProps> = ({\n desc,\n iconImage,\n interactionVariant = 'card',\n headline,\n href,\n media,\n small,\n subtitle,\n sx,\n to,\n ...props\n}) => {\n const theme = useTheme()\n const [raised, setRaised] = useState(false)\n const navigate = useNavigate()\n const isMobile = useIsMobile()\n const localRouteChange = (to: To | undefined) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n to ? navigate(to) : navigate('/404')\n }\n const externalRouteChange = (href: string | undefined) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n href ? window.open(href) : navigate('/404')\n }\n return (\n <CardEx\n elevation={raised ? 3 : 0}\n sx={{\n '&:hover': {\n cursor: interactionVariant == 'button' ? 'pointer' : null,\n },\n 'backgroundColor': alpha(theme.palette.primary.light, 0.05),\n ...sx,\n }}\n onMouseEnter={() =>\n isMobile\n ? null\n : interactionVariant == 'button'\n ? setRaised(true)\n : null}\n onMouseLeave={() =>\n isMobile\n ? null\n : interactionVariant == 'button'\n ? setRaised(false)\n : null}\n onClick={() =>\n interactionVariant == 'button'\n ? href\n ? externalRouteChange(href)\n : to\n ? localRouteChange(to)\n : navigate('/404')\n : null}\n {...props}\n >\n {media\n ? <CardMedia component=\"img\" height=\"100\" image={media} alt=\"\" />\n : null}\n\n <CardContent sx={{ height: '100%' }}>\n <FlexCol width=\"100%\" alignItems=\"flex-start\">\n {iconImage\n ? <img src={iconImage} height=\"40px\" style={{ paddingBottom: '8px' }} />\n : null}\n {typeof headline === 'string'\n ? (\n <Typography variant={small ? 'body1' : 'h6'} textAlign=\"left\" gutterBottom>\n {headline}\n </Typography>\n )\n : headline}\n {subtitle\n ? (\n <Typography variant=\"subtitle2\" textAlign=\"left\" gutterBottom>\n {subtitle}\n </Typography>\n )\n : null}\n <Typography variant={small ? 'caption' : 'body1'} textAlign=\"left\" gutterBottom>\n {desc}\n </Typography>\n </FlexCol>\n </CardContent>\n {interactionVariant == 'button'\n ? (\n <CardActions>\n <FlexGrowCol alignItems=\"flex-end\">\n <IconButton\n color={raised ? 'secondary' : 'primary'}\n size={small ? 'small' : 'medium'}\n onClick={() =>\n href\n ? externalRouteChange(href)\n : to\n ? localRouteChange(to)\n : navigate('/404')}\n disableFocusRipple\n disableRipple\n disableTouchRipple\n >\n <ArrowForwardRoundedIcon fontSize={small ? 'small' : 'medium'} />\n </IconButton>\n </FlexGrowCol>\n </CardActions>\n )\n : null}\n </CardEx>\n )\n}\n"],"mappings":";;;;AAAA,SAASA,aAA+BC,cAAc;AACtD,SAASC,4BAA4B;AACrC,OAAOC,SAASC,YAAYC,iBAAiB;AAE7C,IAAMC,oBAAoBC,OAAOC,aAAa;EAC5CC,MAAM;EACNC,mBAAmB,wBAACC,SAAiB,CAAC;IAAC;IAAW;IAAiBC,SAASD,IAAAA,GAAz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A;IAAIC,KAAK5C;IAAWoC,QAAO;IAAOS,OAAO;MAAEC,eAAe;IAAM;OACjE,MACH,OAAO5C,aAAa,WAEf,gBAAAqB,OAAA,cAACwB,aAAAA;IAAWC,SAAS3C,QAAQ,UAAU;IAAM4C,WAAU;IAAOC,cAAAA;KAC3DhD,QAAAA,IAGLA,UACHI,WAEK,gBAAAiB,OAAA,cAACwB,aAAAA;IAAWC,SAAQ;IAAYC,WAAU;IAAOC,cAAAA;KAC9C5C,QAAAA,IAGL,MACJ,gBAAAiB,OAAA,cAACwB,aAAAA;IAAWC,SAAS3C,QAAQ,YAAY;IAAS4C,WAAU;IAAOC,cAAAA;KAChEnD,IAAAA,CAAAA,CAAAA,GAINE,sBAAsB,WAEjB,gBAAAsB,OAAA,cAAC4B,cAAAA,MACC,gBAAA5B,OAAA,cAAC6B,cAAAA;IAAYV,YAAW;KACtB,gBAAAnB,OAAA,cAAC8B,aAAAA;IACCC,OAAO1C,SAAS,cAAc;IAC9B2C,MAAMlD,QAAQ,UAAU;IACxB4B,SAAS,6BACP9B,OACIiB,oBAAoBjB,IAAAA,IACpBK,KACEW,iBAAiBX,EAAAA,IACjBO,SAAS,MAAA,GALR;IAMTyC,oBAAAA;IACAC,eAAAA;IACAC,oBAAAA;KAEA,gBAAAnC,OAAA,cAACoC,0BAAAA;IAAwBC,UAAUvD,QAAQ,UAAU;UAK7D,IAAA;AAGV,GA9GqD;","names":["CardContent","styled","useShareForwardedRef","React","forwardRef","useEffect","CardContentExRoot","styled","CardContent","name","shouldForwardProp","prop","includes","slot","variant","removePadding","paddingBottom","overflow","paddingTop","padding","CardContentExWithRef","forwardRef","scrollToTop","refreshRef","props","ref","sharedRef","useShareForwardedRef","useEffect","current","scroll","behavior","top","displayName","CardContentEx","Card","useGradientStyles","React","forwardRef","CardExWithRef","style","gradient","props","ref","styles","gradientStyle","border","background","displayName","CardEx","ArrowForwardRounded","ArrowForwardRoundedIcon","alpha","Card","CardActions","CardContent","CardMedia","Grid","IconButton","Typography","useTheme","Zoom","FlexGrowCol","useIsMobile","React","useState","useNavigate","FullWidthCard","cardIsButton","desc","href","media","name","small","to","props","theme","useTheme","raised","setRaised","useState","navigate","useNavigate","isMobile","useIsMobile","localRouteChange","externalRouteChange","window","open","React","Card","elevation","style","height","width","sx","cursor","alpha","palette","primary","light","onMouseEnter","onMouseLeave","onClick","CardMedia","component","image","alt","CardContent","Grid","container","alignItems","paddingY","paddingX","item","xs","md","Typography","fontWeight","variant","textAlign","paddingBottom","display","justifyContent","Zoom","in","IconButton","color","size","disableFocusRipple","disableRipple","disableTouchRipple","ArrowForwardRoundedIcon","fontSize","CardActions","FlexGrowCol","Refresh","RefreshIcon","CardHeader","IconButton","TypographyEx","React","forwardRef","PageCardWithRef","forwardRef","subheader","title","onRefresh","children","action","style","props","ref","React","CardEx","backgroundColor","position","elevation","CardHeader","TypographyEx","variant","gutterBottom","IconButton","onClick","RefreshIcon","displayName","PageCard","ArrowForwardRounded","ArrowForwardRoundedIcon","alpha","CardActions","CardContent","CardMedia","IconButton","Typography","useTheme","FlexCol","FlexGrowCol","useIsMobile","React","useState","useNavigate","SimpleCard","desc","iconImage","interactionVariant","headline","href","media","small","subtitle","sx","to","props","theme","useTheme","raised","setRaised","useState","navigate","useNavigate","isMobile","useIsMobile","localRouteChange","externalRouteChange","window","open","React","CardEx","elevation","cursor","alpha","palette","primary","light","onMouseEnter","onMouseLeave","onClick","CardMedia","component","height","image","alt","CardContent","FlexCol","width","alignItems","img","src","style","paddingBottom","Typography","variant","textAlign","gutterBottom","CardActions","FlexGrowCol","IconButton","color","size","disableFocusRipple","disableRipple","disableTouchRipple","ArrowForwardRoundedIcon","fontSize"]}
1
+ {"version":3,"sources":["../../src/components/CardContentEx.tsx","../../src/components/CardEx.tsx","../../src/components/FullWidthCard/FullWidthCard.tsx","../../src/components/PageCard.tsx","../../src/components/SimpleCard/SimpleCard.tsx"],"sourcesContent":["import type { CardContentProps } from '@mui/material'\nimport { CardContent, styled } from '@mui/material'\nimport { useShareForwardedRef } from '@xyo-network/react-shared'\nimport React, { forwardRef, useEffect } from 'react'\n\nconst CardContentExRoot = styled(CardContent, {\n name: 'CardContentEx',\n shouldForwardProp: (prop: string) => !['variant', 'removePadding'].includes(prop),\n slot: 'Root',\n})<CardContentExProps>(({ variant, removePadding }) => ({\n ...((variant === 'scrollable' || removePadding) && {\n [':last-child']: {\n paddingBottom: 0,\n },\n overflow: 'auto',\n paddingTop: 0,\n ...(removePadding && { padding: 0 }),\n }),\n}))\n\nexport type CardContentExProps = CardContentProps & {\n refreshRef?: number\n removePadding?: boolean\n scrollToTop?: number\n variant?: 'scrollable' | 'normal'\n}\n\nexport const CardContentExWithRef = forwardRef<HTMLDivElement | null, CardContentExProps>(({ scrollToTop = 0, refreshRef = 0, ...props }, ref) => {\n const sharedRef = useShareForwardedRef<HTMLDivElement>(ref, refreshRef)\n\n useEffect(() => {\n if (sharedRef && scrollToTop) {\n sharedRef.current?.scroll({ behavior: 'smooth', top: 0 })\n }\n }, [sharedRef, scrollToTop])\n\n return <CardContentExRoot ref={sharedRef} {...props} />\n})\n\nCardContentExWithRef.displayName = 'CardContentEx'\n\nexport const CardContentEx = CardContentExWithRef\n","import type { CardProps } from '@mui/material'\nimport { Card } from '@mui/material'\nimport { useGradientStyles } from '@xyo-network/react-shared'\nimport React, { forwardRef } from 'react'\n\nexport interface CardExProps extends CardProps {\n gradient?: 'border' | 'background'\n}\n\nexport const CardExWithRef = forwardRef<HTMLDivElement, CardExProps>(({ style, gradient, ...props }, ref) => {\n const { styles } = useGradientStyles()\n const gradientStyle\n = gradient === 'border'\n ? styles.border\n : gradient === 'background'\n ? styles.background\n : {}\n return (\n <Card\n style={{\n ...gradientStyle,\n ...style,\n }}\n ref={ref}\n {...props}\n />\n )\n})\n\nCardExWithRef.displayName = 'CardEx'\n\nexport const CardEx = CardExWithRef\n","import { ArrowForwardRounded as ArrowForwardRoundedIcon } from '@mui/icons-material'\nimport type { CardProps } from '@mui/material'\nimport { alpha, Card, CardActions, CardContent, CardMedia, Grid, IconButton, Typography, useTheme, Zoom } from '@mui/material'\nimport { FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useIsMobile } from '@xyo-network/react-shared'\nimport type { ReactNode } from 'react'\nimport React, { useState } from 'react'\nimport type { To } from 'react-router-dom'\nimport { useNavigate } from 'react-router-dom'\n\nexport interface FullWidthCardProps extends CardProps {\n cardIsButton?: boolean\n desc?: ReactNode\n href?: string\n linkText?: string\n media?: string\n name: ReactNode\n small?: boolean\n to?: To\n}\n\nexport const FullWidthCard: React.FC<FullWidthCardProps> = ({ cardIsButton, desc, href, media, name, small, to, ...props }) => {\n const theme = useTheme()\n const [raised, setRaised] = useState(false)\n const navigate = useNavigate()\n const isMobile = useIsMobile()\n\n const localRouteChange = (to: To | undefined) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n to ? navigate(to) : navigate('/404')\n }\n const externalRouteChange = (href: string | undefined) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n href ? window.open(href) : navigate('/404')\n }\n\n return (\n <Card\n elevation={raised ? 3 : 0}\n style={{ height: '100%', width: '100%' }}\n {...props}\n sx={{\n '&:hover': {\n cursor: 'pointer',\n },\n 'backgroundColor': alpha(theme.palette.primary.light, 0.05),\n }}\n onMouseEnter={() =>\n isMobile\n ? null\n : cardIsButton\n ? setRaised(true)\n : null}\n onMouseLeave={() =>\n isMobile\n ? null\n : cardIsButton\n ? setRaised(false)\n : null}\n onClick={() =>\n cardIsButton\n ? href\n ? externalRouteChange(href)\n : to\n ? localRouteChange(to)\n : navigate('/404')\n : null}\n >\n {media\n ? <CardMedia component=\"img\" height=\"100\" image={media} alt=\"\" />\n : null}\n\n <CardContent>\n <Grid container alignItems=\"center\" paddingY={2} paddingX={2}>\n <Grid item xs={12} md={6}>\n {typeof name === 'string'\n ? (\n <Typography fontWeight={700} variant=\"h2\" textAlign=\"left\" paddingBottom={1}>\n {name}\n </Typography>\n )\n : name}\n </Grid>\n <Grid item xs={12} md={5}>\n <Typography variant=\"body1\" fontWeight={400} textAlign=\"left\">\n {desc}\n </Typography>\n </Grid>\n <Grid item xs={1} display={isMobile ? 'none' : 'flex'} justifyContent=\"center\">\n <Zoom in={raised}>\n <IconButton\n color=\"primary\"\n size={small ? 'small' : 'medium'}\n onClick={() =>\n href\n ? externalRouteChange(href)\n : to\n ? localRouteChange(to)\n : navigate('/404')}\n disableFocusRipple\n disableRipple\n disableTouchRipple\n >\n <ArrowForwardRoundedIcon fontSize={small ? 'small' : 'medium'} />\n </IconButton>\n </Zoom>\n </Grid>\n </Grid>\n </CardContent>\n <CardActions sx={{ display: { md: isMobile ? 'flex' : 'none' } }}>\n <FlexGrowCol alignItems=\"flex-end\">\n <IconButton\n color=\"primary\"\n size={small ? 'small' : 'medium'}\n onClick={() =>\n href\n ? externalRouteChange(href)\n : to\n ? localRouteChange(to)\n : navigate('/404')}\n disableFocusRipple\n disableRipple\n disableTouchRipple\n >\n <ArrowForwardRoundedIcon fontSize={small ? 'small' : 'medium'} />\n </IconButton>\n </FlexGrowCol>\n </CardActions>\n </Card>\n )\n}\n","import { Refresh as RefreshIcon } from '@mui/icons-material'\nimport type { CardHeaderProps } from '@mui/material'\nimport { CardHeader, IconButton } from '@mui/material'\nimport { TypographyEx } from '@xyo-network/react-shared'\nimport type { ReactNode } from 'react'\nimport React, { forwardRef } from 'react'\n\nimport type { CardExProps } from './CardEx.tsx'\nimport { CardEx } from './CardEx.tsx'\n\nexport interface PageCardProps extends CardExProps {\n action?: ReactNode\n onRefresh?: () => void\n subheader?: CardHeaderProps['subheader']\n}\n\nconst PageCardWithRef = forwardRef<HTMLDivElement, PageCardProps>(({ subheader, title, onRefresh, children, action, style, ...props }, ref) => {\n return (\n <CardEx style={{ backgroundColor: 'transparent', position: 'relative', ...style }} elevation={0} ref={ref} {...props}>\n <CardHeader\n title={(\n <TypographyEx variant=\"h5\" gutterBottom>\n {title}\n </TypographyEx>\n )}\n subheader={<TypographyEx variant=\"subtitle1\">{subheader}</TypographyEx>}\n action={\n action ?? (\n <>\n {onRefresh\n ? (\n <IconButton onClick={() => onRefresh?.()}>\n <RefreshIcon />\n </IconButton>\n )\n : null}\n </>\n )\n }\n />\n {children}\n </CardEx>\n )\n})\n\nPageCardWithRef.displayName = 'PageCard'\n\nexport const PageCard = PageCardWithRef\n","import { ArrowForwardRounded as ArrowForwardRoundedIcon } from '@mui/icons-material'\nimport { alpha, CardActions, CardContent, CardMedia, IconButton, Typography, useTheme } from '@mui/material'\nimport { FlexCol, FlexGrowCol } from '@xylabs/react-flexbox'\nimport { useIsMobile } from '@xyo-network/react-shared'\nimport type { ReactNode } from 'react'\nimport React, { useState } from 'react'\nimport type { To } from 'react-router-dom'\nimport { useNavigate } from 'react-router-dom'\n\nimport type { CardExProps } from '../CardEx.tsx'\nimport { CardEx } from '../CardEx.tsx'\n\nexport interface SimpleCardProps extends CardExProps {\n desc?: ReactNode\n headline?: ReactNode\n href?: string\n iconImage?: string\n interactionVariant?: 'button' | 'card'\n media?: string\n small?: boolean\n subtitle?: string\n to?: To\n}\n\nexport const SimpleCard: React.FC<SimpleCardProps> = ({\n desc,\n iconImage,\n interactionVariant = 'card',\n headline,\n href,\n media,\n small,\n subtitle,\n sx,\n to,\n ...props\n}) => {\n const theme = useTheme()\n const [raised, setRaised] = useState(false)\n const navigate = useNavigate()\n const isMobile = useIsMobile()\n const localRouteChange = (to: To | undefined) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n to ? navigate(to) : navigate('/404')\n }\n const externalRouteChange = (href: string | undefined) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n href ? window.open(href) : navigate('/404')\n }\n return (\n <CardEx\n elevation={raised ? 3 : 0}\n sx={{\n '&:hover': {\n cursor: interactionVariant == 'button' ? 'pointer' : null,\n },\n 'backgroundColor': alpha(theme.palette.primary.light, 0.05),\n ...sx,\n }}\n onMouseEnter={() =>\n isMobile\n ? null\n : interactionVariant == 'button'\n ? setRaised(true)\n : null}\n onMouseLeave={() =>\n isMobile\n ? null\n : interactionVariant == 'button'\n ? setRaised(false)\n : null}\n onClick={() =>\n interactionVariant == 'button'\n ? href\n ? externalRouteChange(href)\n : to\n ? localRouteChange(to)\n : navigate('/404')\n : null}\n {...props}\n >\n {media\n ? <CardMedia component=\"img\" height=\"100\" image={media} alt=\"\" />\n : null}\n\n <CardContent sx={{ height: '100%' }}>\n <FlexCol width=\"100%\" alignItems=\"flex-start\">\n {iconImage\n ? <img src={iconImage} height=\"40px\" style={{ paddingBottom: '8px' }} />\n : null}\n {typeof headline === 'string'\n ? (\n <Typography variant={small ? 'body1' : 'h6'} textAlign=\"left\" gutterBottom>\n {headline}\n </Typography>\n )\n : headline}\n {subtitle\n ? (\n <Typography variant=\"subtitle2\" textAlign=\"left\" gutterBottom>\n {subtitle}\n </Typography>\n )\n : null}\n <Typography variant={small ? 'caption' : 'body1'} textAlign=\"left\" gutterBottom>\n {desc}\n </Typography>\n </FlexCol>\n </CardContent>\n {interactionVariant == 'button'\n ? (\n <CardActions>\n <FlexGrowCol alignItems=\"flex-end\">\n <IconButton\n color={raised ? 'secondary' : 'primary'}\n size={small ? 'small' : 'medium'}\n onClick={() =>\n href\n ? externalRouteChange(href)\n : to\n ? localRouteChange(to)\n : navigate('/404')}\n disableFocusRipple\n disableRipple\n disableTouchRipple\n >\n <ArrowForwardRoundedIcon fontSize={small ? 'small' : 'medium'} />\n </IconButton>\n </FlexGrowCol>\n </CardActions>\n )\n : null}\n </CardEx>\n )\n}\n"],"mappings":";;;;AACA,SAASA,aAAaC,cAAc;AACpC,SAASC,4BAA4B;AACrC,OAAOC,SAASC,YAAYC,iBAAiB;AAE7C,IAAMC,oBAAoBC,OAAOC,aAAa;EAC5CC,MAAM;EACNC,mBAAmB,wBAACC,SAAiB,CAAC;IAAC;IAAW;IAAiBC,SAASD,IAAAA,GAAzD;EACnBE,MAAM;AACR,CAAA,EAAuB,CAAC,EAAEC,SAASC,cAAa,OAAQ;EACtD,IAAK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AAa,WAEf,gBAAAqB,OAAA,cAACwB,aAAAA;IAAWC,SAAS3C,QAAQ,UAAU;IAAM4C,WAAU;IAAOC,cAAAA;KAC3DhD,QAAAA,IAGLA,UACHI,WAEK,gBAAAiB,OAAA,cAACwB,aAAAA;IAAWC,SAAQ;IAAYC,WAAU;IAAOC,cAAAA;KAC9C5C,QAAAA,IAGL,MACJ,gBAAAiB,OAAA,cAACwB,aAAAA;IAAWC,SAAS3C,QAAQ,YAAY;IAAS4C,WAAU;IAAOC,cAAAA;KAChEnD,IAAAA,CAAAA,CAAAA,GAINE,sBAAsB,WAEjB,gBAAAsB,OAAA,cAAC4B,cAAAA,MACC,gBAAA5B,OAAA,cAAC6B,cAAAA;IAAYV,YAAW;KACtB,gBAAAnB,OAAA,cAAC8B,aAAAA;IACCC,OAAO1C,SAAS,cAAc;IAC9B2C,MAAMlD,QAAQ,UAAU;IACxB4B,SAAS,6BACP9B,OACIiB,oBAAoBjB,IAAAA,IACpBK,KACEW,iBAAiBX,EAAAA,IACjBO,SAAS,MAAA,GALR;IAMTyC,oBAAAA;IACAC,eAAAA;IACAC,oBAAAA;KAEA,gBAAAnC,OAAA,cAACoC,0BAAAA;IAAwBC,UAAUvD,QAAQ,UAAU;UAK7D,IAAA;AAGV,GA9GqD;","names":["CardContent","styled","useShareForwardedRef","React","forwardRef","useEffect","CardContentExRoot","styled","CardContent","name","shouldForwardProp","prop","includes","slot","variant","removePadding","paddingBottom","overflow","paddingTop","padding","CardContentExWithRef","forwardRef","scrollToTop","refreshRef","props","ref","sharedRef","useShareForwardedRef","useEffect","current","scroll","behavior","top","displayName","CardContentEx","Card","useGradientStyles","React","forwardRef","CardExWithRef","style","gradient","props","ref","styles","gradientStyle","border","background","displayName","CardEx","ArrowForwardRounded","ArrowForwardRoundedIcon","alpha","Card","CardActions","CardContent","CardMedia","Grid","IconButton","Typography","useTheme","Zoom","FlexGrowCol","useIsMobile","React","useState","useNavigate","FullWidthCard","cardIsButton","desc","href","media","name","small","to","props","theme","useTheme","raised","setRaised","useState","navigate","useNavigate","isMobile","useIsMobile","localRouteChange","externalRouteChange","window","open","React","Card","elevation","style","height","width","sx","cursor","alpha","palette","primary","light","onMouseEnter","onMouseLeave","onClick","CardMedia","component","image","alt","CardContent","Grid","container","alignItems","paddingY","paddingX","item","xs","md","Typography","fontWeight","variant","textAlign","paddingBottom","display","justifyContent","Zoom","in","IconButton","color","size","disableFocusRipple","disableRipple","disableTouchRipple","ArrowForwardRoundedIcon","fontSize","CardActions","FlexGrowCol","Refresh","RefreshIcon","CardHeader","IconButton","TypographyEx","React","forwardRef","PageCardWithRef","forwardRef","subheader","title","onRefresh","children","action","style","props","ref","React","CardEx","backgroundColor","position","elevation","CardHeader","TypographyEx","variant","gutterBottom","IconButton","onClick","RefreshIcon","displayName","PageCard","ArrowForwardRounded","ArrowForwardRoundedIcon","alpha","CardActions","CardContent","CardMedia","IconButton","Typography","useTheme","FlexCol","FlexGrowCol","useIsMobile","React","useState","useNavigate","SimpleCard","desc","iconImage","interactionVariant","headline","href","media","small","subtitle","sx","to","props","theme","useTheme","raised","setRaised","useState","navigate","useNavigate","isMobile","useIsMobile","localRouteChange","externalRouteChange","window","open","React","CardEx","elevation","cursor","alpha","palette","primary","light","onMouseEnter","onMouseLeave","onClick","CardMedia","component","height","image","alt","CardContent","FlexCol","width","alignItems","img","src","style","paddingBottom","Typography","variant","textAlign","gutterBottom","CardActions","FlexGrowCol","IconButton","color","size","disableFocusRipple","disableRipple","disableTouchRipple","ArrowForwardRoundedIcon","fontSize"]}
package/package.json CHANGED
@@ -7,12 +7,12 @@
7
7
  },
8
8
  "bugs": {
9
9
  "email": "support@xyo.network",
10
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
10
+ "url": "git+https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
11
11
  },
12
12
  "dependencies": {
13
- "@xylabs/react-flexbox": "^4.0.0",
14
- "@xyo-network/react-shared": "^3.0.0",
15
- "react-router-dom": "^6.26.0"
13
+ "@xylabs/react-flexbox": "^4.0.3",
14
+ "@xyo-network/react-shared": "^3.0.2",
15
+ "react-router-dom": "^6.26.1"
16
16
  },
17
17
  "peerDependencies": {
18
18
  "@mui/icons-material": "^5",
@@ -23,9 +23,9 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@storybook/react": "^8.2.9",
26
- "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.15",
27
- "@xylabs/tsconfig-react": "^4.0.0-rc.15",
28
- "@xyo-network/react-storybook": "^3.0.0",
26
+ "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.20",
27
+ "@xylabs/tsconfig-react": "^4.0.0-rc.20",
28
+ "@xyo-network/react-storybook": "^3.0.2",
29
29
  "typescript": "^5.5.4"
30
30
  },
31
31
  "description": "Common React library for all XYO projects that use React",
@@ -55,7 +55,7 @@
55
55
  },
56
56
  "repository": {
57
57
  "type": "git",
58
- "url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
58
+ "url": "git+https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
59
59
  },
60
60
  "scripts": {
61
61
  "lint-pkg": "npmPkgJsonLint .",
@@ -63,6 +63,6 @@
63
63
  },
64
64
  "sideEffects": false,
65
65
  "types": "dist/browser/index.d.ts",
66
- "version": "3.0.0",
66
+ "version": "3.0.2",
67
67
  "type": "module"
68
68
  }
@@ -1,5 +1,5 @@
1
1
  import { Button, Typography } from '@mui/material'
2
- import { Decorator, Meta, StoryFn } from '@storybook/react'
2
+ import type { Decorator, Meta, StoryFn } from '@storybook/react'
3
3
  import { FlexGrowCol } from '@xylabs/react-flexbox'
4
4
  import { WithRefDecorator } from '@xyo-network/react-storybook'
5
5
  import React, { useRef, useState } from 'react'
@@ -1,4 +1,5 @@
1
- import { CardContent, CardContentProps, styled } from '@mui/material'
1
+ import type { CardContentProps } from '@mui/material'
2
+ import { CardContent, styled } from '@mui/material'
2
3
  import { useShareForwardedRef } from '@xyo-network/react-shared'
3
4
  import React, { forwardRef, useEffect } from 'react'
4
5
 
@@ -1,4 +1,5 @@
1
- import { Card, CardProps } from '@mui/material'
1
+ import type { CardProps } from '@mui/material'
2
+ import { Card } from '@mui/material'
2
3
  import { useGradientStyles } from '@xyo-network/react-shared'
3
4
  import React, { forwardRef } from 'react'
4
5
 
@@ -1,4 +1,4 @@
1
- import { Meta, StoryFn } from '@storybook/react'
1
+ import type { Meta, StoryFn } from '@storybook/react'
2
2
  import React from 'react'
3
3
  import { BrowserRouter } from 'react-router-dom'
4
4
 
@@ -1,9 +1,12 @@
1
1
  import { ArrowForwardRounded as ArrowForwardRoundedIcon } from '@mui/icons-material'
2
- import { alpha, Card, CardActions, CardContent, CardMedia, CardProps, Grid, IconButton, Typography, useTheme, Zoom } from '@mui/material'
2
+ import type { CardProps } from '@mui/material'
3
+ import { alpha, Card, CardActions, CardContent, CardMedia, Grid, IconButton, Typography, useTheme, Zoom } from '@mui/material'
3
4
  import { FlexGrowCol } from '@xylabs/react-flexbox'
4
5
  import { useIsMobile } from '@xyo-network/react-shared'
5
- import React, { ReactNode, useState } from 'react'
6
- import { To, useNavigate } from 'react-router-dom'
6
+ import type { ReactNode } from 'react'
7
+ import React, { useState } from 'react'
8
+ import type { To } from 'react-router-dom'
9
+ import { useNavigate } from 'react-router-dom'
7
10
 
8
11
  export interface FullWidthCardProps extends CardProps {
9
12
  cardIsButton?: boolean
@@ -1,5 +1,5 @@
1
1
  import { CardContent, Typography } from '@mui/material'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import type { Meta, StoryFn } from '@storybook/react'
3
3
  import { WithRefDecorator } from '@xyo-network/react-storybook'
4
4
  import React, { useState } from 'react'
5
5
 
@@ -1,9 +1,12 @@
1
1
  import { Refresh as RefreshIcon } from '@mui/icons-material'
2
- import { CardHeader, CardHeaderProps, IconButton } from '@mui/material'
2
+ import type { CardHeaderProps } from '@mui/material'
3
+ import { CardHeader, IconButton } from '@mui/material'
3
4
  import { TypographyEx } from '@xyo-network/react-shared'
4
- import React, { forwardRef, ReactNode } from 'react'
5
+ import type { ReactNode } from 'react'
6
+ import React, { forwardRef } from 'react'
5
7
 
6
- import { CardEx, CardExProps } from './CardEx.tsx'
8
+ import type { CardExProps } from './CardEx.tsx'
9
+ import { CardEx } from './CardEx.tsx'
7
10
 
8
11
  export interface PageCardProps extends CardExProps {
9
12
  action?: ReactNode
@@ -1,5 +1,5 @@
1
1
  import { Grid } from '@mui/material'
2
- import { Meta, StoryFn } from '@storybook/react'
2
+ import type { Meta, StoryFn } from '@storybook/react'
3
3
  import React from 'react'
4
4
  import { BrowserRouter } from 'react-router-dom'
5
5
 
@@ -2,10 +2,13 @@ import { ArrowForwardRounded as ArrowForwardRoundedIcon } from '@mui/icons-mater
2
2
  import { alpha, CardActions, CardContent, CardMedia, IconButton, Typography, useTheme } from '@mui/material'
3
3
  import { FlexCol, FlexGrowCol } from '@xylabs/react-flexbox'
4
4
  import { useIsMobile } from '@xyo-network/react-shared'
5
- import React, { ReactNode, useState } from 'react'
6
- import { To, useNavigate } from 'react-router-dom'
5
+ import type { ReactNode } from 'react'
6
+ import React, { useState } from 'react'
7
+ import type { To } from 'react-router-dom'
8
+ import { useNavigate } from 'react-router-dom'
7
9
 
8
- import { CardEx, CardExProps } from '../CardEx.tsx'
10
+ import type { CardExProps } from '../CardEx.tsx'
11
+ import { CardEx } from '../CardEx.tsx'
9
12
 
10
13
  export interface SimpleCardProps extends CardExProps {
11
14
  desc?: ReactNode
@@ -1,4 +1,4 @@
1
- import { Meta, StoryFn } from '@storybook/react'
1
+ import type { Meta, StoryFn } from '@storybook/react'
2
2
  import React from 'react'
3
3
  import { BrowserRouter } from 'react-router-dom'
4
4
 
@@ -1,7 +1,9 @@
1
- import { Grid, GridProps } from '@mui/material'
1
+ import type { GridProps } from '@mui/material'
2
+ import { Grid } from '@mui/material'
2
3
  import React from 'react'
3
4
 
4
- import { SimpleCard, SimpleCardProps } from '../SimpleCard/index.ts'
5
+ import type { SimpleCardProps } from '../SimpleCard/index.ts'
6
+ import { SimpleCard } from '../SimpleCard/index.ts'
5
7
 
6
8
  export interface SimpleCardGridProps extends GridProps {
7
9
  cards?: SimpleCardProps[]
package/xy.config.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
1
+ import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
2
  const config: XyTsupConfig = {
3
3
  compile: {
4
4
  browser: {