@xyo-network/react-card 2.81.10 → 2.83.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/index.d.ts +52 -2
- package/dist/browser/index.mjs +278 -0
- package/dist/browser/index.mjs.map +1 -0
- package/package.json +14 -30
- package/src/components/CardContentEx.stories.tsx +8 -7
- package/src/components/CardContentEx.tsx +1 -1
- package/src/components/CardEx.tsx +7 -5
- package/src/components/FullWidthCard/FullWidthCard.stories.tsx +3 -3
- package/src/components/FullWidthCard/FullWidthCard.tsx +41 -32
- package/src/components/FullWidthCard/index.ts +1 -1
- package/src/components/PageCard.stories.tsx +6 -5
- package/src/components/PageCard.tsx +11 -9
- package/src/components/SimpleCard/SimpleCard.stories.tsx +4 -4
- package/src/components/SimpleCard/SimpleCard.tsx +65 -53
- package/src/components/SimpleCard/index.ts +1 -1
- package/src/components/SimpleCardGrid/SimpleCardGrid.stories.tsx +4 -4
- package/src/components/SimpleCardGrid/SimpleCardGrid.tsx +2 -1
- package/src/components/SimpleCardGrid/index.ts +1 -1
- package/src/components/index.ts +5 -5
- package/src/index.ts +1 -1
- package/xy.config.ts +12 -0
- package/dist/browser/components/CardContentEx.d.cts +0 -10
- package/dist/browser/components/CardContentEx.d.cts.map +0 -1
- package/dist/browser/components/CardContentEx.d.mts +0 -10
- package/dist/browser/components/CardContentEx.d.mts.map +0 -1
- package/dist/browser/components/CardContentEx.d.ts +0 -10
- package/dist/browser/components/CardContentEx.d.ts.map +0 -1
- package/dist/browser/components/CardEx.d.cts +0 -7
- package/dist/browser/components/CardEx.d.cts.map +0 -1
- package/dist/browser/components/CardEx.d.mts +0 -7
- package/dist/browser/components/CardEx.d.mts.map +0 -1
- package/dist/browser/components/CardEx.d.ts +0 -7
- package/dist/browser/components/CardEx.d.ts.map +0 -1
- package/dist/browser/components/FullWidthCard/FullWidthCard.d.cts +0 -15
- package/dist/browser/components/FullWidthCard/FullWidthCard.d.cts.map +0 -1
- package/dist/browser/components/FullWidthCard/FullWidthCard.d.mts +0 -15
- package/dist/browser/components/FullWidthCard/FullWidthCard.d.mts.map +0 -1
- package/dist/browser/components/FullWidthCard/FullWidthCard.d.ts +0 -15
- package/dist/browser/components/FullWidthCard/FullWidthCard.d.ts.map +0 -1
- package/dist/browser/components/FullWidthCard/index.d.cts +0 -2
- package/dist/browser/components/FullWidthCard/index.d.cts.map +0 -1
- package/dist/browser/components/FullWidthCard/index.d.mts +0 -2
- package/dist/browser/components/FullWidthCard/index.d.mts.map +0 -1
- package/dist/browser/components/FullWidthCard/index.d.ts +0 -2
- package/dist/browser/components/FullWidthCard/index.d.ts.map +0 -1
- package/dist/browser/components/PageCard.d.cts +0 -10
- package/dist/browser/components/PageCard.d.cts.map +0 -1
- package/dist/browser/components/PageCard.d.mts +0 -10
- package/dist/browser/components/PageCard.d.mts.map +0 -1
- package/dist/browser/components/PageCard.d.ts +0 -10
- package/dist/browser/components/PageCard.d.ts.map +0 -1
- package/dist/browser/components/SimpleCard/SimpleCard.d.cts +0 -16
- package/dist/browser/components/SimpleCard/SimpleCard.d.cts.map +0 -1
- package/dist/browser/components/SimpleCard/SimpleCard.d.mts +0 -16
- package/dist/browser/components/SimpleCard/SimpleCard.d.mts.map +0 -1
- package/dist/browser/components/SimpleCard/SimpleCard.d.ts +0 -16
- package/dist/browser/components/SimpleCard/SimpleCard.d.ts.map +0 -1
- package/dist/browser/components/SimpleCard/index.d.cts +0 -2
- package/dist/browser/components/SimpleCard/index.d.cts.map +0 -1
- package/dist/browser/components/SimpleCard/index.d.mts +0 -2
- package/dist/browser/components/SimpleCard/index.d.mts.map +0 -1
- package/dist/browser/components/SimpleCard/index.d.ts +0 -2
- package/dist/browser/components/SimpleCard/index.d.ts.map +0 -1
- package/dist/browser/components/SimpleCardGrid/SimpleCardGrid.d.cts +0 -7
- package/dist/browser/components/SimpleCardGrid/SimpleCardGrid.d.cts.map +0 -1
- package/dist/browser/components/SimpleCardGrid/SimpleCardGrid.d.mts +0 -7
- package/dist/browser/components/SimpleCardGrid/SimpleCardGrid.d.mts.map +0 -1
- package/dist/browser/components/SimpleCardGrid/SimpleCardGrid.d.ts +0 -7
- package/dist/browser/components/SimpleCardGrid/SimpleCardGrid.d.ts.map +0 -1
- package/dist/browser/components/SimpleCardGrid/index.d.cts +0 -2
- package/dist/browser/components/SimpleCardGrid/index.d.cts.map +0 -1
- package/dist/browser/components/SimpleCardGrid/index.d.mts +0 -2
- package/dist/browser/components/SimpleCardGrid/index.d.mts.map +0 -1
- package/dist/browser/components/SimpleCardGrid/index.d.ts +0 -2
- package/dist/browser/components/SimpleCardGrid/index.d.ts.map +0 -1
- package/dist/browser/components/index.d.cts +0 -6
- package/dist/browser/components/index.d.cts.map +0 -1
- package/dist/browser/components/index.d.mts +0 -6
- package/dist/browser/components/index.d.mts.map +0 -1
- package/dist/browser/components/index.d.ts +0 -6
- package/dist/browser/components/index.d.ts.map +0 -1
- package/dist/browser/index.cjs +0 -248
- package/dist/browser/index.cjs.map +0 -1
- package/dist/browser/index.d.cts +0 -2
- package/dist/browser/index.d.cts.map +0 -1
- package/dist/browser/index.d.mts +0 -2
- package/dist/browser/index.d.mts.map +0 -1
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -225
- package/dist/browser/index.js.map +0 -1
- package/dist/neutral/components/CardContentEx.d.cts +0 -10
- package/dist/neutral/components/CardContentEx.d.cts.map +0 -1
- package/dist/neutral/components/CardContentEx.d.mts +0 -10
- package/dist/neutral/components/CardContentEx.d.mts.map +0 -1
- package/dist/neutral/components/CardContentEx.d.ts +0 -10
- package/dist/neutral/components/CardContentEx.d.ts.map +0 -1
- package/dist/neutral/components/CardEx.d.cts +0 -7
- package/dist/neutral/components/CardEx.d.cts.map +0 -1
- package/dist/neutral/components/CardEx.d.mts +0 -7
- package/dist/neutral/components/CardEx.d.mts.map +0 -1
- package/dist/neutral/components/CardEx.d.ts +0 -7
- package/dist/neutral/components/CardEx.d.ts.map +0 -1
- package/dist/neutral/components/FullWidthCard/FullWidthCard.d.cts +0 -15
- package/dist/neutral/components/FullWidthCard/FullWidthCard.d.cts.map +0 -1
- package/dist/neutral/components/FullWidthCard/FullWidthCard.d.mts +0 -15
- package/dist/neutral/components/FullWidthCard/FullWidthCard.d.mts.map +0 -1
- package/dist/neutral/components/FullWidthCard/FullWidthCard.d.ts +0 -15
- package/dist/neutral/components/FullWidthCard/FullWidthCard.d.ts.map +0 -1
- package/dist/neutral/components/FullWidthCard/index.d.cts +0 -2
- package/dist/neutral/components/FullWidthCard/index.d.cts.map +0 -1
- package/dist/neutral/components/FullWidthCard/index.d.mts +0 -2
- package/dist/neutral/components/FullWidthCard/index.d.mts.map +0 -1
- package/dist/neutral/components/FullWidthCard/index.d.ts +0 -2
- package/dist/neutral/components/FullWidthCard/index.d.ts.map +0 -1
- package/dist/neutral/components/PageCard.d.cts +0 -10
- package/dist/neutral/components/PageCard.d.cts.map +0 -1
- package/dist/neutral/components/PageCard.d.mts +0 -10
- package/dist/neutral/components/PageCard.d.mts.map +0 -1
- package/dist/neutral/components/PageCard.d.ts +0 -10
- package/dist/neutral/components/PageCard.d.ts.map +0 -1
- package/dist/neutral/components/SimpleCard/SimpleCard.d.cts +0 -16
- package/dist/neutral/components/SimpleCard/SimpleCard.d.cts.map +0 -1
- package/dist/neutral/components/SimpleCard/SimpleCard.d.mts +0 -16
- package/dist/neutral/components/SimpleCard/SimpleCard.d.mts.map +0 -1
- package/dist/neutral/components/SimpleCard/SimpleCard.d.ts +0 -16
- package/dist/neutral/components/SimpleCard/SimpleCard.d.ts.map +0 -1
- package/dist/neutral/components/SimpleCard/index.d.cts +0 -2
- package/dist/neutral/components/SimpleCard/index.d.cts.map +0 -1
- package/dist/neutral/components/SimpleCard/index.d.mts +0 -2
- package/dist/neutral/components/SimpleCard/index.d.mts.map +0 -1
- package/dist/neutral/components/SimpleCard/index.d.ts +0 -2
- package/dist/neutral/components/SimpleCard/index.d.ts.map +0 -1
- package/dist/neutral/components/SimpleCardGrid/SimpleCardGrid.d.cts +0 -7
- package/dist/neutral/components/SimpleCardGrid/SimpleCardGrid.d.cts.map +0 -1
- package/dist/neutral/components/SimpleCardGrid/SimpleCardGrid.d.mts +0 -7
- package/dist/neutral/components/SimpleCardGrid/SimpleCardGrid.d.mts.map +0 -1
- package/dist/neutral/components/SimpleCardGrid/SimpleCardGrid.d.ts +0 -7
- package/dist/neutral/components/SimpleCardGrid/SimpleCardGrid.d.ts.map +0 -1
- package/dist/neutral/components/SimpleCardGrid/index.d.cts +0 -2
- package/dist/neutral/components/SimpleCardGrid/index.d.cts.map +0 -1
- package/dist/neutral/components/SimpleCardGrid/index.d.mts +0 -2
- package/dist/neutral/components/SimpleCardGrid/index.d.mts.map +0 -1
- package/dist/neutral/components/SimpleCardGrid/index.d.ts +0 -2
- package/dist/neutral/components/SimpleCardGrid/index.d.ts.map +0 -1
- package/dist/neutral/components/index.d.cts +0 -6
- package/dist/neutral/components/index.d.cts.map +0 -1
- package/dist/neutral/components/index.d.mts +0 -6
- package/dist/neutral/components/index.d.mts.map +0 -1
- package/dist/neutral/components/index.d.ts +0 -6
- package/dist/neutral/components/index.d.ts.map +0 -1
- package/dist/neutral/index.cjs +0 -248
- package/dist/neutral/index.cjs.map +0 -1
- package/dist/neutral/index.d.cts +0 -2
- package/dist/neutral/index.d.cts.map +0 -1
- package/dist/neutral/index.d.mts +0 -2
- package/dist/neutral/index.d.mts.map +0 -1
- package/dist/neutral/index.d.ts +0 -2
- package/dist/neutral/index.d.ts.map +0 -1
- package/dist/neutral/index.js +0 -225
- package/dist/neutral/index.js.map +0 -1
- package/dist/node/components/CardContentEx.d.cts +0 -10
- package/dist/node/components/CardContentEx.d.cts.map +0 -1
- package/dist/node/components/CardContentEx.d.mts +0 -10
- package/dist/node/components/CardContentEx.d.mts.map +0 -1
- package/dist/node/components/CardContentEx.d.ts +0 -10
- package/dist/node/components/CardContentEx.d.ts.map +0 -1
- package/dist/node/components/CardEx.d.cts +0 -7
- package/dist/node/components/CardEx.d.cts.map +0 -1
- package/dist/node/components/CardEx.d.mts +0 -7
- package/dist/node/components/CardEx.d.mts.map +0 -1
- package/dist/node/components/CardEx.d.ts +0 -7
- package/dist/node/components/CardEx.d.ts.map +0 -1
- package/dist/node/components/FullWidthCard/FullWidthCard.d.cts +0 -15
- package/dist/node/components/FullWidthCard/FullWidthCard.d.cts.map +0 -1
- package/dist/node/components/FullWidthCard/FullWidthCard.d.mts +0 -15
- package/dist/node/components/FullWidthCard/FullWidthCard.d.mts.map +0 -1
- package/dist/node/components/FullWidthCard/FullWidthCard.d.ts +0 -15
- package/dist/node/components/FullWidthCard/FullWidthCard.d.ts.map +0 -1
- package/dist/node/components/FullWidthCard/index.d.cts +0 -2
- package/dist/node/components/FullWidthCard/index.d.cts.map +0 -1
- package/dist/node/components/FullWidthCard/index.d.mts +0 -2
- package/dist/node/components/FullWidthCard/index.d.mts.map +0 -1
- package/dist/node/components/FullWidthCard/index.d.ts +0 -2
- package/dist/node/components/FullWidthCard/index.d.ts.map +0 -1
- package/dist/node/components/PageCard.d.cts +0 -10
- package/dist/node/components/PageCard.d.cts.map +0 -1
- package/dist/node/components/PageCard.d.mts +0 -10
- package/dist/node/components/PageCard.d.mts.map +0 -1
- package/dist/node/components/PageCard.d.ts +0 -10
- package/dist/node/components/PageCard.d.ts.map +0 -1
- package/dist/node/components/SimpleCard/SimpleCard.d.cts +0 -16
- package/dist/node/components/SimpleCard/SimpleCard.d.cts.map +0 -1
- package/dist/node/components/SimpleCard/SimpleCard.d.mts +0 -16
- package/dist/node/components/SimpleCard/SimpleCard.d.mts.map +0 -1
- package/dist/node/components/SimpleCard/SimpleCard.d.ts +0 -16
- package/dist/node/components/SimpleCard/SimpleCard.d.ts.map +0 -1
- package/dist/node/components/SimpleCard/index.d.cts +0 -2
- package/dist/node/components/SimpleCard/index.d.cts.map +0 -1
- package/dist/node/components/SimpleCard/index.d.mts +0 -2
- package/dist/node/components/SimpleCard/index.d.mts.map +0 -1
- package/dist/node/components/SimpleCard/index.d.ts +0 -2
- package/dist/node/components/SimpleCard/index.d.ts.map +0 -1
- package/dist/node/components/SimpleCardGrid/SimpleCardGrid.d.cts +0 -7
- package/dist/node/components/SimpleCardGrid/SimpleCardGrid.d.cts.map +0 -1
- package/dist/node/components/SimpleCardGrid/SimpleCardGrid.d.mts +0 -7
- package/dist/node/components/SimpleCardGrid/SimpleCardGrid.d.mts.map +0 -1
- package/dist/node/components/SimpleCardGrid/SimpleCardGrid.d.ts +0 -7
- package/dist/node/components/SimpleCardGrid/SimpleCardGrid.d.ts.map +0 -1
- package/dist/node/components/SimpleCardGrid/index.d.cts +0 -2
- package/dist/node/components/SimpleCardGrid/index.d.cts.map +0 -1
- package/dist/node/components/SimpleCardGrid/index.d.mts +0 -2
- package/dist/node/components/SimpleCardGrid/index.d.mts.map +0 -1
- package/dist/node/components/SimpleCardGrid/index.d.ts +0 -2
- package/dist/node/components/SimpleCardGrid/index.d.ts.map +0 -1
- package/dist/node/components/index.d.cts +0 -6
- package/dist/node/components/index.d.cts.map +0 -1
- package/dist/node/components/index.d.mts +0 -6
- package/dist/node/components/index.d.mts.map +0 -1
- package/dist/node/components/index.d.ts +0 -6
- package/dist/node/components/index.d.ts.map +0 -1
- package/dist/node/index.cjs +0 -259
- package/dist/node/index.cjs.map +0 -1
- package/dist/node/index.d.cts +0 -2
- package/dist/node/index.d.cts.map +0 -1
- package/dist/node/index.d.mts +0 -2
- package/dist/node/index.d.mts.map +0 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.d.ts.map +0 -1
- package/dist/node/index.js +0 -226
- package/dist/node/index.js.map +0 -1
package/dist/browser/index.d.ts
CHANGED
@@ -1,2 +1,52 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { CardContentProps, CardProps, CardHeaderProps } from '@mui/material';
|
2
|
+
import React, { ReactNode } from 'react';
|
3
|
+
import { To } from 'react-router-dom';
|
4
|
+
|
5
|
+
type CardContentExProps = CardContentProps & {
|
6
|
+
refreshRef?: number;
|
7
|
+
removePadding?: boolean;
|
8
|
+
scrollToTop?: number;
|
9
|
+
variant?: 'scrollable' | 'normal';
|
10
|
+
};
|
11
|
+
declare const CardContentExWithRef: React.ForwardRefExoticComponent<Omit<CardContentExProps, "ref"> & React.RefAttributes<HTMLDivElement | null>>;
|
12
|
+
declare const CardContentEx: React.ForwardRefExoticComponent<Omit<CardContentExProps, "ref"> & React.RefAttributes<HTMLDivElement | null>>;
|
13
|
+
|
14
|
+
interface CardExProps extends CardProps {
|
15
|
+
gradient?: 'border' | 'background';
|
16
|
+
}
|
17
|
+
declare const CardExWithRef: React.ForwardRefExoticComponent<Omit<CardExProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
18
|
+
declare const CardEx: React.ForwardRefExoticComponent<Omit<CardExProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
19
|
+
|
20
|
+
interface FullWidthCardProps extends CardProps {
|
21
|
+
cardIsButton?: boolean;
|
22
|
+
desc?: ReactNode;
|
23
|
+
href?: string;
|
24
|
+
linkText?: string;
|
25
|
+
media?: string;
|
26
|
+
name: ReactNode;
|
27
|
+
small?: boolean;
|
28
|
+
to?: To;
|
29
|
+
}
|
30
|
+
declare const FullWidthCard: React.FC<FullWidthCardProps>;
|
31
|
+
|
32
|
+
interface PageCardProps extends CardExProps {
|
33
|
+
action?: ReactNode;
|
34
|
+
onRefresh?: () => void;
|
35
|
+
subheader?: CardHeaderProps['subheader'];
|
36
|
+
}
|
37
|
+
declare const PageCard: React.ForwardRefExoticComponent<Omit<PageCardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
38
|
+
|
39
|
+
interface SimpleCardProps extends CardExProps {
|
40
|
+
desc?: ReactNode;
|
41
|
+
headline?: ReactNode;
|
42
|
+
href?: string;
|
43
|
+
iconImage?: string;
|
44
|
+
interactionVariant?: 'button' | 'card';
|
45
|
+
media?: string;
|
46
|
+
small?: boolean;
|
47
|
+
subtitle?: string;
|
48
|
+
to?: To;
|
49
|
+
}
|
50
|
+
declare const SimpleCard: React.FC<SimpleCardProps>;
|
51
|
+
|
52
|
+
export { CardContentEx, type CardContentExProps, CardContentExWithRef, CardEx, type CardExProps, CardExWithRef, FullWidthCard, type FullWidthCardProps, PageCard, type PageCardProps, SimpleCard, type SimpleCardProps };
|
@@ -0,0 +1,278 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
3
|
+
|
4
|
+
// src/components/CardContentEx.tsx
|
5
|
+
import { CardContent, styled } from "@mui/material";
|
6
|
+
import { useShareForwardedRef } from "@xyo-network/react-shared";
|
7
|
+
import React, { forwardRef, useEffect } from "react";
|
8
|
+
var CardContentExRoot = styled(CardContent, {
|
9
|
+
name: "CardContentEx",
|
10
|
+
shouldForwardProp: /* @__PURE__ */ __name((prop) => ![
|
11
|
+
"variant",
|
12
|
+
"removePadding"
|
13
|
+
].includes(prop), "shouldForwardProp"),
|
14
|
+
slot: "Root"
|
15
|
+
})(({ variant, removePadding }) => ({
|
16
|
+
...(variant === "scrollable" || removePadding) && {
|
17
|
+
[":last-child"]: {
|
18
|
+
paddingBottom: 0
|
19
|
+
},
|
20
|
+
overflow: "auto",
|
21
|
+
paddingTop: 0,
|
22
|
+
...removePadding && {
|
23
|
+
padding: 0
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}));
|
27
|
+
var CardContentExWithRef = /* @__PURE__ */ forwardRef(({ scrollToTop = 0, refreshRef = 0, ...props }, ref) => {
|
28
|
+
const sharedRef = useShareForwardedRef(ref, refreshRef);
|
29
|
+
useEffect(() => {
|
30
|
+
if (sharedRef && scrollToTop) {
|
31
|
+
sharedRef.current?.scroll({
|
32
|
+
behavior: "smooth",
|
33
|
+
top: 0
|
34
|
+
});
|
35
|
+
}
|
36
|
+
}, [
|
37
|
+
sharedRef,
|
38
|
+
scrollToTop
|
39
|
+
]);
|
40
|
+
return /* @__PURE__ */ React.createElement(CardContentExRoot, {
|
41
|
+
ref: sharedRef,
|
42
|
+
...props
|
43
|
+
});
|
44
|
+
});
|
45
|
+
CardContentExWithRef.displayName = "CardContentEx";
|
46
|
+
var CardContentEx = CardContentExWithRef;
|
47
|
+
|
48
|
+
// src/components/CardEx.tsx
|
49
|
+
import { Card } from "@mui/material";
|
50
|
+
import { useGradientStyles } from "@xyo-network/react-shared";
|
51
|
+
import React2, { forwardRef as forwardRef2 } from "react";
|
52
|
+
var CardExWithRef = /* @__PURE__ */ forwardRef2(({ style, gradient, ...props }, ref) => {
|
53
|
+
const { styles } = useGradientStyles();
|
54
|
+
const gradientStyle = gradient === "border" ? styles.border : gradient === "background" ? styles.background : {};
|
55
|
+
return /* @__PURE__ */ React2.createElement(Card, {
|
56
|
+
style: {
|
57
|
+
...gradientStyle,
|
58
|
+
...style
|
59
|
+
},
|
60
|
+
ref,
|
61
|
+
...props
|
62
|
+
});
|
63
|
+
});
|
64
|
+
CardExWithRef.displayName = "CardEx";
|
65
|
+
var CardEx = CardExWithRef;
|
66
|
+
|
67
|
+
// src/components/FullWidthCard/FullWidthCard.tsx
|
68
|
+
import { ArrowForwardRounded as ArrowForwardRoundedIcon } from "@mui/icons-material";
|
69
|
+
import { alpha, Card as Card2, CardActions, CardContent as CardContent2, CardMedia, Grid, IconButton, Typography, useTheme, Zoom } from "@mui/material";
|
70
|
+
import { FlexGrowCol } from "@xylabs/react-flexbox";
|
71
|
+
import { useIsMobile } from "@xyo-network/react-shared";
|
72
|
+
import React3, { useState } from "react";
|
73
|
+
import { useNavigate } from "react-router-dom";
|
74
|
+
var FullWidthCard = /* @__PURE__ */ __name(({ cardIsButton, desc, href, media, name, small, to, ...props }) => {
|
75
|
+
const theme = useTheme();
|
76
|
+
const [raised, setRaised] = useState(false);
|
77
|
+
const navigate = useNavigate();
|
78
|
+
const isMobile = useIsMobile();
|
79
|
+
const localRouteChange = /* @__PURE__ */ __name((to2) => {
|
80
|
+
to2 ? navigate(to2) : navigate("/404");
|
81
|
+
}, "localRouteChange");
|
82
|
+
const externalRouteChange = /* @__PURE__ */ __name((href2) => {
|
83
|
+
href2 ? window.open(href2) : navigate("/404");
|
84
|
+
}, "externalRouteChange");
|
85
|
+
return /* @__PURE__ */ React3.createElement(Card2, {
|
86
|
+
elevation: raised ? 3 : 0,
|
87
|
+
style: {
|
88
|
+
height: "100%",
|
89
|
+
width: "100%"
|
90
|
+
},
|
91
|
+
...props,
|
92
|
+
sx: {
|
93
|
+
"&:hover": {
|
94
|
+
cursor: "pointer"
|
95
|
+
},
|
96
|
+
"backgroundColor": alpha(theme.palette.primary.light, 0.05)
|
97
|
+
},
|
98
|
+
onMouseEnter: /* @__PURE__ */ __name(() => isMobile ? null : cardIsButton ? setRaised(true) : null, "onMouseEnter"),
|
99
|
+
onMouseLeave: /* @__PURE__ */ __name(() => isMobile ? null : cardIsButton ? setRaised(false) : null, "onMouseLeave"),
|
100
|
+
onClick: /* @__PURE__ */ __name(() => cardIsButton ? href ? externalRouteChange(href) : to ? localRouteChange(to) : navigate("/404") : null, "onClick")
|
101
|
+
}, media ? /* @__PURE__ */ React3.createElement(CardMedia, {
|
102
|
+
component: "img",
|
103
|
+
height: "100",
|
104
|
+
image: media,
|
105
|
+
alt: ""
|
106
|
+
}) : null, /* @__PURE__ */ React3.createElement(CardContent2, null, /* @__PURE__ */ React3.createElement(Grid, {
|
107
|
+
container: true,
|
108
|
+
alignItems: "center",
|
109
|
+
paddingY: 2,
|
110
|
+
paddingX: 2
|
111
|
+
}, /* @__PURE__ */ React3.createElement(Grid, {
|
112
|
+
item: true,
|
113
|
+
xs: 12,
|
114
|
+
md: 6
|
115
|
+
}, typeof name === "string" ? /* @__PURE__ */ React3.createElement(Typography, {
|
116
|
+
fontWeight: 700,
|
117
|
+
variant: "h2",
|
118
|
+
textAlign: "left",
|
119
|
+
paddingBottom: 1
|
120
|
+
}, name) : name), /* @__PURE__ */ React3.createElement(Grid, {
|
121
|
+
item: true,
|
122
|
+
xs: 12,
|
123
|
+
md: 5
|
124
|
+
}, /* @__PURE__ */ React3.createElement(Typography, {
|
125
|
+
variant: "body1",
|
126
|
+
fontWeight: 400,
|
127
|
+
textAlign: "left"
|
128
|
+
}, desc)), /* @__PURE__ */ React3.createElement(Grid, {
|
129
|
+
item: true,
|
130
|
+
xs: 1,
|
131
|
+
display: isMobile ? "none" : "flex",
|
132
|
+
justifyContent: "center"
|
133
|
+
}, /* @__PURE__ */ React3.createElement(Zoom, {
|
134
|
+
in: raised
|
135
|
+
}, /* @__PURE__ */ React3.createElement(IconButton, {
|
136
|
+
color: "primary",
|
137
|
+
size: small ? "small" : "medium",
|
138
|
+
onClick: /* @__PURE__ */ __name(() => href ? externalRouteChange(href) : to ? localRouteChange(to) : navigate("/404"), "onClick"),
|
139
|
+
disableFocusRipple: true,
|
140
|
+
disableRipple: true,
|
141
|
+
disableTouchRipple: true
|
142
|
+
}, /* @__PURE__ */ React3.createElement(ArrowForwardRoundedIcon, {
|
143
|
+
fontSize: small ? "small" : "medium"
|
144
|
+
})))))), /* @__PURE__ */ React3.createElement(CardActions, {
|
145
|
+
sx: {
|
146
|
+
display: {
|
147
|
+
md: isMobile ? "flex" : "none"
|
148
|
+
}
|
149
|
+
}
|
150
|
+
}, /* @__PURE__ */ React3.createElement(FlexGrowCol, {
|
151
|
+
alignItems: "flex-end"
|
152
|
+
}, /* @__PURE__ */ React3.createElement(IconButton, {
|
153
|
+
color: "primary",
|
154
|
+
size: small ? "small" : "medium",
|
155
|
+
onClick: /* @__PURE__ */ __name(() => href ? externalRouteChange(href) : to ? localRouteChange(to) : navigate("/404"), "onClick"),
|
156
|
+
disableFocusRipple: true,
|
157
|
+
disableRipple: true,
|
158
|
+
disableTouchRipple: true
|
159
|
+
}, /* @__PURE__ */ React3.createElement(ArrowForwardRoundedIcon, {
|
160
|
+
fontSize: small ? "small" : "medium"
|
161
|
+
})))));
|
162
|
+
}, "FullWidthCard");
|
163
|
+
|
164
|
+
// src/components/PageCard.tsx
|
165
|
+
import { Refresh as RefreshIcon } from "@mui/icons-material";
|
166
|
+
import { CardHeader, IconButton as IconButton2 } from "@mui/material";
|
167
|
+
import { TypographyEx } from "@xyo-network/react-shared";
|
168
|
+
import React4, { forwardRef as forwardRef3 } from "react";
|
169
|
+
var PageCardWithRef = /* @__PURE__ */ forwardRef3(({ subheader, title, onRefresh, children, action, style, ...props }, ref) => {
|
170
|
+
return /* @__PURE__ */ React4.createElement(CardEx, {
|
171
|
+
style: {
|
172
|
+
backgroundColor: "transparent",
|
173
|
+
position: "relative",
|
174
|
+
...style
|
175
|
+
},
|
176
|
+
elevation: 0,
|
177
|
+
ref,
|
178
|
+
...props
|
179
|
+
}, /* @__PURE__ */ React4.createElement(CardHeader, {
|
180
|
+
title: /* @__PURE__ */ React4.createElement(TypographyEx, {
|
181
|
+
variant: "h5",
|
182
|
+
gutterBottom: true
|
183
|
+
}, title),
|
184
|
+
subheader: /* @__PURE__ */ React4.createElement(TypographyEx, {
|
185
|
+
variant: "subtitle1"
|
186
|
+
}, subheader),
|
187
|
+
action: action ?? /* @__PURE__ */ React4.createElement(React4.Fragment, null, onRefresh ? /* @__PURE__ */ React4.createElement(IconButton2, {
|
188
|
+
onClick: /* @__PURE__ */ __name(() => onRefresh?.(), "onClick")
|
189
|
+
}, /* @__PURE__ */ React4.createElement(RefreshIcon, null)) : null)
|
190
|
+
}), children);
|
191
|
+
});
|
192
|
+
PageCardWithRef.displayName = "PageCard";
|
193
|
+
var PageCard = PageCardWithRef;
|
194
|
+
|
195
|
+
// src/components/SimpleCard/SimpleCard.tsx
|
196
|
+
import { ArrowForwardRounded as ArrowForwardRoundedIcon2 } from "@mui/icons-material";
|
197
|
+
import { alpha as alpha2, CardActions as CardActions2, CardContent as CardContent3, CardMedia as CardMedia2, IconButton as IconButton3, Typography as Typography2, useTheme as useTheme2 } from "@mui/material";
|
198
|
+
import { FlexCol, FlexGrowCol as FlexGrowCol2 } from "@xylabs/react-flexbox";
|
199
|
+
import { useIsMobile as useIsMobile2 } from "@xyo-network/react-shared";
|
200
|
+
import React5, { useState as useState2 } from "react";
|
201
|
+
import { useNavigate as useNavigate2 } from "react-router-dom";
|
202
|
+
var SimpleCard = /* @__PURE__ */ __name(({ desc, iconImage, interactionVariant = "card", headline, href, media, small, subtitle, sx, to, ...props }) => {
|
203
|
+
const theme = useTheme2();
|
204
|
+
const [raised, setRaised] = useState2(false);
|
205
|
+
const navigate = useNavigate2();
|
206
|
+
const isMobile = useIsMobile2();
|
207
|
+
const localRouteChange = /* @__PURE__ */ __name((to2) => {
|
208
|
+
to2 ? navigate(to2) : navigate("/404");
|
209
|
+
}, "localRouteChange");
|
210
|
+
const externalRouteChange = /* @__PURE__ */ __name((href2) => {
|
211
|
+
href2 ? window.open(href2) : navigate("/404");
|
212
|
+
}, "externalRouteChange");
|
213
|
+
return /* @__PURE__ */ React5.createElement(CardEx, {
|
214
|
+
elevation: raised ? 3 : 0,
|
215
|
+
sx: {
|
216
|
+
"&:hover": {
|
217
|
+
cursor: interactionVariant == "button" ? "pointer" : null
|
218
|
+
},
|
219
|
+
"backgroundColor": alpha2(theme.palette.primary.light, 0.05),
|
220
|
+
...sx
|
221
|
+
},
|
222
|
+
onMouseEnter: /* @__PURE__ */ __name(() => isMobile ? null : interactionVariant == "button" ? setRaised(true) : null, "onMouseEnter"),
|
223
|
+
onMouseLeave: /* @__PURE__ */ __name(() => isMobile ? null : interactionVariant == "button" ? setRaised(false) : null, "onMouseLeave"),
|
224
|
+
onClick: /* @__PURE__ */ __name(() => interactionVariant == "button" ? href ? externalRouteChange(href) : to ? localRouteChange(to) : navigate("/404") : null, "onClick"),
|
225
|
+
...props
|
226
|
+
}, media ? /* @__PURE__ */ React5.createElement(CardMedia2, {
|
227
|
+
component: "img",
|
228
|
+
height: "100",
|
229
|
+
image: media,
|
230
|
+
alt: ""
|
231
|
+
}) : null, /* @__PURE__ */ React5.createElement(CardContent3, {
|
232
|
+
sx: {
|
233
|
+
height: "100%"
|
234
|
+
}
|
235
|
+
}, /* @__PURE__ */ React5.createElement(FlexCol, {
|
236
|
+
width: "100%",
|
237
|
+
alignItems: "flex-start"
|
238
|
+
}, iconImage ? /* @__PURE__ */ React5.createElement("img", {
|
239
|
+
src: iconImage,
|
240
|
+
height: "40px",
|
241
|
+
style: {
|
242
|
+
paddingBottom: "8px"
|
243
|
+
}
|
244
|
+
}) : null, typeof headline === "string" ? /* @__PURE__ */ React5.createElement(Typography2, {
|
245
|
+
variant: small ? "body1" : "h6",
|
246
|
+
textAlign: "left",
|
247
|
+
gutterBottom: true
|
248
|
+
}, headline) : headline, subtitle ? /* @__PURE__ */ React5.createElement(Typography2, {
|
249
|
+
variant: "subtitle2",
|
250
|
+
textAlign: "left",
|
251
|
+
gutterBottom: true
|
252
|
+
}, subtitle) : null, /* @__PURE__ */ React5.createElement(Typography2, {
|
253
|
+
variant: small ? "caption" : "body1",
|
254
|
+
textAlign: "left",
|
255
|
+
gutterBottom: true
|
256
|
+
}, desc))), interactionVariant == "button" ? /* @__PURE__ */ React5.createElement(CardActions2, null, /* @__PURE__ */ React5.createElement(FlexGrowCol2, {
|
257
|
+
alignItems: "flex-end"
|
258
|
+
}, /* @__PURE__ */ React5.createElement(IconButton3, {
|
259
|
+
color: raised ? "secondary" : "primary",
|
260
|
+
size: small ? "small" : "medium",
|
261
|
+
onClick: /* @__PURE__ */ __name(() => href ? externalRouteChange(href) : to ? localRouteChange(to) : navigate("/404"), "onClick"),
|
262
|
+
disableFocusRipple: true,
|
263
|
+
disableRipple: true,
|
264
|
+
disableTouchRipple: true
|
265
|
+
}, /* @__PURE__ */ React5.createElement(ArrowForwardRoundedIcon2, {
|
266
|
+
fontSize: small ? "small" : "medium"
|
267
|
+
})))) : null);
|
268
|
+
}, "SimpleCard");
|
269
|
+
export {
|
270
|
+
CardContentEx,
|
271
|
+
CardContentExWithRef,
|
272
|
+
CardEx,
|
273
|
+
CardExWithRef,
|
274
|
+
FullWidthCard,
|
275
|
+
PageCard,
|
276
|
+
SimpleCard
|
277
|
+
};
|
278
|
+
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +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,GAAzD;EACnBE,MAAM;AACR,CAAA,EAAuB,CAAC,EAAEC,SAASC,cAAa,OAAQ;EACtD,IAA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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"]}
|
package/package.json
CHANGED
@@ -10,9 +10,9 @@
|
|
10
10
|
"url": "https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues"
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
|
-
"@xylabs/react-flexbox": "^3.4.
|
14
|
-
"@xyo-network/react-shared": "^2.
|
15
|
-
"react-router-dom": "^6.
|
13
|
+
"@xylabs/react-flexbox": "^3.4.2",
|
14
|
+
"@xyo-network/react-shared": "^2.83.0",
|
15
|
+
"react-router-dom": "^6.26.0"
|
16
16
|
},
|
17
17
|
"peerDependencies": {
|
18
18
|
"@mui/icons-material": "^5",
|
@@ -22,42 +22,26 @@
|
|
22
22
|
"react-dom": "^18"
|
23
23
|
},
|
24
24
|
"devDependencies": {
|
25
|
-
"@storybook/react": "^
|
26
|
-
"@xylabs/ts-scripts-yarn3": "^
|
27
|
-
"@xylabs/tsconfig-react": "^
|
28
|
-
"@xyo-network/react-storybook": "^2.
|
25
|
+
"@storybook/react": "^8.2.7",
|
26
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.7",
|
27
|
+
"@xylabs/tsconfig-react": "^4.0.0-rc.7",
|
28
|
+
"@xyo-network/react-storybook": "^2.83.0",
|
29
29
|
"typescript": "^5.5.4"
|
30
30
|
},
|
31
31
|
"description": "Common React library for all XYO projects that use React",
|
32
32
|
"docs": "dist/docs.json",
|
33
33
|
"exports": {
|
34
34
|
".": {
|
35
|
-
"
|
36
|
-
"
|
37
|
-
|
38
|
-
"default": "./dist/node/index.js"
|
39
|
-
},
|
40
|
-
"require": {
|
41
|
-
"types": "./dist/node/index.d.cts",
|
42
|
-
"default": "./dist/node/index.cjs"
|
43
|
-
}
|
35
|
+
"import": {
|
36
|
+
"types": "./dist/browser/index.d.ts",
|
37
|
+
"default": "./dist/browser/index.mjs"
|
44
38
|
},
|
45
|
-
"
|
46
|
-
|
47
|
-
"types": "./dist/browser/index.d.mts",
|
48
|
-
"default": "./dist/browser/index.js"
|
49
|
-
},
|
50
|
-
"require": {
|
51
|
-
"types": "./dist/browser/index.d.cts",
|
52
|
-
"default": "./dist/browser/index.cjs"
|
53
|
-
}
|
54
|
-
},
|
55
|
-
"default": "./dist/browser/index.js"
|
39
|
+
"types": "./dist/browser/index.d.ts",
|
40
|
+
"default": "./dist/browser/index.mjs"
|
56
41
|
},
|
57
42
|
"./package.json": "./package.json"
|
58
43
|
},
|
59
|
-
"
|
60
|
-
"module": "dist/browser/index.js",
|
44
|
+
"module": "dist/browser/index.mjs",
|
61
45
|
"homepage": "https://xyo.network",
|
62
46
|
"keywords": [
|
63
47
|
"xyo",
|
@@ -79,6 +63,6 @@
|
|
79
63
|
},
|
80
64
|
"sideEffects": false,
|
81
65
|
"types": "dist/browser/index.d.ts",
|
82
|
-
"version": "2.
|
66
|
+
"version": "2.83.0",
|
83
67
|
"type": "module"
|
84
68
|
}
|
@@ -1,12 +1,11 @@
|
|
1
|
-
/* eslint-disable import/no-internal-modules */
|
2
1
|
import { Button, Typography } from '@mui/material'
|
3
2
|
import { Decorator, Meta, StoryFn } from '@storybook/react'
|
4
3
|
import { FlexGrowCol } from '@xylabs/react-flexbox'
|
5
4
|
import { WithRefDecorator } from '@xyo-network/react-storybook'
|
6
|
-
import { useRef, useState } from 'react'
|
5
|
+
import React, { useRef, useState } from 'react'
|
7
6
|
|
8
|
-
import { CardContentEx } from './CardContentEx.
|
9
|
-
import { PageCard } from './PageCard.
|
7
|
+
import { CardContentEx } from './CardContentEx.tsx'
|
8
|
+
import { PageCard } from './PageCard.tsx'
|
10
9
|
|
11
10
|
const ScrollableDecorator: Decorator = (Story, args) => {
|
12
11
|
const [scrollToTop, setScrollToTop] = useState(0)
|
@@ -43,8 +42,11 @@ const Template: StoryFn<typeof CardContentEx> = (props) => {
|
|
43
42
|
return (
|
44
43
|
<PageCard title="Page Card" subheader="subheader">
|
45
44
|
<CardContentEx {...props}>
|
46
|
-
{[...Array(100).keys()].map(
|
47
|
-
<Typography key={item}>
|
45
|
+
{[...Array(100).keys()].map(item => (
|
46
|
+
<Typography key={item}>
|
47
|
+
{item}
|
48
|
+
. - Item row
|
49
|
+
</Typography>
|
48
50
|
))}
|
49
51
|
</CardContentEx>
|
50
52
|
</PageCard>
|
@@ -63,5 +65,4 @@ WithVariant.decorators = [ScrollableDecorator]
|
|
63
65
|
|
64
66
|
export { Default, WithRef, WithVariant }
|
65
67
|
|
66
|
-
// eslint-disable-next-line import/no-default-export
|
67
68
|
export default StorybookEntry
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { CardContent, CardContentProps, styled } from '@mui/material'
|
2
2
|
import { useShareForwardedRef } from '@xyo-network/react-shared'
|
3
|
-
import { forwardRef, useEffect } from 'react'
|
3
|
+
import React, { forwardRef, useEffect } from 'react'
|
4
4
|
|
5
5
|
const CardContentExRoot = styled(CardContent, {
|
6
6
|
name: 'CardContentEx',
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Card, CardProps } from '@mui/material'
|
2
2
|
import { useGradientStyles } from '@xyo-network/react-shared'
|
3
|
-
import { forwardRef } from 'react'
|
3
|
+
import React, { forwardRef } from 'react'
|
4
4
|
|
5
5
|
export interface CardExProps extends CardProps {
|
6
6
|
gradient?: 'border' | 'background'
|
@@ -8,10 +8,12 @@ export interface CardExProps extends CardProps {
|
|
8
8
|
|
9
9
|
export const CardExWithRef = forwardRef<HTMLDivElement, CardExProps>(({ style, gradient, ...props }, ref) => {
|
10
10
|
const { styles } = useGradientStyles()
|
11
|
-
const gradientStyle
|
12
|
-
gradient === 'border'
|
13
|
-
|
14
|
-
|
11
|
+
const gradientStyle
|
12
|
+
= gradient === 'border'
|
13
|
+
? styles.border
|
14
|
+
: gradient === 'background'
|
15
|
+
? styles.background
|
16
|
+
: {}
|
15
17
|
return (
|
16
18
|
<Card
|
17
19
|
style={{
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
2
|
+
import React from 'react'
|
2
3
|
import { BrowserRouter } from 'react-router-dom'
|
3
4
|
|
4
|
-
import { FullWidthCard } from './FullWidthCard.
|
5
|
+
import { FullWidthCard } from './FullWidthCard.tsx'
|
5
6
|
const StorybookEntry = {
|
6
7
|
argTypes: {},
|
7
8
|
component: FullWidthCard,
|
@@ -13,7 +14,7 @@ const StorybookEntry = {
|
|
13
14
|
title: 'shared/FullWidthCard',
|
14
15
|
} as Meta<typeof FullWidthCard>
|
15
16
|
|
16
|
-
const Template: StoryFn<typeof FullWidthCard> =
|
17
|
+
const Template: StoryFn<typeof FullWidthCard> = args => (
|
17
18
|
<BrowserRouter>
|
18
19
|
<FullWidthCard {...args}></FullWidthCard>
|
19
20
|
</BrowserRouter>
|
@@ -30,5 +31,4 @@ Default.args = {
|
|
30
31
|
|
31
32
|
export { Default }
|
32
33
|
|
33
|
-
// eslint-disable-next-line import/no-default-export
|
34
34
|
export default StorybookEntry
|