@wordpress/components 28.5.0 → 28.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (544) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/CONTRIBUTING.md +155 -64
  3. package/build/alignment-matrix-control/cell.js +2 -2
  4. package/build/alignment-matrix-control/cell.js.map +1 -1
  5. package/build/alignment-matrix-control/index.js +6 -5
  6. package/build/alignment-matrix-control/index.js.map +1 -1
  7. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +8 -17
  8. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  9. package/build/angle-picker-control/styles/angle-picker-control-styles.js +4 -4
  10. package/build/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  11. package/build/base-control/index.js +54 -41
  12. package/build/base-control/index.js.map +1 -1
  13. package/build/base-control/types.js.map +1 -1
  14. package/build/border-control/styles.js +13 -13
  15. package/build/border-control/styles.js.map +1 -1
  16. package/build/checkbox-control/index.js +1 -0
  17. package/build/checkbox-control/index.js.map +1 -1
  18. package/build/circular-option-picker/circular-option-picker-option.js +4 -4
  19. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
  20. package/build/circular-option-picker/circular-option-picker.js +3 -3
  21. package/build/circular-option-picker/circular-option-picker.js.map +1 -1
  22. package/build/circular-option-picker/types.js.map +1 -1
  23. package/build/color-palette/utils.js +17 -5
  24. package/build/color-palette/utils.js.map +1 -1
  25. package/build/color-picker/input-with-slider.js +1 -0
  26. package/build/color-picker/input-with-slider.js.map +1 -1
  27. package/build/combobox-control/index.js +1 -0
  28. package/build/combobox-control/index.js.map +1 -1
  29. package/build/composite/context.js +19 -0
  30. package/build/composite/context.js.map +1 -0
  31. package/build/composite/index.js +287 -9
  32. package/build/composite/index.js.map +1 -1
  33. package/build/composite/legacy/index.js +10 -8
  34. package/build/composite/legacy/index.js.map +1 -1
  35. package/build/composite/types.js +6 -0
  36. package/build/composite/types.js.map +1 -0
  37. package/build/custom-select-control/types.js.map +1 -1
  38. package/build/custom-select-control-v2/custom-select.js +3 -2
  39. package/build/custom-select-control-v2/custom-select.js.map +1 -1
  40. package/build/date-time/time/index.js +11 -3
  41. package/build/date-time/time/index.js.map +1 -1
  42. package/build/date-time/types.js.map +1 -1
  43. package/build/dimension-control/index.js +25 -8
  44. package/build/dimension-control/index.js.map +1 -1
  45. package/build/dimension-control/types.js.map +1 -1
  46. package/build/dropdown-menu-v2/index.js +3 -2
  47. package/build/dropdown-menu-v2/index.js.map +1 -1
  48. package/build/dropdown-menu-v2/styles.js +23 -21
  49. package/build/dropdown-menu-v2/styles.js.map +1 -1
  50. package/build/focal-point-picker/controls.js +1 -3
  51. package/build/focal-point-picker/controls.js.map +1 -1
  52. package/build/focal-point-picker/index.js +1 -2
  53. package/build/focal-point-picker/index.js.map +1 -1
  54. package/build/focal-point-picker/styles/focal-point-picker-style.js +11 -11
  55. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  56. package/build/focal-point-picker/types.js.map +1 -1
  57. package/build/form-file-upload/types.js.map +1 -1
  58. package/build/index.js +5 -5
  59. package/build/index.js.map +1 -1
  60. package/build/item-group/styles.js +11 -11
  61. package/build/item-group/styles.js.map +1 -1
  62. package/build/mobile/utils/alignments.native.js +1 -1
  63. package/build/mobile/utils/alignments.native.js.map +1 -1
  64. package/build/navigator/navigator-back-button/component.js +1 -1
  65. package/build/navigator/navigator-back-button/component.js.map +1 -1
  66. package/build/navigator/navigator-back-button/hook.js +3 -9
  67. package/build/navigator/navigator-back-button/hook.js.map +1 -1
  68. package/build/navigator/navigator-provider/component.js +17 -9
  69. package/build/navigator/navigator-provider/component.js.map +1 -1
  70. package/build/navigator/navigator-to-parent-button/component.js +13 -40
  71. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  72. package/build/navigator/types.js.map +1 -1
  73. package/build/palette-edit/styles.js +11 -11
  74. package/build/palette-edit/styles.js.map +1 -1
  75. package/build/popover/index.js +6 -1
  76. package/build/popover/index.js.map +1 -1
  77. package/build/private-apis.js +6 -6
  78. package/build/private-apis.js.map +1 -1
  79. package/build/progress-bar/styles.js +5 -5
  80. package/build/progress-bar/styles.js.map +1 -1
  81. package/build/query-controls/index.js +5 -6
  82. package/build/query-controls/index.js.map +1 -1
  83. package/build/query-controls/types.js.map +1 -1
  84. package/build/radio-control/index.js +20 -19
  85. package/build/radio-control/index.js.map +1 -1
  86. package/build/radio-group/radio.js +3 -2
  87. package/build/radio-group/radio.js.map +1 -1
  88. package/build/range-control/index.js +32 -9
  89. package/build/range-control/index.js.map +1 -1
  90. package/build/range-control/styles/range-control-styles.js +29 -29
  91. package/build/range-control/styles/range-control-styles.js.map +1 -1
  92. package/build/search-control/index.js +5 -4
  93. package/build/search-control/index.js.map +1 -1
  94. package/build/select-control/index.js +1 -0
  95. package/build/select-control/index.js.map +1 -1
  96. package/build/tab-panel/index.js +3 -2
  97. package/build/tab-panel/index.js.map +1 -1
  98. package/build/tabs/index.js +3 -2
  99. package/build/tabs/index.js.map +1 -1
  100. package/build/tabs/tablist.js +6 -4
  101. package/build/tabs/tablist.js.map +1 -1
  102. package/build/tabs/tabpanel.js +6 -1
  103. package/build/tabs/tabpanel.js.map +1 -1
  104. package/build/text/styles.js +7 -7
  105. package/build/text/styles.js.map +1 -1
  106. package/build/text-control/index.js +1 -0
  107. package/build/text-control/index.js.map +1 -1
  108. package/build/textarea-control/index.js +1 -0
  109. package/build/textarea-control/index.js.map +1 -1
  110. package/build/textarea-control/styles/textarea-control-styles.js +8 -2
  111. package/build/textarea-control/styles/textarea-control-styles.js.map +1 -1
  112. package/build/toggle-control/index.js +9 -1
  113. package/build/toggle-control/index.js.map +1 -1
  114. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +3 -2
  115. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  116. package/build/toggle-group-control/toggle-group-control/component.js +1 -0
  117. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  118. package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
  119. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  120. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  121. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  122. package/build/tools-panel/styles.js +13 -13
  123. package/build/tools-panel/styles.js.map +1 -1
  124. package/build/tooltip/index.js +3 -2
  125. package/build/tooltip/index.js.map +1 -1
  126. package/build/tree-select/index.js +19 -6
  127. package/build/tree-select/index.js.map +1 -1
  128. package/build/unit-control/styles/unit-control-styles.js +7 -7
  129. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  130. package/build/utils/config-values.js +4 -3
  131. package/build/utils/config-values.js.map +1 -1
  132. package/build-module/alignment-matrix-control/cell.js +2 -2
  133. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  134. package/build-module/alignment-matrix-control/index.js +4 -3
  135. package/build-module/alignment-matrix-control/index.js.map +1 -1
  136. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +9 -18
  137. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  138. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js +4 -4
  139. package/build-module/angle-picker-control/styles/angle-picker-control-styles.js.map +1 -1
  140. package/build-module/base-control/index.js +54 -42
  141. package/build-module/base-control/index.js.map +1 -1
  142. package/build-module/base-control/types.js.map +1 -1
  143. package/build-module/border-control/styles.js +13 -13
  144. package/build-module/border-control/styles.js.map +1 -1
  145. package/build-module/checkbox-control/index.js +1 -0
  146. package/build-module/checkbox-control/index.js.map +1 -1
  147. package/build-module/circular-option-picker/circular-option-picker-option.js +4 -4
  148. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  149. package/build-module/circular-option-picker/circular-option-picker.js +1 -1
  150. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  151. package/build-module/circular-option-picker/types.js.map +1 -1
  152. package/build-module/color-palette/utils.js +17 -5
  153. package/build-module/color-palette/utils.js.map +1 -1
  154. package/build-module/color-picker/input-with-slider.js +1 -0
  155. package/build-module/color-picker/input-with-slider.js.map +1 -1
  156. package/build-module/combobox-control/index.js +1 -0
  157. package/build-module/combobox-control/index.js.map +1 -1
  158. package/build-module/composite/context.js +12 -0
  159. package/build-module/composite/context.js.map +1 -0
  160. package/build-module/composite/index.js +284 -6
  161. package/build-module/composite/index.js.map +1 -1
  162. package/build-module/composite/legacy/index.js +10 -6
  163. package/build-module/composite/legacy/index.js.map +1 -1
  164. package/build-module/composite/types.js +2 -0
  165. package/build-module/composite/types.js.map +1 -0
  166. package/build-module/custom-select-control/types.js.map +1 -1
  167. package/build-module/custom-select-control-v2/custom-select.js +2 -1
  168. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  169. package/build-module/date-time/time/index.js +11 -3
  170. package/build-module/date-time/time/index.js.map +1 -1
  171. package/build-module/date-time/types.js.map +1 -1
  172. package/build-module/dimension-control/index.js +25 -8
  173. package/build-module/dimension-control/index.js.map +1 -1
  174. package/build-module/dimension-control/types.js.map +1 -1
  175. package/build-module/dropdown-menu-v2/index.js +2 -1
  176. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  177. package/build-module/dropdown-menu-v2/styles.js +23 -21
  178. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  179. package/build-module/focal-point-picker/controls.js +1 -3
  180. package/build-module/focal-point-picker/controls.js.map +1 -1
  181. package/build-module/focal-point-picker/index.js +1 -2
  182. package/build-module/focal-point-picker/index.js.map +1 -1
  183. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +11 -11
  184. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  185. package/build-module/focal-point-picker/types.js.map +1 -1
  186. package/build-module/form-file-upload/types.js.map +1 -1
  187. package/build-module/index.js +1 -1
  188. package/build-module/index.js.map +1 -1
  189. package/build-module/item-group/styles.js +11 -11
  190. package/build-module/item-group/styles.js.map +1 -1
  191. package/build-module/mobile/utils/alignments.native.js +1 -1
  192. package/build-module/mobile/utils/alignments.native.js.map +1 -1
  193. package/build-module/navigator/navigator-back-button/component.js +1 -1
  194. package/build-module/navigator/navigator-back-button/component.js.map +1 -1
  195. package/build-module/navigator/navigator-back-button/hook.js +3 -9
  196. package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
  197. package/build-module/navigator/navigator-provider/component.js +17 -9
  198. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  199. package/build-module/navigator/navigator-to-parent-button/component.js +12 -41
  200. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  201. package/build-module/navigator/types.js.map +1 -1
  202. package/build-module/palette-edit/styles.js +11 -11
  203. package/build-module/palette-edit/styles.js.map +1 -1
  204. package/build-module/popover/index.js +6 -1
  205. package/build-module/popover/index.js.map +1 -1
  206. package/build-module/private-apis.js +6 -6
  207. package/build-module/private-apis.js.map +1 -1
  208. package/build-module/progress-bar/styles.js +5 -5
  209. package/build-module/progress-bar/styles.js.map +1 -1
  210. package/build-module/query-controls/index.js +5 -6
  211. package/build-module/query-controls/index.js.map +1 -1
  212. package/build-module/query-controls/types.js.map +1 -1
  213. package/build-module/radio-control/index.js +20 -19
  214. package/build-module/radio-control/index.js.map +1 -1
  215. package/build-module/radio-group/radio.js +2 -1
  216. package/build-module/radio-group/radio.js.map +1 -1
  217. package/build-module/range-control/index.js +32 -9
  218. package/build-module/range-control/index.js.map +1 -1
  219. package/build-module/range-control/styles/range-control-styles.js +29 -29
  220. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  221. package/build-module/search-control/index.js +5 -4
  222. package/build-module/search-control/index.js.map +1 -1
  223. package/build-module/select-control/index.js +1 -0
  224. package/build-module/select-control/index.js.map +1 -1
  225. package/build-module/tab-panel/index.js +2 -1
  226. package/build-module/tab-panel/index.js.map +1 -1
  227. package/build-module/tabs/index.js +2 -1
  228. package/build-module/tabs/index.js.map +1 -1
  229. package/build-module/tabs/tablist.js +5 -3
  230. package/build-module/tabs/tablist.js.map +1 -1
  231. package/build-module/tabs/tabpanel.js +6 -2
  232. package/build-module/tabs/tabpanel.js.map +1 -1
  233. package/build-module/text/styles.js +7 -7
  234. package/build-module/text/styles.js.map +1 -1
  235. package/build-module/text-control/index.js +1 -0
  236. package/build-module/text-control/index.js.map +1 -1
  237. package/build-module/textarea-control/index.js +1 -0
  238. package/build-module/textarea-control/index.js.map +1 -1
  239. package/build-module/textarea-control/styles/textarea-control-styles.js +9 -2
  240. package/build-module/textarea-control/styles/textarea-control-styles.js.map +1 -1
  241. package/build-module/toggle-control/index.js +9 -1
  242. package/build-module/toggle-control/index.js.map +1 -1
  243. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +2 -1
  244. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  245. package/build-module/toggle-group-control/toggle-group-control/component.js +1 -0
  246. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  247. package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
  248. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  249. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  250. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  251. package/build-module/tools-panel/styles.js +13 -13
  252. package/build-module/tools-panel/styles.js.map +1 -1
  253. package/build-module/tooltip/index.js +2 -1
  254. package/build-module/tooltip/index.js.map +1 -1
  255. package/build-module/tree-select/index.js +19 -6
  256. package/build-module/tree-select/index.js.map +1 -1
  257. package/build-module/unit-control/styles/unit-control-styles.js +7 -7
  258. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  259. package/build-module/utils/config-values.js +4 -3
  260. package/build-module/utils/config-values.js.map +1 -1
  261. package/build-style/style-rtl.css +19 -9
  262. package/build-style/style.css +19 -9
  263. package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
  264. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -1
  265. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
  266. package/build-types/base-control/hooks.d.ts +1 -0
  267. package/build-types/base-control/hooks.d.ts.map +1 -1
  268. package/build-types/base-control/index.d.ts +44 -0
  269. package/build-types/base-control/index.d.ts.map +1 -1
  270. package/build-types/base-control/types.d.ts +7 -0
  271. package/build-types/base-control/types.d.ts.map +1 -1
  272. package/build-types/checkbox-control/index.d.ts.map +1 -1
  273. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  274. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  275. package/build-types/circular-option-picker/types.d.ts +2 -3
  276. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  277. package/build-types/color-palette/utils.d.ts.map +1 -1
  278. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  279. package/build-types/color-picker/styles.d.ts.map +1 -1
  280. package/build-types/combobox-control/index.d.ts.map +1 -1
  281. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  282. package/build-types/composite/context.d.ts +7 -0
  283. package/build-types/composite/context.d.ts.map +1 -0
  284. package/build-types/composite/index.d.ts +181 -1
  285. package/build-types/composite/index.d.ts.map +1 -1
  286. package/build-types/composite/legacy/index.d.ts +7 -2
  287. package/build-types/composite/legacy/index.d.ts.map +1 -1
  288. package/build-types/composite/legacy/stories/utils.d.ts +19 -0
  289. package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
  290. package/build-types/composite/stories/index.story.d.ts +13 -0
  291. package/build-types/composite/stories/index.story.d.ts.map +1 -0
  292. package/build-types/composite/stories/utils.d.ts +29 -0
  293. package/build-types/composite/stories/utils.d.ts.map +1 -0
  294. package/build-types/composite/types.d.ts +288 -0
  295. package/build-types/composite/types.d.ts.map +1 -0
  296. package/build-types/custom-select-control/types.d.ts +3 -3
  297. package/build-types/custom-select-control/types.d.ts.map +1 -1
  298. package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
  299. package/build-types/date-time/date-time/index.d.ts +1 -1
  300. package/build-types/date-time/time/index.d.ts +1 -1
  301. package/build-types/date-time/time/index.d.ts.map +1 -1
  302. package/build-types/date-time/types.d.ts +7 -1
  303. package/build-types/date-time/types.d.ts.map +1 -1
  304. package/build-types/dimension-control/index.d.ts +1 -0
  305. package/build-types/dimension-control/index.d.ts.map +1 -1
  306. package/build-types/dimension-control/stories/index.story.d.ts +8 -1
  307. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  308. package/build-types/dimension-control/types.d.ts +2 -7
  309. package/build-types/dimension-control/types.d.ts.map +1 -1
  310. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  311. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  312. package/build-types/focal-point-picker/controls.d.ts +1 -1
  313. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  314. package/build-types/focal-point-picker/index.d.ts +1 -1
  315. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  316. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  317. package/build-types/focal-point-picker/types.d.ts +2 -2
  318. package/build-types/focal-point-picker/types.d.ts.map +1 -1
  319. package/build-types/form-file-upload/types.d.ts +6 -0
  320. package/build-types/form-file-upload/types.d.ts.map +1 -1
  321. package/build-types/index.d.ts +1 -1
  322. package/build-types/index.d.ts.map +1 -1
  323. package/build-types/navigator/navigator-back-button/component.d.ts +1 -1
  324. package/build-types/navigator/navigator-back-button/hook.d.ts +2 -2
  325. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  326. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  327. package/build-types/navigator/navigator-to-parent-button/component.d.ts +6 -0
  328. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  329. package/build-types/navigator/types.d.ts +45 -9
  330. package/build-types/navigator/types.d.ts.map +1 -1
  331. package/build-types/popover/index.d.ts +1 -1
  332. package/build-types/popover/index.d.ts.map +1 -1
  333. package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
  334. package/build-types/private-apis.d.ts.map +1 -1
  335. package/build-types/query-controls/index.d.ts +1 -1
  336. package/build-types/query-controls/index.d.ts.map +1 -1
  337. package/build-types/query-controls/types.d.ts +2 -1
  338. package/build-types/query-controls/types.d.ts.map +1 -1
  339. package/build-types/radio-control/index.d.ts.map +1 -1
  340. package/build-types/radio-group/radio.d.ts.map +1 -1
  341. package/build-types/range-control/index.d.ts.map +1 -1
  342. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  343. package/build-types/search-control/index.d.ts.map +1 -1
  344. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  345. package/build-types/select-control/index.d.ts.map +1 -1
  346. package/build-types/select-control/stories/index.story.d.ts +4 -2
  347. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  348. package/build-types/tab-panel/index.d.ts.map +1 -1
  349. package/build-types/tabs/index.d.ts.map +1 -1
  350. package/build-types/tabs/tablist.d.ts.map +1 -1
  351. package/build-types/tabs/tabpanel.d.ts +0 -3
  352. package/build-types/tabs/tabpanel.d.ts.map +1 -1
  353. package/build-types/text-control/index.d.ts.map +1 -1
  354. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  355. package/build-types/textarea-control/index.d.ts.map +1 -1
  356. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
  357. package/build-types/toggle-control/index.d.ts.map +1 -1
  358. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  359. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  360. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  361. package/build-types/tooltip/index.d.ts.map +1 -1
  362. package/build-types/tree-select/index.d.ts.map +1 -1
  363. package/build-types/utils/config-values.d.ts +4 -3
  364. package/package.json +20 -20
  365. package/src/alignment-matrix-control/cell.tsx +3 -3
  366. package/src/alignment-matrix-control/index.tsx +5 -4
  367. package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.ts +2 -2
  368. package/src/angle-picker-control/styles/angle-picker-control-styles.tsx +2 -2
  369. package/src/base-control/README.md +5 -2
  370. package/src/base-control/index.tsx +61 -41
  371. package/src/base-control/types.ts +7 -0
  372. package/src/border-box-control/border-box-control/README.md +7 -0
  373. package/src/border-control/border-control/README.md +7 -0
  374. package/src/border-control/styles.ts +1 -1
  375. package/src/button/README.md +7 -0
  376. package/src/button/style.scss +2 -2
  377. package/src/button-group/style.scss +2 -2
  378. package/src/checkbox-control/index.tsx +1 -0
  379. package/src/checkbox-control/stories/index.story.tsx +1 -0
  380. package/src/checkbox-control/test/index.tsx +8 -1
  381. package/src/circular-option-picker/circular-option-picker-option.tsx +8 -6
  382. package/src/circular-option-picker/circular-option-picker.tsx +1 -1
  383. package/src/circular-option-picker/style.scss +3 -3
  384. package/src/circular-option-picker/types.ts +2 -3
  385. package/src/color-indicator/style.scss +1 -1
  386. package/src/color-palette/style.scss +2 -2
  387. package/src/color-palette/utils.ts +23 -10
  388. package/src/color-picker/input-with-slider.tsx +1 -0
  389. package/src/combobox-control/README.md +8 -0
  390. package/src/combobox-control/index.tsx +1 -0
  391. package/src/combobox-control/stories/index.story.tsx +3 -4
  392. package/src/combobox-control/test/index.tsx +5 -1
  393. package/src/composite/README.md +325 -0
  394. package/src/composite/context.ts +14 -0
  395. package/src/composite/index.tsx +341 -0
  396. package/src/composite/legacy/index.tsx +15 -14
  397. package/src/composite/legacy/stories/utils.tsx +19 -0
  398. package/src/composite/stories/index.story.tsx +466 -0
  399. package/src/composite/{current/stories → stories}/utils.tsx +22 -7
  400. package/src/composite/types.ts +298 -0
  401. package/src/custom-gradient-picker/style.scss +2 -2
  402. package/src/custom-select-control/README.md +7 -0
  403. package/src/custom-select-control/test/index.tsx +125 -0
  404. package/src/custom-select-control/types.ts +3 -3
  405. package/src/custom-select-control-v2/custom-select.tsx +2 -1
  406. package/src/date-time/time/index.tsx +26 -12
  407. package/src/date-time/types.ts +11 -1
  408. package/src/dimension-control/README.md +17 -0
  409. package/src/dimension-control/index.tsx +26 -9
  410. package/src/dimension-control/stories/index.story.tsx +1 -0
  411. package/src/dimension-control/test/__snapshots__/index.test.js.snap +0 -16
  412. package/src/dimension-control/test/index.test.js +5 -1
  413. package/src/dimension-control/types.ts +5 -7
  414. package/src/drop-zone/style.scss +1 -1
  415. package/src/dropdown-menu-v2/index.tsx +5 -3
  416. package/src/dropdown-menu-v2/styles.ts +17 -15
  417. package/src/focal-point-picker/README.md +9 -1
  418. package/src/focal-point-picker/controls.tsx +1 -3
  419. package/src/focal-point-picker/index.tsx +1 -2
  420. package/src/focal-point-picker/stories/index.story.tsx +3 -0
  421. package/src/focal-point-picker/styles/focal-point-picker-style.ts +1 -1
  422. package/src/focal-point-picker/test/index.tsx +5 -1
  423. package/src/focal-point-picker/types.ts +2 -2
  424. package/src/font-size-picker/README.md +7 -0
  425. package/src/form-file-upload/README.md +8 -0
  426. package/src/form-file-upload/types.ts +6 -0
  427. package/src/form-token-field/README.md +1 -0
  428. package/src/guide/style.scss +0 -1
  429. package/src/index.ts +1 -1
  430. package/src/input-control/README.md +8 -0
  431. package/src/item-group/styles.ts +1 -1
  432. package/src/mobile/utils/alignments.native.js +1 -0
  433. package/src/modal/style.scss +3 -3
  434. package/src/navigator/navigator-back-button/component.tsx +1 -1
  435. package/src/navigator/navigator-back-button/hook.ts +6 -10
  436. package/src/navigator/navigator-provider/README.md +38 -36
  437. package/src/navigator/navigator-provider/component.tsx +13 -7
  438. package/src/navigator/navigator-screen/README.md +13 -1
  439. package/src/navigator/navigator-to-parent-button/README.md +2 -0
  440. package/src/navigator/navigator-to-parent-button/component.tsx +14 -43
  441. package/src/navigator/test/index.tsx +136 -6
  442. package/src/navigator/types.ts +45 -10
  443. package/src/number-control/README.md +8 -0
  444. package/src/palette-edit/styles.ts +5 -5
  445. package/src/placeholder/style.scss +4 -1
  446. package/src/popover/index.tsx +9 -3
  447. package/src/popover/style.scss +2 -2
  448. package/src/popover/test/index.tsx +34 -0
  449. package/src/private-apis.ts +6 -12
  450. package/src/progress-bar/styles.ts +2 -2
  451. package/src/query-controls/README.md +7 -0
  452. package/src/query-controls/index.tsx +5 -6
  453. package/src/query-controls/types.ts +2 -1
  454. package/src/radio-control/index.tsx +28 -20
  455. package/src/radio-control/style.scss +13 -2
  456. package/src/radio-control/test/index.tsx +43 -40
  457. package/src/radio-group/radio.tsx +2 -1
  458. package/src/range-control/README.md +7 -0
  459. package/src/range-control/index.tsx +39 -9
  460. package/src/range-control/stories/index.story.tsx +7 -0
  461. package/src/range-control/styles/range-control-styles.ts +2 -2
  462. package/src/range-control/test/index.tsx +54 -14
  463. package/src/search-control/index.tsx +7 -4
  464. package/src/search-control/stories/index.story.tsx +1 -0
  465. package/src/search-control/test/index.tsx +1 -0
  466. package/src/select-control/README.md +8 -0
  467. package/src/select-control/index.tsx +1 -0
  468. package/src/select-control/stories/index.story.tsx +8 -5
  469. package/src/select-control/test/select-control.tsx +12 -6
  470. package/src/snackbar/style.scss +2 -2
  471. package/src/tab-panel/index.tsx +4 -1
  472. package/src/tab-panel/style.scss +1 -1
  473. package/src/tabs/index.tsx +2 -1
  474. package/src/tabs/tablist.tsx +6 -4
  475. package/src/tabs/tabpanel.tsx +6 -2
  476. package/src/text/styles.ts +1 -1
  477. package/src/text-control/README.md +8 -0
  478. package/src/text-control/index.tsx +1 -0
  479. package/src/text-control/stories/index.story.tsx +3 -1
  480. package/src/text-control/test/text-control.tsx +5 -1
  481. package/src/textarea-control/index.tsx +1 -0
  482. package/src/textarea-control/stories/index.story.tsx +2 -0
  483. package/src/textarea-control/styles/textarea-control-styles.ts +75 -2
  484. package/src/toggle-control/index.tsx +9 -0
  485. package/src/toggle-control/stories/index.story.tsx +1 -0
  486. package/src/toggle-control/test/index.tsx +7 -1
  487. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +8 -24
  488. package/src/toggle-group-control/test/index.tsx +5 -1
  489. package/src/toggle-group-control/toggle-group-control/README.md +7 -0
  490. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +2 -1
  491. package/src/toggle-group-control/toggle-group-control/component.tsx +1 -0
  492. package/src/toggle-group-control/toggle-group-control/styles.ts +1 -1
  493. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +2 -2
  494. package/src/toolbar/toolbar/style.scss +2 -2
  495. package/src/tools-panel/styles.ts +1 -1
  496. package/src/tooltip/index.tsx +2 -1
  497. package/src/tooltip/style.scss +1 -1
  498. package/src/tree-select/index.tsx +16 -5
  499. package/src/tree-select/stories/index.story.tsx +1 -0
  500. package/src/unit-control/README.md +7 -0
  501. package/src/unit-control/styles/unit-control-styles.ts +1 -1
  502. package/src/utils/config-values.js +4 -3
  503. package/tsconfig.tsbuildinfo +1 -1
  504. package/build/composite/current/index.js +0 -43
  505. package/build/composite/current/index.js.map +0 -1
  506. package/build/composite/v2.js +0 -17
  507. package/build/composite/v2.js.map +0 -1
  508. package/build/utils/input/base.js +0 -20
  509. package/build/utils/input/base.js.map +0 -1
  510. package/build/utils/input/index.js +0 -17
  511. package/build/utils/input/index.js.map +0 -1
  512. package/build/utils/input/input-control.js +0 -21
  513. package/build/utils/input/input-control.js.map +0 -1
  514. package/build-module/composite/current/index.js +0 -12
  515. package/build-module/composite/current/index.js.map +0 -1
  516. package/build-module/composite/v2.js +0 -5
  517. package/build-module/composite/v2.js.map +0 -1
  518. package/build-module/utils/input/base.js +0 -13
  519. package/build-module/utils/input/base.js.map +0 -1
  520. package/build-module/utils/input/index.js +0 -2
  521. package/build-module/utils/input/index.js.map +0 -1
  522. package/build-module/utils/input/input-control.js +0 -14
  523. package/build-module/utils/input/input-control.js.map +0 -1
  524. package/build-types/composite/current/index.d.ts +0 -12
  525. package/build-types/composite/current/index.d.ts.map +0 -1
  526. package/build-types/composite/current/stories/index.story.d.ts +0 -13
  527. package/build-types/composite/current/stories/index.story.d.ts.map +0 -1
  528. package/build-types/composite/current/stories/utils.d.ts +0 -14
  529. package/build-types/composite/current/stories/utils.d.ts.map +0 -1
  530. package/build-types/composite/v2.d.ts +0 -2
  531. package/build-types/composite/v2.d.ts.map +0 -1
  532. package/build-types/utils/input/base.d.ts +0 -3
  533. package/build-types/utils/input/base.d.ts.map +0 -1
  534. package/build-types/utils/input/index.d.ts +0 -2
  535. package/build-types/utils/input/index.d.ts.map +0 -1
  536. package/build-types/utils/input/input-control.d.ts +0 -2
  537. package/build-types/utils/input/input-control.d.ts.map +0 -1
  538. package/src/composite/current/index.ts +0 -20
  539. package/src/composite/current/stories/index.story.tsx +0 -86
  540. package/src/composite/index.ts +0 -7
  541. package/src/composite/v2.ts +0 -4
  542. package/src/utils/input/base.js +0 -30
  543. package/src/utils/input/index.js +0 -1
  544. package/src/utils/input/input-control.js +0 -63
@@ -63,6 +63,7 @@ const SelectControlWithState: StoryFn< typeof SelectControl > = ( props ) => {
63
63
 
64
64
  export const Default = SelectControlWithState.bind( {} );
65
65
  Default.args = {
66
+ __nextHasNoMarginBottom: true,
66
67
  options: [
67
68
  { value: '', label: 'Select an Option', disabled: true },
68
69
  { value: 'a', label: 'Option A' },
@@ -82,9 +83,11 @@ WithLabelAndHelpText.args = {
82
83
  * As an alternative to the `options` prop, `optgroup`s and `options` can be
83
84
  * passed in as `children` for more customizeability.
84
85
  */
85
- export const WithCustomChildren: StoryFn< typeof SelectControl > = ( args ) => {
86
- return (
87
- <SelectControlWithState { ...args }>
86
+ export const WithCustomChildren = SelectControlWithState.bind( {} );
87
+ WithCustomChildren.args = {
88
+ __nextHasNoMarginBottom: true,
89
+ children: (
90
+ <>
88
91
  <option value="option-1">Option 1</option>
89
92
  <option value="option-2" disabled>
90
93
  Option 2 - Disabled
@@ -97,8 +100,8 @@ export const WithCustomChildren: StoryFn< typeof SelectControl > = ( args ) => {
97
100
  Option Group 1 - Option 2 - Disabled
98
101
  </option>
99
102
  </optgroup>
100
- </SelectControlWithState>
101
- );
103
+ </>
104
+ ),
102
105
  };
103
106
 
104
107
  export const Minimal = SelectControlWithState.bind( {} );
@@ -7,7 +7,13 @@ import userEvent from '@testing-library/user-event';
7
7
  /**
8
8
  * Internal dependencies
9
9
  */
10
- import SelectControl from '..';
10
+ import _SelectControl from '..';
11
+
12
+ const SelectControl = (
13
+ props: React.ComponentProps< typeof _SelectControl >
14
+ ) => {
15
+ return <_SelectControl { ...props } __nextHasNoMarginBottom />;
16
+ };
11
17
 
12
18
  describe( 'SelectControl', () => {
13
19
  it( 'should not render when no options or children are provided', () => {
@@ -123,7 +129,7 @@ describe( 'SelectControl', () => {
123
129
  onChange={ onChange }
124
130
  />;
125
131
 
126
- <SelectControl
132
+ <_SelectControl
127
133
  // @ts-expect-error "string" is not "narrow" or "value"
128
134
  value="string"
129
135
  options={ [
@@ -142,7 +148,7 @@ describe( 'SelectControl', () => {
142
148
  } );
143
149
 
144
150
  it( 'should accept an explicit type argument', () => {
145
- <SelectControl< 'narrow' | 'value' >
151
+ <_SelectControl< 'narrow' | 'value' >
146
152
  // @ts-expect-error "string" is not "narrow" or "value"
147
153
  value="string"
148
154
  options={ [
@@ -166,7 +172,7 @@ describe( 'SelectControl', () => {
166
172
  value: ( 'foo' | 'bar' )[]
167
173
  ) => void = () => {};
168
174
 
169
- <SelectControl
175
+ <_SelectControl
170
176
  multiple
171
177
  value={ [ 'narrow' ] }
172
178
  options={ [
@@ -183,7 +189,7 @@ describe( 'SelectControl', () => {
183
189
  onChange={ onChange }
184
190
  />;
185
191
 
186
- <SelectControl
192
+ <_SelectControl
187
193
  multiple
188
194
  // @ts-expect-error "string" is not "narrow" or "value"
189
195
  value={ [ 'string' ] }
@@ -205,7 +211,7 @@ describe( 'SelectControl', () => {
205
211
  } );
206
212
 
207
213
  it( 'should accept an explicit type argument', () => {
208
- <SelectControl< 'narrow' | 'value' >
214
+ <_SelectControl< 'narrow' | 'value' >
209
215
  multiple
210
216
  // @ts-expect-error "string" is not "narrow" or "value"
211
217
  value={ [ 'string' ] }
@@ -3,8 +3,8 @@
3
3
  font-size: $default-font-size;
4
4
  background: rgba($black, 0.85); // Emulates #1e1e1e closely.
5
5
  backdrop-filter: blur($grid-unit-20) saturate(180%);
6
- border-radius: $radius-block-ui;
7
- box-shadow: $shadow-popover;
6
+ border-radius: $radius-medium;
7
+ box-shadow: $elevation-x-small;
8
8
  color: $white;
9
9
  padding: $grid-unit-15 ($grid-unit-05 * 5);
10
10
  width: 100%;
@@ -2,6 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import * as Ariakit from '@ariakit/react';
5
+ import { useStoreState } from '@ariakit/react';
5
6
  import clsx from 'clsx';
6
7
  import type { ForwardedRef } from 'react';
7
8
 
@@ -121,7 +122,9 @@ const UnforwardedTabPanel = (
121
122
  defaultSelectedId: prependInstanceId( initialTabName ),
122
123
  } );
123
124
 
124
- const selectedTabName = extractTabName( tabStore.useState( 'selectedId' ) );
125
+ const selectedTabName = extractTabName(
126
+ useStoreState( tabStore, 'selectedId' )
127
+ );
125
128
 
126
129
  const setTabStoreSelectedId = useCallback(
127
130
  ( tabName: string ) => {
@@ -67,7 +67,7 @@
67
67
 
68
68
  // Draw the indicator.
69
69
  box-shadow: 0 0 0 0 transparent;
70
- border-radius: $radius-block-ui;
70
+ border-radius: $radius-small;
71
71
 
72
72
  // Animation
73
73
  transition: all 0.1s linear;
@@ -2,6 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import * as Ariakit from '@ariakit/react';
5
+ import { useStoreState } from '@ariakit/react';
5
6
 
6
7
  /**
7
8
  * WordPress dependencies
@@ -48,7 +49,7 @@ function Tabs( {
48
49
 
49
50
  const isControlled = selectedTabId !== undefined;
50
51
 
51
- const { items, selectedId, activeId } = store.useState();
52
+ const { items, selectedId, activeId } = useStoreState( store );
52
53
  const { setSelectedId, setActiveId } = store;
53
54
 
54
55
  // Keep track of whether tabs have been populated. This is used to prevent
@@ -2,6 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import * as Ariakit from '@ariakit/react';
5
+ import { useStoreState } from '@ariakit/react';
5
6
 
6
7
  /**
7
8
  * WordPress dependencies
@@ -26,7 +27,8 @@ export const TabList = forwardRef<
26
27
  >( function TabList( { children, ...otherProps }, ref ) {
27
28
  const context = useTabsContext();
28
29
 
29
- const selectedId = context?.store.useState( 'selectedId' );
30
+ const tabStoreState = useStoreState( context?.store );
31
+ const selectedId = tabStoreState?.selectedId;
30
32
  const indicatorPosition = useTrackElementOffsetRect(
31
33
  context?.store.item( selectedId )?.element
32
34
  );
@@ -37,13 +39,13 @@ export const TabList = forwardRef<
37
39
  ( { previousValue } ) => previousValue && setAnimationEnabled( true )
38
40
  );
39
41
 
40
- if ( ! context ) {
42
+ if ( ! context || ! tabStoreState ) {
41
43
  warning( '`Tabs.TabList` must be wrapped in a `Tabs` component.' );
42
44
  return null;
43
45
  }
44
- const { store } = context;
45
46
 
46
- const { activeId, selectOnMove } = store.useState();
47
+ const { store } = context;
48
+ const { activeId, selectOnMove } = tabStoreState;
47
49
  const { setActiveId } = store;
48
50
 
49
51
  const onBlur = () => {
@@ -1,7 +1,11 @@
1
1
  /**
2
- * WordPress dependencies
2
+ * External dependencies
3
3
  */
4
+ import { useStoreState } from '@ariakit/react';
4
5
 
6
+ /**
7
+ * WordPress dependencies
8
+ */
5
9
  import { forwardRef } from '@wordpress/element';
6
10
 
7
11
  /**
@@ -22,13 +26,13 @@ export const TabPanel = forwardRef<
22
26
  ref
23
27
  ) {
24
28
  const context = useTabsContext();
29
+ const selectedId = useStoreState( context?.store, 'selectedId' );
25
30
  if ( ! context ) {
26
31
  warning( '`Tabs.TabPanel` must be wrapped in a `Tabs` component.' );
27
32
  return null;
28
33
  }
29
34
  const { store, instanceId } = context;
30
35
  const instancedTabId = `${ instanceId }-${ tabId }`;
31
- const selectedId = store.useState( ( state ) => state.selectedId );
32
36
 
33
37
  return (
34
38
  <StyledTabPanel
@@ -35,7 +35,7 @@ export const muted = css`
35
35
  export const highlighterText = css`
36
36
  mark {
37
37
  background: ${ COLORS.alert.yellow };
38
- border-radius: 2px;
38
+ border-radius: ${ CONFIG.radiusSmall };
39
39
  box-shadow:
40
40
  0 0 0 1px rgba( 0, 0, 0, 0.05 ) inset,
41
41
  0 -1px 0 rgba( 0, 0, 0, 0.1 ) inset;
@@ -127,6 +127,14 @@ A function that receives the value of the input.
127
127
  - Type: `function`
128
128
  - Required: Yes
129
129
 
130
+ #### __next40pxDefaultSize
131
+
132
+ Start opting into the larger default height that will become the default size in a future version.
133
+
134
+ - Type: `Boolean`
135
+ - Required: No
136
+ - Default: `false`
137
+
130
138
  ## Related components
131
139
 
132
140
  - To offer users more constrained options for input, use SelectControl, RadioControl, CheckboxControl, or RangeControl.
@@ -41,6 +41,7 @@ function UnforwardedTextControl(
41
41
  return (
42
42
  <BaseControl
43
43
  __nextHasNoMarginBottom={ __nextHasNoMarginBottom }
44
+ __associatedWPComponentName="TextControl"
44
45
  label={ label }
45
46
  hideLabelFromVision={ hideLabelFromVision }
46
47
  id={ id }
@@ -52,7 +52,9 @@ const DefaultTemplate: StoryFn< typeof TextControl > = ( {
52
52
  export const Default: StoryFn< typeof TextControl > = DefaultTemplate.bind(
53
53
  {}
54
54
  );
55
- Default.args = {};
55
+ Default.args = {
56
+ __nextHasNoMarginBottom: true,
57
+ };
56
58
 
57
59
  export const WithLabelAndHelpText: StoryFn< typeof TextControl > =
58
60
  DefaultTemplate.bind( {} );
@@ -6,7 +6,11 @@ import { render, screen } from '@testing-library/react';
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
- import TextControl from '..';
9
+ import _TextControl from '..';
10
+
11
+ const TextControl = ( props: React.ComponentProps< typeof _TextControl > ) => {
12
+ return <_TextControl { ...props } __nextHasNoMarginBottom />;
13
+ };
10
14
 
11
15
  const noop = () => {};
12
16
 
@@ -35,6 +35,7 @@ function UnforwardedTextareaControl(
35
35
  return (
36
36
  <BaseControl
37
37
  __nextHasNoMarginBottom={ __nextHasNoMarginBottom }
38
+ __associatedWPComponentName="TextareaControl"
38
39
  label={ label }
39
40
  hideLabelFromVision={ hideLabelFromVision }
40
41
  id={ id }
@@ -51,6 +51,8 @@ const Template: StoryFn< typeof TextareaControl > = ( {
51
51
 
52
52
  export const Default: StoryFn< typeof TextareaControl > = Template.bind( {} );
53
53
  Default.args = {
54
+ __nextHasNoMarginBottom: true,
54
55
  label: 'Text',
55
56
  help: 'Enter some text',
57
+ placeholder: 'Placeholder',
56
58
  };
@@ -2,13 +2,86 @@
2
2
  * External dependencies
3
3
  */
4
4
  import styled from '@emotion/styled';
5
+ import { css } from '@emotion/react';
5
6
 
6
7
  /**
7
8
  * Internal dependencies
8
9
  */
9
- import { inputControl } from '../../utils/input';
10
+ import { font } from '../../utils/font';
11
+ import { COLORS } from '../../utils/colors-values';
12
+ import { CONFIG } from '../../utils';
13
+ import { breakpoint } from '../../utils/breakpoint';
14
+
15
+ const inputStyleNeutral = css`
16
+ box-shadow: 0 0 0 transparent;
17
+ border-radius: ${ CONFIG.radiusSmall };
18
+ border: ${ CONFIG.borderWidth } solid ${ COLORS.ui.border };
19
+
20
+ @media not ( prefers-reduced-motion ) {
21
+ transition: box-shadow 0.1s linear;
22
+ }
23
+ `;
24
+
25
+ const inputStyleFocus = css`
26
+ border-color: ${ COLORS.theme.accent };
27
+ box-shadow: 0 0 0
28
+ calc( ${ CONFIG.borderWidthFocus } - ${ CONFIG.borderWidth } )
29
+ ${ COLORS.theme.accent };
30
+
31
+ // Windows High Contrast mode will show this outline, but not the box-shadow.
32
+ outline: 2px solid transparent;
33
+ `;
10
34
 
11
35
  export const StyledTextarea = styled.textarea`
12
36
  width: 100%;
13
- ${ inputControl }
37
+ display: block;
38
+ font-family: ${ font( 'default.fontFamily' ) };
39
+ line-height: 20px;
40
+
41
+ // Vertical padding is to match the standard 40px control height when rows=1,
42
+ // in conjunction with the 20px line-height.
43
+ // "Standard" metrics are 10px 12px, but subtracts 1px each to account for the border width.
44
+ padding: 9px 11px;
45
+
46
+ ${ inputStyleNeutral };
47
+
48
+ /* Fonts smaller than 16px causes mobile safari to zoom. */
49
+ font-size: ${ font( 'mobileTextMinFontSize' ) };
50
+
51
+ ${ breakpoint( 'small' ) } {
52
+ font-size: ${ font( 'default.fontSize' ) };
53
+ }
54
+
55
+ &:focus {
56
+ ${ inputStyleFocus }
57
+ }
58
+
59
+ // Use opacity to work in various editor styles.
60
+ &::-webkit-input-placeholder {
61
+ color: ${ COLORS.ui.darkGrayPlaceholder };
62
+ }
63
+
64
+ &::-moz-placeholder {
65
+ opacity: 1; // Necessary because Firefox reduces this from 1.
66
+ color: ${ COLORS.ui.darkGrayPlaceholder };
67
+ }
68
+
69
+ &:-ms-input-placeholder {
70
+ color: ${ COLORS.ui.darkGrayPlaceholder };
71
+ }
72
+
73
+ .is-dark-theme & {
74
+ &::-webkit-input-placeholder {
75
+ color: ${ COLORS.ui.lightGrayPlaceholder };
76
+ }
77
+
78
+ &::-moz-placeholder {
79
+ opacity: 1; // Necessary because Firefox reduces this from 1.
80
+ color: ${ COLORS.ui.lightGrayPlaceholder };
81
+ }
82
+
83
+ &:-ms-input-placeholder {
84
+ color: ${ COLORS.ui.lightGrayPlaceholder };
85
+ }
86
+ }
14
87
  `;
@@ -10,6 +10,7 @@ import clsx from 'clsx';
10
10
  */
11
11
  import { forwardRef } from '@wordpress/element';
12
12
  import { useInstanceId } from '@wordpress/compose';
13
+ import deprecated from '@wordpress/deprecated';
13
14
 
14
15
  /**
15
16
  * Internal dependencies
@@ -48,6 +49,14 @@ function UnforwardedToggleControl(
48
49
  ! __nextHasNoMarginBottom && css( { marginBottom: space( 3 ) } )
49
50
  );
50
51
 
52
+ if ( ! __nextHasNoMarginBottom ) {
53
+ deprecated( 'Bottom margin styles for wp.components.ToggleControl', {
54
+ since: '6.7',
55
+ version: '7.0',
56
+ hint: 'Set the `__nextHasNoMarginBottom` prop to true to start opting into the new styles, which will become the default in a future version.',
57
+ } );
58
+ }
59
+
51
60
  let describedBy, helpLabel;
52
61
  if ( help ) {
53
62
  if ( typeof help === 'function' ) {
@@ -48,6 +48,7 @@ const Template: StoryFn< typeof ToggleControl > = ( {
48
48
 
49
49
  export const Default = Template.bind( {} );
50
50
  Default.args = {
51
+ __nextHasNoMarginBottom: true,
51
52
  label: 'Enable something',
52
53
  };
53
54
 
@@ -6,7 +6,13 @@ import { render, screen } from '@testing-library/react';
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
- import ToggleControl from '..';
9
+ import _ToggleControl from '..';
10
+
11
+ const ToggleControl = (
12
+ props: React.ComponentProps< typeof _ToggleControl >
13
+ ) => {
14
+ return <_ToggleControl { ...props } __nextHasNoMarginBottom />;
15
+ };
10
16
 
11
17
  describe( 'ToggleControl', () => {
12
18
  it( 'should label the toggle', () => {
@@ -13,10 +13,6 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
13
13
  box-sizing: inherit;
14
14
  }
15
15
 
16
- .emotion-2 {
17
- margin-bottom: calc(4px * 2);
18
- }
19
-
20
16
  .components-panel__row .emotion-2 {
21
17
  margin-bottom: inherit;
22
18
  }
@@ -88,7 +84,7 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
88
84
  appearance: none;
89
85
  background: transparent;
90
86
  border: none;
91
- border-radius: 2px;
87
+ border-radius: 1px;
92
88
  color: #757575;
93
89
  fill: currentColor;
94
90
  cursor: pointer;
@@ -156,7 +152,7 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
156
152
 
157
153
  .emotion-15 {
158
154
  background: #1e1e1e;
159
- border-radius: 2px;
155
+ border-radius: 1px;
160
156
  position: absolute;
161
157
  inset: 0;
162
158
  z-index: 1;
@@ -175,7 +171,7 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
175
171
  appearance: none;
176
172
  background: transparent;
177
173
  border: none;
178
- border-radius: 2px;
174
+ border-radius: 1px;
179
175
  color: #757575;
180
176
  fill: currentColor;
181
177
  cursor: pointer;
@@ -349,10 +345,6 @@ exports[`ToggleGroupControl controlled should render correctly with text options
349
345
  box-sizing: inherit;
350
346
  }
351
347
 
352
- .emotion-2 {
353
- margin-bottom: calc(4px * 2);
354
- }
355
-
356
348
  .components-panel__row .emotion-2 {
357
349
  margin-bottom: inherit;
358
350
  }
@@ -424,7 +416,7 @@ exports[`ToggleGroupControl controlled should render correctly with text options
424
416
  appearance: none;
425
417
  background: transparent;
426
418
  border: none;
427
- border-radius: 2px;
419
+ border-radius: 1px;
428
420
  color: #757575;
429
421
  fill: currentColor;
430
422
  cursor: pointer;
@@ -573,10 +565,6 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
573
565
  box-sizing: inherit;
574
566
  }
575
567
 
576
- .emotion-2 {
577
- margin-bottom: calc(4px * 2);
578
- }
579
-
580
568
  .components-panel__row .emotion-2 {
581
569
  margin-bottom: inherit;
582
570
  }
@@ -648,7 +636,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
648
636
  appearance: none;
649
637
  background: transparent;
650
638
  border: none;
651
- border-radius: 2px;
639
+ border-radius: 1px;
652
640
  color: #757575;
653
641
  fill: currentColor;
654
642
  cursor: pointer;
@@ -716,7 +704,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
716
704
 
717
705
  .emotion-15 {
718
706
  background: #1e1e1e;
719
- border-radius: 2px;
707
+ border-radius: 1px;
720
708
  position: absolute;
721
709
  inset: 0;
722
710
  z-index: 1;
@@ -735,7 +723,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
735
723
  appearance: none;
736
724
  background: transparent;
737
725
  border: none;
738
- border-radius: 2px;
726
+ border-radius: 1px;
739
727
  color: #757575;
740
728
  fill: currentColor;
741
729
  cursor: pointer;
@@ -903,10 +891,6 @@ exports[`ToggleGroupControl uncontrolled should render correctly with text optio
903
891
  box-sizing: inherit;
904
892
  }
905
893
 
906
- .emotion-2 {
907
- margin-bottom: calc(4px * 2);
908
- }
909
-
910
894
  .components-panel__row .emotion-2 {
911
895
  margin-bottom: inherit;
912
896
  }
@@ -978,7 +962,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with text optio
978
962
  appearance: none;
979
963
  background: transparent;
980
964
  border: none;
981
- border-radius: 2px;
965
+ border-radius: 1px;
982
966
  color: #757575;
983
967
  fill: currentColor;
984
968
  cursor: pointer;
@@ -15,7 +15,7 @@ import { formatLowercase, formatUppercase } from '@wordpress/icons';
15
15
  */
16
16
  import Button from '../../button';
17
17
  import {
18
- ToggleGroupControl,
18
+ ToggleGroupControl as _ToggleGroupControl,
19
19
  ToggleGroupControlOption,
20
20
  ToggleGroupControlOptionIcon,
21
21
  } from '../index';
@@ -27,6 +27,10 @@ const hoverOutside = async () => {
27
27
  await hover( document.body, { clientX: 10, clientY: 10 } );
28
28
  };
29
29
 
30
+ const ToggleGroupControl = ( props: ToggleGroupControlProps ) => {
31
+ return <_ToggleGroupControl { ...props } __nextHasNoMarginBottom />;
32
+ };
33
+
30
34
  const ControlledToggleGroupControl = ( {
31
35
  value: valueProp,
32
36
  onChange,
@@ -88,6 +88,13 @@ The value of the `ToggleGroupControl`.
88
88
 
89
89
  - Required: No
90
90
 
91
+ ### `__next40pxDefaultSize`: `boolean`
92
+
93
+ Start opting into the larger default height that will become the default size in a future version.
94
+
95
+ - Required: No
96
+ - Default: `false`
97
+
91
98
  ### `__nextHasNoMarginBottom`: `boolean`
92
99
 
93
100
  Start opting into the new margin-free styles that will become the default in a future version.
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import type { ForwardedRef } from 'react';
5
5
  import * as Ariakit from '@ariakit/react';
6
+ import { useStoreState } from '@ariakit/react';
6
7
 
7
8
  /**
8
9
  * WordPress dependencies
@@ -66,7 +67,7 @@ function UnforwardedToggleGroupControlAsRadioGroup(
66
67
  setValue: wrappedOnChangeProp,
67
68
  } );
68
69
 
69
- const selectedValue = radio.useState( 'value' );
70
+ const selectedValue = useStoreState( radio, 'value' );
70
71
  const setValue = radio.setValue;
71
72
 
72
73
  const groupContextValue = useMemo(
@@ -72,6 +72,7 @@ function UnconnectedToggleGroupControl(
72
72
  <BaseControl
73
73
  help={ help }
74
74
  __nextHasNoMarginBottom={ __nextHasNoMarginBottom }
75
+ __associatedWPComponentName="ToggleGroupControl"
75
76
  >
76
77
  { ! hideLabelFromVision && (
77
78
  <VisualLabelWrapper>
@@ -19,7 +19,7 @@ export const toggleGroupControl = ( {
19
19
  } ) => css`
20
20
  background: ${ COLORS.ui.background };
21
21
  border: 1px solid transparent;
22
- border-radius: ${ CONFIG.controlBorderRadius };
22
+ border-radius: ${ CONFIG.radiusSmall };
23
23
  display: inline-flex;
24
24
  min-width: 0;
25
25
  position: relative;
@@ -37,7 +37,7 @@ export const buttonView = ( {
37
37
  appearance: none;
38
38
  background: transparent;
39
39
  border: none;
40
- border-radius: ${ CONFIG.controlBorderRadius };
40
+ border-radius: ${ CONFIG.radiusXSmall };
41
41
  color: ${ COLORS.gray[ 700 ] };
42
42
  fill: currentColor;
43
43
  cursor: pointer;
@@ -122,7 +122,7 @@ const isIconStyles = ( {
122
122
 
123
123
  export const backdropView = css`
124
124
  background: ${ COLORS.gray[ 900 ] };
125
- border-radius: ${ CONFIG.controlBorderRadius };
125
+ border-radius: ${ CONFIG.radiusXSmall };
126
126
  position: absolute;
127
127
  inset: 0;
128
128
  z-index: 1;
@@ -1,7 +1,7 @@
1
1
  .components-accessible-toolbar {
2
2
  display: inline-flex;
3
3
  border: $border-width solid $gray-900;
4
- border-radius: $radius-block-ui;
4
+ border-radius: $radius-small;
5
5
  flex-shrink: 0;
6
6
 
7
7
  & > .components-toolbar-group:last-child {
@@ -47,7 +47,7 @@
47
47
  content: "";
48
48
  position: absolute;
49
49
  display: block;
50
- border-radius: $radius-block-ui;
50
+ border-radius: $radius-small;
51
51
  height: $grid-unit-40;
52
52
 
53
53
  // Position the focus rectangle.
@@ -21,7 +21,7 @@ const toolsPanelGrid = {
21
21
  grid-template-columns: ${ `repeat( ${ columns }, minmax(0, 1fr) )` };
22
22
  `,
23
23
  spacing: css`
24
- column-gap: ${ space( 2 ) };
24
+ column-gap: ${ space( 4 ) };
25
25
  row-gap: ${ space( 4 ) };
26
26
  `,
27
27
  item: {