@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
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/navigable-container/container.js"],"names":["MENU_ITEM_ROLES","cycleValue","value","total","offset","nextValue","NavigableContainer","Component","constructor","arguments","onKeyDown","bind","bindContainer","getFocusableContext","getFocusableIndex","componentDidMount","container","addEventListener","onFocus","componentWillUnmount","removeEventListener","ref","forwardedRef","props","current","target","onlyBrowserTabstops","finder","focus","tabbable","focusable","focusables","find","index","directIndex","indexOf","event","cycle","eventToOffset","onNavigate","noop","stopNavigationEvents","undefined","stopImmediatePropagation","targetRole","getAttribute","includes","preventDefault","context","ownerDocument","activeElement","nextIndex","length","render","children","forwardedNavigableContainer","displayName"],"mappings":";;;;;;;;;AASA;;;;AALA;;AAMA;;AAVA;;AACA;AACA;AACA;;AAGA;AACA;AACA;AAIA,MAAMA,eAAe,GAAG,CAAE,UAAF,EAAc,e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B,EAMjB,qBANiB,EAOjB,cAPiB,CAAb,CAFN,GAYG+B,QAZH,CADD;AAgBA;;AA5HyC;;AA+H3C,MAAMC,2BAA2B,GAAG,CAAEhC,KAAF,EAASF,GAAT,KAAkB;AACrD,SAAO,4BAAC,kBAAD,6BAAyBE,KAAzB;AAAiC,IAAA,YAAY,EAAGF;AAAhD,KAAP;AACA,CAFD;;AAGAkC,2BAA2B,CAACC,WAA5B,GAA0C,oBAA1C;;eAEe,yBAAYD,2BAAZ,C","sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport { omit, noop, isFunction } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\nconst MENU_ITEM_ROLES = [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ];\n\nfunction cycleValue( value, total, offset ) {\n\tconst nextValue = value + offset;\n\tif ( nextValue < 0 ) {\n\t\treturn total + nextValue;\n\t} else if ( nextValue >= total ) {\n\t\treturn nextValue - total;\n\t}\n\n\treturn nextValue;\n}\n\nclass NavigableContainer extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.bindContainer = this.bindContainer.bind( this );\n\n\t\tthis.getFocusableContext = this.getFocusableContext.bind( this );\n\t\tthis.getFocusableIndex = this.getFocusableIndex.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\t// We use DOM event listeners instead of React event listeners\n\t\t// because we want to catch events from the underlying DOM tree\n\t\t// The React Tree can be different from the DOM tree when using\n\t\t// portals. Block Toolbars for instance are rendered in a separate\n\t\t// React Trees.\n\t\tthis.container.addEventListener( 'keydown', this.onKeyDown );\n\t\tthis.container.addEventListener( 'focus', this.onFocus );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.container.removeEventListener( 'keydown', this.onKeyDown );\n\t\tthis.container.removeEventListener( 'focus', this.onFocus );\n\t}\n\n\tbindContainer( ref ) {\n\t\tconst { forwardedRef } = this.props;\n\t\tthis.container = ref;\n\n\t\tif ( isFunction( forwardedRef ) ) {\n\t\t\tforwardedRef( ref );\n\t\t} else if ( forwardedRef && 'current' in forwardedRef ) {\n\t\t\tforwardedRef.current = ref;\n\t\t}\n\t}\n\n\tgetFocusableContext( target ) {\n\t\tconst { onlyBrowserTabstops } = this.props;\n\t\tconst finder = onlyBrowserTabstops ? focus.tabbable : focus.focusable;\n\t\tconst focusables = finder.find( this.container );\n\n\t\tconst index = this.getFocusableIndex( focusables, target );\n\t\tif ( index > -1 && target ) {\n\t\t\treturn { index, target, focusables };\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetFocusableIndex( focusables, target ) {\n\t\tconst directIndex = focusables.indexOf( target );\n\t\tif ( directIndex !== -1 ) {\n\t\t\treturn directIndex;\n\t\t}\n\t}\n\n\tonKeyDown( event ) {\n\t\tif ( this.props.onKeyDown ) {\n\t\t\tthis.props.onKeyDown( event );\n\t\t}\n\n\t\tconst { getFocusableContext } = this;\n\t\tconst {\n\t\t\tcycle = true,\n\t\t\teventToOffset,\n\t\t\tonNavigate = noop,\n\t\t\tstopNavigationEvents,\n\t\t} = this.props;\n\n\t\tconst offset = eventToOffset( event );\n\n\t\t// eventToOffset returns undefined if the event is not handled by the component\n\t\tif ( offset !== undefined && stopNavigationEvents ) {\n\t\t\t// Prevents arrow key handlers bound to the document directly interfering\n\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t// When navigating a collection of items, prevent scroll containers\n\t\t\t// from scrolling. The preventDefault also prevents Voiceover from\n\t\t\t// 'handling' the event, as voiceover will try to use arrow keys\n\t\t\t// for highlighting text.\n\t\t\tconst targetRole = event.target.getAttribute( 'role' );\n\t\t\tif ( MENU_ITEM_ROLES.includes( targetRole ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tif ( ! offset ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst context = getFocusableContext(\n\t\t\tevent.target.ownerDocument.activeElement\n\t\t);\n\t\tif ( ! context ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { index, focusables } = context;\n\t\tconst nextIndex = cycle\n\t\t\t? cycleValue( index, focusables.length, offset )\n\t\t\t: index + offset;\n\t\tif ( nextIndex >= 0 && nextIndex < focusables.length ) {\n\t\t\tfocusables[ nextIndex ].focus();\n\t\t\tonNavigate( nextIndex, focusables[ nextIndex ] );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { children, ...props } = this.props;\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ this.bindContainer }\n\t\t\t\t{ ...omit( props, [\n\t\t\t\t\t'stopNavigationEvents',\n\t\t\t\t\t'eventToOffset',\n\t\t\t\t\t'onNavigate',\n\t\t\t\t\t'onKeyDown',\n\t\t\t\t\t'cycle',\n\t\t\t\t\t'onlyBrowserTabstops',\n\t\t\t\t\t'forwardedRef',\n\t\t\t\t] ) }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst forwardedNavigableContainer = ( props, ref ) => {\n\treturn <NavigableContainer { ...props } forwardedRef={ ref } />;\n};\nforwardedNavigableContainer.displayName = 'NavigableContainer';\n\nexport default forwardRef( forwardedNavigableContainer );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/navigable-container/container.js"],"names":["MENU_ITEM_ROLES","cycleValue","value","total","offset","nextValue","NavigableContainer","Component","constructor","arguments","onKeyDown","bind","bindContainer","getFocusableContext","getFocusableIndex","componentDidMount","container","addEventListener","onFocus","componentWillUnmount","removeEventListener","ref","forwardedRef","props","current","target","onlyBrowserTabstops","finder","focus","tabbable","focusable","focusables","find","index","directIndex","indexOf","event","cycle","eventToOffset","onNavigate","noop","stopNavigationEvents","undefined","stopImmediatePropagation","targetRole","getAttribute","includes","preventDefault","context","ownerDocument","activeElement","nextIndex","length","render","children","forwardedNavigableContainer","displayName"],"mappings":";;;;;;;;;AASA;;;;AALA;;AAMA;;AAVA;;AACA;AACA;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ACjB,sBADiB,EAEjB,eAFiB,EAGjB,YAHiB,EAIjB,WAJiB,EAKjB,OALiB,EAMjB,qBANiB,EAOjB,cAPiB,CAAb,CAFN,GAYG+B,QAZH,CADD;AAgBA;;AA5HyC;;AA+H3C,MAAMC,2BAA2B,GAAG,CAAEhC,KAAF,EAASF,GAAT,KAAkB;AACrD,SAAO,4BAAC,kBAAD,6BAAyBE,KAAzB;AAAiC,IAAA,YAAY,EAAGF;AAAhD,KAAP;AACA,CAFD;;AAGAkC,2BAA2B,CAACC,WAA5B,GAA0C,oBAA1C;;eAEe,yBAAYD,2BAAZ,C","sourcesContent":["// @ts-nocheck\n/**\n * External dependencies\n */\nimport { omit, noop, isFunction } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Component, forwardRef } from '@wordpress/element';\nimport { focus } from '@wordpress/dom';\n\nconst MENU_ITEM_ROLES = [ 'menuitem', 'menuitemradio', 'menuitemcheckbox' ];\n\nfunction cycleValue( value, total, offset ) {\n\tconst nextValue = value + offset;\n\tif ( nextValue < 0 ) {\n\t\treturn total + nextValue;\n\t} else if ( nextValue >= total ) {\n\t\treturn nextValue - total;\n\t}\n\n\treturn nextValue;\n}\n\nclass NavigableContainer extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onKeyDown = this.onKeyDown.bind( this );\n\t\tthis.bindContainer = this.bindContainer.bind( this );\n\n\t\tthis.getFocusableContext = this.getFocusableContext.bind( this );\n\t\tthis.getFocusableIndex = this.getFocusableIndex.bind( this );\n\t}\n\n\tcomponentDidMount() {\n\t\t// We use DOM event listeners instead of React event listeners\n\t\t// because we want to catch events from the underlying DOM tree\n\t\t// The React Tree can be different from the DOM tree when using\n\t\t// portals. Block Toolbars for instance are rendered in a separate\n\t\t// React Trees.\n\t\tthis.container.addEventListener( 'keydown', this.onKeyDown );\n\t\tthis.container.addEventListener( 'focus', this.onFocus );\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.container.removeEventListener( 'keydown', this.onKeyDown );\n\t\tthis.container.removeEventListener( 'focus', this.onFocus );\n\t}\n\n\tbindContainer( ref ) {\n\t\tconst { forwardedRef } = this.props;\n\t\tthis.container = ref;\n\n\t\tif ( isFunction( forwardedRef ) ) {\n\t\t\tforwardedRef( ref );\n\t\t} else if ( forwardedRef && 'current' in forwardedRef ) {\n\t\t\tforwardedRef.current = ref;\n\t\t}\n\t}\n\n\tgetFocusableContext( target ) {\n\t\tconst { onlyBrowserTabstops } = this.props;\n\t\tconst finder = onlyBrowserTabstops ? focus.tabbable : focus.focusable;\n\t\tconst focusables = finder.find( this.container );\n\n\t\tconst index = this.getFocusableIndex( focusables, target );\n\t\tif ( index > -1 && target ) {\n\t\t\treturn { index, target, focusables };\n\t\t}\n\t\treturn null;\n\t}\n\n\tgetFocusableIndex( focusables, target ) {\n\t\tconst directIndex = focusables.indexOf( target );\n\t\tif ( directIndex !== -1 ) {\n\t\t\treturn directIndex;\n\t\t}\n\t}\n\n\tonKeyDown( event ) {\n\t\tif ( this.props.onKeyDown ) {\n\t\t\tthis.props.onKeyDown( event );\n\t\t}\n\n\t\tconst { getFocusableContext } = this;\n\t\tconst {\n\t\t\tcycle = true,\n\t\t\teventToOffset,\n\t\t\tonNavigate = noop,\n\t\t\tstopNavigationEvents,\n\t\t} = this.props;\n\n\t\tconst offset = eventToOffset( event );\n\n\t\t// eventToOffset returns undefined if the event is not handled by the component.\n\t\tif ( offset !== undefined && stopNavigationEvents ) {\n\t\t\t// Prevents arrow key handlers bound to the document directly interfering.\n\t\t\tevent.stopImmediatePropagation();\n\n\t\t\t// When navigating a collection of items, prevent scroll containers\n\t\t\t// from scrolling. The preventDefault also prevents Voiceover from\n\t\t\t// 'handling' the event, as voiceover will try to use arrow keys\n\t\t\t// for highlighting text.\n\t\t\tconst targetRole = event.target.getAttribute( 'role' );\n\t\t\tif ( MENU_ITEM_ROLES.includes( targetRole ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\n\t\tif ( ! offset ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst context = getFocusableContext(\n\t\t\tevent.target.ownerDocument.activeElement\n\t\t);\n\t\tif ( ! context ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { index, focusables } = context;\n\t\tconst nextIndex = cycle\n\t\t\t? cycleValue( index, focusables.length, offset )\n\t\t\t: index + offset;\n\t\tif ( nextIndex >= 0 && nextIndex < focusables.length ) {\n\t\t\tfocusables[ nextIndex ].focus();\n\t\t\tonNavigate( nextIndex, focusables[ nextIndex ] );\n\t\t}\n\t}\n\n\trender() {\n\t\tconst { children, ...props } = this.props;\n\t\treturn (\n\t\t\t<div\n\t\t\t\tref={ this.bindContainer }\n\t\t\t\t{ ...omit( props, [\n\t\t\t\t\t'stopNavigationEvents',\n\t\t\t\t\t'eventToOffset',\n\t\t\t\t\t'onNavigate',\n\t\t\t\t\t'onKeyDown',\n\t\t\t\t\t'cycle',\n\t\t\t\t\t'onlyBrowserTabstops',\n\t\t\t\t\t'forwardedRef',\n\t\t\t\t] ) }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst forwardedNavigableContainer = ( props, ref ) => {\n\treturn <NavigableContainer { ...props } forwardedRef={ ref } />;\n};\nforwardedNavigableContainer.displayName = 'NavigableContainer';\n\nexport default forwardRef( forwardedNavigableContainer );\n"]}
@@ -49,7 +49,7 @@ function TabbableContainer(_ref, ref) {
49
49
  // - +1: move focus forward
50
50
  // - -1: move focus backward
51
51
  // - 0: don't move focus, but acknowledge event and thus stop it
52
- // - undefined: do nothing, let the event propagate
52
+ // - undefined: do nothing, let the event propagate.
53
53
 
54
54
 
55
55
  if (eventToOffset) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/navigable-container/tabbable.js"],"names":["TabbableContainer","ref","eventToOffset","props","innerEventToOffset","evt","keyCode","shiftKey","TAB"],"mappings":";;;;;;;;;;AAIA;;;;AACA;;AAKA;;AAVA;;AACA;AACA;AACA;;AAIA;AACA;AACA;AAGO,SAASA,iBAAT,OAAyDC,GAAzD,EAA+D;AAAA,MAAnC;AAAEC,IAAAA,aAAF;AAAiB,OAAGC;AAApB,GAAmC;;AACrE,QAAMC,kBAAkB,GAAKC,GAAF,IAAW;AACrC,UAAM;AAAEC,MAAAA,OAAF;AAAWC,MAAAA;AAAX,QAAwBF,GAA9B;;AACA,QAAKG,kBAAQF,OAAb,EAAuB;AACtB,aAAOC,QAAQ,GAAG,CAAC,CAAJ,GAAQ,CAAvB;AACA,KAJoC,CAMrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,QAAKL,aAAL,EAAqB;AACpB,aAAOA,aAAa,CAAEG,GAAF,CAApB;AACA;AACD,GApBD;;AAsBA,SACC,4BAAC,kBAAD;AACC,IAAA,GAAG,EAAGJ,GADP;AAEC,IAAA,oBAAoB,MAFrB;AAGC,IAAA,mBAAmB,MAHpB;AAIC,IAAA,aAAa,EAAGG;AAJjB,KAKMD,KALN,EADD;AASA;;eAEc,yBAAYH,iBAAZ,C","sourcesContent":["// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { TAB } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\n\nexport function TabbableContainer( { eventToOffset, ...props }, ref ) {\n\tconst innerEventToOffset = ( evt ) => {\n\t\tconst { keyCode, shiftKey } = evt;\n\t\tif ( TAB === keyCode ) {\n\t\t\treturn shiftKey ? -1 : 1;\n\t\t}\n\n\t\t// Allow custom handling of keys besides Tab.\n\t\t//\n\t\t// By default, TabbableContainer will move focus forward on Tab and\n\t\t// backward on Shift+Tab. The handler below will be used for all other\n\t\t// events. The semantics for `eventToOffset`'s return\n\t\t// values are the following:\n\t\t//\n\t\t// - +1: move focus forward\n\t\t// - -1: move focus backward\n\t\t// - 0: don't move focus, but acknowledge event and thus stop it\n\t\t// - undefined: do nothing, let the event propagate\n\t\tif ( eventToOffset ) {\n\t\t\treturn eventToOffset( evt );\n\t\t}\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops\n\t\t\teventToOffset={ innerEventToOffset }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( TabbableContainer );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/navigable-container/tabbable.js"],"names":["TabbableContainer","ref","eventToOffset","props","innerEventToOffset","evt","keyCode","shiftKey","TAB"],"mappings":";;;;;;;;;;AAIA;;;;AACA;;AAKA;;AAVA;;AACA;AACA;AACA;;AAIA;AACA;AACA;AAGO,SAASA,iBAAT,OAAyDC,GAAzD,EAA+D;AAAA,MAAnC;AAAEC,IAAAA,aAAF;AAAiB,OAAGC;AAApB,GAAmC;;AACrE,QAAMC,kBAAkB,GAAKC,GAAF,IAAW;AACrC,UAAM;AAAEC,MAAAA,OAAF;AAAWC,MAAAA;AAAX,QAAwBF,GAA9B;;AACA,QAAKG,kBAAQF,OAAb,EAAuB;AACtB,aAAOC,QAAQ,GAAG,CAAC,CAAJ,GAAQ,CAAvB;AACA,KAJoC,CAMrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,QAAKL,aAAL,EAAqB;AACpB,aAAOA,aAAa,CAAEG,GAAF,CAApB;AACA;AACD,GApBD;;AAsBA,SACC,4BAAC,kBAAD;AACC,IAAA,GAAG,EAAGJ,GADP;AAEC,IAAA,oBAAoB,MAFrB;AAGC,IAAA,mBAAmB,MAHpB;AAIC,IAAA,aAAa,EAAGG;AAJjB,KAKMD,KALN,EADD;AASA;;eAEc,yBAAYH,iBAAZ,C","sourcesContent":["// @ts-nocheck\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { TAB } from '@wordpress/keycodes';\n\n/**\n * Internal dependencies\n */\nimport NavigableContainer from './container';\n\nexport function TabbableContainer( { eventToOffset, ...props }, ref ) {\n\tconst innerEventToOffset = ( evt ) => {\n\t\tconst { keyCode, shiftKey } = evt;\n\t\tif ( TAB === keyCode ) {\n\t\t\treturn shiftKey ? -1 : 1;\n\t\t}\n\n\t\t// Allow custom handling of keys besides Tab.\n\t\t//\n\t\t// By default, TabbableContainer will move focus forward on Tab and\n\t\t// backward on Shift+Tab. The handler below will be used for all other\n\t\t// events. The semantics for `eventToOffset`'s return\n\t\t// values are the following:\n\t\t//\n\t\t// - +1: move focus forward\n\t\t// - -1: move focus backward\n\t\t// - 0: don't move focus, but acknowledge event and thus stop it\n\t\t// - undefined: do nothing, let the event propagate.\n\t\tif ( eventToOffset ) {\n\t\t\treturn eventToOffset( evt );\n\t\t}\n\t};\n\n\treturn (\n\t\t<NavigableContainer\n\t\t\tref={ ref }\n\t\t\tstopNavigationEvents\n\t\t\tonlyBrowserTabstops\n\t\t\teventToOffset={ innerEventToOffset }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( TabbableContainer );\n"]}
@@ -63,7 +63,7 @@ function NavigationItem(props) {
63
63
  }
64
64
  } = (0, _context.useNavigationContext)(); // If hideIfTargetMenuEmpty prop is true
65
65
  // And the menu we are supposed to navigate to
66
- // Is marked as empty, then we skip rendering the item
66
+ // Is marked as empty, then we skip rendering the item.
67
67
 
68
68
  if (hideIfTargetMenuEmpty && navigateToMenu && isMenuEmpty(navigateToMenu)) {
69
69
  return null;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/navigation/item/index.js"],"names":["NavigationItem","props","badge","children","className","href","item","navigateToMenu","onClick","noop","title","icon","hideIfTargetMenuEmpty","isText","restProps","activeItem","setActiveMenu","navigationTree","isMenuEmpty","isActive","classes","onItemClick","event","navigationIcon","chevronLeft","chevronRight","baseProps","undefined","itemProps","as","Button"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAnBA;AACA;AACA;;AAIA;AACA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SAJpC;AAKA,OAAGb;AALH,GAFH;AAUA,SACC,4BAAC,aAAD,6BAAyBY,SAAzB;AAAqC,IAAA,SAAS,EAAGN;AAAjD,MACGjB,QAAQ,IACT,4BAAC,wBAAD,EAAayB,SAAb,EACGjB,IAAI,IACL,4BAAC,4BAAD,QACC,4BAAC,WAAD;AAAM,IAAA,IAAI,EAAGA;AAAb,IADD,CAFF,EAOC,4BAAC,oBAAD;AACC,IAAA,KAAK,EAAGD,KADT;AAEC,IAAA,KAAK,EAAGR;AAFT,IAPD,EAYGK,cAAc,IAAI,4BAAC,WAAD;AAAM,IAAA,IAAI,EAAGgB;AAAb,IAZrB,CAFF,CADD;AAoBA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { noop } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { useNavigationContext } from '../context';\nimport { ItemUI, ItemIconUI } from '../styles/navigation-styles';\nimport NavigationItemBaseContent from './base-content';\nimport NavigationItemBase from './base';\n\nexport default function NavigationItem( props ) {\n\tconst {\n\t\tbadge,\n\t\tchildren,\n\t\tclassName,\n\t\thref,\n\t\titem,\n\t\tnavigateToMenu,\n\t\tonClick = noop,\n\t\ttitle,\n\t\ticon,\n\t\thideIfTargetMenuEmpty,\n\t\tisText,\n\t\t...restProps\n\t} = props;\n\n\tconst {\n\t\tactiveItem,\n\t\tsetActiveMenu,\n\t\tnavigationTree: { isMenuEmpty },\n\t} = useNavigationContext();\n\n\t// If hideIfTargetMenuEmpty prop is true\n\t// And the menu we are supposed to navigate to\n\t// Is marked as empty, then we skip rendering the item\n\tif (\n\t\thideIfTargetMenuEmpty &&\n\t\tnavigateToMenu &&\n\t\tisMenuEmpty( navigateToMenu )\n\t) {\n\t\treturn null;\n\t}\n\n\tconst isActive = item && activeItem === item;\n\n\tconst classes = classnames( className, {\n\t\t'is-active': isActive,\n\t} );\n\n\tconst onItemClick = ( event ) => {\n\t\tif ( navigateToMenu ) {\n\t\t\tsetActiveMenu( navigateToMenu );\n\t\t}\n\n\t\tonClick( event );\n\t};\n\tconst navigationIcon = isRTL() ? chevronLeft : chevronRight;\n\tconst baseProps = children ? props : { ...props, onClick: undefined };\n\tconst itemProps = isText\n\t\t? restProps\n\t\t: {\n\t\t\t\tas: Button,\n\t\t\t\thref,\n\t\t\t\tonClick: onItemClick,\n\t\t\t\t'aria-current': isActive ? 'page' : undefined,\n\t\t\t\t...restProps,\n\t\t };\n\n\treturn (\n\t\t<NavigationItemBase { ...baseProps } className={ classes }>\n\t\t\t{ children || (\n\t\t\t\t<ItemUI { ...itemProps }>\n\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t<ItemIconUI>\n\t\t\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t\t\t</ItemIconUI>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<NavigationItemBaseContent\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tbadge={ badge }\n\t\t\t\t\t/>\n\n\t\t\t\t\t{ navigateToMenu && <Icon icon={ navigationIcon } /> }\n\t\t\t\t</ItemUI>\n\t\t\t) }\n\t\t</NavigationItemBase>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/navigation/item/index.js"],"names":["NavigationItem","props","badge","children","className","href","item","navigateToMenu","onClick","noop","title","icon","hideIfTargetMenuEmpty","isText","restProps","activeItem","setActiveMenu","navigationTree","isMenuEmpty","isActive","classes","onItemClick","event","navigationIcon","chevronLeft","chevronRight","baseProps","undefined","itemProps","as","Button"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AAKA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAnBA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;AAOe,SAASA,cAAT,CAAyBC,KAAzB,EAAiC;AAC/C,QAAM;AACLC,IAAAA,KADK;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GN;AAAjD,MACGjB,QAAQ,IACT,4BAAC,wBAAD,EAAayB,SAAb,EACGjB,IAAI,IACL,4BAAC,4BAAD,QACC,4BAAC,WAAD;AAAM,IAAA,IAAI,EAAGA;AAAb,IADD,CAFF,EAOC,4BAAC,oBAAD;AACC,IAAA,KAAK,EAAGD,KADT;AAEC,IAAA,KAAK,EAAGR;AAFT,IAPD,EAYGK,cAAc,IAAI,4BAAC,WAAD;AAAM,IAAA,IAAI,EAAGgB;AAAb,IAZrB,CAFF,CADD;AAoBA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport { noop } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Icon, chevronLeft, chevronRight } from '@wordpress/icons';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport { useNavigationContext } from '../context';\nimport { ItemUI, ItemIconUI } from '../styles/navigation-styles';\nimport NavigationItemBaseContent from './base-content';\nimport NavigationItemBase from './base';\n\nexport default function NavigationItem( props ) {\n\tconst {\n\t\tbadge,\n\t\tchildren,\n\t\tclassName,\n\t\thref,\n\t\titem,\n\t\tnavigateToMenu,\n\t\tonClick = noop,\n\t\ttitle,\n\t\ticon,\n\t\thideIfTargetMenuEmpty,\n\t\tisText,\n\t\t...restProps\n\t} = props;\n\n\tconst {\n\t\tactiveItem,\n\t\tsetActiveMenu,\n\t\tnavigationTree: { isMenuEmpty },\n\t} = useNavigationContext();\n\n\t// If hideIfTargetMenuEmpty prop is true\n\t// And the menu we are supposed to navigate to\n\t// Is marked as empty, then we skip rendering the item.\n\tif (\n\t\thideIfTargetMenuEmpty &&\n\t\tnavigateToMenu &&\n\t\tisMenuEmpty( navigateToMenu )\n\t) {\n\t\treturn null;\n\t}\n\n\tconst isActive = item && activeItem === item;\n\n\tconst classes = classnames( className, {\n\t\t'is-active': isActive,\n\t} );\n\n\tconst onItemClick = ( event ) => {\n\t\tif ( navigateToMenu ) {\n\t\t\tsetActiveMenu( navigateToMenu );\n\t\t}\n\n\t\tonClick( event );\n\t};\n\tconst navigationIcon = isRTL() ? chevronLeft : chevronRight;\n\tconst baseProps = children ? props : { ...props, onClick: undefined };\n\tconst itemProps = isText\n\t\t? restProps\n\t\t: {\n\t\t\t\tas: Button,\n\t\t\t\thref,\n\t\t\t\tonClick: onItemClick,\n\t\t\t\t'aria-current': isActive ? 'page' : undefined,\n\t\t\t\t...restProps,\n\t\t };\n\n\treturn (\n\t\t<NavigationItemBase { ...baseProps } className={ classes }>\n\t\t\t{ children || (\n\t\t\t\t<ItemUI { ...itemProps }>\n\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t<ItemIconUI>\n\t\t\t\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t\t\t</ItemIconUI>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<NavigationItemBaseContent\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tbadge={ badge }\n\t\t\t\t\t/>\n\n\t\t\t\t\t{ navigateToMenu && <Icon icon={ navigationIcon } /> }\n\t\t\t\t</ItemUI>\n\t\t\t) }\n\t\t</NavigationItemBase>\n\t);\n}\n"]}
@@ -63,7 +63,7 @@ function NavigationMenu(props) {
63
63
  const context = {
64
64
  menu,
65
65
  search: uncontrolledSearch
66
- }; // Keep the children rendered to make sure invisible items are included in the navigation tree
66
+ }; // Keep the children rendered to make sure invisible items are included in the navigation tree.
67
67
 
68
68
  if (activeMenu !== menu) {
69
69
  return (0, _element.createElement)(_context.NavigationMenuContext.Provider, {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/navigation/menu/index.js"],"names":["NavigationMenu","props","backButtonLabel","children","className","hasSearch","menu","ROOT_MENU","onBackButtonClick","onSearch","setControlledSearch","parentMenu","search","controlledSearch","isSearchDebouncing","title","titleAction","uncontrolledSearch","setUncontrolledSearch","activeMenu","context","isControlledSearch","menuTitleId","classes"],"mappings":";;;;;;;;;AAQA;;AALA;;AAUA;;AACA;;AACA;;AACA;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ACG,CAAEZ,UAAU,IAAIH,iBAAhB,KACD,4BAAC,mBAAD;AACC,IAAA,eAAe,EAAGN,eADnB;AAEC,IAAA,UAAU,EAAGS,UAFd;AAGC,IAAA,OAAO,EAAGH;AAHX,IAFF,EASGO,KAAK,IACN,4BAAC,kBAAD;AACC,IAAA,SAAS,EAAGV,SADb;AAEC,IAAA,QAAQ,EAAGI,QAFZ;AAGC,IAAA,MAAM,EAAGG,MAHV;AAIC,IAAA,KAAK,EAAGG,KAJT;AAKC,IAAA,WAAW,EAAGC;AALf,IAVF,EAmBC,4BAAC,iCAAD,QACC;AAAI,uBAAkBM;AAAtB,KACGnB,QADH,EAEGS,MAAM,IAAI,CAAEE,kBAAZ,IACD,4BAAC,6BAAD;AAAgC,IAAA,MAAM,EAAGF;AAAzC,IAHF,CADD,CAnBD,CADD,CADD;AAgCA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { ROOT_MENU } from '../constants';\nimport { NavigationMenuContext } from './context';\nimport { useNavigationContext } from '../context';\nimport { useNavigationTreeMenu } from './use-navigation-tree-menu';\nimport NavigationBackButton from '../back-button';\nimport NavigationMenuTitle from './menu-title';\nimport NavigationSearchNoResultsFound from './search-no-results-found';\nimport { NavigableMenu } from '../../navigable-container';\nimport { MenuUI } from '../styles/navigation-styles';\n\nexport default function NavigationMenu( props ) {\n\tconst {\n\t\tbackButtonLabel,\n\t\tchildren,\n\t\tclassName,\n\t\thasSearch,\n\t\tmenu = ROOT_MENU,\n\t\tonBackButtonClick,\n\t\tonSearch: setControlledSearch,\n\t\tparentMenu,\n\t\tsearch: controlledSearch,\n\t\tisSearchDebouncing,\n\t\ttitle,\n\t\ttitleAction,\n\t} = props;\n\tconst [ uncontrolledSearch, setUncontrolledSearch ] = useState( '' );\n\tuseNavigationTreeMenu( props );\n\tconst { activeMenu } = useNavigationContext();\n\n\tconst context = {\n\t\tmenu,\n\t\tsearch: uncontrolledSearch,\n\t};\n\n\t// Keep the children rendered to make sure invisible items are included in the navigation tree\n\tif ( activeMenu !== menu ) {\n\t\treturn (\n\t\t\t<NavigationMenuContext.Provider value={ context }>\n\t\t\t\t{ children }\n\t\t\t</NavigationMenuContext.Provider>\n\t\t);\n\t}\n\n\tconst isControlledSearch = !! setControlledSearch;\n\tconst search = isControlledSearch ? controlledSearch : uncontrolledSearch;\n\tconst onSearch = isControlledSearch\n\t\t? setControlledSearch\n\t\t: setUncontrolledSearch;\n\n\tconst menuTitleId = `components-navigation__menu-title-${ menu }`;\n\tconst classes = classnames( 'components-navigation__menu', className );\n\n\treturn (\n\t\t<NavigationMenuContext.Provider value={ context }>\n\t\t\t<MenuUI className={ classes }>\n\t\t\t\t{ ( parentMenu || onBackButtonClick ) && (\n\t\t\t\t\t<NavigationBackButton\n\t\t\t\t\t\tbackButtonLabel={ backButtonLabel }\n\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\tonClick={ onBackButtonClick }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ title && (\n\t\t\t\t\t<NavigationMenuTitle\n\t\t\t\t\t\thasSearch={ hasSearch }\n\t\t\t\t\t\tonSearch={ onSearch }\n\t\t\t\t\t\tsearch={ search }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ttitleAction={ titleAction }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t<NavigableMenu>\n\t\t\t\t\t<ul aria-labelledby={ menuTitleId }>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t{ search && ! isSearchDebouncing && (\n\t\t\t\t\t\t\t<NavigationSearchNoResultsFound search={ search } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ul>\n\t\t\t\t</NavigableMenu>\n\t\t\t</MenuUI>\n\t\t</NavigationMenuContext.Provider>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/navigation/menu/index.js"],"names":["NavigationMenu","props","backButtonLabel","children","className","hasSearch","menu","ROOT_MENU","onBackButtonClick","onSearch","setControlledSearch","parentMenu","search","controlledSearch","isSearchDebouncing","title","titleAction","uncontrolledSearch","setUncontrolledSearch","activeMenu","context","isControlledSearch","menuTitleId","classes"],"mappings":";;;;;;;;;AAQA;;AALA;;AAUA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AArBA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AAWe,SAASA,cAAT,CAAyBC,KAAzB,EAAiC;AAC/C,QAAM;AACLC,IAAAA,eADK;AAELC,IAAAA,QAFK;AAGLC,IAAAA,SAHK;AAILC,IAAAA,SAJK;AAKLC,IAAAA,IAAI,GAAGC,oBALF;AAMLC,IAAAA,iBANK;AAOLC,IAAAA,QAAQ,EAAEC,mBAPL;AAQLC,IAAAA,UARK;AASLC,IAAAA,MAAM,EAAEC,gBATH;AAULC,IAAAA,kBAVK;AAWLC,IAAAA,KAXK;AAYLC,IAAAA;AAZK,MAaFf,KAbJ;AAcA,QAAM,CAAEgB,kBAAF,EAAsBC,qBAAtB,IAAgD,uBAAU,EAAV,CAAtD;AACA,oDAAuBjB,KAAvB;AACA,QAAM;AAAEkB,IAAAA;AAAF,MAAiB,qCAAvB;AAEA,QAAMC,OAAO,GAAG;AACfd,IAAAA,IADe;AAEfM,IAAAA,MAAM,EAAEK;AAFO,GAAhB,CAnB+C,CAwB/C;;AACA,MAAKE,UAAU,KAAKb,IAApB,EAA2B;AAC1B,WACC,4BAAC,8BAAD,CAAuB,QAAvB;AAAgC,MAAA,KAAK,EAAGc;AAAxC,OACGjB,QADH,CADD;AAKA;;AAED,QAAMkB,kBAAkB,GAAG,CAAC,CAAEX,mBAA9B;AACA,QAAME,MAAM,GAAGS,kBAAkB,GAAGR,gBAAH,GAAsBI,kBAAvD;AACA,QAAMR,QAAQ,GAAGY,kBAAkB,GAChCX,mBADgC,GAEhCQ,qBAFH;AAIA,QAAMI,WAAW,GAAI,qCAAqChB,IAAM,EAAhE;AACA,QAAMiB,OAAO,GAAG,yBAAY,6BAAZ,EAA2CnB,SAA3C,CAAhB;AAEA,SACC,4BAAC,8BAAD,CAAuB,QAAvB;AAAgC,IAAA,KAAK,EAAGgB;AAAxC,KACC,4BAAC,wBAAD;AAAQ,IAAA,SAAS,EAAGG;AAApB,KACG,CAAEZ,UAAU,IAAIH,iBAAhB,KACD,4BAAC,mBAAD;AACC,IAAA,eAAe,EAAGN,eADnB;AAEC,IAAA,UAAU,EAAGS,UAFd;AAGC,IAAA,OAAO,EAAGH;AAHX,IAFF,EASGO,KAAK,IACN,4BAAC,kBAAD;AACC,IAAA,SAAS,EAAGV,SADb;AAEC,IAAA,QAAQ,EAAGI,QAFZ;AAGC,IAAA,MAAM,EAAGG,MAHV;AAIC,IAAA,KAAK,EAAGG,KAJT;AAKC,IAAA,WAAW,EAAGC;AALf,IAVF,EAmBC,4BAAC,iCAAD,QACC;AAAI,uBAAkBM;AAAtB,KACGnB,QADH,EAEGS,MAAM,IAAI,CAAEE,kBAAZ,IACD,4BAAC,6BAAD;AAAgC,IAAA,MAAM,EAAGF;AAAzC,IAHF,CADD,CAnBD,CADD,CADD;AAgCA","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { ROOT_MENU } from '../constants';\nimport { NavigationMenuContext } from './context';\nimport { useNavigationContext } from '../context';\nimport { useNavigationTreeMenu } from './use-navigation-tree-menu';\nimport NavigationBackButton from '../back-button';\nimport NavigationMenuTitle from './menu-title';\nimport NavigationSearchNoResultsFound from './search-no-results-found';\nimport { NavigableMenu } from '../../navigable-container';\nimport { MenuUI } from '../styles/navigation-styles';\n\nexport default function NavigationMenu( props ) {\n\tconst {\n\t\tbackButtonLabel,\n\t\tchildren,\n\t\tclassName,\n\t\thasSearch,\n\t\tmenu = ROOT_MENU,\n\t\tonBackButtonClick,\n\t\tonSearch: setControlledSearch,\n\t\tparentMenu,\n\t\tsearch: controlledSearch,\n\t\tisSearchDebouncing,\n\t\ttitle,\n\t\ttitleAction,\n\t} = props;\n\tconst [ uncontrolledSearch, setUncontrolledSearch ] = useState( '' );\n\tuseNavigationTreeMenu( props );\n\tconst { activeMenu } = useNavigationContext();\n\n\tconst context = {\n\t\tmenu,\n\t\tsearch: uncontrolledSearch,\n\t};\n\n\t// Keep the children rendered to make sure invisible items are included in the navigation tree.\n\tif ( activeMenu !== menu ) {\n\t\treturn (\n\t\t\t<NavigationMenuContext.Provider value={ context }>\n\t\t\t\t{ children }\n\t\t\t</NavigationMenuContext.Provider>\n\t\t);\n\t}\n\n\tconst isControlledSearch = !! setControlledSearch;\n\tconst search = isControlledSearch ? controlledSearch : uncontrolledSearch;\n\tconst onSearch = isControlledSearch\n\t\t? setControlledSearch\n\t\t: setUncontrolledSearch;\n\n\tconst menuTitleId = `components-navigation__menu-title-${ menu }`;\n\tconst classes = classnames( 'components-navigation__menu', className );\n\n\treturn (\n\t\t<NavigationMenuContext.Provider value={ context }>\n\t\t\t<MenuUI className={ classes }>\n\t\t\t\t{ ( parentMenu || onBackButtonClick ) && (\n\t\t\t\t\t<NavigationBackButton\n\t\t\t\t\t\tbackButtonLabel={ backButtonLabel }\n\t\t\t\t\t\tparentMenu={ parentMenu }\n\t\t\t\t\t\tonClick={ onBackButtonClick }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t{ title && (\n\t\t\t\t\t<NavigationMenuTitle\n\t\t\t\t\t\thasSearch={ hasSearch }\n\t\t\t\t\t\tonSearch={ onSearch }\n\t\t\t\t\t\tsearch={ search }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\ttitleAction={ titleAction }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\n\t\t\t\t<NavigableMenu>\n\t\t\t\t\t<ul aria-labelledby={ menuTitleId }>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t{ search && ! isSearchDebouncing && (\n\t\t\t\t\t\t\t<NavigationSearchNoResultsFound search={ search } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t</ul>\n\t\t\t\t</NavigableMenu>\n\t\t\t</MenuUI>\n\t\t</NavigationMenuContext.Provider>\n\t);\n}\n"]}
@@ -5,6 +5,18 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
+ Object.defineProperty(exports, "NavigatorBackButton", {
9
+ enumerable: true,
10
+ get: function () {
11
+ return _navigatorBackButton.default;
12
+ }
13
+ });
14
+ Object.defineProperty(exports, "NavigatorButton", {
15
+ enumerable: true,
16
+ get: function () {
17
+ return _navigatorButton.default;
18
+ }
19
+ });
8
20
  Object.defineProperty(exports, "NavigatorProvider", {
9
21
  enumerable: true,
10
22
  get: function () {
@@ -28,5 +40,9 @@ var _navigatorProvider = _interopRequireDefault(require("./navigator-provider"))
28
40
 
29
41
  var _navigatorScreen = _interopRequireDefault(require("./navigator-screen"));
30
42
 
43
+ var _navigatorButton = _interopRequireDefault(require("./navigator-button"));
44
+
45
+ var _navigatorBackButton = _interopRequireDefault(require("./navigator-back-button"));
46
+
31
47
  var _useNavigator = _interopRequireDefault(require("./use-navigator"));
32
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/navigator/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA","sourcesContent":["export { default as NavigatorProvider } from './navigator-provider';\nexport { default as NavigatorScreen } from './navigator-screen';\nexport { default as useNavigator } from './use-navigator';\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/navigator/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { default as NavigatorProvider } from './navigator-provider';\nexport { default as NavigatorScreen } from './navigator-screen';\nexport { default as NavigatorButton } from './navigator-button';\nexport { default as NavigatorBackButton } from './navigator-back-button';\nexport { default as useNavigator } from './use-navigator';\n"]}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _element = require("@wordpress/element");
11
+
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
14
+ var _context = require("../../ui/context");
15
+
16
+ var _view = require("../../view");
17
+
18
+ var _hook = require("./hook");
19
+
20
+ /**
21
+ * External dependencies
22
+ */
23
+
24
+ /**
25
+ * Internal dependencies
26
+ */
27
+ function NavigatorBackButton(props, forwardedRef) {
28
+ const navigatorBackButtonProps = (0, _hook.useNavigatorBackButton)(props);
29
+ return (0, _element.createElement)(_view.View, (0, _extends2.default)({
30
+ ref: forwardedRef
31
+ }, navigatorBackButtonProps));
32
+ }
33
+ /**
34
+ * The `NavigatorBackButton` component can be used to navigate to a screen and
35
+ * should be used in combination with the `NavigatorProvider`, the
36
+ * `NavigatorScreen` and the `NavigatorButton` components (or the `useNavigator`
37
+ * hook).
38
+ *
39
+ * @example
40
+ * ```jsx
41
+ * import {
42
+ * __experimentalNavigatorProvider as NavigatorProvider,
43
+ * __experimentalNavigatorScreen as NavigatorScreen,
44
+ * __experimentalNavigatorButton as NavigatorButton,
45
+ * __experimentalNavigatorBackButton as NavigatorBackButton,
46
+ * } from '@wordpress/components';
47
+ *
48
+ * const MyNavigation = () => (
49
+ * <NavigatorProvider initialPath="/">
50
+ * <NavigatorScreen path="/">
51
+ * <p>This is the home screen.</p>
52
+ * <NavigatorButton path="/child">
53
+ * Navigate to child screen.
54
+ * </NavigatorButton>
55
+ * </NavigatorScreen>
56
+ *
57
+ * <NavigatorScreen path="/child">
58
+ * <p>This is the child screen.</p>
59
+ * <NavigatorBackButton>
60
+ * Go back
61
+ * </NavigatorBackButton>
62
+ * </NavigatorScreen>
63
+ * </NavigatorProvider>
64
+ * );
65
+ * ```
66
+ */
67
+
68
+
69
+ const ConnectedNavigatorBackButton = (0, _context.contextConnect)(NavigatorBackButton, 'NavigatorBackButton');
70
+ var _default = ConnectedNavigatorBackButton;
71
+ exports.default = _default;
72
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/navigator/navigator-back-button/component.tsx"],"names":["NavigatorBackButton","props","forwardedRef","navigatorBackButtonProps","ConnectedNavigatorBackButton"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,mBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,wBAAwB,GAAG,kCAAwBF,KAAxB,CAAjC;AAEA,SAAO,4BAAC,UAAD;AAAM,IAAA,GAAG,EAAGC;AAAZ,KAAgCC,wBAAhC,EAAP;AACA;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,MAAMC,4BAA4B,GAAG,6BACpCJ,mBADoC,EAEpC,qBAFoC,CAArC;eAKeI,4B","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { View } from '../../view';\nimport { useNavigatorBackButton } from './hook';\nimport type { NavigatorBackButtonProps } from '../types';\n\nfunction NavigatorBackButton(\n\tprops: WordPressComponentProps< NavigatorBackButtonProps, 'button' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst navigatorBackButtonProps = useNavigatorBackButton( props );\n\n\treturn <View ref={ forwardedRef } { ...navigatorBackButtonProps } />;\n}\n\n/**\n * The `NavigatorBackButton` component can be used to navigate to a screen and\n * should be used in combination with the `NavigatorProvider`, the\n * `NavigatorScreen` and the `NavigatorButton` 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 ConnectedNavigatorBackButton = contextConnect(\n\tNavigatorBackButton,\n\t'NavigatorBackButton'\n);\n\nexport default ConnectedNavigatorBackButton;\n"]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.useNavigatorBackButton = useNavigatorBackButton;
9
+
10
+ var _element = require("@wordpress/element");
11
+
12
+ var _context = require("../../ui/context");
13
+
14
+ var _button = _interopRequireDefault(require("../../button"));
15
+
16
+ var _useNavigator = _interopRequireDefault(require("../use-navigator"));
17
+
18
+ /**
19
+ * WordPress dependencies
20
+ */
21
+
22
+ /**
23
+ * Internal dependencies
24
+ */
25
+
26
+ /**
27
+ * Internal dependencies
28
+ */
29
+ function useNavigatorBackButton(props) {
30
+ const {
31
+ onClick,
32
+ as = _button.default,
33
+ ...otherProps
34
+ } = (0, _context.useContextSystem)(props, 'NavigatorBackButton');
35
+ const {
36
+ goBack
37
+ } = (0, _useNavigator.default)();
38
+ const handleClick = (0, _element.useCallback)(e => {
39
+ e.preventDefault();
40
+ goBack();
41
+ onClick === null || onClick === void 0 ? void 0 : onClick(e);
42
+ }, [goBack, onClick]);
43
+ return {
44
+ as,
45
+ onClick: handleClick,
46
+ ...otherProps
47
+ };
48
+ }
49
+ //# sourceMappingURL=hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/navigator/navigator-back-button/hook.ts"],"names":["useNavigatorBackButton","props","onClick","as","Button","otherProps","goBack","handleClick","e","preventDefault"],"mappings":";;;;;;;;;AAGA;;AAQA;;AACA;;AACA;;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AACA;AACA;AACA;AAMO,SAASA,sBAAT,CACNC,KADM,EAEL;AACD,QAAM;AAAEC,IAAAA,OAAF;AAAWC,IAAAA,EAAE,GAAGC,eAAhB;AAAwB,OAAGC;AAA3B,MAA0C,+BAC/CJ,KAD+C,EAE/C,qBAF+C,CAAhD;AAKA,QAAM;AAAEK,IAAAA;AAAF,MAAa,4BAAnB;AACA,QAAMC,WAAyD,GAAG,0BAC/DC,CAAF,IAAS;AACRA,IAAAA,CAAC,CAACC,cAAF;AACAH,IAAAA,MAAM;AACNJ,IAAAA,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAIM,CAAJ,CAAP;AACA,GALgE,EAMjE,CAAEF,MAAF,EAAUJ,OAAV,CANiE,CAAlE;AASA,SAAO;AACNC,IAAAA,EADM;AAEND,IAAAA,OAAO,EAAEK,WAFH;AAGN,OAAGF;AAHG,GAAP;AAKA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport Button from '../../button';\nimport useNavigator from '../use-navigator';\nimport type { NavigatorBackButtonProps } from '../types';\n\nexport function useNavigatorBackButton(\n\tprops: WordPressComponentProps< NavigatorBackButtonProps, 'button' >\n) {\n\tconst { onClick, as = Button, ...otherProps } = useContextSystem(\n\t\tprops,\n\t\t'NavigatorBackButton'\n\t);\n\n\tconst { goBack } = useNavigator();\n\tconst handleClick: React.MouseEventHandler< HTMLButtonElement > = useCallback(\n\t\t( e ) => {\n\t\t\te.preventDefault();\n\t\t\tgoBack();\n\t\t\tonClick?.( e );\n\t\t},\n\t\t[ goBack, onClick ]\n\t);\n\n\treturn {\n\t\tas,\n\t\tonClick: handleClick,\n\t\t...otherProps,\n\t};\n}\n"]}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ Object.defineProperty(exports, "default", {
9
+ enumerable: true,
10
+ get: function () {
11
+ return _component.default;
12
+ }
13
+ });
14
+
15
+ var _component = _interopRequireDefault(require("./component"));
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/navigator/navigator-back-button/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './component';\n"]}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _element = require("@wordpress/element");
11
+
12
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
+
14
+ var _context = require("../../ui/context");
15
+
16
+ var _view = require("../../view");
17
+
18
+ var _hook = require("./hook");
19
+
20
+ /**
21
+ * External dependencies
22
+ */
23
+
24
+ /**
25
+ * Internal dependencies
26
+ */
27
+ function NavigatorButton(props, forwardedRef) {
28
+ const navigatorButtonProps = (0, _hook.useNavigatorButton)(props);
29
+ return (0, _element.createElement)(_view.View, (0, _extends2.default)({
30
+ ref: forwardedRef
31
+ }, navigatorButtonProps));
32
+ }
33
+ /**
34
+ * The `NavigatorButton` component can be used to navigate to a screen and should
35
+ * be used in combination with the `NavigatorProvider`, the `NavigatorScreen`
36
+ * and the `NavigatorBackButton` components (or the `useNavigator` hook).
37
+ *
38
+ * @example
39
+ * ```jsx
40
+ * import {
41
+ * __experimentalNavigatorProvider as NavigatorProvider,
42
+ * __experimentalNavigatorScreen as NavigatorScreen,
43
+ * __experimentalNavigatorButton as NavigatorButton,
44
+ * __experimentalNavigatorBackButton as NavigatorBackButton,
45
+ * } from '@wordpress/components';
46
+ *
47
+ * const MyNavigation = () => (
48
+ * <NavigatorProvider initialPath="/">
49
+ * <NavigatorScreen path="/">
50
+ * <p>This is the home screen.</p>
51
+ * <NavigatorButton path="/child">
52
+ * Navigate to child screen.
53
+ * </NavigatorButton>
54
+ * </NavigatorScreen>
55
+ *
56
+ * <NavigatorScreen path="/child">
57
+ * <p>This is the child screen.</p>
58
+ * <NavigatorBackButton>
59
+ * Go back
60
+ * </NavigatorBackButton>
61
+ * </NavigatorScreen>
62
+ * </NavigatorProvider>
63
+ * );
64
+ * ```
65
+ */
66
+
67
+
68
+ const ConnectedNavigatorButton = (0, _context.contextConnect)(NavigatorButton, 'NavigatorButton');
69
+ var _default = ConnectedNavigatorButton;
70
+ exports.default = _default;
71
+ //# sourceMappingURL=component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/navigator/navigator-button/component.tsx"],"names":["NavigatorButton","props","forwardedRef","navigatorButtonProps","ConnectedNavigatorButton"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,eAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,oBAAoB,GAAG,8BAAoBF,KAApB,CAA7B;AAEA,SAAO,4BAAC,UAAD;AAAM,IAAA,GAAG,EAAGC;AAAZ,KAAgCC,oBAAhC,EAAP;AACA;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,MAAMC,wBAAwB,GAAG,6BAChCJ,eADgC,EAEhC,iBAFgC,CAAjC;eAKeI,wB","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { View } from '../../view';\nimport { useNavigatorButton } from './hook';\nimport type { NavigatorButtonProps } from '../types';\n\nfunction NavigatorButton(\n\tprops: WordPressComponentProps< NavigatorButtonProps, 'button' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst navigatorButtonProps = useNavigatorButton( props );\n\n\treturn <View ref={ forwardedRef } { ...navigatorButtonProps } />;\n}\n\n/**\n * The `NavigatorButton` component can be used to navigate to a screen and should\n * be used in combination with the `NavigatorProvider`, the `NavigatorScreen`\n * and the `NavigatorBackButton` components (or the `useNavigator` 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 ConnectedNavigatorButton = contextConnect(\n\tNavigatorButton,\n\t'NavigatorButton'\n);\n\nexport default ConnectedNavigatorButton;\n"]}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.useNavigatorButton = useNavigatorButton;
9
+
10
+ var _element = require("@wordpress/element");
11
+
12
+ var _escapeHtml = require("@wordpress/escape-html");
13
+
14
+ var _context = require("../../ui/context");
15
+
16
+ var _button = _interopRequireDefault(require("../../button"));
17
+
18
+ var _useNavigator = _interopRequireDefault(require("../use-navigator"));
19
+
20
+ /**
21
+ * WordPress dependencies
22
+ */
23
+
24
+ /**
25
+ * Internal dependencies
26
+ */
27
+
28
+ /**
29
+ * Internal dependencies
30
+ */
31
+ const cssSelectorForAttribute = (attrName, attrValue) => `[${attrName}="${attrValue}"]`;
32
+
33
+ function useNavigatorButton(props) {
34
+ const {
35
+ path,
36
+ onClick,
37
+ as = _button.default,
38
+ attributeName = 'id',
39
+ ...otherProps
40
+ } = (0, _context.useContextSystem)(props, 'NavigatorButton');
41
+ const escapedPath = (0, _escapeHtml.escapeAttribute)(path);
42
+ const {
43
+ goTo
44
+ } = (0, _useNavigator.default)();
45
+ const handleClick = (0, _element.useCallback)(e => {
46
+ e.preventDefault();
47
+ goTo(escapedPath, {
48
+ focusTargetSelector: cssSelectorForAttribute(attributeName, escapedPath)
49
+ });
50
+ onClick === null || onClick === void 0 ? void 0 : onClick(e);
51
+ }, [goTo, onClick]);
52
+ return {
53
+ as,
54
+ onClick: handleClick,
55
+ ...otherProps,
56
+ [attributeName]: escapedPath
57
+ };
58
+ }
59
+ //# sourceMappingURL=hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/navigator/navigator-button/hook.ts"],"names":["cssSelectorForAttribute","attrName","attrValue","useNavigatorButton","props","path","onClick","as","Button","attributeName","otherProps","escapedPath","goTo","handleClick","e","preventDefault","focusTargetSelector"],"mappings":";;;;;;;;;AAGA;;AACA;;AAQA;;AACA;;AACA;;AAdA;AACA;AACA;;AAIA;AACA;AACA;;AACA;AACA;AACA;AAMA,MAAMA,uBAAuB,GAAG,CAAEC,QAAF,EAAoBC,SAApB,KAC9B,IAAID,QAAU,KAAKC,SAAW,IADhC;;AAGO,SAASC,kBAAT,CACNC,KADM,EAEL;AACD,QAAM;AACLC,IAAAA,IADK;AAELC,IAAAA,OAFK;AAGLC,IAAAA,EAAE,GAAGC,eAHA;AAILC,IAAAA,aAAa,GAAG,IAJX;AAKL,OAAGC;AALE,MAMF,+BAAkBN,KAAlB,EAAyB,iBAAzB,CANJ;AAQA,QAAMO,WAAW,GAAG,iCAAiBN,IAAjB,CAApB;AAEA,QAAM;AAAEO,IAAAA;AAAF,MAAW,4BAAjB;AACA,QAAMC,WAAyD,GAAG,0BAC/DC,CAAF,IAAS;AACRA,IAAAA,CAAC,CAACC,cAAF;AACAH,IAAAA,IAAI,CAAED,WAAF,EAAe;AAClBK,MAAAA,mBAAmB,EAAEhB,uBAAuB,CAC3CS,aAD2C,EAE3CE,WAF2C;AAD1B,KAAf,CAAJ;AAMAL,IAAAA,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAIQ,CAAJ,CAAP;AACA,GAVgE,EAWjE,CAAEF,IAAF,EAAQN,OAAR,CAXiE,CAAlE;AAcA,SAAO;AACNC,IAAAA,EADM;AAEND,IAAAA,OAAO,EAAEO,WAFH;AAGN,OAAGH,UAHG;AAIN,KAAED,aAAF,GAAmBE;AAJb,GAAP;AAMA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useCallback } from '@wordpress/element';\nimport { escapeAttribute } from '@wordpress/escape-html';\n\n/**\n * Internal dependencies\n */\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport Button from '../../button';\nimport useNavigator from '../use-navigator';\nimport type { NavigatorButtonProps } from '../types';\n\nconst cssSelectorForAttribute = ( attrName: string, attrValue: string ) =>\n\t`[${ attrName }=\"${ attrValue }\"]`;\n\nexport function useNavigatorButton(\n\tprops: WordPressComponentProps< NavigatorButtonProps, 'button' >\n) {\n\tconst {\n\t\tpath,\n\t\tonClick,\n\t\tas = Button,\n\t\tattributeName = 'id',\n\t\t...otherProps\n\t} = useContextSystem( props, 'NavigatorButton' );\n\n\tconst escapedPath = escapeAttribute( path );\n\n\tconst { goTo } = useNavigator();\n\tconst handleClick: React.MouseEventHandler< HTMLButtonElement > = useCallback(\n\t\t( e ) => {\n\t\t\te.preventDefault();\n\t\t\tgoTo( escapedPath, {\n\t\t\t\tfocusTargetSelector: cssSelectorForAttribute(\n\t\t\t\t\tattributeName,\n\t\t\t\t\tescapedPath\n\t\t\t\t),\n\t\t\t} );\n\t\t\tonClick?.( e );\n\t\t},\n\t\t[ goTo, onClick ]\n\t);\n\n\treturn {\n\t\tas,\n\t\tonClick: handleClick,\n\t\t...otherProps,\n\t\t[ attributeName ]: escapedPath,\n\t};\n}\n"]}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ Object.defineProperty(exports, "default", {
9
+ enumerable: true,
10
+ get: function () {
11
+ return _component.default;
12
+ }
13
+ });
14
+
15
+ var _component = _interopRequireDefault(require("./component"));
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["@wordpress/components/src/navigator/navigator-button/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA","sourcesContent":["export { default } from './component';\n"]}
@@ -29,7 +29,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
29
29
  } : {
30
30
  name: "192ebb7-classes",
31
31
  styles: "overflow-x:hidden;label:classes;",
32
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvbmF2aWdhdG9yL25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xuZXhwb3J0IGRlZmF1bHQgQ29ubmVjdGVkTmF2aWdhdG9yUHJvdmlkZXI7XG4iXX0= */",
33
33
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
34
34
  };
35
35
 
@@ -65,7 +65,7 @@ function NavigatorProvider(props, forwardedRef) {
65
65
  goBack
66
66
  }), [locationHistory, goTo, goBack]);
67
67
  const cx = (0, _useCx.useCx)();
68
- const classes = (0, _element.useMemo)( // Prevents horizontal overflow while animating screen transitions
68
+ const classes = (0, _element.useMemo)( // Prevents horizontal overflow while animating screen transitions.
69
69
  () => cx(_ref, className), [className, cx]);
70
70
  return (0, _element.createElement)(_view.View, (0, _extends2.default)({
71
71
  ref: forwardedRef,
@@ -75,44 +75,34 @@ function NavigatorProvider(props, forwardedRef) {
75
75
  }, children));
76
76
  }
77
77
  /**
78
- * The `NavigatorProvider` component allows rendering nested panels or menus (via the `NavigatorScreen` component) and navigate between these different states (via the `useNavigator` hook).
78
+ * The `NavigatorProvider` component allows rendering nested views/panels/menus
79
+ * (via the `NavigatorScreen` component and navigate between these different
80
+ * view (via the `NavigatorButton` and `NavigatorBackButton` components or the
81
+ * `useNavigator` hook).
79
82
  *
80
83
  * @example
81
84
  * ```jsx
82
85
  * import {
83
86
  * __experimentalNavigatorProvider as NavigatorProvider,
84
87
  * __experimentalNavigatorScreen as NavigatorScreen,
85
- * __experimentalUseNavigator as useNavigator,
88
+ * __experimentalNavigatorButton as NavigatorButton,
89
+ * __experimentalNavigatorBackButton as NavigatorBackButton,
86
90
  * } from '@wordpress/components';
87
91
  *
88
- * function NavigatorButton( { path, ...props } ) {
89
- * const { goTo } = useNavigator();
90
- * return (
91
- * <Button
92
- * variant="primary"
93
- * onClick={ () => goTo( path ) }
94
- * { ...props }
95
- * />
96
- * );
97
- * }
98
- *
99
- * function NavigatorBackButton( props ) {
100
- * const { goBack } = useNavigator();
101
- * return <Button variant="secondary" onClick={ () => goBack() } { ...props } />;
102
- * }
103
- *
104
92
  * const MyNavigation = () => (
105
93
  * <NavigatorProvider initialPath="/">
106
94
  * <NavigatorScreen path="/">
107
95
  * <p>This is the home screen.</p>
108
- * <NavigatorButton path="/child">
96
+ * <NavigatorButton path="/child">
109
97
  * Navigate to child screen.
110
98
  * </NavigatorButton>
111
99
  * </NavigatorScreen>
112
100
  *
113
101
  * <NavigatorScreen path="/child">
114
102
  * <p>This is the child screen.</p>
115
- * <NavigatorBackButton>Go back</NavigatorBackButton>
103
+ * <NavigatorBackButton>
104
+ * Go back
105
+ * </NavigatorBackButton>
116
106
  * </NavigatorScreen>
117
107
  * </NavigatorProvider>
118
108
  * );