@xyo-network/react-property 2.81.10 → 2.83.0
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/index.d.ts +63 -2
- package/dist/browser/index.mjs +272 -0
- package/dist/browser/index.mjs.map +1 -0
- package/package.json +16 -32
- package/src/components/Actions.tsx +32 -25
- package/src/components/ActionsMenu.tsx +25 -23
- package/src/components/ActionsProps.ts +1 -1
- package/src/components/Group.tsx +18 -14
- package/src/components/IdenticonCorner.tsx +1 -1
- package/src/components/Property.tsx +25 -23
- package/src/components/PropertyBox.stories.tsx +3 -3
- package/src/components/PropertyPaper.stories.tsx +3 -3
- package/src/components/{Props.tsx → Props.ts} +2 -2
- package/src/components/Title.stories.tsx +3 -3
- package/src/components/Title.tsx +11 -9
- package/src/components/Value.stories.tsx +3 -3
- package/src/components/Value.tsx +14 -11
- package/src/components/index.ts +6 -6
- package/src/index.ts +1 -1
- package/xy.config.ts +12 -0
- package/dist/browser/components/Action.d.cts +0 -8
- package/dist/browser/components/Action.d.cts.map +0 -1
- package/dist/browser/components/Action.d.mts +0 -8
- package/dist/browser/components/Action.d.mts.map +0 -1
- package/dist/browser/components/Action.d.ts +0 -8
- package/dist/browser/components/Action.d.ts.map +0 -1
- package/dist/browser/components/Actions.d.cts +0 -3
- package/dist/browser/components/Actions.d.cts.map +0 -1
- package/dist/browser/components/Actions.d.mts +0 -3
- package/dist/browser/components/Actions.d.mts.map +0 -1
- package/dist/browser/components/Actions.d.ts +0 -3
- package/dist/browser/components/Actions.d.ts.map +0 -1
- package/dist/browser/components/ActionsMenu.d.cts +0 -3
- package/dist/browser/components/ActionsMenu.d.cts.map +0 -1
- package/dist/browser/components/ActionsMenu.d.mts +0 -3
- package/dist/browser/components/ActionsMenu.d.mts.map +0 -1
- package/dist/browser/components/ActionsMenu.d.ts +0 -3
- package/dist/browser/components/ActionsMenu.d.ts.map +0 -1
- package/dist/browser/components/ActionsProps.d.cts +0 -7
- package/dist/browser/components/ActionsProps.d.cts.map +0 -1
- package/dist/browser/components/ActionsProps.d.mts +0 -7
- package/dist/browser/components/ActionsProps.d.mts.map +0 -1
- package/dist/browser/components/ActionsProps.d.ts +0 -7
- package/dist/browser/components/ActionsProps.d.ts.map +0 -1
- package/dist/browser/components/Group.d.cts +0 -3
- package/dist/browser/components/Group.d.cts.map +0 -1
- package/dist/browser/components/Group.d.mts +0 -3
- package/dist/browser/components/Group.d.mts.map +0 -1
- package/dist/browser/components/Group.d.ts +0 -3
- package/dist/browser/components/Group.d.ts.map +0 -1
- package/dist/browser/components/IdenticonCorner.d.cts +0 -6
- package/dist/browser/components/IdenticonCorner.d.cts.map +0 -1
- package/dist/browser/components/IdenticonCorner.d.mts +0 -6
- package/dist/browser/components/IdenticonCorner.d.mts.map +0 -1
- package/dist/browser/components/IdenticonCorner.d.ts +0 -6
- package/dist/browser/components/IdenticonCorner.d.ts.map +0 -1
- package/dist/browser/components/Property.d.cts +0 -3
- package/dist/browser/components/Property.d.cts.map +0 -1
- package/dist/browser/components/Property.d.mts +0 -3
- package/dist/browser/components/Property.d.mts.map +0 -1
- package/dist/browser/components/Property.d.ts +0 -3
- package/dist/browser/components/Property.d.ts.map +0 -1
- package/dist/browser/components/Props.d.cts +0 -35
- package/dist/browser/components/Props.d.cts.map +0 -1
- package/dist/browser/components/Props.d.mts +0 -35
- package/dist/browser/components/Props.d.mts.map +0 -1
- package/dist/browser/components/Props.d.ts +0 -35
- package/dist/browser/components/Props.d.ts.map +0 -1
- package/dist/browser/components/Title.d.cts +0 -13
- package/dist/browser/components/Title.d.cts.map +0 -1
- package/dist/browser/components/Title.d.mts +0 -13
- package/dist/browser/components/Title.d.mts.map +0 -1
- package/dist/browser/components/Title.d.ts +0 -13
- package/dist/browser/components/Title.d.ts.map +0 -1
- package/dist/browser/components/Value.d.cts +0 -8
- package/dist/browser/components/Value.d.cts.map +0 -1
- package/dist/browser/components/Value.d.mts +0 -8
- package/dist/browser/components/Value.d.mts.map +0 -1
- package/dist/browser/components/Value.d.ts +0 -8
- package/dist/browser/components/Value.d.ts.map +0 -1
- package/dist/browser/components/index.d.cts +0 -7
- package/dist/browser/components/index.d.cts.map +0 -1
- package/dist/browser/components/index.d.mts +0 -7
- package/dist/browser/components/index.d.mts.map +0 -1
- package/dist/browser/components/index.d.ts +0 -7
- package/dist/browser/components/index.d.ts.map +0 -1
- package/dist/browser/index.cjs +0 -223
- 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 -200
- package/dist/browser/index.js.map +0 -1
- package/dist/neutral/components/Action.d.cts +0 -8
- package/dist/neutral/components/Action.d.cts.map +0 -1
- package/dist/neutral/components/Action.d.mts +0 -8
- package/dist/neutral/components/Action.d.mts.map +0 -1
- package/dist/neutral/components/Action.d.ts +0 -8
- package/dist/neutral/components/Action.d.ts.map +0 -1
- package/dist/neutral/components/Actions.d.cts +0 -3
- package/dist/neutral/components/Actions.d.cts.map +0 -1
- package/dist/neutral/components/Actions.d.mts +0 -3
- package/dist/neutral/components/Actions.d.mts.map +0 -1
- package/dist/neutral/components/Actions.d.ts +0 -3
- package/dist/neutral/components/Actions.d.ts.map +0 -1
- package/dist/neutral/components/ActionsMenu.d.cts +0 -3
- package/dist/neutral/components/ActionsMenu.d.cts.map +0 -1
- package/dist/neutral/components/ActionsMenu.d.mts +0 -3
- package/dist/neutral/components/ActionsMenu.d.mts.map +0 -1
- package/dist/neutral/components/ActionsMenu.d.ts +0 -3
- package/dist/neutral/components/ActionsMenu.d.ts.map +0 -1
- package/dist/neutral/components/ActionsProps.d.cts +0 -7
- package/dist/neutral/components/ActionsProps.d.cts.map +0 -1
- package/dist/neutral/components/ActionsProps.d.mts +0 -7
- package/dist/neutral/components/ActionsProps.d.mts.map +0 -1
- package/dist/neutral/components/ActionsProps.d.ts +0 -7
- package/dist/neutral/components/ActionsProps.d.ts.map +0 -1
- package/dist/neutral/components/Group.d.cts +0 -3
- package/dist/neutral/components/Group.d.cts.map +0 -1
- package/dist/neutral/components/Group.d.mts +0 -3
- package/dist/neutral/components/Group.d.mts.map +0 -1
- package/dist/neutral/components/Group.d.ts +0 -3
- package/dist/neutral/components/Group.d.ts.map +0 -1
- package/dist/neutral/components/IdenticonCorner.d.cts +0 -6
- package/dist/neutral/components/IdenticonCorner.d.cts.map +0 -1
- package/dist/neutral/components/IdenticonCorner.d.mts +0 -6
- package/dist/neutral/components/IdenticonCorner.d.mts.map +0 -1
- package/dist/neutral/components/IdenticonCorner.d.ts +0 -6
- package/dist/neutral/components/IdenticonCorner.d.ts.map +0 -1
- package/dist/neutral/components/Property.d.cts +0 -3
- package/dist/neutral/components/Property.d.cts.map +0 -1
- package/dist/neutral/components/Property.d.mts +0 -3
- package/dist/neutral/components/Property.d.mts.map +0 -1
- package/dist/neutral/components/Property.d.ts +0 -3
- package/dist/neutral/components/Property.d.ts.map +0 -1
- package/dist/neutral/components/Props.d.cts +0 -35
- package/dist/neutral/components/Props.d.cts.map +0 -1
- package/dist/neutral/components/Props.d.mts +0 -35
- package/dist/neutral/components/Props.d.mts.map +0 -1
- package/dist/neutral/components/Props.d.ts +0 -35
- package/dist/neutral/components/Props.d.ts.map +0 -1
- package/dist/neutral/components/Title.d.cts +0 -13
- package/dist/neutral/components/Title.d.cts.map +0 -1
- package/dist/neutral/components/Title.d.mts +0 -13
- package/dist/neutral/components/Title.d.mts.map +0 -1
- package/dist/neutral/components/Title.d.ts +0 -13
- package/dist/neutral/components/Title.d.ts.map +0 -1
- package/dist/neutral/components/Value.d.cts +0 -8
- package/dist/neutral/components/Value.d.cts.map +0 -1
- package/dist/neutral/components/Value.d.mts +0 -8
- package/dist/neutral/components/Value.d.mts.map +0 -1
- package/dist/neutral/components/Value.d.ts +0 -8
- package/dist/neutral/components/Value.d.ts.map +0 -1
- package/dist/neutral/components/index.d.cts +0 -7
- package/dist/neutral/components/index.d.cts.map +0 -1
- package/dist/neutral/components/index.d.mts +0 -7
- package/dist/neutral/components/index.d.mts.map +0 -1
- package/dist/neutral/components/index.d.ts +0 -7
- package/dist/neutral/components/index.d.ts.map +0 -1
- package/dist/neutral/index.cjs +0 -223
- 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 -200
- package/dist/neutral/index.js.map +0 -1
- package/dist/node/components/Action.d.cts +0 -8
- package/dist/node/components/Action.d.cts.map +0 -1
- package/dist/node/components/Action.d.mts +0 -8
- package/dist/node/components/Action.d.mts.map +0 -1
- package/dist/node/components/Action.d.ts +0 -8
- package/dist/node/components/Action.d.ts.map +0 -1
- package/dist/node/components/Actions.d.cts +0 -3
- package/dist/node/components/Actions.d.cts.map +0 -1
- package/dist/node/components/Actions.d.mts +0 -3
- package/dist/node/components/Actions.d.mts.map +0 -1
- package/dist/node/components/Actions.d.ts +0 -3
- package/dist/node/components/Actions.d.ts.map +0 -1
- package/dist/node/components/ActionsMenu.d.cts +0 -3
- package/dist/node/components/ActionsMenu.d.cts.map +0 -1
- package/dist/node/components/ActionsMenu.d.mts +0 -3
- package/dist/node/components/ActionsMenu.d.mts.map +0 -1
- package/dist/node/components/ActionsMenu.d.ts +0 -3
- package/dist/node/components/ActionsMenu.d.ts.map +0 -1
- package/dist/node/components/ActionsProps.d.cts +0 -7
- package/dist/node/components/ActionsProps.d.cts.map +0 -1
- package/dist/node/components/ActionsProps.d.mts +0 -7
- package/dist/node/components/ActionsProps.d.mts.map +0 -1
- package/dist/node/components/ActionsProps.d.ts +0 -7
- package/dist/node/components/ActionsProps.d.ts.map +0 -1
- package/dist/node/components/Group.d.cts +0 -3
- package/dist/node/components/Group.d.cts.map +0 -1
- package/dist/node/components/Group.d.mts +0 -3
- package/dist/node/components/Group.d.mts.map +0 -1
- package/dist/node/components/Group.d.ts +0 -3
- package/dist/node/components/Group.d.ts.map +0 -1
- package/dist/node/components/IdenticonCorner.d.cts +0 -6
- package/dist/node/components/IdenticonCorner.d.cts.map +0 -1
- package/dist/node/components/IdenticonCorner.d.mts +0 -6
- package/dist/node/components/IdenticonCorner.d.mts.map +0 -1
- package/dist/node/components/IdenticonCorner.d.ts +0 -6
- package/dist/node/components/IdenticonCorner.d.ts.map +0 -1
- package/dist/node/components/Property.d.cts +0 -3
- package/dist/node/components/Property.d.cts.map +0 -1
- package/dist/node/components/Property.d.mts +0 -3
- package/dist/node/components/Property.d.mts.map +0 -1
- package/dist/node/components/Property.d.ts +0 -3
- package/dist/node/components/Property.d.ts.map +0 -1
- package/dist/node/components/Props.d.cts +0 -35
- package/dist/node/components/Props.d.cts.map +0 -1
- package/dist/node/components/Props.d.mts +0 -35
- package/dist/node/components/Props.d.mts.map +0 -1
- package/dist/node/components/Props.d.ts +0 -35
- package/dist/node/components/Props.d.ts.map +0 -1
- package/dist/node/components/Title.d.cts +0 -13
- package/dist/node/components/Title.d.cts.map +0 -1
- package/dist/node/components/Title.d.mts +0 -13
- package/dist/node/components/Title.d.mts.map +0 -1
- package/dist/node/components/Title.d.ts +0 -13
- package/dist/node/components/Title.d.ts.map +0 -1
- package/dist/node/components/Value.d.cts +0 -8
- package/dist/node/components/Value.d.cts.map +0 -1
- package/dist/node/components/Value.d.mts +0 -8
- package/dist/node/components/Value.d.mts.map +0 -1
- package/dist/node/components/Value.d.ts +0 -8
- package/dist/node/components/Value.d.ts.map +0 -1
- package/dist/node/components/index.d.cts +0 -7
- package/dist/node/components/index.d.cts.map +0 -1
- package/dist/node/components/index.d.mts +0 -7
- package/dist/node/components/index.d.mts.map +0 -1
- package/dist/node/components/index.d.ts +0 -7
- package/dist/node/components/index.d.ts.map +0 -1
- package/dist/node/index.cjs +0 -232
- 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 -202
- package/dist/node/index.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { CircularProgress, Paper, TypographyVariant } from '@mui/material'
|
|
2
2
|
import { FlexRow } from '@xylabs/react-flexbox'
|
|
3
3
|
import { SizeProp } from '@xyo-network/react-shared'
|
|
4
|
-
import { forwardRef } from 'react'
|
|
4
|
+
import React, { forwardRef } from 'react'
|
|
5
5
|
|
|
6
|
-
import { PropertyActionsMenu } from './ActionsMenu.
|
|
7
|
-
import { IdenticonCorner } from './IdenticonCorner.
|
|
8
|
-
import { PropertyBoxProps, PropertyPaperProps, PropertyProps } from './Props.
|
|
9
|
-
import { PropertyTitle } from './Title.
|
|
10
|
-
import { PropertyValue } from './Value.
|
|
6
|
+
import { PropertyActionsMenu } from './ActionsMenu.tsx'
|
|
7
|
+
import { IdenticonCorner } from './IdenticonCorner.tsx'
|
|
8
|
+
import { PropertyBoxProps, PropertyPaperProps, PropertyProps } from './Props.ts'
|
|
9
|
+
import { PropertyTitle } from './Title.tsx'
|
|
10
|
+
import { PropertyValue } from './Value.tsx'
|
|
11
11
|
|
|
12
12
|
const PropertyBox = forwardRef<HTMLDivElement, PropertyBoxProps>(
|
|
13
13
|
({ titleProps, title, value, children, size = 'medium', tip, actions, required, badge = false, ...props }, ref) => {
|
|
@@ -25,15 +25,17 @@ const PropertyBox = forwardRef<HTMLDivElement, PropertyBoxProps>(
|
|
|
25
25
|
|
|
26
26
|
return (
|
|
27
27
|
<FlexRow ref={ref} flexDirection="column" minWidth={0} alignItems="stretch" overflow="hidden" {...props}>
|
|
28
|
-
{title === undefined
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
{title === undefined
|
|
29
|
+
? null
|
|
30
|
+
: (
|
|
31
|
+
<PropertyTitle
|
|
32
|
+
tip={tip}
|
|
33
|
+
title={required ? `${title}*` : title}
|
|
34
|
+
size={size}
|
|
35
|
+
more={<PropertyActionsMenu actions={actions} />}
|
|
36
|
+
{...titleProps}
|
|
37
|
+
/>
|
|
38
|
+
)}
|
|
37
39
|
<FlexRow
|
|
38
40
|
pl={1}
|
|
39
41
|
columnGap={1}
|
|
@@ -41,14 +43,14 @@ const PropertyBox = forwardRef<HTMLDivElement, PropertyBoxProps>(
|
|
|
41
43
|
overflow="hidden"
|
|
42
44
|
height={sizeValueHeight[size]}
|
|
43
45
|
>
|
|
44
|
-
{(children ?? value === undefined)
|
|
45
|
-
<CircularProgress size={16} />
|
|
46
|
-
|
|
47
|
-
{value === undefined
|
|
48
|
-
null
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
46
|
+
{(children ?? value === undefined)
|
|
47
|
+
? <CircularProgress size={16} />
|
|
48
|
+
: <PropertyValue value={value} typographyVariant={sizeVariants[size]} />}
|
|
49
|
+
{value === undefined
|
|
50
|
+
? null
|
|
51
|
+
: badge
|
|
52
|
+
? <IdenticonCorner value={value} />
|
|
53
|
+
: null}
|
|
52
54
|
</FlexRow>
|
|
53
55
|
</FlexRow>
|
|
54
56
|
)
|
|
@@ -2,9 +2,10 @@ import { Replay as ReplayIcon } from '@mui/icons-material'
|
|
|
2
2
|
import { TextField } from '@mui/material'
|
|
3
3
|
import { Meta, StoryFn } from '@storybook/react'
|
|
4
4
|
import { FlexCol, FlexRow } from '@xylabs/react-flexbox'
|
|
5
|
+
import React from 'react'
|
|
5
6
|
|
|
6
|
-
import { Property } from './Property.
|
|
7
|
-
import { PropertyProps } from './Props.
|
|
7
|
+
import { Property } from './Property.tsx'
|
|
8
|
+
import { PropertyProps } from './Props.ts'
|
|
8
9
|
|
|
9
10
|
const StorybookEntry = {
|
|
10
11
|
argTypes: {},
|
|
@@ -173,5 +174,4 @@ export {
|
|
|
173
174
|
WithUndefinedData,
|
|
174
175
|
}
|
|
175
176
|
|
|
176
|
-
// eslint-disable-next-line import/no-default-export
|
|
177
177
|
export default StorybookEntry
|
|
@@ -2,9 +2,10 @@ import { Replay as ReplayIcon } from '@mui/icons-material'
|
|
|
2
2
|
import { TextField } from '@mui/material'
|
|
3
3
|
import { Meta, StoryFn } from '@storybook/react'
|
|
4
4
|
import { FlexCol, FlexRow } from '@xylabs/react-flexbox'
|
|
5
|
+
import React from 'react'
|
|
5
6
|
|
|
6
|
-
import { Property } from './Property.
|
|
7
|
-
import { PropertyPaperProps, PropertyProps } from './Props.
|
|
7
|
+
import { Property } from './Property.tsx'
|
|
8
|
+
import { PropertyPaperProps, PropertyProps } from './Props.ts'
|
|
8
9
|
|
|
9
10
|
const StorybookEntry = {
|
|
10
11
|
argTypes: {},
|
|
@@ -191,5 +192,4 @@ export {
|
|
|
191
192
|
WithUndefinedData,
|
|
192
193
|
}
|
|
193
194
|
|
|
194
|
-
// eslint-disable-next-line import/no-default-export
|
|
195
195
|
export default StorybookEntry
|
|
@@ -3,8 +3,8 @@ import { FlexBoxProps } from '@xylabs/react-flexbox'
|
|
|
3
3
|
import { SizeProp } from '@xyo-network/react-shared'
|
|
4
4
|
import { ReactNode } from 'react'
|
|
5
5
|
|
|
6
|
-
import { PropertyAction } from './Action.
|
|
7
|
-
import { PropertyTitleProps } from './Title.
|
|
6
|
+
import { PropertyAction } from './Action.ts'
|
|
7
|
+
import { PropertyTitleProps } from './Title.tsx'
|
|
8
8
|
|
|
9
9
|
export interface PropertyBaseProps {
|
|
10
10
|
paper?: boolean
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
|
2
|
+
import React from 'react'
|
|
2
3
|
|
|
3
|
-
import { PropertyTitle } from './Title.
|
|
4
|
+
import { PropertyTitle } from './Title.tsx'
|
|
4
5
|
|
|
5
6
|
const StorybookEntry = {
|
|
6
7
|
argTypes: {},
|
|
@@ -13,7 +14,7 @@ const StorybookEntry = {
|
|
|
13
14
|
title: 'property/Title',
|
|
14
15
|
} as Meta<typeof PropertyTitle>
|
|
15
16
|
|
|
16
|
-
const Template: StoryFn<typeof PropertyTitle> =
|
|
17
|
+
const Template: StoryFn<typeof PropertyTitle> = args => <PropertyTitle {...args}></PropertyTitle>
|
|
17
18
|
|
|
18
19
|
const Default = Template.bind({})
|
|
19
20
|
Default.args = {}
|
|
@@ -28,5 +29,4 @@ WithDataAndActions.args = { title: 'Sample Title' }
|
|
|
28
29
|
|
|
29
30
|
export { Default, WithData, WithDataAndActions }
|
|
30
31
|
|
|
31
|
-
// eslint-disable-next-line import/no-default-export
|
|
32
32
|
export default StorybookEntry
|
package/src/components/Title.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { darken, lighten, Typography, TypographyVariant, useTheme } from '@mui/m
|
|
|
2
2
|
import { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'
|
|
3
3
|
import { QuickTipButton } from '@xylabs/react-quick-tip-button'
|
|
4
4
|
import { SizeProp } from '@xyo-network/react-shared'
|
|
5
|
-
import { ReactNode } from 'react'
|
|
5
|
+
import React, { ReactNode } from 'react'
|
|
6
6
|
|
|
7
7
|
export type TitleSizeProp = SizeProp | 'full'
|
|
8
8
|
|
|
@@ -43,9 +43,9 @@ export const PropertyTitle: React.FC<PropertyTitleProps> = ({ elevation = 1, siz
|
|
|
43
43
|
return (
|
|
44
44
|
<FlexRow
|
|
45
45
|
bgcolor={
|
|
46
|
-
theme.palette.mode === 'dark'
|
|
47
|
-
lighten(theme.palette.background.paper, 0.05 * elevation)
|
|
48
|
-
|
|
46
|
+
theme.palette.mode === 'dark'
|
|
47
|
+
? lighten(theme.palette.background.paper, 0.05 * elevation)
|
|
48
|
+
: darken(theme.palette.background.paper, 0.025 * elevation)
|
|
49
49
|
}
|
|
50
50
|
alignItems="center"
|
|
51
51
|
height={sizeTitleHeight[size]}
|
|
@@ -58,11 +58,13 @@ export const PropertyTitle: React.FC<PropertyTitleProps> = ({ elevation = 1, siz
|
|
|
58
58
|
<strong>{title}</strong>
|
|
59
59
|
</small>
|
|
60
60
|
</Typography>
|
|
61
|
-
{tip
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
{tip
|
|
62
|
+
? (
|
|
63
|
+
<QuickTipButton style={{ fontSize: quickTipSize }} color="inherit" title={title ?? ''}>
|
|
64
|
+
{tip}
|
|
65
|
+
</QuickTipButton>
|
|
66
|
+
)
|
|
67
|
+
: null}
|
|
66
68
|
</FlexRow>
|
|
67
69
|
{more}
|
|
68
70
|
</FlexRow>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryFn } from '@storybook/react'
|
|
2
|
+
import React from 'react'
|
|
2
3
|
|
|
3
|
-
import { PropertyValue } from './Value.
|
|
4
|
+
import { PropertyValue } from './Value.tsx'
|
|
4
5
|
|
|
5
6
|
const StorybookEntry = {
|
|
6
7
|
argTypes: {},
|
|
@@ -13,7 +14,7 @@ const StorybookEntry = {
|
|
|
13
14
|
title: 'property/Value',
|
|
14
15
|
} as Meta<typeof PropertyValue>
|
|
15
16
|
|
|
16
|
-
const Template: StoryFn<typeof PropertyValue> =
|
|
17
|
+
const Template: StoryFn<typeof PropertyValue> = args => <PropertyValue {...args}></PropertyValue>
|
|
17
18
|
|
|
18
19
|
const Default = Template.bind({})
|
|
19
20
|
Default.args = {}
|
|
@@ -26,5 +27,4 @@ WithData.args = {
|
|
|
26
27
|
|
|
27
28
|
export { Default, WithData }
|
|
28
29
|
|
|
29
|
-
// eslint-disable-next-line import/no-default-export
|
|
30
30
|
export default StorybookEntry
|
package/src/components/Value.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
// eslint-disable-next-line import/no-internal-modules
|
|
1
2
|
import { Variant } from '@mui/material/styles/createTypography.js'
|
|
2
3
|
import { EllipsizeBox, EllipsizeBoxProps } from '@xyo-network/react-shared'
|
|
3
|
-
import { forwardRef } from 'react'
|
|
4
|
+
import React, { forwardRef } from 'react'
|
|
4
5
|
|
|
5
6
|
export interface PropertyValueProps extends Omit<EllipsizeBoxProps, 'ref'> {
|
|
6
7
|
typographyVariant?: Variant
|
|
@@ -8,16 +9,18 @@ export interface PropertyValueProps extends Omit<EllipsizeBoxProps, 'ref'> {
|
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
export const PropertyValue = forwardRef<HTMLDivElement, PropertyValueProps>(({ typographyVariant = 'body1', value, ...props }, ref) => {
|
|
11
|
-
return value === undefined
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
return value === undefined
|
|
13
|
+
? null
|
|
14
|
+
: (
|
|
15
|
+
<EllipsizeBox
|
|
16
|
+
typographyProps={{ component: undefined, title: value?.toString(), variant: typographyVariant }}
|
|
17
|
+
width="100%"
|
|
18
|
+
ref={ref}
|
|
19
|
+
{...props}
|
|
20
|
+
>
|
|
21
|
+
{value}
|
|
22
|
+
</EllipsizeBox>
|
|
23
|
+
)
|
|
21
24
|
})
|
|
22
25
|
|
|
23
26
|
PropertyValue.displayName = 'PropertyValue'
|
package/src/components/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './Action.
|
|
2
|
-
export * from './Group.
|
|
3
|
-
export * from './Property.
|
|
4
|
-
export * from './Props.
|
|
5
|
-
export * from './Title.
|
|
6
|
-
export * from './Value.
|
|
1
|
+
export * from './Action.ts'
|
|
2
|
+
export * from './Group.tsx'
|
|
3
|
+
export * from './Property.tsx'
|
|
4
|
+
export * from './Props.ts'
|
|
5
|
+
export * from './Title.tsx'
|
|
6
|
+
export * from './Value.tsx'
|
package/src/index.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './components/index.
|
|
1
|
+
export * from './components/index.ts'
|
package/xy.config.ts
ADDED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../src/components/Action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../src/components/Action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../src/components/Action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/components/Actions.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAExD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA6B1D,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/components/Actions.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAExD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA6B1D,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/components/Actions.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAExD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA6B1D,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAExD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiC9D,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAExD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiC9D,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAExD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiC9D,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsProps.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsProps.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActionsProps.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/components/Group.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkD,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAkC/F,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAEtD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/components/Group.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkD,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAkC/F,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAEtD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/components/Group.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAkD,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAkC/F,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAEtD,CAAA"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
2
|
-
export interface IdenticonCornerProps extends FlexBoxProps {
|
|
3
|
-
value?: string | number | boolean | null;
|
|
4
|
-
}
|
|
5
|
-
export declare const IdenticonCorner: React.FC<IdenticonCornerProps>;
|
|
6
|
-
//# sourceMappingURL=IdenticonCorner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IdenticonCorner.d.ts","sourceRoot":"","sources":["../../../src/components/IdenticonCorner.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAI7D,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"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
2
|
-
export interface IdenticonCornerProps extends FlexBoxProps {
|
|
3
|
-
value?: string | number | boolean | null;
|
|
4
|
-
}
|
|
5
|
-
export declare const IdenticonCorner: React.FC<IdenticonCornerProps>;
|
|
6
|
-
//# sourceMappingURL=IdenticonCorner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IdenticonCorner.d.ts","sourceRoot":"","sources":["../../../src/components/IdenticonCorner.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAI7D,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"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FlexBoxProps } from '@xylabs/react-flexbox';
|
|
2
|
-
export interface IdenticonCornerProps extends FlexBoxProps {
|
|
3
|
-
value?: string | number | boolean | null;
|
|
4
|
-
}
|
|
5
|
-
export declare const IdenticonCorner: React.FC<IdenticonCornerProps>;
|
|
6
|
-
//# sourceMappingURL=IdenticonCorner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IdenticonCorner.d.ts","sourceRoot":"","sources":["../../../src/components/IdenticonCorner.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAW,MAAM,uBAAuB,CAAA;AAI7D,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"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { PropertyBoxProps, PropertyPaperProps } from './Props.js';
|
|
2
|
-
export declare const Property: import("react").ForwardRefExoticComponent<(PropertyBoxProps | Omit<PropertyPaperProps, "ref">) & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
-
//# sourceMappingURL=Property.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../../../src/components/Property.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAiB,MAAM,YAAY,CAAA;AA4DhF,eAAO,MAAM,QAAQ,iJAEnB,CAAA"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { PropertyBoxProps, PropertyPaperProps } from './Props.js';
|
|
2
|
-
export declare const Property: import("react").ForwardRefExoticComponent<(PropertyBoxProps | Omit<PropertyPaperProps, "ref">) & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
-
//# sourceMappingURL=Property.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../../../src/components/Property.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAiB,MAAM,YAAY,CAAA;AA4DhF,eAAO,MAAM,QAAQ,iJAEnB,CAAA"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { PropertyBoxProps, PropertyPaperProps } from './Props.js';
|
|
2
|
-
export declare const Property: import("react").ForwardRefExoticComponent<(PropertyBoxProps | Omit<PropertyPaperProps, "ref">) & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
-
//# sourceMappingURL=Property.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../../../src/components/Property.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAiB,MAAM,YAAY,CAAA;AA4DhF,eAAO,MAAM,QAAQ,iJAEnB,CAAA"}
|
|
@@ -1,35 +0,0 @@
|
|
|
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';
|
|
5
|
-
import { PropertyAction } from './Action.js';
|
|
6
|
-
import { PropertyTitleProps } from './Title.js';
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Props.d.ts","sourceRoot":"","sources":["../../../src/components/Props.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAE/C,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"}
|
|
@@ -1,35 +0,0 @@
|
|
|
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';
|
|
5
|
-
import { PropertyAction } from './Action.js';
|
|
6
|
-
import { PropertyTitleProps } from './Title.js';
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Props.d.ts","sourceRoot":"","sources":["../../../src/components/Props.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAE/C,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"}
|