@wordpress/components 28.10.0 → 28.12.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 (680) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/build/autocomplete/autocompleter-ui.js +2 -6
  3. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  4. package/build/autocomplete/autocompleter-ui.native.js +2 -4
  5. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  6. package/build/autocomplete/index.js +4 -5
  7. package/build/autocomplete/index.js.map +1 -1
  8. package/build/base-control/types.js.map +1 -1
  9. package/build/border-box-control/border-box-control/component.js +1 -0
  10. package/build/border-box-control/border-box-control/component.js.map +1 -1
  11. package/build/border-box-control/border-box-control/hook.js +6 -0
  12. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  13. package/build/border-control/border-control/component.js +1 -0
  14. package/build/border-control/border-control/component.js.map +1 -1
  15. package/build/border-control/border-control/hook.js +6 -0
  16. package/build/border-control/border-control/hook.js.map +1 -1
  17. package/build/border-control/border-control-dropdown/component.js +13 -13
  18. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  19. package/build/color-palette/index.js +1 -1
  20. package/build/color-palette/index.js.map +1 -1
  21. package/build/color-palette/index.native.js +1 -2
  22. package/build/color-palette/index.native.js.map +1 -1
  23. package/build/color-picker/index.native.js +0 -1
  24. package/build/color-picker/index.native.js.map +1 -1
  25. package/build/composite/legacy/index.js +5 -2
  26. package/build/composite/legacy/index.js.map +1 -1
  27. package/build/custom-gradient-picker/gradient-bar/control-points.js +1 -1
  28. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  29. package/build/date-time/date/index.js +0 -1
  30. package/build/date-time/date/index.js.map +1 -1
  31. package/build/font-size-picker/index.native.js +6 -6
  32. package/build/font-size-picker/index.native.js.map +1 -1
  33. package/build/form-file-upload/index.js +5 -1
  34. package/build/form-file-upload/index.js.map +1 -1
  35. package/build/form-token-field/index.js +0 -3
  36. package/build/form-token-field/index.js.map +1 -1
  37. package/build/form-token-field/suggestions-list.js +7 -3
  38. package/build/form-token-field/suggestions-list.js.map +1 -1
  39. package/build/form-token-field/token.js +1 -0
  40. package/build/form-token-field/token.js.map +1 -1
  41. package/build/guide/page-control.js +1 -0
  42. package/build/guide/page-control.js.map +1 -1
  43. package/build/{dropdown-menu-v2 → menu}/checkbox-item.js +8 -8
  44. package/build/menu/checkbox-item.js.map +1 -0
  45. package/build/{dropdown-menu-v2 → menu}/context.js +2 -2
  46. package/build/menu/context.js.map +1 -0
  47. package/build/{dropdown-menu-v2 → menu}/group-label.js +5 -5
  48. package/build/menu/group-label.js.map +1 -0
  49. package/build/{dropdown-menu-v2 → menu}/group.js +5 -5
  50. package/build/menu/group.js.map +1 -0
  51. package/build/{dropdown-menu-v2 → menu}/index.js +38 -38
  52. package/build/menu/index.js.map +1 -0
  53. package/build/{dropdown-menu-v2 → menu}/item-help-text.js +3 -3
  54. package/build/menu/item-help-text.js.map +1 -0
  55. package/build/{dropdown-menu-v2 → menu}/item-label.js +3 -3
  56. package/build/menu/item-label.js.map +1 -0
  57. package/build/{dropdown-menu-v2 → menu}/item.js +7 -7
  58. package/build/menu/item.js.map +1 -0
  59. package/build/{dropdown-menu-v2 → menu}/radio-item.js +8 -8
  60. package/build/menu/radio-item.js.map +1 -0
  61. package/build/{dropdown-menu-v2 → menu}/separator.js +6 -6
  62. package/build/menu/separator.js.map +1 -0
  63. package/build/menu/styles.js +150 -0
  64. package/build/menu/styles.js.map +1 -0
  65. package/build/menu/types.js.map +1 -0
  66. package/build/menu/use-temporary-focus-visible-fix.js.map +1 -0
  67. package/build/menu-item/index.js +1 -0
  68. package/build/menu-item/index.js.map +1 -1
  69. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +3 -5
  70. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  71. package/build/mobile/bottom-sheet/range-cell.native.js +1 -1
  72. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  73. package/build/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  74. package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  75. package/build/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
  76. package/build/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  77. package/build/mobile/bottom-sheet-select-control/index.native.js +2 -2
  78. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  79. package/build/mobile/color-settings/index.native.js +1 -3
  80. package/build/mobile/color-settings/index.native.js.map +1 -1
  81. package/build/mobile/color-settings/picker-screen.native.js +1 -3
  82. package/build/mobile/color-settings/picker-screen.native.js.map +1 -1
  83. package/build/mobile/image/index.native.js +1 -3
  84. package/build/mobile/image/index.native.js.map +1 -1
  85. package/build/mobile/keyboard-avoiding-view/index.ios.js +1 -3
  86. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  87. package/build/mobile/link-picker/link-picker-results.native.js +2 -5
  88. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  89. package/build/mobile/link-picker/link-picker-screen.native.js +1 -3
  90. package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  91. package/build/mobile/link-settings/index.native.js +6 -18
  92. package/build/mobile/link-settings/index.native.js.map +1 -1
  93. package/build/mobile/link-settings/link-settings-screen.native.js +1 -3
  94. package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  95. package/build/mobile/segmented-control/index.native.js +2 -6
  96. package/build/mobile/segmented-control/index.native.js.map +1 -1
  97. package/build/mobile/utils/use-unit-converter-to-mobile.native.js +2 -6
  98. package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  99. package/build/navigation/index.js +1 -2
  100. package/build/navigation/index.js.map +1 -1
  101. package/build/navigation/item/use-navigation-tree-item.js +2 -2
  102. package/build/navigation/item/use-navigation-tree-item.js.map +1 -1
  103. package/build/navigation/menu/menu-title-search.js +2 -2
  104. package/build/navigation/menu/menu-title-search.js.map +1 -1
  105. package/build/navigation/menu/use-navigation-tree-menu.js +2 -2
  106. package/build/navigation/menu/use-navigation-tree-menu.js.map +1 -1
  107. package/build/notice/index.js +2 -0
  108. package/build/notice/index.js.map +1 -1
  109. package/build/palette-edit/index.js +9 -2
  110. package/build/palette-edit/index.js.map +1 -1
  111. package/build/palette-edit/styles.js +13 -28
  112. package/build/palette-edit/styles.js.map +1 -1
  113. package/build/panel/body.js +1 -0
  114. package/build/panel/body.js.map +1 -1
  115. package/build/popover/index.js +4 -1
  116. package/build/popover/index.js.map +1 -1
  117. package/build/private-apis.js +4 -4
  118. package/build/private-apis.js.map +1 -1
  119. package/build/radio-group/index.js +3 -1
  120. package/build/radio-group/index.js.map +1 -1
  121. package/build/radio-group/radio.js +6 -0
  122. package/build/radio-group/radio.js.map +1 -1
  123. package/build/radio-group/types.js.map +1 -1
  124. package/build/sandbox/index.js +3 -6
  125. package/build/sandbox/index.js.map +1 -1
  126. package/build/sandbox/index.native.js +1 -3
  127. package/build/sandbox/index.native.js.map +1 -1
  128. package/build/search-control/index.native.js +1 -3
  129. package/build/search-control/index.native.js.map +1 -1
  130. package/build/slot-fill/bubbles-virtually/slot.js +1 -2
  131. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  132. package/build/slot-fill/fill.js +3 -6
  133. package/build/slot-fill/fill.js.map +1 -1
  134. package/build/snackbar/index.js +2 -1
  135. package/build/snackbar/index.js.map +1 -1
  136. package/build/spacer/hook.js +5 -3
  137. package/build/spacer/hook.js.map +1 -1
  138. package/build/tab-panel/index.js +4 -1
  139. package/build/tab-panel/index.js.map +1 -1
  140. package/build/tabs/index.js +48 -113
  141. package/build/tabs/index.js.map +1 -1
  142. package/build/tabs/styles.js +12 -12
  143. package/build/tabs/styles.js.map +1 -1
  144. package/build/tabs/tab.js +23 -6
  145. package/build/tabs/tab.js.map +1 -1
  146. package/build/tabs/tablist.js +37 -14
  147. package/build/tabs/tablist.js.map +1 -1
  148. package/build/tabs/types.js.map +1 -1
  149. package/build/toggle-group-control/toggle-group-control/component.js +3 -2
  150. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  151. package/build/toolbar/toolbar/index.js +3 -0
  152. package/build/toolbar/toolbar/index.js.map +1 -1
  153. package/build/tools-panel/tools-panel-header/component.js +1 -1
  154. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  155. package/build/tools-panel/tools-panel-item/hook.js +0 -2
  156. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  157. package/build/tooltip/index.native.js +5 -15
  158. package/build/tooltip/index.native.js.map +1 -1
  159. package/build/unit-control/index.native.js +2 -6
  160. package/build/unit-control/index.native.js.map +1 -1
  161. package/build/utils/deprecated-36px-size.js +27 -0
  162. package/build/utils/deprecated-36px-size.js.map +1 -0
  163. package/build/utils/element-rect.js +13 -2
  164. package/build/utils/element-rect.js.map +1 -1
  165. package/build/utils/hooks/use-animated-offset-rect.js +3 -2
  166. package/build/utils/hooks/use-animated-offset-rect.js.map +1 -1
  167. package/build/utils/hooks/use-update-effect.js +0 -2
  168. package/build/utils/hooks/use-update-effect.js.map +1 -1
  169. package/build-module/autocomplete/autocompleter-ui.js +2 -6
  170. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  171. package/build-module/autocomplete/autocompleter-ui.native.js +2 -4
  172. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  173. package/build-module/autocomplete/index.js +4 -5
  174. package/build-module/autocomplete/index.js.map +1 -1
  175. package/build-module/base-control/types.js.map +1 -1
  176. package/build-module/border-box-control/border-box-control/component.js +1 -0
  177. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  178. package/build-module/border-box-control/border-box-control/hook.js +6 -0
  179. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  180. package/build-module/border-control/border-control/component.js +1 -0
  181. package/build-module/border-control/border-control/component.js.map +1 -1
  182. package/build-module/border-control/border-control/hook.js +7 -0
  183. package/build-module/border-control/border-control/hook.js.map +1 -1
  184. package/build-module/border-control/border-control-dropdown/component.js +13 -13
  185. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  186. package/build-module/color-palette/index.js +1 -1
  187. package/build-module/color-palette/index.js.map +1 -1
  188. package/build-module/color-palette/index.native.js +1 -2
  189. package/build-module/color-palette/index.native.js.map +1 -1
  190. package/build-module/color-picker/index.native.js +0 -1
  191. package/build-module/color-picker/index.native.js.map +1 -1
  192. package/build-module/composite/legacy/index.js +5 -2
  193. package/build-module/composite/legacy/index.js.map +1 -1
  194. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +1 -1
  195. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  196. package/build-module/date-time/date/index.js +0 -1
  197. package/build-module/date-time/date/index.js.map +1 -1
  198. package/build-module/font-size-picker/index.native.js +7 -7
  199. package/build-module/font-size-picker/index.native.js.map +1 -1
  200. package/build-module/form-file-upload/index.js +5 -1
  201. package/build-module/form-file-upload/index.js.map +1 -1
  202. package/build-module/form-token-field/index.js +0 -3
  203. package/build-module/form-token-field/index.js.map +1 -1
  204. package/build-module/form-token-field/suggestions-list.js +7 -3
  205. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  206. package/build-module/form-token-field/token.js +1 -0
  207. package/build-module/form-token-field/token.js.map +1 -1
  208. package/build-module/guide/page-control.js +1 -0
  209. package/build-module/guide/page-control.js.map +1 -1
  210. package/build-module/{dropdown-menu-v2 → menu}/checkbox-item.js +8 -8
  211. package/build-module/menu/checkbox-item.js.map +1 -0
  212. package/build-module/{dropdown-menu-v2 → menu}/context.js +1 -1
  213. package/build-module/menu/context.js.map +1 -0
  214. package/build-module/{dropdown-menu-v2 → menu}/group-label.js +5 -5
  215. package/build-module/menu/group-label.js.map +1 -0
  216. package/build-module/menu/group.js +21 -0
  217. package/build-module/menu/group.js.map +1 -0
  218. package/build-module/{dropdown-menu-v2 → menu}/index.js +46 -46
  219. package/build-module/menu/index.js.map +1 -0
  220. package/build-module/{dropdown-menu-v2 → menu}/item-help-text.js +2 -2
  221. package/build-module/menu/item-help-text.js.map +1 -0
  222. package/build-module/{dropdown-menu-v2 → menu}/item-label.js +2 -2
  223. package/build-module/menu/item-label.js.map +1 -0
  224. package/build-module/{dropdown-menu-v2 → menu}/item.js +7 -7
  225. package/build-module/menu/item.js.map +1 -0
  226. package/build-module/{dropdown-menu-v2 → menu}/radio-item.js +8 -8
  227. package/build-module/menu/radio-item.js.map +1 -0
  228. package/build-module/menu/separator.js +22 -0
  229. package/build-module/menu/separator.js.map +1 -0
  230. package/build-module/menu/styles.js +143 -0
  231. package/build-module/menu/styles.js.map +1 -0
  232. package/build-module/menu/types.js.map +1 -0
  233. package/build-module/menu/use-temporary-focus-visible-fix.js.map +1 -0
  234. package/build-module/menu-item/index.js +1 -0
  235. package/build-module/menu-item/index.js.map +1 -1
  236. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +3 -5
  237. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  238. package/build-module/mobile/bottom-sheet/range-cell.native.js +1 -1
  239. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  240. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  241. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  242. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
  243. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  244. package/build-module/mobile/bottom-sheet-select-control/index.native.js +2 -2
  245. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  246. package/build-module/mobile/color-settings/index.native.js +1 -3
  247. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  248. package/build-module/mobile/color-settings/picker-screen.native.js +1 -3
  249. package/build-module/mobile/color-settings/picker-screen.native.js.map +1 -1
  250. package/build-module/mobile/image/index.native.js +1 -3
  251. package/build-module/mobile/image/index.native.js.map +1 -1
  252. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +1 -3
  253. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  254. package/build-module/mobile/link-picker/link-picker-results.native.js +2 -5
  255. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  256. package/build-module/mobile/link-picker/link-picker-screen.native.js +1 -3
  257. package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  258. package/build-module/mobile/link-settings/index.native.js +6 -18
  259. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  260. package/build-module/mobile/link-settings/link-settings-screen.native.js +1 -3
  261. package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  262. package/build-module/mobile/segmented-control/index.native.js +2 -6
  263. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  264. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js +2 -6
  265. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  266. package/build-module/navigation/index.js +1 -2
  267. package/build-module/navigation/index.js.map +1 -1
  268. package/build-module/navigation/item/use-navigation-tree-item.js +2 -2
  269. package/build-module/navigation/item/use-navigation-tree-item.js.map +1 -1
  270. package/build-module/navigation/menu/menu-title-search.js +2 -2
  271. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  272. package/build-module/navigation/menu/use-navigation-tree-menu.js +2 -2
  273. package/build-module/navigation/menu/use-navigation-tree-menu.js.map +1 -1
  274. package/build-module/notice/index.js +2 -0
  275. package/build-module/notice/index.js.map +1 -1
  276. package/build-module/palette-edit/index.js +11 -4
  277. package/build-module/palette-edit/index.js.map +1 -1
  278. package/build-module/palette-edit/styles.js +13 -29
  279. package/build-module/palette-edit/styles.js.map +1 -1
  280. package/build-module/panel/body.js +1 -0
  281. package/build-module/panel/body.js.map +1 -1
  282. package/build-module/popover/index.js +4 -1
  283. package/build-module/popover/index.js.map +1 -1
  284. package/build-module/private-apis.js +3 -3
  285. package/build-module/private-apis.js.map +1 -1
  286. package/build-module/radio-group/index.js +3 -1
  287. package/build-module/radio-group/index.js.map +1 -1
  288. package/build-module/radio-group/radio.js +6 -0
  289. package/build-module/radio-group/radio.js.map +1 -1
  290. package/build-module/radio-group/types.js.map +1 -1
  291. package/build-module/sandbox/index.js +3 -6
  292. package/build-module/sandbox/index.js.map +1 -1
  293. package/build-module/sandbox/index.native.js +1 -3
  294. package/build-module/sandbox/index.native.js.map +1 -1
  295. package/build-module/search-control/index.native.js +1 -3
  296. package/build-module/search-control/index.native.js.map +1 -1
  297. package/build-module/slot-fill/bubbles-virtually/slot.js +1 -2
  298. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  299. package/build-module/slot-fill/fill.js +3 -6
  300. package/build-module/slot-fill/fill.js.map +1 -1
  301. package/build-module/snackbar/index.js +2 -1
  302. package/build-module/snackbar/index.js.map +1 -1
  303. package/build-module/spacer/hook.js +5 -3
  304. package/build-module/spacer/hook.js.map +1 -1
  305. package/build-module/tab-panel/index.js +4 -1
  306. package/build-module/tab-panel/index.js.map +1 -1
  307. package/build-module/tabs/index.js +47 -112
  308. package/build-module/tabs/index.js.map +1 -1
  309. package/build-module/tabs/styles.js +11 -11
  310. package/build-module/tabs/styles.js.map +1 -1
  311. package/build-module/tabs/tab.js +21 -6
  312. package/build-module/tabs/tab.js.map +1 -1
  313. package/build-module/tabs/tablist.js +37 -14
  314. package/build-module/tabs/tablist.js.map +1 -1
  315. package/build-module/tabs/types.js.map +1 -1
  316. package/build-module/toggle-group-control/toggle-group-control/component.js +3 -2
  317. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  318. package/build-module/toolbar/toolbar/index.js +3 -0
  319. package/build-module/toolbar/toolbar/index.js.map +1 -1
  320. package/build-module/tools-panel/tools-panel-header/component.js +1 -1
  321. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  322. package/build-module/tools-panel/tools-panel-item/hook.js +0 -2
  323. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  324. package/build-module/tooltip/index.native.js +5 -15
  325. package/build-module/tooltip/index.native.js.map +1 -1
  326. package/build-module/unit-control/index.native.js +2 -6
  327. package/build-module/unit-control/index.native.js.map +1 -1
  328. package/build-module/utils/deprecated-36px-size.js +19 -0
  329. package/build-module/utils/deprecated-36px-size.js.map +1 -0
  330. package/build-module/utils/element-rect.js +13 -2
  331. package/build-module/utils/element-rect.js.map +1 -1
  332. package/build-module/utils/hooks/use-animated-offset-rect.js +3 -2
  333. package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -1
  334. package/build-module/utils/hooks/use-update-effect.js +0 -2
  335. package/build-module/utils/hooks/use-update-effect.js.map +1 -1
  336. package/build-style/style-rtl.css +21 -35
  337. package/build-style/style.css +21 -35
  338. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  339. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  340. package/build-types/autocomplete/index.d.ts.map +1 -1
  341. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  342. package/build-types/base-control/types.d.ts +3 -0
  343. package/build-types/base-control/types.d.ts.map +1 -1
  344. package/build-types/border-box-control/border-box-control/component.d.ts +1 -0
  345. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  346. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  347. package/build-types/border-control/border-control/component.d.ts +1 -0
  348. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  349. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  350. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  351. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  352. package/build-types/button/stories/index.story.d.ts.map +1 -1
  353. package/build-types/card/stories/index.story.d.ts.map +1 -1
  354. package/build-types/composite/legacy/index.d.ts.map +1 -1
  355. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  356. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  357. package/build-types/date-time/date/index.d.ts.map +1 -1
  358. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  359. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  360. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  361. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  362. package/build-types/form-file-upload/index.d.ts.map +1 -1
  363. package/build-types/form-token-field/index.d.ts.map +1 -1
  364. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
  365. package/build-types/form-token-field/token.d.ts.map +1 -1
  366. package/build-types/guide/page-control.d.ts.map +1 -1
  367. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  368. package/build-types/item-group/stories/index.story.d.ts +1 -1
  369. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  370. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  371. package/build-types/lock-unlock.d.ts +2 -2
  372. package/build-types/menu/checkbox-item.d.ts +3 -0
  373. package/build-types/menu/checkbox-item.d.ts.map +1 -0
  374. package/build-types/menu/context.d.ts +6 -0
  375. package/build-types/menu/context.d.ts.map +1 -0
  376. package/build-types/menu/group-label.d.ts +3 -0
  377. package/build-types/menu/group-label.d.ts.map +1 -0
  378. package/build-types/menu/group.d.ts +3 -0
  379. package/build-types/menu/group.d.ts.map +1 -0
  380. package/build-types/menu/index.d.ts +40 -0
  381. package/build-types/menu/index.d.ts.map +1 -0
  382. package/build-types/{dropdown-menu-v2 → menu}/item-help-text.d.ts +1 -1
  383. package/build-types/menu/item-help-text.d.ts.map +1 -0
  384. package/build-types/{dropdown-menu-v2 → menu}/item-label.d.ts +1 -1
  385. package/build-types/menu/item-label.d.ts.map +1 -0
  386. package/build-types/menu/item.d.ts +3 -0
  387. package/build-types/menu/item.d.ts.map +1 -0
  388. package/build-types/menu/radio-item.d.ts +3 -0
  389. package/build-types/menu/radio-item.d.ts.map +1 -0
  390. package/build-types/menu/separator.d.ts +3 -0
  391. package/build-types/menu/separator.d.ts.map +1 -0
  392. package/build-types/menu/stories/index.story.d.ts +16 -0
  393. package/build-types/menu/stories/index.story.d.ts.map +1 -0
  394. package/build-types/{dropdown-menu-v2 → menu}/styles.d.ts +13 -13
  395. package/build-types/menu/styles.d.ts.map +1 -0
  396. package/build-types/menu/test/index.d.ts.map +1 -0
  397. package/build-types/{dropdown-menu-v2 → menu}/types.d.ts +22 -21
  398. package/build-types/menu/types.d.ts.map +1 -0
  399. package/build-types/menu/use-temporary-focus-visible-fix.d.ts.map +1 -0
  400. package/build-types/menu-item/index.d.ts.map +1 -1
  401. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  402. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  403. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  404. package/build-types/navigation/index.d.ts.map +1 -1
  405. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  406. package/build-types/notice/index.d.ts.map +1 -1
  407. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  408. package/build-types/palette-edit/index.d.ts.map +1 -1
  409. package/build-types/palette-edit/styles.d.ts +0 -256
  410. package/build-types/palette-edit/styles.d.ts.map +1 -1
  411. package/build-types/panel/body.d.ts.map +1 -1
  412. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  413. package/build-types/popover/index.d.ts.map +1 -1
  414. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  415. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  416. package/build-types/radio-group/index.d.ts.map +1 -1
  417. package/build-types/radio-group/radio.d.ts +4 -2
  418. package/build-types/radio-group/radio.d.ts.map +1 -1
  419. package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
  420. package/build-types/radio-group/types.d.ts +5 -1
  421. package/build-types/radio-group/types.d.ts.map +1 -1
  422. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  423. package/build-types/sandbox/index.d.ts.map +1 -1
  424. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  425. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  426. package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
  427. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  428. package/build-types/slot-fill/fill.d.ts.map +1 -1
  429. package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
  430. package/build-types/snackbar/index.d.ts.map +1 -1
  431. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  432. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  433. package/build-types/spacer/hook.d.ts.map +1 -1
  434. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  435. package/build-types/tab-panel/index.d.ts.map +1 -1
  436. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  437. package/build-types/tabs/index.d.ts +21 -8
  438. package/build-types/tabs/index.d.ts.map +1 -1
  439. package/build-types/tabs/stories/index.story.d.ts +1 -1
  440. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  441. package/build-types/tabs/styles.d.ts +6 -3
  442. package/build-types/tabs/styles.d.ts.map +1 -1
  443. package/build-types/tabs/tab.d.ts +0 -3
  444. package/build-types/tabs/tab.d.ts.map +1 -1
  445. package/build-types/tabs/tablist.d.ts.map +1 -1
  446. package/build-types/tabs/types.d.ts +85 -48
  447. package/build-types/tabs/types.d.ts.map +1 -1
  448. package/build-types/text/stories/index.story.d.ts.map +1 -1
  449. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  450. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  451. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  452. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  453. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  454. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  455. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  456. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  457. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  458. package/build-types/utils/deprecated-36px-size.d.ts +6 -0
  459. package/build-types/utils/deprecated-36px-size.d.ts.map +1 -0
  460. package/build-types/utils/element-rect.d.ts +1 -1
  461. package/build-types/utils/element-rect.d.ts.map +1 -1
  462. package/build-types/utils/hooks/use-animated-offset-rect.d.ts +8 -1
  463. package/build-types/utils/hooks/use-animated-offset-rect.d.ts.map +1 -1
  464. package/build-types/utils/hooks/use-update-effect.d.ts.map +1 -1
  465. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  466. package/package.json +21 -20
  467. package/src/alignment-matrix-control/README.md +1 -2
  468. package/src/angle-picker-control/README.md +1 -2
  469. package/src/animate/stories/index.story.tsx +2 -1
  470. package/src/autocomplete/autocompleter-ui.native.js +2 -4
  471. package/src/autocomplete/autocompleter-ui.tsx +2 -6
  472. package/src/autocomplete/index.tsx +4 -5
  473. package/src/base-control/README.md +58 -47
  474. package/src/base-control/docs-manifest.json +12 -0
  475. package/src/base-control/stories/index.story.tsx +4 -0
  476. package/src/base-control/types.ts +3 -0
  477. package/src/border-box-control/border-box-control/README.md +1 -0
  478. package/src/border-box-control/border-box-control/component.tsx +1 -0
  479. package/src/border-box-control/border-box-control/hook.ts +7 -0
  480. package/src/border-box-control/stories/index.story.tsx +1 -0
  481. package/src/border-box-control/test/index.tsx +1 -0
  482. package/src/border-control/border-control/README.md +1 -0
  483. package/src/border-control/border-control/component.tsx +1 -0
  484. package/src/border-control/border-control/hook.ts +7 -1
  485. package/src/border-control/border-control-dropdown/component.tsx +25 -13
  486. package/src/border-control/stories/index.story.tsx +1 -0
  487. package/src/border-control/test/index.js +1 -0
  488. package/src/button/stories/index.story.tsx +2 -1
  489. package/src/card/stories/index.story.tsx +2 -1
  490. package/src/color-palette/index.native.js +1 -2
  491. package/src/color-palette/index.tsx +1 -1
  492. package/src/color-palette/style.scss +2 -4
  493. package/src/color-picker/index.native.js +0 -1
  494. package/src/composite/legacy/index.tsx +5 -2
  495. package/src/composite/stories/index.story.tsx +2 -1
  496. package/src/confirm-dialog/stories/index.story.tsx +2 -1
  497. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +1 -1
  498. package/src/date-time/date/index.tsx +0 -1
  499. package/src/disabled/stories/index.story.tsx +2 -1
  500. package/src/draggable/stories/index.story.tsx +2 -1
  501. package/src/dropdown/stories/index.story.tsx +2 -1
  502. package/src/external-link/stories/index.story.tsx +2 -1
  503. package/src/font-size-picker/index.native.js +7 -7
  504. package/src/form-file-upload/index.tsx +7 -1
  505. package/src/form-token-field/index.tsx +0 -3
  506. package/src/form-token-field/style.scss +12 -13
  507. package/src/form-token-field/suggestions-list.tsx +6 -0
  508. package/src/form-token-field/token.tsx +1 -0
  509. package/src/guide/page-control.tsx +1 -0
  510. package/src/guide/style.scss +4 -6
  511. package/src/heading/stories/index.story.tsx +2 -1
  512. package/src/item-group/stories/index.story.tsx +8 -4
  513. package/src/keyboard-shortcuts/stories/index.story.tsx +2 -1
  514. package/src/{dropdown-menu-v2 → menu}/README.md +34 -34
  515. package/src/{dropdown-menu-v2 → menu}/checkbox-item.tsx +14 -14
  516. package/src/menu/context.tsx +13 -0
  517. package/src/{dropdown-menu-v2 → menu}/group-label.tsx +8 -8
  518. package/src/menu/group.tsx +26 -0
  519. package/src/{dropdown-menu-v2 → menu}/index.tsx +65 -70
  520. package/src/{dropdown-menu-v2 → menu}/item-help-text.tsx +3 -7
  521. package/src/{dropdown-menu-v2 → menu}/item-label.tsx +3 -7
  522. package/src/{dropdown-menu-v2 → menu}/item.tsx +13 -13
  523. package/src/{dropdown-menu-v2 → menu}/radio-item.tsx +14 -14
  524. package/src/menu/separator.tsx +27 -0
  525. package/src/menu/stories/index.story.tsx +543 -0
  526. package/src/{dropdown-menu-v2 → menu}/styles.ts +17 -17
  527. package/src/{dropdown-menu-v2 → menu}/test/index.tsx +145 -225
  528. package/src/{dropdown-menu-v2 → menu}/types.ts +24 -23
  529. package/src/menu-item/index.tsx +1 -0
  530. package/src/menu-item/test/__snapshots__/index.js.snap +4 -4
  531. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +3 -5
  532. package/src/mobile/bottom-sheet/range-cell.native.js +1 -1
  533. package/src/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  534. package/src/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
  535. package/src/mobile/bottom-sheet-select-control/index.native.js +2 -2
  536. package/src/mobile/color-settings/index.native.js +1 -3
  537. package/src/mobile/color-settings/picker-screen.native.js +1 -3
  538. package/src/mobile/image/index.native.js +1 -3
  539. package/src/mobile/keyboard-avoiding-view/index.ios.js +1 -3
  540. package/src/mobile/link-picker/link-picker-results.native.js +2 -5
  541. package/src/mobile/link-picker/link-picker-screen.native.js +1 -3
  542. package/src/mobile/link-settings/index.native.js +6 -18
  543. package/src/mobile/link-settings/link-settings-screen.native.js +1 -3
  544. package/src/mobile/segmented-control/index.native.js +2 -6
  545. package/src/mobile/utils/use-unit-converter-to-mobile.native.js +2 -6
  546. package/src/modal/stories/index.story.tsx +2 -1
  547. package/src/navigable-container/stories/navigable-menu.story.tsx +2 -1
  548. package/src/navigable-container/stories/tabbable-container.story.tsx +2 -1
  549. package/src/navigation/index.tsx +1 -2
  550. package/src/navigation/item/use-navigation-tree-item.tsx +2 -2
  551. package/src/navigation/menu/menu-title-search.tsx +2 -2
  552. package/src/navigation/menu/use-navigation-tree-menu.tsx +2 -2
  553. package/src/navigator/stories/index.story.tsx +2 -1
  554. package/src/notice/index.tsx +2 -0
  555. package/src/notice/stories/index.story.tsx +7 -2
  556. package/src/notice/test/__snapshots__/index.tsx.snap +4 -4
  557. package/src/palette-edit/index.tsx +9 -5
  558. package/src/palette-edit/styles.ts +1 -67
  559. package/src/panel/body.tsx +1 -0
  560. package/src/panel/stories/index.story.tsx +2 -1
  561. package/src/popover/index.tsx +3 -0
  562. package/src/popover/stories/index.story.tsx +2 -1
  563. package/src/private-apis.ts +3 -3
  564. package/src/progress-bar/stories/index.story.tsx +2 -1
  565. package/src/radio-group/README.md +8 -8
  566. package/src/radio-group/index.tsx +2 -0
  567. package/src/radio-group/radio.tsx +7 -0
  568. package/src/radio-group/stories/index.story.tsx +16 -4
  569. package/src/radio-group/types.ts +6 -1
  570. package/src/resizable-box/stories/index.story.tsx +2 -1
  571. package/src/sandbox/index.native.js +1 -3
  572. package/src/sandbox/index.tsx +3 -6
  573. package/src/sandbox/stories/index.story.tsx +2 -1
  574. package/src/scroll-lock/stories/index.story.tsx +2 -1
  575. package/src/search-control/index.native.js +1 -3
  576. package/src/shortcut/stories/index.story.tsx +2 -1
  577. package/src/slot-fill/bubbles-virtually/slot.tsx +1 -2
  578. package/src/slot-fill/fill.ts +3 -6
  579. package/src/slot-fill/stories/index.story.tsx +2 -1
  580. package/src/snackbar/index.tsx +2 -1
  581. package/src/snackbar/stories/index.story.tsx +2 -1
  582. package/src/snackbar/stories/list.story.tsx +2 -1
  583. package/src/snackbar/style.scss +7 -16
  584. package/src/spacer/hook.ts +3 -2
  585. package/src/spinner/stories/index.story.tsx +2 -1
  586. package/src/tab-panel/index.tsx +3 -0
  587. package/src/tab-panel/stories/index.story.tsx +2 -1
  588. package/src/tab-panel/style.scss +1 -3
  589. package/src/tabs/README.md +63 -21
  590. package/src/tabs/index.tsx +112 -189
  591. package/src/tabs/stories/index.story.tsx +5 -2
  592. package/src/tabs/styles.ts +13 -5
  593. package/src/tabs/tab.tsx +23 -3
  594. package/src/tabs/tablist.tsx +44 -17
  595. package/src/tabs/test/index.tsx +131 -118
  596. package/src/tabs/types.ts +89 -49
  597. package/src/text/stories/index.story.tsx +2 -1
  598. package/src/text-highlight/stories/index.story.tsx +2 -1
  599. package/src/theme/stories/index.story.tsx +2 -1
  600. package/src/tip/stories/index.story.tsx +2 -1
  601. package/src/toggle-group-control/toggle-group-control/component.tsx +2 -1
  602. package/src/toolbar/toolbar/index.tsx +3 -0
  603. package/src/tools-panel/tools-panel-header/component.tsx +1 -1
  604. package/src/tools-panel/tools-panel-item/hook.ts +0 -2
  605. package/src/tooltip/index.native.js +5 -15
  606. package/src/tooltip/stories/index.story.tsx +2 -1
  607. package/src/tree-grid/stories/index.story.tsx +2 -1
  608. package/src/truncate/stories/index.story.tsx +2 -1
  609. package/src/unit-control/index.native.js +2 -6
  610. package/src/utils/deprecated-36px-size.ts +27 -0
  611. package/src/utils/element-rect.ts +14 -2
  612. package/src/utils/hooks/use-animated-offset-rect.ts +13 -1
  613. package/src/utils/hooks/use-update-effect.js +0 -2
  614. package/src/visually-hidden/stories/index.story.tsx +2 -1
  615. package/tsconfig.tsbuildinfo +1 -1
  616. package/build/dropdown-menu-v2/checkbox-item.js.map +0 -1
  617. package/build/dropdown-menu-v2/context.js.map +0 -1
  618. package/build/dropdown-menu-v2/group-label.js.map +0 -1
  619. package/build/dropdown-menu-v2/group.js.map +0 -1
  620. package/build/dropdown-menu-v2/index.js.map +0 -1
  621. package/build/dropdown-menu-v2/item-help-text.js.map +0 -1
  622. package/build/dropdown-menu-v2/item-label.js.map +0 -1
  623. package/build/dropdown-menu-v2/item.js.map +0 -1
  624. package/build/dropdown-menu-v2/radio-item.js.map +0 -1
  625. package/build/dropdown-menu-v2/separator.js.map +0 -1
  626. package/build/dropdown-menu-v2/styles.js +0 -150
  627. package/build/dropdown-menu-v2/styles.js.map +0 -1
  628. package/build/dropdown-menu-v2/types.js.map +0 -1
  629. package/build/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +0 -1
  630. package/build-module/dropdown-menu-v2/checkbox-item.js.map +0 -1
  631. package/build-module/dropdown-menu-v2/context.js.map +0 -1
  632. package/build-module/dropdown-menu-v2/group-label.js.map +0 -1
  633. package/build-module/dropdown-menu-v2/group.js +0 -21
  634. package/build-module/dropdown-menu-v2/group.js.map +0 -1
  635. package/build-module/dropdown-menu-v2/index.js.map +0 -1
  636. package/build-module/dropdown-menu-v2/item-help-text.js.map +0 -1
  637. package/build-module/dropdown-menu-v2/item-label.js.map +0 -1
  638. package/build-module/dropdown-menu-v2/item.js.map +0 -1
  639. package/build-module/dropdown-menu-v2/radio-item.js.map +0 -1
  640. package/build-module/dropdown-menu-v2/separator.js +0 -22
  641. package/build-module/dropdown-menu-v2/separator.js.map +0 -1
  642. package/build-module/dropdown-menu-v2/styles.js +0 -143
  643. package/build-module/dropdown-menu-v2/styles.js.map +0 -1
  644. package/build-module/dropdown-menu-v2/types.js.map +0 -1
  645. package/build-module/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +0 -1
  646. package/build-types/dropdown-menu-v2/checkbox-item.d.ts +0 -3
  647. package/build-types/dropdown-menu-v2/checkbox-item.d.ts.map +0 -1
  648. package/build-types/dropdown-menu-v2/context.d.ts +0 -6
  649. package/build-types/dropdown-menu-v2/context.d.ts.map +0 -1
  650. package/build-types/dropdown-menu-v2/group-label.d.ts +0 -3
  651. package/build-types/dropdown-menu-v2/group-label.d.ts.map +0 -1
  652. package/build-types/dropdown-menu-v2/group.d.ts +0 -3
  653. package/build-types/dropdown-menu-v2/group.d.ts.map +0 -1
  654. package/build-types/dropdown-menu-v2/index.d.ts +0 -40
  655. package/build-types/dropdown-menu-v2/index.d.ts.map +0 -1
  656. package/build-types/dropdown-menu-v2/item-help-text.d.ts.map +0 -1
  657. package/build-types/dropdown-menu-v2/item-label.d.ts.map +0 -1
  658. package/build-types/dropdown-menu-v2/item.d.ts +0 -3
  659. package/build-types/dropdown-menu-v2/item.d.ts.map +0 -1
  660. package/build-types/dropdown-menu-v2/radio-item.d.ts +0 -3
  661. package/build-types/dropdown-menu-v2/radio-item.d.ts.map +0 -1
  662. package/build-types/dropdown-menu-v2/separator.d.ts +0 -3
  663. package/build-types/dropdown-menu-v2/separator.d.ts.map +0 -1
  664. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +0 -16
  665. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +0 -1
  666. package/build-types/dropdown-menu-v2/styles.d.ts.map +0 -1
  667. package/build-types/dropdown-menu-v2/test/index.d.ts.map +0 -1
  668. package/build-types/dropdown-menu-v2/types.d.ts.map +0 -1
  669. package/build-types/dropdown-menu-v2/use-temporary-focus-visible-fix.d.ts.map +0 -1
  670. package/src/dropdown-menu-v2/context.tsx +0 -13
  671. package/src/dropdown-menu-v2/group.tsx +0 -26
  672. package/src/dropdown-menu-v2/separator.tsx +0 -27
  673. package/src/dropdown-menu-v2/stories/index.story.tsx +0 -639
  674. /package/build/{dropdown-menu-v2 → menu}/types.js +0 -0
  675. /package/build/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.js +0 -0
  676. /package/build-module/{dropdown-menu-v2 → menu}/types.js +0 -0
  677. /package/build-module/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.js +0 -0
  678. /package/build-types/{dropdown-menu-v2 → menu}/test/index.d.ts +0 -0
  679. /package/build-types/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.d.ts +0 -0
  680. /package/src/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.ts +0 -0
package/src/tabs/types.ts CHANGED
@@ -18,98 +18,138 @@ export type TabsContextProps =
18
18
 
19
19
  export type TabsProps = {
20
20
  /**
21
- * The children elements, which should be at least a
22
- * `Tabs.Tablist` component and a series of `Tabs.TabPanel`
23
- * components.
21
+ * The children elements, which should include one instance of the
22
+ * `Tabs.Tablist` component and as many instances of the `Tabs.TabPanel`
23
+ * components as there are `Tabs.Tab` components.
24
24
  */
25
- children: React.ReactNode;
25
+ children: Ariakit.TabProps[ 'children' ];
26
26
  /**
27
- * When `true`, the tab will be selected when receiving focus (automatic tab
28
- * activation). When `false`, the tab will be selected only when clicked
29
- * (manual tab activation). See the official W3C docs for more info.
27
+ * Determines if the tab should be selected when it receives focus. If set to
28
+ * `false`, the tab will only be selected upon clicking, not when using arrow
29
+ * keys to shift focus (manual tab activation). See the official W3C docs
30
+ * for more info.
30
31
  *
31
32
  * @default true
32
33
  *
33
34
  * @see https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/
34
35
  */
35
- selectOnMove?: boolean;
36
+ selectOnMove?: Ariakit.TabStoreProps[ 'selectOnMove' ];
36
37
  /**
37
- * The id of the tab to be selected upon mounting of component.
38
- * If this prop is not set, the first tab will be selected by default.
39
- * The id provided will be internally prefixed with the
40
- * `TabsContextProps.instanceId`.
38
+ * The id of the tab whose panel is currently visible.
39
+ *
40
+ * If left `undefined`, it will be automatically set to the first enabled
41
+ * tab, and the component assumes it is being used in "uncontrolled" mode.
42
+ *
43
+ * Consequently, any value different than `undefined` will set the component
44
+ * in "controlled" mode. When in "controlled" mode, the `null` value will
45
+ * result in no tabs being selected, and the tablist becoming tabbable.
46
+ */
47
+ selectedTabId?: Ariakit.TabStoreProps[ 'selectedId' ];
48
+ /**
49
+ * The id of the tab whose panel is currently visible.
50
+ *
51
+ * If left `undefined`, it will be automatically set to the first enabled
52
+ * tab. If set to `null`, no tab will be selected, and the tablist will be
53
+ * tabbable.
41
54
  *
42
55
  * Note: this prop will be overridden by the `selectedTabId` prop if it is
43
- * provided. (Controlled Mode)
56
+ * provided (meaning the component will be used in "controlled" mode).
44
57
  */
45
- defaultTabId?: string;
58
+ defaultTabId?: Ariakit.TabStoreProps[ 'defaultSelectedId' ];
46
59
  /**
47
- * The function called when a tab has been selected.
48
- * It is passed the id of the newly selected tab as an argument.
60
+ * The function called when the `selectedTabId` changes.
49
61
  */
50
- onSelect?: ( selectedId: string | null | undefined ) => void;
51
-
62
+ onSelect?: Ariakit.TabStoreProps[ 'setSelectedId' ];
52
63
  /**
53
- * The orientation of the tablist.
64
+ * The current active tab `id`. The active tab is the tab element within the
65
+ * tablist widget that has DOM focus.
66
+ * - `null` represents the tablist (ie. the base composite element). Users
67
+ * will be able to navigate out of it using arrow keys.
68
+ * - If `activeTabId` is initially set to `null`, the base composite element
69
+ * itself will have focus and users will be able to navigate to it using
70
+ * arrow keys.activeTabId
71
+ */
72
+ activeTabId?: Ariakit.TabStoreProps[ 'activeId' ];
73
+ /**
74
+ * The tab id that should be active by default when the composite widget is
75
+ * rendered. If `null`, the tablist element itself will have focus
76
+ * and users will be able to navigate to it using arrow keys. If `undefined`,
77
+ * the first enabled item will be focused.
54
78
  *
55
- * @default `horizontal`
79
+ * Note: this prop will be overridden by the `activeTabId` prop if it is
80
+ * provided.
81
+ */
82
+ defaultActiveTabId?: Ariakit.TabStoreProps[ 'defaultActiveId' ];
83
+ /**
84
+ * A callback that gets called when the `activeTabId` state changes.
56
85
  */
57
- orientation?: 'horizontal' | 'vertical';
86
+ onActiveTabIdChange?: Ariakit.TabStoreProps[ 'setActiveId' ];
58
87
  /**
59
- * The Id of the tab to display. This id is prepended with the `Tabs`
60
- * instanceId internally.
88
+ * Defines the orientation of the tablist and determines which arrow keys
89
+ * can be used to move focus:
90
+ * - `both`: all arrow keys work.
91
+ * - `horizontal`: only left and right arrow keys work.
92
+ * - `vertical`: only up and down arrow keys work.
61
93
  *
62
- * If left `undefined`, the component assumes it is being used in
63
- * uncontrolled mode. Consequently, any value different than `undefined`
64
- * will set the component in `controlled` mode.
65
- * When in controlled mode, the `null` value will result in no tab being selected.
94
+ * @default "horizontal"
66
95
  */
67
- selectedTabId?: string | null;
96
+ orientation?: Ariakit.TabStoreProps[ 'orientation' ];
68
97
  };
69
98
 
70
99
  export type TabListProps = {
71
100
  /**
72
- * The children elements, which should be a series of `Tabs.TabPanel` components.
101
+ * The children elements, which should include one or more instances of the
102
+ * `Tabs.Tab` component.
73
103
  */
74
- children?: React.ReactNode;
104
+ children: Ariakit.TabListProps[ 'children' ];
75
105
  };
76
106
 
107
+ // TODO: consider prop name changes (tabId, selectedTabId)
108
+ // switch to auto-generated README
109
+ // compound technique
110
+
77
111
  export type TabProps = {
78
112
  /**
79
- * The id of the tab, which is prepended with the `Tabs` instanceId.
80
- * The value of this prop should match with the value of the `tabId` prop on
81
- * the corresponding `Tabs.TabPanel` component.
113
+ * The unique ID of the tab. It will be used to register the tab and match
114
+ * it to a corresponding `Tabs.TabPanel` component.
82
115
  */
83
- tabId: string;
116
+ tabId: NonNullable< Ariakit.TabProps[ 'id' ] >;
84
117
  /**
85
- * The children elements, generally the text to display on the tab.
118
+ * The contents of the tab.
86
119
  */
87
- children?: React.ReactNode;
120
+ children?: Ariakit.TabProps[ 'children' ];
88
121
  /**
89
- * Determines if the tab button should be disabled.
122
+ * Determines if the tab should be disabled. Note that disabled tabs can
123
+ * still be accessed via the keyboard when navigating through the tablist.
90
124
  *
91
125
  * @default false
92
126
  */
93
- disabled?: boolean;
127
+ disabled?: Ariakit.TabProps[ 'disabled' ];
94
128
  /**
95
- * The type of component to render the tab button as. If this prop is not
96
- * provided, the tab button will be rendered as a `button` element.
129
+ * Allows the component to be rendered as a different HTML element or React
130
+ * component. The value can be a React element or a function that takes in the
131
+ * original component props and gives back a React element with the props
132
+ * merged.
133
+ *
134
+ * By default, the tab will be rendered as a `button` element.
97
135
  */
98
- render?: React.ReactElement;
136
+ render?: Ariakit.TabProps[ 'render' ];
99
137
  };
100
138
 
101
139
  export type TabPanelProps = {
102
140
  /**
103
- * The children elements, generally the content to display on the tabpanel.
141
+ * The contents of the tab panel.
104
142
  */
105
- children?: React.ReactNode;
143
+ children?: Ariakit.TabPanelProps[ 'children' ];
106
144
  /**
107
- * A unique identifier for the tabpanel, which is used to generate an
108
- * instanced id for the underlying element.
109
- * The value of this prop should match with the value of the `tabId` prop on
110
- * the corresponding `Tabs.Tab` component.
145
+ * The unique `id` of the `Tabs.Tab` component controlling this panel. This
146
+ * connection is used to assign the `aria-labelledby` attribute to the tab
147
+ * panel and to determine if the tab panel should be visible.
148
+ *
149
+ * If not provided, this link is automatically established by matching the
150
+ * order of `Tabs.Tab` and `Tabs.TabPanel` elements in the DOM.
111
151
  */
112
- tabId: string;
152
+ tabId: NonNullable< Ariakit.TabPanelProps[ 'tabId' ] >;
113
153
  /**
114
154
  * Determines whether or not the tabpanel element should be focusable.
115
155
  * If `false`, pressing the tab key will skip over the tabpanel, and instead
@@ -117,5 +157,5 @@ export type TabPanelProps = {
117
157
  *
118
158
  * @default true
119
159
  */
120
- focusable?: boolean;
160
+ focusable?: Ariakit.TabPanelProps[ 'focusable' ];
121
161
  };
@@ -10,7 +10,8 @@ import { Text } from '../component';
10
10
 
11
11
  const meta: Meta< typeof Text > = {
12
12
  component: Text,
13
- title: 'Components (Experimental)/Text',
13
+ title: 'Components (Experimental)/Typography/Text',
14
+ id: 'components-experimental-text',
14
15
  argTypes: {
15
16
  as: { control: { type: 'text' } },
16
17
  color: { control: { type: 'color' } },
@@ -10,7 +10,8 @@ import TextHighlight from '..';
10
10
 
11
11
  const meta: Meta< typeof TextHighlight > = {
12
12
  component: TextHighlight,
13
- title: 'Components/TextHighlight',
13
+ title: 'Components/Typography/TextHighlight',
14
+ id: 'components-texthighlight',
14
15
  parameters: {
15
16
  controls: {
16
17
  expanded: true,
@@ -13,7 +13,8 @@ import { HStack } from '../../h-stack';
13
13
 
14
14
  const meta: Meta< typeof Theme > = {
15
15
  component: Theme,
16
- title: 'Components/Theme',
16
+ title: 'Components/Utilities/Theme',
17
+ id: 'components-theme',
17
18
  argTypes: {
18
19
  accent: { control: { type: 'color' } },
19
20
  background: { control: { type: 'color' } },
@@ -10,7 +10,8 @@ import Tip from '..';
10
10
 
11
11
  const meta: Meta< typeof Tip > = {
12
12
  component: Tip,
13
- title: 'Components/Tip',
13
+ title: 'Components/Feedback/Tip',
14
+ id: 'components-tip',
14
15
  argTypes: {
15
16
  children: { control: { type: 'text' } },
16
17
  },
@@ -52,12 +52,13 @@ function UnconnectedToggleGroupControl(
52
52
  const [ controlElement, setControlElement ] = useState< HTMLElement >();
53
53
  const refs = useMergeRefs( [ setControlElement, forwardedRef ] );
54
54
  const selectedRect = useTrackElementOffsetRect(
55
- value ? selectedElement : undefined
55
+ value || value === 0 ? selectedElement : undefined
56
56
  );
57
57
  useAnimatedOffsetRect( controlElement, selectedRect, {
58
58
  prefix: 'selected',
59
59
  dataAttribute: 'indicator-animated',
60
60
  transitionEndFilter: ( event ) => event.pseudoElement === '::before',
61
+ roundRect: true,
61
62
  } );
62
63
 
63
64
  const cx = useCx();
@@ -40,6 +40,9 @@ function UnforwardedToolbar(
40
40
  Dropdown: {
41
41
  variant: 'toolbar',
42
42
  },
43
+ Menu: {
44
+ variant: 'toolbar',
45
+ },
43
46
  };
44
47
  }, [ isVariantDefined ] );
45
48
 
@@ -106,7 +106,7 @@ const OptionalControlsGroup = ( {
106
106
  )
107
107
  : sprintf(
108
108
  // translators: %s: The name of the control to display e.g. "Padding".
109
- __( 'Show %s' ),
109
+ _x( 'Show %s', 'input control' ),
110
110
  label
111
111
  );
112
112
 
@@ -54,11 +54,9 @@ export function useToolsPanelItem(
54
54
 
55
55
  // hasValue is a new function on every render, so do not add it as a
56
56
  // dependency to the useCallback hook! If needed, we should use a ref.
57
- // eslint-disable-next-line react-hooks/exhaustive-deps
58
57
  const hasValueCallback = useCallback( hasValue, [ panelId ] );
59
58
  // resetAllFilter is a new function on every render, so do not add it as a
60
59
  // dependency to the useCallback hook! If needed, we should use a ref.
61
- // eslint-disable-next-line react-hooks/exhaustive-deps
62
60
  const resetAllFilterCallback = useCallback( resetAllFilter, [ panelId ] );
63
61
  const previousPanelId = usePrevious( currentPanelId );
64
62
 
@@ -62,9 +62,7 @@ const useKeyboardVisibility = () => {
62
62
  showListener.remove();
63
63
  hideListener.remove();
64
64
  };
65
- // Disable reason: deferring this refactor to the native team.
66
- // see https://github.com/WordPress/gutenberg/pull/41166
67
- // eslint-disable-next-line react-hooks/exhaustive-deps
65
+ // See https://github.com/WordPress/gutenberg/pull/41166
68
66
  }, [] );
69
67
 
70
68
  return keyboardVisible;
@@ -105,9 +103,7 @@ const Tooltip = ( {
105
103
  } );
106
104
  }
107
105
  return () => onHandleScreenTouch( null );
108
- // Disable reason: deferring this refactor to the native team.
109
- // see https://github.com/WordPress/gutenberg/pull/41166
110
- // eslint-disable-next-line react-hooks/exhaustive-deps
106
+ // See https://github.com/WordPress/gutenberg/pull/41166
111
107
  }, [ visible ] );
112
108
 
113
109
  // Manage visibility animation.
@@ -121,9 +117,7 @@ const Tooltip = ( {
121
117
  setAnimating( true );
122
118
  startAnimation();
123
119
  }
124
- // Disable reason: deferring this refactor to the native team.
125
- // see https://github.com/WordPress/gutenberg/pull/41166
126
- // eslint-disable-next-line react-hooks/exhaustive-deps
120
+ // See https://github.com/WordPress/gutenberg/pull/41166
127
121
  }, [ visible ] );
128
122
 
129
123
  // Manage tooltip visibility and position in relation to keyboard.
@@ -142,9 +136,7 @@ const Tooltip = ( {
142
136
  setAnimating( true );
143
137
  setVisible( false );
144
138
  }
145
- // Disable reason: deferring this refactor to the native team.
146
- // see https://github.com/WordPress/gutenberg/pull/41166
147
- // eslint-disable-next-line react-hooks/exhaustive-deps
139
+ // See https://github.com/WordPress/gutenberg/pull/41166
148
140
  }, [ visible, keyboardVisible ] );
149
141
 
150
142
  // Manage tooltip position during keyboard frame changes.
@@ -273,9 +265,7 @@ const TooltipSlot = ( { children, ...rest } ) => {
273
265
  setHandleScreenTouch( null );
274
266
  };
275
267
  // Memoize context value to avoid unnecessary rerenders of the Provider's children
276
- // Disable reason: deferring this refactor to the native team.
277
- // see https://github.com/WordPress/gutenberg/pull/41166
278
- // eslint-disable-next-line react-hooks/exhaustive-deps
268
+ // See https://github.com/WordPress/gutenberg/pull/41166
279
269
  const value = useMemo( () => ( { onHandleScreenTouch } ) );
280
270
 
281
271
  return (
@@ -15,7 +15,8 @@ import Tooltip from '..';
15
15
  import Button from '../../button';
16
16
 
17
17
  const meta: Meta< typeof Tooltip > = {
18
- title: 'Components/Tooltip',
18
+ title: 'Components/Overlays/Tooltip',
19
+ id: 'components-tooltip',
19
20
  component: Tooltip,
20
21
  argTypes: {
21
22
  children: { control: { type: null } },
@@ -16,7 +16,8 @@ import { Button } from '../../button';
16
16
  import InputControl from '../../input-control';
17
17
 
18
18
  const meta: Meta< typeof TreeGrid > = {
19
- title: 'Components (Experimental)/TreeGrid',
19
+ title: 'Components (Experimental)/Navigation/TreeGrid',
20
+ id: 'components-experimental-treegrid',
20
21
  component: TreeGrid,
21
22
  // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
22
23
  subcomponents: { TreeGridRow, TreeGridCell },
@@ -10,7 +10,8 @@ import { Truncate } from '..';
10
10
 
11
11
  const meta: Meta< typeof Truncate > = {
12
12
  component: Truncate,
13
- title: 'Components (Experimental)/Truncate',
13
+ title: 'Components (Experimental)/Typography/Truncate',
14
+ id: 'components-experimental-truncate',
14
15
  argTypes: {
15
16
  children: { control: { type: 'text' } },
16
17
  as: { control: { type: 'text' } },
@@ -47,10 +47,8 @@ function UnitControl( {
47
47
  if ( pickerRef?.current ) {
48
48
  pickerRef.current.presentPicker();
49
49
  }
50
- // Disable reason: this should be fixed by the native team.
51
- // It would be great if this could be done in the context of
50
+ // It would be great if the deps could be addressed in the context of
52
51
  // https://github.com/WordPress/gutenberg/pull/39218
53
- // eslint-disable-next-line react-hooks/exhaustive-deps
54
52
  }, [ pickerRef?.current ] );
55
53
 
56
54
  const currentInputValue = currentInput === null ? value : currentInput;
@@ -106,10 +104,8 @@ function UnitControl( {
106
104
  anchorNodeRef?.current
107
105
  ? findNodeHandle( anchorNodeRef?.current )
108
106
  : undefined,
109
- // Disable reason: this should be fixed by the native team.
110
- // It would be great if this could be done in the context of
107
+ // It would be great if the deps could be addressed in the context of
111
108
  // https://github.com/WordPress/gutenberg/pull/39218
112
- // eslint-disable-next-line react-hooks/exhaustive-deps
113
109
  [ anchorNodeRef?.current ]
114
110
  );
115
111
 
@@ -0,0 +1,27 @@
1
+ /**
2
+ * WordPress dependencies
3
+ */
4
+ import deprecated from '@wordpress/deprecated';
5
+
6
+ export function maybeWarnDeprecated36pxSize( {
7
+ componentName,
8
+ __next40pxDefaultSize,
9
+ size,
10
+ }: {
11
+ componentName: string;
12
+ __next40pxDefaultSize: boolean | undefined;
13
+ size: string | undefined;
14
+ } ) {
15
+ if (
16
+ __next40pxDefaultSize ||
17
+ ( size !== undefined && size !== 'default' )
18
+ ) {
19
+ return;
20
+ }
21
+
22
+ deprecated( `36px default size for wp.components.${ componentName }`, {
23
+ since: '6.8',
24
+ version: '7.1',
25
+ hint: 'Set the `__next40pxDefaultSize` prop to true to start opting into the new default size, which will become the default in a future version.',
26
+ } );
27
+ }
@@ -134,14 +134,17 @@ const POLL_RATE = 100;
134
134
  * milliseconds until it succeeds.
135
135
  */
136
136
  export function useTrackElementOffsetRect(
137
- targetElement: HTMLElement | undefined | null
137
+ targetElement: HTMLElement | undefined | null,
138
+ deps: unknown[] = []
138
139
  ) {
139
140
  const [ indicatorPosition, setIndicatorPosition ] =
140
141
  useState< ElementOffsetRect >( NULL_ELEMENT_OFFSET_RECT );
141
142
  const intervalRef = useRef< ReturnType< typeof setInterval > >();
142
143
 
143
144
  const measure = useEvent( () => {
144
- if ( targetElement ) {
145
+ // Check that the targetElement is still attached to the DOM, in case
146
+ // it was removed since the last `measure` call.
147
+ if ( targetElement && targetElement.isConnected ) {
145
148
  const elementOffsetRect = getElementOffsetRect( targetElement );
146
149
  if ( elementOffsetRect ) {
147
150
  setIndicatorPosition( elementOffsetRect );
@@ -171,6 +174,15 @@ export function useTrackElementOffsetRect(
171
174
  }
172
175
  }, [ setElement, targetElement ] );
173
176
 
177
+ // Escape hatch to force a remeasurement when something else changes rather
178
+ // than the target elements' ref or size (for example, the target element
179
+ // can change its position within the tablist).
180
+ useLayoutEffect( () => {
181
+ measure();
182
+ // `measure` is a stable function, so it's safe to omit it from the deps array.
183
+ // deps can't be statically analyzed by ESLint
184
+ }, deps );
185
+
174
186
  return indicatorPosition;
175
187
  }
176
188
 
@@ -46,6 +46,7 @@ export function useAnimatedOffsetRect(
46
46
  prefix = 'subelement',
47
47
  dataAttribute = `${ prefix }-animated`,
48
48
  transitionEndFilter = () => true,
49
+ roundRect = false,
49
50
  }: {
50
51
  /**
51
52
  * The prefix used for the CSS variables, e.g. if `prefix` is `selected`, the
@@ -72,6 +73,13 @@ export function useAnimatedOffsetRect(
72
73
  * @default () => true
73
74
  */
74
75
  transitionEndFilter?: ( event: TransitionEvent ) => boolean;
76
+ /**
77
+ * Whether the `rect` measurements should be rounded down when applied
78
+ * to the CSS variables. This can be useful to avoid blurry animations or
79
+ * to avoid subpixel rendering issues.
80
+ * @default false
81
+ */
82
+ roundRect?: boolean;
75
83
  } = {}
76
84
  ) {
77
85
  const setProperties = useEvent( () => {
@@ -80,7 +88,11 @@ export function useAnimatedOffsetRect(
80
88
  property !== 'element' &&
81
89
  container?.style.setProperty(
82
90
  `--${ prefix }-${ property }`,
83
- String( rect[ property ] )
91
+ String(
92
+ roundRect
93
+ ? Math.floor( rect[ property ] )
94
+ : rect[ property ]
95
+ )
84
96
  )
85
97
  );
86
98
  } );
@@ -19,11 +19,9 @@ function useUpdateEffect( effect, deps ) {
19
19
  }
20
20
  mountedRef.current = true;
21
21
  return undefined;
22
- // Disable reasons:
23
22
  // 1. This hook needs to pass a dep list that isn't an array literal
24
23
  // 2. `effect` is missing from the array, and will need to be added carefully to avoid additional warnings
25
24
  // see https://github.com/WordPress/gutenberg/pull/41166
26
- // eslint-disable-next-line react-hooks/exhaustive-deps
27
25
  }, deps );
28
26
 
29
27
  useEffect(
@@ -10,7 +10,8 @@ import { VisuallyHidden } from '..';
10
10
 
11
11
  const meta: Meta< typeof VisuallyHidden > = {
12
12
  component: VisuallyHidden,
13
- title: 'Components/VisuallyHidden',
13
+ title: 'Components/Typography/VisuallyHidden',
14
+ id: 'components-visuallyhidden',
14
15
  argTypes: {
15
16
  children: { control: { type: null } },
16
17
  as: { control: { type: 'text' } },