@wordpress/components 28.6.0 → 28.7.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 (588) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/CONTRIBUTING.md +42 -19
  3. package/build/alignment-matrix-control/cell.js +4 -7
  4. package/build/alignment-matrix-control/cell.js.map +1 -1
  5. package/build/alignment-matrix-control/icon.js +31 -19
  6. package/build/alignment-matrix-control/icon.js.map +1 -1
  7. package/build/alignment-matrix-control/index.js +55 -51
  8. package/build/alignment-matrix-control/index.js.map +1 -1
  9. package/build/alignment-matrix-control/styles.js +73 -0
  10. package/build/alignment-matrix-control/styles.js.map +1 -0
  11. package/build/alignment-matrix-control/types.js.map +1 -1
  12. package/build/angle-picker-control/angle-circle.js +9 -9
  13. package/build/angle-picker-control/angle-circle.js.map +1 -1
  14. package/build/border-control/border-control/component.js +18 -13
  15. package/build/border-control/border-control/component.js.map +1 -1
  16. package/build/circular-option-picker/circular-option-picker-option.js +15 -9
  17. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
  18. package/build/circular-option-picker/circular-option-picker.js +15 -12
  19. package/build/circular-option-picker/circular-option-picker.js.map +1 -1
  20. package/build/circular-option-picker/types.js.map +1 -1
  21. package/build/clipboard-button/index.js +6 -6
  22. package/build/clipboard-button/index.js.map +1 -1
  23. package/build/color-palette/utils.js +1 -2
  24. package/build/color-palette/utils.js.map +1 -1
  25. package/build/color-picker/color-copy-button.js +8 -8
  26. package/build/color-picker/color-copy-button.js.map +1 -1
  27. package/build/color-picker/hex-input.js +8 -8
  28. package/build/color-picker/hex-input.js.map +1 -1
  29. package/build/color-picker/input-with-slider.js +8 -8
  30. package/build/color-picker/input-with-slider.js.map +1 -1
  31. package/build/color-picker/styles.js +8 -8
  32. package/build/color-picker/styles.js.map +1 -1
  33. package/build/combobox-control/types.js.map +1 -1
  34. package/build/composite/group-label.js +33 -0
  35. package/build/composite/group-label.js.map +1 -0
  36. package/build/composite/group.js +33 -0
  37. package/build/composite/group.js.map +1 -0
  38. package/build/composite/hover.js +33 -0
  39. package/build/composite/hover.js.map +1 -0
  40. package/build/composite/index.js +50 -96
  41. package/build/composite/index.js.map +1 -1
  42. package/build/composite/item.js +33 -0
  43. package/build/composite/item.js.map +1 -0
  44. package/build/composite/legacy/index.js +2 -1
  45. package/build/composite/legacy/index.js.map +1 -1
  46. package/build/composite/row.js +33 -0
  47. package/build/composite/row.js.map +1 -0
  48. package/build/composite/store.js +54 -0
  49. package/build/composite/store.js.map +1 -0
  50. package/build/composite/typeahead.js +33 -0
  51. package/build/composite/typeahead.js.map +1 -0
  52. package/build/composite/types.js.map +1 -1
  53. package/build/custom-gradient-picker/gradient-bar/control-points.js +8 -8
  54. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  55. package/build/custom-select-control-v2/styles.js +12 -14
  56. package/build/custom-select-control-v2/styles.js.map +1 -1
  57. package/build/date-time/date/styles.js +8 -8
  58. package/build/date-time/date/styles.js.map +1 -1
  59. package/build/date-time/time/time-input/index.js +17 -19
  60. package/build/date-time/time/time-input/index.js.map +1 -1
  61. package/build/dimension-control/index.js +6 -1
  62. package/build/dimension-control/index.js.map +1 -1
  63. package/build/draggable/index.js +4 -4
  64. package/build/draggable/index.js.map +1 -1
  65. package/build/dropdown-menu-v2/checkbox-item.js +69 -0
  66. package/build/dropdown-menu-v2/checkbox-item.js.map +1 -0
  67. package/build/dropdown-menu-v2/context.js +17 -0
  68. package/build/dropdown-menu-v2/context.js.map +1 -0
  69. package/build/dropdown-menu-v2/group-label.js +40 -0
  70. package/build/dropdown-menu-v2/group-label.js.map +1 -0
  71. package/build/dropdown-menu-v2/group.js +29 -0
  72. package/build/dropdown-menu-v2/group.js.map +1 -0
  73. package/build/dropdown-menu-v2/index.js +58 -146
  74. package/build/dropdown-menu-v2/index.js.map +1 -1
  75. package/build/dropdown-menu-v2/item-help-text.js +27 -0
  76. package/build/dropdown-menu-v2/item-help-text.js.map +1 -0
  77. package/build/dropdown-menu-v2/item-label.js +27 -0
  78. package/build/dropdown-menu-v2/item-label.js.map +1 -0
  79. package/build/dropdown-menu-v2/item.js +53 -0
  80. package/build/dropdown-menu-v2/item.js.map +1 -0
  81. package/build/dropdown-menu-v2/radio-item.js +79 -0
  82. package/build/dropdown-menu-v2/radio-item.js.map +1 -0
  83. package/build/dropdown-menu-v2/separator.js +30 -0
  84. package/build/dropdown-menu-v2/separator.js.map +1 -0
  85. package/build/dropdown-menu-v2/styles.js +54 -78
  86. package/build/dropdown-menu-v2/styles.js.map +1 -1
  87. package/build/dropdown-menu-v2/types.js.map +1 -1
  88. package/build/dropdown-menu-v2/use-temporary-focus-visible-fix.js +27 -0
  89. package/build/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +1 -0
  90. package/build/focal-point-picker/styles/focal-point-style.js +7 -2
  91. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  92. package/build/form-token-field/types.js.map +1 -1
  93. package/build/index.js +6 -0
  94. package/build/index.js.map +1 -1
  95. package/build/input-control/index.js +2 -2
  96. package/build/input-control/index.js.map +1 -1
  97. package/build/input-control/input-base.js +5 -10
  98. package/build/input-control/input-base.js.map +1 -1
  99. package/build/input-control/input-prefix-wrapper.js +3 -3
  100. package/build/input-control/input-prefix-wrapper.js.map +1 -1
  101. package/build/input-control/input-suffix-wrapper.js +2 -3
  102. package/build/input-control/input-suffix-wrapper.js.map +1 -1
  103. package/build/input-control/reducer/reducer.js +8 -8
  104. package/build/input-control/reducer/reducer.js.map +1 -1
  105. package/build/input-control/styles/input-control-styles.js +75 -45
  106. package/build/input-control/styles/input-control-styles.js.map +1 -1
  107. package/build/input-control/types.js.map +1 -1
  108. package/build/input-control/utils.js +3 -3
  109. package/build/input-control/utils.js.map +1 -1
  110. package/build/item-group/styles.js +10 -10
  111. package/build/item-group/styles.js.map +1 -1
  112. package/build/modal/index.js +5 -5
  113. package/build/modal/index.js.map +1 -1
  114. package/build/navigation/index.js +4 -4
  115. package/build/navigation/index.js.map +1 -1
  116. package/build/navigation/styles/navigation-styles.js +13 -13
  117. package/build/navigation/styles/navigation-styles.js.map +1 -1
  118. package/build/navigator/index.js +12 -13
  119. package/build/navigator/index.js.map +1 -1
  120. package/build/navigator/navigator-back-button/hook.js +2 -2
  121. package/build/navigator/navigator-back-button/hook.js.map +1 -1
  122. package/build/navigator/navigator-button/hook.js +2 -2
  123. package/build/navigator/navigator-button/hook.js.map +1 -1
  124. package/build/navigator/navigator-provider/component.js +99 -67
  125. package/build/navigator/navigator-provider/component.js.map +1 -1
  126. package/build/navigator/navigator-to-parent-button/component.js +2 -2
  127. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  128. package/build/navigator/types.js.map +1 -1
  129. package/build/navigator/use-navigator.js +1 -2
  130. package/build/navigator/use-navigator.js.map +1 -1
  131. package/build/palette-edit/index.js +2 -2
  132. package/build/palette-edit/index.js.map +1 -1
  133. package/build/private-apis.js +5 -9
  134. package/build/private-apis.js.map +1 -1
  135. package/build/range-control/styles/range-control-styles.js +30 -30
  136. package/build/range-control/styles/range-control-styles.js.map +1 -1
  137. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
  138. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  139. package/build/select-control/styles/select-control-styles.js +12 -12
  140. package/build/select-control/styles/select-control-styles.js.map +1 -1
  141. package/build/slot-fill/bubbles-virtually/fill.js +4 -4
  142. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  143. package/build/snackbar/index.js +4 -4
  144. package/build/snackbar/index.js.map +1 -1
  145. package/build/tabs/index.js +4 -4
  146. package/build/tabs/index.js.map +1 -1
  147. package/build/tabs/styles.js +3 -3
  148. package/build/tabs/styles.js.map +1 -1
  149. package/build/toggle-group-control/toggle-group-control/utils.js +6 -6
  150. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  151. package/build/tools-panel/tools-panel/hook.js +6 -6
  152. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  153. package/build/unit-control/styles/unit-control-styles.js +7 -7
  154. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  155. package/build/utils/config-values.js +6 -4
  156. package/build/utils/config-values.js.map +1 -1
  157. package/build/utils/hooks/use-update-effect.js +4 -4
  158. package/build/utils/hooks/use-update-effect.js.map +1 -1
  159. package/build-module/alignment-matrix-control/cell.js +2 -5
  160. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  161. package/build-module/alignment-matrix-control/icon.js +31 -19
  162. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  163. package/build-module/alignment-matrix-control/index.js +55 -50
  164. package/build-module/alignment-matrix-control/index.js.map +1 -1
  165. package/build-module/alignment-matrix-control/styles.js +70 -0
  166. package/build-module/alignment-matrix-control/styles.js.map +1 -0
  167. package/build-module/alignment-matrix-control/types.js.map +1 -1
  168. package/build-module/angle-picker-control/angle-circle.js +9 -9
  169. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  170. package/build-module/border-control/border-control/component.js +18 -13
  171. package/build-module/border-control/border-control/component.js.map +1 -1
  172. package/build-module/circular-option-picker/circular-option-picker-option.js +16 -10
  173. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  174. package/build-module/circular-option-picker/circular-option-picker.js +16 -13
  175. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  176. package/build-module/circular-option-picker/types.js.map +1 -1
  177. package/build-module/clipboard-button/index.js +6 -6
  178. package/build-module/clipboard-button/index.js.map +1 -1
  179. package/build-module/color-palette/utils.js +1 -2
  180. package/build-module/color-palette/utils.js.map +1 -1
  181. package/build-module/color-picker/color-copy-button.js +8 -8
  182. package/build-module/color-picker/color-copy-button.js.map +1 -1
  183. package/build-module/color-picker/hex-input.js +7 -8
  184. package/build-module/color-picker/hex-input.js.map +1 -1
  185. package/build-module/color-picker/input-with-slider.js +7 -8
  186. package/build-module/color-picker/input-with-slider.js.map +1 -1
  187. package/build-module/color-picker/styles.js +8 -8
  188. package/build-module/color-picker/styles.js.map +1 -1
  189. package/build-module/combobox-control/types.js.map +1 -1
  190. package/build-module/composite/group-label.js +25 -0
  191. package/build-module/composite/group-label.js.map +1 -0
  192. package/build-module/composite/group.js +25 -0
  193. package/build-module/composite/group.js.map +1 -0
  194. package/build-module/composite/hover.js +25 -0
  195. package/build-module/composite/hover.js.map +1 -0
  196. package/build-module/composite/index.js +51 -96
  197. package/build-module/composite/index.js.map +1 -1
  198. package/build-module/composite/item.js +25 -0
  199. package/build-module/composite/item.js.map +1 -0
  200. package/build-module/composite/legacy/index.js +2 -1
  201. package/build-module/composite/legacy/index.js.map +1 -1
  202. package/build-module/composite/row.js +25 -0
  203. package/build-module/composite/row.js.map +1 -0
  204. package/build-module/composite/store.js +46 -0
  205. package/build-module/composite/store.js.map +1 -0
  206. package/build-module/composite/typeahead.js +25 -0
  207. package/build-module/composite/typeahead.js.map +1 -0
  208. package/build-module/composite/types.js.map +1 -1
  209. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +8 -8
  210. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  211. package/build-module/custom-select-control-v2/styles.js +12 -14
  212. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  213. package/build-module/date-time/date/styles.js +8 -8
  214. package/build-module/date-time/date/styles.js.map +1 -1
  215. package/build-module/date-time/time/time-input/index.js +17 -19
  216. package/build-module/date-time/time/time-input/index.js.map +1 -1
  217. package/build-module/dimension-control/index.js +6 -1
  218. package/build-module/dimension-control/index.js.map +1 -1
  219. package/build-module/draggable/index.js +4 -4
  220. package/build-module/draggable/index.js.map +1 -1
  221. package/build-module/dropdown-menu-v2/checkbox-item.js +62 -0
  222. package/build-module/dropdown-menu-v2/checkbox-item.js.map +1 -0
  223. package/build-module/dropdown-menu-v2/context.js +11 -0
  224. package/build-module/dropdown-menu-v2/context.js.map +1 -0
  225. package/build-module/dropdown-menu-v2/group-label.js +32 -0
  226. package/build-module/dropdown-menu-v2/group-label.js.map +1 -0
  227. package/build-module/dropdown-menu-v2/group.js +21 -0
  228. package/build-module/dropdown-menu-v2/group.js.map +1 -0
  229. package/build-module/dropdown-menu-v2/index.js +57 -144
  230. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  231. package/build-module/dropdown-menu-v2/item-help-text.js +19 -0
  232. package/build-module/dropdown-menu-v2/item-help-text.js.map +1 -0
  233. package/build-module/dropdown-menu-v2/item-label.js +19 -0
  234. package/build-module/dropdown-menu-v2/item-label.js.map +1 -0
  235. package/build-module/dropdown-menu-v2/item.js +46 -0
  236. package/build-module/dropdown-menu-v2/item.js.map +1 -0
  237. package/build-module/dropdown-menu-v2/radio-item.js +72 -0
  238. package/build-module/dropdown-menu-v2/radio-item.js.map +1 -0
  239. package/build-module/dropdown-menu-v2/separator.js +22 -0
  240. package/build-module/dropdown-menu-v2/separator.js.map +1 -0
  241. package/build-module/dropdown-menu-v2/styles.js +54 -78
  242. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  243. package/build-module/dropdown-menu-v2/types.js.map +1 -1
  244. package/build-module/dropdown-menu-v2/use-temporary-focus-visible-fix.js +20 -0
  245. package/build-module/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +1 -0
  246. package/build-module/focal-point-picker/styles/focal-point-style.js +6 -2
  247. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  248. package/build-module/form-token-field/types.js.map +1 -1
  249. package/build-module/index.js +2 -1
  250. package/build-module/index.js.map +1 -1
  251. package/build-module/input-control/index.js +2 -2
  252. package/build-module/input-control/index.js.map +1 -1
  253. package/build-module/input-control/input-base.js +6 -11
  254. package/build-module/input-control/input-base.js.map +1 -1
  255. package/build-module/input-control/input-prefix-wrapper.js +4 -3
  256. package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
  257. package/build-module/input-control/input-suffix-wrapper.js +3 -3
  258. package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
  259. package/build-module/input-control/reducer/reducer.js +8 -8
  260. package/build-module/input-control/reducer/reducer.js.map +1 -1
  261. package/build-module/input-control/styles/input-control-styles.js +74 -44
  262. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  263. package/build-module/input-control/types.js.map +1 -1
  264. package/build-module/input-control/utils.js +3 -3
  265. package/build-module/input-control/utils.js.map +1 -1
  266. package/build-module/item-group/styles.js +10 -10
  267. package/build-module/item-group/styles.js.map +1 -1
  268. package/build-module/modal/index.js +5 -5
  269. package/build-module/modal/index.js.map +1 -1
  270. package/build-module/navigation/index.js +4 -4
  271. package/build-module/navigation/index.js.map +1 -1
  272. package/build-module/navigation/styles/navigation-styles.js +14 -14
  273. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  274. package/build-module/navigator/index.js +6 -6
  275. package/build-module/navigator/index.js.map +1 -1
  276. package/build-module/navigator/navigator-back-button/hook.js +1 -1
  277. package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
  278. package/build-module/navigator/navigator-button/hook.js +1 -1
  279. package/build-module/navigator/navigator-button/hook.js.map +1 -1
  280. package/build-module/navigator/navigator-provider/component.js +99 -67
  281. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  282. package/build-module/navigator/navigator-to-parent-button/component.js +1 -1
  283. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  284. package/build-module/navigator/types.js.map +1 -1
  285. package/build-module/navigator/use-navigator.js +1 -2
  286. package/build-module/navigator/use-navigator.js.map +1 -1
  287. package/build-module/palette-edit/index.js +2 -2
  288. package/build-module/palette-edit/index.js.map +1 -1
  289. package/build-module/private-apis.js +5 -9
  290. package/build-module/private-apis.js.map +1 -1
  291. package/build-module/range-control/styles/range-control-styles.js +31 -31
  292. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  293. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +5 -5
  294. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  295. package/build-module/select-control/styles/select-control-styles.js +13 -13
  296. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  297. package/build-module/slot-fill/bubbles-virtually/fill.js +4 -4
  298. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  299. package/build-module/snackbar/index.js +4 -4
  300. package/build-module/snackbar/index.js.map +1 -1
  301. package/build-module/tabs/index.js +4 -4
  302. package/build-module/tabs/index.js.map +1 -1
  303. package/build-module/tabs/styles.js +4 -4
  304. package/build-module/tabs/styles.js.map +1 -1
  305. package/build-module/toggle-group-control/toggle-group-control/utils.js +6 -6
  306. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  307. package/build-module/tools-panel/tools-panel/hook.js +6 -6
  308. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  309. package/build-module/unit-control/styles/unit-control-styles.js +7 -7
  310. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  311. package/build-module/utils/config-values.js +6 -4
  312. package/build-module/utils/config-values.js.map +1 -1
  313. package/build-module/utils/hooks/use-update-effect.js +4 -4
  314. package/build-module/utils/hooks/use-update-effect.js.map +1 -1
  315. package/build-style/style-rtl.css +11 -23
  316. package/build-style/style.css +11 -23
  317. package/build-types/alignment-matrix-control/cell.d.ts +1 -1
  318. package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
  319. package/build-types/alignment-matrix-control/icon.d.ts +1 -1
  320. package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
  321. package/build-types/alignment-matrix-control/index.d.ts +16 -6
  322. package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
  323. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  324. package/build-types/alignment-matrix-control/{styles/alignment-matrix-control-styles.d.ts → styles.d.ts} +9 -10
  325. package/build-types/alignment-matrix-control/styles.d.ts.map +1 -0
  326. package/build-types/alignment-matrix-control/types.d.ts +12 -1
  327. package/build-types/alignment-matrix-control/types.d.ts.map +1 -1
  328. package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
  329. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  330. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  331. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  332. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  333. package/build-types/circular-option-picker/types.d.ts +2 -2
  334. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  335. package/build-types/color-palette/utils.d.ts.map +1 -1
  336. package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
  337. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  338. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  339. package/build-types/color-picker/styles.d.ts.map +1 -1
  340. package/build-types/combobox-control/types.d.ts +1 -0
  341. package/build-types/combobox-control/types.d.ts.map +1 -1
  342. package/build-types/composite/group-label.d.ts +3 -0
  343. package/build-types/composite/group-label.d.ts.map +1 -0
  344. package/build-types/composite/group.d.ts +3 -0
  345. package/build-types/composite/group.d.ts.map +1 -0
  346. package/build-types/composite/hover.d.ts +3 -0
  347. package/build-types/composite/hover.d.ts.map +1 -0
  348. package/build-types/composite/index.d.ts +30 -26
  349. package/build-types/composite/index.d.ts.map +1 -1
  350. package/build-types/composite/item.d.ts +3 -0
  351. package/build-types/composite/item.d.ts.map +1 -0
  352. package/build-types/composite/legacy/index.d.ts +1 -4
  353. package/build-types/composite/legacy/index.d.ts.map +1 -1
  354. package/build-types/composite/row.d.ts +3 -0
  355. package/build-types/composite/row.d.ts.map +1 -0
  356. package/build-types/composite/store.d.ts +25 -0
  357. package/build-types/composite/store.d.ts.map +1 -0
  358. package/build-types/composite/stories/index.story.d.ts +1 -0
  359. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  360. package/build-types/composite/typeahead.d.ts +3 -0
  361. package/build-types/composite/typeahead.d.ts.map +1 -0
  362. package/build-types/composite/types.d.ts +2 -2
  363. package/build-types/composite/types.d.ts.map +1 -1
  364. package/build-types/date-time/time/time-input/index.d.ts.map +1 -1
  365. package/build-types/dimension-control/index.d.ts +1 -1
  366. package/build-types/dimension-control/index.d.ts.map +1 -1
  367. package/build-types/dimension-control/stories/index.story.d.ts +5 -0
  368. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  369. package/build-types/dropdown-menu-v2/checkbox-item.d.ts +3 -0
  370. package/build-types/dropdown-menu-v2/checkbox-item.d.ts.map +1 -0
  371. package/build-types/dropdown-menu-v2/context.d.ts +6 -0
  372. package/build-types/dropdown-menu-v2/context.d.ts.map +1 -0
  373. package/build-types/dropdown-menu-v2/group-label.d.ts +3 -0
  374. package/build-types/dropdown-menu-v2/group-label.d.ts.map +1 -0
  375. package/build-types/dropdown-menu-v2/group.d.ts +3 -0
  376. package/build-types/dropdown-menu-v2/group.d.ts.map +1 -0
  377. package/build-types/dropdown-menu-v2/index.d.ts +39 -18
  378. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  379. package/build-types/dropdown-menu-v2/item-help-text.d.ts +6 -0
  380. package/build-types/dropdown-menu-v2/item-help-text.d.ts.map +1 -0
  381. package/build-types/dropdown-menu-v2/item-label.d.ts +6 -0
  382. package/build-types/dropdown-menu-v2/item-label.d.ts.map +1 -0
  383. package/build-types/dropdown-menu-v2/item.d.ts +3 -0
  384. package/build-types/dropdown-menu-v2/item.d.ts.map +1 -0
  385. package/build-types/dropdown-menu-v2/radio-item.d.ts +3 -0
  386. package/build-types/dropdown-menu-v2/radio-item.d.ts.map +1 -0
  387. package/build-types/dropdown-menu-v2/separator.d.ts +3 -0
  388. package/build-types/dropdown-menu-v2/separator.d.ts.map +1 -0
  389. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +10 -10
  390. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  391. package/build-types/dropdown-menu-v2/styles.d.ts +14 -6
  392. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  393. package/build-types/dropdown-menu-v2/types.d.ts +6 -0
  394. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  395. package/build-types/dropdown-menu-v2/use-temporary-focus-visible-fix.d.ts +8 -0
  396. package/build-types/dropdown-menu-v2/use-temporary-focus-visible-fix.d.ts.map +1 -0
  397. package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
  398. package/build-types/form-token-field/types.d.ts +1 -0
  399. package/build-types/form-token-field/types.d.ts.map +1 -1
  400. package/build-types/index.d.ts +3 -1
  401. package/build-types/index.d.ts.map +1 -1
  402. package/build-types/input-control/input-base.d.ts.map +1 -1
  403. package/build-types/input-control/input-prefix-wrapper.d.ts +2 -2
  404. package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -1
  405. package/build-types/input-control/input-suffix-wrapper.d.ts +2 -2
  406. package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -1
  407. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  408. package/build-types/input-control/stories/index.story.d.ts +9 -0
  409. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  410. package/build-types/input-control/styles/input-control-styles.d.ts +15 -9
  411. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  412. package/build-types/input-control/types.d.ts +23 -6
  413. package/build-types/input-control/types.d.ts.map +1 -1
  414. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  415. package/build-types/navigator/index.d.ts +6 -6
  416. package/build-types/navigator/index.d.ts.map +1 -1
  417. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  418. package/build-types/navigator/stories/index.story.d.ts +1 -1
  419. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  420. package/build-types/navigator/types.d.ts +3 -1
  421. package/build-types/navigator/types.d.ts.map +1 -1
  422. package/build-types/navigator/use-navigator.d.ts +1 -2
  423. package/build-types/navigator/use-navigator.d.ts.map +1 -1
  424. package/build-types/private-apis.d.ts.map +1 -1
  425. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  426. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  427. package/build-types/select-control/styles/select-control-styles.d.ts +1 -1
  428. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  429. package/build-types/tabs/index.d.ts.map +1 -1
  430. package/build-types/tabs/styles.d.ts.map +1 -1
  431. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  432. package/build-types/utils/config-values.d.ts +3 -3
  433. package/package.json +19 -19
  434. package/src/alignment-matrix-control/README.md +1 -5
  435. package/src/alignment-matrix-control/cell.tsx +3 -9
  436. package/src/alignment-matrix-control/icon.tsx +48 -30
  437. package/src/alignment-matrix-control/index.tsx +60 -50
  438. package/src/alignment-matrix-control/stories/index.story.tsx +3 -12
  439. package/src/alignment-matrix-control/styles.ts +113 -0
  440. package/src/alignment-matrix-control/types.ts +12 -1
  441. package/src/angle-picker-control/angle-circle.tsx +11 -9
  442. package/src/border-control/border-control/component.tsx +23 -16
  443. package/src/circular-option-picker/circular-option-picker-option.tsx +16 -19
  444. package/src/circular-option-picker/circular-option-picker.tsx +26 -12
  445. package/src/circular-option-picker/types.ts +2 -2
  446. package/src/clipboard-button/index.tsx +6 -6
  447. package/src/color-palette/test/utils.ts +21 -2
  448. package/src/color-palette/utils.ts +1 -3
  449. package/src/color-picker/color-copy-button.tsx +10 -8
  450. package/src/color-picker/hex-input.tsx +6 -10
  451. package/src/color-picker/input-with-slider.tsx +6 -10
  452. package/src/color-picker/styles.ts +1 -1
  453. package/src/combobox-control/types.ts +1 -0
  454. package/src/composite/group-label.tsx +30 -0
  455. package/src/composite/group.tsx +30 -0
  456. package/src/composite/hover.tsx +30 -0
  457. package/src/composite/index.tsx +61 -145
  458. package/src/composite/item.tsx +30 -0
  459. package/src/composite/legacy/index.tsx +2 -1
  460. package/src/composite/row.tsx +30 -0
  461. package/src/composite/store.ts +46 -0
  462. package/src/composite/stories/index.story.tsx +138 -265
  463. package/src/composite/typeahead.tsx +30 -0
  464. package/src/composite/types.ts +2 -2
  465. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +10 -10
  466. package/src/custom-gradient-picker/style.scss +2 -21
  467. package/src/custom-select-control-v2/styles.ts +4 -4
  468. package/src/date-time/date/styles.ts +2 -2
  469. package/src/date-time/time/test/index.tsx +3 -6
  470. package/src/date-time/time/time-input/index.tsx +25 -25
  471. package/src/date-time/time/time-input/test/index.tsx +6 -7
  472. package/src/dimension-control/README.md +4 -0
  473. package/src/dimension-control/index.tsx +7 -1
  474. package/src/dimension-control/stories/index.story.tsx +7 -2
  475. package/src/dimension-control/test/__snapshots__/index.test.js.snap +16 -16
  476. package/src/dimension-control/test/index.test.js +1 -0
  477. package/src/draggable/index.tsx +4 -4
  478. package/src/dropdown-menu-v2/README.md +73 -60
  479. package/src/dropdown-menu-v2/checkbox-item.tsx +63 -0
  480. package/src/dropdown-menu-v2/context.tsx +13 -0
  481. package/src/dropdown-menu-v2/group-label.tsx +37 -0
  482. package/src/dropdown-menu-v2/group.tsx +26 -0
  483. package/src/dropdown-menu-v2/index.tsx +57 -197
  484. package/src/dropdown-menu-v2/item-help-text.tsx +23 -0
  485. package/src/dropdown-menu-v2/item-label.tsx +23 -0
  486. package/src/dropdown-menu-v2/item.tsx +50 -0
  487. package/src/dropdown-menu-v2/radio-item.tsx +70 -0
  488. package/src/dropdown-menu-v2/separator.tsx +27 -0
  489. package/src/dropdown-menu-v2/stories/index.story.tsx +295 -262
  490. package/src/dropdown-menu-v2/styles.ts +102 -66
  491. package/src/dropdown-menu-v2/test/index.tsx +159 -132
  492. package/src/dropdown-menu-v2/types.ts +7 -0
  493. package/src/dropdown-menu-v2/use-temporary-focus-visible-fix.ts +22 -0
  494. package/src/focal-point-picker/styles/focal-point-style.ts +6 -1
  495. package/src/form-toggle/style.scss +1 -1
  496. package/src/form-token-field/style.scss +2 -3
  497. package/src/form-token-field/types.ts +1 -0
  498. package/src/index.ts +5 -1
  499. package/src/input-control/index.tsx +2 -2
  500. package/src/input-control/input-base.tsx +4 -14
  501. package/src/input-control/input-prefix-wrapper.tsx +8 -4
  502. package/src/input-control/input-suffix-wrapper.tsx +4 -6
  503. package/src/input-control/reducer/reducer.ts +13 -10
  504. package/src/input-control/stories/index.story.tsx +31 -12
  505. package/src/input-control/styles/input-control-styles.tsx +42 -11
  506. package/src/input-control/types.ts +23 -7
  507. package/src/input-control/utils.ts +3 -3
  508. package/src/item-group/styles.ts +3 -3
  509. package/src/item-group/test/__snapshots__/index.js.snap +3 -3
  510. package/src/modal/index.tsx +5 -5
  511. package/src/modal/style.scss +5 -4
  512. package/src/navigation/index.tsx +4 -4
  513. package/src/navigation/styles/navigation-styles.tsx +3 -3
  514. package/src/navigator/index.ts +6 -6
  515. package/src/navigator/navigator-back-button/hook.ts +1 -1
  516. package/src/navigator/navigator-button/hook.ts +1 -1
  517. package/src/navigator/navigator-provider/README.md +2 -3
  518. package/src/navigator/navigator-provider/component.tsx +97 -82
  519. package/src/navigator/navigator-to-parent-button/component.tsx +1 -1
  520. package/src/navigator/stories/index.story.tsx +82 -253
  521. package/src/navigator/types.ts +3 -1
  522. package/src/navigator/use-navigator.ts +1 -3
  523. package/src/palette-edit/index.tsx +2 -2
  524. package/src/private-apis.ts +5 -18
  525. package/src/range-control/styles/range-control-styles.ts +7 -7
  526. package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts +2 -2
  527. package/src/resizable-box/style.scss +2 -2
  528. package/src/select-control/styles/select-control-styles.ts +5 -5
  529. package/src/slot-fill/bubbles-virtually/fill.tsx +4 -4
  530. package/src/snackbar/index.tsx +4 -4
  531. package/src/tab-panel/style.scss +0 -1
  532. package/src/tabs/index.tsx +8 -4
  533. package/src/tabs/styles.ts +2 -3
  534. package/src/text-control/style.scss +3 -2
  535. package/src/toggle-group-control/toggle-group-control/utils.ts +7 -7
  536. package/src/tools-panel/tools-panel/hook.ts +6 -6
  537. package/src/unit-control/styles/unit-control-styles.ts +2 -1
  538. package/src/utils/config-values.js +6 -4
  539. package/src/utils/hooks/use-update-effect.js +4 -4
  540. package/tsconfig.tsbuildinfo +1 -1
  541. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +0 -66
  542. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +0 -1
  543. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +0 -77
  544. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +0 -1
  545. package/build/navigator/navigator-back-button/index.js +0 -14
  546. package/build/navigator/navigator-back-button/index.js.map +0 -1
  547. package/build/navigator/navigator-button/index.js +0 -14
  548. package/build/navigator/navigator-button/index.js.map +0 -1
  549. package/build/navigator/navigator-provider/index.js +0 -14
  550. package/build/navigator/navigator-provider/index.js.map +0 -1
  551. package/build/navigator/navigator-screen/index.js +0 -14
  552. package/build/navigator/navigator-screen/index.js.map +0 -1
  553. package/build/navigator/navigator-to-parent-button/index.js +0 -14
  554. package/build/navigator/navigator-to-parent-button/index.js.map +0 -1
  555. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +0 -63
  556. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +0 -1
  557. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +0 -72
  558. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +0 -1
  559. package/build-module/navigator/navigator-back-button/index.js +0 -2
  560. package/build-module/navigator/navigator-back-button/index.js.map +0 -1
  561. package/build-module/navigator/navigator-button/index.js +0 -2
  562. package/build-module/navigator/navigator-button/index.js.map +0 -1
  563. package/build-module/navigator/navigator-provider/index.js +0 -2
  564. package/build-module/navigator/navigator-provider/index.js.map +0 -1
  565. package/build-module/navigator/navigator-screen/index.js +0 -2
  566. package/build-module/navigator/navigator-screen/index.js.map +0 -1
  567. package/build-module/navigator/navigator-to-parent-button/index.js +0 -2
  568. package/build-module/navigator/navigator-to-parent-button/index.js.map +0 -1
  569. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +0 -18
  570. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts.map +0 -1
  571. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +0 -1
  572. package/build-types/navigator/navigator-back-button/index.d.ts +0 -2
  573. package/build-types/navigator/navigator-back-button/index.d.ts.map +0 -1
  574. package/build-types/navigator/navigator-button/index.d.ts +0 -2
  575. package/build-types/navigator/navigator-button/index.d.ts.map +0 -1
  576. package/build-types/navigator/navigator-provider/index.d.ts +0 -2
  577. package/build-types/navigator/navigator-provider/index.d.ts.map +0 -1
  578. package/build-types/navigator/navigator-screen/index.d.ts +0 -2
  579. package/build-types/navigator/navigator-screen/index.d.ts.map +0 -1
  580. package/build-types/navigator/navigator-to-parent-button/index.d.ts +0 -2
  581. package/build-types/navigator/navigator-to-parent-button/index.d.ts.map +0 -1
  582. package/src/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.ts +0 -77
  583. package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.ts +0 -102
  584. package/src/navigator/navigator-back-button/index.ts +0 -1
  585. package/src/navigator/navigator-button/index.ts +0 -1
  586. package/src/navigator/navigator-provider/index.ts +0 -1
  587. package/src/navigator/navigator-screen/index.ts +0 -1
  588. package/src/navigator/navigator-to-parent-button/index.ts +0 -1
@@ -20,8 +20,6 @@ import {
20
20
  Fieldset,
21
21
  } from '../styles';
22
22
  import { HStack } from '../../../h-stack';
23
- import Button from '../../../button';
24
- import ButtonGroup from '../../../button-group';
25
23
  import {
26
24
  from12hTo24h,
27
25
  from24hTo12h,
@@ -32,6 +30,10 @@ import type { TimeInputProps } from '../../types';
32
30
  import type { InputChangeCallback } from '../../../input-control/types';
33
31
  import { useControlledValue } from '../../../utils';
34
32
  import BaseControl from '../../../base-control';
33
+ import {
34
+ ToggleGroupControl,
35
+ ToggleGroupControlOption,
36
+ } from '../../../toggle-group-control';
35
37
 
36
38
  export function TimeInput( {
37
39
  value: valueProp,
@@ -164,30 +166,28 @@ export function TimeInput( {
164
166
  />
165
167
  </TimeWrapper>
166
168
  { is12Hour && (
167
- <ButtonGroup
168
- className="components-datetime__time-field components-datetime__time-field-am-pm" // Unused, for backwards compatibility.
169
+ <ToggleGroupControl
170
+ __next40pxDefaultSize
171
+ __nextHasNoMarginBottom
172
+ isBlock
173
+ label={ __( 'Select AM or PM' ) }
174
+ hideLabelFromVision
175
+ value={ dayPeriod }
176
+ onChange={ ( newValue ) => {
177
+ buildAmPmChangeCallback(
178
+ newValue as 'AM' | 'PM'
179
+ )();
180
+ } }
169
181
  >
170
- <Button
171
- className="components-datetime__time-am-button" // Unused, for backwards compatibility.
172
- variant={
173
- dayPeriod === 'AM' ? 'primary' : 'secondary'
174
- }
175
- __next40pxDefaultSize
176
- onClick={ buildAmPmChangeCallback( 'AM' ) }
177
- >
178
- { __( 'AM' ) }
179
- </Button>
180
- <Button
181
- className="components-datetime__time-pm-button" // Unused, for backwards compatibility.
182
- variant={
183
- dayPeriod === 'PM' ? 'primary' : 'secondary'
184
- }
185
- __next40pxDefaultSize
186
- onClick={ buildAmPmChangeCallback( 'PM' ) }
187
- >
188
- { __( 'PM' ) }
189
- </Button>
190
- </ButtonGroup>
182
+ <ToggleGroupControlOption
183
+ value="AM"
184
+ label={ __( 'AM' ) }
185
+ />
186
+ <ToggleGroupControlOption
187
+ value="PM"
188
+ label={ __( 'PM' ) }
189
+ />
190
+ </ToggleGroupControl>
191
191
  ) }
192
192
  </HStack>
193
193
  </Wrapper>
@@ -80,12 +80,11 @@ describe( 'TimeInput', () => {
80
80
  const minutesInput = screen.getByRole( 'spinbutton', {
81
81
  name: 'Minutes',
82
82
  } );
83
- const amButton = screen.getByRole( 'button', { name: 'AM' } );
84
- const pmButton = screen.getByRole( 'button', { name: 'PM' } );
83
+ const amButton = screen.getByRole( 'radio', { name: 'AM' } );
84
+ const pmButton = screen.getByRole( 'radio', { name: 'PM' } );
85
85
 
86
- // TODO: Update assert these states through the accessibility tree rather than through styles, see: https://github.com/WordPress/gutenberg/issues/61163
87
- expect( amButton ).toHaveClass( 'is-primary' );
88
- expect( pmButton ).not.toHaveClass( 'is-primary' );
86
+ expect( amButton ).toBeChecked();
87
+ expect( pmButton ).not.toBeChecked();
89
88
  expect( hoursInput ).not.toHaveValue( 0 );
90
89
  expect( hoursInput ).toHaveValue( 12 );
91
90
 
@@ -94,7 +93,7 @@ describe( 'TimeInput', () => {
94
93
  await user.keyboard( '{Tab}' );
95
94
 
96
95
  expect( onChangeSpy ).toHaveBeenCalledWith( { hours: 0, minutes: 35 } );
97
- expect( amButton ).toHaveClass( 'is-primary' );
96
+ expect( amButton ).toBeChecked();
98
97
 
99
98
  await user.clear( hoursInput );
100
99
  await user.type( hoursInput, '12' );
@@ -107,7 +106,7 @@ describe( 'TimeInput', () => {
107
106
  hours: 12,
108
107
  minutes: 35,
109
108
  } );
110
- expect( pmButton ).toHaveClass( 'is-primary' );
109
+ expect( pmButton ).toBeChecked();
111
110
  } );
112
111
 
113
112
  it( 'should call onChange with defined minutes steps', async () => {
@@ -1,5 +1,9 @@
1
1
  # DimensionControl
2
2
 
3
+ <div class="callout callout-alert">
4
+ This component is deprecated.
5
+ </div>
6
+
3
7
  <div class="callout callout-alert">
4
8
  This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
5
9
  </div>
@@ -17,6 +17,7 @@ import sizesTable, { findSizeBySlug } from './sizes';
17
17
  import type { DimensionControlProps, Size } from './types';
18
18
  import type { SelectControlSingleSelectionProps } from '../select-control/types';
19
19
  import { ContextSystemProvider } from '../context';
20
+ import deprecated from '@wordpress/deprecated';
20
21
 
21
22
  const CONTEXT_VALUE = {
22
23
  BaseControl: {
@@ -29,7 +30,7 @@ const CONTEXT_VALUE = {
29
30
  /**
30
31
  * `DimensionControl` is a component designed to provide a UI to control spacing and/or dimensions.
31
32
  *
32
- * This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
33
+ * @deprecated
33
34
  *
34
35
  * ```jsx
35
36
  * import { __experimentalDimensionControl as DimensionControl } from '@wordpress/components';
@@ -62,6 +63,11 @@ export function DimensionControl( props: DimensionControlProps ) {
62
63
  className = '',
63
64
  } = props;
64
65
 
66
+ deprecated( 'wp.components.DimensionControl', {
67
+ since: '6.7',
68
+ version: '7.0',
69
+ } );
70
+
65
71
  const onChangeSpacingSize: SelectControlSingleSelectionProps[ 'onChange' ] =
66
72
  ( val ) => {
67
73
  const theSize = findSizeBySlug( sizes, val );
@@ -13,9 +13,15 @@ import sizes from '../sizes';
13
13
  */
14
14
  import { desktop, tablet, mobile } from '@wordpress/icons';
15
15
 
16
+ /**
17
+ * `DimensionControl` is a component designed to provide a UI to control spacing and/or dimensions.
18
+ *
19
+ * This component is deprecated.
20
+ */
16
21
  const meta: Meta< typeof DimensionControl > = {
17
22
  component: DimensionControl,
18
- title: 'Components (Experimental)/DimensionControl',
23
+ title: 'Components (Deprecated)/DimensionControl',
24
+ id: 'components-dimensioncontrol',
19
25
  argTypes: {
20
26
  onChange: { action: 'onChange' },
21
27
  value: { control: { type: null } },
@@ -42,7 +48,6 @@ const Template: StoryFn< typeof DimensionControl > = ( args ) => (
42
48
  );
43
49
 
44
50
  export const Default = Template.bind( {} );
45
-
46
51
  Default.args = {
47
52
  __nextHasNoMarginBottom: true,
48
53
  label: 'Please select a size',
@@ -45,7 +45,7 @@ exports[`DimensionControl rendering renders with custom sizes 1`] = `
45
45
  min-height: 0;
46
46
  }
47
47
 
48
- .emotion-6:focus-within:not( :has( :is( .em5sgkm7, .emotion-19 ):focus-within ) ) .emotion-26 {
48
+ .emotion-6:focus-within:not( :has( :is( .em5sgkm8, .emotion-19 ):focus-within ) ) .emotion-26 {
49
49
  border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
50
50
  box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
51
51
  outline: 2px solid transparent;
@@ -157,8 +157,8 @@ exports[`DimensionControl rendering renders with custom sizes 1`] = `
157
157
  }
158
158
 
159
159
  .emotion-21 {
160
- margin-bottom: 0;
161
- padding-right: calc(4px * 2);
160
+ -webkit-padding-end: 8px;
161
+ padding-inline-end: 8px;
162
162
  position: absolute;
163
163
  pointer-events: none;
164
164
  right: 0;
@@ -249,7 +249,7 @@ exports[`DimensionControl rendering renders with custom sizes 1`] = `
249
249
  class="components-input-control__suffix emotion-18 emotion-19"
250
250
  >
251
251
  <div
252
- class="components-spacer components-input-control-suffix-wrapper emotion-20 emotion-21 emotion-7"
252
+ class="components-input-control-suffix-wrapper emotion-20 emotion-21 emotion-22"
253
253
  data-wp-c16t="true"
254
254
  data-wp-component="InputControlSuffixWrapper"
255
255
  >
@@ -327,7 +327,7 @@ exports[`DimensionControl rendering renders with defaults 1`] = `
327
327
  min-height: 0;
328
328
  }
329
329
 
330
- .emotion-6:focus-within:not( :has( :is( .em5sgkm7, .emotion-19 ):focus-within ) ) .emotion-26 {
330
+ .emotion-6:focus-within:not( :has( :is( .em5sgkm8, .emotion-19 ):focus-within ) ) .emotion-26 {
331
331
  border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
332
332
  box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
333
333
  outline: 2px solid transparent;
@@ -439,8 +439,8 @@ exports[`DimensionControl rendering renders with defaults 1`] = `
439
439
  }
440
440
 
441
441
  .emotion-21 {
442
- margin-bottom: 0;
443
- padding-right: calc(4px * 2);
442
+ -webkit-padding-end: 8px;
443
+ padding-inline-end: 8px;
444
444
  position: absolute;
445
445
  pointer-events: none;
446
446
  right: 0;
@@ -541,7 +541,7 @@ exports[`DimensionControl rendering renders with defaults 1`] = `
541
541
  class="components-input-control__suffix emotion-18 emotion-19"
542
542
  >
543
543
  <div
544
- class="components-spacer components-input-control-suffix-wrapper emotion-20 emotion-21 emotion-7"
544
+ class="components-input-control-suffix-wrapper emotion-20 emotion-21 emotion-22"
545
545
  data-wp-c16t="true"
546
546
  data-wp-component="InputControlSuffixWrapper"
547
547
  >
@@ -619,7 +619,7 @@ exports[`DimensionControl rendering renders with icon and custom icon label 1`]
619
619
  min-height: 0;
620
620
  }
621
621
 
622
- .emotion-6:focus-within:not( :has( :is( .em5sgkm7, .emotion-19 ):focus-within ) ) .emotion-26 {
622
+ .emotion-6:focus-within:not( :has( :is( .em5sgkm8, .emotion-19 ):focus-within ) ) .emotion-26 {
623
623
  border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
624
624
  box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
625
625
  outline: 2px solid transparent;
@@ -731,8 +731,8 @@ exports[`DimensionControl rendering renders with icon and custom icon label 1`]
731
731
  }
732
732
 
733
733
  .emotion-21 {
734
- margin-bottom: 0;
735
- padding-right: calc(4px * 2);
734
+ -webkit-padding-end: 8px;
735
+ padding-inline-end: 8px;
736
736
  position: absolute;
737
737
  pointer-events: none;
738
738
  right: 0;
@@ -845,7 +845,7 @@ exports[`DimensionControl rendering renders with icon and custom icon label 1`]
845
845
  class="components-input-control__suffix emotion-18 emotion-19"
846
846
  >
847
847
  <div
848
- class="components-spacer components-input-control-suffix-wrapper emotion-20 emotion-21 emotion-7"
848
+ class="components-input-control-suffix-wrapper emotion-20 emotion-21 emotion-22"
849
849
  data-wp-c16t="true"
850
850
  data-wp-component="InputControlSuffixWrapper"
851
851
  >
@@ -923,7 +923,7 @@ exports[`DimensionControl rendering renders with icon and default icon label 1`]
923
923
  min-height: 0;
924
924
  }
925
925
 
926
- .emotion-6:focus-within:not( :has( :is( .em5sgkm7, .emotion-19 ):focus-within ) ) .emotion-26 {
926
+ .emotion-6:focus-within:not( :has( :is( .em5sgkm8, .emotion-19 ):focus-within ) ) .emotion-26 {
927
927
  border-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
928
928
  box-shadow: 0 0 0 0.5px var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
929
929
  outline: 2px solid transparent;
@@ -1035,8 +1035,8 @@ exports[`DimensionControl rendering renders with icon and default icon label 1`]
1035
1035
  }
1036
1036
 
1037
1037
  .emotion-21 {
1038
- margin-bottom: 0;
1039
- padding-right: calc(4px * 2);
1038
+ -webkit-padding-end: 8px;
1039
+ padding-inline-end: 8px;
1040
1040
  position: absolute;
1041
1041
  pointer-events: none;
1042
1042
  right: 0;
@@ -1149,7 +1149,7 @@ exports[`DimensionControl rendering renders with icon and default icon label 1`]
1149
1149
  class="components-input-control__suffix emotion-18 emotion-19"
1150
1150
  >
1151
1151
  <div
1152
- class="components-spacer components-input-control-suffix-wrapper emotion-20 emotion-21 emotion-7"
1152
+ class="components-input-control-suffix-wrapper emotion-20 emotion-21 emotion-22"
1153
1153
  data-wp-c16t="true"
1154
1154
  data-wp-component="InputControlSuffixWrapper"
1155
1155
  >
@@ -31,6 +31,7 @@ describe( 'DimensionControl', () => {
31
31
  const { container } = render(
32
32
  <DimensionControl instanceId={ instanceId } label="Padding" />
33
33
  );
34
+ expect( console ).toHaveWarned();
34
35
  expect( container ).toMatchSnapshot();
35
36
  } );
36
37
 
@@ -71,7 +71,7 @@ export function Draggable( {
71
71
  __experimentalDragComponent: dragComponent,
72
72
  }: DraggableProps ) {
73
73
  const dragComponentRef = useRef< HTMLDivElement >( null );
74
- const cleanup = useRef( () => {} );
74
+ const cleanupRef = useRef( () => {} );
75
75
 
76
76
  /**
77
77
  * Removes the element clone, resets cursor, and removes drag listener.
@@ -80,7 +80,7 @@ export function Draggable( {
80
80
  */
81
81
  function end( event: DragEvent ) {
82
82
  event.preventDefault();
83
- cleanup.current();
83
+ cleanupRef.current();
84
84
 
85
85
  if ( onDragEnd ) {
86
86
  onDragEnd( event );
@@ -216,7 +216,7 @@ export function Draggable( {
216
216
  onDragStart( event );
217
217
  }
218
218
 
219
- cleanup.current = () => {
219
+ cleanupRef.current = () => {
220
220
  // Remove drag clone.
221
221
  if ( cloneWrapper && cloneWrapper.parentNode ) {
222
222
  cloneWrapper.parentNode.removeChild( cloneWrapper );
@@ -235,7 +235,7 @@ export function Draggable( {
235
235
 
236
236
  useEffect(
237
237
  () => () => {
238
- cleanup.current();
238
+ cleanupRef.current();
239
239
  },
240
240
  []
241
241
  );
@@ -1,11 +1,10 @@
1
- # `DropdownMenu` (v2)
1
+ # `DropdownMenuV2`
2
2
 
3
3
  <div class="callout callout-alert">
4
4
  This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
5
5
  </div>
6
6
 
7
- `DropdownMenu` displays a menu to the user (such as a set of actions or functions) triggered by a button.
8
-
7
+ `DropdownMenuV2` displays a menu to the user (such as a set of actions or functions) triggered by a button.
9
8
 
10
9
  ## Design guidelines
11
10
 
@@ -46,7 +45,7 @@ This component is still highly experimental, and it's not normally accessible to
46
45
 
47
46
  The component exposes a set of components that are meant to be used in combination with each other in order to implement a `DropdownMenu` correctly.
48
47
 
49
- ### `DropdownMenu`
48
+ ### `DropdownMenuV2`
50
49
 
51
50
  The root component, used to specify the menu's trigger and its contents.
52
51
 
@@ -58,62 +57,62 @@ The component accepts the following props:
58
57
 
59
58
  The trigger button
60
59
 
61
- - Required: yes
60
+ - Required: yes
62
61
 
63
62
  ##### `children`: `React.ReactNode`
64
63
 
65
64
  The contents of the dropdown
66
65
 
67
- - Required: yes
66
+ - Required: yes
68
67
 
69
68
  ##### `defaultOpen`: `boolean`
70
69
 
71
70
  The open state of the dropdown menu when it is initially rendered. Use when not wanting to control its open state.
72
71
 
73
- - Required: no
74
- - Default: `false`
72
+ - Required: no
73
+ - Default: `false`
75
74
 
76
75
  ##### `open`: `boolean`
77
76
 
78
77
  The controlled open state of the dropdown menu. Must be used in conjunction with `onOpenChange`.
79
78
 
80
- - Required: no
79
+ - Required: no
81
80
 
82
81
  ##### `onOpenChange`: `(open: boolean) => void`
83
82
 
84
83
  Event handler called when the open state of the dropdown menu changes.
85
84
 
86
- - Required: no
85
+ - Required: no
87
86
 
88
87
  ##### `modal`: `boolean`
89
88
 
90
89
  The modality of the dropdown menu. When set to true, interaction with outside elements will be disabled and only menu content will be visible to screen readers.
91
90
 
92
- - Required: no
93
- - Default: `true`
91
+ - Required: no
92
+ - Default: `true`
94
93
 
95
94
  ##### `placement`: ``'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end'`
96
95
 
97
96
  The placement of the dropdown menu popover.
98
97
 
99
- - Required: no
100
- - Default: `'bottom-start'` for root-level menus, `'right-start'` for nested menus
98
+ - Required: no
99
+ - Default: `'bottom-start'` for root-level menus, `'right-start'` for nested menus
101
100
 
102
101
  ##### `gutter`: `number`
103
102
 
104
103
  The distance in pixels from the trigger.
105
104
 
106
- - Required: no
107
- - Default: `8` for root-level menus, `16` for nested menus
105
+ - Required: no
106
+ - Default: `8` for root-level menus, `16` for nested menus
108
107
 
109
108
  ##### `shift`: `number`
110
109
 
111
110
  The skidding of the popover along the anchor element. Can be set to negative values to make the popover shift to the opposite side.
112
111
 
113
- - Required: no
114
- - Default: `0` for root-level menus, `-8` for nested menus
112
+ - Required: no
113
+ - Default: `0` for root-level menus, `-8` for nested menus
115
114
 
116
- ### `DropdownMenuItem`
115
+ ### `DropdownMenuV2.Item`
117
116
 
118
117
  Used to render a menu item.
119
118
 
@@ -125,35 +124,35 @@ The component accepts the following props:
125
124
 
126
125
  The contents of the item
127
126
 
128
- - Required: yes
127
+ - Required: yes
129
128
 
130
129
  ##### `prefix`: `React.ReactNode`
131
130
 
132
131
  The contents of the item's prefix.
133
132
 
134
- - Required: no
133
+ - Required: no
135
134
 
136
135
  ##### `suffix`: `React.ReactNode`
137
136
 
138
137
  The contents of the item's suffix.
139
138
 
140
- - Required: no
139
+ - Required: no
141
140
 
142
141
  ##### `hideOnClick`: `boolean`
143
142
 
144
143
  Whether to hide the dropdown menu when the menu item is clicked.
145
144
 
146
- - Required: no
147
- - Default: `true`
145
+ - Required: no
146
+ - Default: `true`
148
147
 
149
148
  ##### `disabled`: `boolean`
150
149
 
151
150
  Determines if the element is disabled.
152
151
 
153
- - Required: no
154
- - Default: `false`
152
+ - Required: no
153
+ - Default: `false`
155
154
 
156
- ### `DropdownMenuCheckboxItem`
155
+ ### `DropdownMenuV2.CheckboxItem`
157
156
 
158
157
  Used to render a checkbox item.
159
158
 
@@ -165,61 +164,61 @@ The component accepts the following props:
165
164
 
166
165
  The contents of the item
167
166
 
168
- - Required: yes
167
+ - Required: yes
169
168
 
170
169
  ##### `suffix`: `React.ReactNode`
171
170
 
172
171
  The contents of the item's suffix.
173
172
 
174
- - Required: no
173
+ - Required: no
175
174
 
176
175
  ##### `hideOnClick`: `boolean`
177
176
 
178
177
  Whether to hide the dropdown menu when the menu item is clicked.
179
178
 
180
- - Required: no
181
- - Default: `false`
179
+ - Required: no
180
+ - Default: `false`
182
181
 
183
182
  ##### `disabled`: `boolean`
184
183
 
185
184
  Determines if the element is disabled.
186
185
 
187
- - Required: no
188
- - Default: `false`
186
+ - Required: no
187
+ - Default: `false`
189
188
 
190
189
  ##### `name`: `string`
191
190
 
192
191
  The checkbox item's name.
193
192
 
194
- - Required: yes
193
+ - Required: yes
195
194
 
196
195
  ##### `value`: `string`
197
196
 
198
197
  The checkbox item's value, useful when using multiple checkbox items
199
- associated to the same `name`.
198
+ associated to the same `name`.
200
199
 
201
- - Required: no
200
+ - Required: no
202
201
 
203
202
  ##### `checked`: `boolean`
204
203
 
205
204
  The checkbox item's value, useful when using multiple checkbox items
206
- associated to the same `name`.
205
+ associated to the same `name`.
207
206
 
208
- - Required: no
207
+ - Required: no
209
208
 
210
209
  ##### `defaultChecked`: `boolean`
211
210
 
212
211
  The checked state of the checkbox menu item when it is initially rendered. Use when not wanting to control its checked state.
213
212
 
214
- - Required: no
213
+ - Required: no
215
214
 
216
215
  ##### `onChange`: `( event: React.ChangeEvent< HTMLInputElement > ) => void;`
217
216
 
218
217
  Event handler called when the checked state of the checkbox menu item changes.
219
218
 
220
- - Required: no
219
+ - Required: no
221
220
 
222
- ### `DropdownMenuRadioItem`
221
+ ### `DropdownMenuV2.RadioItem`
223
222
 
224
223
  Used to render a radio item.
225
224
 
@@ -231,60 +230,60 @@ The component accepts the following props:
231
230
 
232
231
  The contents of the item
233
232
 
234
- - Required: yes
233
+ - Required: yes
235
234
 
236
235
  ##### `suffix`: `React.ReactNode`
237
236
 
238
237
  The contents of the item's suffix.
239
238
 
240
- - Required: no
239
+ - Required: no
241
240
 
242
241
  ##### `hideOnClick`: `boolean`
243
242
 
244
243
  Whether to hide the dropdown menu when the menu item is clicked.
245
244
 
246
- - Required: no
247
- - Default: `false`
245
+ - Required: no
246
+ - Default: `false`
248
247
 
249
248
  ##### `disabled`: `boolean`
250
249
 
251
250
  Determines if the element is disabled.
252
251
 
253
- - Required: no
254
- - Default: `false`
252
+ - Required: no
253
+ - Default: `false`
255
254
 
256
255
  ##### `name`: `string`
257
256
 
258
257
  The radio item's name.
259
258
 
260
- - Required: yes
259
+ - Required: yes
261
260
 
262
261
  ##### `value`: `string | number`
263
262
 
264
263
  The radio item's value.
265
264
 
266
- - Required: yes
265
+ - Required: yes
267
266
 
268
267
  ##### `checked`: `boolean`
269
268
 
270
269
  The checkbox item's value, useful when using multiple checkbox items
271
- associated to the same `name`.
270
+ associated to the same `name`.
272
271
 
273
- - Required: no
272
+ - Required: no
274
273
 
275
274
  ##### `defaultChecked`: `boolean`
276
275
 
277
276
  The checked state of the radio menu item when it is initially rendered. Use when not wanting to control its checked state.
278
277
 
279
- - Required: no
278
+ - Required: no
280
279
 
281
280
  ##### `onChange`: `( event: React.ChangeEvent< HTMLInputElement > ) => void;`
282
281
 
283
282
  Event handler called when the checked radio menu item changes.
284
283
 
285
- - Required: no
284
+ - Required: no
286
285
 
287
- ### `DropdownMenuItemLabel`
286
+ ### `DropdownMenuV2.ItemLabel`
288
287
 
289
288
  Used to render the menu item's label.
290
289
 
@@ -296,9 +295,9 @@ The component accepts the following props:
296
295
 
297
296
  The label contents.
298
297
 
299
- - Required: yes
298
+ - Required: yes
300
299
 
301
- ### `DropdownMenuItemHelpText`
300
+ ### `DropdownMenuV2.ItemHelpText`
302
301
 
303
302
  Used to render the menu item's help text.
304
303
 
@@ -310,9 +309,9 @@ The component accepts the following props:
310
309
 
311
310
  The help text contents.
312
311
 
313
- - Required: yes
312
+ - Required: yes
314
313
 
315
- ### `DropdownMenuGroup`
314
+ ### `DropdownMenuV2.Group`
316
315
 
317
316
  Used to group menu items.
318
317
 
@@ -324,8 +323,22 @@ The component accepts the following props:
324
323
 
325
324
  The contents of the group.
326
325
 
327
- - Required: yes
326
+ - Required: yes
327
+
328
+ ### `DropdownMenuV2.GroupLabel`
329
+
330
+ Used to render a group label. The label text should be kept as short as possible.
331
+
332
+ #### Props
333
+
334
+ The component accepts the following props:
335
+
336
+ ##### `children`: `React.ReactNode`
337
+
338
+ The contents of the group label.
339
+
340
+ - Required: yes
328
341
 
329
- ### `DropdownMenuSeparatorProps`
342
+ ### `DropdownMenuV2.Separator`
330
343
 
331
344
  Used to render a visual separator.