@wordpress/components 19.16.0 → 19.17.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 (434) hide show
  1. package/CHANGELOG.md +40 -4
  2. package/build/base-control/index.js +6 -3
  3. package/build/base-control/index.js.map +1 -1
  4. package/build/base-control/styles/base-control-styles.js +8 -8
  5. package/build/base-control/styles/base-control-styles.js.map +1 -1
  6. package/build/border-control/styles.js +17 -25
  7. package/build/border-control/styles.js.map +1 -1
  8. package/build/box-control/all-input-control.js +2 -27
  9. package/build/box-control/all-input-control.js.map +1 -1
  10. package/build/box-control/index.js +10 -5
  11. package/build/box-control/index.js.map +1 -1
  12. package/build/box-control/styles/box-control-styles.js +17 -9
  13. package/build/box-control/styles/box-control-styles.js.map +1 -1
  14. package/build/box-control/utils.js +35 -0
  15. package/build/box-control/utils.js.map +1 -1
  16. package/build/color-picker/styles.js +10 -8
  17. package/build/color-picker/styles.js.map +1 -1
  18. package/build/combobox-control/index.js +14 -6
  19. package/build/combobox-control/index.js.map +1 -1
  20. package/build/custom-select-control/index.js +3 -1
  21. package/build/custom-select-control/index.js.map +1 -1
  22. package/build/date-time/time/index.js +6 -2
  23. package/build/date-time/time/index.js.map +1 -1
  24. package/build/date-time/time/styles.js +17 -24
  25. package/build/date-time/time/styles.js.map +1 -1
  26. package/build/external-link/index.js +6 -0
  27. package/build/external-link/index.js.map +1 -1
  28. package/build/flex/flex/component.js +9 -9
  29. package/build/flex/flex/component.js.map +1 -1
  30. package/build/flex/flex/hook.js +6 -16
  31. package/build/flex/flex/hook.js.map +1 -1
  32. package/build/flex/flex/index.js.map +1 -1
  33. package/build/flex/flex-block/component.js +9 -9
  34. package/build/flex/flex-block/component.js.map +1 -1
  35. package/build/flex/flex-block/hook.js +0 -4
  36. package/build/flex/flex-block/hook.js.map +1 -1
  37. package/build/flex/flex-block/index.js.map +1 -1
  38. package/build/flex/flex-item/component.js +9 -9
  39. package/build/flex/flex-item/component.js.map +1 -1
  40. package/build/flex/flex-item/hook.js +1 -5
  41. package/build/flex/flex-item/hook.js.map +1 -1
  42. package/build/flex/flex-item/index.js.map +1 -1
  43. package/build/flex/index.js.map +1 -1
  44. package/build/flex/styles.js +5 -5
  45. package/build/flex/styles.js.map +1 -1
  46. package/build/focal-point-picker/styles/focal-point-picker-style.js +22 -22
  47. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  48. package/build/focal-point-picker/styles/focal-point-style.js +5 -5
  49. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  50. package/build/font-size-picker/index.js +15 -6
  51. package/build/font-size-picker/index.js.map +1 -1
  52. package/build/form-token-field/index.js +6 -2
  53. package/build/form-token-field/index.js.map +1 -1
  54. package/build/form-token-field/suggestions-list.js +19 -6
  55. package/build/form-token-field/suggestions-list.js.map +1 -1
  56. package/build/index.js +7 -1
  57. package/build/index.js.map +1 -1
  58. package/build/input-control/input-base.js +1 -2
  59. package/build/input-control/input-base.js.map +1 -1
  60. package/build/input-control/reducer/actions.js +3 -1
  61. package/build/input-control/reducer/actions.js.map +1 -1
  62. package/build/input-control/reducer/reducer.js +28 -11
  63. package/build/input-control/reducer/reducer.js.map +1 -1
  64. package/build/input-control/reducer/state.js.map +1 -1
  65. package/build/input-control/styles/input-control-styles.js +26 -26
  66. package/build/input-control/styles/input-control-styles.js.map +1 -1
  67. package/build/mobile/global-styles-context/utils.native.js +23 -3
  68. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  69. package/build/mobile/image/index.native.js +23 -2
  70. package/build/mobile/image/index.native.js.map +1 -1
  71. package/build/mobile/link-picker/link-picker-screen.native.js +10 -4
  72. package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  73. package/build/mobile/picker/index.ios.js +16 -3
  74. package/build/mobile/picker/index.ios.js.map +1 -1
  75. package/build/placeholder/index.js +11 -14
  76. package/build/placeholder/index.js.map +1 -1
  77. package/build/placeholder/types.js +6 -0
  78. package/build/placeholder/types.js.map +1 -0
  79. package/build/popover/index.js +113 -62
  80. package/build/popover/index.js.map +1 -1
  81. package/build/range-control/styles/range-control-styles.js +40 -40
  82. package/build/range-control/styles/range-control-styles.js.map +1 -1
  83. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
  84. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  85. package/build/select-control/styles/select-control-styles.js +6 -6
  86. package/build/select-control/styles/select-control-styles.js.map +1 -1
  87. package/build/style-provider/index.js +10 -7
  88. package/build/style-provider/index.js.map +1 -1
  89. package/build/style-provider/types.js +6 -0
  90. package/build/style-provider/types.js.map +1 -0
  91. package/build/swatch/index.js +2 -0
  92. package/build/swatch/index.js.map +1 -1
  93. package/build/swatch/types.js +6 -0
  94. package/build/swatch/types.js.map +1 -0
  95. package/build/text/hook.js +5 -8
  96. package/build/text/hook.js.map +1 -1
  97. package/build/tools-panel/styles.js +13 -10
  98. package/build/tools-panel/styles.js.map +1 -1
  99. package/build/tools-panel/tools-panel/hook.js +1 -1
  100. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  101. package/build/ui/tooltip/styles.js +4 -4
  102. package/build/ui/tooltip/styles.js.map +1 -1
  103. package/build/unit-control/styles/unit-control-styles.js +34 -9
  104. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  105. package/build/utils/base-label.js +24 -0
  106. package/build/utils/base-label.js.map +1 -0
  107. package/build/utils/box-sizing.js +22 -0
  108. package/build/utils/box-sizing.js.map +1 -0
  109. package/build/utils/style-mixins.js +16 -0
  110. package/build/utils/style-mixins.js.map +1 -1
  111. package/build-module/base-control/index.js +7 -5
  112. package/build-module/base-control/index.js.map +1 -1
  113. package/build-module/base-control/styles/base-control-styles.js +9 -9
  114. package/build-module/base-control/styles/base-control-styles.js.map +1 -1
  115. package/build-module/border-control/styles.js +18 -26
  116. package/build-module/border-control/styles.js.map +1 -1
  117. package/build-module/box-control/all-input-control.js +3 -28
  118. package/build-module/box-control/all-input-control.js.map +1 -1
  119. package/build-module/box-control/index.js +4 -4
  120. package/build-module/box-control/index.js.map +1 -1
  121. package/build-module/box-control/styles/box-control-styles.js +18 -10
  122. package/build-module/box-control/styles/box-control-styles.js.map +1 -1
  123. package/build-module/box-control/utils.js +33 -0
  124. package/build-module/box-control/utils.js.map +1 -1
  125. package/build-module/color-picker/styles.js +9 -8
  126. package/build-module/color-picker/styles.js.map +1 -1
  127. package/build-module/combobox-control/index.js +13 -6
  128. package/build-module/combobox-control/index.js.map +1 -1
  129. package/build-module/custom-select-control/index.js +2 -1
  130. package/build-module/custom-select-control/index.js.map +1 -1
  131. package/build-module/date-time/time/index.js +6 -3
  132. package/build-module/date-time/time/index.js.map +1 -1
  133. package/build-module/date-time/time/styles.js +15 -21
  134. package/build-module/date-time/time/styles.js.map +1 -1
  135. package/build-module/external-link/index.js +6 -0
  136. package/build-module/external-link/index.js.map +1 -1
  137. package/build-module/flex/flex/component.js +9 -9
  138. package/build-module/flex/flex/component.js.map +1 -1
  139. package/build-module/flex/flex/hook.js +6 -15
  140. package/build-module/flex/flex/hook.js.map +1 -1
  141. package/build-module/flex/flex/index.js.map +1 -1
  142. package/build-module/flex/flex-block/component.js +9 -9
  143. package/build-module/flex/flex-block/component.js.map +1 -1
  144. package/build-module/flex/flex-block/hook.js +0 -4
  145. package/build-module/flex/flex-block/hook.js.map +1 -1
  146. package/build-module/flex/flex-block/index.js.map +1 -1
  147. package/build-module/flex/flex-item/component.js +9 -9
  148. package/build-module/flex/flex-item/component.js.map +1 -1
  149. package/build-module/flex/flex-item/hook.js +1 -5
  150. package/build-module/flex/flex-item/hook.js.map +1 -1
  151. package/build-module/flex/flex-item/index.js.map +1 -1
  152. package/build-module/flex/index.js.map +1 -1
  153. package/build-module/flex/styles.js +5 -5
  154. package/build-module/flex/styles.js.map +1 -1
  155. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +22 -22
  156. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  157. package/build-module/focal-point-picker/styles/focal-point-style.js +5 -5
  158. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  159. package/build-module/font-size-picker/index.js +14 -6
  160. package/build-module/font-size-picker/index.js.map +1 -1
  161. package/build-module/form-token-field/index.js +5 -2
  162. package/build-module/form-token-field/index.js.map +1 -1
  163. package/build-module/form-token-field/suggestions-list.js +19 -6
  164. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  165. package/build-module/index.js +1 -1
  166. package/build-module/index.js.map +1 -1
  167. package/build-module/input-control/input-base.js +1 -2
  168. package/build-module/input-control/input-base.js.map +1 -1
  169. package/build-module/input-control/reducer/actions.js +1 -0
  170. package/build-module/input-control/reducer/actions.js.map +1 -1
  171. package/build-module/input-control/reducer/reducer.js +28 -11
  172. package/build-module/input-control/reducer/reducer.js.map +1 -1
  173. package/build-module/input-control/reducer/state.js.map +1 -1
  174. package/build-module/input-control/styles/input-control-styles.js +27 -27
  175. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  176. package/build-module/mobile/global-styles-context/utils.native.js +23 -4
  177. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  178. package/build-module/mobile/image/index.native.js +25 -4
  179. package/build-module/mobile/image/index.native.js.map +1 -1
  180. package/build-module/mobile/link-picker/link-picker-screen.native.js +11 -4
  181. package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  182. package/build-module/mobile/picker/index.ios.js +14 -3
  183. package/build-module/mobile/picker/index.ios.js.map +1 -1
  184. package/build-module/placeholder/index.js +10 -15
  185. package/build-module/placeholder/index.js.map +1 -1
  186. package/build-module/placeholder/types.js +2 -0
  187. package/build-module/placeholder/types.js.map +1 -0
  188. package/build-module/popover/index.js +112 -62
  189. package/build-module/popover/index.js.map +1 -1
  190. package/build-module/range-control/styles/range-control-styles.js +40 -40
  191. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  192. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
  193. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  194. package/build-module/select-control/styles/select-control-styles.js +6 -6
  195. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  196. package/build-module/style-provider/index.js +10 -5
  197. package/build-module/style-provider/index.js.map +1 -1
  198. package/build-module/style-provider/types.js +2 -0
  199. package/build-module/style-provider/types.js.map +1 -0
  200. package/build-module/swatch/index.js +2 -0
  201. package/build-module/swatch/index.js.map +1 -1
  202. package/build-module/swatch/types.js +2 -0
  203. package/build-module/swatch/types.js.map +1 -0
  204. package/build-module/text/hook.js +5 -7
  205. package/build-module/text/hook.js.map +1 -1
  206. package/build-module/tools-panel/styles.js +12 -11
  207. package/build-module/tools-panel/styles.js.map +1 -1
  208. package/build-module/tools-panel/tools-panel/hook.js +1 -1
  209. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  210. package/build-module/ui/tooltip/styles.js +4 -4
  211. package/build-module/ui/tooltip/styles.js.map +1 -1
  212. package/build-module/unit-control/styles/unit-control-styles.js +35 -9
  213. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  214. package/build-module/utils/base-label.js +18 -0
  215. package/build-module/utils/base-label.js.map +1 -0
  216. package/build-module/utils/box-sizing.js +16 -0
  217. package/build-module/utils/box-sizing.js.map +1 -0
  218. package/build-module/utils/style-mixins.js +2 -0
  219. package/build-module/utils/style-mixins.js.map +1 -1
  220. package/build-style/style-rtl.css +50 -30
  221. package/build-style/style.css +52 -30
  222. package/build-types/base-control/index.d.ts +4 -3
  223. package/build-types/base-control/index.d.ts.map +1 -1
  224. package/build-types/base-control/stories/index.d.ts +1 -1
  225. package/build-types/base-control/stories/index.d.ts.map +1 -1
  226. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  227. package/build-types/base-control/types.d.ts +0 -1
  228. package/build-types/base-control/types.d.ts.map +1 -1
  229. package/build-types/border-control/styles.d.ts.map +1 -1
  230. package/build-types/color-picker/color-display.d.ts +13 -0
  231. package/build-types/color-picker/color-display.d.ts.map +1 -0
  232. package/build-types/color-picker/styles.d.ts.map +1 -1
  233. package/build-types/date-time/time/index.d.ts.map +1 -1
  234. package/build-types/date-time/time/styles.d.ts +0 -4
  235. package/build-types/date-time/time/styles.d.ts.map +1 -1
  236. package/build-types/external-link/index.d.ts.map +1 -1
  237. package/build-types/flex/flex/component.d.ts +5 -4
  238. package/build-types/flex/flex/component.d.ts.map +1 -1
  239. package/build-types/flex/flex/hook.d.ts +5 -2
  240. package/build-types/flex/flex/hook.d.ts.map +1 -1
  241. package/build-types/flex/flex/index.d.ts +2 -2
  242. package/build-types/flex/flex/index.d.ts.map +1 -1
  243. package/build-types/flex/flex-block/component.d.ts +5 -4
  244. package/build-types/flex/flex-block/component.d.ts.map +1 -1
  245. package/build-types/flex/flex-block/hook.d.ts +6 -3
  246. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  247. package/build-types/flex/flex-block/index.d.ts +2 -2
  248. package/build-types/flex/flex-block/index.d.ts.map +1 -1
  249. package/build-types/flex/flex-item/component.d.ts +5 -4
  250. package/build-types/flex/flex-item/component.d.ts.map +1 -1
  251. package/build-types/flex/flex-item/hook.d.ts +6 -3
  252. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  253. package/build-types/flex/flex-item/index.d.ts +2 -2
  254. package/build-types/flex/flex-item/index.d.ts.map +1 -1
  255. package/build-types/flex/index.d.ts +3 -3
  256. package/build-types/flex/index.d.ts.map +1 -1
  257. package/build-types/flex/stories/index.d.ts +13 -0
  258. package/build-types/flex/stories/index.d.ts.map +1 -0
  259. package/build-types/flex/styles.d.ts +5 -5
  260. package/build-types/flex/styles.d.ts.map +1 -1
  261. package/build-types/flex/test/index.d.ts +2 -0
  262. package/build-types/flex/test/index.d.ts.map +1 -0
  263. package/build-types/flex/types.d.ts +15 -11
  264. package/build-types/flex/types.d.ts.map +1 -1
  265. package/build-types/flyout/context.d.ts +6 -0
  266. package/build-types/flyout/context.d.ts.map +1 -0
  267. package/build-types/flyout/flyout/component.d.ts +21 -0
  268. package/build-types/flyout/flyout/component.d.ts.map +1 -0
  269. package/build-types/flyout/flyout/hook.d.ts +270 -0
  270. package/build-types/flyout/flyout/hook.d.ts.map +1 -0
  271. package/build-types/flyout/flyout/index.d.ts +3 -0
  272. package/build-types/flyout/flyout/index.d.ts.map +1 -0
  273. package/build-types/flyout/flyout-content/component.d.ts +3 -0
  274. package/build-types/flyout/flyout-content/component.d.ts.map +1 -0
  275. package/build-types/flyout/flyout-content/index.d.ts +2 -0
  276. package/build-types/flyout/flyout-content/index.d.ts.map +1 -0
  277. package/build-types/flyout/index.d.ts +2 -0
  278. package/build-types/flyout/index.d.ts.map +1 -0
  279. package/build-types/flyout/styles.d.ts +22 -0
  280. package/build-types/flyout/styles.d.ts.map +1 -0
  281. package/build-types/flyout/types.d.ts +80 -0
  282. package/build-types/flyout/types.d.ts.map +1 -0
  283. package/build-types/flyout/utils.d.ts +8 -0
  284. package/build-types/flyout/utils.d.ts.map +1 -0
  285. package/build-types/form-token-field/index.d.ts.map +1 -1
  286. package/build-types/form-token-field/stories/index.d.ts +6 -0
  287. package/build-types/form-token-field/stories/index.d.ts.map +1 -1
  288. package/build-types/form-token-field/suggestions-list.d.ts +1 -1
  289. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
  290. package/build-types/form-token-field/types.d.ts +15 -3
  291. package/build-types/form-token-field/types.d.ts.map +1 -1
  292. package/build-types/input-control/input-base.d.ts.map +1 -1
  293. package/build-types/input-control/reducer/actions.d.ts +3 -1
  294. package/build-types/input-control/reducer/actions.d.ts.map +1 -1
  295. package/build-types/input-control/reducer/reducer.d.ts +2 -2
  296. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  297. package/build-types/input-control/reducer/state.d.ts +2 -2
  298. package/build-types/input-control/reducer/state.d.ts.map +1 -1
  299. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  300. package/build-types/placeholder/index.d.ts +16 -0
  301. package/build-types/placeholder/index.d.ts.map +1 -0
  302. package/build-types/placeholder/stories/index.d.ts +12 -0
  303. package/build-types/placeholder/stories/index.d.ts.map +1 -0
  304. package/build-types/placeholder/types.d.ts +47 -0
  305. package/build-types/placeholder/types.d.ts.map +1 -0
  306. package/build-types/popover/index.d.ts +1 -1
  307. package/build-types/popover/index.d.ts.map +1 -1
  308. package/build-types/popover/utils.d.ts +70 -0
  309. package/build-types/popover/utils.d.ts.map +1 -0
  310. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  311. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  312. package/build-types/style-provider/index.d.ts +7 -4
  313. package/build-types/style-provider/index.d.ts.map +1 -1
  314. package/build-types/style-provider/types.d.ts +15 -0
  315. package/build-types/style-provider/types.d.ts.map +1 -0
  316. package/build-types/swatch/index.d.ts +5 -0
  317. package/build-types/swatch/index.d.ts.map +1 -0
  318. package/build-types/swatch/types.d.ts +11 -0
  319. package/build-types/swatch/types.d.ts.map +1 -0
  320. package/build-types/text/hook.d.ts.map +1 -1
  321. package/build-types/tools-panel/styles.d.ts +1 -1
  322. package/build-types/tools-panel/styles.d.ts.map +1 -1
  323. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  324. package/build-types/ui/tooltip/styles.d.ts.map +1 -1
  325. package/build-types/unit-control/index.d.ts +1 -1
  326. package/build-types/unit-control/stories/index.d.ts.map +1 -1
  327. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  328. package/build-types/unit-control/types.d.ts +1 -7
  329. package/build-types/unit-control/types.d.ts.map +1 -1
  330. package/build-types/utils/base-label.d.ts +2 -0
  331. package/build-types/utils/base-label.d.ts.map +1 -0
  332. package/build-types/utils/box-sizing.d.ts +2 -0
  333. package/build-types/utils/box-sizing.d.ts.map +1 -0
  334. package/build-types/utils/hooks/use-combined-ref.d.ts +8 -0
  335. package/build-types/utils/hooks/use-combined-ref.d.ts.map +1 -0
  336. package/build-types/utils/style-mixins.d.ts +2 -0
  337. package/package.json +17 -17
  338. package/src/base-control/index.tsx +5 -3
  339. package/src/base-control/stories/index.tsx +1 -0
  340. package/src/base-control/styles/base-control-styles.ts +9 -5
  341. package/src/base-control/types.ts +0 -1
  342. package/src/border-control/styles.ts +2 -1
  343. package/src/box-control/all-input-control.js +3 -27
  344. package/src/box-control/index.js +5 -6
  345. package/src/box-control/styles/box-control-styles.js +1 -2
  346. package/src/box-control/utils.js +32 -0
  347. package/src/color-picker/styles.ts +3 -0
  348. package/src/combobox-control/README.md +7 -0
  349. package/src/combobox-control/index.js +14 -4
  350. package/src/combobox-control/stories/index.js +49 -5
  351. package/src/custom-gradient-picker/style.scss +0 -12
  352. package/src/custom-select-control/index.js +3 -2
  353. package/src/custom-select-control/style.scss +1 -5
  354. package/src/date-time/time/index.tsx +7 -5
  355. package/src/date-time/time/styles.ts +3 -6
  356. package/src/external-link/index.tsx +10 -0
  357. package/src/flex/flex/README.md +19 -13
  358. package/src/flex/flex/{component.js → component.tsx} +15 -10
  359. package/src/flex/flex/{hook.js → hook.ts} +14 -13
  360. package/src/flex/flex/{index.js → index.ts} +0 -0
  361. package/src/flex/flex-block/README.md +3 -3
  362. package/src/flex/flex-block/{component.js → component.tsx} +15 -10
  363. package/src/flex/flex-block/{hook.js → hook.ts} +5 -5
  364. package/src/flex/flex-block/{index.js → index.ts} +0 -0
  365. package/src/flex/flex-item/README.md +6 -5
  366. package/src/flex/flex-item/{component.js → component.tsx} +15 -10
  367. package/src/flex/flex-item/{hook.js → hook.ts} +10 -7
  368. package/src/flex/flex-item/{index.js → index.ts} +0 -0
  369. package/src/flex/{index.js → index.ts} +0 -0
  370. package/src/flex/stories/index.tsx +81 -0
  371. package/src/flex/{styles.js → styles.ts} +0 -0
  372. package/src/flex/test/__snapshots__/{index.js.snap → index.tsx.snap} +49 -9
  373. package/src/flex/test/index.tsx +84 -0
  374. package/src/flex/types.ts +15 -11
  375. package/src/focal-point-picker/styles/focal-point-picker-style.js +0 -5
  376. package/src/focal-point-picker/styles/focal-point-style.js +0 -1
  377. package/src/font-size-picker/index.js +18 -7
  378. package/src/font-size-picker/stories/index.js +6 -0
  379. package/src/form-token-field/README.md +2 -1
  380. package/src/form-token-field/index.tsx +5 -2
  381. package/src/form-token-field/stories/index.tsx +14 -0
  382. package/src/form-token-field/style.scss +0 -5
  383. package/src/form-token-field/suggestions-list.tsx +21 -12
  384. package/src/form-token-field/types.ts +16 -2
  385. package/src/index.js +4 -1
  386. package/src/input-control/input-base.tsx +0 -1
  387. package/src/input-control/reducer/actions.ts +3 -1
  388. package/src/input-control/reducer/reducer.ts +27 -10
  389. package/src/input-control/reducer/state.ts +7 -2
  390. package/src/input-control/styles/input-control-styles.tsx +3 -1
  391. package/src/input-control/test/index.js +20 -4
  392. package/src/mobile/global-styles-context/utils.native.js +21 -4
  393. package/src/mobile/image/index.native.js +27 -2
  394. package/src/mobile/link-picker/link-picker-screen.native.js +12 -4
  395. package/src/mobile/picker/index.ios.js +16 -0
  396. package/src/mobile/picker/styles.native.scss +8 -0
  397. package/src/panel/style.scss +4 -1
  398. package/src/placeholder/README.md +49 -9
  399. package/src/placeholder/{index.js → index.tsx} +27 -23
  400. package/src/placeholder/stories/index.tsx +64 -0
  401. package/src/placeholder/style.scss +0 -4
  402. package/src/placeholder/types.ts +48 -0
  403. package/src/popover/README.md +7 -0
  404. package/src/popover/index.js +144 -70
  405. package/src/popover/stories/index.js +199 -98
  406. package/src/popover/style.scss +60 -6
  407. package/src/popover/test/index.js +23 -1
  408. package/src/range-control/styles/range-control-styles.ts +0 -12
  409. package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +1 -1
  410. package/src/select-control/styles/select-control-styles.ts +0 -1
  411. package/src/style-provider/index.tsx +41 -0
  412. package/src/style-provider/types.ts +15 -0
  413. package/src/swatch/{index.js → index.tsx} +4 -1
  414. package/src/swatch/types.ts +11 -0
  415. package/src/text/hook.js +5 -3
  416. package/src/toggle-group-control/test/__snapshots__/index.js.snap +24 -0
  417. package/src/tools-panel/styles.ts +7 -16
  418. package/src/tools-panel/test/__snapshots__/index.js.snap +2 -11
  419. package/src/tools-panel/tools-panel/hook.ts +6 -1
  420. package/src/ui/tooltip/styles.js +1 -0
  421. package/src/ui/tooltip/test/__snapshots__/index.js.snap +1 -0
  422. package/src/unit-control/stories/index.tsx +16 -23
  423. package/src/unit-control/styles/unit-control-styles.ts +93 -41
  424. package/src/unit-control/types.ts +1 -7
  425. package/src/utils/base-label.ts +13 -0
  426. package/src/utils/box-sizing.ts +14 -0
  427. package/src/utils/style-mixins.js +2 -0
  428. package/tsconfig.json +2 -0
  429. package/tsconfig.tsbuildinfo +1 -1
  430. package/src/flex/stories/index.js +0 -29
  431. package/src/flex/test/index.js +0 -77
  432. package/src/placeholder/stories/index.js +0 -44
  433. package/src/popover/stories/_utils.js +0 -64
  434. package/src/style-provider/index.js +0 -31
@@ -5,7 +5,7 @@ import type { Reducer, SyntheticEvent } from 'react';
5
5
  /**
6
6
  * Internal dependencies
7
7
  */
8
- import type { InputAction } from './actions';
8
+ import type { Action, InputAction } from './actions';
9
9
  export interface InputState {
10
10
  _event?: SyntheticEvent;
11
11
  error: unknown;
@@ -16,7 +16,7 @@ export interface InputState {
16
16
  isPressEnterToChange: boolean;
17
17
  value?: string;
18
18
  }
19
- export declare type StateReducer = Reducer<InputState, InputAction>;
19
+ export declare type StateReducer<SpecializedAction = {}> = Reducer<InputState, SpecializedAction extends Action ? InputAction | SpecializedAction : InputAction>;
20
20
  export declare const initialStateReducer: StateReducer;
21
21
  export declare const initialInputControlState: InputState;
22
22
  //# sourceMappingURL=state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/input-control/reducer/state.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAErD;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,WAAW,UAAU;IAC1B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,YAAY,GAAG,OAAO,CAAE,UAAU,EAAE,WAAW,CAAE,CAAC;AAE9D,eAAO,MAAM,mBAAmB,EAAE,YAA6C,CAAC;AAEhF,eAAO,MAAM,wBAAwB,EAAE,UAQtC,CAAC"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/input-control/reducer/state.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAErD;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,WAAW,UAAU;IAC1B,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,oBAAY,YAAY,CAAE,iBAAiB,GAAG,EAAE,IAAK,OAAO,CAC3D,UAAU,EACV,iBAAiB,SAAS,MAAM,GAC7B,WAAW,GAAG,iBAAiB,GAC/B,WAAW,CACd,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,YAA6C,CAAC;AAEhF,eAAO,MAAM,wBAAwB,EAAE,UAQtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"input-control-styles.d.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AAE,SAAS,CAAA;CAAE,EACtD,OAAO,EACP,KAAK,CACL,gBACwC,CAAC;AAE3C,eAAO,MAAM,YAAY;;;;;;UAExB,CAAC;AAEF,aAAK,aAAa,GAAG;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AA0BF,eAAO,MAAM,UAAU;;;yHAgBtB,CAAC;AAEF,eAAO,MAAM,MAAM;;;2GAGlB,CAAC;AAEF,eAAO,MAAM,MAAM;;;2GAKlB,CAAC"}
1
+ {"version":3,"file":"input-control-styles.d.ts","sourceRoot":"","sources":["../../../src/input-control/styles/input-control-styles.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD;;GAEG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAIhE,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAGpD,aAAK,cAAc,GAAG;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oBAAoB,CAAC,EAAE,aAAa,CAAE,OAAO,CAAE,CAAC;IAChD,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AAEF,aAAK,SAAS,GAAG;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;CAC9B,CAAC;AA6BF,eAAO,MAAM,IAAI;;;;;;sBAMhB,CAAC;AAgCF,eAAO,MAAM,SAAS;;;0HAWrB,CAAC;AAEF,aAAK,UAAU,GAAG;IACjB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,aAAa,CAAE,QAAQ,CAAE,CAAC;IACvC,kBAAkB,CAAC,EAAE,aAAa,CAAE,oBAAoB,CAAE,CAAC;IAC3D,gBAAgB,CAAC,EAAE,aAAa,CAAE,kBAAkB,CAAE,CAAC;CACvD,CAAC;AA+BF,eAAO,MAAM,aAAa,gDAGvB,UAAU;;;;;;;;;;;;;;;;;;CAqCZ,CAAC;AA+CF,eAAO,MAAM,KAAK;;;+HAuBjB,CAAC;AAkCF,eAAO,MAAM,KAAK,UACV,wBACN;IAAE,aAAa,CAAC,EAAE,aAAa,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,EACtD,OAAO,EACP,KAAK,CACL,gBACwC,CAAC;AAE3C,eAAO,MAAM,YAAY;;;;;;UAExB,CAAC;AAEF,aAAK,aAAa,GAAG;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AA0BF,eAAO,MAAM,UAAU;;;yHAgBtB,CAAC;AAEF,eAAO,MAAM,MAAM;;;2GAGlB,CAAC;AAEF,eAAO,MAAM,MAAM;;;2GAKlB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import type { PlaceholderProps } from './types';
3
+ import type { WordPressComponentProps } from '../ui/context';
4
+ /**
5
+ * Renders a placeholder. Normally used by blocks to render their empty state.
6
+ *
7
+ * ```jsx
8
+ * import { Placeholder } from '@wordpress/components';
9
+ * import { more } from '@wordpress/icons';
10
+ *
11
+ * const MyPlaceholder = () => <Placeholder icon={ more } label="Placeholder" />;
12
+ * ```
13
+ */
14
+ export declare function Placeholder<IconProps = unknown>(props: Omit<WordPressComponentProps<PlaceholderProps<IconProps>, 'div', false>, 'ref'>): JSX.Element;
15
+ export default Placeholder;
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/placeholder/index.tsx"],"names":[],"mappings":";AAeA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAc7D;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAE,SAAS,GAAG,OAAO,EAG/C,KAAK,EAAE,IAAI,CACV,uBAAuB,CAAE,gBAAgB,CAAE,SAAS,CAAE,EAAE,KAAK,EAAE,KAAK,CAAE,EACtE,KAAK,CACL,eA4DD;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ComponentMeta, ComponentStory } from '@storybook/react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import Placeholder from '../';
9
+ declare const meta: ComponentMeta<typeof Placeholder>;
10
+ export default meta;
11
+ export declare const Default: ComponentStory<typeof Placeholder>;
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/placeholder/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAQtE;;GAEG;AACH,OAAO,WAAW,MAAM,KAAK,CAAC;AAK9B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,WAAW,CAiB5C,CAAC;AACF,eAAe,IAAI,CAAC;AAmBpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,WAAW,CAEvD,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ReactNode } from 'react';
5
+ /**
6
+ * Internal dependencies
7
+ */
8
+ import type { IconType } from '../icon';
9
+ export declare type PlaceholderProps<IconProps = unknown> = {
10
+ /**
11
+ * The children elements.
12
+ */
13
+ children?: ReactNode;
14
+ /**
15
+ * Class to set on the container div.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * If provided, renders an icon next to the label.
20
+ */
21
+ icon?: IconType<IconProps>;
22
+ /**
23
+ * Instructions of the placeholder.
24
+ */
25
+ instructions?: string;
26
+ /**
27
+ * Changes placeholder children layout from flex-row to flex-column.
28
+ */
29
+ isColumnLayout?: boolean;
30
+ /**
31
+ * Title of the placeholder.
32
+ */
33
+ label?: string;
34
+ /**
35
+ * A rendered notices list
36
+ */
37
+ notices?: ReactNode;
38
+ /**
39
+ * Preview to be rendered in the placeholder.
40
+ */
41
+ preview?: ReactNode;
42
+ /**
43
+ * Outputs a placeholder illustration.
44
+ */
45
+ withIllustration?: boolean;
46
+ };
47
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/placeholder/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,oBAAY,gBAAgB,CAAE,SAAS,GAAG,OAAO,IAAK;IACrD;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAE,SAAS,CAAE,CAAC;IAC7B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC"}
@@ -20,7 +20,7 @@ declare const PopoverContainer: import("react").ForwardRefExoticComponent<Pick<{
20
20
  onFocusOutside: any;
21
21
  __unstableSlotName?: string | undefined;
22
22
  __unstableObserveElement: any;
23
- __unstableForcePosition: any;
23
+ __unstableForcePosition?: boolean | undefined;
24
24
  __unstableShift?: boolean | undefined;
25
25
  }, string | number> & import("react").RefAttributes<any>>;
26
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.js"],"names":[],"mappings":";AAkaA;;;;;;;;;;;;;;;;;;;;;;;0DAA+C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.js"],"names":[],"mappings":";AA4eA;;;;;;;;;;;;;;;;;;;;;;;0DAA+C"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Utility used to compute the popover position over the xAxis
3
+ *
4
+ * @param {Object} anchorRect Anchor Rect.
5
+ * @param {Object} contentSize Content Size.
6
+ * @param {string} xAxis Desired xAxis.
7
+ * @param {string} corner Desired corner.
8
+ * @param {boolean} stickyBoundaryElement The boundary element to use when
9
+ * switching between sticky and normal
10
+ * position.
11
+ * @param {string} chosenYAxis yAxis to be used.
12
+ * @param {Element} boundaryElement Boundary element.
13
+ * @param {boolean} forcePosition Don't adjust position based on anchor.
14
+ * @param {boolean} forceXAlignment Don't adjust alignment based on YAxis
15
+ *
16
+ * @return {Object} Popover xAxis position and constraints.
17
+ */
18
+ export function computePopoverXAxisPosition(anchorRect: Object, contentSize: Object, xAxis: string, corner: string, stickyBoundaryElement: boolean, chosenYAxis: string, boundaryElement: Element, forcePosition: boolean, forceXAlignment: boolean): Object;
19
+ /**
20
+ * Utility used to compute the popover position over the yAxis
21
+ *
22
+ * @param {Object} anchorRect Anchor Rect.
23
+ * @param {Object} contentSize Content Size.
24
+ * @param {string} yAxis Desired yAxis.
25
+ * @param {string} corner Desired corner.
26
+ * @param {boolean} stickyBoundaryElement The boundary element to use when switching between sticky
27
+ * and normal position.
28
+ * @param {Element} anchorRef The anchor element.
29
+ * @param {Element} relativeOffsetTop If applicable, top offset of the relative positioned
30
+ * parent container.
31
+ * @param {boolean} forcePosition Don't adjust position based on anchor.
32
+ * @param {Element|null} editorWrapper Element that wraps the editor content. Used to access
33
+ * scroll position to determine sticky behavior.
34
+ * @return {Object} Popover xAxis position and constraints.
35
+ */
36
+ export function computePopoverYAxisPosition(anchorRect: Object, contentSize: Object, yAxis: string, corner: string, stickyBoundaryElement: boolean, anchorRef: Element, relativeOffsetTop: Element, forcePosition: boolean, editorWrapper: Element | null): Object;
37
+ /**
38
+ * Utility used to compute the popover position and the content max width/height for a popover given
39
+ * its anchor rect and its content size.
40
+ *
41
+ * @param {Object} anchorRect Anchor Rect.
42
+ * @param {Object} contentSize Content Size.
43
+ * @param {string} position Position.
44
+ * @param {boolean} stickyBoundaryElement The boundary element to use when switching between
45
+ * sticky and normal position.
46
+ * @param {Element} anchorRef The anchor element.
47
+ * @param {number} relativeOffsetTop If applicable, top offset of the relative positioned
48
+ * parent container.
49
+ * @param {Element} boundaryElement Boundary element.
50
+ * @param {boolean} forcePosition Don't adjust position based on anchor.
51
+ * @param {boolean} forceXAlignment Don't adjust alignment based on YAxis
52
+ * @param {Element|null} editorWrapper Element that wraps the editor content. Used to access
53
+ * scroll position to determine sticky behavior.
54
+ * @return {Object} Popover position and constraints.
55
+ */
56
+ export function computePopoverPosition(anchorRect: Object, contentSize: Object, position: string | undefined, stickyBoundaryElement: boolean, anchorRef: Element, relativeOffsetTop: number, boundaryElement: Element, forcePosition: boolean, forceXAlignment: boolean, editorWrapper: Element | null): Object;
57
+ /**
58
+ * Offsets the given rect by the position of the iframe that contains the
59
+ * element. If the owner document is not in an iframe then it returns with the
60
+ * original rect. If the popover container document and the anchor document are
61
+ * the same, the original rect will also be returned.
62
+ *
63
+ * @param {DOMRect} rect bounds of the element
64
+ * @param {Document} ownerDocument document of the element
65
+ * @param {Element} container The popover container to position.
66
+ *
67
+ * @return {DOMRect} offsetted bounds
68
+ */
69
+ export function offsetIframe(rect: DOMRect, ownerDocument: Document, container: Element): DOMRect;
70
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/popover/utils.js"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;GAgBG;AACH,wDAdW,MAAM,eACN,MAAM,SACN,MAAM,UACN,MAAM,yBACN,OAAO,eAGP,MAAM,mBACN,OAAO,iBACP,OAAO,mBACP,OAAO,GAEN,MAAM,CAoIjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wDAdW,MAAM,eACN,MAAM,SACN,MAAM,UACN,MAAM,yBACN,OAAO,aAEP,OAAO,qBACP,OAAO,iBAEP,OAAO,iBACP,OAAO,GAAC,IAAI,GAEX,MAAM,CAiIjB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,mDAfW,MAAM,eACN,MAAM,uDAEN,OAAO,aAEP,OAAO,qBACP,MAAM,mBAEN,OAAO,iBACP,OAAO,mBACP,OAAO,iBACP,OAAO,GAAC,IAAI,GAEX,MAAM,CA2CjB;AAED;;;;;;;;;;;GAWG;AACH,mCANW,OAAO,iBACP,QAAQ,aACR,OAAO,GAEN,OAAO,CAiBlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"range-control-styles.d.ts","sourceRoot":"","sources":["../../../src/range-control/styles/range-control-styles.ts"],"names":[],"mappings":";AAaA,OAAO,KAAK,EACX,cAAc,EAEd,UAAU,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,MAAM,UAAU,CAAC;AAQlB,eAAO,MAAM,IAAI;;;yGAUhB,CAAC;AAQF,eAAO,MAAM,OAAO;;;wHAWnB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;2GAI7B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;2GAI5B,CAAC;AAYF,eAAO,MAAM,IAAI;;;;;;;;;;;;2GAchB,CAAC;AAYF,eAAO,MAAM,KAAK;;;wHAYjB,CAAC;AAEF,eAAO,MAAM,YAAY;;;2GAOxB,CAAC;AAcF,eAAO,MAAM,IAAI;;;4HAShB,CAAC;AAQF,eAAO,MAAM,SAAS;;;4HAWrB,CAAC;AAWF,eAAO,MAAM,YAAY;;;wHAqBxB,CAAC;AAoBF,eAAO,MAAM,KAAK;;;wHAYjB,CAAC;AAEF,eAAO,MAAM,UAAU;;;kHAatB,CAAC;AAsBF,eAAO,MAAM,OAAO;;;0HAwBnB,CAAC;AAIF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;UAYvB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;2GAY9B,CAAC"}
1
+ {"version":3,"file":"range-control-styles.d.ts","sourceRoot":"","sources":["../../../src/range-control/styles/range-control-styles.ts"],"names":[],"mappings":";AAaA,OAAO,KAAK,EACX,cAAc,EAEd,UAAU,EACV,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,MAAM,UAAU,CAAC;AAQlB,eAAO,MAAM,IAAI;;;yGAShB,CAAC;AAQF,eAAO,MAAM,OAAO;;;wHAUnB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;2GAI7B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;2GAI5B,CAAC;AAYF,eAAO,MAAM,IAAI;;;;;;;;;;;;2GAahB,CAAC;AAYF,eAAO,MAAM,KAAK;;;wHAWjB,CAAC;AAEF,eAAO,MAAM,YAAY;;;2GAMxB,CAAC;AAcF,eAAO,MAAM,IAAI;;;4HAQhB,CAAC;AAQF,eAAO,MAAM,SAAS;;;4HAUrB,CAAC;AAWF,eAAO,MAAM,YAAY;;;wHAoBxB,CAAC;AAoBF,eAAO,MAAM,KAAK;;;wHAWjB,CAAC;AAEF,eAAO,MAAM,UAAU;;;kHAatB,CAAC;AAsBF,eAAO,MAAM,OAAO;;;0HAuBnB,CAAC;AAIF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;UAWvB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;2GAW9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"select-control-styles.d.ts","sourceRoot":"","sources":["../../../src/select-control/styles/select-control-styles.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,UAAU,WACT,SAAQ,IAAI,CAAE,kBAAkB,EAAE,uBAAuB,GAAG,UAAU,CAAE;IAGxE,UAAU,CAAC,EAAE,kBAAkB,CAAE,MAAM,CAAE,CAAC;CAC1C;AAsGD,eAAO,MAAM,MAAM;;;mIAkBlB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;yGAe5B,CAAC"}
1
+ {"version":3,"file":"select-control-styles.d.ts","sourceRoot":"","sources":["../../../src/select-control/styles/select-control-styles.ts"],"names":[],"mappings":";AAUA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,UAAU,WACT,SAAQ,IAAI,CAAE,kBAAkB,EAAE,uBAAuB,GAAG,UAAU,CAAE;IAGxE,UAAU,CAAC,EAAE,kBAAkB,CAAE,MAAM,CAAE,CAAC;CAC1C;AAsGD,eAAO,MAAM,MAAM;;;mIAkBlB,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;yGAc5B,CAAC"}
@@ -1,5 +1,8 @@
1
- export default function StyleProvider({ children, document }: {
2
- children: any;
3
- document: any;
4
- }): JSX.Element | null;
1
+ /// <reference types="react" />
2
+ /**
3
+ * Internal dependencies
4
+ */
5
+ import type { StyleProviderProps } from './types';
6
+ export declare function StyleProvider(props: StyleProviderProps): JSX.Element | null;
7
+ export default StyleProvider;
5
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/style-provider/index.js"],"names":[],"mappings":"AAsBA;;;uBAQC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/style-provider/index.tsx"],"names":[],"mappings":";AAQA;;GAEG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAiBlD,wBAAgB,aAAa,CAAE,KAAK,EAAE,kBAAkB,sBAUvD;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { ReactNode } from 'react';
5
+ export declare type StyleProviderProps = {
6
+ /**
7
+ * The children elements.
8
+ */
9
+ children: ReactNode;
10
+ /**
11
+ * Current document.
12
+ */
13
+ document: Document;
14
+ };
15
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/style-provider/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,oBAAY,kBAAkB,GAAG;IAChC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;CACnB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { SwatchProps } from './types';
3
+ declare function Swatch({ fill }: SwatchProps): JSX.Element;
4
+ export default Swatch;
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/swatch/index.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C,iBAAS,MAAM,CAAE,EAAE,IAAI,EAAE,EAAE,WAAW,eAMrC;AAED,eAAe,MAAM,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { CSSProperties } from 'react';
5
+ export declare type SwatchProps = {
6
+ /**
7
+ * The color to display in the swatch.
8
+ */
9
+ fill?: CSSProperties['background'];
10
+ };
11
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/swatch/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,oBAAY,WAAW,GAAG;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,aAAa,CAAE,YAAY,CAAE,CAAC;CACrC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/text/hook.js"],"names":[],"mappings":"AAwBA;;GAEG;AACH,uCAFW,OAAO,eAAe,EAAE,uBAAuB,CAAC,OAAO,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoK1F"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/text/hook.js"],"names":[],"mappings":"AAuBA;;GAEG;AACH,uCAFW,OAAO,eAAe,EAAE,uBAAuB,CAAC,OAAO,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuK1F"}
@@ -1,4 +1,4 @@
1
- export declare const ToolsPanel: import("@emotion/utils").SerializedStyles;
1
+ export declare const ToolsPanel: (columns: number) => import("@emotion/utils").SerializedStyles;
2
2
  /**
3
3
  * Items injected into a ToolsPanel via a virtual bubbling slot will require
4
4
  * an inner dom element to be injected. The following rule allows for the
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/tools-panel/styles.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,UAAU,2CAMtB,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,0BAA0B,YAAc,MAAM,8CAS1D,CAAC;AAEF,eAAO,MAAM,4BAA4B,2CAIxC,CAAC;AAEF,eAAO,MAAM,gBAAgB,2CAmB5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,2CAS7B,CAAC;AAEF,eAAO,MAAM,cAAc,2CAsD1B,CAAC;AAEF,eAAO,MAAM,yBAAyB,2CAErC,CAAC;AAEF,eAAO,MAAM,YAAY,2CAExB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/tools-panel/styles.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,UAAU,YAAc,MAAM,8CAO1C,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,0BAA0B,YAAc,MAAM,8CAS1D,CAAC;AAEF,eAAO,MAAM,4BAA4B,2CAIxC,CAAC;AAEF,eAAO,MAAM,gBAAgB,2CAmB5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,2CAS7B,CAAC;AAEF,eAAO,MAAM,cAAc,2CA0C1B,CAAC;AAEF,eAAO,MAAM,yBAAyB,2CAErC,CAAC;AAEF,eAAO,MAAM,YAAY,2CAExB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../../src/tools-panel/tools-panel/hook.ts"],"names":[],"mappings":";AAeA,OAAO,EAAoB,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,mBAAmB,EAEnB,eAAe,E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;EAgHhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/ui/tooltip/styles.js"],"names":[],"mappings":"AAeA,uEAWE;AAEF;;;0GAME;AAEF,kEAEE;AAEF;;;;;;WAGE"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/ui/tooltip/styles.js"],"names":[],"mappings":"AAeA,uEAYE;AAEF;;;0GAME;AAEF,kEAEE;AAEF;;;;;;WAGE"}
@@ -21,7 +21,7 @@ import type { StateReducer } from '../input-control/reducer/state';
21
21
  * ```
22
22
  */
23
23
  export declare const UnitControl: import("react").ForwardRefExoticComponent<Pick<Omit<import("./types").UnitSelectControlProps, "unit"> & Pick<import("../input-control/types").InputControlProps, "prefix" | "hideLabelFromVision" | "__next36pxDefaultSize"> & {
24
- __unstableStateReducer?: StateReducer | undefined;
24
+ __unstableStateReducer?: StateReducer<{}> | undefined;
25
25
  __unstableInputWidth?: import("csstype").Property.Width<string | number> | undefined;
26
26
  disableUnits?: boolean | undefined;
27
27
  isPressEnterToChange?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/unit-control/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAGlC,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,WAAW,CA8B5C,CAAC;AACF,eAAe,IAAI,CAAC;AAsBpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,WAAW,CAC7B,CAAC;AAK5B;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAE,OAAO,WAAW,CACxC,CAAC;AAU5B;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAE,OAAO,WAAW,CAC5C,CAAC;AAS5B;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,cAAc,CAAE,OAAO,WAAW,CACpC,CAAC;AAM5B;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,cAAc,CAAE,OAAO,WAAW,CAkB/D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/unit-control/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAGlC,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,WAAW,CA2B5C,CAAC;AACF,eAAe,IAAI,CAAC;AAoBpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,WAAW,CAC7B,CAAC;AAK5B;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAE,OAAO,WAAW,CACxC,CAAC;AAU5B;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAE,OAAO,WAAW,CAC5C,CAAC;AAS5B;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,cAAc,CAAE,OAAO,WAAW,CACpC,CAAC;AAM5B;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,cAAc,CAAE,OAAO,WAAW,CAgB/D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"unit-control-styles.d.ts","sourceRoot":"","sources":["../../../src/unit-control/styles/unit-control-styles.ts"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C,aAAK,WAAW,GAAG;IAClB,UAAU,EAAE,UAAU,CAAC;CACvB,CAAC;AAEF,aAAK,UAAU,GAAG;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,IAAI;;;yGAQhB,CAAC;AAiBF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;uBAWtB,CAAC;AAqBF,eAAO,MAAM,SAAS;;;uHAMrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;mIA+BtB,CAAC"}
1
+ {"version":3,"file":"unit-control-styles.d.ts","sourceRoot":"","sources":["../../../src/unit-control/styles/unit-control-styles.ts"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAK3C,aAAK,WAAW,GAAG;IAClB,UAAU,EAAE,UAAU,CAAC;CACvB,CAAC;AAEF,aAAK,UAAU,GAAG;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,IAAI;;;yGAQhB,CAAC;AAiBF,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;uBAWtB,CAAC;AAmCF,eAAO,MAAM,SAAS;;;uHAQrB,CAAC;AA+CF,eAAO,MAAM,UAAU;;;mIAqBtB,CAAC"}
@@ -33,7 +33,7 @@ export declare type WPUnitControlUnit = {
33
33
  export declare type UnitControlOnChangeCallback = InputChangeCallback<SyntheticEvent<HTMLSelectElement | HTMLInputElement>, {
34
34
  data?: WPUnitControlUnit;
35
35
  }>;
36
- export declare type UnitSelectControlProps = {
36
+ export declare type UnitSelectControlProps = Pick<InputControlProps, 'size'> & {
37
37
  /**
38
38
  * Whether the control can be focused via keyboard navigation.
39
39
  *
@@ -44,12 +44,6 @@ export declare type UnitSelectControlProps = {
44
44
  * A callback function invoked when the value is changed.
45
45
  */
46
46
  onChange?: UnitControlOnChangeCallback;
47
- /**
48
- * Size of the control option. Supports "default" and "small".
49
- *
50
- * @default 'default'
51
- */
52
- size?: SelectSize;
53
47
  /**
54
48
  * Current unit.
55
49
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/unit-control/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAA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 +1,2 @@
1
+ export declare const baseLabelTypography: import("@emotion/utils").SerializedStyles;
2
+ //# sourceMappingURL=base-label.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-label.d.ts","sourceRoot":"","sources":["../../src/utils/base-label.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB,2CAK/B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const boxSizingReset: import("@emotion/utils").SerializedStyles;
2
+ //# sourceMappingURL=box-sizing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"box-sizing.d.ts","sourceRoot":"","sources":["../../src/utils/box-sizing.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc,2CAQ1B,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * External dependencies
3
+ */
4
+ import type { MutableRefObject, RefCallback } from 'react';
5
+ declare type Ref<T> = MutableRefObject<T | null> | RefCallback<T | null>;
6
+ export declare function useCombinedRef<T extends HTMLElement>(...refs: Ref<T>[]): MutableRefObject<null>;
7
+ export {};
8
+ //# sourceMappingURL=use-combined-ref.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-combined-ref.d.ts","sourceRoot":"","sources":["../../../src/utils/hooks/use-combined-ref.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE3D,aAAK,GAAG,CAAE,CAAC,IAAK,gBAAgB,CAAE,CAAC,GAAG,IAAI,CAAE,GAAG,WAAW,CAAE,CAAC,GAAG,IAAI,CAAE,CAAC;AAEvE,wBAAgB,cAAc,CAAE,CAAC,SAAS,WAAW,EAAI,GAAG,IAAI,EAAE,GAAG,CAAE,CAAC,CAAE,EAAE,0BAgB3E"}
@@ -1,3 +1,4 @@
1
+ export { boxSizingReset } from "./box-sizing";
1
2
  export { rgba } from "./colors";
2
3
  export { reduceMotion } from "./reduce-motion";
3
4
  export { rtl } from "./rtl";
@@ -5,4 +6,5 @@ export { font } from "./font";
5
6
  export { breakpoint } from "./breakpoint";
6
7
  export { default as CONFIG } from "./config-values";
7
8
  export { COLORS } from "./colors-values";
9
+ export { baseLabelTypography } from "./base-label";
8
10
  //# sourceMappingURL=style-mixins.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/components",
3
- "version": "19.16.0",
3
+ "version": "19.17.0",
4
4
  "description": "UI components for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -38,21 +38,21 @@
38
38
  "@emotion/utils": "1.0.0",
39
39
  "@floating-ui/react-dom": "0.6.3",
40
40
  "@use-gesture/react": "^10.2.6",
41
- "@wordpress/a11y": "^3.14.0",
42
- "@wordpress/compose": "^5.12.0",
43
- "@wordpress/date": "^4.14.0",
44
- "@wordpress/deprecated": "^3.14.0",
45
- "@wordpress/dom": "^3.14.0",
46
- "@wordpress/element": "^4.12.0",
47
- "@wordpress/escape-html": "^2.14.0",
48
- "@wordpress/hooks": "^3.14.0",
49
- "@wordpress/i18n": "^4.14.0",
50
- "@wordpress/icons": "^9.5.0",
51
- "@wordpress/is-shallow-equal": "^4.14.0",
52
- "@wordpress/keycodes": "^3.14.0",
53
- "@wordpress/primitives": "^3.12.0",
54
- "@wordpress/rich-text": "^5.12.0",
55
- "@wordpress/warning": "^2.14.0",
41
+ "@wordpress/a11y": "^3.15.0",
42
+ "@wordpress/compose": "^5.13.0",
43
+ "@wordpress/date": "^4.15.0",
44
+ "@wordpress/deprecated": "^3.15.0",
45
+ "@wordpress/dom": "^3.15.0",
46
+ "@wordpress/element": "^4.13.0",
47
+ "@wordpress/escape-html": "^2.15.0",
48
+ "@wordpress/hooks": "^3.15.0",
49
+ "@wordpress/i18n": "^4.15.0",
50
+ "@wordpress/icons": "^9.6.0",
51
+ "@wordpress/is-shallow-equal": "^4.15.0",
52
+ "@wordpress/keycodes": "^3.15.0",
53
+ "@wordpress/primitives": "^3.13.0",
54
+ "@wordpress/rich-text": "^5.13.0",
55
+ "@wordpress/warning": "^2.15.0",
56
56
  "classnames": "^2.3.1",
57
57
  "colord": "^2.7.0",
58
58
  "dom-scroll-into-view": "^1.2.1",
@@ -77,5 +77,5 @@
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "gitHead": "0315dbc240cb2aa146d7c1bafd251f004b88300e"
80
+ "gitHead": "08358f53b627a15148c3a3e433cdf58cf8714aa4"
81
81
  }
@@ -2,7 +2,6 @@
2
2
  * External dependencies
3
3
  */
4
4
  import classnames from 'classnames';
5
- import type { FunctionComponent } from 'react';
6
5
 
7
6
  /**
8
7
  * Internal dependencies
@@ -16,6 +15,7 @@ import {
16
15
  StyledHelp,
17
16
  StyledVisualLabel,
18
17
  } from './styles/base-control-styles';
18
+ import type { WordPressComponentProps } from '../ui/context';
19
19
 
20
20
  /**
21
21
  * `BaseControl` is a component used to generate labels and help text for components handling user inputs.
@@ -104,12 +104,14 @@ export const BaseControl = ( {
104
104
  * </BaseControl>
105
105
  * );
106
106
  */
107
- export const VisualLabel: FunctionComponent< BaseControlVisualLabelProps > = ( {
107
+ export const VisualLabel = ( {
108
108
  className,
109
109
  children,
110
- } ) => {
110
+ ...props
111
+ }: WordPressComponentProps< BaseControlVisualLabelProps, 'span' > ) => {
111
112
  return (
112
113
  <StyledVisualLabel
114
+ { ...props }
113
115
  className={ classnames(
114
116
  'components-base-control__label',
115
117
  className
@@ -60,6 +60,7 @@ WithHelpText.args = {
60
60
  export const WithVisualLabel: ComponentStory< typeof BaseControl > = (
61
61
  props
62
62
  ) => {
63
+ // @ts-expect-error - Unclear how to fix, see also https://github.com/WordPress/gutenberg/pull/39468#discussion_r827150516
63
64
  BaseControl.VisualLabel.displayName = 'BaseControl.VisualLabel';
64
65
 
65
66
  return (
@@ -7,12 +7,14 @@ import { css } from '@emotion/react';
7
7
  /**
8
8
  * Internal dependencies
9
9
  */
10
- import { font, COLORS } from '../../utils';
10
+ import { baseLabelTypography, boxSizingReset, font, COLORS } from '../../utils';
11
11
  import { space } from '../../ui/utils/space';
12
12
 
13
13
  export const Wrapper = styled.div`
14
14
  font-family: ${ font( 'default.fontFamily' ) };
15
15
  font-size: ${ font( 'default.fontSize' ) };
16
+
17
+ ${ boxSizingReset }
16
18
  `;
17
19
 
18
20
  const deprecatedMarginField = ( { __nextHasNoMarginBottom = false } ) => {
@@ -33,12 +35,10 @@ export const StyledField = styled.div`
33
35
  `;
34
36
 
35
37
  const labelStyles = css`
38
+ ${ baseLabelTypography };
39
+
36
40
  display: inline-block;
37
41
  margin-bottom: ${ space( 2 ) };
38
- `;
39
-
40
- export const StyledLabel = styled.label`
41
- ${ labelStyles }
42
42
  /**
43
43
  * Removes Chrome/Safari/Firefox user agent stylesheet padding from
44
44
  * StyledLabel when it is rendered as a legend.
@@ -46,6 +46,10 @@ export const StyledLabel = styled.label`
46
46
  padding: 0;
47
47
  `;
48
48
 
49
+ export const StyledLabel = styled.label`
50
+ ${ labelStyles }
51
+ `;
52
+
49
53
  const deprecatedMarginHelp = ( { __nextHasNoMarginBottom = false } ) => {
50
54
  return (
51
55
  ! __nextHasNoMarginBottom &&
@@ -37,6 +37,5 @@ export type BaseControlProps = {
37
37
  };
38
38
 
39
39
  export type BaseControlVisualLabelProps = {
40
- className?: string;
41
40
  children: ReactNode;
42
41
  };
@@ -6,7 +6,7 @@ import { css } from '@emotion/react';
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
- import { COLORS, CONFIG, rtl } from '../utils';
9
+ import { COLORS, CONFIG, boxSizingReset, rtl } from '../utils';
10
10
  import { space } from '../ui/utils/space';
11
11
  import {
12
12
  StyledField,
@@ -31,6 +31,7 @@ export const borderControl = css`
31
31
  border: 0;
32
32
  padding: 0;
33
33
  margin: 0;
34
+ ${ boxSizingReset }
34
35
  `;
35
36
 
36
37
  export const innerWrapper = () => css`