@wordpress/components 25.12.0 → 25.14.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 (342) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/build/angle-picker-control/index.js +0 -1
  3. package/build/angle-picker-control/index.js.map +1 -1
  4. package/build/border-control/border-control-dropdown/component.js +4 -2
  5. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  6. package/build/border-control/border-control-dropdown/hook.js +3 -2
  7. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  8. package/build/border-control/styles.js +17 -17
  9. package/build/border-control/styles.js.map +1 -1
  10. package/build/checkbox-control/index.js +1 -1
  11. package/build/checkbox-control/index.js.map +1 -1
  12. package/build/checkbox-control/types.js.map +1 -1
  13. package/build/custom-select-control-v2/index.js +87 -0
  14. package/build/custom-select-control-v2/index.js.map +1 -0
  15. package/build/custom-select-control-v2/styles.js +85 -0
  16. package/build/custom-select-control-v2/styles.js.map +1 -0
  17. package/build/custom-select-control-v2/types.js +6 -0
  18. package/build/custom-select-control-v2/types.js.map +1 -0
  19. package/build/date-time/time/timezone.js +11 -2
  20. package/build/date-time/time/timezone.js.map +1 -1
  21. package/build/dimension-control/index.js +2 -0
  22. package/build/dimension-control/index.js.map +1 -1
  23. package/build/dimension-control/types.js.map +1 -1
  24. package/build/dropdown-menu-v2-ariakit/index.js +49 -20
  25. package/build/dropdown-menu-v2-ariakit/index.js.map +1 -1
  26. package/build/dropdown-menu-v2-ariakit/styles.js +82 -59
  27. package/build/dropdown-menu-v2-ariakit/styles.js.map +1 -1
  28. package/build/dropdown-menu-v2-ariakit/types.js.map +1 -1
  29. package/build/focal-point-picker/controls.js +5 -1
  30. package/build/focal-point-picker/controls.js.map +1 -1
  31. package/build/focal-point-picker/index.js +2 -0
  32. package/build/focal-point-picker/index.js.map +1 -1
  33. package/build/focal-point-picker/styles/focal-point-picker-style.js +15 -15
  34. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  35. package/build/focal-point-picker/types.js.map +1 -1
  36. package/build/font-size-picker/font-size-picker-select.js +2 -0
  37. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  38. package/build/font-size-picker/font-size-picker-toggle-group.js +2 -0
  39. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  40. package/build/font-size-picker/index.js +6 -1
  41. package/build/font-size-picker/index.js.map +1 -1
  42. package/build/font-size-picker/types.js.map +1 -1
  43. package/build/form-token-field/index.js +6 -2
  44. package/build/form-token-field/index.js.map +1 -1
  45. package/build/form-token-field/token-input.js.map +1 -1
  46. package/build/form-token-field/types.js.map +1 -1
  47. package/build/heading/hook.js +6 -3
  48. package/build/heading/hook.js.map +1 -1
  49. package/build/heading/types.js.map +1 -1
  50. package/build/index.native.js +0 -16
  51. package/build/index.native.js.map +1 -1
  52. package/build/mobile/global-styles-context/utils.native.js +13 -0
  53. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  54. package/build/mobile/utils/alignments.native.js +1 -1
  55. package/build/mobile/utils/alignments.native.js.map +1 -1
  56. package/build/palette-edit/index.js +21 -1
  57. package/build/palette-edit/index.js.map +1 -1
  58. package/build/private-apis.js +3 -2
  59. package/build/private-apis.js.map +1 -1
  60. package/build/query-controls/author-select.js +3 -1
  61. package/build/query-controls/author-select.js.map +1 -1
  62. package/build/query-controls/category-select.js +3 -1
  63. package/build/query-controls/category-select.js.map +1 -1
  64. package/build/query-controls/index.js +6 -1
  65. package/build/query-controls/index.js.map +1 -1
  66. package/build/query-controls/types.js.map +1 -1
  67. package/build/slot-fill/types.js.map +1 -1
  68. package/build/tabs/index.js +24 -5
  69. package/build/tabs/index.js.map +1 -1
  70. package/build/tabs/tab.js +4 -4
  71. package/build/tabs/tab.js.map +1 -1
  72. package/build/tabs/tabpanel.js +4 -3
  73. package/build/tabs/tabpanel.js.map +1 -1
  74. package/build/tabs/types.js.map +1 -1
  75. package/build/text/types.js.map +1 -1
  76. package/build/toggle-group-control/toggle-group-control/utils.js +17 -17
  77. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  78. package/build/tools-panel/tools-panel-item/hook.js +16 -12
  79. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  80. package/build-module/angle-picker-control/index.js +0 -1
  81. package/build-module/angle-picker-control/index.js.map +1 -1
  82. package/build-module/border-control/border-control-dropdown/component.js +4 -2
  83. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  84. package/build-module/border-control/border-control-dropdown/hook.js +3 -2
  85. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  86. package/build-module/border-control/styles.js +17 -17
  87. package/build-module/border-control/styles.js.map +1 -1
  88. package/build-module/checkbox-control/index.js +1 -1
  89. package/build-module/checkbox-control/index.js.map +1 -1
  90. package/build-module/checkbox-control/types.js.map +1 -1
  91. package/build-module/custom-select-control-v2/index.js +74 -0
  92. package/build-module/custom-select-control-v2/index.js.map +1 -0
  93. package/build-module/custom-select-control-v2/styles.js +71 -0
  94. package/build-module/custom-select-control-v2/styles.js.map +1 -0
  95. package/build-module/custom-select-control-v2/types.js +2 -0
  96. package/build-module/custom-select-control-v2/types.js.map +1 -0
  97. package/build-module/date-time/time/timezone.js +11 -2
  98. package/build-module/date-time/time/timezone.js.map +1 -1
  99. package/build-module/dimension-control/index.js +2 -0
  100. package/build-module/dimension-control/index.js.map +1 -1
  101. package/build-module/dimension-control/types.js.map +1 -1
  102. package/build-module/dropdown-menu-v2-ariakit/index.js +46 -18
  103. package/build-module/dropdown-menu-v2-ariakit/index.js.map +1 -1
  104. package/build-module/dropdown-menu-v2-ariakit/styles.js +69 -40
  105. package/build-module/dropdown-menu-v2-ariakit/styles.js.map +1 -1
  106. package/build-module/dropdown-menu-v2-ariakit/types.js.map +1 -1
  107. package/build-module/focal-point-picker/controls.js +5 -1
  108. package/build-module/focal-point-picker/controls.js.map +1 -1
  109. package/build-module/focal-point-picker/index.js +2 -0
  110. package/build-module/focal-point-picker/index.js.map +1 -1
  111. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +15 -15
  112. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  113. package/build-module/focal-point-picker/types.js.map +1 -1
  114. package/build-module/font-size-picker/font-size-picker-select.js +2 -0
  115. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  116. package/build-module/font-size-picker/font-size-picker-toggle-group.js +2 -0
  117. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  118. package/build-module/font-size-picker/index.js +6 -1
  119. package/build-module/font-size-picker/index.js.map +1 -1
  120. package/build-module/font-size-picker/types.js.map +1 -1
  121. package/build-module/form-token-field/index.js +6 -2
  122. package/build-module/form-token-field/index.js.map +1 -1
  123. package/build-module/form-token-field/token-input.js.map +1 -1
  124. package/build-module/form-token-field/types.js.map +1 -1
  125. package/build-module/heading/hook.js +6 -3
  126. package/build-module/heading/hook.js.map +1 -1
  127. package/build-module/heading/types.js.map +1 -1
  128. package/build-module/index.native.js +0 -2
  129. package/build-module/index.native.js.map +1 -1
  130. package/build-module/mobile/global-styles-context/utils.native.js +13 -0
  131. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  132. package/build-module/mobile/utils/alignments.native.js +1 -1
  133. package/build-module/mobile/utils/alignments.native.js.map +1 -1
  134. package/build-module/palette-edit/index.js +20 -3
  135. package/build-module/palette-edit/index.js.map +1 -1
  136. package/build-module/private-apis.js +4 -3
  137. package/build-module/private-apis.js.map +1 -1
  138. package/build-module/query-controls/author-select.js +3 -1
  139. package/build-module/query-controls/author-select.js.map +1 -1
  140. package/build-module/query-controls/category-select.js +3 -1
  141. package/build-module/query-controls/category-select.js.map +1 -1
  142. package/build-module/query-controls/index.js +6 -1
  143. package/build-module/query-controls/index.js.map +1 -1
  144. package/build-module/query-controls/types.js.map +1 -1
  145. package/build-module/slot-fill/types.js.map +1 -1
  146. package/build-module/tabs/index.js +25 -6
  147. package/build-module/tabs/index.js.map +1 -1
  148. package/build-module/tabs/tab.js +6 -6
  149. package/build-module/tabs/tab.js.map +1 -1
  150. package/build-module/tabs/tabpanel.js +6 -5
  151. package/build-module/tabs/tabpanel.js.map +1 -1
  152. package/build-module/tabs/types.js.map +1 -1
  153. package/build-module/text/types.js.map +1 -1
  154. package/build-module/toggle-group-control/toggle-group-control/utils.js +17 -17
  155. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  156. package/build-module/tools-panel/tools-panel-item/hook.js +17 -13
  157. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  158. package/build-style/style-rtl.css +32 -6
  159. package/build-style/style.css +32 -6
  160. package/build-types/angle-picker-control/index.d.ts.map +1 -1
  161. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  162. package/build-types/border-control/border-control-dropdown/hook.d.ts +1 -0
  163. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  164. package/build-types/border-control/styles.d.ts +1 -1
  165. package/build-types/border-control/styles.d.ts.map +1 -1
  166. package/build-types/box-control/stories/index.story.d.ts +1944 -0
  167. package/build-types/box-control/stories/index.story.d.ts.map +1 -0
  168. package/build-types/checkbox-control/index.d.ts.map +1 -1
  169. package/build-types/checkbox-control/types.d.ts +3 -2
  170. package/build-types/checkbox-control/types.d.ts.map +1 -1
  171. package/build-types/color-palette/styles.d.ts +4 -1
  172. package/build-types/color-palette/styles.d.ts.map +1 -1
  173. package/build-types/custom-select-control-v2/index.d.ts +6 -0
  174. package/build-types/custom-select-control-v2/index.d.ts.map +1 -0
  175. package/build-types/custom-select-control-v2/stories/index.story.d.ts +19 -0
  176. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -0
  177. package/build-types/custom-select-control-v2/styles.d.ts +47 -0
  178. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -0
  179. package/build-types/custom-select-control-v2/types.d.ts +57 -0
  180. package/build-types/custom-select-control-v2/types.d.ts.map +1 -0
  181. package/build-types/date-time/date/styles.d.ts +4 -1
  182. package/build-types/date-time/date/styles.d.ts.map +1 -1
  183. package/build-types/date-time/time/timezone.d.ts.map +1 -1
  184. package/build-types/dimension-control/index.d.ts.map +1 -1
  185. package/build-types/dimension-control/types.d.ts +6 -0
  186. package/build-types/dimension-control/types.d.ts.map +1 -1
  187. package/build-types/dropdown-menu-v2-ariakit/index.d.ts +11 -2
  188. package/build-types/dropdown-menu-v2-ariakit/index.d.ts.map +1 -1
  189. package/build-types/dropdown-menu-v2-ariakit/stories/index.story.d.ts.map +1 -1
  190. package/build-types/dropdown-menu-v2-ariakit/styles.d.ts +26 -18
  191. package/build-types/dropdown-menu-v2-ariakit/styles.d.ts.map +1 -1
  192. package/build-types/dropdown-menu-v2-ariakit/types.d.ts +0 -6
  193. package/build-types/dropdown-menu-v2-ariakit/types.d.ts.map +1 -1
  194. package/build-types/focal-point-picker/controls.d.ts +1 -1
  195. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  196. package/build-types/focal-point-picker/index.d.ts +1 -1
  197. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  198. package/build-types/focal-point-picker/stories/index.story.d.ts +8 -4
  199. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  200. package/build-types/focal-point-picker/types.d.ts +7 -0
  201. package/build-types/focal-point-picker/types.d.ts.map +1 -1
  202. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  203. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  204. package/build-types/font-size-picker/index.d.ts.map +1 -1
  205. package/build-types/font-size-picker/types.d.ts +8 -1
  206. package/build-types/font-size-picker/types.d.ts.map +1 -1
  207. package/build-types/form-token-field/index.d.ts.map +1 -1
  208. package/build-types/form-token-field/token-input.d.ts.map +1 -1
  209. package/build-types/form-token-field/types.d.ts +1 -1
  210. package/build-types/form-token-field/types.d.ts.map +1 -1
  211. package/build-types/heading/component.d.ts +4 -1
  212. package/build-types/heading/component.d.ts.map +1 -1
  213. package/build-types/heading/hook.d.ts.map +1 -1
  214. package/build-types/heading/types.d.ts +20 -1
  215. package/build-types/heading/types.d.ts.map +1 -1
  216. package/build-types/navigation/styles/navigation-styles.d.ts +4 -1
  217. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  218. package/build-types/palette-edit/index.d.ts +6 -1
  219. package/build-types/palette-edit/index.d.ts.map +1 -1
  220. package/build-types/palette-edit/styles.d.ts +4 -1
  221. package/build-types/palette-edit/styles.d.ts.map +1 -1
  222. package/build-types/private-apis.d.ts.map +1 -1
  223. package/build-types/query-controls/author-select.d.ts +1 -1
  224. package/build-types/query-controls/author-select.d.ts.map +1 -1
  225. package/build-types/query-controls/category-select.d.ts +1 -1
  226. package/build-types/query-controls/category-select.d.ts.map +1 -1
  227. package/build-types/query-controls/index.d.ts +1 -1
  228. package/build-types/query-controls/index.d.ts.map +1 -1
  229. package/build-types/query-controls/types.d.ts +9 -0
  230. package/build-types/query-controls/types.d.ts.map +1 -1
  231. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -1
  232. package/build-types/slot-fill/types.d.ts +16 -6
  233. package/build-types/slot-fill/types.d.ts.map +1 -1
  234. package/build-types/tabs/index.d.ts +3 -2
  235. package/build-types/tabs/index.d.ts.map +1 -1
  236. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  237. package/build-types/tabs/tab.d.ts +2 -1
  238. package/build-types/tabs/tab.d.ts.map +1 -1
  239. package/build-types/tabs/tabpanel.d.ts +2 -1
  240. package/build-types/tabs/tabpanel.d.ts.map +1 -1
  241. package/build-types/tabs/types.d.ts +8 -3
  242. package/build-types/tabs/types.d.ts.map +1 -1
  243. package/build-types/text/types.d.ts +15 -2
  244. package/build-types/text/types.d.ts.map +1 -1
  245. package/build-types/toggle-group-control/toggle-group-control/utils.d.ts.map +1 -1
  246. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  247. package/package.json +19 -19
  248. package/src/angle-picker-control/index.tsx +0 -1
  249. package/src/border-control/border-control-dropdown/component.tsx +3 -1
  250. package/src/border-control/border-control-dropdown/hook.ts +3 -2
  251. package/src/border-control/styles.ts +2 -9
  252. package/src/box-control/stories/index.story.tsx +82 -0
  253. package/src/button/style.scss +10 -2
  254. package/src/checkbox-control/README.md +2 -1
  255. package/src/checkbox-control/index.tsx +8 -6
  256. package/src/checkbox-control/test/__snapshots__/index.tsx.snap +3 -8
  257. package/src/checkbox-control/test/index.tsx +7 -0
  258. package/src/checkbox-control/types.ts +3 -2
  259. package/src/combobox-control/README.md +1 -3
  260. package/src/custom-select-control/test/index.js +367 -35
  261. package/src/custom-select-control-v2/README.md +73 -0
  262. package/src/custom-select-control-v2/index.tsx +99 -0
  263. package/src/custom-select-control-v2/stories/index.story.tsx +149 -0
  264. package/src/custom-select-control-v2/styles.ts +76 -0
  265. package/src/custom-select-control-v2/types.ts +63 -0
  266. package/src/date-time/time/timezone.tsx +15 -3
  267. package/src/dimension-control/index.tsx +2 -0
  268. package/src/dimension-control/test/__snapshots__/index.test.js.snap +2 -2
  269. package/src/dimension-control/types.ts +6 -0
  270. package/src/dropdown-menu-v2-ariakit/README.md +19 -5
  271. package/src/dropdown-menu-v2-ariakit/index.tsx +85 -36
  272. package/src/dropdown-menu-v2-ariakit/stories/index.story.tsx +204 -90
  273. package/src/dropdown-menu-v2-ariakit/styles.ts +165 -117
  274. package/src/dropdown-menu-v2-ariakit/test/index.tsx +5 -10
  275. package/src/dropdown-menu-v2-ariakit/types.ts +0 -7
  276. package/src/focal-point-picker/controls.tsx +4 -0
  277. package/src/focal-point-picker/index.tsx +2 -0
  278. package/src/focal-point-picker/styles/focal-point-picker-style.ts +1 -1
  279. package/src/focal-point-picker/types.ts +7 -0
  280. package/src/font-size-picker/font-size-picker-select.tsx +2 -0
  281. package/src/font-size-picker/font-size-picker-toggle-group.tsx +9 -1
  282. package/src/font-size-picker/index.tsx +11 -3
  283. package/src/font-size-picker/types.ts +8 -1
  284. package/src/form-toggle/style.scss +40 -8
  285. package/src/form-token-field/index.tsx +11 -3
  286. package/src/form-token-field/token-input.tsx +1 -3
  287. package/src/form-token-field/types.ts +1 -0
  288. package/src/heading/README.md +6 -1
  289. package/src/heading/hook.ts +6 -3
  290. package/src/heading/types.ts +23 -1
  291. package/src/index.native.js +0 -2
  292. package/src/mobile/global-styles-context/test/utils.native.js +22 -0
  293. package/src/mobile/global-styles-context/utils.native.js +14 -0
  294. package/src/mobile/link-settings/style.native.scss +0 -17
  295. package/src/mobile/utils/alignments.native.js +1 -0
  296. package/src/navigable-container/README.md +1 -1
  297. package/src/palette-edit/index.tsx +22 -8
  298. package/src/palette-edit/style.scss +2 -2
  299. package/src/palette-edit/test/index.tsx +75 -1
  300. package/src/private-apis.ts +4 -2
  301. package/src/query-controls/author-select.tsx +2 -0
  302. package/src/query-controls/category-select.tsx +2 -0
  303. package/src/query-controls/index.tsx +6 -1
  304. package/src/query-controls/types.ts +9 -0
  305. package/src/search-control/README.md +2 -0
  306. package/src/slot-fill/README.md +1 -1
  307. package/src/slot-fill/types.ts +18 -6
  308. package/src/spinner/README.md +2 -0
  309. package/src/tabs/README.md +4 -4
  310. package/src/tabs/index.tsx +34 -3
  311. package/src/tabs/stories/index.story.tsx +56 -48
  312. package/src/tabs/tab.tsx +7 -7
  313. package/src/tabs/tabpanel.tsx +10 -6
  314. package/src/tabs/test/index.tsx +180 -87
  315. package/src/tabs/types.ts +8 -3
  316. package/src/text/README.md +5 -1
  317. package/src/text/types.ts +15 -2
  318. package/src/toggle-control/README.md +2 -2
  319. package/src/toggle-group-control/test/index.tsx +54 -1
  320. package/src/toggle-group-control/toggle-group-control/utils.ts +15 -20
  321. package/src/tools-panel/tools-panel-item/hook.ts +21 -23
  322. package/tsconfig.tsbuildinfo +1 -1
  323. package/build/mobile/inserter-button/index.native.js +0 -98
  324. package/build/mobile/inserter-button/index.native.js.map +0 -1
  325. package/build/mobile/inserter-button/sparkles.js +0 -23
  326. package/build/mobile/inserter-button/sparkles.js.map +0 -1
  327. package/build/mobile/link-settings/image-link-destinations-screen.native.js +0 -119
  328. package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +0 -1
  329. package/build-module/mobile/inserter-button/index.native.js +0 -89
  330. package/build-module/mobile/inserter-button/index.native.js.map +0 -1
  331. package/build-module/mobile/inserter-button/sparkles.js +0 -15
  332. package/build-module/mobile/inserter-button/sparkles.js.map +0 -1
  333. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +0 -110
  334. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +0 -1
  335. package/build-types/mobile/inserter-button/sparkles.d.ts +0 -3
  336. package/build-types/mobile/inserter-button/sparkles.d.ts.map +0 -1
  337. package/src/box-control/stories/index.story.js +0 -75
  338. package/src/mobile/inserter-button/README.md +0 -62
  339. package/src/mobile/inserter-button/index.native.js +0 -116
  340. package/src/mobile/inserter-button/sparkles.js +0 -15
  341. package/src/mobile/inserter-button/style.native.scss +0 -72
  342. package/src/mobile/link-settings/image-link-destinations-screen.native.js +0 -152
@@ -12,6 +12,7 @@ import styled from '@emotion/styled';
12
12
  import { COLORS, font, rtl, CONFIG } from '../utils';
13
13
  import { space } from '../utils/space';
14
14
  import Icon from '../icon';
15
+ import { Truncate } from '../truncate';
15
16
  import type { DropdownMenuContext } from './types';
16
17
 
17
18
  const ANIMATION_PARAMS = {
@@ -20,13 +21,16 @@ const ANIMATION_PARAMS = {
20
21
  EASING: 'cubic-bezier( 0.16, 1, 0.3, 1 )',
21
22
  };
22
23
 
23
- const CONTENT_WRAPPER_PADDING = space( 2 );
24
- const ITEM_PREFIX_WIDTH = space( 7 );
25
- const ITEM_PADDING_INLINE_START = space( 2 );
26
- const ITEM_PADDING_INLINE_END = space( 2.5 );
24
+ const CONTENT_WRAPPER_PADDING = space( 1 );
25
+ const ITEM_PADDING_BLOCK = space( 2 );
26
+ const ITEM_PADDING_INLINE = space( 3 );
27
27
 
28
- // TODO: should bring this into the config, and make themeable
29
- const DEFAULT_BORDER_COLOR = COLORS.ui.borderDisabled;
28
+ // TODO:
29
+ // - those values are different from saved variables?
30
+ // - should bring this into the config, and make themeable
31
+ // - border color and divider color are different?
32
+ const DEFAULT_BORDER_COLOR = COLORS.gray[ 300 ];
33
+ const DIVIDER_COLOR = COLORS.gray[ 200 ];
30
34
  const TOOLBAR_VARIANT_BORDER_COLOR = COLORS.gray[ '900' ];
31
35
  const DEFAULT_BOX_SHADOW = `0 0 0 ${ CONFIG.borderWidth } ${ DEFAULT_BORDER_COLOR }, ${ CONFIG.popoverShadow }`;
32
36
  const TOOLBAR_VARIANT_BOX_SHADOW = `0 0 0 ${ CONFIG.borderWidth } ${ TOOLBAR_VARIANT_BORDER_COLOR }`;
@@ -71,12 +75,18 @@ export const DropdownMenu = styled( Ariakit.Menu )<
71
75
  /* TODO: is there a way to read the sass variable? */
72
76
  z-index: 1000000;
73
77
 
74
- min-width: 220px;
78
+ display: grid;
79
+ grid-template-columns: minmax( 0, max-content ) 1fr;
80
+ grid-template-rows: auto;
81
+
82
+ box-sizing: border-box;
83
+ min-width: 160px;
84
+ max-width: 320px;
75
85
  max-height: var( --popover-available-height );
76
86
  padding: ${ CONTENT_WRAPPER_PADDING };
77
87
 
78
88
  background-color: ${ COLORS.ui.background };
79
- border-radius: ${ CONFIG.radiusBlockUi };
89
+ border-radius: 4px;
80
90
  ${ ( props ) => css`
81
91
  box-shadow: ${ props.variant === 'toolbar'
82
92
  ? TOOLBAR_VARIANT_BOX_SHADOW
@@ -110,102 +120,55 @@ export const DropdownMenu = styled( Ariakit.Menu )<
110
120
  }
111
121
  `;
112
122
 
113
- const itemPrefix = css`
114
- /* !important is to override some inline styles set by Ariakit */
115
- width: ${ ITEM_PREFIX_WIDTH } !important;
116
- /* !important is to override some inline styles set by Ariakit */
117
- height: auto !important;
118
- display: inline-flex;
119
- align-items: center;
120
- justify-content: center;
121
- /* Prefixes don't get affected by the item's inline start padding */
122
- margin-inline-start: calc( -1 * ${ ITEM_PADDING_INLINE_START } );
123
- /*
124
- Negative margin allows the suffix to be as tall as the whole item
125
- (incl. padding) before increasing the items' height. This can be useful,
126
- e.g., when using icons that are bigger than 20x20 px
127
- */
128
- margin-top: ${ space( -2 ) };
129
- margin-bottom: ${ space( -2 ) };
130
- `;
131
-
132
- const itemSuffix = css`
133
- width: max-content;
134
- display: inline-flex;
135
- align-items: center;
136
- justify-content: center;
137
- /* Push prefix to the inline-end of the item */
138
- margin-inline-start: auto;
139
- /* Minimum space between the item's content and suffix */
140
- padding-inline-start: ${ space( 6 ) };
141
- /*
142
- Negative margin allows the suffix to be as tall as the whole item
143
- (incl. padding) before increasing the items' height. This can be useful,
144
- e.g., when using icons that are bigger than 20x20 px
145
- */
146
- margin-top: ${ space( -2 ) };
147
- margin-bottom: ${ space( -2 ) };
148
-
149
- /*
150
- Override color in normal conditions, but inherit the item's color
151
- for altered conditions.
152
-
153
- TODO:
154
- - For now, used opacity like for disabled item, which makes it work
155
- regardless of the theme
156
- - how do we translate this for themes? Should we have a new variable
157
- for "secondary" text?
158
- */
159
- opacity: 0.6;
123
+ const baseItem = css`
124
+ all: unset;
160
125
 
161
- /* when the parent item is hovered / focused */
162
- [data-active-item] > &,
163
- /* when the parent item is a submenu trigger and the submenu is open */
164
- [aria-expanded='true'] > &,
165
- /* when the parent item is disabled */
166
- [aria-disabled='true'] > & {
167
- opacity: 1;
168
- }
169
- `;
126
+ position: relative;
127
+ min-height: ${ space( 10 ) };
128
+ box-sizing: border-box;
170
129
 
171
- export const ItemPrefixWrapper = styled.span`
172
- ${ itemPrefix }
173
- `;
130
+ /* Occupy the width of all grid columns (ie. full width) */
131
+ grid-column: 1 / -1;
174
132
 
175
- export const ItemSuffixWrapper = styled.span`
176
- ${ itemSuffix }
177
- `;
133
+ /*
134
+ * Define a grid layout which inherits the same columns configuration
135
+ * from the parent layout (ie. subgrid).
136
+ */
137
+ display: grid;
138
+ grid-template-columns: subgrid;
139
+ align-items: center;
178
140
 
179
- const baseItem = css`
180
- all: unset;
181
141
  font-size: ${ font( 'default.fontSize' ) };
182
142
  font-family: inherit;
183
143
  font-weight: normal;
184
144
  line-height: 20px;
145
+
185
146
  color: ${ COLORS.gray[ 900 ] };
186
147
  border-radius: ${ CONFIG.radiusBlockUi };
187
- display: flex;
188
- align-items: center;
189
- padding: ${ space( 2 ) } ${ ITEM_PADDING_INLINE_END } ${ space( 2 ) }
190
- ${ ITEM_PADDING_INLINE_START };
191
- position: relative;
148
+
149
+ padding-block: ${ ITEM_PADDING_BLOCK };
150
+ padding-inline: ${ ITEM_PADDING_INLINE };
151
+
152
+ /*
153
+ * Make sure that, when an item is scrolled into view (eg. while using the
154
+ * keyboard to move focus), the whole item comes into view
155
+ */
156
+ scroll-margin: ${ CONTENT_WRAPPER_PADDING };
157
+
192
158
  user-select: none;
193
159
  outline: none;
194
160
 
195
161
  &[aria-disabled='true'] {
196
- /*
197
- TODO:
198
- - we need a disabled color in the Theme variables
199
- - design specs use opacity instead of setting a new text color
200
- */
201
- opacity: 0.5;
202
- pointer-events: none;
162
+ color: ${ COLORS.ui.textDisabled };
163
+ cursor: not-allowed;
203
164
  }
204
165
 
205
166
  /* Hover */
206
- &[data-active-item] {
207
- /* TODO: reconcile with global focus styles */
208
- background-color: ${ COLORS.gray[ '100' ] };
167
+ &[data-active-item]:not( [data-focus-visible] ):not(
168
+ [aria-disabled='true']
169
+ ) {
170
+ background-color: ${ COLORS.theme.accent };
171
+ color: ${ COLORS.white };
209
172
  }
210
173
 
211
174
  /* Keyboard focus (focus-visible) */
@@ -224,74 +187,159 @@ const baseItem = css`
224
187
 
225
188
  /* When the item is the trigger of an open submenu */
226
189
  ${ DropdownMenu }:not(:focus) &:not(:focus)[aria-expanded="true"] {
227
- /* TODO: should we style submenu triggers any different? */
190
+ background-color: ${ COLORS.gray[ 100 ] };
191
+ color: ${ COLORS.gray[ 900 ] };
228
192
  }
229
193
 
230
194
  svg {
231
195
  fill: currentColor;
232
196
  }
233
-
234
- &:not( :has( ${ ItemPrefixWrapper } ) ) {
235
- padding-inline-start: ${ ITEM_PREFIX_WIDTH };
236
- }
237
197
  `;
238
198
 
239
199
  export const DropdownMenuItem = styled( Ariakit.MenuItem )`
240
- ${ baseItem }
200
+ ${ baseItem };
241
201
  `;
242
202
 
243
203
  export const DropdownMenuCheckboxItem = styled( Ariakit.MenuItemCheckbox )`
244
- ${ baseItem }
204
+ ${ baseItem };
245
205
  `;
246
206
 
247
207
  export const DropdownMenuRadioItem = styled( Ariakit.MenuItemRadio )`
248
- ${ baseItem }
208
+ ${ baseItem };
249
209
  `;
250
210
 
251
- export const DropdownMenuGroup = styled( Ariakit.MenuGroup )``;
211
+ export const ItemPrefixWrapper = styled.span`
212
+ /* Always occupy the first column, even when auto-collapsing */
213
+ grid-column: 1;
214
+
215
+ /*
216
+ * Even when the item is not checked, occupy the same screen space to avoid
217
+ * the space collapside when no items are checked.
218
+ */
219
+ ${ DropdownMenuCheckboxItem } > &,
220
+ ${ DropdownMenuRadioItem } > & {
221
+ /* Same width as the check icons */
222
+ min-width: ${ space( 6 ) };
223
+ }
224
+
225
+ ${ DropdownMenuCheckboxItem } > &,
226
+ ${ DropdownMenuRadioItem } > &,
227
+ &:not( :empty ) {
228
+ margin-inline-end: ${ space( 2 ) };
229
+ }
230
+
231
+ display: flex;
232
+ align-items: center;
233
+ justify-content: center;
234
+
235
+ color: ${ COLORS.gray[ '700' ] };
236
+
237
+ /*
238
+ * When the parent menu item is active, except when it's a non-focused/hovered
239
+ * submenu trigger (in that case, color should not be inherited)
240
+ */
241
+ [data-active-item]:not( [data-focus-visible] ) > &,
242
+ /* When the parent menu item is disabled */
243
+ [aria-disabled='true'] > & {
244
+ color: inherit;
245
+ }
246
+ `;
247
+
248
+ export const DropdownMenuItemContentWrapper = styled.div`
249
+ /*
250
+ * Always occupy the second column, since the first column
251
+ * is taken by the prefix wrapper (when displayed).
252
+ */
253
+ grid-column: 2;
254
+
255
+ display: flex;
256
+ align-items: center;
257
+ justify-content: space-between;
258
+ gap: ${ space( 3 ) };
259
+
260
+ pointer-events: none;
261
+ `;
262
+
263
+ export const DropdownMenuItemChildrenWrapper = styled.div`
264
+ flex: 1;
265
+
266
+ display: inline-flex;
267
+ flex-direction: column;
268
+ gap: ${ space( 1 ) };
269
+ `;
270
+
271
+ export const ItemSuffixWrapper = styled.span`
272
+ flex: 0;
273
+ width: max-content;
252
274
 
253
- export const DropdownMenuGroupLabel = styled( Ariakit.MenuGroupLabel )`
254
- box-sizing: border-box;
255
275
  display: flex;
256
276
  align-items: center;
257
- min-height: ${ space( 8 ) };
258
-
259
- padding: ${ space( 2 ) } ${ ITEM_PADDING_INLINE_END } ${ space( 2 ) }
260
- ${ ITEM_PREFIX_WIDTH };
261
- /* TODO: color doesn't match available UI variables */
262
- color: ${ COLORS.gray[ 700 ] };
263
-
264
- /* TODO: font size doesn't match available ones via "font" utils */
265
- font-size: 11px;
266
- line-height: 1.4;
267
- font-weight: 500;
268
- text-transform: uppercase;
277
+ justify-content: center;
278
+ gap: ${ space( 3 ) };
279
+
280
+ color: ${ COLORS.gray[ '700' ] };
281
+
282
+ /*
283
+ * When the parent menu item is active, except when it's a non-focused/hovered
284
+ * submenu trigger (in that case, color should not be inherited)
285
+ */
286
+ [data-active-item]:not( [data-focus-visible] ) *:not(${ DropdownMenu }) &,
287
+ /* When the parent menu item is disabled */
288
+ [aria-disabled='true'] *:not(${ DropdownMenu }) & {
289
+ color: inherit;
290
+ }
291
+ `;
292
+
293
+ export const DropdownMenuGroup = styled( Ariakit.MenuGroup )`
294
+ /* Ignore this element when calculating the layout. Useful for subgrid */
295
+ display: contents;
269
296
  `;
270
297
 
271
298
  export const DropdownMenuSeparator = styled( Ariakit.MenuSeparator )<
272
299
  Pick< DropdownMenuContext, 'variant' >
273
300
  >`
301
+ /* Occupy the width of all grid columns (ie. full width) */
302
+ grid-column: 1 / -1;
303
+
274
304
  border: none;
275
305
  height: ${ CONFIG.borderWidth };
276
- /* TODO: doesn't match border color from variables */
277
306
  background-color: ${ ( props ) =>
278
307
  props.variant === 'toolbar'
279
308
  ? TOOLBAR_VARIANT_BORDER_COLOR
280
- : DEFAULT_BORDER_COLOR };
281
- /* Negative horizontal margin to make separator go from side to side */
282
- margin: ${ space( 2 ) } calc( -1 * ${ CONTENT_WRAPPER_PADDING } );
309
+ : DIVIDER_COLOR };
310
+ /* Align with menu items' content */
311
+ margin-block: ${ space( 2 ) };
312
+ margin-inline: ${ ITEM_PADDING_INLINE };
283
313
 
284
314
  /* Only visible in Windows High Contrast mode */
285
315
  outline: 2px solid transparent;
286
316
  `;
287
317
 
288
318
  export const SubmenuChevronIcon = styled( Icon )`
319
+ width: ${ space( 1.5 ) };
289
320
  ${ rtl(
290
321
  {
291
- transform: `scaleX(1) translateX(${ space( 2 ) })`,
322
+ transform: `scaleX(1)`,
292
323
  },
293
324
  {
294
- transform: `scaleX(-1) translateX(${ space( 2 ) })`,
325
+ transform: `scaleX(-1)`,
295
326
  }
296
- ) }
327
+ ) };
328
+ `;
329
+
330
+ export const DropdownMenuItemLabel = styled( Truncate )`
331
+ font-size: ${ font( 'default.fontSize' ) };
332
+ line-height: 20px;
333
+ color: inherit;
334
+ `;
335
+
336
+ export const DropdownMenuItemHelpText = styled( Truncate )`
337
+ font-size: ${ font( 'helpText.fontSize' ) };
338
+ line-height: 16px;
339
+ color: ${ COLORS.gray[ '700' ] };
340
+
341
+ [data-active-item]:not( [data-focus-visible] ) *:not( ${ DropdownMenu } ) &,
342
+ [aria-disabled='true'] *:not( ${ DropdownMenu } ) & {
343
+ color: inherit;
344
+ }
297
345
  `;
@@ -16,7 +16,6 @@ import {
16
16
  DropdownMenu,
17
17
  DropdownMenuCheckboxItem,
18
18
  DropdownMenuItem,
19
- DropdownMenuGroupLabel,
20
19
  DropdownMenuRadioItem,
21
20
  DropdownMenuSeparator,
22
21
  DropdownMenuGroup,
@@ -134,8 +133,9 @@ describe( 'DropdownMenu', () => {
134
133
  await press.ArrowDown();
135
134
 
136
135
  // DropdownMenu open, focus is on the first focusable item
136
+ // (disabled items are still focusable and accessible)
137
137
  expect(
138
- screen.getByRole( 'menuitem', { name: 'Second item' } )
138
+ screen.getByRole( 'menuitem', { name: 'First item' } )
139
139
  ).toHaveFocus();
140
140
  } );
141
141
 
@@ -163,8 +163,9 @@ describe( 'DropdownMenu', () => {
163
163
  await press.Space();
164
164
 
165
165
  // DropdownMenu open, focus is on the first focusable item
166
+ // (disabled items are still focusable and accessible
166
167
  expect(
167
- screen.getByRole( 'menuitem', { name: 'Second item' } )
168
+ screen.getByRole( 'menuitem', { name: 'First item' } )
168
169
  ).toHaveFocus();
169
170
  } );
170
171
 
@@ -452,9 +453,6 @@ describe( 'DropdownMenu', () => {
452
453
  return (
453
454
  <DropdownMenu trigger={ <button>Open dropdown</button> }>
454
455
  <DropdownMenuGroup>
455
- <DropdownMenuGroupLabel>
456
- Radio group label
457
- </DropdownMenuGroupLabel>
458
456
  <DropdownMenuRadioItem
459
457
  name="radio-test"
460
458
  value="radio-one"
@@ -532,9 +530,6 @@ describe( 'DropdownMenu', () => {
532
530
  render(
533
531
  <DropdownMenu trigger={ <button>Open dropdown</button> }>
534
532
  <DropdownMenuGroup>
535
- <DropdownMenuGroupLabel>
536
- Radio group label
537
- </DropdownMenuGroupLabel>
538
533
  <DropdownMenuRadioItem
539
534
  name="radio-test"
540
535
  value="radio-one"
@@ -991,7 +986,7 @@ describe( 'DropdownMenu', () => {
991
986
  // The contents of the suffix are rendered after the item's children
992
987
  expect(
993
988
  screen.getByRole( 'menuitemradio', {
994
- name: 'Radio item oneRadio suffix',
989
+ name: 'Radio item one Radio suffix',
995
990
  } )
996
991
  ).toBeInTheDocument();
997
992
  } );
@@ -88,13 +88,6 @@ export interface DropdownMenuGroupProps {
88
88
  children: React.ReactNode;
89
89
  }
90
90
 
91
- export interface DropdownMenuGroupLabelProps {
92
- /**
93
- * The contents of the dropdown menu group label.
94
- */
95
- children: React.ReactNode;
96
- }
97
-
98
91
  export interface DropdownMenuItemProps {
99
92
  /**
100
93
  * The contents of the menu item.
@@ -23,6 +23,7 @@ const noop = () => {};
23
23
 
24
24
  export default function FocalPointPickerControls( {
25
25
  __nextHasNoMarginBottom,
26
+ __next40pxDefaultSize,
26
27
  hasHelpText,
27
28
  onChange = noop,
28
29
  point = {
@@ -51,8 +52,10 @@ export default function FocalPointPickerControls( {
51
52
  className="focal-point-picker__controls"
52
53
  __nextHasNoMarginBottom={ __nextHasNoMarginBottom }
53
54
  hasHelpText={ hasHelpText }
55
+ gap={ 4 }
54
56
  >
55
57
  <FocalPointUnitControl
58
+ __next40pxDefaultSize={ __next40pxDefaultSize }
56
59
  label={ __( 'Left' ) }
57
60
  aria-label={ __( 'Focal point left position' ) }
58
61
  value={ [ valueX, '%' ].join( '' ) }
@@ -66,6 +69,7 @@ export default function FocalPointPickerControls( {
66
69
  dragDirection="e"
67
70
  />
68
71
  <FocalPointUnitControl
72
+ __next40pxDefaultSize={ __next40pxDefaultSize }
69
73
  label={ __( 'Top' ) }
70
74
  aria-label={ __( 'Focal point top position' ) }
71
75
  value={ [ valueY, '%' ].join( '' ) }
@@ -84,6 +84,7 @@ const GRID_OVERLAY_TIMEOUT = 600;
84
84
  */
85
85
  export function FocalPointPicker( {
86
86
  __nextHasNoMarginBottom,
87
+ __next40pxDefaultSize = false,
87
88
  autoPlay = true,
88
89
  className,
89
90
  help,
@@ -273,6 +274,7 @@ export function FocalPointPicker( {
273
274
  </MediaWrapper>
274
275
  <Controls
275
276
  __nextHasNoMarginBottom={ __nextHasNoMarginBottom }
277
+ __next40pxDefaultSize={ __next40pxDefaultSize }
276
278
  hasHelpText={ !! help }
277
279
  point={ { x, y } }
278
280
  onChange={ ( value ) => {
@@ -53,7 +53,7 @@ export const MediaPlaceholder = styled.div`
53
53
  `;
54
54
 
55
55
  export const StyledUnitControl = styled( UnitControl )`
56
- width: 100px;
56
+ width: 100%;
57
57
  `;
58
58
 
59
59
  const deprecatedBottomMargin = ( {
@@ -26,6 +26,12 @@ export type FocalPointPickerProps = Pick<
26
26
  * @default false
27
27
  */
28
28
  __nextHasNoMarginBottom?: boolean;
29
+ /**
30
+ * Start opting into the larger default height that will become the default size in a future version.
31
+ *
32
+ * @default false
33
+ */
34
+ __next40pxDefaultSize?: boolean;
29
35
  /**
30
36
  * Autoplays HTML5 video. This only applies to video sources (`url`).
31
37
  *
@@ -62,6 +68,7 @@ export type FocalPointPickerProps = Pick<
62
68
 
63
69
  export type FocalPointPickerControlsProps = {
64
70
  __nextHasNoMarginBottom?: boolean;
71
+ __next40pxDefaultSize?: boolean;
65
72
  /**
66
73
  * A bit of extra bottom margin will be added if a `help` text
67
74
  * needs to be rendered under it.
@@ -27,6 +27,7 @@ const CUSTOM_OPTION: FontSizePickerSelectOption = {
27
27
 
28
28
  const FontSizePickerSelect = ( props: FontSizePickerSelectProps ) => {
29
29
  const {
30
+ __next40pxDefaultSize,
30
31
  fontSizes,
31
32
  value,
32
33
  disableCustomFontSizes,
@@ -67,6 +68,7 @@ const FontSizePickerSelect = ( props: FontSizePickerSelectProps ) => {
67
68
 
68
69
  return (
69
70
  <CustomSelectControl
71
+ __next40pxDefaultSize={ __next40pxDefaultSize }
70
72
  __nextUnconstrainedWidth
71
73
  className="components-font-size-picker__select"
72
74
  label={ __( 'Font size' ) }
@@ -14,10 +14,18 @@ import { T_SHIRT_ABBREVIATIONS, T_SHIRT_NAMES } from './constants';
14
14
  import type { FontSizePickerToggleGroupProps } from './types';
15
15
 
16
16
  const FontSizePickerToggleGroup = ( props: FontSizePickerToggleGroupProps ) => {
17
- const { fontSizes, value, __nextHasNoMarginBottom, size, onChange } = props;
17
+ const {
18
+ fontSizes,
19
+ value,
20
+ __nextHasNoMarginBottom,
21
+ __next40pxDefaultSize,
22
+ size,
23
+ onChange,
24
+ } = props;
18
25
  return (
19
26
  <ToggleGroupControl
20
27
  __nextHasNoMarginBottom={ __nextHasNoMarginBottom }
28
+ __next40pxDefaultSize={ __next40pxDefaultSize }
21
29
  label={ __( 'Font size' ) }
22
30
  hideLabelFromVision
23
31
  value={ value }
@@ -45,6 +45,7 @@ const UnforwardedFontSizePicker = (
45
45
  const {
46
46
  /** Start opting into the new margin-free styles that will become the default in a future version. */
47
47
  __nextHasNoMarginBottom = false,
48
+ __next40pxDefaultSize = false,
48
49
  fallbackFontSize,
49
50
  fontSizes = [],
50
51
  disableCustomFontSizes = false,
@@ -165,6 +166,7 @@ const UnforwardedFontSizePicker = (
165
166
  shouldUseSelectControl &&
166
167
  ! showCustomValueControl && (
167
168
  <FontSizePickerSelect
169
+ __next40pxDefaultSize={ __next40pxDefaultSize }
168
170
  fontSizes={ fontSizes }
169
171
  value={ value }
170
172
  disableCustomFontSizes={ disableCustomFontSizes }
@@ -194,6 +196,7 @@ const UnforwardedFontSizePicker = (
194
196
  fontSizes={ fontSizes }
195
197
  value={ value }
196
198
  __nextHasNoMarginBottom={ __nextHasNoMarginBottom }
199
+ __next40pxDefaultSize={ __next40pxDefaultSize }
197
200
  size={ size }
198
201
  onChange={ ( newValue ) => {
199
202
  if ( newValue === undefined ) {
@@ -214,6 +217,7 @@ const UnforwardedFontSizePicker = (
214
217
  <Flex className="components-font-size-picker__custom-size-control">
215
218
  <FlexItem isBlock>
216
219
  <UnitControl
220
+ __next40pxDefaultSize={ __next40pxDefaultSize }
217
221
  label={ __( 'Custom' ) }
218
222
  labelPosition="top"
219
223
  hideLabelFromVision
@@ -241,6 +245,9 @@ const UnforwardedFontSizePicker = (
241
245
  __nextHasNoMarginBottom={
242
246
  __nextHasNoMarginBottom
243
247
  }
248
+ __next40pxDefaultSize={
249
+ __next40pxDefaultSize
250
+ }
244
251
  className="components-font-size-picker__custom-input"
245
252
  label={ __( 'Custom Size' ) }
246
253
  hideLabelFromVision
@@ -276,9 +283,10 @@ const UnforwardedFontSizePicker = (
276
283
  variant="secondary"
277
284
  __next40pxDefaultSize
278
285
  size={
279
- size !== '__unstable-large'
280
- ? 'small'
281
- : 'default'
286
+ size === '__unstable-large' ||
287
+ props.__next40pxDefaultSize
288
+ ? 'default'
289
+ : 'small'
282
290
  }
283
291
  >
284
292
  { __( 'Reset' ) }
@@ -57,6 +57,12 @@ export type FontSizePickerProps = {
57
57
  * @default false
58
58
  */
59
59
  __nextHasNoMarginBottom?: boolean;
60
+ /**
61
+ * Start opting into the larger default height that will become the default size in a future version.
62
+ *
63
+ * @default false
64
+ */
65
+ __next40pxDefaultSize?: boolean;
60
66
  /**
61
67
  * Size of the control.
62
68
  *
@@ -93,6 +99,7 @@ export type FontSizePickerSelectProps = Pick<
93
99
  >;
94
100
  onChange: NonNullable< FontSizePickerProps[ 'onChange' ] >;
95
101
  onSelectCustom: () => void;
102
+ __next40pxDefaultSize: boolean;
96
103
  };
97
104
 
98
105
  export type FontSizePickerSelectOption = {
@@ -104,7 +111,7 @@ export type FontSizePickerSelectOption = {
104
111
 
105
112
  export type FontSizePickerToggleGroupProps = Pick<
106
113
  FontSizePickerProps,
107
- 'value' | 'size' | '__nextHasNoMarginBottom'
114
+ 'value' | 'size' | '__nextHasNoMarginBottom' | '__next40pxDefaultSize'
108
115
  > & {
109
116
  fontSizes: NonNullable< FontSizePickerProps[ 'fontSizes' ] >;
110
117
  onChange: NonNullable< FontSizePickerProps[ 'onChange' ] >;