@wordpress/components 23.8.0 → 24.0.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 (389) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/CONTRIBUTING.md +65 -1
  3. package/README.md +1 -3
  4. package/build/autocomplete/autocompleter-ui.js +0 -2
  5. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  6. package/build/autocomplete/index.js +2 -0
  7. package/build/autocomplete/index.js.map +1 -1
  8. package/build/button/index.js +2 -0
  9. package/build/button/index.js.map +1 -1
  10. package/build/card/card-media/component.js +2 -1
  11. package/build/card/card-media/component.js.map +1 -1
  12. package/build/checkbox-control/index.js +2 -2
  13. package/build/checkbox-control/index.js.map +1 -1
  14. package/build/color-palette/index.native.js +12 -0
  15. package/build/color-palette/index.native.js.map +1 -1
  16. package/build/combobox-control/index.js +7 -5
  17. package/build/combobox-control/index.js.map +1 -1
  18. package/build/combobox-control/styles.js +3 -3
  19. package/build/combobox-control/styles.js.map +1 -1
  20. package/build/custom-gradient-picker/index.native.js +3 -1
  21. package/build/custom-gradient-picker/index.native.js.map +1 -1
  22. package/build/dimension-control/index.js +1 -1
  23. package/build/dimension-control/index.js.map +1 -1
  24. package/build/draggable/index.js +8 -8
  25. package/build/draggable/index.js.map +1 -1
  26. package/build/form-token-field/index.js +5 -3
  27. package/build/form-token-field/index.js.map +1 -1
  28. package/build/form-token-field/styles.js +3 -3
  29. package/build/form-token-field/styles.js.map +1 -1
  30. package/build/index.js.map +1 -1
  31. package/build/mobile/bottom-sheet/cell.native.js +6 -6
  32. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  33. package/build/mobile/color-settings/palette.screen.native.js +0 -8
  34. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  35. package/build/mobile/global-styles-context/index.native.js +13 -1
  36. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  37. package/build/mobile/global-styles-context/utils.native.js +21 -4
  38. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  39. package/build/mobile/link-picker/link-picker-results.native.js +3 -1
  40. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  41. package/build/mobile/segmented-control/index.native.js +4 -2
  42. package/build/mobile/segmented-control/index.native.js.map +1 -1
  43. package/build/modal/index.js +2 -1
  44. package/build/modal/index.js.map +1 -1
  45. package/build/navigable-container/container.js +39 -19
  46. package/build/navigable-container/container.js.map +1 -1
  47. package/build/navigable-container/index.js.map +1 -1
  48. package/build/navigable-container/menu.js +37 -5
  49. package/build/navigable-container/menu.js.map +1 -1
  50. package/build/navigable-container/tabbable.js +45 -4
  51. package/build/navigable-container/tabbable.js.map +1 -1
  52. package/build/navigable-container/types.js +6 -0
  53. package/build/navigable-container/types.js.map +1 -0
  54. package/build/navigator/navigator-screen/component.js +1 -1
  55. package/build/navigator/navigator-screen/component.js.map +1 -1
  56. package/build/palette-edit/index.js +34 -12
  57. package/build/palette-edit/index.js.map +1 -1
  58. package/build/popover/index.js +1 -8
  59. package/build/popover/index.js.map +1 -1
  60. package/build/private-apis.js +4 -1
  61. package/build/private-apis.js.map +1 -1
  62. package/build/sandbox/index.native.js +10 -3
  63. package/build/sandbox/index.native.js.map +1 -1
  64. package/build/slot-fill/bubbles-virtually/fill.js +2 -1
  65. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  66. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +45 -35
  67. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  68. package/build/slot-fill/bubbles-virtually/use-slot.js +11 -26
  69. package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  70. package/build/slot-fill/fill.js +7 -31
  71. package/build/slot-fill/fill.js.map +1 -1
  72. package/build/slot-fill/index.js +20 -7
  73. package/build/slot-fill/index.js.map +1 -1
  74. package/build/slot-fill/provider.js +0 -6
  75. package/build/slot-fill/provider.js.map +1 -1
  76. package/build/slot-fill/slot.js +0 -5
  77. package/build/slot-fill/slot.js.map +1 -1
  78. package/build/spinner/styles.js +4 -4
  79. package/build/spinner/styles.js.map +1 -1
  80. package/build/tab-panel/index.js.map +1 -1
  81. package/build/theme/color-algorithms.js +1 -1
  82. package/build/theme/color-algorithms.js.map +1 -1
  83. package/build/toolbar/toolbar-button/index.js +1 -2
  84. package/build/toolbar/toolbar-button/index.js.map +1 -1
  85. package/build/toolbar/toolbar-item/index.js +4 -2
  86. package/build/toolbar/toolbar-item/index.js.map +1 -1
  87. package/build/tree-grid/index.js +3 -3
  88. package/build/tree-grid/index.js.map +1 -1
  89. package/build/utils/colors-values.js +3 -3
  90. package/build/utils/colors-values.js.map +1 -1
  91. package/build/utils/use-deprecated-props.js +35 -0
  92. package/build/utils/use-deprecated-props.js.map +1 -0
  93. package/build/view/component.js +1 -2
  94. package/build/view/component.js.map +1 -1
  95. package/build-module/autocomplete/autocompleter-ui.js +1 -3
  96. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  97. package/build-module/autocomplete/index.js +3 -3
  98. package/build-module/autocomplete/index.js.map +1 -1
  99. package/build-module/button/index.js +2 -0
  100. package/build-module/button/index.js.map +1 -1
  101. package/build-module/card/card-media/component.js +2 -1
  102. package/build-module/card/card-media/component.js.map +1 -1
  103. package/build-module/checkbox-control/index.js +2 -2
  104. package/build-module/checkbox-control/index.js.map +1 -1
  105. package/build-module/color-palette/index.native.js +13 -1
  106. package/build-module/color-palette/index.native.js.map +1 -1
  107. package/build-module/combobox-control/index.js +6 -5
  108. package/build-module/combobox-control/index.js.map +1 -1
  109. package/build-module/combobox-control/styles.js +3 -3
  110. package/build-module/combobox-control/styles.js.map +1 -1
  111. package/build-module/custom-gradient-picker/index.native.js +3 -1
  112. package/build-module/custom-gradient-picker/index.native.js.map +1 -1
  113. package/build-module/dimension-control/index.js +1 -1
  114. package/build-module/dimension-control/index.js.map +1 -1
  115. package/build-module/draggable/index.js +8 -8
  116. package/build-module/draggable/index.js.map +1 -1
  117. package/build-module/form-token-field/index.js +4 -3
  118. package/build-module/form-token-field/index.js.map +1 -1
  119. package/build-module/form-token-field/styles.js +3 -3
  120. package/build-module/form-token-field/styles.js.map +1 -1
  121. package/build-module/index.js.map +1 -1
  122. package/build-module/mobile/bottom-sheet/cell.native.js +6 -5
  123. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  124. package/build-module/mobile/color-settings/palette.screen.native.js +0 -8
  125. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  126. package/build-module/mobile/global-styles-context/index.native.js +13 -1
  127. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  128. package/build-module/mobile/global-styles-context/utils.native.js +21 -3
  129. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  130. package/build-module/mobile/link-picker/link-picker-results.native.js +3 -1
  131. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  132. package/build-module/mobile/segmented-control/index.native.js +4 -2
  133. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  134. package/build-module/modal/index.js +2 -1
  135. package/build-module/modal/index.js.map +1 -1
  136. package/build-module/navigable-container/container.js +43 -19
  137. package/build-module/navigable-container/container.js.map +1 -1
  138. package/build-module/navigable-container/index.js +0 -2
  139. package/build-module/navigable-container/index.js.map +1 -1
  140. package/build-module/navigable-container/menu.js +36 -4
  141. package/build-module/navigable-container/menu.js.map +1 -1
  142. package/build-module/navigable-container/tabbable.js +44 -3
  143. package/build-module/navigable-container/tabbable.js.map +1 -1
  144. package/build-module/navigable-container/types.js +2 -0
  145. package/build-module/navigable-container/types.js.map +1 -0
  146. package/build-module/navigator/navigator-screen/component.js +1 -1
  147. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  148. package/build-module/palette-edit/index.js +34 -13
  149. package/build-module/palette-edit/index.js.map +1 -1
  150. package/build-module/popover/index.js +1 -8
  151. package/build-module/popover/index.js.map +1 -1
  152. package/build-module/private-apis.js +3 -1
  153. package/build-module/private-apis.js.map +1 -1
  154. package/build-module/sandbox/index.native.js +10 -3
  155. package/build-module/sandbox/index.native.js.map +1 -1
  156. package/build-module/slot-fill/bubbles-virtually/fill.js +2 -1
  157. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  158. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +46 -36
  159. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  160. package/build-module/slot-fill/bubbles-virtually/use-slot.js +12 -27
  161. package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  162. package/build-module/slot-fill/fill.js +7 -31
  163. package/build-module/slot-fill/fill.js.map +1 -1
  164. package/build-module/slot-fill/index.js +17 -8
  165. package/build-module/slot-fill/index.js.map +1 -1
  166. package/build-module/slot-fill/provider.js +0 -6
  167. package/build-module/slot-fill/provider.js.map +1 -1
  168. package/build-module/slot-fill/slot.js +0 -5
  169. package/build-module/slot-fill/slot.js.map +1 -1
  170. package/build-module/spinner/styles.js +4 -4
  171. package/build-module/spinner/styles.js.map +1 -1
  172. package/build-module/tab-panel/index.js.map +1 -1
  173. package/build-module/theme/color-algorithms.js +1 -1
  174. package/build-module/theme/color-algorithms.js.map +1 -1
  175. package/build-module/toolbar/toolbar-button/index.js +1 -2
  176. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  177. package/build-module/toolbar/toolbar-item/index.js +5 -2
  178. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  179. package/build-module/tree-grid/index.js +3 -3
  180. package/build-module/tree-grid/index.js.map +1 -1
  181. package/build-module/utils/colors-values.js +3 -3
  182. package/build-module/utils/colors-values.js.map +1 -1
  183. package/build-module/utils/use-deprecated-props.js +25 -0
  184. package/build-module/utils/use-deprecated-props.js.map +1 -0
  185. package/build-module/view/component.js +1 -2
  186. package/build-module/view/component.js.map +1 -1
  187. package/build-style/style-rtl.css +83 -70
  188. package/build-style/style.css +83 -70
  189. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  190. package/build-types/autocomplete/index.d.ts.map +1 -1
  191. package/build-types/autocomplete/types.d.ts +2 -18
  192. package/build-types/autocomplete/types.d.ts.map +1 -1
  193. package/build-types/box-control/styles/box-control-styles.d.ts +1 -1
  194. package/build-types/button/deprecated.d.ts +12 -6
  195. package/build-types/button/deprecated.d.ts.map +1 -1
  196. package/build-types/button/index.d.ts.map +1 -1
  197. package/build-types/button/types.d.ts +7 -0
  198. package/build-types/button/types.d.ts.map +1 -1
  199. package/build-types/card/card-media/component.d.ts +2 -1
  200. package/build-types/card/card-media/component.d.ts.map +1 -1
  201. package/build-types/card/stories/index.d.ts +21 -1
  202. package/build-types/card/stories/index.d.ts.map +1 -1
  203. package/build-types/checkbox-control/index.d.ts.map +1 -1
  204. package/build-types/color-palette/styles.d.ts +1 -1
  205. package/build-types/color-picker/styles.d.ts +3 -3
  206. package/build-types/combobox-control/index.d.ts +1 -1
  207. package/build-types/combobox-control/index.d.ts.map +1 -1
  208. package/build-types/combobox-control/stories/index.d.ts.map +1 -1
  209. package/build-types/combobox-control/styles.d.ts +1 -1
  210. package/build-types/combobox-control/types.d.ts +8 -1
  211. package/build-types/combobox-control/types.d.ts.map +1 -1
  212. package/build-types/date-time/date/styles.d.ts +1 -1
  213. package/build-types/date-time/time/styles.d.ts +4 -4
  214. package/build-types/dimension-control/index.d.ts +1 -1
  215. package/build-types/draggable/index.d.ts +1 -1
  216. package/build-types/draggable/index.d.ts.map +1 -1
  217. package/build-types/draggable/stories/index.d.ts +8 -0
  218. package/build-types/draggable/stories/index.d.ts.map +1 -1
  219. package/build-types/draggable/types.d.ts +7 -0
  220. package/build-types/draggable/types.d.ts.map +1 -1
  221. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
  222. package/build-types/form-token-field/index.d.ts.map +1 -1
  223. package/build-types/form-token-field/styles.d.ts +1 -1
  224. package/build-types/form-token-field/types.d.ts +8 -1
  225. package/build-types/form-token-field/types.d.ts.map +1 -1
  226. package/build-types/index.d.ts +1 -0
  227. package/build-types/index.d.ts.map +1 -1
  228. package/build-types/modal/index.d.ts.map +1 -1
  229. package/build-types/navigable-container/container.d.ts +20 -1
  230. package/build-types/navigable-container/container.d.ts.map +1 -1
  231. package/build-types/navigable-container/index.d.ts +5 -2
  232. package/build-types/navigable-container/index.d.ts.map +1 -1
  233. package/build-types/navigable-container/menu.d.ts +45 -11
  234. package/build-types/navigable-container/menu.d.ts.map +1 -1
  235. package/build-types/navigable-container/stories/navigable-menu.d.ts +12 -0
  236. package/build-types/navigable-container/stories/navigable-menu.d.ts.map +1 -0
  237. package/build-types/navigable-container/stories/tabbable-container.d.ts +12 -0
  238. package/build-types/navigable-container/stories/tabbable-container.d.ts.map +1 -0
  239. package/build-types/navigable-container/tabbable.d.ts +52 -9
  240. package/build-types/navigable-container/tabbable.d.ts.map +1 -1
  241. package/build-types/navigable-container/test/navigable-menu.d.ts +2 -0
  242. package/build-types/navigable-container/test/navigable-menu.d.ts.map +1 -0
  243. package/build-types/navigable-container/test/tababble-container.d.ts +2 -0
  244. package/build-types/navigable-container/test/tababble-container.d.ts.map +1 -0
  245. package/build-types/navigable-container/types.d.ts +61 -0
  246. package/build-types/navigable-container/types.d.ts.map +1 -0
  247. package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
  248. package/build-types/navigator/navigator-back-button/component.d.ts +2 -1
  249. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  250. package/build-types/navigator/navigator-back-button/hook.d.ts +2 -1
  251. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  252. package/build-types/navigator/navigator-button/component.d.ts +2 -1
  253. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  254. package/build-types/navigator/navigator-button/hook.d.ts +2 -1
  255. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  256. package/build-types/navigator/navigator-screen/component.d.ts +1 -1
  257. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  258. package/build-types/navigator/navigator-to-parent-button/component.d.ts +2 -1
  259. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  260. package/build-types/number-control/index.d.ts +1 -1
  261. package/build-types/number-control/stories/index.d.ts +1 -1
  262. package/build-types/palette-edit/index.d.ts +1 -1
  263. package/build-types/palette-edit/index.d.ts.map +1 -1
  264. package/build-types/palette-edit/stories/index.d.ts.map +1 -1
  265. package/build-types/palette-edit/styles.d.ts +16 -10
  266. package/build-types/palette-edit/styles.d.ts.map +1 -1
  267. package/build-types/palette-edit/types.d.ts +8 -0
  268. package/build-types/palette-edit/types.d.ts.map +1 -1
  269. package/build-types/popover/index.d.ts +1 -1
  270. package/build-types/popover/index.d.ts.map +1 -1
  271. package/build-types/popover/stories/e2e/index.d.ts +1 -1
  272. package/build-types/private-apis.d.ts.map +1 -1
  273. package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
  274. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  275. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  276. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  277. package/build-types/slot-fill/fill.d.ts +4 -2
  278. package/build-types/slot-fill/fill.d.ts.map +1 -1
  279. package/build-types/slot-fill/index.d.ts +14 -3
  280. package/build-types/slot-fill/index.d.ts.map +1 -1
  281. package/build-types/slot-fill/provider.d.ts +0 -2
  282. package/build-types/slot-fill/provider.d.ts.map +1 -1
  283. package/build-types/slot-fill/slot.d.ts.map +1 -1
  284. package/build-types/spinner/styles.d.ts.map +1 -1
  285. package/build-types/toolbar/stories/index.d.ts.map +1 -1
  286. package/build-types/toolbar/toolbar-button/index.d.ts +12 -6
  287. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  288. package/build-types/toolbar/toolbar-item/index.d.ts +6 -4
  289. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  290. package/build-types/tree-grid/index.d.ts.map +1 -1
  291. package/build-types/tree-grid/types.d.ts +7 -0
  292. package/build-types/tree-grid/types.d.ts.map +1 -1
  293. package/build-types/ui/context/wordpress-component.d.ts +1 -1
  294. package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
  295. package/build-types/unit-control/index.d.ts +1 -1
  296. package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -1
  297. package/build-types/utils/use-deprecated-props.d.ts +9 -0
  298. package/build-types/utils/use-deprecated-props.d.ts.map +1 -0
  299. package/build-types/view/component.d.ts +1 -1
  300. package/build-types/view/component.d.ts.map +1 -1
  301. package/package.json +21 -22
  302. package/src/autocomplete/README.md +82 -54
  303. package/src/autocomplete/autocompleter-ui.tsx +0 -2
  304. package/src/autocomplete/index.tsx +1 -2
  305. package/src/autocomplete/types.ts +3 -19
  306. package/src/button/index.tsx +2 -0
  307. package/src/button/style.scss +13 -6
  308. package/src/button/types.ts +7 -0
  309. package/src/card/card-media/README.md +1 -1
  310. package/src/card/card-media/component.tsx +2 -1
  311. package/src/card/stories/index.tsx +47 -26
  312. package/src/checkbox-control/index.tsx +6 -2
  313. package/src/checkbox-control/style.scss +1 -4
  314. package/src/color-palette/index.native.js +20 -1
  315. package/src/color-picker/test/index.tsx +99 -99
  316. package/src/combobox-control/index.tsx +24 -18
  317. package/src/combobox-control/stories/index.tsx +0 -1
  318. package/src/combobox-control/styles.ts +4 -4
  319. package/src/combobox-control/types.ts +8 -1
  320. package/src/custom-gradient-picker/index.native.js +1 -1
  321. package/src/custom-gradient-picker/style.scss +2 -2
  322. package/src/dimension-control/README.md +1 -1
  323. package/src/dimension-control/index.tsx +1 -1
  324. package/src/draggable/README.md +8 -1
  325. package/src/draggable/index.tsx +7 -10
  326. package/src/draggable/stories/index.tsx +69 -33
  327. package/src/draggable/types.ts +7 -0
  328. package/src/form-toggle/style.scss +1 -5
  329. package/src/form-token-field/index.tsx +7 -3
  330. package/src/form-token-field/styles.ts +4 -4
  331. package/src/form-token-field/types.ts +8 -1
  332. package/src/index.ts +1 -0
  333. package/src/mobile/bottom-sheet/cell.native.js +4 -5
  334. package/src/mobile/color-settings/palette.screen.native.js +0 -7
  335. package/src/mobile/global-styles-context/index.native.js +12 -1
  336. package/src/mobile/global-styles-context/utils.native.js +18 -3
  337. package/src/mobile/link-picker/link-picker-results.native.js +3 -0
  338. package/src/mobile/segmented-control/index.native.js +2 -2
  339. package/src/modal/index.tsx +6 -1
  340. package/src/modal/style.scss +21 -13
  341. package/src/navigable-container/README.md +24 -13
  342. package/src/navigable-container/{container.js → container.tsx} +57 -27
  343. package/src/navigable-container/{index.js → index.tsx} +0 -1
  344. package/src/navigable-container/menu.tsx +100 -0
  345. package/src/navigable-container/stories/{navigable-menu.js → navigable-menu.tsx} +15 -10
  346. package/src/navigable-container/stories/{tabbable-container.js → tabbable-container.tsx} +15 -6
  347. package/src/navigable-container/tabbable.tsx +92 -0
  348. package/src/navigable-container/test/{navigable-menu.js → navigable-menu.tsx} +3 -1
  349. package/src/navigable-container/test/{tababble-container.js → tababble-container.tsx} +53 -24
  350. package/src/navigable-container/types.ts +76 -0
  351. package/src/navigator/navigator-screen/component.tsx +1 -1
  352. package/src/palette-edit/index.tsx +45 -7
  353. package/src/palette-edit/stories/index.tsx +4 -0
  354. package/src/palette-edit/types.ts +11 -0
  355. package/src/popover/index.tsx +2 -15
  356. package/src/private-apis.ts +2 -0
  357. package/src/sandbox/index.native.js +12 -1
  358. package/src/slot-fill/bubbles-virtually/fill.js +2 -1
  359. package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +46 -60
  360. package/src/slot-fill/bubbles-virtually/use-slot.js +14 -41
  361. package/src/slot-fill/fill.js +4 -26
  362. package/src/slot-fill/index.js +14 -8
  363. package/src/slot-fill/provider.js +0 -6
  364. package/src/slot-fill/slot.js +0 -5
  365. package/src/snackbar/style.scss +2 -1
  366. package/src/spinner/styles.ts +2 -0
  367. package/src/style.scss +6 -0
  368. package/src/tab-panel/index.tsx +1 -1
  369. package/src/theme/color-algorithms.ts +1 -1
  370. package/src/theme/stories/index.tsx +1 -1
  371. package/src/theme/test/color-algorithms.ts +2 -2
  372. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +4 -4
  373. package/src/toolbar/stories/index.tsx +26 -24
  374. package/src/toolbar/toolbar-button/index.tsx +10 -13
  375. package/src/toolbar/toolbar-item/{index.js → index.tsx} +12 -3
  376. package/src/tree-grid/README.md +18 -0
  377. package/src/tree-grid/index.tsx +7 -2
  378. package/src/tree-grid/types.ts +7 -0
  379. package/src/ui/context/wordpress-component.ts +1 -1
  380. package/src/utils/colors-values.js +3 -3
  381. package/src/utils/theme-variables.scss +4 -4
  382. package/src/utils/use-deprecated-props.ts +29 -0
  383. package/src/view/component.tsx +2 -2
  384. package/tsconfig.json +3 -2
  385. package/tsconfig.tsbuildinfo +1 -1
  386. package/src/CONTRIBUTING.md +0 -78
  387. package/src/README.md +0 -20
  388. package/src/navigable-container/menu.js +0 -62
  389. package/src/navigable-container/tabbable.js +0 -46
@@ -23,6 +23,13 @@ export type TreeGridRowProps = {
23
23
  * An optional value that designates whether a row is expanded or collapsed.
24
24
  * Currently this value only sets the correct aria-expanded property on a row,
25
25
  * it has no other built-in behavior.
26
+ *
27
+ * If there is a need to implement `aria-expanded` elsewhere in the row, cell,
28
+ * or element within a cell, you may pass `isExpanded={ undefined }`.
29
+ * In order for keyboard navigation to continue working, add the
30
+ * `data-expanded` attribute with either `true`/`false`. This allows the
31
+ * `TreeGrid` component to still manage keyboard interactions while allowing
32
+ * the `aria-expanded` attribute to be placed elsewhere.
26
33
  */
27
34
  isExpanded?: boolean;
28
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tree-grid/types.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,KAAK,EAAE,WAAW,CAAE,KAAK,CAAC,cAAc,CAAE,YAAY,CAAE,CAAE,CAAC;IAC3D;;;OAGG;IACH,aAAa,EAAE,WAAW,CAAE,KAAK,CAAC,cAAc,CAAE,eAAe,CAAE,CAAE,CAAC;IACtE;;;OAGG;IACH,OAAO,EAAE,WAAW,CAAE,KAAK,CAAC,cAAc,CAAE,cAAc,CAAE,CAAE,CAAC;IAC/D;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,+BAA+B,GAAG;IACtC,GAAG,EAAE,KAAK,CAAC,YAAY,CAAE,GAAG,CAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAE,GAAG,CAAE,CAAC;IACxC,CAAE,GAAG,EAAE,MAAM,GAAI,GAAG,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACrC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,+BAA+B,KAAM,GAAG,CAAC,OAAO,CAAC;IACrE;;OAEG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,+BAA+B,CAAE,CAAC;IAC5D,CAAE,GAAG,EAAE,MAAM,GAAI,GAAG,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAC1B,CAAE;IACF;;;;;OAKG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC;CACvB,GAAG,WAAW,CAAE,IAAI,CAAE,uBAAuB,EAAE,UAAU,CAAE,CAAE,CAAE,GAChE;IACA,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,EAAE,IAAI,CAAC;CACrB,CAAC;AAEL,MAAM,MAAM,aAAa,GAAG;IAC3B;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAE,GAAG,EAAE,WAAW,KAAM,IAAI,CAAC;IAC3C;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAE,GAAG,EAAE,WAAW,KAAM,IAAI,CAAC;IAC7C;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,CACZ,KAAK,EAAE,KAAK,CAAC,aAAa,CAAE,gBAAgB,CAAE,EAC9C,QAAQ,EAAE,WAAW,EACrB,cAAc,EAAE,WAAW,KACvB,IAAI,CAAC;CACV,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tree-grid/types.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,KAAK,EAAE,WAAW,CAAE,KAAK,CAAC,cAAc,CAAE,YAAY,CAAE,CAAE,CAAC;IAC3D;;;OAGG;IACH,aAAa,EAAE,WAAW,CAAE,KAAK,CAAC,cAAc,CAAE,eAAe,CAAE,CAAE,CAAC;IACtE;;;OAGG;IACH,OAAO,EAAE,WAAW,CAAE,KAAK,CAAC,cAAc,CAAE,cAAc,CAAE,CAAE,CAAC;IAC/D;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,KAAK,+BAA+B,GAAG;IACtC,GAAG,EAAE,KAAK,CAAC,YAAY,CAAE,GAAG,CAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAE,GAAG,CAAE,CAAC;IACxC,CAAE,GAAG,EAAE,MAAM,GAAI,GAAG,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACrC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,+BAA+B,KAAM,GAAG,CAAC,OAAO,CAAC;IACrE;;OAEG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,aAAa,CAAE,+BAA+B,CAAE,CAAC;IAC5D,CAAE,GAAG,EAAE,MAAM,GAAI,GAAG,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAC1B,CAAE;IACF;;;;;OAKG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC;CACvB,GAAG,WAAW,CAAE,IAAI,CAAE,uBAAuB,EAAE,UAAU,CAAE,CAAE,CAAE,GAChE;IACA,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,EAAE,IAAI,CAAC;CACrB,CAAC;AAEL,MAAM,MAAM,aAAa,GAAG;IAC3B;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAE,GAAG,EAAE,WAAW,KAAM,IAAI,CAAC;IAC3C;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAE,GAAG,EAAE,WAAW,KAAM,IAAI,CAAC;IAC7C;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,CACZ,KAAK,EAAE,KAAK,CAAC,aAAa,CAAE,gBAAgB,CAAE,EAC9C,QAAQ,EAAE,WAAW,EACrB,cAAc,EAAE,WAAW,KACvB,IAAI,CAAC;CACV,CAAC"}
@@ -26,7 +26,7 @@ export type WordPressComponent<T extends React.ElementType, O, IsPolymorphic ext
26
26
  * We restrict it to a class to align with the already existing class names that
27
27
  * are generated by the context system.
28
28
  */
29
- selector: `.${string}`;
29
+ selector?: `.${string}`;
30
30
  };
31
31
  export type WordPressComponentFromProps<Props, ForwardsRef extends boolean = true> = Props extends WordPressComponentProps<infer P, infer T, infer I> ? WordPressComponent<T, P & (ForwardsRef extends true ? React.RefAttributes<any> : {}), I> : never;
32
32
  //# sourceMappingURL=wordpress-component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wordpress-component.d.ts","sourceRoot":"","sources":["../../../src/ui/context/wordpress-component.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,MAAM,MAAM,uBAAuB;AAClC,kBAAkB;AAClB,CAAC;AACD,8CAA8C;AAC9C,CAAC,SAAS,KAAK,CAAC,WAAW;AAC3B,mDAAmD;AACnD,aAAa,SAAS,OAAO,GAAG,IAAI,IACjC,CAAC,GAIJ,IAAI,CAAE,KAAK,CAAC,wBAAwB,CAAE,CAAC,CAAE,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG,UAAU,CAAE,GACxE,CAAE,aAAa,SAAS,IAAI,GACzB;IACA,sEAAsE;IACtE,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC,iBAAiB,CAAC;CACpC,GACD,EAAE,CAAE,CAAC;AAET,MAAM,MAAM,kBAAkB,CAC7B,CAAC,SAAS,KAAK,CAAC,WAAW,EAC3B,CAAC,EACD,aAAa,SAAS,OAAO,IAC1B;IACH,CAAE,EAAE,SAAS,KAAK,CAAC,WAAW,EAC7B,KAAK,EAAE,uBAAuB,CAAE,CAAC,EAAE,EAAE,EAAE,aAAa,CAAE,GACrD,CAAE,aAAa,SAAS,IAAI,GAAG;QAAE,EAAE,EAAE,EAAE,CAAA;KAAE,GAAG,EAAE,CAAE,GAC/C,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CACC,KAAK,EAAE,uBAAuB,CAAE,CAAC,EAAE,CAAC,EAAE,aAAa,CAAE,GACnD,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,QAAQ,EAAE,IAAK,MAAO,EAAE,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,2BAA2B,CACtC,KAAK,EACL,WAAW,SAAS,OAAO,GAAG,IAAI,IAC/B,KAAK,SAAS,uBAAuB,CAAE,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,CAAE,GACnE,kBAAkB,CAClB,CAAC,EACD,CAAC,GAAG,CAAE,WAAW,SAAS,IAAI,GAAG,KAAK,CAAC,aAAa,CAAE,GAAG,CAAE,GAAG,EAAE,CAAE,EAClE,CAAC,CACA,GACD,KAAK,CAAC"}
1
+ {"version":3,"file":"wordpress-component.d.ts","sourceRoot":"","sources":["../../../src/ui/context/wordpress-component.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAGpC,MAAM,MAAM,uBAAuB;AAClC,kBAAkB;AAClB,CAAC;AACD,8CAA8C;AAC9C,CAAC,SAAS,KAAK,CAAC,WAAW;AAC3B,mDAAmD;AACnD,aAAa,SAAS,OAAO,GAAG,IAAI,IACjC,CAAC,GAIJ,IAAI,CAAE,KAAK,CAAC,wBAAwB,CAAE,CAAC,CAAE,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG,UAAU,CAAE,GACxE,CAAE,aAAa,SAAS,IAAI,GACzB;IACA,sEAAsE;IACtE,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC,iBAAiB,CAAC;CACpC,GACD,EAAE,CAAE,CAAC;AAET,MAAM,MAAM,kBAAkB,CAC7B,CAAC,SAAS,KAAK,CAAC,WAAW,EAC3B,CAAC,EACD,aAAa,SAAS,OAAO,IAC1B;IACH,CAAE,EAAE,SAAS,KAAK,CAAC,WAAW,EAC7B,KAAK,EAAE,uBAAuB,CAAE,CAAC,EAAE,EAAE,EAAE,aAAa,CAAE,GACrD,CAAE,aAAa,SAAS,IAAI,GAAG;QAAE,EAAE,EAAE,EAAE,CAAA;KAAE,GAAG,EAAE,CAAE,GAC/C,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,CACC,KAAK,EAAE,uBAAuB,CAAE,CAAC,EAAE,CAAC,EAAE,aAAa,CAAE,GACnD,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,IAAK,MAAO,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,2BAA2B,CACtC,KAAK,EACL,WAAW,SAAS,OAAO,GAAG,IAAI,IAC/B,KAAK,SAAS,uBAAuB,CAAE,MAAM,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,CAAE,GACnE,kBAAkB,CAClB,CAAC,EACD,CAAC,GAAG,CAAE,WAAW,SAAS,IAAI,GAAG,KAAK,CAAC,aAAa,CAAE,GAAG,CAAE,GAAG,EAAE,CAAE,EAClE,CAAC,CACA,GACD,KAAK,CAAC"}
@@ -27,7 +27,7 @@ export declare const UnitControl: import("react").ForwardRefExoticComponent<Omit
27
27
  value?: string | number | undefined;
28
28
  onBlur?: FocusEventHandler<HTMLInputElement | HTMLSelectElement> | undefined;
29
29
  onFocus?: FocusEventHandler<HTMLInputElement | HTMLSelectElement> | undefined;
30
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "help" | "multiple" | "disabled" | "key" | "children" | "form" | "label" | "slot" | "title" | "pattern" | "as" | "id" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "max" | "min" | "crossOrigin" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "__next36pxDefaultSize" | "__unstableInputWidth" | "hideLabelFromVision" | "labelPosition" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "enterKeyHint" | "maxLength" | "minLength" | "readOnly" | "required" | "src" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer" | "hideHTMLArrows" | "isShiftStepEnabled" | "shiftStep" | "disableUnits" | "unit" | "isUnitSelectTabbable" | "units" | "isResetValueOnUnitChange" | "onUnitChange"> & import("react").RefAttributes<any>>;
30
+ } & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "help" | "multiple" | "disabled" | "key" | "children" | "form" | "label" | "slot" | "title" | "pattern" | "as" | "id" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "max" | "min" | "crossOrigin" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "maxLength" | "minLength" | "readOnly" | "required" | "src" | "alt" | "accept" | "capture" | "checked" | "enterKeyHint" | "__next36pxDefaultSize" | "__unstableInputWidth" | "hideLabelFromVision" | "labelPosition" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer" | "hideHTMLArrows" | "isShiftStepEnabled" | "shiftStep" | "disableUnits" | "unit" | "isUnitSelectTabbable" | "units" | "isResetValueOnUnitChange" | "onUnitChange"> & import("react").RefAttributes<any>>;
31
31
  export { parseQuantityAndUnitFromRawValue, useCustomUnits } from './utils';
32
32
  export default UnitControl;
33
33
  //# sourceMappingURL=index.d.ts.map
@@ -15,7 +15,7 @@ export declare const ValueInput: import("@emotion/styled").StyledComponent<Omit<
15
15
  step?: string | number | undefined;
16
16
  type?: import("react").HTMLInputTypeAttribute | undefined;
17
17
  value?: string | number | undefined;
18
- } & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "help" | "multiple" | "disabled" | "key" | "children" | "form" | "label" | "slot" | "title" | "pattern" | "as" | "type" | "id" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "max" | "min" | "crossOrigin" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "suffix" | "__next36pxDefaultSize" | "__unstableInputWidth" | "hideLabelFromVision" | "labelPosition" | "accept" | "alt" | "autoComplete" | "capture" | "checked" | "enterKeyHint" | "maxLength" | "minLength" | "readOnly" | "required" | "src" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer" | "hideHTMLArrows" | "spinControls" | "isShiftStepEnabled" | "shiftStep"> & import("react").RefAttributes<any> & {
18
+ } & Omit<Pick<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof import("react").InputHTMLAttributes<HTMLInputElement>>, "defaultValue" | "onChange" | "value" | "name" | "color" | "height" | "translate" | "width" | "hidden" | "size" | "style" | "help" | "multiple" | "disabled" | "key" | "children" | "form" | "label" | "slot" | "title" | "pattern" | "as" | "type" | "id" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "list" | "step" | "max" | "min" | "crossOrigin" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "autoComplete" | "maxLength" | "minLength" | "readOnly" | "required" | "src" | "alt" | "accept" | "capture" | "checked" | "enterKeyHint" | "suffix" | "__next36pxDefaultSize" | "__unstableInputWidth" | "hideLabelFromVision" | "labelPosition" | "dragDirection" | "dragThreshold" | "isDragEnabled" | "isPressEnterToChange" | "onValidate" | "__unstableStateReducer" | "hideHTMLArrows" | "spinControls" | "isShiftStepEnabled" | "shiftStep"> & import("react").RefAttributes<any> & {
19
19
  theme?: import("@emotion/react").Theme | undefined;
20
20
  }, {}, {}>;
21
21
  export declare const UnitLabel: import("@emotion/styled").StyledComponent<{
@@ -0,0 +1,9 @@
1
+ export declare function useDeprecated36pxDefaultSizeProp<P extends Record<string, any> & {
2
+ __next36pxDefaultSize?: boolean;
3
+ __next40pxDefaultSize?: boolean;
4
+ }>(props: P,
5
+ /** The component identifier in dot notation, e.g. `wp.components.ComponentName`. */
6
+ componentIdentifier: string): Omit<P, "__next40pxDefaultSize" | "__next36pxDefaultSize"> & {
7
+ __next40pxDefaultSize: boolean | undefined;
8
+ };
9
+ //# sourceMappingURL=use-deprecated-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-deprecated-props.d.ts","sourceRoot":"","sources":["../../src/utils/use-deprecated-props.ts"],"names":[],"mappings":"AAKA,wBAAgB,gCAAgC,CAC/C,CAAC,SAAS,MAAM,CAAE,MAAM,EAAE,GAAG,CAAE,GAAG;IACjC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAChC,EAED,KAAK,EAAE,CAAC;AACR,oFAAoF;AACpF,mBAAmB,EAAE,MAAM;;EAe3B"}
@@ -21,6 +21,6 @@ import type { ViewProps } from './types';
21
21
  * }
22
22
  * ```
23
23
  */
24
- export declare const View: WordPressComponent<'div', ViewProps & RefAttributes<any>>;
24
+ export declare const View: WordPressComponent<'div', ViewProps & RefAttributes<any>, true>;
25
25
  export default View;
26
26
  //# sourceMappingURL=component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/view/component.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;GAEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,IAAI,EAAE,kBAAkB,CACpC,KAAK,EACL,SAAS,GAAG,aAAa,CAAE,GAAG,CAAE,CACjB,CAAC;AAKjB,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/view/component.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C;;GAEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,IAAI,EAAE,kBAAkB,CACpC,KAAK,EACL,SAAS,GAAG,aAAa,CAAE,GAAG,CAAE,EAChC,IAAI,CACW,CAAC;AAKjB,eAAe,IAAI,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "23.8.0",
3
+ "version": "24.0.0",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -39,23 +39,23 @@
39
39
  "@emotion/utils": "^1.0.0",
40
40
  "@floating-ui/react-dom": "1.0.0",
41
41
  "@use-gesture/react": "^10.2.24",
42
- "@wordpress/a11y": "^3.31.0",
43
- "@wordpress/compose": "^6.8.0",
44
- "@wordpress/date": "^4.31.0",
45
- "@wordpress/deprecated": "^3.31.0",
46
- "@wordpress/dom": "^3.31.0",
47
- "@wordpress/element": "^5.8.0",
48
- "@wordpress/escape-html": "^2.31.0",
49
- "@wordpress/hooks": "^3.31.0",
50
- "@wordpress/html-entities": "^3.31.0",
51
- "@wordpress/i18n": "^4.31.0",
52
- "@wordpress/icons": "^9.22.0",
53
- "@wordpress/is-shallow-equal": "^4.31.0",
54
- "@wordpress/keycodes": "^3.31.0",
55
- "@wordpress/primitives": "^3.29.0",
56
- "@wordpress/private-apis": "^0.13.0",
57
- "@wordpress/rich-text": "^6.8.0",
58
- "@wordpress/warning": "^2.31.0",
42
+ "@wordpress/a11y": "^3.33.0",
43
+ "@wordpress/compose": "^6.10.0",
44
+ "@wordpress/date": "^4.33.0",
45
+ "@wordpress/deprecated": "^3.33.0",
46
+ "@wordpress/dom": "^3.33.0",
47
+ "@wordpress/element": "^5.10.0",
48
+ "@wordpress/escape-html": "^2.33.0",
49
+ "@wordpress/hooks": "^3.33.0",
50
+ "@wordpress/html-entities": "^3.33.0",
51
+ "@wordpress/i18n": "^4.33.0",
52
+ "@wordpress/icons": "^9.24.0",
53
+ "@wordpress/is-shallow-equal": "^4.33.0",
54
+ "@wordpress/keycodes": "^3.33.0",
55
+ "@wordpress/primitives": "^3.31.0",
56
+ "@wordpress/private-apis": "^0.15.0",
57
+ "@wordpress/rich-text": "^6.10.0",
58
+ "@wordpress/warning": "^2.33.0",
59
59
  "change-case": "^4.1.2",
60
60
  "classnames": "^2.3.1",
61
61
  "colord": "^2.7.0",
@@ -64,16 +64,15 @@
64
64
  "dom-scroll-into-view": "^1.2.1",
65
65
  "downshift": "^6.0.15",
66
66
  "fast-deep-equal": "^3.1.3",
67
- "framer-motion": "^7.6.1",
67
+ "framer-motion": "^10.11.6",
68
68
  "gradient-parser": "^0.1.5",
69
69
  "highlight-words-core": "^1.2.2",
70
70
  "is-plain-object": "^5.0.0",
71
- "lodash": "^4.17.21",
72
71
  "memize": "^1.1.0",
73
72
  "path-to-regexp": "^6.2.1",
74
73
  "re-resizable": "^6.4.0",
75
74
  "react-colorful": "^5.3.1",
76
- "reakit": "^1.3.8",
75
+ "reakit": "^1.3.11",
77
76
  "remove-accents": "^0.4.2",
78
77
  "use-lilius": "^2.0.1",
79
78
  "uuid": "^8.3.0",
@@ -86,5 +85,5 @@
86
85
  "publishConfig": {
87
86
  "access": "public"
88
87
  },
89
- "gitHead": "d61700b9f1c72ba0b030fc815ef1685b4f4031ec"
88
+ "gitHead": "e936127e1e13881f1a940b7bd1593a9e500147f3"
90
89
  }
@@ -20,10 +20,12 @@ A function to be called when an option is selected to insert into the existing t
20
20
  - Required: Yes
21
21
  - Type: `( value: string ) => void`
22
22
 
23
+ ### onReplace
24
+
23
25
  A function to be called when an option is selected to replace the existing text.
24
26
 
25
27
  - Required: Yes
26
- - Type: `( arg: [ OptionCompletion[ 'value' ] ] ) => void;`
28
+ - Type: `( values: RichTextValue[] ) => void`
27
29
 
28
30
  ### completers
29
31
 
@@ -31,7 +33,7 @@ An array of all of the completers to apply to the current element.
31
33
 
32
34
  - Required: Yes
33
35
  - Type: `Array< WPCompleter >`
34
-
36
+
35
37
  ### contentRef
36
38
 
37
39
  A ref containing the editable element that will serve as the anchor for `Autocomplete`'s `Popover`.
@@ -150,57 +152,83 @@ Whether to apply debouncing for the autocompleter. Set to true to enable debounc
150
152
 
151
153
  ## Usage
152
154
 
153
- The following is a contrived completer for fresh fruit.
154
-
155
- ```jsx
156
- import { Autocomplete } from '@wordpress/components';
157
-
158
- const MyAutocomplete = () => {
159
- const autocompleters = [
160
- {
161
- name: 'fruit',
162
- // The prefix that triggers this completer
163
- triggerPrefix: '~',
164
- // The option data
165
- options: [
166
- { visual: '🍎', name: 'Apple', id: 1 },
167
- { visual: '🍊', name: 'Orange', id: 2 },
168
- { visual: '🍇', name: 'Grapes', id: 3 },
169
- ],
170
- // Returns a label for an option like "🍊 Orange"
171
- getOptionLabel: ( option ) => (
172
- <span>
173
- <span className="icon">{ option.visual }</span>
174
- { option.name }
175
- </span>
176
- ),
177
- // Declares that options should be matched by their name
178
- getOptionKeywords: ( option ) => [ option.name ],
179
- // Declares that the Grapes option is disabled
180
- isOptionDisabled: ( option ) => option.name === 'Grapes',
181
- // Declares completions should be inserted as abbreviations
182
- getOptionCompletion: ( option ) => (
183
- <abbr title={ option.name }>{ option.visual }</abbr>
184
- ),
185
- },
186
- ];
187
-
188
- return (
189
- <div>
190
- <Autocomplete completers={ autocompleters }>
191
- { ( { isExpanded, listBoxId, activeId } ) => (
192
- <div
193
- contentEditable
194
- suppressContentEditableWarning
195
- aria-autocomplete="list"
196
- aria-expanded={ isExpanded }
197
- aria-owns={ listBoxId }
198
- aria-activedescendant={ activeId }
199
- ></div>
200
- ) }
201
- </Autocomplete>
202
- <p>Type ~ for triggering the autocomplete.</p>
203
- </div>
155
+ The `Autocomplete` component is not currently intended to be used as a standalone component. It is used by other packages to provide autocompletion support for the block editor.
156
+
157
+ The block editor provides a separate, wrapped version of `Autocomplete` that supports the addition of custom completers via a filter.
158
+
159
+ To implement your own completer in the block editor you will:
160
+ 1. Define the completer
161
+ 2. Write a callback that will add your completer to the list of existing completers
162
+ 3. Add a filter to the `editor.Autocomplete.completers` hook that will call your callback
163
+
164
+ The following example will add a contrived "fruits" autocompleter to the block editor. Note that in the callback it's possible to limit this new completer to a specific block type. In this case, our "fruits" completer will only be available from the "core/paragraph" block type.
165
+
166
+ ```js
167
+ ( function () {
168
+ // Define the completer
169
+ const fruits = {
170
+ name: 'fruit',
171
+ // The prefix that triggers this completer
172
+ triggerPrefix: '~',
173
+ // The option data
174
+ options: [
175
+ { visual: '🍎', name: 'Apple', id: 1 },
176
+ { visual: '🍊', name: 'Orange', id: 2 },
177
+ { visual: '🍇', name: 'Grapes', id: 3 },
178
+ { visual: '🥭', name: 'Mango', id: 4 },
179
+ { visual: '🍓', name: 'Strawberry', id: 5 },
180
+ { visual: '🫐', name: 'Blueberry', id: 6 },
181
+ { visual: '🍒', name: 'Cherry', id: 7 },
182
+ ],
183
+ // Returns a label for an option like "🍊 Orange"
184
+ getOptionLabel: ( option ) => `${ option.visual } ${ option.name }`,
185
+ // Declares that options should be matched by their name
186
+ getOptionKeywords: ( option ) => [ option.name ],
187
+ // Declares that the Grapes option is disabled
188
+ isOptionDisabled: ( option ) => option.name === 'Grapes',
189
+ // Declares completions should be inserted as abbreviations
190
+ getOptionCompletion: ( option ) => option.visual,
191
+ };
192
+
193
+ // Define a callback that will add the custom completer to the list of completers
194
+ function appendTestCompleters( completers, blockName ) {
195
+ return blockName === 'core/paragraph'
196
+ ? [ ...completers, fruits ]
197
+ : completers;
198
+ }
199
+
200
+ // Trigger our callback on the `editor.Autocomplete.completers` hook
201
+ wp.hooks.addFilter(
202
+ 'editor.Autocomplete.completers',
203
+ 'fruit-test/fruits',
204
+ appendTestCompleters,
205
+ 11
206
+ );
207
+ } )();
208
+ ```
209
+
210
+ Finally, enqueue your JavaScript file as you would any other, as in the following plugin example:
211
+
212
+ ```php
213
+ <?php
214
+ /**
215
+ * Plugin Name: Fruit Autocompleter
216
+ * Plugin URI: https://github.com/WordPress/gutenberg
217
+ * Author: Gutenberg Team
218
+ */
219
+
220
+ /**
221
+ * Registers a custom script for the plugin.
222
+ */
223
+ function enqueue_fruit_autocompleter_plugin_script() {
224
+ wp_enqueue_script(
225
+ 'fruit-autocompleter',
226
+ plugins_url( '/index.js', __FILE__ ),
227
+ array(
228
+ 'wp-hooks',
229
+ ),
204
230
  );
205
- };
231
+ }
232
+
233
+ add_action( 'init', 'enqueue_fruit_autocompleter_plugin_script' );
206
234
  ```
@@ -12,8 +12,6 @@ import {
12
12
  useEffect,
13
13
  useState,
14
14
  } from '@wordpress/element';
15
- // Error expected because `@wordpress/rich-text` is not yet fully typed.
16
- // @ts-expect-error
17
15
  import { useAnchor } from '@wordpress/rich-text';
18
16
  import { useMergeRefs, useRefEffect } from '@wordpress/compose';
19
17
 
@@ -26,8 +26,6 @@ import {
26
26
  insert,
27
27
  isCollapsed,
28
28
  getTextContent,
29
- // Error expected because `@wordpress/rich-text` is not yet fully typed.
30
- // @ts-expect-error
31
29
  } from '@wordpress/rich-text';
32
30
  import { speak } from '@wordpress/a11y';
33
31
 
@@ -241,6 +239,7 @@ export function useAutocomplete( {
241
239
  if ( isCollapsed( record ) ) {
242
240
  return getTextContent( slice( record, 0 ) );
243
241
  }
242
+ return '';
244
243
  }, [ record ] );
245
244
 
246
245
  useEffect( () => {
@@ -2,6 +2,8 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import type { WPElement } from '@wordpress/element';
5
+ import type { RichTextValue } from '@wordpress/rich-text';
6
+
5
7
  /**
6
8
  * Internal dependencies
7
9
  */
@@ -157,24 +159,6 @@ export type CancelablePromise< T = void > = Promise< T > & {
157
159
  canceled?: boolean;
158
160
  };
159
161
 
160
- /**
161
- * When `@wordpress/rich-text` is fully typed, the following
162
- * types should be moved to and imported from there
163
- *
164
- * @see /packages/rich-text/src/create.js
165
- */
166
- type RichTextFormat = {
167
- type: string;
168
- };
169
- type RichTextFormatList = Array< RichTextFormat >;
170
- type RichTextValue = {
171
- text: string;
172
- formats?: Array< RichTextFormatList >;
173
- replacements?: Array< RichTextFormat >;
174
- start: number | undefined;
175
- end: number | undefined;
176
- };
177
-
178
162
  export type UseAutocompleteProps = {
179
163
  /**
180
164
  * The rich text value object the autocompleter is being applied to.
@@ -187,7 +171,7 @@ export type UseAutocompleteProps = {
187
171
  * A function to be called when an option is selected to insert into the
188
172
  * existing text.
189
173
  */
190
- onChange: ( value: string ) => void;
174
+ onChange: ( value: RichTextValue ) => void;
191
175
  /**
192
176
  * A function to be called when an option is selected to replace the
193
177
  * existing text.
@@ -75,6 +75,7 @@ export function UnforwardedButton(
75
75
  ref: ForwardedRef< any >
76
76
  ) {
77
77
  const {
78
+ __next40pxDefaultSize,
78
79
  isSmall,
79
80
  isPressed,
80
81
  isBusy,
@@ -115,6 +116,7 @@ export function UnforwardedButton(
115
116
  children?.[ 0 ]?.props?.className !== 'components-tooltip' );
116
117
 
117
118
  const classes = classnames( 'components-button', className, {
119
+ 'is-next-40px-default-size': __next40pxDefaultSize,
118
120
  'is-secondary': variant === 'secondary',
119
121
  'is-primary': variant === 'primary',
120
122
  'is-small': isSmall,
@@ -18,6 +18,10 @@
18
18
  border-radius: $radius-block-ui;
19
19
  color: $components-color-foreground;
20
20
 
21
+ &.is-next-40px-default-size {
22
+ height: $button-size-next-default-40px;
23
+ }
24
+
21
25
  &[aria-expanded="true"],
22
26
  &:hover {
23
27
  color: $components-color-accent;
@@ -160,13 +164,14 @@
160
164
  white-space: nowrap;
161
165
  color: $components-color-accent;
162
166
  background: transparent;
163
- padding: $grid-unit-15 * 0.5; // This reduces the horizontal padding on tertiary/text buttons, so as to space them optically.
164
167
 
165
168
  &:hover:not(:disabled) {
169
+ // TODO: Prepare for theming (https://github.com/WordPress/gutenberg/pull/45466/files#r1030872724)
166
170
  background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
167
171
  }
168
172
 
169
173
  &:active:not(:disabled) {
174
+ // TODO: Prepare for theming (https://github.com/WordPress/gutenberg/pull/45466/files#r1030872724)
170
175
  background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
171
176
  }
172
177
 
@@ -284,6 +289,10 @@
284
289
  min-width: $button-size;
285
290
  justify-content: center;
286
291
 
292
+ &.is-next-40px-default-size {
293
+ min-width: $button-size-next-default-40px;
294
+ }
295
+
287
296
  .dashicon {
288
297
  display: inline-block;
289
298
  flex: 0 0 auto;
@@ -293,11 +302,9 @@
293
302
 
294
303
  &.has-text {
295
304
  justify-content: start;
296
- padding-right: 12px;
297
- }
298
-
299
- &.has-text svg {
300
- margin-right: $grid-unit-10;
305
+ padding-right: $grid-unit-15;
306
+ padding-left: $grid-unit-10;
307
+ gap: $grid-unit-05;
301
308
  }
302
309
 
303
310
  &.has-text .dashicon {
@@ -18,6 +18,13 @@ export type ButtonAsButtonProps = BaseButtonProps & _ButtonProps;
18
18
  export type ButtonAsAnchorProps = BaseButtonProps & AnchorProps;
19
19
 
20
20
  type BaseButtonProps = {
21
+ /**
22
+ * Start opting into the larger default height that will become the
23
+ * default size in a future version.
24
+ *
25
+ * @default false
26
+ */
27
+ __next40pxDefaultSize?: boolean;
21
28
  /**
22
29
  * The button's children.
23
30
  */
@@ -1,6 +1,6 @@
1
1
  # CardMedia
2
2
 
3
- `CardMedia` provides a container for media elements within a [`Card`](/packages/components/src/card/card/README.md).
3
+ `CardMedia` provides a container for full-bleed content within a [`Card`](/packages/components/src/card/card/README.md), such as images, video, or even just a background color.
4
4
 
5
5
  ## Usage
6
6
 
@@ -21,7 +21,8 @@ function UnconnectedCardMedia(
21
21
  }
22
22
 
23
23
  /**
24
- * `CardMedia` provides a container for media elements within a `Card`.
24
+ * `CardMedia` provides a container for full-bleed content within a `Card`,
25
+ * such as images, video, or even just a background color.
25
26
  *
26
27
  * @example
27
28
  * ```jsx