@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
@@ -109,7 +109,9 @@ const PanelBodyTitle = forwardRef(
109
109
  }: WordPressComponentProps< PanelBodyTitleProps, 'button' >,
110
110
  ref: React.ForwardedRef< any >
111
111
  ) => {
112
- if ( ! title ) return null;
112
+ if ( ! title ) {
113
+ return null;
114
+ }
113
115
 
114
116
  return (
115
117
  <h2 className="components-panel__body-title">
@@ -32,6 +32,7 @@
32
32
 
33
33
  .components-panel__header {
34
34
  display: flex;
35
+ flex-shrink: 0;
35
36
  justify-content: space-between;
36
37
  align-items: center;
37
38
  padding: 0 $grid-unit-20;
@@ -3,7 +3,7 @@
3
3
  font-size: $default-font-size;
4
4
  box-sizing: border-box;
5
5
  position: relative;
6
- padding: 1em;
6
+ padding: $grid-unit-30;
7
7
  width: 100%;
8
8
  text-align: left;
9
9
  margin: 0;
@@ -11,6 +11,7 @@
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  align-items: flex-start;
14
+ gap: $grid-unit-20;
14
15
 
15
16
  // Some editor styles unset this.
16
17
  -moz-font-smoothing: subpixel-antialiased;
@@ -38,15 +39,14 @@
38
39
  }
39
40
 
40
41
  .components-placeholder__label {
41
- display: flex;
42
42
  font-weight: 600;
43
- margin-bottom: $grid-unit-20;
44
43
  align-items: center;
44
+ display: flex;
45
45
 
46
46
  > svg,
47
47
  .dashicon,
48
48
  .block-editor-block-icon {
49
- margin-right: $grid-unit-15;
49
+ margin-right: $grid-unit-05;
50
50
  fill: currentColor;
51
51
  // Optimizate for high contrast modes.
52
52
  // See also https://blogs.windows.com/msedgedev/2020/09/17/styling-for-windows-high-contrast-with-new-standards-for-forced-colors/.
@@ -67,6 +67,8 @@
67
67
  flex-direction: row;
68
68
  width: 100%;
69
69
  flex-wrap: wrap;
70
+ gap: $grid-unit-15;
71
+ justify-content: flex-start;
70
72
 
71
73
  p {
72
74
  font-family: $default-font;
@@ -85,24 +87,11 @@
85
87
  flex: 1 1 auto;
86
88
  }
87
89
 
88
- .components-placeholder__instructions {
89
- margin-bottom: 1em;
90
- }
91
-
92
90
  .components-placeholder__error {
93
- margin-top: 1em;
94
91
  width: 100%;
92
+ gap: $grid-unit-10;
95
93
  }
96
94
 
97
- .components-placeholder__fieldset .components-button {
98
- margin-right: $grid-unit-15;
99
- margin-bottom: $grid-unit-15; // If buttons wrap we need vertical space between.
100
-
101
- &:last-child {
102
- margin-bottom: 0;
103
- margin-right: 0;
104
- }
105
- }
106
95
 
107
96
  // Any `<Button />` component with `variant="link"` prop will need extra spacing if placed
108
97
  // immediately after a button which is *not* an `variant="link"` style button. This is because
@@ -119,14 +108,6 @@
119
108
 
120
109
  // Element queries to show different layouts at various sizes.
121
110
  .components-placeholder {
122
- // Medium and large sizes.
123
- &.is-large {
124
- .components-placeholder__label {
125
- font-size: 18pt;
126
- font-weight: normal;
127
- }
128
- }
129
-
130
111
  // Medium and small sizes.
131
112
  &.is-medium,
132
113
  &.is-small {
@@ -139,16 +120,15 @@
139
120
  flex-direction: column;
140
121
  }
141
122
 
142
- .components-placeholder__fieldset .components-button {
143
- margin-right: auto;
123
+ .components-placeholder__fieldset > *,
124
+ .components-button {
125
+ width: 100%;
126
+ justify-content: center;
144
127
  }
145
128
  }
146
129
 
147
- // Small sizes.
148
130
  &.is-small {
149
- .components-button {
150
- padding: 0 $grid-unit-10 2px;
151
- }
131
+ padding: $grid-unit-20;
152
132
  }
153
133
  }
154
134
 
@@ -179,8 +159,6 @@
179
159
  }
180
160
 
181
161
  .components-placeholder__fieldset {
182
- width: auto;
183
-
184
162
  // Unset intrinsic margins.
185
163
  margin-left: 0;
186
164
  margin-right: 0;
@@ -226,8 +226,9 @@ const UnforwardedPopover = (
226
226
  const { firstElementChild } = refs.floating.current ?? {};
227
227
 
228
228
  // Only HTMLElement instances have the `style` property.
229
- if ( ! ( firstElementChild instanceof HTMLElement ) )
229
+ if ( ! ( firstElementChild instanceof HTMLElement ) ) {
230
230
  return;
231
+ }
231
232
 
232
233
  // Reduce the height of the popover to the available space.
233
234
  Object.assign( firstElementChild.style, {
@@ -17,7 +17,9 @@ export function overlayMiddlewares() {
17
17
  const { firstElementChild } = elements.floating ?? {};
18
18
 
19
19
  // Only HTMLElement instances have the `style` property.
20
- if ( ! ( firstElementChild instanceof HTMLElement ) ) return;
20
+ if ( ! ( firstElementChild instanceof HTMLElement ) ) {
21
+ return;
22
+ }
21
23
 
22
24
  // Reduce the height of the popover to the available space.
23
25
  Object.assign( firstElementChild.style, {
@@ -7,8 +7,6 @@ import type { StoryFn, Meta } from '@storybook/react';
7
7
  * WordPress dependencies
8
8
  */
9
9
  import { useState, useRef, useEffect } from '@wordpress/element';
10
- // @ts-expect-error The `@wordpress/block-editor` is not typed
11
- import { __unstableIframe as Iframe } from '@wordpress/block-editor';
12
10
 
13
11
  /**
14
12
  * Internal dependencies
@@ -13,7 +13,9 @@ export default function AuthorSelect( {
13
13
  selectedAuthorId,
14
14
  onChange: onChangeProp,
15
15
  }: AuthorSelectProps ) {
16
- if ( ! authorList ) return null;
16
+ if ( ! authorList ) {
17
+ return null;
18
+ }
17
19
  const termsTree = buildTermsTree( authorList );
18
20
  return (
19
21
  <TreeSelect
@@ -92,7 +92,7 @@ function useMarks( {
92
92
  if ( ! Array.isArray( marks ) ) {
93
93
  marks = [];
94
94
  const count = 1 + Math.round( range / step );
95
- while ( count > marks.push( { value: step * marks.length + min } ) );
95
+ while ( count > marks.push( { value: step * marks.length + min } ) ) {}
96
96
  }
97
97
 
98
98
  const placedMarks: RangeMarkProps[] = [];
@@ -8,7 +8,7 @@ import styled from '@emotion/styled';
8
8
  * Internal dependencies
9
9
  */
10
10
  import NumberControl from '../../number-control';
11
- import { COLORS, reduceMotion, rtl } from '../../utils';
11
+ import { COLORS, rtl } from '../../utils';
12
12
  import { space } from '../../utils/space';
13
13
 
14
14
  import type {
@@ -287,13 +287,15 @@ export const Tooltip = styled.span< TooltipProps >`
287
287
  pointer-events: none;
288
288
  position: absolute;
289
289
  text-align: center;
290
- transition: opacity 120ms ease;
291
290
  user-select: none;
292
291
  line-height: 1.4;
293
292
 
293
+ @media not ( prefers-reduced-motion ) {
294
+ transition: opacity 120ms ease;
295
+ }
296
+
294
297
  ${ tooltipShow };
295
298
  ${ tooltipPosition };
296
- ${ reduceMotion( 'transition' ) };
297
299
  ${ rtl(
298
300
  { transform: 'translateX(-50%)' },
299
301
  { transform: 'translateX(50%)' }
@@ -55,7 +55,9 @@ function ResizeTooltip(
55
55
  position,
56
56
  } );
57
57
 
58
- if ( ! isVisible ) return null;
58
+ if ( ! isVisible ) {
59
+ return null;
60
+ }
59
61
 
60
62
  const classes = classnames( 'components-resize-tooltip', className );
61
63
 
@@ -41,7 +41,9 @@ function Label(
41
41
  const isBottom = position === POSITIONS.bottom;
42
42
  const isCorner = position === POSITIONS.corner;
43
43
 
44
- if ( ! showLabel ) return null;
44
+ if ( ! showLabel ) {
45
+ return null;
46
+ }
45
47
 
46
48
  let style: React.CSSProperties = {
47
49
  opacity: showLabel ? 1 : undefined,
@@ -90,7 +90,9 @@ export function useResizeLabel( {
90
90
  * If axis is controlled, we will avoid resetting the moveX and moveY values.
91
91
  * This will allow for the preferred axis values to persist in the label.
92
92
  */
93
- if ( isAxisControlled ) return;
93
+ if ( isAxisControlled ) {
94
+ return;
95
+ }
94
96
  setMoveX( false );
95
97
  setMoveY( false );
96
98
  };
@@ -109,12 +111,16 @@ export function useResizeLabel( {
109
111
  */
110
112
  const isRendered = width !== null || height !== null;
111
113
 
112
- if ( ! isRendered ) return;
114
+ if ( ! isRendered ) {
115
+ return;
116
+ }
113
117
 
114
118
  const didWidthChange = width !== widthRef.current;
115
119
  const didHeightChange = height !== heightRef.current;
116
120
 
117
- if ( ! didWidthChange && ! didHeightChange ) return;
121
+ if ( ! didWidthChange && ! didHeightChange ) {
122
+ return;
123
+ }
118
124
 
119
125
  /*
120
126
  * After the initial render, the useResizeAware will set the first
@@ -194,7 +200,9 @@ function getSizeLabel( {
194
200
  showPx = false,
195
201
  width,
196
202
  }: GetSizeLabelArgs ): string | undefined {
197
- if ( ! moveX && ! moveY ) return undefined;
203
+ if ( ! moveX && ! moveY ) {
204
+ return undefined;
205
+ }
198
206
 
199
207
  /*
200
208
  * Corner position...
@@ -55,7 +55,9 @@ function UnforwardedSelectControl(
55
55
  const helpId = help ? `${ id }__help` : undefined;
56
56
 
57
57
  // Disable reason: A select with an onchange throws a warning.
58
- if ( ! options?.length && ! children ) return null;
58
+ if ( ! options?.length && ! children ) {
59
+ return null;
60
+ }
59
61
 
60
62
  const handleOnChange = (
61
63
  event: React.ChangeEvent< HTMLSelectElement >
@@ -24,7 +24,9 @@ interface SelectProps
24
24
  }
25
25
 
26
26
  const disabledStyles = ( { disabled }: SelectProps ) => {
27
- if ( ! disabled ) return '';
27
+ if ( ! disabled ) {
28
+ return '';
29
+ }
28
30
 
29
31
  return css( {
30
32
  color: COLORS.ui.textDisabled,
@@ -3,11 +3,12 @@
3
3
  */
4
4
  import { createContext } from '@wordpress/element';
5
5
  import warning from '@wordpress/warning';
6
+ import { observableMap } from '@wordpress/compose';
7
+
6
8
  /**
7
9
  * Internal dependencies
8
10
  */
9
11
  import type { SlotFillBubblesVirtuallyContext } from '../types';
10
- import { observableMap } from './observable-map';
11
12
 
12
13
  const initialContextValue: SlotFillBubblesVirtuallyContext = {
13
14
  slots: observableMap(),
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import { useMemo } from '@wordpress/element';
5
5
  import isShallowEqual from '@wordpress/is-shallow-equal';
6
+ import { observableMap } from '@wordpress/compose';
6
7
 
7
8
  /**
8
9
  * Internal dependencies
@@ -12,7 +13,6 @@ import type {
12
13
  SlotFillProviderProps,
13
14
  SlotFillBubblesVirtuallyContext,
14
15
  } from '../types';
15
- import { observableMap } from './observable-map';
16
16
 
17
17
  function createSlotRegistry(): SlotFillBubblesVirtuallyContext {
18
18
  const slots: SlotFillBubblesVirtuallyContext[ 'slots' ] = observableMap();
@@ -2,13 +2,13 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { useContext } from '@wordpress/element';
5
+ import { useObservableValue } from '@wordpress/compose';
5
6
 
6
7
  /**
7
8
  * Internal dependencies
8
9
  */
9
10
  import SlotFillContext from './slot-fill-context';
10
11
  import type { SlotKey } from '../types';
11
- import { useObservableValue } from './observable-map';
12
12
 
13
13
  export default function useSlotFills( name: SlotKey ) {
14
14
  const registry = useContext( SlotFillContext );
@@ -2,6 +2,7 @@
2
2
  * WordPress dependencies
3
3
  */
4
4
  import { useMemo, useContext } from '@wordpress/element';
5
+ import { useObservableValue } from '@wordpress/compose';
5
6
 
6
7
  /**
7
8
  * Internal dependencies
@@ -13,7 +14,6 @@ import type {
13
14
  FillProps,
14
15
  SlotKey,
15
16
  } from '../types';
16
- import { useObservableValue } from './observable-map';
17
17
 
18
18
  export default function useSlot( name: SlotKey ) {
19
19
  const registry = useContext( SlotFillContext );
@@ -4,9 +4,9 @@
4
4
  import type { Component, MutableRefObject, ReactNode, RefObject } from 'react';
5
5
 
6
6
  /**
7
- * Internal dependencies
7
+ * WordPress dependencies
8
8
  */
9
- import type { ObservableMap } from './bubbles-virtually/observable-map';
9
+ import type { ObservableMap } from '@wordpress/compose';
10
10
 
11
11
  export type DistributiveOmit< T, K extends keyof any > = T extends any
12
12
  ? Omit< T, K >
@@ -8,8 +8,8 @@ Snapshot Diff:
8
8
  @@ -1,8 +1,8 @@
9
9
  <div>
10
10
  <div
11
- - class="components-surface css-pt58n0-View-Surface-getBorders-primary e19lxcc00"
12
- + class="components-surface css-soe81k-View-Surface-getBorders-primary e19lxcc00"
11
+ - class="components-surface css-1bmtyqd-PolymorphicDiv-Surface-getBorders-primary e19lxcc00"
12
+ + class="components-surface css-1u146xf-PolymorphicDiv-Surface-getBorders-primary e19lxcc00"
13
13
  data-wp-c16t="true"
14
14
  data-wp-component="Surface"
15
15
  >
@@ -25,8 +25,8 @@ Snapshot Diff:
25
25
  @@ -1,8 +1,8 @@
26
26
  <div>
27
27
  <div
28
- - class="components-surface css-1vckp4o-View-Surface-getBorders-primary e19lxcc00"
29
- + class="components-surface css-soe81k-View-Surface-getBorders-primary e19lxcc00"
28
+ - class="components-surface css-iin9ud-PolymorphicDiv-Surface-getBorders-primary e19lxcc00"
29
+ + class="components-surface css-1u146xf-PolymorphicDiv-Surface-getBorders-primary e19lxcc00"
30
30
  data-wp-c16t="true"
31
31
  data-wp-component="Surface"
32
32
  >
@@ -42,8 +42,8 @@ Snapshot Diff:
42
42
  @@ -1,8 +1,8 @@
43
43
  <div>
44
44
  <div
45
- - class="components-surface css-sw9dzi-View-Surface-getBorders-primary e19lxcc00"
46
- + class="components-surface css-soe81k-View-Surface-getBorders-primary e19lxcc00"
45
+ - class="components-surface css-4j30ez-PolymorphicDiv-Surface-getBorders-primary e19lxcc00"
46
+ + class="components-surface css-1u146xf-PolymorphicDiv-Surface-getBorders-primary e19lxcc00"
47
47
  data-wp-c16t="true"
48
48
  data-wp-component="Surface"
49
49
  >
@@ -59,8 +59,8 @@ Snapshot Diff:
59
59
  @@ -1,8 +1,8 @@
60
60
  <div>
61
61
  <div
62
- - class="components-surface css-123k66h-View-Surface-getBorders-primary e19lxcc00"
63
- + class="components-surface css-soe81k-View-Surface-getBorders-primary e19lxcc00"
62
+ - class="components-surface css-1v7smm4-PolymorphicDiv-Surface-getBorders-primary e19lxcc00"
63
+ + class="components-surface css-1u146xf-PolymorphicDiv-Surface-getBorders-primary e19lxcc00"
64
64
  data-wp-c16t="true"
65
65
  data-wp-component="Surface"
66
66
  >
@@ -94,8 +94,8 @@ Snapshot Diff:
94
94
  @@ -1,8 +1,8 @@
95
95
  <div>
96
96
  <div
97
- - class="components-surface css-1m2pafr-View-Surface-getBorders-secondary e19lxcc00"
98
- + class="components-surface css-soe81k-View-Surface-getBorders-primary e19lxcc00"
97
+ - class="components-surface css-1afnk4j-PolymorphicDiv-Surface-getBorders-secondary e19lxcc00"
98
+ + class="components-surface css-1u146xf-PolymorphicDiv-Surface-getBorders-primary e19lxcc00"
99
99
  data-wp-c16t="true"
100
100
  data-wp-component="Surface"
101
101
  >
@@ -14,9 +14,13 @@ export function getLineHeight(
14
14
  adjustLineHeightForInnerControls: Props[ 'adjustLineHeightForInnerControls' ],
15
15
  lineHeight: CSSProperties[ 'lineHeight' ]
16
16
  ) {
17
- if ( lineHeight ) return lineHeight;
17
+ if ( lineHeight ) {
18
+ return lineHeight;
19
+ }
18
20
 
19
- if ( ! adjustLineHeightForInnerControls ) return;
21
+ if ( ! adjustLineHeightForInnerControls ) {
22
+ return;
23
+ }
20
24
 
21
25
  let value = `calc(${ CONFIG.controlHeight } + ${ space( 2 ) })`;
22
26
 
package/src/text/utils.ts CHANGED
@@ -99,8 +99,12 @@ export function createHighlighterText( {
99
99
  unhighlightClassName = '',
100
100
  unhighlightStyle,
101
101
  }: Options ) {
102
- if ( ! children ) return null;
103
- if ( typeof children !== 'string' ) return children;
102
+ if ( ! children ) {
103
+ return null;
104
+ }
105
+ if ( typeof children !== 'string' ) {
106
+ return children;
107
+ }
104
108
 
105
109
  const textToHighlight = children;
106
110
 
@@ -76,7 +76,9 @@ function warnContrastIssues( issues: ReturnType< typeof checkContrasts > ) {
76
76
  }
77
77
 
78
78
  function generateAccentDependentColors( accent?: string ) {
79
- if ( ! accent ) return {};
79
+ if ( ! accent ) {
80
+ return {};
81
+ }
80
82
 
81
83
  return {
82
84
  accent,
@@ -87,7 +89,9 @@ function generateAccentDependentColors( accent?: string ) {
87
89
  }
88
90
 
89
91
  function generateBackgroundDependentColors( background?: string ) {
90
- if ( ! background ) return {};
92
+ if ( ! background ) {
93
+ return {};
94
+ }
91
95
 
92
96
  const foreground = getForegroundForColor( background );
93
97
 
@@ -107,8 +107,6 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
107
107
  padding: 0 12px;
108
108
  position: relative;
109
109
  text-align: center;
110
- -webkit-transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
111
- transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
112
110
  -webkit-user-select: none;
113
111
  -moz-user-select: none;
114
112
  -ms-user-select: none;
@@ -123,9 +121,10 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
123
121
  color: #fff;
124
122
  }
125
123
 
126
- @media ( prefers-reduced-motion: reduce ) {
124
+ @media not ( prefers-reduced-motion ) {
127
125
  .emotion-12 {
128
- transition-duration: 0ms;
126
+ -webkit-transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
127
+ transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
129
128
  }
130
129
  }
131
130
 
@@ -190,8 +189,6 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
190
189
  padding: 0 12px;
191
190
  position: relative;
192
191
  text-align: center;
193
- -webkit-transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
194
- transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
195
192
  -webkit-user-select: none;
196
193
  -moz-user-select: none;
197
194
  -ms-user-select: none;
@@ -205,9 +202,10 @@ exports[`ToggleGroupControl controlled should render correctly with icons 1`] =
205
202
  padding-right: 0;
206
203
  }
207
204
 
208
- @media ( prefers-reduced-motion: reduce ) {
205
+ @media not ( prefers-reduced-motion ) {
209
206
  .emotion-18 {
210
- transition-duration: 0ms;
207
+ -webkit-transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
208
+ transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
211
209
  }
212
210
  }
213
211
 
@@ -436,8 +434,6 @@ exports[`ToggleGroupControl controlled should render correctly with text options
436
434
  padding: 0 12px;
437
435
  position: relative;
438
436
  text-align: center;
439
- -webkit-transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
440
- transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
441
437
  -webkit-user-select: none;
442
438
  -moz-user-select: none;
443
439
  -ms-user-select: none;
@@ -446,9 +442,10 @@ exports[`ToggleGroupControl controlled should render correctly with text options
446
442
  z-index: 2;
447
443
  }
448
444
 
449
- @media ( prefers-reduced-motion: reduce ) {
445
+ @media not ( prefers-reduced-motion ) {
450
446
  .emotion-12 {
451
- transition-duration: 0ms;
447
+ -webkit-transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
448
+ transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
452
449
  }
453
450
  }
454
451
 
@@ -656,8 +653,6 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
656
653
  padding: 0 12px;
657
654
  position: relative;
658
655
  text-align: center;
659
- -webkit-transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
660
- transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
661
656
  -webkit-user-select: none;
662
657
  -moz-user-select: none;
663
658
  -ms-user-select: none;
@@ -672,9 +667,10 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
672
667
  color: #fff;
673
668
  }
674
669
 
675
- @media ( prefers-reduced-motion: reduce ) {
670
+ @media not ( prefers-reduced-motion ) {
676
671
  .emotion-12 {
677
- transition-duration: 0ms;
672
+ -webkit-transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
673
+ transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
678
674
  }
679
675
  }
680
676
 
@@ -739,8 +735,6 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
739
735
  padding: 0 12px;
740
736
  position: relative;
741
737
  text-align: center;
742
- -webkit-transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
743
- transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
744
738
  -webkit-user-select: none;
745
739
  -moz-user-select: none;
746
740
  -ms-user-select: none;
@@ -754,9 +748,10 @@ exports[`ToggleGroupControl uncontrolled should render correctly with icons 1`]
754
748
  padding-right: 0;
755
749
  }
756
750
 
757
- @media ( prefers-reduced-motion: reduce ) {
751
+ @media not ( prefers-reduced-motion ) {
758
752
  .emotion-18 {
759
- transition-duration: 0ms;
753
+ -webkit-transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
754
+ transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
760
755
  }
761
756
  }
762
757
 
@@ -979,8 +974,6 @@ exports[`ToggleGroupControl uncontrolled should render correctly with text optio
979
974
  padding: 0 12px;
980
975
  position: relative;
981
976
  text-align: center;
982
- -webkit-transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
983
- transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
984
977
  -webkit-user-select: none;
985
978
  -moz-user-select: none;
986
979
  -ms-user-select: none;
@@ -989,9 +982,10 @@ exports[`ToggleGroupControl uncontrolled should render correctly with text optio
989
982
  z-index: 2;
990
983
  }
991
984
 
992
- @media ( prefers-reduced-motion: reduce ) {
985
+ @media not ( prefers-reduced-motion ) {
993
986
  .emotion-12 {
994
- transition-duration: 0ms;
987
+ -webkit-transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
988
+ transition: background 160ms linear,color 160ms linear,font-weight 60ms linear;
995
989
  }
996
990
  }
997
991
 
@@ -147,7 +147,9 @@ function ToggleGroupControlOptionBase(
147
147
  { ...commonProps }
148
148
  onFocus={ ( event ) => {
149
149
  onFocusProp?.( event );
150
- if ( event.defaultPrevented ) return;
150
+ if ( event.defaultPrevented ) {
151
+ return;
152
+ }
151
153
  toggleGroupControlContext.setValue( value );
152
154
  } }
153
155
  />
@@ -7,7 +7,7 @@ import styled from '@emotion/styled';
7
7
  /**
8
8
  * Internal dependencies
9
9
  */
10
- import { CONFIG, COLORS, reduceMotion } from '../../utils';
10
+ import { CONFIG, COLORS } from '../../utils';
11
11
  import type {
12
12
  ToggleGroupControlProps,
13
13
  ToggleGroupControlOptionBaseProps,
@@ -50,11 +50,12 @@ export const buttonView = ( {
50
50
  padding: 0 12px;
51
51
  position: relative;
52
52
  text-align: center;
53
- transition:
54
- background ${ CONFIG.transitionDurationFast } linear,
55
- color ${ CONFIG.transitionDurationFast } linear,
56
- font-weight 60ms linear;
57
- ${ reduceMotion( 'transition' ) }
53
+ @media not ( prefers-reduced-motion ) {
54
+ transition:
55
+ background ${ CONFIG.transitionDurationFast } linear,
56
+ color ${ CONFIG.transitionDurationFast } linear,
57
+ font-weight 60ms linear;
58
+ }
58
59
  user-select: none;
59
60
  width: 100%;
60
61
  z-index: 2;