@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
@@ -1,6 +1,11 @@
1
+ @use "sass:math";
2
+
1
3
  $toggle-width: 36px;
2
4
  $toggle-height: 18px;
3
5
  $toggle-border-width: 1px;
6
+ $thumb-size: $toggle-height - ($toggle-border-width * 6);
7
+
8
+ $transition-duration: 0.2s;
4
9
 
5
10
  .components-form-toggle {
6
11
  position: relative;
@@ -8,6 +13,7 @@ $toggle-border-width: 1px;
8
13
 
9
14
  // Unchecked state.
10
15
  .components-form-toggle__track {
16
+ position: relative;
11
17
  content: "";
12
18
  display: inline-block;
13
19
  box-sizing: border-box;
@@ -16,9 +22,27 @@ $toggle-border-width: 1px;
16
22
  border: $toggle-border-width solid $gray-900;
17
23
  width: $toggle-width;
18
24
  height: $toggle-height;
19
- border-radius: $toggle-height * 0.5;
20
- transition: 0.2s background ease;
25
+ border-radius: math.div($toggle-height, 2);
26
+ transition:
27
+ $transition-duration background-color ease,
28
+ $transition-duration border-color ease;
21
29
  @include reduce-motion("transition");
30
+ overflow: hidden;
31
+
32
+ // Windows High Contrast Mode
33
+ &::after {
34
+ content: "";
35
+ position: absolute;
36
+ inset: 0;
37
+ box-sizing: border-box;
38
+ // Expand the border to fake a solid in Windows High Contrast Mode.
39
+ border-top: #{ $toggle-height } solid transparent;
40
+
41
+ transition: $transition-duration opacity ease;
42
+ @include reduce-motion("transition");
43
+
44
+ opacity: 0;
45
+ }
22
46
  }
23
47
 
24
48
  .components-form-toggle__thumb {
@@ -27,20 +51,28 @@ $toggle-border-width: 1px;
27
51
  box-sizing: border-box;
28
52
  top: $toggle-border-width * 3;
29
53
  left: $toggle-border-width * 3;
30
- width: $toggle-height - ($toggle-border-width * 6);
31
- height: $toggle-height - ($toggle-border-width * 6);
54
+ width: $thumb-size;
55
+ height: $thumb-size;
32
56
  border-radius: 50%;
33
- transition: 0.1s transform ease;
57
+ transition:
58
+ $transition-duration transform ease,
59
+ $transition-duration background-color ease-out;
34
60
  @include reduce-motion("transition");
35
61
  background-color: $gray-900;
36
- border: 5px solid $gray-900; // Has explicit border to act as a fill in Windows High Contrast Mode.
62
+
63
+ // Transparent border acts as a fill in Windows High Contrast Mode.
64
+ border: math.div($thumb-size, 2) solid transparent;
37
65
  }
38
66
 
39
67
  // Checked state.
40
68
  &.is-checked .components-form-toggle__track {
41
69
  background-color: $components-color-accent;
42
- border: $toggle-border-width solid $components-color-accent;
43
- border: #{ $toggle-height * 0.5 } solid transparent; // Expand the border to fake a solid in Windows High Contrast Mode.
70
+ border-color: $components-color-accent;
71
+
72
+ // Windows High Contrast Mode
73
+ &::after {
74
+ opacity: 1;
75
+ }
44
76
  }
45
77
 
46
78
  .components-form-toggle__input:focus + .components-form-toggle__track {
@@ -2,7 +2,7 @@
2
2
  * External dependencies
3
3
  */
4
4
  import classnames from 'classnames';
5
- import type { KeyboardEvent, MouseEvent, TouchEvent } from 'react';
5
+ import type { KeyboardEvent, MouseEvent, TouchEvent, FocusEvent } from 'react';
6
6
 
7
7
  /**
8
8
  * WordPress dependencies
@@ -162,7 +162,7 @@ export function FormTokenField( props: FormTokenFieldProps ) {
162
162
  }
163
163
  }
164
164
 
165
- function onBlur() {
165
+ function onBlur( event: FocusEvent ) {
166
166
  if (
167
167
  inputHasValidValue() &&
168
168
  __experimentalValidateInput( incompleteTokenValue )
@@ -176,7 +176,15 @@ export function FormTokenField( props: FormTokenFieldProps ) {
176
176
  setIncompleteTokenValue( '' );
177
177
  setInputOffsetFromEnd( 0 );
178
178
  setIsActive( false );
179
- setIsExpanded( false );
179
+
180
+ // If `__experimentalExpandOnFocus` is true, don't close the suggestions list when
181
+ // the user clicks on it (`tokensAndInput` will be the element that caused the blur).
182
+ const shouldKeepSuggestionsExpanded =
183
+ ! __experimentalExpandOnFocus ||
184
+ ( __experimentalExpandOnFocus &&
185
+ event.relatedTarget === tokensAndInput.current );
186
+ setIsExpanded( shouldKeepSuggestionsExpanded );
187
+
180
188
  setSelectedSuggestionIndex( -1 );
181
189
  setSelectedSuggestionScroll( false );
182
190
  }
@@ -48,9 +48,7 @@ export function UnForwardedTokenInput(
48
48
  onFocus?.( e );
49
49
  };
50
50
 
51
- const onBlurHandler: React.FocusEventHandler< HTMLInputElement > = (
52
- e
53
- ) => {
51
+ const onBlurHandler: FocusEventHandler< HTMLInputElement > = ( e ) => {
54
52
  setHasFocus( false );
55
53
  onBlur?.( e );
56
54
  };
@@ -5,6 +5,7 @@ import type {
5
5
  ComponentPropsWithRef,
6
6
  MouseEventHandler,
7
7
  ReactNode,
8
+ FocusEvent,
8
9
  } from 'react';
9
10
 
10
11
  type Messages = {
@@ -18,7 +18,12 @@ function Example() {
18
18
 
19
19
  ## Props
20
20
 
21
- `Heading` uses `Text` underneath, so we have access to all of `Text`'s props except for `size` which is replaced by `level`. For a complete list of those props, check out [`Text`](/packages/components/src/text/README.md#props).
21
+ `Heading` uses `Text` underneath, so we have access to all of `Text`'s props except for:
22
+
23
+ - `size` which is replaced by `level`;
24
+ - `isBlock`'s default value, which is `true` for the `Heading` component.
25
+
26
+ For a complete list of those props, check out [`Text`](/packages/components/src/text/README.md#props).
22
27
 
23
28
  ##### `level`: `1 | 2 | 3 | 4 | 5 | 6 | '1' | '2' | '3' | '4' | '5' | '6'`
24
29
 
@@ -14,6 +14,9 @@ export function useHeading(
14
14
  const {
15
15
  as: asProp,
16
16
  level = 2,
17
+ color = COLORS.gray[ 900 ],
18
+ isBlock = true,
19
+ weight = CONFIG.fontWeightHeading as import('react').CSSProperties[ 'fontWeight' ],
17
20
  ...otherProps
18
21
  } = useContextSystem( props, 'Heading' );
19
22
 
@@ -31,10 +34,10 @@ export function useHeading(
31
34
  }
32
35
 
33
36
  const textProps = useText( {
34
- color: COLORS.gray[ 900 ],
37
+ color,
38
+ isBlock,
39
+ weight,
35
40
  size: getHeadingFontSize( level ),
36
- isBlock: true,
37
- weight: CONFIG.fontWeightHeading as import('react').CSSProperties[ 'fontWeight' ],
38
41
  ...otherProps,
39
42
  } );
40
43
 
@@ -17,7 +17,10 @@ export type HeadingSize =
17
17
  | '5'
18
18
  | '6';
19
19
 
20
- export type HeadingProps = Omit< TextProps, 'size' > & {
20
+ export type HeadingProps = Omit<
21
+ TextProps,
22
+ 'size' | 'isBlock' | 'color' | 'weight'
23
+ > & {
21
24
  /**
22
25
  * Passing any of the heading levels to `level` will both render the correct
23
26
  * typographic text size as well as the semantic element corresponding to
@@ -26,4 +29,23 @@ export type HeadingProps = Omit< TextProps, 'size' > & {
26
29
  * @default 2
27
30
  */
28
31
  level?: HeadingSize;
32
+ /**
33
+ * Sets `Heading` to have `display: block`. Note: text truncation only works
34
+ * when `isBlock` is `false`.
35
+ *
36
+ * @default true
37
+ */
38
+ isBlock?: TextProps[ 'isBlock' ];
39
+ /**
40
+ * Adjusts the text color.
41
+ *
42
+ * @default '#1e1e1e'
43
+ */
44
+ color?: TextProps[ 'color' ];
45
+ /**
46
+ * Adjusts font-weight of the text.
47
+ *
48
+ * @default '600'
49
+ */
50
+ weight?: TextProps[ 'weight' ];
29
51
  };
@@ -106,11 +106,9 @@ export { default as LinkPickerScreen } from './mobile/link-picker/link-picker-sc
106
106
  export { default as LinkSettings } from './mobile/link-settings';
107
107
  export { default as LinkSettingsScreen } from './mobile/link-settings/link-settings-screen';
108
108
  export { default as LinkSettingsNavigation } from './mobile/link-settings/link-settings-navigation';
109
- export { default as ImageLinkDestinationsScreen } from './mobile/link-settings/image-link-destinations-screen';
110
109
  export { default as SegmentedControl } from './mobile/segmented-control';
111
110
  export { default as Image, IMAGE_DEFAULT_FOCAL_POINT } from './mobile/image';
112
111
  export { default as ImageEditingButton } from './mobile/image/image-editing-button';
113
- export { default as InserterButton } from './mobile/inserter-button';
114
112
  export { setClipboard, getClipboard } from './mobile/clipboard';
115
113
  export { default as AudioPlayer } from './mobile/audio-player';
116
114
  export { default as Badge } from './mobile/badge';
@@ -108,6 +108,28 @@ describe( 'parseStylesVariables', () => {
108
108
  expect.objectContaining( PARSED_GLOBAL_STYLES )
109
109
  );
110
110
  } );
111
+
112
+ it( 'returns the parsed custom color values correctly', () => {
113
+ const defaultStyles = {
114
+ ...DEFAULT_GLOBAL_STYLES,
115
+ color: {
116
+ text: 'var(--wp--custom--color--blue)',
117
+ background: 'var(--wp--custom--color--green)',
118
+ },
119
+ };
120
+ const customValues = parseStylesVariables(
121
+ JSON.stringify( RAW_FEATURES.custom ),
122
+ MAPPED_VALUES
123
+ );
124
+ const styles = parseStylesVariables(
125
+ JSON.stringify( defaultStyles ),
126
+ MAPPED_VALUES,
127
+ customValues
128
+ );
129
+ expect( styles ).toEqual(
130
+ expect.objectContaining( PARSED_GLOBAL_STYLES )
131
+ );
132
+ } );
111
133
  } );
112
134
 
113
135
  describe( 'getGlobalStyles', () => {
@@ -248,6 +248,20 @@ export function parseStylesVariables( styles, mappedValues, customValues ) {
248
248
  const customValuesData = customValues ?? JSON.parse( stylesBase );
249
249
  stylesBase = stylesBase.replace( regex, ( _$1, $2 ) => {
250
250
  const path = $2.split( '--' );
251
+
252
+ // Supports cases for variables like var(--wp--custom--color--background)
253
+ if ( path[ 0 ] === 'color' ) {
254
+ const colorKey = path[ path.length - 1 ];
255
+ if ( mappedValues?.color ) {
256
+ const matchedValue = mappedValues.color?.values?.find(
257
+ ( { slug } ) => slug === colorKey
258
+ );
259
+ if ( matchedValue ) {
260
+ return `${ matchedValue?.color }`;
261
+ }
262
+ }
263
+ }
264
+
251
265
  if (
252
266
  path.reduce(
253
267
  ( prev, curr ) => prev && prev[ curr ],
@@ -2,20 +2,3 @@
2
2
  padding-left: 0;
3
3
  padding-right: 0;
4
4
  }
5
-
6
- // used in both light and dark modes
7
- .placeholderTextColor {
8
- color: #87a6bc;
9
- }
10
-
11
- .optionIcon {
12
- color: $blue-50;
13
- }
14
-
15
- .optionIconDark {
16
- color: $blue-30;
17
- }
18
-
19
- .unselectedOptionIcon {
20
- opacity: 0;
21
- }
@@ -10,6 +10,7 @@ export const WIDE_ALIGNMENTS = {
10
10
  },
11
11
  excludeBlocks: [ 'core/heading' ],
12
12
  notInnerContainers: [
13
+ 'core/image',
13
14
  'core/separator',
14
15
  'core/media-text',
15
16
  'core/pullquote',
@@ -24,7 +24,7 @@ Gets an offset, given an event.
24
24
 
25
25
  - Required: No
26
26
 
27
- ### `onKeydown`: `( event: KeyboardEvent ) => void`
27
+ ### `onKeyDown`: `( event: KeyboardEvent ) => void`
28
28
 
29
29
  A callback invoked on the keydown event.
30
30
 
@@ -60,7 +60,7 @@ import type {
60
60
  PaletteElement,
61
61
  } from './types';
62
62
 
63
- const DEFAULT_COLOR = '#000';
63
+ export const DEFAULT_COLOR = '#000';
64
64
 
65
65
  function NameInput( { value, onChange, label }: NameInputProps ) {
66
66
  return (
@@ -261,16 +261,30 @@ function Option< T extends Color | Gradient >( {
261
261
  );
262
262
  }
263
263
 
264
- function isTemporaryElement(
264
+ /**
265
+ * Checks if a color or gradient is a temporary element by testing against default values.
266
+ */
267
+ export function isTemporaryElement(
265
268
  slugPrefix: string,
266
269
  { slug, color, gradient }: Color | Gradient
267
- ) {
270
+ ): Boolean {
268
271
  const regex = new RegExp( `^${ slugPrefix }color-([\\d]+)$` );
269
- return (
270
- regex.test( slug ) &&
271
- ( ( !! color && color === DEFAULT_COLOR ) ||
272
- ( !! gradient && gradient === DEFAULT_GRADIENT ) )
273
- );
272
+
273
+ // If the slug matches the temporary name regex,
274
+ // check if the color or gradient matches the default value.
275
+ if ( regex.test( slug ) ) {
276
+ // The order is important as gradient elements
277
+ // contain a color property.
278
+ if ( !! gradient ) {
279
+ return gradient === DEFAULT_GRADIENT;
280
+ }
281
+
282
+ if ( !! color ) {
283
+ return color === DEFAULT_COLOR;
284
+ }
285
+ }
286
+
287
+ return false;
274
288
  }
275
289
 
276
290
  function PaletteEditListView< T extends Color | Gradient >( {
@@ -1,6 +1,6 @@
1
1
  .components-palette-edit__popover-gradient-picker {
2
- width: 280px;
3
- padding: 8px;
2
+ width: 260px;
3
+ padding: $grid-unit-10;
4
4
  }
5
5
  .components-dropdown-menu__menu {
6
6
  .components-palette-edit__menu-button {
@@ -6,8 +6,13 @@ import { render, fireEvent, screen } from '@testing-library/react';
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
- import PaletteEdit, { getNameForPosition } from '..';
9
+ import PaletteEdit, {
10
+ getNameForPosition,
11
+ isTemporaryElement,
12
+ DEFAULT_COLOR,
13
+ } from '..';
10
14
  import type { PaletteElement } from '../types';
15
+ import { DEFAULT_GRADIENT } from '../../custom-gradient-picker/constants';
11
16
 
12
17
  describe( 'getNameForPosition', () => {
13
18
  test( 'should return 1 by default', () => {
@@ -80,6 +85,75 @@ describe( 'getNameForPosition', () => {
80
85
  } );
81
86
  } );
82
87
 
88
+ describe( 'isTemporaryElement', () => {
89
+ [
90
+ {
91
+ message: 'identifies temporary color',
92
+ slug: 'test-',
93
+ obj: {
94
+ name: '',
95
+ slug: 'test-color-1',
96
+ color: DEFAULT_COLOR,
97
+ },
98
+ expected: true,
99
+ },
100
+ {
101
+ message: 'identifies temporary gradient',
102
+ slug: 'test-',
103
+ obj: {
104
+ name: '',
105
+ slug: 'test-color-1',
106
+ gradient: DEFAULT_GRADIENT,
107
+ },
108
+ expected: true,
109
+ },
110
+ {
111
+ message: 'identifies custom color slug',
112
+ slug: 'test-',
113
+ obj: {
114
+ name: '',
115
+ slug: 'test-color-happy',
116
+ color: DEFAULT_COLOR,
117
+ },
118
+ expected: false,
119
+ },
120
+ {
121
+ message: 'identifies custom color value',
122
+ slug: 'test-',
123
+ obj: {
124
+ name: '',
125
+ slug: 'test-color-1',
126
+ color: '#ccc',
127
+ },
128
+ expected: false,
129
+ },
130
+ {
131
+ message: 'identifies custom gradient slug',
132
+ slug: 'test-',
133
+ obj: {
134
+ name: '',
135
+ slug: 'test-gradient-joy',
136
+ color: DEFAULT_GRADIENT,
137
+ },
138
+ expected: false,
139
+ },
140
+ {
141
+ message: 'identifies custom gradient value',
142
+ slug: 'test-',
143
+ obj: {
144
+ name: '',
145
+ slug: 'test-color-3',
146
+ color: 'linear-gradient(90deg, rgba(22, 22, 22, 1) 0%, rgb(155, 81, 224) 100%)',
147
+ },
148
+ expected: false,
149
+ },
150
+ ].forEach( ( { message, slug, obj, expected } ) => {
151
+ it( `should ${ message }`, () => {
152
+ expect( isTemporaryElement( slug, obj ) ).toBe( expected );
153
+ } );
154
+ } );
155
+ } );
156
+
83
157
  describe( 'PaletteEdit', () => {
84
158
  const defaultProps = {
85
159
  colors: [ { color: '#ffffff', name: 'Base', slug: 'base' } ],
@@ -32,11 +32,12 @@ import {
32
32
  import {
33
33
  DropdownMenu as DropdownMenuV2Ariakit,
34
34
  DropdownMenuGroup as DropdownMenuGroupV2Ariakit,
35
- DropdownMenuGroupLabel as DropdownMenuGroupLabelV2Ariakit,
36
35
  DropdownMenuItem as DropdownMenuItemV2Ariakit,
37
36
  DropdownMenuCheckboxItem as DropdownMenuCheckboxItemV2Ariakit,
38
37
  DropdownMenuRadioItem as DropdownMenuRadioItemV2Ariakit,
39
38
  DropdownMenuSeparator as DropdownMenuSeparatorV2Ariakit,
39
+ DropdownMenuItemLabel as DropdownMenuItemLabelV2Ariakit,
40
+ DropdownMenuItemHelpText as DropdownMenuItemHelpTextV2Ariakit,
40
41
  } from './dropdown-menu-v2-ariakit';
41
42
  import { ComponentsContext } from './context/context-system-provider';
42
43
  import Theme from './theme';
@@ -74,9 +75,10 @@ lock( privateApis, {
74
75
  Theme,
75
76
  DropdownMenuV2Ariakit,
76
77
  DropdownMenuGroupV2Ariakit,
77
- DropdownMenuGroupLabelV2Ariakit,
78
78
  DropdownMenuItemV2Ariakit,
79
79
  DropdownMenuCheckboxItemV2Ariakit,
80
80
  DropdownMenuRadioItemV2Ariakit,
81
81
  DropdownMenuSeparatorV2Ariakit,
82
+ DropdownMenuItemLabelV2Ariakit,
83
+ DropdownMenuItemHelpTextV2Ariakit,
82
84
  } );
@@ -6,6 +6,7 @@ import TreeSelect from '../tree-select';
6
6
  import type { AuthorSelectProps } from './types';
7
7
 
8
8
  export default function AuthorSelect( {
9
+ __next40pxDefaultSize,
9
10
  label,
10
11
  noOptionLabel,
11
12
  authorList,
@@ -28,6 +29,7 @@ export default function AuthorSelect( {
28
29
  : undefined
29
30
  }
30
31
  __nextHasNoMarginBottom
32
+ __next40pxDefaultSize={ __next40pxDefaultSize }
31
33
  />
32
34
  );
33
35
  }
@@ -11,6 +11,7 @@ import { useMemo } from '@wordpress/element';
11
11
  import type { CategorySelectProps } from './types';
12
12
 
13
13
  export default function CategorySelect( {
14
+ __next40pxDefaultSize,
14
15
  label,
15
16
  noOptionLabel,
16
17
  categoriesList,
@@ -37,6 +38,7 @@ export default function CategorySelect( {
37
38
  }
38
39
  { ...props }
39
40
  __nextHasNoMarginBottom
41
+ __next40pxDefaultSize={ __next40pxDefaultSize }
40
42
  />
41
43
  );
42
44
  }
@@ -60,6 +60,7 @@ function isMultipleCategorySelection(
60
60
  * ```
61
61
  */
62
62
  export function QueryControls( {
63
+ __next40pxDefaultSize = false,
63
64
  authorList,
64
65
  selectedAuthorId,
65
66
  numberOfItems,
@@ -81,6 +82,7 @@ export function QueryControls( {
81
82
  onOrderChange && onOrderByChange && (
82
83
  <SelectControl
83
84
  __nextHasNoMarginBottom
85
+ __next40pxDefaultSize={ __next40pxDefaultSize }
84
86
  key="query-controls-order-select"
85
87
  label={ __( 'Order by' ) }
86
88
  value={ `${ orderBy }/${ order }` }
@@ -131,6 +133,7 @@ export function QueryControls( {
131
133
  props.categoriesList &&
132
134
  props.onCategoryChange && (
133
135
  <CategorySelect
136
+ __next40pxDefaultSize={ __next40pxDefaultSize }
134
137
  key="query-controls-category-select"
135
138
  categoriesList={ props.categoriesList }
136
139
  label={ __( 'Category' ) }
@@ -143,6 +146,7 @@ export function QueryControls( {
143
146
  props.categorySuggestions &&
144
147
  props.onCategoryChange && (
145
148
  <FormTokenField
149
+ __next40pxDefaultSize={ __next40pxDefaultSize }
146
150
  __nextHasNoMarginBottom
147
151
  key="query-controls-categories-select"
148
152
  label={ __( 'Categories' ) }
@@ -166,6 +170,7 @@ export function QueryControls( {
166
170
  ),
167
171
  onAuthorChange && (
168
172
  <AuthorSelect
173
+ __next40pxDefaultSize={ __next40pxDefaultSize }
169
174
  key="query-controls-author-select"
170
175
  authorList={ authorList }
171
176
  label={ __( 'Author' ) }
@@ -177,7 +182,7 @@ export function QueryControls( {
177
182
  onNumberOfItemsChange && (
178
183
  <RangeControl
179
184
  __nextHasNoMarginBottom
180
- __next40pxDefaultSize
185
+ __next40pxDefaultSize={ __next40pxDefaultSize }
181
186
  key="query-controls-range-control"
182
187
  label={ __( 'Number of items' ) }
183
188
  value={ numberOfItems }
@@ -31,6 +31,7 @@ export type CategorySelectProps = Pick<
31
31
  categoriesList: Category[];
32
32
  onChange: ( newCategory: string ) => void;
33
33
  selectedCategoryId?: Category[ 'id' ];
34
+ __next40pxDefaultSize: boolean;
34
35
  };
35
36
 
36
37
  export type AuthorSelectProps = Pick<
@@ -40,6 +41,7 @@ export type AuthorSelectProps = Pick<
40
41
  authorList?: Author[];
41
42
  onChange: ( newAuthor: string ) => void;
42
43
  selectedAuthorId?: Author[ 'id' ];
44
+ __next40pxDefaultSize: boolean;
43
45
  };
44
46
 
45
47
  type Order = 'asc' | 'desc';
@@ -101,6 +103,13 @@ type BaseQueryControlsProps = {
101
103
  * The selected author ID.
102
104
  */
103
105
  selectedAuthorId?: AuthorSelectProps[ 'selectedAuthorId' ];
106
+ /**
107
+ * Start opting into the larger default height that will become the
108
+ * default size in a future version.
109
+ *
110
+ * @default false
111
+ */
112
+ __next40pxDefaultSize?: boolean;
104
113
  };
105
114
 
106
115
  export type QueryControlsWithSingleCategorySelectionProps =
@@ -8,6 +8,8 @@ SearchControl components let users display a search control.
8
8
  1. [Development guidelines](#development-guidelines)
9
9
  2. [Related components](#related-components)
10
10
 
11
+ Check out the [Storybook page](https://wordpress.github.io/gutenberg/?path=/docs/components-searchcontrol--docs) for a visual exploration of this component.
12
+
11
13
  ## Development guidelines
12
14
 
13
15
  ### Usage
@@ -68,7 +68,7 @@ Both `Slot` and `Fill` accept a `name` string prop, where a `Slot` with a given
68
68
  - By default, events will bubble to their parents on the DOM hierarchy (native event bubbling)
69
69
  - If `bubblesVirtually` is set to true, events will bubble to their virtual parent in the React elements hierarchy instead.
70
70
 
71
- `Slot` with `bubblesVirtually` set to true also accept an optional `className` to add to the slot container.
71
+ `Slot` with `bubblesVirtually` set to true also accept optional `className` and `style` props to add to the slot container.
72
72
 
73
73
  `Slot` **without** `bubblesVirtually` accepts an optional `children` function prop, which takes `fills` as a param. It allows you to perform additional processing and wrap `fills` conditionally.
74
74
 
@@ -36,15 +36,21 @@ export type SlotComponentProps =
36
36
 
37
37
  /**
38
38
  * A function that returns nodes to be rendered.
39
- * Not supported when `bubblesVirtually` is true.
39
+ * Supported only when `bubblesVirtually` is `false`.
40
40
  */
41
41
  children?: never;
42
42
 
43
43
  /**
44
- * className.
45
- * Not supported when `bubblesVirtually` is true.
44
+ * Additional className for the `Slot` component.
45
+ * Supported only when `bubblesVirtually` is `true`.
46
46
  */
47
47
  className?: string;
48
+
49
+ /**
50
+ * Additional styles for the `Slot` component.
51
+ * Supported only when `bubblesVirtually` is `true`.
52
+ */
53
+ style?: React.CSSProperties;
48
54
  } )
49
55
  | ( SlotPropBase & {
50
56
  /**
@@ -56,15 +62,21 @@ export type SlotComponentProps =
56
62
 
57
63
  /**
58
64
  * A function that returns nodes to be rendered.
59
- * Not supported when `bubblesVirtually` is true.
65
+ * Supported only when `bubblesVirtually` is `false`.
60
66
  */
61
67
  children?: ( fills: ReactNode ) => ReactNode;
62
68
 
63
69
  /**
64
- * className.
65
- * Not supported when `bubblesVirtually` is false.
70
+ * Additional className for the `Slot` component.
71
+ * Supported only when `bubblesVirtually` is `true`.
66
72
  */
67
73
  className?: never;
74
+
75
+ /**
76
+ * Additional styles for the `Slot` component.
77
+ * Supported only when `bubblesVirtually` is `true`.
78
+ */
79
+ style?: never;
68
80
  } );
69
81
 
70
82
  export type FillComponentProps = {