@wordpress/components 20.0.1-next.d6164808d3.0 → 20.0.2-next.957ca95e4c.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (434) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/CONTRIBUTING.md +12 -12
  3. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +12 -12
  4. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  5. package/build/autocomplete/get-default-use-items.js +7 -1
  6. package/build/autocomplete/get-default-use-items.js.map +1 -1
  7. package/build/autocomplete/index.js +3 -1
  8. package/build/autocomplete/index.js.map +1 -1
  9. package/build/card/card/component.js +6 -11
  10. package/build/card/card/component.js.map +1 -1
  11. package/build/card/card/hook.js +0 -10
  12. package/build/card/card/hook.js.map +1 -1
  13. package/build/card/card/index.js.map +1 -1
  14. package/build/card/card-body/component.js +7 -8
  15. package/build/card/card-body/component.js.map +1 -1
  16. package/build/card/card-body/hook.js +0 -4
  17. package/build/card/card-body/hook.js.map +1 -1
  18. package/build/card/card-body/index.js.map +1 -1
  19. package/build/card/card-divider/component.js +7 -8
  20. package/build/card/card-divider/component.js.map +1 -1
  21. package/build/card/card-divider/hook.js +0 -4
  22. package/build/card/card-divider/hook.js.map +1 -1
  23. package/build/card/card-divider/index.js.map +1 -1
  24. package/build/card/card-footer/component.js +7 -8
  25. package/build/card/card-footer/component.js.map +1 -1
  26. package/build/card/card-footer/hook.js +0 -4
  27. package/build/card/card-footer/hook.js.map +1 -1
  28. package/build/card/card-footer/index.js.map +1 -1
  29. package/build/card/card-header/component.js +7 -8
  30. package/build/card/card-header/component.js.map +1 -1
  31. package/build/card/card-header/hook.js +0 -4
  32. package/build/card/card-header/hook.js.map +1 -1
  33. package/build/card/card-header/index.js.map +1 -1
  34. package/build/card/card-media/component.js +7 -7
  35. package/build/card/card-media/component.js.map +1 -1
  36. package/build/card/card-media/hook.js +0 -4
  37. package/build/card/card-media/hook.js.map +1 -1
  38. package/build/card/card-media/index.js.map +1 -1
  39. package/build/card/context.js.map +1 -1
  40. package/build/card/index.js.map +1 -1
  41. package/build/card/styles.js +17 -17
  42. package/build/card/styles.js.map +1 -1
  43. package/build/clipboard-button/index.js +16 -1
  44. package/build/clipboard-button/index.js.map +1 -1
  45. package/build/color-palette/index.js +6 -2
  46. package/build/color-palette/index.js.map +1 -1
  47. package/build/custom-gradient-picker/index.js +11 -0
  48. package/build/custom-gradient-picker/index.js.map +1 -1
  49. package/build/date-time/date/index.js +25 -6
  50. package/build/date-time/date/index.js.map +1 -1
  51. package/build/date-time/date/styles.js +22 -12
  52. package/build/date-time/date/styles.js.map +1 -1
  53. package/build/date-time/date-time/index.js +1 -3
  54. package/build/date-time/date-time/index.js.map +1 -1
  55. package/build/date-time/date-time/styles.js +19 -5
  56. package/build/date-time/date-time/styles.js.map +1 -1
  57. package/build/date-time/time/styles.js +12 -12
  58. package/build/date-time/time/styles.js.map +1 -1
  59. package/build/drop-zone/index.js +2 -4
  60. package/build/drop-zone/index.js.map +1 -1
  61. package/build/dropdown-menu/index.js +1 -3
  62. package/build/dropdown-menu/index.js.map +1 -1
  63. package/build/dropdown-menu/index.native.js +0 -17
  64. package/build/dropdown-menu/index.native.js.map +1 -1
  65. package/build/focal-point-picker/controls.js +4 -4
  66. package/build/focal-point-picker/controls.js.map +1 -1
  67. package/build/focal-point-picker/focal-point.js +4 -6
  68. package/build/focal-point-picker/focal-point.js.map +1 -1
  69. package/build/focal-point-picker/grid.js +6 -35
  70. package/build/focal-point-picker/grid.js.map +1 -1
  71. package/build/focal-point-picker/index.js +160 -330
  72. package/build/focal-point-picker/index.js.map +1 -1
  73. package/build/focal-point-picker/media.js +4 -34
  74. package/build/focal-point-picker/media.js.map +1 -1
  75. package/build/focal-point-picker/styles/focal-point-picker-style.js +14 -14
  76. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  77. package/build/focal-point-picker/utils.js +2 -6
  78. package/build/focal-point-picker/utils.js.map +1 -1
  79. package/build/focusable-iframe/index.js +6 -0
  80. package/build/focusable-iframe/index.js.map +1 -1
  81. package/build/form-token-field/index.js +18 -15
  82. package/build/form-token-field/index.js.map +1 -1
  83. package/build/gradient-picker/index.js +12 -1
  84. package/build/gradient-picker/index.js.map +1 -1
  85. package/build/guide/index.js +8 -6
  86. package/build/guide/index.js.map +1 -1
  87. package/build/higher-order/with-constrained-tabbing/index.js +1 -1
  88. package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
  89. package/build/higher-order/with-spoken-messages/index.js +2 -0
  90. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  91. package/build/isolated-event-container/index.js +4 -0
  92. package/build/isolated-event-container/index.js.map +1 -1
  93. package/build/mobile/global-styles-context/utils.native.js +1 -1
  94. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  95. package/build/navigable-container/menu.js +3 -9
  96. package/build/navigable-container/menu.js.map +1 -1
  97. package/build/navigation/menu/menu-title-search.js +1 -3
  98. package/build/navigation/menu/menu-title-search.js.map +1 -1
  99. package/build/palette-edit/index.js +6 -2
  100. package/build/palette-edit/index.js.map +1 -1
  101. package/build/popover/index.js +15 -35
  102. package/build/popover/index.js.map +1 -1
  103. package/build/text-highlight/index.js +4 -4
  104. package/build/text-highlight/index.js.map +1 -1
  105. package/build/toggle-group-control/toggle-group-control/component.js +1 -1
  106. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  107. package/build/toggle-group-control/toggle-group-control/styles.js +23 -8
  108. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  109. package/build/tooltip/index.js +1 -7
  110. package/build/tooltip/index.js.map +1 -1
  111. package/build/tree-grid/index.js +4 -10
  112. package/build/tree-grid/index.js.map +1 -1
  113. package/build/utils/strings.js +13 -0
  114. package/build/utils/strings.js.map +1 -1
  115. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +12 -12
  116. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +1 -1
  117. package/build-module/autocomplete/get-default-use-items.js +6 -1
  118. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  119. package/build-module/autocomplete/index.js +2 -1
  120. package/build-module/autocomplete/index.js.map +1 -1
  121. package/build-module/card/card/component.js +5 -10
  122. package/build-module/card/card/component.js.map +1 -1
  123. package/build-module/card/card/hook.js +0 -9
  124. package/build-module/card/card/hook.js.map +1 -1
  125. package/build-module/card/card/index.js.map +1 -1
  126. package/build-module/card/card-body/component.js +7 -8
  127. package/build-module/card/card-body/component.js.map +1 -1
  128. package/build-module/card/card-body/hook.js +0 -4
  129. package/build-module/card/card-body/hook.js.map +1 -1
  130. package/build-module/card/card-body/index.js.map +1 -1
  131. package/build-module/card/card-divider/component.js +7 -8
  132. package/build-module/card/card-divider/component.js.map +1 -1
  133. package/build-module/card/card-divider/hook.js +0 -4
  134. package/build-module/card/card-divider/hook.js.map +1 -1
  135. package/build-module/card/card-divider/index.js.map +1 -1
  136. package/build-module/card/card-footer/component.js +7 -8
  137. package/build-module/card/card-footer/component.js.map +1 -1
  138. package/build-module/card/card-footer/hook.js +0 -4
  139. package/build-module/card/card-footer/hook.js.map +1 -1
  140. package/build-module/card/card-footer/index.js.map +1 -1
  141. package/build-module/card/card-header/component.js +7 -8
  142. package/build-module/card/card-header/component.js.map +1 -1
  143. package/build-module/card/card-header/hook.js +0 -4
  144. package/build-module/card/card-header/hook.js.map +1 -1
  145. package/build-module/card/card-header/index.js.map +1 -1
  146. package/build-module/card/card-media/component.js +7 -7
  147. package/build-module/card/card-media/component.js.map +1 -1
  148. package/build-module/card/card-media/hook.js +0 -4
  149. package/build-module/card/card-media/hook.js.map +1 -1
  150. package/build-module/card/card-media/index.js.map +1 -1
  151. package/build-module/card/context.js.map +1 -1
  152. package/build-module/card/index.js.map +1 -1
  153. package/build-module/card/styles.js +17 -17
  154. package/build-module/card/styles.js.map +1 -1
  155. package/build-module/clipboard-button/index.js +17 -1
  156. package/build-module/clipboard-button/index.js.map +1 -1
  157. package/build-module/color-palette/index.js +5 -2
  158. package/build-module/color-palette/index.js.map +1 -1
  159. package/build-module/custom-gradient-picker/index.js +10 -0
  160. package/build-module/custom-gradient-picker/index.js.map +1 -1
  161. package/build-module/date-time/date/index.js +27 -8
  162. package/build-module/date-time/date/index.js.map +1 -1
  163. package/build-module/date-time/date/styles.js +21 -5
  164. package/build-module/date-time/date/styles.js.map +1 -1
  165. package/build-module/date-time/date-time/index.js +2 -3
  166. package/build-module/date-time/date-time/index.js.map +1 -1
  167. package/build-module/date-time/date-time/styles.js +20 -1
  168. package/build-module/date-time/date-time/styles.js.map +1 -1
  169. package/build-module/date-time/time/styles.js +12 -12
  170. package/build-module/date-time/time/styles.js.map +1 -1
  171. package/build-module/drop-zone/index.js +2 -3
  172. package/build-module/drop-zone/index.js.map +1 -1
  173. package/build-module/dropdown-menu/index.js +1 -2
  174. package/build-module/dropdown-menu/index.js.map +1 -1
  175. package/build-module/dropdown-menu/index.native.js +0 -16
  176. package/build-module/dropdown-menu/index.native.js.map +1 -1
  177. package/build-module/focal-point-picker/controls.js +4 -4
  178. package/build-module/focal-point-picker/controls.js.map +1 -1
  179. package/build-module/focal-point-picker/focal-point.js +4 -6
  180. package/build-module/focal-point-picker/focal-point.js.map +1 -1
  181. package/build-module/focal-point-picker/grid.js +6 -34
  182. package/build-module/focal-point-picker/grid.js.map +1 -1
  183. package/build-module/focal-point-picker/index.js +158 -325
  184. package/build-module/focal-point-picker/index.js.map +1 -1
  185. package/build-module/focal-point-picker/media.js +4 -36
  186. package/build-module/focal-point-picker/media.js.map +1 -1
  187. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +13 -14
  188. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  189. package/build-module/focal-point-picker/utils.js +2 -6
  190. package/build-module/focal-point-picker/utils.js.map +1 -1
  191. package/build-module/focusable-iframe/index.js +6 -0
  192. package/build-module/focusable-iframe/index.js.map +1 -1
  193. package/build-module/form-token-field/index.js +18 -14
  194. package/build-module/form-token-field/index.js.map +1 -1
  195. package/build-module/gradient-picker/index.js +11 -1
  196. package/build-module/gradient-picker/index.js.map +1 -1
  197. package/build-module/guide/index.js +8 -5
  198. package/build-module/guide/index.js.map +1 -1
  199. package/build-module/higher-order/with-constrained-tabbing/index.js +1 -1
  200. package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
  201. package/build-module/higher-order/with-spoken-messages/index.js +2 -0
  202. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  203. package/build-module/isolated-event-container/index.js +3 -0
  204. package/build-module/isolated-event-container/index.js.map +1 -1
  205. package/build-module/mobile/global-styles-context/utils.native.js +2 -2
  206. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  207. package/build-module/navigable-container/menu.js +3 -8
  208. package/build-module/navigable-container/menu.js.map +1 -1
  209. package/build-module/navigation/menu/menu-title-search.js +1 -2
  210. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  211. package/build-module/palette-edit/index.js +6 -2
  212. package/build-module/palette-edit/index.js.map +1 -1
  213. package/build-module/popover/index.js +15 -35
  214. package/build-module/popover/index.js.map +1 -1
  215. package/build-module/text-highlight/index.js +2 -5
  216. package/build-module/text-highlight/index.js.map +1 -1
  217. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -1
  218. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  219. package/build-module/toggle-group-control/toggle-group-control/styles.js +20 -6
  220. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  221. package/build-module/tooltip/index.js +1 -6
  222. package/build-module/tooltip/index.js.map +1 -1
  223. package/build-module/tree-grid/index.js +4 -9
  224. package/build-module/tree-grid/index.js.map +1 -1
  225. package/build-module/utils/strings.js +11 -0
  226. package/build-module/utils/strings.js.map +1 -1
  227. package/build-style/style-rtl.css +2 -21
  228. package/build-style/style.css +2 -21
  229. package/build-types/animation/index.d.ts +2 -0
  230. package/build-types/animation/index.d.ts.map +1 -0
  231. package/build-types/card/card/component.d.ts +3 -3
  232. package/build-types/card/card/component.d.ts.map +1 -1
  233. package/build-types/card/card/hook.d.ts +7 -2
  234. package/build-types/card/card/hook.d.ts.map +1 -1
  235. package/build-types/card/card/index.d.ts +2 -2
  236. package/build-types/card/card/index.d.ts.map +1 -1
  237. package/build-types/card/card-body/component.d.ts +3 -3
  238. package/build-types/card/card-body/component.d.ts.map +1 -1
  239. package/build-types/card/card-body/hook.d.ts +5 -2
  240. package/build-types/card/card-body/hook.d.ts.map +1 -1
  241. package/build-types/card/card-body/index.d.ts +2 -2
  242. package/build-types/card/card-body/index.d.ts.map +1 -1
  243. package/build-types/card/card-divider/component.d.ts +3 -3
  244. package/build-types/card/card-divider/component.d.ts.map +1 -1
  245. package/build-types/card/card-divider/hook.d.ts +5 -2
  246. package/build-types/card/card-divider/hook.d.ts.map +1 -1
  247. package/build-types/card/card-divider/index.d.ts +2 -2
  248. package/build-types/card/card-divider/index.d.ts.map +1 -1
  249. package/build-types/card/card-footer/component.d.ts +3 -3
  250. package/build-types/card/card-footer/component.d.ts.map +1 -1
  251. package/build-types/card/card-footer/hook.d.ts +5 -2
  252. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  253. package/build-types/card/card-footer/index.d.ts +2 -2
  254. package/build-types/card/card-footer/index.d.ts.map +1 -1
  255. package/build-types/card/card-header/component.d.ts +3 -3
  256. package/build-types/card/card-header/component.d.ts.map +1 -1
  257. package/build-types/card/card-header/hook.d.ts +5 -2
  258. package/build-types/card/card-header/hook.d.ts.map +1 -1
  259. package/build-types/card/card-header/index.d.ts +2 -2
  260. package/build-types/card/card-header/index.d.ts.map +1 -1
  261. package/build-types/card/card-media/component.d.ts +3 -4
  262. package/build-types/card/card-media/component.d.ts.map +1 -1
  263. package/build-types/card/card-media/hook.d.ts +6 -5
  264. package/build-types/card/card-media/hook.d.ts.map +1 -1
  265. package/build-types/card/card-media/index.d.ts +2 -2
  266. package/build-types/card/card-media/index.d.ts.map +1 -1
  267. package/build-types/card/context.d.ts +3 -2
  268. package/build-types/card/context.d.ts.map +1 -1
  269. package/build-types/card/index.d.ts +6 -6
  270. package/build-types/card/index.d.ts.map +1 -1
  271. package/build-types/card/stories/index.d.ts +12 -0
  272. package/build-types/card/stories/index.d.ts.map +1 -0
  273. package/build-types/card/styles.d.ts +20 -22
  274. package/build-types/card/styles.d.ts.map +1 -1
  275. package/build-types/card/test/index.d.ts +2 -0
  276. package/build-types/card/test/index.d.ts.map +1 -0
  277. package/build-types/card/types.d.ts +7 -1
  278. package/build-types/card/types.d.ts.map +1 -1
  279. package/build-types/clipboard-button/index.d.ts +16 -0
  280. package/build-types/clipboard-button/index.d.ts.map +1 -0
  281. package/build-types/color-palette/index.d.ts.map +1 -1
  282. package/build-types/composite/index.d.ts +2 -0
  283. package/build-types/composite/index.d.ts.map +1 -0
  284. package/build-types/date-time/date/index.d.ts +1 -1
  285. package/build-types/date-time/date/index.d.ts.map +1 -1
  286. package/build-types/date-time/date/styles.d.ts +4 -0
  287. package/build-types/date-time/date/styles.d.ts.map +1 -1
  288. package/build-types/date-time/date-time/index.d.ts.map +1 -1
  289. package/build-types/date-time/date-time/styles.d.ts +13 -0
  290. package/build-types/date-time/date-time/styles.d.ts.map +1 -1
  291. package/build-types/date-time/time/styles.d.ts.map +1 -1
  292. package/build-types/disclosure/index.d.ts +2 -0
  293. package/build-types/disclosure/index.d.ts.map +1 -0
  294. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  295. package/build-types/focusable-iframe/index.d.ts +8 -0
  296. package/build-types/focusable-iframe/index.d.ts.map +1 -0
  297. package/build-types/form-token-field/index.d.ts.map +1 -1
  298. package/build-types/form-token-field/test/index.d.ts +2 -0
  299. package/build-types/form-token-field/test/index.d.ts.map +1 -0
  300. package/build-types/higher-order/with-constrained-tabbing/index.d.ts +3 -0
  301. package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -0
  302. package/build-types/higher-order/with-spoken-messages/index.d.ts +4 -0
  303. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -0
  304. package/build-types/isolated-event-container/index.d.ts +3 -0
  305. package/build-types/isolated-event-container/index.d.ts.map +1 -0
  306. package/build-types/mobile/inserter-button/sparkles.d.ts +3 -0
  307. package/build-types/mobile/inserter-button/sparkles.d.ts.map +1 -0
  308. package/build-types/navigable-container/menu.d.ts.map +1 -1
  309. package/build-types/popover/index.d.ts +0 -1
  310. package/build-types/popover/index.d.ts.map +1 -1
  311. package/build-types/radio-context/index.d.ts +6 -0
  312. package/build-types/radio-context/index.d.ts.map +1 -0
  313. package/build-types/text-highlight/index.d.ts +0 -3
  314. package/build-types/text-highlight/index.d.ts.map +1 -1
  315. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  316. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +4 -0
  317. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  318. package/build-types/tooltip/index.d.ts.map +1 -1
  319. package/build-types/utils/strings.d.ts +8 -0
  320. package/build-types/utils/strings.d.ts.map +1 -1
  321. package/package.json +17 -17
  322. package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.js +1 -0
  323. package/src/autocomplete/get-default-use-items.js +6 -1
  324. package/src/autocomplete/index.js +2 -1
  325. package/src/card/card/{component.js → component.tsx} +13 -9
  326. package/src/card/card/{hook.js → hook.ts} +11 -11
  327. package/src/card/card/{index.js → index.ts} +0 -0
  328. package/src/card/card-body/{component.js → component.tsx} +13 -9
  329. package/src/card/card-body/{hook.js → hook.ts} +5 -5
  330. package/src/card/card-body/{index.js → index.ts} +0 -0
  331. package/src/card/card-divider/{component.js → component.tsx} +16 -10
  332. package/src/card/card-divider/{hook.js → hook.ts} +5 -5
  333. package/src/card/card-divider/{index.js → index.ts} +0 -0
  334. package/src/card/card-footer/{component.js → component.tsx} +13 -9
  335. package/src/card/card-footer/{hook.js → hook.ts} +5 -5
  336. package/src/card/card-footer/{index.js → index.ts} +0 -0
  337. package/src/card/card-header/{component.js → component.tsx} +13 -9
  338. package/src/card/card-header/{hook.js → hook.ts} +5 -5
  339. package/src/card/card-header/{index.js → index.ts} +0 -0
  340. package/src/card/card-media/{component.js → component.tsx} +13 -8
  341. package/src/card/card-media/{hook.js → hook.ts} +5 -5
  342. package/src/card/card-media/{index.js → index.ts} +0 -0
  343. package/src/card/{context.js → context.ts} +0 -0
  344. package/src/card/{index.js → index.ts} +0 -0
  345. package/src/card/stories/index.tsx +75 -0
  346. package/src/card/{styles.js → styles.ts} +0 -0
  347. package/src/card/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
  348. package/src/card/test/{index.js → index.tsx} +3 -3
  349. package/src/card/types.ts +8 -1
  350. package/src/clipboard-button/index.js +13 -0
  351. package/src/color-palette/index.js +8 -5
  352. package/src/color-palette/style.scss +0 -14
  353. package/src/color-palette/test/__snapshots__/index.js.snap +11 -4
  354. package/src/custom-gradient-picker/index.js +12 -0
  355. package/src/custom-gradient-picker/stories/index.js +3 -0
  356. package/src/date-time/date/index.tsx +26 -6
  357. package/src/date-time/date/styles.ts +6 -0
  358. package/src/date-time/date/test/index.tsx +6 -2
  359. package/src/date-time/date-time/index.tsx +3 -4
  360. package/src/date-time/date-time/styles.ts +9 -0
  361. package/src/date-time/time/styles.ts +1 -0
  362. package/src/drop-zone/index.js +2 -3
  363. package/src/dropdown-menu/index.js +1 -2
  364. package/src/dropdown-menu/index.native.js +0 -13
  365. package/src/dropdown-menu/test/index.js +54 -58
  366. package/src/focal-point-picker/README.md +3 -6
  367. package/src/focal-point-picker/controls.js +4 -4
  368. package/src/focal-point-picker/focal-point.js +2 -8
  369. package/src/focal-point-picker/grid.js +5 -41
  370. package/src/focal-point-picker/index.js +161 -303
  371. package/src/focal-point-picker/media.js +4 -28
  372. package/src/focal-point-picker/styles/focal-point-picker-style.js +5 -8
  373. package/src/focal-point-picker/test/index.js +1 -1
  374. package/src/focal-point-picker/utils.js +2 -6
  375. package/src/focusable-iframe/index.js +5 -0
  376. package/src/form-token-field/index.tsx +17 -23
  377. package/src/form-token-field/test/index.tsx +2106 -0
  378. package/src/gradient-picker/README.md +9 -0
  379. package/src/gradient-picker/index.js +9 -0
  380. package/src/gradient-picker/stories/index.js +1 -0
  381. package/src/guide/index.js +6 -3
  382. package/src/guide/test/index.js +138 -1
  383. package/src/higher-order/with-constrained-tabbing/index.js +1 -1
  384. package/src/higher-order/with-spoken-messages/index.js +2 -0
  385. package/src/isolated-event-container/index.js +3 -0
  386. package/src/mobile/global-styles-context/utils.native.js +7 -2
  387. package/src/navigable-container/menu.js +3 -7
  388. package/src/navigation/menu/menu-title-search.js +1 -2
  389. package/src/palette-edit/index.js +14 -10
  390. package/src/palette-edit/style.scss +3 -11
  391. package/src/placeholder/style.scss +1 -4
  392. package/src/popover/index.js +17 -35
  393. package/src/popover/stories/index.js +0 -1
  394. package/src/text-highlight/index.tsx +1 -5
  395. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +62 -44
  396. package/src/toggle-group-control/toggle-group-control/component.tsx +3 -2
  397. package/src/toggle-group-control/toggle-group-control/styles.ts +5 -0
  398. package/src/tooltip/index.js +1 -5
  399. package/src/tree-grid/index.js +4 -9
  400. package/src/utils/strings.ts +11 -0
  401. package/tsconfig.json +45 -76
  402. package/tsconfig.tsbuildinfo +1 -1
  403. package/build/ui/__storybook-utils/example-grid.js +0 -88
  404. package/build/ui/__storybook-utils/example-grid.js.map +0 -1
  405. package/build/ui/__storybook-utils/index.js +0 -19
  406. package/build/ui/__storybook-utils/index.js.map +0 -1
  407. package/build/ui/__storybook-utils/page.js +0 -43
  408. package/build/ui/__storybook-utils/page.js.map +0 -1
  409. package/build/utils/keyboard.js +0 -41
  410. package/build/utils/keyboard.js.map +0 -1
  411. package/build-module/ui/__storybook-utils/example-grid.js +0 -69
  412. package/build-module/ui/__storybook-utils/example-grid.js.map +0 -1
  413. package/build-module/ui/__storybook-utils/index.js +0 -2
  414. package/build-module/ui/__storybook-utils/index.js.map +0 -1
  415. package/build-module/ui/__storybook-utils/page.js +0 -32
  416. package/build-module/ui/__storybook-utils/page.js.map +0 -1
  417. package/build-module/utils/keyboard.js +0 -33
  418. package/build-module/utils/keyboard.js.map +0 -1
  419. package/build-types/form-token-field/test/lib/fixtures.d.ts +0 -26
  420. package/build-types/form-token-field/test/lib/fixtures.d.ts.map +0 -1
  421. package/build-types/form-token-field/test/lib/token-field-wrapper.d.ts +0 -21
  422. package/build-types/form-token-field/test/lib/token-field-wrapper.d.ts.map +0 -1
  423. package/build-types/utils/keyboard.d.ts +0 -12
  424. package/build-types/utils/keyboard.d.ts.map +0 -1
  425. package/src/card/stories/index.js +0 -209
  426. package/src/form-token-field/test/index.js +0 -442
  427. package/src/form-token-field/test/lib/fixtures.js +0 -89
  428. package/src/form-token-field/test/lib/token-field-wrapper.tsx +0 -71
  429. package/src/guide/test/page-control.js +0 -40
  430. package/src/ui/__storybook-utils/example-grid.js +0 -61
  431. package/src/ui/__storybook-utils/index.js +0 -1
  432. package/src/ui/__storybook-utils/page.js +0 -29
  433. package/src/utils/keyboard.js +0 -28
  434. package/src/utils/test/keyboard.js +0 -34
@@ -32,19 +32,19 @@ const noop = () => {};
32
32
  function FocalPointPickerControls(_ref) {
33
33
  let {
34
34
  onChange = noop,
35
- percentages = {
35
+ point = {
36
36
  x: 0.5,
37
37
  y: 0.5
38
38
  }
39
39
  } = _ref;
40
- const valueX = (0, _utils.fractionToPercentage)(percentages.x);
41
- const valueY = (0, _utils.fractionToPercentage)(percentages.y);
40
+ const valueX = (0, _utils.fractionToPercentage)(point.x);
41
+ const valueY = (0, _utils.fractionToPercentage)(point.y);
42
42
 
43
43
  const handleChange = (value, axis) => {
44
44
  const num = parseInt(value, 10);
45
45
 
46
46
  if (!isNaN(num)) {
47
- onChange({ ...percentages,
47
+ onChange({ ...point,
48
48
  [axis]: num / 100
49
49
  });
50
50
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/focal-point-picker/controls.js"],"names":["TEXTCONTROL_MIN","TEXTCONTROL_MAX","noop","FocalPointPickerControls","onChange","percentages","x","y","valueX","valueY","handleChange","value","axis","num","parseInt","isNaN","join","next","UnitControl","props","label"],"mappings":";;;;;;;;;;;;;AAGA;;AAKA;;AAIA;;AAZA;AACA;AACA;;AAGA;AACA;AACA;AAOA,MAAMA,eAAe,GAAG,CAAxB;AACA,MAAMC,eAAe,GAAG,GAAxB;;AACA,MAAMC,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEe,SAASC,wBAAT,OAMX;AAAA,MAN8C;AACjDC,IAAAA,QAAQ,GAAGF,IADsC;AAEjDG,IAAAA,WAAW,GAAG;AACbC,MAAAA,CAAC,EAAE,GADU;AAEbC,MAAAA,CAAC,EAAE;AAFU;AAFmC,GAM9C;AACH,QAAMC,MAAM,GAAG,iCAAsBH,WAAW,CAACC,CAAlC,CAAf;AACA,QAAMG,MAAM,GAAG,iCAAsBJ,WAAW,CAACE,CAAlC,CAAf;;AAEA,QAAMG,YAAY,GAAG,CAAEC,KAAF,EAASC,IAAT,KAAmB;AACvC,UAAMC,GAAG,GAAGC,QAAQ,CAAEH,KAAF,EAAS,EAAT,CAApB;;AAEA,QAAK,CAAEI,KAAK,CAAEF,GAAF,CAAZ,EAAsB;AACrBT,MAAAA,QAAQ,CAAE,EAAE,GAAGC,WAAL;AAAkB,SAAEO,IAAF,GAAUC,GAAG,GAAG;AAAlC,OAAF,CAAR;AACA;AACD,GAND;;AAQA,SACC,4BAAC,qCAAD;AAAgB,IAAA,SAAS,EAAC;AAA1B,KACC,4BAAC,WAAD;AACC,IAAA,KAAK,EAAG,cAAI,MAAJ,CADT;AAEC,IAAA,KAAK,EAAG,CAAEL,MAAF,EAAU,GAAV,EAAgBQ,IAAhB,CAAsB,EAAtB,CAFT;AAGC,IAAA,QAAQ,EAAKC,IAAF,IAAYP,YAAY,CAAEO,IAAF,EAAQ,GAAR,CAHpC;AAIC,IAAA,aAAa,EAAC;AAJf,IADD,EAOC,4BAAC,WAAD;AACC,IAAA,KAAK,EAAG,cAAI,KAAJ,CADT;AAEC,IAAA,KAAK,EAAG,CAAER,MAAF,EAAU,GAAV,EAAgBO,IAAhB,CAAsB,EAAtB,CAFT;AAGC,IAAA,QAAQ,EAAKC,IAAF,IAAYP,YAAY,CAAEO,IAAF,EAAQ,GAAR,CAHpC;AAIC,IAAA,aAAa,EAAC;AAJf,IAPD,CADD;AAgBA;;AAED,SAASC,WAAT,CAAsBC,KAAtB,EAA8B;AAC7B,SACC,4BAAC,kCAAD;AACC,IAAA,SAAS,EAAC,oDADX;AAEC,IAAA,aAAa,EAAC,KAFf;AAGC,IAAA,GAAG,EAAGlB,eAHP;AAIC,IAAA,GAAG,EAAGD,eAJP;AAKC,IAAA,KAAK,EAAG,CAAE;AAAEW,MAAAA,KAAK,EAAE,GAAT;AAAcS,MAAAA,KAAK,EAAE;AAArB,KAAF;AALT,KAMMD,KANN,EADD;AAUA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tUnitControl as BaseUnitControl,\n\tControlWrapper,\n} from './styles/focal-point-picker-style';\nimport { fractionToPercentage } from './utils';\n\nconst TEXTCONTROL_MIN = 0;\nconst TEXTCONTROL_MAX = 100;\nconst noop = () => {};\n\nexport default function FocalPointPickerControls( {\n\tonChange = noop,\n\tpercentages = {\n\t\tx: 0.5,\n\t\ty: 0.5,\n\t},\n} ) {\n\tconst valueX = fractionToPercentage( percentages.x );\n\tconst valueY = fractionToPercentage( percentages.y );\n\n\tconst handleChange = ( value, axis ) => {\n\t\tconst num = parseInt( value, 10 );\n\n\t\tif ( ! isNaN( num ) ) {\n\t\t\tonChange( { ...percentages, [ axis ]: num / 100 } );\n\t\t}\n\t};\n\n\treturn (\n\t\t<ControlWrapper className=\"focal-point-picker__controls\">\n\t\t\t<UnitControl\n\t\t\t\tlabel={ __( 'Left' ) }\n\t\t\t\tvalue={ [ valueX, '%' ].join( '' ) }\n\t\t\t\tonChange={ ( next ) => handleChange( next, 'x' ) }\n\t\t\t\tdragDirection=\"e\"\n\t\t\t/>\n\t\t\t<UnitControl\n\t\t\t\tlabel={ __( 'Top' ) }\n\t\t\t\tvalue={ [ valueY, '%' ].join( '' ) }\n\t\t\t\tonChange={ ( next ) => handleChange( next, 'y' ) }\n\t\t\t\tdragDirection=\"s\"\n\t\t\t/>\n\t\t</ControlWrapper>\n\t);\n}\n\nfunction UnitControl( props ) {\n\treturn (\n\t\t<BaseUnitControl\n\t\t\tclassName=\"focal-point-picker__controls-position-unit-control\"\n\t\t\tlabelPosition=\"top\"\n\t\t\tmax={ TEXTCONTROL_MAX }\n\t\t\tmin={ TEXTCONTROL_MIN }\n\t\t\tunits={ [ { value: '%', label: '%' } ] }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/focal-point-picker/controls.js"],"names":["TEXTCONTROL_MIN","TEXTCONTROL_MAX","noop","FocalPointPickerControls","onChange","point","x","y","valueX","valueY","handleChange","value","axis","num","parseInt","isNaN","join","next","UnitControl","props","label"],"mappings":";;;;;;;;;;;;;AAGA;;AAKA;;AAIA;;AAZA;AACA;AACA;;AAGA;AACA;AACA;AAOA,MAAMA,eAAe,GAAG,CAAxB;AACA,MAAMC,eAAe,GAAG,GAAxB;;AACA,MAAMC,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEe,SAASC,wBAAT,OAMX;AAAA,MAN8C;AACjDC,IAAAA,QAAQ,GAAGF,IADsC;AAEjDG,IAAAA,KAAK,GAAG;AACPC,MAAAA,CAAC,EAAE,GADI;AAEPC,MAAAA,CAAC,EAAE;AAFI;AAFyC,GAM9C;AACH,QAAMC,MAAM,GAAG,iCAAsBH,KAAK,CAACC,CAA5B,CAAf;AACA,QAAMG,MAAM,GAAG,iCAAsBJ,KAAK,CAACE,CAA5B,CAAf;;AAEA,QAAMG,YAAY,GAAG,CAAEC,KAAF,EAASC,IAAT,KAAmB;AACvC,UAAMC,GAAG,GAAGC,QAAQ,CAAEH,KAAF,EAAS,EAAT,CAApB;;AAEA,QAAK,CAAEI,KAAK,CAAEF,GAAF,CAAZ,EAAsB;AACrBT,MAAAA,QAAQ,CAAE,EAAE,GAAGC,KAAL;AAAY,SAAEO,IAAF,GAAUC,GAAG,GAAG;AAA5B,OAAF,CAAR;AACA;AACD,GAND;;AAQA,SACC,4BAAC,qCAAD;AAAgB,IAAA,SAAS,EAAC;AAA1B,KACC,4BAAC,WAAD;AACC,IAAA,KAAK,EAAG,cAAI,MAAJ,CADT;AAEC,IAAA,KAAK,EAAG,CAAEL,MAAF,EAAU,GAAV,EAAgBQ,IAAhB,CAAsB,EAAtB,CAFT;AAGC,IAAA,QAAQ,EAAKC,IAAF,IAAYP,YAAY,CAAEO,IAAF,EAAQ,GAAR,CAHpC;AAIC,IAAA,aAAa,EAAC;AAJf,IADD,EAOC,4BAAC,WAAD;AACC,IAAA,KAAK,EAAG,cAAI,KAAJ,CADT;AAEC,IAAA,KAAK,EAAG,CAAER,MAAF,EAAU,GAAV,EAAgBO,IAAhB,CAAsB,EAAtB,CAFT;AAGC,IAAA,QAAQ,EAAKC,IAAF,IAAYP,YAAY,CAAEO,IAAF,EAAQ,GAAR,CAHpC;AAIC,IAAA,aAAa,EAAC;AAJf,IAPD,CADD;AAgBA;;AAED,SAASC,WAAT,CAAsBC,KAAtB,EAA8B;AAC7B,SACC,4BAAC,kCAAD;AACC,IAAA,SAAS,EAAC,oDADX;AAEC,IAAA,aAAa,EAAC,KAFf;AAGC,IAAA,GAAG,EAAGlB,eAHP;AAIC,IAAA,GAAG,EAAGD,eAJP;AAKC,IAAA,KAAK,EAAG,CAAE;AAAEW,MAAAA,KAAK,EAAE,GAAT;AAAcS,MAAAA,KAAK,EAAE;AAArB,KAAF;AALT,KAMMD,KANN,EADD;AAUA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport {\n\tUnitControl as BaseUnitControl,\n\tControlWrapper,\n} from './styles/focal-point-picker-style';\nimport { fractionToPercentage } from './utils';\n\nconst TEXTCONTROL_MIN = 0;\nconst TEXTCONTROL_MAX = 100;\nconst noop = () => {};\n\nexport default function FocalPointPickerControls( {\n\tonChange = noop,\n\tpoint = {\n\t\tx: 0.5,\n\t\ty: 0.5,\n\t},\n} ) {\n\tconst valueX = fractionToPercentage( point.x );\n\tconst valueY = fractionToPercentage( point.y );\n\n\tconst handleChange = ( value, axis ) => {\n\t\tconst num = parseInt( value, 10 );\n\n\t\tif ( ! isNaN( num ) ) {\n\t\t\tonChange( { ...point, [ axis ]: num / 100 } );\n\t\t}\n\t};\n\n\treturn (\n\t\t<ControlWrapper className=\"focal-point-picker__controls\">\n\t\t\t<UnitControl\n\t\t\t\tlabel={ __( 'Left' ) }\n\t\t\t\tvalue={ [ valueX, '%' ].join( '' ) }\n\t\t\t\tonChange={ ( next ) => handleChange( next, 'x' ) }\n\t\t\t\tdragDirection=\"e\"\n\t\t\t/>\n\t\t\t<UnitControl\n\t\t\t\tlabel={ __( 'Top' ) }\n\t\t\t\tvalue={ [ valueY, '%' ].join( '' ) }\n\t\t\t\tonChange={ ( next ) => handleChange( next, 'y' ) }\n\t\t\t\tdragDirection=\"s\"\n\t\t\t/>\n\t\t</ControlWrapper>\n\t);\n}\n\nfunction UnitControl( props ) {\n\treturn (\n\t\t<BaseUnitControl\n\t\t\tclassName=\"focal-point-picker__controls-position-unit-control\"\n\t\t\tlabelPosition=\"top\"\n\t\t\tmax={ TEXTCONTROL_MAX }\n\t\t\tmin={ TEXTCONTROL_MIN }\n\t\t\tunits={ [ { value: '%', label: '%' } ] }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n}\n"]}
@@ -24,16 +24,14 @@ var _classnames = _interopRequireDefault(require("classnames"));
24
24
  */
25
25
  function FocalPoint(_ref) {
26
26
  let {
27
- coordinates = {
28
- left: '50%',
29
- top: '50%'
30
- },
27
+ left = '50%',
28
+ top = '50%',
31
29
  ...props
32
30
  } = _ref;
33
31
  const classes = (0, _classnames.default)('components-focal-point-picker__icon_container');
34
32
  const style = {
35
- left: coordinates.left,
36
- top: coordinates.top
33
+ left,
34
+ top
37
35
  };
38
36
  return (0, _element.createElement)(_focalPointStyle.FocalPointWrapper, (0, _extends2.default)({}, props, {
39
37
  className: classes,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/focal-point-picker/focal-point.js"],"names":["FocalPoint","coordinates","left","top","props","classes","style"],"mappings":";;;;;;;;;;;;;AAGA;;AAUA;;AAbA;AACA;AACA;;AAQA;AACA;AACA;AAGe,SAASA,UAAT,OAGX;AAAA,MAHgC;AACnCC,IAAAA,WAAW,GAAG;AAAEC,MAAAA,IAAI,EAAE,KAAR;AAAeC,MAAAA,GAAG,EAAE;AAApB,KADqB;AAEnC,OAAGC;AAFgC,GAGhC;AACH,QAAMC,OAAO,GAAG,yBACf,+CADe,CAAhB;AAIA,QAAMC,KAAK,GAAG;AACbJ,IAAAA,IAAI,EAAED,WAAW,CAACC,IADL;AAEbC,IAAAA,GAAG,EAAEF,WAAW,CAACE;AAFJ,GAAd;AAKA,SACC,4BAAC,kCAAD,6BAAwBC,KAAxB;AAAgC,IAAA,SAAS,EAAGC,OAA5C;AAAsD,IAAA,KAAK,EAAGC;AAA9D,MACC,4BAAC,+BAAD;AACC,IAAA,SAAS,EAAC,qCADX;AAEC,IAAA,KAAK,EAAC,4BAFP;AAGC,IAAA,OAAO,EAAC;AAHT,KAKC,4BAAC,uCAAD;AACC,IAAA,SAAS,EAAC,6CADX;AAEC,IAAA,CAAC,EAAC;AAFH,IALD,EASC,4BAAC,oCAAD;AACC,IAAA,SAAS,EAAC,0CADX;AAEC,IAAA,CAAC,EAAC;AAFH,IATD,CADD,CADD;AAkBA","sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tFocalPointWrapper,\n\tPointerIconPathFill,\n\tPointerIconPathOutline,\n\tPointerIconSVG,\n} from './styles/focal-point-style';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\nexport default function FocalPoint( {\n\tcoordinates = { left: '50%', top: '50%' },\n\t...props\n} ) {\n\tconst classes = classnames(\n\t\t'components-focal-point-picker__icon_container'\n\t);\n\n\tconst style = {\n\t\tleft: coordinates.left,\n\t\ttop: coordinates.top,\n\t};\n\n\treturn (\n\t\t<FocalPointWrapper { ...props } className={ classes } style={ style }>\n\t\t\t<PointerIconSVG\n\t\t\t\tclassName=\"components-focal-point-picker__icon\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tviewBox=\"0 0 30 30\"\n\t\t\t>\n\t\t\t\t<PointerIconPathOutline\n\t\t\t\t\tclassName=\"components-focal-point-picker__icon-outline\"\n\t\t\t\t\td=\"M15 1C7.3 1 1 7.3 1 15s6.3 14 14 14 14-6.3 14-14S22.7 1 15 1zm0 22c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8z\"\n\t\t\t\t/>\n\t\t\t\t<PointerIconPathFill\n\t\t\t\t\tclassName=\"components-focal-point-picker__icon-fill\"\n\t\t\t\t\td=\"M15 3C8.4 3 3 8.4 3 15s5.4 12 12 12 12-5.4 12-12S21.6 3 15 3zm0 22C9.5 25 5 20.5 5 15S9.5 5 15 5s10 4.5 10 10-4.5 10-10 10z\"\n\t\t\t\t/>\n\t\t\t</PointerIconSVG>\n\t\t</FocalPointWrapper>\n\t);\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/focal-point-picker/focal-point.js"],"names":["FocalPoint","left","top","props","classes","style"],"mappings":";;;;;;;;;;;;;AAGA;;AAUA;;AAbA;AACA;AACA;;AAQA;AACA;AACA;AAGe,SAASA,UAAT,OAA+D;AAAA,MAA1C;AAAEC,IAAAA,IAAI,GAAG,KAAT;AAAgBC,IAAAA,GAAG,GAAG,KAAtB;AAA6B,OAAGC;AAAhC,GAA0C;AAC7E,QAAMC,OAAO,GAAG,yBACf,+CADe,CAAhB;AAIA,QAAMC,KAAK,GAAG;AAAEJ,IAAAA,IAAF;AAAQC,IAAAA;AAAR,GAAd;AAEA,SACC,4BAAC,kCAAD,6BAAwBC,KAAxB;AAAgC,IAAA,SAAS,EAAGC,OAA5C;AAAsD,IAAA,KAAK,EAAGC;AAA9D,MACC,4BAAC,+BAAD;AACC,IAAA,SAAS,EAAC,qCADX;AAEC,IAAA,KAAK,EAAC,4BAFP;AAGC,IAAA,OAAO,EAAC;AAHT,KAKC,4BAAC,uCAAD;AACC,IAAA,SAAS,EAAC,6CADX;AAEC,IAAA,CAAC,EAAC;AAFH,IALD,EASC,4BAAC,oCAAD;AACC,IAAA,SAAS,EAAC,0CADX;AAEC,IAAA,CAAC,EAAC;AAFH,IATD,CADD,CADD;AAkBA","sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tFocalPointWrapper,\n\tPointerIconPathFill,\n\tPointerIconPathOutline,\n\tPointerIconSVG,\n} from './styles/focal-point-style';\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\nexport default function FocalPoint( { left = '50%', top = '50%', ...props } ) {\n\tconst classes = classnames(\n\t\t'components-focal-point-picker__icon_container'\n\t);\n\n\tconst style = { left, top };\n\n\treturn (\n\t\t<FocalPointWrapper { ...props } className={ classes } style={ style }>\n\t\t\t<PointerIconSVG\n\t\t\t\tclassName=\"components-focal-point-picker__icon\"\n\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\tviewBox=\"0 0 30 30\"\n\t\t\t>\n\t\t\t\t<PointerIconPathOutline\n\t\t\t\t\tclassName=\"components-focal-point-picker__icon-outline\"\n\t\t\t\t\td=\"M15 1C7.3 1 1 7.3 1 15s6.3 14 14 14 14-6.3 14-14S22.7 1 15 1zm0 22c-4.4 0-8-3.6-8-8s3.6-8 8-8 8 3.6 8 8-3.6 8-8 8z\"\n\t\t\t\t/>\n\t\t\t\t<PointerIconPathFill\n\t\t\t\t\tclassName=\"components-focal-point-picker__icon-fill\"\n\t\t\t\t\td=\"M15 3C8.4 3 3 8.4 3 15s5.4 12 12 12 12-5.4 12-12S21.6 3 15 3zm0 22C9.5 25 5 20.5 5 15S9.5 5 15 5s10 4.5 10 10-4.5 10-10 10z\"\n\t\t\t\t/>\n\t\t\t</PointerIconSVG>\n\t\t</FocalPointWrapper>\n\t);\n}\n"]}
@@ -13,29 +13,20 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
13
13
 
14
14
  var _focalPointPickerStyle = require("./styles/focal-point-picker-style");
15
15
 
16
- var _hooks = require("../utils/hooks");
17
-
18
- /**
19
- * WordPress dependencies
20
- */
21
-
22
16
  /**
23
17
  * Internal dependencies
24
18
  */
25
19
  function FocalPointPickerGrid(_ref) {
26
20
  let {
27
- bounds = {},
28
- value,
21
+ bounds,
29
22
  ...props
30
23
  } = _ref;
31
- const animationProps = useRevealAnimation(value);
32
- const style = {
33
- width: bounds.width,
34
- height: bounds.height
35
- };
36
- return (0, _element.createElement)(_focalPointPickerStyle.GridView, (0, _extends2.default)({}, props, animationProps, {
24
+ return (0, _element.createElement)(_focalPointPickerStyle.GridView, (0, _extends2.default)({}, props, {
37
25
  className: "components-focal-point-picker__grid",
38
- style: style
26
+ style: {
27
+ width: bounds.width,
28
+ height: bounds.height
29
+ }
39
30
  }), (0, _element.createElement)(_focalPointPickerStyle.GridLineX, {
40
31
  style: {
41
32
  top: '33%'
@@ -54,24 +45,4 @@ function FocalPointPickerGrid(_ref) {
54
45
  }
55
46
  }));
56
47
  }
57
- /**
58
- * Custom hook that renders the "flash" animation whenever the value changes.
59
- *
60
- * @param {string} value Value of (box) side.
61
- */
62
-
63
-
64
- function useRevealAnimation(value) {
65
- const [isActive, setIsActive] = (0, _element.useState)(false);
66
- (0, _hooks.useUpdateEffect)(() => {
67
- setIsActive(true);
68
- const timeout = window.setTimeout(() => {
69
- setIsActive(false);
70
- }, 600);
71
- return () => window.clearTimeout(timeout);
72
- }, [value]);
73
- return {
74
- isActive
75
- };
76
- }
77
48
  //# sourceMappingURL=grid.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/focal-point-picker/grid.js"],"names":["FocalPointPickerGrid","bounds","value","props","animationProps","useRevealAnimation","style","width","height","top","left","isActive","setIsActive","timeout","window","setTimeout","clearTimeout"],"mappings":";;;;;;;;;AAGA;;;;AAKA;;AAKA;;AAbA;AACA;AACA;;AAGA;AACA;AACA;AAQe,SAASA,oBAAT,OAIX;AAAA,MAJ0C;AAC7CC,IAAAA,MAAM,GAAG,EADoC;AAE7CC,IAAAA,KAF6C;AAG7C,OAAGC;AAH0C,GAI1C;AACH,QAAMC,cAAc,GAAGC,kBAAkB,CAAEH,KAAF,CAAzC;AACA,QAAMI,KAAK,GAAG;AACbC,IAAAA,KAAK,EAAEN,MAAM,CAACM,KADD;AAEbC,IAAAA,MAAM,EAAEP,MAAM,CAACO;AAFF,GAAd;AAKA,SACC,4BAAC,+BAAD,6BACML,KADN,EAEMC,cAFN;AAGC,IAAA,SAAS,EAAC,qCAHX;AAIC,IAAA,KAAK,EAAGE;AAJT,MAMC,4BAAC,gCAAD;AAAW,IAAA,KAAK,EAAG;AAAEG,MAAAA,GAAG,EAAE;AAAP;AAAnB,IAND,EAOC,4BAAC,gCAAD;AAAW,IAAA,KAAK,EAAG;AAAEA,MAAAA,GAAG,EAAE;AAAP;AAAnB,IAPD,EAQC,4BAAC,gCAAD;AAAW,IAAA,KAAK,EAAG;AAAEC,MAAAA,IAAI,EAAE;AAAR;AAAnB,IARD,EASC,4BAAC,gCAAD;AAAW,IAAA,KAAK,EAAG;AAAEA,MAAAA,IAAI,EAAE;AAAR;AAAnB,IATD,CADD;AAaA;AAED;AACA;AACA;AACA;AACA;;;AACA,SAASL,kBAAT,CAA6BH,KAA7B,EAAqC;AACpC,QAAM,CAAES,QAAF,EAAYC,WAAZ,IAA4B,uBAAU,KAAV,CAAlC;AAEA,8BAAiB,MAAM;AACtBA,IAAAA,WAAW,CAAE,IAAF,CAAX;AACA,UAAMC,OAAO,GAAGC,MAAM,CAACC,UAAP,CAAmB,MAAM;AACxCH,MAAAA,WAAW,CAAE,KAAF,CAAX;AACA,KAFe,EAEb,GAFa,CAAhB;AAIA,WAAO,MAAME,MAAM,CAACE,YAAP,CAAqBH,OAArB,CAAb;AACA,GAPD,EAOG,CAAEX,KAAF,CAPH;AASA,SAAO;AACNS,IAAAA;AADM,GAAP;AAGA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tGridView,\n\tGridLineX,\n\tGridLineY,\n} from './styles/focal-point-picker-style';\nimport { useUpdateEffect } from '../utils/hooks';\n\nexport default function FocalPointPickerGrid( {\n\tbounds = {},\n\tvalue,\n\t...props\n} ) {\n\tconst animationProps = useRevealAnimation( value );\n\tconst style = {\n\t\twidth: bounds.width,\n\t\theight: bounds.height,\n\t};\n\n\treturn (\n\t\t<GridView\n\t\t\t{ ...props }\n\t\t\t{ ...animationProps }\n\t\t\tclassName=\"components-focal-point-picker__grid\"\n\t\t\tstyle={ style }\n\t\t>\n\t\t\t<GridLineX style={ { top: '33%' } } />\n\t\t\t<GridLineX style={ { top: '66%' } } />\n\t\t\t<GridLineY style={ { left: '33%' } } />\n\t\t\t<GridLineY style={ { left: '66%' } } />\n\t\t</GridView>\n\t);\n}\n\n/**\n * Custom hook that renders the \"flash\" animation whenever the value changes.\n *\n * @param {string} value Value of (box) side.\n */\nfunction useRevealAnimation( value ) {\n\tconst [ isActive, setIsActive ] = useState( false );\n\n\tuseUpdateEffect( () => {\n\t\tsetIsActive( true );\n\t\tconst timeout = window.setTimeout( () => {\n\t\t\tsetIsActive( false );\n\t\t}, 600 );\n\n\t\treturn () => window.clearTimeout( timeout );\n\t}, [ value ] );\n\n\treturn {\n\t\tisActive,\n\t};\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/focal-point-picker/grid.js"],"names":["FocalPointPickerGrid","bounds","props","width","height","top","left"],"mappings":";;;;;;;;;;;;;AAGA;;AAHA;AACA;AACA;AAOe,SAASA,oBAAT,OAAsD;AAAA,MAAvB;AAAEC,IAAAA,MAAF;AAAU,OAAGC;AAAb,GAAuB;AACpE,SACC,4BAAC,+BAAD,6BACMA,KADN;AAEC,IAAA,SAAS,EAAC,qCAFX;AAGC,IAAA,KAAK,EAAG;AACPC,MAAAA,KAAK,EAAEF,MAAM,CAACE,KADP;AAEPC,MAAAA,MAAM,EAAEH,MAAM,CAACG;AAFR;AAHT,MAQC,4BAAC,gCAAD;AAAW,IAAA,KAAK,EAAG;AAAEC,MAAAA,GAAG,EAAE;AAAP;AAAnB,IARD,EASC,4BAAC,gCAAD;AAAW,IAAA,KAAK,EAAG;AAAEA,MAAAA,GAAG,EAAE;AAAP;AAAnB,IATD,EAUC,4BAAC,gCAAD;AAAW,IAAA,KAAK,EAAG;AAAEC,MAAAA,IAAI,EAAE;AAAR;AAAnB,IAVD,EAWC,4BAAC,gCAAD;AAAW,IAAA,KAAK,EAAG;AAAEA,MAAAA,IAAI,EAAE;AAAR;AAAnB,IAXD,CADD;AAeA","sourcesContent":["/**\n * Internal dependencies\n */\nimport {\n\tGridView,\n\tGridLineX,\n\tGridLineY,\n} from './styles/focal-point-picker-style';\n\nexport default function FocalPointPickerGrid( { bounds, ...props } ) {\n\treturn (\n\t\t<GridView\n\t\t\t{ ...props }\n\t\t\tclassName=\"components-focal-point-picker__grid\"\n\t\t\tstyle={ {\n\t\t\t\twidth: bounds.width,\n\t\t\t\theight: bounds.height,\n\t\t\t} }\n\t\t>\n\t\t\t<GridLineX style={ { top: '33%' } } />\n\t\t\t<GridLineX style={ { top: '66%' } } />\n\t\t\t<GridLineY style={ { left: '33%' } } />\n\t\t\t<GridLineY style={ { left: '66%' } } />\n\t\t</GridView>\n\t);\n}\n"]}