@xyo-network/react-property 2.64.0-rc.6 → 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.
Files changed (164) hide show
  1. package/dist/browser/components/Action.cjs +19 -0
  2. package/dist/browser/components/Action.cjs.map +1 -0
  3. package/dist/browser/components/Action.d.cts +8 -0
  4. package/dist/browser/components/Action.d.cts.map +1 -0
  5. package/dist/browser/components/Actions.cjs +38 -0
  6. package/dist/{node/components/Actions.mjs.map → browser/components/Actions.cjs.map} +1 -1
  7. package/dist/browser/components/Actions.d.cts +4 -0
  8. package/dist/browser/components/Actions.d.cts.map +1 -0
  9. package/dist/browser/components/ActionsMenu.cjs +57 -0
  10. package/dist/{node/components/ActionsMenu.mjs.map → browser/components/ActionsMenu.cjs.map} +1 -1
  11. package/dist/browser/components/ActionsMenu.d.cts +4 -0
  12. package/dist/browser/components/ActionsMenu.d.cts.map +1 -0
  13. package/dist/browser/components/ActionsProps.cjs +19 -0
  14. package/dist/browser/components/ActionsProps.cjs.map +1 -0
  15. package/dist/browser/components/ActionsProps.d.cts +7 -0
  16. package/dist/browser/components/ActionsProps.d.cts.map +1 -0
  17. package/dist/browser/components/Group.cjs +93 -0
  18. package/dist/browser/components/Group.cjs.map +1 -0
  19. package/dist/browser/components/Group.d.cts +4 -0
  20. package/dist/browser/components/Group.d.cts.map +1 -0
  21. package/dist/browser/components/IdenticonCorner.cjs +41 -0
  22. package/dist/{node/components/IdenticonCorner.mjs.map → browser/components/IdenticonCorner.cjs.map} +1 -1
  23. package/dist/browser/components/IdenticonCorner.d.cts +7 -0
  24. package/dist/browser/components/IdenticonCorner.d.cts.map +1 -0
  25. package/dist/browser/components/Property.cjs +185 -0
  26. package/dist/browser/components/Property.cjs.map +1 -0
  27. package/dist/browser/components/Property.d.cts +4 -0
  28. package/dist/browser/components/Property.d.cts.map +1 -0
  29. package/dist/browser/components/Props.cjs +19 -0
  30. package/dist/browser/components/Props.cjs.map +1 -0
  31. package/dist/browser/components/Props.d.cts +35 -0
  32. package/dist/browser/components/Props.d.cts.map +1 -0
  33. package/dist/browser/components/Title.cjs +69 -0
  34. package/dist/{node/components/Title.mjs.map → browser/components/Title.cjs.map} +1 -1
  35. package/dist/browser/components/Title.d.cts +13 -0
  36. package/dist/browser/components/Title.d.cts.map +1 -0
  37. package/dist/browser/components/Value.cjs +33 -0
  38. package/dist/browser/components/Value.cjs.map +1 -0
  39. package/dist/browser/components/Value.d.cts +9 -0
  40. package/dist/browser/components/Value.d.cts.map +1 -0
  41. package/dist/browser/components/index.cjs +214 -0
  42. package/dist/browser/components/index.cjs.map +1 -0
  43. package/dist/browser/components/index.d.cts +7 -0
  44. package/dist/browser/components/index.d.cts.map +1 -0
  45. package/dist/browser/index.cjs +214 -0
  46. package/dist/browser/index.cjs.map +1 -0
  47. package/dist/browser/index.d.cts +2 -0
  48. package/dist/browser/index.d.cts.map +1 -0
  49. package/dist/docs.json +48117 -0
  50. package/dist/node/components/Action.cjs +19 -0
  51. package/dist/node/components/Action.cjs.map +1 -0
  52. package/dist/node/components/Action.d.cts +8 -0
  53. package/dist/node/components/Action.d.cts.map +1 -0
  54. package/dist/node/components/Action.js +0 -16
  55. package/dist/node/components/Action.js.map +1 -1
  56. package/dist/node/components/Actions.cjs +42 -0
  57. package/dist/node/components/Actions.cjs.map +1 -0
  58. package/dist/node/components/Actions.d.cts +4 -0
  59. package/dist/node/components/Actions.d.cts.map +1 -0
  60. package/dist/node/components/Actions.js +10 -33
  61. package/dist/node/components/Actions.js.map +1 -1
  62. package/dist/node/components/ActionsMenu.cjs +62 -0
  63. package/dist/node/components/ActionsMenu.cjs.map +1 -0
  64. package/dist/node/components/ActionsMenu.d.cts +4 -0
  65. package/dist/node/components/ActionsMenu.d.cts.map +1 -0
  66. package/dist/node/components/ActionsMenu.js +17 -39
  67. package/dist/node/components/ActionsMenu.js.map +1 -1
  68. package/dist/node/components/ActionsProps.cjs +19 -0
  69. package/dist/node/components/ActionsProps.cjs.map +1 -0
  70. package/dist/node/components/ActionsProps.d.cts +7 -0
  71. package/dist/node/components/ActionsProps.d.cts.map +1 -0
  72. package/dist/node/components/ActionsProps.js +0 -16
  73. package/dist/node/components/ActionsProps.js.map +1 -1
  74. package/dist/node/components/Group.cjs +97 -0
  75. package/dist/node/components/Group.cjs.map +1 -0
  76. package/dist/node/components/Group.d.cts +4 -0
  77. package/dist/node/components/Group.d.cts.map +1 -0
  78. package/dist/node/components/Group.js +65 -42
  79. package/dist/node/components/Group.js.map +1 -1
  80. package/dist/node/components/IdenticonCorner.cjs +46 -0
  81. package/dist/node/components/IdenticonCorner.cjs.map +1 -0
  82. package/dist/node/components/IdenticonCorner.d.cts +7 -0
  83. package/dist/node/components/IdenticonCorner.d.cts.map +1 -0
  84. package/dist/node/components/IdenticonCorner.js +16 -38
  85. package/dist/node/components/IdenticonCorner.js.map +1 -1
  86. package/dist/node/components/Property.cjs +191 -0
  87. package/dist/node/components/Property.cjs.map +1 -0
  88. package/dist/node/components/Property.d.cts +4 -0
  89. package/dist/node/components/Property.d.cts.map +1 -0
  90. package/dist/node/components/Property.js +125 -44
  91. package/dist/node/components/Property.js.map +1 -1
  92. package/dist/node/components/Props.cjs +19 -0
  93. package/dist/node/components/Props.cjs.map +1 -0
  94. package/dist/node/components/Props.d.cts +35 -0
  95. package/dist/node/components/Props.d.cts.map +1 -0
  96. package/dist/node/components/Props.js +0 -16
  97. package/dist/node/components/Props.js.map +1 -1
  98. package/dist/node/components/Title.cjs +73 -0
  99. package/dist/node/components/Title.cjs.map +1 -0
  100. package/dist/node/components/Title.d.cts +13 -0
  101. package/dist/node/components/Title.d.cts.map +1 -0
  102. package/dist/node/components/Title.js +15 -38
  103. package/dist/node/components/Title.js.map +1 -1
  104. package/dist/node/components/{Title.stories.js → Value.cjs} +14 -30
  105. package/dist/node/components/{Value.mjs.map → Value.cjs.map} +1 -1
  106. package/dist/node/components/Value.d.cts +9 -0
  107. package/dist/node/components/Value.d.cts.map +1 -0
  108. package/dist/node/components/Value.js +8 -31
  109. package/dist/node/components/Value.js.map +1 -1
  110. package/dist/node/components/index.cjs +223 -0
  111. package/dist/node/components/index.cjs.map +1 -0
  112. package/dist/node/components/index.d.cts +7 -0
  113. package/dist/node/components/index.d.cts.map +1 -0
  114. package/dist/node/components/index.js +190 -30
  115. package/dist/node/components/index.js.map +1 -1
  116. package/dist/node/index.cjs +223 -0
  117. package/dist/node/index.cjs.map +1 -0
  118. package/dist/node/index.d.cts +2 -0
  119. package/dist/node/index.d.cts.map +1 -0
  120. package/dist/node/index.js +190 -20
  121. package/dist/node/index.js.map +1 -1
  122. package/package.json +21 -21
  123. package/dist/browser/components/PropertyBox.stories.js +0 -160
  124. package/dist/browser/components/PropertyBox.stories.js.map +0 -1
  125. package/dist/browser/components/PropertyPaper.stories.js +0 -178
  126. package/dist/browser/components/PropertyPaper.stories.js.map +0 -1
  127. package/dist/browser/components/Title.stories.js +0 -27
  128. package/dist/browser/components/Title.stories.js.map +0 -1
  129. package/dist/browser/components/Value.stories.js +0 -26
  130. package/dist/browser/components/Value.stories.js.map +0 -1
  131. package/dist/node/components/Action.mjs +0 -1
  132. package/dist/node/components/Action.mjs.map +0 -1
  133. package/dist/node/components/Actions.mjs +0 -16
  134. package/dist/node/components/ActionsMenu.mjs +0 -35
  135. package/dist/node/components/ActionsProps.mjs +0 -1
  136. package/dist/node/components/ActionsProps.mjs.map +0 -1
  137. package/dist/node/components/Group.mjs +0 -25
  138. package/dist/node/components/Group.mjs.map +0 -1
  139. package/dist/node/components/IdenticonCorner.mjs +0 -19
  140. package/dist/node/components/Property.mjs +0 -61
  141. package/dist/node/components/Property.mjs.map +0 -1
  142. package/dist/node/components/PropertyBox.stories.js +0 -197
  143. package/dist/node/components/PropertyBox.stories.js.map +0 -1
  144. package/dist/node/components/PropertyBox.stories.mjs +0 -160
  145. package/dist/node/components/PropertyBox.stories.mjs.map +0 -1
  146. package/dist/node/components/PropertyPaper.stories.js +0 -217
  147. package/dist/node/components/PropertyPaper.stories.js.map +0 -1
  148. package/dist/node/components/PropertyPaper.stories.mjs +0 -178
  149. package/dist/node/components/PropertyPaper.stories.mjs.map +0 -1
  150. package/dist/node/components/Props.mjs +0 -1
  151. package/dist/node/components/Props.mjs.map +0 -1
  152. package/dist/node/components/Title.mjs +0 -47
  153. package/dist/node/components/Title.stories.js.map +0 -1
  154. package/dist/node/components/Title.stories.mjs +0 -27
  155. package/dist/node/components/Title.stories.mjs.map +0 -1
  156. package/dist/node/components/Value.mjs +0 -11
  157. package/dist/node/components/Value.stories.js +0 -51
  158. package/dist/node/components/Value.stories.js.map +0 -1
  159. package/dist/node/components/Value.stories.mjs +0 -26
  160. package/dist/node/components/Value.stories.mjs.map +0 -1
  161. package/dist/node/components/index.mjs +0 -7
  162. package/dist/node/components/index.mjs.map +0 -1
  163. package/dist/node/index.mjs +0 -2
  164. package/dist/node/index.mjs.map +0 -1
@@ -0,0 +1,19 @@
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/Action.ts
17
+ var Action_exports = {};
18
+ module.exports = __toCommonJS(Action_exports);
19
+ //# sourceMappingURL=Action.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Action.ts"],"sourcesContent":["import { ReactNode } from 'react'\n\nexport interface PropertyAction {\n disabled?: boolean\n icon?: ReactNode\n name: string\n onClick?: () => void\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ export interface PropertyAction {
3
+ disabled?: boolean;
4
+ icon?: ReactNode;
5
+ name: string;
6
+ onClick?: () => void;
7
+ }
8
+ //# sourceMappingURL=Action.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../src/components/Action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACrB"}
@@ -1,17 +1 @@
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
- var Action_exports = {};
16
- module.exports = __toCommonJS(Action_exports);
17
1
  //# sourceMappingURL=Action.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Action.ts"],"sourcesContent":["import { ReactNode } from 'react'\n\nexport interface PropertyAction {\n disabled?: boolean\n icon?: ReactNode\n name: string\n onClick?: () => void\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,42 @@
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/Actions.tsx
21
+ var Actions_exports = {};
22
+ __export(Actions_exports, {
23
+ PropertyActions: () => PropertyActions
24
+ });
25
+ module.exports = __toCommonJS(Actions_exports);
26
+ var import_material = require("@mui/material");
27
+ var import_react_button = require("@xylabs/react-button");
28
+ var import_react_flexbox = require("@xylabs/react-flexbox");
29
+ var import_jsx_runtime = require("react/jsx-runtime");
30
+ var PropertyActions = ({ buttons = false, actions, ...props }) => {
31
+ if (actions) {
32
+ return ((actions == null ? void 0 : actions.length) ?? 0) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_flexbox.FlexRow, { gap: 1, ...props, children: actions.map((action, index) => {
33
+ return action.icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.IconButton, { size: "small", color: "inherit", onClick: action.onClick, children: action.icon }, index) : buttons ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_button.ButtonEx, { paddingY: 0, color: "primary", size: "small", disabled: action.disabled, onClick: action.onClick, variant: "contained", children: action.name }, index) : null;
34
+ }) }) : null;
35
+ }
36
+ return null;
37
+ };
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ PropertyActions
41
+ });
42
+ //# sourceMappingURL=Actions.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Actions.tsx"],"sourcesContent":["import { IconButton } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { PropertyActionsProps } from './ActionsProps'\n\nexport const PropertyActions: React.FC<PropertyActionsProps> = ({ buttons = false, actions, ...props }) => {\n if (actions) {\n return (actions?.length ?? 0) > 0 ? (\n <FlexRow gap={1} {...props}>\n {actions.map((action, index) => {\n return action.icon ? (\n <IconButton size=\"small\" key={index} color=\"inherit\" onClick={action.onClick}>\n {action.icon}\n </IconButton>\n ) : buttons ? (\n <ButtonEx paddingY={0} color=\"primary\" key={index} size=\"small\" disabled={action.disabled} onClick={action.onClick} variant=\"contained\">\n {action.name}\n </ButtonEx>\n ) : null\n })}\n </FlexRow>\n ) : null\n }\n return null\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA2B;AAC3B,0BAAyB;AACzB,2BAAwB;AAUZ;AANL,IAAM,kBAAkD,CAAC,EAAE,UAAU,OAAO,SAAS,GAAG,MAAM,MAAM;AACzG,MAAI,SAAS;AACX,aAAQ,mCAAS,WAAU,KAAK,IAC9B,4CAAC,gCAAQ,KAAK,GAAI,GAAG,OAClB,kBAAQ,IAAI,CAAC,QAAQ,UAAU;AAC9B,aAAO,OAAO,OACZ,4CAAC,8BAAW,MAAK,SAAoB,OAAM,WAAU,SAAS,OAAO,SAClE,iBAAO,QADoB,KAE9B,IACE,UACF,4CAAC,gCAAS,UAAU,GAAG,OAAM,WAAsB,MAAK,SAAQ,UAAU,OAAO,UAAU,SAAS,OAAO,SAAS,SAAQ,aACzH,iBAAO,QADkC,KAE5C,IACE;AAAA,IACN,CAAC,GACH,IACE;AAAA,EACN;AACA,SAAO;AACT;","names":[]}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { PropertyActionsProps } from './ActionsProps';
3
+ export declare const PropertyActions: React.FC<PropertyActionsProps>;
4
+ //# sourceMappingURL=Actions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../src/components/Actions.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAErD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAmB1D,CAAA"}
@@ -1,40 +1,17 @@
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
- var Actions_exports = {};
20
- __export(Actions_exports, {
21
- PropertyActions: () => PropertyActions
22
- });
23
- module.exports = __toCommonJS(Actions_exports);
24
- var import_jsx_runtime = require("react/jsx-runtime");
25
- var import_material = require("@mui/material");
26
- var import_react_button = require("@xylabs/react-button");
27
- var import_react_flexbox = require("@xylabs/react-flexbox");
28
- const PropertyActions = ({ buttons = false, actions, ...props }) => {
1
+ // src/components/Actions.tsx
2
+ import { IconButton } from "@mui/material";
3
+ import { ButtonEx } from "@xylabs/react-button";
4
+ import { FlexRow } from "@xylabs/react-flexbox";
5
+ import { jsx } from "react/jsx-runtime";
6
+ var PropertyActions = ({ buttons = false, actions, ...props }) => {
29
7
  if (actions) {
30
- return (actions?.length ?? 0) > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_flexbox.FlexRow, { gap: 1, ...props, children: actions.map((action, index) => {
31
- return action.icon ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.IconButton, { size: "small", color: "inherit", onClick: action.onClick, children: action.icon }, index) : buttons ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_button.ButtonEx, { paddingY: 0, color: "primary", size: "small", disabled: action.disabled, onClick: action.onClick, variant: "contained", children: action.name }, index) : null;
8
+ return ((actions == null ? void 0 : actions.length) ?? 0) > 0 ? /* @__PURE__ */ jsx(FlexRow, { gap: 1, ...props, children: actions.map((action, index) => {
9
+ 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;
32
10
  }) }) : null;
33
11
  }
34
12
  return null;
35
13
  };
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {
14
+ export {
38
15
  PropertyActions
39
- });
16
+ };
40
17
  //# sourceMappingURL=Actions.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Actions.tsx"],"sourcesContent":["import { IconButton } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { PropertyActionsProps } from './ActionsProps'\n\nexport const PropertyActions: React.FC<PropertyActionsProps> = ({ buttons = false, actions, ...props }) => {\n if (actions) {\n return (actions?.length ?? 0) > 0 ? (\n <FlexRow gap={1} {...props}>\n {actions.map((action, index) => {\n return action.icon ? (\n <IconButton size=\"small\" key={index} color=\"inherit\" onClick={action.onClick}>\n {action.icon}\n </IconButton>\n ) : buttons ? (\n <ButtonEx paddingY={0} color=\"primary\" key={index} size=\"small\" disabled={action.disabled} onClick={action.onClick} variant=\"contained\">\n {action.name}\n </ButtonEx>\n ) : null\n })}\n </FlexRow>\n ) : null\n }\n return null\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAYY;AAZZ,sBAA2B;AAC3B,0BAAyB;AACzB,2BAAwB;AAIjB,MAAM,kBAAkD,CAAC,EAAE,UAAU,OAAO,SAAS,GAAG,MAAM,MAAM;AACzG,MAAI,SAAS;AACX,YAAQ,SAAS,UAAU,KAAK,IAC9B,4CAAC,gCAAQ,KAAK,GAAI,GAAG,OAClB,kBAAQ,IAAI,CAAC,QAAQ,UAAU;AAC9B,aAAO,OAAO,OACZ,4CAAC,8BAAW,MAAK,SAAoB,OAAM,WAAU,SAAS,OAAO,SAClE,iBAAO,QADoB,KAE9B,IACE,UACF,4CAAC,gCAAS,UAAU,GAAG,OAAM,WAAsB,MAAK,SAAQ,UAAU,OAAO,UAAU,SAAS,OAAO,SAAS,SAAQ,aACzH,iBAAO,QADkC,KAE5C,IACE;AAAA,IACN,CAAC,GACH,IACE;AAAA,EACN;AACA,SAAO;AACT;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/Actions.tsx"],"sourcesContent":["import { IconButton } from '@mui/material'\nimport { ButtonEx } from '@xylabs/react-button'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { PropertyActionsProps } from './ActionsProps'\n\nexport const PropertyActions: React.FC<PropertyActionsProps> = ({ buttons = false, actions, ...props }) => {\n if (actions) {\n return (actions?.length ?? 0) > 0 ? (\n <FlexRow gap={1} {...props}>\n {actions.map((action, index) => {\n return action.icon ? (\n <IconButton size=\"small\" key={index} color=\"inherit\" onClick={action.onClick}>\n {action.icon}\n </IconButton>\n ) : buttons ? (\n <ButtonEx paddingY={0} color=\"primary\" key={index} size=\"small\" disabled={action.disabled} onClick={action.onClick} variant=\"contained\">\n {action.name}\n </ButtonEx>\n ) : null\n })}\n </FlexRow>\n ) : null\n }\n return null\n}\n"],"mappings":";AAAA,SAAS,kBAAkB;AAC3B,SAAS,gBAAgB;AACzB,SAAS,eAAe;AAUZ;AANL,IAAM,kBAAkD,CAAC,EAAE,UAAU,OAAO,SAAS,GAAG,MAAM,MAAM;AACzG,MAAI,SAAS;AACX,aAAQ,mCAAS,WAAU,KAAK,IAC9B,oBAAC,WAAQ,KAAK,GAAI,GAAG,OAClB,kBAAQ,IAAI,CAAC,QAAQ,UAAU;AAC9B,aAAO,OAAO,OACZ,oBAAC,cAAW,MAAK,SAAoB,OAAM,WAAU,SAAS,OAAO,SAClE,iBAAO,QADoB,KAE9B,IACE,UACF,oBAAC,YAAS,UAAU,GAAG,OAAM,WAAsB,MAAK,SAAQ,UAAU,OAAO,UAAU,SAAS,OAAO,SAAS,SAAQ,aACzH,iBAAO,QADkC,KAE5C,IACE;AAAA,IACN,CAAC,GACH,IACE;AAAA,EACN;AACA,SAAO;AACT;","names":[]}
@@ -0,0 +1,62 @@
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
@@ -0,0 +1 @@
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"]}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { PropertyActionsProps } from './ActionsProps';
3
+ export declare const PropertyActionsMenu: React.FC<PropertyActionsProps>;
4
+ //# sourceMappingURL=ActionsMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionsMenu.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsMenu.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAErD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAiC9D,CAAA"}
@@ -1,33 +1,11 @@
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
- var ActionsMenu_exports = {};
20
- __export(ActionsMenu_exports, {
21
- PropertyActionsMenu: () => PropertyActionsMenu
22
- });
23
- module.exports = __toCommonJS(ActionsMenu_exports);
24
- var import_jsx_runtime = require("react/jsx-runtime");
25
- var import_icons_material = require("@mui/icons-material");
26
- var import_material = require("@mui/material");
27
- var import_react_flexbox = require("@xylabs/react-flexbox");
28
- var import_react = require("react");
29
- const PropertyActionsMenu = ({ actions, ...props }) => {
30
- const [anchorEl, setAnchorEl] = (0, import_react.useState)(null);
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);
31
9
  const open = !!anchorEl;
32
10
  const handleClick = (event) => {
33
11
  setAnchorEl(event.currentTarget);
@@ -35,14 +13,15 @@ const PropertyActionsMenu = ({ actions, ...props }) => {
35
13
  const handleClose = () => {
36
14
  setAnchorEl(null);
37
15
  };
38
- return actions && actions?.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react_flexbox.FlexRow, { ...props, children: [
39
- /* @__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" }) }),
40
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Menu, { anchorEl, open, onClose: handleClose, children: actions?.map((action) => {
41
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
42
- import_material.MenuItem,
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,
43
21
  {
44
22
  onClick: () => {
45
- action?.onClick?.();
23
+ var _a;
24
+ (_a = action == null ? void 0 : action.onClick) == null ? void 0 : _a.call(action);
46
25
  handleClose();
47
26
  },
48
27
  children: action.name
@@ -52,8 +31,7 @@ const PropertyActionsMenu = ({ actions, ...props }) => {
52
31
  }) })
53
32
  ] }) : null;
54
33
  };
55
- // Annotate the CommonJS export names for ESM import in node:
56
- 0 && (module.exports = {
34
+ export {
57
35
  PropertyActionsMenu
58
- });
36
+ };
59
37
  //# sourceMappingURL=ActionsMenu.js.map
@@ -1 +1 @@
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;AAmBI;AAnBJ,4BAA2C;AAC3C,sBAA2C;AAC3C,2BAAwB;AACxB,mBAAyB;AAIlB,MAAM,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,WAAW,SAAS,SAAS,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,mBAAS,IAAI,CAAC,WAAW;AACxB,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,SAAS,MAAM;AACb,oBAAQ,UAAU;AAClB,wBAAY;AAAA,UACd;AAAA,UAEC,iBAAO;AAAA;AAAA,QANH,OAAO;AAAA,MAOd;AAAA,IAEJ,CAAC,GACH;AAAA,KACF,IACE;AACN;","names":["MoreHorizIcon"]}
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":[]}
@@ -0,0 +1,19 @@
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
@@ -0,0 +1 @@
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":[]}
@@ -0,0 +1,7 @@
1
+ import { FlexBoxProps } from '@xylabs/react-flexbox';
2
+ import { PropertyAction } from './Action';
3
+ export interface PropertyActionsProps extends FlexBoxProps {
4
+ actions?: PropertyAction[];
5
+ buttons?: boolean;
6
+ }
7
+ //# sourceMappingURL=ActionsProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionsProps.d.ts","sourceRoot":"","sources":["../../../src/components/ActionsProps.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAEzC,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,OAAO,CAAC,EAAE,cAAc,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
@@ -1,17 +1 @@
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
- var ActionsProps_exports = {};
16
- module.exports = __toCommonJS(ActionsProps_exports);
17
1
  //# sourceMappingURL=ActionsProps.js.map
@@ -1 +1 @@
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
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,97 @@
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
@@ -0,0 +1 @@
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"]}
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { PropertyGroupProps } from './Props';
3
+ export declare const PropertyGroup: React.FC<PropertyGroupProps>;
4
+ //# sourceMappingURL=Group.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../../../src/components/Group.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAkD,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAoC5F,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAEtD,CAAA"}