@xyo-network/react-property 2.64.8 → 2.64.10

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.
Files changed (90) hide show
  1. package/dist/docs.json +12159 -5655
  2. package/package.json +11 -11
  3. package/dist/browser/components/Action.cjs +0 -19
  4. package/dist/browser/components/Action.cjs.map +0 -1
  5. package/dist/browser/components/Action.js +0 -1
  6. package/dist/browser/components/Action.js.map +0 -1
  7. package/dist/browser/components/Actions.cjs +0 -38
  8. package/dist/browser/components/Actions.cjs.map +0 -1
  9. package/dist/browser/components/Actions.js +0 -17
  10. package/dist/browser/components/Actions.js.map +0 -1
  11. package/dist/browser/components/ActionsMenu.cjs +0 -57
  12. package/dist/browser/components/ActionsMenu.cjs.map +0 -1
  13. package/dist/browser/components/ActionsMenu.js +0 -36
  14. package/dist/browser/components/ActionsMenu.js.map +0 -1
  15. package/dist/browser/components/ActionsProps.cjs +0 -19
  16. package/dist/browser/components/ActionsProps.cjs.map +0 -1
  17. package/dist/browser/components/ActionsProps.js +0 -1
  18. package/dist/browser/components/ActionsProps.js.map +0 -1
  19. package/dist/browser/components/Group.cjs +0 -93
  20. package/dist/browser/components/Group.cjs.map +0 -1
  21. package/dist/browser/components/Group.js +0 -72
  22. package/dist/browser/components/Group.js.map +0 -1
  23. package/dist/browser/components/IdenticonCorner.cjs +0 -41
  24. package/dist/browser/components/IdenticonCorner.cjs.map +0 -1
  25. package/dist/browser/components/IdenticonCorner.js +0 -20
  26. package/dist/browser/components/IdenticonCorner.js.map +0 -1
  27. package/dist/browser/components/Property.cjs +0 -185
  28. package/dist/browser/components/Property.cjs.map +0 -1
  29. package/dist/browser/components/Property.js +0 -164
  30. package/dist/browser/components/Property.js.map +0 -1
  31. package/dist/browser/components/Props.cjs +0 -19
  32. package/dist/browser/components/Props.cjs.map +0 -1
  33. package/dist/browser/components/Props.js +0 -1
  34. package/dist/browser/components/Props.js.map +0 -1
  35. package/dist/browser/components/Title.cjs +0 -69
  36. package/dist/browser/components/Title.cjs.map +0 -1
  37. package/dist/browser/components/Title.js +0 -48
  38. package/dist/browser/components/Title.js.map +0 -1
  39. package/dist/browser/components/Value.cjs +0 -33
  40. package/dist/browser/components/Value.cjs.map +0 -1
  41. package/dist/browser/components/Value.js +0 -12
  42. package/dist/browser/components/Value.js.map +0 -1
  43. package/dist/browser/components/index.cjs +0 -214
  44. package/dist/browser/components/index.cjs.map +0 -1
  45. package/dist/browser/components/index.js +0 -191
  46. package/dist/browser/components/index.js.map +0 -1
  47. package/dist/node/components/Action.cjs +0 -19
  48. package/dist/node/components/Action.cjs.map +0 -1
  49. package/dist/node/components/Action.js +0 -1
  50. package/dist/node/components/Action.js.map +0 -1
  51. package/dist/node/components/Actions.cjs +0 -42
  52. package/dist/node/components/Actions.cjs.map +0 -1
  53. package/dist/node/components/Actions.js +0 -17
  54. package/dist/node/components/Actions.js.map +0 -1
  55. package/dist/node/components/ActionsMenu.cjs +0 -62
  56. package/dist/node/components/ActionsMenu.cjs.map +0 -1
  57. package/dist/node/components/ActionsMenu.js +0 -37
  58. package/dist/node/components/ActionsMenu.js.map +0 -1
  59. package/dist/node/components/ActionsProps.cjs +0 -19
  60. package/dist/node/components/ActionsProps.cjs.map +0 -1
  61. package/dist/node/components/ActionsProps.js +0 -1
  62. package/dist/node/components/ActionsProps.js.map +0 -1
  63. package/dist/node/components/Group.cjs +0 -97
  64. package/dist/node/components/Group.cjs.map +0 -1
  65. package/dist/node/components/Group.js +0 -72
  66. package/dist/node/components/Group.js.map +0 -1
  67. package/dist/node/components/IdenticonCorner.cjs +0 -46
  68. package/dist/node/components/IdenticonCorner.cjs.map +0 -1
  69. package/dist/node/components/IdenticonCorner.js +0 -21
  70. package/dist/node/components/IdenticonCorner.js.map +0 -1
  71. package/dist/node/components/Property.cjs +0 -191
  72. package/dist/node/components/Property.cjs.map +0 -1
  73. package/dist/node/components/Property.js +0 -166
  74. package/dist/node/components/Property.js.map +0 -1
  75. package/dist/node/components/Props.cjs +0 -19
  76. package/dist/node/components/Props.cjs.map +0 -1
  77. package/dist/node/components/Props.js +0 -1
  78. package/dist/node/components/Props.js.map +0 -1
  79. package/dist/node/components/Title.cjs +0 -73
  80. package/dist/node/components/Title.cjs.map +0 -1
  81. package/dist/node/components/Title.js +0 -48
  82. package/dist/node/components/Title.js.map +0 -1
  83. package/dist/node/components/Value.cjs +0 -37
  84. package/dist/node/components/Value.cjs.map +0 -1
  85. package/dist/node/components/Value.js +0 -12
  86. package/dist/node/components/Value.js.map +0 -1
  87. package/dist/node/components/index.cjs +0 -223
  88. package/dist/node/components/index.cjs.map +0 -1
  89. package/dist/node/components/index.js +0 -193
  90. package/dist/node/components/index.js.map +0 -1
@@ -1,62 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/components/ActionsMenu.tsx
21
- var ActionsMenu_exports = {};
22
- __export(ActionsMenu_exports, {
23
- PropertyActionsMenu: () => PropertyActionsMenu
24
- });
25
- module.exports = __toCommonJS(ActionsMenu_exports);
26
- var import_icons_material = require("@mui/icons-material");
27
- var import_material = require("@mui/material");
28
- var import_react_flexbox = require("@xylabs/react-flexbox");
29
- var import_react = require("react");
30
- var import_jsx_runtime = require("react/jsx-runtime");
31
- var PropertyActionsMenu = ({ actions, ...props }) => {
32
- const [anchorEl, setAnchorEl] = (0, import_react.useState)(null);
33
- const open = !!anchorEl;
34
- const handleClick = (event) => {
35
- setAnchorEl(event.currentTarget);
36
- };
37
- const handleClose = () => {
38
- setAnchorEl(null);
39
- };
40
- return actions && (actions == null ? void 0 : actions.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_flexbox.FlexRow, { ...props, children: [
41
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.IconButton, { size: "small", color: "inherit", onClick: handleClick, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons_material.MoreHoriz, { fontSize: "inherit" }) }),
42
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Menu, { anchorEl, open, onClose: handleClose, children: actions == null ? void 0 : actions.map((action) => {
43
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
- import_material.MenuItem,
45
- {
46
- onClick: () => {
47
- var _a;
48
- (_a = action == null ? void 0 : action.onClick) == null ? void 0 : _a.call(action);
49
- handleClose();
50
- },
51
- children: action.name
52
- },
53
- action.name
54
- );
55
- }) })
56
- ] }) : null;
57
- };
58
- // Annotate the CommonJS export names for ESM import in node:
59
- 0 && (module.exports = {
60
- PropertyActionsMenu
61
- });
62
- //# sourceMappingURL=ActionsMenu.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/ActionsMenu.tsx"],"sourcesContent":["import { MoreHoriz as MoreHorizIcon } from '@mui/icons-material'\nimport { IconButton, Menu, MenuItem } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { useState } from 'react'\n\nimport { PropertyActionsProps } from './ActionsProps'\n\nexport const PropertyActionsMenu: React.FC<PropertyActionsProps> = ({ actions, ...props }) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = !!anchorEl\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorEl(event.currentTarget)\n }\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n return actions && actions?.length > 0 ? (\n <FlexRow {...props}>\n <IconButton size=\"small\" color=\"inherit\" onClick={handleClick}>\n <MoreHorizIcon fontSize=\"inherit\" />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose}>\n {actions?.map((action) => {\n return (\n <MenuItem\n key={action.name}\n onClick={() => {\n action?.onClick?.()\n handleClose()\n }}\n >\n {action.name}\n </MenuItem>\n )\n })}\n </Menu>\n </FlexRow>\n ) : null\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA2C;AAC3C,sBAA2C;AAC3C,2BAAwB;AACxB,mBAAyB;AAgBrB;AAZG,IAAM,sBAAsD,CAAC,EAAE,SAAS,GAAG,MAAM,MAAM;AAC5F,QAAM,CAAC,UAAU,WAAW,QAAI,uBAA6B,IAAI;AACjE,QAAM,OAAO,CAAC,CAAC;AAEf,QAAM,cAAc,CAAC,UAAyC;AAC5D,gBAAY,MAAM,aAAa;AAAA,EACjC;AACA,QAAM,cAAc,MAAM;AACxB,gBAAY,IAAI;AAAA,EAClB;AAEA,SAAO,YAAW,mCAAS,UAAS,IAClC,6CAAC,gCAAS,GAAG,OACX;AAAA,gDAAC,8BAAW,MAAK,SAAQ,OAAM,WAAU,SAAS,aAChD,sDAAC,sBAAAA,WAAA,EAAc,UAAS,WAAU,GACpC;AAAA,IACA,4CAAC,wBAAK,UAAoB,MAAY,SAAS,aAC5C,6CAAS,IAAI,CAAC,WAAW;AACxB,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,SAAS,MAAM;AA5B7B;AA6BgB,mDAAQ,YAAR;AACA,wBAAY;AAAA,UACd;AAAA,UAEC,iBAAO;AAAA;AAAA,QANH,OAAO;AAAA,MAOd;AAAA,IAEJ,IACF;AAAA,KACF,IACE;AACN;","names":["MoreHorizIcon"]}
@@ -1,37 +0,0 @@
1
- // src/components/ActionsMenu.tsx
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
- import { jsx, jsxs } from "react/jsx-runtime";
7
- var PropertyActionsMenu = ({ actions, ...props }) => {
8
- const [anchorEl, setAnchorEl] = useState(null);
9
- const open = !!anchorEl;
10
- const handleClick = (event) => {
11
- setAnchorEl(event.currentTarget);
12
- };
13
- const handleClose = () => {
14
- setAnchorEl(null);
15
- };
16
- return actions && (actions == null ? void 0 : actions.length) > 0 ? /* @__PURE__ */ jsxs(FlexRow, { ...props, children: [
17
- /* @__PURE__ */ jsx(IconButton, { size: "small", color: "inherit", onClick: handleClick, children: /* @__PURE__ */ jsx(MoreHorizIcon, { fontSize: "inherit" }) }),
18
- /* @__PURE__ */ jsx(Menu, { anchorEl, open, onClose: handleClose, children: actions == null ? void 0 : actions.map((action) => {
19
- return /* @__PURE__ */ jsx(
20
- MenuItem,
21
- {
22
- onClick: () => {
23
- var _a;
24
- (_a = action == null ? void 0 : action.onClick) == null ? void 0 : _a.call(action);
25
- handleClose();
26
- },
27
- children: action.name
28
- },
29
- action.name
30
- );
31
- }) })
32
- ] }) : null;
33
- };
34
- export {
35
- PropertyActionsMenu
36
- };
37
- //# sourceMappingURL=ActionsMenu.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/ActionsMenu.tsx"],"sourcesContent":["import { MoreHoriz as MoreHorizIcon } from '@mui/icons-material'\nimport { IconButton, Menu, MenuItem } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport { useState } from 'react'\n\nimport { PropertyActionsProps } from './ActionsProps'\n\nexport const PropertyActionsMenu: React.FC<PropertyActionsProps> = ({ actions, ...props }) => {\n const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null)\n const open = !!anchorEl\n\n const handleClick = (event: React.MouseEvent<HTMLElement>) => {\n setAnchorEl(event.currentTarget)\n }\n const handleClose = () => {\n setAnchorEl(null)\n }\n\n return actions && actions?.length > 0 ? (\n <FlexRow {...props}>\n <IconButton size=\"small\" color=\"inherit\" onClick={handleClick}>\n <MoreHorizIcon fontSize=\"inherit\" />\n </IconButton>\n <Menu anchorEl={anchorEl} open={open} onClose={handleClose}>\n {actions?.map((action) => {\n return (\n <MenuItem\n key={action.name}\n onClick={() => {\n action?.onClick?.()\n handleClose()\n }}\n >\n {action.name}\n </MenuItem>\n )\n })}\n </Menu>\n </FlexRow>\n ) : null\n}\n"],"mappings":";AAAA,SAAS,aAAa,qBAAqB;AAC3C,SAAS,YAAY,MAAM,gBAAgB;AAC3C,SAAS,eAAe;AACxB,SAAS,gBAAgB;AAgBrB,SAEI,KAFJ;AAZG,IAAM,sBAAsD,CAAC,EAAE,SAAS,GAAG,MAAM,MAAM;AAC5F,QAAM,CAAC,UAAU,WAAW,IAAI,SAA6B,IAAI;AACjE,QAAM,OAAO,CAAC,CAAC;AAEf,QAAM,cAAc,CAAC,UAAyC;AAC5D,gBAAY,MAAM,aAAa;AAAA,EACjC;AACA,QAAM,cAAc,MAAM;AACxB,gBAAY,IAAI;AAAA,EAClB;AAEA,SAAO,YAAW,mCAAS,UAAS,IAClC,qBAAC,WAAS,GAAG,OACX;AAAA,wBAAC,cAAW,MAAK,SAAQ,OAAM,WAAU,SAAS,aAChD,8BAAC,iBAAc,UAAS,WAAU,GACpC;AAAA,IACA,oBAAC,QAAK,UAAoB,MAAY,SAAS,aAC5C,6CAAS,IAAI,CAAC,WAAW;AACxB,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,SAAS,MAAM;AA5B7B;AA6BgB,mDAAQ,YAAR;AACA,wBAAY;AAAA,UACd;AAAA,UAEC,iBAAO;AAAA;AAAA,QANH,OAAO;AAAA,MAOd;AAAA,IAEJ,IACF;AAAA,KACF,IACE;AACN;","names":[]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/components/ActionsProps.ts
17
- var ActionsProps_exports = {};
18
- module.exports = __toCommonJS(ActionsProps_exports);
19
- //# sourceMappingURL=ActionsProps.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/ActionsProps.ts"],"sourcesContent":["import { FlexBoxProps } from '@xylabs/react-flexbox'\n\nimport { PropertyAction } from './Action'\n\nexport interface PropertyActionsProps extends FlexBoxProps {\n actions?: PropertyAction[]\n buttons?: boolean\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=ActionsProps.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,97 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/components/Group.tsx
21
- var Group_exports = {};
22
- __export(Group_exports, {
23
- PropertyGroup: () => PropertyGroup
24
- });
25
- module.exports = __toCommonJS(Group_exports);
26
- var import_material2 = require("@mui/material");
27
- var import_react_flexbox2 = require("@xylabs/react-flexbox");
28
- var import_typeof = require("@xyo-network/typeof");
29
-
30
- // src/components/Title.tsx
31
- var import_material = require("@mui/material");
32
- var import_react_flexbox = require("@xylabs/react-flexbox");
33
- var import_react_quick_tip_button = require("@xylabs/react-quick-tip-button");
34
- var import_jsx_runtime = require("react/jsx-runtime");
35
- var PropertyTitle = ({ elevation = 1, size = "medium", tip, more, title, ...props }) => {
36
- const sizeVariants = {
37
- full: "caption",
38
- large: "caption",
39
- medium: "caption",
40
- small: "caption"
41
- };
42
- const sizeTitleHeight = {
43
- full: void 0,
44
- large: 32,
45
- medium: 20,
46
- small: 16
47
- };
48
- const sizeFontSize = {
49
- full: 16,
50
- large: 16,
51
- medium: 14,
52
- small: 10
53
- };
54
- const quickTipSize = sizeFontSize[size] < 16 ? sizeFontSize[size] : 16;
55
- const theme = (0, import_material.useTheme)();
56
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
57
- import_react_flexbox.FlexRow,
58
- {
59
- bgcolor: theme.palette.mode === "dark" ? (0, import_material.lighten)(theme.palette.background.paper, 0.05 * elevation) : (0, import_material.darken)(theme.palette.background.paper, 0.025 * elevation),
60
- alignItems: "center",
61
- height: sizeTitleHeight[size],
62
- justifyContent: "space-between",
63
- ...props,
64
- children: [
65
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_flexbox.FlexRow, { paddingX: 1, paddingY: 0.5, children: [
66
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { fontWeight: 500, noWrap: true, variant: sizeVariants[size], fontSize: sizeFontSize[size], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: title }) }) }),
67
- tip ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_quick_tip_button.QuickTipButton, { style: { fontSize: quickTipSize }, color: "inherit", title: title ?? "", children: tip }) : null
68
- ] }),
69
- more
70
- ]
71
- }
72
- );
73
- };
74
-
75
- // src/components/Group.tsx
76
- var import_jsx_runtime2 = require("react/jsx-runtime");
77
- var PropertyGroupBox = ({ titleProps, children, title, tip, ...props }) => {
78
- const theme = (0, import_material2.useTheme)();
79
- const childrenArray = (0, import_typeof.typeOf)(children) === "array" ? children : void 0;
80
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_flexbox2.FlexCol, { alignItems: "stretch", overflow: "hidden", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react_flexbox2.FlexRow, { overflow: "hidden", justifyContent: "stretch", alignItems: "stretch", children: [
81
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PropertyTitle, { alignItems: "flex-start", size: "full", title, tip, ...titleProps }),
82
- childrenArray ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_flexbox2.FlexGrowRow, { children: childrenArray == null ? void 0 : childrenArray.map((child, index) => {
83
- return child ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_flexbox2.FlexGrowRow, { borderLeft: 1, borderColor: theme.palette.divider, children: child }, index) : null;
84
- }) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_flexbox2.FlexGrowRow, { overflow: "hidden", children })
85
- ] }) });
86
- };
87
- var PropertyGroupPaper = ({ style, variant, elevation, square, ...props }) => {
88
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_material2.Paper, { style: { minWidth: 0, overflow: "hidden", ...style }, variant, elevation, square, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PropertyGroupBox, { ...props, paper: false }) });
89
- };
90
- var PropertyGroup = (props) => {
91
- return props.paper ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PropertyGroupPaper, { ...props }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(PropertyGroupBox, { ...props });
92
- };
93
- // Annotate the CommonJS export names for ESM import in node:
94
- 0 && (module.exports = {
95
- PropertyGroup
96
- });
97
- //# sourceMappingURL=Group.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Group.tsx","../../../src/components/Title.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","import { darken, lighten, Typography, TypographyVariant, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { QuickTipButton } from '@xylabs/react-quick-tip-button'\nimport { SizeProp } from '@xyo-network/react-shared'\nimport { ReactNode } from 'react'\n\nexport type TitleSizeProp = SizeProp | 'full'\n\nexport interface PropertyTitleProps extends FlexBoxProps {\n elevation?: number\n more?: ReactNode\n size?: TitleSizeProp\n tip?: ReactNode\n title?: string\n}\n\nexport const PropertyTitle: React.FC<PropertyTitleProps> = ({ elevation = 1, size = 'medium', tip, more, title, ...props }) => {\n const sizeVariants: Record<TitleSizeProp, TypographyVariant> = {\n full: 'caption',\n large: 'caption',\n medium: 'caption',\n small: 'caption',\n }\n\n const sizeTitleHeight: Record<TitleSizeProp, number | undefined> = {\n full: undefined,\n large: 32,\n medium: 20,\n small: 16,\n }\n\n const sizeFontSize: Record<TitleSizeProp, number> = {\n full: 16,\n large: 16,\n medium: 14,\n small: 10,\n }\n\n const quickTipSize = sizeFontSize[size] < 16 ? sizeFontSize[size] : 16\n\n const theme = useTheme()\n\n return (\n <FlexRow\n bgcolor={\n theme.palette.mode === 'dark'\n ? lighten(theme.palette.background.paper, 0.05 * elevation)\n : darken(theme.palette.background.paper, 0.025 * elevation)\n }\n alignItems=\"center\"\n height={sizeTitleHeight[size]}\n justifyContent=\"space-between\"\n {...props}\n >\n <FlexRow paddingX={1} paddingY={0.5}>\n <Typography fontWeight={500} noWrap variant={sizeVariants[size]} fontSize={sizeFontSize[size]}>\n <small>\n <strong>{title}</strong>\n </small>\n </Typography>\n {tip ? (\n <QuickTipButton style={{ fontSize: quickTipSize }} color=\"inherit\" title={title ?? ''}>\n {tip}\n </QuickTipButton>\n ) : null}\n </FlexRow>\n {more}\n </FlexRow>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,mBAAgC;AAChC,IAAAC,wBAA8C;AAC9C,oBAAuB;;;ACFvB,sBAAyE;AACzE,2BAAsC;AACtC,oCAA+B;AAoDzB;AAtCC,IAAM,gBAA8C,CAAC,EAAE,YAAY,GAAG,OAAO,UAAU,KAAK,MAAM,OAAO,GAAG,MAAM,MAAM;AAC7H,QAAM,eAAyD;AAAA,IAC7D,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAEA,QAAM,kBAA6D;AAAA,IACjE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAEA,QAAM,eAA8C;AAAA,IAClD,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAEA,QAAM,eAAe,aAAa,IAAI,IAAI,KAAK,aAAa,IAAI,IAAI;AAEpE,QAAM,YAAQ,0BAAS;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SACE,MAAM,QAAQ,SAAS,aACnB,yBAAQ,MAAM,QAAQ,WAAW,OAAO,OAAO,SAAS,QACxD,wBAAO,MAAM,QAAQ,WAAW,OAAO,QAAQ,SAAS;AAAA,MAE9D,YAAW;AAAA,MACX,QAAQ,gBAAgB,IAAI;AAAA,MAC5B,gBAAe;AAAA,MACd,GAAG;AAAA,MAEJ;AAAA,qDAAC,gCAAQ,UAAU,GAAG,UAAU,KAC9B;AAAA,sDAAC,8BAAW,YAAY,KAAK,QAAM,MAAC,SAAS,aAAa,IAAI,GAAG,UAAU,aAAa,IAAI,GAC1F,sDAAC,WACC,sDAAC,YAAQ,iBAAM,GACjB,GACF;AAAA,UACC,MACC,4CAAC,gDAAe,OAAO,EAAE,UAAU,aAAa,GAAG,OAAM,WAAU,OAAO,SAAS,IAChF,eACH,IACE;AAAA,WACN;AAAA,QACC;AAAA;AAAA;AAAA,EACH;AAEJ;;;ADxDM,IAAAC,sBAAA;AALN,IAAM,mBAAoD,CAAC,EAAE,YAAY,UAAU,OAAO,KAAK,GAAG,MAAM,MAAM;AAC5G,QAAM,YAAQ,2BAAS;AACvB,QAAM,oBAAgB,sBAAO,QAAQ,MAAM,UAAW,WAA8B;AACpF,SACE,6CAAC,iCAAQ,YAAW,WAAU,UAAS,UAAU,GAAG,OAClD,wDAAC,iCAAQ,UAAS,UAAS,gBAAe,WAAU,YAAW,WAC7D;AAAA,iDAAC,iBAAc,YAAW,cAAa,MAAK,QAAO,OAAc,KAAW,GAAG,YAAY;AAAA,IAC1F,gBACC,6CAAC,qCACE,yDAAe,IAAI,CAAC,OAAO,UAAU;AACpC,aAAO,QACL,6CAAC,qCAAwB,YAAY,GAAG,aAAa,MAAM,QAAQ,SAChE,mBADe,KAElB,IACE;AAAA,IACN,IACF,IAEA,6CAAC,qCAAY,UAAS,UAAU,UAAS;AAAA,KAE7C,GACF;AAEJ;AAEA,IAAM,qBAAwD,CAAC,EAAE,OAAO,SAAS,WAAW,QAAQ,GAAG,MAAM,MAAM;AACjH,SACE,6CAAC,0BAAM,OAAO,EAAE,UAAU,GAAG,UAAU,UAAU,GAAG,MAAM,GAAG,SAAkB,WAAsB,QACnG,uDAAC,oBAAkB,GAAG,OAAO,OAAO,OAAO,GAC7C;AAEJ;AAEO,IAAM,gBAA8C,CAAC,UAAU;AACpE,SAAO,MAAM,QAAQ,6CAAC,sBAAoB,GAAG,OAAO,IAAK,6CAAC,oBAAkB,GAAG,OAAO;AACxF;","names":["import_material","import_react_flexbox","import_jsx_runtime"]}
@@ -1,72 +0,0 @@
1
- // src/components/Group.tsx
2
- import { Paper, useTheme as useTheme2 } from "@mui/material";
3
- import { FlexCol, FlexGrowRow, FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
4
- import { typeOf } from "@xyo-network/typeof";
5
-
6
- // src/components/Title.tsx
7
- import { darken, lighten, Typography, useTheme } from "@mui/material";
8
- import { FlexRow } from "@xylabs/react-flexbox";
9
- import { QuickTipButton } from "@xylabs/react-quick-tip-button";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
- var PropertyTitle = ({ elevation = 1, size = "medium", tip, more, title, ...props }) => {
12
- const sizeVariants = {
13
- full: "caption",
14
- large: "caption",
15
- medium: "caption",
16
- small: "caption"
17
- };
18
- const sizeTitleHeight = {
19
- full: void 0,
20
- large: 32,
21
- medium: 20,
22
- small: 16
23
- };
24
- const sizeFontSize = {
25
- full: 16,
26
- large: 16,
27
- medium: 14,
28
- small: 10
29
- };
30
- const quickTipSize = sizeFontSize[size] < 16 ? sizeFontSize[size] : 16;
31
- const theme = useTheme();
32
- return /* @__PURE__ */ jsxs(
33
- FlexRow,
34
- {
35
- bgcolor: theme.palette.mode === "dark" ? lighten(theme.palette.background.paper, 0.05 * elevation) : darken(theme.palette.background.paper, 0.025 * elevation),
36
- alignItems: "center",
37
- height: sizeTitleHeight[size],
38
- justifyContent: "space-between",
39
- ...props,
40
- children: [
41
- /* @__PURE__ */ jsxs(FlexRow, { paddingX: 1, paddingY: 0.5, children: [
42
- /* @__PURE__ */ jsx(Typography, { fontWeight: 500, noWrap: true, variant: sizeVariants[size], fontSize: sizeFontSize[size], children: /* @__PURE__ */ jsx("small", { children: /* @__PURE__ */ jsx("strong", { children: title }) }) }),
43
- tip ? /* @__PURE__ */ jsx(QuickTipButton, { style: { fontSize: quickTipSize }, color: "inherit", title: title ?? "", children: tip }) : null
44
- ] }),
45
- more
46
- ]
47
- }
48
- );
49
- };
50
-
51
- // src/components/Group.tsx
52
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
53
- var PropertyGroupBox = ({ titleProps, children, title, tip, ...props }) => {
54
- const theme = useTheme2();
55
- const childrenArray = typeOf(children) === "array" ? children : void 0;
56
- return /* @__PURE__ */ jsx2(FlexCol, { alignItems: "stretch", overflow: "hidden", ...props, children: /* @__PURE__ */ jsxs2(FlexRow2, { overflow: "hidden", justifyContent: "stretch", alignItems: "stretch", children: [
57
- /* @__PURE__ */ jsx2(PropertyTitle, { alignItems: "flex-start", size: "full", title, tip, ...titleProps }),
58
- childrenArray ? /* @__PURE__ */ jsx2(FlexGrowRow, { children: childrenArray == null ? void 0 : childrenArray.map((child, index) => {
59
- return child ? /* @__PURE__ */ jsx2(FlexGrowRow, { borderLeft: 1, borderColor: theme.palette.divider, children: child }, index) : null;
60
- }) }) : /* @__PURE__ */ jsx2(FlexGrowRow, { overflow: "hidden", children })
61
- ] }) });
62
- };
63
- var PropertyGroupPaper = ({ style, variant, elevation, square, ...props }) => {
64
- return /* @__PURE__ */ jsx2(Paper, { style: { minWidth: 0, overflow: "hidden", ...style }, variant, elevation, square, children: /* @__PURE__ */ jsx2(PropertyGroupBox, { ...props, paper: false }) });
65
- };
66
- var PropertyGroup = (props) => {
67
- return props.paper ? /* @__PURE__ */ jsx2(PropertyGroupPaper, { ...props }) : /* @__PURE__ */ jsx2(PropertyGroupBox, { ...props });
68
- };
69
- export {
70
- PropertyGroup
71
- };
72
- //# sourceMappingURL=Group.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Group.tsx","../../../src/components/Title.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","import { darken, lighten, Typography, TypographyVariant, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { QuickTipButton } from '@xylabs/react-quick-tip-button'\nimport { SizeProp } from '@xyo-network/react-shared'\nimport { ReactNode } from 'react'\n\nexport type TitleSizeProp = SizeProp | 'full'\n\nexport interface PropertyTitleProps extends FlexBoxProps {\n elevation?: number\n more?: ReactNode\n size?: TitleSizeProp\n tip?: ReactNode\n title?: string\n}\n\nexport const PropertyTitle: React.FC<PropertyTitleProps> = ({ elevation = 1, size = 'medium', tip, more, title, ...props }) => {\n const sizeVariants: Record<TitleSizeProp, TypographyVariant> = {\n full: 'caption',\n large: 'caption',\n medium: 'caption',\n small: 'caption',\n }\n\n const sizeTitleHeight: Record<TitleSizeProp, number | undefined> = {\n full: undefined,\n large: 32,\n medium: 20,\n small: 16,\n }\n\n const sizeFontSize: Record<TitleSizeProp, number> = {\n full: 16,\n large: 16,\n medium: 14,\n small: 10,\n }\n\n const quickTipSize = sizeFontSize[size] < 16 ? sizeFontSize[size] : 16\n\n const theme = useTheme()\n\n return (\n <FlexRow\n bgcolor={\n theme.palette.mode === 'dark'\n ? lighten(theme.palette.background.paper, 0.05 * elevation)\n : darken(theme.palette.background.paper, 0.025 * elevation)\n }\n alignItems=\"center\"\n height={sizeTitleHeight[size]}\n justifyContent=\"space-between\"\n {...props}\n >\n <FlexRow paddingX={1} paddingY={0.5}>\n <Typography fontWeight={500} noWrap variant={sizeVariants[size]} fontSize={sizeFontSize[size]}>\n <small>\n <strong>{title}</strong>\n </small>\n </Typography>\n {tip ? (\n <QuickTipButton style={{ fontSize: quickTipSize }} color=\"inherit\" title={title ?? ''}>\n {tip}\n </QuickTipButton>\n ) : null}\n </FlexRow>\n {more}\n </FlexRow>\n )\n}\n"],"mappings":";AAAA,SAAS,OAAO,YAAAA,iBAAgB;AAChC,SAAS,SAAS,aAAa,WAAAC,gBAAe;AAC9C,SAAS,cAAc;;;ACFvB,SAAS,QAAQ,SAAS,YAA+B,gBAAgB;AACzE,SAAuB,eAAe;AACtC,SAAS,sBAAsB;AAoDzB,SAGM,KAHN;AAtCC,IAAM,gBAA8C,CAAC,EAAE,YAAY,GAAG,OAAO,UAAU,KAAK,MAAM,OAAO,GAAG,MAAM,MAAM;AAC7H,QAAM,eAAyD;AAAA,IAC7D,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAEA,QAAM,kBAA6D;AAAA,IACjE,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAEA,QAAM,eAA8C;AAAA,IAClD,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EACT;AAEA,QAAM,eAAe,aAAa,IAAI,IAAI,KAAK,aAAa,IAAI,IAAI;AAEpE,QAAM,QAAQ,SAAS;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SACE,MAAM,QAAQ,SAAS,SACnB,QAAQ,MAAM,QAAQ,WAAW,OAAO,OAAO,SAAS,IACxD,OAAO,MAAM,QAAQ,WAAW,OAAO,QAAQ,SAAS;AAAA,MAE9D,YAAW;AAAA,MACX,QAAQ,gBAAgB,IAAI;AAAA,MAC5B,gBAAe;AAAA,MACd,GAAG;AAAA,MAEJ;AAAA,6BAAC,WAAQ,UAAU,GAAG,UAAU,KAC9B;AAAA,8BAAC,cAAW,YAAY,KAAK,QAAM,MAAC,SAAS,aAAa,IAAI,GAAG,UAAU,aAAa,IAAI,GAC1F,8BAAC,WACC,8BAAC,YAAQ,iBAAM,GACjB,GACF;AAAA,UACC,MACC,oBAAC,kBAAe,OAAO,EAAE,UAAU,aAAa,GAAG,OAAM,WAAU,OAAO,SAAS,IAChF,eACH,IACE;AAAA,WACN;AAAA,QACC;AAAA;AAAA;AAAA,EACH;AAEJ;;;ADxDM,SACE,OAAAC,MADF,QAAAC,aAAA;AALN,IAAM,mBAAoD,CAAC,EAAE,YAAY,UAAU,OAAO,KAAK,GAAG,MAAM,MAAM;AAC5G,QAAM,QAAQC,UAAS;AACvB,QAAM,gBAAgB,OAAO,QAAQ,MAAM,UAAW,WAA8B;AACpF,SACE,gBAAAF,KAAC,WAAQ,YAAW,WAAU,UAAS,UAAU,GAAG,OAClD,0BAAAC,MAACE,UAAA,EAAQ,UAAS,UAAS,gBAAe,WAAU,YAAW,WAC7D;AAAA,oBAAAH,KAAC,iBAAc,YAAW,cAAa,MAAK,QAAO,OAAc,KAAW,GAAG,YAAY;AAAA,IAC1F,gBACC,gBAAAA,KAAC,eACE,yDAAe,IAAI,CAAC,OAAO,UAAU;AACpC,aAAO,QACL,gBAAAA,KAAC,eAAwB,YAAY,GAAG,aAAa,MAAM,QAAQ,SAChE,mBADe,KAElB,IACE;AAAA,IACN,IACF,IAEA,gBAAAA,KAAC,eAAY,UAAS,UAAU,UAAS;AAAA,KAE7C,GACF;AAEJ;AAEA,IAAM,qBAAwD,CAAC,EAAE,OAAO,SAAS,WAAW,QAAQ,GAAG,MAAM,MAAM;AACjH,SACE,gBAAAA,KAAC,SAAM,OAAO,EAAE,UAAU,GAAG,UAAU,UAAU,GAAG,MAAM,GAAG,SAAkB,WAAsB,QACnG,0BAAAA,KAAC,oBAAkB,GAAG,OAAO,OAAO,OAAO,GAC7C;AAEJ;AAEO,IAAM,gBAA8C,CAAC,UAAU;AACpE,SAAO,MAAM,QAAQ,gBAAAA,KAAC,sBAAoB,GAAG,OAAO,IAAK,gBAAAA,KAAC,oBAAkB,GAAG,OAAO;AACxF;","names":["useTheme","FlexRow","jsx","jsxs","useTheme","FlexRow"]}
@@ -1,46 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/components/IdenticonCorner.tsx
21
- var IdenticonCorner_exports = {};
22
- __export(IdenticonCorner_exports, {
23
- IdenticonCorner: () => IdenticonCorner
24
- });
25
- module.exports = __toCommonJS(IdenticonCorner_exports);
26
- var import_material = require("@mui/material");
27
- var import_react_flexbox = require("@xylabs/react-flexbox");
28
- var import_react_identicon = require("@xylabs/react-identicon");
29
- var import_react = require("react");
30
- var import_jsx_runtime = require("react/jsx-runtime");
31
- var IdenticonCorner = ({ value, ...props }) => {
32
- const theme = (0, import_material.useTheme)();
33
- const [parentHeight, setParentHeight] = (0, import_react.useState)();
34
- const ref = (0, import_react.useRef)(null);
35
- (0, import_react.useEffect)(() => {
36
- var _a, _b, _c;
37
- setParentHeight((_c = (_b = (_a = ref.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.parentElement) == null ? void 0 : _c.clientHeight);
38
- }, []);
39
- const calculatedHeight = parentHeight ?? 0;
40
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_flexbox.FlexRow, { alignItems: "flex-start", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_flexbox.FlexRow, { background: true, height: calculatedHeight, width: calculatedHeight, borderLeft: `1px solid ${theme.palette.divider}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_identicon.Identicon, { size: calculatedHeight * 0.6, value: `${value}`, sx: { padding: `${calculatedHeight * 0.2}px` }, ...props }) }) }) });
41
- };
42
- // Annotate the CommonJS export names for ESM import in node:
43
- 0 && (module.exports = {
44
- IdenticonCorner
45
- });
46
- //# sourceMappingURL=IdenticonCorner.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/IdenticonCorner.tsx"],"sourcesContent":["import { useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { Identicon } from '@xylabs/react-identicon'\nimport { useEffect, useRef, useState } from 'react'\n\nexport interface IdenticonCornerProps extends FlexBoxProps {\n value?: string | number | boolean | null\n}\n\nexport const IdenticonCorner: React.FC<IdenticonCornerProps> = ({ value, ...props }) => {\n const theme = useTheme()\n const [parentHeight, setParentHeight] = useState<number>()\n const ref = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n setParentHeight(ref.current?.parentElement?.parentElement?.clientHeight)\n }, [])\n\n const calculatedHeight = parentHeight ?? 0\n\n return (\n <FlexRow alignItems=\"flex-start\" height=\"100%\">\n <FlexRow background height={calculatedHeight} width={calculatedHeight} borderLeft={`1px solid ${theme.palette.divider}`}>\n <div ref={ref}>\n <Identicon size={calculatedHeight * 0.6} value={`${value}`} sx={{ padding: `${calculatedHeight * 0.2}px` }} {...props} />\n </div>\n </FlexRow>\n </FlexRow>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAyB;AACzB,2BAAsC;AACtC,6BAA0B;AAC1B,mBAA4C;AAqBlC;AAfH,IAAM,kBAAkD,CAAC,EAAE,OAAO,GAAG,MAAM,MAAM;AACtF,QAAM,YAAQ,0BAAS;AACvB,QAAM,CAAC,cAAc,eAAe,QAAI,uBAAiB;AACzD,QAAM,UAAM,qBAAuB,IAAI;AAEvC,8BAAU,MAAM;AAdlB;AAeI,qBAAgB,qBAAI,YAAJ,mBAAa,kBAAb,mBAA4B,kBAA5B,mBAA2C,YAAY;AAAA,EACzE,GAAG,CAAC,CAAC;AAEL,QAAM,mBAAmB,gBAAgB;AAEzC,SACE,4CAAC,gCAAQ,YAAW,cAAa,QAAO,QACtC,sDAAC,gCAAQ,YAAU,MAAC,QAAQ,kBAAkB,OAAO,kBAAkB,YAAY,aAAa,MAAM,QAAQ,OAAO,IACnH,sDAAC,SAAI,KACH,sDAAC,oCAAU,MAAM,mBAAmB,KAAK,OAAO,GAAG,KAAK,IAAI,IAAI,EAAE,SAAS,GAAG,mBAAmB,GAAG,KAAK,GAAI,GAAG,OAAO,GACzH,GACF,GACF;AAEJ;","names":[]}
@@ -1,21 +0,0 @@
1
- // src/components/IdenticonCorner.tsx
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
- import { jsx } from "react/jsx-runtime";
7
- var IdenticonCorner = ({ value, ...props }) => {
8
- const theme = useTheme();
9
- const [parentHeight, setParentHeight] = useState();
10
- const ref = useRef(null);
11
- useEffect(() => {
12
- var _a, _b, _c;
13
- setParentHeight((_c = (_b = (_a = ref.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.parentElement) == null ? void 0 : _c.clientHeight);
14
- }, []);
15
- const calculatedHeight = parentHeight ?? 0;
16
- 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 }) }) }) });
17
- };
18
- export {
19
- IdenticonCorner
20
- };
21
- //# sourceMappingURL=IdenticonCorner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/IdenticonCorner.tsx"],"sourcesContent":["import { useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { Identicon } from '@xylabs/react-identicon'\nimport { useEffect, useRef, useState } from 'react'\n\nexport interface IdenticonCornerProps extends FlexBoxProps {\n value?: string | number | boolean | null\n}\n\nexport const IdenticonCorner: React.FC<IdenticonCornerProps> = ({ value, ...props }) => {\n const theme = useTheme()\n const [parentHeight, setParentHeight] = useState<number>()\n const ref = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n setParentHeight(ref.current?.parentElement?.parentElement?.clientHeight)\n }, [])\n\n const calculatedHeight = parentHeight ?? 0\n\n return (\n <FlexRow alignItems=\"flex-start\" height=\"100%\">\n <FlexRow background height={calculatedHeight} width={calculatedHeight} borderLeft={`1px solid ${theme.palette.divider}`}>\n <div ref={ref}>\n <Identicon size={calculatedHeight * 0.6} value={`${value}`} sx={{ padding: `${calculatedHeight * 0.2}px` }} {...props} />\n </div>\n </FlexRow>\n </FlexRow>\n )\n}\n"],"mappings":";AAAA,SAAS,gBAAgB;AACzB,SAAuB,eAAe;AACtC,SAAS,iBAAiB;AAC1B,SAAS,WAAW,QAAQ,gBAAgB;AAqBlC;AAfH,IAAM,kBAAkD,CAAC,EAAE,OAAO,GAAG,MAAM,MAAM;AACtF,QAAM,QAAQ,SAAS;AACvB,QAAM,CAAC,cAAc,eAAe,IAAI,SAAiB;AACzD,QAAM,MAAM,OAAuB,IAAI;AAEvC,YAAU,MAAM;AAdlB;AAeI,qBAAgB,qBAAI,YAAJ,mBAAa,kBAAb,mBAA4B,kBAA5B,mBAA2C,YAAY;AAAA,EACzE,GAAG,CAAC,CAAC;AAEL,QAAM,mBAAmB,gBAAgB;AAEzC,SACE,oBAAC,WAAQ,YAAW,cAAa,QAAO,QACtC,8BAAC,WAAQ,YAAU,MAAC,QAAQ,kBAAkB,OAAO,kBAAkB,YAAY,aAAa,MAAM,QAAQ,OAAO,IACnH,8BAAC,SAAI,KACH,8BAAC,aAAU,MAAM,mBAAmB,KAAK,OAAO,GAAG,KAAK,IAAI,IAAI,EAAE,SAAS,GAAG,mBAAmB,GAAG,KAAK,GAAI,GAAG,OAAO,GACzH,GACF,GACF;AAEJ;","names":[]}
@@ -1,191 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/components/Property.tsx
21
- var Property_exports = {};
22
- __export(Property_exports, {
23
- Property: () => Property
24
- });
25
- module.exports = __toCommonJS(Property_exports);
26
- var import_material4 = require("@mui/material");
27
- var import_react_flexbox4 = require("@xylabs/react-flexbox");
28
- var import_react4 = require("react");
29
-
30
- // src/components/ActionsMenu.tsx
31
- var import_icons_material = require("@mui/icons-material");
32
- var import_material = require("@mui/material");
33
- var import_react_flexbox = require("@xylabs/react-flexbox");
34
- var import_react = require("react");
35
- var import_jsx_runtime = require("react/jsx-runtime");
36
- var PropertyActionsMenu = ({ actions, ...props }) => {
37
- const [anchorEl, setAnchorEl] = (0, import_react.useState)(null);
38
- const open = !!anchorEl;
39
- const handleClick = (event) => {
40
- setAnchorEl(event.currentTarget);
41
- };
42
- const handleClose = () => {
43
- setAnchorEl(null);
44
- };
45
- return actions && (actions == null ? void 0 : actions.length) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_flexbox.FlexRow, { ...props, children: [
46
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.IconButton, { size: "small", color: "inherit", onClick: handleClick, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons_material.MoreHoriz, { fontSize: "inherit" }) }),
47
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Menu, { anchorEl, open, onClose: handleClose, children: actions == null ? void 0 : actions.map((action) => {
48
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
49
- import_material.MenuItem,
50
- {
51
- onClick: () => {
52
- var _a;
53
- (_a = action == null ? void 0 : action.onClick) == null ? void 0 : _a.call(action);
54
- handleClose();
55
- },
56
- children: action.name
57
- },
58
- action.name
59
- );
60
- }) })
61
- ] }) : null;
62
- };
63
-
64
- // src/components/IdenticonCorner.tsx
65
- var import_material2 = require("@mui/material");
66
- var import_react_flexbox2 = require("@xylabs/react-flexbox");
67
- var import_react_identicon = require("@xylabs/react-identicon");
68
- var import_react2 = require("react");
69
- var import_jsx_runtime2 = require("react/jsx-runtime");
70
- var IdenticonCorner = ({ value, ...props }) => {
71
- const theme = (0, import_material2.useTheme)();
72
- const [parentHeight, setParentHeight] = (0, import_react2.useState)();
73
- const ref = (0, import_react2.useRef)(null);
74
- (0, import_react2.useEffect)(() => {
75
- var _a, _b, _c;
76
- setParentHeight((_c = (_b = (_a = ref.current) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.parentElement) == null ? void 0 : _c.clientHeight);
77
- }, []);
78
- const calculatedHeight = parentHeight ?? 0;
79
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_flexbox2.FlexRow, { alignItems: "flex-start", height: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_flexbox2.FlexRow, { background: true, height: calculatedHeight, width: calculatedHeight, borderLeft: `1px solid ${theme.palette.divider}`, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ref, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_identicon.Identicon, { size: calculatedHeight * 0.6, value: `${value}`, sx: { padding: `${calculatedHeight * 0.2}px` }, ...props }) }) }) });
80
- };
81
-
82
- // src/components/Title.tsx
83
- var import_material3 = require("@mui/material");
84
- var import_react_flexbox3 = require("@xylabs/react-flexbox");
85
- var import_react_quick_tip_button = require("@xylabs/react-quick-tip-button");
86
- var import_jsx_runtime3 = require("react/jsx-runtime");
87
- var PropertyTitle = ({ elevation = 1, size = "medium", tip, more, title, ...props }) => {
88
- const sizeVariants = {
89
- full: "caption",
90
- large: "caption",
91
- medium: "caption",
92
- small: "caption"
93
- };
94
- const sizeTitleHeight = {
95
- full: void 0,
96
- large: 32,
97
- medium: 20,
98
- small: 16
99
- };
100
- const sizeFontSize = {
101
- full: 16,
102
- large: 16,
103
- medium: 14,
104
- small: 10
105
- };
106
- const quickTipSize = sizeFontSize[size] < 16 ? sizeFontSize[size] : 16;
107
- const theme = (0, import_material3.useTheme)();
108
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
109
- import_react_flexbox3.FlexRow,
110
- {
111
- bgcolor: theme.palette.mode === "dark" ? (0, import_material3.lighten)(theme.palette.background.paper, 0.05 * elevation) : (0, import_material3.darken)(theme.palette.background.paper, 0.025 * elevation),
112
- alignItems: "center",
113
- height: sizeTitleHeight[size],
114
- justifyContent: "space-between",
115
- ...props,
116
- children: [
117
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react_flexbox3.FlexRow, { paddingX: 1, paddingY: 0.5, children: [
118
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material3.Typography, { fontWeight: 500, noWrap: true, variant: sizeVariants[size], fontSize: sizeFontSize[size], children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("small", { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("strong", { children: title }) }) }),
119
- tip ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react_quick_tip_button.QuickTipButton, { style: { fontSize: quickTipSize }, color: "inherit", title: title ?? "", children: tip }) : null
120
- ] }),
121
- more
122
- ]
123
- }
124
- );
125
- };
126
-
127
- // src/components/Value.tsx
128
- var import_react_shared = require("@xyo-network/react-shared");
129
- var import_react3 = require("react");
130
- var import_jsx_runtime4 = require("react/jsx-runtime");
131
- var PropertyValue = (0, import_react3.forwardRef)(({ typographyVariant = "body1", value, ...props }, ref) => {
132
- return value !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_shared.EllipsizeBox, { typographyProps: { component: void 0, title: value == null ? void 0 : value.toString(), variant: typographyVariant }, width: "100%", ref, ...props, children: value }) : null;
133
- });
134
- PropertyValue.displayName = "PropertyValue";
135
-
136
- // src/components/Property.tsx
137
- var import_jsx_runtime5 = require("react/jsx-runtime");
138
- var PropertyBox = (0, import_react4.forwardRef)(
139
- ({ titleProps, title, value, children, size = "medium", tip, actions, required, badge = false, ...props }, ref) => {
140
- const sizeValueHeight = {
141
- large: 48,
142
- medium: 36,
143
- small: 24
144
- };
145
- const sizeVariants = {
146
- large: "h6",
147
- medium: "body1",
148
- small: "body2"
149
- };
150
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_flexbox4.FlexRow, { ref, flexDirection: "column", minWidth: 0, alignItems: "stretch", overflow: "hidden", ...props, children: [
151
- title !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
152
- PropertyTitle,
153
- {
154
- tip,
155
- title: required ? `${title}*` : title,
156
- size,
157
- more: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PropertyActionsMenu, { actions }),
158
- ...titleProps
159
- }
160
- ) : null,
161
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
162
- import_react_flexbox4.FlexRow,
163
- {
164
- pl: 1,
165
- columnGap: 1,
166
- justifyContent: value === void 0 ? "center" : "space-between",
167
- overflow: "hidden",
168
- height: sizeValueHeight[size],
169
- children: [
170
- children ? children : value !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PropertyValue, { value, typographyVariant: sizeVariants[size] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material4.CircularProgress, { size: 16 }),
171
- value !== void 0 ? badge ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IdenticonCorner, { value }) : null : null
172
- ]
173
- }
174
- )
175
- ] });
176
- }
177
- );
178
- PropertyBox.displayName = "PropertyBox";
179
- var PropertyPaper = (0, import_react4.forwardRef)(({ style, variant, elevation = 2, square, ...props }, ref) => {
180
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material4.Paper, { ref, style: { minWidth: 0, overflow: "hidden", ...style }, variant, elevation, square, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PropertyBox, { ...props, paper: false }) });
181
- });
182
- PropertyPaper.displayName = "PropertyPaper";
183
- var Property = (0, import_react4.forwardRef)((props, ref) => {
184
- return props.paper ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PropertyPaper, { ref, ...props }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PropertyBox, { ref, ...props });
185
- });
186
- Property.displayName = "Property";
187
- // Annotate the CommonJS export names for ESM import in node:
188
- 0 && (module.exports = {
189
- Property
190
- });
191
- //# sourceMappingURL=Property.cjs.map