@xyo-network/react-property 3.0.1 → 3.0.3
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/browser/components/Action.d.ts +8 -0
- package/dist/browser/components/Action.d.ts.map +1 -0
- package/dist/browser/components/Actions.d.ts +4 -0
- package/dist/browser/components/Actions.d.ts.map +1 -0
- package/dist/browser/components/ActionsMenu.d.ts +4 -0
- package/dist/browser/components/ActionsMenu.d.ts.map +1 -0
- package/dist/browser/components/ActionsProps.d.ts +7 -0
- package/dist/browser/components/ActionsProps.d.ts.map +1 -0
- package/dist/browser/components/Group.d.ts +4 -0
- package/dist/browser/components/Group.d.ts.map +1 -0
- package/dist/browser/components/IdenticonCorner.d.ts +7 -0
- package/dist/browser/components/IdenticonCorner.d.ts.map +1 -0
- package/dist/browser/components/Property.d.ts +4 -0
- package/dist/browser/components/Property.d.ts.map +1 -0
- package/dist/browser/components/Props.d.ts +35 -0
- package/dist/browser/components/Props.d.ts.map +1 -0
- package/dist/browser/components/Title.d.ts +14 -0
- package/dist/browser/components/Title.d.ts.map +1 -0
- package/dist/browser/components/Value.d.ts +9 -0
- package/dist/browser/components/Value.d.ts.map +1 -0
- package/dist/browser/components/index.d.ts +7 -0
- package/dist/browser/components/index.d.ts.map +1 -0
- package/dist/browser/index.d.ts +2 -63
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +54 -48
- package/src/components/Action.ts +1 -1
- package/src/components/Actions.tsx +4 -2
- package/src/components/ActionsMenu.tsx +4 -2
- package/src/components/ActionsProps.ts +2 -2
- package/src/components/Group.tsx +22 -6
- package/src/components/IdenticonCorner.tsx +5 -2
- package/src/components/Property.tsx +21 -6
- package/src/components/PropertyBox.stories.tsx +3 -7
- package/src/components/PropertyPaper.stories.tsx +3 -7
- package/src/components/Props.ts +6 -6
- package/src/components/Title.stories.tsx +5 -7
- package/src/components/Title.tsx +12 -5
- package/src/components/Value.stories.tsx +2 -6
- package/src/components/Value.tsx +9 -4
- package/xy.config.ts +2 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../src/components/Action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/components/Actions.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAE7D,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAqC1D,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAE7D,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmC9D,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
2
|
+
import type { PropertyAction } from './Action.ts';
|
|
3
|
+
export interface PropertyActionsProps extends FlexBoxProps {
|
|
4
|
+
actions?: PropertyAction[];
|
|
5
|
+
buttons?: boolean;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=ActionsProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionsProps.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/components/Group.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EACsC,kBAAkB,EACnE,MAAM,YAAY,CAAA;AAiDnB,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAEtD,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface IdenticonCornerProps extends FlexBoxProps {
|
|
4
|
+
value?: string | number | boolean | null;
|
|
5
|
+
}
|
|
6
|
+
export declare const IdenticonCorner: React.FC<IdenticonCornerProps>;
|
|
7
|
+
//# sourceMappingURL=IdenticonCorner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdenticonCorner.d.ts","sourceRoot":"","sources":["../../../src/components/IdenticonCorner.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGzD,OAAO,KAEN,MAAM,OAAO,CAAA;AAEd,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;CACzC;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAoB1D,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PropertyBoxProps, PropertyPaperProps } from './Props.ts';
|
|
3
|
+
export declare const Property: React.ForwardRefExoticComponent<(PropertyBoxProps | Omit<PropertyPaperProps, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
//# sourceMappingURL=Property.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../../../src/components/Property.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,KAAK,EACV,gBAAgB,EAAE,kBAAkB,EACrC,MAAM,YAAY,CAAA;AA0EnB,eAAO,MAAM,QAAQ,6HAEnB,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { PaperProps } from '@mui/material';
|
|
2
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
3
|
+
import type { SizeProp } from '@xyo-network/react-shared';
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
import type { PropertyAction } from './Action.ts';
|
|
6
|
+
import type { PropertyTitleProps } from './Title.tsx';
|
|
7
|
+
export interface PropertyBaseProps {
|
|
8
|
+
paper?: boolean;
|
|
9
|
+
tip?: ReactNode;
|
|
10
|
+
title?: string;
|
|
11
|
+
titleProps?: PropertyTitleProps;
|
|
12
|
+
}
|
|
13
|
+
export type PropertyFieldBaseProps = PropertyBaseProps & {
|
|
14
|
+
actions?: PropertyAction[];
|
|
15
|
+
badge?: boolean;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
size?: SizeProp;
|
|
18
|
+
value?: string | number | boolean | null;
|
|
19
|
+
};
|
|
20
|
+
export type PropertyBoxProps = PropertyFieldBaseProps & FlexBoxProps & {
|
|
21
|
+
paper?: false;
|
|
22
|
+
};
|
|
23
|
+
export type PropertyPaperProps = PropertyFieldBaseProps & PaperProps & {
|
|
24
|
+
paper: true;
|
|
25
|
+
};
|
|
26
|
+
export type PropertyProps = PropertyBoxProps | PropertyPaperProps;
|
|
27
|
+
export type PropertyGroupBaseProps = PropertyBaseProps;
|
|
28
|
+
export type PropertyGroupBoxProps = PropertyGroupBaseProps & FlexBoxProps & {
|
|
29
|
+
paper?: false;
|
|
30
|
+
};
|
|
31
|
+
export type PropertyGroupPaperProps = PropertyGroupBaseProps & PaperProps & {
|
|
32
|
+
paper: true;
|
|
33
|
+
};
|
|
34
|
+
export type PropertyGroupProps = PropertyGroupBoxProps | PropertyGroupPaperProps;
|
|
35
|
+
//# sourceMappingURL=Props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Props.d.ts","sourceRoot":"","sources":["../../../src/components/Props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAErD,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,GAAG,CAAC,EAAE,SAAS,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,kBAAkB,CAAA;CAChC;AAED,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAAG;IACvD,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;CACzC,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GACnD,YAAY,GAAG;IACb,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAEH,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GACrD,UAAU,GAAG;IACX,KAAK,EAAE,IAAI,CAAA;CACZ,CAAA;AAEH,MAAM,MAAM,aAAa,GAAG,gBAAgB,GAAG,kBAAkB,CAAA;AAEjE,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,CAAA;AAEtD,MAAM,MAAM,qBAAqB,GAAG,sBAAsB,GACxD,YAAY,GAAG;IACb,KAAK,CAAC,EAAE,KAAK,CAAA;CACd,CAAA;AAEH,MAAM,MAAM,uBAAuB,GAAG,sBAAsB,GAC1D,UAAU,GAAG;IACX,KAAK,EAAE,IAAI,CAAA;CACZ,CAAA;AAEH,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,GAAG,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
2
|
+
import type { SizeProp } from '@xyo-network/react-shared';
|
|
3
|
+
import type { ReactNode } from 'react';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export type TitleSizeProp = SizeProp | 'full';
|
|
6
|
+
export interface PropertyTitleProps extends FlexBoxProps {
|
|
7
|
+
elevation?: number;
|
|
8
|
+
more?: ReactNode;
|
|
9
|
+
size?: TitleSizeProp;
|
|
10
|
+
tip?: ReactNode;
|
|
11
|
+
title?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const PropertyTitle: React.FC<PropertyTitleProps>;
|
|
14
|
+
//# sourceMappingURL=Title.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Title.d.ts","sourceRoot":"","sources":["../../../src/components/Title.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAA;AAE7C,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB,GAAG,CAAC,EAAE,SAAS,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyDtD,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Variant } from '@mui/material/styles/createTypography.js';
|
|
2
|
+
import type { EllipsizeBoxProps } from '@xyo-network/react-shared';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export interface PropertyValueProps extends Omit<EllipsizeBoxProps, 'ref'> {
|
|
5
|
+
typographyVariant?: Variant;
|
|
6
|
+
value?: string | number | boolean | null;
|
|
7
|
+
}
|
|
8
|
+
export declare const PropertyValue: React.ForwardRefExoticComponent<PropertyValueProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
//# sourceMappingURL=Value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Value.d.ts","sourceRoot":"","sources":["../../../src/components/Value.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0CAA0C,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAElE,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC;IACxE,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAA;CACzC;AAED,eAAO,MAAM,aAAa,2FAiBxB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -1,63 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
4
|
-
import { SizeProp, EllipsizeBoxProps } from '@xyo-network/react-shared';
|
|
5
|
-
import { Variant } from '@mui/material/styles/createTypography.js';
|
|
6
|
-
|
|
7
|
-
interface PropertyAction {
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
icon?: ReactNode;
|
|
10
|
-
name: string;
|
|
11
|
-
onClick?: () => void;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
type TitleSizeProp = SizeProp | 'full';
|
|
15
|
-
interface PropertyTitleProps extends FlexBoxProps {
|
|
16
|
-
elevation?: number;
|
|
17
|
-
more?: ReactNode;
|
|
18
|
-
size?: TitleSizeProp;
|
|
19
|
-
tip?: ReactNode;
|
|
20
|
-
title?: string;
|
|
21
|
-
}
|
|
22
|
-
declare const PropertyTitle: React.FC<PropertyTitleProps>;
|
|
23
|
-
|
|
24
|
-
interface PropertyBaseProps {
|
|
25
|
-
paper?: boolean;
|
|
26
|
-
tip?: ReactNode;
|
|
27
|
-
title?: string;
|
|
28
|
-
titleProps?: PropertyTitleProps;
|
|
29
|
-
}
|
|
30
|
-
type PropertyFieldBaseProps = PropertyBaseProps & {
|
|
31
|
-
actions?: PropertyAction[];
|
|
32
|
-
badge?: boolean;
|
|
33
|
-
required?: boolean;
|
|
34
|
-
size?: SizeProp;
|
|
35
|
-
value?: string | number | boolean | null;
|
|
36
|
-
};
|
|
37
|
-
type PropertyBoxProps = PropertyFieldBaseProps & FlexBoxProps & {
|
|
38
|
-
paper?: false;
|
|
39
|
-
};
|
|
40
|
-
type PropertyPaperProps = PropertyFieldBaseProps & PaperProps & {
|
|
41
|
-
paper: true;
|
|
42
|
-
};
|
|
43
|
-
type PropertyProps = PropertyBoxProps | PropertyPaperProps;
|
|
44
|
-
type PropertyGroupBaseProps = PropertyBaseProps;
|
|
45
|
-
type PropertyGroupBoxProps = PropertyGroupBaseProps & FlexBoxProps & {
|
|
46
|
-
paper?: false;
|
|
47
|
-
};
|
|
48
|
-
type PropertyGroupPaperProps = PropertyGroupBaseProps & PaperProps & {
|
|
49
|
-
paper: true;
|
|
50
|
-
};
|
|
51
|
-
type PropertyGroupProps = PropertyGroupBoxProps | PropertyGroupPaperProps;
|
|
52
|
-
|
|
53
|
-
declare const PropertyGroup: React.FC<PropertyGroupProps>;
|
|
54
|
-
|
|
55
|
-
declare const Property: React.ForwardRefExoticComponent<(PropertyBoxProps | Omit<PropertyPaperProps, "ref">) & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
-
|
|
57
|
-
interface PropertyValueProps extends Omit<EllipsizeBoxProps, 'ref'> {
|
|
58
|
-
typographyVariant?: Variant;
|
|
59
|
-
value?: string | number | boolean | null;
|
|
60
|
-
}
|
|
61
|
-
declare const PropertyValue: React.ForwardRefExoticComponent<PropertyValueProps & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
-
|
|
63
|
-
export { Property, type PropertyAction, type PropertyBaseProps, type PropertyBoxProps, type PropertyFieldBaseProps, PropertyGroup, type PropertyGroupBaseProps, type PropertyGroupBoxProps, type PropertyGroupPaperProps, type PropertyGroupProps, type PropertyPaperProps, type PropertyProps, PropertyTitle, type PropertyTitleProps, PropertyValue, type PropertyValueProps, type TitleSizeProp };
|
|
1
|
+
export * from './components/index.ts';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Group.tsx","../../src/components/Title.tsx","../../src/components/Property.tsx","../../src/components/ActionsMenu.tsx","../../src/components/IdenticonCorner.tsx","../../src/components/Value.tsx"],"sourcesContent":["import { Paper, useTheme } from '@mui/material'\nimport { FlexCol, FlexGrowRow, FlexRow } from '@xylabs/react-flexbox'\nimport { typeOf } from '@xyo-network/typeof'\nimport React, { ReactElement } from 'react'\n\nimport { PropertyGroupBoxProps, PropertyGroupPaperProps, PropertyGroupProps } from './Props.ts'\nimport { PropertyTitle } from './Title.tsx'\n\nconst PropertyGroupBox: React.FC<PropertyGroupBoxProps> = ({ titleProps, children, title, tip, ...props }) => {\n const theme = useTheme()\n const childrenArray = typeOf(children) === 'array' ? (children as ReactElement[]) : undefined\n return (\n <FlexCol alignItems=\"stretch\" overflow=\"hidden\" {...props}>\n <FlexRow overflow=\"hidden\" justifyContent=\"stretch\" alignItems=\"stretch\">\n <PropertyTitle alignItems=\"flex-start\" size=\"full\" title={title} tip={tip} {...titleProps} />\n {childrenArray\n ? (\n <FlexGrowRow>\n {childrenArray?.map((child, index) => {\n return child\n ? (\n <FlexGrowRow key={index} borderLeft={1} borderColor={theme.palette.divider}>\n {child}\n </FlexGrowRow>\n )\n : null\n })}\n </FlexGrowRow>\n )\n : <FlexGrowRow overflow=\"hidden\">{children}</FlexGrowRow>}\n </FlexRow>\n </FlexCol>\n )\n}\n\nconst PropertyGroupPaper: React.FC<PropertyGroupPaperProps> = ({ style, variant, elevation, square, ...props }) => {\n return (\n <Paper style={{ minWidth: 0, overflow: 'hidden', ...style }} variant={variant} elevation={elevation} square={square}>\n <PropertyGroupBox {...props} paper={false} />\n </Paper>\n )\n}\n\nexport const PropertyGroup: React.FC<PropertyGroupProps> = (props) => {\n return props.paper ? <PropertyGroupPaper {...props} /> : <PropertyGroupBox {...props} />\n}\n","import { darken, lighten, Typography, TypographyVariant, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { QuickTipButton } from '@xylabs/react-quick-tip-button'\nimport { SizeProp } from '@xyo-network/react-shared'\nimport React, { ReactNode } from 'react'\n\nexport type TitleSizeProp = SizeProp | 'full'\n\nexport interface PropertyTitleProps extends FlexBoxProps {\n elevation?: number\n more?: ReactNode\n size?: TitleSizeProp\n tip?: ReactNode\n title?: string\n}\n\nexport const PropertyTitle: React.FC<PropertyTitleProps> = ({ elevation = 1, size = 'medium', tip, more, title, ...props }) => {\n const sizeVariants: Record<TitleSizeProp, TypographyVariant> = {\n full: 'caption',\n large: 'caption',\n medium: 'caption',\n small: 'caption',\n }\n\n const sizeTitleHeight: Record<TitleSizeProp, number | undefined> = {\n full: undefined,\n large: 32,\n medium: 20,\n small: 16,\n }\n\n const sizeFontSize: Record<TitleSizeProp, number> = {\n full: 16,\n large: 16,\n medium: 14,\n small: 10,\n }\n\n const quickTipSize = sizeFontSize[size] < 16 ? sizeFontSize[size] : 16\n\n const theme = useTheme()\n\n return (\n <FlexRow\n bgcolor={\n theme.palette.mode === 'dark'\n ? lighten(theme.palette.background.paper, 0.05 * elevation)\n : darken(theme.palette.background.paper, 0.025 * elevation)\n }\n alignItems=\"center\"\n height={sizeTitleHeight[size]}\n justifyContent=\"space-between\"\n {...props}\n >\n <FlexRow paddingX={1} paddingY={0.5}>\n <Typography fontWeight={500} noWrap variant={sizeVariants[size]} fontSize={sizeFontSize[size]}>\n <small>\n <strong>{title}</strong>\n </small>\n </Typography>\n {tip\n ? (\n <QuickTipButton style={{ fontSize: quickTipSize }} color=\"inherit\" title={title ?? ''}>\n {tip}\n </QuickTipButton>\n )\n : null}\n </FlexRow>\n {more}\n </FlexRow>\n )\n}\n","import { CircularProgress, Paper, TypographyVariant } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { SizeProp } from '@xyo-network/react-shared'\nimport React, { forwardRef } from 'react'\n\nimport { PropertyActionsMenu } from './ActionsMenu.tsx'\nimport { IdenticonCorner } from './IdenticonCorner.tsx'\nimport { PropertyBoxProps, PropertyPaperProps, PropertyProps } from './Props.ts'\nimport { PropertyTitle } from './Title.tsx'\nimport { PropertyValue } from './Value.tsx'\n\nconst PropertyBox = forwardRef<HTMLDivElement, PropertyBoxProps>(\n ({ titleProps, title, value, children, size = 'medium', tip, actions, required, badge = false, ...props }, ref) => {\n const sizeValueHeight: Record<SizeProp, number> = {\n large: 48,\n medium: 36,\n small: 24,\n }\n\n const sizeVariants: Record<SizeProp, TypographyVariant> = {\n large: 'h6',\n medium: 'body1',\n small: 'body2',\n }\n\n return (\n <FlexRow ref={ref} flexDirection=\"column\" minWidth={0} alignItems=\"stretch\" overflow=\"hidden\" {...props}>\n {title === undefined\n ? null\n : (\n <PropertyTitle\n tip={tip}\n title={required ? `${title}*` : title}\n size={size}\n more={<PropertyActionsMenu actions={actions} />}\n {...titleProps}\n />\n )}\n <FlexRow\n pl={1}\n columnGap={1}\n justifyContent={value === undefined ? 'center' : 'space-between'}\n overflow=\"hidden\"\n height={sizeValueHeight[size]}\n >\n {(children ?? value === undefined)\n ? <CircularProgress size={16} />\n : <PropertyValue value={value} typographyVariant={sizeVariants[size]} />}\n {value === undefined\n ? null\n : badge\n ? <IdenticonCorner value={value} />\n : null}\n </FlexRow>\n </FlexRow>\n )\n },\n)\nPropertyBox.displayName = 'PropertyBox'\n\nconst PropertyPaper = forwardRef<HTMLDivElement, PropertyPaperProps>(({ style, variant, elevation = 2, square, ...props }, ref) => {\n return (\n <Paper ref={ref} style={{ minWidth: 0, overflow: 'hidden', ...style }} variant={variant} elevation={elevation} square={square}>\n <PropertyBox {...props} paper={false} />\n </Paper>\n )\n})\nPropertyPaper.displayName = 'PropertyPaper'\n\nexport const Property = forwardRef<HTMLDivElement, PropertyProps>((props, ref) => {\n return props.paper ? <PropertyPaper ref={ref} {...props} /> : <PropertyBox ref={ref} {...props} />\n})\nProperty.displayName = 'Property'\n","import { MoreHoriz as MoreHorizIcon } from '@mui/icons-material'\nimport { IconButton, Menu, MenuItem } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React, { useState } from 'react'\n\nimport { PropertyActionsProps } from './ActionsProps.ts'\n\nexport const PropertyActionsMenu: React.FC<PropertyActionsProps> = ({ actions, ...props }) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = !!anchorEl\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorEl(event.currentTarget)\n }\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n return actions && actions?.length > 0\n ? (\n <FlexRow {...props}>\n <IconButton size=\"small\" color=\"inherit\" onClick={handleClick}>\n <MoreHorizIcon fontSize=\"inherit\" />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose}>\n {actions?.map((action) => {\n return (\n <MenuItem\n key={action.name}\n onClick={() => {\n action?.onClick?.()\n handleClose()\n }}\n >\n {action.name}\n </MenuItem>\n )\n })}\n </Menu>\n </FlexRow>\n )\n : null\n}\n","import { useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { Identicon } from '@xylabs/react-identicon'\nimport React, { useEffect, useRef, useState } from 'react'\n\nexport interface IdenticonCornerProps extends FlexBoxProps {\n value?: string | number | boolean | null\n}\n\nexport const IdenticonCorner: React.FC<IdenticonCornerProps> = ({ value, ...props }) => {\n const theme = useTheme()\n const [parentHeight, setParentHeight] = useState<number>()\n const ref = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n setParentHeight(ref.current?.parentElement?.parentElement?.clientHeight)\n }, [])\n\n const calculatedHeight = parentHeight ?? 0\n\n return (\n <FlexRow alignItems=\"flex-start\" height=\"100%\">\n <FlexRow background height={calculatedHeight} width={calculatedHeight} borderLeft={`1px solid ${theme.palette.divider}`}>\n <div ref={ref}>\n <Identicon size={calculatedHeight * 0.6} value={`${value}`} sx={{ padding: `${calculatedHeight * 0.2}px` }} {...props} />\n </div>\n </FlexRow>\n </FlexRow>\n )\n}\n","// eslint-disable-next-line import-x/no-internal-modules\nimport { Variant } from '@mui/material/styles/createTypography.js'\nimport { EllipsizeBox, EllipsizeBoxProps } from '@xyo-network/react-shared'\nimport React, { forwardRef } from 'react'\n\nexport interface PropertyValueProps extends Omit<EllipsizeBoxProps, 'ref'> {\n typographyVariant?: Variant\n value?: string | number | boolean | null\n}\n\nexport const PropertyValue = forwardRef<HTMLDivElement, PropertyValueProps>(({ typographyVariant = 'body1', value, ...props }, ref) => {\n return value === undefined\n ? null\n : (\n <EllipsizeBox\n typographyProps={{ component: undefined, title: value?.toString(), variant: typographyVariant }}\n width=\"100%\"\n ref={ref}\n {...props}\n >\n {value}\n </EllipsizeBox>\n )\n})\n\nPropertyValue.displayName = 'PropertyValue'\n"],"mappings":";;;;AAAA,SAASA,OAAOC,YAAAA,iBAAgB;AAChC,SAASC,SAASC,aAAaC,WAAAA,gBAAe;AAC9C,SAASC,cAAc;AACvB,OAAOC,YAA6B;;;ACHpC,SAASC,QAAQC,SAASC,YAA+BC,gBAAgB;AACzE,SAAuBC,eAAe;AACtC,SAASC,sBAAsB;AAE/B,OAAOC,WAA0B;AAY1B,IAAMC,gBAA8C,wBAAC,EAAEC,YAAY,GAAGC,OAAO,UAAUC,KAAKC,MAAMC,OAAO,GAAGC,MAAAA,MAAO;AACxH,QAAMC,eAAyD;IAC7DC,MAAM;IACNC,OAAO;IACPC,QAAQ;IACRC,OAAO;EACT;AAEA,QAAMC,kBAA6D;IACjEJ,M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XC,gBAAgB1B,UAAUoB,SAAY,WAAW;IACjDD,UAAS;IACTQ,QAAQlB,gBAAgBP,IAAAA;KAEtBD,YAAYD,UAAUoB,SACpB,gBAAAN,OAAA,cAACc,kBAAAA;IAAiB1B,MAAM;OACxB,gBAAAY,OAAA,cAACe,eAAAA;IAAc7B;IAAc8B,mBAAmBjB,aAAaX,IAAAA;MAChEF,UAAUoB,SACP,OACAd,QACE,gBAAAQ,OAAA,cAACiB,iBAAAA;IAAgB/B;OACjB,IAAA,CAAA;AAId,CAAA;AAEFJ,YAAYoC,cAAc;AAE1B,IAAMC,gBAAgBpC,gBAAAA,YAA+C,CAAC,EAAEqC,OAAOC,SAASC,YAAY,GAAGC,QAAQ,GAAG9B,MAAAA,GAASC,QAAAA;AACzH,SACE,gBAAAM,OAAA,cAACwB,QAAAA;IAAM9B;IAAU0B,OAAO;MAAEjB,UAAU;MAAGE,UAAU;MAAU,GAAGe;IAAM;IAAGC;IAAkBC;IAAsBC;KAC7G,gBAAAvB,OAAA,cAAClB,aAAAA;IAAa,GAAGW;IAAOgC,OAAO;;AAGrC,CAAA;AACAN,cAAcD,cAAc;AAErB,IAAMQ,WAAW3C,gBAAAA,YAA0C,CAACU,OAAOC,QAAAA;AACxE,SAAOD,MAAMgC,QAAQ,gBAAAzB,OAAA,cAACmB,eAAAA;IAAczB;IAAW,GAAGD;OAAY,gBAAAO,OAAA,cAAClB,aAAAA;IAAYY;IAAW,GAAGD;;AAC3F,CAAA;AACAiC,SAASR,cAAc;","names":["Paper","useTheme","FlexCol","FlexGrowRow","FlexRow","typeOf","React","darken","lighten","Typography","useTheme","FlexRow","QuickTipButton","React","PropertyTitle","elevation","size","tip","more","title","props","sizeVariants","full","large","medium","small","sizeTitleHeight","undefined","sizeFontSize","quickTipSize","theme","useTheme","FlexRow","bgcolor","palette","mode","lighten","background","paper","darken","alignItems","height","justifyContent","paddingX","paddingY","Typography","fontWeight","noWrap","variant","fontSize","strong","QuickTipButton","style","color","PropertyGroupBox","titleProps","children","title","tip","props","theme","useTheme","childrenArray","typeOf","undefined","React","FlexCol","alignItems","overflow","FlexRow","justifyContent","PropertyTitle","size","FlexGrowRow","map","child","index","key","borderLeft","borderColor","palette","divider","PropertyGroupPaper","style","variant","elevation","square","Paper","minWidth","paper","PropertyGroup","CircularProgress","Paper","FlexRow","React","forwardRef","MoreHoriz","MoreHorizIcon","IconButton","Menu","MenuItem","FlexRow","React","useState","PropertyActionsMenu","actions","props","anchorEl","setAnchorEl","useState","open","handleClick","event","currentTarget","handleClose","length","React","FlexRow","IconButton","size","color","onClick","MoreHorizIcon","fontSize","Menu","onClose","map","action","MenuItem","key","name","useTheme","FlexRow","Identicon","React","useEffect","useRef","useState","IdenticonCorner","value","props","theme","useTheme","parentHeight","setParentHeight","useState","ref","useRef","useEffect","current","parentElement","clientHeight","calculatedHeight","React","FlexRow","alignItems","height","background","width","borderLeft","palette","divider","div","Identicon","size","sx","padding","EllipsizeBox","React","forwardRef","PropertyValue","typographyVariant","value","props","ref","undefined","typographyProps","component","title","toString","variant","width","displayName","PropertyBox","forwardRef","titleProps","title","value","children","size","tip","actions","required","badge","props","ref","sizeValueHeight","large","medium","small","sizeVariants","React","FlexRow","flexDirection","minWidth","alignItems","overflow","undefined","PropertyTitle","more","PropertyActionsMenu","pl","columnGap","justifyContent","height","CircularProgress","PropertyValue","typographyVariant","IdenticonCorner","displayName","PropertyPaper","style","variant","elevation","square","Paper","paper","Property"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/Group.tsx","../../src/components/Title.tsx","../../src/components/Property.tsx","../../src/components/ActionsMenu.tsx","../../src/components/IdenticonCorner.tsx","../../src/components/Value.tsx"],"sourcesContent":["import { Paper, useTheme } from '@mui/material'\nimport {\n FlexCol, FlexGrowRow, FlexRow,\n} from '@xylabs/react-flexbox'\nimport { typeOf } from '@xyo-network/typeof'\nimport type { ReactElement } from 'react'\nimport React from 'react'\n\nimport type {\n PropertyGroupBoxProps, PropertyGroupPaperProps, PropertyGroupProps,\n} from './Props.ts'\nimport { PropertyTitle } from './Title.tsx'\n\nconst PropertyGroupBox: React.FC<PropertyGroupBoxProps> = ({\n titleProps, children, title, tip, ...props\n}) => {\n const theme = useTheme()\n const childrenArray = typeOf(children) === 'array' ? (children as ReactElement[]) : undefined\n return (\n <FlexCol alignItems=\"stretch\" overflow=\"hidden\" {...props}>\n <FlexRow overflow=\"hidden\" justifyContent=\"stretch\" alignItems=\"stretch\">\n <PropertyTitle alignItems=\"flex-start\" size=\"full\" title={title} tip={tip} {...titleProps} />\n {childrenArray\n ? (\n <FlexGrowRow>\n {childrenArray?.map((child, index) => {\n return child\n ? (\n <FlexGrowRow key={index} borderLeft={1} borderColor={theme.palette.divider}>\n {child}\n </FlexGrowRow>\n )\n : null\n })}\n </FlexGrowRow>\n )\n : <FlexGrowRow overflow=\"hidden\">{children}</FlexGrowRow>}\n </FlexRow>\n </FlexCol>\n )\n}\n\nconst PropertyGroupPaper: React.FC<PropertyGroupPaperProps> = ({\n style, variant, elevation, square, ...props\n}) => {\n return (\n <Paper\n style={{\n minWidth: 0, overflow: 'hidden', ...style,\n }}\n variant={variant}\n elevation={elevation}\n square={square}\n >\n <PropertyGroupBox {...props} paper={false} />\n </Paper>\n )\n}\n\nexport const PropertyGroup: React.FC<PropertyGroupProps> = (props) => {\n return props.paper ? <PropertyGroupPaper {...props} /> : <PropertyGroupBox {...props} />\n}\n","import type { TypographyVariant } from '@mui/material'\nimport {\n darken, lighten, Typography, useTheme,\n} from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { QuickTipButton } from '@xylabs/react-quick-tip-button'\nimport type { SizeProp } from '@xyo-network/react-shared'\nimport type { ReactNode } from 'react'\nimport React from 'react'\n\nexport type TitleSizeProp = SizeProp | 'full'\n\nexport interface PropertyTitleProps extends FlexBoxProps {\n elevation?: number\n more?: ReactNode\n size?: TitleSizeProp\n tip?: ReactNode\n title?: string\n}\n\nexport const PropertyTitle: React.FC<PropertyTitleProps> = ({\n elevation = 1, size = 'medium', tip, more, title, ...props\n}) => {\n const sizeVariants: Record<TitleSizeProp, TypographyVariant> = {\n full: 'caption',\n large: 'caption',\n medium: 'caption',\n small: 'caption',\n }\n\n const sizeTitleHeight: Record<TitleSizeProp, number | undefined> = {\n full: undefined,\n large: 32,\n medium: 20,\n small: 16,\n }\n\n const sizeFontSize: Record<TitleSizeProp, number> = {\n full: 16,\n large: 16,\n medium: 14,\n small: 10,\n }\n\n const quickTipSize = sizeFontSize[size] < 16 ? sizeFontSize[size] : 16\n\n const theme = useTheme()\n\n return (\n <FlexRow\n bgcolor={\n theme.palette.mode === 'dark'\n ? lighten(theme.palette.background.paper, 0.05 * elevation)\n : darken(theme.palette.background.paper, 0.025 * elevation)\n }\n alignItems=\"center\"\n height={sizeTitleHeight[size]}\n justifyContent=\"space-between\"\n {...props}\n >\n <FlexRow paddingX={1} paddingY={0.5}>\n <Typography fontWeight={500} noWrap variant={sizeVariants[size]} fontSize={sizeFontSize[size]}>\n <small>\n <strong>{title}</strong>\n </small>\n </Typography>\n {tip\n ? (\n <QuickTipButton style={{ fontSize: quickTipSize }} color=\"inherit\" title={title ?? ''}>\n {tip}\n </QuickTipButton>\n )\n : null}\n </FlexRow>\n {more}\n </FlexRow>\n )\n}\n","import type { TypographyVariant } from '@mui/material'\nimport { CircularProgress, Paper } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport type { SizeProp } from '@xyo-network/react-shared'\nimport React, { forwardRef } from 'react'\n\nimport { PropertyActionsMenu } from './ActionsMenu.tsx'\nimport { IdenticonCorner } from './IdenticonCorner.tsx'\nimport type {\n PropertyBoxProps, PropertyPaperProps, PropertyProps,\n} from './Props.ts'\nimport { PropertyTitle } from './Title.tsx'\nimport { PropertyValue } from './Value.tsx'\n\nconst PropertyBox = forwardRef<HTMLDivElement, PropertyBoxProps>(\n ({\n titleProps, title, value, children, size = 'medium', tip, actions, required, badge = false, ...props\n }, ref) => {\n const sizeValueHeight: Record<SizeProp, number> = {\n large: 48,\n medium: 36,\n small: 24,\n }\n\n const sizeVariants: Record<SizeProp, TypographyVariant> = {\n large: 'h6',\n medium: 'body1',\n small: 'body2',\n }\n\n return (\n <FlexRow ref={ref} flexDirection=\"column\" minWidth={0} alignItems=\"stretch\" overflow=\"hidden\" {...props}>\n {title === undefined\n ? null\n : (\n <PropertyTitle\n tip={tip}\n title={required ? `${title}*` : title}\n size={size}\n more={<PropertyActionsMenu actions={actions} />}\n {...titleProps}\n />\n )}\n <FlexRow\n pl={1}\n columnGap={1}\n justifyContent={value === undefined ? 'center' : 'space-between'}\n overflow=\"hidden\"\n height={sizeValueHeight[size]}\n >\n {(children ?? value === undefined)\n ? <CircularProgress size={16} />\n : <PropertyValue value={value} typographyVariant={sizeVariants[size]} />}\n {value === undefined\n ? null\n : badge\n ? <IdenticonCorner value={value} />\n : null}\n </FlexRow>\n </FlexRow>\n )\n },\n)\nPropertyBox.displayName = 'PropertyBox'\n\nconst PropertyPaper = forwardRef<HTMLDivElement, PropertyPaperProps>(({\n style, variant, elevation = 2, square, ...props\n}, ref) => {\n return (\n <Paper\n ref={ref}\n style={{\n minWidth: 0, overflow: 'hidden', ...style,\n }}\n variant={variant}\n elevation={elevation}\n square={square}\n >\n <PropertyBox {...props} paper={false} />\n </Paper>\n )\n})\nPropertyPaper.displayName = 'PropertyPaper'\n\nexport const Property = forwardRef<HTMLDivElement, PropertyProps>((props, ref) => {\n return props.paper ? <PropertyPaper ref={ref} {...props} /> : <PropertyBox ref={ref} {...props} />\n})\nProperty.displayName = 'Property'\n","import { MoreHoriz as MoreHorizIcon } from '@mui/icons-material'\nimport {\n IconButton, Menu, MenuItem,\n} from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React, { useState } from 'react'\n\nimport type { PropertyActionsProps } from './ActionsProps.ts'\n\nexport const PropertyActionsMenu: React.FC<PropertyActionsProps> = ({ actions, ...props }) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = !!anchorEl\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorEl(event.currentTarget)\n }\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n return actions && actions?.length > 0\n ? (\n <FlexRow {...props}>\n <IconButton size=\"small\" color=\"inherit\" onClick={handleClick}>\n <MoreHorizIcon fontSize=\"inherit\" />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose}>\n {actions?.map((action) => {\n return (\n <MenuItem\n key={action.name}\n onClick={() => {\n action?.onClick?.()\n handleClose()\n }}\n >\n {action.name}\n </MenuItem>\n )\n })}\n </Menu>\n </FlexRow>\n )\n : null\n}\n","import { useTheme } from '@mui/material'\nimport type { FlexBoxProps } from '@xylabs/react-flexbox'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { Identicon } from '@xylabs/react-identicon'\nimport React, {\n useEffect, useRef, useState,\n} from 'react'\n\nexport interface IdenticonCornerProps extends FlexBoxProps {\n value?: string | number | boolean | null\n}\n\nexport const IdenticonCorner: React.FC<IdenticonCornerProps> = ({ value, ...props }) => {\n const theme = useTheme()\n const [parentHeight, setParentHeight] = useState<number>()\n const ref = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n setParentHeight(ref.current?.parentElement?.parentElement?.clientHeight)\n }, [])\n\n const calculatedHeight = parentHeight ?? 0\n\n return (\n <FlexRow alignItems=\"flex-start\" height=\"100%\">\n <FlexRow background height={calculatedHeight} width={calculatedHeight} borderLeft={`1px solid ${theme.palette.divider}`}>\n <div ref={ref}>\n <Identicon size={calculatedHeight * 0.6} value={`${value}`} sx={{ padding: `${calculatedHeight * 0.2}px` }} {...props} />\n </div>\n </FlexRow>\n </FlexRow>\n )\n}\n","// eslint-disable-next-line import-x/no-internal-modules\nimport type { Variant } from '@mui/material/styles/createTypography.js'\nimport type { EllipsizeBoxProps } from '@xyo-network/react-shared'\nimport { EllipsizeBox } from '@xyo-network/react-shared'\nimport React, { forwardRef } from 'react'\n\nexport interface PropertyValueProps extends Omit<EllipsizeBoxProps, 'ref'> {\n typographyVariant?: Variant\n value?: string | number | boolean | null\n}\n\nexport const PropertyValue = forwardRef<HTMLDivElement, PropertyValueProps>(({\n typographyVariant = 'body1', value, ...props\n}, ref) => {\n return value === undefined\n ? null\n : (\n <EllipsizeBox\n typographyProps={{\n component: undefined, title: value?.toString(), variant: typographyVariant,\n }}\n width=\"100%\"\n ref={ref}\n {...props}\n >\n {value}\n </EllipsizeBox>\n )\n})\n\nPropertyValue.displayName = 'PropertyValue'\n"],"mappings":";;;;AAAA,SAASA,OAAOC,YAAAA,iBAAgB;AAChC,SACEC,SAASC,aAAaC,WAAAA,gBACjB;AACP,SAASC,cAAc;AAEvB,OAAOC,YAAW;;;ACLlB,SACEC,QAAQC,SAASC,YAAYC,gBACxB;AAEP,SAASC,eAAe;AACxB,SAASC,sBAAsB;AAG/B,OAAOC,WAAW;AAYX,IAAMC,gBAA8C,wBAAC,EAC1DC,YAAY,GAAGC,OAAO,UAAUC,KAAKC,MAAMC,OAAO,GAAGC,MAAAA,MACtD;AACC,QAAMC,eAAyD;IAC7DC,MAAM;IACNC,OAAO;IACPC,QAAQ;IACRC,OAAO;EACT;AAEA,QAAMC,kBAA6D;IACjEJ,MAAMK;IACNJ,OAAO;IACPC,QAAQ;IACRC,OAAO;EACT;AAEA,QAAMG,eAA8C;IAClDN,MAAM;IACNC,OAAO;IACPC,QAAQ;IACRC,OAAO;EACT;AAEA,QAAMI,eAAeD,aAAaZ,IAAAA,IAAQ,KAAKY,aAAaZ,IAAAA,IAAQ;AAEpE,QAAMc,QAAQC,SAAAA;AAEd,SACE,sBAAA,cAACC,SAAAA;IACCC,SACEH,MAAMI,QAAQC,SAAS,SACnBC,QAAQN,MAAMI,QAAQG,WAAWC,OAAO,OAAOvB,SAAAA,IAC/CwB,OAAOT,MAAMI,QAAQG,WAAWC,OAAO,QAAQvB,SAAAA;IAErDyB,YAAW;IACXC,QAAQf,gBAAgBV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AAAA;AACD,SACE,gBAAAM,OAAA,cAACwB,QAAAA;IACC9B;IACA0B,OAAO;MACLjB,UAAU;MAAGE,UAAU;MAAU,GAAGe;IACtC;IACAC;IACAC;IACAC;KAEA,gBAAAvB,OAAA,cAAClB,aAAAA;IAAa,GAAGW;IAAOgC,OAAO;;AAGrC,CAAA;AACAN,cAAcD,cAAc;AAErB,IAAMQ,WAAW3C,gBAAAA,YAA0C,CAACU,OAAOC,QAAAA;AACxE,SAAOD,MAAMgC,QAAQ,gBAAAzB,OAAA,cAACmB,eAAAA;IAAczB;IAAW,GAAGD;OAAY,gBAAAO,OAAA,cAAClB,aAAAA;IAAYY;IAAW,GAAGD;;AAC3F,CAAA;AACAiC,SAASR,cAAc;","names":["Paper","useTheme","FlexCol","FlexGrowRow","FlexRow","typeOf","React","darken","lighten","Typography","useTheme","FlexRow","QuickTipButton","React","PropertyTitle","elevation","size","tip","more","title","props","sizeVariants","full","large","medium","small","sizeTitleHeight","undefined","sizeFontSize","quickTipSize","theme","useTheme","FlexRow","bgcolor","palette","mode","lighten","background","paper","darken","alignItems","height","justifyContent","paddingX","paddingY","Typography","fontWeight","noWrap","variant","fontSize","strong","QuickTipButton","style","color","PropertyGroupBox","titleProps","children","title","tip","props","theme","useTheme","childrenArray","typeOf","undefined","React","FlexCol","alignItems","overflow","FlexRow","justifyContent","PropertyTitle","size","FlexGrowRow","map","child","index","key","borderLeft","borderColor","palette","divider","PropertyGroupPaper","style","variant","elevation","square","Paper","minWidth","paper","PropertyGroup","CircularProgress","Paper","FlexRow","React","forwardRef","MoreHoriz","MoreHorizIcon","IconButton","Menu","MenuItem","FlexRow","React","useState","PropertyActionsMenu","actions","props","anchorEl","setAnchorEl","useState","open","handleClick","event","currentTarget","handleClose","length","React","FlexRow","IconButton","size","color","onClick","MoreHorizIcon","fontSize","Menu","onClose","map","action","MenuItem","key","name","useTheme","FlexRow","Identicon","React","useEffect","useRef","useState","IdenticonCorner","value","props","theme","useTheme","parentHeight","setParentHeight","useState","ref","useRef","useEffect","current","parentElement","clientHeight","calculatedHeight","React","FlexRow","alignItems","height","background","width","borderLeft","palette","divider","div","Identicon","size","sx","padding","EllipsizeBox","React","forwardRef","PropertyValue","typographyVariant","value","props","ref","undefined","typographyProps","component","title","toString","variant","width","displayName","PropertyBox","forwardRef","titleProps","title","value","children","size","tip","actions","required","badge","props","ref","sizeValueHeight","large","medium","small","sizeVariants","React","FlexRow","flexDirection","minWidth","alignItems","overflow","undefined","PropertyTitle","more","PropertyActionsMenu","pl","columnGap","justifyContent","height","CircularProgress","PropertyValue","typographyVariant","IdenticonCorner","displayName","PropertyPaper","style","variant","elevation","square","Paper","paper","Property"]}
|
package/package.json
CHANGED
|
@@ -1,37 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/react-property",
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
|
|
3
|
+
"version": "3.0.3",
|
|
4
|
+
"description": "Common React library for all XYO projects that use React",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"xyo",
|
|
7
|
+
"utility",
|
|
8
|
+
"typescript",
|
|
9
|
+
"react"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://xyo.network",
|
|
8
12
|
"bugs": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@xylabs/react-button": "^4.0.1",
|
|
14
|
-
"@xylabs/react-flexbox": "^4.0.1",
|
|
15
|
-
"@xylabs/react-identicon": "^4.0.1",
|
|
16
|
-
"@xylabs/react-quick-tip-button": "^4.0.1",
|
|
17
|
-
"@xyo-network/react-shared": "^3.0.1",
|
|
18
|
-
"@xyo-network/typeof": "^3.0.2"
|
|
13
|
+
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-react-js/issues",
|
|
14
|
+
"email": "support@xyo.network"
|
|
19
15
|
},
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"@mui/styles": "^5",
|
|
24
|
-
"react": "^18",
|
|
25
|
-
"react-dom": "^18"
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/XYOracleNetwork/sdk-xyo-react-js.git"
|
|
26
19
|
},
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
20
|
+
"license": "LGPL-3.0-only",
|
|
21
|
+
"author": {
|
|
22
|
+
"name": "XYO Development Team",
|
|
23
|
+
"email": "support@xyo.network",
|
|
24
|
+
"url": "https://xyo.network"
|
|
32
25
|
},
|
|
33
|
-
"
|
|
34
|
-
"
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"type": "module",
|
|
35
28
|
"exports": {
|
|
36
29
|
".": {
|
|
37
30
|
"import": {
|
|
@@ -44,27 +37,40 @@
|
|
|
44
37
|
"./package.json": "./package.json"
|
|
45
38
|
},
|
|
46
39
|
"module": "dist/browser/index.mjs",
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"typescript",
|
|
52
|
-
"react"
|
|
53
|
-
],
|
|
54
|
-
"license": "LGPL-3.0-only",
|
|
55
|
-
"publishConfig": {
|
|
56
|
-
"access": "public"
|
|
40
|
+
"types": "dist/browser/index.d.ts",
|
|
41
|
+
"scripts": {
|
|
42
|
+
"license": "yarn license-checker --exclude \"MIT, ISC, Apache-2.0, BSD, BSD-2-Clause, CC-BY-4.0, Unlicense, CC-BY-3.0, CC0-1.0\"",
|
|
43
|
+
"lint-pkg": "npmPkgJsonLint ."
|
|
57
44
|
},
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@xylabs/react-button": "^4.0.3",
|
|
47
|
+
"@xylabs/react-flexbox": "^4.0.3",
|
|
48
|
+
"@xylabs/react-identicon": "^4.0.3",
|
|
49
|
+
"@xylabs/react-quick-tip-button": "^4.0.3",
|
|
50
|
+
"@xyo-network/react-shared": "^3.0.3",
|
|
51
|
+
"@xyo-network/typeof": "^3.0.15"
|
|
61
52
|
},
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@mui/icons-material": "^5.16.7",
|
|
55
|
+
"@mui/material": "^5.16.7",
|
|
56
|
+
"@mui/styles": "^5.16.7",
|
|
57
|
+
"@storybook/react": "^8.2.9",
|
|
58
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.7",
|
|
59
|
+
"@xylabs/tsconfig-react": "^4.0.7",
|
|
60
|
+
"react": "^18.3.1",
|
|
61
|
+
"react-dom": "^18.3.1",
|
|
62
|
+
"storybook": "^8.2.9",
|
|
63
|
+
"typescript": "^5.5.4"
|
|
65
64
|
},
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
"peerDependencies": {
|
|
66
|
+
"@mui/icons-material": "^5",
|
|
67
|
+
"@mui/material": "^5",
|
|
68
|
+
"@mui/styles": "^5",
|
|
69
|
+
"react": "^18",
|
|
70
|
+
"react-dom": "^18"
|
|
71
|
+
},
|
|
72
|
+
"publishConfig": {
|
|
73
|
+
"access": "public"
|
|
74
|
+
},
|
|
75
|
+
"docs": "dist/docs.json"
|
|
70
76
|
}
|
package/src/components/Action.ts
CHANGED
|
@@ -3,9 +3,11 @@ import { ButtonEx } from '@xylabs/react-button'
|
|
|
3
3
|
import { FlexRow } from '@xylabs/react-flexbox'
|
|
4
4
|
import React from 'react'
|
|
5
5
|
|
|
6
|
-
import { PropertyActionsProps } from './ActionsProps.ts'
|
|
6
|
+
import type { PropertyActionsProps } from './ActionsProps.ts'
|
|
7
7
|
|
|
8
|
-
export const PropertyActions: React.FC<PropertyActionsProps> = ({
|
|
8
|
+
export const PropertyActions: React.FC<PropertyActionsProps> = ({
|
|
9
|
+
buttons = false, actions, ...props
|
|
10
|
+
}) => {
|
|
9
11
|
if (actions) {
|
|
10
12
|
return (actions?.length ?? 0) > 0
|
|
11
13
|
? (
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { MoreHoriz as MoreHorizIcon } from '@mui/icons-material'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IconButton, Menu, MenuItem,
|
|
4
|
+
} from '@mui/material'
|
|
3
5
|
import { FlexRow } from '@xylabs/react-flexbox'
|
|
4
6
|
import React, { useState } from 'react'
|
|
5
7
|
|
|
6
|
-
import { PropertyActionsProps } from './ActionsProps.ts'
|
|
8
|
+
import type { PropertyActionsProps } from './ActionsProps.ts'
|
|
7
9
|
|
|
8
10
|
export const PropertyActionsMenu: React.FC<PropertyActionsProps> = ({ actions, ...props }) => {
|
|
9
11
|
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
1
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
2
2
|
|
|
3
|
-
import { PropertyAction } from './Action.ts'
|
|
3
|
+
import type { PropertyAction } from './Action.ts'
|
|
4
4
|
|
|
5
5
|
export interface PropertyActionsProps extends FlexBoxProps {
|
|
6
6
|
actions?: PropertyAction[]
|
package/src/components/Group.tsx
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { Paper, useTheme } from '@mui/material'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
FlexCol, FlexGrowRow, FlexRow,
|
|
4
|
+
} from '@xylabs/react-flexbox'
|
|
3
5
|
import { typeOf } from '@xyo-network/typeof'
|
|
4
|
-
import
|
|
6
|
+
import type { ReactElement } from 'react'
|
|
7
|
+
import React from 'react'
|
|
5
8
|
|
|
6
|
-
import {
|
|
9
|
+
import type {
|
|
10
|
+
PropertyGroupBoxProps, PropertyGroupPaperProps, PropertyGroupProps,
|
|
11
|
+
} from './Props.ts'
|
|
7
12
|
import { PropertyTitle } from './Title.tsx'
|
|
8
13
|
|
|
9
|
-
const PropertyGroupBox: React.FC<PropertyGroupBoxProps> = ({
|
|
14
|
+
const PropertyGroupBox: React.FC<PropertyGroupBoxProps> = ({
|
|
15
|
+
titleProps, children, title, tip, ...props
|
|
16
|
+
}) => {
|
|
10
17
|
const theme = useTheme()
|
|
11
18
|
const childrenArray = typeOf(children) === 'array' ? (children as ReactElement[]) : undefined
|
|
12
19
|
return (
|
|
@@ -33,9 +40,18 @@ const PropertyGroupBox: React.FC<PropertyGroupBoxProps> = ({ titleProps, childre
|
|
|
33
40
|
)
|
|
34
41
|
}
|
|
35
42
|
|
|
36
|
-
const PropertyGroupPaper: React.FC<PropertyGroupPaperProps> = ({
|
|
43
|
+
const PropertyGroupPaper: React.FC<PropertyGroupPaperProps> = ({
|
|
44
|
+
style, variant, elevation, square, ...props
|
|
45
|
+
}) => {
|
|
37
46
|
return (
|
|
38
|
-
<Paper
|
|
47
|
+
<Paper
|
|
48
|
+
style={{
|
|
49
|
+
minWidth: 0, overflow: 'hidden', ...style,
|
|
50
|
+
}}
|
|
51
|
+
variant={variant}
|
|
52
|
+
elevation={elevation}
|
|
53
|
+
square={square}
|
|
54
|
+
>
|
|
39
55
|
<PropertyGroupBox {...props} paper={false} />
|
|
40
56
|
</Paper>
|
|
41
57
|
)
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { useTheme } from '@mui/material'
|
|
2
|
-
import { FlexBoxProps
|
|
2
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
3
|
+
import { FlexRow } from '@xylabs/react-flexbox'
|
|
3
4
|
import { Identicon } from '@xylabs/react-identicon'
|
|
4
|
-
import React, {
|
|
5
|
+
import React, {
|
|
6
|
+
useEffect, useRef, useState,
|
|
7
|
+
} from 'react'
|
|
5
8
|
|
|
6
9
|
export interface IdenticonCornerProps extends FlexBoxProps {
|
|
7
10
|
value?: string | number | boolean | null
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TypographyVariant } from '@mui/material'
|
|
2
|
+
import { CircularProgress, Paper } from '@mui/material'
|
|
2
3
|
import { FlexRow } from '@xylabs/react-flexbox'
|
|
3
|
-
import { SizeProp } from '@xyo-network/react-shared'
|
|
4
|
+
import type { SizeProp } from '@xyo-network/react-shared'
|
|
4
5
|
import React, { forwardRef } from 'react'
|
|
5
6
|
|
|
6
7
|
import { PropertyActionsMenu } from './ActionsMenu.tsx'
|
|
7
8
|
import { IdenticonCorner } from './IdenticonCorner.tsx'
|
|
8
|
-
import {
|
|
9
|
+
import type {
|
|
10
|
+
PropertyBoxProps, PropertyPaperProps, PropertyProps,
|
|
11
|
+
} from './Props.ts'
|
|
9
12
|
import { PropertyTitle } from './Title.tsx'
|
|
10
13
|
import { PropertyValue } from './Value.tsx'
|
|
11
14
|
|
|
12
15
|
const PropertyBox = forwardRef<HTMLDivElement, PropertyBoxProps>(
|
|
13
|
-
({
|
|
16
|
+
({
|
|
17
|
+
titleProps, title, value, children, size = 'medium', tip, actions, required, badge = false, ...props
|
|
18
|
+
}, ref) => {
|
|
14
19
|
const sizeValueHeight: Record<SizeProp, number> = {
|
|
15
20
|
large: 48,
|
|
16
21
|
medium: 36,
|
|
@@ -58,9 +63,19 @@ const PropertyBox = forwardRef<HTMLDivElement, PropertyBoxProps>(
|
|
|
58
63
|
)
|
|
59
64
|
PropertyBox.displayName = 'PropertyBox'
|
|
60
65
|
|
|
61
|
-
const PropertyPaper = forwardRef<HTMLDivElement, PropertyPaperProps>(({
|
|
66
|
+
const PropertyPaper = forwardRef<HTMLDivElement, PropertyPaperProps>(({
|
|
67
|
+
style, variant, elevation = 2, square, ...props
|
|
68
|
+
}, ref) => {
|
|
62
69
|
return (
|
|
63
|
-
<Paper
|
|
70
|
+
<Paper
|
|
71
|
+
ref={ref}
|
|
72
|
+
style={{
|
|
73
|
+
minWidth: 0, overflow: 'hidden', ...style,
|
|
74
|
+
}}
|
|
75
|
+
variant={variant}
|
|
76
|
+
elevation={elevation}
|
|
77
|
+
square={square}
|
|
78
|
+
>
|
|
64
79
|
<PropertyBox {...props} paper={false} />
|
|
65
80
|
</Paper>
|
|
66
81
|
)
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { Replay as ReplayIcon } from '@mui/icons-material'
|
|
2
2
|
import { TextField } from '@mui/material'
|
|
3
|
-
import { Meta, StoryFn } from '@storybook/react'
|
|
3
|
+
import type { Meta, StoryFn } from '@storybook/react'
|
|
4
4
|
import { FlexCol, FlexRow } from '@xylabs/react-flexbox'
|
|
5
5
|
import React from 'react'
|
|
6
6
|
|
|
7
7
|
import { Property } from './Property.tsx'
|
|
8
|
-
import { PropertyProps } from './Props.ts'
|
|
8
|
+
import type { PropertyProps } from './Props.ts'
|
|
9
9
|
|
|
10
10
|
const StorybookEntry = {
|
|
11
11
|
argTypes: {},
|
|
12
12
|
component: Property,
|
|
13
|
-
parameters: {
|
|
14
|
-
docs: {
|
|
15
|
-
page: null,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
13
|
+
parameters: { docs: { page: null } },
|
|
18
14
|
title: 'property/PropertyBox',
|
|
19
15
|
} as Meta<typeof Property>
|
|
20
16
|
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import { Replay as ReplayIcon } from '@mui/icons-material'
|
|
2
2
|
import { TextField } from '@mui/material'
|
|
3
|
-
import { Meta, StoryFn } from '@storybook/react'
|
|
3
|
+
import type { Meta, StoryFn } from '@storybook/react'
|
|
4
4
|
import { FlexCol, FlexRow } from '@xylabs/react-flexbox'
|
|
5
5
|
import React from 'react'
|
|
6
6
|
|
|
7
7
|
import { Property } from './Property.tsx'
|
|
8
|
-
import { PropertyPaperProps, PropertyProps } from './Props.ts'
|
|
8
|
+
import type { PropertyPaperProps, PropertyProps } from './Props.ts'
|
|
9
9
|
|
|
10
10
|
const StorybookEntry = {
|
|
11
11
|
argTypes: {},
|
|
12
12
|
component: Property,
|
|
13
|
-
parameters: {
|
|
14
|
-
docs: {
|
|
15
|
-
page: null,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
13
|
+
parameters: { docs: { page: null } },
|
|
18
14
|
title: 'property/PropertyPaper',
|
|
19
15
|
} as Meta<typeof Property>
|
|
20
16
|
|
package/src/components/Props.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PaperProps } from '@mui/material'
|
|
2
|
-
import { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
3
|
-
import { SizeProp } from '@xyo-network/react-shared'
|
|
4
|
-
import { ReactNode } from 'react'
|
|
1
|
+
import type { PaperProps } from '@mui/material'
|
|
2
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
3
|
+
import type { SizeProp } from '@xyo-network/react-shared'
|
|
4
|
+
import type { ReactNode } from 'react'
|
|
5
5
|
|
|
6
|
-
import { PropertyAction } from './Action.ts'
|
|
7
|
-
import { PropertyTitleProps } from './Title.tsx'
|
|
6
|
+
import type { PropertyAction } from './Action.ts'
|
|
7
|
+
import type { PropertyTitleProps } from './Title.tsx'
|
|
8
8
|
|
|
9
9
|
export interface PropertyBaseProps {
|
|
10
10
|
paper?: boolean
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, StoryFn } from '@storybook/react'
|
|
1
|
+
import type { Meta, StoryFn } from '@storybook/react'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
4
|
import { PropertyTitle } from './Title.tsx'
|
|
@@ -6,11 +6,7 @@ import { PropertyTitle } from './Title.tsx'
|
|
|
6
6
|
const StorybookEntry = {
|
|
7
7
|
argTypes: {},
|
|
8
8
|
component: PropertyTitle,
|
|
9
|
-
parameters: {
|
|
10
|
-
docs: {
|
|
11
|
-
page: null,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
9
|
+
parameters: { docs: { page: null } },
|
|
14
10
|
title: 'property/Title',
|
|
15
11
|
} as Meta<typeof PropertyTitle>
|
|
16
12
|
|
|
@@ -27,6 +23,8 @@ const WithDataAndActions = Template.bind({})
|
|
|
27
23
|
|
|
28
24
|
WithDataAndActions.args = { title: 'Sample Title' }
|
|
29
25
|
|
|
30
|
-
export {
|
|
26
|
+
export {
|
|
27
|
+
Default, WithData, WithDataAndActions,
|
|
28
|
+
}
|
|
31
29
|
|
|
32
30
|
export default StorybookEntry
|
package/src/components/Title.tsx
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { TypographyVariant } from '@mui/material'
|
|
2
|
+
import {
|
|
3
|
+
darken, lighten, Typography, useTheme,
|
|
4
|
+
} from '@mui/material'
|
|
5
|
+
import type { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
6
|
+
import { FlexRow } from '@xylabs/react-flexbox'
|
|
3
7
|
import { QuickTipButton } from '@xylabs/react-quick-tip-button'
|
|
4
|
-
import { SizeProp } from '@xyo-network/react-shared'
|
|
5
|
-
import
|
|
8
|
+
import type { SizeProp } from '@xyo-network/react-shared'
|
|
9
|
+
import type { ReactNode } from 'react'
|
|
10
|
+
import React from 'react'
|
|
6
11
|
|
|
7
12
|
export type TitleSizeProp = SizeProp | 'full'
|
|
8
13
|
|
|
@@ -14,7 +19,9 @@ export interface PropertyTitleProps extends FlexBoxProps {
|
|
|
14
19
|
title?: string
|
|
15
20
|
}
|
|
16
21
|
|
|
17
|
-
export const PropertyTitle: React.FC<PropertyTitleProps> = ({
|
|
22
|
+
export const PropertyTitle: React.FC<PropertyTitleProps> = ({
|
|
23
|
+
elevation = 1, size = 'medium', tip, more, title, ...props
|
|
24
|
+
}) => {
|
|
18
25
|
const sizeVariants: Record<TitleSizeProp, TypographyVariant> = {
|
|
19
26
|
full: 'caption',
|
|
20
27
|
large: 'caption',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta, StoryFn } from '@storybook/react'
|
|
1
|
+
import type { Meta, StoryFn } from '@storybook/react'
|
|
2
2
|
import React from 'react'
|
|
3
3
|
|
|
4
4
|
import { PropertyValue } from './Value.tsx'
|
|
@@ -6,11 +6,7 @@ import { PropertyValue } from './Value.tsx'
|
|
|
6
6
|
const StorybookEntry = {
|
|
7
7
|
argTypes: {},
|
|
8
8
|
component: PropertyValue,
|
|
9
|
-
parameters: {
|
|
10
|
-
docs: {
|
|
11
|
-
page: null,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
9
|
+
parameters: { docs: { page: null } },
|
|
14
10
|
title: 'property/Value',
|
|
15
11
|
} as Meta<typeof PropertyValue>
|
|
16
12
|
|
package/src/components/Value.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// eslint-disable-next-line import-x/no-internal-modules
|
|
2
|
-
import { Variant } from '@mui/material/styles/createTypography.js'
|
|
3
|
-
import {
|
|
2
|
+
import type { Variant } from '@mui/material/styles/createTypography.js'
|
|
3
|
+
import type { EllipsizeBoxProps } from '@xyo-network/react-shared'
|
|
4
|
+
import { EllipsizeBox } from '@xyo-network/react-shared'
|
|
4
5
|
import React, { forwardRef } from 'react'
|
|
5
6
|
|
|
6
7
|
export interface PropertyValueProps extends Omit<EllipsizeBoxProps, 'ref'> {
|
|
@@ -8,12 +9,16 @@ export interface PropertyValueProps extends Omit<EllipsizeBoxProps, 'ref'> {
|
|
|
8
9
|
value?: string | number | boolean | null
|
|
9
10
|
}
|
|
10
11
|
|
|
11
|
-
export const PropertyValue = forwardRef<HTMLDivElement, PropertyValueProps>(({
|
|
12
|
+
export const PropertyValue = forwardRef<HTMLDivElement, PropertyValueProps>(({
|
|
13
|
+
typographyVariant = 'body1', value, ...props
|
|
14
|
+
}, ref) => {
|
|
12
15
|
return value === undefined
|
|
13
16
|
? null
|
|
14
17
|
: (
|
|
15
18
|
<EllipsizeBox
|
|
16
|
-
typographyProps={{
|
|
19
|
+
typographyProps={{
|
|
20
|
+
component: undefined, title: value?.toString(), variant: typographyVariant,
|
|
21
|
+
}}
|
|
17
22
|
width="100%"
|
|
18
23
|
ref={ref}
|
|
19
24
|
{...props}
|
package/xy.config.ts
CHANGED