@multiplatform.one/forms 7.80.0 → 7.81.1

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 (221) hide show
  1. package/dist/cjs/AdaptivePopup/index.cjs +2 -1
  2. package/dist/cjs/AdaptivePopup/index.native.js +2 -1
  3. package/dist/cjs/AdaptivePopup/index.native.js.map +1 -1
  4. package/dist/cjs/Button/index.cjs +12 -5
  5. package/dist/cjs/Button/index.native.js +14 -6
  6. package/dist/cjs/Button/index.native.js.map +1 -1
  7. package/dist/cjs/FloatingPanel/PanelHeader.cjs +3 -8
  8. package/dist/cjs/FloatingPanel/PanelHeader.native.js +3 -8
  9. package/dist/cjs/FloatingPanel/PanelHeader.native.js.map +1 -1
  10. package/dist/cjs/FloatingPanel/coverRect.cjs +0 -8
  11. package/dist/cjs/FloatingPanel/coverRect.native.js +0 -8
  12. package/dist/cjs/FloatingPanel/coverRect.native.js.map +1 -1
  13. package/dist/cjs/FloatingPanel/echoContext.cjs +5 -27
  14. package/dist/cjs/FloatingPanel/echoContext.native.js +5 -28
  15. package/dist/cjs/FloatingPanel/echoContext.native.js.map +1 -1
  16. package/dist/cjs/FloatingPanel/index.cjs +49 -131
  17. package/dist/cjs/FloatingPanel/index.native.js +216 -135
  18. package/dist/cjs/FloatingPanel/index.native.js.map +1 -1
  19. package/dist/cjs/fields/Combobox/index.cjs +3 -10
  20. package/dist/cjs/fields/Combobox/index.native.js +3 -10
  21. package/dist/cjs/fields/Combobox/index.native.js.map +1 -1
  22. package/dist/cjs/fields/Select/InlineChoices.cjs +4 -8
  23. package/dist/cjs/fields/Select/InlineChoices.native.js +4 -8
  24. package/dist/cjs/fields/Select/InlineChoices.native.js.map +1 -1
  25. package/dist/cjs/fields/Select/index.cjs +65 -201
  26. package/dist/cjs/fields/Select/index.native.js +74 -209
  27. package/dist/cjs/fields/Select/index.native.js.map +1 -1
  28. package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.cjs +2 -2
  29. package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.native.js +2 -2
  30. package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
  31. package/dist/cjs/index.cjs +4 -0
  32. package/dist/cjs/index.native.js +4 -0
  33. package/dist/cjs/index.native.js.map +1 -1
  34. package/dist/cjs/shared/CheckGlyph.cjs +40 -0
  35. package/dist/cjs/shared/CheckGlyph.native.js +44 -0
  36. package/dist/cjs/shared/CheckGlyph.native.js.map +1 -0
  37. package/dist/cjs/shared/checkedOnField.cjs +104 -0
  38. package/dist/cjs/shared/checkedOnField.native.js +117 -0
  39. package/dist/cjs/shared/checkedOnField.native.js.map +1 -0
  40. package/dist/cjs/shared/floatingList.cjs +12 -5
  41. package/dist/cjs/shared/floatingList.native.js +15 -7
  42. package/dist/cjs/shared/floatingList.native.js.map +1 -1
  43. package/dist/esm/AdaptivePopup/index.mjs +3 -2
  44. package/dist/esm/AdaptivePopup/index.mjs.map +1 -1
  45. package/dist/esm/AdaptivePopup/index.native.js +3 -2
  46. package/dist/esm/AdaptivePopup/index.native.js.map +1 -1
  47. package/dist/esm/Button/index.mjs +12 -5
  48. package/dist/esm/Button/index.mjs.map +1 -1
  49. package/dist/esm/Button/index.native.js +14 -6
  50. package/dist/esm/Button/index.native.js.map +1 -1
  51. package/dist/esm/FloatingPanel/PanelHeader.mjs +3 -8
  52. package/dist/esm/FloatingPanel/PanelHeader.mjs.map +1 -1
  53. package/dist/esm/FloatingPanel/PanelHeader.native.js +3 -8
  54. package/dist/esm/FloatingPanel/PanelHeader.native.js.map +1 -1
  55. package/dist/esm/FloatingPanel/coverRect.mjs +1 -8
  56. package/dist/esm/FloatingPanel/coverRect.mjs.map +1 -1
  57. package/dist/esm/FloatingPanel/coverRect.native.js +1 -8
  58. package/dist/esm/FloatingPanel/coverRect.native.js.map +1 -1
  59. package/dist/esm/FloatingPanel/echoContext.mjs +4 -24
  60. package/dist/esm/FloatingPanel/echoContext.mjs.map +1 -1
  61. package/dist/esm/FloatingPanel/echoContext.native.js +4 -25
  62. package/dist/esm/FloatingPanel/echoContext.native.js.map +1 -1
  63. package/dist/esm/FloatingPanel/index.mjs +53 -135
  64. package/dist/esm/FloatingPanel/index.mjs.map +1 -1
  65. package/dist/esm/FloatingPanel/index.native.js +180 -99
  66. package/dist/esm/FloatingPanel/index.native.js.map +1 -1
  67. package/dist/esm/fields/Combobox/index.mjs +4 -11
  68. package/dist/esm/fields/Combobox/index.mjs.map +1 -1
  69. package/dist/esm/fields/Combobox/index.native.js +4 -11
  70. package/dist/esm/fields/Combobox/index.native.js.map +1 -1
  71. package/dist/esm/fields/Select/InlineChoices.mjs +2 -6
  72. package/dist/esm/fields/Select/InlineChoices.mjs.map +1 -1
  73. package/dist/esm/fields/Select/InlineChoices.native.js +2 -6
  74. package/dist/esm/fields/Select/InlineChoices.native.js.map +1 -1
  75. package/dist/esm/fields/Select/index.mjs +68 -204
  76. package/dist/esm/fields/Select/index.mjs.map +1 -1
  77. package/dist/esm/fields/Select/index.native.js +77 -212
  78. package/dist/esm/fields/Select/index.native.js.map +1 -1
  79. package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.mjs +3 -3
  80. package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.mjs.map +1 -1
  81. package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.native.js +3 -3
  82. package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
  83. package/dist/esm/index.mjs +3 -1
  84. package/dist/esm/index.mjs.map +1 -1
  85. package/dist/esm/index.native.js +3 -1
  86. package/dist/esm/index.native.js.map +1 -1
  87. package/dist/esm/shared/CheckGlyph.mjs +15 -0
  88. package/dist/esm/shared/CheckGlyph.mjs.map +1 -0
  89. package/dist/esm/shared/CheckGlyph.native.js +16 -0
  90. package/dist/esm/shared/CheckGlyph.native.js.map +1 -0
  91. package/dist/esm/shared/checkedOnField.mjs +76 -0
  92. package/dist/esm/shared/checkedOnField.mjs.map +1 -0
  93. package/dist/esm/shared/checkedOnField.native.js +86 -0
  94. package/dist/esm/shared/checkedOnField.native.js.map +1 -0
  95. package/dist/esm/shared/floatingList.mjs +9 -5
  96. package/dist/esm/shared/floatingList.mjs.map +1 -1
  97. package/dist/esm/shared/floatingList.native.js +12 -7
  98. package/dist/esm/shared/floatingList.native.js.map +1 -1
  99. package/dist/jsx/AdaptivePopup/index.mjs +3 -2
  100. package/dist/jsx/AdaptivePopup/index.mjs.map +1 -1
  101. package/dist/jsx/AdaptivePopup/index.native.js +2 -1
  102. package/dist/jsx/AdaptivePopup/index.native.js.map +1 -1
  103. package/dist/jsx/Button/index.mjs +12 -5
  104. package/dist/jsx/Button/index.mjs.map +1 -1
  105. package/dist/jsx/Button/index.native.js +14 -6
  106. package/dist/jsx/Button/index.native.js.map +1 -1
  107. package/dist/jsx/FloatingPanel/PanelHeader.mjs +3 -8
  108. package/dist/jsx/FloatingPanel/PanelHeader.mjs.map +1 -1
  109. package/dist/jsx/FloatingPanel/PanelHeader.native.js +3 -8
  110. package/dist/jsx/FloatingPanel/PanelHeader.native.js.map +1 -1
  111. package/dist/jsx/FloatingPanel/coverRect.mjs +1 -8
  112. package/dist/jsx/FloatingPanel/coverRect.mjs.map +1 -1
  113. package/dist/jsx/FloatingPanel/coverRect.native.js +0 -8
  114. package/dist/jsx/FloatingPanel/coverRect.native.js.map +1 -1
  115. package/dist/jsx/FloatingPanel/echoContext.mjs +4 -24
  116. package/dist/jsx/FloatingPanel/echoContext.mjs.map +1 -1
  117. package/dist/jsx/FloatingPanel/echoContext.native.js +5 -28
  118. package/dist/jsx/FloatingPanel/echoContext.native.js.map +1 -1
  119. package/dist/jsx/FloatingPanel/index.mjs +53 -135
  120. package/dist/jsx/FloatingPanel/index.mjs.map +1 -1
  121. package/dist/jsx/FloatingPanel/index.native.js +216 -135
  122. package/dist/jsx/FloatingPanel/index.native.js.map +1 -1
  123. package/dist/jsx/fields/Combobox/index.mjs +4 -11
  124. package/dist/jsx/fields/Combobox/index.mjs.map +1 -1
  125. package/dist/jsx/fields/Combobox/index.native.js +3 -10
  126. package/dist/jsx/fields/Combobox/index.native.js.map +1 -1
  127. package/dist/jsx/fields/Select/InlineChoices.mjs +2 -6
  128. package/dist/jsx/fields/Select/InlineChoices.mjs.map +1 -1
  129. package/dist/jsx/fields/Select/InlineChoices.native.js +4 -8
  130. package/dist/jsx/fields/Select/InlineChoices.native.js.map +1 -1
  131. package/dist/jsx/fields/Select/index.mjs +68 -204
  132. package/dist/jsx/fields/Select/index.mjs.map +1 -1
  133. package/dist/jsx/fields/Select/index.native.js +74 -209
  134. package/dist/jsx/fields/Select/index.native.js.map +1 -1
  135. package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.mjs +3 -3
  136. package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.mjs.map +1 -1
  137. package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.native.js +2 -2
  138. package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
  139. package/dist/jsx/index.js +3 -1
  140. package/dist/jsx/index.js.map +1 -1
  141. package/dist/jsx/index.mjs +3 -1
  142. package/dist/jsx/index.mjs.map +1 -1
  143. package/dist/jsx/index.native.js +4 -0
  144. package/dist/jsx/index.native.js.map +1 -1
  145. package/dist/jsx/shared/CheckGlyph.mjs +15 -0
  146. package/dist/jsx/shared/CheckGlyph.mjs.map +1 -0
  147. package/dist/jsx/shared/CheckGlyph.native.js +44 -0
  148. package/dist/jsx/shared/CheckGlyph.native.js.map +1 -0
  149. package/dist/jsx/shared/checkedOnField.mjs +76 -0
  150. package/dist/jsx/shared/checkedOnField.mjs.map +1 -0
  151. package/dist/jsx/shared/checkedOnField.native.js +117 -0
  152. package/dist/jsx/shared/checkedOnField.native.js.map +1 -0
  153. package/dist/jsx/shared/floatingList.mjs +9 -5
  154. package/dist/jsx/shared/floatingList.mjs.map +1 -1
  155. package/dist/jsx/shared/floatingList.native.js +15 -7
  156. package/dist/jsx/shared/floatingList.native.js.map +1 -1
  157. package/package.json +8 -8
  158. package/src/AdaptivePopup/index.tsx +6 -3
  159. package/src/Button/Button.iconButton.spec.tsx +39 -0
  160. package/src/Button/index.tsx +20 -8
  161. package/src/FloatingPanel/FloatingPanel.iconCover.spec.tsx +279 -0
  162. package/src/FloatingPanel/FloatingPanel.menuFace.native.spec.tsx +78 -69
  163. package/src/FloatingPanel/FloatingPanel.seamlessCover.spec.tsx +12 -0
  164. package/src/FloatingPanel/PanelHeader.tsx +4 -12
  165. package/src/FloatingPanel/coverRect.ts +2 -15
  166. package/src/FloatingPanel/echoContext.ts +6 -40
  167. package/src/FloatingPanel/index.native.tsx +209 -144
  168. package/src/FloatingPanel/index.tsx +71 -187
  169. package/src/FloatingPanel/pointAnchor.spec.ts +1 -1
  170. package/src/FloatingPanel/pointAnchor.ts +4 -4
  171. package/src/FloatingPanel/sheetGrabber.spec.tsx +53 -0
  172. package/src/fields/Combobox/index.tsx +4 -9
  173. package/src/fields/Select/InlineChoices.tsx +2 -2
  174. package/src/fields/Select/Select.containingBlock.spec.tsx +131 -130
  175. package/src/fields/Select/Select.popUp.native.spec.tsx +276 -0
  176. package/src/fields/Select/Select.stories.tsx +26 -0
  177. package/src/fields/Select/index.tsx +84 -255
  178. package/src/fields/nativeDateTime/OsDateTimeSheet.tsx +3 -3
  179. package/src/index.ts +2 -1
  180. package/src/shared/CheckGlyph.tsx +12 -0
  181. package/src/shared/checkedOnField.ts +116 -0
  182. package/src/shared/floatingList.spec.tsx +154 -1
  183. package/src/shared/floatingList.tsx +18 -9
  184. package/types/AdaptivePopup/index.d.ts.map +1 -1
  185. package/types/Button/index.d.ts.map +1 -1
  186. package/types/FloatingPanel/PanelHeader.d.ts +1 -6
  187. package/types/FloatingPanel/PanelHeader.d.ts.map +1 -1
  188. package/types/FloatingPanel/coverRect.d.ts +2 -11
  189. package/types/FloatingPanel/coverRect.d.ts.map +1 -1
  190. package/types/FloatingPanel/echoContext.d.ts +5 -22
  191. package/types/FloatingPanel/echoContext.d.ts.map +1 -1
  192. package/types/FloatingPanel/index.d.ts +22 -9
  193. package/types/FloatingPanel/index.d.ts.map +1 -1
  194. package/types/FloatingPanel/index.native.d.ts +8 -1
  195. package/types/FloatingPanel/index.native.d.ts.map +1 -1
  196. package/types/FloatingPanel/pointAnchor.d.ts +4 -4
  197. package/types/fields/Combobox/index.d.ts.map +1 -1
  198. package/types/fields/Select/index.d.ts.map +1 -1
  199. package/types/index.d.ts +2 -1
  200. package/types/index.d.ts.map +1 -1
  201. package/types/shared/CheckGlyph.d.ts +10 -0
  202. package/types/shared/CheckGlyph.d.ts.map +1 -0
  203. package/types/shared/checkedOnField.d.ts +54 -0
  204. package/types/shared/checkedOnField.d.ts.map +1 -0
  205. package/types/shared/floatingList.d.ts +5 -2
  206. package/types/shared/floatingList.d.ts.map +1 -1
  207. package/dist/cjs/FloatingPanel/iconEcho.cjs +0 -106
  208. package/dist/cjs/FloatingPanel/iconEcho.native.js +0 -116
  209. package/dist/cjs/FloatingPanel/iconEcho.native.js.map +0 -1
  210. package/dist/esm/FloatingPanel/iconEcho.mjs +0 -79
  211. package/dist/esm/FloatingPanel/iconEcho.mjs.map +0 -1
  212. package/dist/esm/FloatingPanel/iconEcho.native.js +0 -86
  213. package/dist/esm/FloatingPanel/iconEcho.native.js.map +0 -1
  214. package/dist/jsx/FloatingPanel/iconEcho.mjs +0 -79
  215. package/dist/jsx/FloatingPanel/iconEcho.mjs.map +0 -1
  216. package/dist/jsx/FloatingPanel/iconEcho.native.js +0 -116
  217. package/dist/jsx/FloatingPanel/iconEcho.native.js.map +0 -1
  218. package/src/FloatingPanel/FloatingPanel.iconEcho.spec.tsx +0 -357
  219. package/src/FloatingPanel/iconEcho.tsx +0 -124
  220. package/types/FloatingPanel/iconEcho.d.ts +0 -29
  221. package/types/FloatingPanel/iconEcho.d.ts.map +0 -1
@@ -0,0 +1,54 @@
1
+ export declare const scrollArrowThreshold = 8;
2
+ /**
3
+ * A scroll arrow's band: half a menu row, opaque in the panel's own fill.
4
+ * Rows scroll under it, and a row cut at a clipped edge hides under it
5
+ * (FZ-8557, LC-112).
6
+ */
7
+ export declare function scrollArrowBand(rowHeight: number): number;
8
+ export interface ArrowBandFit {
9
+ /** The padding box's top edge, in viewport pixels. */
10
+ top: number;
11
+ /** The padding box's visible height. */
12
+ height: number;
13
+ scrollTop: number;
14
+ }
15
+ export interface CheckedOnFieldInput {
16
+ /** The field's edges, in viewport pixels: the checked row centres on them. */
17
+ fieldTop: number;
18
+ fieldBottom: number;
19
+ /** The checked row's offset in the scroll content, and its height. */
20
+ rowTop: number;
21
+ rowHeight: number;
22
+ /** The scroll content's full height. */
23
+ contentHeight: number;
24
+ /** The safe edges the panel's padding box may reach. */
25
+ boundsTop: number;
26
+ boundsBottom: number;
27
+ band: number;
28
+ threshold?: number;
29
+ }
30
+ /**
31
+ * A Select covering its field opens the way a macOS pop-up does: its checked
32
+ * row sits on the field, centred on it, so the value stays where the closed
33
+ * field drew it (FZ-8557, LC-112).
34
+ *
35
+ * A list that fits between the safe edges shows every row with no scrolling,
36
+ * slid the least distance that keeps it on screen. A taller list keeps the
37
+ * checked row on the field and clips at the safe edges: a clipped edge sits on
38
+ * the safe edge, and the rows past it scroll under the opaque arrow band there.
39
+ * The checked row is never under a band; where one would cover it, the panel
40
+ * or the list shifts by that much. Returns the padding box.
41
+ */
42
+ export declare function placeCheckedOnField(input: CheckedOnFieldInput): ArrowBandFit;
43
+ /**
44
+ * A scrolled list whose panel stops short of a safe edge grows toward it, the
45
+ * way a macOS menu does: the edge follows the rows until it meets the safe
46
+ * edge, and the rows stay where the scroll put them (FZ-8463, FZ-8557). The
47
+ * panel never shrinks. Takes and returns the padding box.
48
+ */
49
+ export declare function growOnScroll({ top, height, scrollTop, contentHeight, boundsTop, boundsBottom, }: ArrowBandFit & {
50
+ contentHeight: number;
51
+ boundsTop: number;
52
+ boundsBottom: number;
53
+ }): ArrowBandFit;
54
+ //# sourceMappingURL=checkedOnField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkedOnField.d.ts","sourceRoot":"","sources":["../../src/shared/checkedOnField.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED,MAAM,WAAW,YAAY;IAC3B,sDAAsD;IACtD,GAAG,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAClC,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CA0C5E;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,GAAG,EACH,MAAM,EACN,SAAS,EACT,aAAa,EACb,SAAS,EACT,YAAY,GACb,EAAE,YAAY,GAAG;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACtB,GAAG,YAAY,CAKf"}
@@ -3,13 +3,16 @@ export declare function clampDropdownRadius(fieldRadius: string): string | 0;
3
3
  export declare function SyncFocusToOpen({ open }: {
4
4
  open: boolean;
5
5
  }): null;
6
- export declare const scrollArrowThreshold = 8;
7
- export declare function ScrollArrow({ direction, scrollRef, visible, arrowScrollDirRef, topOffset, }: {
6
+ export { growOnScroll, placeCheckedOnField, scrollArrowBand, scrollArrowThreshold, } from "./checkedOnField";
7
+ export type { ArrowBandFit, CheckedOnFieldInput } from "./checkedOnField";
8
+ export declare function ScrollArrow({ direction, scrollRef, visible, arrowScrollDirRef, topOffset, band: bandProp, }: {
8
9
  direction: "up" | "down";
9
10
  scrollRef: RefObject<HTMLElement | null>;
10
11
  visible: boolean;
11
12
  arrowScrollDirRef: RefObject<"up" | "down" | null>;
12
13
  /** Below a sticky echo row (LC-112 seamless cover), the up arrow sits under it. */
13
14
  topOffset?: number;
15
+ /** The band height the list was laid out for (`placeCheckedOnField`); defaults to half a menu row. */
16
+ band?: number;
14
17
  }): import("react/jsx-runtime").JSX.Element;
15
18
  //# sourceMappingURL=floatingList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"floatingList.d.ts","sourceRoot":"","sources":["../../src/shared/floatingList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAC;AAQjF,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,CAOnE;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,QAM1D;AAED,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAItC,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,SAAa,GACd,EAAE;IACD,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;IACzB,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,SAAS,CAAC,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;IACnD,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAuJA"}
1
+ {"version":3,"file":"floatingList.d.ts","sourceRoot":"","sources":["../../src/shared/floatingList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAC;AASjF,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,CAOnE;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,QAM1D;AAED,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,eAAe,EACf,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAI1E,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,SAAS,EACT,OAAO,EACP,iBAAiB,EACjB,SAAa,EACb,IAAI,EAAE,QAAQ,GACf,EAAE;IACD,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;IACzB,SAAS,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,iBAAiB,EAAE,SAAS,CAAC,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;IACnD,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sGAAsG;IACtG,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,2CAsJA"}
@@ -1,106 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
19
- };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
23
- var iconEcho_exports = {};
24
- __export(iconEcho_exports, {
25
- ICON_ECHO_TEST_ID: () => ICON_ECHO_TEST_ID,
26
- iconEchoElement: () => iconEchoElement,
27
- iconEchoOverlays: () => iconEchoOverlays
28
- });
29
- module.exports = __toCommonJS(iconEcho_exports);
30
- var import_react = require("@phosphor-icons/react");
31
- var import_react2 = require("react");
32
- var import_theme = require("@multiplatform.one/theme");
33
- var import_tamagui = require("tamagui");
34
- var import_circleGlyph = require("../Button/circleGlyph.cjs");
35
- var import_t = require("../shared/t.cjs");
36
- var import_jsx_runtime = require("react/jsx-runtime");
37
- const ICON_ECHO_TEST_ID = "floating-panel-icon-echo";
38
- const DROPPED_PROPS = ["id", "onLongPress", "onKeyDown", "onContextMenu", "aria-haspopup", "aria-expanded", "aria-controls", "aria-describedby", "tooltip"];
39
- function iconEchoOverlays(kind, up) {
40
- return kind === "close" && !up;
41
- }
42
- function iconEchoElement(trigger, kind, onClose, surface) {
43
- const echo = echoOf(trigger, kind, onClose);
44
- if (echo == null || !surface) return echo;
45
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_theme.SurfaceContext.Provider, {
46
- ...surface,
47
- children: echo
48
- });
49
- }
50
- function echoOf(trigger, _kind, onClose) {
51
- if (!(0, import_react2.isValidElement)(trigger)) return null;
52
- const props = trigger.props;
53
- const label = (0, import_t.t)("Close");
54
- const dropped = Object.fromEntries(DROPPED_PROPS.map(name => [name, void 0]));
55
- if (props.icon != null) {
56
- return (0, import_react2.cloneElement)(trigger, {
57
- ...dropped,
58
- ref: null,
59
- icon: import_react.XIcon,
60
- "aria-label": label,
61
- onPress: onClose,
62
- testID: ICON_ECHO_TEST_ID,
63
- "data-testid": ICON_ECHO_TEST_ID
64
- });
65
- }
66
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(CircleClose, {
67
- label,
68
- onClose
69
- });
70
- }
71
- const avatarPlate = "$selectedBackground";
72
- const circleGlyphFallbackPx = 18;
73
- function CircleClose({
74
- label,
75
- onClose
76
- }) {
77
- const theme = (0, import_tamagui.useTheme)();
78
- const [side, setSide] = (0, import_react2.useState)(0);
79
- const ink = theme.selectedColor?.val ?? theme.color?.val;
80
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
81
- role: "button",
82
- "aria-label": label,
83
- tabIndex: 0,
84
- cursor: "pointer",
85
- width: "100%",
86
- height: "100%",
87
- borderRadius: 1e5,
88
- backgroundColor: avatarPlate,
89
- alignItems: "center",
90
- justifyContent: "center",
91
- pressStyle: {
92
- opacity: 0.6
93
- },
94
- onPress: onClose,
95
- onLayout: event => setSide(Math.min(event.nativeEvent.layout.width, event.nativeEvent.layout.height)),
96
- testID: ICON_ECHO_TEST_ID,
97
- "data-testid": ICON_ECHO_TEST_ID,
98
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.XIcon, {
99
- size: side > 0 ? Math.round(side * import_circleGlyph.ICON_BUTTON_CIRCLE_GLYPH_RATIO) : circleGlyphFallbackPx,
100
- weight: "bold",
101
- color: ink,
102
- ...(0, import_circleGlyph.boldStroke)("bold", typeof ink === "string" ? ink : void 0),
103
- "aria-hidden": true
104
- })
105
- });
106
- }
@@ -1,116 +0,0 @@
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
- var ink = (_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;
87
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.View, {
88
- role: "button",
89
- "aria-label": label,
90
- tabIndex: 0,
91
- cursor: "pointer",
92
- width: "100%",
93
- height: "100%",
94
- borderRadius: 1e5,
95
- backgroundColor: avatarPlate,
96
- alignItems: "center",
97
- justifyContent: "center",
98
- pressStyle: {
99
- opacity: 0.6
100
- },
101
- onPress: onClose,
102
- onLayout: function onLayout(event) {
103
- return setSide(Math.min(event.nativeEvent.layout.width, event.nativeEvent.layout.height));
104
- },
105
- testID: ICON_ECHO_TEST_ID,
106
- "data-testid": ICON_ECHO_TEST_ID,
107
- children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react.XIcon, {
108
- size: side > 0 ? Math.round(side * import_circleGlyph.ICON_BUTTON_CIRCLE_GLYPH_RATIO) : circleGlyphFallbackPx,
109
- weight: "bold",
110
- color: ink,
111
- ...(0, import_circleGlyph.boldStroke)("bold", typeof ink === "string" ? ink : void 0),
112
- "aria-hidden": true
113
- })
114
- });
115
- }
116
- //# sourceMappingURL=iconEcho.native.js.map
@@ -1 +0,0 @@
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","ink","selectedColor","val","color","View","role","tabIndex","cursor","width","height","borderRadius","backgroundColor","alignItems","justifyContent","pressStyle","opacity","onLayout","event"],"sources":["../../../src/FloatingPanel/iconEcho.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,gBAAA;AAAAC,QAAA,CAAAD,gBAAA;EAAAE,iBAAA,EAAAA,CAAA,KAAAA,iBAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAA,eAAA;EAAAC,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAX,YAAsB,CAAAK,gBAAA;AACtB,IAAAO,kBAA0F,GAAAC,OAAA;AAC1F,IAAAC,YAAA,GAAmDD,OAAA;AACnD,IAAAE,aAAA,GAAAF,OAA+B;AAC/B,IAAAG,YAAA,GAAAH,OAA2D;AAC3D,IAAAI,cAAkB,GAAAJ,OAAA;AAoDT,IAAAK,kBAAA,GAAAL,OAAA;AAzCF,IAAAM,QAAM,GAAAN,OAAA,wBAAoB;AAEjC,IAAAN,iBAAM,GAAgB;AAAA,IACpBa,aAAA,IACA,MACA,eACA,aACA,iBACA,iBACA,iBACA,iBACA,oBACF,UAQO;AACL,SAAOX,gBAASA,CAAAY,IAAY,EAAAC,EAAA;EAC9B,O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e,CAAAuC,QAAA;EAAA,IACf,CAAAC,IAAA,EAAAC,OAAc,QAAA3C,aAAa,CAAA4C,QAAA;EAAA,IAC3BC,GAAA,IAAAR,IAAS,IAAAC,oBAAA,GAAAE,KAAA,CAAAM,aAAA,cAAAR,oBAAA,uBAAAA,oBAAA,CAAAS,GAAA,cAAAV,IAAA,cAAAA,IAAA,IAAAE,YAAA,GAAAC,KAAA,CAAAQ,KAAA,cAAAT,YAAA,uBAAAA,YAAA,CAAAQ,GAAA;EAAA,OACT,eAAW,EACT,EAAAlD,kBAAiB,CAAAgB,GAAM,EAAAX,cAAY,CAAA+C,IAAO;IAAuCC,IAEnF,UAAQ;IAAA,YACR,EAAA9B,KAAa;IAAA+B,QAEb;IAAAC,MAAC;IAAAC,KAAA;IAAAC,MACC,QAAM;IAA+DC,YACrE,EAAO;IAAAC,eACA,EAAAtB,WAAA;IAAAuB,UACN,UAAG;IAA4DC,cAChE,UAAW;IAAAC,UAAA;MACbC,OAAA;IAAA;IACF7B,OAAA,EAAAtB,OAAA;IAEJoD,QAAA,WAAAA,SAAAC,KAAA","ignoreList":[]}
@@ -1,79 +0,0 @@
1
- import { XIcon } from "@phosphor-icons/react";
2
- import { cloneElement, isValidElement, useState } from "react";
3
- import { SurfaceContext } from "@multiplatform.one/theme";
4
- import { useTheme, View } from "tamagui";
5
- import { boldStroke, ICON_BUTTON_CIRCLE_GLYPH_RATIO } from "../Button/circleGlyph.mjs";
6
- import { t } from "../shared/t.mjs";
7
- import { jsx } from "react/jsx-runtime";
8
- const ICON_ECHO_TEST_ID = "floating-panel-icon-echo";
9
- const DROPPED_PROPS = ["id", "onLongPress", "onKeyDown", "onContextMenu", "aria-haspopup", "aria-expanded", "aria-controls", "aria-describedby", "tooltip"];
10
- function iconEchoOverlays(kind, up) {
11
- return kind === "close" && !up;
12
- }
13
- function iconEchoElement(trigger, kind, onClose, surface) {
14
- const echo = echoOf(trigger, kind, onClose);
15
- if (echo == null || !surface) return echo;
16
- return /* @__PURE__ */jsx(SurfaceContext.Provider, {
17
- ...surface,
18
- children: echo
19
- });
20
- }
21
- function echoOf(trigger, _kind, onClose) {
22
- if (!isValidElement(trigger)) return null;
23
- const props = trigger.props;
24
- const label = t("Close");
25
- const dropped = Object.fromEntries(DROPPED_PROPS.map(name => [name, void 0]));
26
- if (props.icon != null) {
27
- return cloneElement(trigger, {
28
- ...dropped,
29
- ref: null,
30
- icon: XIcon,
31
- "aria-label": label,
32
- onPress: onClose,
33
- testID: ICON_ECHO_TEST_ID,
34
- "data-testid": ICON_ECHO_TEST_ID
35
- });
36
- }
37
- return /* @__PURE__ */jsx(CircleClose, {
38
- label,
39
- onClose
40
- });
41
- }
42
- const avatarPlate = "$selectedBackground";
43
- const circleGlyphFallbackPx = 18;
44
- function CircleClose({
45
- label,
46
- onClose
47
- }) {
48
- const theme = useTheme();
49
- const [side, setSide] = useState(0);
50
- const ink = theme.selectedColor?.val ?? theme.color?.val;
51
- return /* @__PURE__ */jsx(View, {
52
- role: "button",
53
- "aria-label": label,
54
- tabIndex: 0,
55
- cursor: "pointer",
56
- width: "100%",
57
- height: "100%",
58
- borderRadius: 1e5,
59
- backgroundColor: avatarPlate,
60
- alignItems: "center",
61
- justifyContent: "center",
62
- pressStyle: {
63
- opacity: 0.6
64
- },
65
- onPress: onClose,
66
- onLayout: event => setSide(Math.min(event.nativeEvent.layout.width, event.nativeEvent.layout.height)),
67
- testID: ICON_ECHO_TEST_ID,
68
- "data-testid": ICON_ECHO_TEST_ID,
69
- children: /* @__PURE__ */jsx(XIcon, {
70
- size: side > 0 ? Math.round(side * ICON_BUTTON_CIRCLE_GLYPH_RATIO) : circleGlyphFallbackPx,
71
- weight: "bold",
72
- color: ink,
73
- ...boldStroke("bold", typeof ink === "string" ? ink : void 0),
74
- "aria-hidden": true
75
- })
76
- });
77
- }
78
- export { ICON_ECHO_TEST_ID, iconEchoElement, iconEchoOverlays };
79
- //# sourceMappingURL=iconEcho.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["XIcon","cloneElement","isValidElement","useState","SurfaceContext","useTheme","View","boldStroke","ICON_BUTTON_CIRCLE_GLYPH_RATIO","t","jsx","ICON_ECHO_TEST_ID","DROPPED_PROPS","iconEchoOverlays","kind","up","iconEchoElement","trigger","onClose","surface","echo","echoOf","Provider","children","_kind","props","label","dropped","Object","fromEntries","map","name","icon","ref","onPress","testID","CircleClose","avatarPlate","circleGlyphFallbackPx","theme","side","setSide","ink","selectedColor","val","color","role","tabIndex","cursor","width","height","borderRadius","backgroundColor","alignItems","justifyContent","pressStyle","opacity","onLayout","event","Math","min","nativeEvent","layout","size","round","weight"],"sources":["../../../src/FloatingPanel/iconEcho.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,KAAA,QAAa;AACtB,SAASC,YAAA,EAAcC,cAAA,EAAgBC,QAAA,QAAmD;AAC1F,SAASC,cAAA,QAA0C;AACnD,SAASC,QAAA,EAAUC,IAAA,QAAY;AAC/B,SAASC,UAAA,EAAYC,8BAAA,QAAsC;AAC3D,SAASC,CAAA,QAAS;AAoDT,SAAAC,GAAA;AAzCF,MAAMC,iBAAA,GAAoB;AAEjC,MAAMC,aAAA,GAAgB,CACpB,MACA,eACA,aACA,iBACA,iBACA,iBACA,iBACA,oBACA,UACF;AAQO,SAASC,iBAAiBC,IAAA,EAAgBC,EAAA,EAAsB;EACrE,OAAOD,IAAA,KAAS,WAAW,CAACC,EAAA;AAC9B;AAWO,SAASC,gBACdC,OAAA,EACAH,IAAA,EACAI,OAAA,EACAC,OAAA,EACW;EACX,MAAMC,IAAA,GAAOC,MAAA,CAAOJ,OAAA,EAASH,IAAA,EAAMI,OAAO;EAC1C,IAAIE,IAAA,IAAQ,QAAQ,CAACD,OAAA,EAAS,OAAOC,IAAA;EACrC,OAAO,eAAAV,GAAA,CAACN,cAAA,CAAekB,QAAA,EAAf;IAAyB,GAAGH,OAAA;IAAUI,QAAA,EAAAH;EAAA,CAAK;AACrD;AAEA,SAASC,OAAOJ,OAAA,EA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AC3BtB,OAAA,EAAShB,OAAA;IACTuC,QAAA,EAAWC,KAAA,IACTjB,OAAA,CAAQkB,IAAA,CAAKC,GAAA,CAAIF,KAAA,CAAMG,WAAA,CAAYC,MAAA,CAAOb,KAAA,EAAOS,KAAA,CAAMG,WAAA,CAAYC,MAAA,CAAOZ,MAAM,CAAC;IAEnFf,MAAA,EAAQxB,iBAAA;IACR,eAAaA,iBAAA;IAEbY,QAAA,iBAAAb,GAAA,CAACV,KAAA;MACC+D,IAAA,EAAMvB,IAAA,GAAO,IAAImB,IAAA,CAAKK,KAAA,CAAMxB,IAAA,GAAOhC,8BAA8B,IAAI8B,qBAAA;MACrE2B,MAAA,EAAO;MACPpB,KAAA,EAAOH,GAAA;MACN,GAAGnC,UAAA,CAAW,QAAQ,OAAOmC,GAAA,KAAQ,WAAWA,GAAA,GAAM,MAAS;MAChE,eAAW;IAAA,CACb;EAAA,CACF;AAEJ","ignoreList":[]}
@@ -1,86 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { XIcon } from "@phosphor-icons/react";
3
- import { cloneElement, isValidElement, useState } from "react";
4
- import { SurfaceContext } from "@multiplatform.one/theme";
5
- import { useTheme, View } from "tamagui";
6
- import { boldStroke, ICON_BUTTON_CIRCLE_GLYPH_RATIO } from "../Button/circleGlyph.native.js";
7
- import { t } from "../shared/t.native.js";
8
- var ICON_ECHO_TEST_ID = "floating-panel-icon-echo";
9
- var DROPPED_PROPS = ["id", "onLongPress", "onKeyDown", "onContextMenu", "aria-haspopup", "aria-expanded", "aria-controls", "aria-describedby", "tooltip"];
10
- function iconEchoOverlays(kind, up) {
11
- return kind === "close" && !up;
12
- }
13
- function iconEchoElement(trigger, kind, onClose, surface) {
14
- var echo = echoOf(trigger, kind, onClose);
15
- if (echo == null || !surface) return echo;
16
- return /* @__PURE__ */_jsx(SurfaceContext.Provider, {
17
- ...surface,
18
- children: echo
19
- });
20
- }
21
- function echoOf(trigger, _kind, onClose) {
22
- if (! /* @__PURE__ */isValidElement(trigger)) return null;
23
- var props = trigger.props;
24
- var label = t("Close");
25
- var dropped = Object.fromEntries(DROPPED_PROPS.map(function (name) {
26
- return [name, void 0];
27
- }));
28
- if (props.icon != null) {
29
- return /* @__PURE__ */cloneElement(trigger, {
30
- ...dropped,
31
- ref: null,
32
- icon: XIcon,
33
- "aria-label": label,
34
- onPress: onClose,
35
- testID: ICON_ECHO_TEST_ID,
36
- "data-testid": ICON_ECHO_TEST_ID
37
- });
38
- }
39
- return /* @__PURE__ */_jsx(CircleClose, {
40
- label,
41
- onClose
42
- });
43
- }
44
- var avatarPlate = "$selectedBackground";
45
- var circleGlyphFallbackPx = 18;
46
- function CircleClose(param) {
47
- var {
48
- label,
49
- onClose
50
- } = param;
51
- var _ref;
52
- var _theme_selectedColor, _theme_color;
53
- var theme = useTheme();
54
- var [side, setSide] = useState(0);
55
- var ink = (_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;
56
- return /* @__PURE__ */_jsx(View, {
57
- role: "button",
58
- "aria-label": label,
59
- tabIndex: 0,
60
- cursor: "pointer",
61
- width: "100%",
62
- height: "100%",
63
- borderRadius: 1e5,
64
- backgroundColor: avatarPlate,
65
- alignItems: "center",
66
- justifyContent: "center",
67
- pressStyle: {
68
- opacity: 0.6
69
- },
70
- onPress: onClose,
71
- onLayout: function onLayout(event) {
72
- return setSide(Math.min(event.nativeEvent.layout.width, event.nativeEvent.layout.height));
73
- },
74
- testID: ICON_ECHO_TEST_ID,
75
- "data-testid": ICON_ECHO_TEST_ID,
76
- children: /* @__PURE__ */_jsx(XIcon, {
77
- size: side > 0 ? Math.round(side * ICON_BUTTON_CIRCLE_GLYPH_RATIO) : circleGlyphFallbackPx,
78
- weight: "bold",
79
- color: ink,
80
- ...boldStroke("bold", typeof ink === "string" ? ink : void 0),
81
- "aria-hidden": true
82
- })
83
- });
84
- }
85
- export { ICON_ECHO_TEST_ID, iconEchoElement, iconEchoOverlays };
86
- //# sourceMappingURL=iconEcho.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["jsx","_jsx","XIcon","cloneElement","isValidElement","useState","SurfaceContext","useTheme","View","boldStroke","ICON_BUTTON_CIRCLE_GLYPH_RATIO","t","ICON_ECHO_TEST_ID","DROPPED_PROPS","iconEchoOverlays","kind","up","iconEchoElement","trigger","onClose","surface","echo","echoOf","Provider","children","_kind","props","label","dropped","Object","fromEntries","map","name","icon","ref","onPress","testID","CircleClose","avatarPlate","circleGlyphFallbackPx","param","_ref","_theme_selectedColor","_theme_color","theme","side","setSide","ink","selectedColor","val","color","role","tabIndex","cursor","width","height","borderRadius","backgroundColor","alignItems","justifyContent","pressStyle","opacity","onLayout","event","Math","min","nativeEvent","layout"],"sources":["../../../src/FloatingPanel/iconEcho.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAA,IAAAC,IAAA,QAAa;AACtB,SAASC,KAAA,+BAA8B;AACvC,SAASC,YAAA,EAAAC,cAA0C,EAAAC,QAAA;AACnD,SAASC,cAAU,QAAY;AAC/B,SAASC,QAAA,EAAAC,IAAY;AACrB,SAASC,UAAS,EAAAC,8BAAA;AAoDT,SAAAC,CAAA;AAzCF,IAAAC,iBAAM,6BAAoB;AAEjC,IAAAC,aAAM,IACJ,MACA,eACA,aACA,iBACA,iBACA,iBACA,iBACA,oBACA,UACF;AAQO,SAASC,iBAAiBC,IAAA,EAAgBC,EAAA,EAAsB;EACrE,OAAOD,IAAA,KAAS,WAAW,CAACC,EAAA;AAC9B;AAWO,SAASC,gBACdC,OAAA,EACAH,IAAA,EACAI,OAAA,EACAC,OAAA,EACW;EACX,IAAAC,IAAM,GAAAC,MAAO,CAAAJ,OAAO,EAAAH,IAAS,EAAAI,OAAM;EACnC,IAAIE,IAAA,IAAQ,QAAQ,CAACD,OAAA,EAAS,OAAOC,IAAA;EACrC,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AC3B,eAAShD,IAAA,CAAAO,IAAA;IAAA2C,IACT,UAAW;IACwE,YAE3E,EAAAxB,KAAA;IAAAyB,QACR;IAAaC,MAEb;IAAAC,KAAC;IAAAC,MAAA;IAAAC,YACO;IAA+DC,eAC9D,EAAAnB,WAAA;IAAAoB,UACP,UAAO;IAAAC,cACH,UAAW;IAAiDC,UAChE;MAAWC,OAAA;IAAA;IACb1B,OAAA,EAAAhB,OAAA;IACF2C,QAAA,WAAAA,SAAAC,KAAA;MAEJ,OAAAjB,OAAA,CAAAkB,IAAA,CAAAC,GAAA,CAAAF,KAAA,CAAAG,WAAA,CAAAC,MAAA,CAAAb,KAAA,EAAAS,KAAA,CAAAG,WAAA,CAAAC,MAAA,CAAAZ,MAAA","ignoreList":[]}
@@ -1,79 +0,0 @@
1
- import { XIcon } from "@phosphor-icons/react";
2
- import { cloneElement, isValidElement, useState } from "react";
3
- import { SurfaceContext } from "@multiplatform.one/theme";
4
- import { useTheme, View } from "tamagui";
5
- import { boldStroke, ICON_BUTTON_CIRCLE_GLYPH_RATIO } from "../Button/circleGlyph.mjs";
6
- import { t } from "../shared/t.mjs";
7
- import { jsx } from "react/jsx-runtime";
8
- const ICON_ECHO_TEST_ID = "floating-panel-icon-echo";
9
- const DROPPED_PROPS = ["id", "onLongPress", "onKeyDown", "onContextMenu", "aria-haspopup", "aria-expanded", "aria-controls", "aria-describedby", "tooltip"];
10
- function iconEchoOverlays(kind, up) {
11
- return kind === "close" && !up;
12
- }
13
- function iconEchoElement(trigger, kind, onClose, surface) {
14
- const echo = echoOf(trigger, kind, onClose);
15
- if (echo == null || !surface) return echo;
16
- return /* @__PURE__ */jsx(SurfaceContext.Provider, {
17
- ...surface,
18
- children: echo
19
- });
20
- }
21
- function echoOf(trigger, _kind, onClose) {
22
- if (!isValidElement(trigger)) return null;
23
- const props = trigger.props;
24
- const label = t("Close");
25
- const dropped = Object.fromEntries(DROPPED_PROPS.map(name => [name, void 0]));
26
- if (props.icon != null) {
27
- return cloneElement(trigger, {
28
- ...dropped,
29
- ref: null,
30
- icon: XIcon,
31
- "aria-label": label,
32
- onPress: onClose,
33
- testID: ICON_ECHO_TEST_ID,
34
- "data-testid": ICON_ECHO_TEST_ID
35
- });
36
- }
37
- return /* @__PURE__ */jsx(CircleClose, {
38
- label,
39
- onClose
40
- });
41
- }
42
- const avatarPlate = "$selectedBackground";
43
- const circleGlyphFallbackPx = 18;
44
- function CircleClose({
45
- label,
46
- onClose
47
- }) {
48
- const theme = useTheme();
49
- const [side, setSide] = useState(0);
50
- const ink = theme.selectedColor?.val ?? theme.color?.val;
51
- return /* @__PURE__ */jsx(View, {
52
- role: "button",
53
- "aria-label": label,
54
- tabIndex: 0,
55
- cursor: "pointer",
56
- width: "100%",
57
- height: "100%",
58
- borderRadius: 1e5,
59
- backgroundColor: avatarPlate,
60
- alignItems: "center",
61
- justifyContent: "center",
62
- pressStyle: {
63
- opacity: 0.6
64
- },
65
- onPress: onClose,
66
- onLayout: event => setSide(Math.min(event.nativeEvent.layout.width, event.nativeEvent.layout.height)),
67
- testID: ICON_ECHO_TEST_ID,
68
- "data-testid": ICON_ECHO_TEST_ID,
69
- children: /* @__PURE__ */jsx(XIcon, {
70
- size: side > 0 ? Math.round(side * ICON_BUTTON_CIRCLE_GLYPH_RATIO) : circleGlyphFallbackPx,
71
- weight: "bold",
72
- color: ink,
73
- ...boldStroke("bold", typeof ink === "string" ? ink : void 0),
74
- "aria-hidden": true
75
- })
76
- });
77
- }
78
- export { ICON_ECHO_TEST_ID, iconEchoElement, iconEchoOverlays };
79
- //# sourceMappingURL=iconEcho.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["XIcon","cloneElement","isValidElement","useState","SurfaceContext","useTheme","View","boldStroke","ICON_BUTTON_CIRCLE_GLYPH_RATIO","t","jsx","ICON_ECHO_TEST_ID","DROPPED_PROPS","iconEchoOverlays","kind","up","iconEchoElement","trigger","onClose","surface","echo","echoOf","Provider","children","_kind","props","label","dropped","Object","fromEntries","map","name","icon","ref","onPress","testID","CircleClose","avatarPlate","circleGlyphFallbackPx","theme","side","setSide","ink","selectedColor","val","color","role","tabIndex","cursor","width","height","borderRadius","backgroundColor","alignItems","justifyContent","pressStyle","opacity","onLayout","event","Math","min","nativeEvent","layout","size","round","weight"],"sources":["../../../src/FloatingPanel/iconEcho.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,KAAA,QAAa;AACtB,SAASC,YAAA,EAAcC,cAAA,EAAgBC,QAAA,QAAmD;AAC1F,SAASC,cAAA,QAA0C;AACnD,SAASC,QAAA,EAAUC,IAAA,QAAY;AAC/B,SAASC,UAAA,EAAYC,8BAAA,QAAsC;AAC3D,SAASC,CAAA,QAAS;AAoDT,SAAAC,GAAA;AAzCF,MAAMC,iBAAA,GAAoB;AAEjC,MAAMC,aAAA,GAAgB,CACpB,MACA,eACA,aACA,iBACA,iBACA,iBACA,iBACA,oBACA,UACF;AAQO,SAASC,iBAAiBC,IAAA,EAAgBC,EAAA,EAAsB;EACrE,OAAOD,IAAA,KAAS,WAAW,CAACC,EAAA;AAC9B;AAWO,SAASC,gBACdC,OAAA,EACAH,IAAA,EACAI,OAAA,EACAC,OAAA,EACW;EACX,MAAMC,IAAA,GAAOC,MAAA,CAAOJ,OAAA,EAASH,IAAA,EAAMI,OAAO;EAC1C,IAAIE,IAAA,IAAQ,QAAQ,CAACD,OAAA,EAAS,OAAOC,IAAA;EACrC,OAAO,eAAAV,GAAA,CAACN,cAAA,CAAekB,QAAA,EAAf;IAAyB,GAAGH,OAAA;IAAUI,QAAA,EAAAH;EAAA,CAAK;AACrD;AAEA,SAASC,OAAOJ,OAAA,EAAoBO,KAAA,EAAiBN,OAAA,EAAgC;EACnF,IAAI,CAAChB,cAAA,CAAee,OAAO,GAAG,OAAO;EACrC,MAAMQ,KAAA,GAAQR,OAAA,CAAQQ,KAAA;EACtB,MAAMC,KAAA,GAAQjB,CAAA,CAAE,OAAO;EACvB,MAAMkB,OAAA,GAAUC,MAAA,CAAO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