@wordpress/components 19.4.1-next.f435e9e01b.0 → 19.6.1-next.a55ed9455a.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (938) hide show
  1. package/CHANGELOG.md +35 -4
  2. package/CONTRIBUTING.md +69 -2
  3. package/build/alignment-matrix-control/utils.js +1 -1
  4. package/build/alignment-matrix-control/utils.js.map +1 -1
  5. package/build/angle-picker-control/angle-circle.js +1 -1
  6. package/build/angle-picker-control/angle-circle.js.map +1 -1
  7. package/build/animation/index.js +0 -6
  8. package/build/animation/index.js.map +1 -1
  9. package/build/autocomplete/get-default-use-items.js +3 -3
  10. package/build/autocomplete/get-default-use-items.js.map +1 -1
  11. package/build/base-field/hook.js +1 -1
  12. package/build/base-field/hook.js.map +1 -1
  13. package/build/box-control/icon.js +1 -1
  14. package/build/box-control/icon.js.map +1 -1
  15. package/build/box-control/index.js +4 -4
  16. package/build/box-control/index.js.map +1 -1
  17. package/build/box-control/unit-control.js +2 -2
  18. package/build/box-control/unit-control.js.map +1 -1
  19. package/build/box-control/utils.js +12 -8
  20. package/build/box-control/utils.js.map +1 -1
  21. package/build/button/index.js +5 -5
  22. package/build/button/index.js.map +1 -1
  23. package/build/button/index.native.js +7 -7
  24. package/build/button/index.native.js.map +1 -1
  25. package/build/card/card/component.js +2 -2
  26. package/build/card/card/component.js.map +1 -1
  27. package/build/card/card-body/component.js +1 -1
  28. package/build/card/card-body/component.js.map +1 -1
  29. package/build/card/card-divider/component.js +1 -1
  30. package/build/card/card-divider/component.js.map +1 -1
  31. package/build/card/card-footer/component.js +1 -1
  32. package/build/card/card-footer/component.js.map +1 -1
  33. package/build/card/card-header/component.js +1 -1
  34. package/build/card/card-header/component.js.map +1 -1
  35. package/build/card/card-media/component.js +1 -1
  36. package/build/card/card-media/component.js.map +1 -1
  37. package/build/color-palette/index.native.js +35 -30
  38. package/build/color-palette/index.native.js.map +1 -1
  39. package/build/color-picker/color-display.js +1 -1
  40. package/build/color-picker/color-display.js.map +1 -1
  41. package/build/color-picker/component.js.map +1 -1
  42. package/build/color-picker/hex-input.js +6 -9
  43. package/build/color-picker/hex-input.js.map +1 -1
  44. package/build/color-picker/styles.js +8 -8
  45. package/build/color-picker/styles.js.map +1 -1
  46. package/build/combobox-control/index.js +1 -1
  47. package/build/combobox-control/index.js.map +1 -1
  48. package/build/confirm-dialog/component.js +4 -2
  49. package/build/confirm-dialog/component.js.map +1 -1
  50. package/build/date-time/time.js +7 -4
  51. package/build/date-time/time.js.map +1 -1
  52. package/build/divider/component.js +5 -4
  53. package/build/divider/component.js.map +1 -1
  54. package/build/draggable/index.js +3 -3
  55. package/build/draggable/index.js.map +1 -1
  56. package/build/elevation/component.js +1 -1
  57. package/build/elevation/component.js.map +1 -1
  58. package/build/flex/flex/component.js +1 -1
  59. package/build/flex/flex/component.js.map +1 -1
  60. package/build/flex/flex-block/component.js +1 -1
  61. package/build/flex/flex-block/component.js.map +1 -1
  62. package/build/flex/flex-item/component.js +1 -1
  63. package/build/flex/flex-item/component.js.map +1 -1
  64. package/build/flyout/flyout/component.js +1 -1
  65. package/build/flyout/flyout/component.js.map +1 -1
  66. package/build/flyout/flyout-content/component.js +1 -1
  67. package/build/flyout/flyout-content/component.js.map +1 -1
  68. package/build/focal-point-picker/index.js +18 -12
  69. package/build/focal-point-picker/index.js.map +1 -1
  70. package/build/focal-point-picker/index.native.js +7 -7
  71. package/build/focal-point-picker/index.native.js.map +1 -1
  72. package/build/focal-point-picker/tooltip/index.native.js +1 -1
  73. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  74. package/build/font-size-picker/index.js +1 -2
  75. package/build/font-size-picker/index.js.map +1 -1
  76. package/build/form-token-field/index.js +6 -6
  77. package/build/form-token-field/index.js.map +1 -1
  78. package/build/form-token-field/suggestions-list.js +2 -2
  79. package/build/form-token-field/suggestions-list.js.map +1 -1
  80. package/build/grid/component.js +1 -1
  81. package/build/grid/component.js.map +1 -1
  82. package/build/h-stack/component.js +1 -1
  83. package/build/h-stack/component.js.map +1 -1
  84. package/build/heading/component.js +6 -5
  85. package/build/heading/component.js.map +1 -1
  86. package/build/heading/hook.js +1 -1
  87. package/build/heading/hook.js.map +1 -1
  88. package/build/higher-order/with-notices/index.js +1 -1
  89. package/build/higher-order/with-notices/index.js.map +1 -1
  90. package/build/index.js +14 -2
  91. package/build/index.js.map +1 -1
  92. package/build/index.native.js +15 -1
  93. package/build/index.native.js.map +1 -1
  94. package/build/input-control/index.js.map +1 -1
  95. package/build/input-control/input-base.js +1 -1
  96. package/build/input-control/input-base.js.map +1 -1
  97. package/build/input-control/input-field.js +19 -17
  98. package/build/input-control/input-field.js.map +1 -1
  99. package/build/input-control/reducer/reducer.js +3 -0
  100. package/build/input-control/reducer/reducer.js.map +1 -1
  101. package/build/input-control/styles/input-control-styles.js +25 -25
  102. package/build/input-control/styles/input-control-styles.js.map +1 -1
  103. package/build/isolated-event-container/index.js +1 -1
  104. package/build/isolated-event-container/index.js.map +1 -1
  105. package/build/item-group/item/component.js.map +1 -1
  106. package/build/item-group/item-group/component.js.map +1 -1
  107. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  108. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  109. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  110. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  111. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  112. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  113. package/build/mobile/bottom-sheet/cell.native.js +1 -1
  114. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  115. package/build/mobile/bottom-sheet/index.native.js +11 -11
  116. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  117. package/build/mobile/bottom-sheet/link-cell.native.js +1 -1
  118. package/build/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  119. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  120. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  121. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  122. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  123. package/build/mobile/color-settings/palette.screen.native.js +26 -9
  124. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  125. package/build/mobile/global-styles-context/utils.native.js +73 -19
  126. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  127. package/build/mobile/gradient/index.native.js +2 -2
  128. package/build/mobile/gradient/index.native.js.map +1 -1
  129. package/build/mobile/html-text-input/container.ios.js +3 -3
  130. package/build/mobile/html-text-input/container.ios.js.map +1 -1
  131. package/build/mobile/html-text-input/index.native.js +1 -1
  132. package/build/mobile/html-text-input/index.native.js.map +1 -1
  133. package/build/mobile/image/index.native.js +1 -1
  134. package/build/mobile/image/index.native.js.map +1 -1
  135. package/build/mobile/inserter-button/index.native.js +3 -3
  136. package/build/mobile/inserter-button/index.native.js.map +1 -1
  137. package/build/mobile/inserter-button/sparkles.js +25 -0
  138. package/build/mobile/inserter-button/sparkles.js.map +1 -0
  139. package/build/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  140. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  141. package/build/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  142. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  143. package/build/mobile/link-picker/index.native.js +3 -3
  144. package/build/mobile/link-picker/index.native.js.map +1 -1
  145. package/build/mobile/link-picker/link-picker-results.native.js +8 -8
  146. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  147. package/build/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  148. package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
  149. package/build/mobile/link-settings/index.native.js +1 -1
  150. package/build/mobile/link-settings/index.native.js.map +1 -1
  151. package/build/modal/aria-helper.js +1 -1
  152. package/build/modal/aria-helper.js.map +1 -1
  153. package/build/modal/index.js +2 -2
  154. package/build/modal/index.js.map +1 -1
  155. package/build/navigable-container/container.js +2 -2
  156. package/build/navigable-container/container.js.map +1 -1
  157. package/build/navigable-container/tabbable.js +1 -1
  158. package/build/navigable-container/tabbable.js.map +1 -1
  159. package/build/navigation/item/index.js +1 -1
  160. package/build/navigation/item/index.js.map +1 -1
  161. package/build/navigation/menu/index.js +1 -1
  162. package/build/navigation/menu/index.js.map +1 -1
  163. package/build/navigator/index.js +16 -0
  164. package/build/navigator/index.js.map +1 -1
  165. package/build/navigator/navigator-back-button/component.js +72 -0
  166. package/build/navigator/navigator-back-button/component.js.map +1 -0
  167. package/build/navigator/navigator-back-button/hook.js +49 -0
  168. package/build/navigator/navigator-back-button/hook.js.map +1 -0
  169. package/build/navigator/navigator-back-button/index.js +16 -0
  170. package/build/navigator/navigator-back-button/index.js.map +1 -0
  171. package/build/navigator/navigator-button/component.js +71 -0
  172. package/build/navigator/navigator-button/component.js.map +1 -0
  173. package/build/navigator/navigator-button/hook.js +59 -0
  174. package/build/navigator/navigator-button/hook.js.map +1 -0
  175. package/build/navigator/navigator-button/index.js +16 -0
  176. package/build/navigator/navigator-button/index.js.map +1 -0
  177. package/build/navigator/navigator-provider/component.js +12 -22
  178. package/build/navigator/navigator-provider/component.js.map +1 -1
  179. package/build/navigator/navigator-screen/component.js +14 -22
  180. package/build/navigator/navigator-screen/component.js.map +1 -1
  181. package/build/number-control/index.js +1 -1
  182. package/build/number-control/index.js.map +1 -1
  183. package/build/panel/body.js +2 -2
  184. package/build/panel/body.js.map +1 -1
  185. package/build/popover/index.js +3 -3
  186. package/build/popover/index.js.map +1 -1
  187. package/build/popover/utils.js +6 -6
  188. package/build/popover/utils.js.map +1 -1
  189. package/build/radio-group/index.js +1 -1
  190. package/build/radio-group/index.js.map +1 -1
  191. package/build/range-control/styles/range-control-styles.js +29 -29
  192. package/build/range-control/styles/range-control-styles.js.map +1 -1
  193. package/build/resizable-box/index.js.map +1 -1
  194. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  195. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  196. package/build/sandbox/index.js +5 -5
  197. package/build/sandbox/index.js.map +1 -1
  198. package/build/sandbox/index.native.js +1 -1
  199. package/build/sandbox/index.native.js.map +1 -1
  200. package/build/scrollable/component.js +1 -1
  201. package/build/scrollable/component.js.map +1 -1
  202. package/build/select-control/index.js +1 -1
  203. package/build/select-control/index.js.map +1 -1
  204. package/build/select-control/styles/select-control-styles.js +5 -5
  205. package/build/select-control/styles/select-control-styles.js.map +1 -1
  206. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  207. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  208. package/build/slot-fill/bubbles-virtually/slot.js +1 -1
  209. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  210. package/build/slot-fill/fill.js +1 -1
  211. package/build/slot-fill/fill.js.map +1 -1
  212. package/build/slot-fill/provider.js +1 -1
  213. package/build/slot-fill/provider.js.map +1 -1
  214. package/build/snackbar/index.js +1 -1
  215. package/build/snackbar/index.js.map +1 -1
  216. package/build/snackbar/list.js +1 -1
  217. package/build/snackbar/list.js.map +1 -1
  218. package/build/spacer/component.js.map +1 -1
  219. package/build/style-provider/index.js +2 -2
  220. package/build/style-provider/index.js.map +1 -1
  221. package/build/surface/component.js +1 -1
  222. package/build/surface/component.js.map +1 -1
  223. package/build/text/component.js +1 -1
  224. package/build/text/component.js.map +1 -1
  225. package/build/text-control/index.js +2 -2
  226. package/build/text-control/index.js.map +1 -1
  227. package/build/toggle-group-control/toggle-group-control/component.js +2 -2
  228. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  229. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  230. package/build/toggle-group-control/toggle-group-control-option/styles.js +8 -8
  231. package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  232. package/build/toolbar/index.js +1 -1
  233. package/build/toolbar/index.js.map +1 -1
  234. package/build/tools-panel/tools-panel/component.js.map +1 -1
  235. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  236. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  237. package/build/tooltip/index.js +3 -3
  238. package/build/tooltip/index.js.map +1 -1
  239. package/build/tooltip/index.native.js +7 -7
  240. package/build/tooltip/index.native.js.map +1 -1
  241. package/build/tree-grid/index.js +50 -6
  242. package/build/tree-grid/index.js.map +1 -1
  243. package/build/truncate/component.js +1 -1
  244. package/build/truncate/component.js.map +1 -1
  245. package/build/truncate/utils.js +1 -1
  246. package/build/truncate/utils.js.map +1 -1
  247. package/build/ui/context/context-connect.js +8 -15
  248. package/build/ui/context/context-connect.js.map +1 -1
  249. package/build/ui/context/context-system-provider.js +2 -2
  250. package/build/ui/context/context-system-provider.js.map +1 -1
  251. package/build/ui/context/index.js.map +1 -1
  252. package/build/ui/control-group/component.js +1 -1
  253. package/build/ui/control-group/component.js.map +1 -1
  254. package/build/ui/control-label/component.js +1 -1
  255. package/build/ui/control-label/component.js.map +1 -1
  256. package/build/ui/form-group/form-group.js +1 -1
  257. package/build/ui/form-group/form-group.js.map +1 -1
  258. package/build/ui/shortcut/component.js.map +1 -1
  259. package/build/ui/spinner/component.js +1 -1
  260. package/build/ui/spinner/component.js.map +1 -1
  261. package/build/ui/tooltip/component.js +1 -1
  262. package/build/ui/tooltip/component.js.map +1 -1
  263. package/build/ui/tooltip/content.js +1 -1
  264. package/build/ui/tooltip/content.js.map +1 -1
  265. package/build/ui/utils/colors.js +2 -2
  266. package/build/ui/utils/colors.js.map +1 -1
  267. package/build/ui/utils/space.js +2 -2
  268. package/build/ui/utils/space.js.map +1 -1
  269. package/build/unit-control/index.js +38 -29
  270. package/build/unit-control/index.js.map +1 -1
  271. package/build/unit-control/index.native.js +4 -2
  272. package/build/unit-control/index.native.js.map +1 -1
  273. package/build/unit-control/unit-select-control.js +1 -1
  274. package/build/unit-control/unit-select-control.js.map +1 -1
  275. package/build/unit-control/utils.js +96 -104
  276. package/build/unit-control/utils.js.map +1 -1
  277. package/build/utils/breakpoint-values.js +1 -1
  278. package/build/utils/breakpoint-values.js.map +1 -1
  279. package/build/utils/colors-values.js +1 -1
  280. package/build/utils/colors-values.js.map +1 -1
  281. package/build/v-stack/component.js +1 -1
  282. package/build/v-stack/component.js.map +1 -1
  283. package/build/visually-hidden/component.js +1 -1
  284. package/build/visually-hidden/component.js.map +1 -1
  285. package/build/z-stack/component.js.map +1 -1
  286. package/build-module/alignment-matrix-control/utils.js +1 -1
  287. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  288. package/build-module/angle-picker-control/angle-circle.js +1 -1
  289. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  290. package/build-module/animation/index.js +1 -1
  291. package/build-module/animation/index.js.map +1 -1
  292. package/build-module/autocomplete/get-default-use-items.js +3 -3
  293. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  294. package/build-module/base-field/hook.js +1 -1
  295. package/build-module/base-field/hook.js.map +1 -1
  296. package/build-module/box-control/icon.js +1 -1
  297. package/build-module/box-control/icon.js.map +1 -1
  298. package/build-module/box-control/index.js +5 -5
  299. package/build-module/box-control/index.js.map +1 -1
  300. package/build-module/box-control/unit-control.js +1 -1
  301. package/build-module/box-control/unit-control.js.map +1 -1
  302. package/build-module/box-control/utils.js +13 -9
  303. package/build-module/box-control/utils.js.map +1 -1
  304. package/build-module/button/index.js +5 -5
  305. package/build-module/button/index.js.map +1 -1
  306. package/build-module/button/index.native.js +7 -7
  307. package/build-module/button/index.native.js.map +1 -1
  308. package/build-module/card/card/component.js +2 -2
  309. package/build-module/card/card/component.js.map +1 -1
  310. package/build-module/card/card-body/component.js +1 -1
  311. package/build-module/card/card-body/component.js.map +1 -1
  312. package/build-module/card/card-divider/component.js +1 -1
  313. package/build-module/card/card-divider/component.js.map +1 -1
  314. package/build-module/card/card-footer/component.js +1 -1
  315. package/build-module/card/card-footer/component.js.map +1 -1
  316. package/build-module/card/card-header/component.js +1 -1
  317. package/build-module/card/card-header/component.js.map +1 -1
  318. package/build-module/card/card-media/component.js +1 -1
  319. package/build-module/card/card-media/component.js.map +1 -1
  320. package/build-module/color-palette/index.native.js +36 -31
  321. package/build-module/color-palette/index.native.js.map +1 -1
  322. package/build-module/color-picker/color-display.js +1 -1
  323. package/build-module/color-picker/color-display.js.map +1 -1
  324. package/build-module/color-picker/component.js.map +1 -1
  325. package/build-module/color-picker/hex-input.js +6 -9
  326. package/build-module/color-picker/hex-input.js.map +1 -1
  327. package/build-module/color-picker/styles.js +8 -8
  328. package/build-module/color-picker/styles.js.map +1 -1
  329. package/build-module/combobox-control/index.js +1 -1
  330. package/build-module/combobox-control/index.js.map +1 -1
  331. package/build-module/confirm-dialog/component.js +4 -5
  332. package/build-module/confirm-dialog/component.js.map +1 -1
  333. package/build-module/date-time/time.js +7 -4
  334. package/build-module/date-time/time.js.map +1 -1
  335. package/build-module/divider/component.js +3 -3
  336. package/build-module/divider/component.js.map +1 -1
  337. package/build-module/draggable/index.js +3 -3
  338. package/build-module/draggable/index.js.map +1 -1
  339. package/build-module/elevation/component.js +1 -1
  340. package/build-module/elevation/component.js.map +1 -1
  341. package/build-module/flex/flex/component.js +1 -1
  342. package/build-module/flex/flex/component.js.map +1 -1
  343. package/build-module/flex/flex-block/component.js +1 -1
  344. package/build-module/flex/flex-block/component.js.map +1 -1
  345. package/build-module/flex/flex-item/component.js +1 -1
  346. package/build-module/flex/flex-item/component.js.map +1 -1
  347. package/build-module/flyout/flyout/component.js +1 -1
  348. package/build-module/flyout/flyout/component.js.map +1 -1
  349. package/build-module/flyout/flyout-content/component.js +1 -1
  350. package/build-module/flyout/flyout-content/component.js.map +1 -1
  351. package/build-module/focal-point-picker/index.js +18 -12
  352. package/build-module/focal-point-picker/index.js.map +1 -1
  353. package/build-module/focal-point-picker/index.native.js +7 -7
  354. package/build-module/focal-point-picker/index.native.js.map +1 -1
  355. package/build-module/focal-point-picker/tooltip/index.native.js +1 -1
  356. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  357. package/build-module/font-size-picker/index.js +1 -2
  358. package/build-module/font-size-picker/index.js.map +1 -1
  359. package/build-module/form-token-field/index.js +6 -6
  360. package/build-module/form-token-field/index.js.map +1 -1
  361. package/build-module/form-token-field/suggestions-list.js +2 -2
  362. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  363. package/build-module/grid/component.js +1 -1
  364. package/build-module/grid/component.js.map +1 -1
  365. package/build-module/h-stack/component.js +1 -1
  366. package/build-module/h-stack/component.js.map +1 -1
  367. package/build-module/heading/component.js +4 -4
  368. package/build-module/heading/component.js.map +1 -1
  369. package/build-module/heading/hook.js +1 -1
  370. package/build-module/heading/hook.js.map +1 -1
  371. package/build-module/higher-order/with-notices/index.js +1 -1
  372. package/build-module/higher-order/with-notices/index.js.map +1 -1
  373. package/build-module/index.js +5 -5
  374. package/build-module/index.js.map +1 -1
  375. package/build-module/index.native.js +5 -5
  376. package/build-module/index.native.js.map +1 -1
  377. package/build-module/input-control/index.js.map +1 -1
  378. package/build-module/input-control/input-base.js +1 -1
  379. package/build-module/input-control/input-base.js.map +1 -1
  380. package/build-module/input-control/input-field.js +19 -16
  381. package/build-module/input-control/input-field.js.map +1 -1
  382. package/build-module/input-control/reducer/reducer.js +3 -0
  383. package/build-module/input-control/reducer/reducer.js.map +1 -1
  384. package/build-module/input-control/styles/input-control-styles.js +25 -25
  385. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  386. package/build-module/isolated-event-container/index.js +1 -1
  387. package/build-module/isolated-event-container/index.js.map +1 -1
  388. package/build-module/item-group/item/component.js.map +1 -1
  389. package/build-module/item-group/item-group/component.js.map +1 -1
  390. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  391. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  392. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  393. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  394. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  395. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  396. package/build-module/mobile/bottom-sheet/cell.native.js +1 -1
  397. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  398. package/build-module/mobile/bottom-sheet/index.native.js +11 -11
  399. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  400. package/build-module/mobile/bottom-sheet/link-cell.native.js +1 -1
  401. package/build-module/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  402. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  403. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  404. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  405. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  406. package/build-module/mobile/color-settings/palette.screen.native.js +27 -10
  407. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  408. package/build-module/mobile/global-styles-context/utils.native.js +70 -20
  409. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  410. package/build-module/mobile/gradient/index.native.js +2 -2
  411. package/build-module/mobile/gradient/index.native.js.map +1 -1
  412. package/build-module/mobile/html-text-input/container.ios.js +3 -3
  413. package/build-module/mobile/html-text-input/container.ios.js.map +1 -1
  414. package/build-module/mobile/html-text-input/index.native.js +1 -1
  415. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  416. package/build-module/mobile/image/index.native.js +1 -1
  417. package/build-module/mobile/image/index.native.js.map +1 -1
  418. package/build-module/mobile/inserter-button/index.native.js +1 -1
  419. package/build-module/mobile/inserter-button/index.native.js.map +1 -1
  420. package/build-module/mobile/inserter-button/sparkles.js +16 -0
  421. package/build-module/mobile/inserter-button/sparkles.js.map +1 -0
  422. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  423. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  424. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  425. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  426. package/build-module/mobile/link-picker/index.native.js +3 -3
  427. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  428. package/build-module/mobile/link-picker/link-picker-results.native.js +8 -8
  429. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  430. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  431. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
  432. package/build-module/mobile/link-settings/index.native.js +1 -1
  433. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  434. package/build-module/modal/aria-helper.js +1 -1
  435. package/build-module/modal/aria-helper.js.map +1 -1
  436. package/build-module/modal/index.js +2 -2
  437. package/build-module/modal/index.js.map +1 -1
  438. package/build-module/navigable-container/container.js +2 -2
  439. package/build-module/navigable-container/container.js.map +1 -1
  440. package/build-module/navigable-container/tabbable.js +1 -1
  441. package/build-module/navigable-container/tabbable.js.map +1 -1
  442. package/build-module/navigation/item/index.js +1 -1
  443. package/build-module/navigation/item/index.js.map +1 -1
  444. package/build-module/navigation/menu/index.js +1 -1
  445. package/build-module/navigation/menu/index.js.map +1 -1
  446. package/build-module/navigator/index.js +2 -0
  447. package/build-module/navigator/index.js.map +1 -1
  448. package/build-module/navigator/navigator-back-button/component.js +59 -0
  449. package/build-module/navigator/navigator-back-button/component.js.map +1 -0
  450. package/build-module/navigator/navigator-back-button/hook.js +36 -0
  451. package/build-module/navigator/navigator-back-button/hook.js.map +1 -0
  452. package/build-module/navigator/navigator-back-button/index.js +2 -0
  453. package/build-module/navigator/navigator-back-button/index.js.map +1 -0
  454. package/build-module/navigator/navigator-button/component.js +58 -0
  455. package/build-module/navigator/navigator-button/component.js.map +1 -0
  456. package/build-module/navigator/navigator-button/hook.js +46 -0
  457. package/build-module/navigator/navigator-button/hook.js.map +1 -0
  458. package/build-module/navigator/navigator-button/index.js +2 -0
  459. package/build-module/navigator/navigator-button/index.js.map +1 -0
  460. package/build-module/navigator/navigator-provider/component.js +12 -22
  461. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  462. package/build-module/navigator/navigator-screen/component.js +13 -22
  463. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  464. package/build-module/number-control/index.js +1 -1
  465. package/build-module/number-control/index.js.map +1 -1
  466. package/build-module/panel/body.js +2 -2
  467. package/build-module/panel/body.js.map +1 -1
  468. package/build-module/popover/index.js +3 -3
  469. package/build-module/popover/index.js.map +1 -1
  470. package/build-module/popover/utils.js +6 -6
  471. package/build-module/popover/utils.js.map +1 -1
  472. package/build-module/radio-group/index.js +1 -1
  473. package/build-module/radio-group/index.js.map +1 -1
  474. package/build-module/range-control/styles/range-control-styles.js +29 -29
  475. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  476. package/build-module/resizable-box/index.js.map +1 -1
  477. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  478. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  479. package/build-module/sandbox/index.js +5 -5
  480. package/build-module/sandbox/index.js.map +1 -1
  481. package/build-module/sandbox/index.native.js +1 -1
  482. package/build-module/sandbox/index.native.js.map +1 -1
  483. package/build-module/scrollable/component.js +1 -1
  484. package/build-module/scrollable/component.js.map +1 -1
  485. package/build-module/select-control/index.js +2 -2
  486. package/build-module/select-control/index.js.map +1 -1
  487. package/build-module/select-control/styles/select-control-styles.js +5 -5
  488. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  489. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  490. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  491. package/build-module/slot-fill/bubbles-virtually/slot.js +1 -1
  492. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  493. package/build-module/slot-fill/fill.js +1 -1
  494. package/build-module/slot-fill/fill.js.map +1 -1
  495. package/build-module/slot-fill/provider.js +1 -1
  496. package/build-module/slot-fill/provider.js.map +1 -1
  497. package/build-module/snackbar/index.js +1 -1
  498. package/build-module/snackbar/index.js.map +1 -1
  499. package/build-module/snackbar/list.js +1 -1
  500. package/build-module/snackbar/list.js.map +1 -1
  501. package/build-module/spacer/component.js.map +1 -1
  502. package/build-module/style-provider/index.js +2 -2
  503. package/build-module/style-provider/index.js.map +1 -1
  504. package/build-module/surface/component.js +1 -1
  505. package/build-module/surface/component.js.map +1 -1
  506. package/build-module/text/component.js +1 -1
  507. package/build-module/text/component.js.map +1 -1
  508. package/build-module/text-control/index.js +2 -2
  509. package/build-module/text-control/index.js.map +1 -1
  510. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -2
  511. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  512. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  513. package/build-module/toggle-group-control/toggle-group-control-option/styles.js +8 -8
  514. package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  515. package/build-module/toolbar/index.js +1 -1
  516. package/build-module/toolbar/index.js.map +1 -1
  517. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  518. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  519. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  520. package/build-module/tooltip/index.js +3 -3
  521. package/build-module/tooltip/index.js.map +1 -1
  522. package/build-module/tooltip/index.native.js +7 -7
  523. package/build-module/tooltip/index.native.js.map +1 -1
  524. package/build-module/tree-grid/index.js +51 -7
  525. package/build-module/tree-grid/index.js.map +1 -1
  526. package/build-module/truncate/component.js +1 -1
  527. package/build-module/truncate/component.js.map +1 -1
  528. package/build-module/truncate/utils.js +1 -1
  529. package/build-module/truncate/utils.js.map +1 -1
  530. package/build-module/ui/context/context-connect.js +9 -16
  531. package/build-module/ui/context/context-connect.js.map +1 -1
  532. package/build-module/ui/context/context-system-provider.js +2 -2
  533. package/build-module/ui/context/context-system-provider.js.map +1 -1
  534. package/build-module/ui/context/index.js.map +1 -1
  535. package/build-module/ui/control-group/component.js +1 -1
  536. package/build-module/ui/control-group/component.js.map +1 -1
  537. package/build-module/ui/control-label/component.js +1 -1
  538. package/build-module/ui/control-label/component.js.map +1 -1
  539. package/build-module/ui/form-group/form-group.js +1 -1
  540. package/build-module/ui/form-group/form-group.js.map +1 -1
  541. package/build-module/ui/shortcut/component.js.map +1 -1
  542. package/build-module/ui/spinner/component.js +1 -1
  543. package/build-module/ui/spinner/component.js.map +1 -1
  544. package/build-module/ui/tooltip/component.js +1 -1
  545. package/build-module/ui/tooltip/component.js.map +1 -1
  546. package/build-module/ui/tooltip/content.js +1 -1
  547. package/build-module/ui/tooltip/content.js.map +1 -1
  548. package/build-module/ui/utils/colors.js +2 -2
  549. package/build-module/ui/utils/colors.js.map +1 -1
  550. package/build-module/ui/utils/space.js +2 -2
  551. package/build-module/ui/utils/space.js.map +1 -1
  552. package/build-module/unit-control/index.js +39 -30
  553. package/build-module/unit-control/index.js.map +1 -1
  554. package/build-module/unit-control/index.native.js +5 -3
  555. package/build-module/unit-control/index.native.js.map +1 -1
  556. package/build-module/unit-control/unit-select-control.js +1 -1
  557. package/build-module/unit-control/unit-select-control.js.map +1 -1
  558. package/build-module/unit-control/utils.js +92 -100
  559. package/build-module/unit-control/utils.js.map +1 -1
  560. package/build-module/utils/breakpoint-values.js +1 -1
  561. package/build-module/utils/breakpoint-values.js.map +1 -1
  562. package/build-module/utils/colors-values.js +1 -1
  563. package/build-module/utils/colors-values.js.map +1 -1
  564. package/build-module/v-stack/component.js +1 -1
  565. package/build-module/v-stack/component.js.map +1 -1
  566. package/build-module/visually-hidden/component.js +1 -1
  567. package/build-module/visually-hidden/component.js.map +1 -1
  568. package/build-module/z-stack/component.js.map +1 -1
  569. package/build-style/style-rtl.css +8 -0
  570. package/build-style/style.css +8 -0
  571. package/build-types/base-field/hook.d.ts +2 -1
  572. package/build-types/base-field/hook.d.ts.map +1 -1
  573. package/build-types/card/card/hook.d.ts +2 -1
  574. package/build-types/card/card/hook.d.ts.map +1 -1
  575. package/build-types/card/card-body/hook.d.ts +2 -1
  576. package/build-types/card/card-body/hook.d.ts.map +1 -1
  577. package/build-types/card/card-divider/hook.d.ts +2 -3
  578. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  579. package/build-types/card/card-footer/hook.d.ts +2 -1
  580. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  581. package/build-types/card/card-header/hook.d.ts +2 -1
  582. package/build-types/card/card-header/hook.d.ts.map +1 -1
  583. package/build-types/card/card-media/hook.d.ts +2 -1
  584. package/build-types/card/card-media/hook.d.ts.map +1 -1
  585. package/build-types/color-picker/styles.d.ts +2 -4
  586. package/build-types/color-picker/styles.d.ts.map +1 -1
  587. package/build-types/confirm-dialog/component.d.ts +10 -6
  588. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  589. package/build-types/confirm-dialog/types.d.ts +2 -0
  590. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  591. package/build-types/divider/component.d.ts +2 -2
  592. package/build-types/divider/component.d.ts.map +1 -1
  593. package/build-types/divider/stories/index.d.ts +10 -0
  594. package/build-types/divider/stories/index.d.ts.map +1 -0
  595. package/build-types/divider/types.d.ts +1 -1
  596. package/build-types/divider/types.d.ts.map +1 -1
  597. package/build-types/elevation/hook.d.ts +2 -1
  598. package/build-types/elevation/hook.d.ts.map +1 -1
  599. package/build-types/flex/flex/hook.d.ts +2 -1
  600. package/build-types/flex/flex/hook.d.ts.map +1 -1
  601. package/build-types/flex/flex-block/hook.d.ts +2 -1
  602. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  603. package/build-types/flex/flex-item/hook.d.ts +2 -1
  604. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  605. package/build-types/flyout/flyout/hook.d.ts +2 -2
  606. package/build-types/grid/hook.d.ts +2 -1
  607. package/build-types/grid/hook.d.ts.map +1 -1
  608. package/build-types/h-stack/hook.d.ts +3 -2
  609. package/build-types/h-stack/hook.d.ts.map +1 -1
  610. package/build-types/heading/component.d.ts +3 -3
  611. package/build-types/heading/component.d.ts.map +1 -1
  612. package/build-types/heading/hook.d.ts +2 -1
  613. package/build-types/heading/hook.d.ts.map +1 -1
  614. package/build-types/heading/stories/index.d.ts +12 -0
  615. package/build-types/heading/stories/index.d.ts.map +1 -0
  616. package/build-types/input-control/index.d.ts +3 -3
  617. package/build-types/input-control/index.d.ts.map +1 -1
  618. package/build-types/input-control/input-base.d.ts +2 -2
  619. package/build-types/input-control/input-base.d.ts.map +1 -1
  620. package/build-types/input-control/input-field.d.ts +1 -3
  621. package/build-types/input-control/input-field.d.ts.map +1 -1
  622. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  623. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  624. package/build-types/input-control/types.d.ts +1 -1
  625. package/build-types/input-control/types.d.ts.map +1 -1
  626. package/build-types/item-group/item/hook.d.ts +2 -1
  627. package/build-types/item-group/item/hook.d.ts.map +1 -1
  628. package/build-types/item-group/item-group/hook.d.ts +2 -1
  629. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  630. package/build-types/navigator/index.d.ts +2 -0
  631. package/build-types/navigator/index.d.ts.map +1 -1
  632. package/build-types/navigator/navigator-back-button/component.d.ts +38 -0
  633. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -0
  634. package/build-types/navigator/navigator-back-button/hook.d.ts +283 -0
  635. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -0
  636. package/build-types/navigator/navigator-back-button/index.d.ts +2 -0
  637. package/build-types/navigator/navigator-back-button/index.d.ts.map +1 -0
  638. package/build-types/navigator/navigator-button/component.d.ts +37 -0
  639. package/build-types/navigator/navigator-button/component.d.ts.map +1 -0
  640. package/build-types/navigator/navigator-button/hook.d.ts +283 -0
  641. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -0
  642. package/build-types/navigator/navigator-button/index.d.ts +2 -0
  643. package/build-types/navigator/navigator-button/index.d.ts.map +1 -0
  644. package/build-types/navigator/navigator-provider/component.d.ts +10 -20
  645. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  646. package/build-types/navigator/navigator-screen/component.d.ts +10 -20
  647. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  648. package/build-types/navigator/types.d.ts +21 -0
  649. package/build-types/navigator/types.d.ts.map +1 -1
  650. package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
  651. package/build-types/resizable-box/index.d.ts +2 -2
  652. package/build-types/resizable-box/index.d.ts.map +1 -1
  653. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  654. package/build-types/scrollable/hook.d.ts +2 -1
  655. package/build-types/scrollable/hook.d.ts.map +1 -1
  656. package/build-types/select-control/index.d.ts +1 -3
  657. package/build-types/select-control/index.d.ts.map +1 -1
  658. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  659. package/build-types/spacer/hook.d.ts +2 -1
  660. package/build-types/spacer/hook.d.ts.map +1 -1
  661. package/build-types/surface/hook.d.ts +2 -1
  662. package/build-types/surface/hook.d.ts.map +1 -1
  663. package/build-types/text/hook.d.ts +2 -1
  664. package/build-types/text/hook.d.ts.map +1 -1
  665. package/build-types/text/types.d.ts +1 -2
  666. package/build-types/text/types.d.ts.map +1 -1
  667. package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
  668. package/build-types/tools-panel/tools-panel/hook.d.ts +2 -1
  669. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  670. package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -1
  671. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  672. package/build-types/tools-panel/tools-panel-item/hook.d.ts +2 -1
  673. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  674. package/build-types/truncate/hook.d.ts +2 -1
  675. package/build-types/truncate/hook.d.ts.map +1 -1
  676. package/build-types/ui/context/context-connect.d.ts +18 -16
  677. package/build-types/ui/context/context-connect.d.ts.map +1 -1
  678. package/build-types/ui/context/index.d.ts +4 -4
  679. package/build-types/ui/context/index.d.ts.map +1 -1
  680. package/build-types/ui/context/wordpress-component.d.ts +3 -6
  681. package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
  682. package/build-types/ui/control-group/hook.d.ts +2 -1
  683. package/build-types/ui/control-group/hook.d.ts.map +1 -1
  684. package/build-types/ui/control-label/hook.d.ts +2 -1
  685. package/build-types/ui/control-label/hook.d.ts.map +1 -1
  686. package/build-types/ui/form-group/use-form-group.d.ts +6 -4
  687. package/build-types/ui/form-group/use-form-group.d.ts.map +1 -1
  688. package/build-types/unit-control/index.d.ts +3 -5
  689. package/build-types/unit-control/index.d.ts.map +1 -1
  690. package/build-types/unit-control/types.d.ts +4 -6
  691. package/build-types/unit-control/types.d.ts.map +1 -1
  692. package/build-types/unit-control/utils.d.ts +47 -38
  693. package/build-types/unit-control/utils.d.ts.map +1 -1
  694. package/build-types/v-stack/hook.d.ts +2 -1
  695. package/build-types/v-stack/hook.d.ts.map +1 -1
  696. package/build-types/z-stack/component.d.ts.map +1 -1
  697. package/package.json +19 -18
  698. package/src/alignment-matrix-control/README.md +4 -0
  699. package/src/alignment-matrix-control/stories/index.js +1 -1
  700. package/src/alignment-matrix-control/utils.js +1 -1
  701. package/src/angle-picker-control/angle-circle.js +1 -1
  702. package/src/animation/index.js +0 -1
  703. package/src/autocomplete/get-default-use-items.js +3 -3
  704. package/src/base-control/stories/index.js +65 -22
  705. package/src/base-field/hook.js +1 -1
  706. package/src/box-control/icon.js +1 -1
  707. package/src/box-control/index.js +5 -5
  708. package/src/box-control/stories/index.js +4 -1
  709. package/src/box-control/test/index.js +27 -7
  710. package/src/box-control/unit-control.js +1 -1
  711. package/src/box-control/utils.js +13 -9
  712. package/src/button/index.js +5 -5
  713. package/src/button/index.native.js +7 -7
  714. package/src/button/style.scss +1 -0
  715. package/src/card/card/component.js +1 -1
  716. package/src/card/card-body/component.js +1 -1
  717. package/src/card/card-divider/component.js +1 -1
  718. package/src/card/card-footer/component.js +1 -1
  719. package/src/card/card-header/component.js +1 -1
  720. package/src/card/card-media/component.js +1 -1
  721. package/src/color-palette/index.native.js +92 -75
  722. package/src/color-palette/style.native.scss +10 -5
  723. package/src/color-palette/style.scss +1 -0
  724. package/src/color-picker/color-display.tsx +1 -1
  725. package/src/color-picker/component.tsx +2 -2
  726. package/src/color-picker/hex-input.tsx +9 -9
  727. package/src/color-picker/styles.ts +1 -1
  728. package/src/color-picker/test/index.js +1 -1
  729. package/src/combobox-control/index.js +1 -1
  730. package/src/combobox-control/style.scss +1 -0
  731. package/src/confirm-dialog/README.md +56 -45
  732. package/src/confirm-dialog/component.tsx +6 -4
  733. package/src/confirm-dialog/stories/index.js +19 -0
  734. package/src/confirm-dialog/test/index.js +28 -0
  735. package/src/confirm-dialog/types.ts +2 -0
  736. package/src/date-time/style.scss +4 -0
  737. package/src/date-time/time.js +16 -5
  738. package/src/dimension-control/test/index.test.js +1 -1
  739. package/src/disabled/test/index.js +1 -1
  740. package/src/divider/component.tsx +5 -5
  741. package/src/divider/stories/index.tsx +70 -0
  742. package/src/divider/types.ts +3 -1
  743. package/src/draggable/index.js +3 -3
  744. package/src/draggable/stories/index.js +1 -1
  745. package/src/elevation/component.js +1 -1
  746. package/src/flex/flex/component.js +1 -1
  747. package/src/flex/flex-block/component.js +1 -1
  748. package/src/flex/flex-item/component.js +1 -1
  749. package/src/flyout/flyout/README.md +1 -1
  750. package/src/flyout/flyout/component.js +1 -1
  751. package/src/flyout/flyout-content/component.js +1 -1
  752. package/src/flyout/test/index.js +1 -1
  753. package/src/focal-point-picker/README.md +7 -0
  754. package/src/focal-point-picker/index.js +12 -7
  755. package/src/focal-point-picker/index.native.js +7 -7
  756. package/src/focal-point-picker/stories/index.js +30 -0
  757. package/src/focal-point-picker/test/index.js +44 -0
  758. package/src/focal-point-picker/tooltip/index.native.js +1 -1
  759. package/src/font-size-picker/README.md +1 -2
  760. package/src/font-size-picker/index.js +1 -2
  761. package/src/font-size-picker/stories/index.js +87 -108
  762. package/src/form-file-upload/README.md +1 -1
  763. package/src/form-file-upload/stories/index.js +51 -0
  764. package/src/form-token-field/index.js +6 -6
  765. package/src/form-token-field/style.scss +1 -0
  766. package/src/form-token-field/suggestions-list.js +2 -2
  767. package/src/form-token-field/test/index.js +6 -6
  768. package/src/grid/component.js +1 -1
  769. package/src/h-stack/component.js +1 -1
  770. package/src/heading/component.tsx +6 -6
  771. package/src/heading/hook.ts +1 -1
  772. package/src/heading/stories/index.tsx +37 -0
  773. package/src/higher-order/with-filters/test/index.js +1 -1
  774. package/src/higher-order/with-focus-outside/test/index.js +1 -1
  775. package/src/higher-order/with-notices/index.js +1 -1
  776. package/src/higher-order/with-notices/test/index.js +3 -3
  777. package/src/index.js +6 -4
  778. package/src/index.native.js +9 -5
  779. package/src/input-control/index.tsx +2 -2
  780. package/src/input-control/input-base.tsx +3 -3
  781. package/src/input-control/input-field.tsx +16 -15
  782. package/src/input-control/reducer/reducer.ts +3 -0
  783. package/src/input-control/stories/index.js +1 -1
  784. package/src/input-control/styles/input-control-styles.tsx +1 -0
  785. package/src/input-control/test/index.js +4 -4
  786. package/src/input-control/types.ts +1 -1
  787. package/src/isolated-event-container/index.js +1 -1
  788. package/src/item-group/item/component.tsx +2 -2
  789. package/src/item-group/item-group/component.tsx +2 -2
  790. package/src/item-group/test/index.js +0 -1
  791. package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  792. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  793. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +10 -1
  794. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  795. package/src/mobile/bottom-sheet/index.native.js +11 -11
  796. package/src/mobile/bottom-sheet/link-cell.native.js +1 -1
  797. package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  798. package/src/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  799. package/src/mobile/color-settings/palette.screen.native.js +39 -9
  800. package/src/mobile/color-settings/style.native.scss +4 -0
  801. package/src/mobile/global-styles-context/test/fixtures/theme.native.js +27 -0
  802. package/src/mobile/global-styles-context/test/utils.native.js +2 -2
  803. package/src/mobile/global-styles-context/utils.native.js +85 -16
  804. package/src/mobile/gradient/index.native.js +2 -2
  805. package/src/mobile/html-text-input/container.ios.js +3 -3
  806. package/src/mobile/html-text-input/index.native.js +1 -1
  807. package/src/mobile/html-text-input/test/index.native.js +14 -14
  808. package/src/mobile/image/index.native.js +1 -1
  809. package/src/mobile/inserter-button/index.native.js +1 -2
  810. package/src/mobile/inserter-button/sparkles.js +15 -0
  811. package/src/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  812. package/src/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  813. package/src/mobile/link-picker/index.native.js +3 -3
  814. package/src/mobile/link-picker/link-picker-results.native.js +8 -8
  815. package/src/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  816. package/src/mobile/link-settings/index.native.js +1 -2
  817. package/src/mobile/link-settings/test/edit.native.js +15 -15
  818. package/src/modal/aria-helper.js +1 -1
  819. package/src/modal/index.js +2 -2
  820. package/src/navigable-container/container.js +2 -2
  821. package/src/navigable-container/tabbable.js +1 -1
  822. package/src/navigable-container/test/menu.js +5 -5
  823. package/src/navigable-container/test/tabbable.js +2 -2
  824. package/src/navigation/item/index.js +1 -1
  825. package/src/navigation/menu/index.js +1 -1
  826. package/src/navigation/stories/controlled-state.js +2 -2
  827. package/src/navigation/stories/index.js +1 -1
  828. package/src/navigator/index.ts +2 -0
  829. package/src/navigator/navigator-back-button/README.md +31 -0
  830. package/src/navigator/navigator-back-button/component.tsx +62 -0
  831. package/src/navigator/navigator-back-button/hook.ts +40 -0
  832. package/src/navigator/navigator-back-button/index.ts +1 -0
  833. package/src/navigator/navigator-button/README.md +38 -0
  834. package/src/navigator/navigator-button/component.tsx +61 -0
  835. package/src/navigator/navigator-button/hook.ts +55 -0
  836. package/src/navigator/navigator-button/index.ts +1 -0
  837. package/src/navigator/navigator-provider/README.md +20 -33
  838. package/src/navigator/navigator-provider/component.tsx +13 -23
  839. package/src/navigator/navigator-screen/README.md +1 -1
  840. package/src/navigator/navigator-screen/component.tsx +16 -25
  841. package/src/navigator/stories/index.js +24 -37
  842. package/src/navigator/test/index.js +105 -51
  843. package/src/navigator/types.ts +27 -1
  844. package/src/number-control/index.js +1 -1
  845. package/src/number-control/stories/index.js +1 -1
  846. package/src/panel/body.js +2 -2
  847. package/src/popover/index.js +3 -3
  848. package/src/popover/utils.js +6 -6
  849. package/src/radio/stories/index.js +1 -1
  850. package/src/radio-group/index.js +1 -1
  851. package/src/radio-group/stories/index.js +4 -1
  852. package/src/range-control/stories/index.js +1 -1
  853. package/src/range-control/styles/range-control-styles.js +1 -1
  854. package/src/range-control/test/index.js +2 -2
  855. package/src/resizable-box/index.tsx +2 -2
  856. package/src/resizable-box/resize-tooltip/index.tsx +2 -2
  857. package/src/resizable-box/resize-tooltip/label.tsx +2 -2
  858. package/src/sandbox/index.js +5 -5
  859. package/src/sandbox/index.native.js +1 -1
  860. package/src/scrollable/component.js +1 -1
  861. package/src/select-control/index.tsx +3 -4
  862. package/src/select-control/styles/select-control-styles.ts +1 -0
  863. package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  864. package/src/slot-fill/bubbles-virtually/slot.js +1 -2
  865. package/src/slot-fill/fill.js +1 -1
  866. package/src/slot-fill/provider.js +1 -1
  867. package/src/snackbar/index.js +1 -1
  868. package/src/snackbar/list.js +1 -1
  869. package/src/spacer/component.tsx +2 -2
  870. package/src/style-provider/index.js +2 -2
  871. package/src/surface/component.js +1 -1
  872. package/src/tab-panel/test/index.js +1 -1
  873. package/src/text/component.js +1 -1
  874. package/src/text/test/index.js +2 -2
  875. package/src/text/types.ts +6 -8
  876. package/src/text-control/index.js +2 -2
  877. package/src/text-highlight/test/index.js +4 -4
  878. package/src/toggle-control/test/index.js +3 -3
  879. package/src/toggle-group-control/stories/index.js +1 -1
  880. package/src/toggle-group-control/test/__snapshots__/index.js.snap +1 -0
  881. package/src/toggle-group-control/toggle-group-control/component.tsx +4 -4
  882. package/src/toggle-group-control/toggle-group-control-option/component.tsx +2 -2
  883. package/src/toggle-group-control/toggle-group-control-option/styles.ts +1 -0
  884. package/src/toolbar/index.js +1 -1
  885. package/src/toolbar-group/test/index.js +2 -2
  886. package/src/tools-panel/stories/index.js +0 -1
  887. package/src/tools-panel/tools-panel/component.tsx +2 -2
  888. package/src/tools-panel/tools-panel-header/component.tsx +2 -2
  889. package/src/tools-panel/tools-panel-item/component.tsx +2 -2
  890. package/src/tooltip/index.js +3 -3
  891. package/src/tooltip/index.native.js +7 -7
  892. package/src/tooltip/test/index.js +2 -2
  893. package/src/tooltip/test/index.native.js +2 -2
  894. package/src/tree-grid/README.md +24 -1
  895. package/src/tree-grid/index.js +66 -7
  896. package/src/tree-grid/stories/index.js +4 -1
  897. package/src/tree-grid/test/__snapshots__/index.js.snap +1 -14
  898. package/src/tree-grid/test/index.js +259 -8
  899. package/src/truncate/component.js +1 -1
  900. package/src/truncate/utils.js +1 -1
  901. package/src/ui/context/{context-connect.js → context-connect.ts} +27 -16
  902. package/src/ui/context/context-system-provider.js +2 -2
  903. package/src/ui/context/{index.js → index.ts} +0 -0
  904. package/src/ui/context/wordpress-component.ts +3 -2
  905. package/src/ui/control-group/component.js +1 -1
  906. package/src/ui/control-label/component.js +1 -1
  907. package/src/ui/form-group/form-group.js +1 -1
  908. package/src/ui/shortcut/component.tsx +2 -2
  909. package/src/ui/spinner/component.js +1 -1
  910. package/src/ui/tooltip/component.js +1 -1
  911. package/src/ui/tooltip/content.js +1 -1
  912. package/src/ui/tooltip/test/index.js +4 -4
  913. package/src/ui/utils/colors.js +2 -2
  914. package/src/ui/utils/space.ts +2 -2
  915. package/src/unit-control/README.md +1 -1
  916. package/src/unit-control/index.native.js +5 -3
  917. package/src/unit-control/index.tsx +66 -37
  918. package/src/unit-control/stories/index.js +1 -1
  919. package/src/unit-control/test/index.js +102 -3
  920. package/src/unit-control/test/utils.js +56 -15
  921. package/src/unit-control/types.ts +5 -8
  922. package/src/unit-control/unit-select-control.tsx +1 -1
  923. package/src/unit-control/utils.ts +128 -125
  924. package/src/utils/breakpoint-values.js +1 -1
  925. package/src/utils/colors-values.js +1 -1
  926. package/src/utils/hooks/test/use-controlled-state.js +1 -1
  927. package/src/utils/hooks/test/use-controlled-value.js +3 -3
  928. package/src/utils/hooks/test/use-latest-ref.js +1 -1
  929. package/src/utils/test/math.js +2 -2
  930. package/src/utils/test/rtl.js +12 -12
  931. package/src/v-stack/component.js +1 -1
  932. package/src/visually-hidden/component.js +1 -1
  933. package/src/z-stack/component.tsx +2 -2
  934. package/tsconfig.json +1 -1
  935. package/tsconfig.tsbuildinfo +1 -1
  936. package/src/divider/stories/index.js +0 -64
  937. package/src/heading/stories/index.js +0 -24
  938. package/src/tools-panel/stories/typography-panel.js +0 -215
@@ -17,6 +17,7 @@ import { focus } from '@wordpress/dom';
17
17
  import { useContext, useEffect, useMemo, useRef } from '@wordpress/element';
18
18
  import { useReducedMotion, useMergeRefs, usePrevious } from '@wordpress/compose';
19
19
  import { isRTL } from '@wordpress/i18n';
20
+ import { escapeAttribute } from '@wordpress/escape-html';
20
21
  /**
21
22
  * Internal dependencies
22
23
  */
@@ -37,7 +38,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
37
38
  } : {
38
39
  name: "1ulogbc-classes",
39
40
  styles: "overflow-x:auto;max-height:100%;label:classes;",
40
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvbmF2aWdhdG9yL25hdmlnYXRvci1zY3JlZW4vY29tcG9uZW50LnRze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0b3JTY3JlZW4gcGF0aD1cIi9jaGlsZFwiPlxuICogICAgICAgPHA+VGhpcyBpcyB0aGUgY2hpbGQgc2NyZWVuLjwvcD5cbiAqICAgICAgIDxOYXZpZ2F0b3JCYWNrQnV0dG9uPlxuICogICAgICAgICBHbyBiYWNrXG4gKiAgICAgICA8L05hdmlnYXRvckJhY2tCdXR0b24+XG4gKiAgICAgPC9OYXZpZ2F0b3JTY3JlZW4+XG4gKiAgIDwvTmF2aWdhdG9yUHJvdmlkZXI+XG4gKiApO1xuICogYGBgXG4gKi9cbmNvbnN0IENvbm5lY3RlZE5hdmlnYXRvclNjcmVlbiA9IGNvbnRleHRDb25uZWN0KFxuXHROYXZpZ2F0b3JTY3JlZW4sXG5cdCdOYXZpZ2F0b3JTY3JlZW4nXG4pO1xuXG5leHBvcnQgZGVmYXVsdCBDb25uZWN0ZWROYXZpZ2F0b3JTY3JlZW47XG4iXX0= */",
41
42
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
42
43
  };
43
44
 
@@ -52,7 +53,7 @@ function NavigatorScreen(props, forwardedRef) {
52
53
  const {
53
54
  location
54
55
  } = useContext(NavigatorContext);
55
- const isMatch = location.path === path;
56
+ const isMatch = location.path === escapeAttribute(path);
56
57
  const wrapperRef = useRef(null);
57
58
  const previousLocation = usePrevious(location);
58
59
  const cx = useCx();
@@ -130,44 +131,34 @@ function NavigatorScreen(props, forwardedRef) {
130
131
  }, otherProps, animatedProps), children);
131
132
  }
132
133
  /**
133
- * The `NavigatorScreen` component represents a single view/screen/panel/menu and is supposed to be used in combination with the `NavigatorProvider` component.
134
+ * The `NavigatorScreen` component represents a single view/screen/panel and
135
+ * should be used in combination with the `NavigatorProvider`, the
136
+ * `NavigatorButton` and the `NavigatorBackButton` components (or the `useNavigator`
137
+ * hook).
134
138
  *
135
139
  * @example
136
140
  * ```jsx
137
141
  * import {
138
142
  * __experimentalNavigatorProvider as NavigatorProvider,
139
143
  * __experimentalNavigatorScreen as NavigatorScreen,
140
- * __experimentalUseNavigator as useNavigator,
144
+ * __experimentalNavigatorButton as NavigatorButton,
145
+ * __experimentalNavigatorBackButton as NavigatorBackButton,
141
146
  * } from '@wordpress/components';
142
147
  *
143
- * function NavigatorButton( { path, ...props } ) {
144
- * const { goTo } = useNavigator();
145
- * return (
146
- * <Button
147
- * variant="primary"
148
- * onClick={ () => goTo( path ) }
149
- * { ...props }
150
- * />
151
- * );
152
- * }
153
- *
154
- * function NavigatorBackButton( props ) {
155
- * const { goBack } = useNavigator();
156
- * return <Button variant="secondary" onClick={ () => goBack() } { ...props } />;
157
- * }
158
- *
159
148
  * const MyNavigation = () => (
160
149
  * <NavigatorProvider initialPath="/">
161
150
  * <NavigatorScreen path="/">
162
151
  * <p>This is the home screen.</p>
163
- * <NavigatorButton path="/child">
152
+ * <NavigatorButton path="/child">
164
153
  * Navigate to child screen.
165
154
  * </NavigatorButton>
166
155
  * </NavigatorScreen>
167
156
  *
168
157
  * <NavigatorScreen path="/child">
169
158
  * <p>This is the child screen.</p>
170
- * <NavigatorBackButton>Go back</NavigatorBackButton>
159
+ * <NavigatorBackButton>
160
+ * Go back
161
+ * </NavigatorBackButton>
171
162
  * </NavigatorScreen>
172
163
  * </NavigatorProvider>
173
164
  * );
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/navigator/navigator-screen/component.tsx"],"names":["motion","css","focus","useContext","useEffect","useMemo","useRef","useReducedMotion","useMergeRefs","usePrevious","isRTL","contextConnect","useContextSystem","useCx","View","NavigatorContext","animationEnterDelay","animationEnterDuration","animationExitDuration","animationExitDelay","NavigatorScreen","props","forwardedRef","children","className","path","otherProps","prefersReducedMotion","location","isMatch","wrapperRef","previousLocation","cx","classes","isInitialLocation","isInitial","isBack","current","elementToFocus","focusTargetSelector","querySelector","firstTabbable","tabbable","find","mergedWrapperRef","animate","opacity","transition","delay","duration","ease","x","initial","exit","animatedProps","ConnectedNavigatorScreen"],"mappings":";;;;;AAAA;AACA;AACA;AAEA;AACA,SAASA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CAC9CS,eAD8C,EAE9C,iBAF8C,CAA/C;AAKA,eAAemC,wBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { Ref } from 'react';\n// eslint-disable-next-line no-restricted-imports\nimport { motion, MotionProps } from 'framer-motion';\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport { useContext, useEffect, useMemo, useRef } from '@wordpress/element';\nimport {\n\tuseReducedMotion,\n\tuseMergeRefs,\n\tusePrevious,\n} from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tcontextConnect,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport { View } from '../../view';\nimport { NavigatorContext } from '../context';\nimport type { NavigatorScreenProps } from '../types';\n\nconst animationEnterDelay = 0;\nconst animationEnterDuration = 0.14;\nconst animationExitDuration = 0.14;\nconst animationExitDelay = 0;\n\n// Props specific to `framer-motion` can't be currently passed to `NavigatorScreen`,\n// as some of them would overlap with HTML props (e.g. `onAnimationStart`, ...)\ntype Props = Omit<\n\tWordPressComponentProps< NavigatorScreenProps, 'div', false >,\n\tkeyof MotionProps\n>;\n\nfunction NavigatorScreen( props: Props, forwardedRef: Ref< any > ) {\n\tconst { children, className, path, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'NavigatorScreen'\n\t);\n\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst { location } = useContext( NavigatorContext );\n\tconst isMatch = location.path === path;\n\tconst wrapperRef = useRef< HTMLDivElement >( null );\n\n\tconst previousLocation = usePrevious( location );\n\n\tconst cx = useCx();\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tcss( {\n\t\t\t\t\t// Ensures horizontal overflow is visually accessible\n\t\t\t\t\toverflowX: 'auto',\n\t\t\t\t\t// In case the root has a height, it should not be exceeded\n\t\t\t\t\tmaxHeight: '100%',\n\t\t\t\t} ),\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx ]\n\t);\n\n\t// Focus restoration\n\tconst isInitialLocation = location.isInitial && ! location.isBack;\n\tuseEffect( () => {\n\t\t// Only attempt to restore focus:\n\t\t// - if the current location is not the initial one (to avoid moving focus on page load)\n\t\t// - when the screen becomes visible\n\t\t// - if the wrapper ref has been assigned\n\t\tif ( isInitialLocation || ! isMatch || ! wrapperRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet elementToFocus: HTMLElement | null = null;\n\n\t\t// When navigating back, if a selector is provided, use it to look for the\n\t\t// target element (assumed to be a node inside the current NavigatorScreen)\n\t\tif ( location.isBack && previousLocation?.focusTargetSelector ) {\n\t\t\telementToFocus = wrapperRef.current.querySelector(\n\t\t\t\tpreviousLocation.focusTargetSelector\n\t\t\t);\n\t\t}\n\n\t\t// If the previous query didn't run or find any element to focus, fallback\n\t\t// to the first tabbable element in the screen (or the screen itself).\n\t\tif ( ! elementToFocus ) {\n\t\t\tconst firstTabbable = ( focus.tabbable.find(\n\t\t\t\twrapperRef.current\n\t\t\t) as HTMLElement[] )[ 0 ];\n\n\t\t\telementToFocus = firstTabbable ?? wrapperRef.current;\n\t\t}\n\n\t\telementToFocus.focus();\n\t}, [ isInitialLocation, isMatch ] );\n\n\tconst mergedWrapperRef = useMergeRefs( [ forwardedRef, wrapperRef ] );\n\n\tif ( ! isMatch ) {\n\t\treturn null;\n\t}\n\n\tif ( prefersReducedMotion ) {\n\t\treturn (\n\t\t\t<View\n\t\t\t\tref={ mergedWrapperRef }\n\t\t\t\tclassName={ classes }\n\t\t\t\t{ ...otherProps }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</View>\n\t\t);\n\t}\n\n\tconst animate = {\n\t\topacity: 1,\n\t\ttransition: {\n\t\t\tdelay: animationEnterDelay,\n\t\t\tduration: animationEnterDuration,\n\t\t\tease: 'easeInOut',\n\t\t},\n\t\tx: 0,\n\t};\n\tconst initial = {\n\t\topacity: 0,\n\t\tx:\n\t\t\t( isRTL() && location.isBack ) || ( ! isRTL() && ! location.isBack )\n\t\t\t\t? 50\n\t\t\t\t: -50,\n\t};\n\tconst exit = {\n\t\tdelay: animationExitDelay,\n\t\topacity: 0,\n\t\tx:\n\t\t\t( ! isRTL() && location.isBack ) || ( isRTL() && ! location.isBack )\n\t\t\t\t? 50\n\t\t\t\t: -50,\n\t\ttransition: {\n\t\t\tduration: animationExitDuration,\n\t\t\tease: 'easeInOut',\n\t\t},\n\t};\n\n\tconst animatedProps = {\n\t\tanimate,\n\t\texit,\n\t\tinitial,\n\t};\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={ mergedWrapperRef }\n\t\t\tclassName={ classes }\n\t\t\t{ ...otherProps }\n\t\t\t{ ...animatedProps }\n\t\t>\n\t\t\t{ children }\n\t\t</motion.div>\n\t);\n}\n\n/**\n * The `NavigatorScreen` component represents a single view/screen/panel/menu and is supposed to be used in combination with the `NavigatorProvider` component.\n *\n * @example\n * ```jsx\n * import {\n * __experimentalNavigatorProvider as NavigatorProvider,\n * __experimentalNavigatorScreen as NavigatorScreen,\n * __experimentalUseNavigator as useNavigator,\n * } from '@wordpress/components';\n *\n * function NavigatorButton( { path, ...props } ) {\n * const { goTo } = useNavigator();\n * return (\n * <Button\n * variant=\"primary\"\n * onClick={ () => goTo( path ) }\n * { ...props }\n * />\n * );\n * }\n *\n * function NavigatorBackButton( props ) {\n * const { goBack } = useNavigator();\n * return <Button variant=\"secondary\" onClick={ () => goBack() } { ...props } />;\n * }\n *\n * const MyNavigation = () => (\n * <NavigatorProvider initialPath=\"/\">\n * <NavigatorScreen path=\"/\">\n * <p>This is the home screen.</p>\n * \t <NavigatorButton path=\"/child\">\n * Navigate to child screen.\n * </NavigatorButton>\n * </NavigatorScreen>\n *\n * <NavigatorScreen path=\"/child\">\n * <p>This is the child screen.</p>\n * <NavigatorBackButton>Go back</NavigatorBackButton>\n * </NavigatorScreen>\n * </NavigatorProvider>\n * );\n * ```\n */\nconst ConnectedNavigatorScreen = contextConnect(\n\tNavigatorScreen,\n\t'NavigatorScreen'\n);\n\nexport default ConnectedNavigatorScreen;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/navigator/navigator-screen/component.tsx"],"names":["motion","css","focus","useContext","useEffect","useMemo","useRef","useReducedMotion","useMergeRefs","usePrevious","isRTL","escapeAttribute","contextConnect","useContextSystem","useCx","View","NavigatorContext","animationEnterDelay","animationEnterDuration","animationExitDuration","animationExitDelay","NavigatorScreen","props","forwardedRef","children","className","path","otherProps","prefersReducedMotion","location","isMatch","wrapperRef","previousLocation","cx","classes","isInitialLocation","isInitial","isBack","current","elementToFocus","focusTargetSelector","querySelector","firstTabbable","tabbable","find","mergedWrapperRef","animate","opacity","transition","delay","duration","ease","x","initial","exit","animatedProps","ConnectedNavigatorScreen"],"mappings":";;;;;AAAA;AACA;AACA;AAEA;AACA,SAASA,MAAT,QAAoC,eAApC;AACA,SAASC,GAAT,QAAoB,gBAApB;AAEA;AACA;AACA;;AACA,SAASC,KAAT,QAAsB,gBAAtB;AACA,SAASC,UAAT,EAAqBC,SAArB,EAAgCC,OAAhC,EAAyCC,MAAzC,QAAuD,oBAAvD;AACA,SACCC,gBADD,EAECC,YAFD,EAGCC,WAHD,QAIO,oBAJP;AAKA,SAASC,KAAT,QAAsB,iBAAtB;AACA,SAASC,eAAT,QAAgC,wBAAhC;AAEA;AACA;AACA;;AACA,SACCC,cADD,EAECC,gBAFD,QAIO,kBAJP;AAKA,SAASC,KAAT,QAAsB,0BAAtB;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,gBAAT,QAAiC,YAAjC;AAGA,MAAMC,mBAAmB,GAAG,CAA5B;AACA,MAAMC,sBAAsB,GAAG,IAA/B;AACA,MAAMC,qBAAqB,GAAG,IAA9B;AACA,MAAMC,kBAAkB,GAAG,CAA3B,C,CAEA;AACA;;;;;;;;;;;;AAMA,SAASC,eAAT,CAA0BC,KAA1B,EAAwCC,YAAxC,EAA4E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C,EANO;AAOZW,IAAAA,UAAU,EAAE;AACXE,MAAAA,QAAQ,EAAE/B,qBADC;AAEXgC,MAAAA,IAAI,EAAE;AAFK;AAPA,GAAb;AAaA,QAAMI,aAAa,GAAG;AACrBT,IAAAA,OADqB;AAErBQ,IAAAA,IAFqB;AAGrBD,IAAAA;AAHqB,GAAtB;AAMA,SACC,cAAC,MAAD,CAAQ,GAAR;AACC,IAAA,GAAG,EAAGR,gBADP;AAEC,IAAA,SAAS,EAAGX;AAFb,KAGMP,UAHN,EAIM4B,aAJN,GAMG/B,QANH,CADD;AAUA;AAED;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,MAAMgC,wBAAwB,GAAG5C,cAAc,CAC9CS,eAD8C,EAE9C,iBAF8C,CAA/C;AAKA,eAAemC,wBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n// eslint-disable-next-line no-restricted-imports\nimport { motion, MotionProps } from 'framer-motion';\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { focus } from '@wordpress/dom';\nimport { useContext, useEffect, useMemo, useRef } from '@wordpress/element';\nimport {\n\tuseReducedMotion,\n\tuseMergeRefs,\n\tusePrevious,\n} from '@wordpress/compose';\nimport { isRTL } from '@wordpress/i18n';\nimport { escapeAttribute } from '@wordpress/escape-html';\n\n/**\n * Internal dependencies\n */\nimport {\n\tcontextConnect,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../../ui/context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport { View } from '../../view';\nimport { NavigatorContext } from '../context';\nimport type { NavigatorScreenProps } from '../types';\n\nconst animationEnterDelay = 0;\nconst animationEnterDuration = 0.14;\nconst animationExitDuration = 0.14;\nconst animationExitDelay = 0;\n\n// Props specific to `framer-motion` can't be currently passed to `NavigatorScreen`,\n// as some of them would overlap with HTML props (e.g. `onAnimationStart`, ...)\ntype Props = Omit<\n\tWordPressComponentProps< NavigatorScreenProps, 'div', false >,\n\tkeyof MotionProps\n>;\n\nfunction NavigatorScreen( props: Props, forwardedRef: ForwardedRef< any > ) {\n\tconst { children, className, path, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'NavigatorScreen'\n\t);\n\n\tconst prefersReducedMotion = useReducedMotion();\n\tconst { location } = useContext( NavigatorContext );\n\tconst isMatch = location.path === escapeAttribute( path );\n\tconst wrapperRef = useRef< HTMLDivElement >( null );\n\n\tconst previousLocation = usePrevious( location );\n\n\tconst cx = useCx();\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tcss( {\n\t\t\t\t\t// Ensures horizontal overflow is visually accessible.\n\t\t\t\t\toverflowX: 'auto',\n\t\t\t\t\t// In case the root has a height, it should not be exceeded.\n\t\t\t\t\tmaxHeight: '100%',\n\t\t\t\t} ),\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ className, cx ]\n\t);\n\n\t// Focus restoration\n\tconst isInitialLocation = location.isInitial && ! location.isBack;\n\tuseEffect( () => {\n\t\t// Only attempt to restore focus:\n\t\t// - if the current location is not the initial one (to avoid moving focus on page load)\n\t\t// - when the screen becomes visible\n\t\t// - if the wrapper ref has been assigned\n\t\tif ( isInitialLocation || ! isMatch || ! wrapperRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet elementToFocus: HTMLElement | null = null;\n\n\t\t// When navigating back, if a selector is provided, use it to look for the\n\t\t// target element (assumed to be a node inside the current NavigatorScreen)\n\t\tif ( location.isBack && previousLocation?.focusTargetSelector ) {\n\t\t\telementToFocus = wrapperRef.current.querySelector(\n\t\t\t\tpreviousLocation.focusTargetSelector\n\t\t\t);\n\t\t}\n\n\t\t// If the previous query didn't run or find any element to focus, fallback\n\t\t// to the first tabbable element in the screen (or the screen itself).\n\t\tif ( ! elementToFocus ) {\n\t\t\tconst firstTabbable = ( focus.tabbable.find(\n\t\t\t\twrapperRef.current\n\t\t\t) as HTMLElement[] )[ 0 ];\n\n\t\t\telementToFocus = firstTabbable ?? wrapperRef.current;\n\t\t}\n\n\t\telementToFocus.focus();\n\t}, [ isInitialLocation, isMatch ] );\n\n\tconst mergedWrapperRef = useMergeRefs( [ forwardedRef, wrapperRef ] );\n\n\tif ( ! isMatch ) {\n\t\treturn null;\n\t}\n\n\tif ( prefersReducedMotion ) {\n\t\treturn (\n\t\t\t<View\n\t\t\t\tref={ mergedWrapperRef }\n\t\t\t\tclassName={ classes }\n\t\t\t\t{ ...otherProps }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</View>\n\t\t);\n\t}\n\n\tconst animate = {\n\t\topacity: 1,\n\t\ttransition: {\n\t\t\tdelay: animationEnterDelay,\n\t\t\tduration: animationEnterDuration,\n\t\t\tease: 'easeInOut',\n\t\t},\n\t\tx: 0,\n\t};\n\tconst initial = {\n\t\topacity: 0,\n\t\tx:\n\t\t\t( isRTL() && location.isBack ) || ( ! isRTL() && ! location.isBack )\n\t\t\t\t? 50\n\t\t\t\t: -50,\n\t};\n\tconst exit = {\n\t\tdelay: animationExitDelay,\n\t\topacity: 0,\n\t\tx:\n\t\t\t( ! isRTL() && location.isBack ) || ( isRTL() && ! location.isBack )\n\t\t\t\t? 50\n\t\t\t\t: -50,\n\t\ttransition: {\n\t\t\tduration: animationExitDuration,\n\t\t\tease: 'easeInOut',\n\t\t},\n\t};\n\n\tconst animatedProps = {\n\t\tanimate,\n\t\texit,\n\t\tinitial,\n\t};\n\n\treturn (\n\t\t<motion.div\n\t\t\tref={ mergedWrapperRef }\n\t\t\tclassName={ classes }\n\t\t\t{ ...otherProps }\n\t\t\t{ ...animatedProps }\n\t\t>\n\t\t\t{ children }\n\t\t</motion.div>\n\t);\n}\n\n/**\n * The `NavigatorScreen` component represents a single view/screen/panel and\n * should be used in combination with the `NavigatorProvider`, the\n * `NavigatorButton` and the `NavigatorBackButton` components (or the `useNavigator`\n * hook).\n *\n * @example\n * ```jsx\n * import {\n * __experimentalNavigatorProvider as NavigatorProvider,\n * __experimentalNavigatorScreen as NavigatorScreen,\n * __experimentalNavigatorButton as NavigatorButton,\n * __experimentalNavigatorBackButton as NavigatorBackButton,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n * <NavigatorProvider initialPath=\"/\">\n * <NavigatorScreen path=\"/\">\n * <p>This is the home screen.</p>\n * <NavigatorButton path=\"/child\">\n * Navigate to child screen.\n * </NavigatorButton>\n * </NavigatorScreen>\n *\n * <NavigatorScreen path=\"/child\">\n * <p>This is the child screen.</p>\n * <NavigatorBackButton>\n * Go back\n * </NavigatorBackButton>\n * </NavigatorScreen>\n * </NavigatorProvider>\n * );\n * ```\n */\nconst ConnectedNavigatorScreen = contextConnect(\n\tNavigatorScreen,\n\t'NavigatorScreen'\n);\n\nexport default ConnectedNavigatorScreen;\n"]}
@@ -44,7 +44,7 @@ export function NumberControl(_ref, ref) {
44
44
  const baseValue = roundClamp(0, min, max, baseStep);
45
45
 
46
46
  const constrainValue = (value, stepOverride) => {
47
- // When step is "any" clamp the value, otherwise round and clamp it
47
+ // When step is "any" clamp the value, otherwise round and clamp it.
48
48
  return isStepAny ? Math.min(max, Math.max(min, value)) : roundClamp(value, min, max, stepOverride !== null && stepOverride !== void 0 ? stepOverride : baseStep);
49
49
  };
50
50
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/number-control/index.js"],"names":["classNames","forwardRef","isRTL","Input","inputControlActionTypes","composeStateReducers","add","subtract","roundClamp","isValueEmpty","NumberControl","ref","__unstableStateReducer","stateReducer","state","className","dragDirection","hideHTMLArrows","isDragEnabled","isShiftStepEnabled","label","max","Infinity","min","required","shiftStep","step","type","typeProp","value","valueProp","props","isStepAny","baseStep","parseFloat","baseValue","constrainValue","stepOverride","Math","autoComplete","classes","numberControlStateReducer","action","payload","event","currentValue","PRESS_UP","PRESS_DOWN","enableShift","shiftKey","incrementalValue","nextValue","preventDefault","DRAG","x","y","delta","modifier","directionModifier","ceil","abs","sign","distance","PRESS_ENTER","COMMIT","applyEmptyValue"],"mappings":";;AAAA;;AACA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,UAAT,QAA2B,oBAA3B;AACA,SAASC,KAAT,QAAsB,iBAAtB;AAEA;AACA;AACA;;AACA,SAASC,KAAT,QAAsB,gCAAtB;AACA,OAAO,KAAKC,uBAAZ,MAAyC,kCAAzC;AACA,SAASC,oBAAT,QAAqC,kCAArC;AACA,SAASC,GAAT,EAAcC,QAAd,EAAwBC,UAAxB,QAA0C,eAA1C;AACA,SAASC,YAAT,QAA6B,iBAA7B;AAEA,OAAO,SAASC,aAAT,OAkBNC,GAlBM,EAmBL;AAAA,MAlBD;AACCC,IAAAA,sBAAsB,EAAEC,YAAY,GAAKC,KAAF,IAAaA,KADrD;AAECC,IAAAA,SAFD;AAGCC,IAAAA,aAAa,GAAG,GAHjB;AAICC,IAAAA,cAAc,GAAG,KAJlB;AAKCC,IAAAA,aAAa,GAAG,IALjB;AAMCC,IAAAA,kBAAkB,GAAG,IANtB;AAOCC,IAAAA,KAPD;AAQCC,IAAAA,GAAG,GAAGC,QARP;AASCC,IAAAA,GAAG,GAAG,CAACD,QATR;AAUCE,IAAAA,QAAQ,GAAG,KAVZ;AAWCC,IAAAA,SAAS,GAAG,EAXb;AAYCC,IAAAA,IAAI,GAAG,CAZR;AAaCC,IAAAA,IAAI,EAAEC,QAAQ,GAAG,QAblB;AAcCC,IAAAA,KAAK,EAAEC,SAdR;AAeC,OAAGC;AAfJ,GAkBC;AACD,QAAMC,SAAS,GAAGN,IAAI,KAAK,KAA3B;AACA,QAAMO,QAAQ,GAAGD,SAAS,GAAG,CAAH,GAAOE,UAAU,CAAER,IAAF,CAA3C;AACA,QAAMS,SAAS,GAAG3B,UAAU,CAAE,CAAF,EAAKe,GAAL,EAAUF,GAAV,EAAe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oB,CAC5CoC,yBAD4C,EAE5C5B,YAF4C;AAhB9C,KADD;AAuBA;AAED,eAAeZ,UAAU,CAAES,aAAF,CAAzB","sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Input } from './styles/number-control-styles';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { composeStateReducers } from '../input-control/reducer/reducer';\nimport { add, subtract, roundClamp } from '../utils/math';\nimport { isValueEmpty } from '../utils/values';\n\nexport function NumberControl(\n\t{\n\t\t__unstableStateReducer: stateReducer = ( state ) => state,\n\t\tclassName,\n\t\tdragDirection = 'n',\n\t\thideHTMLArrows = false,\n\t\tisDragEnabled = true,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmax = Infinity,\n\t\tmin = -Infinity,\n\t\trequired = false,\n\t\tshiftStep = 10,\n\t\tstep = 1,\n\t\ttype: typeProp = 'number',\n\t\tvalue: valueProp,\n\t\t...props\n\t},\n\tref\n) {\n\tconst isStepAny = step === 'any';\n\tconst baseStep = isStepAny ? 1 : parseFloat( step );\n\tconst baseValue = roundClamp( 0, min, max, baseStep );\n\tconst constrainValue = ( value, stepOverride ) => {\n\t\t// When step is \"any\" clamp the value, otherwise round and clamp it\n\t\treturn isStepAny\n\t\t\t? Math.min( max, Math.max( min, value ) )\n\t\t\t: roundClamp( value, min, max, stepOverride ?? baseStep );\n\t};\n\n\tconst autoComplete = typeProp === 'number' ? 'off' : null;\n\tconst classes = classNames( 'components-number-control', className );\n\n\t/**\n\t * \"Middleware\" function that intercepts updates from InputControl.\n\t * This allows us to tap into actions to transform the (next) state for\n\t * InputControl.\n\t *\n\t * @param {Object} state State from InputControl\n\t * @param {Object} action Action triggering state change\n\t * @return {Object} The updated state to apply to InputControl\n\t */\n\tconst numberControlStateReducer = ( state, action ) => {\n\t\tconst { type, payload } = action;\n\t\tconst event = payload?.event;\n\t\tconst currentValue = state.value;\n\n\t\t/**\n\t\t * Handles custom UP and DOWN Keyboard events\n\t\t */\n\t\tif (\n\t\t\ttype === inputControlActionTypes.PRESS_UP ||\n\t\t\ttype === inputControlActionTypes.PRESS_DOWN\n\t\t) {\n\t\t\tconst enableShift = event.shiftKey && isShiftStepEnabled;\n\n\t\t\tconst incrementalValue = enableShift\n\t\t\t\t? parseFloat( shiftStep ) * baseStep\n\t\t\t\t: baseStep;\n\t\t\tlet nextValue = isValueEmpty( currentValue )\n\t\t\t\t? baseValue\n\t\t\t\t: currentValue;\n\n\t\t\tif ( event?.preventDefault ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\tif ( type === inputControlActionTypes.PRESS_UP ) {\n\t\t\t\tnextValue = add( nextValue, incrementalValue );\n\t\t\t}\n\n\t\t\tif ( type === inputControlActionTypes.PRESS_DOWN ) {\n\t\t\t\tnextValue = subtract( nextValue, incrementalValue );\n\t\t\t}\n\n\t\t\tstate.value = constrainValue(\n\t\t\t\tnextValue,\n\t\t\t\tenableShift ? incrementalValue : null\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Handles drag to update events\n\t\t */\n\t\tif ( type === inputControlActionTypes.DRAG && isDragEnabled ) {\n\t\t\tconst [ x, y ] = payload.delta;\n\t\t\tconst enableShift = payload.shiftKey && isShiftStepEnabled;\n\t\t\tconst modifier = enableShift\n\t\t\t\t? parseFloat( shiftStep ) * baseStep\n\t\t\t\t: baseStep;\n\n\t\t\tlet directionModifier;\n\t\t\tlet delta;\n\n\t\t\tswitch ( dragDirection ) {\n\t\t\t\tcase 'n':\n\t\t\t\t\tdelta = y;\n\t\t\t\t\tdirectionModifier = -1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'e':\n\t\t\t\t\tdelta = x;\n\t\t\t\t\tdirectionModifier = isRTL() ? -1 : 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 's':\n\t\t\t\t\tdelta = y;\n\t\t\t\t\tdirectionModifier = 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'w':\n\t\t\t\t\tdelta = x;\n\t\t\t\t\tdirectionModifier = isRTL() ? 1 : -1;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( delta !== 0 ) {\n\t\t\t\tdelta = Math.ceil( Math.abs( delta ) ) * Math.sign( delta );\n\t\t\t\tconst distance = delta * modifier * directionModifier;\n\n\t\t\t\tstate.value = constrainValue(\n\t\t\t\t\tadd( currentValue, distance ),\n\t\t\t\t\tenableShift ? modifier : null\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handles commit (ENTER key press or on blur if isPressEnterToChange)\n\t\t */\n\t\tif (\n\t\t\ttype === inputControlActionTypes.PRESS_ENTER ||\n\t\t\ttype === inputControlActionTypes.COMMIT\n\t\t) {\n\t\t\tconst applyEmptyValue = required === false && currentValue === '';\n\n\t\t\tstate.value = applyEmptyValue\n\t\t\t\t? currentValue\n\t\t\t\t: constrainValue( currentValue );\n\t\t}\n\n\t\treturn state;\n\t};\n\n\treturn (\n\t\t<Input\n\t\t\tautoComplete={ autoComplete }\n\t\t\tinputMode=\"numeric\"\n\t\t\t{ ...props }\n\t\t\tclassName={ classes }\n\t\t\tdragDirection={ dragDirection }\n\t\t\thideHTMLArrows={ hideHTMLArrows }\n\t\t\tisDragEnabled={ isDragEnabled }\n\t\t\tlabel={ label }\n\t\t\tmax={ max }\n\t\t\tmin={ min }\n\t\t\tref={ ref }\n\t\t\trequired={ required }\n\t\t\tstep={ step }\n\t\t\ttype={ typeProp }\n\t\t\tvalue={ valueProp }\n\t\t\t__unstableStateReducer={ composeStateReducers(\n\t\t\t\tnumberControlStateReducer,\n\t\t\t\tstateReducer\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( NumberControl );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/number-control/index.js"],"names":["classNames","forwardRef","isRTL","Input","inputControlActionTypes","composeStateReducers","add","subtract","roundClamp","isValueEmpty","NumberControl","ref","__unstableStateReducer","stateReducer","state","className","dragDirection","hideHTMLArrows","isDragEnabled","isShiftStepEnabled","label","max","Infinity","min","required","shiftStep","step","type","typeProp","value","valueProp","props","isStepAny","baseStep","parseFloat","baseValue","constrainValue","stepOverride","Math","autoComplete","classes","numberControlStateReducer","action","payload","event","currentValue","PRESS_UP","PRESS_DOWN","enableShift","shiftKey","incrementalValue","nextValue","preventDefault","DRAG","x","y","delta","modifier","directionModifier","ceil","abs","sign","distance","PRESS_ENTER","COMMIT","applyEmptyValue"],"mappings":";;AAAA;;AACA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,UAAT,QAA2B,oBAA3B;AACA,SAASC,KAAT,QAAsB,iBAAtB;AAEA;AACA;AACA;;AACA,SAASC,KAAT,QAAsB,gCAAtB;AACA,OAAO,KAAKC,uBAAZ,MAAyC,kCAAzC;AACA,SAASC,oBAAT,QAAqC,kCAArC;AACA,SAASC,GAAT,EAAcC,QAAd,EAAwBC,UAAxB,QAA0C,eAA1C;AACA,SAASC,YAAT,QAA6B,iBAA7B;AAEA,OAAO,SAASC,aAAT,OAkBNC,GAlBM,EAmBL;AAAA,MAlBD;AACCC,IAAAA,sBAAsB,EAAEC,YAAY,GAAKC,KAAF,IAAaA,KADrD;AAECC,IAAAA,SAFD;AAGCC,IAAAA,aAAa,GAAG,GAHjB;AAICC,IAAAA,cAAc,GAAG,KAJlB;AAKCC,IAAAA,aAAa,GAAG,IALjB;AAMCC,IAAAA,kBAAkB,GAAG,IANtB;AAOCC,IAAAA,KAPD;AAQCC,IAAAA,GAAG,GAAGC,QARP;AASCC,IAAAA,GAAG,GAAG,CAACD,QATR;AAUCE,IAAAA,QAAQ,GAAG,KAVZ;AAWCC,IAAAA,SAAS,GAAG,EAXb;AAYCC,IAAAA,IAAI,GAAG,CAZR;AAaCC,IAAAA,I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APjB;AAQC,IAAA,KAAK,EAAGE,KART;AASC,IAAA,GAAG,EAAGC,GATP;AAUC,IAAA,GAAG,EAAGE,GAVP;AAWC,IAAA,GAAG,EAAGZ,GAXP;AAYC,IAAA,QAAQ,EAAGa,QAZZ;AAaC,IAAA,IAAI,EAAGE,IAbR;AAcC,IAAA,IAAI,EAAGE,QAdR;AAeC,IAAA,KAAK,EAAGE,SAfT;AAgBC,IAAA,sBAAsB,EAAGzB,oBAAoB,CAC5CoC,yBAD4C,EAE5C5B,YAF4C;AAhB9C,KADD;AAuBA;AAED,eAAeZ,UAAU,CAAES,aAAF,CAAzB","sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport classNames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { Input } from './styles/number-control-styles';\nimport * as inputControlActionTypes from '../input-control/reducer/actions';\nimport { composeStateReducers } from '../input-control/reducer/reducer';\nimport { add, subtract, roundClamp } from '../utils/math';\nimport { isValueEmpty } from '../utils/values';\n\nexport function NumberControl(\n\t{\n\t\t__unstableStateReducer: stateReducer = ( state ) => state,\n\t\tclassName,\n\t\tdragDirection = 'n',\n\t\thideHTMLArrows = false,\n\t\tisDragEnabled = true,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmax = Infinity,\n\t\tmin = -Infinity,\n\t\trequired = false,\n\t\tshiftStep = 10,\n\t\tstep = 1,\n\t\ttype: typeProp = 'number',\n\t\tvalue: valueProp,\n\t\t...props\n\t},\n\tref\n) {\n\tconst isStepAny = step === 'any';\n\tconst baseStep = isStepAny ? 1 : parseFloat( step );\n\tconst baseValue = roundClamp( 0, min, max, baseStep );\n\tconst constrainValue = ( value, stepOverride ) => {\n\t\t// When step is \"any\" clamp the value, otherwise round and clamp it.\n\t\treturn isStepAny\n\t\t\t? Math.min( max, Math.max( min, value ) )\n\t\t\t: roundClamp( value, min, max, stepOverride ?? baseStep );\n\t};\n\n\tconst autoComplete = typeProp === 'number' ? 'off' : null;\n\tconst classes = classNames( 'components-number-control', className );\n\n\t/**\n\t * \"Middleware\" function that intercepts updates from InputControl.\n\t * This allows us to tap into actions to transform the (next) state for\n\t * InputControl.\n\t *\n\t * @param {Object} state State from InputControl\n\t * @param {Object} action Action triggering state change\n\t * @return {Object} The updated state to apply to InputControl\n\t */\n\tconst numberControlStateReducer = ( state, action ) => {\n\t\tconst { type, payload } = action;\n\t\tconst event = payload?.event;\n\t\tconst currentValue = state.value;\n\n\t\t/**\n\t\t * Handles custom UP and DOWN Keyboard events\n\t\t */\n\t\tif (\n\t\t\ttype === inputControlActionTypes.PRESS_UP ||\n\t\t\ttype === inputControlActionTypes.PRESS_DOWN\n\t\t) {\n\t\t\tconst enableShift = event.shiftKey && isShiftStepEnabled;\n\n\t\t\tconst incrementalValue = enableShift\n\t\t\t\t? parseFloat( shiftStep ) * baseStep\n\t\t\t\t: baseStep;\n\t\t\tlet nextValue = isValueEmpty( currentValue )\n\t\t\t\t? baseValue\n\t\t\t\t: currentValue;\n\n\t\t\tif ( event?.preventDefault ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\n\t\t\tif ( type === inputControlActionTypes.PRESS_UP ) {\n\t\t\t\tnextValue = add( nextValue, incrementalValue );\n\t\t\t}\n\n\t\t\tif ( type === inputControlActionTypes.PRESS_DOWN ) {\n\t\t\t\tnextValue = subtract( nextValue, incrementalValue );\n\t\t\t}\n\n\t\t\tstate.value = constrainValue(\n\t\t\t\tnextValue,\n\t\t\t\tenableShift ? incrementalValue : null\n\t\t\t);\n\t\t}\n\n\t\t/**\n\t\t * Handles drag to update events\n\t\t */\n\t\tif ( type === inputControlActionTypes.DRAG && isDragEnabled ) {\n\t\t\tconst [ x, y ] = payload.delta;\n\t\t\tconst enableShift = payload.shiftKey && isShiftStepEnabled;\n\t\t\tconst modifier = enableShift\n\t\t\t\t? parseFloat( shiftStep ) * baseStep\n\t\t\t\t: baseStep;\n\n\t\t\tlet directionModifier;\n\t\t\tlet delta;\n\n\t\t\tswitch ( dragDirection ) {\n\t\t\t\tcase 'n':\n\t\t\t\t\tdelta = y;\n\t\t\t\t\tdirectionModifier = -1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'e':\n\t\t\t\t\tdelta = x;\n\t\t\t\t\tdirectionModifier = isRTL() ? -1 : 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 's':\n\t\t\t\t\tdelta = y;\n\t\t\t\t\tdirectionModifier = 1;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'w':\n\t\t\t\t\tdelta = x;\n\t\t\t\t\tdirectionModifier = isRTL() ? 1 : -1;\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( delta !== 0 ) {\n\t\t\t\tdelta = Math.ceil( Math.abs( delta ) ) * Math.sign( delta );\n\t\t\t\tconst distance = delta * modifier * directionModifier;\n\n\t\t\t\tstate.value = constrainValue(\n\t\t\t\t\tadd( currentValue, distance ),\n\t\t\t\t\tenableShift ? modifier : null\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Handles commit (ENTER key press or on blur if isPressEnterToChange)\n\t\t */\n\t\tif (\n\t\t\ttype === inputControlActionTypes.PRESS_ENTER ||\n\t\t\ttype === inputControlActionTypes.COMMIT\n\t\t) {\n\t\t\tconst applyEmptyValue = required === false && currentValue === '';\n\n\t\t\tstate.value = applyEmptyValue\n\t\t\t\t? currentValue\n\t\t\t\t: constrainValue( currentValue );\n\t\t}\n\n\t\treturn state;\n\t};\n\n\treturn (\n\t\t<Input\n\t\t\tautoComplete={ autoComplete }\n\t\t\tinputMode=\"numeric\"\n\t\t\t{ ...props }\n\t\t\tclassName={ classes }\n\t\t\tdragDirection={ dragDirection }\n\t\t\thideHTMLArrows={ hideHTMLArrows }\n\t\t\tisDragEnabled={ isDragEnabled }\n\t\t\tlabel={ label }\n\t\t\tmax={ max }\n\t\t\tmin={ min }\n\t\t\tref={ ref }\n\t\t\trequired={ required }\n\t\t\tstep={ step }\n\t\t\ttype={ typeProp }\n\t\t\tvalue={ valueProp }\n\t\t\t__unstableStateReducer={ composeStateReducers(\n\t\t\t\tnumberControlStateReducer,\n\t\t\t\tstateReducer\n\t\t\t) }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( NumberControl );\n"]}
@@ -45,11 +45,11 @@ export function PanelBody(_ref, ref) {
45
45
  const next = !isOpened;
46
46
  setIsOpened(next);
47
47
  onToggle(next);
48
- }; // Ref is used so that the effect does not re-run upon scrollAfterOpen changing value
48
+ }; // Ref is used so that the effect does not re-run upon scrollAfterOpen changing value.
49
49
 
50
50
 
51
51
  const scrollAfterOpenRef = useRef();
52
- scrollAfterOpenRef.current = scrollAfterOpen; // Runs after initial render
52
+ scrollAfterOpenRef.current = scrollAfterOpen; // Runs after initial render.
53
53
 
54
54
  useUpdateEffect(() => {
55
55
  var _nodeRef$current;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/panel/body.js"],"names":["classnames","noop","useReducedMotion","useMergeRefs","forwardRef","useRef","chevronUp","chevronDown","Button","Icon","useControlledState","useUpdateEffect","PanelBody","ref","buttonProps","children","className","icon","initialOpen","onToggle","opened","title","scrollAfterOpen","isOpened","setIsOpened","initial","undefined","nodeRef","scrollBehavior","handleOnToggle","event","preventDefault","next","scrollAfterOpenRef","current","scrollIntoView","inline","block","behavior","classes","PanelBodyTitle","props","ForwardedComponent","displayName"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AACA,SAASC,IAAT,QAAqB,QAArB;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,EAA2BC,YAA3B,QAA+C,oBAA/C;AACA,SAASC,UAAT,EAAqBC,MAArB,QAAmC,oBAAnC;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,kBAAvC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAA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AI,EAAGA,IADR;AAEC,IAAA,SAAS,EAAC,wBAFX;AAGC,IAAA,IAAI,EAAG;AAHR,IAlBF,CADD,CADD;AA6BA,CAjC+B,CAAjC;AAoCA,MAAMyB,kBAAkB,GAAGtC,UAAU,CAAEQ,SAAF,CAArC;AACA8B,kBAAkB,CAACC,WAAnB,GAAiC,WAAjC;AAEA,eAAeD,kBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { noop } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion, useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport { chevronUp, chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport Icon from '../icon';\nimport { useControlledState, useUpdateEffect } from '../utils';\n\nexport function PanelBody(\n\t{\n\t\tbuttonProps = {},\n\t\tchildren,\n\t\tclassName,\n\t\ticon,\n\t\tinitialOpen,\n\t\tonToggle = noop,\n\t\topened,\n\t\ttitle,\n\t\tscrollAfterOpen = true,\n\t},\n\tref\n) {\n\tconst [ isOpened, setIsOpened ] = useControlledState( opened, {\n\t\tinitial: initialOpen === undefined ? true : initialOpen,\n\t} );\n\tconst nodeRef = useRef();\n\n\t// Defaults to 'smooth' scrolling\n\t// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView\n\tconst scrollBehavior = useReducedMotion() ? 'auto' : 'smooth';\n\n\tconst handleOnToggle = ( event ) => {\n\t\tevent.preventDefault();\n\t\tconst next = ! isOpened;\n\t\tsetIsOpened( next );\n\t\tonToggle( next );\n\t};\n\n\t// Ref is used so that the effect does not re-run upon scrollAfterOpen changing value\n\tconst scrollAfterOpenRef = useRef();\n\tscrollAfterOpenRef.current = scrollAfterOpen;\n\t// Runs after initial render\n\tuseUpdateEffect( () => {\n\t\tif (\n\t\t\tisOpened &&\n\t\t\tscrollAfterOpenRef.current &&\n\t\t\tnodeRef.current?.scrollIntoView\n\t\t) {\n\t\t\t/*\n\t\t\t * Scrolls the content into view when visible.\n\t\t\t * This improves the UX when there are multiple stacking <PanelBody />\n\t\t\t * components in a scrollable container.\n\t\t\t */\n\t\t\tnodeRef.current.scrollIntoView( {\n\t\t\t\tinline: 'nearest',\n\t\t\t\tblock: 'nearest',\n\t\t\t\tbehavior: scrollBehavior,\n\t\t\t} );\n\t\t}\n\t}, [ isOpened, scrollBehavior ] );\n\n\tconst classes = classnames( 'components-panel__body', className, {\n\t\t'is-opened': isOpened,\n\t} );\n\n\treturn (\n\t\t<div className={ classes } ref={ useMergeRefs( [ nodeRef, ref ] ) }>\n\t\t\t<PanelBodyTitle\n\t\t\t\ticon={ icon }\n\t\t\t\tisOpened={ isOpened }\n\t\t\t\tonClick={ handleOnToggle }\n\t\t\t\ttitle={ title }\n\t\t\t\t{ ...buttonProps }\n\t\t\t/>\n\t\t\t{ typeof children === 'function'\n\t\t\t\t? children( { opened: isOpened } )\n\t\t\t\t: isOpened && children }\n\t\t</div>\n\t);\n}\n\nconst PanelBodyTitle = forwardRef(\n\t( { isOpened, icon, title, ...props }, ref ) => {\n\t\tif ( ! title ) return null;\n\n\t\treturn (\n\t\t\t<h2 className=\"components-panel__body-title\">\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"components-panel__body-toggle\"\n\t\t\t\t\taria-expanded={ isOpened }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t{ /*\n\t\t\t\t\tFirefox + NVDA don't announce aria-expanded because the browser\n\t\t\t\t\trepaints the whole element, so this wrapping span hides that.\n\t\t\t\t*/ }\n\t\t\t\t\t<span aria-hidden=\"true\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"components-panel__arrow\"\n\t\t\t\t\t\t\ticon={ isOpened ? chevronUp : chevronDown }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t\t{ title }\n\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tclassName=\"components-panel__icon\"\n\t\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t</h2>\n\t\t);\n\t}\n);\n\nconst ForwardedComponent = forwardRef( PanelBody );\nForwardedComponent.displayName = 'PanelBody';\n\nexport default ForwardedComponent;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/panel/body.js"],"names":["classnames","noop","useReducedMotion","useMergeRefs","forwardRef","useRef","chevronUp","chevronDown","Button","Icon","useControlledState","useUpdateEffect","PanelBody","ref","buttonProps","children","className","icon","initialOpen","onToggle","opened","title","scrollAfterOpen","isOpened","setIsOpened","initial","undefined","nodeRef","scrollBehavior","handleOnToggle","event","preventDefault","next","scrollAfterOpenRef","current","scrollIntoView","inline","block","behavior","classes","PanelBodyTitle","props","ForwardedComponent","displayName"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AACA,SAASC,IAAT,QAAqB,QAArB;AAEA;AACA;AACA;;AACA,SAASC,gBAAT,EAA2BC,YAA3B,QAA+C,oBAA/C;AACA,SAASC,UAAT,EAAqBC,MAArB,QAAmC,oBAAnC;AACA,SAASC,SAAT,EAAoBC,WAApB,QAAuC,kBAAvC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,SAASC,kBAAT,EAA6BC,eAA7B,QAAoD,UAApD;AAEA,OAAO,SAASC,SAAT,OAYNC,GAZM,EAaL;AAAA,MAZD;AACCC,IAAAA,WAAW,GAAG,EADf;AAECC,IAAAA,QAFD;AAGCC,IAAAA,SAHD;AAICC,IAAAA,IAJD;AAKCC,IAAAA,WALD;AAMCC,IAAAA,QAAQ,GAAGlB,IANZ;AAOCmB,IAAAA,MAPD;AAQCC,IAAAA,KARD;AASCC,IAAAA,eAAe,GAAG;AAT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,GAAX,CAAF;AAA7C,KACC,cAAC,cAAD;AACC,IAAA,IAAI,EAAGI,IADR;AAEC,IAAA,QAAQ,EAAGM,QAFZ;AAGC,IAAA,OAAO,EAAGM,cAHX;AAIC,IAAA,KAAK,EAAGR;AAJT,KAKMP,WALN,EADD,EAQG,OAAOC,QAAP,KAAoB,UAApB,GACCA,QAAQ,CAAE;AAAEK,IAAAA,MAAM,EAAEG;AAAV,GAAF,CADT,GAECA,QAAQ,IAAIR,QAVhB,CADD;AAcA;AAED,MAAMyB,cAAc,GAAGpC,UAAU,CAChC,QAAuCS,GAAvC,KAAgD;AAAA,MAA9C;AAAEU,IAAAA,QAAF;AAAYN,IAAAA,IAAZ;AAAkBI,IAAAA,KAAlB;AAAyB,OAAGoB;AAA5B,GAA8C;AAC/C,MAAK,CAAEpB,KAAP,EAAe,OAAO,IAAP;AAEf,SACC;AAAI,IAAA,SAAS,EAAC;AAAd,KACC,cAAC,MAAD;AACC,IAAA,SAAS,EAAC,+BADX;AAEC,qBAAgBE,QAFjB;AAGC,IAAA,GAAG,EAAGV;AAHP,KAIM4B,KAJN,GAUC;AAAM,mBAAY;AAAlB,KACC,cAAC,IAAD;AACC,IAAA,SAAS,EAAC,yBADX;AAEC,IAAA,IAAI,EAAGlB,QAAQ,GAAGjB,SAAH,GAAeC;AAF/B,IADD,CAVD,EAgBGc,KAhBH,EAiBGJ,IAAI,IACL,cAAC,IAAD;AACC,IAAA,IAAI,EAAGA,IADR;AAEC,IAAA,SAAS,EAAC,wBAFX;AAGC,IAAA,IAAI,EAAG;AAHR,IAlBF,CADD,CADD;AA6BA,CAjC+B,CAAjC;AAoCA,MAAMyB,kBAAkB,GAAGtC,UAAU,CAAEQ,SAAF,CAArC;AACA8B,kBAAkB,CAACC,WAAnB,GAAiC,WAAjC;AAEA,eAAeD,kBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { noop } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion, useMergeRefs } from '@wordpress/compose';\nimport { forwardRef, useRef } from '@wordpress/element';\nimport { chevronUp, chevronDown } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport Icon from '../icon';\nimport { useControlledState, useUpdateEffect } from '../utils';\n\nexport function PanelBody(\n\t{\n\t\tbuttonProps = {},\n\t\tchildren,\n\t\tclassName,\n\t\ticon,\n\t\tinitialOpen,\n\t\tonToggle = noop,\n\t\topened,\n\t\ttitle,\n\t\tscrollAfterOpen = true,\n\t},\n\tref\n) {\n\tconst [ isOpened, setIsOpened ] = useControlledState( opened, {\n\t\tinitial: initialOpen === undefined ? true : initialOpen,\n\t} );\n\tconst nodeRef = useRef();\n\n\t// Defaults to 'smooth' scrolling\n\t// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView\n\tconst scrollBehavior = useReducedMotion() ? 'auto' : 'smooth';\n\n\tconst handleOnToggle = ( event ) => {\n\t\tevent.preventDefault();\n\t\tconst next = ! isOpened;\n\t\tsetIsOpened( next );\n\t\tonToggle( next );\n\t};\n\n\t// Ref is used so that the effect does not re-run upon scrollAfterOpen changing value.\n\tconst scrollAfterOpenRef = useRef();\n\tscrollAfterOpenRef.current = scrollAfterOpen;\n\t// Runs after initial render.\n\tuseUpdateEffect( () => {\n\t\tif (\n\t\t\tisOpened &&\n\t\t\tscrollAfterOpenRef.current &&\n\t\t\tnodeRef.current?.scrollIntoView\n\t\t) {\n\t\t\t/*\n\t\t\t * Scrolls the content into view when visible.\n\t\t\t * This improves the UX when there are multiple stacking <PanelBody />\n\t\t\t * components in a scrollable container.\n\t\t\t */\n\t\t\tnodeRef.current.scrollIntoView( {\n\t\t\t\tinline: 'nearest',\n\t\t\t\tblock: 'nearest',\n\t\t\t\tbehavior: scrollBehavior,\n\t\t\t} );\n\t\t}\n\t}, [ isOpened, scrollBehavior ] );\n\n\tconst classes = classnames( 'components-panel__body', className, {\n\t\t'is-opened': isOpened,\n\t} );\n\n\treturn (\n\t\t<div className={ classes } ref={ useMergeRefs( [ nodeRef, ref ] ) }>\n\t\t\t<PanelBodyTitle\n\t\t\t\ticon={ icon }\n\t\t\t\tisOpened={ isOpened }\n\t\t\t\tonClick={ handleOnToggle }\n\t\t\t\ttitle={ title }\n\t\t\t\t{ ...buttonProps }\n\t\t\t/>\n\t\t\t{ typeof children === 'function'\n\t\t\t\t? children( { opened: isOpened } )\n\t\t\t\t: isOpened && children }\n\t\t</div>\n\t);\n}\n\nconst PanelBodyTitle = forwardRef(\n\t( { isOpened, icon, title, ...props }, ref ) => {\n\t\tif ( ! title ) return null;\n\n\t\treturn (\n\t\t\t<h2 className=\"components-panel__body-title\">\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"components-panel__body-toggle\"\n\t\t\t\t\taria-expanded={ isOpened }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t{ /*\n\t\t\t\t\tFirefox + NVDA don't announce aria-expanded because the browser\n\t\t\t\t\trepaints the whole element, so this wrapping span hides that.\n\t\t\t\t*/ }\n\t\t\t\t\t<span aria-hidden=\"true\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"components-panel__arrow\"\n\t\t\t\t\t\t\ticon={ isOpened ? chevronUp : chevronDown }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t\t{ title }\n\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\tclassName=\"components-panel__icon\"\n\t\t\t\t\t\t\tsize={ 20 }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Button>\n\t\t\t</h2>\n\t\t);\n\t}\n);\n\nconst ForwardedComponent = forwardRef( PanelBody );\nForwardedComponent.displayName = 'PanelBody';\n\nexport default ForwardedComponent;\n"]}
@@ -55,14 +55,14 @@ function computeAnchorRect(anchorRefFallback, anchorRect, getAnchorRect) {
55
55
  return;
56
56
  } // Duck-type to check if `anchorRef` is an instance of Range
57
57
  // `anchorRef instanceof window.Range` checks will break across document boundaries
58
- // such as in an iframe
58
+ // such as in an iframe.
59
59
 
60
60
 
61
61
  if (typeof (anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.cloneRange) === 'function') {
62
62
  return offsetIframe(getRectangleFromRange(anchorRef), anchorRef.endContainer.ownerDocument, container);
63
63
  } // Duck-type to check if `anchorRef` is an instance of Element
64
64
  // `anchorRef instanceof window.Element` checks will break across document boundaries
65
- // such as in an iframe
65
+ // such as in an iframe.
66
66
 
67
67
 
68
68
  if (typeof (anchorRef === null || anchorRef === void 0 ? void 0 : anchorRef.getBoundingClientRect) === 'function') {
@@ -314,7 +314,7 @@ const Popover = (_ref, ref) => {
314
314
  setAttribute(containerRef.current, 'data-x-axis', xAxis);
315
315
  setAttribute(containerRef.current, 'data-y-axis', yAxis);
316
316
  setStyle(contentRef.current, 'maxHeight', typeof contentHeight === 'number' ? contentHeight + 'px' : '');
317
- setStyle(contentRef.current, 'maxWidth', typeof contentWidth === 'number' ? contentWidth + 'px' : ''); // Compute the animation position
317
+ setStyle(contentRef.current, 'maxWidth', typeof contentWidth === 'number' ? contentWidth + 'px' : ''); // Compute the animation position.
318
318
 
319
319
  const yAxisMapping = {
320
320
  top: 'bottom',
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/popover/index.js"],"names":["classnames","useRef","useState","useLayoutEffect","forwardRef","createContext","useContext","getRectangleFromRange","useViewportMatch","useResizeObserver","useMergeRefs","__experimentalUseDialog","useDialog","close","computePopoverPosition","offsetIframe","Button","ScrollLock","Slot","Fill","useSlot","getAnimateClassName","SLOT_NAME","slotNameContext","computeAnchorRect","anchorRefFallback","anchorRect","getAnchorRect","anchorRef","shouldAnchorIncludePadding","container","current","rect","ownerDocument","window","Range","Element","DOMRect","cloneRange","endContainer","getBoundingClientRect","withoutPadding","top","bottom","topRect","bottomRect","left","width","parentNode","getComputedStyle","node","defaultView","element","paddingTop","paddingBottom","paddingLeft","paddingRight","parseInt","right","x","y","height","setAttribute","name","value","hasAttribute","removeAttribute","getAttribute","setStyle","property","style","setClass","toggle","classList","contains","add","remove","getAnchorDocument","anchor","Popover","ref","headerTitle","onClose","children","className","noArrow","isAlternate","position","range","focusOnMount","expandOnMobile","animate","onFocusOutside","__unstableStickyBoundaryElement","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent","__unstableForcePosition","__unstableForceXAlignment","__unstableEditorCanvasWrapper","contentProps","contentRef","containerRef","isMobileViewport","animateOrigin","setAnimateOrigin","slotName","slot","isExpanded","containerResizeListener","contentSize","refresh","offsetParent","relativeOffsetTop","body","offsetParentRect","boundaryElement","parentElement","usedContentSize","popoverTop","popoverLeft","xAxis","yAxis","contentHeight","contentWidth","yAxisMapping","xAxisMapping","animateYAxis","animateXAxis","intervalHandle","setInterval","rafId","refreshOnAnimationFrame","cancelAnimationFrame","requestAnimationFrame","addEventListener","anchorDocument","observer","MutationObserver","observe","attributes","clearInterval","removeEventListener","disconnect","onDialogClose","type","event","dialogRef","dialogProps","__unstableOnClose","mergedRefs","animateClassName","Boolean","origin","content","PopoverContainer","PopoverSlot","__unstableSlotNameProvider","Provider"],"mappings":";;AAAA;;AACA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,MADD,EAECC,QAFD,EAGCC,eAHD,EAICC,UAJD,EAKCC,aALD,EAMCC,UAND,QAOO,oBAPP;AAQA,SAASC,qBAAT,QAAsC,gBAAtC;AACA,SACCC,gBADD,EAECC,iBAFD,EAGCC,YAHD,EAICC,uBAAuB,IAAIC,SAJ5B,QAKO,oBALP;AAMA,SAASC,KAAT,QAAsB,kBAAtB;AAEA;AACA;AACA;;AACA,SAASC,sBAAT,EAAiCC,YAAjC,QAAqD,SAArD;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,SAASC,IAAT,EAAeC,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AACA,CA1UD;;AA4UA,MAAMC,gBAAgB,GAAGvJ,UAAU,CAAE2E,OAAF,CAAnC;;AAEA,SAAS6E,WAAT,QAA4C5E,GAA5C,EAAkD;AAAA,MAA5B;AAAEjB,IAAAA,IAAI,GAAGzC;AAAT,GAA4B;AACjD,SACC,cAAC,IAAD;AACC,IAAA,gBAAgB,MADjB;AAEC,IAAA,IAAI,EAAGyC,IAFR;AAGC,IAAA,SAAS,EAAC,cAHX;AAIC,IAAA,GAAG,EAAGiB;AAJP,IADD;AAQA;;AAED2E,gBAAgB,CAACzI,IAAjB,GAAwBd,UAAU,CAAEwJ,WAAF,CAAlC;AACAD,gBAAgB,CAACE,0BAAjB,GAA8CtI,eAAe,CAACuI,QAA9D;AAEA,eAAeH,gBAAf","sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseState,\n\tuseLayoutEffect,\n\tforwardRef,\n\tcreateContext,\n\tuseContext,\n} from '@wordpress/element';\nimport { getRectangleFromRange } from '@wordpress/dom';\nimport {\n\tuseViewportMatch,\n\tuseResizeObserver,\n\tuseMergeRefs,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { computePopoverPosition, offsetIframe } from './utils';\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport { getAnimateClassName } from '../animate';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nconst SLOT_NAME = 'Popover';\n\nconst slotNameContext = createContext();\n\nfunction computeAnchorRect(\n\tanchorRefFallback,\n\tanchorRect,\n\tgetAnchorRect,\n\tanchorRef = false,\n\tshouldAnchorIncludePadding,\n\tcontainer\n) {\n\tif ( anchorRect ) {\n\t\treturn anchorRect;\n\t}\n\n\tif ( getAnchorRect ) {\n\t\tif ( ! anchorRefFallback.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst rect = getAnchorRect( anchorRefFallback.current );\n\t\treturn offsetIframe(\n\t\t\trect,\n\t\t\trect.ownerDocument || anchorRefFallback.current.ownerDocument,\n\t\t\tcontainer\n\t\t);\n\t}\n\n\tif ( anchorRef !== false ) {\n\t\tif (\n\t\t\t! anchorRef ||\n\t\t\t! window.Range ||\n\t\t\t! window.Element ||\n\t\t\t! window.DOMRect\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Duck-type to check if `anchorRef` is an instance of Range\n\t\t// `anchorRef instanceof window.Range` checks will break across document boundaries\n\t\t// such as in an iframe\n\t\tif ( typeof anchorRef?.cloneRange === 'function' ) {\n\t\t\treturn offsetIframe(\n\t\t\t\tgetRectangleFromRange( anchorRef ),\n\t\t\t\tanchorRef.endContainer.ownerDocument,\n\t\t\t\tcontainer\n\t\t\t);\n\t\t}\n\n\t\t// Duck-type to check if `anchorRef` is an instance of Element\n\t\t// `anchorRef instanceof window.Element` checks will break across document boundaries\n\t\t// such as in an iframe\n\t\tif ( typeof anchorRef?.getBoundingClientRect === 'function' ) {\n\t\t\tconst rect = offsetIframe(\n\t\t\t\tanchorRef.getBoundingClientRect(),\n\t\t\t\tanchorRef.ownerDocument,\n\t\t\t\tcontainer\n\t\t\t);\n\n\t\t\tif ( shouldAnchorIncludePadding ) {\n\t\t\t\treturn rect;\n\t\t\t}\n\n\t\t\treturn withoutPadding( rect, anchorRef );\n\t\t}\n\n\t\tconst { top, bottom } = anchorRef;\n\t\tconst topRect = top.getBoundingClientRect();\n\t\tconst bottomRect = bottom.getBoundingClientRect();\n\t\tconst rect = offsetIframe(\n\t\t\tnew window.DOMRect(\n\t\t\t\ttopRect.left,\n\t\t\t\ttopRect.top,\n\t\t\t\ttopRect.width,\n\t\t\t\tbottomRect.bottom - topRect.top\n\t\t\t),\n\t\t\ttop.ownerDocument,\n\t\t\tcontainer\n\t\t);\n\n\t\tif ( shouldAnchorIncludePadding ) {\n\t\t\treturn rect;\n\t\t}\n\n\t\treturn withoutPadding( rect, anchorRef );\n\t}\n\n\tif ( ! anchorRefFallback.current ) {\n\t\treturn;\n\t}\n\n\tconst { parentNode } = anchorRefFallback.current;\n\tconst rect = offsetIframe(\n\t\tparentNode.getBoundingClientRect(),\n\t\tparentNode.ownerDocument,\n\t\tcontainer\n\t);\n\n\tif ( shouldAnchorIncludePadding ) {\n\t\treturn rect;\n\t}\n\n\treturn withoutPadding( rect, parentNode );\n}\n\nfunction getComputedStyle( node ) {\n\treturn node.ownerDocument.defaultView.getComputedStyle( node );\n}\n\nfunction withoutPadding( rect, element ) {\n\tconst {\n\t\tpaddingTop,\n\t\tpaddingBottom,\n\t\tpaddingLeft,\n\t\tpaddingRight,\n\t} = getComputedStyle( element );\n\tconst top = paddingTop ? parseInt( paddingTop, 10 ) : 0;\n\tconst bottom = paddingBottom ? parseInt( paddingBottom, 10 ) : 0;\n\tconst left = paddingLeft ? parseInt( paddingLeft, 10 ) : 0;\n\tconst right = paddingRight ? parseInt( paddingRight, 10 ) : 0;\n\n\treturn {\n\t\tx: rect.left + left,\n\t\ty: rect.top + top,\n\t\twidth: rect.width - left - right,\n\t\theight: rect.height - top - bottom,\n\t\tleft: rect.left + left,\n\t\tright: rect.right - right,\n\t\ttop: rect.top + top,\n\t\tbottom: rect.bottom - bottom,\n\t};\n}\n\n/**\n * Sets or removes an element attribute.\n *\n * @param {Element} element The element to modify.\n * @param {string} name The attribute name to set or remove.\n * @param {?string} value The value to set. A falsy value will remove the\n * attribute.\n */\nfunction setAttribute( element, name, value ) {\n\tif ( ! value ) {\n\t\tif ( element.hasAttribute( name ) ) {\n\t\t\telement.removeAttribute( name );\n\t\t}\n\t} else if ( element.getAttribute( name ) !== value ) {\n\t\telement.setAttribute( name, value );\n\t}\n}\n\n/**\n * Sets or removes an element style property.\n *\n * @param {Element} element The element to modify.\n * @param {string} property The property to set or remove.\n * @param {?string} value The value to set. A falsy value will remove the\n * property.\n */\nfunction setStyle( element, property, value = '' ) {\n\tif ( element.style[ property ] !== value ) {\n\t\telement.style[ property ] = value;\n\t}\n}\n\n/**\n * Sets or removes an element class.\n *\n * @param {Element} element The element to modify.\n * @param {string} name The class to set or remove.\n * @param {boolean} toggle True to set the class, false to remove.\n */\nfunction setClass( element, name, toggle ) {\n\tif ( toggle ) {\n\t\tif ( ! element.classList.contains( name ) ) {\n\t\t\telement.classList.add( name );\n\t\t}\n\t} else if ( element.classList.contains( name ) ) {\n\t\telement.classList.remove( name );\n\t}\n}\n\nfunction getAnchorDocument( anchor ) {\n\tif ( ! anchor ) {\n\t\treturn;\n\t}\n\n\tif ( anchor.endContainer ) {\n\t\treturn anchor.endContainer.ownerDocument;\n\t}\n\n\tif ( anchor.top ) {\n\t\treturn anchor.top.ownerDocument;\n\t}\n\n\treturn anchor.ownerDocument;\n}\n\nconst Popover = (\n\t{\n\t\theaderTitle,\n\t\tonClose,\n\t\tchildren,\n\t\tclassName,\n\t\tnoArrow = true,\n\t\tisAlternate,\n\t\t// Disable reason: We generate the `...contentProps` rest as remainder\n\t\t// of props which aren't explicitly handled by this component.\n\t\t/* eslint-disable no-unused-vars */\n\t\tposition = 'bottom right',\n\t\trange,\n\t\tfocusOnMount = 'firstElement',\n\t\tanchorRef,\n\t\tshouldAnchorIncludePadding,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\texpandOnMobile,\n\t\tanimate = true,\n\t\tonFocusOutside,\n\t\t__unstableStickyBoundaryElement,\n\t\t__unstableSlotName = SLOT_NAME,\n\t\t__unstableObserveElement,\n\t\t__unstableBoundaryParent,\n\t\t__unstableForcePosition,\n\t\t__unstableForceXAlignment,\n\t\t__unstableEditorCanvasWrapper,\n\t\t/* eslint-enable no-unused-vars */\n\t\t...contentProps\n\t},\n\tref\n) => {\n\tconst anchorRefFallback = useRef( null );\n\tconst contentRef = useRef( null );\n\tconst containerRef = useRef();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst [ animateOrigin, setAnimateOrigin ] = useState();\n\tconst slotName = useContext( slotNameContext ) || __unstableSlotName;\n\tconst slot = useSlot( slotName );\n\tconst isExpanded = expandOnMobile && isMobileViewport;\n\tconst [ containerResizeListener, contentSize ] = useResizeObserver();\n\tnoArrow = isExpanded || noArrow;\n\n\tuseLayoutEffect( () => {\n\t\tif ( isExpanded ) {\n\t\t\tsetClass( containerRef.current, 'is-without-arrow', noArrow );\n\t\t\tsetClass( containerRef.current, 'is-alternate', isAlternate );\n\t\t\tsetAttribute( containerRef.current, 'data-x-axis' );\n\t\t\tsetAttribute( containerRef.current, 'data-y-axis' );\n\t\t\tsetStyle( containerRef.current, 'top' );\n\t\t\tsetStyle( containerRef.current, 'left' );\n\t\t\tsetStyle( contentRef.current, 'maxHeight' );\n\t\t\tsetStyle( contentRef.current, 'maxWidth' );\n\t\t\treturn;\n\t\t}\n\n\t\tconst refresh = () => {\n\t\t\tif ( ! containerRef.current || ! contentRef.current ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet anchor = computeAnchorRect(\n\t\t\t\tanchorRefFallback,\n\t\t\t\tanchorRect,\n\t\t\t\tgetAnchorRect,\n\t\t\t\tanchorRef,\n\t\t\t\tshouldAnchorIncludePadding,\n\t\t\t\tcontainerRef.current\n\t\t\t);\n\n\t\t\tif ( ! anchor ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { offsetParent, ownerDocument } = containerRef.current;\n\n\t\t\tlet relativeOffsetTop = 0;\n\n\t\t\t// If there is a positioned ancestor element that is not the body,\n\t\t\t// subtract the position from the anchor rect. If the position of\n\t\t\t// the popover is fixed, the offset parent is null or the body\n\t\t\t// element, in which case the position is relative to the viewport.\n\t\t\t// See https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent\n\t\t\tif ( offsetParent && offsetParent !== ownerDocument.body ) {\n\t\t\t\tconst offsetParentRect = offsetParent.getBoundingClientRect();\n\n\t\t\t\trelativeOffsetTop = offsetParentRect.top;\n\t\t\t\tanchor = new window.DOMRect(\n\t\t\t\t\tanchor.left - offsetParentRect.left,\n\t\t\t\t\tanchor.top - offsetParentRect.top,\n\t\t\t\t\tanchor.width,\n\t\t\t\t\tanchor.height\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tlet boundaryElement;\n\t\t\tif ( __unstableBoundaryParent ) {\n\t\t\t\tboundaryElement = containerRef.current.parentElement;\n\t\t\t}\n\n\t\t\tconst usedContentSize = ! contentSize.height\n\t\t\t\t? contentRef.current.getBoundingClientRect()\n\t\t\t\t: contentSize;\n\n\t\t\tconst {\n\t\t\t\tpopoverTop,\n\t\t\t\tpopoverLeft,\n\t\t\t\txAxis,\n\t\t\t\tyAxis,\n\t\t\t\tcontentHeight,\n\t\t\t\tcontentWidth,\n\t\t\t} = computePopoverPosition(\n\t\t\t\tanchor,\n\t\t\t\tusedContentSize,\n\t\t\t\tposition,\n\t\t\t\t__unstableStickyBoundaryElement,\n\t\t\t\tcontainerRef.current,\n\t\t\t\trelativeOffsetTop,\n\t\t\t\tboundaryElement,\n\t\t\t\t__unstableForcePosition,\n\t\t\t\t__unstableForceXAlignment,\n\t\t\t\t__unstableEditorCanvasWrapper\n\t\t\t);\n\n\t\t\tif (\n\t\t\t\ttypeof popoverTop === 'number' &&\n\t\t\t\ttypeof popoverLeft === 'number'\n\t\t\t) {\n\t\t\t\tsetStyle( containerRef.current, 'top', popoverTop + 'px' );\n\t\t\t\tsetStyle( containerRef.current, 'left', popoverLeft + 'px' );\n\t\t\t}\n\n\t\t\tsetClass(\n\t\t\t\tcontainerRef.current,\n\t\t\t\t'is-without-arrow',\n\t\t\t\tnoArrow || ( xAxis === 'center' && yAxis === 'middle' )\n\t\t\t);\n\t\t\tsetClass( containerRef.current, 'is-alternate', isAlternate );\n\t\t\tsetAttribute( containerRef.current, 'data-x-axis', xAxis );\n\t\t\tsetAttribute( containerRef.current, 'data-y-axis', yAxis );\n\t\t\tsetStyle(\n\t\t\t\tcontentRef.current,\n\t\t\t\t'maxHeight',\n\t\t\t\ttypeof contentHeight === 'number' ? contentHeight + 'px' : ''\n\t\t\t);\n\t\t\tsetStyle(\n\t\t\t\tcontentRef.current,\n\t\t\t\t'maxWidth',\n\t\t\t\ttypeof contentWidth === 'number' ? contentWidth + 'px' : ''\n\t\t\t);\n\n\t\t\t// Compute the animation position\n\t\t\tconst yAxisMapping = {\n\t\t\t\ttop: 'bottom',\n\t\t\t\tbottom: 'top',\n\t\t\t};\n\t\t\tconst xAxisMapping = {\n\t\t\t\tleft: 'right',\n\t\t\t\tright: 'left',\n\t\t\t};\n\t\t\tconst animateYAxis = yAxisMapping[ yAxis ] || 'middle';\n\t\t\tconst animateXAxis = xAxisMapping[ xAxis ] || 'center';\n\n\t\t\tsetAnimateOrigin( animateXAxis + ' ' + animateYAxis );\n\t\t};\n\n\t\trefresh();\n\n\t\tconst { ownerDocument } = containerRef.current;\n\t\tconst { defaultView } = ownerDocument;\n\n\t\t/*\n\t\t * There are sometimes we need to reposition or resize the popover that\n\t\t * are not handled by the resize/scroll window events (i.e. CSS changes\n\t\t * in the layout that changes the position of the anchor).\n\t\t *\n\t\t * For these situations, we refresh the popover every 0.5s\n\t\t */\n\t\tconst intervalHandle = defaultView.setInterval( refresh, 500 );\n\n\t\tlet rafId;\n\n\t\tconst refreshOnAnimationFrame = () => {\n\t\t\tdefaultView.cancelAnimationFrame( rafId );\n\t\t\trafId = defaultView.requestAnimationFrame( refresh );\n\t\t};\n\n\t\t// Sometimes a click trigger a layout change that affects the popover\n\t\t// position. This is an opportunity to immediately refresh rather than\n\t\t// at the interval.\n\t\tdefaultView.addEventListener( 'click', refreshOnAnimationFrame );\n\t\tdefaultView.addEventListener( 'resize', refresh );\n\t\tdefaultView.addEventListener( 'scroll', refresh, true );\n\n\t\tconst anchorDocument = getAnchorDocument( anchorRef );\n\n\t\t// If the anchor is within an iframe, the popover position also needs\n\t\t// to refrest when the iframe content is scrolled or resized.\n\t\tif ( anchorDocument && anchorDocument !== ownerDocument ) {\n\t\t\tanchorDocument.defaultView.addEventListener( 'resize', refresh );\n\t\t\tanchorDocument.defaultView.addEventListener(\n\t\t\t\t'scroll',\n\t\t\t\trefresh,\n\t\t\t\ttrue\n\t\t\t);\n\t\t}\n\n\t\tlet observer;\n\n\t\tif ( __unstableObserveElement ) {\n\t\t\tobserver = new defaultView.MutationObserver( refresh );\n\t\t\tobserver.observe( __unstableObserveElement, { attributes: true } );\n\t\t}\n\n\t\treturn () => {\n\t\t\tdefaultView.clearInterval( intervalHandle );\n\t\t\tdefaultView.removeEventListener( 'resize', refresh );\n\t\t\tdefaultView.removeEventListener( 'scroll', refresh, true );\n\t\t\tdefaultView.removeEventListener( 'click', refreshOnAnimationFrame );\n\t\t\tdefaultView.cancelAnimationFrame( rafId );\n\n\t\t\tif ( anchorDocument && anchorDocument !== ownerDocument ) {\n\t\t\t\tanchorDocument.defaultView?.removeEventListener(\n\t\t\t\t\t'resize',\n\t\t\t\t\trefresh\n\t\t\t\t);\n\t\t\t\tanchorDocument.defaultView?.removeEventListener(\n\t\t\t\t\t'scroll',\n\t\t\t\t\trefresh,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( observer ) {\n\t\t\t\tobserver.disconnect();\n\t\t\t}\n\t\t};\n\t}, [\n\t\tisExpanded,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tanchorRef,\n\t\tshouldAnchorIncludePadding,\n\t\tposition,\n\t\tcontentSize,\n\t\t__unstableStickyBoundaryElement,\n\t\t__unstableObserveElement,\n\t\t__unstableBoundaryParent,\n\t] );\n\n\tconst onDialogClose = ( type, event ) => {\n\t\t// Ideally the popover should have just a single onClose prop and\n\t\t// not three props that potentially do the same thing.\n\t\tif ( type === 'focus-outside' && onFocusOutside ) {\n\t\t\tonFocusOutside( event );\n\t\t} else if ( onClose ) {\n\t\t\tonClose();\n\t\t}\n\t};\n\n\tconst [ dialogRef, dialogProps ] = useDialog( {\n\t\tfocusOnMount,\n\t\t__unstableOnClose: onDialogClose,\n\t\tonClose: onDialogClose,\n\t} );\n\n\tconst mergedRefs = useMergeRefs( [ containerRef, dialogRef, ref ] );\n\n\t/** @type {false | string} */\n\tconst animateClassName =\n\t\tBoolean( animate && animateOrigin ) &&\n\t\tgetAnimateClassName( {\n\t\t\ttype: 'appear',\n\t\t\torigin: animateOrigin,\n\t\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<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-popover',\n\t\t\t\tclassName,\n\t\t\t\tanimateClassName,\n\t\t\t\t{\n\t\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t\t'is-without-arrow': noArrow,\n\t\t\t\t\t'is-alternate': isAlternate,\n\t\t\t\t}\n\t\t\t) }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedRefs }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex=\"-1\"\n\t\t>\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 ref={ contentRef } className=\"components-popover__content\">\n\t\t\t\t<div style={ { position: 'relative' } }>\n\t\t\t\t\t{ containerResizeListener }\n\t\t\t\t\t{ children }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\tif ( slot.ref ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t}\n\n\tif ( anchorRef || anchorRect ) {\n\t\treturn content;\n\t}\n\n\treturn <span ref={ anchorRefFallback }>{ content }</span>;\n};\n\nconst PopoverContainer = forwardRef( Popover );\n\nfunction PopoverSlot( { name = SLOT_NAME }, ref ) {\n\treturn (\n\t\t<Slot\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\nPopoverContainer.Slot = forwardRef( PopoverSlot );\nPopoverContainer.__unstableSlotNameProvider = slotNameContext.Provider;\n\nexport default PopoverContainer;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/popover/index.js"],"names":["classnames","useRef","useState","useLayoutEffect","forwardRef","createContext","useContext","getRectangleFromRange","useViewportMatch","useResizeObserver","useMergeRefs","__experimentalUseDialog","useDialog","close","computePopoverPosition","offsetIframe","Button","ScrollLock","Slot","Fill","useSlot","getAnimateClassName","SLOT_NAME","slotNameContext","computeAnchorRect","anchorRefFallback","anchorRect","getAnchorRect","anchorRef","shouldAnchorIncludePadding","container","current","rect","ownerDocument","window","Range","Element","DOMRect","cloneRange","endContainer","getBoundingClientRect","withoutPadding","top","bottom","topRect","bottomRect","left","width","parentNode","getComputedStyle","node","defaultView","element","paddingTop","paddingBottom","paddingLeft","paddingRight","parseInt","right","x","y","height","setAttribute","name","value","hasAttribute","removeAttribute","getAttribute","setStyle","property","style","setClass","toggle","classList","contains","add","remove","getAnchorDocument","anchor","Popover","ref","headerTitle","onClose","children","className","noArrow","isAlternate","position","range","focusOnMount","expandOnMobile","animate","onFocusOutside","__unstableStickyBoundaryElement","__unstableSlotName","__unstableObserveElement","__unstableBoundaryParent","__unstableForcePosition","__unstableForceXAlignment","__unstableEditorCanvasWrapper","contentProps","contentRef","containerRef","isMobileViewport","animateOrigin","setAnimateOrigin","slotName","slot","isExpanded","containerResizeListener","contentSize","refresh","offsetParent","relativeOffsetTop","body","offsetParentRect","boundaryElement","parentElement","usedContentSize","popoverTop","popoverLeft","xAxis","yAxis","contentHeight","contentWidth","yAxisMapping","xAxisMapping","animateYAxis","animateXAxis","intervalHandle","setInterval","rafId","refreshOnAnimationFrame","cancelAnimationFrame","requestAnimationFrame","addEventListener","anchorDocument","observer","MutationObserver","observe","attributes","clearInterval","removeEventListener","disconnect","onDialogClose","type","event","dialogRef","dialogProps","__unstableOnClose","mergedRefs","animateClassName","Boolean","origin","content","PopoverContainer","PopoverSlot","__unstableSlotNameProvider","Provider"],"mappings":";;AAAA;;AACA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SACCC,MADD,EAECC,QAFD,EAGCC,eAHD,EAICC,UAJD,EAKCC,aALD,EAMCC,UAND,QAOO,oBAPP;AAQA,SAASC,qBAAT,QAAsC,gBAAtC;AACA,SACCC,gBADD,EAECC,iBAFD,EAGCC,YAHD,EAICC,uBAAuB,IAAIC,SAJ5B,QAKO,oBALP;AAMA,SAASC,KAAT,QAAsB,kBAAtB;AAEA;AACA;AACA;;AACA,SAASC,sBAAT,EAAiCC,YAAjC,QAAqD,SAArD;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,SAASC,IAAT,EAAeC,IAAf,EAAqBC,OAArB,QAAoC,cAApC;AACA,SAASC,mBAAT,QAAoC,YAApC;AAEA;AACA;AACA;AACA;AACA;;AACA,MAAMC,SAAS,GAAG,SAAlB;AAEA,MAAMC,eAAe,GAAGlB,aAAa,EAArC;;AAEA,SAASmB,iBAAT,CACCC,iBADD,EAECC,UAFD,EAGCC,aAHD,EAOE;AAAA,MAHDC,SAGC,uEAHW,KAGX;AAAA,MAFDC,0BAEC;AAAA,MADDC,SACC;;AACD,MAAKJ,UAAL,EAAkB;AACjB,WAAOA,UAAP;AACA;;AAED,MAAKC,aAAL,EAAqB;AACpB,QAAK,CAAEF,iBAAiB,CAACM,OAAzB,EAAmC;AAClC;AACA;;AAED,UAAMC,IAAI,GAAGL,aAAa,CAAEF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AAf","sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseState,\n\tuseLayoutEffect,\n\tforwardRef,\n\tcreateContext,\n\tuseContext,\n} from '@wordpress/element';\nimport { getRectangleFromRange } from '@wordpress/dom';\nimport {\n\tuseViewportMatch,\n\tuseResizeObserver,\n\tuseMergeRefs,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport { computePopoverPosition, offsetIframe } from './utils';\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport { getAnimateClassName } from '../animate';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nconst SLOT_NAME = 'Popover';\n\nconst slotNameContext = createContext();\n\nfunction computeAnchorRect(\n\tanchorRefFallback,\n\tanchorRect,\n\tgetAnchorRect,\n\tanchorRef = false,\n\tshouldAnchorIncludePadding,\n\tcontainer\n) {\n\tif ( anchorRect ) {\n\t\treturn anchorRect;\n\t}\n\n\tif ( getAnchorRect ) {\n\t\tif ( ! anchorRefFallback.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst rect = getAnchorRect( anchorRefFallback.current );\n\t\treturn offsetIframe(\n\t\t\trect,\n\t\t\trect.ownerDocument || anchorRefFallback.current.ownerDocument,\n\t\t\tcontainer\n\t\t);\n\t}\n\n\tif ( anchorRef !== false ) {\n\t\tif (\n\t\t\t! anchorRef ||\n\t\t\t! window.Range ||\n\t\t\t! window.Element ||\n\t\t\t! window.DOMRect\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Duck-type to check if `anchorRef` is an instance of Range\n\t\t// `anchorRef instanceof window.Range` checks will break across document boundaries\n\t\t// such as in an iframe.\n\t\tif ( typeof anchorRef?.cloneRange === 'function' ) {\n\t\t\treturn offsetIframe(\n\t\t\t\tgetRectangleFromRange( anchorRef ),\n\t\t\t\tanchorRef.endContainer.ownerDocument,\n\t\t\t\tcontainer\n\t\t\t);\n\t\t}\n\n\t\t// Duck-type to check if `anchorRef` is an instance of Element\n\t\t// `anchorRef instanceof window.Element` checks will break across document boundaries\n\t\t// such as in an iframe.\n\t\tif ( typeof anchorRef?.getBoundingClientRect === 'function' ) {\n\t\t\tconst rect = offsetIframe(\n\t\t\t\tanchorRef.getBoundingClientRect(),\n\t\t\t\tanchorRef.ownerDocument,\n\t\t\t\tcontainer\n\t\t\t);\n\n\t\t\tif ( shouldAnchorIncludePadding ) {\n\t\t\t\treturn rect;\n\t\t\t}\n\n\t\t\treturn withoutPadding( rect, anchorRef );\n\t\t}\n\n\t\tconst { top, bottom } = anchorRef;\n\t\tconst topRect = top.getBoundingClientRect();\n\t\tconst bottomRect = bottom.getBoundingClientRect();\n\t\tconst rect = offsetIframe(\n\t\t\tnew window.DOMRect(\n\t\t\t\ttopRect.left,\n\t\t\t\ttopRect.top,\n\t\t\t\ttopRect.width,\n\t\t\t\tbottomRect.bottom - topRect.top\n\t\t\t),\n\t\t\ttop.ownerDocument,\n\t\t\tcontainer\n\t\t);\n\n\t\tif ( shouldAnchorIncludePadding ) {\n\t\t\treturn rect;\n\t\t}\n\n\t\treturn withoutPadding( rect, anchorRef );\n\t}\n\n\tif ( ! anchorRefFallback.current ) {\n\t\treturn;\n\t}\n\n\tconst { parentNode } = anchorRefFallback.current;\n\tconst rect = offsetIframe(\n\t\tparentNode.getBoundingClientRect(),\n\t\tparentNode.ownerDocument,\n\t\tcontainer\n\t);\n\n\tif ( shouldAnchorIncludePadding ) {\n\t\treturn rect;\n\t}\n\n\treturn withoutPadding( rect, parentNode );\n}\n\nfunction getComputedStyle( node ) {\n\treturn node.ownerDocument.defaultView.getComputedStyle( node );\n}\n\nfunction withoutPadding( rect, element ) {\n\tconst {\n\t\tpaddingTop,\n\t\tpaddingBottom,\n\t\tpaddingLeft,\n\t\tpaddingRight,\n\t} = getComputedStyle( element );\n\tconst top = paddingTop ? parseInt( paddingTop, 10 ) : 0;\n\tconst bottom = paddingBottom ? parseInt( paddingBottom, 10 ) : 0;\n\tconst left = paddingLeft ? parseInt( paddingLeft, 10 ) : 0;\n\tconst right = paddingRight ? parseInt( paddingRight, 10 ) : 0;\n\n\treturn {\n\t\tx: rect.left + left,\n\t\ty: rect.top + top,\n\t\twidth: rect.width - left - right,\n\t\theight: rect.height - top - bottom,\n\t\tleft: rect.left + left,\n\t\tright: rect.right - right,\n\t\ttop: rect.top + top,\n\t\tbottom: rect.bottom - bottom,\n\t};\n}\n\n/**\n * Sets or removes an element attribute.\n *\n * @param {Element} element The element to modify.\n * @param {string} name The attribute name to set or remove.\n * @param {?string} value The value to set. A falsy value will remove the\n * attribute.\n */\nfunction setAttribute( element, name, value ) {\n\tif ( ! value ) {\n\t\tif ( element.hasAttribute( name ) ) {\n\t\t\telement.removeAttribute( name );\n\t\t}\n\t} else if ( element.getAttribute( name ) !== value ) {\n\t\telement.setAttribute( name, value );\n\t}\n}\n\n/**\n * Sets or removes an element style property.\n *\n * @param {Element} element The element to modify.\n * @param {string} property The property to set or remove.\n * @param {?string} value The value to set. A falsy value will remove the\n * property.\n */\nfunction setStyle( element, property, value = '' ) {\n\tif ( element.style[ property ] !== value ) {\n\t\telement.style[ property ] = value;\n\t}\n}\n\n/**\n * Sets or removes an element class.\n *\n * @param {Element} element The element to modify.\n * @param {string} name The class to set or remove.\n * @param {boolean} toggle True to set the class, false to remove.\n */\nfunction setClass( element, name, toggle ) {\n\tif ( toggle ) {\n\t\tif ( ! element.classList.contains( name ) ) {\n\t\t\telement.classList.add( name );\n\t\t}\n\t} else if ( element.classList.contains( name ) ) {\n\t\telement.classList.remove( name );\n\t}\n}\n\nfunction getAnchorDocument( anchor ) {\n\tif ( ! anchor ) {\n\t\treturn;\n\t}\n\n\tif ( anchor.endContainer ) {\n\t\treturn anchor.endContainer.ownerDocument;\n\t}\n\n\tif ( anchor.top ) {\n\t\treturn anchor.top.ownerDocument;\n\t}\n\n\treturn anchor.ownerDocument;\n}\n\nconst Popover = (\n\t{\n\t\theaderTitle,\n\t\tonClose,\n\t\tchildren,\n\t\tclassName,\n\t\tnoArrow = true,\n\t\tisAlternate,\n\t\t// Disable reason: We generate the `...contentProps` rest as remainder\n\t\t// of props which aren't explicitly handled by this component.\n\t\t/* eslint-disable no-unused-vars */\n\t\tposition = 'bottom right',\n\t\trange,\n\t\tfocusOnMount = 'firstElement',\n\t\tanchorRef,\n\t\tshouldAnchorIncludePadding,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\texpandOnMobile,\n\t\tanimate = true,\n\t\tonFocusOutside,\n\t\t__unstableStickyBoundaryElement,\n\t\t__unstableSlotName = SLOT_NAME,\n\t\t__unstableObserveElement,\n\t\t__unstableBoundaryParent,\n\t\t__unstableForcePosition,\n\t\t__unstableForceXAlignment,\n\t\t__unstableEditorCanvasWrapper,\n\t\t/* eslint-enable no-unused-vars */\n\t\t...contentProps\n\t},\n\tref\n) => {\n\tconst anchorRefFallback = useRef( null );\n\tconst contentRef = useRef( null );\n\tconst containerRef = useRef();\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst [ animateOrigin, setAnimateOrigin ] = useState();\n\tconst slotName = useContext( slotNameContext ) || __unstableSlotName;\n\tconst slot = useSlot( slotName );\n\tconst isExpanded = expandOnMobile && isMobileViewport;\n\tconst [ containerResizeListener, contentSize ] = useResizeObserver();\n\tnoArrow = isExpanded || noArrow;\n\n\tuseLayoutEffect( () => {\n\t\tif ( isExpanded ) {\n\t\t\tsetClass( containerRef.current, 'is-without-arrow', noArrow );\n\t\t\tsetClass( containerRef.current, 'is-alternate', isAlternate );\n\t\t\tsetAttribute( containerRef.current, 'data-x-axis' );\n\t\t\tsetAttribute( containerRef.current, 'data-y-axis' );\n\t\t\tsetStyle( containerRef.current, 'top' );\n\t\t\tsetStyle( containerRef.current, 'left' );\n\t\t\tsetStyle( contentRef.current, 'maxHeight' );\n\t\t\tsetStyle( contentRef.current, 'maxWidth' );\n\t\t\treturn;\n\t\t}\n\n\t\tconst refresh = () => {\n\t\t\tif ( ! containerRef.current || ! contentRef.current ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet anchor = computeAnchorRect(\n\t\t\t\tanchorRefFallback,\n\t\t\t\tanchorRect,\n\t\t\t\tgetAnchorRect,\n\t\t\t\tanchorRef,\n\t\t\t\tshouldAnchorIncludePadding,\n\t\t\t\tcontainerRef.current\n\t\t\t);\n\n\t\t\tif ( ! anchor ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst { offsetParent, ownerDocument } = containerRef.current;\n\n\t\t\tlet relativeOffsetTop = 0;\n\n\t\t\t// If there is a positioned ancestor element that is not the body,\n\t\t\t// subtract the position from the anchor rect. If the position of\n\t\t\t// the popover is fixed, the offset parent is null or the body\n\t\t\t// element, in which case the position is relative to the viewport.\n\t\t\t// See https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent\n\t\t\tif ( offsetParent && offsetParent !== ownerDocument.body ) {\n\t\t\t\tconst offsetParentRect = offsetParent.getBoundingClientRect();\n\n\t\t\t\trelativeOffsetTop = offsetParentRect.top;\n\t\t\t\tanchor = new window.DOMRect(\n\t\t\t\t\tanchor.left - offsetParentRect.left,\n\t\t\t\t\tanchor.top - offsetParentRect.top,\n\t\t\t\t\tanchor.width,\n\t\t\t\t\tanchor.height\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tlet boundaryElement;\n\t\t\tif ( __unstableBoundaryParent ) {\n\t\t\t\tboundaryElement = containerRef.current.parentElement;\n\t\t\t}\n\n\t\t\tconst usedContentSize = ! contentSize.height\n\t\t\t\t? contentRef.current.getBoundingClientRect()\n\t\t\t\t: contentSize;\n\n\t\t\tconst {\n\t\t\t\tpopoverTop,\n\t\t\t\tpopoverLeft,\n\t\t\t\txAxis,\n\t\t\t\tyAxis,\n\t\t\t\tcontentHeight,\n\t\t\t\tcontentWidth,\n\t\t\t} = computePopoverPosition(\n\t\t\t\tanchor,\n\t\t\t\tusedContentSize,\n\t\t\t\tposition,\n\t\t\t\t__unstableStickyBoundaryElement,\n\t\t\t\tcontainerRef.current,\n\t\t\t\trelativeOffsetTop,\n\t\t\t\tboundaryElement,\n\t\t\t\t__unstableForcePosition,\n\t\t\t\t__unstableForceXAlignment,\n\t\t\t\t__unstableEditorCanvasWrapper\n\t\t\t);\n\n\t\t\tif (\n\t\t\t\ttypeof popoverTop === 'number' &&\n\t\t\t\ttypeof popoverLeft === 'number'\n\t\t\t) {\n\t\t\t\tsetStyle( containerRef.current, 'top', popoverTop + 'px' );\n\t\t\t\tsetStyle( containerRef.current, 'left', popoverLeft + 'px' );\n\t\t\t}\n\n\t\t\tsetClass(\n\t\t\t\tcontainerRef.current,\n\t\t\t\t'is-without-arrow',\n\t\t\t\tnoArrow || ( xAxis === 'center' && yAxis === 'middle' )\n\t\t\t);\n\t\t\tsetClass( containerRef.current, 'is-alternate', isAlternate );\n\t\t\tsetAttribute( containerRef.current, 'data-x-axis', xAxis );\n\t\t\tsetAttribute( containerRef.current, 'data-y-axis', yAxis );\n\t\t\tsetStyle(\n\t\t\t\tcontentRef.current,\n\t\t\t\t'maxHeight',\n\t\t\t\ttypeof contentHeight === 'number' ? contentHeight + 'px' : ''\n\t\t\t);\n\t\t\tsetStyle(\n\t\t\t\tcontentRef.current,\n\t\t\t\t'maxWidth',\n\t\t\t\ttypeof contentWidth === 'number' ? contentWidth + 'px' : ''\n\t\t\t);\n\n\t\t\t// Compute the animation position.\n\t\t\tconst yAxisMapping = {\n\t\t\t\ttop: 'bottom',\n\t\t\t\tbottom: 'top',\n\t\t\t};\n\t\t\tconst xAxisMapping = {\n\t\t\t\tleft: 'right',\n\t\t\t\tright: 'left',\n\t\t\t};\n\t\t\tconst animateYAxis = yAxisMapping[ yAxis ] || 'middle';\n\t\t\tconst animateXAxis = xAxisMapping[ xAxis ] || 'center';\n\n\t\t\tsetAnimateOrigin( animateXAxis + ' ' + animateYAxis );\n\t\t};\n\n\t\trefresh();\n\n\t\tconst { ownerDocument } = containerRef.current;\n\t\tconst { defaultView } = ownerDocument;\n\n\t\t/*\n\t\t * There are sometimes we need to reposition or resize the popover that\n\t\t * are not handled by the resize/scroll window events (i.e. CSS changes\n\t\t * in the layout that changes the position of the anchor).\n\t\t *\n\t\t * For these situations, we refresh the popover every 0.5s\n\t\t */\n\t\tconst intervalHandle = defaultView.setInterval( refresh, 500 );\n\n\t\tlet rafId;\n\n\t\tconst refreshOnAnimationFrame = () => {\n\t\t\tdefaultView.cancelAnimationFrame( rafId );\n\t\t\trafId = defaultView.requestAnimationFrame( refresh );\n\t\t};\n\n\t\t// Sometimes a click trigger a layout change that affects the popover\n\t\t// position. This is an opportunity to immediately refresh rather than\n\t\t// at the interval.\n\t\tdefaultView.addEventListener( 'click', refreshOnAnimationFrame );\n\t\tdefaultView.addEventListener( 'resize', refresh );\n\t\tdefaultView.addEventListener( 'scroll', refresh, true );\n\n\t\tconst anchorDocument = getAnchorDocument( anchorRef );\n\n\t\t// If the anchor is within an iframe, the popover position also needs\n\t\t// to refrest when the iframe content is scrolled or resized.\n\t\tif ( anchorDocument && anchorDocument !== ownerDocument ) {\n\t\t\tanchorDocument.defaultView.addEventListener( 'resize', refresh );\n\t\t\tanchorDocument.defaultView.addEventListener(\n\t\t\t\t'scroll',\n\t\t\t\trefresh,\n\t\t\t\ttrue\n\t\t\t);\n\t\t}\n\n\t\tlet observer;\n\n\t\tif ( __unstableObserveElement ) {\n\t\t\tobserver = new defaultView.MutationObserver( refresh );\n\t\t\tobserver.observe( __unstableObserveElement, { attributes: true } );\n\t\t}\n\n\t\treturn () => {\n\t\t\tdefaultView.clearInterval( intervalHandle );\n\t\t\tdefaultView.removeEventListener( 'resize', refresh );\n\t\t\tdefaultView.removeEventListener( 'scroll', refresh, true );\n\t\t\tdefaultView.removeEventListener( 'click', refreshOnAnimationFrame );\n\t\t\tdefaultView.cancelAnimationFrame( rafId );\n\n\t\t\tif ( anchorDocument && anchorDocument !== ownerDocument ) {\n\t\t\t\tanchorDocument.defaultView?.removeEventListener(\n\t\t\t\t\t'resize',\n\t\t\t\t\trefresh\n\t\t\t\t);\n\t\t\t\tanchorDocument.defaultView?.removeEventListener(\n\t\t\t\t\t'scroll',\n\t\t\t\t\trefresh,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( observer ) {\n\t\t\t\tobserver.disconnect();\n\t\t\t}\n\t\t};\n\t}, [\n\t\tisExpanded,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tanchorRef,\n\t\tshouldAnchorIncludePadding,\n\t\tposition,\n\t\tcontentSize,\n\t\t__unstableStickyBoundaryElement,\n\t\t__unstableObserveElement,\n\t\t__unstableBoundaryParent,\n\t] );\n\n\tconst onDialogClose = ( type, event ) => {\n\t\t// Ideally the popover should have just a single onClose prop and\n\t\t// not three props that potentially do the same thing.\n\t\tif ( type === 'focus-outside' && onFocusOutside ) {\n\t\t\tonFocusOutside( event );\n\t\t} else if ( onClose ) {\n\t\t\tonClose();\n\t\t}\n\t};\n\n\tconst [ dialogRef, dialogProps ] = useDialog( {\n\t\tfocusOnMount,\n\t\t__unstableOnClose: onDialogClose,\n\t\tonClose: onDialogClose,\n\t} );\n\n\tconst mergedRefs = useMergeRefs( [ containerRef, dialogRef, ref ] );\n\n\t/** @type {false | string} */\n\tconst animateClassName =\n\t\tBoolean( animate && animateOrigin ) &&\n\t\tgetAnimateClassName( {\n\t\t\ttype: 'appear',\n\t\t\torigin: animateOrigin,\n\t\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<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'components-popover',\n\t\t\t\tclassName,\n\t\t\t\tanimateClassName,\n\t\t\t\t{\n\t\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t\t'is-without-arrow': noArrow,\n\t\t\t\t\t'is-alternate': isAlternate,\n\t\t\t\t}\n\t\t\t) }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedRefs }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex=\"-1\"\n\t\t>\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 ref={ contentRef } className=\"components-popover__content\">\n\t\t\t\t<div style={ { position: 'relative' } }>\n\t\t\t\t\t{ containerResizeListener }\n\t\t\t\t\t{ children }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\tif ( slot.ref ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t}\n\n\tif ( anchorRef || anchorRect ) {\n\t\treturn content;\n\t}\n\n\treturn <span ref={ anchorRefFallback }>{ content }</span>;\n};\n\nconst PopoverContainer = forwardRef( Popover );\n\nfunction PopoverSlot( { name = SLOT_NAME }, ref ) {\n\treturn (\n\t\t<Slot\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\nPopoverContainer.Slot = forwardRef( PopoverSlot );\nPopoverContainer.__unstableSlotNameProvider = slotNameContext.Provider;\n\nexport default PopoverContainer;\n"]}
@@ -8,7 +8,7 @@ import { isRTL } from '@wordpress/i18n';
8
8
  * Module constants
9
9
  */
10
10
 
11
- const HEIGHT_OFFSET = 10; // used by the arrow and a bit of empty space
11
+ const HEIGHT_OFFSET = 10; // Used by the arrow and a bit of empty space.
12
12
 
13
13
  /**
14
14
  * Utility used to compute the popover position over the xAxis
@@ -31,7 +31,7 @@ const HEIGHT_OFFSET = 10; // used by the arrow and a bit of empty space
31
31
  export function computePopoverXAxisPosition(anchorRect, contentSize, xAxis, corner, stickyBoundaryElement, chosenYAxis, boundaryElement, forcePosition, forceXAlignment) {
32
32
  const {
33
33
  width
34
- } = contentSize; // Correct xAxis for RTL support
34
+ } = contentSize; // Correct xAxis for RTL support.
35
35
 
36
36
  if (xAxis === 'left' && isRTL()) {
37
37
  xAxis = 'right';
@@ -43,7 +43,7 @@ export function computePopoverXAxisPosition(anchorRect, contentSize, xAxis, corn
43
43
  corner = 'right';
44
44
  } else if (corner === 'right' && isRTL()) {
45
45
  corner = 'left';
46
- } // x axis alignment choices
46
+ } // X axis alignment choices.
47
47
 
48
48
 
49
49
  const anchorMidPoint = Math.round(anchorRect.left + anchorRect.width / 2);
@@ -74,7 +74,7 @@ export function computePopoverXAxisPosition(anchorRect, contentSize, xAxis, corn
74
74
  const rightAlignment = {
75
75
  popoverLeft: rightAlignmentX,
76
76
  contentWidth: rightAlignmentX + width > window.innerWidth ? window.innerWidth - rightAlignmentX : width
77
- }; // Choosing the x axis
77
+ }; // Choosing the x axis.
78
78
 
79
79
  let chosenXAxis = xAxis;
80
80
  let contentWidth = null;
@@ -184,7 +184,7 @@ export function computePopoverYAxisPosition(anchorRect, contentSize, yAxis, corn
184
184
  popoverTop: Math.min(anchorRect.bottom, stickyPositionTop)
185
185
  };
186
186
  }
187
- } // y axis alignment choices
187
+ } // Y axis alignment choices.
188
188
 
189
189
 
190
190
  let anchorMidPoint = anchorRect.top + anchorRect.height / 2;
@@ -206,7 +206,7 @@ export function computePopoverYAxisPosition(anchorRect, contentSize, yAxis, corn
206
206
  const bottomAlignment = {
207
207
  popoverTop: anchorRect.bottom,
208
208
  contentHeight: anchorRect.bottom + HEIGHT_OFFSET + height > window.innerHeight ? window.innerHeight - HEIGHT_OFFSET - anchorRect.bottom : height
209
- }; // Choosing the y axis
209
+ }; // Choosing the y axis.
210
210
 
211
211
  let chosenYAxis = yAxis;
212
212
  let contentHeight = null;