@xyo-network/react-shared 2.25.38 → 2.25.41
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/dist/cjs/components/BasicHero/BasicHero.js +2 -4
- package/dist/cjs/components/BasicHero/BasicHero.js.map +1 -1
- package/dist/cjs/components/CardEx.d.ts +6 -0
- package/dist/cjs/components/CardEx.js +15 -0
- package/dist/cjs/components/CardEx.js.map +1 -0
- package/dist/cjs/components/Footer/Copyright.js.map +1 -1
- package/dist/cjs/components/ListItemButtonEx.d.ts +10 -0
- package/dist/cjs/components/ListItemButtonEx.js +30 -0
- package/dist/cjs/components/ListItemButtonEx.js.map +1 -0
- package/dist/cjs/components/SimpleCard/SimpleCard.d.ts +2 -2
- package/dist/cjs/components/SimpleCard/SimpleCard.js +3 -2
- package/dist/cjs/components/SimpleCard/SimpleCard.js.map +1 -1
- package/dist/cjs/components/TypographyEx.d.ts +6 -0
- package/dist/cjs/components/TypographyEx.js +14 -0
- package/dist/cjs/components/TypographyEx.js.map +1 -0
- package/dist/cjs/components/index.d.ts +2 -1
- package/dist/cjs/components/index.js +2 -1
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/hooks/GradientStyles/GradientStyles.d.ts +66 -0
- package/dist/cjs/hooks/GradientStyles/GradientStyles.js +57 -0
- package/dist/cjs/hooks/GradientStyles/GradientStyles.js.map +1 -0
- package/dist/cjs/hooks/GradientStyles/index.d.ts +1 -0
- package/dist/cjs/{components/GradientText → hooks/GradientStyles}/index.js +1 -1
- package/dist/cjs/hooks/GradientStyles/index.js.map +1 -0
- package/dist/cjs/hooks/index.d.ts +1 -0
- package/dist/cjs/hooks/index.js +1 -0
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/docs.json +96541 -60375
- package/dist/esm/components/BasicHero/BasicHero.js +4 -6
- package/dist/esm/components/BasicHero/BasicHero.js.map +1 -1
- package/dist/esm/components/CardEx.d.ts +6 -0
- package/dist/esm/components/CardEx.js +9 -0
- package/dist/esm/components/CardEx.js.map +1 -0
- package/dist/esm/components/Footer/Copyright.js.map +1 -1
- package/dist/esm/components/ListItemButtonEx.d.ts +10 -0
- package/dist/esm/components/ListItemButtonEx.js +22 -0
- package/dist/esm/components/ListItemButtonEx.js.map +1 -0
- package/dist/esm/components/SimpleCard/SimpleCard.d.ts +2 -2
- package/dist/esm/components/SimpleCard/SimpleCard.js +4 -3
- package/dist/esm/components/SimpleCard/SimpleCard.js.map +1 -1
- package/dist/esm/components/TypographyEx.d.ts +6 -0
- package/dist/esm/components/TypographyEx.js +8 -0
- package/dist/esm/components/TypographyEx.js.map +1 -0
- package/dist/esm/components/index.d.ts +2 -1
- package/dist/esm/components/index.js +2 -1
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/hooks/GradientStyles/GradientStyles.d.ts +66 -0
- package/dist/esm/hooks/GradientStyles/GradientStyles.js +51 -0
- package/dist/esm/hooks/GradientStyles/GradientStyles.js.map +1 -0
- package/dist/esm/hooks/GradientStyles/index.d.ts +1 -0
- package/dist/esm/hooks/GradientStyles/index.js +2 -0
- package/dist/esm/hooks/GradientStyles/index.js.map +1 -0
- package/dist/esm/hooks/index.d.ts +1 -0
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/index.js.map +1 -1
- package/package.json +17 -17
- package/src/components/BasicHero/BasicHero.tsx +4 -6
- package/src/components/CardEx.tsx +13 -0
- package/src/components/Footer/Copyright.tsx +1 -1
- package/src/components/JsonRouteWrapper/JsonFromUrl.stories.tsx +5 -7
- package/src/components/JsonRouteWrapper/JsonRouteWrapper.stories.tsx +1 -3
- package/src/components/ListItemButtonEx.tsx +29 -0
- package/src/components/SimpleCard/SimpleCard.tsx +6 -5
- package/src/components/TypographyEx.tsx +12 -0
- package/src/components/index.ts +2 -1
- package/src/{components/GradientText/GradientText.tsx → hooks/GradientStyles/GradientStyle.stories.tsx} +40 -55
- package/src/hooks/GradientStyles/GradientStyles.tsx +60 -0
- package/src/hooks/GradientStyles/index.ts +1 -0
- package/src/hooks/index.ts +1 -0
- package/dist/cjs/components/GradientText/GradientText.d.ts +0 -4
- package/dist/cjs/components/GradientText/GradientText.js +0 -53
- package/dist/cjs/components/GradientText/GradientText.js.map +0 -1
- package/dist/cjs/components/GradientText/index.d.ts +0 -1
- package/dist/cjs/components/GradientText/index.js.map +0 -1
- package/dist/esm/components/GradientText/GradientText.d.ts +0 -4
- package/dist/esm/components/GradientText/GradientText.js +0 -49
- package/dist/esm/components/GradientText/GradientText.js.map +0 -1
- package/dist/esm/components/GradientText/index.d.ts +0 -1
- package/dist/esm/components/GradientText/index.js +0 -2
- package/dist/esm/components/GradientText/index.js.map +0 -1
- package/src/components/GradientText/GradientText.stories.tsx +0 -31
- package/src/components/GradientText/index.ts +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Container, Grid, Typography
|
|
2
|
+
import { Container, Grid, Typography } from '@mui/material';
|
|
3
3
|
import { ButtonEx, FlexGrowCol, FlexGrowRow, LinkEx } from '@xylabs/sdk-react';
|
|
4
|
-
import { useIsMobile } from '../../hooks';
|
|
5
|
-
import { colorfulGradientDarkMode, colorfulGradientLightMode } from '../GradientText';
|
|
4
|
+
import { useGradientStyles, useIsMobile } from '../../hooks';
|
|
6
5
|
const SubLinkSection = ({ subLinkText1, subLinkText2, subLinkPath, subLinkIcon, backgroundImageAlignment }) => {
|
|
7
6
|
return (_jsxs(FlexGrowRow, { width: "100%", sx: { flexDirection: { md: 'row', xs: 'column' }, justifyContent: { md: backgroundImageAlignment ? 'flex-start' : 'center', xs: 'center' } }, children: [subLinkIcon ? _jsxs("span", { children: [subLinkIcon, "\u00A0"] }) : null, _jsxs(Typography, { children: [subLinkText1, "\u00A0"] }), _jsx(LinkEx, { href: subLinkPath, underline: "always", target: "_blank", color: "inherit", children: _jsx(Typography, { children: subLinkText2 }) })] }));
|
|
8
7
|
};
|
|
@@ -12,8 +11,7 @@ const ButtonSection = ({ href, to, buttonText }) => {
|
|
|
12
11
|
};
|
|
13
12
|
export const BasicHero = ({ backgroundImage, title, gradientTitle, backgroundColor, textColor, desc, heroImage, title2, subLinkText1, subLinkText2, subLinkPath, button1Text, button2Text, button2To, button1To, button2Href, button1Href, subLinkIcon, sx, ...props }) => {
|
|
14
13
|
const isMobile = useIsMobile();
|
|
15
|
-
const
|
|
16
|
-
const classes = theme.palette.mode === 'dark' ? colorfulGradientDarkMode() : colorfulGradientLightMode();
|
|
14
|
+
const { classes } = useGradientStyles();
|
|
17
15
|
return (_jsx(FlexGrowCol, { sx: {
|
|
18
16
|
backgroundImage: `url(${backgroundImage})`,
|
|
19
17
|
backgroundPosition: { lg: 'bottom', md: 'center left', xs: 'top left' },
|
|
@@ -31,6 +29,6 @@ export const BasicHero = ({ backgroundImage, title, gradientTitle, backgroundCol
|
|
|
31
29
|
}, ...props, children: _jsx(Container, { children: _jsxs(Grid, { container: true, justifyContent: "center", alignItems: "center", sx: {
|
|
32
30
|
alignItems: { xs: 'center' },
|
|
33
31
|
justifyContent: { xs: 'center' },
|
|
34
|
-
}, children: [_jsx(Grid, { item: true, xs: 12, sm: 8, md: backgroundImage ? 6 : 8, lg: backgroundImage ? 6 : 8, children: _jsxs(FlexGrowCol, { paddingY: 2, sx: { alignItems: { xs: backgroundImage && !isMobile ? 'flex-start' : 'center' } }, children: [_jsxs(Typography, { variant: "h1", component: "h1", gutterBottom: true, textAlign: backgroundImage && !isMobile ? 'left' : 'center', children: [title ? _jsx("span", { children: `${title} ` }) : null, gradientTitle ? _jsxs("span", { className: classes.heading, children: [" ", ` ${gradientTitle}`] }) : null, title2 ? _jsx("span", { children: ` ${title2}` }) : null] }), _jsx(Typography, { variant: "body1", component: "h2", gutterBottom: true, textAlign: backgroundImage && !isMobile ? 'left' : 'center', children: desc }), _jsxs(FlexGrowRow, { sx: { flexDirection: { lg: 'row', xs: 'column' } }, width: "100%", marginTop: 1, children: [_jsx(ButtonSection, { href: button1Href, to: button1To, buttonText: button1Text }), _jsx(ButtonSection, { href: button2Href, to: button2To, buttonText: button2Text })] }), _jsx(SubLinkSection, { subLinkIcon: subLinkIcon, subLinkText1: subLinkText1, subLinkText2: subLinkText2, subLinkPath: subLinkPath, backgroundImageAlignment: backgroundImage ? true : false })] }) }), _jsx(Grid, { item: true, xs: 12, md: 6, children: heroImage ? _jsx("img", { src: heroImage, width: "100%" }) : null })] }) }) }));
|
|
32
|
+
}, children: [_jsx(Grid, { item: true, xs: 12, sm: 8, md: backgroundImage ? 6 : 8, lg: backgroundImage ? 6 : 8, children: _jsxs(FlexGrowCol, { paddingY: 2, sx: { alignItems: { xs: backgroundImage && !isMobile ? 'flex-start' : 'center' } }, children: [_jsxs(Typography, { variant: "h1", component: "h1", gutterBottom: true, textAlign: backgroundImage && !isMobile ? 'left' : 'center', children: [title ? _jsx("span", { children: `${title} ` }) : null, gradientTitle ? _jsxs("span", { className: classes().heading, children: [" ", ` ${gradientTitle}`] }) : null, title2 ? _jsx("span", { children: ` ${title2}` }) : null] }), _jsx(Typography, { variant: "body1", component: "h2", gutterBottom: true, textAlign: backgroundImage && !isMobile ? 'left' : 'center', children: desc }), _jsxs(FlexGrowRow, { sx: { flexDirection: { lg: 'row', xs: 'column' } }, width: "100%", marginTop: 1, children: [_jsx(ButtonSection, { href: button1Href, to: button1To, buttonText: button1Text }), _jsx(ButtonSection, { href: button2Href, to: button2To, buttonText: button2Text })] }), _jsx(SubLinkSection, { subLinkIcon: subLinkIcon, subLinkText1: subLinkText1, subLinkText2: subLinkText2, subLinkPath: subLinkPath, backgroundImageAlignment: backgroundImage ? true : false })] }) }), _jsx(Grid, { item: true, xs: 12, md: 6, children: heroImage ? _jsx("img", { src: heroImage, width: "100%" }) : null })] }) }) }));
|
|
35
33
|
};
|
|
36
34
|
//# sourceMappingURL=BasicHero.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicHero.js","sourceRoot":"","sources":["../../../../src/components/BasicHero/BasicHero.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"BasicHero.js","sourceRoot":"","sources":["../../../../src/components/BasicHero/BasicHero.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAgB,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAG5F,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAqC5D,MAAM,cAAc,GAAkC,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,wBAAwB,EAAE,EAAE,EAAE;IAC3I,OAAO,CACL,MAAC,WAAW,IAAC,KAAK,EAAC,MAAM,EAAC,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,aACnK,WAAW,CAAC,CAAC,CAAC,2BAAO,WAAW,cAAc,CAAC,CAAC,CAAC,IAAI,EACtD,MAAC,UAAU,eAAE,YAAY,cAAoB,EAC7C,KAAC,MAAM,IAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAC,QAAQ,EAAC,MAAM,EAAC,QAAQ,EAAC,KAAK,EAAC,SAAS,YAC3E,KAAC,UAAU,cAAE,YAAY,GAAc,GAChC,IACG,CACf,CAAA;AACH,CAAC,CAAA;AAED,MAAM,aAAa,GAAiC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IAC/E,MAAM,QAAQ,GAAG,WAAW,EAAE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,CAAC,CAAC,yBAAO,IAAI,MAAM,EAAE,GAAQ,CAAC,CAAC,CAAC,IAAI,IACjC,EACb,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,YAAY,QAAC,SAAS,EAAE,eAAe,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,YAChH,IAAI,GACM,EACb,MAAC,WAAW,IAAC,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAC,MAAM,EAAC,SAAS,EAAE,CAAC,aACxF,KAAC,aAAa,IAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,GAAI,EAC5E,KAAC,aAAa,IAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,GAAI,IAChE,EACd,KAAC,cAAc,IACb,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,EACxB,wBAAwB,EAAE,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GACxD,IACU,GACT,EACP,KAAC,IAAI,IAAC,IAAI,QAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,YACrB,SAAS,CAAC,CAAC,CAAC,cAAK,GAAG,EAAE,SAAS,EAAE,KAAK,EAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,GACnD,IACF,GACG,GACA,CACf,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Card } from '@mui/material';
|
|
3
|
+
import { useGradientStyles } from '../hooks';
|
|
4
|
+
export const CardEx = ({ style, gradient, ...props }) => {
|
|
5
|
+
const { styles } = useGradientStyles();
|
|
6
|
+
const gradientStyle = gradient === 'border' ? styles.border : gradient === 'background' ? styles.background : {};
|
|
7
|
+
return _jsx(Card, { style: { ...gradientStyle, ...style }, ...props });
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=CardEx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardEx.js","sourceRoot":"","sources":["../../../src/components/CardEx.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAa,MAAM,eAAe,CAAA;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAM5C,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC7E,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,EAAE,CAAA;IACtC,MAAM,aAAa,GAAG,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAA;IAChH,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,KAAK,EAAE,KAAM,KAAK,GAAI,CAAA;AACnE,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Copyright.js","sourceRoot":"","sources":["../../../../src/components/Footer/Copyright.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,MAAM,+BAA+B,CAAA;AACzD,OAAO,EAAgB,OAAO,
|
|
1
|
+
{"version":3,"file":"Copyright.js","sourceRoot":"","sources":["../../../../src/components/Footer/Copyright.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,MAAM,+BAA+B,CAAA;AACzD,OAAO,EAAgB,OAAO,EAAe,MAAM,mBAAmB,CAAA;A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+
/// <reference types="react" />
|
|
2
|
+
import { ListItemButtonProps } from '@mui/material';
|
|
3
|
+
import { NavigateOptions, To } from 'react-router-dom';
|
|
4
|
+
export interface ListItemButtonExProps extends ListItemButtonProps {
|
|
5
|
+
target?: string;
|
|
6
|
+
to?: To;
|
|
7
|
+
toOptions?: NavigateOptions;
|
|
8
|
+
}
|
|
9
|
+
export declare const ListItemButtonExTo: React.FC<ListItemButtonExProps>;
|
|
10
|
+
export declare const ListItemButtonEx: React.FC<ListItemButtonExProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ListItemButton } from '@mui/material';
|
|
3
|
+
import { useNavigate } from 'react-router-dom';
|
|
4
|
+
export const ListItemButtonExTo = ({ to, toOptions, onClick, ...props }) => {
|
|
5
|
+
const navigate = useNavigate();
|
|
6
|
+
const localOnClick = (event) => {
|
|
7
|
+
onClick?.(event);
|
|
8
|
+
if (to) {
|
|
9
|
+
navigate(to, toOptions);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
return _jsx(ListItemButton, { onClick: localOnClick, ...props });
|
|
13
|
+
};
|
|
14
|
+
export const ListItemButtonEx = ({ to, ...props }) => {
|
|
15
|
+
if (to) {
|
|
16
|
+
return _jsx(ListItemButtonExTo, { to: to, ...props });
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
return _jsx(ListItemButtonEx, { ...props });
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=ListItemButtonEx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ListItemButtonEx.js","sourceRoot":"","sources":["../../../src/components/ListItemButtonEx.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAuB,MAAM,eAAe,CAAA;AAEnE,OAAO,EAAuB,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAQnE,MAAM,CAAC,MAAM,kBAAkB,GAAoC,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC1G,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,YAAY,GAAG,CAAC,KAAiC,EAAE,EAAE;QACzD,OAAO,EAAE,CAAC,KAAK,CAAC,CAAA;QAChB,IAAI,EAAE,EAAE;YACN,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC,CAAA;SACxB;IACH,CAAC,CAAA;IAED,OAAO,KAAC,cAAc,IAAC,OAAO,EAAE,YAAY,KAAM,KAAK,GAAI,CAAA;AAC7D,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACpF,IAAI,EAAE,EAAE;QACN,OAAO,KAAC,kBAAkB,IAAC,EAAE,EAAE,EAAE,KAAM,KAAK,GAAI,CAAA;KACjD;SAAM;QACL,OAAO,KAAC,gBAAgB,OAAK,KAAK,GAAI,CAAA;KACvC;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CardProps } from '@mui/material';
|
|
2
1
|
import { ReactNode } from 'react';
|
|
3
2
|
import { To } from 'react-router-dom';
|
|
4
|
-
|
|
3
|
+
import { CardExProps } from '../CardEx';
|
|
4
|
+
export interface SimpleCardProps extends CardExProps {
|
|
5
5
|
headline?: ReactNode;
|
|
6
6
|
desc?: ReactNode;
|
|
7
7
|
href?: string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import ArrowForwardRoundedIcon from '@mui/icons-material/ArrowForwardRounded';
|
|
3
|
-
import { alpha,
|
|
3
|
+
import { alpha, CardActions, CardContent, CardMedia, IconButton, Typography, useTheme } from '@mui/material';
|
|
4
4
|
import { FlexCol, FlexGrowCol } from '@xylabs/sdk-react';
|
|
5
5
|
import { useState } from 'react';
|
|
6
6
|
import { useNavigate } from 'react-router-dom';
|
|
7
7
|
import { useIsMobile } from '../../hooks';
|
|
8
|
+
import { CardEx } from '../CardEx';
|
|
8
9
|
export const SimpleCard = ({ iconImage, subtitle, headline, small, desc, href, to, interactionVariant = 'card', media, ...props }) => {
|
|
9
10
|
const theme = useTheme();
|
|
10
11
|
const [raised, setRaised] = useState(false);
|
|
@@ -16,11 +17,11 @@ export const SimpleCard = ({ iconImage, subtitle, headline, small, desc, href, t
|
|
|
16
17
|
const externalRouteChange = (href) => {
|
|
17
18
|
href ? window.open(href) : navigate('/404');
|
|
18
19
|
};
|
|
19
|
-
return (_jsxs(
|
|
20
|
+
return (_jsxs(CardEx, { elevation: raised ? 3 : 0, style: { height: '100%', justifyContent: 'space-between', width: '100%' }, sx: {
|
|
20
21
|
'&:hover': {
|
|
21
22
|
cursor: interactionVariant == 'button' ? 'pointer' : null,
|
|
22
23
|
},
|
|
23
24
|
backgroundColor: alpha(theme.palette.primary.light, 0.05),
|
|
24
|
-
}, onMouseEnter: () => (isMobile ? null : interactionVariant == 'button' ? setRaised(true) : null), onMouseLeave: () => (isMobile ? null : interactionVariant == 'button' ? setRaised(false) : null), onClick: () => (interactionVariant == 'button' ? (href ? externalRouteChange(href) : to ? localRouteChange(to) : navigate('/404')) : null), children: [media ? _jsx(CardMedia, { component: "img", height: "100", image: media, alt: "" }) : null, _jsx(CardContent, { sx: { height: '100%' }, children: _jsxs(FlexCol, { width: "100%", alignItems: "flex-start", children: [iconImage ? _jsx("img", { src: iconImage, height: "40px", style: { paddingBottom: '8px' } }) : null, typeof headline === 'string' ? (_jsx(Typography, { variant: small ? 'body1' : 'h6', textAlign: "left", gutterBottom: true, children: headline })) : (headline), subtitle ? (_jsx(Typography, { variant: "subtitle2", textAlign: "left", gutterBottom: true, children: subtitle })) : null, _jsx(Typography, { variant: small ? 'caption' : 'body1', textAlign: "left", gutterBottom: true, children: desc })] }) }), interactionVariant == 'button' ? (_jsx(CardActions, { children: _jsx(FlexGrowCol, { alignItems: "flex-end", children: _jsx(IconButton, { color: raised ? 'secondary' : 'primary', size: small ? 'small' : 'medium', onClick: () => (href ? externalRouteChange(href) : to ? localRouteChange(to) : navigate('/404')), disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, children: _jsx(ArrowForwardRoundedIcon, { fontSize: small ? 'small' : 'medium' }) }) }) })) : null] }));
|
|
25
|
+
}, onMouseEnter: () => (isMobile ? null : interactionVariant == 'button' ? setRaised(true) : null), onMouseLeave: () => (isMobile ? null : interactionVariant == 'button' ? setRaised(false) : null), onClick: () => (interactionVariant == 'button' ? (href ? externalRouteChange(href) : to ? localRouteChange(to) : navigate('/404')) : null), ...props, children: [media ? _jsx(CardMedia, { component: "img", height: "100", image: media, alt: "" }) : null, _jsx(CardContent, { sx: { height: '100%' }, children: _jsxs(FlexCol, { width: "100%", alignItems: "flex-start", children: [iconImage ? _jsx("img", { src: iconImage, height: "40px", style: { paddingBottom: '8px' } }) : null, typeof headline === 'string' ? (_jsx(Typography, { variant: small ? 'body1' : 'h6', textAlign: "left", gutterBottom: true, children: headline })) : (headline), subtitle ? (_jsx(Typography, { variant: "subtitle2", textAlign: "left", gutterBottom: true, children: subtitle })) : null, _jsx(Typography, { variant: small ? 'caption' : 'body1', textAlign: "left", gutterBottom: true, children: desc })] }) }), interactionVariant == 'button' ? (_jsx(CardActions, { children: _jsx(FlexGrowCol, { alignItems: "flex-end", children: _jsx(IconButton, { color: raised ? 'secondary' : 'primary', size: small ? 'small' : 'medium', onClick: () => (href ? externalRouteChange(href) : to ? localRouteChange(to) : navigate('/404')), disableFocusRipple: true, disableRipple: true, disableTouchRipple: true, children: _jsx(ArrowForwardRoundedIcon, { fontSize: small ? 'small' : 'medium' }) }) }) })) : null] }));
|
|
25
26
|
};
|
|
26
27
|
//# sourceMappingURL=SimpleCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleCard.js","sourceRoot":"","sources":["../../../../src/components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AAS,EACvC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAChC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EAChG,kBAAkB,QAClB,aAAa,QACb,kBAAkB,kBAElB,KAAC,uBAAuB,IAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,GAAI,GACtD,GACD,GACF,CACf,CAAC,CAAC,CAAC,IAAI,IACD,CACV,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Typography } from '@mui/material';
|
|
3
|
+
import { useGradientStyles } from '../hooks';
|
|
4
|
+
export const TypographyEx = ({ gradient, ...props }) => {
|
|
5
|
+
const { classes } = useGradientStyles();
|
|
6
|
+
return _jsx(Typography, { className: gradient === 'text' ? classes().heading : undefined, ...props });
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=TypographyEx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypographyEx.js","sourceRoot":"","sources":["../../../src/components/TypographyEx.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,eAAe,CAAA;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAM5C,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAClF,MAAM,EAAE,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAAA;IACvC,OAAO,KAAC,UAAU,IAAC,SAAS,EAAE,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,KAAM,KAAK,GAAI,CAAA;AAClG,CAAC,CAAA"}
|
|
@@ -6,8 +6,8 @@ export * from './ErrorPage';
|
|
|
6
6
|
export * from './FlexPage';
|
|
7
7
|
export * from './Footer';
|
|
8
8
|
export * from './FullWidthCard';
|
|
9
|
-
export * from './GradientText';
|
|
10
9
|
export * from './JsonRouteWrapper';
|
|
10
|
+
export * from './ListItemButtonEx';
|
|
11
11
|
export * from './NotFound';
|
|
12
12
|
export * from './Pipe';
|
|
13
13
|
export * from './ScrollTableOnSm';
|
|
@@ -15,3 +15,4 @@ export * from './SectionSpacingRow';
|
|
|
15
15
|
export * from './SimpleCard';
|
|
16
16
|
export * from './TableCell';
|
|
17
17
|
export * from './TypeDocViewer';
|
|
18
|
+
export * from './TypographyEx';
|
|
@@ -6,8 +6,8 @@ export * from './ErrorPage';
|
|
|
6
6
|
export * from './FlexPage';
|
|
7
7
|
export * from './Footer';
|
|
8
8
|
export * from './FullWidthCard';
|
|
9
|
-
export * from './GradientText';
|
|
10
9
|
export * from './JsonRouteWrapper';
|
|
10
|
+
export * from './ListItemButtonEx';
|
|
11
11
|
export * from './NotFound';
|
|
12
12
|
export * from './Pipe';
|
|
13
13
|
export * from './ScrollTableOnSm';
|
|
@@ -15,4 +15,5 @@ export * from './SectionSpacingRow';
|
|
|
15
15
|
export * from './SimpleCard';
|
|
16
16
|
export * from './TableCell';
|
|
17
17
|
export * from './TypeDocViewer';
|
|
18
|
+
export * from './TypographyEx';
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,sBAAsB,CAAA;AACpC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,UAAU,CAAA;AACxB,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,QAAQ,CAAA;AACtB,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface GradientStyles {
|
|
3
|
+
background: CSSProperties;
|
|
4
|
+
border: CSSProperties;
|
|
5
|
+
heading: CSSProperties;
|
|
6
|
+
}
|
|
7
|
+
export declare const colorfulGradientLightMode: () => {
|
|
8
|
+
background: {
|
|
9
|
+
backgroundImage: string;
|
|
10
|
+
};
|
|
11
|
+
border: {
|
|
12
|
+
borderImage: string;
|
|
13
|
+
borderImageSlice: number;
|
|
14
|
+
borderImageSource: string;
|
|
15
|
+
borderRadius: number;
|
|
16
|
+
borderStyle: string;
|
|
17
|
+
borderWidth: string;
|
|
18
|
+
};
|
|
19
|
+
heading: {
|
|
20
|
+
WebkitBackgroundClip: string;
|
|
21
|
+
WebkitTextFillColor: string;
|
|
22
|
+
background: string;
|
|
23
|
+
display: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export declare const colorfulGradientDarkMode: () => {
|
|
27
|
+
background: {
|
|
28
|
+
backgroundImage: string;
|
|
29
|
+
};
|
|
30
|
+
border: {
|
|
31
|
+
borderImage: string;
|
|
32
|
+
borderImageSlice: number;
|
|
33
|
+
borderImageSource: string;
|
|
34
|
+
borderRadius: number;
|
|
35
|
+
borderStyle: string;
|
|
36
|
+
borderWidth: string;
|
|
37
|
+
};
|
|
38
|
+
heading: {
|
|
39
|
+
WebkitBackgroundClip: string;
|
|
40
|
+
WebkitTextFillColor: string;
|
|
41
|
+
background: string;
|
|
42
|
+
display: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export declare const useGradientStyles: () => {
|
|
46
|
+
classes: (props?: any) => import("@mui/styles").ClassNameMap<"border" | "background" | "heading">;
|
|
47
|
+
styles: {
|
|
48
|
+
background: {
|
|
49
|
+
backgroundImage: string;
|
|
50
|
+
};
|
|
51
|
+
border: {
|
|
52
|
+
borderImage: string;
|
|
53
|
+
borderImageSlice: number;
|
|
54
|
+
borderImageSource: string;
|
|
55
|
+
borderRadius: number;
|
|
56
|
+
borderStyle: string;
|
|
57
|
+
borderWidth: string;
|
|
58
|
+
};
|
|
59
|
+
heading: {
|
|
60
|
+
WebkitBackgroundClip: string;
|
|
61
|
+
WebkitTextFillColor: string;
|
|
62
|
+
background: string;
|
|
63
|
+
display: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { useTheme } from '@mui/material';
|
|
2
|
+
import { makeStyles } from '@mui/styles';
|
|
3
|
+
export const colorfulGradientLightMode = () => {
|
|
4
|
+
return {
|
|
5
|
+
background: {
|
|
6
|
+
backgroundImage: '-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)',
|
|
7
|
+
},
|
|
8
|
+
border: {
|
|
9
|
+
borderImage: '-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)',
|
|
10
|
+
borderImageSlice: 1,
|
|
11
|
+
borderImageSource: '-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)',
|
|
12
|
+
borderRadius: 0,
|
|
13
|
+
borderStyle: 'solid',
|
|
14
|
+
borderWidth: '2px',
|
|
15
|
+
},
|
|
16
|
+
heading: {
|
|
17
|
+
WebkitBackgroundClip: 'text',
|
|
18
|
+
WebkitTextFillColor: 'transparent',
|
|
19
|
+
background: '-webkit-linear-gradient(232deg, #e17751, #d84e7a, #5898dd, #8c8ee5)',
|
|
20
|
+
display: 'inline-block',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export const colorfulGradientDarkMode = () => {
|
|
25
|
+
return {
|
|
26
|
+
background: {
|
|
27
|
+
backgroundImage: '-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)',
|
|
28
|
+
},
|
|
29
|
+
border: {
|
|
30
|
+
borderImage: '-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)',
|
|
31
|
+
borderImageSlice: 1,
|
|
32
|
+
borderImageSource: '-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)',
|
|
33
|
+
borderRadius: 0,
|
|
34
|
+
borderStyle: 'solid',
|
|
35
|
+
borderWidth: '2px',
|
|
36
|
+
},
|
|
37
|
+
heading: {
|
|
38
|
+
WebkitBackgroundClip: 'text',
|
|
39
|
+
WebkitTextFillColor: 'transparent',
|
|
40
|
+
background: '-webkit-linear-gradient(232deg, #F17938, #FF5BDC, #5898dd, #B2FFFD)',
|
|
41
|
+
display: 'inline-block',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export const useGradientStyles = () => {
|
|
46
|
+
const theme = useTheme();
|
|
47
|
+
const styles = theme.palette.mode === 'dark' ? colorfulGradientDarkMode() : colorfulGradientLightMode();
|
|
48
|
+
const classes = makeStyles(styles);
|
|
49
|
+
return { classes, styles };
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=GradientStyles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GradientStyles.js","sourceRoot":"","sources":["../../../../src/hooks/GradientStyles/GradientStyles.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAgB,UAAU,EAAE,MAAM,aAAa,CAAA;AAStD,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,EAAE;IAC5C,OAAO;QACL,UAAU,EAAE;YACV,eAAe,EAAE,qEAAqE;SACvF;QACD,MAAM,EAAE;YACN,WAAW,EAAE,qEAAqE;YAClF,gBAAgB,EAAE,CAAC;YACnB,iBAAiB,EAAE,qEAAqE;YACxF,YAAY,EAAE,CAAC;YACf,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,KAAK;SACnB;QACD,OAAO,EAAE;YACP,oBAAoB,EAAE,MAAM;YAC5B,mBAAmB,EAAE,aAAa;YAClC,UAAU,EAAE,qEAAqE;YACjF,OAAO,EAAE,cAAc;SACxB;KACF,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE;IAC3C,OAAO;QACL,UAAU,EAAE;YACV,eAAe,EAAE,qEAAqE;SACvF;QACD,MAAM,EAAE;YACN,WAAW,EAAE,qEAAqE;YAClF,gBAAgB,EAAE,CAAC;YACnB,iBAAiB,EAAE,qEAAqE;YACxF,YAAY,EAAE,CAAC;YACf,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,KAAK;SACnB;QACD,OAAO,EAAE;YACP,oBAAoB,EAAE,MAAM;YAC5B,mBAAmB,EAAE,aAAa;YAClC,UAAU,EAAE,qEAAqE;YACjF,OAAO,EAAE,cAAc;SACxB;KACF,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,wBAAwB,EAAE,CAAC,CAAC,CAAC,yBAAyB,EAAE,CAAA;IACvG,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,CAAA;IAClC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAA;AAC5B,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './GradientStyles';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/GradientStyles/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA"}
|
package/dist/esm/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA"}
|
package/package.json
CHANGED
|
@@ -12,17 +12,17 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@emotion/react": "^11.9.0",
|
|
14
14
|
"@emotion/styled": "^11.8.1",
|
|
15
|
-
"@mui/icons-material": "^5.8.
|
|
16
|
-
"@mui/lab": "^5.0.0-alpha.
|
|
17
|
-
"@mui/material": "^5.8.
|
|
18
|
-
"@mui/styles": "^5.8.
|
|
15
|
+
"@mui/icons-material": "^5.8.3",
|
|
16
|
+
"@mui/lab": "^5.0.0-alpha.85",
|
|
17
|
+
"@mui/material": "^5.8.3",
|
|
18
|
+
"@mui/styles": "^5.8.3",
|
|
19
19
|
"@xylabs/pixel": "^1.3.9",
|
|
20
20
|
"@xylabs/sdk-js": "^2.5.7",
|
|
21
|
-
"@xylabs/sdk-react": "^2.13.
|
|
22
|
-
"@xyo-network/api": "^2.20.
|
|
23
|
-
"@xyo-network/core": "^2.20.
|
|
24
|
-
"@xyo-network/network": "^2.20.
|
|
25
|
-
"@xyo-network/react-theme": "^2.25.
|
|
21
|
+
"@xylabs/sdk-react": "^2.13.7",
|
|
22
|
+
"@xyo-network/api": "^2.20.44",
|
|
23
|
+
"@xyo-network/core": "^2.20.44",
|
|
24
|
+
"@xyo-network/network": "^2.20.44",
|
|
25
|
+
"@xyo-network/react-theme": "^2.25.41",
|
|
26
26
|
"lodash": "^4.17.21",
|
|
27
27
|
"luxon": "^2.4.0",
|
|
28
28
|
"react": "^18.1.0",
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@babel/core": "^7.18.2",
|
|
40
40
|
"@babel/preset-env": "^7.18.2",
|
|
41
|
-
"@storybook/addons": "^6.5.
|
|
42
|
-
"@storybook/api": "^6.5.
|
|
43
|
-
"@storybook/components": "^6.5.
|
|
44
|
-
"@storybook/core-events": "^6.5.
|
|
45
|
-
"@storybook/react": "^6.5.
|
|
46
|
-
"@storybook/theming": "^6.5.
|
|
41
|
+
"@storybook/addons": "^6.5.8",
|
|
42
|
+
"@storybook/api": "^6.5.8",
|
|
43
|
+
"@storybook/components": "^6.5.8",
|
|
44
|
+
"@storybook/core-events": "^6.5.8",
|
|
45
|
+
"@storybook/react": "^6.5.8",
|
|
46
|
+
"@storybook/theming": "^6.5.8",
|
|
47
47
|
"@types/lodash": "^4.14.182",
|
|
48
48
|
"@types/react-helmet": "^6.1.5",
|
|
49
49
|
"@xylabs/pixel": "^1.3.9",
|
|
50
50
|
"@xylabs/sdk-js": "^2.5.7",
|
|
51
|
-
"@xylabs/sdk-react": "^2.13.
|
|
51
|
+
"@xylabs/sdk-react": "^2.13.7",
|
|
52
52
|
"@xylabs/ts-scripts": "^1.0.66",
|
|
53
53
|
"@xylabs/tsconfig": "^1.0.13",
|
|
54
54
|
"axios": "^0.27.2",
|
|
@@ -113,6 +113,6 @@
|
|
|
113
113
|
},
|
|
114
114
|
"sideEffects": false,
|
|
115
115
|
"types": "dist/esm/index.d.ts",
|
|
116
|
-
"version": "2.25.
|
|
116
|
+
"version": "2.25.41",
|
|
117
117
|
"packageManager": "yarn@3.1.1"
|
|
118
118
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { Container, Grid, Typography
|
|
1
|
+
import { Container, Grid, Typography } from '@mui/material'
|
|
2
2
|
import { ButtonEx, FlexBoxProps, FlexGrowCol, FlexGrowRow, LinkEx } from '@xylabs/sdk-react'
|
|
3
3
|
import { ReactElement } from 'react'
|
|
4
4
|
|
|
5
|
-
import { useIsMobile } from '../../hooks'
|
|
6
|
-
import { colorfulGradientDarkMode, colorfulGradientLightMode } from '../GradientText'
|
|
5
|
+
import { useGradientStyles, useIsMobile } from '../../hooks'
|
|
7
6
|
|
|
8
7
|
export interface BasicHeroProps extends FlexBoxProps {
|
|
9
8
|
title: string
|
|
@@ -97,8 +96,7 @@ export const BasicHero: React.FC<BasicHeroProps> = ({
|
|
|
97
96
|
...props
|
|
98
97
|
}) => {
|
|
99
98
|
const isMobile = useIsMobile()
|
|
100
|
-
const
|
|
101
|
-
const classes = theme.palette.mode === 'dark' ? colorfulGradientDarkMode() : colorfulGradientLightMode()
|
|
99
|
+
const { classes } = useGradientStyles()
|
|
102
100
|
return (
|
|
103
101
|
<FlexGrowCol
|
|
104
102
|
sx={{
|
|
@@ -133,7 +131,7 @@ export const BasicHero: React.FC<BasicHeroProps> = ({
|
|
|
133
131
|
<FlexGrowCol paddingY={2} sx={{ alignItems: { xs: backgroundImage && !isMobile ? 'flex-start' : 'center' } }}>
|
|
134
132
|
<Typography variant="h1" component="h1" gutterBottom textAlign={backgroundImage && !isMobile ? 'left' : 'center'}>
|
|
135
133
|
{title ? <span>{`${title} `}</span> : null}
|
|
136
|
-
{gradientTitle ? <span className={classes.heading}> {` ${gradientTitle}`}</span> : null}
|
|
134
|
+
{gradientTitle ? <span className={classes().heading}> {` ${gradientTitle}`}</span> : null}
|
|
137
135
|
{title2 ? <span>{` ${title2}`}</span> : null}
|
|
138
136
|
</Typography>
|
|
139
137
|
<Typography variant="body1" component="h2" gutterBottom textAlign={backgroundImage && !isMobile ? 'left' : 'center'}>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Card, CardProps } from '@mui/material'
|
|
2
|
+
|
|
3
|
+
import { useGradientStyles } from '../hooks'
|
|
4
|
+
|
|
5
|
+
export interface CardExProps extends CardProps {
|
|
6
|
+
gradient?: 'border' | 'background'
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const CardEx: React.FC<CardExProps> = ({ style, gradient, ...props }) => {
|
|
10
|
+
const { styles } = useGradientStyles()
|
|
11
|
+
const gradientStyle = gradient === 'border' ? styles.border : gradient === 'background' ? styles.background : {}
|
|
12
|
+
return <Card style={{ ...gradientStyle, ...style }} {...props} />
|
|
13
|
+
}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
/* eslint-disable deprecation/deprecation */
|
|
2
2
|
/* eslint-disable import/no-deprecated */
|
|
3
|
-
import {
|
|
3
|
+
import { ComponentStory, Meta } from '@storybook/react'
|
|
4
4
|
import { FlexCol } from '@xylabs/sdk-react'
|
|
5
5
|
import { BrowserRouter } from 'react-router-dom'
|
|
6
6
|
|
|
7
7
|
import { DeprecateStory } from '../../../../../.storybook'
|
|
8
8
|
import { JsonFromUrl } from './JsonFromUrl'
|
|
9
9
|
|
|
10
|
-
const StorybookEntry = {
|
|
11
|
-
|
|
12
|
-
apiDomain:
|
|
13
|
-
defaultValue: 'http://localhost:8081',
|
|
14
|
-
},
|
|
10
|
+
const StorybookEntry: Meta = {
|
|
11
|
+
args: {
|
|
12
|
+
apiDomain: 'http://localhost:8081',
|
|
15
13
|
},
|
|
16
14
|
component: JsonFromUrl,
|
|
17
15
|
parameters: {
|
|
@@ -20,7 +18,7 @@ const StorybookEntry = {
|
|
|
20
18
|
},
|
|
21
19
|
},
|
|
22
20
|
title: 'shared/JsonRouteWrapper/JsonFromUrl',
|
|
23
|
-
}
|
|
21
|
+
}
|
|
24
22
|
|
|
25
23
|
const Template: ComponentStory<typeof JsonFromUrl> = (props) => {
|
|
26
24
|
return (
|
|
@@ -13,9 +13,7 @@ const JsonDecorator: DecoratorFn = (Story) => (
|
|
|
13
13
|
|
|
14
14
|
const StorybookEntry = {
|
|
15
15
|
argTypes: {
|
|
16
|
-
apiDomain:
|
|
17
|
-
defaultValue: 'https://beta.api.archivist.xyo.network',
|
|
18
|
-
},
|
|
16
|
+
apiDomain: 'https://beta.api.archivist.xyo.network',
|
|
19
17
|
},
|
|
20
18
|
component: JsonRouteWrapper,
|
|
21
19
|
decorators: [JsonDecorator],
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ListItemButton, ListItemButtonProps } from '@mui/material'
|
|
2
|
+
import { MouseEvent } from 'react'
|
|
3
|
+
import { NavigateOptions, To, useNavigate } from 'react-router-dom'
|
|
4
|
+
|
|
5
|
+
export interface ListItemButtonExProps extends ListItemButtonProps {
|
|
6
|
+
target?: string
|
|
7
|
+
to?: To
|
|
8
|
+
toOptions?: NavigateOptions
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const ListItemButtonExTo: React.FC<ListItemButtonExProps> = ({ to, toOptions, onClick, ...props }) => {
|
|
12
|
+
const navigate = useNavigate()
|
|
13
|
+
const localOnClick = (event: MouseEvent<HTMLDivElement>) => {
|
|
14
|
+
onClick?.(event)
|
|
15
|
+
if (to) {
|
|
16
|
+
navigate(to, toOptions)
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return <ListItemButton onClick={localOnClick} {...props} />
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const ListItemButtonEx: React.FC<ListItemButtonExProps> = ({ to, ...props }) => {
|
|
24
|
+
if (to) {
|
|
25
|
+
return <ListItemButtonExTo to={to} {...props} />
|
|
26
|
+
} else {
|
|
27
|
+
return <ListItemButtonEx {...props} />
|
|
28
|
+
}
|
|
29
|
+
}
|