@wordpress/components 19.10.0 → 19.11.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 (420) hide show
  1. package/CHANGELOG.md +24 -6
  2. package/build/border-box-control/border-box-control/component.js +22 -7
  3. package/build/border-box-control/border-box-control/component.js.map +1 -1
  4. package/build/border-box-control/border-box-control-linked-button/hook.js +3 -2
  5. package/build/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
  6. package/build/border-box-control/border-box-control-split-controls/component.js +21 -8
  7. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  8. package/build/border-box-control/border-box-control-visualizer/hook.js +3 -2
  9. package/build/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
  10. package/build/border-box-control/styles.js +11 -15
  11. package/build/border-box-control/styles.js.map +1 -1
  12. package/build/border-control/border-control/component.js +5 -3
  13. package/build/border-control/border-control/component.js.map +1 -1
  14. package/build/border-control/border-control/hook.js +6 -3
  15. package/build/border-control/border-control/hook.js.map +1 -1
  16. package/build/border-control/border-control-dropdown/component.js +6 -2
  17. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  18. package/build/border-control/border-control-dropdown/hook.js +5 -5
  19. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  20. package/build/border-control/styles.js +58 -29
  21. package/build/border-control/styles.js.map +1 -1
  22. package/build/button/index.native.js +16 -2
  23. package/build/button/index.native.js.map +1 -1
  24. package/build/button-group/index.js +24 -7
  25. package/build/button-group/index.js.map +1 -1
  26. package/build/{flyout → button-group}/types.js +0 -0
  27. package/build/button-group/types.js.map +1 -0
  28. package/build/checkbox-control/index.js +34 -7
  29. package/build/checkbox-control/index.js.map +1 -1
  30. package/build/checkbox-control/types.js +6 -0
  31. package/build/checkbox-control/types.js.map +1 -0
  32. package/build/color-palette/index.js +5 -12
  33. package/build/color-palette/index.js.map +1 -1
  34. package/build/date-time/date.js +43 -19
  35. package/build/date-time/date.js.map +1 -1
  36. package/build/date-time/index.js +28 -3
  37. package/build/date-time/index.js.map +1 -1
  38. package/build/date-time/time.js +42 -40
  39. package/build/date-time/time.js.map +1 -1
  40. package/build/date-time/timezone.js +4 -3
  41. package/build/date-time/timezone.js.map +1 -1
  42. package/build/date-time/types.js +6 -0
  43. package/build/date-time/types.js.map +1 -0
  44. package/build/date-time/utils.js +6 -4
  45. package/build/date-time/utils.js.map +1 -1
  46. package/build/disabled/index.js +1 -1
  47. package/build/disabled/index.js.map +1 -1
  48. package/build/draggable/index.native.js +223 -0
  49. package/build/draggable/index.native.js.map +1 -0
  50. package/build/dropdown/index.js +7 -5
  51. package/build/dropdown/index.js.map +1 -1
  52. package/build/focal-point-picker/index.native.js +3 -3
  53. package/build/focal-point-picker/index.native.js.map +1 -1
  54. package/build/index.js +0 -8
  55. package/build/index.js.map +1 -1
  56. package/build/index.native.js +16 -0
  57. package/build/index.native.js.map +1 -1
  58. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  59. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  60. package/build/mobile/bottom-sheet/index.native.js +1 -1
  61. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  62. package/build/mobile/bottom-sheet-select-control/index.native.js +3 -2
  63. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  64. package/build/mobile/html-text-input/index.native.js +19 -8
  65. package/build/mobile/html-text-input/index.native.js.map +1 -1
  66. package/build/mobile/keyboard-aware-flat-list/index.android.js +28 -5
  67. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  68. package/build/mobile/keyboard-aware-flat-list/index.ios.js +47 -24
  69. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  70. package/build/palette-edit/index.js +38 -7
  71. package/build/palette-edit/index.js.map +1 -1
  72. package/build/popover/index.js +223 -277
  73. package/build/popover/index.js.map +1 -1
  74. package/build/resizable-box/resize-tooltip/utils.js +5 -8
  75. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  76. package/build/sandbox/index.native.js +1 -1
  77. package/build/sandbox/index.native.js.map +1 -1
  78. package/build/select-control/styles/select-control-styles.js +14 -11
  79. package/build/select-control/styles/select-control-styles.js.map +1 -1
  80. package/build/toggle-group-control/toggle-group-control/component.js +1 -3
  81. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  82. package/build/tooltip/index.js +2 -2
  83. package/build/tooltip/index.js.map +1 -1
  84. package/build-module/border-box-control/border-box-control/component.js +22 -7
  85. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  86. package/build-module/border-box-control/border-box-control-linked-button/hook.js +3 -2
  87. package/build-module/border-box-control/border-box-control-linked-button/hook.js.map +1 -1
  88. package/build-module/border-box-control/border-box-control-split-controls/component.js +21 -8
  89. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  90. package/build-module/border-box-control/border-box-control-visualizer/hook.js +3 -2
  91. package/build-module/border-box-control/border-box-control-visualizer/hook.js.map +1 -1
  92. package/build-module/border-box-control/styles.js +9 -15
  93. package/build-module/border-box-control/styles.js.map +1 -1
  94. package/build-module/border-control/border-control/component.js +5 -3
  95. package/build-module/border-control/border-control/component.js.map +1 -1
  96. package/build-module/border-control/border-control/hook.js +6 -3
  97. package/build-module/border-control/border-control/hook.js.map +1 -1
  98. package/build-module/border-control/border-control-dropdown/component.js +6 -2
  99. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  100. package/build-module/border-control/border-control-dropdown/hook.js +5 -5
  101. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  102. package/build-module/border-control/styles.js +56 -29
  103. package/build-module/border-control/styles.js.map +1 -1
  104. package/build-module/button/index.native.js +16 -3
  105. package/build-module/button/index.native.js.map +1 -1
  106. package/build-module/button-group/index.js +27 -7
  107. package/build-module/button-group/index.js.map +1 -1
  108. package/build-module/{flyout → button-group}/types.js +0 -0
  109. package/build-module/{flyout → button-group}/types.js.map +0 -0
  110. package/build-module/checkbox-control/index.js +31 -7
  111. package/build-module/checkbox-control/index.js.map +1 -1
  112. package/build-module/checkbox-control/types.js +2 -0
  113. package/{build/flyout → build-module/checkbox-control}/types.js.map +0 -0
  114. package/build-module/color-palette/index.js +5 -11
  115. package/build-module/color-palette/index.js.map +1 -1
  116. package/build-module/date-time/date.js +44 -19
  117. package/build-module/date-time/date.js.map +1 -1
  118. package/build-module/date-time/index.js +28 -4
  119. package/build-module/date-time/index.js.map +1 -1
  120. package/build-module/date-time/time.js +43 -41
  121. package/build-module/date-time/time.js.map +1 -1
  122. package/build-module/date-time/timezone.js +4 -3
  123. package/build-module/date-time/timezone.js.map +1 -1
  124. package/build-module/date-time/types.js +2 -0
  125. package/build-module/date-time/types.js.map +1 -0
  126. package/build-module/date-time/utils.js +6 -4
  127. package/build-module/date-time/utils.js.map +1 -1
  128. package/build-module/disabled/index.js +1 -1
  129. package/build-module/disabled/index.js.map +1 -1
  130. package/build-module/draggable/index.native.js +206 -0
  131. package/build-module/draggable/index.native.js.map +1 -0
  132. package/build-module/dropdown/index.js +7 -5
  133. package/build-module/dropdown/index.js.map +1 -1
  134. package/build-module/focal-point-picker/index.native.js +3 -3
  135. package/build-module/focal-point-picker/index.native.js.map +1 -1
  136. package/build-module/index.js +0 -1
  137. package/build-module/index.js.map +1 -1
  138. package/build-module/index.native.js +2 -1
  139. package/build-module/index.native.js.map +1 -1
  140. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  141. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  142. package/build-module/mobile/bottom-sheet/index.native.js +1 -1
  143. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  144. package/build-module/mobile/bottom-sheet-select-control/index.native.js +3 -2
  145. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  146. package/build-module/mobile/html-text-input/index.native.js +20 -9
  147. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  148. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +21 -5
  149. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  150. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +42 -25
  151. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  152. package/build-module/palette-edit/index.js +37 -7
  153. package/build-module/palette-edit/index.js.map +1 -1
  154. package/build-module/popover/index.js +225 -279
  155. package/build-module/popover/index.js.map +1 -1
  156. package/build-module/resizable-box/resize-tooltip/utils.js +4 -5
  157. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  158. package/build-module/sandbox/index.native.js +1 -1
  159. package/build-module/sandbox/index.native.js.map +1 -1
  160. package/build-module/select-control/styles/select-control-styles.js +14 -11
  161. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  162. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -3
  163. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  164. package/build-module/tooltip/index.js +2 -2
  165. package/build-module/tooltip/index.js.map +1 -1
  166. package/build-style/style-rtl.css +31 -170
  167. package/build-style/style.css +27 -170
  168. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  169. package/build-types/border-box-control/border-box-control/hook.d.ts +3 -1
  170. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  171. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
  172. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  173. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +3 -1
  174. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
  175. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
  176. package/build-types/border-box-control/styles.d.ts +2 -2
  177. package/build-types/border-box-control/styles.d.ts.map +1 -1
  178. package/build-types/border-box-control/types.d.ts +40 -13
  179. package/build-types/border-box-control/types.d.ts.map +1 -1
  180. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  181. package/build-types/border-control/border-control/hook.d.ts +2 -1
  182. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  183. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  184. package/build-types/border-control/border-control-dropdown/hook.d.ts +1 -0
  185. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  186. package/build-types/border-control/styles.d.ts +2 -1
  187. package/build-types/border-control/styles.d.ts.map +1 -1
  188. package/build-types/border-control/types.d.ts +18 -6
  189. package/build-types/border-control/types.d.ts.map +1 -1
  190. package/build-types/button-group/index.d.ts +25 -0
  191. package/build-types/button-group/index.d.ts.map +1 -0
  192. package/build-types/button-group/stories/index.d.ts +12 -0
  193. package/build-types/button-group/stories/index.d.ts.map +1 -0
  194. package/build-types/button-group/types.d.ts +11 -0
  195. package/build-types/button-group/types.d.ts.map +1 -0
  196. package/build-types/checkbox-control/index.d.ts +26 -0
  197. package/build-types/checkbox-control/index.d.ts.map +1 -0
  198. package/build-types/checkbox-control/stories/index.d.ts +13 -0
  199. package/build-types/checkbox-control/stories/index.d.ts.map +1 -0
  200. package/build-types/checkbox-control/types.d.ts +35 -0
  201. package/build-types/checkbox-control/types.d.ts.map +1 -0
  202. package/build-types/color-palette/index.d.ts.map +1 -1
  203. package/build-types/color-picker/styles.d.ts +1 -1
  204. package/build-types/date-time/date.d.ts +24 -0
  205. package/build-types/date-time/date.d.ts.map +1 -0
  206. package/build-types/date-time/index.d.ts +35 -0
  207. package/build-types/date-time/index.d.ts.map +1 -0
  208. package/build-types/date-time/stories/date.d.ts +14 -0
  209. package/build-types/date-time/stories/date.d.ts.map +1 -0
  210. package/build-types/date-time/stories/index.d.ts +14 -0
  211. package/build-types/date-time/stories/index.d.ts.map +1 -0
  212. package/build-types/date-time/stories/time.d.ts +12 -0
  213. package/build-types/date-time/stories/time.d.ts.map +1 -0
  214. package/build-types/date-time/stories/utils.d.ts +3 -0
  215. package/build-types/date-time/stories/utils.d.ts.map +1 -0
  216. package/build-types/date-time/test/date.d.ts +2 -0
  217. package/build-types/date-time/test/date.d.ts.map +1 -0
  218. package/build-types/date-time/test/time.d.ts +2 -0
  219. package/build-types/date-time/test/time.d.ts.map +1 -0
  220. package/build-types/date-time/test/utils.d.ts +2 -0
  221. package/build-types/date-time/test/utils.d.ts.map +1 -0
  222. package/build-types/date-time/time.d.ts +25 -0
  223. package/build-types/date-time/time.d.ts.map +1 -0
  224. package/build-types/date-time/timezone.d.ts +8 -0
  225. package/build-types/date-time/timezone.d.ts.map +1 -0
  226. package/build-types/date-time/types.d.ts +91 -0
  227. package/build-types/date-time/types.d.ts.map +1 -0
  228. package/build-types/date-time/utils.d.ts +15 -0
  229. package/build-types/date-time/utils.d.ts.map +1 -0
  230. package/build-types/dropdown/index.d.ts.map +1 -1
  231. package/build-types/input-control/index.d.ts +1 -1
  232. package/build-types/input-control/stories/index.d.ts +5 -5
  233. package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
  234. package/build-types/popover/index.d.ts +5 -7
  235. package/build-types/popover/index.d.ts.map +1 -1
  236. package/build-types/resizable-box/index.d.ts +1 -1
  237. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  238. package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
  239. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  240. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  241. package/build-types/tooltip/index.d.ts.map +1 -1
  242. package/package.json +19 -19
  243. package/src/autocomplete/style.scss +1 -1
  244. package/src/border-box-control/border-box-control/README.md +10 -14
  245. package/src/border-box-control/border-box-control/component.tsx +21 -4
  246. package/src/border-box-control/border-box-control-linked-button/hook.ts +10 -6
  247. package/src/border-box-control/border-box-control-split-controls/component.tsx +24 -7
  248. package/src/border-box-control/border-box-control-visualizer/hook.ts +11 -6
  249. package/src/border-box-control/stories/index.js +1 -0
  250. package/src/border-box-control/styles.ts +15 -8
  251. package/src/border-box-control/types.ts +40 -14
  252. package/src/border-control/border-control/README.md +0 -7
  253. package/src/border-control/border-control/component.tsx +4 -2
  254. package/src/border-control/border-control/hook.ts +5 -2
  255. package/src/border-control/border-control-dropdown/component.tsx +18 -11
  256. package/src/border-control/border-control-dropdown/hook.ts +7 -5
  257. package/src/border-control/stories/index.js +1 -0
  258. package/src/border-control/styles.ts +82 -22
  259. package/src/border-control/types.ts +18 -6
  260. package/src/button/index.native.js +33 -18
  261. package/src/button-group/index.tsx +47 -0
  262. package/src/button-group/stories/index.tsx +41 -0
  263. package/src/button-group/types.ts +11 -0
  264. package/src/checkbox-control/README.md +10 -8
  265. package/src/checkbox-control/{index.js → index.tsx} +49 -14
  266. package/src/checkbox-control/stories/{index.js → index.tsx} +49 -27
  267. package/src/checkbox-control/types.ts +36 -0
  268. package/src/circular-option-picker/style.scss +1 -0
  269. package/src/color-palette/index.js +6 -13
  270. package/src/color-palette/style.scss +3 -18
  271. package/src/date-time/README.md +13 -10
  272. package/src/date-time/{date.js → date.tsx} +49 -20
  273. package/src/date-time/{index.js → index.tsx} +31 -5
  274. package/src/date-time/stories/date.tsx +73 -0
  275. package/src/date-time/stories/index.tsx +75 -0
  276. package/src/date-time/stories/time.tsx +51 -0
  277. package/src/date-time/stories/utils.ts +9 -0
  278. package/src/date-time/test/{date.js → date.tsx} +3 -2
  279. package/src/date-time/test/{time.js → time.tsx} +34 -19
  280. package/src/date-time/test/{utils.js → utils.ts} +1 -1
  281. package/src/date-time/{time.js → time.tsx} +57 -46
  282. package/src/date-time/{timezone.js → timezone.tsx} +4 -3
  283. package/src/date-time/types.ts +106 -0
  284. package/src/date-time/utils.ts +20 -0
  285. package/src/disabled/index.js +1 -1
  286. package/src/draggable/index.native.js +215 -0
  287. package/src/draggable/style.native.scss +3 -0
  288. package/src/dropdown/index.js +9 -4
  289. package/src/dropdown/style.scss +1 -1
  290. package/src/focal-point-picker/index.native.js +3 -3
  291. package/src/form-file-upload/test/index.js +8 -4
  292. package/src/index.js +0 -1
  293. package/src/index.native.js +1 -0
  294. package/src/item-group/stories/index.js +22 -18
  295. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  296. package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +1 -1
  297. package/src/mobile/bottom-sheet/index.native.js +1 -1
  298. package/src/mobile/bottom-sheet-select-control/index.native.js +7 -2
  299. package/src/mobile/html-text-input/index.native.js +45 -29
  300. package/src/mobile/html-text-input/style.android.scss +1 -15
  301. package/src/mobile/html-text-input/style.ios.scss +1 -15
  302. package/src/mobile/html-text-input/{style-common.native.scss → style.scss} +16 -0
  303. package/src/mobile/keyboard-aware-flat-list/index.android.js +15 -5
  304. package/src/mobile/keyboard-aware-flat-list/index.ios.js +75 -46
  305. package/src/navigator/stories/index.js +16 -10
  306. package/src/palette-edit/index.js +37 -9
  307. package/src/palette-edit/style.scss +0 -7
  308. package/src/palette-edit/test/index.js +63 -0
  309. package/src/panel/README.md +1 -1
  310. package/src/placeholder/test/index.js +7 -0
  311. package/src/popover/README.md +7 -9
  312. package/src/popover/index.js +242 -371
  313. package/src/popover/style.scss +20 -190
  314. package/src/popover/test/__snapshots__/index.js.snap +6 -18
  315. package/src/resizable-box/resize-tooltip/utils.ts +4 -5
  316. package/src/sandbox/index.native.js +1 -1
  317. package/src/select-control/styles/select-control-styles.ts +6 -3
  318. package/src/tab-panel/style.scss +1 -1
  319. package/src/toggle-group-control/test/__snapshots__/index.js.snap +4 -10
  320. package/src/toggle-group-control/toggle-group-control/component.tsx +7 -3
  321. package/src/tooltip/index.js +8 -2
  322. package/src/tooltip/style.scss +2 -4
  323. package/src/tooltip/test/index.native.js +1 -1
  324. package/src/unit-control/test/index.tsx +84 -4
  325. package/tsconfig.json +6 -2
  326. package/tsconfig.tsbuildinfo +1 -1
  327. package/build/flyout/context.js +0 -23
  328. package/build/flyout/context.js.map +0 -1
  329. package/build/flyout/flyout/component.js +0 -106
  330. package/build/flyout/flyout/component.js.map +0 -1
  331. package/build/flyout/flyout/hook.js +0 -53
  332. package/build/flyout/flyout/hook.js.map +0 -1
  333. package/build/flyout/flyout/index.js +0 -24
  334. package/build/flyout/flyout/index.js.map +0 -1
  335. package/build/flyout/flyout-content/component.js +0 -65
  336. package/build/flyout/flyout-content/component.js.map +0 -1
  337. package/build/flyout/flyout-content/index.js +0 -16
  338. package/build/flyout/flyout-content/index.js.map +0 -1
  339. package/build/flyout/index.js +0 -16
  340. package/build/flyout/index.js.map +0 -1
  341. package/build/flyout/styles.js +0 -46
  342. package/build/flyout/styles.js.map +0 -1
  343. package/build/flyout/utils.js +0 -36
  344. package/build/flyout/utils.js.map +0 -1
  345. package/build/mobile/html-text-input/container.android.js +0 -41
  346. package/build/mobile/html-text-input/container.android.js.map +0 -1
  347. package/build/mobile/html-text-input/container.ios.js +0 -60
  348. package/build/mobile/html-text-input/container.ios.js.map +0 -1
  349. package/build/popover/utils.js +0 -322
  350. package/build/popover/utils.js.map +0 -1
  351. package/build-module/flyout/context.js +0 -11
  352. package/build-module/flyout/context.js.map +0 -1
  353. package/build-module/flyout/flyout/component.js +0 -89
  354. package/build-module/flyout/flyout/component.js.map +0 -1
  355. package/build-module/flyout/flyout/hook.js +0 -44
  356. package/build-module/flyout/flyout/hook.js.map +0 -1
  357. package/build-module/flyout/flyout/index.js +0 -3
  358. package/build-module/flyout/flyout/index.js.map +0 -1
  359. package/build-module/flyout/flyout-content/component.js +0 -51
  360. package/build-module/flyout/flyout-content/component.js.map +0 -1
  361. package/build-module/flyout/flyout-content/index.js +0 -2
  362. package/build-module/flyout/flyout-content/index.js.map +0 -1
  363. package/build-module/flyout/index.js +0 -2
  364. package/build-module/flyout/index.js.map +0 -1
  365. package/build-module/flyout/styles.js +0 -27
  366. package/build-module/flyout/styles.js.map +0 -1
  367. package/build-module/flyout/utils.js +0 -25
  368. package/build-module/flyout/utils.js.map +0 -1
  369. package/build-module/mobile/html-text-input/container.android.js +0 -29
  370. package/build-module/mobile/html-text-input/container.android.js.map +0 -1
  371. package/build-module/mobile/html-text-input/container.ios.js +0 -48
  372. package/build-module/mobile/html-text-input/container.ios.js.map +0 -1
  373. package/build-module/popover/utils.js +0 -308
  374. package/build-module/popover/utils.js.map +0 -1
  375. package/build-types/flyout/context.d.ts +0 -6
  376. package/build-types/flyout/context.d.ts.map +0 -1
  377. package/build-types/flyout/flyout/component.d.ts +0 -21
  378. package/build-types/flyout/flyout/component.d.ts.map +0 -1
  379. package/build-types/flyout/flyout/hook.d.ts +0 -270
  380. package/build-types/flyout/flyout/hook.d.ts.map +0 -1
  381. package/build-types/flyout/flyout/index.d.ts +0 -3
  382. package/build-types/flyout/flyout/index.d.ts.map +0 -1
  383. package/build-types/flyout/flyout-content/component.d.ts +0 -3
  384. package/build-types/flyout/flyout-content/component.d.ts.map +0 -1
  385. package/build-types/flyout/flyout-content/index.d.ts +0 -2
  386. package/build-types/flyout/flyout-content/index.d.ts.map +0 -1
  387. package/build-types/flyout/index.d.ts +0 -2
  388. package/build-types/flyout/index.d.ts.map +0 -1
  389. package/build-types/flyout/styles.d.ts +0 -22
  390. package/build-types/flyout/styles.d.ts.map +0 -1
  391. package/build-types/flyout/types.d.ts +0 -80
  392. package/build-types/flyout/types.d.ts.map +0 -1
  393. package/build-types/flyout/utils.d.ts +0 -8
  394. package/build-types/flyout/utils.d.ts.map +0 -1
  395. package/build-types/popover/utils.d.ts +0 -70
  396. package/build-types/popover/utils.d.ts.map +0 -1
  397. package/src/button-group/index.js +0 -17
  398. package/src/button-group/stories/index.js +0 -21
  399. package/src/date-time/stories/date.js +0 -17
  400. package/src/date-time/stories/index.js +0 -91
  401. package/src/date-time/stories/time.js +0 -32
  402. package/src/date-time/utils.js +0 -18
  403. package/src/flyout/context.js +0 -10
  404. package/src/flyout/flyout/README.md +0 -98
  405. package/src/flyout/flyout/component.js +0 -111
  406. package/src/flyout/flyout/hook.js +0 -45
  407. package/src/flyout/flyout/index.js +0 -2
  408. package/src/flyout/flyout-content/component.js +0 -53
  409. package/src/flyout/flyout-content/index.js +0 -1
  410. package/src/flyout/index.js +0 -1
  411. package/src/flyout/stories/index.js +0 -24
  412. package/src/flyout/styles.ts +0 -41
  413. package/src/flyout/test/__snapshots__/index.js.snap +0 -186
  414. package/src/flyout/test/index.js +0 -103
  415. package/src/flyout/types.ts +0 -84
  416. package/src/flyout/utils.js +0 -23
  417. package/src/mobile/html-text-input/container.android.js +0 -23
  418. package/src/mobile/html-text-input/container.ios.js +0 -50
  419. package/src/popover/test/utils.js +0 -304
  420. package/src/popover/utils.js +0 -396
@@ -1,27 +0,0 @@
1
- import _styled from "@emotion/styled/base";
2
-
3
- /**
4
- * External dependencies
5
- */
6
- // eslint-disable-next-line no-restricted-imports
7
- import { Popover as ReakitPopover } from 'reakit';
8
- /**
9
- * Internal dependencies
10
- */
11
-
12
- import { Card, CardBody } from '../card';
13
- import * as ZIndex from '../utils/z-index';
14
- import CONFIG from '../utils/config-values';
15
- export const FlyoutContentView = /*#__PURE__*/_styled(ReakitPopover, process.env.NODE_ENV === "production" ? {
16
- target: "e1vtu5161"
17
- } : {
18
- target: "e1vtu5161",
19
- label: "FlyoutContentView"
20
- })("z-index:", ZIndex.Flyout, ";box-sizing:border-box;opacity:0;outline:none;position:relative;transform-origin:center center;transition:opacity ", CONFIG.transitionDurationFastest, " linear;width:100%;&[data-enter]{opacity:1;}&::before,&::after{display:none;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZmx5b3V0L3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFnQjJCIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZmx5b3V0L3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHls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vbnN0IENhcmRWaWV3ID0gc3R5bGVkKCBDYXJkIClgXG5cdCR7IENhcmRCb2R5LnNlbGVjdG9yIH0ge1xuXHRcdG1heC1oZWlnaHQ6IDgwdmg7XG5cdH1cbmA7XG4iXX0= */"));
21
- export const CardView = /*#__PURE__*/_styled(Card, process.env.NODE_ENV === "production" ? {
22
- target: "e1vtu5160"
23
- } : {
24
- target: "e1vtu5160",
25
- label: "CardView"
26
- })(CardBody.selector, "{max-height:80vh;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZmx5b3V0L3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFvQ3NDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvZmx5b3V0L3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQsIHsgU3R5bGVkQ29tcG9uZW50IH0gZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1yZXN0cmljdGVkLWltcG9ydHNcbmltcG9ydCB7IFBvcG92ZXIgYXMgUmVha2l0UG9wb3ZlciB9IGZyb20gJ3JlYWtpdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENhcmQsIENhcmRCb2R5IH0gZnJvbSAnLi4vY2FyZCc7XG5pbXBvcnQgKiBhcyBaSW5kZXggZnJvbSAnLi4vdXRpbHMvei1pbmRleCc7XG5pbXBvcnQgQ09ORklHIGZyb20gJy4uL3V0aWxzL2NvbmZpZy12YWx1ZXMnO1xuXG5leHBvcnQgY29uc3QgRmx5b3V0Q29udGVudFZpZXc6IFN0eWxlZENvbXBvbmVudDxcblx0UmVhY3QuQ29tcG9uZW50UHJvcHNXaXRob3V0UmVmPCB0eXBlb2YgUmVha2l0UG9wb3ZlciA+XG4+ID0gc3R5bGVkKCBSZWFraXRQb3BvdmVyIClgXG5cdHotaW5kZXg6ICR7IFpJbmRleC5GbHlvdXQgfTtcblx0Ym94LXNpemluZzogYm9yZGVyLWJveDtcblx0b3BhY2l0eTogMDtcblx0b3V0bGluZTogbm9uZTtcblx0cG9zaXRpb246IHJlbGF0aXZlO1xuXHR0cmFuc2Zvcm0tb3JpZ2luOiBjZW50ZXIgY2VudGVyO1xuXHR0cmFuc2l0aW9uOiBvcGFjaXR5ICR7IENPTkZJRy50cmFuc2l0aW9uRHVyYXRpb25GYXN0ZXN0IH0gbGluZWFyO1xuXHR3aWR0aDogMTAwJTtcblxuXHQmW2RhdGEtZW50ZXJdIHtcblx0XHRvcGFjaXR5OiAxO1xuXHR9XG5cblx0Jjo6YmVmb3JlLFxuXHQmOjphZnRlciB7XG5cdFx0ZGlzcGxheTogbm9uZTtcblx0fVxuYDtcblxuZXhwb3J0IGNvbnN0IENhcmRWaWV3ID0gc3R5bGVkKCBDYXJkIClgXG5cdCR7IENhcmRCb2R5LnNlbGVjdG9yIH0ge1xuXHRcdG1heC1oZWlnaHQ6IDgwdmg7XG5cdH1cbmA7XG4iXX0= */"));
27
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/flyout/styles.ts"],"names":["Popover","ReakitPopover","Card","CardBody","ZIndex","CONFIG","FlyoutContentView","Flyout","transitionDurationFastest","CardView","selector"],"mappings":";;AAAA;AACA;AACA;AAEA;AACA,SAASA,OAAO,IAAIC,aAApB,QAAyC,QAAzC;AAEA;AACA;AACA;;AACA,SAASC,IAAT,EAAeC,QAAf,QAA+B,SAA/B;AACA,OAAO,KAAKC,MAAZ,MAAwB,kBAAxB;AACA,OAAOC,MAAP,MAAmB,wBAAnB;AAEA,OAAO,MAAMC,iBAEZ,GAAG,qBAAQL,aAAR;AAAA;AAAA;AAAA;AAAA;AAAA,EAAH,aACYG,MAAM,CAACG,MADnB,wHAOuBF,MAAM,CAACG,yBAP9B,yqDAFM;AAsBP,OAAO,MAAMC,QAAQ,GAAG,qBAAQP,IAAR;AAAA;AAAA;AAAA;AAAA;AAAA,EAAH,CACjBC,QAAQ,CAACO,QADQ,8mDAAd","sourcesContent":["/**\n * External dependencies\n */\nimport styled, { StyledComponent } from '@emotion/styled';\n// eslint-disable-next-line no-restricted-imports\nimport { Popover as ReakitPopover } from 'reakit';\n\n/**\n * Internal dependencies\n */\nimport { Card, CardBody } from '../card';\nimport * as ZIndex from '../utils/z-index';\nimport CONFIG from '../utils/config-values';\n\nexport const FlyoutContentView: StyledComponent<\n\tReact.ComponentPropsWithoutRef< typeof ReakitPopover >\n> = styled( ReakitPopover )`\n\tz-index: ${ ZIndex.Flyout };\n\tbox-sizing: border-box;\n\topacity: 0;\n\toutline: none;\n\tposition: relative;\n\ttransform-origin: center center;\n\ttransition: opacity ${ CONFIG.transitionDurationFastest } linear;\n\twidth: 100%;\n\n\t&[data-enter] {\n\t\topacity: 1;\n\t}\n\n\t&::before,\n\t&::after {\n\t\tdisplay: none;\n\t}\n`;\n\nexport const CardView = styled( Card )`\n\t${ CardBody.selector } {\n\t\tmax-height: 80vh;\n\t}\n`;\n"]}
@@ -1,25 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import useResizeAware from 'react-resize-aware';
5
- /**
6
- * WordPress dependencies
7
- */
8
-
9
- import { useIsomorphicLayoutEffect } from '@wordpress/compose';
10
- /**
11
- *
12
- * @param { { onResize?: () => any } } onResize
13
- */
14
-
15
- export function useFlyoutResizeUpdater(_ref) {
16
- let {
17
- onResize
18
- } = _ref;
19
- const [resizeListener, sizes] = useResizeAware();
20
- useIsomorphicLayoutEffect(() => {
21
- onResize === null || onResize === void 0 ? void 0 : onResize();
22
- }, [sizes.width, sizes.height]);
23
- return resizeListener;
24
- }
25
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/flyout/utils.js"],"names":["useResizeAware","useIsomorphicLayoutEffect","useFlyoutResizeUpdater","onResize","resizeListener","sizes","width","height"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,cAAP,MAA2B,oBAA3B;AAEA;AACA;AACA;;AACA,SAASC,yBAAT,QAA0C,oBAA1C;AAEA;AACA;AACA;AACA;;AACA,OAAO,SAASC,sBAAT,OAAgD;AAAA,MAAf;AAAEC,IAAAA;AAAF,GAAe;AACtD,QAAM,CAAEC,cAAF,EAAkBC,KAAlB,IAA4BL,cAAc,EAAhD;AAEAC,EAAAA,yBAAyB,CAAE,MAAM;AAChCE,IAAAA,QAAQ,SAAR,IAAAA,QAAQ,WAAR,YAAAA,QAAQ;AACR,GAFwB,EAEtB,CAAEE,KAAK,CAACC,KAAR,EAAeD,KAAK,CAACE,MAArB,CAFsB,CAAzB;AAIA,SAAOH,cAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport useResizeAware from 'react-resize-aware';\n\n/**\n * WordPress dependencies\n */\nimport { useIsomorphicLayoutEffect } from '@wordpress/compose';\n\n/**\n *\n * @param { { onResize?: () => any } } onResize\n */\nexport function useFlyoutResizeUpdater( { onResize } ) {\n\tconst [ resizeListener, sizes ] = useResizeAware();\n\n\tuseIsomorphicLayoutEffect( () => {\n\t\tonResize?.();\n\t}, [ sizes.width, sizes.height ] );\n\n\treturn resizeListener;\n}\n"]}
@@ -1,29 +0,0 @@
1
- import { createElement } from "@wordpress/element";
2
-
3
- /**
4
- * External dependencies
5
- */
6
- import { ScrollView } from 'react-native';
7
- /**
8
- * Internal dependencies
9
- */
10
-
11
- import KeyboardAvoidingView from '../keyboard-avoiding-view';
12
- import styles from './style.android.scss';
13
-
14
- const HTMLInputContainer = _ref => {
15
- let {
16
- children,
17
- parentHeight
18
- } = _ref;
19
- return createElement(KeyboardAvoidingView, {
20
- style: styles.keyboardAvoidingView,
21
- parentHeight: parentHeight
22
- }, createElement(ScrollView, {
23
- style: styles.scrollView
24
- }, children));
25
- };
26
-
27
- HTMLInputContainer.scrollEnabled = false;
28
- export default HTMLInputContainer;
29
- //# sourceMappingURL=container.android.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/mobile/html-text-input/container.android.js"],"names":["ScrollView","KeyboardAvoidingView","styles","HTMLInputContainer","children","parentHeight","keyboardAvoidingView","scrollView","scrollEnabled"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,UAAT,QAA2B,cAA3B;AAEA;AACA;AACA;;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,MAAP,MAAmB,sBAAnB;;AAEA,MAAMC,kBAAkB,GAAG;AAAA,MAAE;AAAEC,IAAAA,QAAF;AAAYC,IAAAA;AAAZ,GAAF;AAAA,SAC1B,cAAC,oBAAD;AACC,IAAA,KAAK,EAAGH,MAAM,CAACI,oBADhB;AAEC,IAAA,YAAY,EAAGD;AAFhB,KAIC,cAAC,UAAD;AAAY,IAAA,KAAK,EAAGH,MAAM,CAACK;AAA3B,KAA0CH,QAA1C,CAJD,CAD0B;AAAA,CAA3B;;AASAD,kBAAkB,CAACK,aAAnB,GAAmC,KAAnC;AAEA,eAAeL,kBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { ScrollView } from 'react-native';\n\n/**\n * Internal dependencies\n */\nimport KeyboardAvoidingView from '../keyboard-avoiding-view';\nimport styles from './style.android.scss';\n\nconst HTMLInputContainer = ( { children, parentHeight } ) => (\n\t<KeyboardAvoidingView\n\t\tstyle={ styles.keyboardAvoidingView }\n\t\tparentHeight={ parentHeight }\n\t>\n\t\t<ScrollView style={ styles.scrollView }>{ children }</ScrollView>\n\t</KeyboardAvoidingView>\n);\n\nHTMLInputContainer.scrollEnabled = false;\n\nexport default HTMLInputContainer;\n"]}
@@ -1,48 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { createElement } from "@wordpress/element";
3
-
4
- /**
5
- * External dependencies
6
- */
7
- import { UIManager, PanResponder } from 'react-native';
8
- /**
9
- * WordPress dependencies
10
- */
11
-
12
- import { Component } from '@wordpress/element';
13
- /**
14
- * Internal dependencies
15
- */
16
-
17
- import KeyboardAvoidingView from '../keyboard-avoiding-view';
18
- import styles from './style.ios.scss';
19
-
20
- class HTMLInputContainer extends Component {
21
- constructor() {
22
- super(...arguments);
23
- this.panResponder = PanResponder.create({
24
- onStartShouldSetPanResponderCapture: () => true,
25
- onPanResponderMove: (e, gestureState) => {
26
- if (gestureState.dy > 100 && gestureState.dy < 110) {
27
- // Keyboard.dismiss() and this.textInput.blur() are not working here
28
- // They require to know the currentlyFocusedID under the hood but
29
- // during this gesture there's no currentlyFocusedID.
30
- UIManager.blur(e.target);
31
- }
32
- }
33
- });
34
- }
35
-
36
- render() {
37
- return createElement(KeyboardAvoidingView, _extends({
38
- style: styles.keyboardAvoidingView
39
- }, this.panResponder.panHandlers, {
40
- parentHeight: this.props.parentHeight
41
- }), this.props.children);
42
- }
43
-
44
- }
45
-
46
- HTMLInputContainer.scrollEnabled = true;
47
- export default HTMLInputContainer;
48
- //# sourceMappingURL=container.ios.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/mobile/html-text-input/container.ios.js"],"names":["UIManager","PanResponder","Component","KeyboardAvoidingView","styles","HTMLInputContainer","constructor","arguments","panResponder","create","onStartShouldSetPanResponderCapture","onPanResponderMove","e","gestureState","dy","blur","target","render","keyboardAvoidingView","panHandlers","props","parentHeight","children","scrollEnabled"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,SAAT,EAAoBC,YAApB,QAAwC,cAAxC;AAEA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,oBAA1B;AAEA;AACA;AACA;;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,MAAP,MAAmB,kBAAnB;;AAEA,MAAMC,kBAAN,SAAiCH,SAAjC,CAA2C;AAC1CI,EAAAA,WAAW,GAAG;AACb,UAAO,GAAGC,SAAV;AAEA,SAAKC,YAAL,GAAoBP,YAAY,CAACQ,MAAb,CAAqB;AACxCC,MAAAA,mCAAmC,EAAE,MAAM,IADH;AAGxCC,MAAAA,kBAAkB,EAAE,CAAEC,CAAF,EAAKC,YAAL,KAAuB;AAC1C,YAAKA,YAAY,CAACC,EAAb,GAAkB,GAAlB,IAAyBD,YAAY,CAACC,EAAb,GAAkB,GAAhD,EAAsD;AACrD;AACA;AACA;AACAd,UAAAA,SAAS,CAACe,IAAV,CAAgBH,CAAC,CAACI,MAAlB;AACA;AACD;AAVuC,KAArB,CAApB;AAYA;;AAEDC,EAAAA,MAAM,GAAG;AACR,WACC,cAAC,oBAAD;AACC,MAAA,KAAK,EAAGb,MAAM,CAACc;AADhB,OAEM,KAAKV,YAAL,CAAkBW,WAFxB;AAGC,MAAA,YAAY,EAAG,KAAKC,KAAL,CAAWC;AAH3B,QAKG,KAAKD,KAAL,CAAWE,QALd,CADD;AASA;;AA5ByC;;AA+B3CjB,kBAAkB,CAACkB,aAAnB,GAAmC,IAAnC;AAEA,eAAelB,kBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { UIManager, PanResponder } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport KeyboardAvoidingView from '../keyboard-avoiding-view';\nimport styles from './style.ios.scss';\n\nclass HTMLInputContainer extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.panResponder = PanResponder.create( {\n\t\t\tonStartShouldSetPanResponderCapture: () => true,\n\n\t\t\tonPanResponderMove: ( e, gestureState ) => {\n\t\t\t\tif ( gestureState.dy > 100 && gestureState.dy < 110 ) {\n\t\t\t\t\t// Keyboard.dismiss() and this.textInput.blur() are not working here\n\t\t\t\t\t// They require to know the currentlyFocusedID under the hood but\n\t\t\t\t\t// during this gesture there's no currentlyFocusedID.\n\t\t\t\t\tUIManager.blur( e.target );\n\t\t\t\t}\n\t\t\t},\n\t\t} );\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<KeyboardAvoidingView\n\t\t\t\tstyle={ styles.keyboardAvoidingView }\n\t\t\t\t{ ...this.panResponder.panHandlers }\n\t\t\t\tparentHeight={ this.props.parentHeight }\n\t\t\t>\n\t\t\t\t{ this.props.children }\n\t\t\t</KeyboardAvoidingView>\n\t\t);\n\t}\n}\n\nHTMLInputContainer.scrollEnabled = true;\n\nexport default HTMLInputContainer;\n"]}
@@ -1,308 +0,0 @@
1
- // @ts-nocheck
2
-
3
- /**
4
- * WordPress dependencies
5
- */
6
- import { isRTL } from '@wordpress/i18n';
7
- /**
8
- * Module constants
9
- */
10
-
11
- const HEIGHT_OFFSET = 10; // Used by the arrow and a bit of empty space.
12
-
13
- /**
14
- * Utility used to compute the popover position over the xAxis
15
- *
16
- * @param {Object} anchorRect Anchor Rect.
17
- * @param {Object} contentSize Content Size.
18
- * @param {string} xAxis Desired xAxis.
19
- * @param {string} corner Desired corner.
20
- * @param {boolean} stickyBoundaryElement The boundary element to use when
21
- * switching between sticky and normal
22
- * position.
23
- * @param {string} chosenYAxis yAxis to be used.
24
- * @param {Element} boundaryElement Boundary element.
25
- * @param {boolean} forcePosition Don't adjust position based on anchor.
26
- * @param {boolean} forceXAlignment Don't adjust alignment based on YAxis
27
- *
28
- * @return {Object} Popover xAxis position and constraints.
29
- */
30
-
31
- export function computePopoverXAxisPosition(anchorRect, contentSize, xAxis, corner, stickyBoundaryElement, chosenYAxis, boundaryElement, forcePosition, forceXAlignment) {
32
- const {
33
- width
34
- } = contentSize; // Correct xAxis for RTL support.
35
-
36
- if (xAxis === 'left' && isRTL()) {
37
- xAxis = 'right';
38
- } else if (xAxis === 'right' && isRTL()) {
39
- xAxis = 'left';
40
- }
41
-
42
- if (corner === 'left' && isRTL()) {
43
- corner = 'right';
44
- } else if (corner === 'right' && isRTL()) {
45
- corner = 'left';
46
- } // X axis alignment choices.
47
-
48
-
49
- const anchorMidPoint = Math.round(anchorRect.left + anchorRect.width / 2);
50
- const centerAlignment = {
51
- popoverLeft: anchorMidPoint,
52
- contentWidth: (anchorMidPoint - width / 2 > 0 ? width / 2 : anchorMidPoint) + (anchorMidPoint + width / 2 > window.innerWidth ? window.innerWidth - anchorMidPoint : width / 2)
53
- };
54
- let leftAlignmentX = anchorRect.left;
55
-
56
- if (corner === 'right') {
57
- leftAlignmentX = anchorRect.right;
58
- } else if (chosenYAxis !== 'middle' && !forceXAlignment) {
59
- leftAlignmentX = anchorMidPoint;
60
- }
61
-
62
- let rightAlignmentX = anchorRect.right;
63
-
64
- if (corner === 'left') {
65
- rightAlignmentX = anchorRect.left;
66
- } else if (chosenYAxis !== 'middle' && !forceXAlignment) {
67
- rightAlignmentX = anchorMidPoint;
68
- }
69
-
70
- const leftAlignment = {
71
- popoverLeft: leftAlignmentX,
72
- contentWidth: leftAlignmentX - width > 0 ? width : leftAlignmentX
73
- };
74
- const rightAlignment = {
75
- popoverLeft: rightAlignmentX,
76
- contentWidth: rightAlignmentX + width > window.innerWidth ? window.innerWidth - rightAlignmentX : width
77
- }; // Choosing the x axis.
78
-
79
- let chosenXAxis = xAxis;
80
- let contentWidth = null;
81
-
82
- if (!stickyBoundaryElement && !forcePosition) {
83
- if (xAxis === 'center' && centerAlignment.contentWidth === width) {
84
- chosenXAxis = 'center';
85
- } else if (xAxis === 'left' && leftAlignment.contentWidth === width) {
86
- chosenXAxis = 'left';
87
- } else if (xAxis === 'right' && rightAlignment.contentWidth === width) {
88
- chosenXAxis = 'right';
89
- } else {
90
- chosenXAxis = leftAlignment.contentWidth > rightAlignment.contentWidth ? 'left' : 'right';
91
- const chosenWidth = chosenXAxis === 'left' ? leftAlignment.contentWidth : rightAlignment.contentWidth; // Limit width of the content to the viewport width
92
-
93
- if (width > window.innerWidth) {
94
- contentWidth = window.innerWidth;
95
- } // If we can't find any alignment options that could fit
96
- // our content, then let's fallback to the center of the viewport.
97
-
98
-
99
- if (chosenWidth !== width) {
100
- chosenXAxis = 'center';
101
- centerAlignment.popoverLeft = window.innerWidth / 2;
102
- }
103
- }
104
- }
105
-
106
- let popoverLeft;
107
-
108
- if (chosenXAxis === 'center') {
109
- popoverLeft = centerAlignment.popoverLeft;
110
- } else if (chosenXAxis === 'left') {
111
- popoverLeft = leftAlignment.popoverLeft;
112
- } else {
113
- popoverLeft = rightAlignment.popoverLeft;
114
- }
115
-
116
- if (boundaryElement) {
117
- popoverLeft = Math.min(popoverLeft, boundaryElement.offsetLeft + boundaryElement.offsetWidth - width); // Avoid the popover being position beyond the left boundary if the
118
- // direction is left to right.
119
-
120
- if (!isRTL()) {
121
- popoverLeft = Math.max(popoverLeft, 0);
122
- }
123
- }
124
-
125
- return {
126
- xAxis: chosenXAxis,
127
- popoverLeft,
128
- contentWidth
129
- };
130
- }
131
- /**
132
- * Utility used to compute the popover position over the yAxis
133
- *
134
- * @param {Object} anchorRect Anchor Rect.
135
- * @param {Object} contentSize Content Size.
136
- * @param {string} yAxis Desired yAxis.
137
- * @param {string} corner Desired corner.
138
- * @param {boolean} stickyBoundaryElement The boundary element to use when switching between sticky
139
- * and normal position.
140
- * @param {Element} anchorRef The anchor element.
141
- * @param {Element} relativeOffsetTop If applicable, top offset of the relative positioned
142
- * parent container.
143
- * @param {boolean} forcePosition Don't adjust position based on anchor.
144
- * @param {Element|null} editorWrapper Element that wraps the editor content. Used to access
145
- * scroll position to determine sticky behavior.
146
- * @return {Object} Popover xAxis position and constraints.
147
- */
148
-
149
- export function computePopoverYAxisPosition(anchorRect, contentSize, yAxis, corner, stickyBoundaryElement, anchorRef, relativeOffsetTop, forcePosition, editorWrapper) {
150
- const {
151
- height
152
- } = contentSize;
153
-
154
- if (stickyBoundaryElement) {
155
- const stickyRect = stickyBoundaryElement.getBoundingClientRect();
156
- const stickyPositionTop = stickyRect.top + height - relativeOffsetTop;
157
- const stickyPositionBottom = stickyRect.bottom - height - relativeOffsetTop;
158
-
159
- if (anchorRect.top <= stickyPositionTop) {
160
- if (editorWrapper) {
161
- // If a popover cannot be positioned above the anchor, even after scrolling, we must
162
- // ensure we use the bottom position instead of the popover slot. This prevents the
163
- // popover from always restricting block content and interaction while selected if the
164
- // block is near the top of the site editor.
165
- const isRoomAboveInCanvas = height + HEIGHT_OFFSET < editorWrapper.scrollTop + anchorRect.top;
166
-
167
- if (!isRoomAboveInCanvas) {
168
- return {
169
- yAxis: 'bottom',
170
- // If the bottom of the block is also below the bottom sticky position (ex -
171
- // block is also taller than the editor window), return the bottom sticky
172
- // position instead. We do this instead of the top sticky position both to
173
- // allow a smooth transition and more importantly to ensure every section of
174
- // the block can be free from popover obscuration at some point in the
175
- // scroll position.
176
- popoverTop: Math.min(anchorRect.bottom, stickyPositionBottom)
177
- };
178
- }
179
- } // Default sticky behavior.
180
-
181
-
182
- return {
183
- yAxis,
184
- popoverTop: Math.min(anchorRect.bottom, stickyPositionTop)
185
- };
186
- }
187
- } // Y axis alignment choices.
188
-
189
-
190
- let anchorMidPoint = anchorRect.top + anchorRect.height / 2;
191
-
192
- if (corner === 'bottom') {
193
- anchorMidPoint = anchorRect.bottom;
194
- } else if (corner === 'top') {
195
- anchorMidPoint = anchorRect.top;
196
- }
197
-
198
- const middleAlignment = {
199
- popoverTop: anchorMidPoint,
200
- contentHeight: (anchorMidPoint - height / 2 > 0 ? height / 2 : anchorMidPoint) + (anchorMidPoint + height / 2 > window.innerHeight ? window.innerHeight - anchorMidPoint : height / 2)
201
- };
202
- const topAlignment = {
203
- popoverTop: anchorRect.top,
204
- contentHeight: anchorRect.top - HEIGHT_OFFSET - height > 0 ? height : anchorRect.top - HEIGHT_OFFSET
205
- };
206
- const bottomAlignment = {
207
- popoverTop: anchorRect.bottom,
208
- contentHeight: anchorRect.bottom + HEIGHT_OFFSET + height > window.innerHeight ? window.innerHeight - HEIGHT_OFFSET - anchorRect.bottom : height
209
- }; // Choosing the y axis.
210
-
211
- let chosenYAxis = yAxis;
212
- let contentHeight = null;
213
-
214
- if (!stickyBoundaryElement && !forcePosition) {
215
- if (yAxis === 'middle' && middleAlignment.contentHeight === height) {
216
- chosenYAxis = 'middle';
217
- } else if (yAxis === 'top' && topAlignment.contentHeight === height) {
218
- chosenYAxis = 'top';
219
- } else if (yAxis === 'bottom' && bottomAlignment.contentHeight === height) {
220
- chosenYAxis = 'bottom';
221
- } else {
222
- chosenYAxis = topAlignment.contentHeight > bottomAlignment.contentHeight ? 'top' : 'bottom';
223
- const chosenHeight = chosenYAxis === 'top' ? topAlignment.contentHeight : bottomAlignment.contentHeight;
224
- contentHeight = chosenHeight !== height ? chosenHeight : null;
225
- }
226
- }
227
-
228
- let popoverTop;
229
-
230
- if (chosenYAxis === 'middle') {
231
- popoverTop = middleAlignment.popoverTop;
232
- } else if (chosenYAxis === 'top') {
233
- popoverTop = topAlignment.popoverTop;
234
- } else {
235
- popoverTop = bottomAlignment.popoverTop;
236
- }
237
-
238
- return {
239
- yAxis: chosenYAxis,
240
- popoverTop,
241
- contentHeight
242
- };
243
- }
244
- /**
245
- * Utility used to compute the popover position and the content max width/height for a popover given
246
- * its anchor rect and its content size.
247
- *
248
- * @param {Object} anchorRect Anchor Rect.
249
- * @param {Object} contentSize Content Size.
250
- * @param {string} position Position.
251
- * @param {boolean} stickyBoundaryElement The boundary element to use when switching between
252
- * sticky and normal position.
253
- * @param {Element} anchorRef The anchor element.
254
- * @param {number} relativeOffsetTop If applicable, top offset of the relative positioned
255
- * parent container.
256
- * @param {Element} boundaryElement Boundary element.
257
- * @param {boolean} forcePosition Don't adjust position based on anchor.
258
- * @param {boolean} forceXAlignment Don't adjust alignment based on YAxis
259
- * @param {Element|null} editorWrapper Element that wraps the editor content. Used to access
260
- * scroll position to determine sticky behavior.
261
- * @return {Object} Popover position and constraints.
262
- */
263
-
264
- export function computePopoverPosition(anchorRect, contentSize) {
265
- let position = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'top';
266
- let stickyBoundaryElement = arguments.length > 3 ? arguments[3] : undefined;
267
- let anchorRef = arguments.length > 4 ? arguments[4] : undefined;
268
- let relativeOffsetTop = arguments.length > 5 ? arguments[5] : undefined;
269
- let boundaryElement = arguments.length > 6 ? arguments[6] : undefined;
270
- let forcePosition = arguments.length > 7 ? arguments[7] : undefined;
271
- let forceXAlignment = arguments.length > 8 ? arguments[8] : undefined;
272
- let editorWrapper = arguments.length > 9 ? arguments[9] : undefined;
273
- const [yAxis, xAxis = 'center', corner] = position.split(' ');
274
- const yAxisPosition = computePopoverYAxisPosition(anchorRect, contentSize, yAxis, corner, stickyBoundaryElement, anchorRef, relativeOffsetTop, forcePosition, editorWrapper);
275
- const xAxisPosition = computePopoverXAxisPosition(anchorRect, contentSize, xAxis, corner, stickyBoundaryElement, yAxisPosition.yAxis, boundaryElement, forcePosition, forceXAlignment);
276
- return { ...xAxisPosition,
277
- ...yAxisPosition
278
- };
279
- }
280
- /**
281
- * Offsets the given rect by the position of the iframe that contains the
282
- * element. If the owner document is not in an iframe then it returns with the
283
- * original rect. If the popover container document and the anchor document are
284
- * the same, the original rect will also be returned.
285
- *
286
- * @param {DOMRect} rect bounds of the element
287
- * @param {Document} ownerDocument document of the element
288
- * @param {Element} container The popover container to position.
289
- *
290
- * @return {DOMRect} offsetted bounds
291
- */
292
-
293
- export function offsetIframe(rect, ownerDocument, container) {
294
- const {
295
- defaultView
296
- } = ownerDocument;
297
- const {
298
- frameElement
299
- } = defaultView;
300
-
301
- if (!frameElement || ownerDocument === container.ownerDocument) {
302
- return rect;
303
- }
304
-
305
- const iframeRect = frameElement.getBoundingClientRect();
306
- return new defaultView.DOMRect(rect.left + iframeRect.left, rect.top + iframeRect.top, rect.width, rect.height);
307
- }
308
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/popover/utils.js"],"names":["isRTL","HEIGHT_OFFSET","computePopoverXAxisPosition","anchorRect","contentSize","xAxis","corner","stickyBoundaryElement","chosenYAxis","boundaryElement","forcePosition","forceXAlignment","width","anchorMidPoint","Math","round","left","centerAlignment","popoverLeft","contentWidth","window","innerWidth","leftAlignmentX","right","rightAlignmentX","leftAlignment","rightAlignment","chosenXAxis","chosenWidth","min","offsetLeft","offsetWidth","max","computePopoverYAxisPosition","yAxis","anchorRef","relativeOffsetTop","editorWrapper","height","stickyRect","getBoundingClientRect","stickyPositionTop","top","stickyPositionBottom","bottom","isRoomAboveInCanvas","scrollTop","popoverTop","middleAlignment","contentHeight","innerHeight","topAlignment","bottomAlignment","chosenHeight","computePopoverPosition","position","split","yAxisPosition","xAxisPosition","offsetIframe","rect","ownerDocument","container","defaultView","frameElement","iframeRect","DOMRect"],"mappings":"AAAA;;AACA;AACA;AACA;AACA,SAASA,KAAT,QAAsB,iBAAtB;AAEA;AACA;AACA;;AACA,MAAMC,aAAa,GAAG,EAAtB,C,CAA0B;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,2BAAT,CACNC,UADM,EAENC,WAFM,EAGNC,KAHM,EAINC,MAJM,EAKNC,qBALM,EAMNC,WANM,EAONC,eAPM,EAQNC,aARM,EASNC,eATM,EAUL;AACD,QAAM;AAAEC,IAAAA;AAAF,MAAYR,WAAlB,CADC,CAGD;;AACA,MAAKC,KAAK,KAAK,MAAV,IAAoBL,KAAK,EAA9B,EAAmC;AAClCK,IAAAA,KAAK,GAAG,OAAR;AACA,GAFD,MAEO,IAAKA,KAAK,KAAK,OAAV,IAAqBL,KAAK,EAA/B,EAAoC;AAC1CK,IAAAA,KAAK,GAAG,MAAR;AACA;;AAED,MAAKC,MAAM,KAAK,MAAX,IAAqBN,KAAK,EAA/B,EAAoC;AACnCM,IAAAA,MAAM,GAAG,OAAT;AACA,GAFD,MAEO,IAAKA,MAAM,KAAK,OAAX,IAAsBN,KAAK,EAAhC,EAAqC;AAC3CM,IAAAA,MAAM,GAAG,MAAT;AACA,GAdA,CAgBD;;;A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B,EAA6BC,aAA7B,EAA4CC,SAA5C,EAAwD;AAC9D,QAAM;AAAEC,IAAAA;AAAF,MAAkBF,aAAxB;AACA,QAAM;AAAEG,IAAAA;AAAF,MAAmBD,WAAzB;;AAEA,MAAK,CAAEC,YAAF,IAAkBH,aAAa,KAAKC,SAAS,CAACD,aAAnD,EAAmE;AAClE,WAAOD,IAAP;AACA;;AAED,QAAMK,UAAU,GAAGD,YAAY,CAACxB,qBAAb,EAAnB;AACA,SAAO,IAAIuB,WAAW,CAACG,OAAhB,CACNN,IAAI,CAAC5C,IAAL,GAAYiD,UAAU,CAACjD,IADjB,EAEN4C,IAAI,CAAClB,GAAL,GAAWuB,UAAU,CAACvB,GAFhB,EAGNkB,IAAI,CAAChD,KAHC,EAINgD,IAAI,CAACtB,MAJC,CAAP;AAMA","sourcesContent":["// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Module constants\n */\nconst HEIGHT_OFFSET = 10; // Used by the arrow and a bit of empty space.\n\n/**\n * Utility used to compute the popover position over the xAxis\n *\n * @param {Object} anchorRect Anchor Rect.\n * @param {Object} contentSize Content Size.\n * @param {string} xAxis Desired xAxis.\n * @param {string} corner Desired corner.\n * @param {boolean} stickyBoundaryElement The boundary element to use when\n * switching between sticky and normal\n * position.\n * @param {string} chosenYAxis yAxis to be used.\n * @param {Element} boundaryElement Boundary element.\n * @param {boolean} forcePosition Don't adjust position based on anchor.\n * @param {boolean} forceXAlignment Don't adjust alignment based on YAxis\n *\n * @return {Object} Popover xAxis position and constraints.\n */\nexport function computePopoverXAxisPosition(\n\tanchorRect,\n\tcontentSize,\n\txAxis,\n\tcorner,\n\tstickyBoundaryElement,\n\tchosenYAxis,\n\tboundaryElement,\n\tforcePosition,\n\tforceXAlignment\n) {\n\tconst { width } = contentSize;\n\n\t// Correct xAxis for RTL support.\n\tif ( xAxis === 'left' && isRTL() ) {\n\t\txAxis = 'right';\n\t} else if ( xAxis === 'right' && isRTL() ) {\n\t\txAxis = 'left';\n\t}\n\n\tif ( corner === 'left' && isRTL() ) {\n\t\tcorner = 'right';\n\t} else if ( corner === 'right' && isRTL() ) {\n\t\tcorner = 'left';\n\t}\n\n\t// X axis alignment choices.\n\tconst anchorMidPoint = Math.round( anchorRect.left + anchorRect.width / 2 );\n\tconst centerAlignment = {\n\t\tpopoverLeft: anchorMidPoint,\n\t\tcontentWidth:\n\t\t\t( anchorMidPoint - width / 2 > 0 ? width / 2 : anchorMidPoint ) +\n\t\t\t( anchorMidPoint + width / 2 > window.innerWidth\n\t\t\t\t? window.innerWidth - anchorMidPoint\n\t\t\t\t: width / 2 ),\n\t};\n\n\tlet leftAlignmentX = anchorRect.left;\n\n\tif ( corner === 'right' ) {\n\t\tleftAlignmentX = anchorRect.right;\n\t} else if ( chosenYAxis !== 'middle' && ! forceXAlignment ) {\n\t\tleftAlignmentX = anchorMidPoint;\n\t}\n\n\tlet rightAlignmentX = anchorRect.right;\n\n\tif ( corner === 'left' ) {\n\t\trightAlignmentX = anchorRect.left;\n\t} else if ( chosenYAxis !== 'middle' && ! forceXAlignment ) {\n\t\trightAlignmentX = anchorMidPoint;\n\t}\n\n\tconst leftAlignment = {\n\t\tpopoverLeft: leftAlignmentX,\n\t\tcontentWidth: leftAlignmentX - width > 0 ? width : leftAlignmentX,\n\t};\n\tconst rightAlignment = {\n\t\tpopoverLeft: rightAlignmentX,\n\t\tcontentWidth:\n\t\t\trightAlignmentX + width > window.innerWidth\n\t\t\t\t? window.innerWidth - rightAlignmentX\n\t\t\t\t: width,\n\t};\n\n\t// Choosing the x axis.\n\tlet chosenXAxis = xAxis;\n\tlet contentWidth = null;\n\n\tif ( ! stickyBoundaryElement && ! forcePosition ) {\n\t\tif ( xAxis === 'center' && centerAlignment.contentWidth === width ) {\n\t\t\tchosenXAxis = 'center';\n\t\t} else if ( xAxis === 'left' && leftAlignment.contentWidth === width ) {\n\t\t\tchosenXAxis = 'left';\n\t\t} else if (\n\t\t\txAxis === 'right' &&\n\t\t\trightAlignment.contentWidth === width\n\t\t) {\n\t\t\tchosenXAxis = 'right';\n\t\t} else {\n\t\t\tchosenXAxis =\n\t\t\t\tleftAlignment.contentWidth > rightAlignment.contentWidth\n\t\t\t\t\t? 'left'\n\t\t\t\t\t: 'right';\n\t\t\tconst chosenWidth =\n\t\t\t\tchosenXAxis === 'left'\n\t\t\t\t\t? leftAlignment.contentWidth\n\t\t\t\t\t: rightAlignment.contentWidth;\n\n\t\t\t// Limit width of the content to the viewport width\n\t\t\tif ( width > window.innerWidth ) {\n\t\t\t\tcontentWidth = window.innerWidth;\n\t\t\t}\n\n\t\t\t// If we can't find any alignment options that could fit\n\t\t\t// our content, then let's fallback to the center of the viewport.\n\t\t\tif ( chosenWidth !== width ) {\n\t\t\t\tchosenXAxis = 'center';\n\t\t\t\tcenterAlignment.popoverLeft = window.innerWidth / 2;\n\t\t\t}\n\t\t}\n\t}\n\n\tlet popoverLeft;\n\tif ( chosenXAxis === 'center' ) {\n\t\tpopoverLeft = centerAlignment.popoverLeft;\n\t} else if ( chosenXAxis === 'left' ) {\n\t\tpopoverLeft = leftAlignment.popoverLeft;\n\t} else {\n\t\tpopoverLeft = rightAlignment.popoverLeft;\n\t}\n\n\tif ( boundaryElement ) {\n\t\tpopoverLeft = Math.min(\n\t\t\tpopoverLeft,\n\t\t\tboundaryElement.offsetLeft + boundaryElement.offsetWidth - width\n\t\t);\n\n\t\t// Avoid the popover being position beyond the left boundary if the\n\t\t// direction is left to right.\n\t\tif ( ! isRTL() ) {\n\t\t\tpopoverLeft = Math.max( popoverLeft, 0 );\n\t\t}\n\t}\n\n\treturn {\n\t\txAxis: chosenXAxis,\n\t\tpopoverLeft,\n\t\tcontentWidth,\n\t};\n}\n\n/**\n * Utility used to compute the popover position over the yAxis\n *\n * @param {Object} anchorRect Anchor Rect.\n * @param {Object} contentSize Content Size.\n * @param {string} yAxis Desired yAxis.\n * @param {string} corner Desired corner.\n * @param {boolean} stickyBoundaryElement The boundary element to use when switching between sticky\n * and normal position.\n * @param {Element} anchorRef The anchor element.\n * @param {Element} relativeOffsetTop If applicable, top offset of the relative positioned\n * parent container.\n * @param {boolean} forcePosition Don't adjust position based on anchor.\n * @param {Element|null} editorWrapper Element that wraps the editor content. Used to access\n * scroll position to determine sticky behavior.\n * @return {Object} Popover xAxis position and constraints.\n */\nexport function computePopoverYAxisPosition(\n\tanchorRect,\n\tcontentSize,\n\tyAxis,\n\tcorner,\n\tstickyBoundaryElement,\n\tanchorRef,\n\trelativeOffsetTop,\n\tforcePosition,\n\teditorWrapper\n) {\n\tconst { height } = contentSize;\n\n\tif ( stickyBoundaryElement ) {\n\t\tconst stickyRect = stickyBoundaryElement.getBoundingClientRect();\n\t\tconst stickyPositionTop = stickyRect.top + height - relativeOffsetTop;\n\t\tconst stickyPositionBottom =\n\t\t\tstickyRect.bottom - height - relativeOffsetTop;\n\n\t\tif ( anchorRect.top <= stickyPositionTop ) {\n\t\t\tif ( editorWrapper ) {\n\t\t\t\t// If a popover cannot be positioned above the anchor, even after scrolling, we must\n\t\t\t\t// ensure we use the bottom position instead of the popover slot. This prevents the\n\t\t\t\t// popover from always restricting block content and interaction while selected if the\n\t\t\t\t// block is near the top of the site editor.\n\n\t\t\t\tconst isRoomAboveInCanvas =\n\t\t\t\t\theight + HEIGHT_OFFSET <\n\t\t\t\t\teditorWrapper.scrollTop + anchorRect.top;\n\t\t\t\tif ( ! isRoomAboveInCanvas ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tyAxis: 'bottom',\n\t\t\t\t\t\t// If the bottom of the block is also below the bottom sticky position (ex -\n\t\t\t\t\t\t// block is also taller than the editor window), return the bottom sticky\n\t\t\t\t\t\t// position instead. We do this instead of the top sticky position both to\n\t\t\t\t\t\t// allow a smooth transition and more importantly to ensure every section of\n\t\t\t\t\t\t// the block can be free from popover obscuration at some point in the\n\t\t\t\t\t\t// scroll position.\n\t\t\t\t\t\tpopoverTop: Math.min(\n\t\t\t\t\t\t\tanchorRect.bottom,\n\t\t\t\t\t\t\tstickyPositionBottom\n\t\t\t\t\t\t),\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Default sticky behavior.\n\t\t\treturn {\n\t\t\t\tyAxis,\n\t\t\t\tpopoverTop: Math.min( anchorRect.bottom, stickyPositionTop ),\n\t\t\t};\n\t\t}\n\t}\n\n\t// Y axis alignment choices.\n\tlet anchorMidPoint = anchorRect.top + anchorRect.height / 2;\n\n\tif ( corner === 'bottom' ) {\n\t\tanchorMidPoint = anchorRect.bottom;\n\t} else if ( corner === 'top' ) {\n\t\tanchorMidPoint = anchorRect.top;\n\t}\n\n\tconst middleAlignment = {\n\t\tpopoverTop: anchorMidPoint,\n\t\tcontentHeight:\n\t\t\t( anchorMidPoint - height / 2 > 0 ? height / 2 : anchorMidPoint ) +\n\t\t\t( anchorMidPoint + height / 2 > window.innerHeight\n\t\t\t\t? window.innerHeight - anchorMidPoint\n\t\t\t\t: height / 2 ),\n\t};\n\n\tconst topAlignment = {\n\t\tpopoverTop: anchorRect.top,\n\t\tcontentHeight:\n\t\t\tanchorRect.top - HEIGHT_OFFSET - height > 0\n\t\t\t\t? height\n\t\t\t\t: anchorRect.top - HEIGHT_OFFSET,\n\t};\n\tconst bottomAlignment = {\n\t\tpopoverTop: anchorRect.bottom,\n\t\tcontentHeight:\n\t\t\tanchorRect.bottom + HEIGHT_OFFSET + height > window.innerHeight\n\t\t\t\t? window.innerHeight - HEIGHT_OFFSET - anchorRect.bottom\n\t\t\t\t: height,\n\t};\n\n\t// Choosing the y axis.\n\tlet chosenYAxis = yAxis;\n\tlet contentHeight = null;\n\n\tif ( ! stickyBoundaryElement && ! forcePosition ) {\n\t\tif ( yAxis === 'middle' && middleAlignment.contentHeight === height ) {\n\t\t\tchosenYAxis = 'middle';\n\t\t} else if ( yAxis === 'top' && topAlignment.contentHeight === height ) {\n\t\t\tchosenYAxis = 'top';\n\t\t} else if (\n\t\t\tyAxis === 'bottom' &&\n\t\t\tbottomAlignment.contentHeight === height\n\t\t) {\n\t\t\tchosenYAxis = 'bottom';\n\t\t} else {\n\t\t\tchosenYAxis =\n\t\t\t\ttopAlignment.contentHeight > bottomAlignment.contentHeight\n\t\t\t\t\t? 'top'\n\t\t\t\t\t: 'bottom';\n\t\t\tconst chosenHeight =\n\t\t\t\tchosenYAxis === 'top'\n\t\t\t\t\t? topAlignment.contentHeight\n\t\t\t\t\t: bottomAlignment.contentHeight;\n\t\t\tcontentHeight = chosenHeight !== height ? chosenHeight : null;\n\t\t}\n\t}\n\n\tlet popoverTop;\n\tif ( chosenYAxis === 'middle' ) {\n\t\tpopoverTop = middleAlignment.popoverTop;\n\t} else if ( chosenYAxis === 'top' ) {\n\t\tpopoverTop = topAlignment.popoverTop;\n\t} else {\n\t\tpopoverTop = bottomAlignment.popoverTop;\n\t}\n\n\treturn {\n\t\tyAxis: chosenYAxis,\n\t\tpopoverTop,\n\t\tcontentHeight,\n\t};\n}\n\n/**\n * Utility used to compute the popover position and the content max width/height for a popover given\n * its anchor rect and its content size.\n *\n * @param {Object} anchorRect Anchor Rect.\n * @param {Object} contentSize Content Size.\n * @param {string} position Position.\n * @param {boolean} stickyBoundaryElement The boundary element to use when switching between\n * sticky and normal position.\n * @param {Element} anchorRef The anchor element.\n * @param {number} relativeOffsetTop If applicable, top offset of the relative positioned\n * parent container.\n * @param {Element} boundaryElement Boundary element.\n * @param {boolean} forcePosition Don't adjust position based on anchor.\n * @param {boolean} forceXAlignment Don't adjust alignment based on YAxis\n * @param {Element|null} editorWrapper Element that wraps the editor content. Used to access\n * scroll position to determine sticky behavior.\n * @return {Object} Popover position and constraints.\n */\nexport function computePopoverPosition(\n\tanchorRect,\n\tcontentSize,\n\tposition = 'top',\n\tstickyBoundaryElement,\n\tanchorRef,\n\trelativeOffsetTop,\n\tboundaryElement,\n\tforcePosition,\n\tforceXAlignment,\n\teditorWrapper\n) {\n\tconst [ yAxis, xAxis = 'center', corner ] = position.split( ' ' );\n\n\tconst yAxisPosition = computePopoverYAxisPosition(\n\t\tanchorRect,\n\t\tcontentSize,\n\t\tyAxis,\n\t\tcorner,\n\t\tstickyBoundaryElement,\n\t\tanchorRef,\n\t\trelativeOffsetTop,\n\t\tforcePosition,\n\t\teditorWrapper\n\t);\n\tconst xAxisPosition = computePopoverXAxisPosition(\n\t\tanchorRect,\n\t\tcontentSize,\n\t\txAxis,\n\t\tcorner,\n\t\tstickyBoundaryElement,\n\t\tyAxisPosition.yAxis,\n\t\tboundaryElement,\n\t\tforcePosition,\n\t\tforceXAlignment\n\t);\n\n\treturn {\n\t\t...xAxisPosition,\n\t\t...yAxisPosition,\n\t};\n}\n\n/**\n * Offsets the given rect by the position of the iframe that contains the\n * element. If the owner document is not in an iframe then it returns with the\n * original rect. If the popover container document and the anchor document are\n * the same, the original rect will also be returned.\n *\n * @param {DOMRect} rect bounds of the element\n * @param {Document} ownerDocument document of the element\n * @param {Element} container The popover container to position.\n *\n * @return {DOMRect} offsetted bounds\n */\nexport function offsetIframe( rect, ownerDocument, container ) {\n\tconst { defaultView } = ownerDocument;\n\tconst { frameElement } = defaultView;\n\n\tif ( ! frameElement || ownerDocument === container.ownerDocument ) {\n\t\treturn rect;\n\t}\n\n\tconst iframeRect = frameElement.getBoundingClientRect();\n\treturn new defaultView.DOMRect(\n\t\trect.left + iframeRect.left,\n\t\trect.top + iframeRect.top,\n\t\trect.width,\n\t\trect.height\n\t);\n}\n"]}
@@ -1,6 +0,0 @@
1
- /**
2
- * @type {import('react').Context<import('./types').Context>}
3
- */
4
- export const FlyoutContext: import('react').Context<import('./types').Context>;
5
- export function useFlyoutContext(): import("./types").Context;
6
- //# sourceMappingURL=context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/flyout/context.js"],"names":[],"mappings":"AAKA;;GAEG;AACH,4BAFU,OAAO,OAAO,EAAE,OAAO,CAAC,OAAO,SAAS,EAAE,OAAO,CAAC,CAEX;AAC1C,8DAA0D"}
@@ -1,21 +0,0 @@
1
- export default ConnectedFlyout;
2
- /**
3
- * `Flyout` is a component to render a floating content modal.
4
- * It is similar in purpose to a tooltip, but renders content of any sort,
5
- * not only simple text.
6
- *
7
- * @example
8
- * ```jsx
9
- * import { Button, __experimentalFlyout as Flyout, __experimentalText as } from '@wordpress/components';
10
- *
11
- * function Example() {
12
- * return (
13
- * <Flyout trigger={ <Button>Show/Hide content</Button> }>
14
- * <Text>Code is Poetry</Text>
15
- * </Flyout>
16
- * );
17
- * }
18
- * ```
19
- */
20
- declare const ConnectedFlyout: import("../../ui/context").WordPressComponent<"div", import("../types").Props, false>;
21
- //# sourceMappingURL=component.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/flyout/flyout/component.js"],"names":[],"mappings":";AA0FA;;;;;;;;;;;;;;;;;GAiBG;AACH,qHAA2D"}