@wordpress/components 19.4.1-next.f435e9e01b.0 → 19.6.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 (944) hide show
  1. package/CHANGELOG.md +37 -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 +1 -4
  230. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  231. package/build/toggle-group-control/toggle-group-control-option/styles.js +12 -19
  232. package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  233. package/build/toolbar/index.js +1 -1
  234. package/build/toolbar/index.js.map +1 -1
  235. package/build/tools-panel/tools-panel/component.js.map +1 -1
  236. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  237. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  238. package/build/tooltip/index.js +3 -3
  239. package/build/tooltip/index.js.map +1 -1
  240. package/build/tooltip/index.native.js +7 -7
  241. package/build/tooltip/index.native.js.map +1 -1
  242. package/build/tree-grid/index.js +54 -7
  243. package/build/tree-grid/index.js.map +1 -1
  244. package/build/truncate/component.js +1 -1
  245. package/build/truncate/component.js.map +1 -1
  246. package/build/truncate/utils.js +1 -1
  247. package/build/truncate/utils.js.map +1 -1
  248. package/build/ui/context/context-connect.js +8 -15
  249. package/build/ui/context/context-connect.js.map +1 -1
  250. package/build/ui/context/context-system-provider.js +2 -2
  251. package/build/ui/context/context-system-provider.js.map +1 -1
  252. package/build/ui/context/index.js.map +1 -1
  253. package/build/ui/control-group/component.js +1 -1
  254. package/build/ui/control-group/component.js.map +1 -1
  255. package/build/ui/control-label/component.js +1 -1
  256. package/build/ui/control-label/component.js.map +1 -1
  257. package/build/ui/form-group/form-group.js +1 -1
  258. package/build/ui/form-group/form-group.js.map +1 -1
  259. package/build/ui/shortcut/component.js.map +1 -1
  260. package/build/ui/spinner/component.js +1 -1
  261. package/build/ui/spinner/component.js.map +1 -1
  262. package/build/ui/tooltip/component.js +1 -1
  263. package/build/ui/tooltip/component.js.map +1 -1
  264. package/build/ui/tooltip/content.js +1 -1
  265. package/build/ui/tooltip/content.js.map +1 -1
  266. package/build/ui/utils/colors.js +2 -2
  267. package/build/ui/utils/colors.js.map +1 -1
  268. package/build/ui/utils/space.js +2 -2
  269. package/build/ui/utils/space.js.map +1 -1
  270. package/build/unit-control/index.js +38 -29
  271. package/build/unit-control/index.js.map +1 -1
  272. package/build/unit-control/index.native.js +4 -2
  273. package/build/unit-control/index.native.js.map +1 -1
  274. package/build/unit-control/unit-select-control.js +1 -1
  275. package/build/unit-control/unit-select-control.js.map +1 -1
  276. package/build/unit-control/utils.js +96 -104
  277. package/build/unit-control/utils.js.map +1 -1
  278. package/build/utils/breakpoint-values.js +1 -1
  279. package/build/utils/breakpoint-values.js.map +1 -1
  280. package/build/utils/colors-values.js +1 -1
  281. package/build/utils/colors-values.js.map +1 -1
  282. package/build/v-stack/component.js +1 -1
  283. package/build/v-stack/component.js.map +1 -1
  284. package/build/visually-hidden/component.js +1 -1
  285. package/build/visually-hidden/component.js.map +1 -1
  286. package/build/z-stack/component.js.map +1 -1
  287. package/build-module/alignment-matrix-control/utils.js +1 -1
  288. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  289. package/build-module/angle-picker-control/angle-circle.js +1 -1
  290. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  291. package/build-module/animation/index.js +1 -1
  292. package/build-module/animation/index.js.map +1 -1
  293. package/build-module/autocomplete/get-default-use-items.js +3 -3
  294. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  295. package/build-module/base-field/hook.js +1 -1
  296. package/build-module/base-field/hook.js.map +1 -1
  297. package/build-module/box-control/icon.js +1 -1
  298. package/build-module/box-control/icon.js.map +1 -1
  299. package/build-module/box-control/index.js +5 -5
  300. package/build-module/box-control/index.js.map +1 -1
  301. package/build-module/box-control/unit-control.js +1 -1
  302. package/build-module/box-control/unit-control.js.map +1 -1
  303. package/build-module/box-control/utils.js +13 -9
  304. package/build-module/box-control/utils.js.map +1 -1
  305. package/build-module/button/index.js +5 -5
  306. package/build-module/button/index.js.map +1 -1
  307. package/build-module/button/index.native.js +7 -7
  308. package/build-module/button/index.native.js.map +1 -1
  309. package/build-module/card/card/component.js +2 -2
  310. package/build-module/card/card/component.js.map +1 -1
  311. package/build-module/card/card-body/component.js +1 -1
  312. package/build-module/card/card-body/component.js.map +1 -1
  313. package/build-module/card/card-divider/component.js +1 -1
  314. package/build-module/card/card-divider/component.js.map +1 -1
  315. package/build-module/card/card-footer/component.js +1 -1
  316. package/build-module/card/card-footer/component.js.map +1 -1
  317. package/build-module/card/card-header/component.js +1 -1
  318. package/build-module/card/card-header/component.js.map +1 -1
  319. package/build-module/card/card-media/component.js +1 -1
  320. package/build-module/card/card-media/component.js.map +1 -1
  321. package/build-module/color-palette/index.native.js +36 -31
  322. package/build-module/color-palette/index.native.js.map +1 -1
  323. package/build-module/color-picker/color-display.js +1 -1
  324. package/build-module/color-picker/color-display.js.map +1 -1
  325. package/build-module/color-picker/component.js.map +1 -1
  326. package/build-module/color-picker/hex-input.js +6 -9
  327. package/build-module/color-picker/hex-input.js.map +1 -1
  328. package/build-module/color-picker/styles.js +8 -8
  329. package/build-module/color-picker/styles.js.map +1 -1
  330. package/build-module/combobox-control/index.js +1 -1
  331. package/build-module/combobox-control/index.js.map +1 -1
  332. package/build-module/confirm-dialog/component.js +4 -5
  333. package/build-module/confirm-dialog/component.js.map +1 -1
  334. package/build-module/date-time/time.js +7 -4
  335. package/build-module/date-time/time.js.map +1 -1
  336. package/build-module/divider/component.js +3 -3
  337. package/build-module/divider/component.js.map +1 -1
  338. package/build-module/draggable/index.js +3 -3
  339. package/build-module/draggable/index.js.map +1 -1
  340. package/build-module/elevation/component.js +1 -1
  341. package/build-module/elevation/component.js.map +1 -1
  342. package/build-module/flex/flex/component.js +1 -1
  343. package/build-module/flex/flex/component.js.map +1 -1
  344. package/build-module/flex/flex-block/component.js +1 -1
  345. package/build-module/flex/flex-block/component.js.map +1 -1
  346. package/build-module/flex/flex-item/component.js +1 -1
  347. package/build-module/flex/flex-item/component.js.map +1 -1
  348. package/build-module/flyout/flyout/component.js +1 -1
  349. package/build-module/flyout/flyout/component.js.map +1 -1
  350. package/build-module/flyout/flyout-content/component.js +1 -1
  351. package/build-module/flyout/flyout-content/component.js.map +1 -1
  352. package/build-module/focal-point-picker/index.js +18 -12
  353. package/build-module/focal-point-picker/index.js.map +1 -1
  354. package/build-module/focal-point-picker/index.native.js +7 -7
  355. package/build-module/focal-point-picker/index.native.js.map +1 -1
  356. package/build-module/focal-point-picker/tooltip/index.native.js +1 -1
  357. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  358. package/build-module/font-size-picker/index.js +1 -2
  359. package/build-module/font-size-picker/index.js.map +1 -1
  360. package/build-module/form-token-field/index.js +6 -6
  361. package/build-module/form-token-field/index.js.map +1 -1
  362. package/build-module/form-token-field/suggestions-list.js +2 -2
  363. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  364. package/build-module/grid/component.js +1 -1
  365. package/build-module/grid/component.js.map +1 -1
  366. package/build-module/h-stack/component.js +1 -1
  367. package/build-module/h-stack/component.js.map +1 -1
  368. package/build-module/heading/component.js +4 -4
  369. package/build-module/heading/component.js.map +1 -1
  370. package/build-module/heading/hook.js +1 -1
  371. package/build-module/heading/hook.js.map +1 -1
  372. package/build-module/higher-order/with-notices/index.js +1 -1
  373. package/build-module/higher-order/with-notices/index.js.map +1 -1
  374. package/build-module/index.js +5 -5
  375. package/build-module/index.js.map +1 -1
  376. package/build-module/index.native.js +5 -5
  377. package/build-module/index.native.js.map +1 -1
  378. package/build-module/input-control/index.js.map +1 -1
  379. package/build-module/input-control/input-base.js +1 -1
  380. package/build-module/input-control/input-base.js.map +1 -1
  381. package/build-module/input-control/input-field.js +19 -16
  382. package/build-module/input-control/input-field.js.map +1 -1
  383. package/build-module/input-control/reducer/reducer.js +3 -0
  384. package/build-module/input-control/reducer/reducer.js.map +1 -1
  385. package/build-module/input-control/styles/input-control-styles.js +25 -25
  386. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  387. package/build-module/isolated-event-container/index.js +1 -1
  388. package/build-module/isolated-event-container/index.js.map +1 -1
  389. package/build-module/item-group/item/component.js.map +1 -1
  390. package/build-module/item-group/item-group/component.js.map +1 -1
  391. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  392. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  393. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  394. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  395. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
  396. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  397. package/build-module/mobile/bottom-sheet/cell.native.js +1 -1
  398. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  399. package/build-module/mobile/bottom-sheet/index.native.js +11 -11
  400. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  401. package/build-module/mobile/bottom-sheet/link-cell.native.js +1 -1
  402. package/build-module/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  403. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  404. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  405. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  406. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  407. package/build-module/mobile/color-settings/palette.screen.native.js +27 -10
  408. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  409. package/build-module/mobile/global-styles-context/utils.native.js +70 -20
  410. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  411. package/build-module/mobile/gradient/index.native.js +2 -2
  412. package/build-module/mobile/gradient/index.native.js.map +1 -1
  413. package/build-module/mobile/html-text-input/container.ios.js +3 -3
  414. package/build-module/mobile/html-text-input/container.ios.js.map +1 -1
  415. package/build-module/mobile/html-text-input/index.native.js +1 -1
  416. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  417. package/build-module/mobile/image/index.native.js +1 -1
  418. package/build-module/mobile/image/index.native.js.map +1 -1
  419. package/build-module/mobile/inserter-button/index.native.js +1 -1
  420. package/build-module/mobile/inserter-button/index.native.js.map +1 -1
  421. package/build-module/mobile/inserter-button/sparkles.js +16 -0
  422. package/build-module/mobile/inserter-button/sparkles.js.map +1 -0
  423. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  424. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  425. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  426. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  427. package/build-module/mobile/link-picker/index.native.js +3 -3
  428. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  429. package/build-module/mobile/link-picker/link-picker-results.native.js +8 -8
  430. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  431. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  432. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
  433. package/build-module/mobile/link-settings/index.native.js +1 -1
  434. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  435. package/build-module/modal/aria-helper.js +1 -1
  436. package/build-module/modal/aria-helper.js.map +1 -1
  437. package/build-module/modal/index.js +2 -2
  438. package/build-module/modal/index.js.map +1 -1
  439. package/build-module/navigable-container/container.js +2 -2
  440. package/build-module/navigable-container/container.js.map +1 -1
  441. package/build-module/navigable-container/tabbable.js +1 -1
  442. package/build-module/navigable-container/tabbable.js.map +1 -1
  443. package/build-module/navigation/item/index.js +1 -1
  444. package/build-module/navigation/item/index.js.map +1 -1
  445. package/build-module/navigation/menu/index.js +1 -1
  446. package/build-module/navigation/menu/index.js.map +1 -1
  447. package/build-module/navigator/index.js +2 -0
  448. package/build-module/navigator/index.js.map +1 -1
  449. package/build-module/navigator/navigator-back-button/component.js +59 -0
  450. package/build-module/navigator/navigator-back-button/component.js.map +1 -0
  451. package/build-module/navigator/navigator-back-button/hook.js +36 -0
  452. package/build-module/navigator/navigator-back-button/hook.js.map +1 -0
  453. package/build-module/navigator/navigator-back-button/index.js +2 -0
  454. package/build-module/navigator/navigator-back-button/index.js.map +1 -0
  455. package/build-module/navigator/navigator-button/component.js +58 -0
  456. package/build-module/navigator/navigator-button/component.js.map +1 -0
  457. package/build-module/navigator/navigator-button/hook.js +46 -0
  458. package/build-module/navigator/navigator-button/hook.js.map +1 -0
  459. package/build-module/navigator/navigator-button/index.js +2 -0
  460. package/build-module/navigator/navigator-button/index.js.map +1 -0
  461. package/build-module/navigator/navigator-provider/component.js +12 -22
  462. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  463. package/build-module/navigator/navigator-screen/component.js +13 -22
  464. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  465. package/build-module/number-control/index.js +1 -1
  466. package/build-module/number-control/index.js.map +1 -1
  467. package/build-module/panel/body.js +2 -2
  468. package/build-module/panel/body.js.map +1 -1
  469. package/build-module/popover/index.js +3 -3
  470. package/build-module/popover/index.js.map +1 -1
  471. package/build-module/popover/utils.js +6 -6
  472. package/build-module/popover/utils.js.map +1 -1
  473. package/build-module/radio-group/index.js +1 -1
  474. package/build-module/radio-group/index.js.map +1 -1
  475. package/build-module/range-control/styles/range-control-styles.js +29 -29
  476. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  477. package/build-module/resizable-box/index.js.map +1 -1
  478. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  479. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  480. package/build-module/sandbox/index.js +5 -5
  481. package/build-module/sandbox/index.js.map +1 -1
  482. package/build-module/sandbox/index.native.js +1 -1
  483. package/build-module/sandbox/index.native.js.map +1 -1
  484. package/build-module/scrollable/component.js +1 -1
  485. package/build-module/scrollable/component.js.map +1 -1
  486. package/build-module/select-control/index.js +2 -2
  487. package/build-module/select-control/index.js.map +1 -1
  488. package/build-module/select-control/styles/select-control-styles.js +5 -5
  489. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  490. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  491. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  492. package/build-module/slot-fill/bubbles-virtually/slot.js +1 -1
  493. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  494. package/build-module/slot-fill/fill.js +1 -1
  495. package/build-module/slot-fill/fill.js.map +1 -1
  496. package/build-module/slot-fill/provider.js +1 -1
  497. package/build-module/slot-fill/provider.js.map +1 -1
  498. package/build-module/snackbar/index.js +1 -1
  499. package/build-module/snackbar/index.js.map +1 -1
  500. package/build-module/snackbar/list.js +1 -1
  501. package/build-module/snackbar/list.js.map +1 -1
  502. package/build-module/spacer/component.js.map +1 -1
  503. package/build-module/style-provider/index.js +2 -2
  504. package/build-module/style-provider/index.js.map +1 -1
  505. package/build-module/surface/component.js +1 -1
  506. package/build-module/surface/component.js.map +1 -1
  507. package/build-module/text/component.js +1 -1
  508. package/build-module/text/component.js.map +1 -1
  509. package/build-module/text-control/index.js +2 -2
  510. package/build-module/text-control/index.js.map +1 -1
  511. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -2
  512. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  513. package/build-module/toggle-group-control/toggle-group-control-option/component.js +1 -4
  514. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  515. package/build-module/toggle-group-control/toggle-group-control-option/styles.js +11 -17
  516. package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  517. package/build-module/toolbar/index.js +1 -1
  518. package/build-module/toolbar/index.js.map +1 -1
  519. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  520. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  521. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  522. package/build-module/tooltip/index.js +3 -3
  523. package/build-module/tooltip/index.js.map +1 -1
  524. package/build-module/tooltip/index.native.js +7 -7
  525. package/build-module/tooltip/index.native.js.map +1 -1
  526. package/build-module/tree-grid/index.js +55 -8
  527. package/build-module/tree-grid/index.js.map +1 -1
  528. package/build-module/truncate/component.js +1 -1
  529. package/build-module/truncate/component.js.map +1 -1
  530. package/build-module/truncate/utils.js +1 -1
  531. package/build-module/truncate/utils.js.map +1 -1
  532. package/build-module/ui/context/context-connect.js +9 -16
  533. package/build-module/ui/context/context-connect.js.map +1 -1
  534. package/build-module/ui/context/context-system-provider.js +2 -2
  535. package/build-module/ui/context/context-system-provider.js.map +1 -1
  536. package/build-module/ui/context/index.js.map +1 -1
  537. package/build-module/ui/control-group/component.js +1 -1
  538. package/build-module/ui/control-group/component.js.map +1 -1
  539. package/build-module/ui/control-label/component.js +1 -1
  540. package/build-module/ui/control-label/component.js.map +1 -1
  541. package/build-module/ui/form-group/form-group.js +1 -1
  542. package/build-module/ui/form-group/form-group.js.map +1 -1
  543. package/build-module/ui/shortcut/component.js.map +1 -1
  544. package/build-module/ui/spinner/component.js +1 -1
  545. package/build-module/ui/spinner/component.js.map +1 -1
  546. package/build-module/ui/tooltip/component.js +1 -1
  547. package/build-module/ui/tooltip/component.js.map +1 -1
  548. package/build-module/ui/tooltip/content.js +1 -1
  549. package/build-module/ui/tooltip/content.js.map +1 -1
  550. package/build-module/ui/utils/colors.js +2 -2
  551. package/build-module/ui/utils/colors.js.map +1 -1
  552. package/build-module/ui/utils/space.js +2 -2
  553. package/build-module/ui/utils/space.js.map +1 -1
  554. package/build-module/unit-control/index.js +39 -30
  555. package/build-module/unit-control/index.js.map +1 -1
  556. package/build-module/unit-control/index.native.js +5 -3
  557. package/build-module/unit-control/index.native.js.map +1 -1
  558. package/build-module/unit-control/unit-select-control.js +1 -1
  559. package/build-module/unit-control/unit-select-control.js.map +1 -1
  560. package/build-module/unit-control/utils.js +92 -100
  561. package/build-module/unit-control/utils.js.map +1 -1
  562. package/build-module/utils/breakpoint-values.js +1 -1
  563. package/build-module/utils/breakpoint-values.js.map +1 -1
  564. package/build-module/utils/colors-values.js +1 -1
  565. package/build-module/utils/colors-values.js.map +1 -1
  566. package/build-module/v-stack/component.js +1 -1
  567. package/build-module/v-stack/component.js.map +1 -1
  568. package/build-module/visually-hidden/component.js +1 -1
  569. package/build-module/visually-hidden/component.js.map +1 -1
  570. package/build-module/z-stack/component.js.map +1 -1
  571. package/build-style/style-rtl.css +8 -0
  572. package/build-style/style.css +8 -0
  573. package/build-types/base-field/hook.d.ts +2 -1
  574. package/build-types/base-field/hook.d.ts.map +1 -1
  575. package/build-types/card/card/hook.d.ts +2 -1
  576. package/build-types/card/card/hook.d.ts.map +1 -1
  577. package/build-types/card/card-body/hook.d.ts +2 -1
  578. package/build-types/card/card-body/hook.d.ts.map +1 -1
  579. package/build-types/card/card-divider/hook.d.ts +2 -3
  580. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  581. package/build-types/card/card-footer/hook.d.ts +2 -1
  582. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  583. package/build-types/card/card-header/hook.d.ts +2 -1
  584. package/build-types/card/card-header/hook.d.ts.map +1 -1
  585. package/build-types/card/card-media/hook.d.ts +2 -1
  586. package/build-types/card/card-media/hook.d.ts.map +1 -1
  587. package/build-types/color-picker/styles.d.ts +2 -4
  588. package/build-types/color-picker/styles.d.ts.map +1 -1
  589. package/build-types/confirm-dialog/component.d.ts +10 -6
  590. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  591. package/build-types/confirm-dialog/types.d.ts +2 -0
  592. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  593. package/build-types/divider/component.d.ts +2 -2
  594. package/build-types/divider/component.d.ts.map +1 -1
  595. package/build-types/divider/stories/index.d.ts +10 -0
  596. package/build-types/divider/stories/index.d.ts.map +1 -0
  597. package/build-types/divider/types.d.ts +1 -1
  598. package/build-types/divider/types.d.ts.map +1 -1
  599. package/build-types/elevation/hook.d.ts +2 -1
  600. package/build-types/elevation/hook.d.ts.map +1 -1
  601. package/build-types/flex/flex/hook.d.ts +2 -1
  602. package/build-types/flex/flex/hook.d.ts.map +1 -1
  603. package/build-types/flex/flex-block/hook.d.ts +2 -1
  604. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  605. package/build-types/flex/flex-item/hook.d.ts +2 -1
  606. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  607. package/build-types/flyout/flyout/hook.d.ts +2 -2
  608. package/build-types/grid/hook.d.ts +2 -1
  609. package/build-types/grid/hook.d.ts.map +1 -1
  610. package/build-types/h-stack/hook.d.ts +3 -2
  611. package/build-types/h-stack/hook.d.ts.map +1 -1
  612. package/build-types/heading/component.d.ts +3 -3
  613. package/build-types/heading/component.d.ts.map +1 -1
  614. package/build-types/heading/hook.d.ts +2 -1
  615. package/build-types/heading/hook.d.ts.map +1 -1
  616. package/build-types/heading/stories/index.d.ts +12 -0
  617. package/build-types/heading/stories/index.d.ts.map +1 -0
  618. package/build-types/input-control/index.d.ts +3 -3
  619. package/build-types/input-control/index.d.ts.map +1 -1
  620. package/build-types/input-control/input-base.d.ts +2 -2
  621. package/build-types/input-control/input-base.d.ts.map +1 -1
  622. package/build-types/input-control/input-field.d.ts +1 -3
  623. package/build-types/input-control/input-field.d.ts.map +1 -1
  624. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  625. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  626. package/build-types/input-control/types.d.ts +1 -1
  627. package/build-types/input-control/types.d.ts.map +1 -1
  628. package/build-types/item-group/item/hook.d.ts +2 -1
  629. package/build-types/item-group/item/hook.d.ts.map +1 -1
  630. package/build-types/item-group/item-group/hook.d.ts +2 -1
  631. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  632. package/build-types/navigator/index.d.ts +2 -0
  633. package/build-types/navigator/index.d.ts.map +1 -1
  634. package/build-types/navigator/navigator-back-button/component.d.ts +38 -0
  635. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -0
  636. package/build-types/navigator/navigator-back-button/hook.d.ts +283 -0
  637. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -0
  638. package/build-types/navigator/navigator-back-button/index.d.ts +2 -0
  639. package/build-types/navigator/navigator-back-button/index.d.ts.map +1 -0
  640. package/build-types/navigator/navigator-button/component.d.ts +37 -0
  641. package/build-types/navigator/navigator-button/component.d.ts.map +1 -0
  642. package/build-types/navigator/navigator-button/hook.d.ts +283 -0
  643. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -0
  644. package/build-types/navigator/navigator-button/index.d.ts +2 -0
  645. package/build-types/navigator/navigator-button/index.d.ts.map +1 -0
  646. package/build-types/navigator/navigator-provider/component.d.ts +10 -20
  647. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  648. package/build-types/navigator/navigator-screen/component.d.ts +10 -20
  649. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  650. package/build-types/navigator/types.d.ts +21 -0
  651. package/build-types/navigator/types.d.ts.map +1 -1
  652. package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
  653. package/build-types/resizable-box/index.d.ts +2 -2
  654. package/build-types/resizable-box/index.d.ts.map +1 -1
  655. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  656. package/build-types/scrollable/hook.d.ts +2 -1
  657. package/build-types/scrollable/hook.d.ts.map +1 -1
  658. package/build-types/select-control/index.d.ts +1 -3
  659. package/build-types/select-control/index.d.ts.map +1 -1
  660. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  661. package/build-types/spacer/hook.d.ts +2 -1
  662. package/build-types/spacer/hook.d.ts.map +1 -1
  663. package/build-types/surface/hook.d.ts +2 -1
  664. package/build-types/surface/hook.d.ts.map +1 -1
  665. package/build-types/text/hook.d.ts +2 -1
  666. package/build-types/text/hook.d.ts.map +1 -1
  667. package/build-types/text/types.d.ts +1 -2
  668. package/build-types/text/types.d.ts.map +1 -1
  669. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  670. package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts +0 -4
  671. package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
  672. package/build-types/tools-panel/tools-panel/hook.d.ts +2 -1
  673. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  674. package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -1
  675. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  676. package/build-types/tools-panel/tools-panel-item/hook.d.ts +2 -1
  677. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  678. package/build-types/truncate/hook.d.ts +2 -1
  679. package/build-types/truncate/hook.d.ts.map +1 -1
  680. package/build-types/ui/context/context-connect.d.ts +18 -16
  681. package/build-types/ui/context/context-connect.d.ts.map +1 -1
  682. package/build-types/ui/context/index.d.ts +4 -4
  683. package/build-types/ui/context/index.d.ts.map +1 -1
  684. package/build-types/ui/context/wordpress-component.d.ts +3 -6
  685. package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
  686. package/build-types/ui/control-group/hook.d.ts +2 -1
  687. package/build-types/ui/control-group/hook.d.ts.map +1 -1
  688. package/build-types/ui/control-label/hook.d.ts +2 -1
  689. package/build-types/ui/control-label/hook.d.ts.map +1 -1
  690. package/build-types/ui/form-group/use-form-group.d.ts +6 -4
  691. package/build-types/ui/form-group/use-form-group.d.ts.map +1 -1
  692. package/build-types/unit-control/index.d.ts +3 -5
  693. package/build-types/unit-control/index.d.ts.map +1 -1
  694. package/build-types/unit-control/types.d.ts +4 -6
  695. package/build-types/unit-control/types.d.ts.map +1 -1
  696. package/build-types/unit-control/utils.d.ts +47 -38
  697. package/build-types/unit-control/utils.d.ts.map +1 -1
  698. package/build-types/v-stack/hook.d.ts +2 -1
  699. package/build-types/v-stack/hook.d.ts.map +1 -1
  700. package/build-types/z-stack/component.d.ts.map +1 -1
  701. package/package.json +19 -18
  702. package/src/alignment-matrix-control/README.md +4 -0
  703. package/src/alignment-matrix-control/stories/index.js +1 -1
  704. package/src/alignment-matrix-control/utils.js +1 -1
  705. package/src/angle-picker-control/angle-circle.js +1 -1
  706. package/src/animation/index.js +0 -1
  707. package/src/autocomplete/get-default-use-items.js +3 -3
  708. package/src/base-control/stories/index.js +65 -22
  709. package/src/base-field/hook.js +1 -1
  710. package/src/box-control/icon.js +1 -1
  711. package/src/box-control/index.js +5 -5
  712. package/src/box-control/stories/index.js +4 -1
  713. package/src/box-control/test/index.js +27 -7
  714. package/src/box-control/unit-control.js +1 -1
  715. package/src/box-control/utils.js +13 -9
  716. package/src/button/index.js +5 -5
  717. package/src/button/index.native.js +7 -7
  718. package/src/button/style.scss +1 -0
  719. package/src/card/card/component.js +1 -1
  720. package/src/card/card-body/component.js +1 -1
  721. package/src/card/card-divider/component.js +1 -1
  722. package/src/card/card-footer/component.js +1 -1
  723. package/src/card/card-header/component.js +1 -1
  724. package/src/card/card-media/component.js +1 -1
  725. package/src/color-palette/index.native.js +92 -75
  726. package/src/color-palette/style.native.scss +10 -5
  727. package/src/color-palette/style.scss +1 -0
  728. package/src/color-picker/color-display.tsx +1 -1
  729. package/src/color-picker/component.tsx +2 -2
  730. package/src/color-picker/hex-input.tsx +9 -9
  731. package/src/color-picker/styles.ts +1 -1
  732. package/src/color-picker/test/index.js +1 -1
  733. package/src/combobox-control/index.js +1 -1
  734. package/src/combobox-control/style.scss +1 -0
  735. package/src/confirm-dialog/README.md +56 -45
  736. package/src/confirm-dialog/component.tsx +6 -4
  737. package/src/confirm-dialog/stories/index.js +19 -0
  738. package/src/confirm-dialog/test/index.js +28 -0
  739. package/src/confirm-dialog/types.ts +2 -0
  740. package/src/date-time/style.scss +4 -0
  741. package/src/date-time/time.js +16 -5
  742. package/src/dimension-control/test/index.test.js +1 -1
  743. package/src/disabled/test/index.js +1 -1
  744. package/src/divider/component.tsx +5 -5
  745. package/src/divider/stories/index.tsx +70 -0
  746. package/src/divider/types.ts +3 -1
  747. package/src/draggable/index.js +3 -3
  748. package/src/draggable/stories/index.js +1 -1
  749. package/src/elevation/component.js +1 -1
  750. package/src/flex/flex/component.js +1 -1
  751. package/src/flex/flex-block/component.js +1 -1
  752. package/src/flex/flex-item/component.js +1 -1
  753. package/src/flyout/flyout/README.md +1 -1
  754. package/src/flyout/flyout/component.js +1 -1
  755. package/src/flyout/flyout-content/component.js +1 -1
  756. package/src/flyout/test/index.js +1 -1
  757. package/src/focal-point-picker/README.md +7 -0
  758. package/src/focal-point-picker/index.js +12 -7
  759. package/src/focal-point-picker/index.native.js +7 -7
  760. package/src/focal-point-picker/stories/index.js +30 -0
  761. package/src/focal-point-picker/test/index.js +44 -0
  762. package/src/focal-point-picker/tooltip/index.native.js +1 -1
  763. package/src/font-size-picker/README.md +1 -2
  764. package/src/font-size-picker/index.js +1 -2
  765. package/src/font-size-picker/stories/index.js +87 -108
  766. package/src/font-size-picker/test/index.js +0 -2
  767. package/src/form-file-upload/README.md +1 -1
  768. package/src/form-file-upload/stories/index.js +51 -0
  769. package/src/form-token-field/index.js +6 -6
  770. package/src/form-token-field/style.scss +1 -0
  771. package/src/form-token-field/suggestions-list.js +2 -2
  772. package/src/form-token-field/test/index.js +6 -6
  773. package/src/grid/component.js +1 -1
  774. package/src/h-stack/component.js +1 -1
  775. package/src/heading/component.tsx +6 -6
  776. package/src/heading/hook.ts +1 -1
  777. package/src/heading/stories/index.tsx +37 -0
  778. package/src/higher-order/with-filters/test/index.js +1 -1
  779. package/src/higher-order/with-focus-outside/test/index.js +1 -1
  780. package/src/higher-order/with-notices/index.js +1 -1
  781. package/src/higher-order/with-notices/test/index.js +3 -3
  782. package/src/index.js +6 -4
  783. package/src/index.native.js +9 -5
  784. package/src/input-control/index.tsx +2 -2
  785. package/src/input-control/input-base.tsx +3 -3
  786. package/src/input-control/input-field.tsx +16 -15
  787. package/src/input-control/reducer/reducer.ts +3 -0
  788. package/src/input-control/stories/index.js +1 -1
  789. package/src/input-control/styles/input-control-styles.tsx +1 -0
  790. package/src/input-control/test/index.js +4 -4
  791. package/src/input-control/types.ts +1 -1
  792. package/src/isolated-event-container/index.js +1 -1
  793. package/src/item-group/item/component.tsx +2 -2
  794. package/src/item-group/item-group/component.tsx +2 -2
  795. package/src/item-group/test/index.js +0 -1
  796. package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  797. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  798. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +10 -1
  799. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  800. package/src/mobile/bottom-sheet/index.native.js +11 -11
  801. package/src/mobile/bottom-sheet/link-cell.native.js +1 -1
  802. package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  803. package/src/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  804. package/src/mobile/color-settings/palette.screen.native.js +39 -9
  805. package/src/mobile/color-settings/style.native.scss +4 -0
  806. package/src/mobile/global-styles-context/test/fixtures/theme.native.js +27 -0
  807. package/src/mobile/global-styles-context/test/utils.native.js +2 -2
  808. package/src/mobile/global-styles-context/utils.native.js +85 -16
  809. package/src/mobile/gradient/index.native.js +2 -2
  810. package/src/mobile/html-text-input/container.ios.js +3 -3
  811. package/src/mobile/html-text-input/index.native.js +1 -1
  812. package/src/mobile/html-text-input/test/index.native.js +14 -14
  813. package/src/mobile/image/index.native.js +1 -1
  814. package/src/mobile/image/style.native.scss +1 -0
  815. package/src/mobile/inserter-button/index.native.js +1 -2
  816. package/src/mobile/inserter-button/sparkles.js +15 -0
  817. package/src/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  818. package/src/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  819. package/src/mobile/link-picker/index.native.js +3 -3
  820. package/src/mobile/link-picker/link-picker-results.native.js +8 -8
  821. package/src/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  822. package/src/mobile/link-settings/index.native.js +1 -2
  823. package/src/mobile/link-settings/test/edit.native.js +15 -15
  824. package/src/modal/aria-helper.js +1 -1
  825. package/src/modal/index.js +2 -2
  826. package/src/navigable-container/container.js +2 -2
  827. package/src/navigable-container/tabbable.js +1 -1
  828. package/src/navigable-container/test/menu.js +5 -5
  829. package/src/navigable-container/test/tabbable.js +2 -2
  830. package/src/navigation/item/index.js +1 -1
  831. package/src/navigation/menu/index.js +1 -1
  832. package/src/navigation/stories/controlled-state.js +2 -2
  833. package/src/navigation/stories/index.js +1 -1
  834. package/src/navigator/index.ts +2 -0
  835. package/src/navigator/navigator-back-button/README.md +31 -0
  836. package/src/navigator/navigator-back-button/component.tsx +62 -0
  837. package/src/navigator/navigator-back-button/hook.ts +40 -0
  838. package/src/navigator/navigator-back-button/index.ts +1 -0
  839. package/src/navigator/navigator-button/README.md +38 -0
  840. package/src/navigator/navigator-button/component.tsx +61 -0
  841. package/src/navigator/navigator-button/hook.ts +55 -0
  842. package/src/navigator/navigator-button/index.ts +1 -0
  843. package/src/navigator/navigator-provider/README.md +20 -33
  844. package/src/navigator/navigator-provider/component.tsx +13 -23
  845. package/src/navigator/navigator-screen/README.md +1 -1
  846. package/src/navigator/navigator-screen/component.tsx +16 -25
  847. package/src/navigator/stories/index.js +24 -37
  848. package/src/navigator/test/index.js +105 -51
  849. package/src/navigator/types.ts +27 -1
  850. package/src/number-control/index.js +1 -1
  851. package/src/number-control/stories/index.js +1 -1
  852. package/src/panel/body.js +2 -2
  853. package/src/popover/index.js +3 -3
  854. package/src/popover/utils.js +6 -6
  855. package/src/radio/stories/index.js +1 -1
  856. package/src/radio-group/index.js +1 -1
  857. package/src/radio-group/stories/index.js +4 -1
  858. package/src/range-control/stories/index.js +1 -1
  859. package/src/range-control/styles/range-control-styles.js +1 -1
  860. package/src/range-control/test/index.js +2 -2
  861. package/src/resizable-box/index.tsx +2 -2
  862. package/src/resizable-box/resize-tooltip/index.tsx +2 -2
  863. package/src/resizable-box/resize-tooltip/label.tsx +2 -2
  864. package/src/sandbox/index.js +5 -5
  865. package/src/sandbox/index.native.js +1 -1
  866. package/src/scrollable/component.js +1 -1
  867. package/src/select-control/index.tsx +3 -4
  868. package/src/select-control/styles/select-control-styles.ts +1 -0
  869. package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  870. package/src/slot-fill/bubbles-virtually/slot.js +1 -2
  871. package/src/slot-fill/fill.js +1 -1
  872. package/src/slot-fill/provider.js +1 -1
  873. package/src/snackbar/index.js +1 -1
  874. package/src/snackbar/list.js +1 -1
  875. package/src/spacer/component.tsx +2 -2
  876. package/src/style-provider/index.js +2 -2
  877. package/src/surface/component.js +1 -1
  878. package/src/tab-panel/test/index.js +1 -1
  879. package/src/text/component.js +1 -1
  880. package/src/text/test/index.js +2 -2
  881. package/src/text/types.ts +6 -8
  882. package/src/text-control/index.js +2 -2
  883. package/src/text-highlight/test/index.js +4 -4
  884. package/src/toggle-control/test/index.js +3 -3
  885. package/src/toggle-group-control/stories/index.js +1 -1
  886. package/src/toggle-group-control/test/__snapshots__/index.js.snap +1 -27
  887. package/src/toggle-group-control/toggle-group-control/component.tsx +4 -4
  888. package/src/toggle-group-control/toggle-group-control-option/component.tsx +3 -6
  889. package/src/toggle-group-control/toggle-group-control-option/styles.ts +1 -12
  890. package/src/toolbar/index.js +1 -1
  891. package/src/toolbar-group/test/index.js +2 -2
  892. package/src/tools-panel/stories/index.js +0 -1
  893. package/src/tools-panel/tools-panel/component.tsx +2 -2
  894. package/src/tools-panel/tools-panel-header/component.tsx +2 -2
  895. package/src/tools-panel/tools-panel-item/component.tsx +2 -2
  896. package/src/tooltip/index.js +3 -3
  897. package/src/tooltip/index.native.js +7 -7
  898. package/src/tooltip/test/index.js +2 -2
  899. package/src/tooltip/test/index.native.js +2 -2
  900. package/src/tree-grid/README.md +24 -1
  901. package/src/tree-grid/index.js +70 -7
  902. package/src/tree-grid/stories/index.js +4 -1
  903. package/src/tree-grid/test/__snapshots__/index.js.snap +1 -14
  904. package/src/tree-grid/test/index.js +303 -8
  905. package/src/truncate/component.js +1 -1
  906. package/src/truncate/utils.js +1 -1
  907. package/src/ui/context/{context-connect.js → context-connect.ts} +27 -16
  908. package/src/ui/context/context-system-provider.js +2 -2
  909. package/src/ui/context/{index.js → index.ts} +0 -0
  910. package/src/ui/context/wordpress-component.ts +3 -2
  911. package/src/ui/control-group/component.js +1 -1
  912. package/src/ui/control-label/component.js +1 -1
  913. package/src/ui/form-group/form-group.js +1 -1
  914. package/src/ui/shortcut/component.tsx +2 -2
  915. package/src/ui/spinner/component.js +1 -1
  916. package/src/ui/tooltip/component.js +1 -1
  917. package/src/ui/tooltip/content.js +1 -1
  918. package/src/ui/tooltip/test/index.js +4 -4
  919. package/src/ui/utils/colors.js +2 -2
  920. package/src/ui/utils/space.ts +2 -2
  921. package/src/unit-control/README.md +1 -1
  922. package/src/unit-control/index.native.js +5 -3
  923. package/src/unit-control/index.tsx +66 -37
  924. package/src/unit-control/stories/index.js +1 -1
  925. package/src/unit-control/test/index.js +102 -3
  926. package/src/unit-control/test/utils.js +56 -15
  927. package/src/unit-control/types.ts +5 -8
  928. package/src/unit-control/unit-select-control.tsx +1 -1
  929. package/src/unit-control/utils.ts +128 -125
  930. package/src/utils/breakpoint-values.js +1 -1
  931. package/src/utils/colors-values.js +1 -1
  932. package/src/utils/hooks/test/use-controlled-state.js +1 -1
  933. package/src/utils/hooks/test/use-controlled-value.js +3 -3
  934. package/src/utils/hooks/test/use-latest-ref.js +1 -1
  935. package/src/utils/test/math.js +2 -2
  936. package/src/utils/test/rtl.js +12 -12
  937. package/src/v-stack/component.js +1 -1
  938. package/src/visually-hidden/component.js +1 -1
  939. package/src/z-stack/component.tsx +2 -2
  940. package/tsconfig.json +1 -1
  941. package/tsconfig.tsbuildinfo +1 -1
  942. package/src/divider/stories/index.js +0 -64
  943. package/src/heading/stories/index.js +0 -24
  944. package/src/tools-panel/stories/typography-panel.js +0 -215
@@ -0,0 +1,15 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { SVG, Path } from '@wordpress/primitives';
5
+
6
+ const sparkles = (
7
+ <SVG viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
8
+ <Path
9
+ d="M10 11c-1.588-.479-4-.91-4-.91s2-.241 4-.454c1.8-.191 3.365-.502 4-3.181C14.635 3.775 15 1 15 1s.365 2.775 1 5.455c.635 2.679 2 2.969 4 3.181 2 .213 4 .455 4 .455s-2.412.43-4 .909c-1.588.479-3 1-4 4.546-.746 2.643-.893 4.948-1 5.454-.107-.506-.167-2.5-1-5.454C13 12 11.588 11.479 10 11zM7.333 3.5C6.803 3.333 6 3.182 6 3.182s.667-.085 1.333-.16c.6-.066 1.122-.175 1.334-1.113C8.878.971 9 0 9 0s.122.971.333 1.91c.212.937.667 1.038 1.334 1.113.666.074 1.333.159 1.333.159s-.804.15-1.333.318c-.53.167-1 .35-1.334 1.59C9.085 6.017 9.036 6.824 9 7c-.036-.177-.056-.875-.333-1.91-.334-1.24-.804-1.423-1.334-1.59zM2.444 18C1.474 17.713 0 17.454 0 17.454s1.222-.145 2.444-.272c1.1-.115 2.057-.302 2.445-1.91C5.277 13.666 5.5 12 5.5 12s.223 1.665.611 3.273c.388 1.607 1.222 1.781 2.445 1.909 1.222.127 2.444.273 2.444.273s-1.474.258-2.444.545c-.971.287-1.834.6-2.445 2.727-.456 1.586-.546 2.97-.611 3.273-.065-.304-.102-1.5-.611-3.273C4.278 18.6 3.415 18.287 2.444 18z"
10
+ fill="#F0C930"
11
+ />
12
+ </SVG>
13
+ );
14
+
15
+ export default sparkles;
@@ -15,7 +15,7 @@ export const KeyboardAwareFlatList = ( props ) => (
15
15
  );
16
16
 
17
17
  KeyboardAwareFlatList.handleCaretVerticalPositionChange = () => {
18
- //no need to handle on Android, it is system managed
18
+ // no need to handle on Android, it is system managed
19
19
  };
20
20
 
21
21
  export default KeyboardAwareFlatList;
@@ -44,7 +44,7 @@ export const KeyboardAwareFlatList = ( {
44
44
  this.latestContentOffsetY !== undefined &&
45
45
  ! shouldPreventAutomaticScroll()
46
46
  ) {
47
- // Reset the content position if keyboard is still closed
47
+ // Reset the content position if keyboard is still closed.
48
48
  if ( this.scrollViewRef ) {
49
49
  this.scrollViewRef.scrollToPosition(
50
50
  0,
@@ -74,7 +74,7 @@ KeyboardAwareFlatList.handleCaretVerticalPositionChange = (
74
74
  previousCaretY
75
75
  ) => {
76
76
  if ( previousCaretY ) {
77
- //if this is not the first tap
77
+ // If this is not the first tap.
78
78
  scrollView.refreshScrollForField( targetId );
79
79
  }
80
80
  };
@@ -22,7 +22,7 @@ import LinkPickerResults from './link-picker-results';
22
22
  import NavBar from '../bottom-sheet/nav-bar';
23
23
  import styles from './styles.scss';
24
24
 
25
- // this creates a search suggestion for adding a url directly
25
+ // This creates a search suggestion for adding a url directly.
26
26
  export const createDirectEntry = ( value ) => {
27
27
  let type = 'URL';
28
28
 
@@ -64,8 +64,8 @@ export const LinkPicker = ( {
64
64
  } );
65
65
  const directEntry = createDirectEntry( value );
66
66
 
67
- // the title of a direct entry is displayed as the raw input value, but if we
68
- // are replacing empty text, we want to use the generated url
67
+ // The title of a direct entry is displayed as the raw input value, but if we
68
+ // are replacing empty text, we want to use the generated url.
69
69
  const pickLink = ( { title, url, isDirectEntry } ) => {
70
70
  onLinkPicked( { title: isDirectEntry ? url : title, url } );
71
71
  };
@@ -34,7 +34,7 @@ export default function LinkPickerResults( {
34
34
  pendingRequest.current = null;
35
35
  };
36
36
 
37
- // a stable debounced function to fetch suggestions and append
37
+ // A stable debounced function to fetch suggestions and append.
38
38
  const { fetchMoreSuggestions } = useSelect( ( select ) => {
39
39
  const { getSettings } = select( 'core/block-editor' );
40
40
  const fetchLinkSuggestions = async ( { search } ) => {
@@ -49,8 +49,8 @@ export default function LinkPickerResults( {
49
49
  query: search,
50
50
  links: currentSuggestions,
51
51
  } ) => {
52
- // return early if we've already detected the end of data or we are
53
- // already awaiting a response
52
+ // Return early if we've already detected the end of data or we are
53
+ // already awaiting a response.
54
54
  if ( hasAllSuggestions || pendingRequest.current ) {
55
55
  return;
56
56
  }
@@ -58,10 +58,10 @@ export default function LinkPickerResults( {
58
58
  pendingRequest.current = request;
59
59
  const suggestions = await request;
60
60
 
61
- // only update links for the most recent request
61
+ // Only update links for the most recent request.
62
62
  if ( suggestions && request === pendingRequest.current ) {
63
- // since we don't have the response header, we check if the results
64
- // are truncated to determine we've reached the end
63
+ // Since we don't have the response header, we check if the results
64
+ // are truncated to determine we've reached the end.
65
65
  if ( suggestions.length < PER_PAGE ) {
66
66
  setHasAllSuggestions( true );
67
67
  }
@@ -76,10 +76,10 @@ export default function LinkPickerResults( {
76
76
  };
77
77
  }, [] );
78
78
 
79
- // prevent setting state when unmounted
79
+ // Prevent setting state when unmounted.
80
80
  useEffect( () => clearRequest, [] );
81
81
 
82
- // any time the query changes, we reset pagination
82
+ // Any time the query changes, we reset pagination.
83
83
  useEffect( () => {
84
84
  clearRequest();
85
85
  nextPage.current = 1;
@@ -86,9 +86,9 @@ function ImageLinkDestinationsScreen( props ) {
86
86
  navigation.navigate( blockSettingsScreens.settings, {
87
87
  // The `inputValue` name is reused from LinkPicker, as it helps avoid
88
88
  // bugs from stale values remaining in the React Navigation route
89
- // parameters
89
+ // parameters.
90
90
  inputValue: newUrl,
91
- // Clear link text value that may be set from LinkPicker
91
+ // Clear link text value that may be set from LinkPicker.
92
92
  text: '',
93
93
  } );
94
94
  };
@@ -33,7 +33,6 @@ import LinkRelIcon from './link-rel';
33
33
  import styles from './style.scss';
34
34
 
35
35
  const NEW_TAB_REL = 'noreferrer noopener';
36
-
37
36
  function LinkSettings( {
38
37
  // Control link settings `BottomSheet` visibility
39
38
  isVisible,
@@ -222,7 +221,7 @@ function LinkSettings( {
222
221
  if ( ! clipboardText ) {
223
222
  return;
224
223
  }
225
- // Check if pasted text is URL
224
+ // Check if pasted text is URL.
226
225
  if ( ! isURL( clipboardText ) ) {
227
226
  return;
228
227
  }
@@ -70,12 +70,12 @@ describe.each( [
70
70
  * WHEN the USER selects the SETTINGS BUTTON on the EDIT IMAGE BLOCK or EDIT BUTTON BLOCK;
71
71
  */
72
72
  it( 'should display the LINK SETTINGS with an EMPTY LINK TO field.', async () => {
73
- // Arrange
73
+ // Arrange.
74
74
  const url = 'https://tonytahmouchtest.files.wordpress.com';
75
75
  const subject = await initializeEditor( { initialHtml } );
76
76
  Clipboard.getString.mockReturnValue( url );
77
77
 
78
- // Act
78
+ // Act.
79
79
  const block = await waitFor( () =>
80
80
  subject.getByA11yLabel(
81
81
  type === 'core/image' ? /Image Block/ : /Button Block/
@@ -87,7 +87,7 @@ describe.each( [
87
87
  await waitFor( () => subject.getByA11yLabel( 'Open Settings' ) )
88
88
  );
89
89
 
90
- // Assert
90
+ // Assert.
91
91
  const linkToField = await waitFor( () =>
92
92
  subject.getByA11yLabel(
93
93
  `Link to, ${
@@ -107,12 +107,12 @@ describe.each( [
107
107
  * WHEN the USER selects the LINK TO cell;
108
108
  */
109
109
  it( 'should display the LINK PICKER with NO FROM CLIPBOARD CELL.', async () => {
110
- // Arrange
110
+ // Arrange.
111
111
  const url = 'tonytahmouchtest.files.wordpress.com';
112
112
  const subject = await initializeEditor( { initialHtml } );
113
113
  Clipboard.getString.mockReturnValue( url );
114
114
 
115
- // Act
115
+ // Act.
116
116
  const block = await waitFor( () =>
117
117
  subject.getByA11yLabel(
118
118
  type === 'core/image' ? /Image Block/ : /Button Block/
@@ -145,7 +145,7 @@ describe.each( [
145
145
  }
146
146
  await waitFor( () => subject.getByA11yLabel( 'Apply' ) );
147
147
 
148
- // Assert
148
+ // Assert.
149
149
  expect(
150
150
  subject.queryByA11yLabel( /Copy URL from the clipboard[,]/ )
151
151
  ).toBeNull();
@@ -160,12 +160,12 @@ describe.each( [
160
160
  * WHEN the USER selects the LINK TO cell;
161
161
  */
162
162
  it( 'should display the LINK PICKER with NO FROM CLIPBOARD CELL.', async () => {
163
- // Arrange
163
+ // Arrange.
164
164
  const url = 'https://tonytahmouchtest.files.wordpress.com';
165
165
  const subject = await initializeEditor( { initialHtml } );
166
166
  Clipboard.getString.mockReturnValue( url );
167
167
 
168
- // Act
168
+ // Act.
169
169
  const block = await waitFor( () =>
170
170
  subject.getByA11yLabel(
171
171
  type === 'core/image' ? /Image Block/ : /Button Block/
@@ -221,7 +221,7 @@ describe.each( [
221
221
  }
222
222
  await waitFor( () => subject.getByA11yLabel( 'Apply' ) );
223
223
 
224
- // Assert
224
+ // Assert.
225
225
  expect(
226
226
  subject.queryByA11yLabel( /Copy URL from the clipboard[,]/ )
227
227
  ).toBeNull();
@@ -239,12 +239,12 @@ describe.each( [
239
239
  'should display the LINK PICKER with the FROM CLIPBOARD CELL populated' +
240
240
  ' with the URL from the CLIPBOARD.',
241
241
  async () => {
242
- // Arrange
242
+ // Arrange.
243
243
  const url = 'https://tonytahmouchtest.files.wordpress.com';
244
244
  const subject = await initializeEditor( { initialHtml } );
245
245
  Clipboard.getString.mockReturnValue( url );
246
246
 
247
- // Act
247
+ // Act.
248
248
  const block = await waitFor( () =>
249
249
  subject.getByA11yLabel(
250
250
  type === 'core/image'
@@ -283,7 +283,7 @@ describe.each( [
283
283
  )
284
284
  );
285
285
 
286
- // Assert
286
+ // Assert.
287
287
  const clipboardUrl = await waitFor( () =>
288
288
  subject.getByText( url )
289
289
  );
@@ -306,12 +306,12 @@ describe.each( [
306
306
  'should display the LINK SETTINGS with the URL from the CLIPBOARD' +
307
307
  ' populated in the LINK TO field.',
308
308
  async () => {
309
- // Arrange
309
+ // Arrange.
310
310
  const url = 'https://tonytahmouchtest.files.wordpress.com';
311
311
  const subject = await initializeEditor( { initialHtml } );
312
312
  Clipboard.getString.mockReturnValue( url );
313
313
 
314
- // Act
314
+ // Act.
315
315
  const block = await waitFor( () =>
316
316
  subject.getByA11yLabel(
317
317
  type === 'core/image'
@@ -352,7 +352,7 @@ describe.each( [
352
352
  )
353
353
  );
354
354
 
355
- // Assert
355
+ // Assert.
356
356
  const linkToField = await waitFor( () =>
357
357
  subject.getByA11yLabel(
358
358
  `Link to, ${
@@ -1,4 +1,4 @@
1
- //@ts-nocheck
1
+ // @ts-nocheck
2
2
 
3
3
  /**
4
4
  * External dependencies
@@ -1,4 +1,4 @@
1
- //@ts-nocheck
1
+ // @ts-nocheck
2
2
 
3
3
  /**
4
4
  * External dependencies
@@ -45,7 +45,7 @@ function Modal( props, forwardedRef ) {
45
45
  shouldCloseOnEsc = true,
46
46
  shouldCloseOnClickOutside = true,
47
47
  isDismissible = true,
48
- /* accessibility */
48
+ /* Accessibility. */
49
49
  aria = {
50
50
  labelledby: null,
51
51
  describedby: null,
@@ -93,9 +93,9 @@ class NavigableContainer extends Component {
93
93
 
94
94
  const offset = eventToOffset( event );
95
95
 
96
- // eventToOffset returns undefined if the event is not handled by the component
96
+ // eventToOffset returns undefined if the event is not handled by the component.
97
97
  if ( offset !== undefined && stopNavigationEvents ) {
98
- // Prevents arrow key handlers bound to the document directly interfering
98
+ // Prevents arrow key handlers bound to the document directly interfering.
99
99
  event.stopImmediatePropagation();
100
100
 
101
101
  // When navigating a collection of items, prevent scroll containers
@@ -27,7 +27,7 @@ export function TabbableContainer( { eventToOffset, ...props }, ref ) {
27
27
  // - +1: move focus forward
28
28
  // - -1: move focus backward
29
29
  // - 0: don't move focus, but acknowledge event and thus stop it
30
- // - undefined: do nothing, let the event propagate
30
+ // - undefined: do nothing, let the event propagate.
31
31
  if ( eventToOffset ) {
32
32
  return eventToOffset( evt );
33
33
  }
@@ -75,7 +75,7 @@ describe( 'NavigableMenu', () => {
75
75
 
76
76
  container.querySelector( '#btn1' ).focus();
77
77
 
78
- // Navigate options
78
+ // Navigate options.
79
79
  function assertKeyDown( keyCode, expectedActiveIndex, expectedStop ) {
80
80
  const interaction = fireKeyDown(
81
81
  getByRole( 'menu' ),
@@ -129,7 +129,7 @@ describe( 'NavigableMenu', () => {
129
129
 
130
130
  container.querySelector( '#btn1' ).focus();
131
131
 
132
- // Navigate options
132
+ // Navigate options.
133
133
  function assertKeyDown( keyCode, expectedActiveIndex, expectedStop ) {
134
134
  const interaction = fireKeyDown(
135
135
  getByRole( 'menu' ),
@@ -185,7 +185,7 @@ describe( 'NavigableMenu', () => {
185
185
 
186
186
  container.querySelector( '#btn1' ).focus();
187
187
 
188
- // Navigate options
188
+ // Navigate options.
189
189
  function assertKeyDown( keyCode, expectedActiveIndex, expectedStop ) {
190
190
  const interaction = fireKeyDown(
191
191
  getByRole( 'menu' ),
@@ -239,7 +239,7 @@ describe( 'NavigableMenu', () => {
239
239
 
240
240
  container.querySelector( '#btn1' ).focus();
241
241
 
242
- // Navigate options
242
+ // Navigate options.
243
243
  function assertKeyDown( keyCode, expectedActiveIndex, expectedStop ) {
244
244
  const interaction = fireKeyDown(
245
245
  getByRole( 'menu' ),
@@ -284,7 +284,7 @@ describe( 'NavigableMenu', () => {
284
284
 
285
285
  container.querySelector( '#btn1' ).focus();
286
286
 
287
- // Navigate options
287
+ // Navigate options.
288
288
  function assertKeyDown( keyCode, expectedActiveIndex, expectedStop ) {
289
289
  const interaction = fireKeyDown( getByRole( 'menu' ), keyCode );
290
290
  expect( currentIndex ).toBe( expectedActiveIndex );
@@ -75,7 +75,7 @@ describe( 'TabbableContainer', () => {
75
75
 
76
76
  container.querySelector( '#section1' ).focus();
77
77
 
78
- // Navigate options
78
+ // Navigate options.
79
79
  function assertKeyDown(
80
80
  keyCode,
81
81
  shiftKey,
@@ -132,7 +132,7 @@ describe( 'TabbableContainer', () => {
132
132
 
133
133
  container.querySelector( '#section1' ).focus();
134
134
 
135
- // Navigate options
135
+ // Navigate options.
136
136
  function assertKeyDown(
137
137
  keyCode,
138
138
  shiftKey,
@@ -43,7 +43,7 @@ export default function NavigationItem( props ) {
43
43
 
44
44
  // If hideIfTargetMenuEmpty prop is true
45
45
  // And the menu we are supposed to navigate to
46
- // Is marked as empty, then we skip rendering the item
46
+ // Is marked as empty, then we skip rendering the item.
47
47
  if (
48
48
  hideIfTargetMenuEmpty &&
49
49
  navigateToMenu &&
@@ -45,7 +45,7 @@ export default function NavigationMenu( props ) {
45
45
  search: uncontrolledSearch,
46
46
  };
47
47
 
48
- // Keep the children rendered to make sure invisible items are included in the navigation tree
48
+ // Keep the children rendered to make sure invisible items are included in the navigation tree.
49
49
  if ( activeMenu !== menu ) {
50
50
  return (
51
51
  <NavigationMenuContext.Provider value={ context }>
@@ -15,11 +15,11 @@ export function ControlledStateStory() {
15
15
  const [ activeItem, setActiveItem ] = useState( 'item-1' );
16
16
  const [ activeMenu, setActiveMenu ] = useState( 'root' );
17
17
 
18
- // Mock navigation link
18
+ // Mock navigation link.
19
19
  const MockLink = ( { href, children } ) => (
20
20
  <Button
21
21
  href={ href }
22
- // Since we're not actually navigating pages, simulate it with on onClick
22
+ // Since we're not actually navigating pages, simulate it with on onClick.
23
23
  onClick={ ( event ) => {
24
24
  event.preventDefault();
25
25
  const item = href.replace( 'https://example.com/', '' );
@@ -15,7 +15,7 @@ import { HideIfEmptyStory } from './hide-if-empty';
15
15
  import './style.css';
16
16
 
17
17
  export default {
18
- title: 'Components/Navigation',
18
+ title: 'Components (Experimental)/Navigation',
19
19
  component: Navigation,
20
20
  subcomponents: {
21
21
  NavigationBackButton,
@@ -1,3 +1,5 @@
1
1
  export { default as NavigatorProvider } from './navigator-provider';
2
2
  export { default as NavigatorScreen } from './navigator-screen';
3
+ export { default as NavigatorButton } from './navigator-button';
4
+ export { default as NavigatorBackButton } from './navigator-back-button';
3
5
  export { default as useNavigator } from './use-navigator';
@@ -0,0 +1,31 @@
1
+ # `NavigatorBackButton`
2
+
3
+ <div class="callout callout-alert">
4
+ This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
5
+ </div>
6
+
7
+ The `NavigatorBackButton` component can be used to navigate to a screen and should be used in combination with the [`NavigatorProvider`](/packages/components/src/navigator/navigator-provider/README.md), the [`NavigatorScreen`](/packages/components/src/navigator/navigator-screen/README.md) and the [`NavigatorButton`](/packages/components/src/navigator/navigator-button/README.md) components (or the `useNavigator` hook).
8
+
9
+ ## Usage
10
+
11
+ Refer to [the `NavigatorProvider` component](/packages/components/src/navigator/navigator-provider/README.md#usage) for a usage example.
12
+
13
+ ## Props
14
+
15
+ The component accepts the following props:
16
+
17
+ ### `onClick`: `React.MouseEventHandler< HTMLElement >`
18
+
19
+ The callback called in response to a `click` event.
20
+
21
+ - Required: No
22
+
23
+ ### `path`: `string`
24
+
25
+ The path of the screen to navigate to.
26
+
27
+ - Required: Yes
28
+
29
+ ### Inherited props
30
+
31
+ `NavigatorBackButton` also inherits all of the [`Button` props](/packages/components/src/button/README.md#props), except for `href`.
@@ -0,0 +1,62 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ForwardedRef } from 'react';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import { contextConnect, WordPressComponentProps } from '../../ui/context';
10
+ import { View } from '../../view';
11
+ import { useNavigatorBackButton } from './hook';
12
+ import type { NavigatorBackButtonProps } from '../types';
13
+
14
+ function NavigatorBackButton(
15
+ props: WordPressComponentProps< NavigatorBackButtonProps, 'button' >,
16
+ forwardedRef: ForwardedRef< any >
17
+ ) {
18
+ const navigatorBackButtonProps = useNavigatorBackButton( props );
19
+
20
+ return <View ref={ forwardedRef } { ...navigatorBackButtonProps } />;
21
+ }
22
+
23
+ /**
24
+ * The `NavigatorBackButton` component can be used to navigate to a screen and
25
+ * should be used in combination with the `NavigatorProvider`, the
26
+ * `NavigatorScreen` and the `NavigatorButton` components (or the `useNavigator`
27
+ * hook).
28
+ *
29
+ * @example
30
+ * ```jsx
31
+ * import {
32
+ * __experimentalNavigatorProvider as NavigatorProvider,
33
+ * __experimentalNavigatorScreen as NavigatorScreen,
34
+ * __experimentalNavigatorButton as NavigatorButton,
35
+ * __experimentalNavigatorBackButton as NavigatorBackButton,
36
+ * } from '@wordpress/components';
37
+ *
38
+ * const MyNavigation = () => (
39
+ * <NavigatorProvider initialPath="/">
40
+ * <NavigatorScreen path="/">
41
+ * <p>This is the home screen.</p>
42
+ * <NavigatorButton path="/child">
43
+ * Navigate to child screen.
44
+ * </NavigatorButton>
45
+ * </NavigatorScreen>
46
+ *
47
+ * <NavigatorScreen path="/child">
48
+ * <p>This is the child screen.</p>
49
+ * <NavigatorBackButton>
50
+ * Go back
51
+ * </NavigatorBackButton>
52
+ * </NavigatorScreen>
53
+ * </NavigatorProvider>
54
+ * );
55
+ * ```
56
+ */
57
+ const ConnectedNavigatorBackButton = contextConnect(
58
+ NavigatorBackButton,
59
+ 'NavigatorBackButton'
60
+ );
61
+
62
+ export default ConnectedNavigatorBackButton;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import { useCallback } from '@wordpress/element';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ /**
10
+ * Internal dependencies
11
+ */
12
+ import { useContextSystem, WordPressComponentProps } from '../../ui/context';
13
+ import Button from '../../button';
14
+ import useNavigator from '../use-navigator';
15
+ import type { NavigatorBackButtonProps } from '../types';
16
+
17
+ export function useNavigatorBackButton(
18
+ props: WordPressComponentProps< NavigatorBackButtonProps, 'button' >
19
+ ) {
20
+ const { onClick, as = Button, ...otherProps } = useContextSystem(
21
+ props,
22
+ 'NavigatorBackButton'
23
+ );
24
+
25
+ const { goBack } = useNavigator();
26
+ const handleClick: React.MouseEventHandler< HTMLButtonElement > = useCallback(
27
+ ( e ) => {
28
+ e.preventDefault();
29
+ goBack();
30
+ onClick?.( e );
31
+ },
32
+ [ goBack, onClick ]
33
+ );
34
+
35
+ return {
36
+ as,
37
+ onClick: handleClick,
38
+ ...otherProps,
39
+ };
40
+ }
@@ -0,0 +1 @@
1
+ export { default } from './component';
@@ -0,0 +1,38 @@
1
+ # `NavigatorButton`
2
+
3
+ <div class="callout callout-alert">
4
+ This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
5
+ </div>
6
+
7
+ The `NavigatorButton` component can be used to navigate to a screen and should be used in combination with the [`NavigatorProvider`](/packages/components/src/navigator/navigator-provider/README.md), the [`NavigatorScreen`](/packages/components/src/navigator/navigator-screen/README.md) and the [`NavigatorBackButton`](/packages/components/src/navigator/navigator-back-button/README.md) components (or the `useNavigator` hook).
8
+
9
+ ## Usage
10
+
11
+ Refer to [the `NavigatorProvider` component](/packages/components/src/navigator/navigator-provider/README.md#usage) for a usage example.
12
+
13
+ ## Props
14
+
15
+ The component accepts the following props:
16
+
17
+ ### `attributeName`: `string`
18
+
19
+ The HTML attribute used to identify the `NavigatorButton`, which is used by `Navigator` to restore focus.
20
+
21
+ - Required: No
22
+ - Default: `id`
23
+
24
+ ### `onClick`: `React.MouseEventHandler< HTMLElement >`
25
+
26
+ The callback called in response to a `click` event.
27
+
28
+ - Required: No
29
+
30
+ ### `path`: `string`
31
+
32
+ The path of the screen to navigate to. The value of this prop needs to be [a valid value for an HTML attribute](https://html.spec.whatwg.org/multipage/syntax.html#attributes-2).
33
+
34
+ - Required: Yes
35
+
36
+ ### Inherited props
37
+
38
+ `NavigatorButton` also inherits all of the [`Button` props](/packages/components/src/button/README.md#props), except for `href`.
@@ -0,0 +1,61 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ForwardedRef } from 'react';
5
+
6
+ /**
7
+ * Internal dependencies
8
+ */
9
+ import { contextConnect, WordPressComponentProps } from '../../ui/context';
10
+ import { View } from '../../view';
11
+ import { useNavigatorButton } from './hook';
12
+ import type { NavigatorButtonProps } from '../types';
13
+
14
+ function NavigatorButton(
15
+ props: WordPressComponentProps< NavigatorButtonProps, 'button' >,
16
+ forwardedRef: ForwardedRef< any >
17
+ ) {
18
+ const navigatorButtonProps = useNavigatorButton( props );
19
+
20
+ return <View ref={ forwardedRef } { ...navigatorButtonProps } />;
21
+ }
22
+
23
+ /**
24
+ * The `NavigatorButton` component can be used to navigate to a screen and should
25
+ * be used in combination with the `NavigatorProvider`, the `NavigatorScreen`
26
+ * and the `NavigatorBackButton` components (or the `useNavigator` hook).
27
+ *
28
+ * @example
29
+ * ```jsx
30
+ * import {
31
+ * __experimentalNavigatorProvider as NavigatorProvider,
32
+ * __experimentalNavigatorScreen as NavigatorScreen,
33
+ * __experimentalNavigatorButton as NavigatorButton,
34
+ * __experimentalNavigatorBackButton as NavigatorBackButton,
35
+ * } from '@wordpress/components';
36
+ *
37
+ * const MyNavigation = () => (
38
+ * <NavigatorProvider initialPath="/">
39
+ * <NavigatorScreen path="/">
40
+ * <p>This is the home screen.</p>
41
+ * <NavigatorButton path="/child">
42
+ * Navigate to child screen.
43
+ * </NavigatorButton>
44
+ * </NavigatorScreen>
45
+ *
46
+ * <NavigatorScreen path="/child">
47
+ * <p>This is the child screen.</p>
48
+ * <NavigatorBackButton>
49
+ * Go back
50
+ * </NavigatorBackButton>
51
+ * </NavigatorScreen>
52
+ * </NavigatorProvider>
53
+ * );
54
+ * ```
55
+ */
56
+ const ConnectedNavigatorButton = contextConnect(
57
+ NavigatorButton,
58
+ 'NavigatorButton'
59
+ );
60
+
61
+ export default ConnectedNavigatorButton;