@wordpress/components 28.11.0 → 28.13.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 (560) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/CONTRIBUTING.md +16 -16
  3. package/build/autocomplete/autocompleter-ui.js +1 -0
  4. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  5. package/build/border-box-control/border-box-control/component.js +1 -0
  6. package/build/border-box-control/border-box-control/component.js.map +1 -1
  7. package/build/border-box-control/border-box-control-split-controls/component.js +2 -1
  8. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  9. package/build/border-control/border-control/component.js +2 -1
  10. package/build/border-control/border-control/component.js.map +1 -1
  11. package/build/border-control/border-control/hook.js +3 -1
  12. package/build/border-control/border-control/hook.js.map +1 -1
  13. package/build/border-control/border-control-dropdown/component.js +1 -1
  14. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  15. package/build/border-control/types.js.map +1 -1
  16. package/build/box-control/all-input-control.js +1 -0
  17. package/build/box-control/all-input-control.js.map +1 -1
  18. package/build/box-control/axial-input-controls.js +1 -0
  19. package/build/box-control/axial-input-controls.js.map +1 -1
  20. package/build/box-control/index.js +13 -13
  21. package/build/box-control/index.js.map +1 -1
  22. package/build/box-control/input-controls.js +1 -0
  23. package/build/box-control/input-controls.js.map +1 -1
  24. package/build/box-control/types.js.map +1 -1
  25. package/build/circular-option-picker/circular-option-picker-actions.js +1 -0
  26. package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  27. package/build/circular-option-picker/circular-option-picker-option.js +1 -0
  28. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
  29. package/build/color-palette/index.js +2 -0
  30. package/build/color-palette/index.js.map +1 -1
  31. package/build/color-picker/color-copy-button.js +6 -4
  32. package/build/color-picker/color-copy-button.js.map +1 -1
  33. package/build/color-picker/component.js +1 -0
  34. package/build/color-picker/component.js.map +1 -1
  35. package/build/color-picker/styles.js +21 -28
  36. package/build/color-picker/styles.js.map +1 -1
  37. package/build/combobox-control/index.js +17 -12
  38. package/build/combobox-control/index.js.map +1 -1
  39. package/build/composite/hover.js +1 -1
  40. package/build/composite/hover.js.map +1 -1
  41. package/build/composite/typeahead.js +1 -1
  42. package/build/composite/typeahead.js.map +1 -1
  43. package/build/custom-gradient-picker/gradient-bar/control-points.js +2 -0
  44. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  45. package/build/dashicon/types.js.map +1 -1
  46. package/build/dimension-control/index.js +7 -0
  47. package/build/dimension-control/index.js.map +1 -1
  48. package/build/disabled/index.js +8 -1
  49. package/build/disabled/index.js.map +1 -1
  50. package/build/duotone-picker/duotone-picker.js +2 -0
  51. package/build/duotone-picker/duotone-picker.js.map +1 -1
  52. package/build/font-size-picker/font-size-picker-toggle-group.js +1 -0
  53. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  54. package/build/font-size-picker/index.js +7 -0
  55. package/build/font-size-picker/index.js.map +1 -1
  56. package/build/form-file-upload/index.js +7 -1
  57. package/build/form-file-upload/index.js.map +1 -1
  58. package/build/form-token-field/token.js +1 -0
  59. package/build/form-token-field/token.js.map +1 -1
  60. package/build/gradient-picker/index.js +34 -32
  61. package/build/gradient-picker/index.js.map +1 -1
  62. package/build/gradient-picker/types.js.map +1 -1
  63. package/build/guide/page-control.js +1 -0
  64. package/build/guide/page-control.js.map +1 -1
  65. package/build/icon/index.js +9 -0
  66. package/build/icon/index.js.map +1 -1
  67. package/build/menu/styles.js +16 -16
  68. package/build/menu/styles.js.map +1 -1
  69. package/build/menu-item/index.js +1 -0
  70. package/build/menu-item/index.js.map +1 -1
  71. package/build/modal/index.js +2 -2
  72. package/build/modal/index.js.map +1 -1
  73. package/build/notice/index.js +2 -0
  74. package/build/notice/index.js.map +1 -1
  75. package/build/palette-edit/index.js +5 -0
  76. package/build/palette-edit/index.js.map +1 -1
  77. package/build/panel/body.js +1 -0
  78. package/build/panel/body.js.map +1 -1
  79. package/build/popover/index.js +4 -1
  80. package/build/popover/index.js.map +1 -1
  81. package/build/private-apis.js +0 -2
  82. package/build/private-apis.js.map +1 -1
  83. package/build/radio-group/radio.js +6 -0
  84. package/build/radio-group/radio.js.map +1 -1
  85. package/build/radio-group/types.js.map +1 -1
  86. package/build/range-control/index.js +11 -0
  87. package/build/range-control/index.js.map +1 -1
  88. package/build/range-control/types.js.map +1 -1
  89. package/build/slot-fill/bubbles-virtually/fill.js +14 -31
  90. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  91. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +13 -4
  92. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  93. package/build/slot-fill/bubbles-virtually/slot.js +11 -9
  94. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  95. package/build/slot-fill/bubbles-virtually/use-slot.js +1 -8
  96. package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  97. package/build/slot-fill/fill.js +7 -24
  98. package/build/slot-fill/fill.js.map +1 -1
  99. package/build/slot-fill/index.js +5 -10
  100. package/build/slot-fill/index.js.map +1 -1
  101. package/build/slot-fill/provider.js +2 -2
  102. package/build/slot-fill/provider.js.map +1 -1
  103. package/build/slot-fill/slot.js +37 -77
  104. package/build/slot-fill/slot.js.map +1 -1
  105. package/build/slot-fill/types.js.map +1 -1
  106. package/build/snackbar/index.js +2 -1
  107. package/build/snackbar/index.js.map +1 -1
  108. package/build/tabs/tablist.js +13 -2
  109. package/build/tabs/tablist.js.map +1 -1
  110. package/build/text-control/index.js +7 -0
  111. package/build/text-control/index.js.map +1 -1
  112. package/build/toggle-group-control/toggle-group-control/component.js +10 -1
  113. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  114. package/build/toggle-group-control/toggle-group-control-option/component.js +1 -0
  115. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  116. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +1 -1
  117. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  118. package/build/toggle-group-control/types.js.map +1 -1
  119. package/build/utils/deprecated-36px-size.js +3 -2
  120. package/build/utils/deprecated-36px-size.js.map +1 -1
  121. package/build-module/autocomplete/autocompleter-ui.js +1 -0
  122. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  123. package/build-module/border-box-control/border-box-control/component.js +1 -0
  124. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  125. package/build-module/border-box-control/border-box-control-split-controls/component.js +2 -1
  126. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  127. package/build-module/border-control/border-control/component.js +2 -1
  128. package/build-module/border-control/border-control/component.js.map +1 -1
  129. package/build-module/border-control/border-control/hook.js +3 -1
  130. package/build-module/border-control/border-control/hook.js.map +1 -1
  131. package/build-module/border-control/border-control-dropdown/component.js +1 -1
  132. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  133. package/build-module/border-control/types.js.map +1 -1
  134. package/build-module/box-control/all-input-control.js +1 -0
  135. package/build-module/box-control/all-input-control.js.map +1 -1
  136. package/build-module/box-control/axial-input-controls.js +1 -0
  137. package/build-module/box-control/axial-input-controls.js.map +1 -1
  138. package/build-module/box-control/index.js +13 -13
  139. package/build-module/box-control/index.js.map +1 -1
  140. package/build-module/box-control/input-controls.js +1 -0
  141. package/build-module/box-control/input-controls.js.map +1 -1
  142. package/build-module/box-control/types.js.map +1 -1
  143. package/build-module/circular-option-picker/circular-option-picker-actions.js +1 -0
  144. package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  145. package/build-module/circular-option-picker/circular-option-picker-option.js +1 -0
  146. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  147. package/build-module/color-palette/index.js +2 -0
  148. package/build-module/color-palette/index.js.map +1 -1
  149. package/build-module/color-picker/color-copy-button.js +6 -4
  150. package/build-module/color-picker/color-copy-button.js.map +1 -1
  151. package/build-module/color-picker/component.js +1 -0
  152. package/build-module/color-picker/component.js.map +1 -1
  153. package/build-module/color-picker/styles.js +20 -27
  154. package/build-module/color-picker/styles.js.map +1 -1
  155. package/build-module/combobox-control/index.js +18 -13
  156. package/build-module/combobox-control/index.js.map +1 -1
  157. package/build-module/composite/hover.js +1 -1
  158. package/build-module/composite/hover.js.map +1 -1
  159. package/build-module/composite/typeahead.js +1 -1
  160. package/build-module/composite/typeahead.js.map +1 -1
  161. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +2 -0
  162. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  163. package/build-module/dashicon/types.js.map +1 -1
  164. package/build-module/dimension-control/index.js +7 -0
  165. package/build-module/dimension-control/index.js.map +1 -1
  166. package/build-module/disabled/index.js +8 -1
  167. package/build-module/disabled/index.js.map +1 -1
  168. package/build-module/duotone-picker/duotone-picker.js +2 -0
  169. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  170. package/build-module/font-size-picker/font-size-picker-toggle-group.js +1 -0
  171. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  172. package/build-module/font-size-picker/index.js +7 -0
  173. package/build-module/font-size-picker/index.js.map +1 -1
  174. package/build-module/form-file-upload/index.js +7 -1
  175. package/build-module/form-file-upload/index.js.map +1 -1
  176. package/build-module/form-token-field/token.js +1 -0
  177. package/build-module/form-token-field/token.js.map +1 -1
  178. package/build-module/gradient-picker/index.js +34 -32
  179. package/build-module/gradient-picker/index.js.map +1 -1
  180. package/build-module/gradient-picker/types.js.map +1 -1
  181. package/build-module/guide/page-control.js +1 -0
  182. package/build-module/guide/page-control.js.map +1 -1
  183. package/build-module/icon/index.js +9 -0
  184. package/build-module/icon/index.js.map +1 -1
  185. package/build-module/menu/styles.js +16 -16
  186. package/build-module/menu/styles.js.map +1 -1
  187. package/build-module/menu-item/index.js +1 -0
  188. package/build-module/menu-item/index.js.map +1 -1
  189. package/build-module/modal/index.js +2 -2
  190. package/build-module/modal/index.js.map +1 -1
  191. package/build-module/notice/index.js +2 -0
  192. package/build-module/notice/index.js.map +1 -1
  193. package/build-module/palette-edit/index.js +5 -0
  194. package/build-module/palette-edit/index.js.map +1 -1
  195. package/build-module/panel/body.js +1 -0
  196. package/build-module/panel/body.js.map +1 -1
  197. package/build-module/popover/index.js +4 -1
  198. package/build-module/popover/index.js.map +1 -1
  199. package/build-module/private-apis.js +0 -2
  200. package/build-module/private-apis.js.map +1 -1
  201. package/build-module/radio-group/radio.js +6 -0
  202. package/build-module/radio-group/radio.js.map +1 -1
  203. package/build-module/radio-group/types.js.map +1 -1
  204. package/build-module/range-control/index.js +11 -0
  205. package/build-module/range-control/index.js.map +1 -1
  206. package/build-module/range-control/types.js.map +1 -1
  207. package/build-module/slot-fill/bubbles-virtually/fill.js +15 -32
  208. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  209. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +13 -4
  210. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  211. package/build-module/slot-fill/bubbles-virtually/slot.js +11 -9
  212. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  213. package/build-module/slot-fill/bubbles-virtually/use-slot.js +2 -9
  214. package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  215. package/build-module/slot-fill/fill.js +7 -24
  216. package/build-module/slot-fill/fill.js.map +1 -1
  217. package/build-module/slot-fill/index.js +5 -8
  218. package/build-module/slot-fill/index.js.map +1 -1
  219. package/build-module/slot-fill/provider.js +2 -3
  220. package/build-module/slot-fill/provider.js.map +1 -1
  221. package/build-module/slot-fill/slot.js +38 -78
  222. package/build-module/slot-fill/slot.js.map +1 -1
  223. package/build-module/slot-fill/types.js.map +1 -1
  224. package/build-module/snackbar/index.js +2 -1
  225. package/build-module/snackbar/index.js.map +1 -1
  226. package/build-module/tabs/tablist.js +13 -2
  227. package/build-module/tabs/tablist.js.map +1 -1
  228. package/build-module/text-control/index.js +7 -0
  229. package/build-module/text-control/index.js.map +1 -1
  230. package/build-module/toggle-group-control/toggle-group-control/component.js +10 -1
  231. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  232. package/build-module/toggle-group-control/toggle-group-control-option/component.js +1 -0
  233. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  234. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +1 -1
  235. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  236. package/build-module/toggle-group-control/types.js.map +1 -1
  237. package/build-module/utils/deprecated-36px-size.js +3 -2
  238. package/build-module/utils/deprecated-36px-size.js.map +1 -1
  239. package/build-style/style-rtl.css +18 -39
  240. package/build-style/style.css +18 -39
  241. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  242. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  243. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  244. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  245. package/build-types/border-control/border-control/component.d.ts +1 -0
  246. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  247. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  248. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  249. package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
  250. package/build-types/border-control/stories/index.story.d.ts +10 -5
  251. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  252. package/build-types/border-control/types.d.ts +7 -0
  253. package/build-types/border-control/types.d.ts.map +1 -1
  254. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  255. package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
  256. package/build-types/box-control/index.d.ts +13 -13
  257. package/build-types/box-control/input-controls.d.ts.map +1 -1
  258. package/build-types/box-control/styles/box-control-styles.d.ts +2 -1
  259. package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
  260. package/build-types/box-control/types.d.ts +2 -0
  261. package/build-types/box-control/types.d.ts.map +1 -1
  262. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  263. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
  264. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  265. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  266. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  267. package/build-types/color-palette/index.d.ts.map +1 -1
  268. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  269. package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
  270. package/build-types/color-picker/component.d.ts.map +1 -1
  271. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  272. package/build-types/color-picker/styles.d.ts +2 -4
  273. package/build-types/color-picker/styles.d.ts.map +1 -1
  274. package/build-types/combobox-control/index.d.ts +1 -0
  275. package/build-types/combobox-control/index.d.ts.map +1 -1
  276. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  277. package/build-types/composite/typeahead.d.ts.map +1 -1
  278. package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
  279. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  280. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  281. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  282. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  283. package/build-types/dashicon/types.d.ts +1 -1
  284. package/build-types/dashicon/types.d.ts.map +1 -1
  285. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  286. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  287. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  288. package/build-types/dimension-control/index.d.ts +1 -0
  289. package/build-types/dimension-control/index.d.ts.map +1 -1
  290. package/build-types/disabled/index.d.ts +8 -1
  291. package/build-types/disabled/index.d.ts.map +1 -1
  292. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  293. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  294. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  295. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  296. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  297. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  298. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  299. package/build-types/font-size-picker/index.d.ts.map +1 -1
  300. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  301. package/build-types/form-file-upload/index.d.ts.map +1 -1
  302. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  303. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  304. package/build-types/form-token-field/token.d.ts.map +1 -1
  305. package/build-types/gradient-picker/index.d.ts +32 -32
  306. package/build-types/gradient-picker/index.d.ts.map +1 -1
  307. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  308. package/build-types/gradient-picker/types.d.ts +1 -5
  309. package/build-types/gradient-picker/types.d.ts.map +1 -1
  310. package/build-types/guide/page-control.d.ts.map +1 -1
  311. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  312. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  313. package/build-types/icon/index.d.ts +23 -7
  314. package/build-types/icon/index.d.ts.map +1 -1
  315. package/build-types/icon/stories/index.story.d.ts +7 -1
  316. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  317. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  318. package/build-types/lock-unlock.d.ts +2 -2
  319. package/build-types/menu/stories/index.story.d.ts.map +1 -1
  320. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  321. package/build-types/menu-item/index.d.ts.map +1 -1
  322. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  323. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  324. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  325. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  326. package/build-types/notice/index.d.ts.map +1 -1
  327. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  328. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  329. package/build-types/palette-edit/index.d.ts.map +1 -1
  330. package/build-types/panel/body.d.ts.map +1 -1
  331. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  332. package/build-types/popover/index.d.ts.map +1 -1
  333. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  334. package/build-types/private-apis.d.ts.map +1 -1
  335. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  336. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  337. package/build-types/radio-group/radio.d.ts +4 -2
  338. package/build-types/radio-group/radio.d.ts.map +1 -1
  339. package/build-types/radio-group/stories/index.story.d.ts.map +1 -1
  340. package/build-types/radio-group/types.d.ts +5 -1
  341. package/build-types/radio-group/types.d.ts.map +1 -1
  342. package/build-types/range-control/index.d.ts +3 -1
  343. package/build-types/range-control/index.d.ts.map +1 -1
  344. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  345. package/build-types/range-control/types.d.ts +7 -0
  346. package/build-types/range-control/types.d.ts.map +1 -1
  347. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  348. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  349. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  350. package/build-types/slot-fill/bubbles-virtually/fill.d.ts +1 -1
  351. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  352. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  353. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  354. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
  355. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
  356. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts +3 -7
  357. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  358. package/build-types/slot-fill/fill.d.ts.map +1 -1
  359. package/build-types/slot-fill/index.d.ts +5 -12
  360. package/build-types/slot-fill/index.d.ts.map +1 -1
  361. package/build-types/slot-fill/provider.d.ts.map +1 -1
  362. package/build-types/slot-fill/slot.d.ts +1 -1
  363. package/build-types/slot-fill/slot.d.ts.map +1 -1
  364. package/build-types/slot-fill/types.d.ts +15 -18
  365. package/build-types/slot-fill/types.d.ts.map +1 -1
  366. package/build-types/slot-fill/use-slot.d.ts +1 -1
  367. package/build-types/slot-fill/use-slot.d.ts.map +1 -1
  368. package/build-types/snackbar/index.d.ts.map +1 -1
  369. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  370. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  371. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  372. package/build-types/tabs/tablist.d.ts.map +1 -1
  373. package/build-types/text/stories/index.story.d.ts.map +1 -1
  374. package/build-types/text-control/index.d.ts +1 -0
  375. package/build-types/text-control/index.d.ts.map +1 -1
  376. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  377. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  378. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  379. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  380. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  381. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  382. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +2 -0
  383. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  384. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -0
  385. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  386. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  387. package/build-types/toggle-group-control/types.d.ts +7 -0
  388. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  389. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  390. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  391. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  392. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  393. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  394. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  395. package/build-types/utils/deprecated-36px-size.d.ts +3 -2
  396. package/build-types/utils/deprecated-36px-size.d.ts.map +1 -1
  397. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  398. package/package.json +4 -4
  399. package/src/autocomplete/autocompleter-ui.tsx +1 -0
  400. package/src/base-control/stories/index.story.tsx +2 -1
  401. package/src/border-box-control/border-box-control/component.tsx +1 -0
  402. package/src/border-box-control/border-box-control-split-controls/component.tsx +1 -0
  403. package/src/border-control/border-control/component.tsx +1 -0
  404. package/src/border-control/border-control/hook.ts +2 -0
  405. package/src/border-control/border-control-dropdown/component.tsx +1 -1
  406. package/src/border-control/types.ts +7 -0
  407. package/src/box-control/README.md +79 -60
  408. package/src/box-control/all-input-control.tsx +1 -0
  409. package/src/box-control/axial-input-controls.tsx +1 -0
  410. package/src/box-control/docs-manifest.json +5 -0
  411. package/src/box-control/index.tsx +13 -13
  412. package/src/box-control/input-controls.tsx +1 -0
  413. package/src/box-control/types.ts +2 -0
  414. package/src/checkbox-control/stories/index.story.tsx +2 -1
  415. package/src/circular-option-picker/circular-option-picker-actions.tsx +1 -0
  416. package/src/circular-option-picker/circular-option-picker-option.tsx +1 -0
  417. package/src/circular-option-picker/stories/index.story.tsx +2 -1
  418. package/src/circular-option-picker/style.scss +2 -2
  419. package/src/color-indicator/stories/index.story.tsx +2 -1
  420. package/src/color-palette/index.tsx +5 -1
  421. package/src/color-palette/stories/index.story.tsx +2 -1
  422. package/src/color-picker/color-copy-button.tsx +8 -10
  423. package/src/color-picker/component.tsx +1 -0
  424. package/src/color-picker/stories/index.story.tsx +2 -1
  425. package/src/color-picker/styles.ts +0 -13
  426. package/src/combobox-control/README.md +1 -0
  427. package/src/combobox-control/index.tsx +19 -13
  428. package/src/combobox-control/stories/index.story.tsx +3 -1
  429. package/src/combobox-control/style.scss +0 -6
  430. package/src/combobox-control/test/index.tsx +7 -1
  431. package/src/composite/hover.tsx +1 -1
  432. package/src/composite/typeahead.tsx +3 -1
  433. package/src/confirm-dialog/stories/index.story.tsx +2 -1
  434. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +2 -0
  435. package/src/custom-gradient-picker/stories/index.story.tsx +2 -1
  436. package/src/custom-gradient-picker/style.scss +1 -1
  437. package/src/custom-select-control/stories/index.story.tsx +2 -1
  438. package/src/custom-select-control-v2/stories/index.story.tsx +2 -1
  439. package/src/dashicon/types.ts +0 -2
  440. package/src/date-time/stories/date-time.story.tsx +2 -1
  441. package/src/date-time/stories/date.story.tsx +2 -1
  442. package/src/date-time/stories/time.story.tsx +2 -1
  443. package/src/dimension-control/README.md +1 -0
  444. package/src/dimension-control/index.tsx +8 -0
  445. package/src/dimension-control/stories/index.story.tsx +1 -0
  446. package/src/dimension-control/test/__snapshots__/index.test.js.snap +24 -24
  447. package/src/dimension-control/test/index.test.js +7 -1
  448. package/src/disabled/README.md +9 -7
  449. package/src/disabled/index.tsx +8 -1
  450. package/src/disabled/stories/index.story.tsx +1 -0
  451. package/src/drop-zone/stories/index.story.tsx +2 -1
  452. package/src/dropdown/stories/index.story.tsx +2 -1
  453. package/src/dropdown-menu/stories/index.story.tsx +2 -1
  454. package/src/duotone-picker/duotone-picker.tsx +2 -0
  455. package/src/external-link/stories/index.story.tsx +2 -1
  456. package/src/font-size-picker/README.md +1 -0
  457. package/src/font-size-picker/font-size-picker-toggle-group.tsx +1 -0
  458. package/src/font-size-picker/index.tsx +8 -0
  459. package/src/font-size-picker/stories/index.story.tsx +1 -0
  460. package/src/font-size-picker/test/index.tsx +5 -1
  461. package/src/form-file-upload/index.tsx +13 -1
  462. package/src/form-file-upload/stories/index.story.tsx +2 -1
  463. package/src/form-token-field/stories/index.story.tsx +2 -1
  464. package/src/form-token-field/style.scss +8 -12
  465. package/src/form-token-field/token.tsx +1 -0
  466. package/src/gradient-picker/README.md +107 -69
  467. package/src/gradient-picker/docs-manifest.json +5 -0
  468. package/src/gradient-picker/index.tsx +34 -32
  469. package/src/gradient-picker/stories/index.story.tsx +2 -1
  470. package/src/gradient-picker/types.ts +3 -5
  471. package/src/guide/page-control.tsx +1 -0
  472. package/src/guide/style.scss +4 -6
  473. package/src/h-stack/stories/index.story.tsx +2 -1
  474. package/src/heading/stories/index.story.tsx +2 -1
  475. package/src/higher-order/with-constrained-tabbing/README.md +13 -3
  476. package/src/higher-order/with-focus-return/README.md +9 -2
  477. package/src/icon/README.md +22 -65
  478. package/src/icon/docs-manifest.json +5 -0
  479. package/src/icon/index.tsx +28 -13
  480. package/src/icon/stories/index.story.tsx +50 -8
  481. package/src/input-control/stories/index.story.tsx +2 -1
  482. package/src/menu/stories/index.story.tsx +2 -1
  483. package/src/menu/styles.ts +1 -1
  484. package/src/menu-group/stories/index.story.tsx +2 -1
  485. package/src/menu-item/index.tsx +1 -0
  486. package/src/menu-item/stories/index.story.tsx +2 -1
  487. package/src/menu-item/test/__snapshots__/index.js.snap +4 -4
  488. package/src/menu-items-choice/stories/index.story.tsx +2 -1
  489. package/src/modal/index.tsx +2 -2
  490. package/src/modal/stories/index.story.tsx +3 -2
  491. package/src/navigator/stories/index.story.tsx +2 -1
  492. package/src/notice/index.tsx +2 -0
  493. package/src/notice/stories/index.story.tsx +7 -2
  494. package/src/notice/test/__snapshots__/index.tsx.snap +4 -4
  495. package/src/number-control/stories/index.story.tsx +2 -1
  496. package/src/palette-edit/index.tsx +5 -0
  497. package/src/panel/body.tsx +1 -0
  498. package/src/placeholder/stories/index.story.tsx +1 -0
  499. package/src/popover/index.tsx +3 -0
  500. package/src/popover/stories/index.story.tsx +2 -1
  501. package/src/private-apis.ts +0 -2
  502. package/src/progress-bar/stories/index.story.tsx +2 -1
  503. package/src/radio-control/stories/index.story.tsx +2 -1
  504. package/src/radio-group/README.md +8 -8
  505. package/src/radio-group/radio.tsx +7 -0
  506. package/src/radio-group/stories/index.story.tsx +16 -4
  507. package/src/radio-group/types.ts +6 -1
  508. package/src/range-control/README.md +4 -3
  509. package/src/range-control/index.tsx +11 -0
  510. package/src/range-control/stories/index.story.tsx +9 -1
  511. package/src/range-control/test/index.tsx +7 -1
  512. package/src/range-control/types.ts +7 -0
  513. package/src/responsive-wrapper/stories/index.story.tsx +2 -1
  514. package/src/search-control/stories/index.story.tsx +2 -1
  515. package/src/select-control/stories/index.story.tsx +2 -1
  516. package/src/slot-fill/README.md +26 -15
  517. package/src/slot-fill/bubbles-virtually/fill.tsx +18 -28
  518. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +26 -16
  519. package/src/slot-fill/bubbles-virtually/slot.tsx +13 -9
  520. package/src/slot-fill/bubbles-virtually/use-slot.ts +3 -26
  521. package/src/slot-fill/fill.ts +7 -22
  522. package/src/slot-fill/index.tsx +5 -7
  523. package/src/slot-fill/provider.tsx +8 -17
  524. package/src/slot-fill/slot.tsx +48 -85
  525. package/src/slot-fill/types.ts +14 -51
  526. package/src/snackbar/index.tsx +2 -1
  527. package/src/snackbar/stories/index.story.tsx +2 -1
  528. package/src/snackbar/stories/list.story.tsx +2 -1
  529. package/src/snackbar/style.scss +7 -16
  530. package/src/spinner/stories/index.story.tsx +2 -1
  531. package/src/tabs/tablist.tsx +13 -2
  532. package/src/text/stories/index.story.tsx +2 -1
  533. package/src/text-control/README.md +1 -0
  534. package/src/text-control/index.tsx +8 -0
  535. package/src/text-control/stories/index.story.tsx +3 -1
  536. package/src/text-control/test/text-control.tsx +7 -1
  537. package/src/text-highlight/stories/index.story.tsx +2 -1
  538. package/src/textarea-control/stories/index.story.tsx +2 -1
  539. package/src/tip/stories/index.story.tsx +2 -1
  540. package/src/toggle-control/stories/index.story.tsx +2 -1
  541. package/src/toggle-group-control/stories/index.story.tsx +3 -1
  542. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +12 -12
  543. package/src/toggle-group-control/test/index.tsx +7 -1
  544. package/src/toggle-group-control/toggle-group-control/README.md +2 -1
  545. package/src/toggle-group-control/toggle-group-control/component.tsx +11 -1
  546. package/src/toggle-group-control/toggle-group-control-option/README.md +1 -1
  547. package/src/toggle-group-control/toggle-group-control-option/component.tsx +1 -0
  548. package/src/toggle-group-control/toggle-group-control-option-icon/README.md +1 -1
  549. package/src/toggle-group-control/toggle-group-control-option-icon/component.tsx +1 -1
  550. package/src/toggle-group-control/types.ts +7 -0
  551. package/src/tools-panel/stories/index.story.tsx +3 -0
  552. package/src/tooltip/stories/index.story.tsx +2 -1
  553. package/src/tree-grid/stories/index.story.tsx +2 -1
  554. package/src/tree-select/stories/index.story.tsx +2 -1
  555. package/src/truncate/stories/index.story.tsx +2 -1
  556. package/src/unit-control/stories/index.story.tsx +2 -1
  557. package/src/utils/deprecated-36px-size.ts +8 -2
  558. package/src/v-stack/stories/index.story.tsx +2 -1
  559. package/src/visually-hidden/stories/index.story.tsx +1 -1
  560. package/tsconfig.tsbuildinfo +1 -1
@@ -7,8 +7,11 @@ import type { ReactElement, ReactNode, Key } from 'react';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import {
10
+ useContext,
11
+ useEffect,
12
+ useReducer,
13
+ useRef,
10
14
  Children,
11
- Component,
12
15
  cloneElement,
13
16
  isEmptyElement,
14
17
  } from '@wordpress/element';
@@ -17,7 +20,7 @@ import {
17
20
  * Internal dependencies
18
21
  */
19
22
  import SlotFillContext from './context';
20
- import type { BaseSlotComponentProps, SlotComponentProps } from './types';
23
+ import type { SlotComponentProps } from './types';
21
24
 
22
25
  /**
23
26
  * Whether the argument is a function.
@@ -29,90 +32,50 @@ function isFunction( maybeFunc: any ): maybeFunc is Function {
29
32
  return typeof maybeFunc === 'function';
30
33
  }
31
34
 
32
- class SlotComponent extends Component< BaseSlotComponentProps > {
33
- private isUnmounted: boolean;
34
-
35
- constructor( props: BaseSlotComponentProps ) {
36
- super( props );
37
-
38
- this.isUnmounted = false;
39
- }
40
-
41
- componentDidMount() {
42
- const { registerSlot } = this.props;
43
- this.isUnmounted = false;
44
- registerSlot( this.props.name, this );
45
- }
46
-
47
- componentWillUnmount() {
48
- const { unregisterSlot } = this.props;
49
- this.isUnmounted = true;
50
- unregisterSlot( this.props.name, this );
51
- }
52
-
53
- componentDidUpdate( prevProps: BaseSlotComponentProps ) {
54
- const { name, unregisterSlot, registerSlot } = this.props;
55
-
56
- if ( prevProps.name !== name ) {
57
- unregisterSlot( prevProps.name, this );
58
- registerSlot( name, this );
59
- }
60
- }
61
-
62
- forceUpdate() {
63
- if ( this.isUnmounted ) {
64
- return;
65
- }
66
- super.forceUpdate();
67
- }
68
-
69
- render() {
70
- const { children, name, fillProps = {}, getFills } = this.props;
71
- const fills: ReactNode[] = ( getFills( name, this ) ?? [] )
72
- .map( ( fill ) => {
73
- const fillChildren = isFunction( fill.children )
74
- ? fill.children( fillProps )
75
- : fill.children;
76
- return Children.map( fillChildren, ( child, childIndex ) => {
77
- if ( ! child || typeof child === 'string' ) {
78
- return child;
79
- }
80
- let childKey: Key = childIndex;
81
- if (
82
- typeof child === 'object' &&
83
- 'key' in child &&
84
- child?.key
85
- ) {
86
- childKey = child.key;
87
- }
88
-
89
- return cloneElement( child as ReactElement, {
90
- key: childKey,
91
- } );
35
+ function Slot( props: Omit< SlotComponentProps, 'bubblesVirtually' > ) {
36
+ const registry = useContext( SlotFillContext );
37
+ const [ , rerender ] = useReducer( () => [], [] );
38
+ const ref = useRef( { rerender } );
39
+
40
+ const { name, children, fillProps = {} } = props;
41
+
42
+ useEffect( () => {
43
+ const refValue = ref.current;
44
+ registry.registerSlot( name, refValue );
45
+ return () => registry.unregisterSlot( name, refValue );
46
+ }, [ registry, name ] );
47
+
48
+ const fills: ReactNode[] = ( registry.getFills( name, ref.current ) ?? [] )
49
+ .map( ( fill ) => {
50
+ const fillChildren = isFunction( fill.children )
51
+ ? fill.children( fillProps )
52
+ : fill.children;
53
+ return Children.map( fillChildren, ( child, childIndex ) => {
54
+ if ( ! child || typeof child === 'string' ) {
55
+ return child;
56
+ }
57
+ let childKey: Key = childIndex;
58
+ if (
59
+ typeof child === 'object' &&
60
+ 'key' in child &&
61
+ child?.key
62
+ ) {
63
+ childKey = child.key;
64
+ }
65
+
66
+ return cloneElement( child as ReactElement, {
67
+ key: childKey,
92
68
  } );
93
- } )
94
- .filter(
95
- // In some cases fills are rendered only when some conditions apply.
96
- // This ensures that we only use non-empty fills when rendering, i.e.,
97
- // it allows us to render wrappers only when the fills are actually present.
98
- ( element ) => ! isEmptyElement( element )
99
- );
100
-
101
- return <>{ isFunction( children ) ? children( fills ) : fills }</>;
102
- }
69
+ } );
70
+ } )
71
+ .filter(
72
+ // In some cases fills are rendered only when some conditions apply.
73
+ // This ensures that we only use non-empty fills when rendering, i.e.,
74
+ // it allows us to render wrappers only when the fills are actually present.
75
+ ( element ) => ! isEmptyElement( element )
76
+ );
77
+
78
+ return <>{ isFunction( children ) ? children( fills ) : fills }</>;
103
79
  }
104
80
 
105
- const Slot = ( props: Omit< SlotComponentProps, 'bubblesVirtually' > ) => (
106
- <SlotFillContext.Consumer>
107
- { ( { registerSlot, unregisterSlot, getFills } ) => (
108
- <SlotComponent
109
- { ...props }
110
- registerSlot={ registerSlot }
111
- unregisterSlot={ unregisterSlot }
112
- getFills={ getFills }
113
- />
114
- ) }
115
- </SlotFillContext.Consumer>
116
- );
117
-
118
81
  export default Slot;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * External dependencies
3
3
  */
4
- import type { Component, MutableRefObject, ReactNode, RefObject } from 'react';
4
+ import type { ReactNode, RefObject } from 'react';
5
5
 
6
6
  /**
7
7
  * WordPress dependencies
@@ -108,38 +108,17 @@ export type SlotFillProviderProps = {
108
108
  passthrough?: boolean;
109
109
  };
110
110
 
111
- export type SlotFillBubblesVirtuallySlotRef = RefObject< HTMLElement >;
112
- export type SlotFillBubblesVirtuallyFillRef = MutableRefObject< {
113
- rerender: () => void;
114
- } >;
111
+ export type SlotRef = RefObject< HTMLElement >;
112
+ export type Rerenderable = { rerender: () => void };
115
113
 
116
114
  export type SlotFillBubblesVirtuallyContext = {
117
- slots: ObservableMap<
118
- SlotKey,
119
- {
120
- ref: SlotFillBubblesVirtuallySlotRef;
121
- fillProps: FillProps;
122
- }
123
- >;
124
- fills: ObservableMap< SlotKey, SlotFillBubblesVirtuallyFillRef[] >;
125
- registerSlot: (
126
- name: SlotKey,
127
- ref: SlotFillBubblesVirtuallySlotRef,
128
- fillProps: FillProps
129
- ) => void;
130
- unregisterSlot: (
131
- name: SlotKey,
132
- ref: SlotFillBubblesVirtuallySlotRef
133
- ) => void;
134
- updateSlot: ( name: SlotKey, fillProps: FillProps ) => void;
135
- registerFill: (
136
- name: SlotKey,
137
- ref: SlotFillBubblesVirtuallyFillRef
138
- ) => void;
139
- unregisterFill: (
140
- name: SlotKey,
141
- ref: SlotFillBubblesVirtuallyFillRef
142
- ) => void;
115
+ slots: ObservableMap< SlotKey, { ref: SlotRef; fillProps: FillProps } >;
116
+ fills: ObservableMap< SlotKey, Rerenderable[] >;
117
+ registerSlot: ( name: SlotKey, ref: SlotRef, fillProps: FillProps ) => void;
118
+ unregisterSlot: ( name: SlotKey, ref: SlotRef ) => void;
119
+ updateSlot: ( name: SlotKey, ref: SlotRef, fillProps: FillProps ) => void;
120
+ registerFill: ( name: SlotKey, ref: Rerenderable ) => void;
121
+ unregisterFill: ( name: SlotKey, ref: Rerenderable ) => void;
143
122
 
144
123
  /**
145
124
  * This helps the provider know if it's using the default context value or not.
@@ -148,30 +127,14 @@ export type SlotFillBubblesVirtuallyContext = {
148
127
  };
149
128
 
150
129
  export type BaseSlotFillContext = {
151
- registerSlot: (
152
- name: SlotKey,
153
- slot: Component< BaseSlotComponentProps >
154
- ) => void;
155
- unregisterSlot: (
156
- name: SlotKey,
157
- slot: Component< BaseSlotComponentProps >
158
- ) => void;
130
+ registerSlot: ( name: SlotKey, slot: Rerenderable ) => void;
131
+ unregisterSlot: ( name: SlotKey, slot: Rerenderable ) => void;
159
132
  registerFill: ( name: SlotKey, instance: FillComponentProps ) => void;
160
133
  unregisterFill: ( name: SlotKey, instance: FillComponentProps ) => void;
161
- getSlot: (
162
- name: SlotKey
163
- ) => Component< BaseSlotComponentProps > | undefined;
134
+ getSlot: ( name: SlotKey ) => Rerenderable | undefined;
164
135
  getFills: (
165
136
  name: SlotKey,
166
- slotInstance: Component< BaseSlotComponentProps >
137
+ slotInstance: Rerenderable
167
138
  ) => FillComponentProps[];
168
139
  subscribe: ( listener: () => void ) => () => void;
169
140
  };
170
-
171
- export type BaseSlotComponentProps = Pick<
172
- BaseSlotFillContext,
173
- 'registerSlot' | 'unregisterSlot' | 'getFills'
174
- > &
175
- Omit< SlotComponentProps, 'bubblesVirtually' > & {
176
- children?: ( fills: ReactNode ) => ReactNode;
177
- };
@@ -150,9 +150,10 @@ function UnforwardedSnackbar(
150
150
  { actions.map( ( { label, onClick, url }, index ) => {
151
151
  return (
152
152
  <Button
153
+ __next40pxDefaultSize
153
154
  key={ index }
154
155
  href={ url }
155
- variant="tertiary"
156
+ variant="link"
156
157
  onClick={ (
157
158
  event: MouseEvent< HTMLButtonElement >
158
159
  ) => onActionClick( event, onClick ) }
@@ -15,7 +15,8 @@ import Icon from '../../icon';
15
15
  import Snackbar from '..';
16
16
 
17
17
  const meta: Meta< typeof Snackbar > = {
18
- title: 'Components/Snackbar',
18
+ title: 'Components/Feedback/Snackbar',
19
+ id: 'components-snackbar',
19
20
  component: Snackbar,
20
21
  argTypes: {
21
22
  as: { control: { type: null } },
@@ -14,7 +14,8 @@ import { useState } from '@wordpress/element';
14
14
  import SnackbarList from '../list';
15
15
 
16
16
  const meta: Meta< typeof SnackbarList > = {
17
- title: 'Components/SnackbarList',
17
+ title: 'Components/Feedback/SnackbarList',
18
+ id: 'components-snackbarlist',
18
19
  component: SnackbarList,
19
20
  argTypes: {
20
21
  as: { control: { type: null } },
@@ -48,25 +48,16 @@
48
48
  .components-snackbar__action.components-button {
49
49
  margin-left: $grid-unit-40;
50
50
  color: $white;
51
- height: auto;
52
51
  flex-shrink: 0;
53
- line-height: $default-line-height;
54
- padding: 0;
55
-
56
- &:not(:disabled):not([aria-disabled="true"]):not(.is-secondary) {
57
- text-decoration: underline;
58
- background-color: transparent;
59
52
 
60
- &:focus {
61
- color: $white;
62
- box-shadow: none;
63
- outline: 1px dotted $white;
64
- }
53
+ &:focus {
54
+ box-shadow: none;
55
+ outline: 1px dotted $white;
56
+ }
65
57
 
66
- &:hover {
67
- text-decoration: none;
68
- color: $white;
69
- }
58
+ &:hover {
59
+ text-decoration: none;
60
+ color: currentColor;
70
61
  }
71
62
  }
72
63
 
@@ -10,7 +10,8 @@ import Spinner from '../';
10
10
  import { space } from '../../utils/space';
11
11
 
12
12
  const meta: Meta< typeof Spinner > = {
13
- title: 'Components/Spinner',
13
+ title: 'Components/Feedback/Spinner',
14
+ id: 'components-spinner',
14
15
  component: Spinner,
15
16
  parameters: {
16
17
  controls: {
@@ -48,10 +48,21 @@ function useScrollRectIntoView(
48
48
  const childRightEdge = childLeft + childWidth;
49
49
  const rightOverflow = childRightEdge + margin - parentRightEdge;
50
50
  const leftOverflow = parentScroll - ( childLeft - margin );
51
+
52
+ let scrollLeft = null;
51
53
  if ( leftOverflow > 0 ) {
52
- parent.scrollLeft = parentScroll - leftOverflow;
54
+ scrollLeft = parentScroll - leftOverflow;
53
55
  } else if ( rightOverflow > 0 ) {
54
- parent.scrollLeft = parentScroll + rightOverflow;
56
+ scrollLeft = parentScroll + rightOverflow;
57
+ }
58
+
59
+ if ( scrollLeft !== null ) {
60
+ /**
61
+ * The optional chaining is used here to avoid unit test failures.
62
+ * It can be removed when JSDOM supports `Element` scroll methods.
63
+ * See: https://github.com/WordPress/gutenberg/pull/66498#issuecomment-2441146096
64
+ */
65
+ parent.scroll?.( { left: scrollLeft } );
55
66
  }
56
67
  }, [ margin, parent, rect ] );
57
68
  }
@@ -10,7 +10,8 @@ import { Text } from '../component';
10
10
 
11
11
  const meta: Meta< typeof Text > = {
12
12
  component: Text,
13
- title: 'Components (Experimental)/Text',
13
+ title: 'Components (Experimental)/Typography/Text',
14
+ id: 'components-experimental-text',
14
15
  argTypes: {
15
16
  as: { control: { type: 'text' } },
16
17
  color: { control: { type: 'color' } },
@@ -63,6 +63,7 @@ const MyTextControl = () => {
63
63
  return (
64
64
  <TextControl
65
65
  __nextHasNoMarginBottom
66
+ __next40pxDefaultSize
66
67
  label="Additional CSS Class"
67
68
  value={ className }
68
69
  onChange={ ( value ) => setClassName( value ) }
@@ -16,6 +16,7 @@ import { forwardRef } from '@wordpress/element';
16
16
  import BaseControl from '../base-control';
17
17
  import type { WordPressComponentProps } from '../context';
18
18
  import type { TextControlProps } from './types';
19
+ import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';
19
20
 
20
21
  function UnforwardedTextControl(
21
22
  props: WordPressComponentProps< TextControlProps, 'input', false >,
@@ -38,6 +39,12 @@ function UnforwardedTextControl(
38
39
  const onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>
39
40
  onChange( event.target.value );
40
41
 
42
+ maybeWarnDeprecated36pxSize( {
43
+ componentName: 'TextControl',
44
+ size: undefined,
45
+ __next40pxDefaultSize,
46
+ } );
47
+
41
48
  return (
42
49
  <BaseControl
43
50
  __nextHasNoMarginBottom={ __nextHasNoMarginBottom }
@@ -77,6 +84,7 @@ function UnforwardedTextControl(
77
84
  * return (
78
85
  * <TextControl
79
86
  * __nextHasNoMarginBottom
87
+ * __next40pxDefaultSize
80
88
  * label="Additional CSS Class"
81
89
  * value={ className }
82
90
  * onChange={ ( value ) => setClassName( value ) }
@@ -15,7 +15,8 @@ import TextControl from '..';
15
15
 
16
16
  const meta: Meta< typeof TextControl > = {
17
17
  component: TextControl,
18
- title: 'Components/TextControl',
18
+ title: 'Components/Selection & Input/Common/TextControl',
19
+ id: 'components-textcontrol',
19
20
  argTypes: {
20
21
  help: { control: { type: 'text' } },
21
22
  label: { control: { type: 'text' } },
@@ -54,6 +55,7 @@ export const Default: StoryFn< typeof TextControl > = DefaultTemplate.bind(
54
55
  );
55
56
  Default.args = {
56
57
  __nextHasNoMarginBottom: true,
58
+ __next40pxDefaultSize: true,
57
59
  };
58
60
 
59
61
  export const WithLabelAndHelpText: StoryFn< typeof TextControl > =
@@ -9,7 +9,13 @@ import { render, screen } from '@testing-library/react';
9
9
  import _TextControl from '..';
10
10
 
11
11
  const TextControl = ( props: React.ComponentProps< typeof _TextControl > ) => {
12
- return <_TextControl { ...props } __nextHasNoMarginBottom />;
12
+ return (
13
+ <_TextControl
14
+ { ...props }
15
+ __nextHasNoMarginBottom
16
+ __next40pxDefaultSize
17
+ />
18
+ );
13
19
  };
14
20
 
15
21
  const noop = () => {};
@@ -10,7 +10,8 @@ import TextHighlight from '..';
10
10
 
11
11
  const meta: Meta< typeof TextHighlight > = {
12
12
  component: TextHighlight,
13
- title: 'Components/TextHighlight',
13
+ title: 'Components/Typography/TextHighlight',
14
+ id: 'components-texthighlight',
14
15
  parameters: {
15
16
  controls: {
16
17
  expanded: true,
@@ -15,7 +15,8 @@ import TextareaControl from '..';
15
15
 
16
16
  const meta: Meta< typeof TextareaControl > = {
17
17
  component: TextareaControl,
18
- title: 'Components/TextareaControl',
18
+ title: 'Components/Selection & Input/Common/TextareaControl',
19
+ id: 'components-textareacontrol',
19
20
  argTypes: {
20
21
  onChange: { action: 'onChange' },
21
22
  label: { control: { type: 'text' } },
@@ -10,7 +10,8 @@ import Tip from '..';
10
10
 
11
11
  const meta: Meta< typeof Tip > = {
12
12
  component: Tip,
13
- title: 'Components/Tip',
13
+ title: 'Components/Feedback/Tip',
14
+ id: 'components-tip',
14
15
  argTypes: {
15
16
  children: { control: { type: 'text' } },
16
17
  },
@@ -14,7 +14,8 @@ import { useState } from '@wordpress/element';
14
14
  import ToggleControl from '..';
15
15
 
16
16
  const meta: Meta< typeof ToggleControl > = {
17
- title: 'Components/ToggleControl',
17
+ title: 'Components/Selection & Input/Common/ToggleControl',
18
+ id: 'components-togglecontrol',
18
19
  component: ToggleControl,
19
20
  argTypes: {
20
21
  checked: { control: { type: null } },
@@ -27,7 +27,8 @@ const meta: Meta< typeof ToggleGroupControl > = {
27
27
  component: ToggleGroupControl,
28
28
  // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
29
29
  subcomponents: { ToggleGroupControlOption, ToggleGroupControlOptionIcon },
30
- title: 'Components (Experimental)/ToggleGroupControl',
30
+ title: 'Components (Experimental)/Selection & Input/ToggleGroupControl',
31
+ id: 'components-experimental-togglegroupcontrol',
31
32
  argTypes: {
32
33
  help: { control: { type: 'text' } },
33
34
  onChange: { action: 'onChange' },
@@ -50,6 +51,7 @@ const Template: StoryFn< typeof ToggleGroupControl > = ( {
50
51
  return (
51
52
  <ToggleGroupControl
52
53
  __nextHasNoMarginBottom
54
+ __next40pxDefaultSize
53
55
  { ...props }
54
56
  onChange={ ( ...changeArgs ) => {
55
57
  setValue( ...changeArgs );
@@ -44,8 +44,8 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
44
44
  display: inline-flex;
45
45
  min-width: 0;
46
46
  position: relative;
47
- min-height: 36px;
48
- padding: 2px;
47
+ min-height: 40px;
48
+ padding: 3px;
49
49
  }
50
50
 
51
51
  .emotion-8:hover {
@@ -159,7 +159,7 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
159
159
  width: 100%;
160
160
  z-index: 2;
161
161
  color: #1e1e1e;
162
- height: 30px;
162
+ height: 32px;
163
163
  aspect-ratio: 1;
164
164
  padding-left: 0;
165
165
  padding-right: 0;
@@ -236,7 +236,7 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
236
236
  width: 100%;
237
237
  z-index: 2;
238
238
  color: #1e1e1e;
239
- height: 30px;
239
+ height: 32px;
240
240
  aspect-ratio: 1;
241
241
  padding-left: 0;
242
242
  padding-right: 0;
@@ -409,8 +409,8 @@ exports[`ToggleGroupControl controlled should render correctly with text options
409
409
  display: inline-flex;
410
410
  min-width: 0;
411
411
  position: relative;
412
- min-height: 36px;
413
- padding: 2px;
412
+ min-height: 40px;
413
+ padding: 3px;
414
414
  }
415
415
 
416
416
  .emotion-8:hover {
@@ -678,8 +678,8 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
678
678
  display: inline-flex;
679
679
  min-width: 0;
680
680
  position: relative;
681
- min-height: 36px;
682
- padding: 2px;
681
+ min-height: 40px;
682
+ padding: 3px;
683
683
  }
684
684
 
685
685
  .emotion-8:hover {
@@ -793,7 +793,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
793
793
  width: 100%;
794
794
  z-index: 2;
795
795
  color: #1e1e1e;
796
- height: 30px;
796
+ height: 32px;
797
797
  aspect-ratio: 1;
798
798
  padding-left: 0;
799
799
  padding-right: 0;
@@ -870,7 +870,7 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
870
870
  width: 100%;
871
871
  z-index: 2;
872
872
  color: #1e1e1e;
873
- height: 30px;
873
+ height: 32px;
874
874
  aspect-ratio: 1;
875
875
  padding-left: 0;
876
876
  padding-right: 0;
@@ -1037,8 +1037,8 @@ exports[`ToggleGroupControl uncontrolled should render correctly with text optio
1037
1037
  display: inline-flex;
1038
1038
  min-width: 0;
1039
1039
  position: relative;
1040
- min-height: 36px;
1041
- padding: 2px;
1040
+ min-height: 40px;
1041
+ padding: 3px;
1042
1042
  }
1043
1043
 
1044
1044
  .emotion-8:hover {
@@ -28,7 +28,13 @@ const hoverOutside = async () => {
28
28
  };
29
29
 
30
30
  const ToggleGroupControl = ( props: ToggleGroupControlProps ) => {
31
- return <_ToggleGroupControl { ...props } __nextHasNoMarginBottom />;
31
+ return (
32
+ <_ToggleGroupControl
33
+ { ...props }
34
+ __nextHasNoMarginBottom
35
+ __next40pxDefaultSize
36
+ />
37
+ );
32
38
  };
33
39
 
34
40
  const ControlledToggleGroupControl = ( {
@@ -25,6 +25,7 @@ function Example() {
25
25
  value="vertical"
26
26
  isBlock
27
27
  __nextHasNoMarginBottom
28
+ __next40pxDefaultSize
28
29
  >
29
30
  <ToggleGroupControlOption value="horizontal" label="Horizontal" />
30
31
  <ToggleGroupControlOption value="vertical" label="Vertical" />
@@ -100,4 +101,4 @@ Start opting into the larger default height that will become the default size in
100
101
  Start opting into the new margin-free styles that will become the default in a future version.
101
102
 
102
103
  - Required: No
103
- - Default: `false`
104
+ - Default: `false`
@@ -23,6 +23,7 @@ import { ToggleGroupControlAsButtonGroup } from './as-button-group';
23
23
  import { useTrackElementOffsetRect } from '../../utils/element-rect';
24
24
  import { useMergeRefs } from '@wordpress/compose';
25
25
  import { useAnimatedOffsetRect } from '../../utils/hooks/use-animated-offset-rect';
26
+ import { maybeWarnDeprecated36pxSize } from '../../utils/deprecated-36px-size';
26
27
 
27
28
  function UnconnectedToggleGroupControl(
28
29
  props: WordPressComponentProps< ToggleGroupControlProps, 'div', false >,
@@ -31,6 +32,7 @@ function UnconnectedToggleGroupControl(
31
32
  const {
32
33
  __nextHasNoMarginBottom = false,
33
34
  __next40pxDefaultSize = false,
35
+ __shouldNotWarnDeprecated36pxSize,
34
36
  className,
35
37
  isAdaptiveWidth = false,
36
38
  isBlock = false,
@@ -52,7 +54,7 @@ function UnconnectedToggleGroupControl(
52
54
  const [ controlElement, setControlElement ] = useState< HTMLElement >();
53
55
  const refs = useMergeRefs( [ setControlElement, forwardedRef ] );
54
56
  const selectedRect = useTrackElementOffsetRect(
55
- value ? selectedElement : undefined
57
+ value || value === 0 ? selectedElement : undefined
56
58
  );
57
59
  useAnimatedOffsetRect( controlElement, selectedRect, {
58
60
  prefix: 'selected',
@@ -81,6 +83,13 @@ function UnconnectedToggleGroupControl(
81
83
  ? ToggleGroupControlAsButtonGroup
82
84
  : ToggleGroupControlAsRadioGroup;
83
85
 
86
+ maybeWarnDeprecated36pxSize( {
87
+ componentName: 'ToggleGroupControl',
88
+ size,
89
+ __next40pxDefaultSize,
90
+ __shouldNotWarnDeprecated36pxSize,
91
+ } );
92
+
84
93
  return (
85
94
  <BaseControl
86
95
  help={ help }
@@ -135,6 +144,7 @@ function UnconnectedToggleGroupControl(
135
144
  * value="vertical"
136
145
  * isBlock
137
146
  * __nextHasNoMarginBottom
147
+ * __next40pxDefaultSize
138
148
  * >
139
149
  * <ToggleGroupControlOption value="horizontal" label="Horizontal" />
140
150
  * <ToggleGroupControlOption value="vertical" label="Vertical" />
@@ -6,7 +6,6 @@ This feature is still experimental. “Experimental” means this is an early im
6
6
 
7
7
  `ToggleGroupControlOption` is a form component and is meant to be used as a child of [`ToggleGroupControl`](/packages/components/src/toggle-group-control/toggle-group-control/README.md).
8
8
 
9
-
10
9
  ## Usage
11
10
 
12
11
  ```js
@@ -22,6 +21,7 @@ function Example() {
22
21
  value="vertical"
23
22
  isBlock
24
23
  __nextHasNoMarginBottom
24
+ __next40pxDefaultSize
25
25
  >
26
26
  <ToggleGroupControlOption
27
27
  value="horizontal"