@wordpress/components 25.13.0 → 25.15.1-next.79a6196f.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 (743) hide show
  1. package/CHANGELOG.md +89 -1
  2. package/CONTRIBUTING.md +57 -115
  3. package/LICENSE.md +1 -1
  4. package/build/base-control/index.js +17 -13
  5. package/build/base-control/index.js.map +1 -1
  6. package/build/border-box-control/border-box-control-linked-button/component.js +1 -1
  7. package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  8. package/build/border-control/border-control-dropdown/component.js +4 -2
  9. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  10. package/build/border-control/border-control-dropdown/hook.js +3 -2
  11. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  12. package/build/border-control/border-control-style-picker/component.js +1 -1
  13. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  14. package/build/border-control/styles.js +17 -17
  15. package/build/border-control/styles.js.map +1 -1
  16. package/build/box-control/index.js +1 -1
  17. package/build/box-control/index.js.map +1 -1
  18. package/build/box-control/linked-button.js +1 -1
  19. package/build/box-control/linked-button.js.map +1 -1
  20. package/build/button/index.js +1 -1
  21. package/build/button/index.js.map +1 -1
  22. package/build/checkbox-control/index.js +1 -1
  23. package/build/checkbox-control/index.js.map +1 -1
  24. package/build/checkbox-control/types.js.map +1 -1
  25. package/build/color-palette/index.native.js +11 -7
  26. package/build/color-palette/index.native.js.map +1 -1
  27. package/build/color-picker/color-copy-button.js +1 -1
  28. package/build/color-picker/color-copy-button.js.map +1 -1
  29. package/build/context/wordpress-component.js.map +1 -1
  30. package/build/custom-select-control-v2/index.js +11 -10
  31. package/build/custom-select-control-v2/index.js.map +1 -1
  32. package/build/date-time/date/styles.js +8 -8
  33. package/build/date-time/date/styles.js.map +1 -1
  34. package/build/date-time/time/timezone.js +11 -2
  35. package/build/date-time/time/timezone.js.map +1 -1
  36. package/build/dimension-control/index.js +2 -0
  37. package/build/dimension-control/index.js.map +1 -1
  38. package/build/dimension-control/types.js.map +1 -1
  39. package/build/dropdown-menu-v2/index.js +205 -159
  40. package/build/dropdown-menu-v2/index.js.map +1 -1
  41. package/build/dropdown-menu-v2/styles.js +86 -77
  42. package/build/dropdown-menu-v2/styles.js.map +1 -1
  43. package/build/dropdown-menu-v2/types.js.map +1 -1
  44. package/build/duotone-picker/duotone-picker.js +4 -3
  45. package/build/duotone-picker/duotone-picker.js.map +1 -1
  46. package/build/focal-point-picker/controls.js +5 -1
  47. package/build/focal-point-picker/controls.js.map +1 -1
  48. package/build/focal-point-picker/index.js +2 -0
  49. package/build/focal-point-picker/index.js.map +1 -1
  50. package/build/focal-point-picker/styles/focal-point-picker-style.js +15 -15
  51. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  52. package/build/focal-point-picker/types.js.map +1 -1
  53. package/build/font-size-picker/font-size-picker-select.js +2 -0
  54. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  55. package/build/font-size-picker/font-size-picker-toggle-group.js +2 -0
  56. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  57. package/build/font-size-picker/index.js +10 -3
  58. package/build/font-size-picker/index.js.map +1 -1
  59. package/build/font-size-picker/index.native.js +6 -3
  60. package/build/font-size-picker/index.native.js.map +1 -1
  61. package/build/font-size-picker/types.js.map +1 -1
  62. package/build/form-token-field/index.js +10 -5
  63. package/build/form-token-field/index.js.map +1 -1
  64. package/build/form-token-field/token.js +1 -0
  65. package/build/form-token-field/token.js.map +1 -1
  66. package/build/gradient-picker/index.js +3 -2
  67. package/build/gradient-picker/index.js.map +1 -1
  68. package/build/index.native.js +20 -19
  69. package/build/index.native.js.map +1 -1
  70. package/build/input-control/styles/input-control-styles.js +32 -29
  71. package/build/input-control/styles/input-control-styles.js.map +1 -1
  72. package/build/input-control/types.js.map +1 -1
  73. package/build/lock-unlock.js +18 -0
  74. package/build/lock-unlock.js.map +1 -0
  75. package/build/mobile/bottom-sheet/index.native.js +8 -0
  76. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  77. package/build/mobile/color-settings/palette.screen.native.js +8 -4
  78. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  79. package/build/mobile/global-styles-context/utils.native.js +39 -13
  80. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  81. package/build/mobile/image/constants.js +12 -0
  82. package/build/mobile/image/constants.js.map +1 -0
  83. package/build/mobile/image/index.native.js +26 -18
  84. package/build/mobile/image/index.native.js.map +1 -1
  85. package/build/mobile/keyboard-aware-flat-list/index.android.js +40 -8
  86. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  87. package/build/mobile/keyboard-aware-flat-list/index.ios.js +44 -68
  88. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  89. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js +39 -0
  90. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js.map +1 -0
  91. package/build/mobile/keyboard-aware-flat-list/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +22 -29
  92. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-section.native.js.map +1 -0
  93. package/build/mobile/keyboard-aware-flat-list/use-scroll.native.js +93 -0
  94. package/build/mobile/keyboard-aware-flat-list/use-scroll.native.js.map +1 -0
  95. package/build/mobile/utils/get-px-from-css-unit.native.js +302 -0
  96. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -0
  97. package/build/modal/index.js +18 -13
  98. package/build/modal/index.js.map +1 -1
  99. package/build/navigation/menu/menu-title.js +1 -1
  100. package/build/navigation/menu/menu-title.js.map +1 -1
  101. package/build/navigator/navigator-provider/component.js +13 -15
  102. package/build/navigator/navigator-provider/component.js.map +1 -1
  103. package/build/navigator/navigator-screen/component.js +23 -63
  104. package/build/navigator/navigator-screen/component.js.map +1 -1
  105. package/build/navigator/styles.js +52 -0
  106. package/build/navigator/styles.js.map +1 -0
  107. package/build/number-control/index.js +4 -8
  108. package/build/number-control/index.js.map +1 -1
  109. package/build/number-control/types.js.map +1 -1
  110. package/build/palette-edit/index.js +15 -34
  111. package/build/palette-edit/index.js.map +1 -1
  112. package/build/private-apis.js +11 -26
  113. package/build/private-apis.js.map +1 -1
  114. package/build/private-apis.native.js +21 -0
  115. package/build/private-apis.native.js.map +1 -0
  116. package/build/query-controls/author-select.js +3 -1
  117. package/build/query-controls/author-select.js.map +1 -1
  118. package/build/query-controls/category-select.js +3 -1
  119. package/build/query-controls/category-select.js.map +1 -1
  120. package/build/query-controls/index.js +6 -1
  121. package/build/query-controls/index.js.map +1 -1
  122. package/build/query-controls/types.js.map +1 -1
  123. package/build/radio-control/index.js +1 -0
  124. package/build/radio-control/index.js.map +1 -1
  125. package/build/range-control/index.js +1 -1
  126. package/build/range-control/index.js.map +1 -1
  127. package/build/select-control/styles/select-control-styles.js +15 -25
  128. package/build/select-control/styles/select-control-styles.js.map +1 -1
  129. package/build/slot-fill/index.js +3 -2
  130. package/build/slot-fill/index.js.map +1 -1
  131. package/build/slot-fill/types.js.map +1 -1
  132. package/build/snackbar/types.js.map +1 -1
  133. package/build/tabs/index.js +18 -1
  134. package/build/tabs/index.js.map +1 -1
  135. package/build/tabs/styles.js +3 -3
  136. package/build/tabs/styles.js.map +1 -1
  137. package/build/tabs/tab.js +2 -2
  138. package/build/tabs/tab.js.map +1 -1
  139. package/build/tabs/tabpanel.js +11 -8
  140. package/build/tabs/tabpanel.js.map +1 -1
  141. package/build/tabs/types.js.map +1 -1
  142. package/build/toggle-group-control/toggle-group-control/component.js +4 -4
  143. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  144. package/build/toggle-group-control/toggle-group-control/styles.js +29 -15
  145. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  146. package/build/toggle-group-control/toggle-group-control/utils.js +17 -17
  147. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  148. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  149. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  150. package/build/tools-panel/tools-panel/component.js +3 -1
  151. package/build/tools-panel/tools-panel/component.js.map +1 -1
  152. package/build/tools-panel/tools-panel-header/component.js +9 -8
  153. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  154. package/build/tools-panel/tools-panel-item/hook.js +11 -11
  155. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  156. package/build/tools-panel/types.js.map +1 -1
  157. package/build/tooltip/index.js +34 -10
  158. package/build/tooltip/index.js.map +1 -1
  159. package/build/tooltip/types.js.map +1 -1
  160. package/build/truncate/hook.js +10 -4
  161. package/build/truncate/hook.js.map +1 -1
  162. package/build/truncate/types.js.map +1 -1
  163. package/build/unit-control/index.js +1 -1
  164. package/build/unit-control/index.js.map +1 -1
  165. package/build/utils/strings.js +34 -3
  166. package/build/utils/strings.js.map +1 -1
  167. package/build-module/base-control/index.js +16 -12
  168. package/build-module/base-control/index.js.map +1 -1
  169. package/build-module/border-box-control/border-box-control-linked-button/component.js +1 -1
  170. package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  171. package/build-module/border-control/border-control-dropdown/component.js +4 -2
  172. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  173. package/build-module/border-control/border-control-dropdown/hook.js +3 -2
  174. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  175. package/build-module/border-control/border-control-style-picker/component.js +1 -1
  176. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  177. package/build-module/border-control/styles.js +17 -17
  178. package/build-module/border-control/styles.js.map +1 -1
  179. package/build-module/box-control/index.js +1 -1
  180. package/build-module/box-control/index.js.map +1 -1
  181. package/build-module/box-control/linked-button.js +1 -1
  182. package/build-module/box-control/linked-button.js.map +1 -1
  183. package/build-module/button/index.js +1 -1
  184. package/build-module/button/index.js.map +1 -1
  185. package/build-module/checkbox-control/index.js +1 -1
  186. package/build-module/checkbox-control/index.js.map +1 -1
  187. package/build-module/checkbox-control/types.js.map +1 -1
  188. package/build-module/color-palette/index.native.js +11 -7
  189. package/build-module/color-palette/index.native.js.map +1 -1
  190. package/build-module/color-picker/color-copy-button.js +1 -1
  191. package/build-module/color-picker/color-copy-button.js.map +1 -1
  192. package/build-module/context/wordpress-component.js.map +1 -1
  193. package/build-module/custom-select-control-v2/index.js +11 -10
  194. package/build-module/custom-select-control-v2/index.js.map +1 -1
  195. package/build-module/date-time/date/styles.js +8 -8
  196. package/build-module/date-time/date/styles.js.map +1 -1
  197. package/build-module/date-time/time/timezone.js +11 -2
  198. package/build-module/date-time/time/timezone.js.map +1 -1
  199. package/build-module/dimension-control/index.js +2 -0
  200. package/build-module/dimension-control/index.js.map +1 -1
  201. package/build-module/dimension-control/types.js.map +1 -1
  202. package/build-module/dropdown-menu-v2/index.js +201 -154
  203. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  204. package/build-module/dropdown-menu-v2/styles.js +68 -61
  205. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  206. package/build-module/dropdown-menu-v2/types.js.map +1 -1
  207. package/build-module/duotone-picker/duotone-picker.js +4 -3
  208. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  209. package/build-module/focal-point-picker/controls.js +5 -1
  210. package/build-module/focal-point-picker/controls.js.map +1 -1
  211. package/build-module/focal-point-picker/index.js +2 -0
  212. package/build-module/focal-point-picker/index.js.map +1 -1
  213. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +15 -15
  214. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  215. package/build-module/focal-point-picker/types.js.map +1 -1
  216. package/build-module/font-size-picker/font-size-picker-select.js +2 -0
  217. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  218. package/build-module/font-size-picker/font-size-picker-toggle-group.js +2 -0
  219. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  220. package/build-module/font-size-picker/index.js +10 -3
  221. package/build-module/font-size-picker/index.js.map +1 -1
  222. package/build-module/font-size-picker/index.native.js +5 -2
  223. package/build-module/font-size-picker/index.native.js.map +1 -1
  224. package/build-module/font-size-picker/types.js.map +1 -1
  225. package/build-module/form-token-field/index.js +10 -5
  226. package/build-module/form-token-field/index.js.map +1 -1
  227. package/build-module/form-token-field/token.js +1 -0
  228. package/build-module/form-token-field/token.js.map +1 -1
  229. package/build-module/gradient-picker/index.js +3 -2
  230. package/build-module/gradient-picker/index.js.map +1 -1
  231. package/build-module/index.native.js +6 -3
  232. package/build-module/index.native.js.map +1 -1
  233. package/build-module/input-control/styles/input-control-styles.js +31 -29
  234. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  235. package/build-module/input-control/types.js.map +1 -1
  236. package/build-module/lock-unlock.js +9 -0
  237. package/build-module/lock-unlock.js.map +1 -0
  238. package/build-module/mobile/bottom-sheet/index.native.js +9 -1
  239. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  240. package/build-module/mobile/color-settings/palette.screen.native.js +8 -4
  241. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  242. package/build-module/mobile/global-styles-context/utils.native.js +38 -13
  243. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  244. package/build-module/mobile/image/constants.js +5 -0
  245. package/build-module/mobile/image/constants.js.map +1 -0
  246. package/build-module/mobile/image/index.native.js +25 -16
  247. package/build-module/mobile/image/index.native.js.map +1 -1
  248. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +40 -6
  249. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  250. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +46 -68
  251. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  252. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js +33 -0
  253. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js.map +1 -0
  254. package/build-module/mobile/keyboard-aware-flat-list/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +21 -27
  255. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-section.native.js.map +1 -0
  256. package/build-module/mobile/keyboard-aware-flat-list/use-scroll.native.js +86 -0
  257. package/build-module/mobile/keyboard-aware-flat-list/use-scroll.native.js.map +1 -0
  258. package/build-module/mobile/utils/get-px-from-css-unit.native.js +294 -0
  259. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -0
  260. package/build-module/modal/index.js +18 -13
  261. package/build-module/modal/index.js.map +1 -1
  262. package/build-module/navigation/menu/menu-title.js +1 -1
  263. package/build-module/navigation/menu/menu-title.js.map +1 -1
  264. package/build-module/navigator/navigator-provider/component.js +3 -16
  265. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  266. package/build-module/navigator/navigator-screen/component.js +16 -70
  267. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  268. package/build-module/navigator/styles.js +47 -0
  269. package/build-module/navigator/styles.js.map +1 -0
  270. package/build-module/number-control/index.js +4 -8
  271. package/build-module/number-control/index.js.map +1 -1
  272. package/build-module/number-control/types.js.map +1 -1
  273. package/build-module/palette-edit/index.js +14 -33
  274. package/build-module/palette-edit/index.js.map +1 -1
  275. package/build-module/private-apis.js +10 -23
  276. package/build-module/private-apis.js.map +1 -1
  277. package/build-module/private-apis.native.js +14 -0
  278. package/build-module/private-apis.native.js.map +1 -0
  279. package/build-module/query-controls/author-select.js +3 -1
  280. package/build-module/query-controls/author-select.js.map +1 -1
  281. package/build-module/query-controls/category-select.js +3 -1
  282. package/build-module/query-controls/category-select.js.map +1 -1
  283. package/build-module/query-controls/index.js +6 -1
  284. package/build-module/query-controls/index.js.map +1 -1
  285. package/build-module/query-controls/types.js.map +1 -1
  286. package/build-module/radio-control/index.js +1 -0
  287. package/build-module/radio-control/index.js.map +1 -1
  288. package/build-module/range-control/index.js +1 -1
  289. package/build-module/range-control/index.js.map +1 -1
  290. package/build-module/select-control/styles/select-control-styles.js +15 -25
  291. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  292. package/build-module/slot-fill/index.js +3 -2
  293. package/build-module/slot-fill/index.js.map +1 -1
  294. package/build-module/slot-fill/types.js.map +1 -1
  295. package/build-module/snackbar/types.js.map +1 -1
  296. package/build-module/tabs/index.js +18 -1
  297. package/build-module/tabs/index.js.map +1 -1
  298. package/build-module/tabs/styles.js +3 -3
  299. package/build-module/tabs/styles.js.map +1 -1
  300. package/build-module/tabs/tab.js +2 -2
  301. package/build-module/tabs/tab.js.map +1 -1
  302. package/build-module/tabs/tabpanel.js +11 -8
  303. package/build-module/tabs/tabpanel.js.map +1 -1
  304. package/build-module/tabs/types.js.map +1 -1
  305. package/build-module/toggle-group-control/toggle-group-control/component.js +4 -4
  306. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  307. package/build-module/toggle-group-control/toggle-group-control/styles.js +29 -15
  308. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  309. package/build-module/toggle-group-control/toggle-group-control/utils.js +17 -17
  310. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  311. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  312. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  313. package/build-module/tools-panel/tools-panel/component.js +3 -1
  314. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  315. package/build-module/tools-panel/tools-panel-header/component.js +9 -8
  316. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  317. package/build-module/tools-panel/tools-panel-item/hook.js +11 -11
  318. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  319. package/build-module/tools-panel/types.js.map +1 -1
  320. package/build-module/tooltip/index.js +34 -12
  321. package/build-module/tooltip/index.js.map +1 -1
  322. package/build-module/tooltip/types.js.map +1 -1
  323. package/build-module/truncate/hook.js +10 -4
  324. package/build-module/truncate/hook.js.map +1 -1
  325. package/build-module/truncate/types.js.map +1 -1
  326. package/build-module/unit-control/index.js +1 -1
  327. package/build-module/unit-control/index.js.map +1 -1
  328. package/build-module/utils/strings.js +32 -2
  329. package/build-module/utils/strings.js.map +1 -1
  330. package/build-style/style-rtl.css +30 -6
  331. package/build-style/style.css +30 -6
  332. package/build-types/base-control/index.d.ts +3 -27
  333. package/build-types/base-control/index.d.ts.map +1 -1
  334. package/build-types/base-control/stories/index.story.d.ts +4 -1
  335. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  336. package/build-types/border-box-control/border-box-control/hook.d.ts +4 -4
  337. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +6 -6
  338. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +4 -4
  339. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +4 -4
  340. package/build-types/border-box-control/stories/index.story.d.ts +1 -1
  341. package/build-types/border-control/border-control/hook.d.ts +4 -4
  342. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  343. package/build-types/border-control/border-control-dropdown/hook.d.ts +5 -4
  344. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  345. package/build-types/border-control/border-control-style-picker/hook.d.ts +4 -4
  346. package/build-types/border-control/stories/index.story.d.ts +6 -6
  347. package/build-types/border-control/styles.d.ts +1 -1
  348. package/build-types/border-control/styles.d.ts.map +1 -1
  349. package/build-types/box-control/stories/index.story.d.ts +42 -42
  350. package/build-types/box-control/styles/box-control-styles.d.ts +1 -1
  351. package/build-types/button/deprecated.d.ts +3 -3
  352. package/build-types/card/card/hook.d.ts +4 -4
  353. package/build-types/card/card-body/hook.d.ts +4 -4
  354. package/build-types/card/card-divider/hook.d.ts +4 -4
  355. package/build-types/card/card-footer/hook.d.ts +4 -4
  356. package/build-types/card/card-header/hook.d.ts +4 -4
  357. package/build-types/card/card-media/hook.d.ts +4 -4
  358. package/build-types/checkbox-control/index.d.ts.map +1 -1
  359. package/build-types/checkbox-control/types.d.ts +3 -2
  360. package/build-types/checkbox-control/types.d.ts.map +1 -1
  361. package/build-types/color-palette/styles.d.ts +2 -2
  362. package/build-types/color-picker/component.d.ts +2 -2
  363. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  364. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  365. package/build-types/color-picker/styles.d.ts +3 -3
  366. package/build-types/composite/test/index.d.ts.map +1 -0
  367. package/build-types/context/wordpress-component.d.ts +3 -3
  368. package/build-types/context/wordpress-component.d.ts.map +1 -1
  369. package/build-types/custom-select-control-v2/index.d.ts +3 -2
  370. package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
  371. package/build-types/custom-select-control-v2/stories/index.story.d.ts +4 -3
  372. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  373. package/build-types/date-time/date/styles.d.ts +3 -3
  374. package/build-types/date-time/date-time/styles.d.ts +1 -1
  375. package/build-types/date-time/time/styles.d.ts +4 -4
  376. package/build-types/date-time/time/timezone.d.ts.map +1 -1
  377. package/build-types/dimension-control/index.d.ts.map +1 -1
  378. package/build-types/dimension-control/types.d.ts +6 -0
  379. package/build-types/dimension-control/types.d.ts.map +1 -1
  380. package/build-types/dropdown/index.d.ts +1 -1
  381. package/build-types/dropdown/index.d.ts.map +1 -1
  382. package/build-types/dropdown/stories/index.story.d.ts +3 -3
  383. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  384. package/build-types/dropdown-menu/index.d.ts +1 -1
  385. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  386. package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
  387. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  388. package/build-types/dropdown-menu-v2/index.d.ts +18 -15
  389. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  390. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +7 -2
  391. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  392. package/build-types/dropdown-menu-v2/styles.d.ts +77 -23
  393. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  394. package/build-types/dropdown-menu-v2/types.d.ts +89 -173
  395. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  396. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  397. package/build-types/elevation/hook.d.ts +4 -4
  398. package/build-types/flex/flex/hook.d.ts +4 -4
  399. package/build-types/flex/flex-block/hook.d.ts +4 -4
  400. package/build-types/flex/flex-item/hook.d.ts +4 -4
  401. package/build-types/focal-point-picker/controls.d.ts +1 -1
  402. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  403. package/build-types/focal-point-picker/index.d.ts +1 -1
  404. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  405. package/build-types/focal-point-picker/stories/index.story.d.ts +8 -4
  406. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  407. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
  408. package/build-types/focal-point-picker/types.d.ts +7 -0
  409. package/build-types/focal-point-picker/types.d.ts.map +1 -1
  410. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  411. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  412. package/build-types/font-size-picker/index.d.ts.map +1 -1
  413. package/build-types/font-size-picker/styles.d.ts +1 -1
  414. package/build-types/font-size-picker/types.d.ts +8 -1
  415. package/build-types/font-size-picker/types.d.ts.map +1 -1
  416. package/build-types/form-token-field/index.d.ts.map +1 -1
  417. package/build-types/form-token-field/token.d.ts.map +1 -1
  418. package/build-types/grid/hook.d.ts +4 -4
  419. package/build-types/h-stack/hook.d.ts +4 -4
  420. package/build-types/heading/component.d.ts +1 -1
  421. package/build-types/heading/hook.d.ts +4 -4
  422. package/build-types/input-control/styles/input-control-styles.d.ts +11 -0
  423. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  424. package/build-types/input-control/types.d.ts +1 -1
  425. package/build-types/input-control/types.d.ts.map +1 -1
  426. package/build-types/item-group/item/hook.d.ts +4 -4
  427. package/build-types/item-group/item-group/hook.d.ts +4 -4
  428. package/build-types/lock-unlock.d.ts +3 -0
  429. package/build-types/lock-unlock.d.ts.map +1 -0
  430. package/build-types/menu-item/index.d.ts +1 -1
  431. package/build-types/menu-item/stories/index.story.d.ts +4 -4
  432. package/build-types/mobile/image/constants.d.ts +5 -0
  433. package/build-types/mobile/image/constants.d.ts.map +1 -0
  434. package/build-types/modal/index.d.ts.map +1 -1
  435. package/build-types/navigation/styles/navigation-styles.d.ts +3 -3
  436. package/build-types/navigator/navigator-back-button/hook.d.ts +6 -6
  437. package/build-types/navigator/navigator-button/hook.d.ts +6 -6
  438. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  439. package/build-types/navigator/navigator-screen/component.d.ts +1 -7
  440. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  441. package/build-types/navigator/styles.d.ts +9 -0
  442. package/build-types/navigator/styles.d.ts.map +1 -0
  443. package/build-types/number-control/index.d.ts +1 -1
  444. package/build-types/number-control/index.d.ts.map +1 -1
  445. package/build-types/number-control/stories/index.story.d.ts +1 -1
  446. package/build-types/number-control/types.d.ts +1 -1
  447. package/build-types/palette-edit/index.d.ts +2 -2
  448. package/build-types/palette-edit/index.d.ts.map +1 -1
  449. package/build-types/palette-edit/styles.d.ts +3 -3
  450. package/build-types/popover/index.d.ts +1 -1
  451. package/build-types/popover/index.d.ts.map +1 -1
  452. package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
  453. package/build-types/private-apis.d.ts +0 -1
  454. package/build-types/private-apis.d.ts.map +1 -1
  455. package/build-types/query-controls/author-select.d.ts +1 -1
  456. package/build-types/query-controls/author-select.d.ts.map +1 -1
  457. package/build-types/query-controls/category-select.d.ts +1 -1
  458. package/build-types/query-controls/category-select.d.ts.map +1 -1
  459. package/build-types/query-controls/index.d.ts +1 -1
  460. package/build-types/query-controls/index.d.ts.map +1 -1
  461. package/build-types/query-controls/types.d.ts +9 -0
  462. package/build-types/query-controls/types.d.ts.map +1 -1
  463. package/build-types/radio-control/index.d.ts.map +1 -1
  464. package/build-types/range-control/index.d.ts +1 -1
  465. package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
  466. package/build-types/resizable-box/index.d.ts +1 -1
  467. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  468. package/build-types/resizable-box/stories/index.story.d.ts +2 -2
  469. package/build-types/scrollable/hook.d.ts +4 -4
  470. package/build-types/search-control/index.d.ts +1 -1
  471. package/build-types/search-control/stories/index.story.d.ts +2 -2
  472. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  473. package/build-types/slot-fill/index.d.ts +1 -1
  474. package/build-types/slot-fill/index.d.ts.map +1 -1
  475. package/build-types/slot-fill/types.d.ts +4 -0
  476. package/build-types/slot-fill/types.d.ts.map +1 -1
  477. package/build-types/snackbar/index.d.ts +2 -2
  478. package/build-types/snackbar/stories/index.story.d.ts +0 -3
  479. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  480. package/build-types/snackbar/types.d.ts +1 -1
  481. package/build-types/snackbar/types.d.ts.map +1 -1
  482. package/build-types/spacer/hook.d.ts +4 -4
  483. package/build-types/surface/hook.d.ts +4 -4
  484. package/build-types/tabs/index.d.ts +2 -2
  485. package/build-types/tabs/index.d.ts.map +1 -1
  486. package/build-types/tabs/styles.d.ts.map +1 -1
  487. package/build-types/tabs/tab.d.ts +2 -1
  488. package/build-types/tabs/tab.d.ts.map +1 -1
  489. package/build-types/tabs/tabpanel.d.ts +3 -2
  490. package/build-types/tabs/tabpanel.d.ts.map +1 -1
  491. package/build-types/tabs/types.d.ts +8 -3
  492. package/build-types/tabs/types.d.ts.map +1 -1
  493. package/build-types/text/hook.d.ts +4 -4
  494. package/build-types/text-control/index.d.ts +1 -1
  495. package/build-types/textarea-control/index.d.ts +1 -1
  496. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  497. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +1 -1
  498. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +1 -1
  499. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  500. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +2 -2
  501. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  502. package/build-types/toggle-group-control/toggle-group-control/utils.d.ts.map +1 -1
  503. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
  504. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -1
  505. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  506. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  507. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  508. package/build-types/toolbar/toolbar-button/index.d.ts +3 -3
  509. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  510. package/build-types/tools-panel/tools-panel/hook.d.ts +5 -4
  511. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  512. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  513. package/build-types/tools-panel/tools-panel-header/hook.d.ts +5 -4
  514. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  515. package/build-types/tools-panel/tools-panel-item/hook.d.ts +4 -4
  516. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  517. package/build-types/tools-panel/types.d.ts +9 -0
  518. package/build-types/tools-panel/types.d.ts.map +1 -1
  519. package/build-types/tooltip/index.d.ts +1 -1
  520. package/build-types/tooltip/index.d.ts.map +1 -1
  521. package/build-types/tooltip/stories/index.story.d.ts +10 -1
  522. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  523. package/build-types/tooltip/types.d.ts +3 -0
  524. package/build-types/tooltip/types.d.ts.map +1 -1
  525. package/build-types/truncate/hook.d.ts +5 -5
  526. package/build-types/truncate/hook.d.ts.map +1 -1
  527. package/build-types/truncate/types.d.ts +4 -0
  528. package/build-types/truncate/types.d.ts.map +1 -1
  529. package/build-types/unit-control/index.d.ts +1 -1
  530. package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -1
  531. package/build-types/utils/strings.d.ts +14 -2
  532. package/build-types/utils/strings.d.ts.map +1 -1
  533. package/build-types/v-stack/hook.d.ts +4 -4
  534. package/build-types/v-stack/stories/index.story.d.ts +1 -1
  535. package/package.json +20 -21
  536. package/src/alignment-matrix-control/test/index.tsx +10 -16
  537. package/src/base-control/index.tsx +21 -16
  538. package/src/border-box-control/border-box-control-linked-button/component.tsx +1 -1
  539. package/src/border-control/border-control-dropdown/component.tsx +3 -1
  540. package/src/border-control/border-control-dropdown/hook.ts +3 -2
  541. package/src/border-control/border-control-style-picker/component.tsx +1 -1
  542. package/src/border-control/styles.ts +2 -9
  543. package/src/box-control/index.tsx +1 -1
  544. package/src/box-control/linked-button.tsx +1 -1
  545. package/src/button/README.md +32 -6
  546. package/src/button/index.tsx +1 -1
  547. package/src/button-group/README.md +0 -6
  548. package/src/card/card/README.md +1 -1
  549. package/src/checkbox-control/README.md +3 -10
  550. package/src/checkbox-control/index.tsx +8 -6
  551. package/src/checkbox-control/test/__snapshots__/index.tsx.snap +3 -8
  552. package/src/checkbox-control/test/index.tsx +7 -0
  553. package/src/checkbox-control/types.ts +3 -2
  554. package/src/color-palette/index.native.js +18 -7
  555. package/src/color-picker/color-copy-button.tsx +1 -1
  556. package/src/combobox-control/README.md +0 -6
  557. package/src/composite/test/index.tsx +576 -0
  558. package/src/context/wordpress-component.ts +11 -6
  559. package/src/custom-select-control/README.md +0 -6
  560. package/src/custom-select-control/test/index.js +367 -35
  561. package/src/custom-select-control-v2/index.tsx +13 -12
  562. package/src/date-time/date/styles.ts +3 -3
  563. package/src/date-time/time/timezone.tsx +15 -3
  564. package/src/dimension-control/index.tsx +2 -0
  565. package/src/dimension-control/test/__snapshots__/index.test.js.snap +2 -2
  566. package/src/dimension-control/types.ts +6 -0
  567. package/src/dropdown-menu/README.md +0 -5
  568. package/src/dropdown-menu-v2/README.md +75 -136
  569. package/src/dropdown-menu-v2/index.tsx +321 -231
  570. package/src/dropdown-menu-v2/stories/index.story.tsx +522 -126
  571. package/src/dropdown-menu-v2/styles.ts +226 -151
  572. package/src/dropdown-menu-v2/test/index.tsx +480 -188
  573. package/src/dropdown-menu-v2/types.ts +98 -184
  574. package/src/duotone-picker/duotone-picker.tsx +7 -3
  575. package/src/focal-point-picker/controls.tsx +4 -0
  576. package/src/focal-point-picker/index.tsx +2 -0
  577. package/src/focal-point-picker/styles/focal-point-picker-style.ts +1 -1
  578. package/src/focal-point-picker/types.ts +7 -0
  579. package/src/font-size-picker/font-size-picker-select.tsx +2 -0
  580. package/src/font-size-picker/font-size-picker-toggle-group.tsx +9 -1
  581. package/src/font-size-picker/index.native.js +8 -2
  582. package/src/font-size-picker/index.tsx +15 -5
  583. package/src/font-size-picker/types.ts +8 -1
  584. package/src/form-toggle/README.md +0 -6
  585. package/src/form-toggle/style.scss +4 -2
  586. package/src/form-token-field/index.tsx +11 -7
  587. package/src/form-token-field/test/index.tsx +97 -0
  588. package/src/form-token-field/token.tsx +1 -0
  589. package/src/gradient-picker/index.tsx +2 -2
  590. package/src/index.native.js +6 -3
  591. package/src/input-control/styles/input-control-styles.tsx +10 -8
  592. package/src/input-control/types.ts +1 -1
  593. package/src/lock-unlock.js +10 -0
  594. package/src/menu-group/README.md +0 -8
  595. package/src/menu-items-choice/README.md +0 -7
  596. package/src/mobile/bottom-sheet/index.native.js +15 -1
  597. package/src/mobile/color-settings/palette.screen.native.js +7 -5
  598. package/src/mobile/global-styles-context/test/fixtures/theme.native.js +0 -20
  599. package/src/mobile/global-styles-context/test/utils.native.js +22 -0
  600. package/src/mobile/global-styles-context/utils.native.js +42 -19
  601. package/src/mobile/image/constants.js +1 -0
  602. package/src/mobile/image/index.native.js +55 -18
  603. package/src/mobile/image/style.native.scss +35 -9
  604. package/src/mobile/keyboard-aware-flat-list/index.android.js +50 -5
  605. package/src/mobile/keyboard-aware-flat-list/index.ios.js +65 -91
  606. package/src/mobile/keyboard-aware-flat-list/test/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +27 -25
  607. package/src/mobile/keyboard-aware-flat-list/test/use-scroll.native.js +71 -0
  608. package/src/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js +41 -0
  609. package/src/mobile/keyboard-aware-flat-list/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +22 -27
  610. package/src/mobile/keyboard-aware-flat-list/use-scroll.native.js +100 -0
  611. package/src/mobile/link-settings/style.native.scss +0 -17
  612. package/src/mobile/utils/get-px-from-css-unit.native.js +329 -0
  613. package/src/mobile/utils/test/get-px-from-css-unit.native.js +172 -0
  614. package/src/modal/README.md +0 -6
  615. package/src/modal/index.tsx +18 -16
  616. package/src/modal/test/index.tsx +90 -1
  617. package/src/navigation/menu/menu-title.tsx +1 -1
  618. package/src/navigator/navigator-provider/component.tsx +3 -4
  619. package/src/navigator/navigator-screen/component.tsx +15 -93
  620. package/src/navigator/styles.ts +71 -0
  621. package/src/navigator/test/index.tsx +0 -64
  622. package/src/notice/README.md +0 -6
  623. package/src/number-control/README.md +2 -2
  624. package/src/number-control/index.tsx +4 -8
  625. package/src/number-control/types.ts +1 -1
  626. package/src/palette-edit/index.tsx +14 -43
  627. package/src/palette-edit/style.scss +2 -2
  628. package/src/panel/README.md +0 -6
  629. package/src/private-apis.native.js +13 -0
  630. package/src/private-apis.ts +12 -37
  631. package/src/query-controls/author-select.tsx +2 -0
  632. package/src/query-controls/category-select.tsx +2 -0
  633. package/src/query-controls/index.tsx +6 -1
  634. package/src/query-controls/types.ts +9 -0
  635. package/src/radio-control/README.md +0 -6
  636. package/src/radio-control/index.tsx +4 -1
  637. package/src/radio-control/style.scss +29 -2
  638. package/src/radio-group/README.md +0 -6
  639. package/src/range-control/README.md +1 -9
  640. package/src/range-control/index.tsx +1 -1
  641. package/src/search-control/README.md +1 -5
  642. package/src/select-control/README.md +0 -6
  643. package/src/select-control/styles/select-control-styles.ts +10 -28
  644. package/src/slot-fill/index.tsx +5 -2
  645. package/src/slot-fill/types.ts +5 -0
  646. package/src/snackbar/README.md +0 -6
  647. package/src/snackbar/stories/index.story.tsx +7 -5
  648. package/src/snackbar/style.scss +4 -3
  649. package/src/snackbar/types.ts +2 -1
  650. package/src/spacer/README.md +0 -2
  651. package/src/spinner/README.md +2 -0
  652. package/src/tab-panel/README.md +0 -5
  653. package/src/tab-panel/test/index.tsx +39 -56
  654. package/src/tabs/README.md +4 -4
  655. package/src/tabs/index.tsx +22 -1
  656. package/src/tabs/stories/index.story.tsx +48 -48
  657. package/src/tabs/styles.ts +7 -1
  658. package/src/tabs/tab.tsx +3 -3
  659. package/src/tabs/tabpanel.tsx +13 -8
  660. package/src/tabs/test/index.tsx +236 -106
  661. package/src/tabs/types.ts +8 -3
  662. package/src/text-control/README.md +0 -6
  663. package/src/textarea-control/README.md +0 -6
  664. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +12 -16
  665. package/src/toggle-group-control/test/index.tsx +107 -41
  666. package/src/toggle-group-control/toggle-group-control/component.tsx +5 -4
  667. package/src/toggle-group-control/toggle-group-control/styles.ts +13 -19
  668. package/src/toggle-group-control/toggle-group-control/utils.ts +15 -20
  669. package/src/toggle-group-control/toggle-group-control-option/README.md +1 -1
  670. package/src/toggle-group-control/toggle-group-control-option-base/README.md +1 -1
  671. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +3 -2
  672. package/src/toggle-group-control/toggle-group-control-option-icon/README.md +1 -1
  673. package/src/toolbar/toolbar/README.md +0 -6
  674. package/src/tools-panel/test/index.tsx +12 -20
  675. package/src/tools-panel/tools-panel/README.md +7 -0
  676. package/src/tools-panel/tools-panel/component.tsx +2 -0
  677. package/src/tools-panel/tools-panel-header/README.md +7 -0
  678. package/src/tools-panel/tools-panel-header/component.tsx +20 -13
  679. package/src/tools-panel/tools-panel-item/hook.ts +10 -21
  680. package/src/tools-panel/types.ts +9 -0
  681. package/src/tooltip/README.md +4 -0
  682. package/src/tooltip/index.tsx +48 -10
  683. package/src/tooltip/stories/index.story.tsx +18 -1
  684. package/src/tooltip/test/index.tsx +404 -254
  685. package/src/tooltip/types.ts +4 -0
  686. package/src/tree-grid/README.md +0 -4
  687. package/src/truncate/README.md +8 -0
  688. package/src/truncate/hook.ts +17 -10
  689. package/src/truncate/test/index.tsx +54 -27
  690. package/src/truncate/types.ts +4 -0
  691. package/src/unit-control/index.tsx +1 -1
  692. package/src/utils/strings.ts +30 -2
  693. package/src/utils/test/strings.js +96 -1
  694. package/tsconfig.tsbuildinfo +1 -1
  695. package/build/dropdown-menu-v2-ariakit/index.js +0 -256
  696. package/build/dropdown-menu-v2-ariakit/index.js.map +0 -1
  697. package/build/dropdown-menu-v2-ariakit/styles.js +0 -180
  698. package/build/dropdown-menu-v2-ariakit/styles.js.map +0 -1
  699. package/build/dropdown-menu-v2-ariakit/types.js +0 -6
  700. package/build/dropdown-menu-v2-ariakit/types.js.map +0 -1
  701. package/build/mobile/inserter-button/index.native.js +0 -98
  702. package/build/mobile/inserter-button/index.native.js.map +0 -1
  703. package/build/mobile/inserter-button/sparkles.js +0 -23
  704. package/build/mobile/inserter-button/sparkles.js.map +0 -1
  705. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js.map +0 -1
  706. package/build/mobile/link-settings/image-link-destinations-screen.native.js +0 -119
  707. package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +0 -1
  708. package/build-module/dropdown-menu-v2-ariakit/index.js +0 -237
  709. package/build-module/dropdown-menu-v2-ariakit/index.js.map +0 -1
  710. package/build-module/dropdown-menu-v2-ariakit/styles.js +0 -165
  711. package/build-module/dropdown-menu-v2-ariakit/styles.js.map +0 -1
  712. package/build-module/dropdown-menu-v2-ariakit/types.js +0 -2
  713. package/build-module/dropdown-menu-v2-ariakit/types.js.map +0 -1
  714. package/build-module/mobile/inserter-button/index.native.js +0 -89
  715. package/build-module/mobile/inserter-button/index.native.js.map +0 -1
  716. package/build-module/mobile/inserter-button/sparkles.js +0 -15
  717. package/build-module/mobile/inserter-button/sparkles.js.map +0 -1
  718. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js.map +0 -1
  719. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +0 -110
  720. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +0 -1
  721. package/build-types/dropdown-menu-v2-ariakit/index.d.ts +0 -20
  722. package/build-types/dropdown-menu-v2-ariakit/index.d.ts.map +0 -1
  723. package/build-types/dropdown-menu-v2-ariakit/stories/index.story.d.ts +0 -16
  724. package/build-types/dropdown-menu-v2-ariakit/stories/index.story.d.ts.map +0 -1
  725. package/build-types/dropdown-menu-v2-ariakit/styles.d.ts +0 -96
  726. package/build-types/dropdown-menu-v2-ariakit/styles.d.ts.map +0 -1
  727. package/build-types/dropdown-menu-v2-ariakit/test/index.d.ts.map +0 -1
  728. package/build-types/dropdown-menu-v2-ariakit/types.d.ts +0 -168
  729. package/build-types/dropdown-menu-v2-ariakit/types.d.ts.map +0 -1
  730. package/build-types/mobile/inserter-button/sparkles.d.ts +0 -3
  731. package/build-types/mobile/inserter-button/sparkles.d.ts.map +0 -1
  732. package/src/dropdown-menu-v2-ariakit/README.md +0 -331
  733. package/src/dropdown-menu-v2-ariakit/index.tsx +0 -383
  734. package/src/dropdown-menu-v2-ariakit/stories/index.story.tsx +0 -617
  735. package/src/dropdown-menu-v2-ariakit/styles.ts +0 -333
  736. package/src/dropdown-menu-v2-ariakit/test/index.tsx +0 -1108
  737. package/src/dropdown-menu-v2-ariakit/types.ts +0 -179
  738. package/src/mobile/inserter-button/README.md +0 -62
  739. package/src/mobile/inserter-button/index.native.js +0 -116
  740. package/src/mobile/inserter-button/sparkles.js +0 -15
  741. package/src/mobile/inserter-button/style.native.scss +0 -72
  742. package/src/mobile/link-settings/image-link-destinations-screen.native.js +0 -152
  743. /package/build-types/{dropdown-menu-v2-ariakit → composite}/test/index.d.ts +0 -0
@@ -2,12 +2,6 @@
2
2
 
3
3
  Use Snackbars to communicate low priority, non-interruptive messages to the user.
4
4
 
5
- ## Table of contents
6
-
7
- 1. [Design guidelines](#design-guidelines)
8
- 2. [Development guidelines](#development-guidelines)
9
- 3. [Related components](#related-components)
10
-
11
5
  ## Design guidelines
12
6
 
13
7
  A Snackbar displays a succinct message that is cleared out after a small delay. It can also offer the user options, like viewing a published post but these options should also be available elsewhere in the UI.
@@ -3,9 +3,15 @@
3
3
  */
4
4
  import type { Meta, StoryFn } from '@storybook/react';
5
5
 
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { wordpress } from '@wordpress/icons';
10
+
6
11
  /**
7
12
  * Internal dependencies
8
13
  */
14
+ import Icon from '../../icon';
9
15
  import Snackbar from '..';
10
16
 
11
17
  const meta: Meta< typeof Snackbar > = {
@@ -63,11 +69,7 @@ WithActions.args = {
63
69
  export const WithIcon: StoryFn< typeof Snackbar > = DefaultTemplate.bind( {} );
64
70
  WithIcon.args = {
65
71
  children: 'Add an icon to make your snackbar stand out',
66
- icon: (
67
- <span role="img" aria-label="Icon" style={ { fontSize: 21 } }>
68
- 🌮
69
- </span>
70
- ),
72
+ icon: <Icon style={ { fill: 'currentcolor' } } icon={ wordpress } />,
71
73
  };
72
74
 
73
75
  export const WithExplicitDismiss: StoryFn< typeof Snackbar > =
@@ -29,13 +29,14 @@
29
29
  }
30
30
 
31
31
  .components-snackbar__content-with-icon {
32
- margin-left: $grid-unit-30;
32
+ position: relative;
33
+ padding-left: $icon-size;
33
34
  }
34
35
 
35
36
  .components-snackbar__icon {
36
37
  position: absolute;
37
- top: 24px;
38
- left: 28px;
38
+ left: $grid-unit-10 * -1;
39
+ top: calc((#{$icon-size - ($default-font-size * $default-line-height)}) / -2);
39
40
  }
40
41
 
41
42
  .components-snackbar__dismiss-button {
@@ -28,7 +28,8 @@ type SnackbarOnlyProps = {
28
28
  listRef?: MutableRefObject< HTMLDivElement | null >;
29
29
  };
30
30
 
31
- export type SnackbarProps = NoticeProps & SnackbarOnlyProps;
31
+ export type SnackbarProps = Omit< NoticeProps, '__unstableHTML' > &
32
+ SnackbarOnlyProps;
32
33
 
33
34
  export type SnackbarListProps = {
34
35
  notices: Array<
@@ -6,8 +6,6 @@ This feature is still experimental. “Experimental” means this is an early im
6
6
 
7
7
  `Spacer` is a primitive layout component that providers inner (`padding`) or outer (`margin`) space in-between components. It can also be used to adaptively provide space within an `HStack` or `VStack`.
8
8
 
9
- ## Table of contents
10
-
11
9
  ## Usage
12
10
 
13
11
  `Spacer` comes with a bunch of shorthand props to adjust `margin` and `padding`. The values of these props work as a multiplier to the library's grid system (base of `4px`).
@@ -17,3 +17,5 @@ function Example() {
17
17
  The spinner component should:
18
18
 
19
19
  - Signal to users that the processing of their request is underway and will soon complete.
20
+
21
+ Check out the [Storybook page](https://wordpress.github.io/gutenberg/?path=/docs/components-spinner--docs) for a visual exploration of this component.
@@ -6,11 +6,6 @@ TabPanels organize content across different screens, data sets, and interactions
6
6
 
7
7
  ![The “Document” tab selected in the sidebar TabPanel.](https://wordpress.org/gutenberg/files/2019/01/s_E36D9C9B8FFA15A1A8CE224E422535A12B016F88884089575F9998E52016A49F_1541785098230_TabPanel.png)
8
8
 
9
- ## Table of contents
10
-
11
- 1. Design guidelines
12
- 2. Development guidelines
13
-
14
9
  ## Design guidelines
15
10
 
16
11
  ### Usage
@@ -2,7 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import { render, screen, waitFor } from '@testing-library/react';
5
- import userEvent from '@testing-library/user-event';
5
+ import { press, hover, click } from '@ariakit/test';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
@@ -13,7 +13,6 @@ import { wordpress, category, media } from '@wordpress/icons';
13
13
  * Internal dependencies
14
14
  */
15
15
  import TabPanel from '..';
16
- import cleanupTooltip from '../../tooltip/test/utils';
17
16
 
18
17
  const TABS = [
19
18
  {
@@ -95,8 +94,6 @@ describe.each( [
95
94
  } );
96
95
 
97
96
  it( 'should display a tooltip when hovering tabs provided with an icon', async () => {
98
- const user = userEvent.setup();
99
-
100
97
  const panelRenderFunction = jest.fn();
101
98
 
102
99
  const TABS_WITH_ICON = [
@@ -119,7 +116,7 @@ describe.each( [
119
116
  screen.queryByText( TABS_WITH_ICON[ i ].title )
120
117
  ).not.toBeInTheDocument();
121
118
 
122
- await user.hover( allTabs[ i ] );
119
+ await hover( allTabs[ i ] );
123
120
 
124
121
  await waitFor( () =>
125
122
  expect(
@@ -127,15 +124,12 @@ describe.each( [
127
124
  ).toBeVisible()
128
125
  );
129
126
 
130
- await user.unhover( allTabs[ i ] );
127
+ // Trigger closing the tooltip
128
+ await click( document.body );
131
129
  }
132
-
133
- await cleanupTooltip( user );
134
130
  } );
135
131
 
136
132
  it( 'should display a tooltip when moving the selection via the keyboard on tabs provided with an icon', async () => {
137
- const user = userEvent.setup();
138
-
139
133
  const mockOnSelect = jest.fn();
140
134
  const panelRenderFunction = jest.fn();
141
135
 
@@ -161,7 +155,7 @@ describe.each( [
161
155
  // Tab to focus the tablist. Make sure alpha is focused, and that the
162
156
  // corresponding tooltip is shown.
163
157
  expect( screen.queryByText( 'Alpha' ) ).not.toBeInTheDocument();
164
- await user.keyboard( '[Tab]' );
158
+ await press.Tab();
165
159
  expect( mockOnSelect ).toHaveBeenCalledTimes( 1 );
166
160
  expect( screen.getByText( 'Alpha' ) ).toBeInTheDocument();
167
161
  expect( await getSelectedTab() ).toHaveFocus();
@@ -169,7 +163,7 @@ describe.each( [
169
163
  // Move selection with arrow keys. Make sure beta is focused, and that
170
164
  // the corresponding tooltip is shown.
171
165
  expect( screen.queryByText( 'Beta' ) ).not.toBeInTheDocument();
172
- await user.keyboard( '[ArrowRight]' );
166
+ await press.ArrowRight();
173
167
  expect( mockOnSelect ).toHaveBeenCalledTimes( 2 );
174
168
  expect( mockOnSelect ).toHaveBeenLastCalledWith( 'beta' );
175
169
  expect( screen.getByText( 'Beta' ) ).toBeInTheDocument();
@@ -178,7 +172,7 @@ describe.each( [
178
172
  // Move selection with arrow keys. Make sure gamma is focused, and that
179
173
  // the corresponding tooltip is shown.
180
174
  expect( screen.queryByText( 'Gamma' ) ).not.toBeInTheDocument();
181
- await user.keyboard( '[ArrowRight]' );
175
+ await press.ArrowRight();
182
176
  expect( mockOnSelect ).toHaveBeenCalledTimes( 3 );
183
177
  expect( mockOnSelect ).toHaveBeenLastCalledWith( 'gamma' );
184
178
  expect( screen.getByText( 'Gamma' ) ).toBeInTheDocument();
@@ -187,13 +181,11 @@ describe.each( [
187
181
  // Move selection with arrow keys. Make sure beta is focused, and that
188
182
  // the corresponding tooltip is shown.
189
183
  expect( screen.queryByText( 'Beta' ) ).not.toBeInTheDocument();
190
- await user.keyboard( '[ArrowLeft]' );
184
+ await press.ArrowLeft();
191
185
  expect( mockOnSelect ).toHaveBeenCalledTimes( 4 );
192
186
  expect( mockOnSelect ).toHaveBeenLastCalledWith( 'beta' );
193
187
  expect( screen.getByText( 'Beta' ) ).toBeInTheDocument();
194
188
  expect( await getSelectedTab() ).toHaveFocus();
195
-
196
- await cleanupTooltip( user );
197
189
  } );
198
190
  } );
199
191
 
@@ -283,7 +275,6 @@ describe.each( [
283
275
  } );
284
276
 
285
277
  it( 'should fall back to the tab associated to `initialTabName` if the currently active tab is removed', async () => {
286
- const user = userEvent.setup();
287
278
  const mockOnSelect = jest.fn();
288
279
 
289
280
  const { rerender } = render(
@@ -298,7 +289,7 @@ describe.each( [
298
289
  expect( await getSelectedTab() ).toHaveTextContent( 'Gamma' );
299
290
  expect( mockOnSelect ).toHaveBeenLastCalledWith( 'gamma' );
300
291
 
301
- await user.click( screen.getByRole( 'tab', { name: 'Alpha' } ) );
292
+ await click( screen.getByRole( 'tab', { name: 'Alpha' } ) );
302
293
  expect( await getSelectedTab() ).toHaveTextContent( 'Alpha' );
303
294
  expect( mockOnSelect ).toHaveBeenLastCalledWith( 'alpha' );
304
295
 
@@ -386,7 +377,6 @@ describe.each( [
386
377
 
387
378
  describe( 'Disabled Tab', () => {
388
379
  it( 'should disable the tab when `disabled` is `true`', async () => {
389
- const user = userEvent.setup();
390
380
  const mockOnSelect = jest.fn();
391
381
 
392
382
  render(
@@ -414,7 +404,7 @@ describe.each( [
414
404
 
415
405
  // onSelect should not be called since the disabled tab is
416
406
  // highlighted, but not selected.
417
- await user.keyboard( '[ArrowLeft]' );
407
+ await press.ArrowLeft();
418
408
  expect( mockOnSelect ).toHaveBeenCalledTimes( 1 );
419
409
  } );
420
410
 
@@ -582,7 +572,6 @@ describe.each( [
582
572
 
583
573
  describe( 'Tab Activation', () => {
584
574
  it( 'defaults to automatic tab activation (pointer clicks)', async () => {
585
- const user = userEvent.setup();
586
575
  const panelRenderFunction = jest.fn();
587
576
  const mockOnSelect = jest.fn();
588
577
 
@@ -602,7 +591,7 @@ describe.each( [
602
591
  expect( mockOnSelect ).toHaveBeenLastCalledWith( 'alpha' );
603
592
 
604
593
  // Click on Beta, make sure beta is the selected tab
605
- await user.click( screen.getByRole( 'tab', { name: 'Beta' } ) );
594
+ await click( screen.getByRole( 'tab', { name: 'Beta' } ) );
606
595
 
607
596
  expect( await getSelectedTab() ).toHaveTextContent( 'Beta' );
608
597
  expect(
@@ -611,7 +600,7 @@ describe.each( [
611
600
  expect( mockOnSelect ).toHaveBeenLastCalledWith( 'beta' );
612
601
 
613
602
  // Click on Alpha, make sure beta is the selected tab
614
- await user.click( screen.getByRole( 'tab', { name: 'Alpha' } ) );
603
+ await click( screen.getByRole( 'tab', { name: 'Alpha' } ) );
615
604
 
616
605
  expect( await getSelectedTab() ).toHaveTextContent( 'Alpha' );
617
606
  expect(
@@ -621,7 +610,6 @@ describe.each( [
621
610
  } );
622
611
 
623
612
  it( 'defaults to automatic tab activation (arrow keys)', async () => {
624
- const user = userEvent.setup();
625
613
  const mockOnSelect = jest.fn();
626
614
 
627
615
  render(
@@ -638,12 +626,12 @@ describe.each( [
638
626
  // Tab to focus the tablist. Make sure alpha is focused.
639
627
  expect( await getSelectedTab() ).toHaveTextContent( 'Alpha' );
640
628
  expect( await getSelectedTab() ).not.toHaveFocus();
641
- await user.keyboard( '[Tab]' );
629
+ await press.Tab();
642
630
  expect( await getSelectedTab() ).toHaveFocus();
643
631
 
644
632
  // Navigate forward with arrow keys and make sure the Beta tab is
645
633
  // selected automatically.
646
- await user.keyboard( '[ArrowRight]' );
634
+ await press.ArrowRight();
647
635
  expect( await getSelectedTab() ).toHaveTextContent( 'Beta' );
648
636
  expect( await getSelectedTab() ).toHaveFocus();
649
637
  expect( mockOnSelect ).toHaveBeenCalledTimes( 2 );
@@ -651,7 +639,7 @@ describe.each( [
651
639
 
652
640
  // Navigate backwards with arrow keys. Make sure alpha is
653
641
  // selected automatically.
654
- await user.keyboard( '[ArrowLeft]' );
642
+ await press.ArrowLeft();
655
643
  expect( await getSelectedTab() ).toHaveTextContent( 'Alpha' );
656
644
  expect( await getSelectedTab() ).toHaveFocus();
657
645
  expect( mockOnSelect ).toHaveBeenCalledTimes( 3 );
@@ -659,7 +647,6 @@ describe.each( [
659
647
  } );
660
648
 
661
649
  it( 'wraps around the last/first tab when using arrow keys', async () => {
662
- const user = userEvent.setup();
663
650
  const mockOnSelect = jest.fn();
664
651
 
665
652
  render(
@@ -676,12 +663,12 @@ describe.each( [
676
663
  // Tab to focus the tablist. Make sure Alpha is focused.
677
664
  expect( await getSelectedTab() ).toHaveTextContent( 'Alpha' );
678
665
  expect( await getSelectedTab() ).not.toHaveFocus();
679
- await user.keyboard( '[Tab]' );
666
+ await press.Tab();
680
667
  expect( await getSelectedTab() ).toHaveFocus();
681
668
 
682
669
  // Navigate backwards with arrow keys and make sure that the Gamma tab
683
670
  // (the last tab) is selected automatically.
684
- await user.keyboard( '[ArrowLeft]' );
671
+ await press.ArrowLeft();
685
672
  expect( await getSelectedTab() ).toHaveTextContent( 'Gamma' );
686
673
  expect( await getSelectedTab() ).toHaveFocus();
687
674
  expect( mockOnSelect ).toHaveBeenCalledTimes( 2 );
@@ -689,7 +676,7 @@ describe.each( [
689
676
 
690
677
  // Navigate forward with arrow keys. Make sure alpha (the first tab) is
691
678
  // selected automatically.
692
- await user.keyboard( '[ArrowRight]' );
679
+ await press.ArrowRight();
693
680
  expect( await getSelectedTab() ).toHaveTextContent( 'Alpha' );
694
681
  expect( await getSelectedTab() ).toHaveFocus();
695
682
  expect( mockOnSelect ).toHaveBeenCalledTimes( 3 );
@@ -697,7 +684,6 @@ describe.each( [
697
684
  } );
698
685
 
699
686
  it( 'should not move tab selection when pressing the up/down arrow keys, unless the orientation is changed to `vertical`', async () => {
700
- const user = userEvent.setup();
701
687
  const mockOnSelect = jest.fn();
702
688
 
703
689
  const { rerender } = render(
@@ -714,18 +700,18 @@ describe.each( [
714
700
  // Tab to focus the tablist. Make sure alpha is focused.
715
701
  expect( await getSelectedTab() ).toHaveTextContent( 'Alpha' );
716
702
  expect( await getSelectedTab() ).not.toHaveFocus();
717
- await user.keyboard( '[Tab]' );
703
+ await press.Tab();
718
704
  expect( await getSelectedTab() ).toHaveFocus();
719
705
 
720
706
  // Press the arrow up key, nothing happens.
721
- await user.keyboard( '[ArrowUp]' );
707
+ await press.ArrowUp();
722
708
  expect( await getSelectedTab() ).toHaveTextContent( 'Alpha' );
723
709
  expect( await getSelectedTab() ).toHaveFocus();
724
710
  expect( mockOnSelect ).toHaveBeenCalledTimes( 1 );
725
711
  expect( mockOnSelect ).toHaveBeenLastCalledWith( 'alpha' );
726
712
 
727
713
  // Press the arrow down key, nothing happens
728
- await user.keyboard( '[ArrowDown]' );
714
+ await press.ArrowDown();
729
715
  expect( await getSelectedTab() ).toHaveTextContent( 'Alpha' );
730
716
  expect( await getSelectedTab() ).toHaveFocus();
731
717
  expect( mockOnSelect ).toHaveBeenCalledTimes( 1 );
@@ -753,7 +739,7 @@ describe.each( [
753
739
 
754
740
  // Navigate forward with arrow keys and make sure the Beta tab is
755
741
  // selected automatically.
756
- await user.keyboard( '[ArrowDown]' );
742
+ await press.ArrowDown();
757
743
  expect( await getSelectedTab() ).toHaveTextContent( 'Beta' );
758
744
  expect( await getSelectedTab() ).toHaveFocus();
759
745
  expect( mockOnSelect ).toHaveBeenCalledTimes( 2 );
@@ -761,7 +747,7 @@ describe.each( [
761
747
 
762
748
  // Navigate backwards with arrow keys. Make sure alpha is
763
749
  // selected automatically.
764
- await user.keyboard( '[ArrowUp]' );
750
+ await press.ArrowUp();
765
751
  expect( await getSelectedTab() ).toHaveTextContent( 'Alpha' );
766
752
  expect( await getSelectedTab() ).toHaveFocus();
767
753
  expect( mockOnSelect ).toHaveBeenCalledTimes( 3 );
@@ -769,7 +755,7 @@ describe.each( [
769
755
 
770
756
  // Navigate backwards with arrow keys. Make sure alpha is
771
757
  // selected automatically.
772
- await user.keyboard( '[ArrowUp]' );
758
+ await press.ArrowUp();
773
759
  expect( await getSelectedTab() ).toHaveTextContent( 'Gamma' );
774
760
  expect( await getSelectedTab() ).toHaveFocus();
775
761
  expect( mockOnSelect ).toHaveBeenCalledTimes( 4 );
@@ -777,7 +763,7 @@ describe.each( [
777
763
 
778
764
  // Navigate backwards with arrow keys. Make sure alpha is
779
765
  // selected automatically.
780
- await user.keyboard( '[ArrowDown]' );
766
+ await press.ArrowDown();
781
767
  expect( await getSelectedTab() ).toHaveTextContent( 'Alpha' );
782
768
  expect( await getSelectedTab() ).toHaveFocus();
783
769
  expect( mockOnSelect ).toHaveBeenCalledTimes( 5 );
@@ -785,7 +771,6 @@ describe.each( [
785
771
  } );
786
772
 
787
773
  it( 'should move focus on a tab even if disabled with arrow key, but not with pointer clicks', async () => {
788
- const user = userEvent.setup();
789
774
  const mockOnSelect = jest.fn();
790
775
 
791
776
  render(
@@ -810,7 +795,7 @@ describe.each( [
810
795
  // Tab to focus the tablist. Make sure Alpha is focused.
811
796
  expect( await getSelectedTab() ).toHaveTextContent( 'Alpha' );
812
797
  expect( await getSelectedTab() ).not.toHaveFocus();
813
- await user.keyboard( '[Tab]' );
798
+ await press.Tab();
814
799
  expect( await getSelectedTab() ).toHaveFocus();
815
800
  expect( mockOnSelect ).toHaveBeenCalledTimes( 1 );
816
801
 
@@ -819,7 +804,9 @@ describe.each( [
819
804
  // it was the tab that was last selected before delta. Therefore, the
820
805
  // `mockOnSelect` function gets called only twice (and not three times)
821
806
  // - it will receive focus, when using arrow keys
822
- await user.keyboard( '[ArrowRight][ArrowRight][ArrowRight]' );
807
+ await press.ArrowRight();
808
+ await press.ArrowRight();
809
+ await press.ArrowRight();
823
810
  expect( await getSelectedTab() ).toHaveTextContent( 'Gamma' );
824
811
  expect(
825
812
  screen.getByRole( 'tab', { name: 'Delta' } )
@@ -830,7 +817,7 @@ describe.each( [
830
817
  // Navigate backwards with arrow keys. The gamma tab receives focus.
831
818
  // The `mockOnSelect` callback doesn't fire, since the gamma tab was
832
819
  // already selected.
833
- await user.keyboard( '[ArrowLeft]' );
820
+ await press.ArrowLeft();
834
821
  expect( await getSelectedTab() ).toHaveTextContent( 'Gamma' );
835
822
  expect( await getSelectedTab() ).toHaveFocus();
836
823
  expect( mockOnSelect ).toHaveBeenCalledTimes( 3 );
@@ -838,34 +825,31 @@ describe.each( [
838
825
  // Click on the disabled tab. Compared to using arrow keys to move the
839
826
  // focus, disabled tabs ignore pointer clicks — and therefore, they don't
840
827
  // receive focus, nor they cause the `mockOnSelect` function to fire.
841
- await user.click( screen.getByRole( 'tab', { name: 'Delta' } ) );
828
+ await click( screen.getByRole( 'tab', { name: 'Delta' } ) );
842
829
  expect( await getSelectedTab() ).toHaveTextContent( 'Gamma' );
843
830
  expect( await getSelectedTab() ).toHaveFocus();
844
831
  expect( mockOnSelect ).toHaveBeenCalledTimes( 3 );
845
832
  } );
846
833
 
847
834
  it( 'should not focus the next tab when the Tab key is pressed', async () => {
848
- const user = userEvent.setup();
849
-
850
835
  render( <Component tabs={ TABS } children={ () => undefined } /> );
851
836
 
852
837
  // Tab should initially focus the first tab in the tablist, which
853
838
  // is Alpha.
854
- await user.keyboard( '[Tab]' );
839
+ await press.Tab();
855
840
  expect(
856
841
  await screen.findByRole( 'tab', { name: 'Alpha' } )
857
842
  ).toHaveFocus();
858
843
 
859
844
  // Because all other tabs should have `tabindex=-1`, pressing Tab
860
845
  // should NOT move the focus to the next tab, which is Beta.
861
- await user.keyboard( '[Tab]' );
846
+ await press.Tab();
862
847
  expect(
863
848
  await screen.findByRole( 'tab', { name: 'Beta' } )
864
849
  ).not.toHaveFocus();
865
850
  } );
866
851
 
867
852
  it( 'switches to manual tab activation when the `selectOnMove` prop is set to `false`', async () => {
868
- const user = userEvent.setup();
869
853
  const mockOnSelect = jest.fn();
870
854
 
871
855
  render(
@@ -883,33 +867,33 @@ describe.each( [
883
867
 
884
868
  // Click on Alpha and make sure it is selected.
885
869
  // onSelect shouldn't fire since the selected tab didn't change.
886
- await user.click( screen.getByRole( 'tab', { name: 'Alpha' } ) );
870
+ await click( screen.getByRole( 'tab', { name: 'Alpha' } ) );
887
871
  expect( mockOnSelect ).toHaveBeenCalledTimes( 1 );
888
872
  expect( mockOnSelect ).toHaveBeenLastCalledWith( 'alpha' );
889
873
 
890
874
  // Navigate forward with arrow keys. Make sure Beta is focused, but
891
875
  // that the tab selection happens only when pressing the spacebar
892
876
  // or enter key.
893
- await user.keyboard( '[ArrowRight]' );
877
+ await press.ArrowRight();
894
878
  expect( mockOnSelect ).toHaveBeenCalledTimes( 1 );
895
879
  expect(
896
880
  await screen.findByRole( 'tab', { name: 'Beta' } )
897
881
  ).toHaveFocus();
898
882
 
899
- await user.keyboard( '[Enter]' );
883
+ await press.Enter();
900
884
  expect( mockOnSelect ).toHaveBeenCalledTimes( 2 );
901
885
  expect( mockOnSelect ).toHaveBeenLastCalledWith( 'beta' );
902
886
 
903
887
  // Navigate forward with arrow keys. Make sure Gamma (last tab) is
904
888
  // focused, but that tab selection happens only when pressing the
905
889
  // spacebar or enter key.
906
- await user.keyboard( '[ArrowRight]' );
890
+ await press.ArrowRight();
907
891
  expect( mockOnSelect ).toHaveBeenCalledTimes( 2 );
908
892
  expect(
909
893
  screen.getByRole( 'tab', { name: 'Gamma' } )
910
894
  ).toHaveFocus();
911
895
 
912
- await user.keyboard( '[Space]' );
896
+ await press.Space();
913
897
  expect( mockOnSelect ).toHaveBeenCalledTimes( 3 );
914
898
  expect( mockOnSelect ).toHaveBeenLastCalledWith( 'gamma' );
915
899
  } );
@@ -931,7 +915,6 @@ describe.each( [
931
915
  } );
932
916
 
933
917
  it( 'should apply the `activeClass` to the selected tab', async () => {
934
- const user = userEvent.setup();
935
918
  const activeClass = 'my-active-tab';
936
919
 
937
920
  render(
@@ -952,7 +935,7 @@ describe.each( [
952
935
  } );
953
936
 
954
937
  // Click the 'Beta' tab
955
- await user.click( screen.getByRole( 'tab', { name: 'Beta' } ) );
938
+ await click( screen.getByRole( 'tab', { name: 'Beta' } ) );
956
939
 
957
940
  // Make sure that only the selected tab has the active class
958
941
  expect( await getSelectedTab() ).toHaveTextContent( 'Beta' );
@@ -163,9 +163,9 @@ The children elements, which should be a series of `Tabs.TabPanel` components.
163
163
 
164
164
  ##### Props
165
165
 
166
- ###### `id`: `string`
166
+ ###### `tabId`: `string`
167
167
 
168
- The id of the tab, which is prepended with the `Tabs` instance ID.
168
+ A unique identifier for the tab, which is used to generate a unique id for the underlying element. The value of this prop should match with the value of the `tabId` prop on the corresponding `Tabs.TabPanel` component.
169
169
 
170
170
  - Required: Yes
171
171
 
@@ -198,9 +198,9 @@ The children elements, generally the content to display on the tabpanel.
198
198
 
199
199
  - Required: No
200
200
 
201
- ###### `id`: `string`
201
+ ###### `tabId`: `string`
202
202
 
203
- The id of the tabpanel, which is combined with the `Tabs` instance ID and the suffix `-view`
203
+ A unique identifier for the tabpanel, which is used to generate an instanced id for the underlying element. The value of this prop should match with the value of the `tabId` prop on the corresponding `Tabs.Tab` component.
204
204
 
205
205
  - Required: Yes
206
206
 
@@ -45,7 +45,7 @@ function Tabs( {
45
45
  const isControlled = selectedTabId !== undefined;
46
46
 
47
47
  const { items, selectedId } = store.useState();
48
- const { setSelectedId } = store;
48
+ const { setSelectedId, move } = store;
49
49
 
50
50
  // Keep track of whether tabs have been populated. This is used to prevent
51
51
  // certain effects from firing too early while tab data and relevant
@@ -154,6 +154,27 @@ function Tabs( {
154
154
  setSelectedId,
155
155
  ] );
156
156
 
157
+ // In controlled mode, make sure browser focus follows the selected tab if
158
+ // the selection is changed while a tab is already being focused.
159
+ useLayoutEffect( () => {
160
+ if ( ! isControlled || ! selectOnMove ) {
161
+ return;
162
+ }
163
+ const currentItem = items.find( ( item ) => item.id === selectedId );
164
+ const activeElement = currentItem?.element?.ownerDocument.activeElement;
165
+ const tabsHasFocus = items.some( ( item ) => {
166
+ return activeElement && activeElement === item.element;
167
+ } );
168
+
169
+ if (
170
+ activeElement &&
171
+ tabsHasFocus &&
172
+ selectedId !== activeElement.id
173
+ ) {
174
+ move( selectedId );
175
+ }
176
+ }, [ isControlled, items, move, selectOnMove, selectedId ] );
177
+
157
178
  const contextValue = useMemo(
158
179
  () => ( {
159
180
  store,