@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
@@ -5,32 +5,33 @@ Snapshot Diff:
5
5
  - First value
6
6
  + Second value
7
7
 
8
- @@ -8,13 +8,27 @@
9
- <span
10
- class="components-checkbox-control__input-container"
11
- >
12
- <input
13
- class="components-checkbox-control__input"
14
- - id="inspector-checkbox-control-6"
15
- + id="inspector-checkbox-control-7"
16
- type="checkbox"
17
- value="1"
18
- + />
19
- + <svg
20
- + aria-hidden="true"
21
- + class="components-checkbox-control__indeterminate"
22
- + focusable="false"
23
- + height="24"
24
- + role="presentation"
25
- + viewBox="0 0 24 24"
26
- + width="24"
27
- + xmlns="http://www.w3.org/2000/svg"
28
- + >
29
- + <path
30
- + d="M7 11.5h10V13H7z"
31
- />
32
- + </svg>
33
- </span>
8
+ @@ -13,14 +13,28 @@
9
+ <span
10
+ class="components-checkbox-control__input-container"
11
+ >
12
+ <input
13
+ class="components-checkbox-control__input"
14
+ - id="inspector-checkbox-control-6"
15
+ + id="inspector-checkbox-control-7"
16
+ type="checkbox"
17
+ value="1"
18
+ + />
19
+ + <svg
20
+ + aria-hidden="true"
21
+ + class="components-checkbox-control__indeterminate"
22
+ + focusable="false"
23
+ + height="24"
24
+ + role="presentation"
25
+ + viewBox="0 0 24 24"
26
+ + width="24"
27
+ + xmlns="http://www.w3.org/2000/svg"
28
+ + >
29
+ + <path
30
+ + d="M7 11.5h10V13H7z"
31
+ />
32
+ + </svg>
33
+ </span>
34
+ </div>
34
35
  </div>
35
36
  </div>
36
37
  </div>
@@ -86,6 +86,11 @@ describe( 'CheckboxControl', () => {
86
86
  containerIndeterminate
87
87
  );
88
88
  } );
89
+
90
+ it( 'should associate the `help` text accessibly', () => {
91
+ render( <CheckboxControl help="Help text" /> );
92
+ expect( getInput() ).toHaveAccessibleDescription( 'Help text' );
93
+ } );
89
94
  } );
90
95
 
91
96
  describe( 'Value', () => {
@@ -21,7 +21,9 @@ import type { HexInputProps } from './types';
21
21
 
22
22
  export const HexInput = ( { color, onChange, enableAlpha }: HexInputProps ) => {
23
23
  const handleChange = ( nextValue: string | undefined ) => {
24
- if ( ! nextValue ) return;
24
+ if ( ! nextValue ) {
25
+ return;
26
+ }
25
27
  const hexValue = nextValue.startsWith( '#' )
26
28
  ? nextValue
27
29
  : '#' + nextValue;
@@ -72,8 +72,12 @@ export default class HuePicker extends Component {
72
72
  }
73
73
 
74
74
  normalizeValue( value ) {
75
- if ( value < 0 ) return 0;
76
- if ( value > 1 ) return 1;
75
+ if ( value < 0 ) {
76
+ return 0;
77
+ }
78
+ if ( value > 1 ) {
79
+ return 1;
80
+ }
77
81
  return value;
78
82
  }
79
83
 
@@ -82,9 +82,15 @@ function ColorPicker( {
82
82
  const currentColor = combineToHex();
83
83
 
84
84
  const updateColor = ( { hue: h, saturation: s, value: v } ) => {
85
- if ( h !== undefined ) setHue( h );
86
- if ( s !== undefined ) setSaturation( s );
87
- if ( v !== undefined ) setValue( v );
85
+ if ( h !== undefined ) {
86
+ setHue( h );
87
+ }
88
+ if ( s !== undefined ) {
89
+ setSaturation( s );
90
+ }
91
+ if ( v !== undefined ) {
92
+ setValue( v );
93
+ }
88
94
  setColor( combineToHex( h, s, v ) );
89
95
  };
90
96
 
@@ -56,8 +56,12 @@ export default class SaturationValuePicker extends Component {
56
56
  }
57
57
 
58
58
  normalizeValue( value ) {
59
- if ( value < 0 ) return 0;
60
- if ( value > 1 ) return 1;
59
+ if ( value < 0 ) {
60
+ return 0;
61
+ }
62
+ if ( value > 1 ) {
63
+ return 1;
64
+ }
61
65
  return value;
62
66
  }
63
67
 
@@ -25,11 +25,17 @@ function isLegacyProps( props: any ): props is LegacyProps {
25
25
  function getColorFromLegacyProps(
26
26
  color: LegacyProps[ 'color' ]
27
27
  ): string | undefined {
28
- if ( color === undefined ) return;
28
+ if ( color === undefined ) {
29
+ return;
30
+ }
29
31
 
30
- if ( typeof color === 'string' ) return color;
32
+ if ( typeof color === 'string' ) {
33
+ return color;
34
+ }
31
35
 
32
- if ( color.hex ) return color.hex;
36
+ if ( color.hex ) {
37
+ return color.hex;
38
+ }
33
39
 
34
40
  return undefined;
35
41
  }
@@ -116,7 +116,9 @@ function _contextConnect<
116
116
  export function getConnectNamespace(
117
117
  Component: ReactChild | undefined | {}
118
118
  ): string[] {
119
- if ( ! Component ) return [];
119
+ if ( ! Component ) {
120
+ return [];
121
+ }
120
122
 
121
123
  let namespaces = [];
122
124
 
@@ -145,7 +147,9 @@ export function hasConnectNamespace(
145
147
  Component: ReactNode,
146
148
  match: string[] | string
147
149
  ): boolean {
148
- if ( ! Component ) return false;
150
+ if ( ! Component ) {
151
+ return false;
152
+ }
149
153
 
150
154
  if ( typeof match === 'string' ) {
151
155
  return getConnectNamespace( Component ).includes( match );
@@ -1,9 +1,5 @@
1
1
  # CustomSelectControlV2
2
2
 
3
- <div class="callout callout-alert">
4
- This feature is still experimental. “Experimental” means this is an early implementation subject to drastic and breaking changes.
5
- </div>
6
-
7
3
  Used to render a customizable select control component.
8
4
 
9
5
  ## Development guidelines
@@ -30,7 +30,9 @@ function CustomSelectControl( props: LegacyCustomSelectProps ) {
30
30
  // Forward props + store from v2 implementation
31
31
  const store = Ariakit.useSelectStore( {
32
32
  async setValue( nextValue ) {
33
- if ( ! onChange ) return;
33
+ if ( ! onChange ) {
34
+ return;
35
+ }
34
36
 
35
37
  // Executes the logic in a microtask after the popup is closed.
36
38
  // This is simply to ensure the isOpen state matches that in Downshift.
@@ -14,7 +14,7 @@ import { useState } from '@wordpress/element';
14
14
  import CustomSelectControlV2 from '..';
15
15
 
16
16
  const meta: Meta< typeof CustomSelectControlV2 > = {
17
- title: 'Components (Experimental)/CustomSelectControl v2/Default',
17
+ title: 'Components/CustomSelectControl v2/Default',
18
18
  component: CustomSelectControlV2,
19
19
  subcomponents: {
20
20
  // @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
@@ -15,7 +15,7 @@ import CustomSelectControl from '../legacy-component';
15
15
  import * as V1Story from '../../custom-select-control/stories/index.story';
16
16
 
17
17
  const meta: Meta< typeof CustomSelectControl > = {
18
- title: 'Components (Experimental)/CustomSelectControl v2/Legacy',
18
+ title: 'Components/CustomSelectControl v2/Legacy',
19
19
  component: CustomSelectControl,
20
20
  argTypes: {
21
21
  onChange: { control: { type: null } },
@@ -25,6 +25,71 @@ import {
25
25
  import type { DropType, DropZoneProps } from './types';
26
26
  import type { WordPressComponentProps } from '../context';
27
27
 
28
+ const backdrop = {
29
+ hidden: { opacity: 0 },
30
+ show: {
31
+ opacity: 1,
32
+ transition: {
33
+ type: 'tween',
34
+ duration: 0.2,
35
+ delay: 0,
36
+ delayChildren: 0.1,
37
+ },
38
+ },
39
+ exit: {
40
+ opacity: 0,
41
+ transition: {
42
+ duration: 0.2,
43
+ delayChildren: 0,
44
+ },
45
+ },
46
+ };
47
+
48
+ const foreground = {
49
+ hidden: { opacity: 0, scale: 0.9 },
50
+ show: {
51
+ opacity: 1,
52
+ scale: 1,
53
+ transition: {
54
+ duration: 0.1,
55
+ },
56
+ },
57
+ exit: { opacity: 0, scale: 0.9 },
58
+ };
59
+
60
+ function DropIndicator( { label }: { label?: string } ) {
61
+ const disableMotion = useReducedMotion();
62
+ const children = (
63
+ <motion.div
64
+ variants={ backdrop }
65
+ initial={ disableMotion ? 'show' : 'hidden' }
66
+ animate="show"
67
+ exit={ disableMotion ? 'show' : 'exit' }
68
+ className="components-drop-zone__content"
69
+ // Without this, when this div is shown,
70
+ // Safari calls a onDropZoneLeave causing a loop because of this bug
71
+ // https://bugs.webkit.org/show_bug.cgi?id=66547
72
+ style={ { pointerEvents: 'none' } }
73
+ >
74
+ <motion.div variants={ foreground }>
75
+ <Icon
76
+ icon={ upload }
77
+ className="components-drop-zone__content-icon"
78
+ />
79
+ <span className="components-drop-zone__content-text">
80
+ { label ? label : __( 'Drop files to upload' ) }
81
+ </span>
82
+ </motion.div>
83
+ </motion.div>
84
+ );
85
+
86
+ if ( disableMotion ) {
87
+ return children;
88
+ }
89
+
90
+ return <AnimatePresence>{ children }</AnimatePresence>;
91
+ }
92
+
28
93
  /**
29
94
  * `DropZone` is a component creating a drop zone area taking the full size of its parent element. It supports dropping files, HTML content or any other HTML drop event.
30
95
  *
@@ -116,67 +181,6 @@ export function DropZoneComponent( {
116
181
  setIsDraggingOverElement( false );
117
182
  },
118
183
  } );
119
- const disableMotion = useReducedMotion();
120
-
121
- let children;
122
- const backdrop = {
123
- hidden: { opacity: 0 },
124
- show: {
125
- opacity: 1,
126
- transition: {
127
- type: 'tween',
128
- duration: 0.2,
129
- delay: 0,
130
- delayChildren: 0.1,
131
- },
132
- },
133
- exit: {
134
- opacity: 0,
135
- transition: {
136
- duration: 0.2,
137
- delayChildren: 0,
138
- },
139
- },
140
- };
141
-
142
- const foreground = {
143
- hidden: { opacity: 0, scale: 0.9 },
144
- show: {
145
- opacity: 1,
146
- scale: 1,
147
- transition: {
148
- duration: 0.1,
149
- },
150
- },
151
- exit: { opacity: 0, scale: 0.9 },
152
- };
153
-
154
- if ( isDraggingOverElement ) {
155
- children = (
156
- <motion.div
157
- variants={ backdrop }
158
- initial={ disableMotion ? 'show' : 'hidden' }
159
- animate="show"
160
- exit={ disableMotion ? 'show' : 'exit' }
161
- className="components-drop-zone__content"
162
- // Without this, when this div is shown,
163
- // Safari calls a onDropZoneLeave causing a loop because of this bug
164
- // https://bugs.webkit.org/show_bug.cgi?id=66547
165
- style={ { pointerEvents: 'none' } }
166
- >
167
- <motion.div variants={ foreground }>
168
- <Icon
169
- icon={ upload }
170
- className="components-drop-zone__content-icon"
171
- />
172
- <span className="components-drop-zone__content-text">
173
- { label ? label : __( 'Drop files to upload' ) }
174
- </span>
175
- </motion.div>
176
- </motion.div>
177
- );
178
- }
179
-
180
184
  const classes = classnames( 'components-drop-zone', className, {
181
185
  'is-active':
182
186
  ( isDraggingOverDocument || isDraggingOverElement ) &&
@@ -190,11 +194,7 @@ export function DropZoneComponent( {
190
194
 
191
195
  return (
192
196
  <div { ...restProps } ref={ ref } className={ classes }>
193
- { disableMotion ? (
194
- children
195
- ) : (
196
- <AnimatePresence>{ children }</AnimatePresence>
197
- ) }
197
+ { isDraggingOverElement && <DropIndicator label={ label } /> }
198
198
  </div>
199
199
  );
200
200
  }
@@ -11,7 +11,9 @@ import { space } from '../utils/space';
11
11
  import type { DropdownContentWrapperProps } from './types';
12
12
 
13
13
  const padding = ( { paddingSize = 'small' }: DropdownContentWrapperProps ) => {
14
- if ( paddingSize === 'none' ) return;
14
+ if ( paddingSize === 'none' ) {
15
+ return;
16
+ }
15
17
 
16
18
  const paddingValues = {
17
19
  small: space( 2 ),
@@ -31,7 +31,9 @@ export function getDefaultColors(
31
31
  palette: DuotonePickerProps[ 'colorPalette' ]
32
32
  ) {
33
33
  // A default dark and light color are required.
34
- if ( ! palette || palette.length < 2 ) return [ '#000', '#fff' ];
34
+ if ( ! palette || palette.length < 2 ) {
35
+ return [ '#000', '#fff' ];
36
+ }
35
37
 
36
38
  return palette
37
39
  .map( ( { color } ) => ( {
@@ -15,7 +15,7 @@ import { useMemo } from '@wordpress/element';
15
15
  import type { WordPressComponentProps } from '../context';
16
16
  import { useContextSystem } from '../context';
17
17
  import * as styles from './styles';
18
- import { CONFIG, reduceMotion } from '../utils';
18
+ import { CONFIG } from '../utils';
19
19
  import { useCx } from '../utils/hooks/use-cx';
20
20
  import { isValueDefined } from '../utils/values';
21
21
  import type { ElevationProps } from './types';
@@ -76,9 +76,12 @@ export function useElevation(
76
76
  left: offset,
77
77
  right: offset,
78
78
  top: offset,
79
- transition,
80
79
  },
81
- reduceMotion( 'transition' )
80
+ css`
81
+ @media not ( prefers-reduced-motion ) {
82
+ transition: ${ transition };
83
+ }
84
+ `
82
85
  );
83
86
 
84
87
  if ( isValueDefined( hoverValue ) ) {
@@ -15,13 +15,12 @@ exports[`props should render active 1`] = `
15
15
  left: 0;
16
16
  right: 0;
17
17
  top: 0;
18
- -webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
19
- transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
20
18
  }
21
19
 
22
- @media ( prefers-reduced-motion: reduce ) {
20
+ @media not ( prefers-reduced-motion ) {
23
21
  .emotion-0 {
24
- transition-duration: 0ms;
22
+ -webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
23
+ transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
25
24
  }
26
25
  }
27
26
 
@@ -57,13 +56,12 @@ exports[`props should render correctly 1`] = `
57
56
  left: 0;
58
57
  right: 0;
59
58
  top: 0;
60
- -webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
61
- transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
62
59
  }
63
60
 
64
- @media ( prefers-reduced-motion: reduce ) {
61
+ @media not ( prefers-reduced-motion ) {
65
62
  .emotion-0 {
66
- transition-duration: 0ms;
63
+ -webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
64
+ transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
67
65
  }
68
66
  }
69
67
 
@@ -91,13 +89,12 @@ exports[`props should render hover 1`] = `
91
89
  left: 0;
92
90
  right: 0;
93
91
  top: 0;
94
- -webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
95
- transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
96
92
  }
97
93
 
98
- @media ( prefers-reduced-motion: reduce ) {
94
+ @media not ( prefers-reduced-motion ) {
99
95
  .emotion-0 {
100
- transition-duration: 0ms;
96
+ -webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
97
+ transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
101
98
  }
102
99
  }
103
100
 
@@ -129,13 +126,12 @@ exports[`props should render isInteractive 1`] = `
129
126
  left: 0;
130
127
  right: 0;
131
128
  top: 0;
132
- -webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
133
- transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
134
129
  }
135
130
 
136
- @media ( prefers-reduced-motion: reduce ) {
131
+ @media not ( prefers-reduced-motion ) {
137
132
  .emotion-0 {
138
- transition-duration: 0ms;
133
+ -webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
134
+ transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
139
135
  }
140
136
  }
141
137
 
@@ -171,13 +167,12 @@ exports[`props should render offset 1`] = `
171
167
  left: -2px;
172
168
  right: -2px;
173
169
  top: -2px;
174
- -webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
175
- transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
176
170
  }
177
171
 
178
- @media ( prefers-reduced-motion: reduce ) {
172
+ @media not ( prefers-reduced-motion ) {
179
173
  .emotion-0 {
180
- transition-duration: 0ms;
174
+ -webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
175
+ transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
181
176
  }
182
177
  }
183
178
 
@@ -213,13 +208,12 @@ exports[`props should render value 1`] = `
213
208
  left: 0;
214
209
  right: 0;
215
210
  top: 0;
216
- -webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
217
- transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
218
211
  }
219
212
 
220
- @media ( prefers-reduced-motion: reduce ) {
213
+ @media not ( prefers-reduced-motion ) {
221
214
  .emotion-0 {
222
- transition-duration: 0ms;
215
+ -webkit-transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
216
+ transition: box-shadow 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
223
217
  }
224
218
  }
225
219
 
@@ -7,25 +7,25 @@ Snapshot Diff:
7
7
 
8
8
  @@ -1,22 +1,18 @@
9
9
  <div
10
- class="components-flex css-j6raph-View-Flex-base-ItemsRow e19lxcc00"
10
+ class="components-flex css-1hwd9hm-PolymorphicDiv-Flex-base-ItemsRow e19lxcc00"
11
11
  - data-testid="flex"
12
12
  + data-testid="base-flex"
13
13
  data-wp-c16t="true"
14
14
  data-wp-component="Flex"
15
15
  >
16
16
  <div
17
- class="components-flex-item css-mw3lhz-View-Item-sx-Base e19lxcc00"
17
+ class="components-flex-item css-eno349-PolymorphicDiv-Item-sx-Base e19lxcc00"
18
18
  data-wp-c16t="true"
19
19
  data-wp-component="FlexItem"
20
20
  >
21
21
  Item
22
22
  </div>
23
23
  - <div
24
- - class="css-1mm2cvy-View e19lxcc00"
24
+ - class="css-161q9d5-PolymorphicDiv e19lxcc00"
25
25
  - />
26
26
  - <div />
27
27
  <div
28
- class="components-flex-item components-flex-block css-14wzr73-View-Item-sx-Base-block e19lxcc00"
28
+ class="components-flex-item components-flex-block css-10m3u8l-PolymorphicDiv-Item-sx-Base-block e19lxcc00"
29
29
  data-wp-c16t="true"
30
30
  data-wp-component="FlexBlock"
31
31
  >
@@ -38,7 +38,9 @@ export default function FocalPointPickerControls( {
38
38
  value: Parameters< UnitControlOnChangeCallback >[ 0 ],
39
39
  axis: FocalPointAxis
40
40
  ) => {
41
- if ( value === undefined ) return;
41
+ if ( value === undefined ) {
42
+ return;
43
+ }
42
44
 
43
45
  const num = parseInt( value, 10 );
44
46
 
@@ -111,7 +111,9 @@ export function FocalPointPicker( {
111
111
 
112
112
  // `value` can technically be undefined if getValueWithinDragArea() is
113
113
  // called before dragAreaRef is set, but this shouldn't happen in reality.
114
- if ( ! value ) return;
114
+ if ( ! value ) {
115
+ return;
116
+ }
115
117
 
116
118
  onDragStart?.( value, event );
117
119
  setPoint( value );
@@ -120,7 +122,9 @@ export function FocalPointPicker( {
120
122
  // Prevents text-selection when dragging.
121
123
  event.preventDefault();
122
124
  const value = getValueWithinDragArea( event );
123
- if ( ! value ) return;
125
+ if ( ! value ) {
126
+ return;
127
+ }
124
128
  onDrag?.( value, event );
125
129
  setPoint( value );
126
130
  },
@@ -136,7 +140,9 @@ export function FocalPointPicker( {
136
140
  const dragAreaRef = useRef< HTMLDivElement >( null );
137
141
  const [ bounds, setBounds ] = useState( INITIAL_BOUNDS );
138
142
  const refUpdateBounds = useRef( () => {
139
- if ( ! dragAreaRef.current ) return;
143
+ if ( ! dragAreaRef.current ) {
144
+ return;
145
+ }
140
146
 
141
147
  const { clientWidth: width, clientHeight: height } =
142
148
  dragAreaRef.current;
@@ -150,7 +156,9 @@ export function FocalPointPicker( {
150
156
 
151
157
  useEffect( () => {
152
158
  const updateBounds = refUpdateBounds.current;
153
- if ( ! dragAreaRef.current ) return;
159
+ if ( ! dragAreaRef.current ) {
160
+ return;
161
+ }
154
162
 
155
163
  const { defaultView } = dragAreaRef.current.ownerDocument;
156
164
  defaultView?.addEventListener( 'resize', updateBounds );
@@ -171,7 +179,9 @@ export function FocalPointPicker( {
171
179
  clientY: number;
172
180
  shiftKey: boolean;
173
181
  } ) => {
174
- if ( ! dragAreaRef.current ) return;
182
+ if ( ! dragAreaRef.current ) {
183
+ return;
184
+ }
175
185
 
176
186
  const { top, left } = dragAreaRef.current.getBoundingClientRect();
177
187
  let nextX = ( clientX - left ) / bounds.width;
@@ -203,8 +213,9 @@ export function FocalPointPicker( {
203
213
  ! [ 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight' ].includes(
204
214
  code
205
215
  )
206
- )
216
+ ) {
207
217
  return;
218
+ }
208
219
 
209
220
  event.preventDefault();
210
221
  const value = { x, y };
@@ -253,7 +264,9 @@ export function FocalPointPicker( {
253
264
  onKeyDown={ arrowKeyStep }
254
265
  onMouseDown={ startDrag }
255
266
  onBlur={ () => {
256
- if ( isDragging ) endDrag();
267
+ if ( isDragging ) {
268
+ endDrag();
269
+ }
257
270
  } }
258
271
  ref={ dragAreaRef }
259
272
  role="button"
@@ -9,7 +9,7 @@ import styled from '@emotion/styled';
9
9
  */
10
10
  import { Flex } from '../../flex';
11
11
  import UnitControl from '../../unit-control';
12
- import { COLORS, CONFIG, reduceMotion } from '../../utils';
12
+ import { COLORS, CONFIG } from '../../utils';
13
13
  import type { FocalPointPickerControlsProps } from '../types';
14
14
  import { INITIAL_BOUNDS } from '../utils';
15
15
 
@@ -106,10 +106,11 @@ export const GridView = styled.div`
106
106
  position: absolute;
107
107
  top: 50%;
108
108
  transform: translate3d( -50%, -50%, 0 );
109
- transition: opacity 100ms linear;
110
109
  z-index: 1;
111
110
 
112
- ${ reduceMotion( 'transition' ) }
111
+ @media not ( prefers-reduced-motion ) {
112
+ transition: opacity 100ms linear;
113
+ }
113
114
 
114
115
  opacity: ${ ( { showOverlay }: { showOverlay?: boolean } ) =>
115
116
  showOverlay ? 1 : 0 };