@multiplatform.one/forms 7.66.0 → 7.68.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 (527) hide show
  1. package/dist/cjs/AdaptivePopup/index.cjs +45 -5
  2. package/dist/cjs/AdaptivePopup/index.native.js +47 -5
  3. package/dist/cjs/AdaptivePopup/index.native.js.map +1 -1
  4. package/dist/cjs/Button/glass.cjs +30 -0
  5. package/dist/cjs/Button/glass.native.js +47 -0
  6. package/dist/cjs/Button/glass.native.js.map +1 -0
  7. package/dist/cjs/Button/index.cjs +157 -28
  8. package/dist/cjs/Button/index.native.js +156 -27
  9. package/dist/cjs/Button/index.native.js.map +1 -1
  10. package/dist/cjs/ContextualSaveBar/index.cjs +6 -8
  11. package/dist/cjs/ContextualSaveBar/index.native.js +6 -8
  12. package/dist/cjs/ContextualSaveBar/index.native.js.map +1 -1
  13. package/dist/cjs/DescriptionList/index.cjs +0 -1
  14. package/dist/cjs/DescriptionList/index.native.js +0 -1
  15. package/dist/cjs/DescriptionList/index.native.js.map +1 -1
  16. package/dist/cjs/FloatingPanel/RegularPanel.cjs +164 -0
  17. package/dist/cjs/FloatingPanel/RegularPanel.native.js +169 -0
  18. package/dist/cjs/FloatingPanel/RegularPanel.native.js.map +1 -0
  19. package/dist/cjs/FloatingPanel/compactFace.cjs +6 -0
  20. package/dist/cjs/FloatingPanel/compactFace.native.js +6 -0
  21. package/dist/cjs/FloatingPanel/compactFace.native.js.map +1 -1
  22. package/dist/cjs/FloatingPanel/containingBlock.cjs +46 -0
  23. package/dist/cjs/FloatingPanel/containingBlock.native.js +51 -0
  24. package/dist/cjs/FloatingPanel/containingBlock.native.js.map +1 -0
  25. package/dist/cjs/FloatingPanel/index.cjs +2 -20
  26. package/dist/cjs/FloatingPanel/index.native.js +79 -45
  27. package/dist/cjs/FloatingPanel/index.native.js.map +1 -1
  28. package/dist/cjs/FloatingPanel/pointAnchor.cjs +25 -0
  29. package/dist/cjs/FloatingPanel/pointAnchor.native.js +26 -0
  30. package/dist/cjs/FloatingPanel/pointAnchor.native.js.map +1 -1
  31. package/dist/cjs/FloatingPanel/regularPlacement.cjs +61 -0
  32. package/dist/cjs/FloatingPanel/regularPlacement.native.js +65 -0
  33. package/dist/cjs/FloatingPanel/regularPlacement.native.js.map +1 -0
  34. package/dist/cjs/fields/Barcode/BarcodeScanner.cjs +7 -8
  35. package/dist/cjs/fields/Barcode/BarcodeScanner.native.js +7 -8
  36. package/dist/cjs/fields/Barcode/BarcodeScanner.native.js.map +1 -1
  37. package/dist/cjs/fields/Combobox/index.cjs +1 -1
  38. package/dist/cjs/fields/Combobox/index.native.js +3 -1
  39. package/dist/cjs/fields/Combobox/index.native.js.map +1 -1
  40. package/dist/cjs/fields/FileUpload/index.cjs +83 -60
  41. package/dist/cjs/fields/FileUpload/index.native.js +96 -73
  42. package/dist/cjs/fields/FileUpload/index.native.js.map +1 -1
  43. package/dist/cjs/fields/Geolocation/index.cjs +7 -8
  44. package/dist/cjs/fields/Geolocation/index.native.js +7 -8
  45. package/dist/cjs/fields/Geolocation/index.native.js.map +1 -1
  46. package/dist/cjs/fields/ImageField/index.cjs +4 -6
  47. package/dist/cjs/fields/ImageField/index.native.js +4 -6
  48. package/dist/cjs/fields/ImageField/index.native.js.map +1 -1
  49. package/dist/cjs/fields/Input/index.cjs +5 -0
  50. package/dist/cjs/fields/Input/index.native.js +5 -0
  51. package/dist/cjs/fields/Input/index.native.js.map +1 -1
  52. package/dist/cjs/fields/Select/InlineChoices.cjs +3 -2
  53. package/dist/cjs/fields/Select/InlineChoices.native.js +5 -2
  54. package/dist/cjs/fields/Select/InlineChoices.native.js.map +1 -1
  55. package/dist/cjs/fields/Select/SheetPickerRow.cjs +154 -0
  56. package/dist/cjs/fields/Select/SheetPickerRow.native.js +165 -0
  57. package/dist/cjs/fields/Select/SheetPickerRow.native.js.map +1 -0
  58. package/dist/cjs/fields/Select/index.cjs +63 -4
  59. package/dist/cjs/fields/Select/index.native.js +85 -26
  60. package/dist/cjs/fields/Select/index.native.js.map +1 -1
  61. package/dist/cjs/fields/Select/shouldInlineChoices.cjs +14 -1
  62. package/dist/cjs/fields/Select/shouldInlineChoices.native.js +15 -1
  63. package/dist/cjs/fields/Select/shouldInlineChoices.native.js.map +1 -1
  64. package/dist/cjs/fields/Slider/index.cjs +96 -4
  65. package/dist/cjs/fields/Slider/index.native.js +103 -5
  66. package/dist/cjs/fields/Slider/index.native.js.map +1 -1
  67. package/dist/cjs/fields/Switch/index.cjs +71 -1
  68. package/dist/cjs/fields/Switch/index.native.js +72 -1
  69. package/dist/cjs/fields/Switch/index.native.js.map +1 -1
  70. package/dist/cjs/fields/ToggleGroup/index.cjs +67 -1
  71. package/dist/cjs/fields/ToggleGroup/index.native.js +75 -1
  72. package/dist/cjs/fields/ToggleGroup/index.native.js.map +1 -1
  73. package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.cjs +54 -47
  74. package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.native.js +64 -49
  75. package/dist/cjs/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
  76. package/dist/cjs/fields/nativeDateTime/sheetKeyboard.cjs +54 -0
  77. package/dist/cjs/fields/nativeDateTime/sheetKeyboard.native.js +57 -0
  78. package/dist/cjs/fields/nativeDateTime/sheetKeyboard.native.js.map +1 -0
  79. package/dist/cjs/index.cjs +19 -1
  80. package/dist/cjs/index.native.js +18 -0
  81. package/dist/cjs/index.native.js.map +1 -1
  82. package/dist/cjs/shared/colorRamps.cjs +0 -8
  83. package/dist/cjs/shared/colorRamps.native.js +0 -8
  84. package/dist/cjs/shared/colorRamps.native.js.map +1 -1
  85. package/dist/cjs/shared/overlaySizeClass.cjs +42 -0
  86. package/dist/cjs/shared/overlaySizeClass.native.js +45 -0
  87. package/dist/cjs/shared/overlaySizeClass.native.js.map +1 -0
  88. package/dist/cjs/shared/sheetNavigation.cjs +76 -0
  89. package/dist/cjs/shared/sheetNavigation.native.js +129 -0
  90. package/dist/cjs/shared/sheetNavigation.native.js.map +1 -0
  91. package/dist/cjs/shared/systemControlModules.cjs +34 -0
  92. package/dist/cjs/shared/systemControlModules.gnome.cjs +34 -0
  93. package/dist/cjs/shared/systemControlModules.gnome.native.js +37 -0
  94. package/dist/cjs/shared/systemControlModules.gnome.native.js.map +1 -0
  95. package/dist/cjs/shared/systemControlModules.native.js +77 -0
  96. package/dist/cjs/shared/systemControlModules.native.js.map +1 -0
  97. package/dist/cjs/shared/systemControls.cjs +47 -0
  98. package/dist/cjs/shared/systemControls.native.js +51 -0
  99. package/dist/cjs/shared/systemControls.native.js.map +1 -0
  100. package/dist/cjs/standardActions.cjs +117 -0
  101. package/dist/cjs/standardActions.native.js +120 -0
  102. package/dist/cjs/standardActions.native.js.map +1 -0
  103. package/dist/esm/AdaptivePopup/index.mjs +45 -5
  104. package/dist/esm/AdaptivePopup/index.mjs.map +1 -1
  105. package/dist/esm/AdaptivePopup/index.native.js +47 -5
  106. package/dist/esm/AdaptivePopup/index.native.js.map +1 -1
  107. package/dist/esm/Button/glass.mjs +5 -0
  108. package/dist/esm/Button/glass.mjs.map +1 -0
  109. package/dist/esm/Button/glass.native.js +19 -0
  110. package/dist/esm/Button/glass.native.js.map +1 -0
  111. package/dist/esm/Button/index.mjs +153 -28
  112. package/dist/esm/Button/index.mjs.map +1 -1
  113. package/dist/esm/Button/index.native.js +153 -28
  114. package/dist/esm/Button/index.native.js.map +1 -1
  115. package/dist/esm/ContextualSaveBar/index.mjs +7 -9
  116. package/dist/esm/ContextualSaveBar/index.mjs.map +1 -1
  117. package/dist/esm/ContextualSaveBar/index.native.js +7 -9
  118. package/dist/esm/ContextualSaveBar/index.native.js.map +1 -1
  119. package/dist/esm/DescriptionList/index.mjs +0 -1
  120. package/dist/esm/DescriptionList/index.mjs.map +1 -1
  121. package/dist/esm/DescriptionList/index.native.js +0 -1
  122. package/dist/esm/DescriptionList/index.native.js.map +1 -1
  123. package/dist/esm/FloatingPanel/RegularPanel.mjs +139 -0
  124. package/dist/esm/FloatingPanel/RegularPanel.mjs.map +1 -0
  125. package/dist/esm/FloatingPanel/RegularPanel.native.js +141 -0
  126. package/dist/esm/FloatingPanel/RegularPanel.native.js.map +1 -0
  127. package/dist/esm/FloatingPanel/compactFace.mjs +5 -1
  128. package/dist/esm/FloatingPanel/compactFace.mjs.map +1 -1
  129. package/dist/esm/FloatingPanel/compactFace.native.js +5 -1
  130. package/dist/esm/FloatingPanel/compactFace.native.js.map +1 -1
  131. package/dist/esm/FloatingPanel/containingBlock.mjs +21 -0
  132. package/dist/esm/FloatingPanel/containingBlock.mjs.map +1 -0
  133. package/dist/esm/FloatingPanel/containingBlock.native.js +23 -0
  134. package/dist/esm/FloatingPanel/containingBlock.native.js.map +1 -0
  135. package/dist/esm/FloatingPanel/index.mjs +1 -19
  136. package/dist/esm/FloatingPanel/index.mjs.map +1 -1
  137. package/dist/esm/FloatingPanel/index.native.js +83 -49
  138. package/dist/esm/FloatingPanel/index.native.js.map +1 -1
  139. package/dist/esm/FloatingPanel/pointAnchor.mjs +25 -1
  140. package/dist/esm/FloatingPanel/pointAnchor.mjs.map +1 -1
  141. package/dist/esm/FloatingPanel/pointAnchor.native.js +26 -1
  142. package/dist/esm/FloatingPanel/pointAnchor.native.js.map +1 -1
  143. package/dist/esm/FloatingPanel/regularPlacement.mjs +35 -0
  144. package/dist/esm/FloatingPanel/regularPlacement.mjs.map +1 -0
  145. package/dist/esm/FloatingPanel/regularPlacement.native.js +36 -0
  146. package/dist/esm/FloatingPanel/regularPlacement.native.js.map +1 -0
  147. package/dist/esm/fields/Barcode/BarcodeScanner.mjs +8 -9
  148. package/dist/esm/fields/Barcode/BarcodeScanner.mjs.map +1 -1
  149. package/dist/esm/fields/Barcode/BarcodeScanner.native.js +8 -9
  150. package/dist/esm/fields/Barcode/BarcodeScanner.native.js.map +1 -1
  151. package/dist/esm/fields/Combobox/index.mjs +1 -1
  152. package/dist/esm/fields/Combobox/index.mjs.map +1 -1
  153. package/dist/esm/fields/Combobox/index.native.js +3 -1
  154. package/dist/esm/fields/Combobox/index.native.js.map +1 -1
  155. package/dist/esm/fields/FileUpload/index.mjs +84 -61
  156. package/dist/esm/fields/FileUpload/index.mjs.map +1 -1
  157. package/dist/esm/fields/FileUpload/index.native.js +97 -74
  158. package/dist/esm/fields/FileUpload/index.native.js.map +1 -1
  159. package/dist/esm/fields/Geolocation/index.mjs +8 -9
  160. package/dist/esm/fields/Geolocation/index.mjs.map +1 -1
  161. package/dist/esm/fields/Geolocation/index.native.js +8 -9
  162. package/dist/esm/fields/Geolocation/index.native.js.map +1 -1
  163. package/dist/esm/fields/ImageField/index.mjs +6 -8
  164. package/dist/esm/fields/ImageField/index.mjs.map +1 -1
  165. package/dist/esm/fields/ImageField/index.native.js +6 -8
  166. package/dist/esm/fields/ImageField/index.native.js.map +1 -1
  167. package/dist/esm/fields/Input/index.mjs +6 -1
  168. package/dist/esm/fields/Input/index.mjs.map +1 -1
  169. package/dist/esm/fields/Input/index.native.js +6 -1
  170. package/dist/esm/fields/Input/index.native.js.map +1 -1
  171. package/dist/esm/fields/Select/InlineChoices.mjs +3 -2
  172. package/dist/esm/fields/Select/InlineChoices.mjs.map +1 -1
  173. package/dist/esm/fields/Select/InlineChoices.native.js +5 -2
  174. package/dist/esm/fields/Select/InlineChoices.native.js.map +1 -1
  175. package/dist/esm/fields/Select/SheetPickerRow.mjs +129 -0
  176. package/dist/esm/fields/Select/SheetPickerRow.mjs.map +1 -0
  177. package/dist/esm/fields/Select/SheetPickerRow.native.js +137 -0
  178. package/dist/esm/fields/Select/SheetPickerRow.native.js.map +1 -0
  179. package/dist/esm/fields/Select/index.mjs +64 -5
  180. package/dist/esm/fields/Select/index.mjs.map +1 -1
  181. package/dist/esm/fields/Select/index.native.js +86 -27
  182. package/dist/esm/fields/Select/index.native.js.map +1 -1
  183. package/dist/esm/fields/Select/shouldInlineChoices.mjs +12 -1
  184. package/dist/esm/fields/Select/shouldInlineChoices.mjs.map +1 -1
  185. package/dist/esm/fields/Select/shouldInlineChoices.native.js +13 -1
  186. package/dist/esm/fields/Select/shouldInlineChoices.native.js.map +1 -1
  187. package/dist/esm/fields/Slider/index.mjs +96 -4
  188. package/dist/esm/fields/Slider/index.mjs.map +1 -1
  189. package/dist/esm/fields/Slider/index.native.js +103 -5
  190. package/dist/esm/fields/Slider/index.native.js.map +1 -1
  191. package/dist/esm/fields/Switch/index.mjs +71 -1
  192. package/dist/esm/fields/Switch/index.mjs.map +1 -1
  193. package/dist/esm/fields/Switch/index.native.js +72 -1
  194. package/dist/esm/fields/Switch/index.native.js.map +1 -1
  195. package/dist/esm/fields/ToggleGroup/index.mjs +67 -1
  196. package/dist/esm/fields/ToggleGroup/index.mjs.map +1 -1
  197. package/dist/esm/fields/ToggleGroup/index.native.js +75 -1
  198. package/dist/esm/fields/ToggleGroup/index.native.js.map +1 -1
  199. package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.mjs +56 -49
  200. package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.mjs.map +1 -1
  201. package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.native.js +66 -51
  202. package/dist/esm/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
  203. package/dist/esm/fields/nativeDateTime/sheetKeyboard.mjs +21 -0
  204. package/dist/esm/fields/nativeDateTime/sheetKeyboard.mjs.map +1 -0
  205. package/dist/esm/fields/nativeDateTime/sheetKeyboard.native.js +21 -0
  206. package/dist/esm/fields/nativeDateTime/sheetKeyboard.native.js.map +1 -0
  207. package/dist/esm/index.mjs +5 -2
  208. package/dist/esm/index.mjs.map +1 -1
  209. package/dist/esm/index.native.js +5 -2
  210. package/dist/esm/index.native.js.map +1 -1
  211. package/dist/esm/shared/colorRamps.mjs +0 -8
  212. package/dist/esm/shared/colorRamps.mjs.map +1 -1
  213. package/dist/esm/shared/colorRamps.native.js +0 -8
  214. package/dist/esm/shared/colorRamps.native.js.map +1 -1
  215. package/dist/esm/shared/overlaySizeClass.mjs +14 -0
  216. package/dist/esm/shared/overlaySizeClass.mjs.map +1 -0
  217. package/dist/esm/shared/overlaySizeClass.native.js +14 -0
  218. package/dist/esm/shared/overlaySizeClass.native.js.map +1 -0
  219. package/dist/esm/shared/sheetNavigation.mjs +47 -0
  220. package/dist/esm/shared/sheetNavigation.mjs.map +1 -0
  221. package/dist/esm/shared/sheetNavigation.native.js +97 -0
  222. package/dist/esm/shared/sheetNavigation.native.js.map +1 -0
  223. package/dist/esm/shared/systemControlModules.gnome.mjs +8 -0
  224. package/dist/esm/shared/systemControlModules.gnome.mjs.map +1 -0
  225. package/dist/esm/shared/systemControlModules.gnome.native.js +8 -0
  226. package/dist/esm/shared/systemControlModules.gnome.native.js.map +1 -0
  227. package/dist/esm/shared/systemControlModules.mjs +8 -0
  228. package/dist/esm/shared/systemControlModules.mjs.map +1 -0
  229. package/dist/esm/shared/systemControlModules.native.js +47 -0
  230. package/dist/esm/shared/systemControlModules.native.js.map +1 -0
  231. package/dist/esm/shared/systemControls.mjs +19 -0
  232. package/dist/esm/shared/systemControls.mjs.map +1 -0
  233. package/dist/esm/shared/systemControls.native.js +20 -0
  234. package/dist/esm/shared/systemControls.native.js.map +1 -0
  235. package/dist/esm/standardActions.mjs +91 -0
  236. package/dist/esm/standardActions.mjs.map +1 -0
  237. package/dist/esm/standardActions.native.js +91 -0
  238. package/dist/esm/standardActions.native.js.map +1 -0
  239. package/dist/jsx/AdaptivePopup/index.mjs +45 -5
  240. package/dist/jsx/AdaptivePopup/index.mjs.map +1 -1
  241. package/dist/jsx/AdaptivePopup/index.native.js +47 -5
  242. package/dist/jsx/AdaptivePopup/index.native.js.map +1 -1
  243. package/dist/jsx/Button/glass.mjs +5 -0
  244. package/dist/jsx/Button/glass.mjs.map +1 -0
  245. package/dist/jsx/Button/glass.native.js +47 -0
  246. package/dist/jsx/Button/glass.native.js.map +1 -0
  247. package/dist/jsx/Button/index.mjs +153 -28
  248. package/dist/jsx/Button/index.mjs.map +1 -1
  249. package/dist/jsx/Button/index.native.js +156 -27
  250. package/dist/jsx/Button/index.native.js.map +1 -1
  251. package/dist/jsx/ContextualSaveBar/index.mjs +7 -9
  252. package/dist/jsx/ContextualSaveBar/index.mjs.map +1 -1
  253. package/dist/jsx/ContextualSaveBar/index.native.js +6 -8
  254. package/dist/jsx/ContextualSaveBar/index.native.js.map +1 -1
  255. package/dist/jsx/DescriptionList/index.mjs +0 -1
  256. package/dist/jsx/DescriptionList/index.mjs.map +1 -1
  257. package/dist/jsx/DescriptionList/index.native.js +0 -1
  258. package/dist/jsx/DescriptionList/index.native.js.map +1 -1
  259. package/dist/jsx/FloatingPanel/RegularPanel.mjs +139 -0
  260. package/dist/jsx/FloatingPanel/RegularPanel.mjs.map +1 -0
  261. package/dist/jsx/FloatingPanel/RegularPanel.native.js +169 -0
  262. package/dist/jsx/FloatingPanel/RegularPanel.native.js.map +1 -0
  263. package/dist/jsx/FloatingPanel/compactFace.mjs +5 -1
  264. package/dist/jsx/FloatingPanel/compactFace.mjs.map +1 -1
  265. package/dist/jsx/FloatingPanel/compactFace.native.js +6 -0
  266. package/dist/jsx/FloatingPanel/compactFace.native.js.map +1 -1
  267. package/dist/jsx/FloatingPanel/containingBlock.mjs +21 -0
  268. package/dist/jsx/FloatingPanel/containingBlock.mjs.map +1 -0
  269. package/dist/jsx/FloatingPanel/containingBlock.native.js +51 -0
  270. package/dist/jsx/FloatingPanel/containingBlock.native.js.map +1 -0
  271. package/dist/jsx/FloatingPanel/index.mjs +1 -19
  272. package/dist/jsx/FloatingPanel/index.mjs.map +1 -1
  273. package/dist/jsx/FloatingPanel/index.native.js +79 -45
  274. package/dist/jsx/FloatingPanel/index.native.js.map +1 -1
  275. package/dist/jsx/FloatingPanel/pointAnchor.mjs +25 -1
  276. package/dist/jsx/FloatingPanel/pointAnchor.mjs.map +1 -1
  277. package/dist/jsx/FloatingPanel/pointAnchor.native.js +26 -0
  278. package/dist/jsx/FloatingPanel/pointAnchor.native.js.map +1 -1
  279. package/dist/jsx/FloatingPanel/regularPlacement.mjs +35 -0
  280. package/dist/jsx/FloatingPanel/regularPlacement.mjs.map +1 -0
  281. package/dist/jsx/FloatingPanel/regularPlacement.native.js +65 -0
  282. package/dist/jsx/FloatingPanel/regularPlacement.native.js.map +1 -0
  283. package/dist/jsx/fields/Barcode/BarcodeScanner.mjs +8 -9
  284. package/dist/jsx/fields/Barcode/BarcodeScanner.mjs.map +1 -1
  285. package/dist/jsx/fields/Barcode/BarcodeScanner.native.js +7 -8
  286. package/dist/jsx/fields/Barcode/BarcodeScanner.native.js.map +1 -1
  287. package/dist/jsx/fields/Combobox/index.mjs +1 -1
  288. package/dist/jsx/fields/Combobox/index.mjs.map +1 -1
  289. package/dist/jsx/fields/Combobox/index.native.js +3 -1
  290. package/dist/jsx/fields/Combobox/index.native.js.map +1 -1
  291. package/dist/jsx/fields/FileUpload/index.mjs +84 -61
  292. package/dist/jsx/fields/FileUpload/index.mjs.map +1 -1
  293. package/dist/jsx/fields/FileUpload/index.native.js +96 -73
  294. package/dist/jsx/fields/FileUpload/index.native.js.map +1 -1
  295. package/dist/jsx/fields/Geolocation/index.mjs +8 -9
  296. package/dist/jsx/fields/Geolocation/index.mjs.map +1 -1
  297. package/dist/jsx/fields/Geolocation/index.native.js +7 -8
  298. package/dist/jsx/fields/Geolocation/index.native.js.map +1 -1
  299. package/dist/jsx/fields/ImageField/index.mjs +6 -8
  300. package/dist/jsx/fields/ImageField/index.mjs.map +1 -1
  301. package/dist/jsx/fields/ImageField/index.native.js +4 -6
  302. package/dist/jsx/fields/ImageField/index.native.js.map +1 -1
  303. package/dist/jsx/fields/Input/index.mjs +6 -1
  304. package/dist/jsx/fields/Input/index.mjs.map +1 -1
  305. package/dist/jsx/fields/Input/index.native.js +5 -0
  306. package/dist/jsx/fields/Input/index.native.js.map +1 -1
  307. package/dist/jsx/fields/Select/InlineChoices.mjs +3 -2
  308. package/dist/jsx/fields/Select/InlineChoices.mjs.map +1 -1
  309. package/dist/jsx/fields/Select/InlineChoices.native.js +5 -2
  310. package/dist/jsx/fields/Select/InlineChoices.native.js.map +1 -1
  311. package/dist/jsx/fields/Select/SheetPickerRow.mjs +129 -0
  312. package/dist/jsx/fields/Select/SheetPickerRow.mjs.map +1 -0
  313. package/dist/jsx/fields/Select/SheetPickerRow.native.js +165 -0
  314. package/dist/jsx/fields/Select/SheetPickerRow.native.js.map +1 -0
  315. package/dist/jsx/fields/Select/index.mjs +64 -5
  316. package/dist/jsx/fields/Select/index.mjs.map +1 -1
  317. package/dist/jsx/fields/Select/index.native.js +85 -26
  318. package/dist/jsx/fields/Select/index.native.js.map +1 -1
  319. package/dist/jsx/fields/Select/shouldInlineChoices.mjs +12 -1
  320. package/dist/jsx/fields/Select/shouldInlineChoices.mjs.map +1 -1
  321. package/dist/jsx/fields/Select/shouldInlineChoices.native.js +15 -1
  322. package/dist/jsx/fields/Select/shouldInlineChoices.native.js.map +1 -1
  323. package/dist/jsx/fields/Slider/index.mjs +96 -4
  324. package/dist/jsx/fields/Slider/index.mjs.map +1 -1
  325. package/dist/jsx/fields/Slider/index.native.js +103 -5
  326. package/dist/jsx/fields/Slider/index.native.js.map +1 -1
  327. package/dist/jsx/fields/Switch/index.mjs +71 -1
  328. package/dist/jsx/fields/Switch/index.mjs.map +1 -1
  329. package/dist/jsx/fields/Switch/index.native.js +72 -1
  330. package/dist/jsx/fields/Switch/index.native.js.map +1 -1
  331. package/dist/jsx/fields/ToggleGroup/index.mjs +67 -1
  332. package/dist/jsx/fields/ToggleGroup/index.mjs.map +1 -1
  333. package/dist/jsx/fields/ToggleGroup/index.native.js +75 -1
  334. package/dist/jsx/fields/ToggleGroup/index.native.js.map +1 -1
  335. package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.mjs +56 -49
  336. package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.mjs.map +1 -1
  337. package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.native.js +64 -49
  338. package/dist/jsx/fields/nativeDateTime/OsDateTimeSheet.native.js.map +1 -1
  339. package/dist/jsx/fields/nativeDateTime/sheetKeyboard.mjs +21 -0
  340. package/dist/jsx/fields/nativeDateTime/sheetKeyboard.mjs.map +1 -0
  341. package/dist/jsx/fields/nativeDateTime/sheetKeyboard.native.js +57 -0
  342. package/dist/jsx/fields/nativeDateTime/sheetKeyboard.native.js.map +1 -0
  343. package/dist/jsx/index.js +5 -2
  344. package/dist/jsx/index.js.map +1 -1
  345. package/dist/jsx/index.mjs +5 -2
  346. package/dist/jsx/index.mjs.map +1 -1
  347. package/dist/jsx/index.native.js +18 -0
  348. package/dist/jsx/index.native.js.map +1 -1
  349. package/dist/jsx/shared/colorRamps.mjs +0 -8
  350. package/dist/jsx/shared/colorRamps.mjs.map +1 -1
  351. package/dist/jsx/shared/colorRamps.native.js +0 -8
  352. package/dist/jsx/shared/colorRamps.native.js.map +1 -1
  353. package/dist/jsx/shared/overlaySizeClass.mjs +14 -0
  354. package/dist/jsx/shared/overlaySizeClass.mjs.map +1 -0
  355. package/dist/jsx/shared/overlaySizeClass.native.js +45 -0
  356. package/dist/jsx/shared/overlaySizeClass.native.js.map +1 -0
  357. package/dist/jsx/shared/sheetNavigation.mjs +47 -0
  358. package/dist/jsx/shared/sheetNavigation.mjs.map +1 -0
  359. package/dist/jsx/shared/sheetNavigation.native.js +129 -0
  360. package/dist/jsx/shared/sheetNavigation.native.js.map +1 -0
  361. package/dist/jsx/shared/systemControlModules.gnome.mjs +8 -0
  362. package/dist/jsx/shared/systemControlModules.gnome.mjs.map +1 -0
  363. package/dist/jsx/shared/systemControlModules.gnome.native.js +37 -0
  364. package/dist/jsx/shared/systemControlModules.gnome.native.js.map +1 -0
  365. package/dist/jsx/shared/systemControlModules.mjs +8 -0
  366. package/dist/jsx/shared/systemControlModules.mjs.map +1 -0
  367. package/dist/jsx/shared/systemControlModules.native.js +77 -0
  368. package/dist/jsx/shared/systemControlModules.native.js.map +1 -0
  369. package/dist/jsx/shared/systemControls.mjs +19 -0
  370. package/dist/jsx/shared/systemControls.mjs.map +1 -0
  371. package/dist/jsx/shared/systemControls.native.js +51 -0
  372. package/dist/jsx/shared/systemControls.native.js.map +1 -0
  373. package/dist/jsx/standardActions.mjs +91 -0
  374. package/dist/jsx/standardActions.mjs.map +1 -0
  375. package/dist/jsx/standardActions.native.js +120 -0
  376. package/dist/jsx/standardActions.native.js.map +1 -0
  377. package/package.json +20 -8
  378. package/src/AdaptivePopup/AdaptivePopup.spec.tsx +44 -0
  379. package/src/AdaptivePopup/AdaptivePopup.stories.tsx +12 -32
  380. package/src/AdaptivePopup/index.tsx +65 -13
  381. package/src/Button/Button.disabledGlyph.spec.tsx +111 -0
  382. package/src/Button/Button.iconButton.spec.tsx +279 -0
  383. package/src/Button/Button.stories.tsx +59 -3
  384. package/src/Button/glass.native.ts +38 -0
  385. package/src/Button/glass.ts +18 -0
  386. package/src/Button/index.tsx +272 -40
  387. package/src/ContextualSaveBar/ContextualSaveBar.spec.tsx +3 -1
  388. package/src/ContextualSaveBar/ContextualSaveBar.stories.tsx +2 -2
  389. package/src/ContextualSaveBar/index.tsx +7 -10
  390. package/src/ControlGroup/ControlGroup.stories.tsx +3 -2
  391. package/src/DescriptionList/index.tsx +0 -1
  392. package/src/ErrorSummary.stories.tsx +2 -1
  393. package/src/FieldLayout.stories.tsx +3 -2
  394. package/src/FloatingPanel/FloatingPanel.menuFace.native.spec.tsx +73 -3
  395. package/src/FloatingPanel/FloatingPanel.regularWidth.native.spec.tsx +193 -0
  396. package/src/FloatingPanel/FloatingPanel.stories.tsx +6 -10
  397. package/src/FloatingPanel/RegularPanel.tsx +159 -0
  398. package/src/FloatingPanel/compactFace.spec.ts +24 -1
  399. package/src/FloatingPanel/compactFace.ts +16 -0
  400. package/src/FloatingPanel/containingBlock.ts +32 -0
  401. package/src/FloatingPanel/index.native.tsx +80 -35
  402. package/src/FloatingPanel/index.tsx +1 -33
  403. package/src/FloatingPanel/pointAnchor.spec.ts +29 -0
  404. package/src/FloatingPanel/pointAnchor.ts +30 -0
  405. package/src/FloatingPanel/regularPlacement.spec.ts +65 -0
  406. package/src/FloatingPanel/regularPlacement.ts +40 -0
  407. package/src/Form/Form.stories.tsx +6 -5
  408. package/src/errorSummaryStories.spec.tsx +4 -4
  409. package/src/fields/Barcode/BarcodeScanner.native.tsx +10 -9
  410. package/src/fields/Barcode/BarcodeScanner.tsx +10 -9
  411. package/src/fields/Checkbox/Checkbox.stories.tsx +3 -3
  412. package/src/fields/Checkbox/CheckboxGroup.stories.tsx +2 -2
  413. package/src/fields/ColorPicker/ColorPicker.stories.tsx +2 -2
  414. package/src/fields/Combobox/Combobox.regularWidth.native.spec.tsx +94 -0
  415. package/src/fields/Combobox/Combobox.stories.tsx +2 -2
  416. package/src/fields/Combobox/index.tsx +3 -1
  417. package/src/fields/DatePicker/DatePicker.stories.tsx +2 -1
  418. package/src/fields/DatePicker/DateRangePicker.stories.tsx +2 -2
  419. package/src/fields/DatePicker/DatetimePicker.stories.tsx +2 -1
  420. package/src/fields/DatePicker/MonthPicker.stories.tsx +2 -2
  421. package/src/fields/DatePicker/MultiDatePicker.stories.tsx +2 -2
  422. package/src/fields/FileUpload/FileUpload.spec.tsx +11 -6
  423. package/src/fields/FileUpload/FileUpload.stories.tsx +2 -2
  424. package/src/fields/FileUpload/index.tsx +101 -77
  425. package/src/fields/Geolocation/index.tsx +12 -7
  426. package/src/fields/ImageField/ImageField.spec.tsx +5 -5
  427. package/src/fields/ImageField/ImageField.stories.tsx +2 -2
  428. package/src/fields/ImageField/index.tsx +6 -9
  429. package/src/fields/Input/Input.formName.spec.tsx +53 -0
  430. package/src/fields/Input/Input.stories.tsx +2 -2
  431. package/src/fields/Input/index.tsx +6 -1
  432. package/src/fields/MentionInput/MentionInput.stories.tsx +2 -1
  433. package/src/fields/Progress/Progress.stories.tsx +2 -1
  434. package/src/fields/RadioGroup/RadioGroup.stories.tsx +2 -1
  435. package/src/fields/Select/InlineChoices.tsx +6 -3
  436. package/src/fields/Select/SheetPickerRow.tsx +160 -0
  437. package/src/fields/Select/index.tsx +65 -4
  438. package/src/fields/Select/shouldInlineChoices.spec.ts +21 -1
  439. package/src/fields/Select/shouldInlineChoices.ts +26 -0
  440. package/src/fields/Signature/Signature.stories.tsx +2 -2
  441. package/src/fields/Slider/Slider.system.native.spec.tsx +168 -0
  442. package/src/fields/Slider/index.tsx +166 -30
  443. package/src/fields/Stepper/Stepper.stories.tsx +2 -2
  444. package/src/fields/Switch/Switch.system.native.spec.tsx +162 -0
  445. package/src/fields/Switch/index.tsx +98 -0
  446. package/src/fields/TextArea/TextArea.stories.tsx +2 -2
  447. package/src/fields/ToggleGroup/ToggleGroup.stories.tsx +2 -2
  448. package/src/fields/ToggleGroup/ToggleGroup.system.native.spec.tsx +192 -0
  449. package/src/fields/ToggleGroup/index.tsx +111 -0
  450. package/src/fields/nativeDateTime/OsDateTimeSheet.presentation.spec.tsx +168 -0
  451. package/src/fields/nativeDateTime/OsDateTimeSheet.tsx +60 -30
  452. package/src/fields/nativeDateTime/sheetKeyboard.spec.ts +60 -0
  453. package/src/fields/nativeDateTime/sheetKeyboard.ts +45 -0
  454. package/src/index.ts +25 -2
  455. package/src/shared/colorRamps.ts +1 -11
  456. package/src/shared/overlaySizeClass.spec.ts +27 -0
  457. package/src/shared/overlaySizeClass.ts +36 -0
  458. package/src/shared/sheetNavigation.ts +82 -0
  459. package/src/shared/systemControlModules.gnome.ts +10 -0
  460. package/src/shared/systemControlModules.native.spec.ts +52 -0
  461. package/src/shared/systemControlModules.native.ts +66 -0
  462. package/src/shared/systemControlModules.ts +10 -0
  463. package/src/shared/systemControls.ts +70 -0
  464. package/src/standardActions.ts +96 -0
  465. package/types/AdaptivePopup/index.d.ts +13 -1
  466. package/types/AdaptivePopup/index.d.ts.map +1 -1
  467. package/types/Button/glass.d.ts +15 -0
  468. package/types/Button/glass.d.ts.map +1 -0
  469. package/types/Button/glass.native.d.ts +11 -0
  470. package/types/Button/glass.native.d.ts.map +1 -0
  471. package/types/Button/index.d.ts +45 -1
  472. package/types/Button/index.d.ts.map +1 -1
  473. package/types/ContextualSaveBar/index.d.ts.map +1 -1
  474. package/types/DescriptionList/index.d.ts.map +1 -1
  475. package/types/FloatingPanel/RegularPanel.d.ts +29 -0
  476. package/types/FloatingPanel/RegularPanel.d.ts.map +1 -0
  477. package/types/FloatingPanel/compactFace.d.ts +12 -0
  478. package/types/FloatingPanel/compactFace.d.ts.map +1 -1
  479. package/types/FloatingPanel/containingBlock.d.ts +14 -0
  480. package/types/FloatingPanel/containingBlock.d.ts.map +1 -0
  481. package/types/FloatingPanel/index.d.ts.map +1 -1
  482. package/types/FloatingPanel/index.native.d.ts +6 -1
  483. package/types/FloatingPanel/index.native.d.ts.map +1 -1
  484. package/types/FloatingPanel/pointAnchor.d.ts +12 -0
  485. package/types/FloatingPanel/pointAnchor.d.ts.map +1 -1
  486. package/types/FloatingPanel/regularPlacement.d.ts +20 -0
  487. package/types/FloatingPanel/regularPlacement.d.ts.map +1 -0
  488. package/types/fields/Barcode/BarcodeScanner.d.ts.map +1 -1
  489. package/types/fields/Barcode/BarcodeScanner.native.d.ts.map +1 -1
  490. package/types/fields/Combobox/index.d.ts.map +1 -1
  491. package/types/fields/FileUpload/index.d.ts.map +1 -1
  492. package/types/fields/Geolocation/index.d.ts.map +1 -1
  493. package/types/fields/ImageField/index.d.ts.map +1 -1
  494. package/types/fields/Input/index.d.ts.map +1 -1
  495. package/types/fields/Select/InlineChoices.d.ts.map +1 -1
  496. package/types/fields/Select/SheetPickerRow.d.ts +23 -0
  497. package/types/fields/Select/SheetPickerRow.d.ts.map +1 -0
  498. package/types/fields/Select/index.d.ts.map +1 -1
  499. package/types/fields/Select/shouldInlineChoices.d.ts +15 -0
  500. package/types/fields/Select/shouldInlineChoices.d.ts.map +1 -1
  501. package/types/fields/Slider/index.d.ts +7 -1
  502. package/types/fields/Slider/index.d.ts.map +1 -1
  503. package/types/fields/Switch/index.d.ts +7 -1
  504. package/types/fields/Switch/index.d.ts.map +1 -1
  505. package/types/fields/ToggleGroup/index.d.ts +8 -1
  506. package/types/fields/ToggleGroup/index.d.ts.map +1 -1
  507. package/types/fields/nativeDateTime/OsDateTimeSheet.d.ts.map +1 -1
  508. package/types/fields/nativeDateTime/sheetKeyboard.d.ts +20 -0
  509. package/types/fields/nativeDateTime/sheetKeyboard.d.ts.map +1 -0
  510. package/types/index.d.ts +8 -2
  511. package/types/index.d.ts.map +1 -1
  512. package/types/shared/colorRamps.d.ts +1 -11
  513. package/types/shared/colorRamps.d.ts.map +1 -1
  514. package/types/shared/overlaySizeClass.d.ts +24 -0
  515. package/types/shared/overlaySizeClass.d.ts.map +1 -0
  516. package/types/shared/sheetNavigation.d.ts +31 -0
  517. package/types/shared/sheetNavigation.d.ts.map +1 -0
  518. package/types/shared/systemControlModules.d.ts +5 -0
  519. package/types/shared/systemControlModules.d.ts.map +1 -0
  520. package/types/shared/systemControlModules.gnome.d.ts +5 -0
  521. package/types/shared/systemControlModules.gnome.d.ts.map +1 -0
  522. package/types/shared/systemControlModules.native.d.ts +20 -0
  523. package/types/shared/systemControlModules.native.d.ts.map +1 -0
  524. package/types/shared/systemControls.d.ts +53 -0
  525. package/types/shared/systemControls.d.ts.map +1 -0
  526. package/types/standardActions.d.ts +24 -0
  527. package/types/standardActions.d.ts.map +1 -0
@@ -7,12 +7,14 @@ import { renderWithProviders } from "@multiplatform.one/test-utils";
7
7
  import { act } from "@testing-library/react";
8
8
  import { useState, type ReactNode } from "react";
9
9
  import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
10
- import { Text } from "tamagui";
10
+ import { Text, XStack, YStack } from "tamagui";
11
11
  import { OverlayStackProvider } from "../shared/overlayStack";
12
- import type { CompactFace } from "./compactFace";
12
+ import { MENU_MIN_WIDTH, type CompactFace } from "./compactFace";
13
13
  import { FloatingPanel } from "./index.native";
14
14
  import { panelViewportPadding } from "./useFloatingPanel";
15
15
 
16
+ const win = vi.hoisted(() => ({ width: 390 }));
17
+
16
18
  vi.mock("react-native-web", async (importOriginal) => {
17
19
  const actual = await importOriginal<typeof import("react-native")>();
18
20
  return {
@@ -20,7 +22,7 @@ vi.mock("react-native-web", async (importOriginal) => {
20
22
  ActionSheetIOS: undefined,
21
23
  Modal: ({ children, visible }: { children: ReactNode; visible: boolean }) =>
22
24
  visible ? children : null,
23
- useWindowDimensions: () => ({ width: 390, height: 844, scale: 3, fontScale: 1 }),
25
+ useWindowDimensions: () => ({ width: win.width, height: 844, scale: 3, fontScale: 1 }),
24
26
  };
25
27
  });
26
28
 
@@ -28,6 +30,7 @@ let trigger = { x: 20, y: 240, width: 120, height: 44 };
28
30
  beforeEach(() => {
29
31
  vi.useFakeTimers();
30
32
  trigger = { x: 20, y: 240, width: 120, height: 44 };
33
+ win.width = 390;
31
34
  // RN-web's measureInWindow reads the node's client rect on a timer.
32
35
  vi.spyOn(HTMLElement.prototype, "getBoundingClientRect").mockImplementation(() => ({
33
36
  x: trigger.x,
@@ -120,6 +123,16 @@ describe("FloatingPanel native menu face (FZ-7830)", () => {
120
123
  expect(row.getAttribute("aria-expanded")).toBe("true");
121
124
  });
122
125
 
126
+ it("keeps its shadow: an inner view clips, not the elevated surface (FZ-8116)", () => {
127
+ const result = renderWithProviders(<Menu face="menu" />);
128
+ tap(result.getByRole("button", { name: "Stack actions" }));
129
+ const surface = document.querySelector('[data-testid="floating-panel-menu-surface"]');
130
+ const clip = document.querySelector('[data-testid="floating-panel-menu-clip"]');
131
+ expect(surface?.contains(clip)).toBe(true);
132
+ expect(surface?.className).not.toContain("_ox-hidden");
133
+ expect(clip?.className).toContain("_ox-hidden");
134
+ });
135
+
123
136
  it("closes when the repeated trigger row is pressed", () => {
124
137
  const result = renderWithProviders(<Menu face="menu" />);
125
138
  tap(result.getByRole("button", { name: "Stack actions" }));
@@ -193,3 +206,60 @@ describe("FloatingPanel native menu face (FZ-7830)", () => {
193
206
  expect(sheet()).toBeNull();
194
207
  });
195
208
  });
209
+
210
+ /** The SHC account menu's shape: an avatar-sized trigger over rows that fill their width. */
211
+ function AccountMenu() {
212
+ const [open, setOpen] = useState(false);
213
+ return (
214
+ <FloatingPanel
215
+ open={open}
216
+ onOpenChange={setOpen}
217
+ compactFace="menu"
218
+ anchorMode="attach"
219
+ triggerEcho={false}
220
+ triggerSizing="content"
221
+ contentPadding="none"
222
+ trigger={<Text>A</Text>}
223
+ triggerA11y={{ label: "Account" }}
224
+ >
225
+ <XStack testID="identity-row" width="100%">
226
+ <YStack flex={1} minWidth={0}>
227
+ <Text numberOfLines={1}>Clay Risser</Text>
228
+ <Text numberOfLines={1}>clayrisser@gmail.com</Text>
229
+ </YStack>
230
+ </XStack>
231
+ <Text>Sign out</Text>
232
+ </FloatingPanel>
233
+ );
234
+ }
235
+
236
+ describe("FloatingPanel native menu face width (FZ-8220)", () => {
237
+ it("opens rows with no intrinsic width at the platform minimum, not the trigger's 44pt", () => {
238
+ trigger = { x: 336, y: 52, width: 44, height: 44 };
239
+ const result = renderWithProviders(<AccountMenu />);
240
+ tap(result.getByRole("button", { name: "Account" }));
241
+ const panel = menu() as HTMLElement;
242
+ expect(MENU_MIN_WIDTH).toBe(250);
243
+ expect(panel.style.minWidth).toBe(`${MENU_MIN_WIDTH}px`);
244
+ expect(panel.style.maxWidth).toBe(`${390 - 2 * panelViewportPadding}px`);
245
+ layout(panel, MENU_MIN_WIDTH, 160);
246
+ expect(panel.style.left).toBe(`${390 - panelViewportPadding - MENU_MIN_WIDTH}px`);
247
+ expect(panel.style.top).toBe(`${52 + 44}px`);
248
+ expect(echo()).toBeNull();
249
+ });
250
+
251
+ it("clamps the minimum to the screen less its margins on a narrow window", () => {
252
+ win.width = 240;
253
+ trigger = { x: 186, y: 52, width: 44, height: 44 };
254
+ const result = renderWithProviders(<AccountMenu />);
255
+ tap(result.getByRole("button", { name: "Account" }));
256
+ expect(menu()?.style.minWidth).toBe(`${240 - 2 * panelViewportPadding}px`);
257
+ });
258
+
259
+ it("keeps a trigger wider than the minimum as the floor", () => {
260
+ trigger = { x: 20, y: 240, width: 320, height: 44 };
261
+ const result = renderWithProviders(<Menu face="menu" />);
262
+ tap(result.getByRole("button", { name: "Stack actions" }));
263
+ expect(menu()?.style.minWidth).toBe("320px");
264
+ });
265
+ });
@@ -0,0 +1,193 @@
1
+ /**
2
+ * FZ-8116 (LC-266): the window's size class picks the native FloatingPanel's
3
+ * form. At regular width (an iPad, a wide Android window) a picker opens over
4
+ * its field the way the web float does; at compact width (iPhone, Slide Over)
5
+ * it keeps the bottom sheet.
6
+ */
7
+ import { renderWithProviders } from "@multiplatform.one/test-utils";
8
+ import { act } from "@testing-library/react";
9
+ import { useState, type ReactNode } from "react";
10
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
11
+ import { Text } from "tamagui";
12
+ import { FloatingPanel } from "./index.native";
13
+ import type { FloatingPanelProps } from "./index";
14
+ import { regularFillHeight } from "./regularPlacement";
15
+ import { panelViewportPadding } from "./useFloatingPanel";
16
+
17
+ const screen = vi.hoisted(() => ({ width: 820, height: 1180 }));
18
+ vi.mock("react-native-web", async (importOriginal) => {
19
+ const actual = await importOriginal<typeof import("react-native")>();
20
+ return {
21
+ ...actual,
22
+ ActionSheetIOS: undefined,
23
+ Modal: ({ children, visible }: { children: ReactNode; visible: boolean }) =>
24
+ visible ? children : null,
25
+ useWindowDimensions: () => ({ ...screen, scale: 2, fontScale: 1 }),
26
+ };
27
+ });
28
+
29
+ let field = { x: 40, y: 300, width: 360, height: 44 };
30
+ beforeEach(() => {
31
+ vi.useFakeTimers();
32
+ field = { x: 40, y: 300, width: 360, height: 44 };
33
+ vi.spyOn(HTMLElement.prototype, "getBoundingClientRect").mockImplementation(() => ({
34
+ x: field.x,
35
+ y: field.y,
36
+ left: field.x,
37
+ top: field.y,
38
+ width: field.width,
39
+ height: field.height,
40
+ right: field.x + field.width,
41
+ bottom: field.y + field.height,
42
+ toJSON: () => ({}),
43
+ }));
44
+ });
45
+ afterEach(() => {
46
+ vi.restoreAllMocks();
47
+ vi.useRealTimers();
48
+ screen.width = 820;
49
+ screen.height = 1180;
50
+ });
51
+
52
+ function Picker(props: Partial<FloatingPanelProps>) {
53
+ const [open, setOpen] = useState(false);
54
+ return (
55
+ <FloatingPanel
56
+ open={open}
57
+ onOpenChange={setOpen}
58
+ trigger={<Text>Colour</Text>}
59
+ triggerA11y={{ label: "Colour" }}
60
+ {...props}
61
+ >
62
+ <Text>Red</Text>
63
+ <Text>Green</Text>
64
+ </FloatingPanel>
65
+ );
66
+ }
67
+
68
+ function tap(target: Element) {
69
+ act(() => {
70
+ target.dispatchEvent(new MouseEvent("mousedown", { bubbles: true, button: 0 }));
71
+ target.dispatchEvent(new MouseEvent("mouseup", { bubbles: true, button: 0 }));
72
+ target.dispatchEvent(new MouseEvent("click", { bubbles: true, button: 0 }));
73
+ });
74
+ act(() => {
75
+ vi.advanceTimersByTime(1);
76
+ });
77
+ }
78
+
79
+ function layout(node: Element, width: number, height: number) {
80
+ const onLayout = (node as unknown as { __reactLayoutHandler?: (event: unknown) => void })
81
+ .__reactLayoutHandler;
82
+ expect(onLayout).toBeTypeOf("function");
83
+ act(() => {
84
+ onLayout?.({ nativeEvent: { layout: { x: 0, y: 0, width, height } } });
85
+ });
86
+ }
87
+
88
+ const regular = () => document.querySelector<HTMLElement>('[data-testid="floating-panel-regular"]');
89
+ const sheet = () => document.querySelector('[data-testid="floating-panel-sheet"]');
90
+ const echo = () =>
91
+ document.querySelector<HTMLElement>('[data-testid="floating-panel-regular-echo"]');
92
+ const scroll = () => document.querySelector('[data-testid="floating-panel-regular-scroll"]');
93
+
94
+ function open(props: Partial<FloatingPanelProps> = {}) {
95
+ const result = renderWithProviders(<Picker {...props} />);
96
+ tap(result.getByRole("button", { name: "Colour" }));
97
+ return result;
98
+ }
99
+
100
+ describe("FloatingPanel native at regular width (FZ-8116)", () => {
101
+ it("opens over its field on an iPad-wide window, not as a bottom sheet", () => {
102
+ open();
103
+ const panel = regular();
104
+ expect(panel).not.toBeNull();
105
+ expect(sheet()).toBeNull();
106
+ expect(panel?.style.opacity).toBe("0");
107
+ layout(panel as HTMLElement, 240, 200);
108
+ expect(panel?.style.left).toBe("40px");
109
+ expect(panel?.style.top).toBe("300px");
110
+ expect(panel?.style.opacity).toBe("1");
111
+ });
112
+
113
+ it("keeps its shadow: an inner view clips, not the elevated surface", () => {
114
+ open();
115
+ const surface = document.querySelector('[data-testid="floating-panel-regular-surface"]');
116
+ const clip = document.querySelector('[data-testid="floating-panel-regular-clip"]');
117
+ expect(surface?.contains(clip)).toBe(true);
118
+ expect(surface?.className).not.toContain("_ox-hidden");
119
+ expect(clip?.className).toContain("_ox-hidden");
120
+ });
121
+
122
+ it("is at least the field's width by default", () => {
123
+ open();
124
+ expect(regular()?.style.minWidth).toBe("360px");
125
+ });
126
+
127
+ it("is the field's width exactly for match-trigger", () => {
128
+ open({ widthMode: "match-trigger" });
129
+ expect(regular()?.style.width).toBe("360px");
130
+ });
131
+
132
+ it("hugs its content for fit-content, from the field's start edge", () => {
133
+ open({ widthMode: "fit-content" });
134
+ const panel = regular() as HTMLElement;
135
+ expect(panel.style.minWidth).toBe("");
136
+ expect(panel.style.width).toBe("");
137
+ layout(panel, 300, 320);
138
+ expect(panel.style.left).toBe("40px");
139
+ });
140
+
141
+ it("echoes the field as its first row, and pressing it closes the panel", () => {
142
+ open();
143
+ const row = echo() as HTMLElement;
144
+ expect(row.textContent).toBe("Colour");
145
+ expect(row.style.height).toBe("44px");
146
+ act(() => {
147
+ vi.advanceTimersByTime(1000);
148
+ });
149
+ tap(row);
150
+ expect(regular()).toBeNull();
151
+ });
152
+
153
+ it("slides up inside the padded window when the field sits near the bottom", () => {
154
+ field = { x: 40, y: 1080, width: 360, height: 44 };
155
+ open();
156
+ const panel = regular() as HTMLElement;
157
+ layout(panel, 360, 300);
158
+ const top = parseFloat(panel.style.top);
159
+ expect(top + 300).toBeLessThanOrEqual(1180 - panelViewportPadding);
160
+ });
161
+
162
+ it("gives a gesture editor no scrollport (LC-83)", () => {
163
+ open();
164
+ expect(scroll()).toBeNull();
165
+ });
166
+
167
+ it("scrolls a scrollable list", () => {
168
+ open({ scrollable: true });
169
+ expect(scroll()).not.toBeNull();
170
+ });
171
+
172
+ it("opens a search list (sheetFill) at a definite height", () => {
173
+ open({ scrollable: true, sheetFill: true });
174
+ expect(regular()?.style.height).toBe(`${regularFillHeight}px`);
175
+ });
176
+
177
+ it("keeps the bottom sheet when the caller forces it", () => {
178
+ open({ sheet: true });
179
+ expect(regular()).toBeNull();
180
+ expect(sheet()).not.toBeNull();
181
+ });
182
+
183
+ it.each([
184
+ ["an iPhone", 390, 844],
185
+ ["iPad Slide Over", 320, 1180],
186
+ ])("keeps the bottom sheet on %s", (_name, width, height) => {
187
+ screen.width = width;
188
+ screen.height = height;
189
+ open();
190
+ expect(regular()).toBeNull();
191
+ expect(sheet()).not.toBeNull();
192
+ });
193
+ });
@@ -1,7 +1,8 @@
1
1
  import { useState } from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react-native-web-vite";
3
- import { Preset, Paragraph, H4, Text } from "@multiplatform.one/theme";
4
- import { ScrollView, Separator, View, XStack, YStack } from "tamagui";
3
+ import { Preset, Paragraph, Text } from "@multiplatform.one/theme";
4
+ import { ScrollView, View, XStack, YStack } from "tamagui";
5
+ import { OverlayHeader } from "@multiplatform.one/components";
5
6
  import { FloatingPanel } from "./index";
6
7
  import { Button } from "../Button";
7
8
  import { Select } from "../fields/Select";
@@ -38,13 +39,11 @@ export const Basic: Story = {
38
39
  trigger={<Button>{open ? "Panel is open" : "Click to open panel"}</Button>}
39
40
  >
40
41
  <YStack gap="$3">
41
- <H4>Panel Content</H4>
42
+ <OverlayHeader title="Panel Content" onClose={() => setOpen(false)} />
42
43
  <Paragraph>
43
44
  Opens over its trigger: the top edge sits on the trigger's top edge and the trigger is
44
45
  the first row. Escape or an outside click dismisses and returns focus.
45
46
  </Paragraph>
46
- <Separator />
47
- <Button onPress={() => setOpen(false)}>Close</Button>
48
47
  </YStack>
49
48
  </FloatingPanel>
50
49
  </YStack>
@@ -185,9 +184,8 @@ export const ForceSheet: Story = {
185
184
  trigger={<Button>{open ? "Sheet open" : "Click for Sheet (forced)"}</Button>}
186
185
  >
187
186
  <YStack gap="$3">
188
- <H4>Forced Sheet</H4>
187
+ <OverlayHeader title="Forced Sheet" onClose={() => setOpen(false)} />
189
188
  <Paragraph>This panel always uses Sheet, even on large screens.</Paragraph>
190
- <Button onPress={() => setOpen(false)}>Close</Button>
191
189
  </YStack>
192
190
  </FloatingPanel>
193
191
  </YStack>
@@ -224,13 +222,11 @@ function ScrollClipPair({ where }: { where: string }) {
224
222
  trigger={<Button>{`FloatingPanel (${where})`}</Button>}
225
223
  >
226
224
  <YStack gap="$3" data-testid={`scroll-clip-panel-${where}`}>
227
- <H4>Panel {where}</H4>
225
+ <OverlayHeader title={`Panel ${where}`} onClose={() => setOpen(false)} />
228
226
  <Paragraph>
229
227
  This body is taller than the space left in the scroll view, so a clipped panel loses its
230
228
  lower half.
231
229
  </Paragraph>
232
- <Separator />
233
- <Button onPress={() => setOpen(false)}>Close</Button>
234
230
  </YStack>
235
231
  </FloatingPanel>
236
232
  </YStack>
@@ -0,0 +1,159 @@
1
+ import { useResolvedKnobs } from "@multiplatform.one/theme";
2
+ import { type ReactNode, useState } from "react";
3
+ import {
4
+ I18nManager,
5
+ Pressable,
6
+ ScrollView as RNScrollView,
7
+ StyleSheet,
8
+ View as RNView,
9
+ } from "react-native";
10
+ import { YStack } from "tamagui";
11
+ import { t } from "../shared/t";
12
+ import type { PanelBounds, TriggerRect } from "./pointAnchor";
13
+ import { placeRegularPanel, regularFillHeight } from "./regularPlacement";
14
+ import type { PanelWidthMode } from "./useFloatingPanel";
15
+
16
+ /**
17
+ * A FloatingPanel at regular width (FZ-8116): over its field instead of a
18
+ * bottom sheet. Measured once per open at its natural size, then placed on
19
+ * the field's window rect. The field is echoed as the first row, as the web
20
+ * float's named close row is, and pressing it closes the panel.
21
+ *
22
+ * Only a `scrollable` panel gets a scrollport: a gesture editor (ColorPicker,
23
+ * DatePicker) must take its own drags (LC-83).
24
+ */
25
+ export function RegularPanel({
26
+ anchor,
27
+ bounds,
28
+ widthMode,
29
+ echo,
30
+ echoLabel,
31
+ header,
32
+ scrollable,
33
+ fill,
34
+ scrollViewProps,
35
+ framePadding,
36
+ frameGap,
37
+ onBackdropPress,
38
+ onClose,
39
+ children,
40
+ }: {
41
+ anchor: TriggerRect | null;
42
+ bounds: PanelBounds;
43
+ widthMode: PanelWidthMode;
44
+ echo: ReactNode;
45
+ echoLabel?: string;
46
+ header?: ReactNode;
47
+ scrollable: boolean;
48
+ fill: boolean;
49
+ scrollViewProps?: Record<string, unknown>;
50
+ framePadding: string;
51
+ frameGap: string | undefined;
52
+ onBackdropPress: () => void;
53
+ onClose: () => void;
54
+ children: ReactNode;
55
+ }) {
56
+ const { knobProps } = useResolvedKnobs({ painted: false });
57
+ const [size, setSize] = useState<{ width: number; height: number } | null>(null);
58
+ const room = Math.max(0, bounds.bottom - bounds.top);
59
+ const fillHeight = fill ? Math.min(regularFillHeight, room) : undefined;
60
+ const placement =
61
+ anchor && size
62
+ ? placeRegularPanel({
63
+ trigger: anchor,
64
+ width: size.width,
65
+ height: fillHeight ?? size.height,
66
+ bounds,
67
+ widthMode,
68
+ rtl: I18nManager.isRTL,
69
+ })
70
+ : null;
71
+ const widthStyle =
72
+ widthMode === "match-trigger"
73
+ ? { width: anchor?.width }
74
+ : widthMode === "at-least-trigger"
75
+ ? { minWidth: anchor?.width ?? 0 }
76
+ : undefined;
77
+ const echoRow =
78
+ echo != null && anchor && anchor.height > 0 ? (
79
+ <Pressable
80
+ testID="floating-panel-regular-echo"
81
+ onPress={onClose}
82
+ accessibilityRole="button"
83
+ {...(echoLabel ? { accessibilityLabel: echoLabel } : undefined)}
84
+ aria-expanded
85
+ style={{ height: anchor.height, justifyContent: "center" }}
86
+ >
87
+ <RNView pointerEvents="none">{echo}</RNView>
88
+ </Pressable>
89
+ ) : null;
90
+ return (
91
+ <RNView style={StyleSheet.absoluteFill}>
92
+ <Pressable
93
+ style={StyleSheet.absoluteFill}
94
+ onPress={onBackdropPress}
95
+ accessibilityRole="button"
96
+ accessibilityLabel={t("Close")}
97
+ />
98
+ <RNView
99
+ testID="floating-panel-regular"
100
+ onLayout={(e) => {
101
+ if (size) return;
102
+ const { width, height } = e.nativeEvent.layout;
103
+ if (width > 0 && height > 0) setSize({ width, height });
104
+ }}
105
+ style={{
106
+ position: "absolute",
107
+ left: placement?.left ?? bounds.left,
108
+ top: placement?.top ?? bounds.top,
109
+ ...widthStyle,
110
+ maxWidth: bounds.right - bounds.left,
111
+ maxHeight: placement?.maxHeight ?? room,
112
+ ...(fillHeight ? { height: Math.min(fillHeight, placement?.maxHeight ?? room) } : null),
113
+ opacity: placement ? 1 : 0,
114
+ }}
115
+ >
116
+ <YStack
117
+ testID="floating-panel-regular-surface"
118
+ {...knobProps.elevatedSurface}
119
+ flexShrink={1}
120
+ minHeight={0}
121
+ {...(fill ? { flex: 1 } : undefined)}
122
+ onAccessibilityEscape={onClose}
123
+ >
124
+ <YStack
125
+ testID="floating-panel-regular-clip"
126
+ borderRadius={knobProps.elevatedSurface.borderRadius}
127
+ overflow="hidden"
128
+ flexShrink={1}
129
+ minHeight={0}
130
+ {...(fill ? { flex: 1 } : undefined)}
131
+ >
132
+ {echoRow}
133
+ <YStack
134
+ padding={framePadding}
135
+ gap={frameGap}
136
+ flexShrink={1}
137
+ minHeight={0}
138
+ {...(fill ? { flex: 1 } : undefined)}
139
+ >
140
+ {header}
141
+ {scrollable ? (
142
+ <RNScrollView
143
+ testID="floating-panel-regular-scroll"
144
+ style={fill ? { flex: 1 } : { flexGrow: 0, flexShrink: 1 }}
145
+ keyboardShouldPersistTaps="handled"
146
+ {...(scrollViewProps as object)}
147
+ >
148
+ {children}
149
+ </RNScrollView>
150
+ ) : (
151
+ children
152
+ )}
153
+ </YStack>
154
+ </YStack>
155
+ </YStack>
156
+ </RNView>
157
+ </RNView>
158
+ );
159
+ }
@@ -1,5 +1,11 @@
1
1
  import { describe, expect, it } from "vitest";
2
- import { pickerCompactFace, resolveCompactFace, SHORT_LIST_MAX } from "./compactFace";
2
+ import {
3
+ MENU_MIN_WIDTH,
4
+ menuMinWidth,
5
+ pickerCompactFace,
6
+ resolveCompactFace,
7
+ SHORT_LIST_MAX,
8
+ } from "./compactFace";
3
9
 
4
10
  describe("resolveCompactFace (FZ-7830)", () => {
5
11
  it("keeps the sheet by default, at page level and inside an overlay", () => {
@@ -38,3 +44,20 @@ describe("pickerCompactFace (FZ-7830)", () => {
38
44
  expect(resolveCompactFace(pickerCompactFace(3, true), false)).toBe("sheet");
39
45
  });
40
46
  });
47
+
48
+ describe("menuMinWidth (FZ-8220)", () => {
49
+ it("never opens a menu narrower than the platform floor", () => {
50
+ expect(menuMinWidth(44, 370)).toBe(MENU_MIN_WIDTH);
51
+ expect(menuMinWidth(0, 370)).toBe(MENU_MIN_WIDTH);
52
+ });
53
+
54
+ it("keeps a wider trigger's width", () => {
55
+ expect(menuMinWidth(320, 370)).toBe(320);
56
+ });
57
+
58
+ it("clamps to the room between the screen's margins", () => {
59
+ expect(menuMinWidth(44, 220)).toBe(220);
60
+ expect(menuMinWidth(400, 370)).toBe(370);
61
+ expect(menuMinWidth(44, -5)).toBe(0);
62
+ });
63
+ });
@@ -30,3 +30,19 @@ export const SHORT_LIST_MAX = 7;
30
30
  export function pickerCompactFace(optionCount: number, searchable = false): CompactFace {
31
31
  return !searchable && optionCount <= SHORT_LIST_MAX ? "menu" : "auto";
32
32
  }
33
+
34
+ /**
35
+ * The narrowest a menu-faced panel opens on native (FZ-8220): the iOS
36
+ * pull-down's floor, inside Material's 112–280 menu range. A menu's rows
37
+ * fill their width and have none of their own, so without a floor the panel
38
+ * took its trigger's width and an avatar's 44pt squeezed the text away.
39
+ */
40
+ export const MENU_MIN_WIDTH = 250;
41
+
42
+ /**
43
+ * A menu face's minimum width: at least its trigger and the platform floor,
44
+ * never wider than the room between the screen's margins.
45
+ */
46
+ export function menuMinWidth(triggerWidth: number, availableWidth: number): number {
47
+ return Math.max(0, Math.min(Math.max(triggerWidth, MENU_MIN_WIDTH), availableWidth));
48
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Viewport origin of the box a `position: fixed` panel is laid out against.
3
+ * The top/left math is in viewport coordinates, which is only right while that
4
+ * box is the viewport. An ancestor with a transform, filter, perspective,
5
+ * paint containment or container query becomes the containing block instead.
6
+ * PanelPortal lifts the panel out of scroll views, but a panel hosted in a
7
+ * transformed dialog still lays out against that dialog. A `display: contents`
8
+ * node has no box, so its computed `contain` (Tamagui's theme span) is ignored.
9
+ */
10
+ export function fixedContainingBlockOrigin(element: HTMLElement): { top: number; left: number } {
11
+ for (let node = element.parentElement; node; node = node.parentElement) {
12
+ const cs = getComputedStyle(node);
13
+ if (cs.display === "contents") continue;
14
+ const set = (value: string | undefined, initial: string) => !!value && value !== initial;
15
+ const captures =
16
+ set(cs.transform, "none") ||
17
+ set(cs.perspective, "none") ||
18
+ set(cs.filter, "none") ||
19
+ set(cs.backdropFilter, "none") ||
20
+ set(cs.containerType, "normal") ||
21
+ /transform|perspective|filter/.test(cs.willChange) ||
22
+ /paint|layout|strict|content/.test(cs.contain);
23
+ if (captures) {
24
+ const rect = node.getBoundingClientRect();
25
+ return {
26
+ top: rect.top + node.clientTop - node.scrollTop,
27
+ left: rect.left + node.clientLeft - node.scrollLeft,
28
+ };
29
+ }
30
+ }
31
+ return { top: 0, left: 0 };
32
+ }