@xyo-network/react-property 2.64.0-rc.7 → 2.64.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/components/Action.cjs +19 -0
- package/dist/browser/components/Action.cjs.map +1 -0
- package/dist/browser/components/Action.d.cts +8 -0
- package/dist/browser/components/Action.d.cts.map +1 -0
- package/dist/browser/components/Actions.cjs +38 -0
- package/dist/{node/components/Actions.mjs.map → browser/components/Actions.cjs.map} +1 -1
- package/dist/browser/components/Actions.d.cts +4 -0
- package/dist/browser/components/Actions.d.cts.map +1 -0
- package/dist/browser/components/ActionsMenu.cjs +57 -0
- package/dist/{node/components/ActionsMenu.mjs.map → browser/components/ActionsMenu.cjs.map} +1 -1
- package/dist/browser/components/ActionsMenu.d.cts +4 -0
- package/dist/browser/components/ActionsMenu.d.cts.map +1 -0
- package/dist/browser/components/ActionsProps.cjs +19 -0
- package/dist/browser/components/ActionsProps.cjs.map +1 -0
- package/dist/browser/components/ActionsProps.d.cts +7 -0
- package/dist/browser/components/ActionsProps.d.cts.map +1 -0
- package/dist/browser/components/Group.cjs +93 -0
- package/dist/browser/components/Group.cjs.map +1 -0
- package/dist/browser/components/Group.d.cts +4 -0
- package/dist/browser/components/Group.d.cts.map +1 -0
- package/dist/browser/components/IdenticonCorner.cjs +41 -0
- package/dist/{node/components/IdenticonCorner.mjs.map → browser/components/IdenticonCorner.cjs.map} +1 -1
- package/dist/browser/components/IdenticonCorner.d.cts +7 -0
- package/dist/browser/components/IdenticonCorner.d.cts.map +1 -0
- package/dist/browser/components/Property.cjs +185 -0
- package/dist/browser/components/Property.cjs.map +1 -0
- package/dist/browser/components/Property.d.cts +4 -0
- package/dist/browser/components/Property.d.cts.map +1 -0
- package/dist/browser/components/Props.cjs +19 -0
- package/dist/browser/components/Props.cjs.map +1 -0
- package/dist/browser/components/Props.d.cts +35 -0
- package/dist/browser/components/Props.d.cts.map +1 -0
- package/dist/browser/components/Title.cjs +69 -0
- package/dist/{node/components/Title.mjs.map → browser/components/Title.cjs.map} +1 -1
- package/dist/browser/components/Title.d.cts +13 -0
- package/dist/browser/components/Title.d.cts.map +1 -0
- package/dist/browser/components/Value.cjs +33 -0
- package/dist/browser/components/Value.cjs.map +1 -0
- package/dist/browser/components/Value.d.cts +9 -0
- package/dist/browser/components/Value.d.cts.map +1 -0
- package/dist/browser/components/index.cjs +214 -0
- package/dist/browser/components/index.cjs.map +1 -0
- package/dist/browser/components/index.d.cts +7 -0
- package/dist/browser/components/index.d.cts.map +1 -0
- package/dist/browser/index.cjs +214 -0
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.cts +2 -0
- package/dist/browser/index.d.cts.map +1 -0
- package/dist/docs.json +48117 -0
- package/dist/node/components/Action.cjs +19 -0
- package/dist/node/components/Action.cjs.map +1 -0
- package/dist/node/components/Action.d.cts +8 -0
- package/dist/node/components/Action.d.cts.map +1 -0
- package/dist/node/components/Action.js +0 -16
- package/dist/node/components/Action.js.map +1 -1
- package/dist/node/components/Actions.cjs +42 -0
- package/dist/node/components/Actions.cjs.map +1 -0
- package/dist/node/components/Actions.d.cts +4 -0
- package/dist/node/components/Actions.d.cts.map +1 -0
- package/dist/node/components/Actions.js +10 -33
- package/dist/node/components/Actions.js.map +1 -1
- package/dist/node/components/ActionsMenu.cjs +62 -0
- package/dist/node/components/ActionsMenu.cjs.map +1 -0
- package/dist/node/components/ActionsMenu.d.cts +4 -0
- package/dist/node/components/ActionsMenu.d.cts.map +1 -0
- package/dist/node/components/ActionsMenu.js +17 -39
- package/dist/node/components/ActionsMenu.js.map +1 -1
- package/dist/node/components/ActionsProps.cjs +19 -0
- package/dist/node/components/ActionsProps.cjs.map +1 -0
- package/dist/node/components/ActionsProps.d.cts +7 -0
- package/dist/node/components/ActionsProps.d.cts.map +1 -0
- package/dist/node/components/ActionsProps.js +0 -16
- package/dist/node/components/ActionsProps.js.map +1 -1
- package/dist/node/components/Group.cjs +97 -0
- package/dist/node/components/Group.cjs.map +1 -0
- package/dist/node/components/Group.d.cts +4 -0
- package/dist/node/components/Group.d.cts.map +1 -0
- package/dist/node/components/Group.js +65 -42
- package/dist/node/components/Group.js.map +1 -1
- package/dist/node/components/IdenticonCorner.cjs +46 -0
- package/dist/node/components/IdenticonCorner.cjs.map +1 -0
- package/dist/node/components/IdenticonCorner.d.cts +7 -0
- package/dist/node/components/IdenticonCorner.d.cts.map +1 -0
- package/dist/node/components/IdenticonCorner.js +16 -38
- package/dist/node/components/IdenticonCorner.js.map +1 -1
- package/dist/node/components/Property.cjs +191 -0
- package/dist/node/components/Property.cjs.map +1 -0
- package/dist/node/components/Property.d.cts +4 -0
- package/dist/node/components/Property.d.cts.map +1 -0
- package/dist/node/components/Property.js +125 -44
- package/dist/node/components/Property.js.map +1 -1
- package/dist/node/components/Props.cjs +19 -0
- package/dist/node/components/Props.cjs.map +1 -0
- package/dist/node/components/Props.d.cts +35 -0
- package/dist/node/components/Props.d.cts.map +1 -0
- package/dist/node/components/Props.js +0 -16
- package/dist/node/components/Props.js.map +1 -1
- package/dist/node/components/Title.cjs +73 -0
- package/dist/node/components/Title.cjs.map +1 -0
- package/dist/node/components/Title.d.cts +13 -0
- package/dist/node/components/Title.d.cts.map +1 -0
- package/dist/node/components/Title.js +15 -38
- package/dist/node/components/Title.js.map +1 -1
- package/dist/node/components/{Title.stories.js → Value.cjs} +14 -30
- package/dist/node/components/{Value.mjs.map → Value.cjs.map} +1 -1
- package/dist/node/components/Value.d.cts +9 -0
- package/dist/node/components/Value.d.cts.map +1 -0
- package/dist/node/components/Value.js +8 -31
- package/dist/node/components/Value.js.map +1 -1
- package/dist/node/components/index.cjs +223 -0
- package/dist/node/components/index.cjs.map +1 -0
- package/dist/node/components/index.d.cts +7 -0
- package/dist/node/components/index.d.cts.map +1 -0
- package/dist/node/components/index.js +190 -30
- package/dist/node/components/index.js.map +1 -1
- package/dist/node/index.cjs +223 -0
- package/dist/node/index.cjs.map +1 -0
- package/dist/node/index.d.cts +2 -0
- package/dist/node/index.d.cts.map +1 -0
- package/dist/node/index.js +190 -20
- package/dist/node/index.js.map +1 -1
- package/package.json +21 -21
- package/dist/browser/components/PropertyBox.stories.js +0 -160
- package/dist/browser/components/PropertyBox.stories.js.map +0 -1
- package/dist/browser/components/PropertyPaper.stories.js +0 -178
- package/dist/browser/components/PropertyPaper.stories.js.map +0 -1
- package/dist/browser/components/Title.stories.js +0 -27
- package/dist/browser/components/Title.stories.js.map +0 -1
- package/dist/browser/components/Value.stories.js +0 -26
- package/dist/browser/components/Value.stories.js.map +0 -1
- package/dist/node/components/Action.mjs +0 -1
- package/dist/node/components/Action.mjs.map +0 -1
- package/dist/node/components/Actions.mjs +0 -16
- package/dist/node/components/ActionsMenu.mjs +0 -35
- package/dist/node/components/ActionsProps.mjs +0 -1
- package/dist/node/components/ActionsProps.mjs.map +0 -1
- package/dist/node/components/Group.mjs +0 -25
- package/dist/node/components/Group.mjs.map +0 -1
- package/dist/node/components/IdenticonCorner.mjs +0 -19
- package/dist/node/components/Property.mjs +0 -61
- package/dist/node/components/Property.mjs.map +0 -1
- package/dist/node/components/PropertyBox.stories.js +0 -197
- package/dist/node/components/PropertyBox.stories.js.map +0 -1
- package/dist/node/components/PropertyBox.stories.mjs +0 -160
- package/dist/node/components/PropertyBox.stories.mjs.map +0 -1
- package/dist/node/components/PropertyPaper.stories.js +0 -217
- package/dist/node/components/PropertyPaper.stories.js.map +0 -1
- package/dist/node/components/PropertyPaper.stories.mjs +0 -178
- package/dist/node/components/PropertyPaper.stories.mjs.map +0 -1
- package/dist/node/components/Props.mjs +0 -1
- package/dist/node/components/Props.mjs.map +0 -1
- package/dist/node/components/Title.mjs +0 -47
- package/dist/node/components/Title.stories.js.map +0 -1
- package/dist/node/components/Title.stories.mjs +0 -27
- package/dist/node/components/Title.stories.mjs.map +0 -1
- package/dist/node/components/Value.mjs +0 -11
- package/dist/node/components/Value.stories.js +0 -51
- package/dist/node/components/Value.stories.js.map +0 -1
- package/dist/node/components/Value.stories.mjs +0 -26
- package/dist/node/components/Value.stories.mjs.map +0 -1
- package/dist/node/components/index.mjs +0 -7
- package/dist/node/components/index.mjs.map +0 -1
- package/dist/node/index.mjs +0 -2
- package/dist/node/index.mjs.map +0 -1
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Replay as ReplayIcon } from "@mui/icons-material";
|
|
3
|
-
import { TextField } from "@mui/material";
|
|
4
|
-
import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
|
|
5
|
-
import { PayloadWrapper } from "@xyo-network/payload-wrapper";
|
|
6
|
-
import { sampleBlockWithPayloads, useAppThemeDecorator } from "@xyo-network/react-storybook";
|
|
7
|
-
import { Property } from "./Property";
|
|
8
|
-
const StorybookEntry = {
|
|
9
|
-
argTypes: {},
|
|
10
|
-
component: Property,
|
|
11
|
-
parameters: {
|
|
12
|
-
docs: {
|
|
13
|
-
page: null
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
title: "property/PropertyBox"
|
|
17
|
-
};
|
|
18
|
-
const Template = (args) => /* @__PURE__ */ jsx(Property, { ...args, paper: false });
|
|
19
|
-
const TemplateWithCompare = (args) => /* @__PURE__ */ jsxs(FlexCol, { gap: 1, alignItems: "stretch", children: [
|
|
20
|
-
/* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
|
|
21
|
-
/* @__PURE__ */ jsx(TextField, { size: "small", value: "Sample text Field" }),
|
|
22
|
-
/* @__PURE__ */ jsx(Property, { ...args, size: "small" })
|
|
23
|
-
] }),
|
|
24
|
-
/* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
|
|
25
|
-
/* @__PURE__ */ jsx(Property, { ...args, size: "small" }),
|
|
26
|
-
/* @__PURE__ */ jsx(Property, { ...args, size: "small" })
|
|
27
|
-
] }),
|
|
28
|
-
/* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
|
|
29
|
-
/* @__PURE__ */ jsx(TextField, { size: "medium", value: "Sample text Field" }),
|
|
30
|
-
/* @__PURE__ */ jsx(Property, { ...args, size: "medium" })
|
|
31
|
-
] }),
|
|
32
|
-
/* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
|
|
33
|
-
/* @__PURE__ */ jsx(Property, { ...args, size: "medium" }),
|
|
34
|
-
/* @__PURE__ */ jsx(Property, { ...args, size: "medium" })
|
|
35
|
-
] }),
|
|
36
|
-
/* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
|
|
37
|
-
/* @__PURE__ */ jsx(TextField, { value: "Sample text Field" }),
|
|
38
|
-
/* @__PURE__ */ jsx(Property, { ...args, size: "large" })
|
|
39
|
-
] }),
|
|
40
|
-
/* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
|
|
41
|
-
/* @__PURE__ */ jsx(Property, { ...args, size: "large" }),
|
|
42
|
-
/* @__PURE__ */ jsx(Property, { ...args, size: "large" })
|
|
43
|
-
] })
|
|
44
|
-
] });
|
|
45
|
-
const Default = Template.bind({});
|
|
46
|
-
Default.args = {};
|
|
47
|
-
Default.decorators = [useAppThemeDecorator];
|
|
48
|
-
const WithTitle = Template.bind({});
|
|
49
|
-
WithTitle.args = { title: "No Data" };
|
|
50
|
-
WithTitle.decorators = [useAppThemeDecorator];
|
|
51
|
-
const WithUndefinedData = Template.bind({});
|
|
52
|
-
WithUndefinedData.args = { title: "Block Hash" };
|
|
53
|
-
WithUndefinedData.decorators = [useAppThemeDecorator];
|
|
54
|
-
const WithData = Template.bind({});
|
|
55
|
-
WithData.args = { title: "Block Hash", value: PayloadWrapper.hashSync(sampleBlockWithPayloads) };
|
|
56
|
-
WithData.decorators = [useAppThemeDecorator];
|
|
57
|
-
const WithDataSmall = Template.bind({});
|
|
58
|
-
WithDataSmall.args = { size: "small", title: "Block Hash", value: PayloadWrapper.hashSync(sampleBlockWithPayloads) };
|
|
59
|
-
WithDataSmall.decorators = [useAppThemeDecorator];
|
|
60
|
-
const WithDataCompare = TemplateWithCompare.bind({});
|
|
61
|
-
WithDataCompare.args = { tip: "This is the block hash", title: "Block Hash", value: PayloadWrapper.hashSync(sampleBlockWithPayloads) };
|
|
62
|
-
WithDataCompare.decorators = [useAppThemeDecorator];
|
|
63
|
-
const WithDataAndBadgeSmall = Template.bind({});
|
|
64
|
-
WithDataAndBadgeSmall.args = {
|
|
65
|
-
badge: true,
|
|
66
|
-
size: "small",
|
|
67
|
-
tip: "This is the block hash",
|
|
68
|
-
title: "Block Hash",
|
|
69
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
70
|
-
};
|
|
71
|
-
WithDataAndBadgeSmall.decorators = [useAppThemeDecorator];
|
|
72
|
-
const WithDataAndBadgeMedium = Template.bind({});
|
|
73
|
-
WithDataAndBadgeMedium.args = {
|
|
74
|
-
badge: true,
|
|
75
|
-
size: "medium",
|
|
76
|
-
tip: "This is the block hash",
|
|
77
|
-
title: "Block Hash",
|
|
78
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
79
|
-
};
|
|
80
|
-
WithDataAndBadgeMedium.decorators = [useAppThemeDecorator];
|
|
81
|
-
const WithDataAndBadgeLarge = Template.bind({});
|
|
82
|
-
WithDataAndBadgeLarge.args = {
|
|
83
|
-
badge: true,
|
|
84
|
-
size: "large",
|
|
85
|
-
tip: "This is the block hash",
|
|
86
|
-
title: "Block Hash",
|
|
87
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
88
|
-
};
|
|
89
|
-
WithDataAndBadgeLarge.decorators = [useAppThemeDecorator];
|
|
90
|
-
const WithTip = Template.bind({});
|
|
91
|
-
WithTip.args = {
|
|
92
|
-
tip: "This is the block hash",
|
|
93
|
-
title: "Block Hash",
|
|
94
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
95
|
-
};
|
|
96
|
-
WithTip.decorators = [useAppThemeDecorator];
|
|
97
|
-
const WithTipAndBadge = Template.bind({});
|
|
98
|
-
WithTipAndBadge.args = {
|
|
99
|
-
badge: true,
|
|
100
|
-
tip: "This is the block hash",
|
|
101
|
-
title: "Block Hash",
|
|
102
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
103
|
-
};
|
|
104
|
-
WithTipAndBadge.decorators = [useAppThemeDecorator];
|
|
105
|
-
const WithActions = Template.bind({});
|
|
106
|
-
WithActions.args = {
|
|
107
|
-
actions: [{ name: "ActionOne" }, { name: "ActionTwo" }],
|
|
108
|
-
tip: "This is the block hash",
|
|
109
|
-
title: "Block Hash",
|
|
110
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
111
|
-
};
|
|
112
|
-
WithActions.decorators = [useAppThemeDecorator];
|
|
113
|
-
const LargeWithValue = Template.bind({});
|
|
114
|
-
LargeWithValue.args = {
|
|
115
|
-
badge: true,
|
|
116
|
-
size: "large",
|
|
117
|
-
tip: "This is the block hash",
|
|
118
|
-
title: "Block Hash",
|
|
119
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
120
|
-
};
|
|
121
|
-
LargeWithValue.decorators = [useAppThemeDecorator];
|
|
122
|
-
const LargeWithValueAndActions = Template.bind({});
|
|
123
|
-
LargeWithValueAndActions.args = {
|
|
124
|
-
actions: [{ icon: /* @__PURE__ */ jsx(ReplayIcon, {}), name: "ActionOne" }, { name: "ActionTwo" }],
|
|
125
|
-
badge: true,
|
|
126
|
-
size: "large",
|
|
127
|
-
tip: "This is the block hash",
|
|
128
|
-
title: "Block Hash",
|
|
129
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
130
|
-
};
|
|
131
|
-
LargeWithValueAndActions.decorators = [useAppThemeDecorator];
|
|
132
|
-
const SmallWithValueAndActions = Template.bind({});
|
|
133
|
-
SmallWithValueAndActions.args = {
|
|
134
|
-
actions: [{ icon: /* @__PURE__ */ jsx(ReplayIcon, {}), name: "ActionOne" }, { name: "ActionTwo" }],
|
|
135
|
-
badge: true,
|
|
136
|
-
size: "small",
|
|
137
|
-
tip: "This is the block hash",
|
|
138
|
-
title: "Block Hash",
|
|
139
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
140
|
-
};
|
|
141
|
-
SmallWithValueAndActions.decorators = [useAppThemeDecorator];
|
|
142
|
-
var PropertyBox_stories_default = StorybookEntry;
|
|
143
|
-
export {
|
|
144
|
-
Default,
|
|
145
|
-
LargeWithValue,
|
|
146
|
-
LargeWithValueAndActions,
|
|
147
|
-
SmallWithValueAndActions,
|
|
148
|
-
WithActions,
|
|
149
|
-
WithData,
|
|
150
|
-
WithDataAndBadgeLarge,
|
|
151
|
-
WithDataAndBadgeMedium,
|
|
152
|
-
WithDataAndBadgeSmall,
|
|
153
|
-
WithDataCompare,
|
|
154
|
-
WithDataSmall,
|
|
155
|
-
WithTip,
|
|
156
|
-
WithTipAndBadge,
|
|
157
|
-
WithUndefinedData,
|
|
158
|
-
PropertyBox_stories_default as default
|
|
159
|
-
};
|
|
160
|
-
//# sourceMappingURL=PropertyBox.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PropertyBox.stories.tsx"],"sourcesContent":["import { Replay as ReplayIcon } from '@mui/icons-material'\nimport { TextField } from '@mui/material'\nimport { Meta, StoryFn } from '@storybook/react'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { PayloadWrapper } from '@xyo-network/payload-wrapper'\nimport { sampleBlockWithPayloads, useAppThemeDecorator } from '@xyo-network/react-storybook'\n\nimport { Property } from './Property'\nimport { PropertyProps } from './Props'\n\nconst StorybookEntry = {\n argTypes: {},\n component: Property,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'property/PropertyBox',\n} as Meta<typeof Property>\n\nconst Template: StoryFn<typeof Property> = (args: PropertyProps) => <Property {...args} paper={false}></Property>\n\nconst TemplateWithCompare: StoryFn<typeof Property> = (args: PropertyProps) => (\n <FlexCol gap={1} alignItems=\"stretch\">\n <FlexRow gap={1}>\n <TextField size=\"small\" value=\"Sample text Field\" />\n <Property {...args} size=\"small\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <Property {...args} size=\"small\"></Property>\n <Property {...args} size=\"small\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <TextField size=\"medium\" value=\"Sample text Field\" />\n <Property {...args} size=\"medium\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <Property {...args} size=\"medium\"></Property>\n <Property {...args} size=\"medium\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <TextField value=\"Sample text Field\" />\n <Property {...args} size=\"large\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <Property {...args} size=\"large\"></Property>\n <Property {...args} size=\"large\"></Property>\n </FlexRow>\n </FlexCol>\n)\n\nconst Default = Template.bind({})\nDefault.args = {}\nDefault.decorators = [useAppThemeDecorator]\n\nconst WithTitle = Template.bind({})\nWithTitle.args = { title: 'No Data' }\nWithTitle.decorators = [useAppThemeDecorator]\n\nconst WithUndefinedData = Template.bind({})\nWithUndefinedData.args = { title: 'Block Hash' }\nWithUndefinedData.decorators = [useAppThemeDecorator]\n\nconst WithData = Template.bind({})\nWithData.args = { title: 'Block Hash', value: PayloadWrapper.hashSync(sampleBlockWithPayloads) }\nWithData.decorators = [useAppThemeDecorator]\n\nconst WithDataSmall = Template.bind({})\nWithDataSmall.args = { size: 'small', title: 'Block Hash', value: PayloadWrapper.hashSync(sampleBlockWithPayloads) }\nWithDataSmall.decorators = [useAppThemeDecorator]\n\nconst WithDataCompare = TemplateWithCompare.bind({})\nWithDataCompare.args = { tip: 'This is the block hash', title: 'Block Hash', value: PayloadWrapper.hashSync(sampleBlockWithPayloads) }\nWithDataCompare.decorators = [useAppThemeDecorator]\n\nconst WithDataAndBadgeSmall = Template.bind({})\nWithDataAndBadgeSmall.args = {\n badge: true,\n size: 'small',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithDataAndBadgeSmall.decorators = [useAppThemeDecorator]\n\nconst WithDataAndBadgeMedium = Template.bind({})\nWithDataAndBadgeMedium.args = {\n badge: true,\n size: 'medium',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithDataAndBadgeMedium.decorators = [useAppThemeDecorator]\n\nconst WithDataAndBadgeLarge = Template.bind({})\nWithDataAndBadgeLarge.args = {\n badge: true,\n size: 'large',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithDataAndBadgeLarge.decorators = [useAppThemeDecorator]\n\nconst WithTip = Template.bind({})\nWithTip.args = {\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithTip.decorators = [useAppThemeDecorator]\n\nconst WithTipAndBadge = Template.bind({})\nWithTipAndBadge.args = {\n badge: true,\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithTipAndBadge.decorators = [useAppThemeDecorator]\n\nconst WithActions = Template.bind({})\nWithActions.args = {\n actions: [{ name: 'ActionOne' }, { name: 'ActionTwo' }],\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithActions.decorators = [useAppThemeDecorator]\n\nconst LargeWithValue = Template.bind({})\nLargeWithValue.args = {\n badge: true,\n size: 'large',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nLargeWithValue.decorators = [useAppThemeDecorator]\n\nconst LargeWithValueAndActions = Template.bind({})\nLargeWithValueAndActions.args = {\n actions: [{ icon: <ReplayIcon />, name: 'ActionOne' }, { name: 'ActionTwo' }],\n badge: true,\n size: 'large',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nLargeWithValueAndActions.decorators = [useAppThemeDecorator]\n\nconst SmallWithValueAndActions = Template.bind({})\nSmallWithValueAndActions.args = {\n actions: [{ icon: <ReplayIcon />, name: 'ActionOne' }, { name: 'ActionTwo' }],\n badge: true,\n size: 'small',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nSmallWithValueAndActions.decorators = [useAppThemeDecorator]\n\nexport {\n Default,\n LargeWithValue,\n LargeWithValueAndActions,\n SmallWithValueAndActions,\n WithActions,\n WithData,\n WithDataAndBadgeLarge,\n WithDataAndBadgeMedium,\n WithDataAndBadgeSmall,\n WithDataCompare,\n WithDataSmall,\n WithTip,\n WithTipAndBadge,\n WithUndefinedData,\n}\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAqBoE,cAIhE,YAJgE;AArBpE,SAAS,UAAU,kBAAkB;AACrC,SAAS,iBAAiB;AAE1B,SAAS,SAAS,eAAe;AACjC,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB,4BAA4B;AAE9D,SAAS,gBAAgB;AAGzB,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAAqC,CAAC,SAAwB,oBAAC,YAAU,GAAG,MAAM,OAAO,OAAO;AAEtG,MAAM,sBAAgD,CAAC,SACrD,qBAAC,WAAQ,KAAK,GAAG,YAAW,WAC1B;AAAA,uBAAC,WAAQ,KAAK,GACZ;AAAA,wBAAC,aAAU,MAAK,SAAQ,OAAM,qBAAoB;AAAA,IAClD,oBAAC,YAAU,GAAG,MAAM,MAAK,SAAQ;AAAA,KACnC;AAAA,EACA,qBAAC,WAAQ,KAAK,GACZ;AAAA,wBAAC,YAAU,GAAG,MAAM,MAAK,SAAQ;AAAA,IACjC,oBAAC,YAAU,GAAG,MAAM,MAAK,SAA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AAAA,EACjB,SAAS,CAAC,EAAE,MAAM,YAAY,GAAG,EAAE,MAAM,YAAY,CAAC;AAAA,EACtD,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO,eAAe,SAAS,uBAAuB;AACxD;AACA,YAAY,aAAa,CAAC,oBAAoB;AAE9C,MAAM,iBAAiB,SAAS,KAAK,CAAC,CAAC;AACvC,eAAe,OAAO;AAAA,EACpB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO,eAAe,SAAS,uBAAuB;AACxD;AACA,eAAe,aAAa,CAAC,oBAAoB;AAEjD,MAAM,2BAA2B,SAAS,KAAK,CAAC,CAAC;AACjD,yBAAyB,OAAO;AAAA,EAC9B,SAAS,CAAC,EAAE,MAAM,oBAAC,cAAW,GAAI,MAAM,YAAY,GAAG,EAAE,MAAM,YAAY,CAAC;AAAA,EAC5E,OAAO;AAAA,EACP,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO,eAAe,SAAS,uBAAuB;AACxD;AACA,yBAAyB,aAAa,CAAC,oBAAoB;AAE3D,MAAM,2BAA2B,SAAS,KAAK,CAAC,CAAC;AACjD,yBAAyB,OAAO;AAAA,EAC9B,SAAS,CAAC,EAAE,MAAM,oBAAC,cAAW,GAAI,MAAM,YAAY,GAAG,EAAE,MAAM,YAAY,CAAC;AAAA,EAC5E,OAAO;AAAA,EACP,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,OAAO,eAAe,SAAS,uBAAuB;AACxD;AACA,yBAAyB,aAAa,CAAC,oBAAoB;AAoB3D,IAAO,8BAAQ;","names":[]}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Replay as ReplayIcon } from "@mui/icons-material";
|
|
3
|
-
import { TextField } from "@mui/material";
|
|
4
|
-
import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
|
|
5
|
-
import { PayloadWrapper } from "@xyo-network/payload-wrapper";
|
|
6
|
-
import { sampleBlockWithPayloads, useAppThemeDecorator } from "@xyo-network/react-storybook";
|
|
7
|
-
import { Property } from "./Property";
|
|
8
|
-
const StorybookEntry = {
|
|
9
|
-
argTypes: {},
|
|
10
|
-
component: Property,
|
|
11
|
-
parameters: {
|
|
12
|
-
docs: {
|
|
13
|
-
page: null
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
title: "property/PropertyPaper"
|
|
17
|
-
};
|
|
18
|
-
const Template = (args) => /* @__PURE__ */ jsx(Property, { ...args, paper: true });
|
|
19
|
-
const TemplateWithCompare = (args) => /* @__PURE__ */ jsxs(FlexCol, { gap: 1, alignItems: "stretch", children: [
|
|
20
|
-
/* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
|
|
21
|
-
/* @__PURE__ */ jsx(TextField, { size: "small", value: "Sample text Field" }),
|
|
22
|
-
/* @__PURE__ */ jsx(Property, { ...args, paper: true, size: "small" })
|
|
23
|
-
] }),
|
|
24
|
-
/* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
|
|
25
|
-
/* @__PURE__ */ jsx(Property, { ...args, paper: true, size: "small" }),
|
|
26
|
-
/* @__PURE__ */ jsx(Property, { ...args, paper: true, size: "small" })
|
|
27
|
-
] }),
|
|
28
|
-
/* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
|
|
29
|
-
/* @__PURE__ */ jsx(TextField, { size: "medium", value: "Sample text Field" }),
|
|
30
|
-
/* @__PURE__ */ jsx(Property, { ...args, paper: true, size: "medium" })
|
|
31
|
-
] }),
|
|
32
|
-
/* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
|
|
33
|
-
/* @__PURE__ */ jsx(Property, { ...args, paper: true, size: "medium" }),
|
|
34
|
-
/* @__PURE__ */ jsx(Property, { ...args, paper: true, size: "medium" })
|
|
35
|
-
] }),
|
|
36
|
-
/* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
|
|
37
|
-
/* @__PURE__ */ jsx(TextField, { value: "Sample text Field" }),
|
|
38
|
-
/* @__PURE__ */ jsx(Property, { ...args, paper: true, size: "large" })
|
|
39
|
-
] }),
|
|
40
|
-
/* @__PURE__ */ jsxs(FlexRow, { gap: 1, children: [
|
|
41
|
-
/* @__PURE__ */ jsx(Property, { ...args, paper: true, size: "large" }),
|
|
42
|
-
/* @__PURE__ */ jsx(Property, { ...args, paper: true, size: "large" })
|
|
43
|
-
] })
|
|
44
|
-
] });
|
|
45
|
-
const Default = Template.bind({});
|
|
46
|
-
Default.args = {};
|
|
47
|
-
Default.decorators = [useAppThemeDecorator];
|
|
48
|
-
const WithTitle = Template.bind({});
|
|
49
|
-
WithTitle.args = { title: "No Data" };
|
|
50
|
-
WithTitle.decorators = [useAppThemeDecorator];
|
|
51
|
-
const WithUndefinedData = Template.bind({});
|
|
52
|
-
WithUndefinedData.args = { title: "Block Hash" };
|
|
53
|
-
WithUndefinedData.decorators = [useAppThemeDecorator];
|
|
54
|
-
const WithData = Template.bind({});
|
|
55
|
-
WithData.args = { title: "Block Hash", value: PayloadWrapper.hashSync(sampleBlockWithPayloads) };
|
|
56
|
-
WithData.decorators = [useAppThemeDecorator];
|
|
57
|
-
const WithDataSmall = Template.bind({});
|
|
58
|
-
WithDataSmall.args = { size: "small", title: "Block Hash", value: PayloadWrapper.hashSync(sampleBlockWithPayloads) };
|
|
59
|
-
WithDataSmall.decorators = [useAppThemeDecorator];
|
|
60
|
-
const WithDataCompare = TemplateWithCompare.bind({});
|
|
61
|
-
WithDataCompare.args = { tip: "This is the block hash", title: "Block Hash", value: PayloadWrapper.hashSync(sampleBlockWithPayloads) };
|
|
62
|
-
WithDataCompare.decorators = [useAppThemeDecorator];
|
|
63
|
-
const WithDataCompareOutlined = TemplateWithCompare.bind({});
|
|
64
|
-
WithDataCompareOutlined.args = {
|
|
65
|
-
tip: "This is the block hash",
|
|
66
|
-
title: "Block Hash",
|
|
67
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads),
|
|
68
|
-
variant: "outlined"
|
|
69
|
-
};
|
|
70
|
-
WithDataCompareOutlined.decorators = [useAppThemeDecorator];
|
|
71
|
-
const WithDataCompareElevation = TemplateWithCompare.bind({});
|
|
72
|
-
WithDataCompareElevation.args = {
|
|
73
|
-
tip: "This is the block hash",
|
|
74
|
-
title: "Block Hash",
|
|
75
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads),
|
|
76
|
-
variant: "elevation"
|
|
77
|
-
};
|
|
78
|
-
WithDataCompareElevation.decorators = [useAppThemeDecorator];
|
|
79
|
-
const WithDataAndBadgeSmall = Template.bind({});
|
|
80
|
-
WithDataAndBadgeSmall.args = {
|
|
81
|
-
badge: true,
|
|
82
|
-
size: "small",
|
|
83
|
-
tip: "This is the block hash",
|
|
84
|
-
title: "Block Hash",
|
|
85
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
86
|
-
};
|
|
87
|
-
WithDataAndBadgeSmall.decorators = [useAppThemeDecorator];
|
|
88
|
-
const WithDataAndBadgeMedium = Template.bind({});
|
|
89
|
-
WithDataAndBadgeMedium.args = {
|
|
90
|
-
badge: true,
|
|
91
|
-
size: "medium",
|
|
92
|
-
tip: "This is the block hash",
|
|
93
|
-
title: "Block Hash",
|
|
94
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
95
|
-
};
|
|
96
|
-
WithDataAndBadgeMedium.decorators = [useAppThemeDecorator];
|
|
97
|
-
const WithDataAndBadgeLarge = Template.bind({});
|
|
98
|
-
WithDataAndBadgeLarge.args = {
|
|
99
|
-
badge: true,
|
|
100
|
-
size: "large",
|
|
101
|
-
tip: "This is the block hash",
|
|
102
|
-
title: "Block Hash",
|
|
103
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
104
|
-
};
|
|
105
|
-
WithDataAndBadgeLarge.decorators = [useAppThemeDecorator];
|
|
106
|
-
const WithTip = Template.bind({});
|
|
107
|
-
WithTip.args = {
|
|
108
|
-
tip: "This is the block hash",
|
|
109
|
-
title: "Block Hash",
|
|
110
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
111
|
-
};
|
|
112
|
-
WithTip.decorators = [useAppThemeDecorator];
|
|
113
|
-
const WithTipAndBadge = Template.bind({});
|
|
114
|
-
WithTipAndBadge.args = {
|
|
115
|
-
badge: true,
|
|
116
|
-
tip: "This is the block hash",
|
|
117
|
-
title: "Block Hash",
|
|
118
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
119
|
-
};
|
|
120
|
-
WithTipAndBadge.decorators = [useAppThemeDecorator];
|
|
121
|
-
const WithActions = Template.bind({});
|
|
122
|
-
WithActions.args = {
|
|
123
|
-
actions: [{ name: "ActionOne" }, { name: "ActionTwo" }],
|
|
124
|
-
tip: "This is the block hash",
|
|
125
|
-
title: "Block Hash",
|
|
126
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
127
|
-
};
|
|
128
|
-
WithActions.decorators = [useAppThemeDecorator];
|
|
129
|
-
const LargeWithValue = Template.bind({});
|
|
130
|
-
LargeWithValue.args = {
|
|
131
|
-
badge: true,
|
|
132
|
-
size: "large",
|
|
133
|
-
tip: "This is the block hash",
|
|
134
|
-
title: "Block Hash",
|
|
135
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
136
|
-
};
|
|
137
|
-
LargeWithValue.decorators = [useAppThemeDecorator];
|
|
138
|
-
const LargeWithValueAndActions = Template.bind({});
|
|
139
|
-
LargeWithValueAndActions.args = {
|
|
140
|
-
actions: [{ icon: /* @__PURE__ */ jsx(ReplayIcon, {}), name: "ActionOne" }, { name: "ActionTwo" }],
|
|
141
|
-
badge: true,
|
|
142
|
-
size: "large",
|
|
143
|
-
tip: "This is the block hash",
|
|
144
|
-
title: "Block Hash",
|
|
145
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
146
|
-
};
|
|
147
|
-
LargeWithValueAndActions.decorators = [useAppThemeDecorator];
|
|
148
|
-
const SmallWithValueAndActions = Template.bind({});
|
|
149
|
-
SmallWithValueAndActions.args = {
|
|
150
|
-
actions: [{ icon: /* @__PURE__ */ jsx(ReplayIcon, {}), name: "ActionOne" }, { name: "ActionTwo" }],
|
|
151
|
-
badge: true,
|
|
152
|
-
size: "small",
|
|
153
|
-
tip: "This is the block hash",
|
|
154
|
-
title: "Block Hash",
|
|
155
|
-
value: PayloadWrapper.hashSync(sampleBlockWithPayloads)
|
|
156
|
-
};
|
|
157
|
-
SmallWithValueAndActions.decorators = [useAppThemeDecorator];
|
|
158
|
-
var PropertyPaper_stories_default = StorybookEntry;
|
|
159
|
-
export {
|
|
160
|
-
Default,
|
|
161
|
-
LargeWithValue,
|
|
162
|
-
LargeWithValueAndActions,
|
|
163
|
-
SmallWithValueAndActions,
|
|
164
|
-
WithActions,
|
|
165
|
-
WithData,
|
|
166
|
-
WithDataAndBadgeLarge,
|
|
167
|
-
WithDataAndBadgeMedium,
|
|
168
|
-
WithDataAndBadgeSmall,
|
|
169
|
-
WithDataCompare,
|
|
170
|
-
WithDataCompareElevation,
|
|
171
|
-
WithDataCompareOutlined,
|
|
172
|
-
WithDataSmall,
|
|
173
|
-
WithTip,
|
|
174
|
-
WithTipAndBadge,
|
|
175
|
-
WithUndefinedData,
|
|
176
|
-
PropertyPaper_stories_default as default
|
|
177
|
-
};
|
|
178
|
-
//# sourceMappingURL=PropertyPaper.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PropertyPaper.stories.tsx"],"sourcesContent":["import { Replay as ReplayIcon } from '@mui/icons-material'\nimport { TextField } from '@mui/material'\nimport { Meta, StoryFn } from '@storybook/react'\nimport { FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport { PayloadWrapper } from '@xyo-network/payload-wrapper'\nimport { sampleBlockWithPayloads, useAppThemeDecorator } from '@xyo-network/react-storybook'\n\nimport { Property } from './Property'\nimport { PropertyPaperProps, PropertyProps } from './Props'\n\nconst StorybookEntry = {\n argTypes: {},\n component: Property,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'property/PropertyPaper',\n} as Meta<typeof Property>\n\nconst Template: StoryFn<typeof Property> = (args: PropertyProps) => <Property {...(args as PropertyPaperProps)} paper={true}></Property>\n\nconst TemplateWithCompare: StoryFn<typeof Property> = (args: PropertyProps) => (\n <FlexCol gap={1} alignItems=\"stretch\">\n <FlexRow gap={1}>\n <TextField size=\"small\" value=\"Sample text Field\" />\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"small\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"small\"></Property>\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"small\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <TextField size=\"medium\" value=\"Sample text Field\" />\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"medium\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"medium\"></Property>\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"medium\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <TextField value=\"Sample text Field\" />\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"large\"></Property>\n </FlexRow>\n <FlexRow gap={1}>\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"large\"></Property>\n <Property {...(args as PropertyPaperProps)} paper={true} size=\"large\"></Property>\n </FlexRow>\n </FlexCol>\n)\n\nconst Default = Template.bind({})\nDefault.args = {}\nDefault.decorators = [useAppThemeDecorator]\n\nconst WithTitle = Template.bind({})\nWithTitle.args = { title: 'No Data' }\nWithTitle.decorators = [useAppThemeDecorator]\n\nconst WithUndefinedData = Template.bind({})\nWithUndefinedData.args = { title: 'Block Hash' }\nWithUndefinedData.decorators = [useAppThemeDecorator]\n\nconst WithData = Template.bind({})\nWithData.args = { title: 'Block Hash', value: PayloadWrapper.hashSync(sampleBlockWithPayloads) }\nWithData.decorators = [useAppThemeDecorator]\n\nconst WithDataSmall = Template.bind({})\nWithDataSmall.args = { size: 'small', title: 'Block Hash', value: PayloadWrapper.hashSync(sampleBlockWithPayloads) }\nWithDataSmall.decorators = [useAppThemeDecorator]\n\nconst WithDataCompare = TemplateWithCompare.bind({})\nWithDataCompare.args = { tip: 'This is the block hash', title: 'Block Hash', value: PayloadWrapper.hashSync(sampleBlockWithPayloads) }\nWithDataCompare.decorators = [useAppThemeDecorator]\n\nconst WithDataCompareOutlined = TemplateWithCompare.bind({})\nWithDataCompareOutlined.args = {\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n variant: 'outlined',\n}\nWithDataCompareOutlined.decorators = [useAppThemeDecorator]\n\nconst WithDataCompareElevation = TemplateWithCompare.bind({})\nWithDataCompareElevation.args = {\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n variant: 'elevation',\n}\nWithDataCompareElevation.decorators = [useAppThemeDecorator]\n\nconst WithDataAndBadgeSmall = Template.bind({})\nWithDataAndBadgeSmall.args = {\n badge: true,\n size: 'small',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithDataAndBadgeSmall.decorators = [useAppThemeDecorator]\n\nconst WithDataAndBadgeMedium = Template.bind({})\nWithDataAndBadgeMedium.args = {\n badge: true,\n size: 'medium',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithDataAndBadgeMedium.decorators = [useAppThemeDecorator]\n\nconst WithDataAndBadgeLarge = Template.bind({})\nWithDataAndBadgeLarge.args = {\n badge: true,\n size: 'large',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithDataAndBadgeLarge.decorators = [useAppThemeDecorator]\n\nconst WithTip = Template.bind({})\nWithTip.args = {\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithTip.decorators = [useAppThemeDecorator]\n\nconst WithTipAndBadge = Template.bind({})\nWithTipAndBadge.args = {\n badge: true,\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithTipAndBadge.decorators = [useAppThemeDecorator]\n\nconst WithActions = Template.bind({})\nWithActions.args = {\n actions: [{ name: 'ActionOne' }, { name: 'ActionTwo' }],\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nWithActions.decorators = [useAppThemeDecorator]\n\nconst LargeWithValue = Template.bind({})\nLargeWithValue.args = {\n badge: true,\n size: 'large',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nLargeWithValue.decorators = [useAppThemeDecorator]\n\nconst LargeWithValueAndActions = Template.bind({})\nLargeWithValueAndActions.args = {\n actions: [{ icon: <ReplayIcon />, name: 'ActionOne' }, { name: 'ActionTwo' }],\n badge: true,\n size: 'large',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nLargeWithValueAndActions.decorators = [useAppThemeDecorator]\n\nconst SmallWithValueAndActions = Template.bind({})\nSmallWithValueAndActions.args = {\n actions: [{ icon: <ReplayIcon />, name: 'ActionOne' }, { name: 'ActionTwo' }],\n badge: true,\n size: 'small',\n tip: 'This is the block hash',\n title: 'Block Hash',\n value: PayloadWrapper.hashSync(sampleBlockWithPayloads),\n}\nSmallWithValueAndActions.decorators = [useAppThemeDecorator]\n\nexport {\n Default,\n LargeWithValue,\n LargeWithValueAndActions,\n SmallWithValueAndActions,\n WithActions,\n WithData,\n WithDataAndBadgeLarge,\n WithDataAndBadgeMedium,\n WithDataAndBadgeSmall,\n WithDataCompare,\n WithDataCompareElevation,\n WithDataCompareOutlined,\n WithDataSmall,\n WithTip,\n WithTipAndBadge,\n WithUndefinedData,\n}\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAqBoE,cAIhE,YAJgE;AArBpE,SAAS,UAAU,kBAAkB;AACrC,SAAS,iBAAiB;AAE1B,SAAS,SAAS,eAAe;AACjC,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB,4BAA4B;AAE9D,SAAS,gBAAgB;AAGzB,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAAqC,CAAC,SAAwB,oBAAC,YAAU,GAAI,MAA6B,OAAO,MAAM;AAE7H,MAAM,sBAAgD,CAAC,SACrD,qBAAC,WAAQ,KAAK,GAAG,YAAW,WAC1B;AAAA,uBAAC,WAAQ,KAAK,GACZ;AAAA,wBAAC,aAAU,MAAK,SAAQ,OAAM,qBAAoB;AAAA,IAClD,oBAAC,YAAU,GAAI,MAA6B,OAAO,MAAM,MAAK,SAAQ;AAAA,KACxE;AAAA,EACA,qBAAC,WAAQ,KAAK,GACZ;AAAA,wBAAC,YAAU,GAAI,MAA6B,OAAO,MAAM,MAAK,SAAQ;AAAA,IACtE,oBAAC,YAAU,GAAI,MAA6B,OAAO,MAAM,MAAK,SAAQ;AAAA,KACxE;AAAA,EACA,qBAAC,WAAQ,KAAK,GACZ;AAAA,wBAAC,aAAU,MAAK,UAAS,OAAM,qBAAoB;AAAA,IACnD,oBAAC,YAAU,GAAI,MAA6B,OAAO,MAAM,MAAK,UAAS;AAAA,KACzE;AAAA,EACA,qBAAC,WAAQ,KAAK,GACZ;AAAA,wBAAC,YAAU,GAAI,MAA6B,OAAO,MAAM,MAAK,UAAS;AAAA,IACvE,oBAAC,YAAU,GAAI,M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1,27 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PropertyTitle } from "./Title";
|
|
3
|
-
const StorybookEntry = {
|
|
4
|
-
argTypes: {},
|
|
5
|
-
component: PropertyTitle,
|
|
6
|
-
parameters: {
|
|
7
|
-
docs: {
|
|
8
|
-
page: null
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
title: "property/Title"
|
|
12
|
-
};
|
|
13
|
-
const Template = (args) => /* @__PURE__ */ jsx(PropertyTitle, { ...args });
|
|
14
|
-
const Default = Template.bind({});
|
|
15
|
-
Default.args = {};
|
|
16
|
-
const WithData = Template.bind({});
|
|
17
|
-
WithData.args = { title: "Sample Title" };
|
|
18
|
-
const WithDataAndActions = Template.bind({});
|
|
19
|
-
WithDataAndActions.args = { title: "Sample Title" };
|
|
20
|
-
var Title_stories_default = StorybookEntry;
|
|
21
|
-
export {
|
|
22
|
-
Default,
|
|
23
|
-
WithData,
|
|
24
|
-
WithDataAndActions,
|
|
25
|
-
Title_stories_default as default
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=Title.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Title.stories.tsx"],"sourcesContent":["import { Meta, StoryFn } from '@storybook/react'\n\nimport { PropertyTitle } from './Title'\n\nconst StorybookEntry = {\n argTypes: {},\n component: PropertyTitle,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'property/Title',\n} as Meta<typeof PropertyTitle>\n\nconst Template: StoryFn<typeof PropertyTitle> = (args) => <PropertyTitle {...args}></PropertyTitle>\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nconst WithData = Template.bind({})\n\nWithData.args = { title: 'Sample Title' }\n\nconst WithDataAndActions = Template.bind({})\n\nWithDataAndActions.args = { title: 'Sample Title' }\n\nexport { Default, WithData, WithDataAndActions }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAe0D;AAb1D,SAAS,qBAAqB;AAE9B,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAA0C,CAAC,SAAS,oBAAC,iBAAe,GAAG,MAAM;AAEnF,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAEhB,MAAM,WAAW,SAAS,KAAK,CAAC,CAAC;AAEjC,SAAS,OAAO,EAAE,OAAO,eAAe;AAExC,MAAM,qBAAqB,SAAS,KAAK,CAAC,CAAC;AAE3C,mBAAmB,OAAO,EAAE,OAAO,eAAe;AAKlD,IAAO,wBAAQ;","names":[]}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { PayloadWrapper } from "@xyo-network/payload-wrapper";
|
|
3
|
-
import { sampleBlockWithPayloads } from "@xyo-network/react-storybook";
|
|
4
|
-
import { PropertyValue } from "./Value";
|
|
5
|
-
const StorybookEntry = {
|
|
6
|
-
argTypes: {},
|
|
7
|
-
component: PropertyValue,
|
|
8
|
-
parameters: {
|
|
9
|
-
docs: {
|
|
10
|
-
page: null
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
title: "property/Value"
|
|
14
|
-
};
|
|
15
|
-
const Template = (args) => /* @__PURE__ */ jsx(PropertyValue, { ...args });
|
|
16
|
-
const Default = Template.bind({});
|
|
17
|
-
Default.args = {};
|
|
18
|
-
const WithData = Template.bind({});
|
|
19
|
-
WithData.args = { value: PayloadWrapper.hashSync(sampleBlockWithPayloads) };
|
|
20
|
-
var Value_stories_default = StorybookEntry;
|
|
21
|
-
export {
|
|
22
|
-
Default,
|
|
23
|
-
WithData,
|
|
24
|
-
Value_stories_default as default
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=Value.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Value.stories.tsx"],"sourcesContent":["import { Meta, StoryFn } from '@storybook/react'\nimport { PayloadWrapper } from '@xyo-network/payload-wrapper'\nimport { sampleBlockWithPayloads } from '@xyo-network/react-storybook'\n\nimport { PropertyValue } from './Value'\n\nconst StorybookEntry = {\n argTypes: {},\n component: PropertyValue,\n parameters: {\n docs: {\n page: null,\n },\n },\n title: 'property/Value',\n} as Meta<typeof PropertyValue>\n\nconst Template: StoryFn<typeof PropertyValue> = (args) => <PropertyValue {...args}></PropertyValue>\n\nconst Default = Template.bind({})\nDefault.args = {}\n\nconst WithData = Template.bind({})\n\nWithData.args = { value: PayloadWrapper.hashSync(sampleBlockWithPayloads) }\n\nexport { Default, WithData }\n\n// eslint-disable-next-line import/no-default-export\nexport default StorybookEntry\n"],"mappings":"AAiB0D;AAhB1D,SAAS,sBAAsB;AAC/B,SAAS,+BAA+B;AAExC,SAAS,qBAAqB;AAE9B,MAAM,iBAAiB;AAAA,EACrB,UAAU,CAAC;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AAAA,IACV,MAAM;AAAA,MACJ,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EACA,OAAO;AACT;AAEA,MAAM,WAA0C,CAAC,SAAS,oBAAC,iBAAe,GAAG,MAAM;AAEnF,MAAM,UAAU,SAAS,KAAK,CAAC,CAAC;AAChC,QAAQ,OAAO,CAAC;AAEhB,MAAM,WAAW,SAAS,KAAK,CAAC,CAAC;AAEjC,SAAS,OAAO,EAAE,OAAO,eAAe,SAAS,uBAAuB,EAAE;AAK1E,IAAO,wBAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=Action.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { IconButton } from "@mui/material";
|
|
3
|
-
import { ButtonEx } from "@xylabs/react-button";
|
|
4
|
-
import { FlexRow } from "@xylabs/react-flexbox";
|
|
5
|
-
const PropertyActions = ({ buttons = false, actions, ...props }) => {
|
|
6
|
-
if (actions) {
|
|
7
|
-
return (actions?.length ?? 0) > 0 ? /* @__PURE__ */ jsx(FlexRow, { gap: 1, ...props, children: actions.map((action, index) => {
|
|
8
|
-
return action.icon ? /* @__PURE__ */ jsx(IconButton, { size: "small", color: "inherit", onClick: action.onClick, children: action.icon }, index) : buttons ? /* @__PURE__ */ jsx(ButtonEx, { paddingY: 0, color: "primary", size: "small", disabled: action.disabled, onClick: action.onClick, variant: "contained", children: action.name }, index) : null;
|
|
9
|
-
}) }) : null;
|
|
10
|
-
}
|
|
11
|
-
return null;
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
PropertyActions
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=Actions.mjs.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { MoreHoriz as MoreHorizIcon } from "@mui/icons-material";
|
|
3
|
-
import { IconButton, Menu, MenuItem } from "@mui/material";
|
|
4
|
-
import { FlexRow } from "@xylabs/react-flexbox";
|
|
5
|
-
import { useState } from "react";
|
|
6
|
-
const PropertyActionsMenu = ({ actions, ...props }) => {
|
|
7
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
|
8
|
-
const open = !!anchorEl;
|
|
9
|
-
const handleClick = (event) => {
|
|
10
|
-
setAnchorEl(event.currentTarget);
|
|
11
|
-
};
|
|
12
|
-
const handleClose = () => {
|
|
13
|
-
setAnchorEl(null);
|
|
14
|
-
};
|
|
15
|
-
return actions && actions?.length > 0 ? /* @__PURE__ */ jsxs(FlexRow, { ...props, children: [
|
|
16
|
-
/* @__PURE__ */ jsx(IconButton, { size: "small", color: "inherit", onClick: handleClick, children: /* @__PURE__ */ jsx(MoreHorizIcon, { fontSize: "inherit" }) }),
|
|
17
|
-
/* @__PURE__ */ jsx(Menu, { anchorEl, open, onClose: handleClose, children: actions?.map((action) => {
|
|
18
|
-
return /* @__PURE__ */ jsx(
|
|
19
|
-
MenuItem,
|
|
20
|
-
{
|
|
21
|
-
onClick: () => {
|
|
22
|
-
action?.onClick?.();
|
|
23
|
-
handleClose();
|
|
24
|
-
},
|
|
25
|
-
children: action.name
|
|
26
|
-
},
|
|
27
|
-
action.name
|
|
28
|
-
);
|
|
29
|
-
}) })
|
|
30
|
-
] }) : null;
|
|
31
|
-
};
|
|
32
|
-
export {
|
|
33
|
-
PropertyActionsMenu
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=ActionsMenu.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=ActionsProps.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Paper, useTheme } from "@mui/material";
|
|
3
|
-
import { FlexCol, FlexGrowRow, FlexRow } from "@xylabs/react-flexbox";
|
|
4
|
-
import { typeOf } from "@xyo-network/typeof";
|
|
5
|
-
import { PropertyTitle } from "./Title";
|
|
6
|
-
const PropertyGroupBox = ({ titleProps, children, title, tip, ...props }) => {
|
|
7
|
-
const theme = useTheme();
|
|
8
|
-
const childrenArray = typeOf(children) === "array" ? children : void 0;
|
|
9
|
-
return /* @__PURE__ */ jsx(FlexCol, { alignItems: "stretch", overflow: "hidden", ...props, children: /* @__PURE__ */ jsxs(FlexRow, { overflow: "hidden", justifyContent: "stretch", alignItems: "stretch", children: [
|
|
10
|
-
/* @__PURE__ */ jsx(PropertyTitle, { alignItems: "flex-start", size: "full", title, tip, ...titleProps }),
|
|
11
|
-
childrenArray ? /* @__PURE__ */ jsx(FlexGrowRow, { children: childrenArray?.map((child, index) => {
|
|
12
|
-
return child ? /* @__PURE__ */ jsx(FlexGrowRow, { borderLeft: 1, borderColor: theme.palette.divider, children: child }, index) : null;
|
|
13
|
-
}) }) : /* @__PURE__ */ jsx(FlexGrowRow, { overflow: "hidden", children })
|
|
14
|
-
] }) });
|
|
15
|
-
};
|
|
16
|
-
const PropertyGroupPaper = ({ style, variant, elevation, square, ...props }) => {
|
|
17
|
-
return /* @__PURE__ */ jsx(Paper, { style: { minWidth: 0, overflow: "hidden", ...style }, variant, elevation, square, children: /* @__PURE__ */ jsx(PropertyGroupBox, { ...props, paper: false }) });
|
|
18
|
-
};
|
|
19
|
-
const PropertyGroup = (props) => {
|
|
20
|
-
return props.paper ? /* @__PURE__ */ jsx(PropertyGroupPaper, { ...props }) : /* @__PURE__ */ jsx(PropertyGroupBox, { ...props });
|
|
21
|
-
};
|
|
22
|
-
export {
|
|
23
|
-
PropertyGroup
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=Group.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Group.tsx"],"sourcesContent":["import { Paper, useTheme } from '@mui/material'\nimport { FlexCol, FlexGrowRow, FlexRow } from '@xylabs/react-flexbox'\nimport { typeOf } from '@xyo-network/typeof'\nimport { ReactElement } from 'react'\n\nimport { PropertyGroupBoxProps, PropertyGroupPaperProps, PropertyGroupProps } from './Props'\nimport { PropertyTitle } from './Title'\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 <FlexGrowRow>\n {childrenArray?.map((child, index) => {\n return child ? (\n <FlexGrowRow key={index} borderLeft={1} borderColor={theme.palette.divider}>\n {child}\n </FlexGrowRow>\n ) : null\n })}\n </FlexGrowRow>\n ) : (\n <FlexGrowRow overflow=\"hidden\">{children}</FlexGrowRow>\n )}\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"],"mappings":"AAaM,SACE,KADF;AAbN,SAAS,OAAO,gBAAgB;AAChC,SAAS,SAAS,aAAa,eAAe;AAC9C,SAAS,cAAc;AAIvB,SAAS,qBAAqB;AAE9B,MAAM,mBAAoD,CAAC,EAAE,YAAY,UAAU,OAAO,KAAK,GAAG,MAAM,MAAM;AAC5G,QAAM,QAAQ,SAAS;AACvB,QAAM,gBAAgB,OAAO,QAAQ,MAAM,UAAW,WAA8B;AACpF,SACE,oBAAC,WAAQ,YAAW,WAAU,UAAS,UAAU,GAAG,OAClD,+BAAC,WAAQ,UAAS,UAAS,gBAAe,WAAU,YAAW,WAC7D;AAAA,wBAAC,iBAAc,YAAW,cAAa,MAAK,QAAO,OAAc,KAAW,GAAG,YAAY;AAAA,IAC1F,gBACC,oBAAC,eACE,yBAAe,IAAI,CAAC,OAAO,UAAU;AACpC,aAAO,QACL,oBAAC,eAAwB,YAAY,GAAG,aAAa,MAAM,QAAQ,SAChE,mBADe,KAElB,IACE;AAAA,IACN,CAAC,GACH,IAEA,oBAAC,eAAY,UAAS,UAAU,UAAS;AAAA,KAE7C,GACF;AAEJ;AAEA,MAAM,qBAAwD,CAAC,EAAE,OAAO,SAAS,WAAW,QAAQ,GAAG,MAAM,MAAM;AACjH,SACE,oBAAC,SAAM,OAAO,EAAE,UAAU,GAAG,UAAU,UAAU,GAAG,MAAM,GAAG,SAAkB,WAAsB,QACnG,8BAAC,oBAAkB,GAAG,OAAO,OAAO,OAAO,GAC7C;AAEJ;AAEO,MAAM,gBAA8C,CAAC,UAAU;AACpE,SAAO,MAAM,QAAQ,oBAAC,sBAAoB,GAAG,OAAO,IAAK,oBAAC,oBAAkB,GAAG,OAAO;AACxF;","names":[]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTheme } from "@mui/material";
|
|
3
|
-
import { FlexRow } from "@xylabs/react-flexbox";
|
|
4
|
-
import { Identicon } from "@xylabs/react-identicon";
|
|
5
|
-
import { useEffect, useRef, useState } from "react";
|
|
6
|
-
const IdenticonCorner = ({ value, ...props }) => {
|
|
7
|
-
const theme = useTheme();
|
|
8
|
-
const [parentHeight, setParentHeight] = useState();
|
|
9
|
-
const ref = useRef(null);
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
setParentHeight(ref.current?.parentElement?.parentElement?.clientHeight);
|
|
12
|
-
}, []);
|
|
13
|
-
const calculatedHeight = parentHeight ?? 0;
|
|
14
|
-
return /* @__PURE__ */ jsx(FlexRow, { alignItems: "flex-start", height: "100%", children: /* @__PURE__ */ jsx(FlexRow, { background: true, height: calculatedHeight, width: calculatedHeight, borderLeft: `1px solid ${theme.palette.divider}`, children: /* @__PURE__ */ jsx("div", { ref, children: /* @__PURE__ */ jsx(Identicon, { size: calculatedHeight * 0.6, value: `${value}`, sx: { padding: `${calculatedHeight * 0.2}px` }, ...props }) }) }) });
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
IdenticonCorner
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=IdenticonCorner.mjs.map
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CircularProgress, Paper } from "@mui/material";
|
|
3
|
-
import { FlexRow } from "@xylabs/react-flexbox";
|
|
4
|
-
import { forwardRef } from "react";
|
|
5
|
-
import { PropertyActionsMenu } from "./ActionsMenu";
|
|
6
|
-
import { IdenticonCorner } from "./IdenticonCorner";
|
|
7
|
-
import { PropertyTitle } from "./Title";
|
|
8
|
-
import { PropertyValue } from "./Value";
|
|
9
|
-
const PropertyBox = forwardRef(
|
|
10
|
-
({ titleProps, title, value, children, size = "medium", tip, actions, required, badge = false, ...props }, ref) => {
|
|
11
|
-
const sizeValueHeight = {
|
|
12
|
-
large: 48,
|
|
13
|
-
medium: 36,
|
|
14
|
-
small: 24
|
|
15
|
-
};
|
|
16
|
-
const sizeVariants = {
|
|
17
|
-
large: "h6",
|
|
18
|
-
medium: "body1",
|
|
19
|
-
small: "body2"
|
|
20
|
-
};
|
|
21
|
-
return /* @__PURE__ */ jsxs(FlexRow, { ref, flexDirection: "column", minWidth: 0, alignItems: "stretch", overflow: "hidden", ...props, children: [
|
|
22
|
-
title !== void 0 ? /* @__PURE__ */ jsx(
|
|
23
|
-
PropertyTitle,
|
|
24
|
-
{
|
|
25
|
-
tip,
|
|
26
|
-
title: required ? `${title}*` : title,
|
|
27
|
-
size,
|
|
28
|
-
more: /* @__PURE__ */ jsx(PropertyActionsMenu, { actions }),
|
|
29
|
-
...titleProps
|
|
30
|
-
}
|
|
31
|
-
) : null,
|
|
32
|
-
/* @__PURE__ */ jsxs(
|
|
33
|
-
FlexRow,
|
|
34
|
-
{
|
|
35
|
-
pl: 1,
|
|
36
|
-
columnGap: 1,
|
|
37
|
-
justifyContent: value === void 0 ? "center" : "space-between",
|
|
38
|
-
overflow: "hidden",
|
|
39
|
-
height: sizeValueHeight[size],
|
|
40
|
-
children: [
|
|
41
|
-
children ? children : value !== void 0 ? /* @__PURE__ */ jsx(PropertyValue, { value, typographyVariant: sizeVariants[size] }) : /* @__PURE__ */ jsx(CircularProgress, { size: 16 }),
|
|
42
|
-
value !== void 0 ? badge ? /* @__PURE__ */ jsx(IdenticonCorner, { value }) : null : null
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
] });
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
PropertyBox.displayName = "PropertyBox";
|
|
50
|
-
const PropertyPaper = forwardRef(({ style, variant, elevation = 2, square, ...props }, ref) => {
|
|
51
|
-
return /* @__PURE__ */ jsx(Paper, { ref, style: { minWidth: 0, overflow: "hidden", ...style }, variant, elevation, square, children: /* @__PURE__ */ jsx(PropertyBox, { ...props, paper: false }) });
|
|
52
|
-
});
|
|
53
|
-
PropertyPaper.displayName = "PropertyPaper";
|
|
54
|
-
const Property = forwardRef((props, ref) => {
|
|
55
|
-
return props.paper ? /* @__PURE__ */ jsx(PropertyPaper, { ref, ...props }) : /* @__PURE__ */ jsx(PropertyBox, { ref, ...props });
|
|
56
|
-
});
|
|
57
|
-
Property.displayName = "Property";
|
|
58
|
-
export {
|
|
59
|
-
Property
|
|
60
|
-
};
|
|
61
|
-
//# sourceMappingURL=Property.mjs.map
|