@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
@@ -1,88 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ExampleMetaContent = exports.ExampleGridItem = exports.ExampleGrid = void 0;
7
-
8
- var _element = require("@wordpress/element");
9
-
10
- var _grid = require("../../grid");
11
-
12
- var _surface = require("../../surface");
13
-
14
- var _text = require("../../text");
15
-
16
- var _view = require("../../view");
17
-
18
- var _vStack = require("../../v-stack");
19
-
20
- /**
21
- * Internal dependencies
22
- */
23
- const Container = _ref => {
24
- let {
25
- children
26
- } = _ref;
27
- return (0, _element.createElement)("div", {
28
- style: {
29
- maxWidth: 1280,
30
- width: '100%',
31
- marginLeft: 'auto',
32
- marginRight: 'auto'
33
- }
34
- }, children);
35
- };
36
-
37
- const ExampleGrid = _ref2 => {
38
- let {
39
- children
40
- } = _ref2;
41
- return (0, _element.createElement)(Container, null, (0, _element.createElement)(_grid.Grid, {
42
- columns: [2, 2, 4],
43
- gap: "1px"
44
- }, children));
45
- };
46
-
47
- exports.ExampleGrid = ExampleGrid;
48
-
49
- const ExampleGridItem = _ref3 => {
50
- let {
51
- children
52
- } = _ref3;
53
- return (0, _element.createElement)(_surface.Surface, {
54
- variant: "secondary",
55
- style: {
56
- padding: 20
57
- }
58
- }, (0, _element.createElement)(_vStack.VStack, {
59
- alignment: "center"
60
- }, children));
61
- };
62
-
63
- exports.ExampleGridItem = ExampleGridItem;
64
-
65
- const ExampleMetaContent = _ref4 => {
66
- let {
67
- title,
68
- items = []
69
- } = _ref4;
70
- return (0, _element.createElement)(_grid.Grid, {
71
- templateColumns: "60px 1fr"
72
- }, (0, _element.createElement)(_view.View, null, (0, _element.createElement)(_text.Text, {
73
- size: "caption",
74
- weight: "bold",
75
- align: "right",
76
- isBlock: true
77
- }, title)), (0, _element.createElement)(_vStack.VStack, {
78
- spacing: 1
79
- }, items.map((item, index) => (0, _element.createElement)(_view.View, {
80
- key: index
81
- }, (0, _element.createElement)(_text.Text, {
82
- size: "caption",
83
- isBlock: true
84
- }, item)))));
85
- };
86
-
87
- exports.ExampleMetaContent = ExampleMetaContent;
88
- //# sourceMappingURL=example-grid.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/__storybook-utils/example-grid.js"],"names":["Container","children","maxWidth","width","marginLeft","marginRight","ExampleGrid","ExampleGridItem","padding","ExampleMetaContent","title","items","map","item","index"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AACA;;AAPA;AACA;AACA;AAOA,MAAMA,SAAS,GAAG;AAAA,MAAE;AAAEC,IAAAA;AAAF,GAAF;AAAA,SACjB;AACC,IAAA,KAAK,EAAG;AACPC,MAAAA,QAAQ,EAAE,IADH;AAEPC,MAAAA,KAAK,EAAE,MAFA;AAGPC,MAAAA,UAAU,EAAE,MAHL;AAIPC,MAAAA,WAAW,EAAE;AAJN;AADT,KAQGJ,QARH,CADiB;AAAA,CAAlB;;AAaO,MAAMK,WAAW,GAAG;AAAA,MAAE;AAAEL,IAAAA;AAAF,GAAF;AAAA,SAC1B,4BAAC,SAAD,QACC,4BAAC,UAAD;AAAM,IAAA,OAAO,EAAG,CAAE,CAAF,EAAK,CAAL,EAAQ,CAAR,CAAhB;AAA8B,IAAA,GAAG,EAAC;AAAlC,KACGA,QADH,CADD,CAD0B;AAAA,CAApB;;;;AAQA,MAAMM,eAAe,GAAG;AAAA,MAAE;AAAEN,IAAAA;AAAF,GAAF;AAAA,SAC9B,4BAAC,gBAAD;AACC,IAAA,OAAO,EAAC,WADT;AAEC,IAAA,KAAK,EAAG;AACPO,MAAAA,OAAO,EAAE;AADF;AAFT,KAMC,4BAAC,cAAD;AAAQ,IAAA,SAAS,EAAC;AAAlB,KAA6BP,QAA7B,CAND,CAD8B;AAAA,CAAxB;;;;AAWA,MAAMQ,kBAAkB,GAAG,SAA6B;AAAA,MAA3B;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAK,GAAG;AAAjB,GAA2B;AAC9D,SACC,4BAAC,UAAD;AAAM,IAAA,eAAe,EAAC;AAAtB,KACC,4BAAC,UAAD,QACC,4BAAC,UAAD;AAAM,IAAA,IAAI,EAAC,SAAX;AAAqB,IAAA,MAAM,EAAC,MAA5B;AAAmC,IAAA,KAAK,EAAC,OAAzC;AAAiD,IAAA,OAAO;AAAxD,KACGD,KADH,CADD,CADD,EAMC,4BAAC,cAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACGC,KAAK,CAACC,GAAN,CAAW,CAAEC,IAAF,EAAQC,KAAR,KACZ,4BAAC,UAAD;AAAM,IAAA,GAAG,EAAGA;AAAZ,KACC,4BAAC,UAAD;AAAM,IAAA,IAAI,EAAC,SAAX;AAAqB,IAAA,OAAO;AAA5B,KACGD,IADH,CADD,CADC,CADH,CAND,CADD;AAkBA,CAnBM","sourcesContent":["/**\n * Internal dependencies\n */\nimport { Grid } from '../../grid';\nimport { Surface } from '../../surface';\nimport { Text } from '../../text';\nimport { View } from '../../view';\nimport { VStack } from '../../v-stack';\n\nconst Container = ( { children } ) => (\n\t<div\n\t\tstyle={ {\n\t\t\tmaxWidth: 1280,\n\t\t\twidth: '100%',\n\t\t\tmarginLeft: 'auto',\n\t\t\tmarginRight: 'auto',\n\t\t} }\n\t>\n\t\t{ children }\n\t</div>\n);\n\nexport const ExampleGrid = ( { children } ) => (\n\t<Container>\n\t\t<Grid columns={ [ 2, 2, 4 ] } gap=\"1px\">\n\t\t\t{ children }\n\t\t</Grid>\n\t</Container>\n);\n\nexport const ExampleGridItem = ( { children } ) => (\n\t<Surface\n\t\tvariant=\"secondary\"\n\t\tstyle={ {\n\t\t\tpadding: 20,\n\t\t} }\n\t>\n\t\t<VStack alignment=\"center\">{ children }</VStack>\n\t</Surface>\n);\n\nexport const ExampleMetaContent = ( { title, items = [] } ) => {\n\treturn (\n\t\t<Grid templateColumns=\"60px 1fr\">\n\t\t\t<View>\n\t\t\t\t<Text size=\"caption\" weight=\"bold\" align=\"right\" isBlock>\n\t\t\t\t\t{ title }\n\t\t\t\t</Text>\n\t\t\t</View>\n\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t{ items.map( ( item, index ) => (\n\t\t\t\t\t<View key={ index }>\n\t\t\t\t\t\t<Text size=\"caption\" isBlock>\n\t\t\t\t\t\t\t{ item }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</View>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t</Grid>\n\t);\n};\n"]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- var _exampleGrid = require("./example-grid");
8
-
9
- Object.keys(_exampleGrid).forEach(function (key) {
10
- if (key === "default" || key === "__esModule") return;
11
- if (key in exports && exports[key] === _exampleGrid[key]) return;
12
- Object.defineProperty(exports, key, {
13
- enumerable: true,
14
- get: function () {
15
- return _exampleGrid[key];
16
- }
17
- });
18
- });
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/__storybook-utils/index.js"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './example-grid';\n"]}
@@ -1,43 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _element = require("@wordpress/element");
9
-
10
- var _vStack = require("../../v-stack");
11
-
12
- var _view = require("../../view");
13
-
14
- var _heading = require("../../heading");
15
-
16
- var _divider = require("../../divider");
17
-
18
- /**
19
- * Internal dependencies
20
- */
21
- function Page(_ref) {
22
- let {
23
- title = 'Component',
24
- children
25
- } = _ref;
26
- return (0, _element.createElement)("div", {
27
- style: {
28
- paddingTop: 24,
29
- paddingBottom: '20vh',
30
- maxWidth: '1280px',
31
- marginLeft: 'auto',
32
- marginRight: 'auto'
33
- }
34
- }, (0, _element.createElement)(_vStack.VStack, {
35
- spacing: 6
36
- }, (0, _element.createElement)(_heading.Heading, {
37
- size: 1
38
- }, title), (0, _element.createElement)(_divider.Divider, null), (0, _element.createElement)(_view.View, null, children)));
39
- }
40
-
41
- var _default = Page;
42
- exports.default = _default;
43
- //# sourceMappingURL=page.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/__storybook-utils/page.js"],"names":["Page","title","children","paddingTop","paddingBottom","maxWidth","marginLeft","marginRight"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AANA;AACA;AACA;AAMA,SAASA,IAAT,OAAmD;AAAA,MAApC;AAAEC,IAAAA,KAAK,GAAG,WAAV;AAAuBC,IAAAA;AAAvB,GAAoC;AAClD,SACC;AACC,IAAA,KAAK,EAAG;AACPC,MAAAA,UAAU,EAAE,EADL;AAEPC,MAAAA,aAAa,EAAE,MAFR;AAGPC,MAAAA,QAAQ,EAAE,QAHH;AAIPC,MAAAA,UAAU,EAAE,MAJL;AAKPC,MAAAA,WAAW,EAAE;AALN;AADT,KASC,4BAAC,cAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACC,4BAAC,gBAAD;AAAS,IAAA,IAAI,EAAG;AAAhB,KAAsBN,KAAtB,CADD,EAEC,4BAAC,gBAAD,OAFD,EAGC,4BAAC,UAAD,QAAQC,QAAR,CAHD,CATD,CADD;AAiBA;;eAEcF,I","sourcesContent":["/**\n * Internal dependencies\n */\nimport { VStack } from '../../v-stack';\nimport { View } from '../../view';\nimport { Heading } from '../../heading';\nimport { Divider } from '../../divider';\n\nfunction Page( { title = 'Component', children } ) {\n\treturn (\n\t\t<div\n\t\t\tstyle={ {\n\t\t\t\tpaddingTop: 24,\n\t\t\t\tpaddingBottom: '20vh',\n\t\t\t\tmaxWidth: '1280px',\n\t\t\t\tmarginLeft: 'auto',\n\t\t\t\tmarginRight: 'auto',\n\t\t\t} }\n\t\t>\n\t\t\t<VStack spacing={ 6 }>\n\t\t\t\t<Heading size={ 1 }>{ title }</Heading>\n\t\t\t\t<Divider />\n\t\t\t\t<View>{ children }</View>\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n\nexport default Page;\n"]}
@@ -1,41 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.normalizeArrowKey = normalizeArrowKey;
7
-
8
- var _keycodes = require("@wordpress/keycodes");
9
-
10
- /**
11
- * WordPress dependencies
12
- */
13
-
14
- /**
15
- * @type {number[]}
16
- */
17
- const arrowKeys = [_keycodes.RIGHT, _keycodes.UP, _keycodes.DOWN, _keycodes.LEFT];
18
- /**
19
- * Normalizes the 'key' property of a KeyboardEvent in IE/Edge
20
- *
21
- * Source:
22
- * https://github.com/downshift-js/downshift/blob/a71005bd879d05d7dcb892d1e0dc5c6ca74e9d39/src/utils.js#L279
23
- *
24
- * @param {import('react').KeyboardEvent} event A keyboardEvent object
25
- *
26
- * @return {string} The keyboard key
27
- */
28
-
29
- function normalizeArrowKey(event) {
30
- const {
31
- key,
32
- keyCode
33
- } = event;
34
-
35
- if (arrowKeys.includes(keyCode) && key.indexOf('Arrow') !== 0) {
36
- return `Arrow${key}`;
37
- }
38
-
39
- return key;
40
- }
41
- //# sourceMappingURL=keyboard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/utils/keyboard.js"],"names":["arrowKeys","RIGHT","UP","DOWN","LEFT","normalizeArrowKey","event","key","keyCode","includes","indexOf"],"mappings":";;;;;;;AAGA;;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA,MAAMA,SAAS,GAAG,CAAEC,eAAF,EAASC,YAAT,EAAaC,cAAb,EAAmBC,cAAnB,CAAlB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACO,SAASC,iBAAT,CAA4BC,KAA5B,EAAoC;AAC1C,QAAM;AAAEC,IAAAA,GAAF;AAAOC,IAAAA;AAAP,MAAmBF,KAAzB;;AAEA,MAAKN,SAAS,CAACS,QAAV,CAAoBD,OAApB,KAAiCD,GAAG,CAACG,OAAJ,CAAa,OAAb,MAA2B,CAAjE,EAAqE;AACpE,WAAQ,QAAQH,GAAK,EAArB;AACA;;AACD,SAAOA,GAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RIGHT, UP, DOWN, LEFT } from '@wordpress/keycodes';\n\n/**\n * @type {number[]}\n */\nconst arrowKeys = [ RIGHT, UP, DOWN, LEFT ];\n\n/**\n * Normalizes the 'key' property of a KeyboardEvent in IE/Edge\n *\n * Source:\n * https://github.com/downshift-js/downshift/blob/a71005bd879d05d7dcb892d1e0dc5c6ca74e9d39/src/utils.js#L279\n *\n * @param {import('react').KeyboardEvent} event A keyboardEvent object\n *\n * @return {string} The keyboard key\n */\nexport function normalizeArrowKey( event ) {\n\tconst { key, keyCode } = event;\n\n\tif ( arrowKeys.includes( keyCode ) && key.indexOf( 'Arrow' ) !== 0 ) {\n\t\treturn `Arrow${ key }`;\n\t}\n\treturn key;\n}\n"]}
@@ -1,69 +0,0 @@
1
- import { createElement } from "@wordpress/element";
2
-
3
- /**
4
- * Internal dependencies
5
- */
6
- import { Grid } from '../../grid';
7
- import { Surface } from '../../surface';
8
- import { Text } from '../../text';
9
- import { View } from '../../view';
10
- import { VStack } from '../../v-stack';
11
-
12
- const Container = _ref => {
13
- let {
14
- children
15
- } = _ref;
16
- return createElement("div", {
17
- style: {
18
- maxWidth: 1280,
19
- width: '100%',
20
- marginLeft: 'auto',
21
- marginRight: 'auto'
22
- }
23
- }, children);
24
- };
25
-
26
- export const ExampleGrid = _ref2 => {
27
- let {
28
- children
29
- } = _ref2;
30
- return createElement(Container, null, createElement(Grid, {
31
- columns: [2, 2, 4],
32
- gap: "1px"
33
- }, children));
34
- };
35
- export const ExampleGridItem = _ref3 => {
36
- let {
37
- children
38
- } = _ref3;
39
- return createElement(Surface, {
40
- variant: "secondary",
41
- style: {
42
- padding: 20
43
- }
44
- }, createElement(VStack, {
45
- alignment: "center"
46
- }, children));
47
- };
48
- export const ExampleMetaContent = _ref4 => {
49
- let {
50
- title,
51
- items = []
52
- } = _ref4;
53
- return createElement(Grid, {
54
- templateColumns: "60px 1fr"
55
- }, createElement(View, null, createElement(Text, {
56
- size: "caption",
57
- weight: "bold",
58
- align: "right",
59
- isBlock: true
60
- }, title)), createElement(VStack, {
61
- spacing: 1
62
- }, items.map((item, index) => createElement(View, {
63
- key: index
64
- }, createElement(Text, {
65
- size: "caption",
66
- isBlock: true
67
- }, item)))));
68
- };
69
- //# sourceMappingURL=example-grid.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/__storybook-utils/example-grid.js"],"names":["Grid","Surface","Text","View","VStack","Container","children","maxWidth","width","marginLeft","marginRight","ExampleGrid","ExampleGridItem","padding","ExampleMetaContent","title","items","map","item","index"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,YAArB;AACA,SAASC,OAAT,QAAwB,eAAxB;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,MAAT,QAAuB,eAAvB;;AAEA,MAAMC,SAAS,GAAG;AAAA,MAAE;AAAEC,IAAAA;AAAF,GAAF;AAAA,SACjB;AACC,IAAA,KAAK,EAAG;AACPC,MAAAA,QAAQ,EAAE,IADH;AAEPC,MAAAA,KAAK,EAAE,MAFA;AAGPC,MAAAA,UAAU,EAAE,MAHL;AAIPC,MAAAA,WAAW,EAAE;AAJN;AADT,KAQGJ,QARH,CADiB;AAAA,CAAlB;;AAaA,OAAO,MAAMK,WAAW,GAAG;AAAA,MAAE;AAAEL,IAAAA;AAAF,GAAF;AAAA,SAC1B,cAAC,SAAD,QACC,cAAC,IAAD;AAAM,IAAA,OAAO,EAAG,CAAE,CAAF,EAAK,CAAL,EAAQ,CAAR,CAAhB;AAA8B,IAAA,GAAG,EAAC;AAAlC,KACGA,QADH,CADD,CAD0B;AAAA,CAApB;AAQP,OAAO,MAAMM,eAAe,GAAG;AAAA,MAAE;AAAEN,IAAAA;AAAF,GAAF;AAAA,SAC9B,cAAC,OAAD;AACC,IAAA,OAAO,EAAC,WADT;AAEC,IAAA,KAAK,EAAG;AACPO,MAAAA,OAAO,EAAE;AADF;AAFT,KAMC,cAAC,MAAD;AAAQ,IAAA,SAAS,EAAC;AAAlB,KAA6BP,QAA7B,CAND,CAD8B;AAAA,CAAxB;AAWP,OAAO,MAAMQ,kBAAkB,GAAG,SAA6B;AAAA,MAA3B;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAK,GAAG;AAAjB,GAA2B;AAC9D,SACC,cAAC,IAAD;AAAM,IAAA,eAAe,EAAC;AAAtB,KACC,cAAC,IAAD,QACC,cAAC,IAAD;AAAM,IAAA,IAAI,EAAC,SAAX;AAAqB,IAAA,MAAM,EAAC,MAA5B;AAAmC,IAAA,KAAK,EAAC,OAAzC;AAAiD,IAAA,OAAO;AAAxD,KACGD,KADH,CADD,CADD,EAMC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACGC,KAAK,CAACC,GAAN,CAAW,CAAEC,IAAF,EAAQC,KAAR,KACZ,cAAC,IAAD;AAAM,IAAA,GAAG,EAAGA;AAAZ,KACC,cAAC,IAAD;AAAM,IAAA,IAAI,EAAC,SAAX;AAAqB,IAAA,OAAO;AAA5B,KACGD,IADH,CADD,CADC,CADH,CAND,CADD;AAkBA,CAnBM","sourcesContent":["/**\n * Internal dependencies\n */\nimport { Grid } from '../../grid';\nimport { Surface } from '../../surface';\nimport { Text } from '../../text';\nimport { View } from '../../view';\nimport { VStack } from '../../v-stack';\n\nconst Container = ( { children } ) => (\n\t<div\n\t\tstyle={ {\n\t\t\tmaxWidth: 1280,\n\t\t\twidth: '100%',\n\t\t\tmarginLeft: 'auto',\n\t\t\tmarginRight: 'auto',\n\t\t} }\n\t>\n\t\t{ children }\n\t</div>\n);\n\nexport const ExampleGrid = ( { children } ) => (\n\t<Container>\n\t\t<Grid columns={ [ 2, 2, 4 ] } gap=\"1px\">\n\t\t\t{ children }\n\t\t</Grid>\n\t</Container>\n);\n\nexport const ExampleGridItem = ( { children } ) => (\n\t<Surface\n\t\tvariant=\"secondary\"\n\t\tstyle={ {\n\t\t\tpadding: 20,\n\t\t} }\n\t>\n\t\t<VStack alignment=\"center\">{ children }</VStack>\n\t</Surface>\n);\n\nexport const ExampleMetaContent = ( { title, items = [] } ) => {\n\treturn (\n\t\t<Grid templateColumns=\"60px 1fr\">\n\t\t\t<View>\n\t\t\t\t<Text size=\"caption\" weight=\"bold\" align=\"right\" isBlock>\n\t\t\t\t\t{ title }\n\t\t\t\t</Text>\n\t\t\t</View>\n\t\t\t<VStack spacing={ 1 }>\n\t\t\t\t{ items.map( ( item, index ) => (\n\t\t\t\t\t<View key={ index }>\n\t\t\t\t\t\t<Text size=\"caption\" isBlock>\n\t\t\t\t\t\t\t{ item }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t</View>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t</Grid>\n\t);\n};\n"]}
@@ -1,2 +0,0 @@
1
- export * from './example-grid';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/__storybook-utils/index.js"],"names":[],"mappings":"AAAA,cAAc,gBAAd","sourcesContent":["export * from './example-grid';\n"]}
@@ -1,32 +0,0 @@
1
- import { createElement } from "@wordpress/element";
2
-
3
- /**
4
- * Internal dependencies
5
- */
6
- import { VStack } from '../../v-stack';
7
- import { View } from '../../view';
8
- import { Heading } from '../../heading';
9
- import { Divider } from '../../divider';
10
-
11
- function Page(_ref) {
12
- let {
13
- title = 'Component',
14
- children
15
- } = _ref;
16
- return createElement("div", {
17
- style: {
18
- paddingTop: 24,
19
- paddingBottom: '20vh',
20
- maxWidth: '1280px',
21
- marginLeft: 'auto',
22
- marginRight: 'auto'
23
- }
24
- }, createElement(VStack, {
25
- spacing: 6
26
- }, createElement(Heading, {
27
- size: 1
28
- }, title), createElement(Divider, null), createElement(View, null, children)));
29
- }
30
-
31
- export default Page;
32
- //# sourceMappingURL=page.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/ui/__storybook-utils/page.js"],"names":["VStack","View","Heading","Divider","Page","title","children","paddingTop","paddingBottom","maxWidth","marginLeft","marginRight"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,MAAT,QAAuB,eAAvB;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,OAAT,QAAwB,eAAxB;AACA,SAASC,OAAT,QAAwB,eAAxB;;AAEA,SAASC,IAAT,OAAmD;AAAA,MAApC;AAAEC,IAAAA,KAAK,GAAG,WAAV;AAAuBC,IAAAA;AAAvB,GAAoC;AAClD,SACC;AACC,IAAA,KAAK,EAAG;AACPC,MAAAA,UAAU,EAAE,EADL;AAEPC,MAAAA,aAAa,EAAE,MAFR;AAGPC,MAAAA,QAAQ,EAAE,QAHH;AAIPC,MAAAA,UAAU,EAAE,MAJL;AAKPC,MAAAA,WAAW,EAAE;AALN;AADT,KASC,cAAC,MAAD;AAAQ,IAAA,OAAO,EAAG;AAAlB,KACC,cAAC,OAAD;AAAS,IAAA,IAAI,EAAG;AAAhB,KAAsBN,KAAtB,CADD,EAEC,cAAC,OAAD,OAFD,EAGC,cAAC,IAAD,QAAQC,QAAR,CAHD,CATD,CADD;AAiBA;;AAED,eAAeF,IAAf","sourcesContent":["/**\n * Internal dependencies\n */\nimport { VStack } from '../../v-stack';\nimport { View } from '../../view';\nimport { Heading } from '../../heading';\nimport { Divider } from '../../divider';\n\nfunction Page( { title = 'Component', children } ) {\n\treturn (\n\t\t<div\n\t\t\tstyle={ {\n\t\t\t\tpaddingTop: 24,\n\t\t\t\tpaddingBottom: '20vh',\n\t\t\t\tmaxWidth: '1280px',\n\t\t\t\tmarginLeft: 'auto',\n\t\t\t\tmarginRight: 'auto',\n\t\t\t} }\n\t\t>\n\t\t\t<VStack spacing={ 6 }>\n\t\t\t\t<Heading size={ 1 }>{ title }</Heading>\n\t\t\t\t<Divider />\n\t\t\t\t<View>{ children }</View>\n\t\t\t</VStack>\n\t\t</div>\n\t);\n}\n\nexport default Page;\n"]}
@@ -1,33 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import { RIGHT, UP, DOWN, LEFT } from '@wordpress/keycodes';
5
- /**
6
- * @type {number[]}
7
- */
8
-
9
- const arrowKeys = [RIGHT, UP, DOWN, LEFT];
10
- /**
11
- * Normalizes the 'key' property of a KeyboardEvent in IE/Edge
12
- *
13
- * Source:
14
- * https://github.com/downshift-js/downshift/blob/a71005bd879d05d7dcb892d1e0dc5c6ca74e9d39/src/utils.js#L279
15
- *
16
- * @param {import('react').KeyboardEvent} event A keyboardEvent object
17
- *
18
- * @return {string} The keyboard key
19
- */
20
-
21
- export function normalizeArrowKey(event) {
22
- const {
23
- key,
24
- keyCode
25
- } = event;
26
-
27
- if (arrowKeys.includes(keyCode) && key.indexOf('Arrow') !== 0) {
28
- return `Arrow${key}`;
29
- }
30
-
31
- return key;
32
- }
33
- //# sourceMappingURL=keyboard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["@wordpress/components/src/utils/keyboard.js"],"names":["RIGHT","UP","DOWN","LEFT","arrowKeys","normalizeArrowKey","event","key","keyCode","includes","indexOf"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,KAAT,EAAgBC,EAAhB,EAAoBC,IAApB,EAA0BC,IAA1B,QAAsC,qBAAtC;AAEA;AACA;AACA;;AACA,MAAMC,SAAS,GAAG,CAAEJ,KAAF,EAASC,EAAT,EAAaC,IAAb,EAAmBC,IAAnB,CAAlB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASE,iBAAT,CAA4BC,KAA5B,EAAoC;AAC1C,QAAM;AAAEC,IAAAA,GAAF;AAAOC,IAAAA;AAAP,MAAmBF,KAAzB;;AAEA,MAAKF,SAAS,CAACK,QAAV,CAAoBD,OAApB,KAAiCD,GAAG,CAACG,OAAJ,CAAa,OAAb,MAA2B,CAAjE,EAAqE;AACpE,WAAQ,QAAQH,GAAK,EAArB;AACA;;AACD,SAAOA,GAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RIGHT, UP, DOWN, LEFT } from '@wordpress/keycodes';\n\n/**\n * @type {number[]}\n */\nconst arrowKeys = [ RIGHT, UP, DOWN, LEFT ];\n\n/**\n * Normalizes the 'key' property of a KeyboardEvent in IE/Edge\n *\n * Source:\n * https://github.com/downshift-js/downshift/blob/a71005bd879d05d7dcb892d1e0dc5c6ca74e9d39/src/utils.js#L279\n *\n * @param {import('react').KeyboardEvent} event A keyboardEvent object\n *\n * @return {string} The keyboard key\n */\nexport function normalizeArrowKey( event ) {\n\tconst { key, keyCode } = event;\n\n\tif ( arrowKeys.includes( keyCode ) && key.indexOf( 'Arrow' ) !== 0 ) {\n\t\treturn `Arrow${ key }`;\n\t}\n\treturn key;\n}\n"]}
@@ -1,26 +0,0 @@
1
- declare namespace _default {
2
- namespace specialTokens {
3
- const textEscaped: string[];
4
- const htmlEscaped: string[];
5
- const textUnescaped: string[];
6
- const htmlUnescaped: string[];
7
- }
8
- namespace specialSuggestions {
9
- const _default: string[];
10
- export { _default as default };
11
- const textEscaped_1: string[];
12
- export { textEscaped_1 as textEscaped };
13
- const textUnescaped_1: string[];
14
- export { textUnescaped_1 as textUnescaped };
15
- export const matchAmpersandUnescaped: string[][];
16
- export const matchAmpersandSequence: string[][];
17
- export const matchAmpersandEscaped: never[];
18
- }
19
- namespace matchingSuggestions {
20
- const th: string[][];
21
- const so: string[][];
22
- const at: string[][];
23
- }
24
- }
25
- export default _default;
26
- //# sourceMappingURL=fixtures.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../../src/form-token-field/test/lib/fixtures.js"],"names":[],"mappings":""}
@@ -1,21 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import type { ComponentProps } from 'react';
5
- /**
6
- * WordPress dependencies
7
- */
8
- import { Component } from '@wordpress/element';
9
- import type { FormTokenFieldProps } from '../../types';
10
- import FormTokenField from '../../';
11
- declare class TokenFieldWrapper extends Component<FormTokenFieldProps, {
12
- tokenSuggestions: ComponentProps<typeof FormTokenField>['suggestions'];
13
- tokens: ComponentProps<typeof FormTokenField>['value'];
14
- isExpanded: boolean;
15
- }> {
16
- constructor(props: FormTokenFieldProps);
17
- render(): JSX.Element;
18
- onTokensChange(value: ComponentProps<typeof FormTokenField>['value']): void;
19
- }
20
- export default TokenFieldWrapper;
21
- //# sourceMappingURL=token-field-wrapper.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"token-field-wrapper.d.ts","sourceRoot":"","sources":["../../../../src/form-token-field/test/lib/token-field-wrapper.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C;;GAEG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAM/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,cAAc,MAAM,QAAQ,CAAC;AAYpC,cAAM,iBAAkB,SAAQ,SAAS,CACxC,mBAAmB,EACnB;IACC,gBAAgB,EAAE,cAAc,CAC/B,OAAO,cAAc,CACrB,CAAE,aAAa,CAAE,CAAC;IACnB,MAAM,EAAE,cAAc,CAAE,OAAO,cAAc,CAAE,CAAE,OAAO,CAAE,CAAC;IAC3D,UAAU,EAAE,OAAO,CAAC;CACpB,CACD;gBACa,KAAK,EAAE,mBAAmB;IAUvC,MAAM;IAgBN,cAAc,CACb,KAAK,EAAE,cAAc,CAAE,OAAO,cAAc,CAAE,CAAE,OAAO,CAAE;CAI1D;AAED,eAAe,iBAAiB,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Normalizes the 'key' property of a KeyboardEvent in IE/Edge
3
- *
4
- * Source:
5
- * https://github.com/downshift-js/downshift/blob/a71005bd879d05d7dcb892d1e0dc5c6ca74e9d39/src/utils.js#L279
6
- *
7
- * @param {import('react').KeyboardEvent} event A keyboardEvent object
8
- *
9
- * @return {string} The keyboard key
10
- */
11
- export function normalizeArrowKey(event: import('react').KeyboardEvent): string;
12
- //# sourceMappingURL=keyboard.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../src/utils/keyboard.js"],"names":[],"mappings":"AAUA;;;;;;;;;GASG;AACH,yCAJW,OAAO,OAAO,EAAE,aAAa,GAE5B,MAAM,CASjB"}
@@ -1,209 +0,0 @@
1
- /**
2
- * External dependencies
3
- */
4
- import { boolean, select, number } from '@storybook/addon-knobs';
5
-
6
- /**
7
- * Internal dependencies
8
- */
9
- import {
10
- Card,
11
- CardHeader,
12
- CardBody,
13
- CardDivider,
14
- CardMedia,
15
- CardFooter,
16
- } from '../index';
17
- import { Text } from '../../text';
18
- import { Heading } from '../../heading';
19
- import Button from '../../button';
20
-
21
- export default {
22
- component: Card,
23
- title: 'Components/Card',
24
- parameters: {
25
- knobs: { disable: false },
26
- },
27
- };
28
-
29
- const KNOBS_GROUPS = {
30
- Card: 'Card',
31
- CardBody: 'CardBody',
32
- CardHeader: 'CardHeader',
33
- CardFooter: 'CardFooter',
34
- };
35
-
36
- // Using `unset` instead of `undefined` as Storybook seems to sometimes pass an
37
- // empty string instead of `undefined`, which is not ideal.
38
- // https://github.com/storybookjs/storybook/issues/800
39
- const PROP_UNSET = 'unset';
40
-
41
- export const _default = () => {
42
- const cardProps = {
43
- isBorderless: boolean( 'Card: isBorderless', false, KNOBS_GROUPS.Card ),
44
- isRounded: boolean( 'Card: isRounded', true, KNOBS_GROUPS.Card ),
45
- elevation: number( 'Card: elevation', 0, {}, KNOBS_GROUPS.Card ),
46
- size: select(
47
- 'Card: size',
48
- {
49
- large: 'large',
50
- medium: 'medium',
51
- small: 'small',
52
- xSmall: 'xSmall',
53
- },
54
- 'medium',
55
- KNOBS_GROUPS.Card
56
- ),
57
- style: {
58
- width: select(
59
- 'Card: width (via inline styles)',
60
- {
61
- '640px': 640,
62
- '360px': 360,
63
- '240px': 240,
64
- '50%': '50%',
65
- '100%': '100%',
66
- },
67
- 360,
68
- KNOBS_GROUPS.Card
69
- ),
70
- },
71
- };
72
-
73
- const cardHeaderProps = {
74
- isBorderless: select(
75
- 'CardHeader: isBorderless',
76
- {
77
- 'unset (defaults to the value set on the <Card> parent)':
78
- PROP_UNSET,
79
- true: true,
80
- false: false,
81
- },
82
- PROP_UNSET,
83
- KNOBS_GROUPS.CardHeader
84
- ),
85
- isShady: boolean(
86
- 'CardHeader: isShady',
87
- false,
88
- KNOBS_GROUPS.CardHeader
89
- ),
90
- size: select(
91
- 'CardHeader: size',
92
- {
93
- 'unset (defaults to the value set on the <Card> parent)':
94
- PROP_UNSET,
95
- large: 'large',
96
- medium: 'medium',
97
- small: 'small',
98
- xSmall: 'xSmall',
99
- },
100
- PROP_UNSET,
101
- KNOBS_GROUPS.CardHeader
102
- ),
103
- };
104
-
105
- const cardBodyProps = {
106
- isShady: boolean( 'CardBody: isShady', false, KNOBS_GROUPS.CardBody ),
107
- size: select(
108
- 'CardBody: size',
109
- {
110
- 'unset (defaults to the value set on the <Card> parent)':
111
- PROP_UNSET,
112
- large: 'large',
113
- medium: 'medium',
114
- small: 'small',
115
- xSmall: 'xSmall',
116
- },
117
- PROP_UNSET,
118
- KNOBS_GROUPS.CardBody
119
- ),
120
- };
121
-
122
- const cardFooterProps = {
123
- isBorderless: select(
124
- 'CardFooter: isBorderless',
125
- {
126
- 'unset (defaults to the value set on the <Card> parent)':
127
- PROP_UNSET,
128
- true: true,
129
- false: false,
130
- },
131
- PROP_UNSET,
132
- KNOBS_GROUPS.CardFooter
133
- ),
134
- isShady: boolean(
135
- 'CardFooter: isShady',
136
- false,
137
- KNOBS_GROUPS.CardFooter
138
- ),
139
- justify: select(
140
- 'CardFooter: justify',
141
- {
142
- flexStart: 'flex-start',
143
- flexEnd: 'flex-end',
144
- center: 'center',
145
- spaceAround: 'space-around',
146
- spaceBetween: 'space-between',
147
- spaceEvenly: 'space-evenly',
148
- },
149
- 'space-between',
150
- KNOBS_GROUPS.CardFooter
151
- ),
152
- size: select(
153
- 'CardFooter: size',
154
- {
155
- 'unset (defaults to the value set on the <Card> parent)':
156
- PROP_UNSET,
157
- large: 'large',
158
- medium: 'medium',
159
- small: 'small',
160
- xSmall: 'xSmall',
161
- },
162
- PROP_UNSET,
163
- KNOBS_GROUPS.CardFooter
164
- ),
165
- };
166
-
167
- // Do not pass the `size` and `isBorderless` props when their value is `undefined`.
168
- // This allows the `CardHeader`, `CardBody` and `CardFooter` components to use
169
- // the values that are set on the parent `Card` component by default.
170
- for ( const componentProps of [
171
- cardHeaderProps,
172
- cardFooterProps,
173
- cardBodyProps,
174
- ] ) {
175
- for ( const prop of [ 'isBorderless', 'size' ] ) {
176
- if ( componentProps[ prop ] === PROP_UNSET ) {
177
- delete componentProps[ prop ];
178
- }
179
- }
180
- }
181
-
182
- return (
183
- <Card { ...cardProps }>
184
- <CardHeader { ...cardHeaderProps }>
185
- <Heading>CardHeader</Heading>
186
- </CardHeader>
187
- <CardBody { ...cardBodyProps }>
188
- <Text>CardBody</Text>
189
- </CardBody>
190
- <CardBody { ...cardBodyProps }>
191
- <Text>CardBody (before CardDivider)</Text>
192
- </CardBody>
193
- <CardDivider />
194
- <CardBody { ...cardBodyProps }>
195
- <Text>CardBody (after CardDivider)</Text>
196
- </CardBody>
197
- <CardMedia>
198
- <img
199
- alt="Card Media"
200
- src="https://images.unsplash.com/photo-1566125882500-87e10f726cdc?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1867&q=80"
201
- />
202
- </CardMedia>
203
- <CardFooter { ...cardFooterProps }>
204
- <Text>CardFooter</Text>
205
- <Button variant="secondary">Action Button</Button>
206
- </CardFooter>
207
- </Card>
208
- );
209
- };