@multiplatform.one/forms 7.72.0 → 7.74.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 (211) hide show
  1. package/dist/cjs/Button/IconButtonGroup.cjs +32 -0
  2. package/dist/cjs/Button/IconButtonGroup.native.js +32 -0
  3. package/dist/cjs/Button/IconButtonGroup.native.js.map +1 -1
  4. package/dist/cjs/Button/circleGlyph.cjs +28 -0
  5. package/dist/cjs/Button/circleGlyph.native.js +31 -0
  6. package/dist/cjs/Button/circleGlyph.native.js.map +1 -0
  7. package/dist/cjs/Button/glass.cjs +4 -1
  8. package/dist/cjs/Button/iconButtonGroupContext.native.js.map +1 -1
  9. package/dist/cjs/Button/index.cjs +44 -15
  10. package/dist/cjs/Button/index.native.js +52 -17
  11. package/dist/cjs/Button/index.native.js.map +1 -1
  12. package/dist/cjs/Button/webGlass.cjs +62 -0
  13. package/dist/cjs/Button/webGlass.native.js +68 -0
  14. package/dist/cjs/Button/webGlass.native.js.map +1 -0
  15. package/dist/cjs/FloatingPanel/PanelHeader.cjs +49 -0
  16. package/dist/cjs/FloatingPanel/PanelHeader.native.js +53 -0
  17. package/dist/cjs/FloatingPanel/PanelHeader.native.js.map +1 -0
  18. package/dist/cjs/FloatingPanel/echoContext.cjs +28 -0
  19. package/dist/cjs/FloatingPanel/echoContext.native.js +29 -0
  20. package/dist/cjs/FloatingPanel/echoContext.native.js.map +1 -1
  21. package/dist/cjs/FloatingPanel/iconEcho.cjs +104 -0
  22. package/dist/cjs/FloatingPanel/iconEcho.native.js +114 -0
  23. package/dist/cjs/FloatingPanel/iconEcho.native.js.map +1 -0
  24. package/dist/cjs/FloatingPanel/index.cjs +168 -15
  25. package/dist/cjs/FloatingPanel/index.native.js +77 -8
  26. package/dist/cjs/FloatingPanel/index.native.js.map +1 -1
  27. package/dist/cjs/FloatingPanel/paintedBox.cjs +80 -0
  28. package/dist/cjs/FloatingPanel/paintedBox.native.js +85 -0
  29. package/dist/cjs/FloatingPanel/paintedBox.native.js.map +1 -0
  30. package/dist/cjs/FloatingPanel/pointAnchor.cjs +22 -3
  31. package/dist/cjs/FloatingPanel/pointAnchor.native.js +26 -7
  32. package/dist/cjs/FloatingPanel/pointAnchor.native.js.map +1 -1
  33. package/dist/cjs/FloatingPanel/useFloatingPanel.cjs +2 -1
  34. package/dist/cjs/FloatingPanel/useFloatingPanel.native.js +3 -1
  35. package/dist/cjs/FloatingPanel/useFloatingPanel.native.js.map +1 -1
  36. package/dist/cjs/fields/FileUpload/index.cjs +8 -3
  37. package/dist/cjs/fields/FileUpload/index.native.js +8 -3
  38. package/dist/cjs/fields/FileUpload/index.native.js.map +1 -1
  39. package/dist/cjs/index.cjs +2 -0
  40. package/dist/cjs/index.native.js +2 -0
  41. package/dist/cjs/index.native.js.map +1 -1
  42. package/dist/esm/Button/IconButtonGroup.mjs +32 -0
  43. package/dist/esm/Button/IconButtonGroup.mjs.map +1 -1
  44. package/dist/esm/Button/IconButtonGroup.native.js +32 -0
  45. package/dist/esm/Button/IconButtonGroup.native.js.map +1 -1
  46. package/dist/esm/Button/circleGlyph.mjs +3 -0
  47. package/dist/esm/Button/circleGlyph.mjs.map +1 -0
  48. package/dist/esm/Button/circleGlyph.native.js +3 -0
  49. package/dist/esm/Button/circleGlyph.native.js.map +1 -0
  50. package/dist/esm/Button/glass.mjs +4 -2
  51. package/dist/esm/Button/glass.mjs.map +1 -1
  52. package/dist/esm/Button/iconButtonGroupContext.mjs.map +1 -1
  53. package/dist/esm/Button/iconButtonGroupContext.native.js.map +1 -1
  54. package/dist/esm/Button/index.mjs +44 -16
  55. package/dist/esm/Button/index.mjs.map +1 -1
  56. package/dist/esm/Button/index.native.js +52 -18
  57. package/dist/esm/Button/index.native.js.map +1 -1
  58. package/dist/esm/Button/webGlass.mjs +36 -0
  59. package/dist/esm/Button/webGlass.mjs.map +1 -0
  60. package/dist/esm/Button/webGlass.native.js +39 -0
  61. package/dist/esm/Button/webGlass.native.js.map +1 -0
  62. package/dist/esm/FloatingPanel/PanelHeader.mjs +24 -0
  63. package/dist/esm/FloatingPanel/PanelHeader.mjs.map +1 -0
  64. package/dist/esm/FloatingPanel/PanelHeader.native.js +25 -0
  65. package/dist/esm/FloatingPanel/PanelHeader.native.js.map +1 -0
  66. package/dist/esm/FloatingPanel/echoContext.mjs +25 -1
  67. package/dist/esm/FloatingPanel/echoContext.mjs.map +1 -1
  68. package/dist/esm/FloatingPanel/echoContext.native.js +26 -1
  69. package/dist/esm/FloatingPanel/echoContext.native.js.map +1 -1
  70. package/dist/esm/FloatingPanel/iconEcho.mjs +77 -0
  71. package/dist/esm/FloatingPanel/iconEcho.mjs.map +1 -0
  72. package/dist/esm/FloatingPanel/iconEcho.native.js +84 -0
  73. package/dist/esm/FloatingPanel/iconEcho.native.js.map +1 -0
  74. package/dist/esm/FloatingPanel/index.mjs +169 -16
  75. package/dist/esm/FloatingPanel/index.mjs.map +1 -1
  76. package/dist/esm/FloatingPanel/index.native.js +79 -10
  77. package/dist/esm/FloatingPanel/index.native.js.map +1 -1
  78. package/dist/esm/FloatingPanel/paintedBox.mjs +52 -0
  79. package/dist/esm/FloatingPanel/paintedBox.mjs.map +1 -0
  80. package/dist/esm/FloatingPanel/paintedBox.native.js +54 -0
  81. package/dist/esm/FloatingPanel/paintedBox.native.js.map +1 -0
  82. package/dist/esm/FloatingPanel/pointAnchor.mjs +22 -3
  83. package/dist/esm/FloatingPanel/pointAnchor.mjs.map +1 -1
  84. package/dist/esm/FloatingPanel/pointAnchor.native.js +26 -7
  85. package/dist/esm/FloatingPanel/pointAnchor.native.js.map +1 -1
  86. package/dist/esm/FloatingPanel/useFloatingPanel.mjs +2 -1
  87. package/dist/esm/FloatingPanel/useFloatingPanel.mjs.map +1 -1
  88. package/dist/esm/FloatingPanel/useFloatingPanel.native.js +3 -1
  89. package/dist/esm/FloatingPanel/useFloatingPanel.native.js.map +1 -1
  90. package/dist/esm/fields/FileUpload/index.mjs +8 -3
  91. package/dist/esm/fields/FileUpload/index.mjs.map +1 -1
  92. package/dist/esm/fields/FileUpload/index.native.js +8 -3
  93. package/dist/esm/fields/FileUpload/index.native.js.map +1 -1
  94. package/dist/esm/index.mjs +2 -1
  95. package/dist/esm/index.mjs.map +1 -1
  96. package/dist/esm/index.native.js +2 -1
  97. package/dist/esm/index.native.js.map +1 -1
  98. package/dist/jsx/Button/IconButtonGroup.mjs +32 -0
  99. package/dist/jsx/Button/IconButtonGroup.mjs.map +1 -1
  100. package/dist/jsx/Button/IconButtonGroup.native.js +32 -0
  101. package/dist/jsx/Button/IconButtonGroup.native.js.map +1 -1
  102. package/dist/jsx/Button/circleGlyph.mjs +3 -0
  103. package/dist/jsx/Button/circleGlyph.mjs.map +1 -0
  104. package/dist/jsx/Button/circleGlyph.native.js +31 -0
  105. package/dist/jsx/Button/circleGlyph.native.js.map +1 -0
  106. package/dist/jsx/Button/glass.mjs +4 -2
  107. package/dist/jsx/Button/glass.mjs.map +1 -1
  108. package/dist/jsx/Button/iconButtonGroupContext.mjs.map +1 -1
  109. package/dist/jsx/Button/iconButtonGroupContext.native.js.map +1 -1
  110. package/dist/jsx/Button/index.mjs +44 -16
  111. package/dist/jsx/Button/index.mjs.map +1 -1
  112. package/dist/jsx/Button/index.native.js +52 -17
  113. package/dist/jsx/Button/index.native.js.map +1 -1
  114. package/dist/jsx/Button/webGlass.mjs +36 -0
  115. package/dist/jsx/Button/webGlass.mjs.map +1 -0
  116. package/dist/jsx/Button/webGlass.native.js +68 -0
  117. package/dist/jsx/Button/webGlass.native.js.map +1 -0
  118. package/dist/jsx/FloatingPanel/PanelHeader.mjs +24 -0
  119. package/dist/jsx/FloatingPanel/PanelHeader.mjs.map +1 -0
  120. package/dist/jsx/FloatingPanel/PanelHeader.native.js +53 -0
  121. package/dist/jsx/FloatingPanel/PanelHeader.native.js.map +1 -0
  122. package/dist/jsx/FloatingPanel/echoContext.mjs +25 -1
  123. package/dist/jsx/FloatingPanel/echoContext.mjs.map +1 -1
  124. package/dist/jsx/FloatingPanel/echoContext.native.js +29 -0
  125. package/dist/jsx/FloatingPanel/echoContext.native.js.map +1 -1
  126. package/dist/jsx/FloatingPanel/iconEcho.mjs +77 -0
  127. package/dist/jsx/FloatingPanel/iconEcho.mjs.map +1 -0
  128. package/dist/jsx/FloatingPanel/iconEcho.native.js +114 -0
  129. package/dist/jsx/FloatingPanel/iconEcho.native.js.map +1 -0
  130. package/dist/jsx/FloatingPanel/index.mjs +169 -16
  131. package/dist/jsx/FloatingPanel/index.mjs.map +1 -1
  132. package/dist/jsx/FloatingPanel/index.native.js +77 -8
  133. package/dist/jsx/FloatingPanel/index.native.js.map +1 -1
  134. package/dist/jsx/FloatingPanel/paintedBox.mjs +52 -0
  135. package/dist/jsx/FloatingPanel/paintedBox.mjs.map +1 -0
  136. package/dist/jsx/FloatingPanel/paintedBox.native.js +85 -0
  137. package/dist/jsx/FloatingPanel/paintedBox.native.js.map +1 -0
  138. package/dist/jsx/FloatingPanel/pointAnchor.mjs +22 -3
  139. package/dist/jsx/FloatingPanel/pointAnchor.mjs.map +1 -1
  140. package/dist/jsx/FloatingPanel/pointAnchor.native.js +26 -7
  141. package/dist/jsx/FloatingPanel/pointAnchor.native.js.map +1 -1
  142. package/dist/jsx/FloatingPanel/useFloatingPanel.mjs +2 -1
  143. package/dist/jsx/FloatingPanel/useFloatingPanel.mjs.map +1 -1
  144. package/dist/jsx/FloatingPanel/useFloatingPanel.native.js +3 -1
  145. package/dist/jsx/FloatingPanel/useFloatingPanel.native.js.map +1 -1
  146. package/dist/jsx/fields/FileUpload/index.mjs +8 -3
  147. package/dist/jsx/fields/FileUpload/index.mjs.map +1 -1
  148. package/dist/jsx/fields/FileUpload/index.native.js +8 -3
  149. package/dist/jsx/fields/FileUpload/index.native.js.map +1 -1
  150. package/dist/jsx/index.js +2 -1
  151. package/dist/jsx/index.js.map +1 -1
  152. package/dist/jsx/index.mjs +2 -1
  153. package/dist/jsx/index.mjs.map +1 -1
  154. package/dist/jsx/index.native.js +2 -0
  155. package/dist/jsx/index.native.js.map +1 -1
  156. package/package.json +8 -8
  157. package/src/Button/Button.accentInk.spec.tsx +39 -8
  158. package/src/Button/Button.iconButton.spec.tsx +143 -3
  159. package/src/Button/Button.stories.tsx +55 -38
  160. package/src/Button/IconButtonGroup.spec.tsx +26 -0
  161. package/src/Button/IconButtonGroup.tsx +39 -0
  162. package/src/Button/circleGlyph.ts +6 -0
  163. package/src/Button/glass.spec.ts +73 -0
  164. package/src/Button/glass.ts +8 -3
  165. package/src/Button/iconButtonGroupContext.ts +2 -1
  166. package/src/Button/index.tsx +68 -17
  167. package/src/Button/webGlass.ts +42 -0
  168. package/src/FloatingPanel/FloatingPanel.iconEcho.spec.tsx +297 -0
  169. package/src/FloatingPanel/FloatingPanel.menuFace.native.spec.tsx +87 -1
  170. package/src/FloatingPanel/PanelHeader.tsx +26 -0
  171. package/src/FloatingPanel/echoContext.ts +45 -0
  172. package/src/FloatingPanel/iconEcho.tsx +118 -0
  173. package/src/FloatingPanel/index.native.tsx +115 -4
  174. package/src/FloatingPanel/index.tsx +238 -16
  175. package/src/FloatingPanel/paintedBox.spec.ts +95 -0
  176. package/src/FloatingPanel/paintedBox.ts +75 -0
  177. package/src/FloatingPanel/pointAnchor.spec.ts +47 -0
  178. package/src/FloatingPanel/pointAnchor.ts +28 -0
  179. package/src/FloatingPanel/useFloatingPanel.ts +6 -1
  180. package/src/fields/FileUpload/FileUpload.spec.tsx +8 -0
  181. package/src/fields/FileUpload/index.tsx +12 -4
  182. package/src/index.ts +2 -0
  183. package/types/Button/IconButtonGroup.d.ts.map +1 -1
  184. package/types/Button/circleGlyph.d.ts +7 -0
  185. package/types/Button/circleGlyph.d.ts.map +1 -0
  186. package/types/Button/glass.d.ts +5 -2
  187. package/types/Button/glass.d.ts.map +1 -1
  188. package/types/Button/iconButtonGroupContext.d.ts +2 -1
  189. package/types/Button/iconButtonGroupContext.d.ts.map +1 -1
  190. package/types/Button/index.d.ts +7 -4
  191. package/types/Button/index.d.ts.map +1 -1
  192. package/types/Button/webGlass.d.ts +32 -0
  193. package/types/Button/webGlass.d.ts.map +1 -0
  194. package/types/FloatingPanel/PanelHeader.d.ts +9 -0
  195. package/types/FloatingPanel/PanelHeader.d.ts.map +1 -0
  196. package/types/FloatingPanel/echoContext.d.ts +24 -0
  197. package/types/FloatingPanel/echoContext.d.ts.map +1 -1
  198. package/types/FloatingPanel/iconEcho.d.ts +29 -0
  199. package/types/FloatingPanel/iconEcho.d.ts.map +1 -0
  200. package/types/FloatingPanel/index.d.ts +10 -0
  201. package/types/FloatingPanel/index.d.ts.map +1 -1
  202. package/types/FloatingPanel/index.native.d.ts +1 -1
  203. package/types/FloatingPanel/index.native.d.ts.map +1 -1
  204. package/types/FloatingPanel/paintedBox.d.ts +29 -0
  205. package/types/FloatingPanel/paintedBox.d.ts.map +1 -0
  206. package/types/FloatingPanel/pointAnchor.d.ts +10 -1
  207. package/types/FloatingPanel/pointAnchor.d.ts.map +1 -1
  208. package/types/FloatingPanel/useFloatingPanel.d.ts.map +1 -1
  209. package/types/fields/FileUpload/index.d.ts.map +1 -1
  210. package/types/index.d.ts +2 -0
  211. package/types/index.d.ts.map +1 -1
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: true
11
+ });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
+ get: () => from[key],
17
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
+ });
19
+ }
20
+ return to;
21
+ };
22
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
+ value: true
24
+ }), mod);
25
+ var iconEcho_exports = {};
26
+ __export(iconEcho_exports, {
27
+ ICON_ECHO_TEST_ID: () => ICON_ECHO_TEST_ID,
28
+ iconEchoElement: () => iconEchoElement,
29
+ iconEchoOverlays: () => iconEchoOverlays
30
+ });
31
+ module.exports = __toCommonJS(iconEcho_exports);
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ var import_react = require("@phosphor-icons/react");
34
+ var import_react2 = require("react");
35
+ var import_theme = require("@multiplatform.one/theme");
36
+ var import_tamagui = require("tamagui");
37
+ var import_circleGlyph = require("../Button/circleGlyph.native.js");
38
+ var import_t = require("../shared/t.native.js");
39
+ var ICON_ECHO_TEST_ID = "floating-panel-icon-echo";
40
+ var DROPPED_PROPS = ["id", "onLongPress", "onKeyDown", "onContextMenu", "aria-haspopup", "aria-expanded", "aria-controls", "aria-describedby", "tooltip"];
41
+ function iconEchoOverlays(kind, up) {
42
+ return kind === "close" && !up;
43
+ }
44
+ function iconEchoElement(trigger, kind, onClose, surface) {
45
+ var echo = echoOf(trigger, kind, onClose);
46
+ if (echo == null || !surface) return echo;
47
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_theme.SurfaceContext.Provider, {
48
+ ...surface,
49
+ children: echo
50
+ });
51
+ }
52
+ function echoOf(trigger, _kind, onClose) {
53
+ if (! /* @__PURE__ */(0, import_react2.isValidElement)(trigger)) return null;
54
+ var props = trigger.props;
55
+ var label = (0, import_t.t)("Close");
56
+ var dropped = Object.fromEntries(DROPPED_PROPS.map(function (name) {
57
+ return [name, void 0];
58
+ }));
59
+ if (props.icon != null) {
60
+ return /* @__PURE__ */(0, import_react2.cloneElement)(trigger, {
61
+ ...dropped,
62
+ ref: null,
63
+ icon: import_react.XIcon,
64
+ "aria-label": label,
65
+ onPress: onClose,
66
+ testID: ICON_ECHO_TEST_ID,
67
+ "data-testid": ICON_ECHO_TEST_ID
68
+ });
69
+ }
70
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(CircleClose, {
71
+ label,
72
+ onClose
73
+ });
74
+ }
75
+ var avatarPlate = "$selectedBackground";
76
+ var circleGlyphFallbackPx = 18;
77
+ function CircleClose(param) {
78
+ var {
79
+ label,
80
+ onClose
81
+ } = param;
82
+ var _ref;
83
+ var _theme_selectedColor, _theme_color;
84
+ var theme = (0, import_tamagui.useTheme)();
85
+ var [side, setSide] = (0, import_react2.useState)(0);
86
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
87
+ role: "button",
88
+ "aria-label": label,
89
+ tabIndex: 0,
90
+ cursor: "pointer",
91
+ width: "100%",
92
+ height: "100%",
93
+ borderRadius: 1e5,
94
+ backgroundColor: avatarPlate,
95
+ alignItems: "center",
96
+ justifyContent: "center",
97
+ pressStyle: {
98
+ opacity: 0.6
99
+ },
100
+ onPress: onClose,
101
+ onLayout: function onLayout(event) {
102
+ return setSide(Math.min(event.nativeEvent.layout.width, event.nativeEvent.layout.height));
103
+ },
104
+ testID: ICON_ECHO_TEST_ID,
105
+ "data-testid": ICON_ECHO_TEST_ID,
106
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.XIcon, {
107
+ size: side > 0 ? Math.round(side * import_circleGlyph.ICON_BUTTON_CIRCLE_GLYPH_RATIO) : circleGlyphFallbackPx,
108
+ weight: "bold",
109
+ color: (_ref = (_theme_selectedColor = theme.selectedColor) === null || _theme_selectedColor === void 0 ? void 0 : _theme_selectedColor.val) !== null && _ref !== void 0 ? _ref : (_theme_color = theme.color) === null || _theme_color === void 0 ? void 0 : _theme_color.val,
110
+ "aria-hidden": true
111
+ })
112
+ });
113
+ }
114
+ //# sourceMappingURL=iconEcho.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","iconEcho_exports","__export","ICON_ECHO_TEST_ID","iconEchoElement","iconEchoOverlays","module","exports","import_jsx_runtime","require","import_react","import_react2","import_theme","import_tamagui","import_circleGlyph","import_t","DROPPED_PROPS","kind","up","trigger","onClose","surface","echo","echoOf","jsx","SurfaceContext","Provider","children","_kind","isValidElement","props","label","t","dropped","Object","fromEntries","map","name","icon","cloneElement","ref","XIcon","onPress","testID","CircleClose","avatarPlate","circleGlyphFallbackPx","param","_ref","_theme_selectedColor","_theme_color","theme","useTheme","side","setSide","useState","View","role","tabIndex","cursor","width","height","borderRadius","backgroundColor","alignItems","justifyContent","pressStyle","opacity"],"sources":["../../../src/FloatingPanel/iconEcho.tsx"],"sourcesContent":[null],"mappings":"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","ignoreList":[]}
@@ -53,6 +53,9 @@ var import_overlayStack = require("../shared/overlayStack.cjs");
53
53
  var import_compactFace = require("./compactFace.cjs");
54
54
  var import_nestedAction = require("./nestedAction.cjs");
55
55
  var import_PanelPortal = require("./PanelPortal.cjs");
56
+ var import_echoContext = require("./echoContext.cjs");
57
+ var import_iconEcho = require("./iconEcho.cjs");
58
+ var import_paintedBox = require("./paintedBox.cjs");
56
59
  var import_pointAnchor = require("./pointAnchor.cjs");
57
60
  var import_nestedAction2 = require("./nestedAction.cjs");
58
61
  var import_useFloatingPanel2 = require("./useFloatingPanel.cjs");
@@ -265,6 +268,76 @@ function placeEchoOverTrigger(panelElement, geometry, {
265
268
  }
266
269
  }
267
270
  }
271
+ function IconEchoRow({
272
+ children
273
+ }) {
274
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
275
+ "data-fp-icon-echo": "",
276
+ flexShrink: 0,
277
+ alignSelf: "stretch",
278
+ pointerEvents: "box-none",
279
+ style: {
280
+ order: -1,
281
+ position: "sticky",
282
+ zIndex: 1
283
+ },
284
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
285
+ "data-fp-icon-echo-box": "",
286
+ alignItems: "flex-start",
287
+ justifyContent: "flex-start",
288
+ children
289
+ })
290
+ });
291
+ }
292
+ function placeIconEcho(panelElement, {
293
+ offset,
294
+ width,
295
+ height,
296
+ up,
297
+ overlay,
298
+ group = null
299
+ }) {
300
+ const row = panelElement.querySelector("[data-fp-icon-echo]");
301
+ const box = row?.querySelector("[data-fp-icon-echo-box]");
302
+ if (!row || !box) return;
303
+ const frame = getComputedStyle(panelElement);
304
+ const border = side => parseFloat(frame[`border${side}Width`] || "0") || 0;
305
+ const rtl = panelElement.dir === "rtl";
306
+ row.style.order = up ? "1" : "-1";
307
+ row.style.height = `${height}px`;
308
+ row.style.backgroundColor = overlay ? "transparent" : frame.backgroundColor;
309
+ if (up) {
310
+ row.style.top = "";
311
+ row.style.marginTop = "";
312
+ row.style.marginBottom = `${-border("Bottom")}px`;
313
+ row.style.bottom = row.style.marginBottom;
314
+ } else {
315
+ row.style.bottom = "";
316
+ row.style.marginTop = `${-border("Top")}px`;
317
+ row.style.marginBottom = overlay ? `${-(height - border("Top"))}px` : "";
318
+ row.style.top = row.style.marginTop;
319
+ }
320
+ row.setAttribute("data-fp-icon-echo", overlay ? "overlay" : "band");
321
+ if (group) {
322
+ row.style.height = `${group.height}px`;
323
+ if (!up && overlay) row.style.marginBottom = `${-(group.height - border("Top"))}px`;
324
+ }
325
+ row.style.marginLeft = `${-border("Left")}px`;
326
+ row.style.marginRight = `${-border("Right")}px`;
327
+ box.style.width = `${width}px`;
328
+ box.style.height = `${height}px`;
329
+ box.style.marginLeft = rtl ? "" : `${offset}px`;
330
+ box.style.marginRight = rtl ? `${offset}px` : "";
331
+ box.style.alignSelf = "flex-start";
332
+ box.style.marginTop = group ? `${group.top}px` : "";
333
+ box.style.position = "relative";
334
+ box.style.zIndex = "1";
335
+ }
336
+ function layoutParentOf(element) {
337
+ let parent = element?.parentElement ?? null;
338
+ while (parent && getComputedStyle(parent).display === "contents") parent = parent.parentElement;
339
+ return parent;
340
+ }
268
341
  const overlayFloatBreakpoint = import_theme2.OVERLAY_BREAKPOINT;
269
342
  function subscribeViewport(listener) {
270
343
  if (!import_tamagui.isWeb || typeof window === "undefined") return () => {};
@@ -457,6 +530,7 @@ function FloatingPanelWeb({
457
530
  cover = true,
458
531
  triggerEcho = true,
459
532
  coverAlign = "start",
533
+ iconEcho,
460
534
  triggerRow,
461
535
  anchorRect,
462
536
  clampCollisions = false,
@@ -466,6 +540,11 @@ function FloatingPanelWeb({
466
540
  const [collisionSheet, setCollisionSheet] = (0, import_react.useState)(false);
467
541
  const isFill = sizing === "fill";
468
542
  const isContextMenu = openOn === "contextmenu";
543
+ const pointMenu = isContextMenu && sheetProps.anchorMode !== "cover-trigger";
544
+ const showIconEcho = cover && !pointMenu && iconEcho != null;
545
+ const triggerSurface = import_theme2.SurfaceContext.useStyledContext();
546
+ const iconEchoUpRef = (0, import_react.useRef)(false);
547
+ const [echoBox, setEchoBox] = (0, import_react.useState)(null);
469
548
  const overlayStyleRef = (0, import_react.useRef)(null);
470
549
  const pinnedTopRef = (0, import_react.useRef)(0);
471
550
  const pinnedHeightRef = (0, import_react.useRef)(0);
@@ -497,10 +576,10 @@ function FloatingPanelWeb({
497
576
  wheelGrowRef: isFill ? void 0 : grownRef,
498
577
  widthMode: widthMode ?? (isContextMenu && fitContent === void 0 ? "fit-content" : void 0),
499
578
  fitContent,
500
- freeOverlay: isContextMenu,
579
+ freeOverlay: pointMenu,
501
580
  cover,
502
581
  panelWidth,
503
- echo: cover && triggerEcho && !isContextMenu,
582
+ echo: cover && triggerEcho && !pointMenu,
504
583
  onBeforeOpen: resetPosition
505
584
  });
506
585
  (0, import_focusManagement.useReturnFocusOnClose)(open, skipReturnFocusRef, panel.refs.floating);
@@ -524,7 +603,7 @@ function FloatingPanelWeb({
524
603
  if (pinnedTopRef.current === 0 && pinnedHeightRef.current === 0) {
525
604
  dropdownElement.scrollTop = 0;
526
605
  }
527
- const point = isContextMenu ? anchorPointRef.current ?? (0, import_pointAnchor.referenceCornerPoint)(trig, isRtl()) : null;
606
+ const point = pointMenu ? anchorPointRef.current ?? (0, import_pointAnchor.referenceCornerPoint)(trig, isRtl()) : null;
528
607
  const measured = anchorRect ? {
529
608
  ...anchorRect,
530
609
  top: anchorRect.y,
@@ -553,6 +632,9 @@ function FloatingPanelWeb({
553
632
  const viewportRight = viewportLeft + (viewport?.width ?? (document.documentElement.clientWidth || window.innerWidth));
554
633
  const viewportBottom = viewportTop + (viewport?.height ?? window.innerHeight);
555
634
  dropdownElement.style.left = `${viewportLeft - containingBlock.left}px`;
635
+ const groupSurface = showIconEcho ? (0, import_paintedBox.groupSurfaceOf)(trig) : null;
636
+ const groupBox = groupSurface?.getBoundingClientRect() ?? null;
637
+ if (showIconEcho) dropdownElement.style.minWidth = groupBox ? `${groupBox.width}px` : "";
556
638
  const layoutStyle = getComputedStyle(dropdownElement);
557
639
  const scale = layoutStyle.transform && layoutStyle.transform !== "none" && typeof DOMMatrixReadOnly !== "undefined" ? Math.abs(new DOMMatrixReadOnly(layoutStyle.transform).a) : 1;
558
640
  const layoutWidth = dropdownElement.getBoundingClientRect().width / (scale || 1);
@@ -591,7 +673,35 @@ function FloatingPanelWeb({
591
673
  const neededHeight = sheetProps.scrollable ? Math.min(totalContentHeight, measured.height + firstActionHeight + bodyPadding + totalBorderWidth) : totalContentHeight;
592
674
  let placedTop = measured.top;
593
675
  let placedLeft = left;
594
- if (measured.width > 0 && measured.height > 0 && (!slides && (left < viewportLeft || left + width > Math.max(measured.right, viewportRight - import_useFloatingPanel.panelViewportPadding)) || measured.right > viewportRight || measured.top < viewportTop || measured.top + Math.max(neededHeight, measured.height) > viewportBottom - import_useFloatingPanel.panelViewportPadding)) {
676
+ let placedMaxHeight = null;
677
+ iconEchoUpRef.current = false;
678
+ if (showIconEcho && measured.width > 0 && measured.height > 0) {
679
+ const painted = groupBox ?? (0, import_paintedBox.paintedTriggerBox)(trig, measured);
680
+ const placed = (0, import_pointAnchor.placeOverTrigger)({
681
+ trigger: {
682
+ x: painted.left,
683
+ y: groupBox ? groupBox.top : measured.top,
684
+ width: painted.right - painted.left,
685
+ height: groupBox ? groupBox.height : measured.height
686
+ },
687
+ width,
688
+ height: totalContentHeight,
689
+ bounds: {
690
+ top: viewportTop + import_useFloatingPanel.panelViewportPadding,
691
+ left: viewportLeft + import_useFloatingPanel.panelViewportPadding,
692
+ right: viewportRight - import_useFloatingPanel.panelViewportPadding,
693
+ bottom: viewportBottom - import_useFloatingPanel.panelViewportPadding
694
+ },
695
+ rtl,
696
+ align: coverAlign,
697
+ pinned: true
698
+ });
699
+ placedTop = placed.top;
700
+ if (!slides) placedLeft = placed.left;
701
+ alignEnd = placed.end;
702
+ placedMaxHeight = placed.maxHeight;
703
+ iconEchoUpRef.current = placed.up;
704
+ } else if (measured.width > 0 && measured.height > 0 && (!slides && (left < viewportLeft || left + width > Math.max(measured.right, viewportRight - import_useFloatingPanel.panelViewportPadding)) || measured.right > viewportRight || measured.top < viewportTop || measured.top + Math.max(neededHeight, measured.height) > viewportBottom - import_useFloatingPanel.panelViewportPadding)) {
595
705
  if (!clampCollisions && !iconCover) {
596
706
  dropdownElement.style.visibility = "hidden";
597
707
  setCollisionSheet(true);
@@ -620,6 +730,33 @@ function FloatingPanelWeb({
620
730
  alignEnd = placed.end;
621
731
  }
622
732
  coverAlignEndRef.current = alignEnd;
733
+ const echoStart = (0, import_panelWidth.echoOffset)({
734
+ triggerLeft: measured.left,
735
+ triggerRight: measured.right,
736
+ panelLeft: placedLeft,
737
+ panelWidth: width,
738
+ rtl
739
+ });
740
+ const echoOverlays = iconEcho != null && (0, import_iconEcho.iconEchoOverlays)(iconEcho, iconEchoUpRef.current);
741
+ const nextEchoBox = showIconEcho && echoOverlays ? (0, import_echoContext.echoHeaderBox)({
742
+ offset: echoStart,
743
+ width: measured.width,
744
+ height: measured.height,
745
+ panelWidth: width,
746
+ rtl
747
+ }) : null;
748
+ setEchoBox(previous => (0, import_echoContext.sameEchoBox)(previous, nextEchoBox) ? previous : nextEchoBox);
749
+ placeIconEcho(dropdownElement, {
750
+ offset: echoStart,
751
+ width: measured.width,
752
+ height: measured.height,
753
+ up: iconEchoUpRef.current,
754
+ overlay: echoOverlays,
755
+ group: groupSurface && groupBox ? {
756
+ top: measured.top - groupBox.top,
757
+ height: groupBox.height
758
+ } : null
759
+ });
623
760
  placeEchoOverTrigger(dropdownElement, {
624
761
  triggerLeft: measured.left,
625
762
  triggerRight: measured.right,
@@ -631,12 +768,12 @@ function FloatingPanelWeb({
631
768
  });
632
769
  const top2 = placedTop - containingBlock.top;
633
770
  const cssLeft2 = placedLeft - containingBlock.left;
634
- const maxHeight = Math.max(0, viewportBottom - import_useFloatingPanel.panelViewportPadding - placedTop);
771
+ const maxHeight = placedMaxHeight ?? Math.max(0, viewportBottom - import_useFloatingPanel.panelViewportPadding - placedTop);
635
772
  dropdownElement.style.top = `${top2}px`;
636
773
  dropdownElement.style.left = `${cssLeft2}px`;
637
774
  dropdownElement.style.maxHeight = `${maxHeight}px`;
638
775
  dropdownElement.dir = rtl ? "rtl" : "ltr";
639
- dropdownElement.style.transformOrigin = rtl !== alignEnd ? "top right" : "top left";
776
+ dropdownElement.style.transformOrigin = `${iconEchoUpRef.current ? "bottom" : "top"} ${rtl !== alignEnd ? "right" : "left"}`;
640
777
  dropdownElement.style.visibility = "visible";
641
778
  overlayStyleRef.current = {
642
779
  top: top2,
@@ -767,7 +904,7 @@ function FloatingPanelWeb({
767
904
  });
768
905
  }
769
906
  });
770
- }, [isFill, isContextMenu, cover, anchorRect, clampCollisions, sheetProps.scrollable, triggerEcho, coverAlign, panel.placement, panel.refs, panel.triggerRef, panel.updateArrows, panel.panelTransition]);
907
+ }, [isFill, isContextMenu, pointMenu, showIconEcho, cover, anchorRect, clampCollisions, sheetProps.scrollable, triggerEcho, coverAlign, panel.placement, panel.refs, panel.triggerRef, panel.updateArrows, panel.panelTransition]);
771
908
  repositionFnRef.current = repositionOverlay;
772
909
  const click = (0, import_react2.useClick)(panel.context, {
773
910
  event: "mousedown",
@@ -813,7 +950,7 @@ function FloatingPanelWeb({
813
950
  const handleScroll = (0, import_react.useCallback)(event => {
814
951
  const el = event.target;
815
952
  panel.updateArrows(el);
816
- if (isFill || cover && !isContextMenu) return;
953
+ if (isFill || cover && !pointMenu) return;
817
954
  if (panel.initializingRef.current) {
818
955
  lastScrollTopRef.current = el.scrollTop;
819
956
  return;
@@ -836,7 +973,7 @@ function FloatingPanelWeb({
836
973
  grownRef.current = true;
837
974
  repositionFnRef.current?.();
838
975
  }
839
- }, [isFill, cover, isContextMenu, panel.updateArrows]);
976
+ }, [isFill, cover, pointMenu, panel.updateArrows]);
840
977
  const webTransition = panel.panelTransition;
841
978
  const {
842
979
  style: elevatedSurfaceStyle,
@@ -878,6 +1015,17 @@ function FloatingPanelWeb({
878
1015
  onContextMenu: openFromContextMenu
879
1016
  } : {})
880
1017
  });
1018
+ const contentSized = sheetProps.triggerSizing === "content";
1019
+ const [hugSelf, setHugSelf] = (0, import_react.useState)(contentSized ? "flex-start" : void 0);
1020
+ (0, import_react.useLayoutEffect)(() => {
1021
+ if (!contentSized) {
1022
+ setHugSelf(void 0);
1023
+ return;
1024
+ }
1025
+ const parent = layoutParentOf(panel.triggerRef.current);
1026
+ const align = parent ? getComputedStyle(parent).alignItems : "stretch";
1027
+ setHugSelf(align === "stretch" || align === "normal" ? "flex-start" : void 0);
1028
+ }, [contentSized, panel.triggerRef]);
881
1029
  for (const name of ["onMouseDown", "onClick", "onKeyDown", "onKeyUp"]) {
882
1030
  const handler = referenceProps[name];
883
1031
  if (typeof handler === "function") {
@@ -891,7 +1039,7 @@ function FloatingPanelWeb({
891
1039
  return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
892
1040
  children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
893
1041
  ...referenceProps,
894
- alignSelf: sheetProps.triggerSizing === "content" ? "flex-start" : void 0,
1042
+ alignSelf: hugSelf,
895
1043
  cursor: disabled ? "not-allowed" : "pointer",
896
1044
  opacity: disabled ? 0.5 : 1,
897
1045
  "data-fp-reference": "",
@@ -920,7 +1068,7 @@ function FloatingPanelWeb({
920
1068
  scrollbarWidth: "none",
921
1069
  zIndex: panelZIndex,
922
1070
  overflow: "auto",
923
- ...(cover && !isContextMenu ? {
1071
+ ...(cover && !pointMenu ? {
924
1072
  overflowX: "hidden"
925
1073
  } : {}),
926
1074
  ...panel.floatingStyleRef.current,
@@ -933,7 +1081,7 @@ function FloatingPanelWeb({
933
1081
  // then positions against this box and is clipped by its scroll.
934
1082
  transform: panel.visible ? "none" : "scale(0.96)",
935
1083
  transition: webTransition,
936
- transformOrigin: cover && !isContextMenu ? isRtl(panel.triggerRef.current) !== coverAlignEndRef.current ? "top right" : "top left" : panelTransformOrigin(pointPlacementRef.current ? `${pointPlacementRef.current.dropup ? "top" : "bottom"}-${pointPlacementRef.current.alignEnd ? "end" : "start"}` : panel.placement)
1084
+ transformOrigin: cover && !pointMenu ? `${iconEchoUpRef.current ? "bottom" : "top"} ${isRtl(panel.triggerRef.current) !== coverAlignEndRef.current ? "right" : "left"}` : panelTransformOrigin(pointPlacementRef.current ? `${pointPlacementRef.current.dropup ? "top" : "bottom"}-${pointPlacementRef.current.alignEnd ? "end" : "start"}` : panel.placement)
937
1085
  },
938
1086
  onScroll: handleScroll,
939
1087
  onTransitionEnd: event => {
@@ -950,7 +1098,7 @@ function FloatingPanelWeb({
950
1098
  borderRadius: panel.dropdownRadius,
951
1099
  paddingVertical: 0,
952
1100
  paddingBottom: panel.coverCornerInset || 0,
953
- children: [isContextMenu || !cover || !triggerEcho ? null : /* @__PURE__ */(0, import_jsx_runtime.jsx)(TriggerEchoRow, {
1101
+ children: [pointMenu || !cover || !triggerEcho || showIconEcho ? null : /* @__PURE__ */(0, import_jsx_runtime.jsx)(TriggerEchoRow, {
954
1102
  sourceRef: panel.triggerRef,
955
1103
  source: trigger,
956
1104
  anchorRect,
@@ -967,14 +1115,19 @@ function FloatingPanelWeb({
967
1115
  ...(contentPadding !== "none" ? panel.knobProps.gapLg : void 0),
968
1116
  children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_overlayStack.OverlayStackProvider, {
969
1117
  zIndex: panelZIndex,
970
- children
1118
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_echoContext.PanelIconEchoBoxContext.Provider, {
1119
+ value: echoBox,
1120
+ children
1121
+ })
971
1122
  })
972
1123
  }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_floatingList.ScrollArrow, {
973
1124
  direction: "down",
974
1125
  scrollRef: panel.refs.floating,
975
1126
  visible: panel.arrowDown,
976
1127
  arrowScrollDirRef: panel.arrowScrollDirRef
977
- })]
1128
+ }), showIconEcho && iconEcho ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(IconEchoRow, {
1129
+ children: (0, import_iconEcho.iconEchoElement)(trigger, iconEcho, () => onOpenChange(false), triggerSurface)
1130
+ }) : null]
978
1131
  })
979
1132
  })
980
1133
  })]
@@ -56,6 +56,7 @@ var import_pointAnchor = require("./pointAnchor.native.js");
56
56
  var import_RegularPanel = require("./RegularPanel.native.js");
57
57
  var import_useFloatingPanel = require("./useFloatingPanel.native.js");
58
58
  var import_trailingAction = require("./trailingAction.native.js");
59
+ var import_iconEcho = require("./iconEcho.native.js");
59
60
  var import_useFloatingPanel2 = require("./useFloatingPanel.native.js");
60
61
  var import_nestedAction = require("./nestedAction.native.js");
61
62
  function useViewportGtSm() {
@@ -88,6 +89,7 @@ function FloatingPanel(param) {
88
89
  triggerRow,
89
90
  triggerEcho = true,
90
91
  coverAlign = "start",
92
+ iconEcho,
91
93
  anchorMode,
92
94
  panelWidth = "content",
93
95
  sheet,
@@ -100,6 +102,7 @@ function FloatingPanel(param) {
100
102
  } = (0, import_theme2.useResolvedKnobs)({
101
103
  painted: false
102
104
  });
105
+ var triggerSurface = import_theme2.SurfaceContext.useStyledContext();
103
106
  var windowZIndex = (0, import_overlayStack.useOverlayZIndex)("sheet");
104
107
  var children = /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_theme2.Surface, {
105
108
  painted: false,
@@ -515,8 +518,10 @@ function FloatingPanel(param) {
515
518
  right: windowWidth - ((_ref4 = safeArea === null || safeArea === void 0 ? void 0 : safeArea.right) !== null && _ref4 !== void 0 ? _ref4 : 0) - import_useFloatingPanel.panelViewportPadding,
516
519
  bottom: windowHeight - Math.max((_ref5 = safeArea === null || safeArea === void 0 ? void 0 : safeArea.bottom) !== null && _ref5 !== void 0 ? _ref5 : 0, keyboardInset) - import_useFloatingPanel.panelViewportPadding
517
520
  },
518
- echo: triggerEcho ? triggerRow !== null && triggerRow !== void 0 ? triggerRow : trigger : null,
521
+ echo: triggerEcho && !iconEcho ? triggerRow !== null && triggerRow !== void 0 ? triggerRow : trigger : null,
519
522
  echoLabel: triggerA11y === null || triggerA11y === void 0 ? void 0 : triggerA11y.label,
523
+ iconEcho: iconEcho && anchorMode !== "attach" ? (0, import_iconEcho.iconEchoElement)(trigger, iconEcho, close, triggerSurface) : null,
524
+ iconEchoKind: iconEcho,
520
525
  coverAlign: anchorMode === "attach" ? "start" : coverAlign,
521
526
  panelWidth,
522
527
  triggerRadius: anchorMode === "attach" ? null : triggerRadius,
@@ -674,6 +679,8 @@ function TriggerMenuPanel(param) {
674
679
  bounds,
675
680
  echo,
676
681
  echoLabel,
682
+ iconEcho = null,
683
+ iconEchoKind = "menu",
677
684
  coverAlign,
678
685
  panelWidth,
679
686
  triggerRadius,
@@ -683,7 +690,7 @@ function TriggerMenuPanel(param) {
683
690
  onClose,
684
691
  children
685
692
  } = param;
686
- var _ref, _ref1, _ref2, _ref3, _ref4;
693
+ var _ref, _ref1, _ref2, _ref3, _ref4, _ref5;
687
694
  var {
688
695
  knobProps
689
696
  } = (0, import_theme2.useResolvedKnobs)({
@@ -712,11 +719,13 @@ function TriggerMenuPanel(param) {
712
719
  height: size.height,
713
720
  bounds: room,
714
721
  rtl: import_react_native.I18nManager.isRTL,
715
- align: coverAlign
722
+ align: coverAlign,
723
+ pinned: iconEcho != null
716
724
  }) : null;
717
725
  var half = anchor ? Math.min(anchor.width, anchor.height) / 2 : void 0;
718
726
  var radius = triggerRadius != null && half != null ? Math.min(triggerRadius, half) : coverAlign === "auto" && half ? half : void 0;
719
727
  var borderWidth = Number(knobProps.elevatedSurface.borderWidth) || 0;
728
+ var echoOverlays = (0, import_iconEcho.iconEchoOverlays)(iconEchoKind, (_ref2 = placement === null || placement === void 0 ? void 0 : placement.up) !== null && _ref2 !== void 0 ? _ref2 : false);
720
729
  var echoShift = anchor && placement ? (0, import_panelWidth.echoOffset)({
721
730
  triggerLeft: anchor.x,
722
731
  triggerRight: anchor.x + anchor.width,
@@ -746,10 +755,10 @@ function TriggerMenuPanel(param) {
746
755
  },
747
756
  style: {
748
757
  position: "absolute",
749
- left: (_ref2 = placement === null || placement === void 0 ? void 0 : placement.left) !== null && _ref2 !== void 0 ? _ref2 : bounds.left,
750
- top: (_ref3 = placement === null || placement === void 0 ? void 0 : placement.top) !== null && _ref3 !== void 0 ? _ref3 : bounds.top,
758
+ left: (_ref3 = placement === null || placement === void 0 ? void 0 : placement.left) !== null && _ref3 !== void 0 ? _ref3 : bounds.left,
759
+ top: (_ref4 = placement === null || placement === void 0 ? void 0 : placement.top) !== null && _ref4 !== void 0 ? _ref4 : bounds.top,
751
760
  ...widthBox,
752
- maxHeight: (_ref4 = placement === null || placement === void 0 ? void 0 : placement.maxHeight) !== null && _ref4 !== void 0 ? _ref4 : bounds.bottom - bounds.top,
761
+ maxHeight: (_ref5 = placement === null || placement === void 0 ? void 0 : placement.maxHeight) !== null && _ref5 !== void 0 ? _ref5 : bounds.bottom - bounds.top,
753
762
  opacity: placement ? 1 : 0
754
763
  },
755
764
  children: (
@@ -805,6 +814,12 @@ function TriggerMenuPanel(param) {
805
814
  children: echo
806
815
  })
807
816
  })
817
+ }) : null, iconEcho != null && anchor && !(placement === null || placement === void 0 ? void 0 : placement.up) && !echoOverlays ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(IconEchoBand, {
818
+ anchor,
819
+ shift: echoShift,
820
+ borderWidth,
821
+ edge: "top",
822
+ children: iconEcho
808
823
  }) : null, /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.ScrollView, {
809
824
  style: {
810
825
  flexGrow: 0,
@@ -814,14 +829,68 @@ function TriggerMenuPanel(param) {
814
829
  children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
815
830
  padding: framePadding,
816
831
  gap: frameGap,
817
- children
832
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_echoContext.PanelIconEchoBoxContext.Provider, {
833
+ value: iconEcho != null && anchor && placement && echoOverlays ? (0, import_echoContext.echoHeaderBox)({
834
+ offset: echoShift,
835
+ width: anchor.width,
836
+ height: anchor.height,
837
+ panelWidth: placement.width,
838
+ rtl: import_react_native.I18nManager.isRTL
839
+ }) : null,
840
+ children
841
+ })
818
842
  })
819
- })]
843
+ }), iconEcho != null && anchor && ((placement === null || placement === void 0 ? void 0 : placement.up) || echoOverlays) ? /* @__PURE__ */(0, import_jsx_runtime.jsx)(IconEchoBand, {
844
+ anchor,
845
+ shift: echoShift,
846
+ borderWidth,
847
+ edge: echoOverlays ? "overlay" : "bottom",
848
+ children: iconEcho
849
+ }) : null]
820
850
  })
821
851
  }))
822
852
  })]
823
853
  });
824
854
  }
855
+ function IconEchoBand(param) {
856
+ var {
857
+ anchor,
858
+ shift,
859
+ borderWidth,
860
+ edge,
861
+ children
862
+ } = param;
863
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
864
+ testID: "floating-panel-icon-echo-band",
865
+ pointerEvents: "box-none",
866
+ style: edge === "overlay" ? {
867
+ position: "absolute",
868
+ top: -borderWidth,
869
+ start: -borderWidth,
870
+ end: -borderWidth,
871
+ height: anchor.height,
872
+ zIndex: 1
873
+ } : {
874
+ height: anchor.height,
875
+ marginHorizontal: -borderWidth,
876
+ ...(edge === "top" ? {
877
+ marginTop: -borderWidth
878
+ } : {
879
+ marginBottom: -borderWidth
880
+ })
881
+ },
882
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
883
+ style: {
884
+ width: anchor.width,
885
+ height: anchor.height,
886
+ marginStart: shift,
887
+ alignItems: "flex-start",
888
+ justifyContent: "flex-start"
889
+ },
890
+ children
891
+ })
892
+ });
893
+ }
825
894
  function PointPanel(param) {
826
895
  var {
827
896
  point,