@xyo-network/react-shared 2.25.74 → 2.25.75

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.
@@ -1,6 +1,15 @@
1
- /// <reference types="react" />
2
1
  import { CardProps } from '@mui/material';
2
+ import { CSSProperties } from 'react';
3
3
  export interface CardExProps extends CardProps {
4
4
  gradient?: 'border' | 'background';
5
+ display?: CSSProperties['display'];
6
+ flexDirection?: CSSProperties['flexDirection'];
7
+ flexGrow?: CSSProperties['flexGrow'];
8
+ alignItems?: CSSProperties['alignItems'];
9
+ alignContent?: CSSProperties['alignContent'];
10
+ alignSelf?: CSSProperties['alignSelf'];
11
+ justifyItems?: CSSProperties['justifyItems'];
12
+ justifyContent?: CSSProperties['justifyContent'];
13
+ justifySelf?: CSSProperties['justifySelf'];
5
14
  }
6
15
  export declare const CardEx: React.FC<CardExProps>;
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Card } from '@mui/material';
3
3
  import { useGradientStyles } from '../hooks';
4
- export const CardEx = ({ style, gradient, ...props }) => {
4
+ export const CardEx = ({ display, flexDirection = 'column', flexGrow, alignItems = 'stretch', alignContent, alignSelf, justifyItems = 'flex-start', justifyContent = 'flex-start', justifySelf, style, gradient, ...props }) => {
5
5
  const { styles } = useGradientStyles();
6
6
  const gradientStyle = gradient === 'border' ? styles.border : gradient === 'background' ? styles.background : {};
7
- return _jsx(Card, { style: { ...gradientStyle, ...style }, ...props });
7
+ return (_jsx(Card, { style: { ...gradientStyle, alignContent, alignItems, alignSelf, display, flexDirection, flexGrow, justifyContent, justifyItems, justifySelf, ...style }, ...props }));
8
8
  };
9
9
  //# sourceMappingURL=CardEx.js.map
@@ -1 +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,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AE,GAAG,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,KAAM,KAAK,GAAI,CAC7K,CAAA;AACH,CAAC,CAAA"}
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import RefreshIcon from '@mui/icons-material/Refresh';
3
- import { Card, CardHeader, IconButton } from '@mui/material';
3
+ import { CardHeader, IconButton } from '@mui/material';
4
+ import { CardEx } from './CardEx';
4
5
  import { TypographyEx } from './TypographyEx';
5
6
  export const PageCard = ({ subheader, title, icon, onRefresh, children, style, ...props }) => {
6
- return (_jsxs(Card, { style: { position: 'relative', ...style }, ...props, children: [icon?.({ style: { fontSize: 512, left: '-144px', opacity: 0.05, position: 'absolute', top: '-144px' } }), _jsx(CardHeader, { title: _jsx(TypographyEx, { variant: "h4", gradient: "text", children: title }), subheader: subheader, action: _jsx(_Fragment, { children: onRefresh ? (_jsx(IconButton, { onClick: () => onRefresh?.(), children: _jsx(RefreshIcon, {}) })) : null }) }), children] }));
7
+ return (_jsxs(CardEx, { style: { position: 'relative', ...style }, ...props, children: [icon?.({ style: { fontSize: 512, left: '-144px', opacity: 0.05, position: 'absolute', top: '-144px' } }), _jsx(CardHeader, { title: _jsx(TypographyEx, { variant: "h4", gradient: "text", children: title }), subheader: subheader, action: _jsx(_Fragment, { children: onRefresh ? (_jsx(IconButton, { onClick: () => onRefresh?.(), children: _jsx(RefreshIcon, {}) })) : null }) }), children] }));
7
8
  };
8
9
  //# sourceMappingURL=PageCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageCard.js","sourceRoot":"","sources":["../../../src/components/PageCard.tsx"],"names":[],"mappings":";AAAA,OAAO,WAAW,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,IAAI,EAAE,UAAU,EAA8B,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AE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IACpH,OAAO,CACL,MAAC,MAAM,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,KAAM,KAAK,aACzD,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,CAAC,EACzG,KAAC,UAAU,IACT,KAAK,EACH,KAAC,YAAY,IAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,MAAM,YACvC,KAAK,GACO,EAEjB,SAAS,EAAE,SAAS,EACpB,MAAM,EACJ,4BACG,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,EAAE,YACtC,KAAC,WAAW,KAAG,GACJ,CACd,CAAC,CAAC,CAAC,IAAI,GACP,GAEL,EACD,QAAQ,IACF,CACV,CAAA;AACH,CAAC,CAAA"}
package/package.json CHANGED
@@ -88,6 +88,6 @@
88
88
  },
89
89
  "sideEffects": false,
90
90
  "types": "dist/esm/index.d.ts",
91
- "version": "2.25.74",
91
+ "version": "2.25.75",
92
92
  "packageManager": "yarn@3.1.1"
93
93
  }
@@ -1,13 +1,38 @@
1
1
  import { Card, CardProps } from '@mui/material'
2
+ import { CSSProperties } from 'react'
2
3
 
3
4
  import { useGradientStyles } from '../hooks'
4
5
 
5
6
  export interface CardExProps extends CardProps {
6
7
  gradient?: 'border' | 'background'
8
+ display?: CSSProperties['display']
9
+ flexDirection?: CSSProperties['flexDirection']
10
+ flexGrow?: CSSProperties['flexGrow']
11
+ alignItems?: CSSProperties['alignItems']
12
+ alignContent?: CSSProperties['alignContent']
13
+ alignSelf?: CSSProperties['alignSelf']
14
+ justifyItems?: CSSProperties['justifyItems']
15
+ justifyContent?: CSSProperties['justifyContent']
16
+ justifySelf?: CSSProperties['justifySelf']
7
17
  }
8
18
 
9
- export const CardEx: React.FC<CardExProps> = ({ style, gradient, ...props }) => {
19
+ export const CardEx: React.FC<CardExProps> = ({
20
+ display,
21
+ flexDirection = 'column',
22
+ flexGrow,
23
+ alignItems = 'stretch',
24
+ alignContent,
25
+ alignSelf,
26
+ justifyItems = 'flex-start',
27
+ justifyContent = 'flex-start',
28
+ justifySelf,
29
+ style,
30
+ gradient,
31
+ ...props
32
+ }) => {
10
33
  const { styles } = useGradientStyles()
11
34
  const gradientStyle = gradient === 'border' ? styles.border : gradient === 'background' ? styles.background : {}
12
- return <Card style={{ ...gradientStyle, ...style }} {...props} />
35
+ return (
36
+ <Card style={{ ...gradientStyle, alignContent, alignItems, alignSelf, display, flexDirection, flexGrow, justifyContent, justifyItems, justifySelf, ...style }} {...props} />
37
+ )
13
38
  }
@@ -1,7 +1,8 @@
1
1
  import RefreshIcon from '@mui/icons-material/Refresh'
2
- import { Card, CardHeader, CardHeaderProps, CardProps, IconButton, SvgIconProps } from '@mui/material'
2
+ import { CardHeader, CardHeaderProps, CardProps, IconButton, SvgIconProps } from '@mui/material'
3
3
  import { ReactNode } from 'react'
4
4
 
5
+ import { CardEx } from './CardEx'
5
6
  import { TypographyEx } from './TypographyEx'
6
7
 
7
8
  export interface PageCardProps extends CardProps {
@@ -12,7 +13,7 @@ export interface PageCardProps extends CardProps {
12
13
 
13
14
  export const PageCard: React.FC<PageCardProps> = ({ subheader, title, icon, onRefresh, children, style, ...props }) => {
14
15
  return (
15
- <Card style={{ position: 'relative', ...style }} {...props}>
16
+ <CardEx style={{ position: 'relative', ...style }} {...props}>
16
17
  {icon?.({ style: { fontSize: 512, left: '-144px', opacity: 0.05, position: 'absolute', top: '-144px' } })}
17
18
  <CardHeader
18
19
  title={
@@ -32,6 +33,6 @@ export const PageCard: React.FC<PageCardProps> = ({ subheader, title, icon, onRe
32
33
  }
33
34
  />
34
35
  {children}
35
- </Card>
36
+ </CardEx>
36
37
  )
37
38
  }