@wordpress/components 25.1.0 → 25.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (993) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/README.md +1 -1
  3. package/build/alignment-matrix-control/cell.js +4 -5
  4. package/build/alignment-matrix-control/cell.js.map +1 -1
  5. package/build/alignment-matrix-control/icon.js +2 -4
  6. package/build/alignment-matrix-control/icon.js.map +1 -1
  7. package/build/alignment-matrix-control/index.js +6 -7
  8. package/build/alignment-matrix-control/index.js.map +1 -1
  9. package/build/angle-picker-control/angle-circle.js +4 -7
  10. package/build/angle-picker-control/angle-circle.js.map +1 -1
  11. package/build/angle-picker-control/index.js +2 -4
  12. package/build/angle-picker-control/index.js.map +1 -1
  13. package/build/autocomplete/autocompleter-ui.js +28 -1
  14. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  15. package/build/autocomplete/index.js +0 -20
  16. package/build/autocomplete/index.js.map +1 -1
  17. package/build/base-control/index.js +2 -4
  18. package/build/base-control/index.js.map +1 -1
  19. package/build/border-box-control/border-box-control/component.js +4 -6
  20. package/build/border-box-control/border-box-control/component.js.map +1 -1
  21. package/build/border-box-control/border-box-control-linked-button/component.js +2 -4
  22. package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  23. package/build/border-box-control/border-box-control-split-controls/component.js +15 -13
  24. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  25. package/build/border-box-control/border-box-control-visualizer/component.js +2 -6
  26. package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  27. package/build/border-control/border-control/component.js +4 -6
  28. package/build/border-control/border-control/component.js.map +1 -1
  29. package/build/border-control/border-control-dropdown/component.js +4 -6
  30. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  31. package/build/border-control/border-control-style-picker/component.js +2 -4
  32. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  33. package/build/box-control/all-input-control.js +2 -4
  34. package/build/box-control/all-input-control.js.map +1 -1
  35. package/build/box-control/axial-input-controls.js +2 -4
  36. package/build/box-control/axial-input-controls.js.map +1 -1
  37. package/build/box-control/icon.js +4 -7
  38. package/build/box-control/icon.js.map +1 -1
  39. package/build/box-control/index.js +7 -6
  40. package/build/box-control/index.js.map +1 -1
  41. package/build/box-control/input-controls.js +2 -4
  42. package/build/box-control/input-controls.js.map +1 -1
  43. package/build/box-control/linked-button.js +2 -4
  44. package/build/box-control/linked-button.js.map +1 -1
  45. package/build/box-control/unit-control.js +6 -6
  46. package/build/box-control/unit-control.js.map +1 -1
  47. package/build/button/deprecated.js +2 -4
  48. package/build/button/deprecated.js.map +1 -1
  49. package/build/button/index.js +7 -3
  50. package/build/button/index.js.map +1 -1
  51. package/build/button-group/index.js +4 -5
  52. package/build/button-group/index.js.map +1 -1
  53. package/build/card/card/component.js +2 -4
  54. package/build/card/card/component.js.map +1 -1
  55. package/build/card/card-body/component.js +4 -8
  56. package/build/card/card-body/component.js.map +1 -1
  57. package/build/card/card-divider/component.js +2 -6
  58. package/build/card/card-divider/component.js.map +1 -1
  59. package/build/card/card-footer/component.js +2 -6
  60. package/build/card/card-footer/component.js.map +1 -1
  61. package/build/card/card-header/component.js +2 -6
  62. package/build/card/card-header/component.js.map +1 -1
  63. package/build/card/card-media/component.js +2 -6
  64. package/build/card/card-media/component.js.map +1 -1
  65. package/build/checkbox-control/index.js +4 -5
  66. package/build/checkbox-control/index.js.map +1 -1
  67. package/build/circular-option-picker/index.js +19 -16
  68. package/build/circular-option-picker/index.js.map +1 -1
  69. package/build/clipboard-button/index.js +9 -20
  70. package/build/clipboard-button/index.js.map +1 -1
  71. package/build/clipboard-button/types.js +6 -0
  72. package/build/clipboard-button/types.js.map +1 -0
  73. package/build/color-control/index.native.js +4 -5
  74. package/build/color-control/index.native.js.map +1 -1
  75. package/build/color-indicator/index.js +4 -5
  76. package/build/color-indicator/index.js.map +1 -1
  77. package/build/color-palette/index.js +11 -11
  78. package/build/color-palette/index.js.map +1 -1
  79. package/build/color-picker/color-input.js +6 -3
  80. package/build/color-picker/color-input.js.map +1 -1
  81. package/build/color-picker/component.js +4 -5
  82. package/build/color-picker/component.js.map +1 -1
  83. package/build/color-picker/legacy-adapter.js +2 -1
  84. package/build/color-picker/legacy-adapter.js.map +1 -1
  85. package/build/confirm-dialog/component.js +4 -5
  86. package/build/confirm-dialog/component.js.map +1 -1
  87. package/build/custom-gradient-picker/gradient-bar/control-points.js +8 -8
  88. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  89. package/build/custom-select-control/index.js +34 -32
  90. package/build/custom-select-control/index.js.map +1 -1
  91. package/build/dashicon/index.js +4 -7
  92. package/build/dashicon/index.js.map +1 -1
  93. package/build/dashicon/index.native.js +4 -7
  94. package/build/dashicon/index.native.js.map +1 -1
  95. package/build/disabled/index.js +4 -7
  96. package/build/disabled/index.js.map +1 -1
  97. package/build/divider/component.js +4 -8
  98. package/build/divider/component.js.map +1 -1
  99. package/build/drop-zone/index.js +2 -4
  100. package/build/drop-zone/index.js.map +1 -1
  101. package/build/dropdown/dropdown-content-wrapper.js +2 -6
  102. package/build/dropdown/dropdown-content-wrapper.js.map +1 -1
  103. package/build/dropdown/index.js +29 -24
  104. package/build/dropdown/index.js.map +1 -1
  105. package/build/dropdown-menu/index.js +98 -93
  106. package/build/dropdown-menu/index.js.map +1 -1
  107. package/build/dropdown-menu/index.native.js +2 -4
  108. package/build/dropdown-menu/index.native.js.map +1 -1
  109. package/build/dropdown-menu-v2/index.js +14 -12
  110. package/build/dropdown-menu-v2/index.js.map +1 -1
  111. package/build/dropdown-menu-v2/styles.js +16 -16
  112. package/build/dropdown-menu-v2/styles.js.map +1 -1
  113. package/build/elevation/component.js +2 -6
  114. package/build/elevation/component.js.map +1 -1
  115. package/build/external-link/index.js +2 -4
  116. package/build/external-link/index.js.map +1 -1
  117. package/build/flex/flex/component.js +2 -6
  118. package/build/flex/flex/component.js.map +1 -1
  119. package/build/flex/flex-block/component.js +2 -6
  120. package/build/flex/flex-block/component.js.map +1 -1
  121. package/build/flex/flex-item/component.js +2 -6
  122. package/build/flex/flex-item/component.js.map +1 -1
  123. package/build/focal-point-picker/controls.js +4 -7
  124. package/build/focal-point-picker/controls.js.map +1 -1
  125. package/build/focal-point-picker/focal-point.js +2 -4
  126. package/build/focal-point-picker/focal-point.js.map +1 -1
  127. package/build/focal-point-picker/grid.js +2 -6
  128. package/build/focal-point-picker/grid.js.map +1 -1
  129. package/build/focal-point-picker/index.js +4 -6
  130. package/build/focal-point-picker/index.js.map +1 -1
  131. package/build/focal-point-picker/index.native.js +2 -4
  132. package/build/focal-point-picker/index.native.js.map +1 -1
  133. package/build/focal-point-picker/media.js +7 -10
  134. package/build/focal-point-picker/media.js.map +1 -1
  135. package/build/focal-point-picker/tooltip/index.native.js +2 -4
  136. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  137. package/build/focusable-iframe/index.js +4 -5
  138. package/build/focusable-iframe/index.js.map +1 -1
  139. package/build/footer-message-control/index.native.js +2 -1
  140. package/build/footer-message-control/index.native.js.map +1 -1
  141. package/build/form-file-upload/index.js +4 -5
  142. package/build/form-file-upload/index.js.map +1 -1
  143. package/build/form-toggle/index.js +4 -5
  144. package/build/form-toggle/index.js.map +1 -1
  145. package/build/form-token-field/index.js +4 -5
  146. package/build/form-token-field/index.js.map +1 -1
  147. package/build/form-token-field/token-input.js +4 -6
  148. package/build/form-token-field/token-input.js.map +1 -1
  149. package/build/gradient-picker/index.js +14 -12
  150. package/build/gradient-picker/index.js.map +1 -1
  151. package/build/grid/component.js +2 -4
  152. package/build/grid/component.js.map +1 -1
  153. package/build/guide/page.js +2 -1
  154. package/build/guide/page.js.map +1 -1
  155. package/build/h-stack/component.js +2 -6
  156. package/build/h-stack/component.js.map +1 -1
  157. package/build/h-stack/hook.js +4 -7
  158. package/build/h-stack/hook.js.map +1 -1
  159. package/build/heading/component.js +2 -6
  160. package/build/heading/component.js.map +1 -1
  161. package/build/higher-order/navigate-regions/index.js +3 -1
  162. package/build/higher-order/navigate-regions/index.js.map +1 -1
  163. package/build/higher-order/with-constrained-tabbing/index.js +2 -1
  164. package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
  165. package/build/higher-order/with-fallback-styles/index.js +3 -3
  166. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  167. package/build/higher-order/with-filters/index.js +2 -1
  168. package/build/higher-order/with-filters/index.js.map +1 -1
  169. package/build/higher-order/with-focus-outside/index.js +5 -7
  170. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  171. package/build/higher-order/with-focus-outside/index.native.js +5 -7
  172. package/build/higher-order/with-focus-outside/index.native.js.map +1 -1
  173. package/build/higher-order/with-focus-return/index.js +2 -1
  174. package/build/higher-order/with-focus-return/index.js.map +1 -1
  175. package/build/higher-order/with-notices/index.js +3 -4
  176. package/build/higher-order/with-notices/index.js.map +1 -1
  177. package/build/higher-order/with-spoken-messages/index.js +2 -6
  178. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  179. package/build/icon/index.js +6 -6
  180. package/build/icon/index.js.map +1 -1
  181. package/build/input-control/index.js +5 -5
  182. package/build/input-control/index.js.map +1 -1
  183. package/build/input-control/input-base.js +3 -4
  184. package/build/input-control/input-base.js.map +1 -1
  185. package/build/input-control/input-field.js +3 -6
  186. package/build/input-control/input-field.js.map +1 -1
  187. package/build/input-control/input-prefix-wrapper.js +4 -8
  188. package/build/input-control/input-prefix-wrapper.js.map +1 -1
  189. package/build/input-control/input-suffix-wrapper.js +4 -8
  190. package/build/input-control/input-suffix-wrapper.js.map +1 -1
  191. package/build/input-control/label.js +4 -7
  192. package/build/input-control/label.js.map +1 -1
  193. package/build/input-control/styles/input-control-styles.js +2 -4
  194. package/build/input-control/styles/input-control-styles.js.map +1 -1
  195. package/build/isolated-event-container/index.js +2 -4
  196. package/build/isolated-event-container/index.js.map +1 -1
  197. package/build/item-group/item/component.js +2 -6
  198. package/build/item-group/item/component.js.map +1 -1
  199. package/build/item-group/item-group/component.js +2 -6
  200. package/build/item-group/item-group/component.js.map +1 -1
  201. package/build/item-group/styles.js +10 -10
  202. package/build/item-group/styles.js.map +1 -1
  203. package/build/menu-item/index.js +4 -5
  204. package/build/menu-item/index.js.map +1 -1
  205. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -6
  206. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  207. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +2 -1
  208. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  209. package/build/mobile/bottom-sheet/cell.native.js +5 -6
  210. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  211. package/build/mobile/bottom-sheet/color-cell.native.js +2 -4
  212. package/build/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  213. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js +4 -5
  214. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  215. package/build/mobile/bottom-sheet/footer-message-cell.native.js +2 -4
  216. package/build/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  217. package/build/mobile/bottom-sheet/index.native.js +8 -8
  218. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  219. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +4 -7
  220. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  221. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -4
  222. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  223. package/build/mobile/bottom-sheet/picker-cell.native.js +4 -5
  224. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  225. package/build/mobile/bottom-sheet/radio-cell.native.js +2 -4
  226. package/build/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  227. package/build/mobile/bottom-sheet/range-cell.native.js +2 -4
  228. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  229. package/build/mobile/bottom-sheet/ripple.native.js +4 -6
  230. package/build/mobile/bottom-sheet/ripple.native.js.map +1 -1
  231. package/build/mobile/bottom-sheet/switch-cell.native.js +2 -4
  232. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  233. package/build/mobile/color-settings/index.native.js +5 -5
  234. package/build/mobile/color-settings/index.native.js.map +1 -1
  235. package/build/mobile/cycle-select-control/index.native.js +4 -5
  236. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  237. package/build/mobile/focal-point-settings-panel/index.native.js +5 -5
  238. package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  239. package/build/mobile/global-styles-context/index.native.js +2 -6
  240. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  241. package/build/mobile/gradient/index.native.js +4 -5
  242. package/build/mobile/gradient/index.native.js.map +1 -1
  243. package/build/mobile/image/image-editing-button.native.js +4 -5
  244. package/build/mobile/image/image-editing-button.native.js.map +1 -1
  245. package/build/mobile/image/index.native.js +15 -15
  246. package/build/mobile/image/index.native.js.map +1 -1
  247. package/build/mobile/keyboard-avoiding-view/index.ios.js +2 -4
  248. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  249. package/build/mobile/keyboard-aware-flat-list/index.android.js +4 -5
  250. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  251. package/build/mobile/keyboard-aware-flat-list/index.ios.js +2 -1
  252. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  253. package/build/mobile/link-picker/link-picker-results.native.js +4 -6
  254. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  255. package/build/mobile/link-settings/link-settings-navigation.native.js +4 -5
  256. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  257. package/build/mobile/link-settings/link-settings-screen.native.js +2 -4
  258. package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  259. package/build/mobile/picker/index.ios.js +4 -6
  260. package/build/mobile/picker/index.ios.js.map +1 -1
  261. package/build/mobile/segmented-control/index.native.js +4 -5
  262. package/build/mobile/segmented-control/index.native.js.map +1 -1
  263. package/build/modal/index.js +4 -6
  264. package/build/modal/index.js.map +1 -1
  265. package/build/navigable-container/container.js +6 -9
  266. package/build/navigable-container/container.js.map +1 -1
  267. package/build/navigable-container/menu.js +4 -5
  268. package/build/navigable-container/menu.js.map +1 -1
  269. package/build/navigable-container/tabbable.js +4 -5
  270. package/build/navigable-container/tabbable.js.map +1 -1
  271. package/build/navigation/item/base.js +4 -5
  272. package/build/navigation/item/base.js.map +1 -1
  273. package/build/navigation/item/index.js +3 -4
  274. package/build/navigation/item/index.js.map +1 -1
  275. package/build/navigator/navigator-back-button/component.js +4 -7
  276. package/build/navigator/navigator-back-button/component.js.map +1 -1
  277. package/build/navigator/navigator-button/component.js +4 -7
  278. package/build/navigator/navigator-button/component.js.map +1 -1
  279. package/build/navigator/navigator-provider/component.js +4 -5
  280. package/build/navigator/navigator-provider/component.js.map +1 -1
  281. package/build/navigator/navigator-screen/component.js +9 -10
  282. package/build/navigator/navigator-screen/component.js.map +1 -1
  283. package/build/navigator/navigator-to-parent-button/component.js +4 -7
  284. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  285. package/build/notice/list.js +2 -4
  286. package/build/notice/list.js.map +1 -1
  287. package/build/notice/list.native.js +2 -4
  288. package/build/notice/list.native.js.map +1 -1
  289. package/build/number-control/index.js +4 -6
  290. package/build/number-control/index.js.map +1 -1
  291. package/build/palette-edit/index.js +11 -12
  292. package/build/palette-edit/index.js.map +1 -1
  293. package/build/panel/body.js +8 -8
  294. package/build/panel/body.js.map +1 -1
  295. package/build/placeholder/index.js +2 -4
  296. package/build/placeholder/index.js.map +1 -1
  297. package/build/popover/index.js +11 -12
  298. package/build/popover/index.js.map +1 -1
  299. package/build/popover/utils.js +15 -1
  300. package/build/popover/utils.js.map +1 -1
  301. package/build/query-controls/category-select.js +4 -6
  302. package/build/query-controls/category-select.js.map +1 -1
  303. package/build/radio-control/index.js +4 -5
  304. package/build/radio-control/index.js.map +1 -1
  305. package/build/radio-control/index.native.js +4 -5
  306. package/build/radio-control/index.native.js.map +1 -1
  307. package/build/radio-group/index.js +5 -5
  308. package/build/radio-group/index.js.map +1 -1
  309. package/build/radio-group/radio/index.js +5 -5
  310. package/build/radio-group/radio/index.js.map +1 -1
  311. package/build/range-control/index.js +2 -4
  312. package/build/range-control/index.js.map +1 -1
  313. package/build/range-control/index.native.js +4 -5
  314. package/build/range-control/index.native.js.map +1 -1
  315. package/build/range-control/input-range.js +2 -6
  316. package/build/range-control/input-range.js.map +1 -1
  317. package/build/range-control/mark.js +2 -4
  318. package/build/range-control/mark.js.map +1 -1
  319. package/build/range-control/rail.js +6 -7
  320. package/build/range-control/rail.js.map +1 -1
  321. package/build/range-control/tooltip.js +2 -4
  322. package/build/range-control/tooltip.js.map +1 -1
  323. package/build/resizable-box/index.js +5 -5
  324. package/build/resizable-box/index.js.map +1 -1
  325. package/build/resizable-box/resize-tooltip/index.js +4 -5
  326. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  327. package/build/resizable-box/resize-tooltip/label.js +4 -7
  328. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  329. package/build/scrollable/component.js +2 -6
  330. package/build/scrollable/component.js.map +1 -1
  331. package/build/search-control/index.js +2 -4
  332. package/build/search-control/index.js.map +1 -1
  333. package/build/select-control/index.js +2 -4
  334. package/build/select-control/index.js.map +1 -1
  335. package/build/select-control/index.native.js +4 -5
  336. package/build/select-control/index.native.js.map +1 -1
  337. package/build/slot-fill/bubbles-virtually/slot.js +4 -5
  338. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  339. package/build/slot-fill/index.js +17 -13
  340. package/build/slot-fill/index.js.map +1 -1
  341. package/build/slot-fill/index.native.js +10 -9
  342. package/build/slot-fill/index.native.js.map +1 -1
  343. package/build/slot-fill/slot.js +2 -4
  344. package/build/slot-fill/slot.js.map +1 -1
  345. package/build/snackbar/list.js +2 -4
  346. package/build/snackbar/list.js.map +1 -1
  347. package/build/spacer/component.js +2 -6
  348. package/build/spacer/component.js.map +1 -1
  349. package/build/spinner/index.js +4 -6
  350. package/build/spinner/index.js.map +1 -1
  351. package/build/surface/component.js +2 -6
  352. package/build/surface/component.js.map +1 -1
  353. package/build/tab-panel/index.js +4 -5
  354. package/build/tab-panel/index.js.map +1 -1
  355. package/build/text/component.js +4 -6
  356. package/build/text/component.js.map +1 -1
  357. package/build/text-control/index.js +4 -5
  358. package/build/text-control/index.js.map +1 -1
  359. package/build/text-control/index.native.js +4 -5
  360. package/build/text-control/index.native.js.map +1 -1
  361. package/build/textarea-control/index.js +4 -5
  362. package/build/textarea-control/index.js.map +1 -1
  363. package/build/theme/index.js +4 -7
  364. package/build/theme/index.js.map +1 -1
  365. package/build/toggle-control/index.native.js +4 -5
  366. package/build/toggle-control/index.native.js.map +1 -1
  367. package/build/toggle-group-control/toggle-group-control/as-button-group.js +4 -6
  368. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  369. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +4 -6
  370. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  371. package/build/toggle-group-control/toggle-group-control/component.js +2 -4
  372. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  373. package/build/toggle-group-control/toggle-group-control-option/component.js +2 -6
  374. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  375. package/build/toggle-group-control/toggle-group-control-option-base/component.js +6 -7
  376. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  377. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +2 -4
  378. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  379. package/build/toolbar/toolbar/index.js +9 -13
  380. package/build/toolbar/toolbar/index.js.map +1 -1
  381. package/build/toolbar/toolbar/toolbar-container.js +9 -13
  382. package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
  383. package/build/toolbar/toolbar-button/index.js +13 -11
  384. package/build/toolbar/toolbar-button/index.js.map +1 -1
  385. package/build/toolbar/toolbar-context/index.js.map +1 -1
  386. package/build/toolbar/toolbar-dropdown-menu/index.js +8 -10
  387. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  388. package/build/toolbar/toolbar-group/index.js +11 -10
  389. package/build/toolbar/toolbar-group/index.js.map +1 -1
  390. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -6
  391. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  392. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js +4 -5
  393. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  394. package/build/toolbar/toolbar-group/toolbar-group-container.js +4 -7
  395. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  396. package/build/toolbar/toolbar-item/index.js +13 -11
  397. package/build/toolbar/toolbar-item/index.js.map +1 -1
  398. package/build/toolbar/toolbar-item/types.js +6 -0
  399. package/build/toolbar/toolbar-item/types.js.map +1 -0
  400. package/build/tools-panel/tools-panel/component.js +2 -4
  401. package/build/tools-panel/tools-panel/component.js.map +1 -1
  402. package/build/tools-panel/tools-panel-header/component.js +2 -4
  403. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  404. package/build/tools-panel/tools-panel-item/component.js +4 -8
  405. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  406. package/build/tooltip/index.js +4 -5
  407. package/build/tooltip/index.js.map +1 -1
  408. package/build/tooltip/index.native.js +2 -1
  409. package/build/tooltip/index.native.js.map +1 -1
  410. package/build/tree-grid/cell.js +2 -4
  411. package/build/tree-grid/cell.js.map +1 -1
  412. package/build/tree-grid/index.js +2 -4
  413. package/build/tree-grid/index.js.map +1 -1
  414. package/build/tree-grid/item.js +4 -5
  415. package/build/tree-grid/item.js.map +1 -1
  416. package/build/tree-grid/roving-tab-index-item.js +2 -1
  417. package/build/tree-grid/roving-tab-index-item.js.map +1 -1
  418. package/build/tree-grid/row.js +2 -6
  419. package/build/tree-grid/row.js.map +1 -1
  420. package/build/tree-select/index.js +4 -7
  421. package/build/tree-select/index.js.map +1 -1
  422. package/build/truncate/component.js +4 -6
  423. package/build/truncate/component.js.map +1 -1
  424. package/build/ui/control-group/component.js +8 -12
  425. package/build/ui/control-group/component.js.map +1 -1
  426. package/build/ui/control-label/component.js +4 -8
  427. package/build/ui/control-label/component.js.map +1 -1
  428. package/build/ui/form-group/form-group-content.js +4 -5
  429. package/build/ui/form-group/form-group-content.js.map +1 -1
  430. package/build/ui/form-group/form-group-label.js +2 -1
  431. package/build/ui/form-group/form-group-label.js.map +1 -1
  432. package/build/ui/form-group/form-group.js +8 -8
  433. package/build/ui/form-group/form-group.js.map +1 -1
  434. package/build/ui/shortcut/component.js +4 -7
  435. package/build/ui/shortcut/component.js.map +1 -1
  436. package/build/ui/spinner/component.js +2 -6
  437. package/build/ui/spinner/component.js.map +1 -1
  438. package/build/ui/tooltip/component.js +3 -4
  439. package/build/ui/tooltip/component.js.map +1 -1
  440. package/build/ui/tooltip/content.js +5 -8
  441. package/build/ui/tooltip/content.js.map +1 -1
  442. package/build/unit-control/index.js +31 -94
  443. package/build/unit-control/index.js.map +1 -1
  444. package/build/unit-control/index.native.js +7 -7
  445. package/build/unit-control/index.native.js.map +1 -1
  446. package/build/unit-control/unit-select-control.js +15 -7
  447. package/build/unit-control/unit-select-control.js.map +1 -1
  448. package/build/v-stack/component.js +2 -6
  449. package/build/v-stack/component.js.map +1 -1
  450. package/build/visually-hidden/component.js +4 -8
  451. package/build/visually-hidden/component.js.map +1 -1
  452. package/build/z-stack/component.js +2 -6
  453. package/build/z-stack/component.js.map +1 -1
  454. package/build-module/alignment-matrix-control/cell.js +4 -4
  455. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  456. package/build-module/alignment-matrix-control/icon.js +2 -3
  457. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  458. package/build-module/alignment-matrix-control/index.js +6 -6
  459. package/build-module/alignment-matrix-control/index.js.map +1 -1
  460. package/build-module/angle-picker-control/angle-circle.js +4 -4
  461. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  462. package/build-module/angle-picker-control/index.js +2 -3
  463. package/build-module/angle-picker-control/index.js.map +1 -1
  464. package/build-module/autocomplete/autocompleter-ui.js +27 -2
  465. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  466. package/build-module/autocomplete/index.js +1 -19
  467. package/build-module/autocomplete/index.js.map +1 -1
  468. package/build-module/base-control/index.js +2 -3
  469. package/build-module/base-control/index.js.map +1 -1
  470. package/build-module/border-box-control/border-box-control/component.js +4 -5
  471. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  472. package/build-module/border-box-control/border-box-control-linked-button/component.js +2 -3
  473. package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  474. package/build-module/border-box-control/border-box-control-split-controls/component.js +15 -12
  475. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  476. package/build-module/border-box-control/border-box-control-visualizer/component.js +2 -3
  477. package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  478. package/build-module/border-control/border-control/component.js +4 -5
  479. package/build-module/border-control/border-control/component.js.map +1 -1
  480. package/build-module/border-control/border-control-dropdown/component.js +4 -5
  481. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  482. package/build-module/border-control/border-control-style-picker/component.js +2 -3
  483. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  484. package/build-module/box-control/all-input-control.js +2 -3
  485. package/build-module/box-control/all-input-control.js.map +1 -1
  486. package/build-module/box-control/axial-input-controls.js +2 -3
  487. package/build-module/box-control/axial-input-controls.js.map +1 -1
  488. package/build-module/box-control/icon.js +4 -4
  489. package/build-module/box-control/icon.js.map +1 -1
  490. package/build-module/box-control/index.js +7 -5
  491. package/build-module/box-control/index.js.map +1 -1
  492. package/build-module/box-control/input-controls.js +2 -3
  493. package/build-module/box-control/input-controls.js.map +1 -1
  494. package/build-module/box-control/linked-button.js +2 -3
  495. package/build-module/box-control/linked-button.js.map +1 -1
  496. package/build-module/box-control/unit-control.js +6 -5
  497. package/build-module/box-control/unit-control.js.map +1 -1
  498. package/build-module/button/deprecated.js +2 -3
  499. package/build-module/button/deprecated.js.map +1 -1
  500. package/build-module/button/index.js +7 -2
  501. package/build-module/button/index.js.map +1 -1
  502. package/build-module/button-group/index.js +4 -4
  503. package/build-module/button-group/index.js.map +1 -1
  504. package/build-module/card/card/component.js +2 -3
  505. package/build-module/card/card/component.js.map +1 -1
  506. package/build-module/card/card-body/component.js +4 -5
  507. package/build-module/card/card-body/component.js.map +1 -1
  508. package/build-module/card/card-divider/component.js +2 -3
  509. package/build-module/card/card-divider/component.js.map +1 -1
  510. package/build-module/card/card-footer/component.js +2 -3
  511. package/build-module/card/card-footer/component.js.map +1 -1
  512. package/build-module/card/card-header/component.js +2 -3
  513. package/build-module/card/card-header/component.js.map +1 -1
  514. package/build-module/card/card-media/component.js +2 -3
  515. package/build-module/card/card-media/component.js.map +1 -1
  516. package/build-module/checkbox-control/index.js +4 -4
  517. package/build-module/checkbox-control/index.js.map +1 -1
  518. package/build-module/circular-option-picker/index.js +19 -15
  519. package/build-module/circular-option-picker/index.js.map +1 -1
  520. package/build-module/clipboard-button/index.js +9 -20
  521. package/build-module/clipboard-button/index.js.map +1 -1
  522. package/build-module/clipboard-button/types.js +2 -0
  523. package/build-module/clipboard-button/types.js.map +1 -0
  524. package/build-module/color-control/index.native.js +4 -4
  525. package/build-module/color-control/index.native.js.map +1 -1
  526. package/build-module/color-indicator/index.js +4 -4
  527. package/build-module/color-indicator/index.js.map +1 -1
  528. package/build-module/color-palette/index.js +11 -10
  529. package/build-module/color-palette/index.js.map +1 -1
  530. package/build-module/color-picker/color-input.js +6 -3
  531. package/build-module/color-picker/color-input.js.map +1 -1
  532. package/build-module/color-picker/component.js +4 -4
  533. package/build-module/color-picker/component.js.map +1 -1
  534. package/build-module/color-picker/legacy-adapter.js +2 -1
  535. package/build-module/color-picker/legacy-adapter.js.map +1 -1
  536. package/build-module/confirm-dialog/component.js +4 -4
  537. package/build-module/confirm-dialog/component.js.map +1 -1
  538. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +8 -7
  539. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  540. package/build-module/custom-select-control/index.js +34 -31
  541. package/build-module/custom-select-control/index.js.map +1 -1
  542. package/build-module/dashicon/index.js +4 -4
  543. package/build-module/dashicon/index.js.map +1 -1
  544. package/build-module/dashicon/index.native.js +4 -4
  545. package/build-module/dashicon/index.native.js.map +1 -1
  546. package/build-module/disabled/index.js +4 -4
  547. package/build-module/disabled/index.js.map +1 -1
  548. package/build-module/divider/component.js +4 -5
  549. package/build-module/divider/component.js.map +1 -1
  550. package/build-module/drop-zone/index.js +2 -3
  551. package/build-module/drop-zone/index.js.map +1 -1
  552. package/build-module/dropdown/dropdown-content-wrapper.js +2 -3
  553. package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -1
  554. package/build-module/dropdown/index.js +29 -24
  555. package/build-module/dropdown/index.js.map +1 -1
  556. package/build-module/dropdown-menu/index.js +95 -91
  557. package/build-module/dropdown-menu/index.js.map +1 -1
  558. package/build-module/dropdown-menu/index.native.js +2 -3
  559. package/build-module/dropdown-menu/index.native.js.map +1 -1
  560. package/build-module/dropdown-menu-v2/index.js +14 -11
  561. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  562. package/build-module/dropdown-menu-v2/styles.js +16 -16
  563. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  564. package/build-module/elevation/component.js +2 -3
  565. package/build-module/elevation/component.js.map +1 -1
  566. package/build-module/external-link/index.js +2 -3
  567. package/build-module/external-link/index.js.map +1 -1
  568. package/build-module/flex/flex/component.js +2 -3
  569. package/build-module/flex/flex/component.js.map +1 -1
  570. package/build-module/flex/flex-block/component.js +2 -3
  571. package/build-module/flex/flex-block/component.js.map +1 -1
  572. package/build-module/flex/flex-item/component.js +2 -3
  573. package/build-module/flex/flex-item/component.js.map +1 -1
  574. package/build-module/focal-point-picker/controls.js +4 -4
  575. package/build-module/focal-point-picker/controls.js.map +1 -1
  576. package/build-module/focal-point-picker/focal-point.js +2 -3
  577. package/build-module/focal-point-picker/focal-point.js.map +1 -1
  578. package/build-module/focal-point-picker/grid.js +2 -3
  579. package/build-module/focal-point-picker/grid.js.map +1 -1
  580. package/build-module/focal-point-picker/index.js +4 -5
  581. package/build-module/focal-point-picker/index.js.map +1 -1
  582. package/build-module/focal-point-picker/index.native.js +2 -3
  583. package/build-module/focal-point-picker/index.native.js.map +1 -1
  584. package/build-module/focal-point-picker/media.js +7 -7
  585. package/build-module/focal-point-picker/media.js.map +1 -1
  586. package/build-module/focal-point-picker/tooltip/index.native.js +2 -3
  587. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  588. package/build-module/focusable-iframe/index.js +4 -4
  589. package/build-module/focusable-iframe/index.js.map +1 -1
  590. package/build-module/footer-message-control/index.native.js +2 -1
  591. package/build-module/footer-message-control/index.native.js.map +1 -1
  592. package/build-module/form-file-upload/index.js +4 -4
  593. package/build-module/form-file-upload/index.js.map +1 -1
  594. package/build-module/form-toggle/index.js +4 -4
  595. package/build-module/form-toggle/index.js.map +1 -1
  596. package/build-module/form-token-field/index.js +4 -4
  597. package/build-module/form-token-field/index.js.map +1 -1
  598. package/build-module/form-token-field/token-input.js +4 -5
  599. package/build-module/form-token-field/token-input.js.map +1 -1
  600. package/build-module/gradient-picker/index.js +14 -11
  601. package/build-module/gradient-picker/index.js.map +1 -1
  602. package/build-module/grid/component.js +2 -3
  603. package/build-module/grid/component.js.map +1 -1
  604. package/build-module/guide/page.js +2 -1
  605. package/build-module/guide/page.js.map +1 -1
  606. package/build-module/h-stack/component.js +2 -3
  607. package/build-module/h-stack/component.js.map +1 -1
  608. package/build-module/h-stack/hook.js +4 -4
  609. package/build-module/h-stack/hook.js.map +1 -1
  610. package/build-module/heading/component.js +2 -3
  611. package/build-module/heading/component.js.map +1 -1
  612. package/build-module/higher-order/navigate-regions/index.js +3 -1
  613. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  614. package/build-module/higher-order/with-constrained-tabbing/index.js +2 -1
  615. package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
  616. package/build-module/higher-order/with-fallback-styles/index.js +3 -2
  617. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  618. package/build-module/higher-order/with-filters/index.js +2 -1
  619. package/build-module/higher-order/with-filters/index.js.map +1 -1
  620. package/build-module/higher-order/with-focus-outside/index.js +5 -4
  621. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  622. package/build-module/higher-order/with-focus-outside/index.native.js +5 -4
  623. package/build-module/higher-order/with-focus-outside/index.native.js.map +1 -1
  624. package/build-module/higher-order/with-focus-return/index.js +2 -1
  625. package/build-module/higher-order/with-focus-return/index.js.map +1 -1
  626. package/build-module/higher-order/with-notices/index.js +3 -3
  627. package/build-module/higher-order/with-notices/index.js.map +1 -1
  628. package/build-module/higher-order/with-spoken-messages/index.js +2 -3
  629. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  630. package/build-module/icon/index.js +6 -6
  631. package/build-module/icon/index.js.map +1 -1
  632. package/build-module/input-control/index.js +5 -4
  633. package/build-module/input-control/index.js.map +1 -1
  634. package/build-module/input-control/input-base.js +3 -3
  635. package/build-module/input-control/input-base.js.map +1 -1
  636. package/build-module/input-control/input-field.js +3 -3
  637. package/build-module/input-control/input-field.js.map +1 -1
  638. package/build-module/input-control/input-prefix-wrapper.js +4 -5
  639. package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
  640. package/build-module/input-control/input-suffix-wrapper.js +4 -5
  641. package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
  642. package/build-module/input-control/label.js +4 -4
  643. package/build-module/input-control/label.js.map +1 -1
  644. package/build-module/input-control/styles/input-control-styles.js +2 -3
  645. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  646. package/build-module/isolated-event-container/index.js +2 -3
  647. package/build-module/isolated-event-container/index.js.map +1 -1
  648. package/build-module/item-group/item/component.js +2 -3
  649. package/build-module/item-group/item/component.js.map +1 -1
  650. package/build-module/item-group/item-group/component.js +2 -3
  651. package/build-module/item-group/item-group/component.js.map +1 -1
  652. package/build-module/item-group/styles.js +10 -10
  653. package/build-module/item-group/styles.js.map +1 -1
  654. package/build-module/menu-item/index.js +4 -4
  655. package/build-module/menu-item/index.js.map +1 -1
  656. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -5
  657. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  658. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +2 -1
  659. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  660. package/build-module/mobile/bottom-sheet/cell.native.js +5 -5
  661. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  662. package/build-module/mobile/bottom-sheet/color-cell.native.js +2 -3
  663. package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  664. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js +4 -4
  665. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  666. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js +2 -3
  667. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  668. package/build-module/mobile/bottom-sheet/index.native.js +8 -7
  669. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  670. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +4 -4
  671. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  672. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -3
  673. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  674. package/build-module/mobile/bottom-sheet/picker-cell.native.js +4 -4
  675. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  676. package/build-module/mobile/bottom-sheet/radio-cell.native.js +2 -3
  677. package/build-module/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  678. package/build-module/mobile/bottom-sheet/range-cell.native.js +2 -3
  679. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  680. package/build-module/mobile/bottom-sheet/ripple.native.js +4 -5
  681. package/build-module/mobile/bottom-sheet/ripple.native.js.map +1 -1
  682. package/build-module/mobile/bottom-sheet/switch-cell.native.js +2 -3
  683. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  684. package/build-module/mobile/color-settings/index.native.js +5 -4
  685. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  686. package/build-module/mobile/cycle-select-control/index.native.js +4 -4
  687. package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
  688. package/build-module/mobile/focal-point-settings-panel/index.native.js +5 -4
  689. package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  690. package/build-module/mobile/global-styles-context/index.native.js +2 -3
  691. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  692. package/build-module/mobile/gradient/index.native.js +4 -4
  693. package/build-module/mobile/gradient/index.native.js.map +1 -1
  694. package/build-module/mobile/image/image-editing-button.native.js +4 -4
  695. package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
  696. package/build-module/mobile/image/index.native.js +15 -14
  697. package/build-module/mobile/image/index.native.js.map +1 -1
  698. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +2 -3
  699. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  700. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +4 -4
  701. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  702. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -1
  703. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  704. package/build-module/mobile/link-picker/link-picker-results.native.js +4 -5
  705. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  706. package/build-module/mobile/link-settings/link-settings-navigation.native.js +4 -4
  707. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  708. package/build-module/mobile/link-settings/link-settings-screen.native.js +2 -3
  709. package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  710. package/build-module/mobile/picker/index.ios.js +4 -5
  711. package/build-module/mobile/picker/index.ios.js.map +1 -1
  712. package/build-module/mobile/segmented-control/index.native.js +4 -4
  713. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  714. package/build-module/modal/index.js +4 -5
  715. package/build-module/modal/index.js.map +1 -1
  716. package/build-module/navigable-container/container.js +6 -6
  717. package/build-module/navigable-container/container.js.map +1 -1
  718. package/build-module/navigable-container/menu.js +4 -4
  719. package/build-module/navigable-container/menu.js.map +1 -1
  720. package/build-module/navigable-container/tabbable.js +4 -4
  721. package/build-module/navigable-container/tabbable.js.map +1 -1
  722. package/build-module/navigation/item/base.js +4 -4
  723. package/build-module/navigation/item/base.js.map +1 -1
  724. package/build-module/navigation/item/index.js +3 -3
  725. package/build-module/navigation/item/index.js.map +1 -1
  726. package/build-module/navigator/navigator-back-button/component.js +4 -4
  727. package/build-module/navigator/navigator-back-button/component.js.map +1 -1
  728. package/build-module/navigator/navigator-button/component.js +4 -4
  729. package/build-module/navigator/navigator-button/component.js.map +1 -1
  730. package/build-module/navigator/navigator-provider/component.js +4 -4
  731. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  732. package/build-module/navigator/navigator-screen/component.js +9 -7
  733. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  734. package/build-module/navigator/navigator-to-parent-button/component.js +4 -4
  735. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  736. package/build-module/notice/list.js +2 -3
  737. package/build-module/notice/list.js.map +1 -1
  738. package/build-module/notice/list.native.js +2 -3
  739. package/build-module/notice/list.native.js.map +1 -1
  740. package/build-module/number-control/index.js +4 -5
  741. package/build-module/number-control/index.js.map +1 -1
  742. package/build-module/palette-edit/index.js +11 -11
  743. package/build-module/palette-edit/index.js.map +1 -1
  744. package/build-module/panel/body.js +8 -7
  745. package/build-module/panel/body.js.map +1 -1
  746. package/build-module/placeholder/index.js +2 -3
  747. package/build-module/placeholder/index.js.map +1 -1
  748. package/build-module/popover/index.js +12 -12
  749. package/build-module/popover/index.js.map +1 -1
  750. package/build-module/popover/utils.js +11 -0
  751. package/build-module/popover/utils.js.map +1 -1
  752. package/build-module/query-controls/category-select.js +4 -5
  753. package/build-module/query-controls/category-select.js.map +1 -1
  754. package/build-module/radio-control/index.js +4 -4
  755. package/build-module/radio-control/index.js.map +1 -1
  756. package/build-module/radio-control/index.native.js +4 -4
  757. package/build-module/radio-control/index.native.js.map +1 -1
  758. package/build-module/radio-group/index.js +5 -4
  759. package/build-module/radio-group/index.js.map +1 -1
  760. package/build-module/radio-group/radio/index.js +5 -4
  761. package/build-module/radio-group/radio/index.js.map +1 -1
  762. package/build-module/range-control/index.js +2 -3
  763. package/build-module/range-control/index.js.map +1 -1
  764. package/build-module/range-control/index.native.js +4 -4
  765. package/build-module/range-control/index.native.js.map +1 -1
  766. package/build-module/range-control/input-range.js +2 -3
  767. package/build-module/range-control/input-range.js.map +1 -1
  768. package/build-module/range-control/mark.js +2 -3
  769. package/build-module/range-control/mark.js.map +1 -1
  770. package/build-module/range-control/rail.js +6 -6
  771. package/build-module/range-control/rail.js.map +1 -1
  772. package/build-module/range-control/tooltip.js +2 -3
  773. package/build-module/range-control/tooltip.js.map +1 -1
  774. package/build-module/resizable-box/index.js +5 -4
  775. package/build-module/resizable-box/index.js.map +1 -1
  776. package/build-module/resizable-box/resize-tooltip/index.js +4 -4
  777. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  778. package/build-module/resizable-box/resize-tooltip/label.js +4 -4
  779. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  780. package/build-module/scrollable/component.js +2 -3
  781. package/build-module/scrollable/component.js.map +1 -1
  782. package/build-module/search-control/index.js +2 -3
  783. package/build-module/search-control/index.js.map +1 -1
  784. package/build-module/select-control/index.js +2 -3
  785. package/build-module/select-control/index.js.map +1 -1
  786. package/build-module/select-control/index.native.js +4 -4
  787. package/build-module/select-control/index.native.js.map +1 -1
  788. package/build-module/slot-fill/bubbles-virtually/slot.js +4 -4
  789. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  790. package/build-module/slot-fill/index.js +17 -12
  791. package/build-module/slot-fill/index.js.map +1 -1
  792. package/build-module/slot-fill/index.native.js +10 -8
  793. package/build-module/slot-fill/index.native.js.map +1 -1
  794. package/build-module/slot-fill/slot.js +2 -3
  795. package/build-module/slot-fill/slot.js.map +1 -1
  796. package/build-module/snackbar/list.js +2 -3
  797. package/build-module/snackbar/list.js.map +1 -1
  798. package/build-module/spacer/component.js +2 -3
  799. package/build-module/spacer/component.js.map +1 -1
  800. package/build-module/spinner/index.js +4 -5
  801. package/build-module/spinner/index.js.map +1 -1
  802. package/build-module/surface/component.js +2 -3
  803. package/build-module/surface/component.js.map +1 -1
  804. package/build-module/tab-panel/index.js +4 -4
  805. package/build-module/tab-panel/index.js.map +1 -1
  806. package/build-module/text/component.js +4 -5
  807. package/build-module/text/component.js.map +1 -1
  808. package/build-module/text-control/index.js +4 -4
  809. package/build-module/text-control/index.js.map +1 -1
  810. package/build-module/text-control/index.native.js +4 -4
  811. package/build-module/text-control/index.native.js.map +1 -1
  812. package/build-module/textarea-control/index.js +4 -4
  813. package/build-module/textarea-control/index.js.map +1 -1
  814. package/build-module/theme/index.js +4 -4
  815. package/build-module/theme/index.js.map +1 -1
  816. package/build-module/toggle-control/index.native.js +4 -4
  817. package/build-module/toggle-control/index.native.js.map +1 -1
  818. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +4 -5
  819. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  820. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +4 -5
  821. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  822. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -3
  823. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  824. package/build-module/toggle-group-control/toggle-group-control-option/component.js +2 -3
  825. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  826. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +6 -6
  827. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  828. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +2 -3
  829. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  830. package/build-module/toolbar/toolbar/index.js +10 -13
  831. package/build-module/toolbar/toolbar/index.js.map +1 -1
  832. package/build-module/toolbar/toolbar/toolbar-container.js +9 -12
  833. package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
  834. package/build-module/toolbar/toolbar-button/index.js +13 -10
  835. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  836. package/build-module/toolbar/toolbar-context/index.js.map +1 -1
  837. package/build-module/toolbar/toolbar-dropdown-menu/index.js +8 -9
  838. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  839. package/build-module/toolbar/toolbar-group/index.js +11 -9
  840. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  841. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -5
  842. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  843. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js +4 -4
  844. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  845. package/build-module/toolbar/toolbar-group/toolbar-group-container.js +4 -4
  846. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  847. package/build-module/toolbar/toolbar-item/index.js +13 -10
  848. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  849. package/build-module/toolbar/toolbar-item/types.js +2 -0
  850. package/build-module/toolbar/toolbar-item/types.js.map +1 -0
  851. package/build-module/tools-panel/tools-panel/component.js +2 -3
  852. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  853. package/build-module/tools-panel/tools-panel-header/component.js +2 -3
  854. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  855. package/build-module/tools-panel/tools-panel-item/component.js +4 -5
  856. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  857. package/build-module/tooltip/index.js +4 -4
  858. package/build-module/tooltip/index.js.map +1 -1
  859. package/build-module/tooltip/index.native.js +2 -1
  860. package/build-module/tooltip/index.native.js.map +1 -1
  861. package/build-module/tree-grid/cell.js +2 -3
  862. package/build-module/tree-grid/cell.js.map +1 -1
  863. package/build-module/tree-grid/index.js +2 -3
  864. package/build-module/tree-grid/index.js.map +1 -1
  865. package/build-module/tree-grid/item.js +4 -4
  866. package/build-module/tree-grid/item.js.map +1 -1
  867. package/build-module/tree-grid/roving-tab-index-item.js +2 -1
  868. package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
  869. package/build-module/tree-grid/row.js +2 -3
  870. package/build-module/tree-grid/row.js.map +1 -1
  871. package/build-module/tree-select/index.js +4 -4
  872. package/build-module/tree-select/index.js.map +1 -1
  873. package/build-module/truncate/component.js +4 -5
  874. package/build-module/truncate/component.js.map +1 -1
  875. package/build-module/ui/control-group/component.js +8 -9
  876. package/build-module/ui/control-group/component.js.map +1 -1
  877. package/build-module/ui/control-label/component.js +4 -5
  878. package/build-module/ui/control-label/component.js.map +1 -1
  879. package/build-module/ui/form-group/form-group-content.js +4 -4
  880. package/build-module/ui/form-group/form-group-content.js.map +1 -1
  881. package/build-module/ui/form-group/form-group-label.js +2 -1
  882. package/build-module/ui/form-group/form-group-label.js.map +1 -1
  883. package/build-module/ui/form-group/form-group.js +8 -7
  884. package/build-module/ui/form-group/form-group.js.map +1 -1
  885. package/build-module/ui/shortcut/component.js +4 -4
  886. package/build-module/ui/shortcut/component.js.map +1 -1
  887. package/build-module/ui/spinner/component.js +2 -3
  888. package/build-module/ui/spinner/component.js.map +1 -1
  889. package/build-module/ui/tooltip/component.js +3 -3
  890. package/build-module/ui/tooltip/component.js.map +1 -1
  891. package/build-module/ui/tooltip/content.js +5 -5
  892. package/build-module/ui/tooltip/content.js.map +1 -1
  893. package/build-module/unit-control/index.js +31 -88
  894. package/build-module/unit-control/index.js.map +1 -1
  895. package/build-module/unit-control/index.native.js +7 -6
  896. package/build-module/unit-control/index.native.js.map +1 -1
  897. package/build-module/unit-control/unit-select-control.js +19 -6
  898. package/build-module/unit-control/unit-select-control.js.map +1 -1
  899. package/build-module/v-stack/component.js +2 -3
  900. package/build-module/v-stack/component.js.map +1 -1
  901. package/build-module/visually-hidden/component.js +4 -5
  902. package/build-module/visually-hidden/component.js.map +1 -1
  903. package/build-module/z-stack/component.js +2 -3
  904. package/build-module/z-stack/component.js.map +1 -1
  905. package/build-style/style-rtl.css +8 -14
  906. package/build-style/style.css +8 -14
  907. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  908. package/build-types/autocomplete/index.d.ts.map +1 -1
  909. package/build-types/button/stories/e2e/index.d.ts +1 -0
  910. package/build-types/button/stories/e2e/index.d.ts.map +1 -1
  911. package/build-types/circular-option-picker/types.d.ts +2 -2
  912. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  913. package/build-types/clipboard-button/index.d.ts +4 -15
  914. package/build-types/clipboard-button/index.d.ts.map +1 -1
  915. package/build-types/clipboard-button/types.d.ts +11 -0
  916. package/build-types/clipboard-button/types.d.ts.map +1 -0
  917. package/build-types/dropdown/index.d.ts +1 -1
  918. package/build-types/dropdown/index.d.ts.map +1 -1
  919. package/build-types/dropdown/types.d.ts +7 -0
  920. package/build-types/dropdown/types.d.ts.map +1 -1
  921. package/build-types/dropdown-menu/index.d.ts +1 -1
  922. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  923. package/build-types/dropdown-menu/stories/index.d.ts +4 -3
  924. package/build-types/dropdown-menu/stories/index.d.ts.map +1 -1
  925. package/build-types/dropdown-menu/types.d.ts +7 -0
  926. package/build-types/dropdown-menu/types.d.ts.map +1 -1
  927. package/build-types/dropdown-menu-v2/styles.d.ts +4 -4
  928. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  929. package/build-types/dropdown-menu-v2/types.d.ts +2 -2
  930. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  931. package/build-types/item-group/styles.d.ts.map +1 -1
  932. package/build-types/popover/index.d.ts.map +1 -1
  933. package/build-types/popover/stories/index.d.ts +0 -1
  934. package/build-types/popover/stories/index.d.ts.map +1 -1
  935. package/build-types/popover/utils.d.ts +10 -0
  936. package/build-types/popover/utils.d.ts.map +1 -1
  937. package/build-types/toolbar/stories/index.d.ts.map +1 -1
  938. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  939. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  940. package/build-types/toolbar/toolbar-context/index.d.ts +2 -2
  941. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
  942. package/build-types/toolbar/toolbar-item/index.d.ts +4 -6
  943. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  944. package/build-types/toolbar/toolbar-item/types.d.ts +17 -0
  945. package/build-types/toolbar/toolbar-item/types.d.ts.map +1 -0
  946. package/build-types/unit-control/index.d.ts +3 -6
  947. package/build-types/unit-control/index.d.ts.map +1 -1
  948. package/build-types/unit-control/stories/index.d.ts.map +1 -1
  949. package/build-types/unit-control/unit-select-control.d.ts +7 -6
  950. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  951. package/package.json +20 -19
  952. package/src/autocomplete/autocompleter-ui.tsx +44 -2
  953. package/src/autocomplete/index.tsx +2 -32
  954. package/src/box-control/test/index.tsx +28 -60
  955. package/src/button/stories/e2e/index.tsx +22 -0
  956. package/src/button/style.scss +5 -13
  957. package/src/circular-option-picker/types.ts +2 -5
  958. package/src/clipboard-button/{index.js → index.tsx} +11 -17
  959. package/src/clipboard-button/types.ts +11 -0
  960. package/src/dropdown/index.tsx +20 -10
  961. package/src/dropdown/types.ts +8 -0
  962. package/src/dropdown-menu/index.tsx +101 -85
  963. package/src/dropdown-menu/stories/index.tsx +1 -1
  964. package/src/dropdown-menu/types.ts +8 -0
  965. package/src/dropdown-menu-v2/index.tsx +2 -2
  966. package/src/dropdown-menu-v2/styles.ts +7 -5
  967. package/src/dropdown-menu-v2/types.ts +2 -2
  968. package/src/item-group/styles.ts +12 -4
  969. package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +16 -29
  970. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  971. package/src/mobile/html-text-input/test/__snapshots__/index.native.js.snap +46 -0
  972. package/src/mobile/html-text-input/test/index.native.js +2 -2
  973. package/src/mobile/image/index.native.js +1 -1
  974. package/src/mobile/link-settings/test/link-settings-navigation.native.js +5 -16
  975. package/src/modal/style.scss +2 -2
  976. package/src/popover/index.tsx +3 -2
  977. package/src/popover/stories/index.tsx +0 -13
  978. package/src/popover/test/index.tsx +22 -1
  979. package/src/popover/utils.ts +12 -0
  980. package/src/search-control/README.md +7 -1
  981. package/src/toolbar/stories/index.tsx +0 -3
  982. package/src/toolbar/toolbar/index.tsx +3 -6
  983. package/src/toolbar/toolbar/toolbar-container.tsx +5 -9
  984. package/src/toolbar/toolbar-context/index.ts +2 -4
  985. package/src/toolbar/toolbar-dropdown-menu/index.js +0 -1
  986. package/src/toolbar/toolbar-item/index.tsx +13 -15
  987. package/src/toolbar/toolbar-item/types.ts +27 -0
  988. package/src/tooltip/test/index.native.js +1 -3
  989. package/src/unit-control/index.tsx +29 -95
  990. package/src/unit-control/stories/index.tsx +0 -4
  991. package/src/unit-control/test/index.tsx +151 -223
  992. package/src/unit-control/unit-select-control.tsx +20 -10
  993. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/placeholder/index.tsx"],"names":["classnames","useResizeObserver","SVG","Path","Icon","PlaceholderIllustration","Placeholder","props","icon","children","label","instructions","className","notices","preview","isColumnLayout","withIllustration","additionalProps","resizeListener","width","modifierClassNames","classes","fieldsetClasses"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,iBAAT,QAAkC,oBAAlC;AACA,SAASC,GAAT,EAAcC,IAAd,QAA0B,uBAA1B;AAEA;AACA;AACA;;AACA,OAAOC,IAAP,MAAiB,SAAjB;AAIA,MAAMC,uBAAuB,GAC5B,cAAC,GAAD;AACC,EAAA,SAAS,EAAC,sCADX;AAEC,EAAA,IAAI,EAAC,MAFN;AAGC,EAAA,KAAK,EAAC,4BAHP;AAIC,EAAA,OAAO,EAAC,WAJT;AAKC,EAAA,mBAAmB,EAAC;AALrB,GAOC,cAAC,IAAD;AAAM,EAAA,YAAY,EAAC,oBAAnB;AAAwC,EAAA,CAAC,EAAC;AAA1C,EAPD,CADD;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,WAAT,CACNC,KADM,EAEL;AACD,QAAM;AACLC,IAAAA,IADK;AAELC,IAAAA,QAFK;AAGLC,IAAAA,KAHK;AAILC,IAAAA,YAJK;AAKLC,IAAAA,SALK;AAMLC,IAAAA,OANK;AAOLC,IAAAA,OAPK;AAQLC,IAAAA,cARK;AASLC,IAAAA,gBATK;AAUL,OAAGC;AAVE,MAWFV,KAXJ;AAYA,QAAM,CAAEW,cAAF,EAAkB;AAAEC,IAAAA;AAAF,GAAlB,IAAgClB,iBAAiB,EAAvD,CAbC,CAeD;AACA;;AACA,MAAImB,kBAAJ;;AACA,MAAK,OAAOD,KAAP,KAAiB,QAAtB,EAAiC;AAChCC,IAAAA,kBAAkB,GAAG;AACpB,kBAAYD,KAAK,IAAI,GADD;AAEpB,mBAAaA,KAAK,IAAI,GAAT,IAAgBA,KAAK,GAAG,GAFjB;AAGpB,kBAAYA,KAAK,GAAG;AAHA,KAArB;AAKA;;AAED,QAAME,OAAO,GAAGrB,UAAU,CACzB,wBADyB,EAEzBY,SAFyB,EAGzBQ,kBAHyB,EAIzBJ,gBAAgB,GAAG,kBAAH,GAAwB,IAJf,CAA1B;AAMA,QAAMM,eAAe,GAAGtB,UAAU,CAAE,kCAAF,EAAsC;AACvE,wBAAoBe;AADmD,GAAtC,CAAlC;AAGA,SACC,kCAAUE,eAAV;AAA4B,IAAA,SAAS,EAAGI;AAAxC,MACGL,gBAAgB,GAAGX,uBAAH,GAA6B,IADhD,EAEGa,cAFH,EAGGL,OAHH,EAIGC,OAAO,IACR;AAAK,IAAA,SAAS,EAAC;AAAf,KACGA,OADH,CALF,EASC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,IAAD;AAAM,IAAA,IAAI,EAAGN;AAAb,IADD,EAEGE,KAFH,CATD,EAaC;AAAU,IAAA,SAAS,EAAGY;AAAtB,KACG,CAAC,CAAEX,YAAH,IACD;AAAQ,IAAA,SAAS,EAAC;AAAlB,KACGA,YADH,CAFF,EAMGF,QANH,CAbD,CADD;AAwBA;AAED,eAAeH,WAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useResizeObserver } from '@wordpress/compose';\nimport { SVG, Path } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Icon from '../icon';\nimport type { PlaceholderProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nconst PlaceholderIllustration = (\n\t<SVG\n\t\tclassName=\"components-placeholder__illustration\"\n\t\tfill=\"none\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 60 60\"\n\t\tpreserveAspectRatio=\"none\"\n\t>\n\t\t<Path vectorEffect=\"non-scaling-stroke\" d=\"M60 60 0 0\" />\n\t</SVG>\n);\n\n/**\n * Renders a placeholder. Normally used by blocks to render their empty state.\n *\n * ```jsx\n * import { Placeholder } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPlaceholder = () => <Placeholder icon={ more } label=\"Placeholder\" />;\n * ```\n */\nexport function Placeholder(\n\tprops: WordPressComponentProps< PlaceholderProps, 'div', false >\n) {\n\tconst {\n\t\ticon,\n\t\tchildren,\n\t\tlabel,\n\t\tinstructions,\n\t\tclassName,\n\t\tnotices,\n\t\tpreview,\n\t\tisColumnLayout,\n\t\twithIllustration,\n\t\t...additionalProps\n\t} = props;\n\tconst [ resizeListener, { width } ] = useResizeObserver();\n\n\t// Since `useResizeObserver` will report a width of `null` until after the\n\t// first render, avoid applying any modifier classes until width is known.\n\tlet modifierClassNames;\n\tif ( typeof width === 'number' ) {\n\t\tmodifierClassNames = {\n\t\t\t'is-large': width >= 480,\n\t\t\t'is-medium': width >= 160 && width < 480,\n\t\t\t'is-small': width < 160,\n\t\t};\n\t}\n\n\tconst classes = classnames(\n\t\t'components-placeholder',\n\t\tclassName,\n\t\tmodifierClassNames,\n\t\twithIllustration ? 'has-illustration' : null\n\t);\n\tconst fieldsetClasses = classnames( 'components-placeholder__fieldset', {\n\t\t'is-column-layout': isColumnLayout,\n\t} );\n\treturn (\n\t\t<div { ...additionalProps } className={ classes }>\n\t\t\t{ withIllustration ? PlaceholderIllustration : null }\n\t\t\t{ resizeListener }\n\t\t\t{ notices }\n\t\t\t{ preview && (\n\t\t\t\t<div className=\"components-placeholder__preview\">\n\t\t\t\t\t{ preview }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-placeholder__label\">\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t{ label }\n\t\t\t</div>\n\t\t\t<fieldset className={ fieldsetClasses }>\n\t\t\t\t{ !! instructions && (\n\t\t\t\t\t<legend className=\"components-placeholder__instructions\">\n\t\t\t\t\t\t{ instructions }\n\t\t\t\t\t</legend>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t</fieldset>\n\t\t</div>\n\t);\n}\n\nexport default Placeholder;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/placeholder/index.tsx"],"names":["classnames","useResizeObserver","SVG","Path","Icon","PlaceholderIllustration","Placeholder","props","icon","children","label","instructions","className","notices","preview","isColumnLayout","withIllustration","additionalProps","resizeListener","width","modifierClassNames","classes","fieldsetClasses"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,iBAAT,QAAkC,oBAAlC;AACA,SAASC,GAAT,EAAcC,IAAd,QAA0B,uBAA1B;AAEA;AACA;AACA;;AACA,OAAOC,IAAP,MAAiB,SAAjB;AAIA,MAAMC,uBAAuB,GAC5B,cAAC,GAAD;AACC,EAAA,SAAS,EAAC,sCADX;AAEC,EAAA,IAAI,EAAC,MAFN;AAGC,EAAA,KAAK,EAAC,4BAHP;AAIC,EAAA,OAAO,EAAC,WAJT;AAKC,EAAA,mBAAmB,EAAC;AALrB,GAOC,cAAC,IAAD;AAAM,EAAA,YAAY,EAAC,oBAAnB;AAAwC,EAAA,CAAC,EAAC;AAA1C,EAPD,CADD;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,WAAT,CACNC,KADM,EAEL;AACD,QAAM;AACLC,IAAAA,IADK;AAELC,IAAAA,QAFK;AAGLC,IAAAA,KAHK;AAILC,IAAAA,YAJK;AAKLC,IAAAA,SALK;AAMLC,IAAAA,OANK;AAOLC,IAAAA,OAPK;AAQLC,IAAAA,cARK;AASLC,IAAAA,gBATK;AAUL,OAAGC;AAVE,MAWFV,KAXJ;AAYA,QAAM,CAAEW,cAAF,EAAkB;AAAEC,IAAAA;AAAF,GAAlB,IAAgClB,iBAAiB,EAAvD,CAbC,CAeD;AACA;;AACA,MAAImB,kBAAJ;;AACA,MAAK,OAAOD,KAAP,KAAiB,QAAtB,EAAiC;AAChCC,IAAAA,kBAAkB,GAAG;AACpB,kBAAYD,KAAK,IAAI,GADD;AAEpB,mBAAaA,KAAK,IAAI,GAAT,IAAgBA,KAAK,GAAG,GAFjB;AAGpB,kBAAYA,KAAK,GAAG;AAHA,KAArB;AAKA;;AAED,QAAME,OAAO,GAAGrB,UAAU,CACzB,wBADyB,EAEzBY,SAFyB,EAGzBQ,kBAHyB,EAIzBJ,gBAAgB,GAAG,kBAAH,GAAwB,IAJf,CAA1B;AAMA,QAAMM,eAAe,GAAGtB,UAAU,CAAE,kCAAF,EAAsC;AACvE,wBAAoBe;AADmD,GAAtC,CAAlC;AAGA,SACC,0BAAUE,eAAV;AAA4B,IAAA,SAAS,EAAGI;AAAxC,KACGL,gBAAgB,GAAGX,uBAAH,GAA6B,IADhD,EAEGa,cAFH,EAGGL,OAHH,EAIGC,OAAO,IACR;AAAK,IAAA,SAAS,EAAC;AAAf,KACGA,OADH,CALF,EASC;AAAK,IAAA,SAAS,EAAC;AAAf,KACC,cAAC,IAAD;AAAM,IAAA,IAAI,EAAGN;AAAb,IADD,EAEGE,KAFH,CATD,EAaC;AAAU,IAAA,SAAS,EAAGY;AAAtB,KACG,CAAC,CAAEX,YAAH,IACD;AAAQ,IAAA,SAAS,EAAC;AAAlB,KACGA,YADH,CAFF,EAMGF,QANH,CAbD,CADD;AAwBA;AAED,eAAeH,WAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useResizeObserver } from '@wordpress/compose';\nimport { SVG, Path } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Icon from '../icon';\nimport type { PlaceholderProps } from './types';\nimport type { WordPressComponentProps } from '../ui/context';\n\nconst PlaceholderIllustration = (\n\t<SVG\n\t\tclassName=\"components-placeholder__illustration\"\n\t\tfill=\"none\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 60 60\"\n\t\tpreserveAspectRatio=\"none\"\n\t>\n\t\t<Path vectorEffect=\"non-scaling-stroke\" d=\"M60 60 0 0\" />\n\t</SVG>\n);\n\n/**\n * Renders a placeholder. Normally used by blocks to render their empty state.\n *\n * ```jsx\n * import { Placeholder } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPlaceholder = () => <Placeholder icon={ more } label=\"Placeholder\" />;\n * ```\n */\nexport function Placeholder(\n\tprops: WordPressComponentProps< PlaceholderProps, 'div', false >\n) {\n\tconst {\n\t\ticon,\n\t\tchildren,\n\t\tlabel,\n\t\tinstructions,\n\t\tclassName,\n\t\tnotices,\n\t\tpreview,\n\t\tisColumnLayout,\n\t\twithIllustration,\n\t\t...additionalProps\n\t} = props;\n\tconst [ resizeListener, { width } ] = useResizeObserver();\n\n\t// Since `useResizeObserver` will report a width of `null` until after the\n\t// first render, avoid applying any modifier classes until width is known.\n\tlet modifierClassNames;\n\tif ( typeof width === 'number' ) {\n\t\tmodifierClassNames = {\n\t\t\t'is-large': width >= 480,\n\t\t\t'is-medium': width >= 160 && width < 480,\n\t\t\t'is-small': width < 160,\n\t\t};\n\t}\n\n\tconst classes = classnames(\n\t\t'components-placeholder',\n\t\tclassName,\n\t\tmodifierClassNames,\n\t\twithIllustration ? 'has-illustration' : null\n\t);\n\tconst fieldsetClasses = classnames( 'components-placeholder__fieldset', {\n\t\t'is-column-layout': isColumnLayout,\n\t} );\n\treturn (\n\t\t<div { ...additionalProps } className={ classes }>\n\t\t\t{ withIllustration ? PlaceholderIllustration : null }\n\t\t\t{ resizeListener }\n\t\t\t{ notices }\n\t\t\t{ preview && (\n\t\t\t\t<div className=\"components-placeholder__preview\">\n\t\t\t\t\t{ preview }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-placeholder__label\">\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t{ label }\n\t\t\t</div>\n\t\t\t<fieldset className={ fieldsetClasses }>\n\t\t\t\t{ !! instructions && (\n\t\t\t\t\t<legend className=\"components-placeholder__instructions\">\n\t\t\t\t\t\t{ instructions }\n\t\t\t\t\t</legend>\n\t\t\t\t) }\n\t\t\t\t{ children }\n\t\t\t</fieldset>\n\t\t</div>\n\t);\n}\n\nexport default Placeholder;\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -25,7 +24,7 @@ import { getScrollContainer } from '@wordpress/dom';
25
24
  import Button from '../button';
26
25
  import ScrollLock from '../scroll-lock';
27
26
  import { Slot, Fill, useSlot } from '../slot-fill';
28
- import { getFrameOffset, getFrameScale, positionToPlacement, placementToMotionAnimationProps, getReferenceOwnerDocument, getReferenceElement } from './utils';
27
+ import { computePopoverPosition, getFrameOffset, getFrameScale, positionToPlacement, placementToMotionAnimationProps, getReferenceOwnerDocument, getReferenceElement } from './utils';
29
28
  import { limitShift as customLimitShift } from './limit-shift';
30
29
  import { overlayMiddlewares } from './overlay-middlewares';
31
30
  /**
@@ -73,9 +72,10 @@ const AnimatedWrapper = forwardRef(({
73
72
  animate: false,
74
73
  style: receivedInlineStyles
75
74
  };
76
- return createElement(motion.div, _extends({}, computedAnimationProps, props, {
75
+ return createElement(motion.div, { ...computedAnimationProps,
76
+ ...props,
77
77
  ref: forwardedRef
78
- }));
78
+ });
79
79
  });
80
80
  const slotNameContext = createContext(undefined);
81
81
 
@@ -341,7 +341,7 @@ const UnforwardedPopover = (props, forwardedRef) => {
341
341
 
342
342
  let content = // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
343
343
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
344
- createElement(AnimatedWrapper, _extends({
344
+ createElement(AnimatedWrapper, {
345
345
  shouldAnimate: animate && !isExpanded,
346
346
  placement: computedPlacement,
347
347
  className: classnames('components-popover', className, {
@@ -349,10 +349,10 @@ const UnforwardedPopover = (props, forwardedRef) => {
349
349
  'is-positioned': x !== null && y !== null,
350
350
  // Use the 'alternate' classname for 'toolbar' variant for back compat.
351
351
  [`is-${computedVariant === 'toolbar' ? 'alternate' : computedVariant}`]: computedVariant
352
- })
353
- }, contentProps, {
354
- ref: mergedFloatingRef
355
- }, dialogProps, {
352
+ }),
353
+ ...contentProps,
354
+ ref: mergedFloatingRef,
355
+ ...dialogProps,
356
356
  tabIndex: -1,
357
357
  style: isExpanded ? undefined : {
358
358
  position: strategy,
@@ -363,10 +363,10 @@ const UnforwardedPopover = (props, forwardedRef) => {
363
363
  // to use `translateX` and `translateY` because those values would
364
364
  // be overridden by the return value of the
365
365
  // `placementToMotionAnimationProps` function in `AnimatedWrapper`
366
- x: Math.round(x !== null && x !== void 0 ? x : 0) || undefined,
367
- y: Math.round(y !== null && y !== void 0 ? y : 0) || undefined
366
+ x: computePopoverPosition(x),
367
+ y: computePopoverPosition(y)
368
368
  }
369
- }), isExpanded && createElement(ScrollLock, null), isExpanded && createElement("div", {
369
+ }, isExpanded && createElement(ScrollLock, null), isExpanded && createElement("div", {
370
370
  className: "components-popover__header"
371
371
  }, createElement("span", {
372
372
  className: "components-popover__header-title"
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/popover/index.tsx"],"names":["classnames","useFloating","flip","flipMiddleware","shift","shiftMiddleware","autoUpdate","arrow","offset","offsetMiddleware","size","motion","useReducedMotion","useRef","useLayoutEffect","forwardRef","createContext","useContext","useMemo","useState","useCallback","useViewportMatch","useMergeRefs","__experimentalUseDialog","useDialog","close","deprecated","Path","SVG","getScrollContainer","Button","ScrollLock","Slot","Fill","useSlot","getFrameOffset","getFrameScale","positionToPlacement","placementToMotionAnimationProps","getReferenceOwnerDocument","getReferenceElement","limitShift","customLimitShift","overlayMiddlewares","SLOT_NAME","ArrowTriangle","AnimatedWrapper","style","receivedInlineStyles","placement","shouldAnimate","props","forwardedRef","shouldReduceMotion","motionInlineStyles","otherMotionProps","computedAnimationProps","animate","slotNameContext","undefined","UnforwardedPopover","headerTitle","onClose","children","className","noArrow","position","placementProp","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","resize","variant","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","computedFlipProp","computedResizeProp","since","version","alternative","computedVariant","arrowRef","fallbackReferenceElement","setFallbackReferenceElement","referenceOwnerDocument","setReferenceOwnerDocument","anchorRefFallback","node","isMobileViewport","isExpanded","hasArrow","normalizedPlacementFromProps","frameOffsetRef","middleware","name","fn","x","y","current","data","amount","apply","sizeProps","firstElementChild","refs","floating","HTMLElement","Object","assign","maxHeight","availableHeight","overflow","crossAxis","limiter","padding","element","filter","m","slotName","slot","onDialogClose","type","event","dialogRef","dialogProps","__unstableOnClose","reference","referenceCallbackRef","strategy","update","computedPlacement","middlewareData","arrowData","whileElementsMounted","referenceParam","floatingParam","updateParam","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","resultingReferenceOwnerDoc","fallbackDocument","document","scale","resultingReferenceElement","ownerDocument","defaultView","frameElement","scrollContainer","updateFrameOffset","addEventListener","removeEventListener","mergedFloatingRef","content","left","Math","round","split","join","Number","isFinite","ref","Popover","PopoverSlot","__unstableSlotNameProvider","Provider"],"mappings":";;;AAAA;AACA;AACA;AAEA,OAAOA,UAAP,MAAuB,YAAvB;AACA,SACCC,WADD,EAECC,IAAI,IAAIC,cAFT,EAGCC,KAAK,IAAIC,eAHV,EAICC,UAJD,EAKCC,KALD,EAMCC,MAAM,IAAIC,gBANX,EAOCC,IAPD,QAUO,wBAVP,C,CAWA;;AACA,SACCC,MADD,EAECC,gBAFD,QAKO,eALP;AAOA;AACA;AACA;;AACA,SACCC,MADD,EAECC,eAFD,EAGCC,UAHD,EAICC,aAJD,EAKCC,UALD,EAMCC,OAND,EAOCC,QAPD,EAQCC,WARD,QASO,oBATP;AAUA,SACCC,gBADD,EAECC,YAFD,EAGCC,uBAAuB,IAAIC,SAH5B,QAIO,oBAJP;AAKA,SAASC,KAAT,QAAsB,kBAAtB;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AACA,SAASC,IAAT,EAAeC,GAAf,QAA0B,uBAA1B;AACA,SAASC,kBAAT,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SAAS,CAACnC,CAA3B,CADA,GAEI,GACDmC,SAAS,CAACnC,CAAV,8BACEL,cAAc,CAACM,OAAf,EAAwBD,CAD1B,2EAC+B,CAD/B,CAEC,IALJ,GAMG;AAhBG;AANT,KAyBC,cAAC,aAAD,OAzBD,CAlDF,CAHD;;AAoFA,MAAKsB,IAAI,CAACgD,GAAV,EAAgB;AACfR,IAAAA,OAAO,GAAG,cAAC,IAAD;AAAM,MAAA,IAAI,EAAGzC;AAAb,OAA0ByC,OAA1B,CAAV;AACA;;AAED,MAAKzF,SAAS,IAAIC,UAAb,IAA2BR,MAAhC,EAAyC;AACxC,WAAOgG,OAAP;AACA;;AAED,SAAO;AAAM,IAAA,GAAG,EAAGzE;AAAZ,KAAkCyE,OAAlC,CAAP;AACA,CAlaD;AAoaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAMS,OAAO,GAAGhK,UAAU,CAAE6C,kBAAF,CAA1B;;AAEP,SAASoH,WAAT,CACC;AAAE3E,EAAAA,IAAI,GAAGzD;AAAT,CADD,EAECkI,GAFD,EAGE;AACD,SACC,cAAC,IAAD,CACC;AADD;AAEC,IAAA,gBAAgB,MAFjB;AAGC,IAAA,IAAI,EAAGzE,IAHR;AAIC,IAAA,SAAS,EAAC,cAJX;AAKC,IAAA,GAAG,EAAGyE;AALP,IADD;AASA,C,CAED;;;AACAC,OAAO,CAAC/I,IAAR,GAAejB,UAAU,CAAEiK,WAAF,CAAzB,C,CACA;;AACAD,OAAO,CAACE,0BAAR,GAAqCvH,eAAe,CAACwH,QAArD;AAEA,eAAeH,OAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport classnames from 'classnames';\nimport {\n\tuseFloating,\n\tflip as flipMiddleware,\n\tshift as shiftMiddleware,\n\tautoUpdate,\n\tarrow,\n\toffset as offsetMiddleware,\n\tsize,\n\tMiddleware,\n\tMiddlewareArguments,\n} from '@floating-ui/react-dom';\n// eslint-disable-next-line no-restricted-imports\nimport {\n\tmotion,\n\tuseReducedMotion,\n\tHTMLMotionProps,\n\tMotionProps,\n} from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tforwardRef,\n\tcreateContext,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tuseCallback,\n} from '@wordpress/element';\nimport {\n\tuseViewportMatch,\n\tuseMergeRefs,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\nimport { Path, SVG } from '@wordpress/primitives';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport {\n\tgetFrameOffset,\n\tgetFrameScale,\n\tpositionToPlacement,\n\tplacementToMotionAnimationProps,\n\tgetReferenceOwnerDocument,\n\tgetReferenceElement,\n} from './utils';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type {\n\tPopoverProps,\n\tAnimatedWrapperProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\nimport { limitShift as customLimitShift } from './limit-shift';\nimport { overlayMiddlewares } from './overlay-middlewares';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nexport const SLOT_NAME = 'Popover';\n\n// An SVG displaying a triangle facing down, filled with a solid\n// color and bordered in such a way to create an arrow-like effect.\n// Keeping the SVG's viewbox squared simplify the arrow positioning\n// calculations.\nconst ArrowTriangle = () => (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox={ `0 0 100 100` }\n\t\tclassName=\"components-popover__triangle\"\n\t\trole=\"presentation\"\n\t>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-bg\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t/>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-border\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t/>\n\t</SVG>\n);\n\nconst AnimatedWrapper = forwardRef(\n\t(\n\t\t{\n\t\t\tstyle: receivedInlineStyles,\n\t\t\tplacement,\n\t\t\tshouldAnimate = false,\n\t\t\t...props\n\t\t}: HTMLMotionProps< 'div' > & AnimatedWrapperProps,\n\t\tforwardedRef: ForwardedRef< any >\n\t) => {\n\t\tconst shouldReduceMotion = useReducedMotion();\n\n\t\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t\t() => placementToMotionAnimationProps( placement ),\n\t\t\t[ placement ]\n\t\t);\n\n\t\tconst computedAnimationProps: HTMLMotionProps< 'div' > =\n\t\t\tshouldAnimate && ! shouldReduceMotion\n\t\t\t\t? {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t\t\t...receivedInlineStyles,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...otherMotionProps,\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\tanimate: false,\n\t\t\t\t\t\tstyle: receivedInlineStyles,\n\t\t\t\t };\n\n\t\treturn (\n\t\t\t<motion.div\n\t\t\t\t{ ...computedAnimationProps }\n\t\t\t\t{ ...props }\n\t\t\t\tref={ forwardedRef }\n\t\t\t/>\n\t\t);\n\t}\n);\n\nconst slotNameContext = createContext< string | undefined >( undefined );\n\nconst UnforwardedPopover = (\n\tprops: Omit<\n\t\tWordPressComponentProps< PopoverProps, 'div', false >,\n\t\t// To avoid overlaps between the standard HTML attributes and the props\n\t\t// expected by `framer-motion`, omit all framer motion props from popover\n\t\t// props (except for `animate` and `children`, which are re-defined in `PopoverProps`).\n\t\tkeyof Omit< MotionProps, 'animate' | 'children' >\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tanimate = true,\n\t\theaderTitle,\n\t\tonClose,\n\t\tchildren,\n\t\tclassName,\n\t\tnoArrow = true,\n\t\tposition,\n\t\tplacement: placementProp = 'bottom-start',\n\t\toffset: offsetProp = 0,\n\t\tfocusOnMount = 'firstElement',\n\t\tanchor,\n\t\texpandOnMobile,\n\t\tonFocusOutside,\n\t\t__unstableSlotName = SLOT_NAME,\n\t\tflip = true,\n\t\tresize = true,\n\t\tshift = false,\n\t\tvariant,\n\n\t\t// Deprecated props\n\t\t__unstableForcePosition,\n\t\tanchorRef,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tisAlternate,\n\n\t\t// Rest\n\t\t...contentProps\n\t} = props;\n\n\tlet computedFlipProp = flip;\n\tlet computedResizeProp = resize;\n\tif ( __unstableForcePosition !== undefined ) {\n\t\tdeprecated( '`__unstableForcePosition` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`flip={ false }` and `resize={ false }`',\n\t\t} );\n\n\t\t// Back-compat, set the `flip` and `resize` props\n\t\t// to `false` to replicate `__unstableForcePosition`.\n\t\tcomputedFlipProp = ! __unstableForcePosition;\n\t\tcomputedResizeProp = ! __unstableForcePosition;\n\t}\n\n\tif ( anchorRef !== undefined ) {\n\t\tdeprecated( '`anchorRef` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( anchorRect !== undefined ) {\n\t\tdeprecated( '`anchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( getAnchorRect !== undefined ) {\n\t\tdeprecated( '`getAnchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tconst computedVariant = isAlternate ? 'toolbar' : variant;\n\tif ( isAlternate !== undefined ) {\n\t\tdeprecated( '`isAlternate` prop in wp.components.Popover', {\n\t\t\tsince: '6.2',\n\t\t\talternative: \"`variant` prop with the `'toolbar'` value\",\n\t\t} );\n\t}\n\n\tconst arrowRef = useRef< HTMLElement | null >( null );\n\n\tconst [ fallbackReferenceElement, setFallbackReferenceElement ] =\n\t\tuseState< HTMLSpanElement | null >( null );\n\tconst [ referenceOwnerDocument, setReferenceOwnerDocument ] = useState<\n\t\tDocument | undefined\n\t>();\n\n\tconst anchorRefFallback: RefCallback< HTMLSpanElement > = useCallback(\n\t\t( node ) => {\n\t\t\tsetFallbackReferenceElement( node );\n\t\t},\n\t\t[]\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isExpanded = expandOnMobile && isMobileViewport;\n\tconst hasArrow = ! isExpanded && ! noArrow;\n\tconst normalizedPlacementFromProps = position\n\t\t? positionToPlacement( position )\n\t\t: placementProp;\n\n\t/**\n\t * Offsets the position of the popover when the anchor is inside an iframe.\n\t *\n\t * Store the offset in a ref, due to constraints with floating-ui:\n\t * https://floating-ui.com/docs/react-dom#variables-inside-middleware-functions.\n\t */\n\tconst frameOffsetRef = useRef( getFrameOffset( referenceOwnerDocument ) );\n\n\tconst middleware = [\n\t\t...( placementProp === 'overlay' ? overlayMiddlewares() : [] ),\n\t\t// Custom middleware which adjusts the popover's position by taking into\n\t\t// account the offset of the anchor's iframe (if any) compared to the page.\n\t\t{\n\t\t\tname: 'frameOffset',\n\t\t\tfn( { x, y }: MiddlewareArguments ) {\n\t\t\t\tif ( ! frameOffsetRef.current ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx,\n\t\t\t\t\t\ty,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tx: x + frameOffsetRef.current.x,\n\t\t\t\t\ty: y + frameOffsetRef.current.y,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\t// This will be used in the customLimitShift() function.\n\t\t\t\t\t\tamount: frameOffsetRef.current,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t},\n\t\t},\n\t\toffsetMiddleware( offsetProp ),\n\t\tcomputedFlipProp ? flipMiddleware() : undefined,\n\t\tcomputedResizeProp\n\t\t\t? size( {\n\t\t\t\t\tapply( sizeProps ) {\n\t\t\t\t\t\tconst { firstElementChild } =\n\t\t\t\t\t\t\trefs.floating.current ?? {};\n\n\t\t\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) )\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\t\t\tmaxHeight: `${ sizeProps.availableHeight }px`,\n\t\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t\t} );\n\t\t\t\t\t},\n\t\t\t } )\n\t\t\t: undefined,\n\t\tshift\n\t\t\t? shiftMiddleware( {\n\t\t\t\t\tcrossAxis: true,\n\t\t\t\t\tlimiter: customLimitShift(),\n\t\t\t\t\tpadding: 1, // Necessary to avoid flickering at the edge of the viewport.\n\t\t\t } )\n\t\t\t: undefined,\n\t\tarrow( { element: arrowRef } ),\n\t].filter(\n\t\t( m: Middleware | undefined ): m is Middleware => m !== undefined\n\t);\n\tconst slotName = useContext( slotNameContext ) || __unstableSlotName;\n\tconst slot = useSlot( slotName );\n\n\tlet onDialogClose;\n\n\tif ( onClose || onFocusOutside ) {\n\t\tonDialogClose = ( type: string | undefined, event: SyntheticEvent ) => {\n\t\t\t// Ideally the popover should have just a single onClose prop and\n\t\t\t// not three props that potentially do the same thing.\n\t\t\tif ( type === 'focus-outside' && onFocusOutside ) {\n\t\t\t\tonFocusOutside( event );\n\t\t\t} else if ( onClose ) {\n\t\t\t\tonClose();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst [ dialogRef, dialogProps ] = useDialog( {\n\t\tfocusOnMount,\n\t\t__unstableOnClose: onDialogClose,\n\t\t// @ts-expect-error The __unstableOnClose property needs to be deprecated first (see https://github.com/WordPress/gutenberg/pull/27675)\n\t\tonClose: onDialogClose,\n\t} );\n\n\tconst {\n\t\t// Positioning coordinates\n\t\tx,\n\t\ty,\n\t\t// Callback refs (not regular refs). This allows the position to be updated.\n\t\t// when either elements change.\n\t\treference: referenceCallbackRef,\n\t\tfloating,\n\t\t// Object with \"regular\" refs to both \"reference\" and \"floating\"\n\t\trefs,\n\t\t// Type of CSS position property to use (absolute or fixed)\n\t\tstrategy,\n\t\tupdate,\n\t\tplacement: computedPlacement,\n\t\tmiddlewareData: { arrow: arrowData },\n\t} = useFloating( {\n\t\tplacement:\n\t\t\tnormalizedPlacementFromProps === 'overlay'\n\t\t\t\t? undefined\n\t\t\t\t: normalizedPlacementFromProps,\n\t\tmiddleware,\n\t\twhileElementsMounted: ( referenceParam, floatingParam, updateParam ) =>\n\t\t\tautoUpdate( referenceParam, floatingParam, updateParam, {\n\t\t\t\tanimationFrame: true,\n\t\t\t} ),\n\t} );\n\n\tconst arrowCallbackRef = useCallback(\n\t\t( node: HTMLElement | null ) => {\n\t\t\tarrowRef.current = node;\n\t\t\tupdate();\n\t\t},\n\t\t[ update ]\n\t);\n\n\t// When any of the possible anchor \"sources\" change,\n\t// recompute the reference element (real or virtual) and its owner document.\n\n\tconst anchorRefTop = ( anchorRef as PopoverAnchorRefTopBottom | undefined )\n\t\t?.top;\n\tconst anchorRefBottom = (\n\t\tanchorRef as PopoverAnchorRefTopBottom | undefined\n\t )?.bottom;\n\tconst anchorRefStartContainer = ( anchorRef as Range | undefined )\n\t\t?.startContainer;\n\tconst anchorRefCurrent = ( anchorRef as PopoverAnchorRefReference )\n\t\t?.current;\n\n\tuseLayoutEffect( () => {\n\t\tconst resultingReferenceOwnerDoc = getReferenceOwnerDocument( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t\tfallbackDocument: document,\n\t\t} );\n\t\tconst scale = getFrameScale( resultingReferenceOwnerDoc );\n\t\tconst resultingReferenceElement = getReferenceElement( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t\tscale,\n\t\t} );\n\n\t\treferenceCallbackRef( resultingReferenceElement );\n\n\t\tsetReferenceOwnerDocument( resultingReferenceOwnerDoc );\n\t}, [\n\t\tanchor,\n\t\tanchorRef,\n\t\tanchorRefTop,\n\t\tanchorRefBottom,\n\t\tanchorRefStartContainer,\n\t\tanchorRefCurrent,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tfallbackReferenceElement,\n\t\treferenceCallbackRef,\n\t] );\n\n\t// If the reference element is in a different ownerDocument (e.g. iFrame),\n\t// we need to manually update the floating's position as the reference's owner\n\t// document scrolls. Also update the frame offset if the view resizes.\n\tuseLayoutEffect( () => {\n\t\tif (\n\t\t\t// Reference and root documents are the same.\n\t\t\treferenceOwnerDocument === document ||\n\t\t\t// Reference and floating are in the same document.\n\t\t\treferenceOwnerDocument === refs.floating.current?.ownerDocument ||\n\t\t\t// The reference's document has no view (i.e. window)\n\t\t\t// or frame element (ie. it's not an iframe).\n\t\t\t! referenceOwnerDocument?.defaultView?.frameElement\n\t\t) {\n\t\t\tframeOffsetRef.current = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\tconst { defaultView } = referenceOwnerDocument;\n\t\tconst { frameElement } = defaultView;\n\n\t\tconst scrollContainer = frameElement\n\t\t\t? getScrollContainer( frameElement )\n\t\t\t: null;\n\n\t\tconst updateFrameOffset = () => {\n\t\t\tframeOffsetRef.current = getFrameOffset( referenceOwnerDocument );\n\t\t\tupdate();\n\t\t};\n\t\tdefaultView.addEventListener( 'resize', updateFrameOffset );\n\t\tscrollContainer?.addEventListener( 'scroll', updateFrameOffset );\n\n\t\tupdateFrameOffset();\n\n\t\treturn () => {\n\t\t\tdefaultView.removeEventListener( 'resize', updateFrameOffset );\n\t\t\tscrollContainer?.removeEventListener( 'scroll', updateFrameOffset );\n\t\t};\n\t}, [ referenceOwnerDocument, update, refs.floating ] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\tfloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\t// Disable reason: We care to capture the _bubbled_ events from inputs\n\t// within popover as inferring close intent.\n\n\tlet content = (\n\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<AnimatedWrapper\n\t\t\tshouldAnimate={ animate && ! isExpanded }\n\t\t\tplacement={ computedPlacement }\n\t\t\tclassName={ classnames( 'components-popover', className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-positioned': x !== null && y !== null,\n\t\t\t\t// Use the 'alternate' classname for 'toolbar' variant for back compat.\n\t\t\t\t[ `is-${\n\t\t\t\t\tcomputedVariant === 'toolbar'\n\t\t\t\t\t\t? 'alternate'\n\t\t\t\t\t\t: computedVariant\n\t\t\t\t}` ]: computedVariant,\n\t\t\t} ) }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t\tstyle={\n\t\t\t\tisExpanded\n\t\t\t\t\t? undefined\n\t\t\t\t\t: {\n\t\t\t\t\t\t\tposition: strategy,\n\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\t// `x` and `y` are framer-motion specific props and are shorthands\n\t\t\t\t\t\t\t// for `translateX` and `translateY`. Currently it is not possible\n\t\t\t\t\t\t\t// to use `translateX` and `translateY` because those values would\n\t\t\t\t\t\t\t// be overridden by the return value of the\n\t\t\t\t\t\t\t// `placementToMotionAnimationProps` function in `AnimatedWrapper`\n\t\t\t\t\t\t\tx: Math.round( x ?? 0 ) || undefined,\n\t\t\t\t\t\t\ty: Math.round( y ?? 0 ) || undefined,\n\t\t\t\t\t }\n\t\t\t}\n\t\t>\n\t\t\t{ /* Prevents scroll on the document */ }\n\t\t\t{ isExpanded && <ScrollLock /> }\n\t\t\t{ isExpanded && (\n\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"components-popover__close\"\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-popover__content\">{ children }</div>\n\t\t\t{ hasArrow && (\n\t\t\t\t<div\n\t\t\t\t\tref={ arrowCallbackRef }\n\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t'components-popover__arrow',\n\t\t\t\t\t\t`is-${ computedPlacement.split( '-' )[ 0 ] }`,\n\t\t\t\t\t].join( ' ' ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tleft:\n\t\t\t\t\t\t\ttypeof arrowData?.x !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.x )\n\t\t\t\t\t\t\t\t? `${\n\t\t\t\t\t\t\t\t\t\tarrowData.x +\n\t\t\t\t\t\t\t\t\t\t( frameOffsetRef.current?.x ?? 0 )\n\t\t\t\t\t\t\t\t }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\ttop:\n\t\t\t\t\t\t\ttypeof arrowData?.y !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.y )\n\t\t\t\t\t\t\t\t? `${\n\t\t\t\t\t\t\t\t\t\tarrowData.y +\n\t\t\t\t\t\t\t\t\t\t( frameOffsetRef.current?.y ?? 0 )\n\t\t\t\t\t\t\t\t }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<ArrowTriangle />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</AnimatedWrapper>\n\t);\n\n\tif ( slot.ref ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t}\n\n\tif ( anchorRef || anchorRect || anchor ) {\n\t\treturn content;\n\t}\n\n\treturn <span ref={ anchorRefFallback }>{ content }</span>;\n};\n\n/**\n * `Popover` renders its content in a floating modal. If no explicit anchor is passed via props, it anchors to its parent element by default.\n *\n * ```jsx\n * import { Button, Popover } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyPopover = () => {\n * \tconst [ isVisible, setIsVisible ] = useState( false );\n * \tconst toggleVisible = () => {\n * \t\tsetIsVisible( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<Button variant=\"secondary\" onClick={ toggleVisible }>\n * \t\t\tToggle Popover!\n * \t\t\t{ isVisible && <Popover>Popover is toggled!</Popover> }\n * \t\t</Button>\n * \t);\n * };\n * ```\n *\n */\nexport const Popover = forwardRef( UnforwardedPopover );\n\nfunction PopoverSlot(\n\t{ name = SLOT_NAME }: { name?: string },\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Slot\n\t\t\t// @ts-expect-error Need to type `SlotFill`\n\t\t\tbubblesVirtually\n\t\t\tname={ name }\n\t\t\tclassName=\"popover-slot\"\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\n// @ts-expect-error For Legacy Reasons\nPopover.Slot = forwardRef( PopoverSlot );\n// @ts-expect-error For Legacy Reasons\nPopover.__unstableSlotNameProvider = slotNameContext.Provider;\n\nexport default Popover;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/popover/index.tsx"],"names":["classnames","useFloating","flip","flipMiddleware","shift","shiftMiddleware","autoUpdate","arrow","offset","offsetMiddleware","size","motion","useReducedMotion","useRef","useLayoutEffect","forwardRef","createContext","useContext","useMemo","useState","useCallback","useViewportMatch","useMergeRefs","__experimentalUseDialog","useDialog","close","deprecated","Path","SVG","getScrollContainer","Button","ScrollLock","Slot","Fill","useSlot","computePopoverPosition","getFrameOffset","getFrameScale","positionToPlacement","placementToMotionAnimationProps","getReferenceOwnerDocument","getReferenceElement","limitShift","customLimitShift","overlayMiddlewares","SLOT_NAME","ArrowTriangle","AnimatedWrapper","style","receivedInlineStyles","placement","shouldAnimate","props","forwardedRef","shouldReduceMotion","motionInlineStyles","otherMotionProps","computedAnimationProps","animate","slotNameContext","undefined","UnforwardedPopover","headerTitle","onClose","children","className","noArrow","position","placementProp","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","resize","variant","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","computedFlipProp","computedResizeProp","since","version","alternative","computedVariant","arrowRef","fallbackReferenceElement","setFallbackReferenceElement","referenceOwnerDocument","setReferenceOwnerDocument","anchorRefFallback","node","isMobileViewport","isExpanded","hasArrow","normalizedPlacementFromProps","frameOffsetRef","middleware","name","fn","x","y","current","data","amount","apply","sizeProps","firstElementChild","refs","floating","HTMLElement","Object","assign","maxHeight","availableHeight","overflow","crossAxis","limiter","padding","element","filter","m","slotName","slot","onDialogClose","type","event","dialogRef","dialogProps","__unstableOnClose","reference","referenceCallbackRef","strategy","update","computedPlacement","middlewareData","arrowData","whileElementsMounted","referenceParam","floatingParam","updateParam","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","resultingReferenceOwnerDoc","fallbackDocument","document","scale","resultingReferenceElement","ownerDocument","defaultView","frameElement","scrollContainer","updateFrameOffset","addEventListener","removeEventListener","mergedFloatingRef","content","left","split","join","Number","isFinite","ref","Popover","PopoverSlot","__unstableSlotNameProvider","Provider"],"mappings":";;AAAA;AACA;AACA;AAEA,OAAOA,UAAP,MAAuB,YAAvB;AACA,SACCC,WADD,EAECC,IAAI,IAAIC,cAFT,EAGCC,KAAK,IAAIC,eAHV,EAICC,UAJD,EAKCC,KALD,EAMCC,MAAM,IAAIC,g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ED;;;AACAC,OAAO,CAAC9I,IAAR,GAAejB,UAAU,CAAEgK,WAAF,CAAzB,C,CACA;;AACAD,OAAO,CAACE,0BAAR,GAAqCrH,eAAe,CAACsH,QAArD;AAEA,eAAeH,OAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport classnames from 'classnames';\nimport {\n\tuseFloating,\n\tflip as flipMiddleware,\n\tshift as shiftMiddleware,\n\tautoUpdate,\n\tarrow,\n\toffset as offsetMiddleware,\n\tsize,\n\tMiddleware,\n\tMiddlewareArguments,\n} from '@floating-ui/react-dom';\n// eslint-disable-next-line no-restricted-imports\nimport {\n\tmotion,\n\tuseReducedMotion,\n\tHTMLMotionProps,\n\tMotionProps,\n} from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tforwardRef,\n\tcreateContext,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tuseCallback,\n} from '@wordpress/element';\nimport {\n\tuseViewportMatch,\n\tuseMergeRefs,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\nimport { Path, SVG } from '@wordpress/primitives';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport {\n\tcomputePopoverPosition,\n\tgetFrameOffset,\n\tgetFrameScale,\n\tpositionToPlacement,\n\tplacementToMotionAnimationProps,\n\tgetReferenceOwnerDocument,\n\tgetReferenceElement,\n} from './utils';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type {\n\tPopoverProps,\n\tAnimatedWrapperProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\nimport { limitShift as customLimitShift } from './limit-shift';\nimport { overlayMiddlewares } from './overlay-middlewares';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nexport const SLOT_NAME = 'Popover';\n\n// An SVG displaying a triangle facing down, filled with a solid\n// color and bordered in such a way to create an arrow-like effect.\n// Keeping the SVG's viewbox squared simplify the arrow positioning\n// calculations.\nconst ArrowTriangle = () => (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox={ `0 0 100 100` }\n\t\tclassName=\"components-popover__triangle\"\n\t\trole=\"presentation\"\n\t>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-bg\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t/>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-border\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t/>\n\t</SVG>\n);\n\nconst AnimatedWrapper = forwardRef(\n\t(\n\t\t{\n\t\t\tstyle: receivedInlineStyles,\n\t\t\tplacement,\n\t\t\tshouldAnimate = false,\n\t\t\t...props\n\t\t}: HTMLMotionProps< 'div' > & AnimatedWrapperProps,\n\t\tforwardedRef: ForwardedRef< any >\n\t) => {\n\t\tconst shouldReduceMotion = useReducedMotion();\n\n\t\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t\t() => placementToMotionAnimationProps( placement ),\n\t\t\t[ placement ]\n\t\t);\n\n\t\tconst computedAnimationProps: HTMLMotionProps< 'div' > =\n\t\t\tshouldAnimate && ! shouldReduceMotion\n\t\t\t\t? {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t\t\t...receivedInlineStyles,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...otherMotionProps,\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\tanimate: false,\n\t\t\t\t\t\tstyle: receivedInlineStyles,\n\t\t\t\t };\n\n\t\treturn (\n\t\t\t<motion.div\n\t\t\t\t{ ...computedAnimationProps }\n\t\t\t\t{ ...props }\n\t\t\t\tref={ forwardedRef }\n\t\t\t/>\n\t\t);\n\t}\n);\n\nconst slotNameContext = createContext< string | undefined >( undefined );\n\nconst UnforwardedPopover = (\n\tprops: Omit<\n\t\tWordPressComponentProps< PopoverProps, 'div', false >,\n\t\t// To avoid overlaps between the standard HTML attributes and the props\n\t\t// expected by `framer-motion`, omit all framer motion props from popover\n\t\t// props (except for `animate` and `children`, which are re-defined in `PopoverProps`).\n\t\tkeyof Omit< MotionProps, 'animate' | 'children' >\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tanimate = true,\n\t\theaderTitle,\n\t\tonClose,\n\t\tchildren,\n\t\tclassName,\n\t\tnoArrow = true,\n\t\tposition,\n\t\tplacement: placementProp = 'bottom-start',\n\t\toffset: offsetProp = 0,\n\t\tfocusOnMount = 'firstElement',\n\t\tanchor,\n\t\texpandOnMobile,\n\t\tonFocusOutside,\n\t\t__unstableSlotName = SLOT_NAME,\n\t\tflip = true,\n\t\tresize = true,\n\t\tshift = false,\n\t\tvariant,\n\n\t\t// Deprecated props\n\t\t__unstableForcePosition,\n\t\tanchorRef,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tisAlternate,\n\n\t\t// Rest\n\t\t...contentProps\n\t} = props;\n\n\tlet computedFlipProp = flip;\n\tlet computedResizeProp = resize;\n\tif ( __unstableForcePosition !== undefined ) {\n\t\tdeprecated( '`__unstableForcePosition` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`flip={ false }` and `resize={ false }`',\n\t\t} );\n\n\t\t// Back-compat, set the `flip` and `resize` props\n\t\t// to `false` to replicate `__unstableForcePosition`.\n\t\tcomputedFlipProp = ! __unstableForcePosition;\n\t\tcomputedResizeProp = ! __unstableForcePosition;\n\t}\n\n\tif ( anchorRef !== undefined ) {\n\t\tdeprecated( '`anchorRef` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( anchorRect !== undefined ) {\n\t\tdeprecated( '`anchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( getAnchorRect !== undefined ) {\n\t\tdeprecated( '`getAnchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tconst computedVariant = isAlternate ? 'toolbar' : variant;\n\tif ( isAlternate !== undefined ) {\n\t\tdeprecated( '`isAlternate` prop in wp.components.Popover', {\n\t\t\tsince: '6.2',\n\t\t\talternative: \"`variant` prop with the `'toolbar'` value\",\n\t\t} );\n\t}\n\n\tconst arrowRef = useRef< HTMLElement | null >( null );\n\n\tconst [ fallbackReferenceElement, setFallbackReferenceElement ] =\n\t\tuseState< HTMLSpanElement | null >( null );\n\tconst [ referenceOwnerDocument, setReferenceOwnerDocument ] = useState<\n\t\tDocument | undefined\n\t>();\n\n\tconst anchorRefFallback: RefCallback< HTMLSpanElement > = useCallback(\n\t\t( node ) => {\n\t\t\tsetFallbackReferenceElement( node );\n\t\t},\n\t\t[]\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isExpanded = expandOnMobile && isMobileViewport;\n\tconst hasArrow = ! isExpanded && ! noArrow;\n\tconst normalizedPlacementFromProps = position\n\t\t? positionToPlacement( position )\n\t\t: placementProp;\n\n\t/**\n\t * Offsets the position of the popover when the anchor is inside an iframe.\n\t *\n\t * Store the offset in a ref, due to constraints with floating-ui:\n\t * https://floating-ui.com/docs/react-dom#variables-inside-middleware-functions.\n\t */\n\tconst frameOffsetRef = useRef( getFrameOffset( referenceOwnerDocument ) );\n\n\tconst middleware = [\n\t\t...( placementProp === 'overlay' ? overlayMiddlewares() : [] ),\n\t\t// Custom middleware which adjusts the popover's position by taking into\n\t\t// account the offset of the anchor's iframe (if any) compared to the page.\n\t\t{\n\t\t\tname: 'frameOffset',\n\t\t\tfn( { x, y }: MiddlewareArguments ) {\n\t\t\t\tif ( ! frameOffsetRef.current ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx,\n\t\t\t\t\t\ty,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tx: x + frameOffsetRef.current.x,\n\t\t\t\t\ty: y + frameOffsetRef.current.y,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\t// This will be used in the customLimitShift() function.\n\t\t\t\t\t\tamount: frameOffsetRef.current,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t},\n\t\t},\n\t\toffsetMiddleware( offsetProp ),\n\t\tcomputedFlipProp ? flipMiddleware() : undefined,\n\t\tcomputedResizeProp\n\t\t\t? size( {\n\t\t\t\t\tapply( sizeProps ) {\n\t\t\t\t\t\tconst { firstElementChild } =\n\t\t\t\t\t\t\trefs.floating.current ?? {};\n\n\t\t\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) )\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\t\t\tmaxHeight: `${ sizeProps.availableHeight }px`,\n\t\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t\t} );\n\t\t\t\t\t},\n\t\t\t } )\n\t\t\t: undefined,\n\t\tshift\n\t\t\t? shiftMiddleware( {\n\t\t\t\t\tcrossAxis: true,\n\t\t\t\t\tlimiter: customLimitShift(),\n\t\t\t\t\tpadding: 1, // Necessary to avoid flickering at the edge of the viewport.\n\t\t\t } )\n\t\t\t: undefined,\n\t\tarrow( { element: arrowRef } ),\n\t].filter(\n\t\t( m: Middleware | undefined ): m is Middleware => m !== undefined\n\t);\n\tconst slotName = useContext( slotNameContext ) || __unstableSlotName;\n\tconst slot = useSlot( slotName );\n\n\tlet onDialogClose;\n\n\tif ( onClose || onFocusOutside ) {\n\t\tonDialogClose = ( type: string | undefined, event: SyntheticEvent ) => {\n\t\t\t// Ideally the popover should have just a single onClose prop and\n\t\t\t// not three props that potentially do the same thing.\n\t\t\tif ( type === 'focus-outside' && onFocusOutside ) {\n\t\t\t\tonFocusOutside( event );\n\t\t\t} else if ( onClose ) {\n\t\t\t\tonClose();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst [ dialogRef, dialogProps ] = useDialog( {\n\t\tfocusOnMount,\n\t\t__unstableOnClose: onDialogClose,\n\t\t// @ts-expect-error The __unstableOnClose property needs to be deprecated first (see https://github.com/WordPress/gutenberg/pull/27675)\n\t\tonClose: onDialogClose,\n\t} );\n\n\tconst {\n\t\t// Positioning coordinates\n\t\tx,\n\t\ty,\n\t\t// Callback refs (not regular refs). This allows the position to be updated.\n\t\t// when either elements change.\n\t\treference: referenceCallbackRef,\n\t\tfloating,\n\t\t// Object with \"regular\" refs to both \"reference\" and \"floating\"\n\t\trefs,\n\t\t// Type of CSS position property to use (absolute or fixed)\n\t\tstrategy,\n\t\tupdate,\n\t\tplacement: computedPlacement,\n\t\tmiddlewareData: { arrow: arrowData },\n\t} = useFloating( {\n\t\tplacement:\n\t\t\tnormalizedPlacementFromProps === 'overlay'\n\t\t\t\t? undefined\n\t\t\t\t: normalizedPlacementFromProps,\n\t\tmiddleware,\n\t\twhileElementsMounted: ( referenceParam, floatingParam, updateParam ) =>\n\t\t\tautoUpdate( referenceParam, floatingParam, updateParam, {\n\t\t\t\tanimationFrame: true,\n\t\t\t} ),\n\t} );\n\n\tconst arrowCallbackRef = useCallback(\n\t\t( node: HTMLElement | null ) => {\n\t\t\tarrowRef.current = node;\n\t\t\tupdate();\n\t\t},\n\t\t[ update ]\n\t);\n\n\t// When any of the possible anchor \"sources\" change,\n\t// recompute the reference element (real or virtual) and its owner document.\n\n\tconst anchorRefTop = ( anchorRef as PopoverAnchorRefTopBottom | undefined )\n\t\t?.top;\n\tconst anchorRefBottom = (\n\t\tanchorRef as PopoverAnchorRefTopBottom | undefined\n\t )?.bottom;\n\tconst anchorRefStartContainer = ( anchorRef as Range | undefined )\n\t\t?.startContainer;\n\tconst anchorRefCurrent = ( anchorRef as PopoverAnchorRefReference )\n\t\t?.current;\n\n\tuseLayoutEffect( () => {\n\t\tconst resultingReferenceOwnerDoc = getReferenceOwnerDocument( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t\tfallbackDocument: document,\n\t\t} );\n\t\tconst scale = getFrameScale( resultingReferenceOwnerDoc );\n\t\tconst resultingReferenceElement = getReferenceElement( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t\tscale,\n\t\t} );\n\n\t\treferenceCallbackRef( resultingReferenceElement );\n\n\t\tsetReferenceOwnerDocument( resultingReferenceOwnerDoc );\n\t}, [\n\t\tanchor,\n\t\tanchorRef,\n\t\tanchorRefTop,\n\t\tanchorRefBottom,\n\t\tanchorRefStartContainer,\n\t\tanchorRefCurrent,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tfallbackReferenceElement,\n\t\treferenceCallbackRef,\n\t] );\n\n\t// If the reference element is in a different ownerDocument (e.g. iFrame),\n\t// we need to manually update the floating's position as the reference's owner\n\t// document scrolls. Also update the frame offset if the view resizes.\n\tuseLayoutEffect( () => {\n\t\tif (\n\t\t\t// Reference and root documents are the same.\n\t\t\treferenceOwnerDocument === document ||\n\t\t\t// Reference and floating are in the same document.\n\t\t\treferenceOwnerDocument === refs.floating.current?.ownerDocument ||\n\t\t\t// The reference's document has no view (i.e. window)\n\t\t\t// or frame element (ie. it's not an iframe).\n\t\t\t! referenceOwnerDocument?.defaultView?.frameElement\n\t\t) {\n\t\t\tframeOffsetRef.current = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\tconst { defaultView } = referenceOwnerDocument;\n\t\tconst { frameElement } = defaultView;\n\n\t\tconst scrollContainer = frameElement\n\t\t\t? getScrollContainer( frameElement )\n\t\t\t: null;\n\n\t\tconst updateFrameOffset = () => {\n\t\t\tframeOffsetRef.current = getFrameOffset( referenceOwnerDocument );\n\t\t\tupdate();\n\t\t};\n\t\tdefaultView.addEventListener( 'resize', updateFrameOffset );\n\t\tscrollContainer?.addEventListener( 'scroll', updateFrameOffset );\n\n\t\tupdateFrameOffset();\n\n\t\treturn () => {\n\t\t\tdefaultView.removeEventListener( 'resize', updateFrameOffset );\n\t\t\tscrollContainer?.removeEventListener( 'scroll', updateFrameOffset );\n\t\t};\n\t}, [ referenceOwnerDocument, update, refs.floating ] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\tfloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\t// Disable reason: We care to capture the _bubbled_ events from inputs\n\t// within popover as inferring close intent.\n\n\tlet content = (\n\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<AnimatedWrapper\n\t\t\tshouldAnimate={ animate && ! isExpanded }\n\t\t\tplacement={ computedPlacement }\n\t\t\tclassName={ classnames( 'components-popover', className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-positioned': x !== null && y !== null,\n\t\t\t\t// Use the 'alternate' classname for 'toolbar' variant for back compat.\n\t\t\t\t[ `is-${\n\t\t\t\t\tcomputedVariant === 'toolbar'\n\t\t\t\t\t\t? 'alternate'\n\t\t\t\t\t\t: computedVariant\n\t\t\t\t}` ]: computedVariant,\n\t\t\t} ) }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t\tstyle={\n\t\t\t\tisExpanded\n\t\t\t\t\t? undefined\n\t\t\t\t\t: {\n\t\t\t\t\t\t\tposition: strategy,\n\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\t// `x` and `y` are framer-motion specific props and are shorthands\n\t\t\t\t\t\t\t// for `translateX` and `translateY`. Currently it is not possible\n\t\t\t\t\t\t\t// to use `translateX` and `translateY` because those values would\n\t\t\t\t\t\t\t// be overridden by the return value of the\n\t\t\t\t\t\t\t// `placementToMotionAnimationProps` function in `AnimatedWrapper`\n\t\t\t\t\t\t\tx: computePopoverPosition( x ),\n\t\t\t\t\t\t\ty: computePopoverPosition( y ),\n\t\t\t\t\t }\n\t\t\t}\n\t\t>\n\t\t\t{ /* Prevents scroll on the document */ }\n\t\t\t{ isExpanded && <ScrollLock /> }\n\t\t\t{ isExpanded && (\n\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"components-popover__close\"\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-popover__content\">{ children }</div>\n\t\t\t{ hasArrow && (\n\t\t\t\t<div\n\t\t\t\t\tref={ arrowCallbackRef }\n\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t'components-popover__arrow',\n\t\t\t\t\t\t`is-${ computedPlacement.split( '-' )[ 0 ] }`,\n\t\t\t\t\t].join( ' ' ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tleft:\n\t\t\t\t\t\t\ttypeof arrowData?.x !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.x )\n\t\t\t\t\t\t\t\t? `${\n\t\t\t\t\t\t\t\t\t\tarrowData.x +\n\t\t\t\t\t\t\t\t\t\t( frameOffsetRef.current?.x ?? 0 )\n\t\t\t\t\t\t\t\t }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\ttop:\n\t\t\t\t\t\t\ttypeof arrowData?.y !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.y )\n\t\t\t\t\t\t\t\t? `${\n\t\t\t\t\t\t\t\t\t\tarrowData.y +\n\t\t\t\t\t\t\t\t\t\t( frameOffsetRef.current?.y ?? 0 )\n\t\t\t\t\t\t\t\t }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<ArrowTriangle />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</AnimatedWrapper>\n\t);\n\n\tif ( slot.ref ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t}\n\n\tif ( anchorRef || anchorRect || anchor ) {\n\t\treturn content;\n\t}\n\n\treturn <span ref={ anchorRefFallback }>{ content }</span>;\n};\n\n/**\n * `Popover` renders its content in a floating modal. If no explicit anchor is passed via props, it anchors to its parent element by default.\n *\n * ```jsx\n * import { Button, Popover } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyPopover = () => {\n * \tconst [ isVisible, setIsVisible ] = useState( false );\n * \tconst toggleVisible = () => {\n * \t\tsetIsVisible( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<Button variant=\"secondary\" onClick={ toggleVisible }>\n * \t\t\tToggle Popover!\n * \t\t\t{ isVisible && <Popover>Popover is toggled!</Popover> }\n * \t\t</Button>\n * \t);\n * };\n * ```\n *\n */\nexport const Popover = forwardRef( UnforwardedPopover );\n\nfunction PopoverSlot(\n\t{ name = SLOT_NAME }: { name?: string },\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Slot\n\t\t\t// @ts-expect-error Need to type `SlotFill`\n\t\t\tbubblesVirtually\n\t\t\tname={ name }\n\t\t\tclassName=\"popover-slot\"\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\n// @ts-expect-error For Legacy Reasons\nPopover.Slot = forwardRef( PopoverSlot );\n// @ts-expect-error For Legacy Reasons\nPopover.__unstableSlotNameProvider = slotNameContext.Provider;\n\nexport default Popover;\n"]}
@@ -324,4 +324,15 @@ export const getReferenceElement = ({
324
324
 
325
325
  return (_referenceElement = referenceElement) !== null && _referenceElement !== void 0 ? _referenceElement : null;
326
326
  };
327
+ /**
328
+ * Computes the final coordinate that needs to be applied to the floating
329
+ * element when applying transform inline styles, defaulting to `undefined`
330
+ * if the provided value is `null` or `NaN`.
331
+ *
332
+ * @param c input coordinate (usually as returned from floating-ui)
333
+ * @return The coordinate's value to be used for inline styles. An `undefined`
334
+ * return value means "no style set" for this coordinate.
335
+ */
336
+
337
+ export const computePopoverPosition = c => c === null || Number.isNaN(c) ? undefined : Math.round(c);
327
338
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/popover/utils.ts"],"names":["POSITION_TO_PLACEMENT","bottom","top","middle","positionToPlacement","position","PLACEMENT_TO_ANIMATION_ORIGIN","originX","originY","right","left","overlay","placementToMotionAnimationProps","placement","translateProp","startsWith","translateDirection","style","initial","opacity","scale","animate","transition","duration","ease","getFrameOffset","document","frameElement","defaultView","iframeRect","getBoundingClientRect","x","y","getFrameScale","rect","width","offsetWidth","height","offsetHeight","getReferenceOwnerDocument","anchor","anchorRef","anchorRect","getAnchorRect","fallbackReferenceElement","fallbackDocument","resultingReferenceOwnerDoc","ownerDocument","startContainer","current","getReferenceElement","referenceElement","topRect","bottomRect","window","DOMRect","parentElement"],"mappings":"AAAA;AACA;AACA;AACA;;AAIA;AACA;AACA;AAOA,MAAMA,qBAGL,GAAG;AACHC,EAAAA,MAAM,EAAE,QADL;AAEHC,EAAAA,GAAG,EAAE,KAFF;AAGH,iBAAe,MAHZ;AAIH,kBAAgB,OAJb;AAKH,iBAAe,YALZ;AAMH,mBAAiB,QANd;AAOH,kBAAgB,cAPb;AAQH,cAAY,SART;AASH,gBAAc,KATX;AAUH,eAAa,WAVV;AAWH,sBAAoB,MAXjB;AAYH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AA2B,IAA3B;AACA,CA5FM","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { MotionProps } from 'framer-motion';\nimport type { ReferenceType } from '@floating-ui/react-dom';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\n\nconst POSITION_TO_PLACEMENT: Record<\n\tNonNullable< PopoverProps[ 'position' ] >,\n\tNonNullable< PopoverProps[ 'placement' ] >\n> = {\n\tbottom: 'bottom',\n\ttop: 'top',\n\t'middle left': 'left',\n\t'middle right': 'right',\n\t'bottom left': 'bottom-end',\n\t'bottom center': 'bottom',\n\t'bottom right': 'bottom-start',\n\t'top left': 'top-end',\n\t'top center': 'top',\n\t'top right': 'top-start',\n\t'middle left left': 'left',\n\t'middle left right': 'left',\n\t'middle left bottom': 'left-end',\n\t'middle left top': 'left-start',\n\t'middle right left': 'right',\n\t'middle right right': 'right',\n\t'middle right bottom': 'right-end',\n\t'middle right top': 'right-start',\n\t'bottom left left': 'bottom-end',\n\t'bottom left right': 'bottom-end',\n\t'bottom left bottom': 'bottom-end',\n\t'bottom left top': 'bottom-end',\n\t'bottom center left': 'bottom',\n\t'bottom center right': 'bottom',\n\t'bottom center bottom': 'bottom',\n\t'bottom center top': 'bottom',\n\t'bottom right left': 'bottom-start',\n\t'bottom right right': 'bottom-start',\n\t'bottom right bottom': 'bottom-start',\n\t'bottom right top': 'bottom-start',\n\t'top left left': 'top-end',\n\t'top left right': 'top-end',\n\t'top left bottom': 'top-end',\n\t'top left top': 'top-end',\n\t'top center left': 'top',\n\t'top center right': 'top',\n\t'top center bottom': 'top',\n\t'top center top': 'top',\n\t'top right left': 'top-start',\n\t'top right right': 'top-start',\n\t'top right bottom': 'top-start',\n\t'top right top': 'top-start',\n\t// `middle`/`middle center [corner?]` positions are associated to a fallback\n\t// `bottom` placement because there aren't any corresponding placement values.\n\tmiddle: 'bottom',\n\t'middle center': 'bottom',\n\t'middle center bottom': 'bottom',\n\t'middle center left': 'bottom',\n\t'middle center right': 'bottom',\n\t'middle center top': 'bottom',\n};\n\n/**\n * Converts the `Popover`'s legacy \"position\" prop to the new \"placement\" prop\n * (used by `floating-ui`).\n *\n * @param position The legacy position\n * @return The corresponding placement\n */\nexport const positionToPlacement = (\n\tposition: NonNullable< PopoverProps[ 'position' ] >\n): NonNullable< PopoverProps[ 'placement' ] > =>\n\tPOSITION_TO_PLACEMENT[ position ] ?? 'bottom';\n\n/**\n * @typedef AnimationOrigin\n * @type {Object}\n * @property {number} originX A number between 0 and 1 (in CSS logical properties jargon, 0 is \"start\", 0.5 is \"center\", and 1 is \"end\")\n * @property {number} originY A number between 0 and 1 (0 is top, 0.5 is center, and 1 is bottom)\n */\n\nconst PLACEMENT_TO_ANIMATION_ORIGIN: Record<\n\tNonNullable< PopoverProps[ 'placement' ] >,\n\t{ originX: number; originY: number }\n> = {\n\ttop: { originX: 0.5, originY: 1 }, // open from bottom, center\n\t'top-start': { originX: 0, originY: 1 }, // open from bottom, left\n\t'top-end': { originX: 1, originY: 1 }, // open from bottom, right\n\tright: { originX: 0, originY: 0.5 }, // open from middle, left\n\t'right-start': { originX: 0, originY: 0 }, // open from top, left\n\t'right-end': { originX: 0, originY: 1 }, // open from bottom, left\n\tbottom: { originX: 0.5, originY: 0 }, // open from top, center\n\t'bottom-start': { originX: 0, originY: 0 }, // open from top, left\n\t'bottom-end': { originX: 1, originY: 0 }, // open from top, right\n\tleft: { originX: 1, originY: 0.5 }, // open from middle, right\n\t'left-start': { originX: 1, originY: 0 }, // open from top, right\n\t'left-end': { originX: 1, originY: 1 }, // open from bottom, right\n\toverlay: { originX: 0.5, originY: 0.5 }, // open from center, center\n};\n\n/**\n * Given the floating-ui `placement`, compute the framer-motion props for the\n * popover's entry animation.\n *\n * @param placement A placement string from floating ui\n * @return The object containing the motion props\n */\nexport const placementToMotionAnimationProps = (\n\tplacement: NonNullable< PopoverProps[ 'placement' ] >\n): MotionProps => {\n\tconst translateProp =\n\t\tplacement.startsWith( 'top' ) || placement.startsWith( 'bottom' )\n\t\t\t? 'translateY'\n\t\t\t: 'translateX';\n\tconst translateDirection =\n\t\tplacement.startsWith( 'top' ) || placement.startsWith( 'left' )\n\t\t\t? 1\n\t\t\t: -1;\n\n\treturn {\n\t\tstyle: PLACEMENT_TO_ANIMATION_ORIGIN[ placement ],\n\t\tinitial: {\n\t\t\topacity: 0,\n\t\t\tscale: 0,\n\t\t\t[ translateProp ]: `${ 2 * translateDirection }em`,\n\t\t},\n\t\tanimate: { opacity: 1, scale: 1, [ translateProp ]: 0 },\n\t\ttransition: { duration: 0.1, ease: [ 0, 0, 0.2, 1 ] },\n\t};\n};\n\n/**\n * Returns the offset of a document's frame element.\n *\n * @param document The iframe's owner document.\n *\n * @return The offset of the document's frame element, or undefined if the\n * document has no frame element.\n */\nexport const getFrameOffset = (\n\tdocument?: Document\n): { x: number; y: number } | undefined => {\n\tconst frameElement = document?.defaultView?.frameElement;\n\tif ( ! frameElement ) {\n\t\treturn;\n\t}\n\tconst iframeRect = frameElement.getBoundingClientRect();\n\treturn { x: iframeRect.left, y: iframeRect.top };\n};\n\nexport const getFrameScale = (\n\tdocument?: Document\n): {\n\tx: number;\n\ty: number;\n} => {\n\tconst frameElement = document?.defaultView?.frameElement as HTMLElement;\n\tif ( ! frameElement ) {\n\t\treturn { x: 1, y: 1 };\n\t}\n\tconst rect = frameElement.getBoundingClientRect();\n\treturn {\n\t\tx: rect.width / frameElement.offsetWidth,\n\t\ty: rect.height / frameElement.offsetHeight,\n\t};\n};\n\nexport const getReferenceOwnerDocument = ( {\n\tanchor,\n\tanchorRef,\n\tanchorRect,\n\tgetAnchorRect,\n\tfallbackReferenceElement,\n\tfallbackDocument,\n}: Pick<\n\tPopoverProps,\n\t'anchorRef' | 'anchorRect' | 'getAnchorRect' | 'anchor'\n> & {\n\tfallbackReferenceElement: Element | null;\n\tfallbackDocument: Document;\n} ): Document => {\n\t// In floating-ui's terms:\n\t// - \"reference\" refers to the popover's anchor element.\n\t// - \"floating\" refers the floating popover's element.\n\t// A floating element can also be positioned relative to a virtual element,\n\t// instead of a real one. A virtual element is represented by an object\n\t// with the `getBoundingClientRect()` function (like real elements).\n\t// See https://floating-ui.com/docs/virtual-elements for more info.\n\tlet resultingReferenceOwnerDoc;\n\tif ( anchor ) {\n\t\tresultingReferenceOwnerDoc = anchor.ownerDocument;\n\t} else if ( ( anchorRef as PopoverAnchorRefTopBottom | undefined )?.top ) {\n\t\tresultingReferenceOwnerDoc = ( anchorRef as PopoverAnchorRefTopBottom )\n\t\t\t?.top.ownerDocument;\n\t} else if ( ( anchorRef as Range | undefined )?.startContainer ) {\n\t\tresultingReferenceOwnerDoc = ( anchorRef as Range ).startContainer\n\t\t\t.ownerDocument;\n\t} else if (\n\t\t( anchorRef as PopoverAnchorRefReference | undefined )?.current\n\t) {\n\t\tresultingReferenceOwnerDoc = (\n\t\t\t( anchorRef as PopoverAnchorRefReference ).current as Element\n\t\t ).ownerDocument;\n\t} else if ( anchorRef as Element | undefined ) {\n\t\t// This one should be deprecated.\n\t\tresultingReferenceOwnerDoc = ( anchorRef as Element ).ownerDocument;\n\t} else if ( anchorRect && anchorRect?.ownerDocument ) {\n\t\tresultingReferenceOwnerDoc = anchorRect.ownerDocument;\n\t} else if ( getAnchorRect ) {\n\t\tresultingReferenceOwnerDoc = getAnchorRect(\n\t\t\tfallbackReferenceElement\n\t\t)?.ownerDocument;\n\t}\n\n\treturn resultingReferenceOwnerDoc ?? fallbackDocument;\n};\n\nexport const getReferenceElement = ( {\n\tanchor,\n\tanchorRef,\n\tanchorRect,\n\tgetAnchorRect,\n\tfallbackReferenceElement,\n\tscale,\n}: Pick<\n\tPopoverProps,\n\t'anchorRef' | 'anchorRect' | 'getAnchorRect' | 'anchor'\n> & {\n\tfallbackReferenceElement: Element | null;\n\tscale: { x: number; y: number };\n} ): ReferenceType | null => {\n\tlet referenceElement = null;\n\n\tif ( anchor ) {\n\t\treferenceElement = anchor;\n\t} else if ( ( anchorRef as PopoverAnchorRefTopBottom | undefined )?.top ) {\n\t\t// Create a virtual element for the ref. The expectation is that\n\t\t// if anchorRef.top is defined, then anchorRef.bottom is defined too.\n\t\t// Seems to be used by the block toolbar, when multiple blocks are selected\n\t\t// (top and bottom blocks are used to calculate the resulting rect).\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst topRect = (\n\t\t\t\t\tanchorRef as PopoverAnchorRefTopBottom\n\t\t\t\t ).top.getBoundingClientRect();\n\t\t\t\tconst bottomRect = (\n\t\t\t\t\tanchorRef as PopoverAnchorRefTopBottom\n\t\t\t\t ).bottom.getBoundingClientRect();\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\ttopRect.x,\n\t\t\t\t\ttopRect.y,\n\t\t\t\t\ttopRect.width,\n\t\t\t\t\tbottomRect.bottom - topRect.top\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t} else if (\n\t\t( anchorRef as PopoverAnchorRefReference | undefined )?.current\n\t) {\n\t\t// Standard React ref.\n\t\treferenceElement = ( anchorRef as PopoverAnchorRefReference ).current;\n\t} else if ( anchorRef as Element | undefined ) {\n\t\t// If `anchorRef` holds directly the element's value (no `current` key)\n\t\t// This is a weird scenario and should be deprecated.\n\t\treferenceElement = anchorRef as Element;\n\t} else if ( anchorRect ) {\n\t\t// Create a virtual element for the ref.\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn anchorRect;\n\t\t\t},\n\t\t};\n\t} else if ( getAnchorRect ) {\n\t\t// Create a virtual element for the ref.\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst rect = getAnchorRect( fallbackReferenceElement );\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\trect.x ?? rect.left,\n\t\t\t\t\trect.y ?? rect.top,\n\t\t\t\t\trect.width ?? rect.right - rect.left,\n\t\t\t\t\trect.height ?? rect.bottom - rect.top\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t} else if ( fallbackReferenceElement ) {\n\t\t// If no explicit ref is passed via props, fall back to\n\t\t// anchoring to the popover's parent node.\n\t\treferenceElement = fallbackReferenceElement.parentElement;\n\t}\n\n\tif ( referenceElement && ( scale.x !== 1 || scale.y !== 1 ) ) {\n\t\t// If the popover is inside an iframe, the coordinates of the\n\t\t// reference element need to be scaled to match the iframe's scale.\n\t\tconst rect = referenceElement.getBoundingClientRect();\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\trect.x * scale.x,\n\t\t\t\t\trect.y * scale.y,\n\t\t\t\t\trect.width * scale.x,\n\t\t\t\t\trect.height * scale.y\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t}\n\n\t// Convert any `undefined` value to `null`.\n\treturn referenceElement ?? null;\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/popover/utils.ts"],"names":["POSITION_TO_PLACEMENT","bottom","top","middle","positionToPlacement","position","PLACEMENT_TO_ANIMATION_ORIGIN","originX","originY","right","left","overlay","placementToMotionAnimationProps","placement","translateProp","startsWith","translateDirection","style","initial","opacity","scale","animate","transition","duration","ease","getFrameOffset","document","frameElement","defaultView","iframeRect","getBoundingClientRect","x","y","getFrameScale","rect","width","offsetWidth","height","offsetHeight","getReferenceOwnerDocument","anchor","anchorRef","anchorRect","getAnchorRect","fallbackReferenceElement","fallbackDocument","resultingReferenceOwnerDoc","ownerDocument","startContainer","current","getReferenceElement","referenceElement","topRect","bottomRect","window","DOMRect","parentElement","computePopoverPosition","c","Number","isNaN","undefined","Math","round"],"mappings":"AAAA;AACA;AACA;AACA;;AAIA;AACA;AACA;AAOA,MAAMA,qBAGL,GAAG;AACHC,EAAAA,MAAM,EAAE,QADL;AAEHC,EAAAA,GAAG,EAAE,KAFF;AAGH,iBAAe,MAHZ;AAIH,kBAAgB,OAJb;AAKH,iBAAe,YALZ;AAMH,mBAAiB,QANd;AA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,KAAK,CAACY,CAJd,CAAP;AAMA;;AARiB,KAAnB;AAUA,GA3E2B,CA6E5B;;;AACA,8BAAOmB,gBAAP,iEAA2B,IAA3B;AACA,CA5FM;AA8FP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMM,sBAAsB,GAAKC,CAAF,IACrCA,CAAC,KAAK,IAAN,IAAcC,MAAM,CAACC,KAAP,CAAcF,CAAd,CAAd,GAAkCG,SAAlC,GAA8CC,IAAI,CAACC,KAAL,CAAYL,CAAZ,CADxC","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { MotionProps } from 'framer-motion';\nimport type { ReferenceType } from '@floating-ui/react-dom';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\n\nconst POSITION_TO_PLACEMENT: Record<\n\tNonNullable< PopoverProps[ 'position' ] >,\n\tNonNullable< PopoverProps[ 'placement' ] >\n> = {\n\tbottom: 'bottom',\n\ttop: 'top',\n\t'middle left': 'left',\n\t'middle right': 'right',\n\t'bottom left': 'bottom-end',\n\t'bottom center': 'bottom',\n\t'bottom right': 'bottom-start',\n\t'top left': 'top-end',\n\t'top center': 'top',\n\t'top right': 'top-start',\n\t'middle left left': 'left',\n\t'middle left right': 'left',\n\t'middle left bottom': 'left-end',\n\t'middle left top': 'left-start',\n\t'middle right left': 'right',\n\t'middle right right': 'right',\n\t'middle right bottom': 'right-end',\n\t'middle right top': 'right-start',\n\t'bottom left left': 'bottom-end',\n\t'bottom left right': 'bottom-end',\n\t'bottom left bottom': 'bottom-end',\n\t'bottom left top': 'bottom-end',\n\t'bottom center left': 'bottom',\n\t'bottom center right': 'bottom',\n\t'bottom center bottom': 'bottom',\n\t'bottom center top': 'bottom',\n\t'bottom right left': 'bottom-start',\n\t'bottom right right': 'bottom-start',\n\t'bottom right bottom': 'bottom-start',\n\t'bottom right top': 'bottom-start',\n\t'top left left': 'top-end',\n\t'top left right': 'top-end',\n\t'top left bottom': 'top-end',\n\t'top left top': 'top-end',\n\t'top center left': 'top',\n\t'top center right': 'top',\n\t'top center bottom': 'top',\n\t'top center top': 'top',\n\t'top right left': 'top-start',\n\t'top right right': 'top-start',\n\t'top right bottom': 'top-start',\n\t'top right top': 'top-start',\n\t// `middle`/`middle center [corner?]` positions are associated to a fallback\n\t// `bottom` placement because there aren't any corresponding placement values.\n\tmiddle: 'bottom',\n\t'middle center': 'bottom',\n\t'middle center bottom': 'bottom',\n\t'middle center left': 'bottom',\n\t'middle center right': 'bottom',\n\t'middle center top': 'bottom',\n};\n\n/**\n * Converts the `Popover`'s legacy \"position\" prop to the new \"placement\" prop\n * (used by `floating-ui`).\n *\n * @param position The legacy position\n * @return The corresponding placement\n */\nexport const positionToPlacement = (\n\tposition: NonNullable< PopoverProps[ 'position' ] >\n): NonNullable< PopoverProps[ 'placement' ] > =>\n\tPOSITION_TO_PLACEMENT[ position ] ?? 'bottom';\n\n/**\n * @typedef AnimationOrigin\n * @type {Object}\n * @property {number} originX A number between 0 and 1 (in CSS logical properties jargon, 0 is \"start\", 0.5 is \"center\", and 1 is \"end\")\n * @property {number} originY A number between 0 and 1 (0 is top, 0.5 is center, and 1 is bottom)\n */\n\nconst PLACEMENT_TO_ANIMATION_ORIGIN: Record<\n\tNonNullable< PopoverProps[ 'placement' ] >,\n\t{ originX: number; originY: number }\n> = {\n\ttop: { originX: 0.5, originY: 1 }, // open from bottom, center\n\t'top-start': { originX: 0, originY: 1 }, // open from bottom, left\n\t'top-end': { originX: 1, originY: 1 }, // open from bottom, right\n\tright: { originX: 0, originY: 0.5 }, // open from middle, left\n\t'right-start': { originX: 0, originY: 0 }, // open from top, left\n\t'right-end': { originX: 0, originY: 1 }, // open from bottom, left\n\tbottom: { originX: 0.5, originY: 0 }, // open from top, center\n\t'bottom-start': { originX: 0, originY: 0 }, // open from top, left\n\t'bottom-end': { originX: 1, originY: 0 }, // open from top, right\n\tleft: { originX: 1, originY: 0.5 }, // open from middle, right\n\t'left-start': { originX: 1, originY: 0 }, // open from top, right\n\t'left-end': { originX: 1, originY: 1 }, // open from bottom, right\n\toverlay: { originX: 0.5, originY: 0.5 }, // open from center, center\n};\n\n/**\n * Given the floating-ui `placement`, compute the framer-motion props for the\n * popover's entry animation.\n *\n * @param placement A placement string from floating ui\n * @return The object containing the motion props\n */\nexport const placementToMotionAnimationProps = (\n\tplacement: NonNullable< PopoverProps[ 'placement' ] >\n): MotionProps => {\n\tconst translateProp =\n\t\tplacement.startsWith( 'top' ) || placement.startsWith( 'bottom' )\n\t\t\t? 'translateY'\n\t\t\t: 'translateX';\n\tconst translateDirection =\n\t\tplacement.startsWith( 'top' ) || placement.startsWith( 'left' )\n\t\t\t? 1\n\t\t\t: -1;\n\n\treturn {\n\t\tstyle: PLACEMENT_TO_ANIMATION_ORIGIN[ placement ],\n\t\tinitial: {\n\t\t\topacity: 0,\n\t\t\tscale: 0,\n\t\t\t[ translateProp ]: `${ 2 * translateDirection }em`,\n\t\t},\n\t\tanimate: { opacity: 1, scale: 1, [ translateProp ]: 0 },\n\t\ttransition: { duration: 0.1, ease: [ 0, 0, 0.2, 1 ] },\n\t};\n};\n\n/**\n * Returns the offset of a document's frame element.\n *\n * @param document The iframe's owner document.\n *\n * @return The offset of the document's frame element, or undefined if the\n * document has no frame element.\n */\nexport const getFrameOffset = (\n\tdocument?: Document\n): { x: number; y: number } | undefined => {\n\tconst frameElement = document?.defaultView?.frameElement;\n\tif ( ! frameElement ) {\n\t\treturn;\n\t}\n\tconst iframeRect = frameElement.getBoundingClientRect();\n\treturn { x: iframeRect.left, y: iframeRect.top };\n};\n\nexport const getFrameScale = (\n\tdocument?: Document\n): {\n\tx: number;\n\ty: number;\n} => {\n\tconst frameElement = document?.defaultView?.frameElement as HTMLElement;\n\tif ( ! frameElement ) {\n\t\treturn { x: 1, y: 1 };\n\t}\n\tconst rect = frameElement.getBoundingClientRect();\n\treturn {\n\t\tx: rect.width / frameElement.offsetWidth,\n\t\ty: rect.height / frameElement.offsetHeight,\n\t};\n};\n\nexport const getReferenceOwnerDocument = ( {\n\tanchor,\n\tanchorRef,\n\tanchorRect,\n\tgetAnchorRect,\n\tfallbackReferenceElement,\n\tfallbackDocument,\n}: Pick<\n\tPopoverProps,\n\t'anchorRef' | 'anchorRect' | 'getAnchorRect' | 'anchor'\n> & {\n\tfallbackReferenceElement: Element | null;\n\tfallbackDocument: Document;\n} ): Document => {\n\t// In floating-ui's terms:\n\t// - \"reference\" refers to the popover's anchor element.\n\t// - \"floating\" refers the floating popover's element.\n\t// A floating element can also be positioned relative to a virtual element,\n\t// instead of a real one. A virtual element is represented by an object\n\t// with the `getBoundingClientRect()` function (like real elements).\n\t// See https://floating-ui.com/docs/virtual-elements for more info.\n\tlet resultingReferenceOwnerDoc;\n\tif ( anchor ) {\n\t\tresultingReferenceOwnerDoc = anchor.ownerDocument;\n\t} else if ( ( anchorRef as PopoverAnchorRefTopBottom | undefined )?.top ) {\n\t\tresultingReferenceOwnerDoc = ( anchorRef as PopoverAnchorRefTopBottom )\n\t\t\t?.top.ownerDocument;\n\t} else if ( ( anchorRef as Range | undefined )?.startContainer ) {\n\t\tresultingReferenceOwnerDoc = ( anchorRef as Range ).startContainer\n\t\t\t.ownerDocument;\n\t} else if (\n\t\t( anchorRef as PopoverAnchorRefReference | undefined )?.current\n\t) {\n\t\tresultingReferenceOwnerDoc = (\n\t\t\t( anchorRef as PopoverAnchorRefReference ).current as Element\n\t\t ).ownerDocument;\n\t} else if ( anchorRef as Element | undefined ) {\n\t\t// This one should be deprecated.\n\t\tresultingReferenceOwnerDoc = ( anchorRef as Element ).ownerDocument;\n\t} else if ( anchorRect && anchorRect?.ownerDocument ) {\n\t\tresultingReferenceOwnerDoc = anchorRect.ownerDocument;\n\t} else if ( getAnchorRect ) {\n\t\tresultingReferenceOwnerDoc = getAnchorRect(\n\t\t\tfallbackReferenceElement\n\t\t)?.ownerDocument;\n\t}\n\n\treturn resultingReferenceOwnerDoc ?? fallbackDocument;\n};\n\nexport const getReferenceElement = ( {\n\tanchor,\n\tanchorRef,\n\tanchorRect,\n\tgetAnchorRect,\n\tfallbackReferenceElement,\n\tscale,\n}: Pick<\n\tPopoverProps,\n\t'anchorRef' | 'anchorRect' | 'getAnchorRect' | 'anchor'\n> & {\n\tfallbackReferenceElement: Element | null;\n\tscale: { x: number; y: number };\n} ): ReferenceType | null => {\n\tlet referenceElement = null;\n\n\tif ( anchor ) {\n\t\treferenceElement = anchor;\n\t} else if ( ( anchorRef as PopoverAnchorRefTopBottom | undefined )?.top ) {\n\t\t// Create a virtual element for the ref. The expectation is that\n\t\t// if anchorRef.top is defined, then anchorRef.bottom is defined too.\n\t\t// Seems to be used by the block toolbar, when multiple blocks are selected\n\t\t// (top and bottom blocks are used to calculate the resulting rect).\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst topRect = (\n\t\t\t\t\tanchorRef as PopoverAnchorRefTopBottom\n\t\t\t\t ).top.getBoundingClientRect();\n\t\t\t\tconst bottomRect = (\n\t\t\t\t\tanchorRef as PopoverAnchorRefTopBottom\n\t\t\t\t ).bottom.getBoundingClientRect();\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\ttopRect.x,\n\t\t\t\t\ttopRect.y,\n\t\t\t\t\ttopRect.width,\n\t\t\t\t\tbottomRect.bottom - topRect.top\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t} else if (\n\t\t( anchorRef as PopoverAnchorRefReference | undefined )?.current\n\t) {\n\t\t// Standard React ref.\n\t\treferenceElement = ( anchorRef as PopoverAnchorRefReference ).current;\n\t} else if ( anchorRef as Element | undefined ) {\n\t\t// If `anchorRef` holds directly the element's value (no `current` key)\n\t\t// This is a weird scenario and should be deprecated.\n\t\treferenceElement = anchorRef as Element;\n\t} else if ( anchorRect ) {\n\t\t// Create a virtual element for the ref.\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn anchorRect;\n\t\t\t},\n\t\t};\n\t} else if ( getAnchorRect ) {\n\t\t// Create a virtual element for the ref.\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst rect = getAnchorRect( fallbackReferenceElement );\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\trect.x ?? rect.left,\n\t\t\t\t\trect.y ?? rect.top,\n\t\t\t\t\trect.width ?? rect.right - rect.left,\n\t\t\t\t\trect.height ?? rect.bottom - rect.top\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t} else if ( fallbackReferenceElement ) {\n\t\t// If no explicit ref is passed via props, fall back to\n\t\t// anchoring to the popover's parent node.\n\t\treferenceElement = fallbackReferenceElement.parentElement;\n\t}\n\n\tif ( referenceElement && ( scale.x !== 1 || scale.y !== 1 ) ) {\n\t\t// If the popover is inside an iframe, the coordinates of the\n\t\t// reference element need to be scaled to match the iframe's scale.\n\t\tconst rect = referenceElement.getBoundingClientRect();\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\trect.x * scale.x,\n\t\t\t\t\trect.y * scale.y,\n\t\t\t\t\trect.width * scale.x,\n\t\t\t\t\trect.height * scale.y\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t}\n\n\t// Convert any `undefined` value to `null`.\n\treturn referenceElement ?? null;\n};\n\n/**\n * Computes the final coordinate that needs to be applied to the floating\n * element when applying transform inline styles, defaulting to `undefined`\n * if the provided value is `null` or `NaN`.\n *\n * @param c input coordinate (usually as returned from floating-ui)\n * @return The coordinate's value to be used for inline styles. An `undefined`\n * return value means \"no style set\" for this coordinate.\n */\nexport const computePopoverPosition = ( c: number | null ) =>\n\tc === null || Number.isNaN( c ) ? undefined : Math.round( c );\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -22,14 +21,14 @@ export default function CategorySelect({
22
21
  const termsTree = useMemo(() => {
23
22
  return buildTermsTree(categoriesList);
24
23
  }, [categoriesList]);
25
- return createElement(TreeSelect, _extends({
24
+ return createElement(TreeSelect, {
26
25
  label,
27
26
  noOptionLabel,
28
27
  onChange: onChangeProp,
29
28
  tree: termsTree,
30
- selectedId: selectedCategoryId !== undefined ? String(selectedCategoryId) : undefined
31
- }, props, {
29
+ selectedId: selectedCategoryId !== undefined ? String(selectedCategoryId) : undefined,
30
+ ...props,
32
31
  __nextHasNoMarginBottom: true
33
- }));
32
+ });
34
33
  }
35
34
  //# sourceMappingURL=category-select.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/query-controls/category-select.tsx"],"names":["buildTermsTree","TreeSelect","useMemo","CategorySelect","label","noOptionLabel","categoriesList","selectedCategoryId","onChange","onChangeProp","props","termsTree","undefined","String"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,SAA/B;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AAEA;AACA;AACA;;AACA,SAASC,OAAT,QAAwB,oBAAxB;AAGA,eAAe,SAASC,cAAT,CAAyB;AACvCC,EAAAA,KADuC;AAEvCC,EAAAA,aAFuC;AAGvCC,EAAAA,cAHuC;AAIvCC,EAAAA,kBAJuC;AAKvCC,EAAAA,QAAQ,EAAEC,YAL6B;AAMvC,KAAGC;AANoC,CAAzB,EAOU;AACxB,QAAMC,SAAS,GAAGT,OAAO,CAAE,MAAM;AAChC,WAAOF,cAAc,CAAEM,cAAF,CAArB;AACA,GAFwB,EAEtB,CAAEA,cAAF,CAFsB,CAAzB;AAIA,SACC,cAAC,UAAD;AAEEF,IAAAA,KAFF;AAGEC,IAAAA,aAHF;AAIEG,IAAAA,QAAQ,EAAEC,YAJZ;AAMC,IAAA,IAAI,EAAGE,SANR;AAOC,IAAA,UAAU,EACTJ,kBAAkB,KAAKK,SAAvB,GACGC,MAAM,CAAEN,kBAAF,CADT,GAEGK;AAVL,KAYMF,KAZN;AAaC,IAAA,uBAAuB;AAbxB,KADD;AAiBA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { buildTermsTree } from './terms';\nimport TreeSelect from '../tree-select';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport type { CategorySelectProps } from './types';\n\nexport default function CategorySelect( {\n\tlabel,\n\tnoOptionLabel,\n\tcategoriesList,\n\tselectedCategoryId,\n\tonChange: onChangeProp,\n\t...props\n}: CategorySelectProps ) {\n\tconst termsTree = useMemo( () => {\n\t\treturn buildTermsTree( categoriesList );\n\t}, [ categoriesList ] );\n\n\treturn (\n\t\t<TreeSelect\n\t\t\t{ ...{\n\t\t\t\tlabel,\n\t\t\t\tnoOptionLabel,\n\t\t\t\tonChange: onChangeProp,\n\t\t\t} }\n\t\t\ttree={ termsTree }\n\t\t\tselectedId={\n\t\t\t\tselectedCategoryId !== undefined\n\t\t\t\t\t? String( selectedCategoryId )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\t{ ...props }\n\t\t\t__nextHasNoMarginBottom\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/query-controls/category-select.tsx"],"names":["buildTermsTree","TreeSelect","useMemo","CategorySelect","label","noOptionLabel","categoriesList","selectedCategoryId","onChange","onChangeProp","props","termsTree","undefined","String"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,cAAT,QAA+B,SAA/B;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AAEA;AACA;AACA;;AACA,SAASC,OAAT,QAAwB,oBAAxB;AAGA,eAAe,SAASC,cAAT,CAAyB;AACvCC,EAAAA,KADuC;AAEvCC,EAAAA,aAFuC;AAGvCC,EAAAA,cAHuC;AAIvCC,EAAAA,kBAJuC;AAKvCC,EAAAA,QAAQ,EAAEC,YAL6B;AAMvC,KAAGC;AANoC,CAAzB,EAOU;AACxB,QAAMC,SAAS,GAAGT,OAAO,CAAE,MAAM;AAChC,WAAOF,cAAc,CAAEM,cAAF,CAArB;AACA,GAFwB,EAEtB,CAAEA,cAAF,CAFsB,CAAzB;AAIA,SACC,cAAC,UAAD;AAEEF,IAAAA,KAFF;AAGEC,IAAAA,aAHF;AAIEG,IAAAA,QAAQ,EAAEC,YAJZ;AAMC,IAAA,IAAI,EAAGE,SANR;AAOC,IAAA,UAAU,EACTJ,kBAAkB,KAAKK,SAAvB,GACGC,MAAM,CAAEN,kBAAF,CADT,GAEGK,SAVL;AAAA,OAYMF,KAZN;AAaC,IAAA,uBAAuB;AAbxB,IADD;AAiBA","sourcesContent":["/**\n * Internal dependencies\n */\nimport { buildTermsTree } from './terms';\nimport TreeSelect from '../tree-select';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\nimport type { CategorySelectProps } from './types';\n\nexport default function CategorySelect( {\n\tlabel,\n\tnoOptionLabel,\n\tcategoriesList,\n\tselectedCategoryId,\n\tonChange: onChangeProp,\n\t...props\n}: CategorySelectProps ) {\n\tconst termsTree = useMemo( () => {\n\t\treturn buildTermsTree( categoriesList );\n\t}, [ categoriesList ] );\n\n\treturn (\n\t\t<TreeSelect\n\t\t\t{ ...{\n\t\t\t\tlabel,\n\t\t\t\tnoOptionLabel,\n\t\t\t\tonChange: onChangeProp,\n\t\t\t} }\n\t\t\ttree={ termsTree }\n\t\t\tselectedId={\n\t\t\t\tselectedCategoryId !== undefined\n\t\t\t\t\t? String( selectedCategoryId )\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\t{ ...props }\n\t\t\t__nextHasNoMarginBottom\n\t\t/>\n\t);\n}\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -74,7 +73,7 @@ export function RadioControl(props) {
74
73
  }, options.map((option, index) => createElement("div", {
75
74
  key: `${id}-${index}`,
76
75
  className: "components-radio-control__option"
77
- }, createElement("input", _extends({
76
+ }, createElement("input", {
78
77
  id: `${id}-${index}`,
79
78
  className: "components-radio-control__input",
80
79
  type: "radio",
@@ -82,8 +81,9 @@ export function RadioControl(props) {
82
81
  value: option.value,
83
82
  onChange: onChangeValue,
84
83
  checked: option.value === selected,
85
- "aria-describedby": !!help ? `${id}__help` : undefined
86
- }, additionalProps)), createElement("label", {
84
+ "aria-describedby": !!help ? `${id}__help` : undefined,
85
+ ...additionalProps
86
+ }), createElement("label", {
87
87
  htmlFor: `${id}-${index}`
88
88
  }, option.label)))));
89
89
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/radio-control/index.tsx"],"names":["classnames","useInstanceId","BaseControl","VStack","RadioControl","props","label","className","selected","help","onChange","hideLabelFromVision","options","additionalProps","instanceId","id","onChangeValue","event","target","value","length","map","option","index","undefined"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;;AAGA;AACA;AACA;AACA,SAASC,aAAT,QAA8B,oBAA9B;AAEA;AACA;AACA;;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AAGA,SAASC,MAAT,QAAuB,YAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,YAAT,CACNC,KADM,EAEL;AACD,QAAM;AACLC,IAAAA,KADK;AAELC,IAAAA,SAFK;AAGLC,IAAAA,QAHK;AAILC,IAAAA,IAJK;AAKLC,IAAAA,QALK;AAMLC,IAAAA,mBANK;AAOLC,IAAAA,OAAO,GAAG,EAPL;AAQL,OAAGC;AARE,MASFR,KATJ;AAUA,QAAMS,UAAU,GAAGb,aAAa,CAAEG,YAAF,CAAhC;AACA,QAAMW,EAAE,GAAI,2BAA2BD,UAAY,EAAnD;;AACA,QAAME,aAAa,GAAKC,KAAF,IACrBP,QAAQ,CAAEO,KAAK,CAACC,MAAN,CAAaC,KAAf,CADT;;AAGA,MAAK,CAAEP,OAAO,EAAEQ,MAAhB,EAAyB;AACxB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,WAAD;AACC,IAAA,uBAAuB,MADxB;AAEC,IAAA,KAAK,EAAGd,KAFT;AAGC,IAAA,EAAE,EAAGS,EAHN;AAIC,IAAA,mBAAmB,EAAGJ,mBAJvB;AAKC,IAAA,IAAI,EAAGF,IALR;AAMC,IAAA,SAAS,EAAGT,UAAU,CAAEO,SAAF,EAAa,0BAAb;AANvB,KAQC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACGK,OAAO,CAACS,GAAR,CAAa,CAAEC,MAAF,EAAUC,KAAV,KACd;AACC,IAAA,GAAG,EAAI,GAAGR,EAAI,IAAIQ,KAAO,EAD1B;AAEC,IAAA,SAAS,EAAC;AAFX,KAIC;AACC,IAAA,EAAE,EAAI,GAAGR,EAAI,IAAIQ,KAAO,EADzB;AAEC,IAAA,SAAS,EAAC,iCAFX;AAGC,IAAA,IAAI,EAAC,OAHN;AAIC,IAAA,IAAI,EAAGR,EAJR;AAKC,IAAA,KAAK,EAAGO,MAAM,CAACH,KALhB;AAMC,IAAA,QAAQ,EAAGH,aANZ;AAOC,IAAA,OAAO,EAAGM,MAAM,CAACH,KAAP,KAAiBX,QAP5B;AAQC,wBACC,CAAC,CAAEC,IAAH,GAAW,GAAGM,EAAI,QAAlB,GAA4BS;AAT9B,KAWMX,eAXN,EAJD,EAiBC;AAAO,IAAA,OAAO,EAAI,GAAGE,EAAI,IAAIQ,KAAO;AAApC,KACGD,MAAM,CAAChB,KADV,CAjBD,CADC,CADH,CARD,CADD;AAoCA;AAED,eAAeF,YAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { RadioControlProps } from './types';\nimport { VStack } from '../v-stack';\n\n/**\n * Render a user interface to select the user type using radio inputs.\n *\n * ```jsx\n * import { RadioControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRadioControl = () => {\n * const [ option, setOption ] = useState( 'a' );\n *\n * return (\n * <RadioControl\n * label=\"User type\"\n * help=\"The type of the current user\"\n * selected={ option }\n * options={ [\n * { label: 'Author', value: 'a' },\n * { label: 'Editor', value: 'e' },\n * ] }\n * onChange={ ( value ) => setOption( value ) }\n * />\n * );\n * };\n * ```\n */\nexport function RadioControl(\n\tprops: WordPressComponentProps< RadioControlProps, 'input', false >\n) {\n\tconst {\n\t\tlabel,\n\t\tclassName,\n\t\tselected,\n\t\thelp,\n\t\tonChange,\n\t\thideLabelFromVision,\n\t\toptions = [],\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( RadioControl );\n\tconst id = `inspector-radio-control-${ instanceId }`;\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\tif ( ! options?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ label }\n\t\t\tid={ id }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\thelp={ help }\n\t\t\tclassName={ classnames( className, 'components-radio-control' ) }\n\t\t>\n\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t{ options.map( ( option, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ `${ id }-${ index }` }\n\t\t\t\t\t\tclassName=\"components-radio-control__option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={ `${ id }-${ index }` }\n\t\t\t\t\t\t\tclassName=\"components-radio-control__input\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ id }\n\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\t\tchecked={ option.value === selected }\n\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t!! help ? `${ id }__help` : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label htmlFor={ `${ id }-${ index }` }>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default RadioControl;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/radio-control/index.tsx"],"names":["classnames","useInstanceId","BaseControl","VStack","RadioControl","props","label","className","selected","help","onChange","hideLabelFromVision","options","additionalProps","instanceId","id","onChangeValue","event","target","value","length","map","option","index","undefined"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;;AAGA;AACA;AACA;AACA,SAASC,aAAT,QAA8B,oBAA9B;AAEA;AACA;AACA;;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AAGA,SAASC,MAAT,QAAuB,YAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,YAAT,CACNC,KADM,EAEL;AACD,QAAM;AACLC,IAAAA,KADK;AAELC,IAAAA,SAFK;AAGLC,IAAAA,QAHK;AAILC,IAAAA,IAJK;AAKLC,IAAAA,QALK;AAMLC,IAAAA,mBANK;AAOLC,IAAAA,OAAO,GAAG,EAPL;AAQL,OAAGC;AARE,MASFR,KATJ;AAUA,QAAMS,UAAU,GAAGb,aAAa,CAAEG,YAAF,CAAhC;AACA,QAAMW,EAAE,GAAI,2BAA2BD,UAAY,EAAnD;;AACA,QAAME,aAAa,GAAKC,KAAF,IACrBP,QAAQ,CAAEO,KAAK,CAACC,MAAN,CAAaC,KAAf,CADT;;AAGA,MAAK,CAAEP,OAAO,EAAEQ,MAAhB,EAAyB;AACxB,WAAO,IAAP;AACA;;AAED,SACC,cAAC,WAAD;AACC,IAAA,uBAAuB,MADxB;AAEC,IAAA,KAAK,EAAGd,KAFT;AAGC,IAAA,EAAE,EAAGS,EAHN;AAIC,IAAA,mBAAmB,EAAGJ,mBAJvB;AAKC,IAAA,IAAI,EAAGF,IALR;AAMC,IAAA,SAAS,EAAGT,UAAU,CAAEO,SAAF,EAAa,0BAAb;AANvB,KAQC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACGK,OAAO,CAACS,GAAR,CAAa,CAAEC,MAAF,EAAUC,KAAV,KACd;AACC,IAAA,GAAG,EAAI,GAAGR,EAAI,IAAIQ,KAAO,EAD1B;AAEC,IAAA,SAAS,EAAC;AAFX,KAIC;AACC,IAAA,EAAE,EAAI,GAAGR,EAAI,IAAIQ,KAAO,EADzB;AAEC,IAAA,SAAS,EAAC,iCAFX;AAGC,IAAA,IAAI,EAAC,OAHN;AAIC,IAAA,IAAI,EAAGR,EAJR;AAKC,IAAA,KAAK,EAAGO,MAAM,CAACH,KALhB;AAMC,IAAA,QAAQ,EAAGH,aANZ;AAOC,IAAA,OAAO,EAAGM,MAAM,CAACH,KAAP,KAAiBX,QAP5B;AAQC,wBACC,CAAC,CAAEC,IAAH,GAAW,GAAGM,EAAI,QAAlB,GAA4BS,SAT9B;AAAA,OAWMX;AAXN,IAJD,EAiBC;AAAO,IAAA,OAAO,EAAI,GAAGE,EAAI,IAAIQ,KAAO;AAApC,KACGD,MAAM,CAAChB,KADV,CAjBD,CADC,CADH,CARD,CADD;AAoCA;AAED,eAAeF,YAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { RadioControlProps } from './types';\nimport { VStack } from '../v-stack';\n\n/**\n * Render a user interface to select the user type using radio inputs.\n *\n * ```jsx\n * import { RadioControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRadioControl = () => {\n * const [ option, setOption ] = useState( 'a' );\n *\n * return (\n * <RadioControl\n * label=\"User type\"\n * help=\"The type of the current user\"\n * selected={ option }\n * options={ [\n * { label: 'Author', value: 'a' },\n * { label: 'Editor', value: 'e' },\n * ] }\n * onChange={ ( value ) => setOption( value ) }\n * />\n * );\n * };\n * ```\n */\nexport function RadioControl(\n\tprops: WordPressComponentProps< RadioControlProps, 'input', false >\n) {\n\tconst {\n\t\tlabel,\n\t\tclassName,\n\t\tselected,\n\t\thelp,\n\t\tonChange,\n\t\thideLabelFromVision,\n\t\toptions = [],\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( RadioControl );\n\tconst id = `inspector-radio-control-${ instanceId }`;\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\tif ( ! options?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom\n\t\t\tlabel={ label }\n\t\t\tid={ id }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\thelp={ help }\n\t\t\tclassName={ classnames( className, 'components-radio-control' ) }\n\t\t>\n\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t{ options.map( ( option, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ `${ id }-${ index }` }\n\t\t\t\t\t\tclassName=\"components-radio-control__option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={ `${ id }-${ index }` }\n\t\t\t\t\t\t\tclassName=\"components-radio-control__input\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ id }\n\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\t\tchecked={ option.value === selected }\n\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t!! help ? `${ id }__help` : undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label htmlFor={ `${ id }-${ index }` }>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default RadioControl;\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement, Fragment } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -13,12 +12,13 @@ function RadioControl({
13
12
  ...props
14
13
  }) {
15
14
  return createElement(Fragment, null, options.map((option, index) => {
16
- return createElement(RadioCell, _extends({
15
+ return createElement(RadioCell, {
17
16
  label: option.label,
18
17
  onPress: () => onChange(option.value),
19
18
  selected: option.value === selected,
20
- key: `${option.value}-${index}`
21
- }, props));
19
+ key: `${option.value}-${index}`,
20
+ ...props
21
+ });
22
22
  }));
23
23
  }
24
24
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/radio-control/index.native.js"],"names":["RadioCell","RadioControl","onChange","selected","options","props","map","option","index","label","value"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,SAAP,MAAsB,mCAAtB;;AAEA,SAASC,YAAT,CAAuB;AAAEC,EAAAA,QAAF;AAAYC,EAAAA,QAAZ;AAAsBC,EAAAA,OAAO,GAAG,EAAhC;AAAoC,KAAGC;AAAvC,CAAvB,EAAwE;AACvE,SACC,8BACGD,OAAO,CAACE,GAAR,CAAa,CAAEC,MAAF,EAAUC,KAAV,KAAqB;AACnC,WACC,cAAC,SAAD;AACC,MAAA,KAAK,EAAGD,MAAM,CAACE,KADhB;AAEC,MAAA,OAAO,EAAG,MAAMP,QAAQ,CAAEK,MAAM,CAACG,KAAT,CAFzB;AAGC,MAAA,QAAQ,EAAGH,MAAM,CAACG,KAAP,KAAiBP,QAH7B;AAIC,MAAA,GAAG,EAAI,GAAGI,MAAM,CAACG,KAAO,IAAIF,KAAO;AAJpC,OAKMH,KALN,EADD;AASA,GAVC,CADH,CADD;AAeA;;AAED,eAAeJ,YAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport RadioCell from '../mobile/bottom-sheet/radio-cell';\n\nfunction RadioControl( { onChange, selected, options = [], ...props } ) {\n\treturn (\n\t\t<>\n\t\t\t{ options.map( ( option, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<RadioCell\n\t\t\t\t\t\tlabel={ option.label }\n\t\t\t\t\t\tonPress={ () => onChange( option.value ) }\n\t\t\t\t\t\tselected={ option.value === selected }\n\t\t\t\t\t\tkey={ `${ option.value }-${ index }` }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n}\n\nexport default RadioControl;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/radio-control/index.native.js"],"names":["RadioCell","RadioControl","onChange","selected","options","props","map","option","index","label","value"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,SAAP,MAAsB,mCAAtB;;AAEA,SAASC,YAAT,CAAuB;AAAEC,EAAAA,QAAF;AAAYC,EAAAA,QAAZ;AAAsBC,EAAAA,OAAO,GAAG,EAAhC;AAAoC,KAAGC;AAAvC,CAAvB,EAAwE;AACvE,SACC,8BACGD,OAAO,CAACE,GAAR,CAAa,CAAEC,MAAF,EAAUC,KAAV,KAAqB;AACnC,WACC,cAAC,SAAD;AACC,MAAA,KAAK,EAAGD,MAAM,CAACE,KADhB;AAEC,MAAA,OAAO,EAAG,MAAMP,QAAQ,CAAEK,MAAM,CAACG,KAAT,CAFzB;AAGC,MAAA,QAAQ,EAAGH,MAAM,CAACG,KAAP,KAAiBP,QAH7B;AAIC,MAAA,GAAG,EAAI,GAAGI,MAAM,CAACG,KAAO,IAAIF,KAAO,EAJpC;AAAA,SAKMH;AALN,MADD;AASA,GAVC,CADH,CADD;AAeA;;AAED,eAAeJ,YAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport RadioCell from '../mobile/bottom-sheet/radio-cell';\n\nfunction RadioControl( { onChange, selected, options = [], ...props } ) {\n\treturn (\n\t\t<>\n\t\t\t{ options.map( ( option, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<RadioCell\n\t\t\t\t\t\tlabel={ option.label }\n\t\t\t\t\t\tonPress={ () => onChange( option.value ) }\n\t\t\t\t\t\tselected={ option.value === selected }\n\t\t\t\t\t\tkey={ `${ option.value }-${ index }` }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n}\n\nexport default RadioControl;\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
  // @ts-nocheck
4
3
 
@@ -38,11 +37,13 @@ function RadioGroup({
38
37
  };
39
38
  return createElement(RadioContext.Provider, {
40
39
  value: radioContext
41
- }, createElement(ReakitRadioGroup, _extends({
40
+ }, createElement(ReakitRadioGroup, {
42
41
  ref: ref,
43
42
  as: ButtonGroup,
44
- "aria-label": label
45
- }, radioState, props)));
43
+ "aria-label": label,
44
+ ...radioState,
45
+ ...props
46
+ }));
46
47
  }
47
48
  /**
48
49
  * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/radio-group/index.js"],"names":["useRadioState","RadioGroup","ReakitRadioGroup","forwardRef","ButtonGroup","RadioContext","label","checked","defaultChecked","disabled","onChange","props","ref","radioState","state","baseId","id","radioContext","setState"],"mappings":";;AAAA;;AAEA;AACA;AACA;AACA,SAASA,aAAT,EAAwBC,UAAU,IAAIC,gBAAtC,QAA8D,cAA9D;AAEA;AACA;AACA;;AACA,SAASC,UAAT,QAA2B,oBAA3B;AAEA;AACA;AACA;;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,YAAP,MAAyB,iBAAzB;;AAEA,SAASJ,UAAT,CACC;AAAEK,EAAAA,KAAF;AAASC,EAAAA,OAAT;AAAkBC,EAAAA,cAAlB;AAAkCC,EAAAA,QAAlC;AAA4CC,EAAAA,QAA5C;AAAsD,KAAGC;AAAzD,CADD,EAECC,GAFD,EAGE;AACD,QAAMC,UAAU,GAAGb,aAAa,CAAE;AACjCc,IAAAA,KAAK,EAAEN,cAD0B;AAEjCO,IAAAA,MAAM,EAAEJ,KAAK,CAACK;AAFmB,GAAF,CAAhC;AAIA,QAAMC,YAAY,GAAG,EACpB,GAAGJ,UADiB;AAEpBJ,IAAAA,QAFoB;AAGpB;AACAK,IAAAA,KAAK,EAAEP,OAAF,aAAEA,OAAF,cAAEA,OAAF,GAAaM,UAAU,CAACC,KAJT;AAKpBI,IAAAA,QAAQ,EAAER,QAAF,aAAEA,QAAF,cAAEA,QAAF,GAAcG,UAAU,CAACK;AALb,GAArB;AAQA,SACC,cAAC,YAAD,CAAc,QAAd;AAAuB,IAAA,KAAK,EAAGD;AAA/B,KACC,cAAC,gBAAD;AACC,IAAA,GAAG,EAAGL,GADP;AAEC,IAAA,EAAE,EAAGR,WAFN;AAGC,kBAAaE;AAHd,KAIMO,UAJN,EAKMF,KALN,EADD,CADD;AAWA;AAED;AACA;AACA;;;AACA,eAAeR,UAAU,CAAEF,UAAF,CAAzB","sourcesContent":["// @ts-nocheck\n\n/**\n * External dependencies\n */\nimport { useRadioState, RadioGroup as ReakitRadioGroup } from 'reakit/Radio';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ButtonGroup from '../button-group';\nimport RadioContext from './radio-context';\n\nfunction RadioGroup(\n\t{ label, checked, defaultChecked, disabled, onChange, ...props },\n\tref\n) {\n\tconst radioState = useRadioState( {\n\t\tstate: defaultChecked,\n\t\tbaseId: props.id,\n\t} );\n\tconst radioContext = {\n\t\t...radioState,\n\t\tdisabled,\n\t\t// Controlled or uncontrolled.\n\t\tstate: checked ?? radioState.state,\n\t\tsetState: onChange ?? radioState.setState,\n\t};\n\n\treturn (\n\t\t<RadioContext.Provider value={ radioContext }>\n\t\t\t<ReakitRadioGroup\n\t\t\t\tref={ ref }\n\t\t\t\tas={ ButtonGroup }\n\t\t\t\taria-label={ label }\n\t\t\t\t{ ...radioState }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</RadioContext.Provider>\n\t);\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport default forwardRef( RadioGroup );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/radio-group/index.js"],"names":["useRadioState","RadioGroup","ReakitRadioGroup","forwardRef","ButtonGroup","RadioContext","label","checked","defaultChecked","disabled","onChange","props","ref","radioState","state","baseId","id","radioContext","setState"],"mappings":";AAAA;;AAEA;AACA;AACA;AACA,SAASA,aAAT,EAAwBC,UAAU,IAAIC,gBAAtC,QAA8D,cAA9D;AAEA;AACA;AACA;;AACA,SAASC,UAAT,QAA2B,oBAA3B;AAEA;AACA;AACA;;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,YAAP,MAAyB,iBAAzB;;AAEA,SAASJ,UAAT,CACC;AAAEK,EAAAA,KAAF;AAASC,EAAAA,OAAT;AAAkBC,EAAAA,cAAlB;AAAkCC,EAAAA,QAAlC;AAA4CC,EAAAA,QAA5C;AAAsD,KAAGC;AAAzD,CADD,EAECC,GAFD,EAGE;AACD,QAAMC,UAAU,GAAGb,aAAa,CAAE;AACjCc,IAAAA,KAAK,EAAEN,cAD0B;AAEjCO,IAAAA,MAAM,EAAEJ,KAAK,CAACK;AAFmB,GAAF,CAAhC;AAIA,QAAMC,YAAY,GAAG,EACpB,GAAGJ,UADiB;AAEpBJ,IAAAA,QAFoB;AAGpB;AACAK,IAAAA,KAAK,EAAEP,OAAF,aAAEA,OAAF,cAAEA,OAAF,GAAaM,UAAU,CAACC,KAJT;AAKpBI,IAAAA,QAAQ,EAAER,QAAF,aAAEA,QAAF,cAAEA,QAAF,GAAcG,UAAU,CAACK;AALb,GAArB;AAQA,SACC,cAAC,YAAD,CAAc,QAAd;AAAuB,IAAA,KAAK,EAAGD;AAA/B,KACC,cAAC,gBAAD;AACC,IAAA,GAAG,EAAGL,GADP;AAEC,IAAA,EAAE,EAAGR,WAFN;AAGC,kBAAaE,KAHd;AAAA,OAIMO,UAJN;AAAA,OAKMF;AALN,IADD,CADD;AAWA;AAED;AACA;AACA;;;AACA,eAAeR,UAAU,CAAEF,UAAF,CAAzB","sourcesContent":["// @ts-nocheck\n\n/**\n * External dependencies\n */\nimport { useRadioState, RadioGroup as ReakitRadioGroup } from 'reakit/Radio';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ButtonGroup from '../button-group';\nimport RadioContext from './radio-context';\n\nfunction RadioGroup(\n\t{ label, checked, defaultChecked, disabled, onChange, ...props },\n\tref\n) {\n\tconst radioState = useRadioState( {\n\t\tstate: defaultChecked,\n\t\tbaseId: props.id,\n\t} );\n\tconst radioContext = {\n\t\t...radioState,\n\t\tdisabled,\n\t\t// Controlled or uncontrolled.\n\t\tstate: checked ?? radioState.state,\n\t\tsetState: onChange ?? radioState.setState,\n\t};\n\n\treturn (\n\t\t<RadioContext.Provider value={ radioContext }>\n\t\t\t<ReakitRadioGroup\n\t\t\t\tref={ ref }\n\t\t\t\tas={ ButtonGroup }\n\t\t\t\taria-label={ label }\n\t\t\t\t{ ...radioState }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</RadioContext.Provider>\n\t);\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport default forwardRef( RadioGroup );\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
  // @ts-nocheck
4
3
 
@@ -25,12 +24,14 @@ function Radio({
25
24
  }, ref) {
26
25
  const radioContext = useContext(RadioContext);
27
26
  const checked = radioContext.state === value;
28
- return createElement(ReakitRadio, _extends({
27
+ return createElement(ReakitRadio, {
29
28
  ref: ref,
30
29
  as: Button,
31
30
  variant: checked ? 'primary' : 'secondary',
32
- value: value
33
- }, radioContext, props), children || value);
31
+ value: value,
32
+ ...radioContext,
33
+ ...props
34
+ }, children || value);
34
35
  }
35
36
  /**
36
37
  * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/radio-group/radio/index.js"],"names":["Radio","ReakitRadio","useContext","forwardRef","Button","RadioContext","children","value","props","ref","radioContext","checked","state"],"mappings":";;AAAA;;AAEA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAlB,QAAqC,cAArC;AAEA;AACA;AACA;;AACA,SAASC,UAAT,EAAqBC,UAArB,QAAuC,oBAAvC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;;AAEA,SAASL,KAAT,CAAgB;AAAEM,EAAAA,QAAF;AAAYC,EAAAA,KAAZ;AAAmB,KAAGC;AAAtB,CAAhB,EAA+CC,GAA/C,EAAqD;AACpD,QAAMC,YAAY,GAAGR,UAAU,CAAEG,YAAF,CAA/B;AACA,QAAMM,OAAO,GAAGD,YAAY,CAACE,KAAb,KAAuBL,KAAvC;AAEA,SACC,cAAC,WAAD;AACC,IAAA,GAAG,EAAGE,GADP;AAEC,IAAA,EAAE,EAAGL,MAFN;AAGC,IAAA,OAAO,EAAGO,OAAO,GAAG,SAAH,GAAe,WAHjC;AAIC,IAAA,KAAK,EAAGJ;AAJT,KAKMG,YALN,EAMMF,KANN,GAQGF,QAAQ,IAAIC,KARf,CADD;AAYA;AAED;AACA;AACA;;;AACA,eAAeJ,UAAU,CAAEH,KAAF,CAAzB","sourcesContent":["// @ts-nocheck\n\n/**\n * External dependencies\n */\nimport { Radio as ReakitRadio } from 'reakit/Radio';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport RadioContext from '../radio-context';\n\nfunction Radio( { children, value, ...props }, ref ) {\n\tconst radioContext = useContext( RadioContext );\n\tconst checked = radioContext.state === value;\n\n\treturn (\n\t\t<ReakitRadio\n\t\t\tref={ ref }\n\t\t\tas={ Button }\n\t\t\tvariant={ checked ? 'primary' : 'secondary' }\n\t\t\tvalue={ value }\n\t\t\t{ ...radioContext }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children || value }\n\t\t</ReakitRadio>\n\t);\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport default forwardRef( Radio );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/radio-group/radio/index.js"],"names":["Radio","ReakitRadio","useContext","forwardRef","Button","RadioContext","children","value","props","ref","radioContext","checked","state"],"mappings":";AAAA;;AAEA;AACA;AACA;AACA,SAASA,KAAK,IAAIC,WAAlB,QAAqC,cAArC;AAEA;AACA;AACA;;AACA,SAASC,UAAT,EAAqBC,UAArB,QAAuC,oBAAvC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;;AAEA,SAASL,KAAT,CAAgB;AAAEM,EAAAA,QAAF;AAAYC,EAAAA,KAAZ;AAAmB,KAAGC;AAAtB,CAAhB,EAA+CC,GAA/C,EAAqD;AACpD,QAAMC,YAAY,GAAGR,UAAU,CAAEG,YAAF,CAA/B;AACA,QAAMM,OAAO,GAAGD,YAAY,CAACE,KAAb,KAAuBL,KAAvC;AAEA,SACC,cAAC,WAAD;AACC,IAAA,GAAG,EAAGE,GADP;AAEC,IAAA,EAAE,EAAGL,MAFN;AAGC,IAAA,OAAO,EAAGO,OAAO,GAAG,SAAH,GAAe,WAHjC;AAIC,IAAA,KAAK,EAAGJ,KAJT;AAAA,OAKMG,YALN;AAAA,OAMMF;AANN,KAQGF,QAAQ,IAAIC,KARf,CADD;AAYA;AAED;AACA;AACA;;;AACA,eAAeJ,UAAU,CAAEH,KAAF,CAAzB","sourcesContent":["// @ts-nocheck\n\n/**\n * External dependencies\n */\nimport { Radio as ReakitRadio } from 'reakit/Radio';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport RadioContext from '../radio-context';\n\nfunction Radio( { children, value, ...props }, ref ) {\n\tconst radioContext = useContext( RadioContext );\n\tconst checked = radioContext.state === value;\n\n\treturn (\n\t\t<ReakitRadio\n\t\t\tref={ ref }\n\t\t\tas={ Button }\n\t\t\tvariant={ checked ? 'primary' : 'secondary' }\n\t\t\tvalue={ value }\n\t\t\t{ ...radioContext }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t{ children || value }\n\t\t</ReakitRadio>\n\t);\n}\n\n/**\n * @deprecated Use `RadioControl` or `ToggleGroupControl` instead.\n */\nexport default forwardRef( Radio );\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -194,7 +193,7 @@ function UnforwardedRangeControl(props, forwardedRef) {
194
193
  className: wrapperClasses,
195
194
  color: colorProp,
196
195
  marks: !!marks
197
- }, createElement(InputRange, _extends({}, otherProps, {
196
+ }, createElement(InputRange, { ...otherProps,
198
197
  className: "components-range-control__slider",
199
198
  describedBy: describedBy,
200
199
  disabled: disabled,
@@ -210,7 +209,7 @@ function UnforwardedRangeControl(props, forwardedRef) {
210
209
  ref: useMergeRefs([inputRef, forwardedRef]),
211
210
  step: step,
212
211
  value: inputSliderValue !== null && inputSliderValue !== void 0 ? inputSliderValue : undefined
213
- })), createElement(RangeRail, {
212
+ }), createElement(RangeRail, {
214
213
  "aria-hidden": true,
215
214
  disabled: disabled,
216
215
  marks: marks,