@wordpress/components 19.5.0 → 19.6.1

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 (633) hide show
  1. package/CHANGELOG.md +23 -5
  2. package/build/alignment-matrix-control/utils.js +1 -1
  3. package/build/alignment-matrix-control/utils.js.map +1 -1
  4. package/build/angle-picker-control/angle-circle.js +1 -1
  5. package/build/angle-picker-control/angle-circle.js.map +1 -1
  6. package/build/animation/index.js +0 -6
  7. package/build/animation/index.js.map +1 -1
  8. package/build/autocomplete/get-default-use-items.js +3 -3
  9. package/build/autocomplete/get-default-use-items.js.map +1 -1
  10. package/build/base-field/hook.js +1 -1
  11. package/build/base-field/hook.js.map +1 -1
  12. package/build/box-control/icon.js +1 -1
  13. package/build/box-control/icon.js.map +1 -1
  14. package/build/box-control/index.js +4 -4
  15. package/build/box-control/index.js.map +1 -1
  16. package/build/box-control/utils.js +12 -8
  17. package/build/box-control/utils.js.map +1 -1
  18. package/build/button/index.js +5 -5
  19. package/build/button/index.js.map +1 -1
  20. package/build/button/index.native.js +7 -7
  21. package/build/button/index.native.js.map +1 -1
  22. package/build/color-picker/color-display.js +1 -1
  23. package/build/color-picker/color-display.js.map +1 -1
  24. package/build/color-picker/styles.js +8 -8
  25. package/build/color-picker/styles.js.map +1 -1
  26. package/build/combobox-control/index.js +1 -1
  27. package/build/combobox-control/index.js.map +1 -1
  28. package/build/confirm-dialog/component.js +4 -2
  29. package/build/confirm-dialog/component.js.map +1 -1
  30. package/build/date-time/time.js +7 -4
  31. package/build/date-time/time.js.map +1 -1
  32. package/build/divider/component.js +5 -4
  33. package/build/divider/component.js.map +1 -1
  34. package/build/draggable/index.js +3 -3
  35. package/build/draggable/index.js.map +1 -1
  36. package/build/focal-point-picker/index.native.js +7 -7
  37. package/build/focal-point-picker/index.native.js.map +1 -1
  38. package/build/focal-point-picker/tooltip/index.native.js +1 -1
  39. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  40. package/build/font-size-picker/index.js +1 -1
  41. package/build/font-size-picker/index.js.map +1 -1
  42. package/build/form-token-field/index.js +6 -6
  43. package/build/form-token-field/index.js.map +1 -1
  44. package/build/form-token-field/suggestions-list.js +2 -2
  45. package/build/form-token-field/suggestions-list.js.map +1 -1
  46. package/build/heading/component.js +6 -5
  47. package/build/heading/component.js.map +1 -1
  48. package/build/heading/hook.js +1 -1
  49. package/build/heading/hook.js.map +1 -1
  50. package/build/higher-order/with-notices/index.js +1 -1
  51. package/build/higher-order/with-notices/index.js.map +1 -1
  52. package/build/index.js +2 -2
  53. package/build/index.js.map +1 -1
  54. package/build/index.native.js.map +1 -1
  55. package/build/input-control/input-base.js +1 -1
  56. package/build/input-control/input-base.js.map +1 -1
  57. package/build/input-control/input-field.js +12 -10
  58. package/build/input-control/input-field.js.map +1 -1
  59. package/build/input-control/styles/input-control-styles.js +25 -25
  60. package/build/input-control/styles/input-control-styles.js.map +1 -1
  61. package/build/isolated-event-container/index.js +1 -1
  62. package/build/isolated-event-container/index.js.map +1 -1
  63. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  64. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  65. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  66. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  67. package/build/mobile/bottom-sheet/cell.native.js +1 -1
  68. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  69. package/build/mobile/bottom-sheet/index.native.js +11 -11
  70. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  71. package/build/mobile/bottom-sheet/link-cell.native.js +1 -1
  72. package/build/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  73. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  74. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  75. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  76. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  77. package/build/mobile/global-styles-context/utils.native.js +10 -10
  78. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  79. package/build/mobile/gradient/index.native.js +2 -2
  80. package/build/mobile/gradient/index.native.js.map +1 -1
  81. package/build/mobile/html-text-input/container.ios.js +3 -3
  82. package/build/mobile/html-text-input/container.ios.js.map +1 -1
  83. package/build/mobile/html-text-input/index.native.js +1 -1
  84. package/build/mobile/html-text-input/index.native.js.map +1 -1
  85. package/build/mobile/image/index.native.js +1 -1
  86. package/build/mobile/image/index.native.js.map +1 -1
  87. package/build/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  88. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  89. package/build/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  90. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  91. package/build/mobile/link-picker/index.native.js +3 -3
  92. package/build/mobile/link-picker/index.native.js.map +1 -1
  93. package/build/mobile/link-picker/link-picker-results.native.js +8 -8
  94. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  95. package/build/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  96. package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
  97. package/build/mobile/link-settings/index.native.js +1 -1
  98. package/build/mobile/link-settings/index.native.js.map +1 -1
  99. package/build/modal/aria-helper.js +1 -1
  100. package/build/modal/aria-helper.js.map +1 -1
  101. package/build/modal/index.js +2 -2
  102. package/build/modal/index.js.map +1 -1
  103. package/build/navigable-container/container.js +2 -2
  104. package/build/navigable-container/container.js.map +1 -1
  105. package/build/navigable-container/tabbable.js +1 -1
  106. package/build/navigable-container/tabbable.js.map +1 -1
  107. package/build/navigation/item/index.js +1 -1
  108. package/build/navigation/item/index.js.map +1 -1
  109. package/build/navigation/menu/index.js +1 -1
  110. package/build/navigation/menu/index.js.map +1 -1
  111. package/build/navigator/navigator-provider/component.js +2 -2
  112. package/build/navigator/navigator-provider/component.js.map +1 -1
  113. package/build/navigator/navigator-screen/component.js +1 -1
  114. package/build/navigator/navigator-screen/component.js.map +1 -1
  115. package/build/number-control/index.js +1 -1
  116. package/build/number-control/index.js.map +1 -1
  117. package/build/panel/body.js +2 -2
  118. package/build/panel/body.js.map +1 -1
  119. package/build/popover/index.js +3 -3
  120. package/build/popover/index.js.map +1 -1
  121. package/build/popover/utils.js +6 -6
  122. package/build/popover/utils.js.map +1 -1
  123. package/build/radio-group/index.js +1 -1
  124. package/build/radio-group/index.js.map +1 -1
  125. package/build/range-control/styles/range-control-styles.js +29 -29
  126. package/build/range-control/styles/range-control-styles.js.map +1 -1
  127. package/build/sandbox/index.js +5 -5
  128. package/build/sandbox/index.js.map +1 -1
  129. package/build/sandbox/index.native.js +1 -1
  130. package/build/sandbox/index.native.js.map +1 -1
  131. package/build/select-control/index.js +1 -1
  132. package/build/select-control/index.js.map +1 -1
  133. package/build/select-control/styles/select-control-styles.js +5 -5
  134. package/build/select-control/styles/select-control-styles.js.map +1 -1
  135. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  136. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  137. package/build/slot-fill/bubbles-virtually/slot.js +1 -1
  138. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  139. package/build/slot-fill/fill.js +1 -1
  140. package/build/slot-fill/fill.js.map +1 -1
  141. package/build/slot-fill/provider.js +1 -1
  142. package/build/slot-fill/provider.js.map +1 -1
  143. package/build/snackbar/index.js +1 -1
  144. package/build/snackbar/index.js.map +1 -1
  145. package/build/snackbar/list.js +1 -1
  146. package/build/snackbar/list.js.map +1 -1
  147. package/build/style-provider/index.js +2 -2
  148. package/build/style-provider/index.js.map +1 -1
  149. package/build/toggle-group-control/toggle-group-control/component.js +2 -2
  150. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  151. package/build/toggle-group-control/toggle-group-control-option/component.js +1 -4
  152. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  153. package/build/toggle-group-control/toggle-group-control-option/styles.js +12 -19
  154. package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  155. package/build/toolbar/index.js +1 -1
  156. package/build/toolbar/index.js.map +1 -1
  157. package/build/tooltip/index.js +3 -3
  158. package/build/tooltip/index.js.map +1 -1
  159. package/build/tooltip/index.native.js +7 -7
  160. package/build/tooltip/index.native.js.map +1 -1
  161. package/build/tree-grid/index.js +4 -1
  162. package/build/tree-grid/index.js.map +1 -1
  163. package/build/truncate/utils.js +1 -1
  164. package/build/truncate/utils.js.map +1 -1
  165. package/build/ui/context/context-connect.js +8 -15
  166. package/build/ui/context/context-connect.js.map +1 -1
  167. package/build/ui/context/context-system-provider.js +2 -2
  168. package/build/ui/context/context-system-provider.js.map +1 -1
  169. package/build/ui/context/index.js.map +1 -1
  170. package/build/ui/utils/colors.js +2 -2
  171. package/build/ui/utils/colors.js.map +1 -1
  172. package/build/ui/utils/space.js +2 -2
  173. package/build/ui/utils/space.js.map +1 -1
  174. package/build/unit-control/index.js +38 -29
  175. package/build/unit-control/index.js.map +1 -1
  176. package/build/unit-control/index.native.js +4 -2
  177. package/build/unit-control/index.native.js.map +1 -1
  178. package/build/unit-control/unit-select-control.js +1 -1
  179. package/build/unit-control/unit-select-control.js.map +1 -1
  180. package/build/unit-control/utils.js +96 -104
  181. package/build/unit-control/utils.js.map +1 -1
  182. package/build/utils/breakpoint-values.js +1 -1
  183. package/build/utils/breakpoint-values.js.map +1 -1
  184. package/build/utils/colors-values.js +1 -1
  185. package/build/utils/colors-values.js.map +1 -1
  186. package/build-module/alignment-matrix-control/utils.js +1 -1
  187. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  188. package/build-module/angle-picker-control/angle-circle.js +1 -1
  189. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  190. package/build-module/animation/index.js +1 -1
  191. package/build-module/animation/index.js.map +1 -1
  192. package/build-module/autocomplete/get-default-use-items.js +3 -3
  193. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  194. package/build-module/base-field/hook.js +1 -1
  195. package/build-module/base-field/hook.js.map +1 -1
  196. package/build-module/box-control/icon.js +1 -1
  197. package/build-module/box-control/icon.js.map +1 -1
  198. package/build-module/box-control/index.js +5 -5
  199. package/build-module/box-control/index.js.map +1 -1
  200. package/build-module/box-control/utils.js +13 -9
  201. package/build-module/box-control/utils.js.map +1 -1
  202. package/build-module/button/index.js +5 -5
  203. package/build-module/button/index.js.map +1 -1
  204. package/build-module/button/index.native.js +7 -7
  205. package/build-module/button/index.native.js.map +1 -1
  206. package/build-module/color-picker/color-display.js +1 -1
  207. package/build-module/color-picker/color-display.js.map +1 -1
  208. package/build-module/color-picker/styles.js +8 -8
  209. package/build-module/color-picker/styles.js.map +1 -1
  210. package/build-module/combobox-control/index.js +1 -1
  211. package/build-module/combobox-control/index.js.map +1 -1
  212. package/build-module/confirm-dialog/component.js +4 -5
  213. package/build-module/confirm-dialog/component.js.map +1 -1
  214. package/build-module/date-time/time.js +7 -4
  215. package/build-module/date-time/time.js.map +1 -1
  216. package/build-module/divider/component.js +3 -3
  217. package/build-module/divider/component.js.map +1 -1
  218. package/build-module/draggable/index.js +3 -3
  219. package/build-module/draggable/index.js.map +1 -1
  220. package/build-module/focal-point-picker/index.native.js +7 -7
  221. package/build-module/focal-point-picker/index.native.js.map +1 -1
  222. package/build-module/focal-point-picker/tooltip/index.native.js +1 -1
  223. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  224. package/build-module/font-size-picker/index.js +1 -1
  225. package/build-module/font-size-picker/index.js.map +1 -1
  226. package/build-module/form-token-field/index.js +6 -6
  227. package/build-module/form-token-field/index.js.map +1 -1
  228. package/build-module/form-token-field/suggestions-list.js +2 -2
  229. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  230. package/build-module/heading/component.js +4 -4
  231. package/build-module/heading/component.js.map +1 -1
  232. package/build-module/heading/hook.js +1 -1
  233. package/build-module/heading/hook.js.map +1 -1
  234. package/build-module/higher-order/with-notices/index.js +1 -1
  235. package/build-module/higher-order/with-notices/index.js.map +1 -1
  236. package/build-module/index.js +4 -4
  237. package/build-module/index.js.map +1 -1
  238. package/build-module/index.native.js +4 -4
  239. package/build-module/index.native.js.map +1 -1
  240. package/build-module/input-control/input-base.js +1 -1
  241. package/build-module/input-control/input-base.js.map +1 -1
  242. package/build-module/input-control/input-field.js +13 -10
  243. package/build-module/input-control/input-field.js.map +1 -1
  244. package/build-module/input-control/styles/input-control-styles.js +25 -25
  245. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  246. package/build-module/isolated-event-container/index.js +1 -1
  247. package/build-module/isolated-event-container/index.js.map +1 -1
  248. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  249. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  250. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  251. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  252. package/build-module/mobile/bottom-sheet/cell.native.js +1 -1
  253. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  254. package/build-module/mobile/bottom-sheet/index.native.js +11 -11
  255. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  256. package/build-module/mobile/bottom-sheet/link-cell.native.js +1 -1
  257. package/build-module/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  258. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  259. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  260. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  261. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  262. package/build-module/mobile/global-styles-context/utils.native.js +10 -10
  263. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  264. package/build-module/mobile/gradient/index.native.js +2 -2
  265. package/build-module/mobile/gradient/index.native.js.map +1 -1
  266. package/build-module/mobile/html-text-input/container.ios.js +3 -3
  267. package/build-module/mobile/html-text-input/container.ios.js.map +1 -1
  268. package/build-module/mobile/html-text-input/index.native.js +1 -1
  269. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  270. package/build-module/mobile/image/index.native.js +1 -1
  271. package/build-module/mobile/image/index.native.js.map +1 -1
  272. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  273. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  274. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  275. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  276. package/build-module/mobile/link-picker/index.native.js +3 -3
  277. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  278. package/build-module/mobile/link-picker/link-picker-results.native.js +8 -8
  279. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  280. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  281. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
  282. package/build-module/mobile/link-settings/index.native.js +1 -1
  283. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  284. package/build-module/modal/aria-helper.js +1 -1
  285. package/build-module/modal/aria-helper.js.map +1 -1
  286. package/build-module/modal/index.js +2 -2
  287. package/build-module/modal/index.js.map +1 -1
  288. package/build-module/navigable-container/container.js +2 -2
  289. package/build-module/navigable-container/container.js.map +1 -1
  290. package/build-module/navigable-container/tabbable.js +1 -1
  291. package/build-module/navigable-container/tabbable.js.map +1 -1
  292. package/build-module/navigation/item/index.js +1 -1
  293. package/build-module/navigation/item/index.js.map +1 -1
  294. package/build-module/navigation/menu/index.js +1 -1
  295. package/build-module/navigation/menu/index.js.map +1 -1
  296. package/build-module/navigator/navigator-provider/component.js +2 -2
  297. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  298. package/build-module/navigator/navigator-screen/component.js +1 -1
  299. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  300. package/build-module/number-control/index.js +1 -1
  301. package/build-module/number-control/index.js.map +1 -1
  302. package/build-module/panel/body.js +2 -2
  303. package/build-module/panel/body.js.map +1 -1
  304. package/build-module/popover/index.js +3 -3
  305. package/build-module/popover/index.js.map +1 -1
  306. package/build-module/popover/utils.js +6 -6
  307. package/build-module/popover/utils.js.map +1 -1
  308. package/build-module/radio-group/index.js +1 -1
  309. package/build-module/radio-group/index.js.map +1 -1
  310. package/build-module/range-control/styles/range-control-styles.js +29 -29
  311. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  312. package/build-module/sandbox/index.js +5 -5
  313. package/build-module/sandbox/index.js.map +1 -1
  314. package/build-module/sandbox/index.native.js +1 -1
  315. package/build-module/sandbox/index.native.js.map +1 -1
  316. package/build-module/select-control/index.js +1 -1
  317. package/build-module/select-control/index.js.map +1 -1
  318. package/build-module/select-control/styles/select-control-styles.js +5 -5
  319. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  320. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  321. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  322. package/build-module/slot-fill/bubbles-virtually/slot.js +1 -1
  323. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  324. package/build-module/slot-fill/fill.js +1 -1
  325. package/build-module/slot-fill/fill.js.map +1 -1
  326. package/build-module/slot-fill/provider.js +1 -1
  327. package/build-module/slot-fill/provider.js.map +1 -1
  328. package/build-module/snackbar/index.js +1 -1
  329. package/build-module/snackbar/index.js.map +1 -1
  330. package/build-module/snackbar/list.js +1 -1
  331. package/build-module/snackbar/list.js.map +1 -1
  332. package/build-module/style-provider/index.js +2 -2
  333. package/build-module/style-provider/index.js.map +1 -1
  334. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -2
  335. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  336. package/build-module/toggle-group-control/toggle-group-control-option/component.js +1 -4
  337. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  338. package/build-module/toggle-group-control/toggle-group-control-option/styles.js +11 -17
  339. package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  340. package/build-module/toolbar/index.js +1 -1
  341. package/build-module/toolbar/index.js.map +1 -1
  342. package/build-module/tooltip/index.js +3 -3
  343. package/build-module/tooltip/index.js.map +1 -1
  344. package/build-module/tooltip/index.native.js +7 -7
  345. package/build-module/tooltip/index.native.js.map +1 -1
  346. package/build-module/tree-grid/index.js +4 -1
  347. package/build-module/tree-grid/index.js.map +1 -1
  348. package/build-module/truncate/utils.js +1 -1
  349. package/build-module/truncate/utils.js.map +1 -1
  350. package/build-module/ui/context/context-connect.js +9 -16
  351. package/build-module/ui/context/context-connect.js.map +1 -1
  352. package/build-module/ui/context/context-system-provider.js +2 -2
  353. package/build-module/ui/context/context-system-provider.js.map +1 -1
  354. package/build-module/ui/context/index.js.map +1 -1
  355. package/build-module/ui/utils/colors.js +2 -2
  356. package/build-module/ui/utils/colors.js.map +1 -1
  357. package/build-module/ui/utils/space.js +2 -2
  358. package/build-module/ui/utils/space.js.map +1 -1
  359. package/build-module/unit-control/index.js +39 -30
  360. package/build-module/unit-control/index.js.map +1 -1
  361. package/build-module/unit-control/index.native.js +5 -3
  362. package/build-module/unit-control/index.native.js.map +1 -1
  363. package/build-module/unit-control/unit-select-control.js +1 -1
  364. package/build-module/unit-control/unit-select-control.js.map +1 -1
  365. package/build-module/unit-control/utils.js +92 -100
  366. package/build-module/unit-control/utils.js.map +1 -1
  367. package/build-module/utils/breakpoint-values.js +1 -1
  368. package/build-module/utils/breakpoint-values.js.map +1 -1
  369. package/build-module/utils/colors-values.js +1 -1
  370. package/build-module/utils/colors-values.js.map +1 -1
  371. package/build-style/style-rtl.css +8 -0
  372. package/build-style/style.css +8 -0
  373. package/build-types/base-field/hook.d.ts +2 -1
  374. package/build-types/base-field/hook.d.ts.map +1 -1
  375. package/build-types/card/card/hook.d.ts +2 -1
  376. package/build-types/card/card/hook.d.ts.map +1 -1
  377. package/build-types/card/card-body/hook.d.ts +2 -1
  378. package/build-types/card/card-body/hook.d.ts.map +1 -1
  379. package/build-types/card/card-divider/hook.d.ts +2 -2
  380. package/build-types/card/card-footer/hook.d.ts +2 -1
  381. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  382. package/build-types/card/card-header/hook.d.ts +2 -1
  383. package/build-types/card/card-header/hook.d.ts.map +1 -1
  384. package/build-types/card/card-media/hook.d.ts +2 -1
  385. package/build-types/card/card-media/hook.d.ts.map +1 -1
  386. package/build-types/color-picker/styles.d.ts +2 -2
  387. package/build-types/confirm-dialog/component.d.ts +8 -0
  388. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  389. package/build-types/confirm-dialog/types.d.ts +2 -0
  390. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  391. package/build-types/divider/component.d.ts +2 -2
  392. package/build-types/divider/component.d.ts.map +1 -1
  393. package/build-types/divider/stories/index.d.ts +10 -0
  394. package/build-types/divider/stories/index.d.ts.map +1 -0
  395. package/build-types/divider/types.d.ts +1 -1
  396. package/build-types/divider/types.d.ts.map +1 -1
  397. package/build-types/elevation/hook.d.ts +2 -1
  398. package/build-types/elevation/hook.d.ts.map +1 -1
  399. package/build-types/flex/flex/hook.d.ts +2 -1
  400. package/build-types/flex/flex/hook.d.ts.map +1 -1
  401. package/build-types/flex/flex-block/hook.d.ts +2 -1
  402. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  403. package/build-types/flex/flex-item/hook.d.ts +2 -1
  404. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  405. package/build-types/flyout/flyout/hook.d.ts +2 -1
  406. package/build-types/flyout/flyout/hook.d.ts.map +1 -1
  407. package/build-types/grid/hook.d.ts +2 -1
  408. package/build-types/grid/hook.d.ts.map +1 -1
  409. package/build-types/h-stack/hook.d.ts +3 -2
  410. package/build-types/h-stack/hook.d.ts.map +1 -1
  411. package/build-types/heading/component.d.ts +3 -3
  412. package/build-types/heading/component.d.ts.map +1 -1
  413. package/build-types/heading/hook.d.ts +2 -1
  414. package/build-types/heading/hook.d.ts.map +1 -1
  415. package/build-types/heading/stories/index.d.ts +12 -0
  416. package/build-types/heading/stories/index.d.ts.map +1 -0
  417. package/build-types/input-control/index.d.ts +1 -1
  418. package/build-types/input-control/index.d.ts.map +1 -1
  419. package/build-types/input-control/input-field.d.ts +1 -1
  420. package/build-types/input-control/input-field.d.ts.map +1 -1
  421. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  422. package/build-types/item-group/item/hook.d.ts +2 -1
  423. package/build-types/item-group/item/hook.d.ts.map +1 -1
  424. package/build-types/item-group/item-group/hook.d.ts +2 -1
  425. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  426. package/build-types/navigator/navigator-back-button/hook.d.ts +2 -1
  427. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  428. package/build-types/navigator/navigator-button/hook.d.ts +2 -1
  429. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  430. package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
  431. package/build-types/scrollable/hook.d.ts +2 -1
  432. package/build-types/scrollable/hook.d.ts.map +1 -1
  433. package/build-types/select-control/index.d.ts +1 -1
  434. package/build-types/select-control/index.d.ts.map +1 -1
  435. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  436. package/build-types/spacer/hook.d.ts +2 -1
  437. package/build-types/spacer/hook.d.ts.map +1 -1
  438. package/build-types/surface/hook.d.ts +2 -1
  439. package/build-types/surface/hook.d.ts.map +1 -1
  440. package/build-types/text/hook.d.ts +2 -1
  441. package/build-types/text/hook.d.ts.map +1 -1
  442. package/build-types/text/types.d.ts +1 -2
  443. package/build-types/text/types.d.ts.map +1 -1
  444. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  445. package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts +0 -4
  446. package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
  447. package/build-types/tools-panel/tools-panel/hook.d.ts +2 -1
  448. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  449. package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -1
  450. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  451. package/build-types/tools-panel/tools-panel-item/hook.d.ts +2 -1
  452. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  453. package/build-types/truncate/hook.d.ts +2 -1
  454. package/build-types/truncate/hook.d.ts.map +1 -1
  455. package/build-types/ui/context/context-connect.d.ts +18 -16
  456. package/build-types/ui/context/context-connect.d.ts.map +1 -1
  457. package/build-types/ui/context/index.d.ts +4 -4
  458. package/build-types/ui/context/index.d.ts.map +1 -1
  459. package/build-types/ui/context/wordpress-component.d.ts +1 -0
  460. package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
  461. package/build-types/ui/control-group/hook.d.ts +2 -1
  462. package/build-types/ui/control-group/hook.d.ts.map +1 -1
  463. package/build-types/ui/control-label/hook.d.ts +2 -1
  464. package/build-types/ui/control-label/hook.d.ts.map +1 -1
  465. package/build-types/ui/form-group/use-form-group.d.ts +6 -4
  466. package/build-types/ui/form-group/use-form-group.d.ts.map +1 -1
  467. package/build-types/unit-control/index.d.ts +3 -3
  468. package/build-types/unit-control/index.d.ts.map +1 -1
  469. package/build-types/unit-control/types.d.ts +4 -6
  470. package/build-types/unit-control/types.d.ts.map +1 -1
  471. package/build-types/unit-control/utils.d.ts +47 -38
  472. package/build-types/unit-control/utils.d.ts.map +1 -1
  473. package/build-types/v-stack/hook.d.ts +2 -1
  474. package/build-types/v-stack/hook.d.ts.map +1 -1
  475. package/package.json +18 -18
  476. package/src/alignment-matrix-control/utils.js +1 -1
  477. package/src/angle-picker-control/angle-circle.js +1 -1
  478. package/src/animation/index.js +0 -1
  479. package/src/autocomplete/get-default-use-items.js +3 -3
  480. package/src/base-field/hook.js +1 -1
  481. package/src/box-control/icon.js +1 -1
  482. package/src/box-control/index.js +5 -5
  483. package/src/box-control/test/index.js +27 -7
  484. package/src/box-control/utils.js +13 -9
  485. package/src/button/index.js +5 -5
  486. package/src/button/index.native.js +7 -7
  487. package/src/button/style.scss +1 -0
  488. package/src/color-palette/style.scss +1 -0
  489. package/src/color-picker/color-display.tsx +1 -1
  490. package/src/color-picker/styles.ts +1 -1
  491. package/src/color-picker/test/index.js +1 -1
  492. package/src/combobox-control/index.js +1 -1
  493. package/src/combobox-control/style.scss +1 -0
  494. package/src/confirm-dialog/README.md +56 -45
  495. package/src/confirm-dialog/component.tsx +4 -2
  496. package/src/confirm-dialog/stories/index.js +19 -0
  497. package/src/confirm-dialog/test/index.js +28 -0
  498. package/src/confirm-dialog/types.ts +2 -0
  499. package/src/date-time/style.scss +4 -0
  500. package/src/date-time/time.js +16 -5
  501. package/src/dimension-control/test/index.test.js +1 -1
  502. package/src/disabled/test/index.js +1 -1
  503. package/src/divider/component.tsx +3 -3
  504. package/src/divider/stories/index.tsx +70 -0
  505. package/src/divider/types.ts +3 -1
  506. package/src/draggable/index.js +3 -3
  507. package/src/draggable/stories/index.js +1 -1
  508. package/src/flyout/flyout/README.md +1 -1
  509. package/src/flyout/test/index.js +1 -1
  510. package/src/focal-point-picker/index.native.js +7 -7
  511. package/src/focal-point-picker/tooltip/index.native.js +1 -1
  512. package/src/font-size-picker/README.md +1 -2
  513. package/src/font-size-picker/index.js +1 -1
  514. package/src/font-size-picker/stories/index.js +87 -108
  515. package/src/font-size-picker/test/index.js +0 -2
  516. package/src/form-token-field/index.js +6 -6
  517. package/src/form-token-field/style.scss +1 -0
  518. package/src/form-token-field/suggestions-list.js +2 -2
  519. package/src/form-token-field/test/index.js +6 -6
  520. package/src/heading/component.tsx +4 -4
  521. package/src/heading/hook.ts +1 -1
  522. package/src/heading/stories/index.tsx +37 -0
  523. package/src/higher-order/with-filters/test/index.js +1 -1
  524. package/src/higher-order/with-focus-outside/test/index.js +1 -1
  525. package/src/higher-order/with-notices/index.js +1 -1
  526. package/src/higher-order/with-notices/test/index.js +3 -3
  527. package/src/index.js +4 -4
  528. package/src/index.native.js +4 -4
  529. package/src/input-control/input-base.tsx +1 -1
  530. package/src/input-control/input-field.tsx +12 -9
  531. package/src/input-control/styles/input-control-styles.tsx +1 -0
  532. package/src/input-control/test/index.js +4 -4
  533. package/src/isolated-event-container/index.js +1 -1
  534. package/src/item-group/test/index.js +0 -1
  535. package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  536. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  537. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  538. package/src/mobile/bottom-sheet/index.native.js +11 -11
  539. package/src/mobile/bottom-sheet/link-cell.native.js +1 -1
  540. package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  541. package/src/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  542. package/src/mobile/global-styles-context/utils.native.js +10 -10
  543. package/src/mobile/gradient/index.native.js +2 -2
  544. package/src/mobile/html-text-input/container.ios.js +3 -3
  545. package/src/mobile/html-text-input/index.native.js +1 -1
  546. package/src/mobile/html-text-input/test/index.native.js +14 -14
  547. package/src/mobile/image/index.native.js +1 -1
  548. package/src/mobile/image/style.native.scss +1 -0
  549. package/src/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  550. package/src/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  551. package/src/mobile/link-picker/index.native.js +3 -3
  552. package/src/mobile/link-picker/link-picker-results.native.js +8 -8
  553. package/src/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  554. package/src/mobile/link-settings/index.native.js +1 -2
  555. package/src/mobile/link-settings/test/edit.native.js +15 -15
  556. package/src/modal/aria-helper.js +1 -1
  557. package/src/modal/index.js +2 -2
  558. package/src/navigable-container/container.js +2 -2
  559. package/src/navigable-container/tabbable.js +1 -1
  560. package/src/navigable-container/test/menu.js +5 -5
  561. package/src/navigable-container/test/tabbable.js +2 -2
  562. package/src/navigation/item/index.js +1 -1
  563. package/src/navigation/menu/index.js +1 -1
  564. package/src/navigation/stories/controlled-state.js +2 -2
  565. package/src/navigator/navigator-provider/component.tsx +1 -1
  566. package/src/navigator/navigator-screen/component.tsx +2 -2
  567. package/src/navigator/test/index.js +18 -19
  568. package/src/navigator/types.ts +1 -1
  569. package/src/number-control/index.js +1 -1
  570. package/src/panel/body.js +2 -2
  571. package/src/popover/index.js +3 -3
  572. package/src/popover/utils.js +6 -6
  573. package/src/radio-group/index.js +1 -1
  574. package/src/range-control/stories/index.js +1 -1
  575. package/src/range-control/styles/range-control-styles.js +1 -1
  576. package/src/range-control/test/index.js +2 -2
  577. package/src/sandbox/index.js +5 -5
  578. package/src/sandbox/index.native.js +1 -1
  579. package/src/select-control/index.tsx +1 -1
  580. package/src/select-control/styles/select-control-styles.ts +1 -0
  581. package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  582. package/src/slot-fill/bubbles-virtually/slot.js +1 -2
  583. package/src/slot-fill/fill.js +1 -1
  584. package/src/slot-fill/provider.js +1 -1
  585. package/src/snackbar/index.js +1 -1
  586. package/src/snackbar/list.js +1 -1
  587. package/src/style-provider/index.js +2 -2
  588. package/src/tab-panel/test/index.js +1 -1
  589. package/src/text/test/index.js +2 -2
  590. package/src/text/types.ts +6 -8
  591. package/src/text-highlight/test/index.js +4 -4
  592. package/src/toggle-control/test/index.js +3 -3
  593. package/src/toggle-group-control/test/__snapshots__/index.js.snap +1 -27
  594. package/src/toggle-group-control/toggle-group-control/component.tsx +2 -2
  595. package/src/toggle-group-control/toggle-group-control-option/component.tsx +1 -4
  596. package/src/toggle-group-control/toggle-group-control-option/styles.ts +1 -12
  597. package/src/toolbar/index.js +1 -1
  598. package/src/toolbar-group/test/index.js +2 -2
  599. package/src/tooltip/index.js +3 -3
  600. package/src/tooltip/index.native.js +7 -7
  601. package/src/tooltip/test/index.js +2 -2
  602. package/src/tooltip/test/index.native.js +2 -2
  603. package/src/tree-grid/README.md +1 -1
  604. package/src/tree-grid/index.js +4 -0
  605. package/src/tree-grid/test/__snapshots__/index.js.snap +1 -1
  606. package/src/tree-grid/test/index.js +128 -52
  607. package/src/truncate/utils.js +1 -1
  608. package/src/ui/context/{context-connect.js → context-connect.ts} +27 -16
  609. package/src/ui/context/context-system-provider.js +2 -2
  610. package/src/ui/context/{index.js → index.ts} +0 -0
  611. package/src/ui/context/wordpress-component.ts +1 -0
  612. package/src/ui/tooltip/test/index.js +4 -4
  613. package/src/ui/utils/colors.js +2 -2
  614. package/src/ui/utils/space.ts +2 -2
  615. package/src/unit-control/README.md +1 -1
  616. package/src/unit-control/index.native.js +5 -3
  617. package/src/unit-control/index.tsx +64 -35
  618. package/src/unit-control/test/index.js +102 -3
  619. package/src/unit-control/test/utils.js +56 -15
  620. package/src/unit-control/types.ts +5 -8
  621. package/src/unit-control/unit-select-control.tsx +1 -1
  622. package/src/unit-control/utils.ts +128 -125
  623. package/src/utils/breakpoint-values.js +1 -1
  624. package/src/utils/colors-values.js +1 -1
  625. package/src/utils/hooks/test/use-controlled-state.js +1 -1
  626. package/src/utils/hooks/test/use-controlled-value.js +3 -3
  627. package/src/utils/hooks/test/use-latest-ref.js +1 -1
  628. package/src/utils/test/math.js +2 -2
  629. package/src/utils/test/rtl.js +12 -12
  630. package/tsconfig.json +1 -1
  631. package/tsconfig.tsbuildinfo +1 -1
  632. package/src/divider/stories/index.js +0 -64
  633. package/src/heading/stories/index.js +0 -24
@@ -22,7 +22,7 @@ const assertExpectedHtml = ( wrapper, expectedHTML ) => {
22
22
  expect( element.outerHTML ).toBe( expectedHTML );
23
23
  };
24
24
 
25
- // this is needed because TestUtils does not accept a stateless component.
25
+ // This is needed because TestUtils does not accept a stateless component.
26
26
  // anything run through a HOC ends up as a stateless component.
27
27
  const getTestComponent = ( WrappedComponent ) => {
28
28
  class TestComponent extends Component {
@@ -36,7 +36,7 @@ describe( 'withFocusOutside', () => {
36
36
  }
37
37
  );
38
38
 
39
- // this is needed because TestUtils does not accept a stateless component.
39
+ // This is needed because TestUtils does not accept a stateless component.
40
40
  // anything run through a HOC ends up as a stateless component.
41
41
  const getTestComponent = ( WrappedComponent, props ) => {
42
42
  class TestComponent extends Component {
@@ -95,7 +95,7 @@ export default createHigherOrderComponent( ( OriginalComponent ) => {
95
95
 
96
96
  let isForwardRef;
97
97
  const { render } = OriginalComponent;
98
- // Returns a forwardRef if OriginalComponent appears to be a forwardRef
98
+ // Returns a forwardRef if OriginalComponent appears to be a forwardRef.
99
99
  if ( typeof render === 'function' ) {
100
100
  isForwardRef = true;
101
101
  return forwardRef( Component );
@@ -24,7 +24,7 @@ import {
24
24
  */
25
25
  import withNotices from '..';
26
26
 
27
- // Implementation detail of Notice component used to query the dismissal button
27
+ // Implementation detail of Notice component used to query the dismissal button.
28
28
  const stockDismissText = 'Dismiss this notice';
29
29
 
30
30
  function noticesFrom( list ) {
@@ -151,13 +151,13 @@ describe( 'withNotices rendering', () => {
151
151
  const [ buttonRemoveFirst ] = getAllByLabelText( stockDismissText );
152
152
  const getRemovalTarget = () =>
153
153
  within( container ).getByText(
154
- // the last item corresponds to the first notice in the DOM
154
+ // The last item corresponds to the first notice in the DOM.
155
155
  messages[ messages.length - 1 ]
156
156
  );
157
157
  expect(
158
158
  await waitForElementToBeRemoved( () => {
159
159
  const target = getRemovalTarget();
160
- // Removes the first notice in the DOM
160
+ // Removes the first notice in the DOM.
161
161
  fireEvent.click( buttonRemoveFirst );
162
162
  return target;
163
163
  } ).then( () => true )
package/src/index.js CHANGED
@@ -1,4 +1,4 @@
1
- // Primitives
1
+ // Primitives.
2
2
  export {
3
3
  SVG,
4
4
  Path,
@@ -10,7 +10,7 @@ export {
10
10
  BlockQuotation,
11
11
  } from '@wordpress/primitives';
12
12
 
13
- // Components
13
+ // Components.
14
14
  export { default as __experimentalAlignmentMatrixControl } from './alignment-matrix-control';
15
15
  export {
16
16
  default as Animate,
@@ -163,7 +163,7 @@ export { Truncate as __experimentalTruncate } from './truncate';
163
163
  export {
164
164
  default as __experimentalUnitControl,
165
165
  useCustomUnits as __experimentalUseCustomUnits,
166
- parseUnit as __experimentalParseUnit,
166
+ parseQuantityAndUnitFromRawValue as __experimentalParseQuantityAndUnitFromRawValue,
167
167
  } from './unit-control';
168
168
  export { View as __experimentalView } from './view';
169
169
  export { VisuallyHidden } from './visually-hidden';
@@ -179,7 +179,7 @@ export {
179
179
  export { default as __experimentalStyleProvider } from './style-provider';
180
180
  export { ZStack as __experimentalZStack } from './z-stack';
181
181
 
182
- // Higher-Order Components
182
+ // Higher-Order Components.
183
183
  export {
184
184
  default as navigateRegions,
185
185
  useNavigateRegions as __unstableUseNavigateRegions,
@@ -62,7 +62,7 @@ export {
62
62
  } from './unit-control/utils';
63
63
  export { default as Disabled } from './disabled';
64
64
 
65
- // Higher-Order Components
65
+ // Higher-Order Components.
66
66
  export { default as withConstrainedTabbing } from './higher-order/with-constrained-tabbing';
67
67
  export { default as withFallbackStyles } from './higher-order/with-fallback-styles';
68
68
  export { default as withFilters } from './higher-order/with-filters';
@@ -73,7 +73,7 @@ export { default as withNotices } from './higher-order/with-notices';
73
73
  export { default as withSpokenMessages } from './higher-order/with-spoken-messages';
74
74
  export * from './text';
75
75
 
76
- // Mobile Components
76
+ // Mobile Components.
77
77
  export {
78
78
  __unstableAutocompletionItemsFill,
79
79
  __unstableAutocompletionItemsSlot,
@@ -113,7 +113,7 @@ export { default as AudioPlayer } from './mobile/audio-player';
113
113
  export { default as Badge } from './mobile/badge';
114
114
  export { default as Gridicons } from './mobile/gridicons';
115
115
 
116
- // Utils
116
+ // Utils.
117
117
  export { colorsUtils } from './mobile/color-settings/utils';
118
118
  export {
119
119
  WIDE_ALIGNMENTS,
@@ -121,7 +121,7 @@ export {
121
121
  alignmentHelpers,
122
122
  } from './mobile/utils/alignments';
123
123
 
124
- // Hooks
124
+ // Hooks.
125
125
  export {
126
126
  convertUnitToMobile,
127
127
  useConvertUnitToMobile,
@@ -72,7 +72,7 @@ export function InputBase(
72
72
  const hideLabel = hideLabelFromVision || ! label;
73
73
 
74
74
  return (
75
- // @ts-expect-error The `direction` prop from Flex (FlexDirection) conflicts with legacy SVGAttributes `direction` (string) that come from React intrinsic prop definitions
75
+ // @ts-expect-error The `direction` prop from Flex (FlexDirection) conflicts with legacy SVGAttributes `direction` (string) that come from React intrinsic prop definitions.
76
76
  <Root
77
77
  { ...props }
78
78
  { ...getUIFlexProps( labelPosition ) }
@@ -17,7 +17,7 @@ import type {
17
17
  * WordPress dependencies
18
18
  */
19
19
  import { forwardRef, useRef } from '@wordpress/element';
20
- import { UP, DOWN, ENTER } from '@wordpress/keycodes';
20
+ import { UP, DOWN, ENTER, ESCAPE } from '@wordpress/keycodes';
21
21
  /**
22
22
  * Internal dependencies
23
23
  */
@@ -25,7 +25,6 @@ import type { WordPressComponentProps } from '../ui/context';
25
25
  import { useDragCursor } from './utils';
26
26
  import { Input } from './styles/input-control-styles';
27
27
  import { useInputControlStateReducer } from './reducer/reducer';
28
- import { isValueEmpty } from '../utils/values';
29
28
  import { useUpdateEffect } from '../utils';
30
29
  import type { InputFieldProps } from './types';
31
30
 
@@ -56,9 +55,9 @@ function InputField(
56
55
  ref: ForwardedRef< HTMLInputElement >
57
56
  ) {
58
57
  const {
59
- // State
58
+ // State.
60
59
  state,
61
- // Actions
60
+ // Actions.
62
61
  change,
63
62
  commit,
64
63
  drag,
@@ -112,11 +111,7 @@ function InputField(
112
111
  */
113
112
  if ( isPressEnterToChange && isDirty ) {
114
113
  wasDirtyOnBlur.current = true;
115
- if ( ! isValueEmpty( value ) ) {
116
- handleOnCommit( event );
117
- } else {
118
- reset( valueProp, event );
119
- }
114
+ handleOnCommit( event );
120
115
  }
121
116
  };
122
117
 
@@ -162,6 +157,13 @@ function InputField(
162
157
  handleOnCommit( event );
163
158
  }
164
159
  break;
160
+
161
+ case ESCAPE:
162
+ if ( isPressEnterToChange && isDirty ) {
163
+ event.preventDefault();
164
+ reset( valueProp, event );
165
+ }
166
+ break;
165
167
  }
166
168
  };
167
169
 
@@ -191,6 +193,7 @@ function InputField(
191
193
  }
192
194
  },
193
195
  {
196
+ axis: dragDirection === 'e' || dragDirection === 'w' ? 'x' : 'y',
194
197
  threshold: dragThreshold,
195
198
  enabled: isDragEnabled,
196
199
  pointer: { capture: false },
@@ -212,6 +212,7 @@ export const Input = styled.input< InputProps >`
212
212
  box-shadow: none !important;
213
213
  color: ${ COLORS.black };
214
214
  display: block;
215
+ font-family: inherit;
215
216
  margin: 0;
216
217
  outline: none;
217
218
  width: 100%;
@@ -77,10 +77,10 @@ describe( 'InputControl', () => {
77
77
  input.focus();
78
78
  fireEvent.change( input, { target: { value: 'two' } } );
79
79
 
80
- // Ensuring <InputControl /> is controlled
80
+ // Ensuring <InputControl /> is controlled.
81
81
  fireEvent.blur( input );
82
82
 
83
- // Updating the value
83
+ // Updating the value.
84
84
  rerender( <InputControl value="three" onChange={ spy } /> );
85
85
 
86
86
  expect( input.value ).toBe( 'three' );
@@ -103,12 +103,12 @@ describe( 'InputControl', () => {
103
103
 
104
104
  // Assuming <InputControl /> is controlled (not focused)
105
105
 
106
- // Updating the value
106
+ // Updating the value.
107
107
  rerender( <InputControl value="New" onChange={ spy } /> );
108
108
 
109
109
  expect( input.value ).toBe( 'New' );
110
110
 
111
- // Change it back to the original value
111
+ // Change it back to the original value.
112
112
  rerender( <InputControl value="Original" onChange={ spy } /> );
113
113
 
114
114
  expect( input.value ).toBe( 'Original' );
@@ -14,7 +14,7 @@ export default forwardRef( ( { children, ...props }, ref ) => {
14
14
  } );
15
15
 
16
16
  // Disable reason: this stops certain events from propagating outside of the component.
17
- // - onMouseDown is disabled as this can cause interactions with other DOM elements
17
+ // - onMouseDown is disabled as this can cause interactions with other DOM elements.
18
18
  /* eslint-disable jsx-a11y/no-static-element-interactions */
19
19
  return (
20
20
  <div { ...props } ref={ ref } onMouseDown={ stopPropagation }>
@@ -7,7 +7,6 @@ import { fireEvent, render, screen } from '@testing-library/react';
7
7
  * Internal dependencies
8
8
  */
9
9
  import { Item, ItemGroup } from '..';
10
- // import { CONFIG } from '../../utils';
11
10
 
12
11
  describe( 'ItemGroup', () => {
13
12
  describe( 'ItemGroup component', () => {
@@ -19,18 +19,18 @@ if (
19
19
  // Context in BottomSheet is necessary for controlling the
20
20
  // transition flow between subsheets and replacing a content inside them
21
21
  export const BottomSheetContext = createContext( {
22
- // Specifies whether content is currently scrolling
22
+ // Specifies whether content is currently scrolling.
23
23
  isBottomSheetContentScrolling: false,
24
- // Function called to enable scroll within bottom sheet
24
+ // Function called to enable scroll within bottom sheet.
25
25
  shouldEnableBottomSheetScroll: () => {},
26
26
  // Function called to enable/disable bottom sheet max height.
27
27
  // E.g. used to extend bottom sheet on full screen in ColorPicker,
28
28
  // which is helpful on small devices with set the largest font/display size.
29
29
  shouldEnableBottomSheetMaxHeight: () => {},
30
- // Callback that is called on closing bottom sheet
30
+ // Callback that is called on closing bottom sheet.
31
31
  onHandleClosingBottomSheet: () => {},
32
32
  // Android only: Function called to control android hardware back button functionality
33
- // Return true if the bottom-sheet default close action shouldn't be called
33
+ // Return true if the bottom-sheet default close action shouldn't be called.
34
34
  onHandleHardwareButtonPress: () => {},
35
35
  // Toggle full-screen styles and dimensions
36
36
  setIsFullScreen: () => {},
@@ -87,7 +87,7 @@ function BottomSheetNavigationContainer( {
87
87
 
88
88
  const setHeight = useCallback(
89
89
  ( height ) => {
90
- // The screen is fullHeight
90
+ // The screen is fullHeight.
91
91
  if (
92
92
  typeof height === 'string' &&
93
93
  typeof height !== typeof currentHeight
@@ -190,7 +190,7 @@ class BottomSheetCell extends Component {
190
190
  };
191
191
 
192
192
  const separatorStyle = () => {
193
- //eslint-disable-next-line @wordpress/no-unused-vars-before-return
193
+ // eslint-disable-next-line @wordpress/no-unused-vars-before-return
194
194
  const defaultSeparatorStyle = this.props.getStylesFromColorScheme(
195
195
  styles.separator,
196
196
  styles.separatorDark
@@ -121,9 +121,9 @@ class BottomSheet extends Component {
121
121
 
122
122
  if ( duration && easing ) {
123
123
  // This layout animation is the same as the React Native's KeyboardAvoidingView component.
124
- // Reference: https://github.com/facebook/react-native/blob/266b21baf35e052ff28120f79c06c4f6dddc51a9/Libraries/Components/Keyboard/KeyboardAvoidingView.js#L119-L128
124
+ // Reference: https://github.com/facebook/react-native/blob/266b21baf35e052ff28120f79c06c4f6dddc51a9/Libraries/Components/Keyboard/KeyboardAvoidingView.js#L119-L128.
125
125
  const animationConfig = {
126
- // We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m
126
+ // We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m.
127
127
  duration: duration > 10 ? duration : 10,
128
128
  type: LayoutAnimation.Types[ easing ] || 'keyboard',
129
129
  };
@@ -151,7 +151,7 @@ class BottomSheet extends Component {
151
151
  // preexisting bug: https://git.io/JMPCV
152
152
  // this.performRegularLayoutAnimation( {
153
153
  // useLastLayoutAnimation: false,
154
- // } );
154
+ // } );.
155
155
  }
156
156
  }
157
157
 
@@ -195,7 +195,7 @@ class BottomSheet extends Component {
195
195
  );
196
196
 
197
197
  // 'Will' keyboard events are not available on Android.
198
- // Reference: https://reactnative.dev/docs/0.61/keyboard#addlistener
198
+ // Reference: https://reactnative.dev/docs/0.61/keyboard#addlistener.
199
199
  this.keyboardShowListener = Keyboard.addListener(
200
200
  Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow',
201
201
  this.keyboardShow
@@ -249,7 +249,7 @@ class BottomSheet extends Component {
249
249
  const statusBarHeight =
250
250
  Platform.OS === 'android' ? StatusBar.currentHeight : 0;
251
251
 
252
- // `maxHeight` when modal is opened along with a keyboard
252
+ // `maxHeight` when modal is opened along with a keyboard.
253
253
  const maxHeightWithOpenKeyboard =
254
254
  0.95 *
255
255
  ( Dimensions.get( 'window' ).height -
@@ -257,7 +257,7 @@ class BottomSheet extends Component {
257
257
  statusBarHeight -
258
258
  this.headerHeight );
259
259
 
260
- // In landscape orientation, set `maxHeight` to ~96% of the height
260
+ // In landscape orientation, set `maxHeight` to ~96% of the height.
261
261
  if ( width > height ) {
262
262
  this.setState( {
263
263
  maxHeight: Math.min(
@@ -265,7 +265,7 @@ class BottomSheet extends Component {
265
265
  maxHeightWithOpenKeyboard
266
266
  ),
267
267
  } );
268
- // In portrait orientation, set `maxHeight` to ~59% of the height
268
+ // In portrait orientation, set `maxHeight` to ~59% of the height.
269
269
  } else {
270
270
  this.setState( {
271
271
  maxHeight: Math.min(
@@ -419,7 +419,7 @@ class BottomSheet extends Component {
419
419
  const panResponder = PanResponder.create( {
420
420
  onMoveShouldSetPanResponder: ( evt, gestureState ) => {
421
421
  // 'swiping-to-close' option is temporarily and partially disabled
422
- // on Android ( swipe / drag is still available in the top most area - near drag indicator)
422
+ // on Android ( swipe / drag is still available in the top most area - near drag indicator).
423
423
  if ( Platform.OS === 'ios' ) {
424
424
  // Activates swipe down over child Touchables if the swipe is long enough.
425
425
  // With this we can adjust sensibility on the swipe vs tap gestures.
@@ -449,7 +449,7 @@ class BottomSheet extends Component {
449
449
  listStyle = { maxHeight };
450
450
 
451
451
  // Allow setting a "static" height of the bottom sheet
452
- // by settting the min height to the max height.
452
+ // by setting the min height to the max height.
453
453
  if ( this.props.setMinHeightToMaxHeight ) {
454
454
  listStyle.minHeight = maxHeight;
455
455
  }
@@ -495,12 +495,12 @@ class BottomSheet extends Component {
495
495
  );
496
496
 
497
497
  const showDragIndicator = () => {
498
- // if iOS or not fullscreen show the drag indicator
498
+ // If iOS or not fullscreen show the drag indicator.
499
499
  if ( Platform.OS === 'ios' || ! this.state.isFullScreen ) {
500
500
  return true;
501
501
  }
502
502
 
503
- // Otherwise check the allowDragIndicator
503
+ // Otherwise check the allowDragIndicator.
504
504
  return this.props.allowDragIndicator;
505
505
  };
506
506
 
@@ -22,7 +22,7 @@ export default function LinkCell( {
22
22
  <Cell
23
23
  icon={ showIcon && link }
24
24
  label={ __( 'Link to' ) }
25
- // since this is not actually editable, we treat value as a placeholder
25
+ // Since this is not actually editable, we treat value as a placeholder.
26
26
  value={ valueMask || value || __( 'Search or type URL' ) }
27
27
  valueStyle={
28
28
  !! ( value || valueMask ) ? undefined : placeholderColor
@@ -38,7 +38,7 @@ const getSummaryForType = ( type ) => {
38
38
  }
39
39
  };
40
40
 
41
- // we use some Cell styles here with a column flex-direction
41
+ // We use some Cell styles here with a column flex-direction.
42
42
  function LinkSuggestionItemCell( { suggestion, onLinkPicked, ...props } ) {
43
43
  const { title: contentTitle, url, type, isDirectEntry } = suggestion;
44
44
  const title = isDirectEntry ? url : contentTitle;
@@ -89,6 +89,6 @@ function DismissButton( { onPress, iosText } ) {
89
89
  }
90
90
 
91
91
  Button.Back = BackButton;
92
- Button.Dismiss = DismissButton; // Cancel or Close Button
92
+ Button.Dismiss = DismissButton; // Cancel or Close Button.
93
93
 
94
94
  export default Button;
@@ -21,7 +21,7 @@ export const BLOCK_STYLE_ATTRIBUTES = [
21
21
  'fontSize',
22
22
  ];
23
23
 
24
- // Mapping style properties name to native
24
+ // Mapping style properties name to native.
25
25
  const BLOCK_STYLE_ATTRIBUTES_MAPPING = {
26
26
  textColor: 'color',
27
27
  text: 'color',
@@ -51,7 +51,7 @@ export function getBlockPaddings(
51
51
  return blockPaddings;
52
52
  }
53
53
 
54
- // Prevent adding extra paddings to inner blocks without background colors
54
+ // Prevent adding extra paddings to inner blocks without background colors.
55
55
  if (
56
56
  mergedStyle?.padding &&
57
57
  ! wrapperPropsStyle?.backgroundColor &&
@@ -74,7 +74,7 @@ export function getBlockColors(
74
74
  const customBlockStyles = blockStyleAttributes?.style?.color || {};
75
75
  const blockGlobalStyles = baseGlobalStyles?.blocks?.[ blockName ];
76
76
 
77
- // Global styles colors
77
+ // Global styles colors.
78
78
  if ( blockGlobalStyles?.color ) {
79
79
  Object.entries( blockGlobalStyles.color ).forEach(
80
80
  ( [ key, value ] ) => {
@@ -91,7 +91,7 @@ export function getBlockColors(
91
91
  baseGlobalStyles?.styles?.color?.text;
92
92
  }
93
93
 
94
- // Global styles elements
94
+ // Global styles elements.
95
95
  if ( blockGlobalStyles?.elements ) {
96
96
  const linkColor = blockGlobalStyles.elements?.link?.color?.text;
97
97
  const styleKey = BLOCK_STYLE_ATTRIBUTES_MAPPING.link;
@@ -101,7 +101,7 @@ export function getBlockColors(
101
101
  }
102
102
  }
103
103
 
104
- // Custom colors
104
+ // Custom colors.
105
105
  Object.entries( blockStyleAttributes ).forEach( ( [ key, value ] ) => {
106
106
  const isCustomColor = startsWith( value, '#' );
107
107
  let styleKey = key;
@@ -123,7 +123,7 @@ export function getBlockColors(
123
123
  }
124
124
  } );
125
125
 
126
- // Color placeholder
126
+ // Color placeholder.
127
127
  if ( blockStyles?.color ) {
128
128
  blockStyles[ BLOCK_STYLE_ATTRIBUTES_MAPPING.placeholder ] =
129
129
  blockStyles.color;
@@ -142,7 +142,7 @@ export function getBlockTypography(
142
142
  const customBlockStyles = blockStyleAttributes?.style?.typography || {};
143
143
  const blockGlobalStyles = baseGlobalStyles?.blocks?.[ blockName ];
144
144
 
145
- // Global styles
145
+ // Global styles.
146
146
  if ( blockGlobalStyles?.typography ) {
147
147
  const fontSize = blockGlobalStyles?.typography?.fontSize;
148
148
  const lineHeight = blockGlobalStyles?.typography?.lineHeight;
@@ -176,7 +176,7 @@ export function getBlockTypography(
176
176
  }
177
177
  }
178
178
 
179
- // Custom styles
179
+ // Custom styles.
180
180
  if ( customBlockStyles?.fontSize ) {
181
181
  typographyStyles.fontSize = customBlockStyles?.fontSize;
182
182
  }
@@ -225,7 +225,7 @@ export function parseStylesVariables( styles, mappedValues, customValues ) {
225
225
  return get( customValuesData, path );
226
226
  }
227
227
 
228
- // Check for camelcase properties
228
+ // Check for camelcase properties.
229
229
  return get( customValuesData, [
230
230
  ...path.slice( 0, path.length - 1 ),
231
231
  camelCase( path[ path.length - 1 ] ),
@@ -281,7 +281,7 @@ export function getMappedValues( features, palette ) {
281
281
  * @return {Object} normalized sizes.
282
282
  */
283
283
  function normalizeFontSizes( fontSizes ) {
284
- // Adds normalized PX values for each of the different keys
284
+ // Adds normalized PX values for each of the different keys.
285
285
  if ( ! fontSizes ) {
286
286
  return fontSizes;
287
287
  }
@@ -60,7 +60,7 @@ export function getGradientColorGroup( gradientValue ) {
60
60
  const excludeSideOrCorner = /linear-gradient\(to\s+([a-z\s]+,)/;
61
61
 
62
62
  // Parser has some difficulties with angle defined as a side or corner (e.g. `to left`)
63
- // so it's going to be excluded in order to matching color groups
63
+ // so it's going to be excluded in order to matching color groups.
64
64
  const modifiedGradientValue = gradientValue.replace(
65
65
  excludeSideOrCorner,
66
66
  'linear-gradient('
@@ -151,7 +151,7 @@ function Gradient( {
151
151
  <SVG>
152
152
  <Defs>
153
153
  <RadialGradient
154
- //eslint-disable-next-line no-restricted-syntax
154
+ // eslint-disable-next-line no-restricted-syntax
155
155
  id="radialGradient"
156
156
  gradientUnits="userSpaceOnUse"
157
157
  rx="70%"
@@ -23,9 +23,9 @@ class HTMLInputContainer extends Component {
23
23
 
24
24
  onPanResponderMove: ( e, gestureState ) => {
25
25
  if ( gestureState.dy > 100 && gestureState.dy < 110 ) {
26
- //Keyboard.dismiss() and this.textInput.blur() are not working here
27
- //They require to know the currentlyFocusedID under the hood but
28
- //during this gesture there's no currentlyFocusedID
26
+ // Keyboard.dismiss() and this.textInput.blur() are not working here
27
+ // They require to know the currentlyFocusedID under the hood but
28
+ // during this gesture there's no currentlyFocusedID.
29
29
  UIManager.blur( e.target );
30
30
  }
31
31
  },
@@ -52,7 +52,7 @@ export class HTMLTextInput extends Component {
52
52
 
53
53
  componentWillUnmount() {
54
54
  removeFilter( 'native.persist-html', 'html-text-input' );
55
- //TODO: Blocking main thread
55
+ // TODO: Blocking main thread.
56
56
  this.stopEditing();
57
57
  }
58
58
 
@@ -8,12 +8,12 @@ import { render, fireEvent } from 'test/helpers';
8
8
  */
9
9
  import { HTMLTextInput } from '..';
10
10
 
11
- // Finds the Content TextInput in our HTMLInputView
11
+ // Finds the Content TextInput in our HTMLInputView.
12
12
  const findContentTextInput = ( screen ) => {
13
13
  return screen.getByA11yLabel( 'html-view-content' );
14
14
  };
15
15
 
16
- // Finds the Title TextInput in our HTMLInputView
16
+ // Finds the Title TextInput in our HTMLInputView.
17
17
  const findTitleTextInput = ( screen ) => {
18
18
  return screen.getByA11yLabel( 'html-view-title' );
19
19
  };
@@ -43,11 +43,11 @@ describe( 'HTMLTextInput', () => {
43
43
  />
44
44
  );
45
45
 
46
- // Simulate user typing text
46
+ // Simulate user typing text.
47
47
  const htmlTextInput = findContentTextInput( screen );
48
48
  fireEvent( htmlTextInput, 'changeText', 'text' );
49
49
 
50
- //Check if the onChange is called and the state is updated
50
+ // Check if the onChange is called and the state is updated.
51
51
  expect( onChange ).toHaveBeenCalledTimes( 1 );
52
52
  expect( onChange ).toHaveBeenCalledWith( 'text' );
53
53
 
@@ -65,15 +65,15 @@ describe( 'HTMLTextInput', () => {
65
65
  />
66
66
  );
67
67
 
68
- // Simulate user typing text
68
+ // Simulate user typing text.
69
69
  const htmlTextInput = findContentTextInput( screen );
70
70
  fireEvent( htmlTextInput, 'changeText', 'text' );
71
71
 
72
- //Simulate blur event
72
+ //Simulate blur event.
73
73
  fireEvent( htmlTextInput, 'blur' );
74
74
 
75
- //Normally prop.value is updated with the help of withSelect
76
- //But we don't have it in tests so we just simulate it
75
+ // Normally prop.value is updated with the help of withSelect
76
+ // but we don't have it in tests so we just simulate it.
77
77
  screen.update(
78
78
  <HTMLTextInput
79
79
  onPersist={ onPersist }
@@ -83,17 +83,17 @@ describe( 'HTMLTextInput', () => {
83
83
  />
84
84
  );
85
85
 
86
- //Check if the onPersist is called and the state is updated
86
+ // Check if the onPersist is called and the state is updated.
87
87
  expect( onPersist ).toHaveBeenCalledTimes( 1 );
88
88
  expect( onPersist ).toHaveBeenCalledWith( 'text' );
89
89
 
90
- //Simulate blur event
90
+ //Simulate blur event.
91
91
  fireEvent( htmlTextInput, 'blur' );
92
92
 
93
- // Check that onPersist is not called for non-dirty state
93
+ // Check that onPersist is not called for non-dirty state.
94
94
  expect( onPersist ).toHaveBeenCalledTimes( 1 );
95
95
 
96
- //We expect state.value is getting propagated from prop.value
96
+ // We expect state.value is getting propagated from prop.value.
97
97
  expect( screen.getByDisplayValue( 'text' ) ).toBeDefined();
98
98
  } );
99
99
 
@@ -107,11 +107,11 @@ describe( 'HTMLTextInput', () => {
107
107
  />
108
108
  );
109
109
 
110
- // Simulate user typing text
110
+ // Simulate user typing text.
111
111
  const textInput = findTitleTextInput( screen );
112
112
  fireEvent( textInput, 'changeText', 'text' );
113
113
 
114
- //Check if the setTitleAction is called
114
+ // Check if the setTitleAction is called.
115
115
  expect( editTitle ).toHaveBeenCalledTimes( 1 );
116
116
  expect( editTitle ).toHaveBeenCalledWith( 'text' );
117
117
  } );
@@ -174,7 +174,7 @@ const ImageComponent = ( {
174
174
  <View
175
175
  style={ [
176
176
  styles.container,
177
- // only set alignItems if an image exists because alignItems causes the placeholder
177
+ // Only set alignItems if an image exists because alignItems causes the placeholder
178
178
  // to disappear when an aligned image can't be downloaded
179
179
  // https://github.com/wordpress-mobile/gutenberg-mobile/issues/1592
180
180
  imageData && align && { alignItems: align },
@@ -89,6 +89,7 @@
89
89
  color: #fff;
90
90
  font-size: 14;
91
91
  margin-top: 5;
92
+ text-align: center;
92
93
  }
93
94
 
94
95
  .editContainer {
@@ -15,7 +15,7 @@ export const KeyboardAwareFlatList = ( props ) => (
15
15
  );
16
16
 
17
17
  KeyboardAwareFlatList.handleCaretVerticalPositionChange = () => {
18
- //no need to handle on Android, it is system managed
18
+ // no need to handle on Android, it is system managed
19
19
  };
20
20
 
21
21
  export default KeyboardAwareFlatList;