@wordpress/components 27.4.0 → 27.5.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 (474) hide show
  1. package/CHANGELOG.md +27 -1
  2. package/build/alignment-matrix-control/index.js +3 -1
  3. package/build/alignment-matrix-control/index.js.map +1 -1
  4. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +8 -8
  5. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  6. package/build/alignment-matrix-control/utils.js +6 -2
  7. package/build/alignment-matrix-control/utils.js.map +1 -1
  8. package/build/autocomplete/autocompleter-ui.js +3 -1
  9. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  10. package/build/autocomplete/index.js +21 -7
  11. package/build/autocomplete/index.js.map +1 -1
  12. package/build/checkbox-control/index.js +9 -2
  13. package/build/checkbox-control/index.js.map +1 -1
  14. package/build/color-picker/hex-input.js +3 -1
  15. package/build/color-picker/hex-input.js.map +1 -1
  16. package/build/color-picker/hue-picker.native.js +6 -2
  17. package/build/color-picker/hue-picker.native.js.map +1 -1
  18. package/build/color-picker/index.native.js +9 -3
  19. package/build/color-picker/index.native.js.map +1 -1
  20. package/build/color-picker/saturation-picker.native.js +6 -2
  21. package/build/color-picker/saturation-picker.native.js.map +1 -1
  22. package/build/color-picker/use-deprecated-props.js +9 -3
  23. package/build/color-picker/use-deprecated-props.js.map +1 -1
  24. package/build/context/context-connect.js +6 -2
  25. package/build/context/context-connect.js.map +1 -1
  26. package/build/custom-select-control-v2/legacy-component/index.js +3 -1
  27. package/build/custom-select-control-v2/legacy-component/index.js.map +1 -1
  28. package/build/drop-zone/index.js +72 -64
  29. package/build/drop-zone/index.js.map +1 -1
  30. package/build/dropdown/styles.js +5 -3
  31. package/build/dropdown/styles.js.map +1 -1
  32. package/build/duotone-picker/utils.js +3 -1
  33. package/build/duotone-picker/utils.js.map +1 -1
  34. package/build/elevation/hook.js +5 -6
  35. package/build/elevation/hook.js.map +1 -1
  36. package/build/focal-point-picker/controls.js +3 -1
  37. package/build/focal-point-picker/controls.js.map +1 -1
  38. package/build/focal-point-picker/index.js +21 -7
  39. package/build/focal-point-picker/index.js.map +1 -1
  40. package/build/focal-point-picker/styles/focal-point-picker-style.js +12 -12
  41. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  42. package/build/focal-point-picker/tooltip/index.native.js +3 -8
  43. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  44. package/build/focal-point-picker/utils.js +3 -1
  45. package/build/focal-point-picker/utils.js.map +1 -1
  46. package/build/font-size-picker/index.js +3 -2
  47. package/build/font-size-picker/index.js.map +1 -1
  48. package/build/font-size-picker/types.js.map +1 -1
  49. package/build/input-control/input-field.js +3 -1
  50. package/build/input-control/input-field.js.map +1 -1
  51. package/build/input-control/label.js +3 -1
  52. package/build/input-control/label.js.map +1 -1
  53. package/build/input-control/styles/input-control-styles.js +31 -23
  54. package/build/input-control/styles/input-control-styles.js.map +1 -1
  55. package/build/input-control/utils.js +8 -4
  56. package/build/input-control/utils.js.map +1 -1
  57. package/build/item-group/item/hook.js +0 -4
  58. package/build/item-group/item/hook.js.map +1 -1
  59. package/build/mobile/gradient/index.native.js +3 -1
  60. package/build/mobile/gradient/index.native.js.map +1 -1
  61. package/build/mobile/keyboard-aware-flat-list/index.android.js +9 -3
  62. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  63. package/build/mobile/keyboard-aware-flat-list/index.ios.js +15 -13
  64. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  65. package/build/mobile/keyboard-aware-flat-list/shared.native.js +33 -0
  66. package/build/mobile/keyboard-aware-flat-list/shared.native.js.map +1 -0
  67. package/build/modal/aria-helper.js +9 -3
  68. package/build/modal/aria-helper.js.map +1 -1
  69. package/build/modal/index.js +6 -2
  70. package/build/modal/index.js.map +1 -1
  71. package/build/navigation/styles/navigation-styles.js +12 -12
  72. package/build/navigation/styles/navigation-styles.js.map +1 -1
  73. package/build/panel/body.js +3 -1
  74. package/build/panel/body.js.map +1 -1
  75. package/build/popover/index.js +3 -1
  76. package/build/popover/index.js.map +1 -1
  77. package/build/popover/overlay-middlewares.js +3 -1
  78. package/build/popover/overlay-middlewares.js.map +1 -1
  79. package/build/query-controls/author-select.js +3 -1
  80. package/build/query-controls/author-select.js.map +1 -1
  81. package/build/range-control/rail.js +1 -1
  82. package/build/range-control/rail.js.map +1 -1
  83. package/build/range-control/styles/range-control-styles.js +29 -29
  84. package/build/range-control/styles/range-control-styles.js.map +1 -1
  85. package/build/resizable-box/resize-tooltip/index.js +3 -1
  86. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  87. package/build/resizable-box/resize-tooltip/label.js +3 -1
  88. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  89. package/build/resizable-box/resize-tooltip/utils.js +12 -4
  90. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  91. package/build/select-control/index.js +3 -1
  92. package/build/select-control/index.js.map +1 -1
  93. package/build/select-control/styles/select-control-styles.js +8 -6
  94. package/build/select-control/styles/select-control-styles.js.map +1 -1
  95. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +3 -3
  96. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  97. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +3 -3
  98. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  99. package/build/slot-fill/bubbles-virtually/use-slot-fills.js +2 -2
  100. package/build/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
  101. package/build/slot-fill/bubbles-virtually/use-slot.js +2 -2
  102. package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  103. package/build/slot-fill/types.js.map +1 -1
  104. package/build/text/get-line-height.js +6 -2
  105. package/build/text/get-line-height.js.map +1 -1
  106. package/build/text/utils.js +6 -2
  107. package/build/text/utils.js.map +1 -1
  108. package/build/theme/color-algorithms.js +6 -2
  109. package/build/theme/color-algorithms.js.map +1 -1
  110. package/build/toggle-group-control/toggle-group-control-option-base/component.js +3 -1
  111. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  112. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  113. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  114. package/build/tree-grid/roving-tab-index-item.js +3 -1
  115. package/build/tree-grid/roving-tab-index-item.js.map +1 -1
  116. package/build/unit-control/index.js +3 -1
  117. package/build/unit-control/index.js.map +1 -1
  118. package/build/utils/colors.js +21 -7
  119. package/build/utils/colors.js.map +1 -1
  120. package/build/utils/font-size.js +3 -1
  121. package/build/utils/font-size.js.map +1 -1
  122. package/build/utils/get-valid-children.js +3 -1
  123. package/build/utils/get-valid-children.js.map +1 -1
  124. package/build/utils/input/base.js +2 -3
  125. package/build/utils/input/base.js.map +1 -1
  126. package/build/utils/strings.js +11 -57
  127. package/build/utils/strings.js.map +1 -1
  128. package/build/utils/use-responsive-value.js +3 -1
  129. package/build/utils/use-responsive-value.js.map +1 -1
  130. package/build/view/component.js +26 -8
  131. package/build/view/component.js.map +1 -1
  132. package/build-module/alignment-matrix-control/index.js +3 -1
  133. package/build-module/alignment-matrix-control/index.js.map +1 -1
  134. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +9 -9
  135. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  136. package/build-module/alignment-matrix-control/utils.js +6 -2
  137. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  138. package/build-module/autocomplete/autocompleter-ui.js +3 -1
  139. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  140. package/build-module/autocomplete/index.js +21 -7
  141. package/build-module/autocomplete/index.js.map +1 -1
  142. package/build-module/checkbox-control/index.js +9 -2
  143. package/build-module/checkbox-control/index.js.map +1 -1
  144. package/build-module/color-picker/hex-input.js +3 -1
  145. package/build-module/color-picker/hex-input.js.map +1 -1
  146. package/build-module/color-picker/hue-picker.native.js +6 -2
  147. package/build-module/color-picker/hue-picker.native.js.map +1 -1
  148. package/build-module/color-picker/index.native.js +9 -3
  149. package/build-module/color-picker/index.native.js.map +1 -1
  150. package/build-module/color-picker/saturation-picker.native.js +6 -2
  151. package/build-module/color-picker/saturation-picker.native.js.map +1 -1
  152. package/build-module/color-picker/use-deprecated-props.js +9 -3
  153. package/build-module/color-picker/use-deprecated-props.js.map +1 -1
  154. package/build-module/context/context-connect.js +6 -2
  155. package/build-module/context/context-connect.js.map +1 -1
  156. package/build-module/custom-select-control-v2/legacy-component/index.js +3 -1
  157. package/build-module/custom-select-control-v2/legacy-component/index.js.map +1 -1
  158. package/build-module/drop-zone/index.js +72 -64
  159. package/build-module/drop-zone/index.js.map +1 -1
  160. package/build-module/dropdown/styles.js +5 -3
  161. package/build-module/dropdown/styles.js.map +1 -1
  162. package/build-module/duotone-picker/utils.js +3 -1
  163. package/build-module/duotone-picker/utils.js.map +1 -1
  164. package/build-module/elevation/hook.js +6 -7
  165. package/build-module/elevation/hook.js.map +1 -1
  166. package/build-module/focal-point-picker/controls.js +3 -1
  167. package/build-module/focal-point-picker/controls.js.map +1 -1
  168. package/build-module/focal-point-picker/index.js +21 -7
  169. package/build-module/focal-point-picker/index.js.map +1 -1
  170. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +13 -13
  171. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  172. package/build-module/focal-point-picker/tooltip/index.native.js +3 -8
  173. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  174. package/build-module/focal-point-picker/utils.js +3 -1
  175. package/build-module/focal-point-picker/utils.js.map +1 -1
  176. package/build-module/font-size-picker/index.js +3 -2
  177. package/build-module/font-size-picker/index.js.map +1 -1
  178. package/build-module/font-size-picker/types.js.map +1 -1
  179. package/build-module/input-control/input-field.js +3 -1
  180. package/build-module/input-control/input-field.js.map +1 -1
  181. package/build-module/input-control/label.js +3 -1
  182. package/build-module/input-control/label.js.map +1 -1
  183. package/build-module/input-control/styles/input-control-styles.js +31 -23
  184. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  185. package/build-module/input-control/utils.js +8 -4
  186. package/build-module/input-control/utils.js.map +1 -1
  187. package/build-module/item-group/item/hook.js +0 -4
  188. package/build-module/item-group/item/hook.js.map +1 -1
  189. package/build-module/mobile/gradient/index.native.js +3 -1
  190. package/build-module/mobile/gradient/index.native.js.map +1 -1
  191. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +9 -3
  192. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  193. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +16 -15
  194. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  195. package/build-module/mobile/keyboard-aware-flat-list/shared.native.js +27 -0
  196. package/build-module/mobile/keyboard-aware-flat-list/shared.native.js.map +1 -0
  197. package/build-module/modal/aria-helper.js +9 -3
  198. package/build-module/modal/aria-helper.js.map +1 -1
  199. package/build-module/modal/index.js +6 -2
  200. package/build-module/modal/index.js.map +1 -1
  201. package/build-module/navigation/styles/navigation-styles.js +13 -13
  202. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  203. package/build-module/panel/body.js +3 -1
  204. package/build-module/panel/body.js.map +1 -1
  205. package/build-module/popover/index.js +3 -1
  206. package/build-module/popover/index.js.map +1 -1
  207. package/build-module/popover/overlay-middlewares.js +3 -1
  208. package/build-module/popover/overlay-middlewares.js.map +1 -1
  209. package/build-module/query-controls/author-select.js +3 -1
  210. package/build-module/query-controls/author-select.js.map +1 -1
  211. package/build-module/range-control/rail.js +1 -1
  212. package/build-module/range-control/rail.js.map +1 -1
  213. package/build-module/range-control/styles/range-control-styles.js +30 -30
  214. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  215. package/build-module/resizable-box/resize-tooltip/index.js +3 -1
  216. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  217. package/build-module/resizable-box/resize-tooltip/label.js +3 -1
  218. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  219. package/build-module/resizable-box/resize-tooltip/utils.js +12 -4
  220. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  221. package/build-module/select-control/index.js +3 -1
  222. package/build-module/select-control/index.js.map +1 -1
  223. package/build-module/select-control/styles/select-control-styles.js +8 -6
  224. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  225. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +2 -1
  226. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  227. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  228. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  229. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js +1 -1
  230. package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -1
  231. package/build-module/slot-fill/bubbles-virtually/use-slot.js +1 -1
  232. package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
  233. package/build-module/slot-fill/types.js.map +1 -1
  234. package/build-module/text/get-line-height.js +6 -2
  235. package/build-module/text/get-line-height.js.map +1 -1
  236. package/build-module/text/utils.js +6 -2
  237. package/build-module/text/utils.js.map +1 -1
  238. package/build-module/theme/color-algorithms.js +6 -2
  239. package/build-module/theme/color-algorithms.js.map +1 -1
  240. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +3 -1
  241. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  242. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +10 -10
  243. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  244. package/build-module/tree-grid/roving-tab-index-item.js +3 -1
  245. package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
  246. package/build-module/unit-control/index.js +3 -1
  247. package/build-module/unit-control/index.js.map +1 -1
  248. package/build-module/utils/colors.js +21 -7
  249. package/build-module/utils/colors.js.map +1 -1
  250. package/build-module/utils/font-size.js +3 -1
  251. package/build-module/utils/font-size.js.map +1 -1
  252. package/build-module/utils/get-valid-children.js +3 -1
  253. package/build-module/utils/get-valid-children.js.map +1 -1
  254. package/build-module/utils/input/base.js +2 -3
  255. package/build-module/utils/input/base.js.map +1 -1
  256. package/build-module/utils/strings.js +12 -57
  257. package/build-module/utils/strings.js.map +1 -1
  258. package/build-module/utils/use-responsive-value.js +3 -1
  259. package/build-module/utils/use-responsive-value.js.map +1 -1
  260. package/build-module/view/component.js +26 -8
  261. package/build-module/view/component.js.map +1 -1
  262. package/build-style/style-rtl.css +39 -36
  263. package/build-style/style.css +39 -36
  264. package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
  265. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -1
  266. package/build-types/alignment-matrix-control/utils.d.ts.map +1 -1
  267. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  268. package/build-types/autocomplete/index.d.ts.map +1 -1
  269. package/build-types/border-box-control/border-box-control/hook.d.ts +4 -4
  270. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +4 -4
  271. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +4 -4
  272. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +4 -4
  273. package/build-types/border-control/border-control/hook.d.ts +4 -4
  274. package/build-types/border-control/border-control-dropdown/hook.d.ts +4 -4
  275. package/build-types/box-control/stories/index.story.d.ts +24 -24
  276. package/build-types/card/card/hook.d.ts +4 -4
  277. package/build-types/card/card-body/hook.d.ts +4 -4
  278. package/build-types/card/card-divider/hook.d.ts +4 -4
  279. package/build-types/card/card-footer/hook.d.ts +4 -4
  280. package/build-types/card/card-header/hook.d.ts +4 -4
  281. package/build-types/card/card-media/hook.d.ts +4 -4
  282. package/build-types/checkbox-control/index.d.ts.map +1 -1
  283. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  284. package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -1
  285. package/build-types/context/context-connect.d.ts.map +1 -1
  286. package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +1 -1
  287. package/build-types/drop-zone/index.d.ts.map +1 -1
  288. package/build-types/dropdown/styles.d.ts.map +1 -1
  289. package/build-types/duotone-picker/utils.d.ts.map +1 -1
  290. package/build-types/elevation/hook.d.ts +4 -4
  291. package/build-types/elevation/hook.d.ts.map +1 -1
  292. package/build-types/flex/flex/hook.d.ts +4 -4
  293. package/build-types/flex/flex-block/hook.d.ts +4 -4
  294. package/build-types/flex/flex-item/hook.d.ts +4 -4
  295. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  296. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  297. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  298. package/build-types/focal-point-picker/utils.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/font-size-picker/types.d.ts +2 -0
  302. package/build-types/font-size-picker/types.d.ts.map +1 -1
  303. package/build-types/grid/hook.d.ts +4 -4
  304. package/build-types/h-stack/hook.d.ts +4 -4
  305. package/build-types/heading/hook.d.ts +4 -4
  306. package/build-types/input-control/input-field.d.ts.map +1 -1
  307. package/build-types/input-control/label.d.ts.map +1 -1
  308. package/build-types/input-control/stories/index.story.d.ts +2 -1
  309. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  310. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  311. package/build-types/input-control/utils.d.ts.map +1 -1
  312. package/build-types/item-group/item/hook.d.ts +5 -5
  313. package/build-types/item-group/item/hook.d.ts.map +1 -1
  314. package/build-types/item-group/item-group/hook.d.ts +4 -4
  315. package/build-types/modal/aria-helper.d.ts.map +1 -1
  316. package/build-types/modal/index.d.ts.map +1 -1
  317. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  318. package/build-types/navigator/navigator-back-button/hook.d.ts +4 -4
  319. package/build-types/navigator/navigator-button/hook.d.ts +4 -4
  320. package/build-types/palette-edit/styles.d.ts +749 -10
  321. package/build-types/palette-edit/styles.d.ts.map +1 -1
  322. package/build-types/panel/body.d.ts.map +1 -1
  323. package/build-types/popover/index.d.ts.map +1 -1
  324. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  325. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  326. package/build-types/query-controls/author-select.d.ts.map +1 -1
  327. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  328. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  329. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  330. package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
  331. package/build-types/scrollable/hook.d.ts +4 -4
  332. package/build-types/select-control/index.d.ts.map +1 -1
  333. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  334. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  335. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  336. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -1
  337. package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
  338. package/build-types/slot-fill/types.d.ts +2 -2
  339. package/build-types/slot-fill/types.d.ts.map +1 -1
  340. package/build-types/spacer/hook.d.ts +4 -4
  341. package/build-types/surface/hook.d.ts +4 -4
  342. package/build-types/text/get-line-height.d.ts.map +1 -1
  343. package/build-types/text/hook.d.ts +4 -4
  344. package/build-types/text/utils.d.ts.map +1 -1
  345. package/build-types/text-control/index.d.ts +1 -1
  346. package/build-types/theme/color-algorithms.d.ts.map +1 -1
  347. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  348. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  349. package/build-types/tools-panel/tools-panel/hook.d.ts +4 -4
  350. package/build-types/tools-panel/tools-panel-header/hook.d.ts +4 -4
  351. package/build-types/tools-panel/tools-panel-item/hook.d.ts +4 -4
  352. package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
  353. package/build-types/truncate/hook.d.ts +4 -4
  354. package/build-types/unit-control/index.d.ts.map +1 -1
  355. package/build-types/utils/colors.d.ts.map +1 -1
  356. package/build-types/utils/font-size.d.ts.map +1 -1
  357. package/build-types/utils/get-valid-children.d.ts.map +1 -1
  358. package/build-types/utils/input/base.d.ts.map +1 -1
  359. package/build-types/utils/strings.d.ts.map +1 -1
  360. package/build-types/utils/use-responsive-value.d.ts.map +1 -1
  361. package/build-types/v-stack/hook.d.ts +4 -4
  362. package/build-types/view/component.d.ts +253 -7
  363. package/build-types/view/component.d.ts.map +1 -1
  364. package/package.json +19 -19
  365. package/src/alignment-matrix-control/index.tsx +3 -1
  366. package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.ts +4 -3
  367. package/src/alignment-matrix-control/utils.tsx +6 -2
  368. package/src/autocomplete/autocompleter-ui.tsx +3 -1
  369. package/src/autocomplete/index.tsx +21 -7
  370. package/src/autocomplete/style.scss +10 -4
  371. package/src/box-control/test/index.tsx +22 -0
  372. package/src/card/test/__snapshots__/index.tsx.snap +44 -47
  373. package/src/checkbox-control/index.tsx +44 -35
  374. package/src/checkbox-control/style.scss +12 -1
  375. package/src/checkbox-control/test/__snapshots__/index.tsx.snap +27 -26
  376. package/src/checkbox-control/test/index.tsx +5 -0
  377. package/src/color-picker/hex-input.tsx +3 -1
  378. package/src/color-picker/hue-picker.native.js +6 -2
  379. package/src/color-picker/index.native.js +9 -3
  380. package/src/color-picker/saturation-picker.native.js +6 -2
  381. package/src/color-picker/use-deprecated-props.ts +9 -3
  382. package/src/context/context-connect.ts +6 -2
  383. package/src/custom-select-control-v2/README.md +0 -4
  384. package/src/custom-select-control-v2/legacy-component/index.tsx +3 -1
  385. package/src/custom-select-control-v2/stories/default.story.tsx +1 -1
  386. package/src/custom-select-control-v2/stories/legacy.story.tsx +1 -1
  387. package/src/drop-zone/index.tsx +66 -66
  388. package/src/dropdown/styles.ts +3 -1
  389. package/src/duotone-picker/utils.ts +3 -1
  390. package/src/elevation/hook.ts +6 -3
  391. package/src/elevation/test/__snapshots__/index.tsx.snap +18 -24
  392. package/src/flex/test/__snapshots__/index.tsx.snap +4 -4
  393. package/src/focal-point-picker/controls.tsx +3 -1
  394. package/src/focal-point-picker/index.tsx +20 -7
  395. package/src/focal-point-picker/styles/focal-point-picker-style.ts +4 -3
  396. package/src/focal-point-picker/tooltip/index.native.js +1 -7
  397. package/src/focal-point-picker/utils.ts +3 -1
  398. package/src/font-size-picker/README.md +1 -0
  399. package/src/font-size-picker/index.tsx +4 -2
  400. package/src/font-size-picker/stories/index.story.tsx +0 -1
  401. package/src/font-size-picker/types.ts +2 -0
  402. package/src/higher-order/navigate-regions/style.scss +3 -3
  403. package/src/input-control/input-field.tsx +3 -1
  404. package/src/input-control/label.tsx +3 -1
  405. package/src/input-control/stories/index.story.tsx +31 -1
  406. package/src/input-control/styles/input-control-styles.tsx +12 -4
  407. package/src/input-control/test/index.js +8 -4
  408. package/src/input-control/utils.ts +3 -2
  409. package/src/item-group/item/hook.ts +1 -10
  410. package/src/item-group/test/__snapshots__/index.js.snap +16 -16
  411. package/src/mobile/gradient/index.native.js +3 -1
  412. package/src/mobile/keyboard-aware-flat-list/index.android.js +11 -2
  413. package/src/mobile/keyboard-aware-flat-list/index.ios.js +30 -19
  414. package/src/mobile/keyboard-aware-flat-list/shared.native.js +26 -0
  415. package/src/mobile/keyboard-aware-flat-list/styles.native.scss +8 -0
  416. package/src/modal/aria-helper.ts +8 -3
  417. package/src/modal/index.tsx +6 -2
  418. package/src/modal/test/index.tsx +11 -4
  419. package/src/navigation/styles/navigation-styles.tsx +4 -3
  420. package/src/panel/body.tsx +3 -1
  421. package/src/panel/style.scss +1 -0
  422. package/src/placeholder/style.scss +12 -34
  423. package/src/popover/index.tsx +2 -1
  424. package/src/popover/overlay-middlewares.tsx +3 -1
  425. package/src/popover/stories/index.story.tsx +0 -2
  426. package/src/query-controls/author-select.tsx +3 -1
  427. package/src/range-control/rail.tsx +1 -1
  428. package/src/range-control/styles/range-control-styles.ts +5 -3
  429. package/src/resizable-box/resize-tooltip/index.tsx +3 -1
  430. package/src/resizable-box/resize-tooltip/label.tsx +3 -1
  431. package/src/resizable-box/resize-tooltip/utils.ts +12 -4
  432. package/src/select-control/index.tsx +3 -1
  433. package/src/select-control/styles/select-control-styles.ts +3 -1
  434. package/src/slot-fill/bubbles-virtually/slot-fill-context.ts +2 -1
  435. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +1 -1
  436. package/src/slot-fill/bubbles-virtually/use-slot-fills.ts +1 -1
  437. package/src/slot-fill/bubbles-virtually/use-slot.ts +1 -1
  438. package/src/slot-fill/types.ts +2 -2
  439. package/src/surface/test/__snapshots__/index.tsx.snap +10 -10
  440. package/src/text/get-line-height.ts +6 -2
  441. package/src/text/utils.ts +6 -2
  442. package/src/theme/color-algorithms.ts +6 -2
  443. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +18 -24
  444. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +3 -1
  445. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +7 -6
  446. package/src/toolbar/toolbar/style.scss +2 -2
  447. package/src/tree-grid/roving-tab-index-item.tsx +3 -1
  448. package/src/unit-control/index.tsx +5 -1
  449. package/src/utils/colors.js +21 -7
  450. package/src/utils/font-size.ts +3 -1
  451. package/src/utils/get-valid-children.ts +3 -1
  452. package/src/utils/input/base.js +4 -3
  453. package/src/utils/strings.ts +11 -59
  454. package/src/utils/test/strings.js +62 -0
  455. package/src/utils/use-responsive-value.ts +2 -1
  456. package/src/view/component.tsx +18 -11
  457. package/tsconfig.json +1 -2
  458. package/tsconfig.tsbuildinfo +1 -1
  459. package/build/slot-fill/bubbles-virtually/observable-map.js +0 -68
  460. package/build/slot-fill/bubbles-virtually/observable-map.js.map +0 -1
  461. package/build/view/types.js +0 -6
  462. package/build/view/types.js.map +0 -1
  463. package/build-module/slot-fill/bubbles-virtually/observable-map.js +0 -60
  464. package/build-module/slot-fill/bubbles-virtually/observable-map.js.map +0 -1
  465. package/build-module/view/types.js +0 -2
  466. package/build-module/view/types.js.map +0 -1
  467. package/build-types/slot-fill/bubbles-virtually/observable-map.d.ts +0 -19
  468. package/build-types/slot-fill/bubbles-virtually/observable-map.d.ts.map +0 -1
  469. package/build-types/view/types.d.ts +0 -8
  470. package/build-types/view/types.d.ts.map +0 -1
  471. package/src/slot-fill/bubbles-virtually/observable-map.ts +0 -79
  472. package/src/slot-fill/test/observable-map.js +0 -83
  473. package/src/utils/hooks/stories/use-cx.js +0 -157
  474. package/src/view/types.ts +0 -6
@@ -84,8 +84,8 @@
84
84
  // This needs specificity.
85
85
  &.has-icon.has-icon {
86
86
  // Reduce the default padding when a button only has an icon.
87
- padding-left: $grid-unit-15;
88
- padding-right: $grid-unit-15;
87
+ padding-left: $grid-unit-10;
88
+ padding-right: $grid-unit-10;
89
89
  min-width: $block-toolbar-height;
90
90
  }
91
91
 
@@ -41,7 +41,9 @@ export const RovingTabIndexItem = forwardRef(
41
41
  return children( allProps );
42
42
  }
43
43
 
44
- if ( ! Component ) return null;
44
+ if ( ! Component ) {
45
+ return null;
46
+ }
45
47
 
46
48
  return <Component { ...allProps }>{ children }</Component>;
47
49
  }
@@ -170,8 +170,12 @@ function UnforwardedUnitControl(
170
170
  // Unless the meta key was pressed (to avoid interfering with
171
171
  // shortcuts, e.g. pastes), moves focus to the unit select if a key
172
172
  // matches the first character of a unit.
173
- if ( ! event.metaKey && reFirstCharacterOfUnits.test( event.key ) )
173
+ if (
174
+ ! event.metaKey &&
175
+ reFirstCharacterOfUnits.test( event.key )
176
+ ) {
174
177
  refInputSuffix.current?.focus();
178
+ }
175
179
  };
176
180
  }
177
181
 
@@ -29,7 +29,9 @@ export function rgba( hexValue = '', alpha = 1 ) {
29
29
  * @return {HTMLDivElement | undefined} The HTML element for color computation.
30
30
  */
31
31
  function getColorComputationNode() {
32
- if ( typeof document === 'undefined' ) return;
32
+ if ( typeof document === 'undefined' ) {
33
+ return;
34
+ }
33
35
 
34
36
  if ( ! colorComputationNode ) {
35
37
  // Create a temporary element for style computation.
@@ -49,7 +51,9 @@ function getColorComputationNode() {
49
51
  * @return {boolean} Whether the value is a valid color.
50
52
  */
51
53
  function isColor( value ) {
52
- if ( typeof value !== 'string' ) return false;
54
+ if ( typeof value !== 'string' ) {
55
+ return false;
56
+ }
53
57
  const test = colord( value );
54
58
 
55
59
  return test.isValid();
@@ -64,16 +68,26 @@ function isColor( value ) {
64
68
  * @return {string} The computed background color.
65
69
  */
66
70
  function _getComputedBackgroundColor( backgroundColor ) {
67
- if ( typeof backgroundColor !== 'string' ) return '';
71
+ if ( typeof backgroundColor !== 'string' ) {
72
+ return '';
73
+ }
68
74
 
69
- if ( isColor( backgroundColor ) ) return backgroundColor;
75
+ if ( isColor( backgroundColor ) ) {
76
+ return backgroundColor;
77
+ }
70
78
 
71
- if ( ! backgroundColor.includes( 'var(' ) ) return '';
72
- if ( typeof document === 'undefined' ) return '';
79
+ if ( ! backgroundColor.includes( 'var(' ) ) {
80
+ return '';
81
+ }
82
+ if ( typeof document === 'undefined' ) {
83
+ return '';
84
+ }
73
85
 
74
86
  // Attempts to gracefully handle CSS variables color values.
75
87
  const el = getColorComputationNode();
76
- if ( ! el ) return '';
88
+ if ( ! el ) {
89
+ return '';
90
+ }
77
91
 
78
92
  el.style.background = backgroundColor;
79
93
  // Grab the style.
@@ -51,7 +51,9 @@ export function getFontSize(
51
51
 
52
52
  if ( typeof size !== 'number' ) {
53
53
  const parsed = parseFloat( size );
54
- if ( Number.isNaN( parsed ) ) return size;
54
+ if ( Number.isNaN( parsed ) ) {
55
+ return size;
56
+ }
55
57
  size = parsed;
56
58
  }
57
59
 
@@ -18,7 +18,9 @@ import { Children, isValidElement } from '@wordpress/element';
18
18
  export function getValidChildren(
19
19
  children: ReactNode
20
20
  ): Array< ReactChild | ReactFragment | ReactPortal > {
21
- if ( typeof children === 'string' ) return [ children ];
21
+ if ( typeof children === 'string' ) {
22
+ return [ children ];
23
+ }
22
24
 
23
25
  return Children.toArray( children ).filter( ( child ) =>
24
26
  isValidElement( child )
@@ -6,16 +6,17 @@ import { css } from '@emotion/react';
6
6
  /**
7
7
  * Internal dependencies
8
8
  */
9
- import { reduceMotion } from '../reduce-motion';
10
9
  import { COLORS } from '../colors-values';
11
10
  import { CONFIG } from '../';
12
11
 
13
12
  export const inputStyleNeutral = css`
14
13
  box-shadow: 0 0 0 transparent;
15
- transition: box-shadow 0.1s linear;
16
14
  border-radius: ${ CONFIG.radiusBlockUi };
17
15
  border: ${ CONFIG.borderWidth } solid ${ COLORS.ui.border };
18
- ${ reduceMotion( 'transition' ) }
16
+
17
+ @media not ( prefers-reduced-motion ) {
18
+ transition: box-shadow 0.1s linear;
19
+ }
19
20
  `;
20
21
 
21
22
  export const inputStyleFocus = css`
@@ -4,66 +4,18 @@
4
4
  import removeAccents from 'remove-accents';
5
5
  import { paramCase } from 'change-case';
6
6
 
7
+ /**
8
+ * All unicode characters that we consider "dash-like":
9
+ * - `\u007e`: ~ (tilde)
10
+ * - `\u00ad`: ­ (soft hyphen)
11
+ * - `\u2053`: ⁓ (swung dash)
12
+ * - `\u207b`: ⁻ (superscript minus)
13
+ * - `\u208b`: ₋ (subscript minus)
14
+ * - `\u2212`: − (minus sign)
15
+ * - `\\p{Pd}`: any other Unicode dash character
16
+ */
7
17
  const ALL_UNICODE_DASH_CHARACTERS = new RegExp(
8
- `[${ [
9
- // - (hyphen-minus)
10
- '\u002d',
11
- // ~ (tilde)
12
- '\u007e',
13
- // ­ (soft hyphen)
14
- '\u00ad',
15
- // ֊ (armenian hyphen)
16
- '\u058a',
17
- // ־ (hebrew punctuation maqaf)
18
- '\u05be',
19
- // ᐀ (canadian syllabics hyphen)
20
- '\u1400',
21
- // ᠆ (mongolian todo soft hyphen)
22
- '\u1806',
23
- // ‐ (hyphen)
24
- '\u2010',
25
- // non-breaking hyphen)
26
- '\u2011',
27
- // ‒ (figure dash)
28
- '\u2012',
29
- // – (en dash)
30
- '\u2013',
31
- // — (em dash)
32
- '\u2014',
33
- // ― (horizontal bar)
34
- '\u2015',
35
- // ⁓ (swung dash)
36
- '\u2053',
37
- // superscript minus)
38
- '\u207b',
39
- // subscript minus)
40
- '\u208b',
41
- // − (minus sign)
42
- '\u2212',
43
- // ⸗ (double oblique hyphen)
44
- '\u2e17',
45
- // ⸺ (two-em dash)
46
- '\u2e3a',
47
- // ⸻ (three-em dash)
48
- '\u2e3b',
49
- // 〜 (wave dash)
50
- '\u301c',
51
- // 〰 (wavy dash)
52
- '\u3030',
53
- // ゠ (katakana-hiragana double hyphen)
54
- '\u30a0',
55
- // ︱ (presentation form for vertical em dash)
56
- '\ufe31',
57
- // ︲ (presentation form for vertical en dash)
58
- '\ufe32',
59
- // ﹘ (small em dash)
60
- '\ufe58',
61
- // ﹣ (small hyphen-minus)
62
- '\ufe63',
63
- // - (fullwidth hyphen-minus)
64
- '\uff0d',
65
- ].join( '' ) }]`,
66
- 'g'
18
+ /[\u007e\u00ad\u2053\u207b\u208b\u2212\p{Pd}]/gu
67
19
  );
68
20
 
69
21
  export const normalizeTextString = ( value: string ): string => {
@@ -106,5 +106,67 @@ describe( 'normalizeTextString', () => {
106
106
  expect( normalizeTextString( 'foo⸻bar' ) ).toBe( 'foo-bar' );
107
107
  expect( normalizeTextString( 'foo゠bar' ) ).toBe( 'foo-bar' );
108
108
  expect( normalizeTextString( 'foo-bar' ) ).toBe( 'foo-bar' );
109
+
110
+ const dashCharacters = [
111
+ // - (hyphen-minus)
112
+ '\u002d',
113
+ // ~ (tilde)
114
+ '\u007e',
115
+ // ­ (soft hyphen)
116
+ '\u00ad',
117
+ // ֊ (armenian hyphen)
118
+ '\u058a',
119
+ // ־ (hebrew punctuation maqaf)
120
+ '\u05be',
121
+ // ᐀ (canadian syllabics hyphen)
122
+ '\u1400',
123
+ // ᠆ (mongolian todo soft hyphen)
124
+ '\u1806',
125
+ // ‐ (hyphen)
126
+ '\u2010',
127
+ // non-breaking hyphen)
128
+ '\u2011',
129
+ // ‒ (figure dash)
130
+ '\u2012',
131
+ // – (en dash)
132
+ '\u2013',
133
+ // — (em dash)
134
+ '\u2014',
135
+ // ― (horizontal bar)
136
+ '\u2015',
137
+ // ⁓ (swung dash)
138
+ '\u2053',
139
+ // ⁻ (superscript minus)
140
+ '\u207b',
141
+ // ₋ (subscript minus)
142
+ '\u208b',
143
+ // − (minus sign)
144
+ '\u2212',
145
+ // ⸗ (double oblique hyphen)
146
+ '\u2e17',
147
+ // ⸺ (two-em dash)
148
+ '\u2e3a',
149
+ // ⸻ (three-em dash)
150
+ '\u2e3b',
151
+ // 〜 (wave dash)
152
+ '\u301c',
153
+ // 〰 (wavy dash)
154
+ '\u3030',
155
+ // ゠ (katakana-hiragana double hyphen)
156
+ '\u30a0',
157
+ // ︱ (presentation form for vertical em dash)
158
+ '\ufe31',
159
+ // ︲ (presentation form for vertical en dash)
160
+ '\ufe32',
161
+ // ﹘ (small em dash)
162
+ '\ufe58',
163
+ // ﹣ (small hyphen-minus)
164
+ '\ufe63',
165
+ // - (fullwidth hyphen-minus)
166
+ '\uff0d',
167
+ ];
168
+ expect( normalizeTextString( dashCharacters.join( '' ) ) ).toBe(
169
+ '-'.repeat( dashCharacters.length )
170
+ );
109
171
  } );
110
172
  } );
@@ -60,8 +60,9 @@ export function useResponsiveValue< T >(
60
60
  const index = useBreakpointIndex( options );
61
61
 
62
62
  // Allow calling the function with a "normal" value without having to check on the outside.
63
- if ( ! Array.isArray( values ) && typeof values !== 'function' )
63
+ if ( ! Array.isArray( values ) && typeof values !== 'function' ) {
64
64
  return values;
65
+ }
65
66
 
66
67
  const array = values || [];
67
68
 
@@ -2,13 +2,25 @@
2
2
  * External dependencies
3
3
  */
4
4
  import styled from '@emotion/styled';
5
- import type { RefAttributes } from 'react';
5
+
6
+ /**
7
+ * WordPress dependencies
8
+ */
9
+ import { forwardRef } from '@wordpress/element';
6
10
 
7
11
  /**
8
12
  * Internal dependencies
9
13
  */
10
- import type { WordPressComponent } from '../context/wordpress-component';
11
- import type { ViewProps } from './types';
14
+ import type { WordPressComponentProps } from '../context';
15
+
16
+ const PolymorphicDiv = styled.div``;
17
+
18
+ function UnforwardedView< T extends React.ElementType = 'div' >(
19
+ { as, ...restProps }: WordPressComponentProps< {}, T >,
20
+ ref: React.ForwardedRef< any >
21
+ ) {
22
+ return <PolymorphicDiv as={ as } ref={ ref } { ...restProps } />;
23
+ }
12
24
 
13
25
  /**
14
26
  * `View` is a core component that renders everything in the library.
@@ -26,13 +38,8 @@ import type { ViewProps } from './types';
26
38
  * }
27
39
  * ```
28
40
  */
29
- export const View: WordPressComponent<
30
- 'div',
31
- ViewProps & RefAttributes< any >,
32
- true
33
- > = styled.div``;
34
-
35
- View.selector = '.components-view';
36
- View.displayName = 'View';
41
+ export const View = Object.assign( forwardRef( UnforwardedView ), {
42
+ selector: '.components-view',
43
+ } );
37
44
 
38
45
  export default View;
package/tsconfig.json CHANGED
@@ -12,8 +12,7 @@
12
12
  ],
13
13
  // TODO: Remove `skipLibCheck` after resolving duplicate declaration of the `process` variable
14
14
  // between `@types/webpack-env` (from @storybook packages) and `gutenberg-env`.
15
- "skipLibCheck": true,
16
- "strictNullChecks": true
15
+ "skipLibCheck": true
17
16
  },
18
17
  "references": [
19
18
  { "path": "../a11y" },