@xyo-network/react-address-render 2.81.9 → 2.82.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 (183) hide show
  1. package/dist/browser/components/RenderRowBox.d.cts +2 -1
  2. package/dist/browser/components/RenderRowBox.d.cts.map +1 -1
  3. package/dist/browser/components/RenderRowBox.d.mts +2 -1
  4. package/dist/browser/components/RenderRowBox.d.mts.map +1 -1
  5. package/dist/browser/components/RenderRowBox.d.ts +2 -1
  6. package/dist/browser/components/RenderRowBox.d.ts.map +1 -1
  7. package/dist/browser/components/favorite/FavoriteIconButton.d.cts +3 -2
  8. package/dist/browser/components/favorite/FavoriteIconButton.d.cts.map +1 -1
  9. package/dist/browser/components/favorite/FavoriteIconButton.d.mts +3 -2
  10. package/dist/browser/components/favorite/FavoriteIconButton.d.mts.map +1 -1
  11. package/dist/browser/components/favorite/FavoriteIconButton.d.ts +3 -2
  12. package/dist/browser/components/favorite/FavoriteIconButton.d.ts.map +1 -1
  13. package/dist/browser/components/favorite/FavoriteToggleSVG.d.cts +1 -0
  14. package/dist/browser/components/favorite/FavoriteToggleSVG.d.cts.map +1 -1
  15. package/dist/browser/components/favorite/FavoriteToggleSVG.d.mts +1 -0
  16. package/dist/browser/components/favorite/FavoriteToggleSVG.d.mts.map +1 -1
  17. package/dist/browser/components/favorite/FavoriteToggleSVG.d.ts +1 -0
  18. package/dist/browser/components/favorite/FavoriteToggleSVG.d.ts.map +1 -1
  19. package/dist/browser/components/favorite/Popper.d.cts +2 -2
  20. package/dist/browser/components/favorite/Popper.d.cts.map +1 -1
  21. package/dist/browser/components/favorite/Popper.d.mts +2 -2
  22. package/dist/browser/components/favorite/Popper.d.mts.map +1 -1
  23. package/dist/browser/components/favorite/Popper.d.ts +2 -2
  24. package/dist/browser/components/favorite/Popper.d.ts.map +1 -1
  25. package/dist/browser/components/favorite/PopperButtonGroup.d.cts +1 -0
  26. package/dist/browser/components/favorite/PopperButtonGroup.d.cts.map +1 -1
  27. package/dist/browser/components/favorite/PopperButtonGroup.d.mts +1 -0
  28. package/dist/browser/components/favorite/PopperButtonGroup.d.mts.map +1 -1
  29. package/dist/browser/components/favorite/PopperButtonGroup.d.ts +1 -0
  30. package/dist/browser/components/favorite/PopperButtonGroup.d.ts.map +1 -1
  31. package/dist/browser/components/favorite/index.d.cts +1 -1
  32. package/dist/browser/components/favorite/index.d.cts.map +1 -1
  33. package/dist/browser/components/favorite/index.d.mts +1 -1
  34. package/dist/browser/components/favorite/index.d.mts.map +1 -1
  35. package/dist/browser/components/favorite/index.d.ts +1 -1
  36. package/dist/browser/components/favorite/index.d.ts.map +1 -1
  37. package/dist/browser/components/favorite/lib/index.d.cts +1 -1
  38. package/dist/browser/components/favorite/lib/index.d.mts +1 -1
  39. package/dist/browser/components/favorite/lib/index.d.ts +1 -1
  40. package/dist/browser/components/index.d.cts +3 -3
  41. package/dist/browser/components/index.d.cts.map +1 -1
  42. package/dist/browser/components/index.d.mts +3 -3
  43. package/dist/browser/components/index.d.mts.map +1 -1
  44. package/dist/browser/components/index.d.ts +3 -3
  45. package/dist/browser/components/index.d.ts.map +1 -1
  46. package/dist/browser/components/lib/index.d.cts +1 -1
  47. package/dist/browser/components/lib/index.d.mts +1 -1
  48. package/dist/browser/components/lib/index.d.ts +1 -1
  49. package/dist/browser/index.cjs +173 -169
  50. package/dist/browser/index.cjs.map +1 -1
  51. package/dist/browser/index.d.cts +1 -1
  52. package/dist/browser/index.d.mts +1 -1
  53. package/dist/browser/index.d.ts +1 -1
  54. package/dist/browser/index.mjs +214 -0
  55. package/dist/browser/index.mjs.map +1 -0
  56. package/dist/neutral/components/RenderRowBox.d.cts +2 -1
  57. package/dist/neutral/components/RenderRowBox.d.cts.map +1 -1
  58. package/dist/neutral/components/RenderRowBox.d.mts +2 -1
  59. package/dist/neutral/components/RenderRowBox.d.mts.map +1 -1
  60. package/dist/neutral/components/RenderRowBox.d.ts +2 -1
  61. package/dist/neutral/components/RenderRowBox.d.ts.map +1 -1
  62. package/dist/neutral/components/favorite/FavoriteIconButton.d.cts +3 -2
  63. package/dist/neutral/components/favorite/FavoriteIconButton.d.cts.map +1 -1
  64. package/dist/neutral/components/favorite/FavoriteIconButton.d.mts +3 -2
  65. package/dist/neutral/components/favorite/FavoriteIconButton.d.mts.map +1 -1
  66. package/dist/neutral/components/favorite/FavoriteIconButton.d.ts +3 -2
  67. package/dist/neutral/components/favorite/FavoriteIconButton.d.ts.map +1 -1
  68. package/dist/neutral/components/favorite/FavoriteToggleSVG.d.cts +1 -0
  69. package/dist/neutral/components/favorite/FavoriteToggleSVG.d.cts.map +1 -1
  70. package/dist/neutral/components/favorite/FavoriteToggleSVG.d.mts +1 -0
  71. package/dist/neutral/components/favorite/FavoriteToggleSVG.d.mts.map +1 -1
  72. package/dist/neutral/components/favorite/FavoriteToggleSVG.d.ts +1 -0
  73. package/dist/neutral/components/favorite/FavoriteToggleSVG.d.ts.map +1 -1
  74. package/dist/neutral/components/favorite/Popper.d.cts +2 -2
  75. package/dist/neutral/components/favorite/Popper.d.cts.map +1 -1
  76. package/dist/neutral/components/favorite/Popper.d.mts +2 -2
  77. package/dist/neutral/components/favorite/Popper.d.mts.map +1 -1
  78. package/dist/neutral/components/favorite/Popper.d.ts +2 -2
  79. package/dist/neutral/components/favorite/Popper.d.ts.map +1 -1
  80. package/dist/neutral/components/favorite/PopperButtonGroup.d.cts +1 -0
  81. package/dist/neutral/components/favorite/PopperButtonGroup.d.cts.map +1 -1
  82. package/dist/neutral/components/favorite/PopperButtonGroup.d.mts +1 -0
  83. package/dist/neutral/components/favorite/PopperButtonGroup.d.mts.map +1 -1
  84. package/dist/neutral/components/favorite/PopperButtonGroup.d.ts +1 -0
  85. package/dist/neutral/components/favorite/PopperButtonGroup.d.ts.map +1 -1
  86. package/dist/neutral/components/favorite/index.d.cts +1 -1
  87. package/dist/neutral/components/favorite/index.d.cts.map +1 -1
  88. package/dist/neutral/components/favorite/index.d.mts +1 -1
  89. package/dist/neutral/components/favorite/index.d.mts.map +1 -1
  90. package/dist/neutral/components/favorite/index.d.ts +1 -1
  91. package/dist/neutral/components/favorite/index.d.ts.map +1 -1
  92. package/dist/neutral/components/favorite/lib/index.d.cts +1 -1
  93. package/dist/neutral/components/favorite/lib/index.d.mts +1 -1
  94. package/dist/neutral/components/favorite/lib/index.d.ts +1 -1
  95. package/dist/neutral/components/index.d.cts +3 -3
  96. package/dist/neutral/components/index.d.cts.map +1 -1
  97. package/dist/neutral/components/index.d.mts +3 -3
  98. package/dist/neutral/components/index.d.mts.map +1 -1
  99. package/dist/neutral/components/index.d.ts +3 -3
  100. package/dist/neutral/components/index.d.ts.map +1 -1
  101. package/dist/neutral/components/lib/index.d.cts +1 -1
  102. package/dist/neutral/components/lib/index.d.mts +1 -1
  103. package/dist/neutral/components/lib/index.d.ts +1 -1
  104. package/dist/neutral/index.cjs +173 -169
  105. package/dist/neutral/index.cjs.map +1 -1
  106. package/dist/neutral/index.d.cts +1 -1
  107. package/dist/neutral/index.d.mts +1 -1
  108. package/dist/neutral/index.d.ts +1 -1
  109. package/dist/neutral/index.mjs +214 -0
  110. package/dist/neutral/index.mjs.map +1 -0
  111. package/dist/node/components/RenderRowBox.d.cts +2 -1
  112. package/dist/node/components/RenderRowBox.d.cts.map +1 -1
  113. package/dist/node/components/RenderRowBox.d.mts +2 -1
  114. package/dist/node/components/RenderRowBox.d.mts.map +1 -1
  115. package/dist/node/components/RenderRowBox.d.ts +2 -1
  116. package/dist/node/components/RenderRowBox.d.ts.map +1 -1
  117. package/dist/node/components/favorite/FavoriteIconButton.d.cts +3 -2
  118. package/dist/node/components/favorite/FavoriteIconButton.d.cts.map +1 -1
  119. package/dist/node/components/favorite/FavoriteIconButton.d.mts +3 -2
  120. package/dist/node/components/favorite/FavoriteIconButton.d.mts.map +1 -1
  121. package/dist/node/components/favorite/FavoriteIconButton.d.ts +3 -2
  122. package/dist/node/components/favorite/FavoriteIconButton.d.ts.map +1 -1
  123. package/dist/node/components/favorite/FavoriteToggleSVG.d.cts +1 -0
  124. package/dist/node/components/favorite/FavoriteToggleSVG.d.cts.map +1 -1
  125. package/dist/node/components/favorite/FavoriteToggleSVG.d.mts +1 -0
  126. package/dist/node/components/favorite/FavoriteToggleSVG.d.mts.map +1 -1
  127. package/dist/node/components/favorite/FavoriteToggleSVG.d.ts +1 -0
  128. package/dist/node/components/favorite/FavoriteToggleSVG.d.ts.map +1 -1
  129. package/dist/node/components/favorite/Popper.d.cts +2 -2
  130. package/dist/node/components/favorite/Popper.d.cts.map +1 -1
  131. package/dist/node/components/favorite/Popper.d.mts +2 -2
  132. package/dist/node/components/favorite/Popper.d.mts.map +1 -1
  133. package/dist/node/components/favorite/Popper.d.ts +2 -2
  134. package/dist/node/components/favorite/Popper.d.ts.map +1 -1
  135. package/dist/node/components/favorite/PopperButtonGroup.d.cts +1 -0
  136. package/dist/node/components/favorite/PopperButtonGroup.d.cts.map +1 -1
  137. package/dist/node/components/favorite/PopperButtonGroup.d.mts +1 -0
  138. package/dist/node/components/favorite/PopperButtonGroup.d.mts.map +1 -1
  139. package/dist/node/components/favorite/PopperButtonGroup.d.ts +1 -0
  140. package/dist/node/components/favorite/PopperButtonGroup.d.ts.map +1 -1
  141. package/dist/node/components/favorite/index.d.cts +1 -1
  142. package/dist/node/components/favorite/index.d.cts.map +1 -1
  143. package/dist/node/components/favorite/index.d.mts +1 -1
  144. package/dist/node/components/favorite/index.d.mts.map +1 -1
  145. package/dist/node/components/favorite/index.d.ts +1 -1
  146. package/dist/node/components/favorite/index.d.ts.map +1 -1
  147. package/dist/node/components/favorite/lib/index.d.cts +1 -1
  148. package/dist/node/components/favorite/lib/index.d.mts +1 -1
  149. package/dist/node/components/favorite/lib/index.d.ts +1 -1
  150. package/dist/node/components/index.d.cts +3 -3
  151. package/dist/node/components/index.d.cts.map +1 -1
  152. package/dist/node/components/index.d.mts +3 -3
  153. package/dist/node/components/index.d.mts.map +1 -1
  154. package/dist/node/components/index.d.ts +3 -3
  155. package/dist/node/components/index.d.ts.map +1 -1
  156. package/dist/node/components/lib/index.d.cts +1 -1
  157. package/dist/node/components/lib/index.d.mts +1 -1
  158. package/dist/node/components/lib/index.d.ts +1 -1
  159. package/dist/node/index.cjs +173 -169
  160. package/dist/node/index.cjs.map +1 -1
  161. package/dist/node/index.d.cts +1 -1
  162. package/dist/node/index.d.mts +1 -1
  163. package/dist/node/index.d.ts +1 -1
  164. package/dist/node/index.mjs +214 -0
  165. package/dist/node/index.mjs.map +1 -0
  166. package/package.json +15 -15
  167. package/src/components/RenderRowBox.stories.tsx +4 -5
  168. package/src/components/RenderRowBox.tsx +24 -20
  169. package/src/components/favorite/FavoriteIconButton.tsx +6 -6
  170. package/src/components/favorite/FavoriteToggleSVG.tsx +4 -3
  171. package/src/components/favorite/Popper.tsx +8 -10
  172. package/src/components/favorite/PopperButtonGroup.tsx +15 -12
  173. package/src/components/favorite/index.ts +1 -1
  174. package/src/components/favorite/lib/index.ts +1 -1
  175. package/src/components/index.ts +3 -3
  176. package/src/components/lib/index.ts +1 -1
  177. package/src/index.ts +1 -1
  178. package/dist/browser/index.js +0 -218
  179. package/dist/browser/index.js.map +0 -1
  180. package/dist/neutral/index.js +0 -218
  181. package/dist/neutral/index.js.map +0 -1
  182. package/dist/node/index.js +0 -218
  183. package/dist/node/index.js.map +0 -1
@@ -1,4 +1,4 @@
1
- export * from './favorite/index.js';
2
- export * from './lib/index.js';
3
- export * from './RenderRowBox.js';
1
+ export * from './favorite/index.ts';
2
+ export * from './lib/index.ts';
3
+ export * from './RenderRowBox.tsx';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './FavoriteItemEvent.js';
1
+ export * from './FavoriteItemEvent.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './FavoriteItemEvent.js';
1
+ export * from './FavoriteItemEvent.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './FavoriteItemEvent.js';
1
+ export * from './FavoriteItemEvent.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
9
  var __export = (target, all) => {
7
10
  for (var name in all)
8
11
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
15
18
  }
16
19
  return to;
17
20
  };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
18
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
30
 
20
31
  // src/index.ts
@@ -30,165 +41,159 @@ module.exports = __toCommonJS(src_exports);
30
41
  var import_material3 = require("@mui/material");
31
42
  var import_react_event = require("@xyo-network/react-event");
32
43
  var import_react_shared = require("@xyo-network/react-shared");
33
- var import_react2 = require("react");
44
+ var import_react4 = __toESM(require("react"), 1);
34
45
 
35
46
  // src/components/lib/FavoriteItemEvent.ts
36
- var generateFavoriteEvent = (favorite, favoriteType, favoriteValue, name) => ({
47
+ var generateFavoriteEvent = /* @__PURE__ */ __name((favorite, favoriteType, favoriteValue, name) => ({
37
48
  favorite: !!favorite,
38
49
  favoriteType,
39
50
  favoriteValue,
40
51
  name
41
- });
52
+ }), "generateFavoriteEvent");
42
53
 
43
54
  // src/components/favorite/FavoriteToggleSVG.tsx
44
55
  var import_icons_material = require("@mui/icons-material");
45
- var import_jsx_runtime = require("react/jsx-runtime");
46
- var FavoriteToggleSVG = ({ favorite }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: favorite ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons_material.Star, { className: "favorite-icon", component: "svg", color: "secondary", fontSize: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons_material.StarBorder, { className: "favorite-icon", fontSize: "small" }) });
56
+ var import_react = __toESM(require("react"), 1);
57
+ var FavoriteToggleSVG = /* @__PURE__ */ __name(({ favorite }) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, favorite ? /* @__PURE__ */ import_react.default.createElement(import_icons_material.Star, {
58
+ className: "favorite-icon",
59
+ component: "svg",
60
+ color: "secondary",
61
+ fontSize: "small"
62
+ }) : /* @__PURE__ */ import_react.default.createElement(import_icons_material.StarBorder, {
63
+ className: "favorite-icon",
64
+ fontSize: "small"
65
+ })), "FavoriteToggleSVG");
47
66
 
48
67
  // src/components/favorite/lib/PopperId.ts
49
68
  var popperId = "favorite-popper";
50
69
 
51
70
  // src/components/favorite/Popper.tsx
52
71
  var import_material2 = require("@mui/material");
53
- var import_react = require("react");
72
+ var import_react3 = __toESM(require("react"), 1);
54
73
 
55
74
  // src/components/favorite/PopperButtonGroup.tsx
56
75
  var import_icons_material2 = require("@mui/icons-material");
57
76
  var import_material = require("@mui/material");
58
- var import_jsx_runtime2 = require("react/jsx-runtime");
59
- var PopperButtonGroup = ({ name, onConfirmFavorite, favorite, ...props }) => {
60
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_material.ButtonGroup, { ...props, children: [
61
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
62
- import_material.Button,
63
- {
64
- title: "Save Favorite",
65
- variant: "contained",
66
- onClick: (e) => {
67
- e.stopPropagation();
68
- onConfirmFavorite == null ? void 0 : onConfirmFavorite(name, true);
69
- },
70
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material2.Star, {})
71
- }
72
- ),
73
- favorite ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
74
- import_material.Button,
75
- {
76
- title: "Remove Favorite",
77
- variant: "contained",
78
- onClick: (e) => {
79
- e.stopPropagation();
80
- onConfirmFavorite == null ? void 0 : onConfirmFavorite(name, false);
81
- },
82
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons_material2.Delete, {})
83
- }
84
- ) : null
85
- ] });
86
- };
77
+ var import_react2 = __toESM(require("react"), 1);
78
+ var PopperButtonGroup = /* @__PURE__ */ __name(({ name, onConfirmFavorite, favorite, ...props }) => {
79
+ return /* @__PURE__ */ import_react2.default.createElement(import_material.ButtonGroup, props, /* @__PURE__ */ import_react2.default.createElement(import_material.Button, {
80
+ title: "Save Favorite",
81
+ variant: "contained",
82
+ onClick: /* @__PURE__ */ __name((e) => {
83
+ e.stopPropagation();
84
+ onConfirmFavorite == null ? void 0 : onConfirmFavorite(name, true);
85
+ }, "onClick")
86
+ }, /* @__PURE__ */ import_react2.default.createElement(import_icons_material2.Star, null)), favorite ? /* @__PURE__ */ import_react2.default.createElement(import_material.Button, {
87
+ title: "Remove Favorite",
88
+ variant: "contained",
89
+ onClick: /* @__PURE__ */ __name((e) => {
90
+ e.stopPropagation();
91
+ onConfirmFavorite == null ? void 0 : onConfirmFavorite(name, false);
92
+ }, "onClick")
93
+ }, /* @__PURE__ */ import_react2.default.createElement(import_icons_material2.Delete, null)) : null);
94
+ }, "PopperButtonGroup");
87
95
 
88
96
  // src/components/favorite/Popper.tsx
89
- var import_jsx_runtime3 = require("react/jsx-runtime");
90
- var FavoritePopper = (0, import_react.forwardRef)(
91
- ({
92
- name: nameProp,
97
+ var FavoritePopper = /* @__PURE__ */ (0, import_react3.forwardRef)(({ name: nameProp, favorite, favoriteRef, onClickAway, onConfirmFavorite, ...props }, ref) => {
98
+ const [name, setName] = (0, import_react3.useState)(nameProp);
99
+ (0, import_react3.useEffect)(() => {
100
+ setName(nameProp);
101
+ }, [
102
+ nameProp
103
+ ]);
104
+ return /* @__PURE__ */ import_react3.default.createElement(import_material2.ClickAwayListener, {
105
+ onClickAway: onClickAway ?? (() => null)
106
+ }, /* @__PURE__ */ import_react3.default.createElement(PopperStyled, {
107
+ id: popperId,
108
+ anchorEl: favoriteRef == null ? void 0 : favoriteRef.current,
109
+ onClick: /* @__PURE__ */ __name((e) => e.stopPropagation(), "onClick"),
110
+ onTouchStart: /* @__PURE__ */ __name((e) => e.stopPropagation(), "onTouchStart"),
111
+ transition: true,
112
+ ref,
113
+ ...props
114
+ }, ({ TransitionProps }) => /* @__PURE__ */ import_react3.default.createElement(import_material2.Fade, {
115
+ ...TransitionProps,
116
+ timeout: 350
117
+ }, /* @__PURE__ */ import_react3.default.createElement(import_material2.Card, null, /* @__PURE__ */ import_react3.default.createElement(import_material2.CardContent, {
118
+ sx: {
119
+ display: "flex",
120
+ gap: 1
121
+ }
122
+ }, /* @__PURE__ */ import_react3.default.createElement(import_material2.TextField, {
123
+ autoFocus: true,
124
+ label: "Favorite Name",
125
+ placeholder: "optional",
126
+ size: "small",
127
+ value: name ?? "",
128
+ onChange: /* @__PURE__ */ __name((e) => setName(e.target.value), "onChange")
129
+ }), /* @__PURE__ */ import_react3.default.createElement(PopperButtonGroup, {
93
130
  favorite,
94
- favoriteRef,
95
- onClickAway = () => {
96
- return;
97
- },
98
131
  onConfirmFavorite,
99
- ...props
100
- }, ref) => {
101
- const [name, setName] = (0, import_react.useState)(nameProp);
102
- (0, import_react.useEffect)(() => {
103
- setName(nameProp);
104
- }, [nameProp]);
105
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material2.ClickAwayListener, { onClickAway, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
106
- PopperStyled,
107
- {
108
- id: popperId,
109
- anchorEl: favoriteRef == null ? void 0 : favoriteRef.current,
110
- onClick: (e) => e.stopPropagation(),
111
- onTouchStart: (e) => e.stopPropagation(),
112
- transition: true,
113
- ref,
114
- ...props,
115
- children: ({ TransitionProps }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material2.Fade, { ...TransitionProps, timeout: 350, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material2.Card, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_material2.CardContent, { sx: { display: "flex", gap: 1 }, children: [
116
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
117
- import_material2.TextField,
118
- {
119
- autoFocus: true,
120
- label: "Favorite Name",
121
- placeholder: "optional",
122
- size: "small",
123
- value: name ?? "",
124
- onChange: (e) => setName(e.target.value)
125
- }
126
- ),
127
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(PopperButtonGroup, { favorite, onConfirmFavorite, name })
128
- ] }) }) })
129
- }
130
- ) });
131
- }
132
- );
132
+ name
133
+ }))))));
134
+ });
133
135
  FavoritePopper.displayName = "FavoritePopper";
134
- var PopperStyled = (0, import_material2.styled)(import_material2.Popper, { name: "PopperStyled" })(() => ({ zIndex: 9999 }));
136
+ var PopperStyled = (0, import_material2.styled)(import_material2.Popper, {
137
+ name: "PopperStyled"
138
+ })(() => ({
139
+ zIndex: 9999
140
+ }));
135
141
 
136
142
  // src/components/favorite/FavoriteIconButton.tsx
137
- var import_jsx_runtime4 = require("react/jsx-runtime");
138
- var FavoriteIconButton = (0, import_react2.forwardRef)(
139
- ({ children, favorite: favoriteProp, name, valueType, value, ...props }, ref) => {
140
- const [openPopper, setOpenPopper] = (0, import_react2.useState)(false);
141
- const [favorite, setFavorite] = (0, import_react2.useState)(favoriteProp);
142
- (0, import_react2.useEffect)(() => {
143
- setFavorite(favoriteProp);
144
- }, [favoriteProp]);
145
- const sharedRef = (0, import_react_shared.useShareForwardedRef)(ref);
146
- const [buttonRef, dispatch] = (0, import_react_event.useEvent)(void 0, sharedRef);
147
- const onConfirmFavorite = (name2, newFavoriteState) => {
148
- const favoriteEvent = generateFavoriteEvent(!!newFavoriteState, valueType, value, name2);
149
- dispatch("address", "favorite", JSON.stringify(favoriteEvent));
150
- setFavorite(newFavoriteState);
151
- setOpenPopper(false);
152
- };
153
- const starRef = (0, import_react2.useRef)(null);
154
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
155
- IconButtonCondensed,
156
- {
157
- "aria-describedby": popperId,
158
- ref: buttonRef,
159
- onClick: (event) => {
160
- event.stopPropagation();
161
- setOpenPopper(!openPopper);
162
- },
163
- onTouchStart: (event) => {
164
- event.stopPropagation();
165
- setOpenPopper(!openPopper);
166
- },
167
- onMouseDown: (e) => e.stopPropagation(),
168
- sx: { lineHeight: 0, p: 0.25 },
169
- ...props,
170
- children: [
171
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { ref: starRef, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(FavoriteToggleSVG, { favorite }) }),
172
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
173
- FavoritePopper,
174
- {
175
- sx: { zIndex: 1301 },
176
- name,
177
- favorite,
178
- favoriteRef: starRef,
179
- open: openPopper,
180
- onConfirmFavorite,
181
- onClickAway: () => setOpenPopper(false)
182
- }
183
- ),
184
- children
185
- ]
186
- }
187
- );
188
- }
189
- );
143
+ var FavoriteIconButton = /* @__PURE__ */ (0, import_react4.forwardRef)(({ children, favorite: favoriteProp, name, valueType, value, ...props }, ref) => {
144
+ const [openPopper, setOpenPopper] = (0, import_react4.useState)(false);
145
+ const [favorite, setFavorite] = (0, import_react4.useState)(favoriteProp);
146
+ (0, import_react4.useEffect)(() => {
147
+ setFavorite(favoriteProp);
148
+ }, [
149
+ favoriteProp
150
+ ]);
151
+ const sharedRef = (0, import_react_shared.useShareForwardedRef)(ref);
152
+ const [buttonRef, dispatch] = (0, import_react_event.useEvent)(void 0, sharedRef);
153
+ const onConfirmFavorite = /* @__PURE__ */ __name((name2, newFavoriteState) => {
154
+ const favoriteEvent = generateFavoriteEvent(!!newFavoriteState, valueType, value, name2);
155
+ dispatch("address", "favorite", JSON.stringify(favoriteEvent));
156
+ setFavorite(newFavoriteState);
157
+ setOpenPopper(false);
158
+ }, "onConfirmFavorite");
159
+ const starRef = (0, import_react4.useRef)(null);
160
+ return /* @__PURE__ */ import_react4.default.createElement(IconButtonCondensed, {
161
+ "aria-describedby": popperId,
162
+ ref: buttonRef,
163
+ onClick: /* @__PURE__ */ __name((event) => {
164
+ event.stopPropagation();
165
+ setOpenPopper(!openPopper);
166
+ }, "onClick"),
167
+ onTouchStart: /* @__PURE__ */ __name((event) => {
168
+ event.stopPropagation();
169
+ setOpenPopper(!openPopper);
170
+ }, "onTouchStart"),
171
+ onMouseDown: /* @__PURE__ */ __name((e) => e.stopPropagation(), "onMouseDown"),
172
+ sx: {
173
+ lineHeight: 0,
174
+ p: 0.25
175
+ },
176
+ ...props
177
+ }, /* @__PURE__ */ import_react4.default.createElement("span", {
178
+ ref: starRef
179
+ }, /* @__PURE__ */ import_react4.default.createElement(FavoriteToggleSVG, {
180
+ favorite
181
+ })), /* @__PURE__ */ import_react4.default.createElement(FavoritePopper, {
182
+ sx: {
183
+ zIndex: 1301
184
+ },
185
+ name,
186
+ favorite,
187
+ favoriteRef: starRef,
188
+ open: openPopper,
189
+ onConfirmFavorite,
190
+ onClickAway: /* @__PURE__ */ __name(() => setOpenPopper(false), "onClickAway")
191
+ }), children);
192
+ });
190
193
  FavoriteIconButton.displayName = "FavoriteIconButton";
191
- var IconButtonCondensed = (0, import_material3.styled)(import_material3.IconButton, { name: "IconButtonCondensed" })(({ theme }) => ({
194
+ var IconButtonCondensed = (0, import_material3.styled)(import_material3.IconButton, {
195
+ name: "IconButtonCondensed"
196
+ })(({ theme }) => ({
192
197
  lineHeight: 0,
193
198
  padding: theme.spacing(0.25)
194
199
  }));
@@ -199,44 +204,43 @@ var import_react_flexbox = require("@xylabs/react-flexbox");
199
204
  var import_react_identicon = require("@xylabs/react-identicon");
200
205
  var import_react_event2 = require("@xyo-network/react-event");
201
206
  var import_react_shared2 = require("@xyo-network/react-shared");
202
- var import_react3 = require("react");
203
- var import_jsx_runtime5 = require("react/jsx-runtime");
204
- var AddressRenderRowBox = (0, import_react3.forwardRef)(
205
- ({ address, children, disableSharedRef, favorite: favoriteProp = false, iconOnly, iconSize = 24, icons, name, showFavorite = false, ...props }, ref) => {
206
- const theme = (0, import_material4.useTheme)();
207
- const sharedRef = (0, import_react_shared2.useShareForwardedRef)(ref);
208
- const [elementRef, dispatch] = (0, import_react_event2.useEvent)(void 0, sharedRef);
209
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
210
- import_react_flexbox.FlexRow,
211
- {
212
- gap: 2,
213
- justifyContent: "flex-start",
214
- ref: elementRef,
215
- onClick: () => {
216
- if (address) {
217
- dispatch("address", "click", address);
218
- }
219
- },
220
- ...props,
221
- children: [
222
- icons && address ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_material4.ListItemIcon, { sx: { minWidth: 0 }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_identicon.Identicon, { size: iconSize, value: address }) }) : null,
223
- iconOnly ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
224
- import_react_shared2.EllipsizeBox,
225
- {
226
- disableSharedRef,
227
- ellipsisPosition: "end",
228
- width: "100%",
229
- typographyProps: { fontSize: theme.typography.body1.fontSize },
230
- children: name ?? address
231
- }
232
- ),
233
- children,
234
- showFavorite && address ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FavoriteIconButton, { name, size: "small", value: address, valueType: "address", favorite: favoriteProp }) : null
235
- ]
207
+ var import_react5 = __toESM(require("react"), 1);
208
+ var AddressRenderRowBox = /* @__PURE__ */ (0, import_react5.forwardRef)(({ address, children, disableSharedRef, favorite: favoriteProp = false, iconOnly, iconSize = 24, icons, name, showFavorite = false, ...props }, ref) => {
209
+ const theme = (0, import_material4.useTheme)();
210
+ const sharedRef = (0, import_react_shared2.useShareForwardedRef)(ref);
211
+ const [elementRef, dispatch] = (0, import_react_event2.useEvent)(void 0, sharedRef);
212
+ return /* @__PURE__ */ import_react5.default.createElement(import_react_flexbox.FlexRow, {
213
+ gap: 2,
214
+ justifyContent: "flex-start",
215
+ ref: elementRef,
216
+ onClick: /* @__PURE__ */ __name(() => {
217
+ if (address) {
218
+ dispatch("address", "click", address);
236
219
  }
237
- );
238
- }
239
- );
220
+ }, "onClick"),
221
+ ...props
222
+ }, icons && address ? /* @__PURE__ */ import_react5.default.createElement(import_material4.ListItemIcon, {
223
+ sx: {
224
+ minWidth: 0
225
+ }
226
+ }, /* @__PURE__ */ import_react5.default.createElement(import_react_identicon.Identicon, {
227
+ size: iconSize,
228
+ value: address
229
+ })) : null, iconOnly ? null : /* @__PURE__ */ import_react5.default.createElement(import_react_shared2.EllipsizeBox, {
230
+ disableSharedRef,
231
+ ellipsisPosition: "end",
232
+ width: "100%",
233
+ typographyProps: {
234
+ fontSize: theme.typography.body1.fontSize
235
+ }
236
+ }, name ?? address), children, showFavorite && address ? /* @__PURE__ */ import_react5.default.createElement(FavoriteIconButton, {
237
+ name,
238
+ size: "small",
239
+ value: address,
240
+ valueType: "address",
241
+ favorite: favoriteProp
242
+ }) : null);
243
+ });
240
244
  AddressRenderRowBox.displayName = "AddressRenderRowBox";
241
245
  // Annotate the CommonJS export names for ESM import in node:
242
246
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/components/favorite/FavoriteIconButton.tsx","../../src/components/lib/FavoriteItemEvent.ts","../../src/components/favorite/FavoriteToggleSVG.tsx","../../src/components/favorite/lib/PopperId.ts","../../src/components/favorite/Popper.tsx","../../src/components/favorite/PopperButtonGroup.tsx","../../src/components/RenderRowBox.tsx"],"sourcesContent":["export * from './components/index.js'\n","import { IconButton, IconButtonProps, styled } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { useEvent } from '@xyo-network/react-event'\nimport { useShareForwardedRef } from '@xyo-network/react-shared'\nimport { forwardRef, useEffect, useRef, useState } from 'react'\n\nimport { FavoriteItemEvent, generateFavoriteEvent } from '../lib/index.js'\nimport { FavoriteToggleSVG } from './FavoriteToggleSVG.js'\nimport { popperId } from './lib/index.js'\nimport { FavoritePopper } from './Popper.js'\n\nexport interface FavoriteIconButtonProps extends WithChildren, IconButtonProps {\n favorite?: FavoriteItemEvent['favorite']\n name?: FavoriteItemEvent['name']\n value?: string\n valueType?: FavoriteItemEvent['favoriteType']\n}\n\nexport const FavoriteIconButton = forwardRef<HTMLButtonElement, FavoriteIconButtonProps>(\n ({ children, favorite: favoriteProp, name, valueType, value, ...props }, ref) => {\n const [openPopper, setOpenPopper] = useState(false)\n\n const [favorite, setFavorite] = useState(favoriteProp)\n useEffect(() => {\n setFavorite(favoriteProp)\n }, [favoriteProp])\n\n const sharedRef = useShareForwardedRef(ref)\n const [buttonRef, dispatch] = useEvent(undefined, sharedRef)\n\n const onConfirmFavorite = (name?: string, newFavoriteState?: boolean) => {\n const favoriteEvent = generateFavoriteEvent(!!newFavoriteState, valueType, value, name)\n dispatch('address', 'favorite', JSON.stringify(favoriteEvent))\n setFavorite(newFavoriteState)\n setOpenPopper(false)\n }\n\n const starRef = useRef<HTMLSpanElement>(null)\n\n return (\n <IconButtonCondensed\n aria-describedby={popperId}\n ref={buttonRef}\n onClick={(event) => {\n event.stopPropagation()\n setOpenPopper(!openPopper)\n }}\n onTouchStart={(event) => {\n event.stopPropagation()\n setOpenPopper(!openPopper)\n }}\n onMouseDown={(e) => e.stopPropagation()}\n sx={{ lineHeight: 0, p: 0.25 }}\n {...props}\n >\n <span ref={starRef}>\n <FavoriteToggleSVG favorite={favorite} />\n </span>\n <FavoritePopper\n sx={{ zIndex: 1301 }}\n name={name}\n favorite={favorite}\n favoriteRef={starRef}\n open={openPopper}\n onConfirmFavorite={onConfirmFavorite}\n onClickAway={() => setOpenPopper(false)}\n />\n {children}\n </IconButtonCondensed>\n )\n },\n)\n\nFavoriteIconButton.displayName = 'FavoriteIconButton'\n\nconst IconButtonCondensed = styled(IconButton, { name: 'IconButtonCondensed' })(({ theme }) => ({\n lineHeight: 0,\n padding: theme.spacing(0.25),\n}))\n","export interface FavoriteItemEvent {\n favorite?: boolean\n favoriteType?: FavoriteType\n favoriteValue?: string\n name?: string\n}\n\nexport type FavoriteType = 'address' | 'schema' | 'hash'\n\nexport const generateFavoriteEvent = (favorite?: boolean, favoriteType?: FavoriteType, favoriteValue?: string, name?: string): FavoriteItemEvent => ({\n favorite: !!favorite,\n favoriteType,\n favoriteValue,\n name,\n})\n","import { Star as StarIcon, StarBorder as StarBorderIcon } from '@mui/icons-material'\n\nexport const FavoriteToggleSVG: React.FC<{ favorite?: boolean }> = ({ favorite }) => (\n <>\n {favorite ?\n <StarIcon className=\"favorite-icon\" component={'svg'} color=\"secondary\" fontSize=\"small\" />\n : <StarBorderIcon className=\"favorite-icon\" fontSize=\"small\" />}\n </>\n)\n","export const popperId = 'favorite-popper'\n","import { Card, CardContent, ClickAwayListener, Fade, Popper, PopperProps, styled, TextField } from '@mui/material'\nimport { forwardRef, RefObject, useEffect, useState } from 'react'\n\nimport { popperId } from './lib/index.js'\nimport { PopperButtonGroup } from './PopperButtonGroup.js'\n\nexport interface FavoritePopperProps extends PopperProps {\n favorite?: boolean\n favoriteRef?: RefObject<HTMLElement>\n name?: string\n onClickAway?: (event: MouseEvent | TouchEvent) => void\n onConfirmFavorite?: (name?: string, newFavoriteState?: boolean) => void\n}\nexport const FavoritePopper = forwardRef<HTMLDivElement, FavoritePopperProps>(\n (\n {\n name: nameProp,\n favorite,\n favoriteRef,\n onClickAway = () => {\n return\n },\n onConfirmFavorite,\n ...props\n },\n ref,\n ) => {\n const [name, setName] = useState(nameProp)\n useEffect(() => {\n setName(nameProp)\n }, [nameProp])\n\n return (\n <ClickAwayListener onClickAway={onClickAway}>\n <PopperStyled\n id={popperId}\n anchorEl={favoriteRef?.current}\n onClick={(e) => e.stopPropagation()}\n onTouchStart={(e) => e.stopPropagation()}\n transition\n ref={ref}\n {...props}\n >\n {({ TransitionProps }) => (\n <Fade {...TransitionProps} timeout={350}>\n <Card>\n <CardContent sx={{ display: 'flex', gap: 1 }}>\n <TextField\n autoFocus\n label=\"Favorite Name\"\n placeholder=\"optional\"\n size=\"small\"\n value={name ?? ''}\n onChange={(e) => setName(e.target.value)}\n />\n <PopperButtonGroup favorite={favorite} onConfirmFavorite={onConfirmFavorite} name={name} />\n </CardContent>\n </Card>\n </Fade>\n )}\n </PopperStyled>\n </ClickAwayListener>\n )\n },\n)\n\nFavoritePopper.displayName = 'FavoritePopper'\n\n// Ensure the popper is over all other mui portal elements\nconst PopperStyled = styled(Popper, { name: 'PopperStyled' })(() => ({ zIndex: 9999 }))\n","import { Delete as DeleteIcon, Star as StarIcon } from '@mui/icons-material'\nimport { Button, ButtonGroup, ButtonGroupProps } from '@mui/material'\n\nexport interface FavoritePopperProps extends ButtonGroupProps {\n favorite?: boolean\n name?: string\n onConfirmFavorite?: (name?: string, newFavoriteState?: boolean) => void\n}\n\nexport const PopperButtonGroup: React.FC<FavoritePopperProps> = ({ name, onConfirmFavorite, favorite, ...props }) => {\n return (\n <ButtonGroup {...props}>\n <Button\n title=\"Save Favorite\"\n variant=\"contained\"\n onClick={(e) => {\n e.stopPropagation()\n onConfirmFavorite?.(name, true)\n }}\n >\n <StarIcon />\n </Button>\n {favorite ?\n <Button\n title=\"Remove Favorite\"\n variant=\"contained\"\n onClick={(e) => {\n e.stopPropagation()\n onConfirmFavorite?.(name, false)\n }}\n >\n <DeleteIcon />\n </Button>\n : null}\n </ButtonGroup>\n )\n}\n","import { ListItemIcon, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { Identicon } from '@xylabs/react-identicon'\nimport { useEvent } from '@xyo-network/react-event'\nimport { EllipsizeBox, useShareForwardedRef } from '@xyo-network/react-shared'\nimport { forwardRef } from 'react'\n\nimport { FavoriteIconButton } from './favorite/index.js'\n\nexport interface AddressRenderRowBoxProps extends FlexBoxProps {\n address?: string | null\n disableSharedRef?: boolean\n favorite?: boolean\n iconOnly?: boolean\n iconSize?: number\n icons?: boolean\n name?: string\n showFavorite?: boolean\n}\n\nexport const AddressRenderRowBox = forwardRef<HTMLElement, AddressRenderRowBoxProps>(\n (\n { address, children, disableSharedRef, favorite: favoriteProp = false, iconOnly, iconSize = 24, icons, name, showFavorite = false, ...props },\n ref,\n ) => {\n const theme = useTheme()\n\n const sharedRef = useShareForwardedRef(ref)\n const [elementRef, dispatch] = useEvent(undefined, sharedRef)\n\n return (\n <FlexRow\n gap={2}\n justifyContent=\"flex-start\"\n ref={elementRef}\n onClick={() => {\n if (address) {\n dispatch('address', 'click', address)\n }\n }}\n {...props}\n >\n {icons && address ?\n <ListItemIcon sx={{ minWidth: 0 }}>\n <Identicon size={iconSize} value={address} />\n </ListItemIcon>\n : null}\n {iconOnly ? null : (\n <EllipsizeBox\n disableSharedRef={disableSharedRef}\n ellipsisPosition={'end'}\n width=\"100%\"\n typographyProps={{ fontSize: theme.typography.body1.fontSize }}\n >\n {name ?? address}\n </EllipsizeBox>\n )}\n {children}\n {showFavorite && address ?\n <FavoriteIconButton name={name} size={'small'} value={address} valueType={'address'} favorite={favoriteProp} />\n : null}\n </FlexRow>\n )\n },\n)\n\nAddressRenderRowBox.displayName = 'AddressRenderRowBox'\n"],"m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;AAAA,EAC9F,YAAY;AAAA,EACZ,SAAS,MAAM,QAAQ,IAAI;AAC7B,EAAE;;;AM9EF,IAAAC,mBAAuC;AACvC,2BAAsC;AACtC,6BAA0B;AAC1B,IAAAC,sBAAyB;AACzB,IAAAC,uBAAmD;AACnD,IAAAC,gBAA2B;AA0BrB,IAAAC,sBAAA;AAXC,IAAM,0BAAsB;AAAA,EACjC,CACE,EAAE,SAAS,UAAU,kBAAkB,UAAU,eAAe,OAAO,UAAU,WAAW,IAAI,OAAO,MAAM,eAAe,OAAO,GAAG,MAAM,GAC5I,QACG;AACH,UAAM,YAAQ,2BAAS;AAEvB,UAAM,gBAAY,2CAAqB,GAAG;AAC1C,UAAM,CAAC,YAAY,QAAQ,QAAI,8BAAS,QAAW,SAAS;AAE5D,WACE;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,gBAAe;AAAA,QACf,KAAK;AAAA,QACL,SAAS,MAAM;AACb,cAAI,SAAS;AACX,qBAAS,WAAW,SAAS,OAAO;AAAA,UACtC;AAAA,QACF;AAAA,QACC,GAAG;AAAA,QAEH;AAAA,mBAAS,UACR,6CAAC,iCAAa,IAAI,EAAE,UAAU,EAAE,GAC9B,uDAAC,oCAAU,MAAM,UAAU,OAAO,SAAS,GAC7C,IACA;AAAA,UACD,WAAW,OACV;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,kBAAkB;AAAA,cAClB,OAAM;AAAA,cACN,iBAAiB,EAAE,UAAU,MAAM,WAAW,MAAM,SAAS;AAAA,cAE5D,kBAAQ;AAAA;AAAA,UACX;AAAA,UAED;AAAA,UACA,gBAAgB,UACf,6CAAC,sBAAmB,MAAY,MAAM,SAAS,OAAO,SAAS,WAAW,WAAW,UAAU,cAAc,IAC7G;AAAA;AAAA;AAAA,IACJ;AAAA,EAEJ;AACF;AAEA,oBAAoB,cAAc;","names":["import_material","import_react","StarIcon","StarBorderIcon","import_material","import_icons_material","import_jsx_runtime","StarIcon","DeleteIcon","import_jsx_runtime","import_jsx_runtime","name","import_material","import_react_event","import_react_shared","import_react","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/components/favorite/FavoriteIconButton.tsx","../../src/components/lib/FavoriteItemEvent.ts","../../src/components/favorite/FavoriteToggleSVG.tsx","../../src/components/favorite/lib/PopperId.ts","../../src/components/favorite/Popper.tsx","../../src/components/favorite/PopperButtonGroup.tsx","../../src/components/RenderRowBox.tsx"],"sourcesContent":["export * from './components/index.ts'\n","import { IconButton, IconButtonProps, styled } from '@mui/material'\nimport { WithChildren } from '@xylabs/react-shared'\nimport { useEvent } from '@xyo-network/react-event'\nimport { useShareForwardedRef } from '@xyo-network/react-shared'\nimport React, { forwardRef, useEffect, useRef, useState } from 'react'\n\nimport { FavoriteItemEvent, generateFavoriteEvent } from '../lib/index.ts'\nimport { FavoriteToggleSVG } from './FavoriteToggleSVG.tsx'\nimport { popperId } from './lib/index.ts'\nimport { FavoritePopper } from './Popper.tsx'\n\nexport interface FavoriteIconButtonProps extends WithChildren, IconButtonProps {\n favorite?: FavoriteItemEvent['favorite']\n name?: FavoriteItemEvent['name']\n value?: string\n valueType?: FavoriteItemEvent['favoriteType']\n}\n\nexport const FavoriteIconButton = forwardRef<HTMLButtonElement, FavoriteIconButtonProps>(\n ({ children, favorite: favoriteProp, name, valueType, value, ...props }, ref) => {\n const [openPopper, setOpenPopper] = useState(false)\n\n const [favorite, setFavorite] = useState(favoriteProp)\n useEffect(() => {\n setFavorite(favoriteProp)\n }, [favoriteProp])\n\n const sharedRef = useShareForwardedRef(ref)\n const [buttonRef, dispatch] = useEvent(undefined, sharedRef)\n\n const onConfirmFavorite = (name?: string, newFavoriteState?: boolean) => {\n const favoriteEvent = generateFavoriteEvent(!!newFavoriteState, valueType, value, name)\n dispatch('address', 'favorite', JSON.stringify(favoriteEvent))\n setFavorite(newFavoriteState)\n setOpenPopper(false)\n }\n\n const starRef = useRef<HTMLSpanElement>(null)\n\n return (\n <IconButtonCondensed\n aria-describedby={popperId}\n ref={buttonRef}\n onClick={(event) => {\n event.stopPropagation()\n setOpenPopper(!openPopper)\n }}\n onTouchStart={(event) => {\n event.stopPropagation()\n setOpenPopper(!openPopper)\n }}\n onMouseDown={e => e.stopPropagation()}\n sx={{ lineHeight: 0, p: 0.25 }}\n {...props}\n >\n <span ref={starRef}>\n <FavoriteToggleSVG favorite={favorite} />\n </span>\n <FavoritePopper\n sx={{ zIndex: 1301 }}\n name={name}\n favorite={favorite}\n favoriteRef={starRef}\n open={openPopper}\n onConfirmFavorite={onConfirmFavorite}\n onClickAway={() => setOpenPopper(false)}\n />\n {children}\n </IconButtonCondensed>\n )\n },\n)\n\nFavoriteIconButton.displayName = 'FavoriteIconButton'\n\nconst IconButtonCondensed = styled(IconButton, { name: 'IconButtonCondensed' })(({ theme }) => ({\n lineHeight: 0,\n padding: theme.spacing(0.25),\n}))\n","export interface FavoriteItemEvent {\n favorite?: boolean\n favoriteType?: FavoriteType\n favoriteValue?: string\n name?: string\n}\n\nexport type FavoriteType = 'address' | 'schema' | 'hash'\n\nexport const generateFavoriteEvent = (favorite?: boolean, favoriteType?: FavoriteType, favoriteValue?: string, name?: string): FavoriteItemEvent => ({\n favorite: !!favorite,\n favoriteType,\n favoriteValue,\n name,\n})\n","import { Star as StarIcon, StarBorder as StarBorderIcon } from '@mui/icons-material'\nimport React from 'react'\n\nexport const FavoriteToggleSVG: React.FC<{ favorite?: boolean }> = ({ favorite }) => (\n <>\n {favorite\n ? <StarIcon className=\"favorite-icon\" component=\"svg\" color=\"secondary\" fontSize=\"small\" />\n : <StarBorderIcon className=\"favorite-icon\" fontSize=\"small\" />}\n </>\n)\n","export const popperId = 'favorite-popper'\n","import { Card, CardContent, ClickAwayListener, Fade, Popper, PopperProps, styled, TextField } from '@mui/material'\nimport React, { forwardRef, RefObject, useEffect, useState } from 'react'\n\nimport { popperId } from './lib/index.ts'\nimport { PopperButtonGroup } from './PopperButtonGroup.tsx'\n\nexport interface FavoritePopperProps extends PopperProps {\n favorite?: boolean\n favoriteRef?: RefObject<HTMLElement>\n name?: string\n onClickAway?: (event: MouseEvent | TouchEvent) => void\n onConfirmFavorite?: (name?: string, newFavoriteState?: boolean) => void\n}\nexport const FavoritePopper = forwardRef<HTMLDivElement, FavoritePopperProps>(\n (\n {\n name: nameProp,\n favorite,\n favoriteRef,\n onClickAway,\n onConfirmFavorite,\n ...props\n },\n ref,\n ) => {\n const [name, setName] = useState(nameProp)\n useEffect(() => {\n setName(nameProp)\n }, [nameProp])\n\n return (\n <ClickAwayListener onClickAway={onClickAway ?? (() => null)}>\n <PopperStyled\n id={popperId}\n anchorEl={favoriteRef?.current}\n onClick={e => e.stopPropagation()}\n onTouchStart={e => e.stopPropagation()}\n transition\n ref={ref}\n {...props}\n >\n {({ TransitionProps }) => (\n <Fade {...TransitionProps} timeout={350}>\n <Card>\n <CardContent sx={{ display: 'flex', gap: 1 }}>\n <TextField\n autoFocus\n label=\"Favorite Name\"\n placeholder=\"optional\"\n size=\"small\"\n value={name ?? ''}\n onChange={e => setName(e.target.value)}\n />\n <PopperButtonGroup favorite={favorite} onConfirmFavorite={onConfirmFavorite} name={name} />\n </CardContent>\n </Card>\n </Fade>\n )}\n </PopperStyled>\n </ClickAwayListener>\n )\n },\n)\n\nFavoritePopper.displayName = 'FavoritePopper'\n\n// Ensure the popper is over all other mui portal elements\nconst PopperStyled = styled(Popper, { name: 'PopperStyled' })(() => ({ zIndex: 9999 }))\n","import { Delete as DeleteIcon, Star as StarIcon } from '@mui/icons-material'\nimport { Button, ButtonGroup, ButtonGroupProps } from '@mui/material'\nimport React from 'react'\n\nexport interface FavoritePopperProps extends ButtonGroupProps {\n favorite?: boolean\n name?: string\n onConfirmFavorite?: (name?: string, newFavoriteState?: boolean) => void\n}\n\nexport const PopperButtonGroup: React.FC<FavoritePopperProps> = ({ name, onConfirmFavorite, favorite, ...props }) => {\n return (\n <ButtonGroup {...props}>\n <Button\n title=\"Save Favorite\"\n variant=\"contained\"\n onClick={(e) => {\n e.stopPropagation()\n onConfirmFavorite?.(name, true)\n }}\n >\n <StarIcon />\n </Button>\n {favorite\n ? (\n <Button\n title=\"Remove Favorite\"\n variant=\"contained\"\n onClick={(e) => {\n e.stopPropagation()\n onConfirmFavorite?.(name, false)\n }}\n >\n <DeleteIcon />\n </Button>\n )\n : null}\n </ButtonGroup>\n )\n}\n","import { ListItemIcon, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexRow } from '@xylabs/react-flexbox'\nimport { Identicon } from '@xylabs/react-identicon'\nimport { useEvent } from '@xyo-network/react-event'\nimport { EllipsizeBox, useShareForwardedRef } from '@xyo-network/react-shared'\nimport React, { forwardRef } from 'react'\n\nimport { FavoriteIconButton } from './favorite/index.ts'\n\nexport interface AddressRenderRowBoxProps extends FlexBoxProps {\n address?: string | null\n disableSharedRef?: boolean\n favorite?: boolean\n iconOnly?: boolean\n iconSize?: number\n icons?: boolean\n name?: string\n showFavorite?: boolean\n}\n\nexport const AddressRenderRowBox = forwardRef<HTMLElement, AddressRenderRowBoxProps>(\n (\n { address, children, disableSharedRef, favorite: favoriteProp = false, iconOnly, iconSize = 24, icons, name, showFavorite = false, ...props },\n ref,\n ) => {\n const theme = useTheme()\n\n const sharedRef = useShareForwardedRef(ref)\n const [elementRef, dispatch] = useEvent(undefined, sharedRef)\n\n return (\n <FlexRow\n gap={2}\n justifyContent=\"flex-start\"\n ref={elementRef}\n onClick={() => {\n if (address) {\n dispatch('address', 'click', address)\n }\n }}\n {...props}\n >\n {icons && address\n ? (\n <ListItemIcon sx={{ minWidth: 0 }}>\n <Identicon size={iconSize} value={address} />\n </ListItemIcon>\n )\n : null}\n {iconOnly\n ? null\n : (\n <EllipsizeBox\n disableSharedRef={disableSharedRef}\n ellipsisPosition=\"end\"\n width=\"100%\"\n typographyProps={{ fontSize: theme.typography.body1.fontSize }}\n >\n {name ?? address}\n </EllipsizeBox>\n )}\n {children}\n {showFavorite && address\n ? <FavoriteIconButton name={name} size=\"small\" value={address} valueType=\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B,MAAK;IAAQC,OAAO9B;IAASuC,WAAU;IAAUpC,UAAUC;OAC3F,IAAA;AAGV,CAAA;AAGFN,oBAAoB0C,cAAc;","names":["import_material","import_react","generateFavoriteEvent","favorite","favoriteType","favoriteValue","name","FavoriteToggleSVG","favorite","React","StarIcon","className","component","color","fontSize","StarBorderIcon","popperId","import_material","import_react","import_icons_material","import_react","PopperButtonGroup","name","onConfirmFavorite","favorite","props","React","ButtonGroup","Button","title","variant","onClick","e","stopPropagation","StarIcon","DeleteIcon","FavoritePopper","forwardRef","name","nameProp","favorite","favoriteRef","onClickAway","onConfirmFavorite","props","ref","setName","useState","useEffect","React","ClickAwayListener","PopperStyled","id","popperId","anchorEl","current","onClick","e","stopPropagation","onTouchStart","transition","TransitionProps","Fade","timeout","Card","CardContent","sx","display","gap","TextField","autoFocus","label","placeholder","size","value","onChange","target","PopperButtonGroup","displayName","styled","Popper","zIndex","FavoriteIconButton","forwardRef","children","favorite","favoriteProp","name","valueType","value","props","ref","openPopper","setOpenPopper","useState","setFavorite","useEffect","sharedRef","useShareForwardedRef","buttonRef","dispatch","useEvent","undefined","onConfirmFavorite","newFavoriteState","favoriteEvent","generateFavoriteEvent","JSON","stringify","starRef","useRef","React","IconButtonCondensed","aria-describedby","popperId","onClick","event","stopPropagation","onTouchStart","onMouseDown","e","sx","lineHeight","p","span","FavoriteToggleSVG","FavoritePopper","zIndex","favoriteRef","open","onClickAway","displayName","styled","IconButton","theme","padding","spacing","import_material","import_react_event","import_react_shared","import_react","AddressRenderRowBox","forwardRef","address","children","disableSharedRef","favorite","favoriteProp","iconOnly","iconSize","icons","name","showFavorite","props","ref","theme","useTheme","sharedRef","useShareForwardedRef","elementRef","dispatch","useEvent","undefined","React","FlexRow","gap","justifyContent","onClick","ListItemIcon","sx","minWidth","Identicon","size","value","EllipsizeBox","ellipsisPosition","width","typographyProps","fontSize","typography","body1","FavoriteIconButton","valueType","displayName"]}
@@ -1,2 +1,2 @@
1
- export * from './components/index.js';
1
+ export * from './components/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './components/index.js';
1
+ export * from './components/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './components/index.js';
1
+ export * from './components/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map