@wordpress/components 25.1.0 → 25.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (993) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/README.md +1 -1
  3. package/build/alignment-matrix-control/cell.js +4 -5
  4. package/build/alignment-matrix-control/cell.js.map +1 -1
  5. package/build/alignment-matrix-control/icon.js +2 -4
  6. package/build/alignment-matrix-control/icon.js.map +1 -1
  7. package/build/alignment-matrix-control/index.js +6 -7
  8. package/build/alignment-matrix-control/index.js.map +1 -1
  9. package/build/angle-picker-control/angle-circle.js +4 -7
  10. package/build/angle-picker-control/angle-circle.js.map +1 -1
  11. package/build/angle-picker-control/index.js +2 -4
  12. package/build/angle-picker-control/index.js.map +1 -1
  13. package/build/autocomplete/autocompleter-ui.js +28 -1
  14. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  15. package/build/autocomplete/index.js +0 -20
  16. package/build/autocomplete/index.js.map +1 -1
  17. package/build/base-control/index.js +2 -4
  18. package/build/base-control/index.js.map +1 -1
  19. package/build/border-box-control/border-box-control/component.js +4 -6
  20. package/build/border-box-control/border-box-control/component.js.map +1 -1
  21. package/build/border-box-control/border-box-control-linked-button/component.js +2 -4
  22. package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  23. package/build/border-box-control/border-box-control-split-controls/component.js +15 -13
  24. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  25. package/build/border-box-control/border-box-control-visualizer/component.js +2 -6
  26. package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  27. package/build/border-control/border-control/component.js +4 -6
  28. package/build/border-control/border-control/component.js.map +1 -1
  29. package/build/border-control/border-control-dropdown/component.js +4 -6
  30. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  31. package/build/border-control/border-control-style-picker/component.js +2 -4
  32. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  33. package/build/box-control/all-input-control.js +2 -4
  34. package/build/box-control/all-input-control.js.map +1 -1
  35. package/build/box-control/axial-input-controls.js +2 -4
  36. package/build/box-control/axial-input-controls.js.map +1 -1
  37. package/build/box-control/icon.js +4 -7
  38. package/build/box-control/icon.js.map +1 -1
  39. package/build/box-control/index.js +7 -6
  40. package/build/box-control/index.js.map +1 -1
  41. package/build/box-control/input-controls.js +2 -4
  42. package/build/box-control/input-controls.js.map +1 -1
  43. package/build/box-control/linked-button.js +2 -4
  44. package/build/box-control/linked-button.js.map +1 -1
  45. package/build/box-control/unit-control.js +6 -6
  46. package/build/box-control/unit-control.js.map +1 -1
  47. package/build/button/deprecated.js +2 -4
  48. package/build/button/deprecated.js.map +1 -1
  49. package/build/button/index.js +7 -3
  50. package/build/button/index.js.map +1 -1
  51. package/build/button-group/index.js +4 -5
  52. package/build/button-group/index.js.map +1 -1
  53. package/build/card/card/component.js +2 -4
  54. package/build/card/card/component.js.map +1 -1
  55. package/build/card/card-body/component.js +4 -8
  56. package/build/card/card-body/component.js.map +1 -1
  57. package/build/card/card-divider/component.js +2 -6
  58. package/build/card/card-divider/component.js.map +1 -1
  59. package/build/card/card-footer/component.js +2 -6
  60. package/build/card/card-footer/component.js.map +1 -1
  61. package/build/card/card-header/component.js +2 -6
  62. package/build/card/card-header/component.js.map +1 -1
  63. package/build/card/card-media/component.js +2 -6
  64. package/build/card/card-media/component.js.map +1 -1
  65. package/build/checkbox-control/index.js +4 -5
  66. package/build/checkbox-control/index.js.map +1 -1
  67. package/build/circular-option-picker/index.js +19 -16
  68. package/build/circular-option-picker/index.js.map +1 -1
  69. package/build/clipboard-button/index.js +9 -20
  70. package/build/clipboard-button/index.js.map +1 -1
  71. package/build/clipboard-button/types.js +6 -0
  72. package/build/clipboard-button/types.js.map +1 -0
  73. package/build/color-control/index.native.js +4 -5
  74. package/build/color-control/index.native.js.map +1 -1
  75. package/build/color-indicator/index.js +4 -5
  76. package/build/color-indicator/index.js.map +1 -1
  77. package/build/color-palette/index.js +11 -11
  78. package/build/color-palette/index.js.map +1 -1
  79. package/build/color-picker/color-input.js +6 -3
  80. package/build/color-picker/color-input.js.map +1 -1
  81. package/build/color-picker/component.js +4 -5
  82. package/build/color-picker/component.js.map +1 -1
  83. package/build/color-picker/legacy-adapter.js +2 -1
  84. package/build/color-picker/legacy-adapter.js.map +1 -1
  85. package/build/confirm-dialog/component.js +4 -5
  86. package/build/confirm-dialog/component.js.map +1 -1
  87. package/build/custom-gradient-picker/gradient-bar/control-points.js +8 -8
  88. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  89. package/build/custom-select-control/index.js +34 -32
  90. package/build/custom-select-control/index.js.map +1 -1
  91. package/build/dashicon/index.js +4 -7
  92. package/build/dashicon/index.js.map +1 -1
  93. package/build/dashicon/index.native.js +4 -7
  94. package/build/dashicon/index.native.js.map +1 -1
  95. package/build/disabled/index.js +4 -7
  96. package/build/disabled/index.js.map +1 -1
  97. package/build/divider/component.js +4 -8
  98. package/build/divider/component.js.map +1 -1
  99. package/build/drop-zone/index.js +2 -4
  100. package/build/drop-zone/index.js.map +1 -1
  101. package/build/dropdown/dropdown-content-wrapper.js +2 -6
  102. package/build/dropdown/dropdown-content-wrapper.js.map +1 -1
  103. package/build/dropdown/index.js +29 -24
  104. package/build/dropdown/index.js.map +1 -1
  105. package/build/dropdown-menu/index.js +98 -93
  106. package/build/dropdown-menu/index.js.map +1 -1
  107. package/build/dropdown-menu/index.native.js +2 -4
  108. package/build/dropdown-menu/index.native.js.map +1 -1
  109. package/build/dropdown-menu-v2/index.js +14 -12
  110. package/build/dropdown-menu-v2/index.js.map +1 -1
  111. package/build/dropdown-menu-v2/styles.js +16 -16
  112. package/build/dropdown-menu-v2/styles.js.map +1 -1
  113. package/build/elevation/component.js +2 -6
  114. package/build/elevation/component.js.map +1 -1
  115. package/build/external-link/index.js +2 -4
  116. package/build/external-link/index.js.map +1 -1
  117. package/build/flex/flex/component.js +2 -6
  118. package/build/flex/flex/component.js.map +1 -1
  119. package/build/flex/flex-block/component.js +2 -6
  120. package/build/flex/flex-block/component.js.map +1 -1
  121. package/build/flex/flex-item/component.js +2 -6
  122. package/build/flex/flex-item/component.js.map +1 -1
  123. package/build/focal-point-picker/controls.js +4 -7
  124. package/build/focal-point-picker/controls.js.map +1 -1
  125. package/build/focal-point-picker/focal-point.js +2 -4
  126. package/build/focal-point-picker/focal-point.js.map +1 -1
  127. package/build/focal-point-picker/grid.js +2 -6
  128. package/build/focal-point-picker/grid.js.map +1 -1
  129. package/build/focal-point-picker/index.js +4 -6
  130. package/build/focal-point-picker/index.js.map +1 -1
  131. package/build/focal-point-picker/index.native.js +2 -4
  132. package/build/focal-point-picker/index.native.js.map +1 -1
  133. package/build/focal-point-picker/media.js +7 -10
  134. package/build/focal-point-picker/media.js.map +1 -1
  135. package/build/focal-point-picker/tooltip/index.native.js +2 -4
  136. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  137. package/build/focusable-iframe/index.js +4 -5
  138. package/build/focusable-iframe/index.js.map +1 -1
  139. package/build/footer-message-control/index.native.js +2 -1
  140. package/build/footer-message-control/index.native.js.map +1 -1
  141. package/build/form-file-upload/index.js +4 -5
  142. package/build/form-file-upload/index.js.map +1 -1
  143. package/build/form-toggle/index.js +4 -5
  144. package/build/form-toggle/index.js.map +1 -1
  145. package/build/form-token-field/index.js +4 -5
  146. package/build/form-token-field/index.js.map +1 -1
  147. package/build/form-token-field/token-input.js +4 -6
  148. package/build/form-token-field/token-input.js.map +1 -1
  149. package/build/gradient-picker/index.js +14 -12
  150. package/build/gradient-picker/index.js.map +1 -1
  151. package/build/grid/component.js +2 -4
  152. package/build/grid/component.js.map +1 -1
  153. package/build/guide/page.js +2 -1
  154. package/build/guide/page.js.map +1 -1
  155. package/build/h-stack/component.js +2 -6
  156. package/build/h-stack/component.js.map +1 -1
  157. package/build/h-stack/hook.js +4 -7
  158. package/build/h-stack/hook.js.map +1 -1
  159. package/build/heading/component.js +2 -6
  160. package/build/heading/component.js.map +1 -1
  161. package/build/higher-order/navigate-regions/index.js +3 -1
  162. package/build/higher-order/navigate-regions/index.js.map +1 -1
  163. package/build/higher-order/with-constrained-tabbing/index.js +2 -1
  164. package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
  165. package/build/higher-order/with-fallback-styles/index.js +3 -3
  166. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  167. package/build/higher-order/with-filters/index.js +2 -1
  168. package/build/higher-order/with-filters/index.js.map +1 -1
  169. package/build/higher-order/with-focus-outside/index.js +5 -7
  170. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  171. package/build/higher-order/with-focus-outside/index.native.js +5 -7
  172. package/build/higher-order/with-focus-outside/index.native.js.map +1 -1
  173. package/build/higher-order/with-focus-return/index.js +2 -1
  174. package/build/higher-order/with-focus-return/index.js.map +1 -1
  175. package/build/higher-order/with-notices/index.js +3 -4
  176. package/build/higher-order/with-notices/index.js.map +1 -1
  177. package/build/higher-order/with-spoken-messages/index.js +2 -6
  178. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  179. package/build/icon/index.js +6 -6
  180. package/build/icon/index.js.map +1 -1
  181. package/build/input-control/index.js +5 -5
  182. package/build/input-control/index.js.map +1 -1
  183. package/build/input-control/input-base.js +3 -4
  184. package/build/input-control/input-base.js.map +1 -1
  185. package/build/input-control/input-field.js +3 -6
  186. package/build/input-control/input-field.js.map +1 -1
  187. package/build/input-control/input-prefix-wrapper.js +4 -8
  188. package/build/input-control/input-prefix-wrapper.js.map +1 -1
  189. package/build/input-control/input-suffix-wrapper.js +4 -8
  190. package/build/input-control/input-suffix-wrapper.js.map +1 -1
  191. package/build/input-control/label.js +4 -7
  192. package/build/input-control/label.js.map +1 -1
  193. package/build/input-control/styles/input-control-styles.js +2 -4
  194. package/build/input-control/styles/input-control-styles.js.map +1 -1
  195. package/build/isolated-event-container/index.js +2 -4
  196. package/build/isolated-event-container/index.js.map +1 -1
  197. package/build/item-group/item/component.js +2 -6
  198. package/build/item-group/item/component.js.map +1 -1
  199. package/build/item-group/item-group/component.js +2 -6
  200. package/build/item-group/item-group/component.js.map +1 -1
  201. package/build/item-group/styles.js +10 -10
  202. package/build/item-group/styles.js.map +1 -1
  203. package/build/menu-item/index.js +4 -5
  204. package/build/menu-item/index.js.map +1 -1
  205. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -6
  206. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  207. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +2 -1
  208. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  209. package/build/mobile/bottom-sheet/cell.native.js +5 -6
  210. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  211. package/build/mobile/bottom-sheet/color-cell.native.js +2 -4
  212. package/build/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  213. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js +4 -5
  214. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  215. package/build/mobile/bottom-sheet/footer-message-cell.native.js +2 -4
  216. package/build/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  217. package/build/mobile/bottom-sheet/index.native.js +8 -8
  218. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  219. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +4 -7
  220. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  221. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -4
  222. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  223. package/build/mobile/bottom-sheet/picker-cell.native.js +4 -5
  224. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  225. package/build/mobile/bottom-sheet/radio-cell.native.js +2 -4
  226. package/build/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  227. package/build/mobile/bottom-sheet/range-cell.native.js +2 -4
  228. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  229. package/build/mobile/bottom-sheet/ripple.native.js +4 -6
  230. package/build/mobile/bottom-sheet/ripple.native.js.map +1 -1
  231. package/build/mobile/bottom-sheet/switch-cell.native.js +2 -4
  232. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  233. package/build/mobile/color-settings/index.native.js +5 -5
  234. package/build/mobile/color-settings/index.native.js.map +1 -1
  235. package/build/mobile/cycle-select-control/index.native.js +4 -5
  236. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  237. package/build/mobile/focal-point-settings-panel/index.native.js +5 -5
  238. package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  239. package/build/mobile/global-styles-context/index.native.js +2 -6
  240. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  241. package/build/mobile/gradient/index.native.js +4 -5
  242. package/build/mobile/gradient/index.native.js.map +1 -1
  243. package/build/mobile/image/image-editing-button.native.js +4 -5
  244. package/build/mobile/image/image-editing-button.native.js.map +1 -1
  245. package/build/mobile/image/index.native.js +15 -15
  246. package/build/mobile/image/index.native.js.map +1 -1
  247. package/build/mobile/keyboard-avoiding-view/index.ios.js +2 -4
  248. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  249. package/build/mobile/keyboard-aware-flat-list/index.android.js +4 -5
  250. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  251. package/build/mobile/keyboard-aware-flat-list/index.ios.js +2 -1
  252. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  253. package/build/mobile/link-picker/link-picker-results.native.js +4 -6
  254. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  255. package/build/mobile/link-settings/link-settings-navigation.native.js +4 -5
  256. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  257. package/build/mobile/link-settings/link-settings-screen.native.js +2 -4
  258. package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  259. package/build/mobile/picker/index.ios.js +4 -6
  260. package/build/mobile/picker/index.ios.js.map +1 -1
  261. package/build/mobile/segmented-control/index.native.js +4 -5
  262. package/build/mobile/segmented-control/index.native.js.map +1 -1
  263. package/build/modal/index.js +4 -6
  264. package/build/modal/index.js.map +1 -1
  265. package/build/navigable-container/container.js +6 -9
  266. package/build/navigable-container/container.js.map +1 -1
  267. package/build/navigable-container/menu.js +4 -5
  268. package/build/navigable-container/menu.js.map +1 -1
  269. package/build/navigable-container/tabbable.js +4 -5
  270. package/build/navigable-container/tabbable.js.map +1 -1
  271. package/build/navigation/item/base.js +4 -5
  272. package/build/navigation/item/base.js.map +1 -1
  273. package/build/navigation/item/index.js +3 -4
  274. package/build/navigation/item/index.js.map +1 -1
  275. package/build/navigator/navigator-back-button/component.js +4 -7
  276. package/build/navigator/navigator-back-button/component.js.map +1 -1
  277. package/build/navigator/navigator-button/component.js +4 -7
  278. package/build/navigator/navigator-button/component.js.map +1 -1
  279. package/build/navigator/navigator-provider/component.js +4 -5
  280. package/build/navigator/navigator-provider/component.js.map +1 -1
  281. package/build/navigator/navigator-screen/component.js +9 -10
  282. package/build/navigator/navigator-screen/component.js.map +1 -1
  283. package/build/navigator/navigator-to-parent-button/component.js +4 -7
  284. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  285. package/build/notice/list.js +2 -4
  286. package/build/notice/list.js.map +1 -1
  287. package/build/notice/list.native.js +2 -4
  288. package/build/notice/list.native.js.map +1 -1
  289. package/build/number-control/index.js +4 -6
  290. package/build/number-control/index.js.map +1 -1
  291. package/build/palette-edit/index.js +11 -12
  292. package/build/palette-edit/index.js.map +1 -1
  293. package/build/panel/body.js +8 -8
  294. package/build/panel/body.js.map +1 -1
  295. package/build/placeholder/index.js +2 -4
  296. package/build/placeholder/index.js.map +1 -1
  297. package/build/popover/index.js +11 -12
  298. package/build/popover/index.js.map +1 -1
  299. package/build/popover/utils.js +15 -1
  300. package/build/popover/utils.js.map +1 -1
  301. package/build/query-controls/category-select.js +4 -6
  302. package/build/query-controls/category-select.js.map +1 -1
  303. package/build/radio-control/index.js +4 -5
  304. package/build/radio-control/index.js.map +1 -1
  305. package/build/radio-control/index.native.js +4 -5
  306. package/build/radio-control/index.native.js.map +1 -1
  307. package/build/radio-group/index.js +5 -5
  308. package/build/radio-group/index.js.map +1 -1
  309. package/build/radio-group/radio/index.js +5 -5
  310. package/build/radio-group/radio/index.js.map +1 -1
  311. package/build/range-control/index.js +2 -4
  312. package/build/range-control/index.js.map +1 -1
  313. package/build/range-control/index.native.js +4 -5
  314. package/build/range-control/index.native.js.map +1 -1
  315. package/build/range-control/input-range.js +2 -6
  316. package/build/range-control/input-range.js.map +1 -1
  317. package/build/range-control/mark.js +2 -4
  318. package/build/range-control/mark.js.map +1 -1
  319. package/build/range-control/rail.js +6 -7
  320. package/build/range-control/rail.js.map +1 -1
  321. package/build/range-control/tooltip.js +2 -4
  322. package/build/range-control/tooltip.js.map +1 -1
  323. package/build/resizable-box/index.js +5 -5
  324. package/build/resizable-box/index.js.map +1 -1
  325. package/build/resizable-box/resize-tooltip/index.js +4 -5
  326. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  327. package/build/resizable-box/resize-tooltip/label.js +4 -7
  328. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  329. package/build/scrollable/component.js +2 -6
  330. package/build/scrollable/component.js.map +1 -1
  331. package/build/search-control/index.js +2 -4
  332. package/build/search-control/index.js.map +1 -1
  333. package/build/select-control/index.js +2 -4
  334. package/build/select-control/index.js.map +1 -1
  335. package/build/select-control/index.native.js +4 -5
  336. package/build/select-control/index.native.js.map +1 -1
  337. package/build/slot-fill/bubbles-virtually/slot.js +4 -5
  338. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  339. package/build/slot-fill/index.js +17 -13
  340. package/build/slot-fill/index.js.map +1 -1
  341. package/build/slot-fill/index.native.js +10 -9
  342. package/build/slot-fill/index.native.js.map +1 -1
  343. package/build/slot-fill/slot.js +2 -4
  344. package/build/slot-fill/slot.js.map +1 -1
  345. package/build/snackbar/list.js +2 -4
  346. package/build/snackbar/list.js.map +1 -1
  347. package/build/spacer/component.js +2 -6
  348. package/build/spacer/component.js.map +1 -1
  349. package/build/spinner/index.js +4 -6
  350. package/build/spinner/index.js.map +1 -1
  351. package/build/surface/component.js +2 -6
  352. package/build/surface/component.js.map +1 -1
  353. package/build/tab-panel/index.js +4 -5
  354. package/build/tab-panel/index.js.map +1 -1
  355. package/build/text/component.js +4 -6
  356. package/build/text/component.js.map +1 -1
  357. package/build/text-control/index.js +4 -5
  358. package/build/text-control/index.js.map +1 -1
  359. package/build/text-control/index.native.js +4 -5
  360. package/build/text-control/index.native.js.map +1 -1
  361. package/build/textarea-control/index.js +4 -5
  362. package/build/textarea-control/index.js.map +1 -1
  363. package/build/theme/index.js +4 -7
  364. package/build/theme/index.js.map +1 -1
  365. package/build/toggle-control/index.native.js +4 -5
  366. package/build/toggle-control/index.native.js.map +1 -1
  367. package/build/toggle-group-control/toggle-group-control/as-button-group.js +4 -6
  368. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  369. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +4 -6
  370. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  371. package/build/toggle-group-control/toggle-group-control/component.js +2 -4
  372. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  373. package/build/toggle-group-control/toggle-group-control-option/component.js +2 -6
  374. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  375. package/build/toggle-group-control/toggle-group-control-option-base/component.js +6 -7
  376. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  377. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +2 -4
  378. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  379. package/build/toolbar/toolbar/index.js +9 -13
  380. package/build/toolbar/toolbar/index.js.map +1 -1
  381. package/build/toolbar/toolbar/toolbar-container.js +9 -13
  382. package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
  383. package/build/toolbar/toolbar-button/index.js +13 -11
  384. package/build/toolbar/toolbar-button/index.js.map +1 -1
  385. package/build/toolbar/toolbar-context/index.js.map +1 -1
  386. package/build/toolbar/toolbar-dropdown-menu/index.js +8 -10
  387. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  388. package/build/toolbar/toolbar-group/index.js +11 -10
  389. package/build/toolbar/toolbar-group/index.js.map +1 -1
  390. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -6
  391. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  392. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js +4 -5
  393. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  394. package/build/toolbar/toolbar-group/toolbar-group-container.js +4 -7
  395. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  396. package/build/toolbar/toolbar-item/index.js +13 -11
  397. package/build/toolbar/toolbar-item/index.js.map +1 -1
  398. package/build/toolbar/toolbar-item/types.js +6 -0
  399. package/build/toolbar/toolbar-item/types.js.map +1 -0
  400. package/build/tools-panel/tools-panel/component.js +2 -4
  401. package/build/tools-panel/tools-panel/component.js.map +1 -1
  402. package/build/tools-panel/tools-panel-header/component.js +2 -4
  403. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  404. package/build/tools-panel/tools-panel-item/component.js +4 -8
  405. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  406. package/build/tooltip/index.js +4 -5
  407. package/build/tooltip/index.js.map +1 -1
  408. package/build/tooltip/index.native.js +2 -1
  409. package/build/tooltip/index.native.js.map +1 -1
  410. package/build/tree-grid/cell.js +2 -4
  411. package/build/tree-grid/cell.js.map +1 -1
  412. package/build/tree-grid/index.js +2 -4
  413. package/build/tree-grid/index.js.map +1 -1
  414. package/build/tree-grid/item.js +4 -5
  415. package/build/tree-grid/item.js.map +1 -1
  416. package/build/tree-grid/roving-tab-index-item.js +2 -1
  417. package/build/tree-grid/roving-tab-index-item.js.map +1 -1
  418. package/build/tree-grid/row.js +2 -6
  419. package/build/tree-grid/row.js.map +1 -1
  420. package/build/tree-select/index.js +4 -7
  421. package/build/tree-select/index.js.map +1 -1
  422. package/build/truncate/component.js +4 -6
  423. package/build/truncate/component.js.map +1 -1
  424. package/build/ui/control-group/component.js +8 -12
  425. package/build/ui/control-group/component.js.map +1 -1
  426. package/build/ui/control-label/component.js +4 -8
  427. package/build/ui/control-label/component.js.map +1 -1
  428. package/build/ui/form-group/form-group-content.js +4 -5
  429. package/build/ui/form-group/form-group-content.js.map +1 -1
  430. package/build/ui/form-group/form-group-label.js +2 -1
  431. package/build/ui/form-group/form-group-label.js.map +1 -1
  432. package/build/ui/form-group/form-group.js +8 -8
  433. package/build/ui/form-group/form-group.js.map +1 -1
  434. package/build/ui/shortcut/component.js +4 -7
  435. package/build/ui/shortcut/component.js.map +1 -1
  436. package/build/ui/spinner/component.js +2 -6
  437. package/build/ui/spinner/component.js.map +1 -1
  438. package/build/ui/tooltip/component.js +3 -4
  439. package/build/ui/tooltip/component.js.map +1 -1
  440. package/build/ui/tooltip/content.js +5 -8
  441. package/build/ui/tooltip/content.js.map +1 -1
  442. package/build/unit-control/index.js +31 -94
  443. package/build/unit-control/index.js.map +1 -1
  444. package/build/unit-control/index.native.js +7 -7
  445. package/build/unit-control/index.native.js.map +1 -1
  446. package/build/unit-control/unit-select-control.js +15 -7
  447. package/build/unit-control/unit-select-control.js.map +1 -1
  448. package/build/v-stack/component.js +2 -6
  449. package/build/v-stack/component.js.map +1 -1
  450. package/build/visually-hidden/component.js +4 -8
  451. package/build/visually-hidden/component.js.map +1 -1
  452. package/build/z-stack/component.js +2 -6
  453. package/build/z-stack/component.js.map +1 -1
  454. package/build-module/alignment-matrix-control/cell.js +4 -4
  455. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  456. package/build-module/alignment-matrix-control/icon.js +2 -3
  457. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  458. package/build-module/alignment-matrix-control/index.js +6 -6
  459. package/build-module/alignment-matrix-control/index.js.map +1 -1
  460. package/build-module/angle-picker-control/angle-circle.js +4 -4
  461. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  462. package/build-module/angle-picker-control/index.js +2 -3
  463. package/build-module/angle-picker-control/index.js.map +1 -1
  464. package/build-module/autocomplete/autocompleter-ui.js +27 -2
  465. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  466. package/build-module/autocomplete/index.js +1 -19
  467. package/build-module/autocomplete/index.js.map +1 -1
  468. package/build-module/base-control/index.js +2 -3
  469. package/build-module/base-control/index.js.map +1 -1
  470. package/build-module/border-box-control/border-box-control/component.js +4 -5
  471. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  472. package/build-module/border-box-control/border-box-control-linked-button/component.js +2 -3
  473. package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  474. package/build-module/border-box-control/border-box-control-split-controls/component.js +15 -12
  475. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  476. package/build-module/border-box-control/border-box-control-visualizer/component.js +2 -3
  477. package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  478. package/build-module/border-control/border-control/component.js +4 -5
  479. package/build-module/border-control/border-control/component.js.map +1 -1
  480. package/build-module/border-control/border-control-dropdown/component.js +4 -5
  481. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  482. package/build-module/border-control/border-control-style-picker/component.js +2 -3
  483. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  484. package/build-module/box-control/all-input-control.js +2 -3
  485. package/build-module/box-control/all-input-control.js.map +1 -1
  486. package/build-module/box-control/axial-input-controls.js +2 -3
  487. package/build-module/box-control/axial-input-controls.js.map +1 -1
  488. package/build-module/box-control/icon.js +4 -4
  489. package/build-module/box-control/icon.js.map +1 -1
  490. package/build-module/box-control/index.js +7 -5
  491. package/build-module/box-control/index.js.map +1 -1
  492. package/build-module/box-control/input-controls.js +2 -3
  493. package/build-module/box-control/input-controls.js.map +1 -1
  494. package/build-module/box-control/linked-button.js +2 -3
  495. package/build-module/box-control/linked-button.js.map +1 -1
  496. package/build-module/box-control/unit-control.js +6 -5
  497. package/build-module/box-control/unit-control.js.map +1 -1
  498. package/build-module/button/deprecated.js +2 -3
  499. package/build-module/button/deprecated.js.map +1 -1
  500. package/build-module/button/index.js +7 -2
  501. package/build-module/button/index.js.map +1 -1
  502. package/build-module/button-group/index.js +4 -4
  503. package/build-module/button-group/index.js.map +1 -1
  504. package/build-module/card/card/component.js +2 -3
  505. package/build-module/card/card/component.js.map +1 -1
  506. package/build-module/card/card-body/component.js +4 -5
  507. package/build-module/card/card-body/component.js.map +1 -1
  508. package/build-module/card/card-divider/component.js +2 -3
  509. package/build-module/card/card-divider/component.js.map +1 -1
  510. package/build-module/card/card-footer/component.js +2 -3
  511. package/build-module/card/card-footer/component.js.map +1 -1
  512. package/build-module/card/card-header/component.js +2 -3
  513. package/build-module/card/card-header/component.js.map +1 -1
  514. package/build-module/card/card-media/component.js +2 -3
  515. package/build-module/card/card-media/component.js.map +1 -1
  516. package/build-module/checkbox-control/index.js +4 -4
  517. package/build-module/checkbox-control/index.js.map +1 -1
  518. package/build-module/circular-option-picker/index.js +19 -15
  519. package/build-module/circular-option-picker/index.js.map +1 -1
  520. package/build-module/clipboard-button/index.js +9 -20
  521. package/build-module/clipboard-button/index.js.map +1 -1
  522. package/build-module/clipboard-button/types.js +2 -0
  523. package/build-module/clipboard-button/types.js.map +1 -0
  524. package/build-module/color-control/index.native.js +4 -4
  525. package/build-module/color-control/index.native.js.map +1 -1
  526. package/build-module/color-indicator/index.js +4 -4
  527. package/build-module/color-indicator/index.js.map +1 -1
  528. package/build-module/color-palette/index.js +11 -10
  529. package/build-module/color-palette/index.js.map +1 -1
  530. package/build-module/color-picker/color-input.js +6 -3
  531. package/build-module/color-picker/color-input.js.map +1 -1
  532. package/build-module/color-picker/component.js +4 -4
  533. package/build-module/color-picker/component.js.map +1 -1
  534. package/build-module/color-picker/legacy-adapter.js +2 -1
  535. package/build-module/color-picker/legacy-adapter.js.map +1 -1
  536. package/build-module/confirm-dialog/component.js +4 -4
  537. package/build-module/confirm-dialog/component.js.map +1 -1
  538. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +8 -7
  539. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  540. package/build-module/custom-select-control/index.js +34 -31
  541. package/build-module/custom-select-control/index.js.map +1 -1
  542. package/build-module/dashicon/index.js +4 -4
  543. package/build-module/dashicon/index.js.map +1 -1
  544. package/build-module/dashicon/index.native.js +4 -4
  545. package/build-module/dashicon/index.native.js.map +1 -1
  546. package/build-module/disabled/index.js +4 -4
  547. package/build-module/disabled/index.js.map +1 -1
  548. package/build-module/divider/component.js +4 -5
  549. package/build-module/divider/component.js.map +1 -1
  550. package/build-module/drop-zone/index.js +2 -3
  551. package/build-module/drop-zone/index.js.map +1 -1
  552. package/build-module/dropdown/dropdown-content-wrapper.js +2 -3
  553. package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -1
  554. package/build-module/dropdown/index.js +29 -24
  555. package/build-module/dropdown/index.js.map +1 -1
  556. package/build-module/dropdown-menu/index.js +95 -91
  557. package/build-module/dropdown-menu/index.js.map +1 -1
  558. package/build-module/dropdown-menu/index.native.js +2 -3
  559. package/build-module/dropdown-menu/index.native.js.map +1 -1
  560. package/build-module/dropdown-menu-v2/index.js +14 -11
  561. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  562. package/build-module/dropdown-menu-v2/styles.js +16 -16
  563. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  564. package/build-module/elevation/component.js +2 -3
  565. package/build-module/elevation/component.js.map +1 -1
  566. package/build-module/external-link/index.js +2 -3
  567. package/build-module/external-link/index.js.map +1 -1
  568. package/build-module/flex/flex/component.js +2 -3
  569. package/build-module/flex/flex/component.js.map +1 -1
  570. package/build-module/flex/flex-block/component.js +2 -3
  571. package/build-module/flex/flex-block/component.js.map +1 -1
  572. package/build-module/flex/flex-item/component.js +2 -3
  573. package/build-module/flex/flex-item/component.js.map +1 -1
  574. package/build-module/focal-point-picker/controls.js +4 -4
  575. package/build-module/focal-point-picker/controls.js.map +1 -1
  576. package/build-module/focal-point-picker/focal-point.js +2 -3
  577. package/build-module/focal-point-picker/focal-point.js.map +1 -1
  578. package/build-module/focal-point-picker/grid.js +2 -3
  579. package/build-module/focal-point-picker/grid.js.map +1 -1
  580. package/build-module/focal-point-picker/index.js +4 -5
  581. package/build-module/focal-point-picker/index.js.map +1 -1
  582. package/build-module/focal-point-picker/index.native.js +2 -3
  583. package/build-module/focal-point-picker/index.native.js.map +1 -1
  584. package/build-module/focal-point-picker/media.js +7 -7
  585. package/build-module/focal-point-picker/media.js.map +1 -1
  586. package/build-module/focal-point-picker/tooltip/index.native.js +2 -3
  587. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  588. package/build-module/focusable-iframe/index.js +4 -4
  589. package/build-module/focusable-iframe/index.js.map +1 -1
  590. package/build-module/footer-message-control/index.native.js +2 -1
  591. package/build-module/footer-message-control/index.native.js.map +1 -1
  592. package/build-module/form-file-upload/index.js +4 -4
  593. package/build-module/form-file-upload/index.js.map +1 -1
  594. package/build-module/form-toggle/index.js +4 -4
  595. package/build-module/form-toggle/index.js.map +1 -1
  596. package/build-module/form-token-field/index.js +4 -4
  597. package/build-module/form-token-field/index.js.map +1 -1
  598. package/build-module/form-token-field/token-input.js +4 -5
  599. package/build-module/form-token-field/token-input.js.map +1 -1
  600. package/build-module/gradient-picker/index.js +14 -11
  601. package/build-module/gradient-picker/index.js.map +1 -1
  602. package/build-module/grid/component.js +2 -3
  603. package/build-module/grid/component.js.map +1 -1
  604. package/build-module/guide/page.js +2 -1
  605. package/build-module/guide/page.js.map +1 -1
  606. package/build-module/h-stack/component.js +2 -3
  607. package/build-module/h-stack/component.js.map +1 -1
  608. package/build-module/h-stack/hook.js +4 -4
  609. package/build-module/h-stack/hook.js.map +1 -1
  610. package/build-module/heading/component.js +2 -3
  611. package/build-module/heading/component.js.map +1 -1
  612. package/build-module/higher-order/navigate-regions/index.js +3 -1
  613. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  614. package/build-module/higher-order/with-constrained-tabbing/index.js +2 -1
  615. package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
  616. package/build-module/higher-order/with-fallback-styles/index.js +3 -2
  617. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  618. package/build-module/higher-order/with-filters/index.js +2 -1
  619. package/build-module/higher-order/with-filters/index.js.map +1 -1
  620. package/build-module/higher-order/with-focus-outside/index.js +5 -4
  621. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  622. package/build-module/higher-order/with-focus-outside/index.native.js +5 -4
  623. package/build-module/higher-order/with-focus-outside/index.native.js.map +1 -1
  624. package/build-module/higher-order/with-focus-return/index.js +2 -1
  625. package/build-module/higher-order/with-focus-return/index.js.map +1 -1
  626. package/build-module/higher-order/with-notices/index.js +3 -3
  627. package/build-module/higher-order/with-notices/index.js.map +1 -1
  628. package/build-module/higher-order/with-spoken-messages/index.js +2 -3
  629. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  630. package/build-module/icon/index.js +6 -6
  631. package/build-module/icon/index.js.map +1 -1
  632. package/build-module/input-control/index.js +5 -4
  633. package/build-module/input-control/index.js.map +1 -1
  634. package/build-module/input-control/input-base.js +3 -3
  635. package/build-module/input-control/input-base.js.map +1 -1
  636. package/build-module/input-control/input-field.js +3 -3
  637. package/build-module/input-control/input-field.js.map +1 -1
  638. package/build-module/input-control/input-prefix-wrapper.js +4 -5
  639. package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
  640. package/build-module/input-control/input-suffix-wrapper.js +4 -5
  641. package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
  642. package/build-module/input-control/label.js +4 -4
  643. package/build-module/input-control/label.js.map +1 -1
  644. package/build-module/input-control/styles/input-control-styles.js +2 -3
  645. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  646. package/build-module/isolated-event-container/index.js +2 -3
  647. package/build-module/isolated-event-container/index.js.map +1 -1
  648. package/build-module/item-group/item/component.js +2 -3
  649. package/build-module/item-group/item/component.js.map +1 -1
  650. package/build-module/item-group/item-group/component.js +2 -3
  651. package/build-module/item-group/item-group/component.js.map +1 -1
  652. package/build-module/item-group/styles.js +10 -10
  653. package/build-module/item-group/styles.js.map +1 -1
  654. package/build-module/menu-item/index.js +4 -4
  655. package/build-module/menu-item/index.js.map +1 -1
  656. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -5
  657. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  658. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +2 -1
  659. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  660. package/build-module/mobile/bottom-sheet/cell.native.js +5 -5
  661. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  662. package/build-module/mobile/bottom-sheet/color-cell.native.js +2 -3
  663. package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  664. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js +4 -4
  665. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  666. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js +2 -3
  667. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  668. package/build-module/mobile/bottom-sheet/index.native.js +8 -7
  669. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  670. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +4 -4
  671. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  672. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -3
  673. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  674. package/build-module/mobile/bottom-sheet/picker-cell.native.js +4 -4
  675. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  676. package/build-module/mobile/bottom-sheet/radio-cell.native.js +2 -3
  677. package/build-module/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  678. package/build-module/mobile/bottom-sheet/range-cell.native.js +2 -3
  679. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  680. package/build-module/mobile/bottom-sheet/ripple.native.js +4 -5
  681. package/build-module/mobile/bottom-sheet/ripple.native.js.map +1 -1
  682. package/build-module/mobile/bottom-sheet/switch-cell.native.js +2 -3
  683. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  684. package/build-module/mobile/color-settings/index.native.js +5 -4
  685. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  686. package/build-module/mobile/cycle-select-control/index.native.js +4 -4
  687. package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
  688. package/build-module/mobile/focal-point-settings-panel/index.native.js +5 -4
  689. package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  690. package/build-module/mobile/global-styles-context/index.native.js +2 -3
  691. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  692. package/build-module/mobile/gradient/index.native.js +4 -4
  693. package/build-module/mobile/gradient/index.native.js.map +1 -1
  694. package/build-module/mobile/image/image-editing-button.native.js +4 -4
  695. package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
  696. package/build-module/mobile/image/index.native.js +15 -14
  697. package/build-module/mobile/image/index.native.js.map +1 -1
  698. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +2 -3
  699. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  700. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +4 -4
  701. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  702. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -1
  703. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  704. package/build-module/mobile/link-picker/link-picker-results.native.js +4 -5
  705. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  706. package/build-module/mobile/link-settings/link-settings-navigation.native.js +4 -4
  707. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  708. package/build-module/mobile/link-settings/link-settings-screen.native.js +2 -3
  709. package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  710. package/build-module/mobile/picker/index.ios.js +4 -5
  711. package/build-module/mobile/picker/index.ios.js.map +1 -1
  712. package/build-module/mobile/segmented-control/index.native.js +4 -4
  713. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  714. package/build-module/modal/index.js +4 -5
  715. package/build-module/modal/index.js.map +1 -1
  716. package/build-module/navigable-container/container.js +6 -6
  717. package/build-module/navigable-container/container.js.map +1 -1
  718. package/build-module/navigable-container/menu.js +4 -4
  719. package/build-module/navigable-container/menu.js.map +1 -1
  720. package/build-module/navigable-container/tabbable.js +4 -4
  721. package/build-module/navigable-container/tabbable.js.map +1 -1
  722. package/build-module/navigation/item/base.js +4 -4
  723. package/build-module/navigation/item/base.js.map +1 -1
  724. package/build-module/navigation/item/index.js +3 -3
  725. package/build-module/navigation/item/index.js.map +1 -1
  726. package/build-module/navigator/navigator-back-button/component.js +4 -4
  727. package/build-module/navigator/navigator-back-button/component.js.map +1 -1
  728. package/build-module/navigator/navigator-button/component.js +4 -4
  729. package/build-module/navigator/navigator-button/component.js.map +1 -1
  730. package/build-module/navigator/navigator-provider/component.js +4 -4
  731. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  732. package/build-module/navigator/navigator-screen/component.js +9 -7
  733. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  734. package/build-module/navigator/navigator-to-parent-button/component.js +4 -4
  735. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  736. package/build-module/notice/list.js +2 -3
  737. package/build-module/notice/list.js.map +1 -1
  738. package/build-module/notice/list.native.js +2 -3
  739. package/build-module/notice/list.native.js.map +1 -1
  740. package/build-module/number-control/index.js +4 -5
  741. package/build-module/number-control/index.js.map +1 -1
  742. package/build-module/palette-edit/index.js +11 -11
  743. package/build-module/palette-edit/index.js.map +1 -1
  744. package/build-module/panel/body.js +8 -7
  745. package/build-module/panel/body.js.map +1 -1
  746. package/build-module/placeholder/index.js +2 -3
  747. package/build-module/placeholder/index.js.map +1 -1
  748. package/build-module/popover/index.js +12 -12
  749. package/build-module/popover/index.js.map +1 -1
  750. package/build-module/popover/utils.js +11 -0
  751. package/build-module/popover/utils.js.map +1 -1
  752. package/build-module/query-controls/category-select.js +4 -5
  753. package/build-module/query-controls/category-select.js.map +1 -1
  754. package/build-module/radio-control/index.js +4 -4
  755. package/build-module/radio-control/index.js.map +1 -1
  756. package/build-module/radio-control/index.native.js +4 -4
  757. package/build-module/radio-control/index.native.js.map +1 -1
  758. package/build-module/radio-group/index.js +5 -4
  759. package/build-module/radio-group/index.js.map +1 -1
  760. package/build-module/radio-group/radio/index.js +5 -4
  761. package/build-module/radio-group/radio/index.js.map +1 -1
  762. package/build-module/range-control/index.js +2 -3
  763. package/build-module/range-control/index.js.map +1 -1
  764. package/build-module/range-control/index.native.js +4 -4
  765. package/build-module/range-control/index.native.js.map +1 -1
  766. package/build-module/range-control/input-range.js +2 -3
  767. package/build-module/range-control/input-range.js.map +1 -1
  768. package/build-module/range-control/mark.js +2 -3
  769. package/build-module/range-control/mark.js.map +1 -1
  770. package/build-module/range-control/rail.js +6 -6
  771. package/build-module/range-control/rail.js.map +1 -1
  772. package/build-module/range-control/tooltip.js +2 -3
  773. package/build-module/range-control/tooltip.js.map +1 -1
  774. package/build-module/resizable-box/index.js +5 -4
  775. package/build-module/resizable-box/index.js.map +1 -1
  776. package/build-module/resizable-box/resize-tooltip/index.js +4 -4
  777. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  778. package/build-module/resizable-box/resize-tooltip/label.js +4 -4
  779. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  780. package/build-module/scrollable/component.js +2 -3
  781. package/build-module/scrollable/component.js.map +1 -1
  782. package/build-module/search-control/index.js +2 -3
  783. package/build-module/search-control/index.js.map +1 -1
  784. package/build-module/select-control/index.js +2 -3
  785. package/build-module/select-control/index.js.map +1 -1
  786. package/build-module/select-control/index.native.js +4 -4
  787. package/build-module/select-control/index.native.js.map +1 -1
  788. package/build-module/slot-fill/bubbles-virtually/slot.js +4 -4
  789. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  790. package/build-module/slot-fill/index.js +17 -12
  791. package/build-module/slot-fill/index.js.map +1 -1
  792. package/build-module/slot-fill/index.native.js +10 -8
  793. package/build-module/slot-fill/index.native.js.map +1 -1
  794. package/build-module/slot-fill/slot.js +2 -3
  795. package/build-module/slot-fill/slot.js.map +1 -1
  796. package/build-module/snackbar/list.js +2 -3
  797. package/build-module/snackbar/list.js.map +1 -1
  798. package/build-module/spacer/component.js +2 -3
  799. package/build-module/spacer/component.js.map +1 -1
  800. package/build-module/spinner/index.js +4 -5
  801. package/build-module/spinner/index.js.map +1 -1
  802. package/build-module/surface/component.js +2 -3
  803. package/build-module/surface/component.js.map +1 -1
  804. package/build-module/tab-panel/index.js +4 -4
  805. package/build-module/tab-panel/index.js.map +1 -1
  806. package/build-module/text/component.js +4 -5
  807. package/build-module/text/component.js.map +1 -1
  808. package/build-module/text-control/index.js +4 -4
  809. package/build-module/text-control/index.js.map +1 -1
  810. package/build-module/text-control/index.native.js +4 -4
  811. package/build-module/text-control/index.native.js.map +1 -1
  812. package/build-module/textarea-control/index.js +4 -4
  813. package/build-module/textarea-control/index.js.map +1 -1
  814. package/build-module/theme/index.js +4 -4
  815. package/build-module/theme/index.js.map +1 -1
  816. package/build-module/toggle-control/index.native.js +4 -4
  817. package/build-module/toggle-control/index.native.js.map +1 -1
  818. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +4 -5
  819. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  820. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +4 -5
  821. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  822. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -3
  823. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  824. package/build-module/toggle-group-control/toggle-group-control-option/component.js +2 -3
  825. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  826. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +6 -6
  827. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  828. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +2 -3
  829. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  830. package/build-module/toolbar/toolbar/index.js +10 -13
  831. package/build-module/toolbar/toolbar/index.js.map +1 -1
  832. package/build-module/toolbar/toolbar/toolbar-container.js +9 -12
  833. package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
  834. package/build-module/toolbar/toolbar-button/index.js +13 -10
  835. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  836. package/build-module/toolbar/toolbar-context/index.js.map +1 -1
  837. package/build-module/toolbar/toolbar-dropdown-menu/index.js +8 -9
  838. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  839. package/build-module/toolbar/toolbar-group/index.js +11 -9
  840. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  841. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -5
  842. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  843. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js +4 -4
  844. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  845. package/build-module/toolbar/toolbar-group/toolbar-group-container.js +4 -4
  846. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  847. package/build-module/toolbar/toolbar-item/index.js +13 -10
  848. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  849. package/build-module/toolbar/toolbar-item/types.js +2 -0
  850. package/build-module/toolbar/toolbar-item/types.js.map +1 -0
  851. package/build-module/tools-panel/tools-panel/component.js +2 -3
  852. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  853. package/build-module/tools-panel/tools-panel-header/component.js +2 -3
  854. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  855. package/build-module/tools-panel/tools-panel-item/component.js +4 -5
  856. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  857. package/build-module/tooltip/index.js +4 -4
  858. package/build-module/tooltip/index.js.map +1 -1
  859. package/build-module/tooltip/index.native.js +2 -1
  860. package/build-module/tooltip/index.native.js.map +1 -1
  861. package/build-module/tree-grid/cell.js +2 -3
  862. package/build-module/tree-grid/cell.js.map +1 -1
  863. package/build-module/tree-grid/index.js +2 -3
  864. package/build-module/tree-grid/index.js.map +1 -1
  865. package/build-module/tree-grid/item.js +4 -4
  866. package/build-module/tree-grid/item.js.map +1 -1
  867. package/build-module/tree-grid/roving-tab-index-item.js +2 -1
  868. package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
  869. package/build-module/tree-grid/row.js +2 -3
  870. package/build-module/tree-grid/row.js.map +1 -1
  871. package/build-module/tree-select/index.js +4 -4
  872. package/build-module/tree-select/index.js.map +1 -1
  873. package/build-module/truncate/component.js +4 -5
  874. package/build-module/truncate/component.js.map +1 -1
  875. package/build-module/ui/control-group/component.js +8 -9
  876. package/build-module/ui/control-group/component.js.map +1 -1
  877. package/build-module/ui/control-label/component.js +4 -5
  878. package/build-module/ui/control-label/component.js.map +1 -1
  879. package/build-module/ui/form-group/form-group-content.js +4 -4
  880. package/build-module/ui/form-group/form-group-content.js.map +1 -1
  881. package/build-module/ui/form-group/form-group-label.js +2 -1
  882. package/build-module/ui/form-group/form-group-label.js.map +1 -1
  883. package/build-module/ui/form-group/form-group.js +8 -7
  884. package/build-module/ui/form-group/form-group.js.map +1 -1
  885. package/build-module/ui/shortcut/component.js +4 -4
  886. package/build-module/ui/shortcut/component.js.map +1 -1
  887. package/build-module/ui/spinner/component.js +2 -3
  888. package/build-module/ui/spinner/component.js.map +1 -1
  889. package/build-module/ui/tooltip/component.js +3 -3
  890. package/build-module/ui/tooltip/component.js.map +1 -1
  891. package/build-module/ui/tooltip/content.js +5 -5
  892. package/build-module/ui/tooltip/content.js.map +1 -1
  893. package/build-module/unit-control/index.js +31 -88
  894. package/build-module/unit-control/index.js.map +1 -1
  895. package/build-module/unit-control/index.native.js +7 -6
  896. package/build-module/unit-control/index.native.js.map +1 -1
  897. package/build-module/unit-control/unit-select-control.js +19 -6
  898. package/build-module/unit-control/unit-select-control.js.map +1 -1
  899. package/build-module/v-stack/component.js +2 -3
  900. package/build-module/v-stack/component.js.map +1 -1
  901. package/build-module/visually-hidden/component.js +4 -5
  902. package/build-module/visually-hidden/component.js.map +1 -1
  903. package/build-module/z-stack/component.js +2 -3
  904. package/build-module/z-stack/component.js.map +1 -1
  905. package/build-style/style-rtl.css +8 -14
  906. package/build-style/style.css +8 -14
  907. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  908. package/build-types/autocomplete/index.d.ts.map +1 -1
  909. package/build-types/button/stories/e2e/index.d.ts +1 -0
  910. package/build-types/button/stories/e2e/index.d.ts.map +1 -1
  911. package/build-types/circular-option-picker/types.d.ts +2 -2
  912. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  913. package/build-types/clipboard-button/index.d.ts +4 -15
  914. package/build-types/clipboard-button/index.d.ts.map +1 -1
  915. package/build-types/clipboard-button/types.d.ts +11 -0
  916. package/build-types/clipboard-button/types.d.ts.map +1 -0
  917. package/build-types/dropdown/index.d.ts +1 -1
  918. package/build-types/dropdown/index.d.ts.map +1 -1
  919. package/build-types/dropdown/types.d.ts +7 -0
  920. package/build-types/dropdown/types.d.ts.map +1 -1
  921. package/build-types/dropdown-menu/index.d.ts +1 -1
  922. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  923. package/build-types/dropdown-menu/stories/index.d.ts +4 -3
  924. package/build-types/dropdown-menu/stories/index.d.ts.map +1 -1
  925. package/build-types/dropdown-menu/types.d.ts +7 -0
  926. package/build-types/dropdown-menu/types.d.ts.map +1 -1
  927. package/build-types/dropdown-menu-v2/styles.d.ts +4 -4
  928. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  929. package/build-types/dropdown-menu-v2/types.d.ts +2 -2
  930. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  931. package/build-types/item-group/styles.d.ts.map +1 -1
  932. package/build-types/popover/index.d.ts.map +1 -1
  933. package/build-types/popover/stories/index.d.ts +0 -1
  934. package/build-types/popover/stories/index.d.ts.map +1 -1
  935. package/build-types/popover/utils.d.ts +10 -0
  936. package/build-types/popover/utils.d.ts.map +1 -1
  937. package/build-types/toolbar/stories/index.d.ts.map +1 -1
  938. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  939. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  940. package/build-types/toolbar/toolbar-context/index.d.ts +2 -2
  941. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
  942. package/build-types/toolbar/toolbar-item/index.d.ts +4 -6
  943. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  944. package/build-types/toolbar/toolbar-item/types.d.ts +17 -0
  945. package/build-types/toolbar/toolbar-item/types.d.ts.map +1 -0
  946. package/build-types/unit-control/index.d.ts +3 -6
  947. package/build-types/unit-control/index.d.ts.map +1 -1
  948. package/build-types/unit-control/stories/index.d.ts.map +1 -1
  949. package/build-types/unit-control/unit-select-control.d.ts +7 -6
  950. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  951. package/package.json +20 -19
  952. package/src/autocomplete/autocompleter-ui.tsx +44 -2
  953. package/src/autocomplete/index.tsx +2 -32
  954. package/src/box-control/test/index.tsx +28 -60
  955. package/src/button/stories/e2e/index.tsx +22 -0
  956. package/src/button/style.scss +5 -13
  957. package/src/circular-option-picker/types.ts +2 -5
  958. package/src/clipboard-button/{index.js → index.tsx} +11 -17
  959. package/src/clipboard-button/types.ts +11 -0
  960. package/src/dropdown/index.tsx +20 -10
  961. package/src/dropdown/types.ts +8 -0
  962. package/src/dropdown-menu/index.tsx +101 -85
  963. package/src/dropdown-menu/stories/index.tsx +1 -1
  964. package/src/dropdown-menu/types.ts +8 -0
  965. package/src/dropdown-menu-v2/index.tsx +2 -2
  966. package/src/dropdown-menu-v2/styles.ts +7 -5
  967. package/src/dropdown-menu-v2/types.ts +2 -2
  968. package/src/item-group/styles.ts +12 -4
  969. package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +16 -29
  970. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  971. package/src/mobile/html-text-input/test/__snapshots__/index.native.js.snap +46 -0
  972. package/src/mobile/html-text-input/test/index.native.js +2 -2
  973. package/src/mobile/image/index.native.js +1 -1
  974. package/src/mobile/link-settings/test/link-settings-navigation.native.js +5 -16
  975. package/src/modal/style.scss +2 -2
  976. package/src/popover/index.tsx +3 -2
  977. package/src/popover/stories/index.tsx +0 -13
  978. package/src/popover/test/index.tsx +22 -1
  979. package/src/popover/utils.ts +12 -0
  980. package/src/search-control/README.md +7 -1
  981. package/src/toolbar/stories/index.tsx +0 -3
  982. package/src/toolbar/toolbar/index.tsx +3 -6
  983. package/src/toolbar/toolbar/toolbar-container.tsx +5 -9
  984. package/src/toolbar/toolbar-context/index.ts +2 -4
  985. package/src/toolbar/toolbar-dropdown-menu/index.js +0 -1
  986. package/src/toolbar/toolbar-item/index.tsx +13 -15
  987. package/src/toolbar/toolbar-item/types.ts +27 -0
  988. package/src/tooltip/test/index.native.js +1 -3
  989. package/src/unit-control/index.tsx +29 -95
  990. package/src/unit-control/stories/index.tsx +0 -4
  991. package/src/unit-control/test/index.tsx +151 -223
  992. package/src/unit-control/unit-select-control.tsx +20 -10
  993. package/tsconfig.tsbuildinfo +1 -1
@@ -11,8 +11,6 @@ exports.default = void 0;
11
11
 
12
12
  var _element = require("@wordpress/element");
13
13
 
14
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
-
16
14
  var _classnames = _interopRequireDefault(require("classnames"));
17
15
 
18
16
  /**
@@ -55,11 +53,11 @@ function UnForwardedTokenInput(props, ref) {
55
53
  onBlur?.(e);
56
54
  };
57
55
 
58
- return (0, _element.createElement)("input", (0, _extends2.default)({
56
+ return (0, _element.createElement)("input", {
59
57
  ref: ref,
60
58
  id: `components-form-token-input-${instanceId}`,
61
- type: "text"
62
- }, restProps, {
59
+ type: "text",
60
+ ...restProps,
63
61
  value: value || '',
64
62
  onChange: onChangeHandler,
65
63
  onFocus: onFocusHandler,
@@ -77,7 +75,7 @@ function UnForwardedTokenInput(props, ref) {
77
75
  // - the list of suggestions are rendered in the DOM (`isExpanded`)
78
76
  hasFocus && selectedSuggestionIndex !== -1 && isExpanded ? `components-form-token-suggestions-${instanceId}-${selectedSuggestionIndex}` : undefined,
79
77
  "aria-describedby": `components-form-token-suggestions-howto-${instanceId}`
80
- }));
78
+ });
81
79
  }
82
80
 
83
81
  const TokenInput = (0, _element.forwardRef)(UnForwardedTokenInput);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/form-token-field/token-input.tsx"],"names":["UnForwardedTokenInput","props","ref","value","isExpanded","instanceId","selectedSuggestionIndex","className","onChange","onFocus","onBlur","restProps","hasFocus","setHasFocus","size","length","onChangeHandler","event","target","onFocusHandler","e","onBlurHandler","undefined","TokenInput"],"mappings":";;;;;;;;;;;AASA;;;;AANA;;AAHA;AACA;AACA;;AAIA;AACA;AACA;AASO,SAASA,qBAAT,CACNC,KADM,EAENC,GAFM,EAGL;AACD,QAAM;AACLC,IAAAA,KADK;AAELC,IAAAA,UAFK;AAGLC,IAAAA,UAHK;AAILC,IAAAA,uBAJK;AAKLC,IAAAA,SALK;AAMLC,IAAAA,QANK;AAOLC,IAAAA,OAPK;AAQLC,IAAAA,MARK;AASL,OAAGC;AATE,MAUFV,KAVJ;AAYA,QAAM,CAAEW,QAAF,EAAYC,WAAZ,IAA4B,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CC,wBAAoB,2CAA2CjB,UAAY;AAhC5E,KADD;AAoCA;;AAEM,MAAMkB,UAAU,GAAG,yBAAYvB,qBAAZ,CAAnB;;eAEQuB,U","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent, ForwardedRef, FocusEventHandler } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { TokenInputProps } from './types';\n\nexport function UnForwardedTokenInput(\n\tprops: WordPressComponentProps< TokenInputProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\tvalue,\n\t\tisExpanded,\n\t\tinstanceId,\n\t\tselectedSuggestionIndex,\n\t\tclassName,\n\t\tonChange,\n\t\tonFocus,\n\t\tonBlur,\n\t\t...restProps\n\t} = props;\n\n\tconst [ hasFocus, setHasFocus ] = useState( false );\n\n\tconst size = value ? value.length + 1 : 0;\n\n\tconst onChangeHandler = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tif ( onChange ) {\n\t\t\tonChange( {\n\t\t\t\tvalue: event.target.value,\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst onFocusHandler: FocusEventHandler< HTMLInputElement > = ( e ) => {\n\t\tsetHasFocus( true );\n\t\tonFocus?.( e );\n\t};\n\n\tconst onBlurHandler: React.FocusEventHandler< HTMLInputElement > = (\n\t\te\n\t) => {\n\t\tsetHasFocus( false );\n\t\tonBlur?.( e );\n\t};\n\n\treturn (\n\t\t<input\n\t\t\tref={ ref }\n\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\ttype=\"text\"\n\t\t\t{ ...restProps }\n\t\t\tvalue={ value || '' }\n\t\t\tonChange={ onChangeHandler }\n\t\t\tonFocus={ onFocusHandler }\n\t\t\tonBlur={ onBlurHandler }\n\t\t\tsize={ size }\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'components-form-token-field__input'\n\t\t\t) }\n\t\t\tautoComplete=\"off\"\n\t\t\trole=\"combobox\"\n\t\t\taria-expanded={ isExpanded }\n\t\t\taria-autocomplete=\"list\"\n\t\t\taria-owns={\n\t\t\t\tisExpanded\n\t\t\t\t\t? `components-form-token-suggestions-${ instanceId }`\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-activedescendant={\n\t\t\t\t// Only add the `aria-activedescendant` attribute when:\n\t\t\t\t// - the user is actively interacting with the input (`hasFocus`)\n\t\t\t\t// - there is a selected suggestion (`selectedSuggestionIndex !== -1`)\n\t\t\t\t// - the list of suggestions are rendered in the DOM (`isExpanded`)\n\t\t\t\thasFocus && selectedSuggestionIndex !== -1 && isExpanded\n\t\t\t\t\t? `components-form-token-suggestions-${ instanceId }-${ selectedSuggestionIndex }`\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-describedby={ `components-form-token-suggestions-howto-${ instanceId }` }\n\t\t/>\n\t);\n}\n\nexport const TokenInput = forwardRef( UnForwardedTokenInput );\n\nexport default TokenInput;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/form-token-field/token-input.tsx"],"names":["UnForwardedTokenInput","props","ref","value","isExpanded","instanceId","selectedSuggestionIndex","className","onChange","onFocus","onBlur","restProps","hasFocus","setHasFocus","size","length","onChangeHandler","event","target","onFocusHandler","e","onBlurHandler","undefined","TokenInput"],"mappings":";;;;;;;;;;;AASA;;AANA;;AAHA;AACA;AACA;;AAIA;AACA;AACA;AASO,SAASA,qBAAT,CACNC,KADM,EAENC,GAFM,EAGL;AACD,QAAM;AACLC,IAAAA,KADK;AAELC,IAAAA,UAFK;AAGLC,IAAAA,UAHK;AAILC,IAAAA,uBAJK;AAKLC,IAAAA,SALK;AAMLC,IAAAA,QANK;AAOLC,IAAAA,OAPK;AAQLC,IAAAA,MARK;AASL,OAAGC;AATE,MAUFV,KAVJ;AAYA,QAAM,CAAEW,QAAF,EAAYC,WAAZ,IAA4B,uBAAU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CC,wBAAoB,2CAA2CjB,UAAY;AAhC5E,IADD;AAoCA;;AAEM,MAAMkB,UAAU,GAAG,yBAAYvB,qBAAZ,CAAnB;;eAEQuB,U","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ChangeEvent, ForwardedRef, FocusEventHandler } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport type { TokenInputProps } from './types';\n\nexport function UnForwardedTokenInput(\n\tprops: WordPressComponentProps< TokenInputProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\tvalue,\n\t\tisExpanded,\n\t\tinstanceId,\n\t\tselectedSuggestionIndex,\n\t\tclassName,\n\t\tonChange,\n\t\tonFocus,\n\t\tonBlur,\n\t\t...restProps\n\t} = props;\n\n\tconst [ hasFocus, setHasFocus ] = useState( false );\n\n\tconst size = value ? value.length + 1 : 0;\n\n\tconst onChangeHandler = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tif ( onChange ) {\n\t\t\tonChange( {\n\t\t\t\tvalue: event.target.value,\n\t\t\t} );\n\t\t}\n\t};\n\n\tconst onFocusHandler: FocusEventHandler< HTMLInputElement > = ( e ) => {\n\t\tsetHasFocus( true );\n\t\tonFocus?.( e );\n\t};\n\n\tconst onBlurHandler: React.FocusEventHandler< HTMLInputElement > = (\n\t\te\n\t) => {\n\t\tsetHasFocus( false );\n\t\tonBlur?.( e );\n\t};\n\n\treturn (\n\t\t<input\n\t\t\tref={ ref }\n\t\t\tid={ `components-form-token-input-${ instanceId }` }\n\t\t\ttype=\"text\"\n\t\t\t{ ...restProps }\n\t\t\tvalue={ value || '' }\n\t\t\tonChange={ onChangeHandler }\n\t\t\tonFocus={ onFocusHandler }\n\t\t\tonBlur={ onBlurHandler }\n\t\t\tsize={ size }\n\t\t\tclassName={ classnames(\n\t\t\t\tclassName,\n\t\t\t\t'components-form-token-field__input'\n\t\t\t) }\n\t\t\tautoComplete=\"off\"\n\t\t\trole=\"combobox\"\n\t\t\taria-expanded={ isExpanded }\n\t\t\taria-autocomplete=\"list\"\n\t\t\taria-owns={\n\t\t\t\tisExpanded\n\t\t\t\t\t? `components-form-token-suggestions-${ instanceId }`\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-activedescendant={\n\t\t\t\t// Only add the `aria-activedescendant` attribute when:\n\t\t\t\t// - the user is actively interacting with the input (`hasFocus`)\n\t\t\t\t// - there is a selected suggestion (`selectedSuggestionIndex !== -1`)\n\t\t\t\t// - the list of suggestions are rendered in the DOM (`isExpanded`)\n\t\t\t\thasFocus && selectedSuggestionIndex !== -1 && isExpanded\n\t\t\t\t\t? `components-form-token-suggestions-${ instanceId }-${ selectedSuggestionIndex }`\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\taria-describedby={ `components-form-token-suggestions-howto-${ instanceId }` }\n\t\t/>\n\t);\n}\n\nexport const TokenInput = forwardRef( UnForwardedTokenInput );\n\nexport default TokenInput;\n"]}
@@ -10,8 +10,6 @@ exports.default = void 0;
10
10
 
11
11
  var _element = require("@wordpress/element");
12
12
 
13
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
14
-
15
13
  var _i18n = require("@wordpress/i18n");
16
14
 
17
15
  var _deprecated = _interopRequireDefault(require("@wordpress/deprecated"));
@@ -97,23 +95,26 @@ function MultipleOrigin({
97
95
  key: index
98
96
  }, (0, _element.createElement)(_styles.ColorHeading, {
99
97
  level: headingLevel
100
- }, name), (0, _element.createElement)(SingleOrigin, (0, _extends2.default)({
98
+ }, name), (0, _element.createElement)(SingleOrigin, {
101
99
  clearGradient: clearGradient,
102
100
  gradients: gradientSet,
103
101
  onChange: gradient => onChange(gradient, index),
104
- value: value
105
- }, gradients.length === index + 1 ? {
106
- actions
107
- } : {})));
102
+ value: value,
103
+ ...(gradients.length === index + 1 ? {
104
+ actions
105
+ } : {})
106
+ }));
108
107
  }));
109
108
  }
110
109
 
111
110
  function Component(props) {
112
111
  if (isMultipleOriginArray(props.gradients)) {
113
- return (0, _element.createElement)(MultipleOrigin, props);
112
+ return (0, _element.createElement)(MultipleOrigin, { ...props
113
+ });
114
114
  }
115
115
 
116
- return (0, _element.createElement)(SingleOrigin, props);
116
+ return (0, _element.createElement)(SingleOrigin, { ...props
117
+ });
117
118
  }
118
119
  /**
119
120
  * GradientPicker is a React component that renders a color gradient picker to
@@ -187,9 +188,10 @@ function GradientPicker({
187
188
  marginBottom: !clearable ? 6 : 0
188
189
  } : {};
189
190
  return (// Outmost Spacer wrapper can be removed when deprecation period is over
190
- (0, _element.createElement)(_spacer.Spacer, (0, _extends2.default)({
191
- marginBottom: 0
192
- }, deprecatedMarginSpacerProps), (0, _element.createElement)(_vStack.VStack, {
191
+ (0, _element.createElement)(_spacer.Spacer, {
192
+ marginBottom: 0,
193
+ ...deprecatedMarginSpacerProps
194
+ }, (0, _element.createElement)(_vStack.VStack, {
193
195
  spacing: gradients.length ? 4 : 0
194
196
  }, !disableCustomGradients && (0, _element.createElement)(_customGradientPicker.default, {
195
197
  __nextHasNoMargin: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/gradient-picker/index.tsx"],"names":["isMultipleOriginObject","obj","Array","isArray","gradients","isMultipleOriginArray","arr","length","every","gradientObj","SingleOrigin","className","clearGradient","onChange","value","actions","gradientOptions","map","gradient","name","index","color","background","MultipleOrigin","headingLevel","gradientSet","Component","props","GradientPicker","__nextHasNoMargin","clearable","disableCustomGradients","__experimentalIsRenderedInSidebar","undefined","since","version","hint","deprecatedMarginSpacerProps","marginTop","marginBottom"],"mappings":";;;;;;;;;;AAIA;;;;AADA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAdA;AACA;AACA;;AAKA;AACA;AACA;AAaA;AACA;AACA,MAAMA,sBAAsB,GAC3BC,GAD8B,IAG9BC,KAAK,CAACC,OAAN,CAAeF,GAAG,CAACG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,iBAAiB,MADlB;AAEC,MAAA,iCAAiC,EAChCC,iCAHF;AAKC,MAAA,KAAK,EAAGlB,KALT;AAMC,MAAA,QAAQ,EAAGD;AANZ,MAFF,EAWG,CAAET,SAAS,CAACG,MAAV,IAAoBuB,SAAtB,KACD,4BAAC,SAAD;AACC,MAAA,SAAS,EAAGnB,SADb;AAEC,MAAA,aAAa,EAAGC,aAFjB;AAGC,MAAA,SAAS,EAAGR,SAHb;AAIC,MAAA,QAAQ,EAAGS,QAJZ;AAKC,MAAA,KAAK,EAAGC,KALT;AAMC,MAAA,OAAO,EACNgB,SAAS,IACT,CAAEC,sBADF,IAEC,4BAAC,6BAAD,CAAsB,YAAtB;AACC,QAAA,OAAO,EAAGnB;AADX,SAGG,cAAI,OAAJ,CAHH,CATH;AAgBC,MAAA,YAAY,EAAGY;AAhBhB,MAZF,CADD;AAFD;AAqCA;;eAEcI,c","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport CircularOptionPicker from '../circular-option-picker';\nimport CustomGradientPicker from '../custom-gradient-picker';\nimport { VStack } from '../v-stack';\nimport { ColorHeading } from '../color-palette/styles';\nimport { Spacer } from '../spacer';\nimport type {\n\tGradientPickerComponentProps,\n\tPickerProps,\n\tOriginObject,\n\tGradientObject,\n} from './types';\n\n// The Multiple Origin Gradients have a `gradients` property (an array of\n// gradient objects), while Single Origin ones have a `gradient` property.\nconst isMultipleOriginObject = (\n\tobj: Record< string, any >\n): obj is OriginObject =>\n\tArray.isArray( obj.gradients ) && ! ( 'gradient' in obj );\n\nconst isMultipleOriginArray = ( arr: any[] ): arr is OriginObject[] => {\n\treturn (\n\t\tarr.length > 0 &&\n\t\tarr.every( ( gradientObj ) => isMultipleOriginObject( gradientObj ) )\n\t);\n};\n\nfunction SingleOrigin( {\n\tclassName,\n\tclearGradient,\n\tgradients,\n\tonChange,\n\tvalue,\n\tactions,\n}: PickerProps< GradientObject > ) {\n\tconst gradientOptions = useMemo( () => {\n\t\treturn gradients.map( ( { gradient, name }, index ) => (\n\t\t\t<CircularOptionPicker.Option\n\t\t\t\tkey={ gradient }\n\t\t\t\tvalue={ gradient }\n\t\t\t\tisSelected={ value === gradient }\n\t\t\t\ttooltipText={\n\t\t\t\t\tname ||\n\t\t\t\t\t// translators: %s: gradient code e.g: \"linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);\".\n\t\t\t\t\tsprintf( __( 'Gradient code: %s' ), gradient )\n\t\t\t\t}\n\t\t\t\tstyle={ { color: 'rgba( 0,0,0,0 )', background: gradient } }\n\t\t\t\tonClick={\n\t\t\t\t\tvalue === gradient\n\t\t\t\t\t\t? clearGradient\n\t\t\t\t\t\t: () => onChange( gradient, index )\n\t\t\t\t}\n\t\t\t\taria-label={\n\t\t\t\t\tname\n\t\t\t\t\t\t? // translators: %s: The name of the gradient e.g: \"Angular red to blue\".\n\t\t\t\t\t\t sprintf( __( 'Gradient: %s' ), name )\n\t\t\t\t\t\t: // translators: %s: gradient code e.g: \"linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);\".\n\t\t\t\t\t\t sprintf( __( 'Gradient code: %s' ), gradient )\n\t\t\t\t}\n\t\t\t/>\n\t\t) );\n\t}, [ gradients, value, onChange, clearGradient ] );\n\treturn (\n\t\t<CircularOptionPicker\n\t\t\tclassName={ className }\n\t\t\toptions={ gradientOptions }\n\t\t\tactions={ actions }\n\t\t/>\n\t);\n}\n\nfunction MultipleOrigin( {\n\tclassName,\n\tclearGradient,\n\tgradients,\n\tonChange,\n\tvalue,\n\tactions,\n\theadingLevel,\n}: PickerProps< OriginObject > ) {\n\treturn (\n\t\t<VStack spacing={ 3 } className={ className }>\n\t\t\t{ gradients.map( ( { name, gradients: gradientSet }, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<VStack spacing={ 2 } key={ index }>\n\t\t\t\t\t\t<ColorHeading level={ headingLevel }>\n\t\t\t\t\t\t\t{ name }\n\t\t\t\t\t\t</ColorHeading>\n\t\t\t\t\t\t<SingleOrigin\n\t\t\t\t\t\t\tclearGradient={ clearGradient }\n\t\t\t\t\t\t\tgradients={ gradientSet }\n\t\t\t\t\t\t\tonChange={ ( gradient ) =>\n\t\t\t\t\t\t\t\tonChange( gradient, index )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t{ ...( gradients.length === index + 1\n\t\t\t\t\t\t\t\t? { actions }\n\t\t\t\t\t\t\t\t: {} ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n\nfunction Component( props: PickerProps< any > ) {\n\tif ( isMultipleOriginArray( props.gradients ) ) {\n\t\treturn <MultipleOrigin { ...props } />;\n\t}\n\treturn <SingleOrigin { ...props } />;\n}\n\n/**\n * GradientPicker is a React component that renders a color gradient picker to\n * define a multi step gradient. There's either a _linear_ or a _radial_ type\n * available.\n *\n * ```jsx\n *import { GradientPicker } from '@wordpress/components';\n *import { useState } from '@wordpress/element';\n *\n *const myGradientPicker = () => {\n *\tconst [ gradient, setGradient ] = useState( null );\n *\n *\treturn (\n *\t\t<GradientPicker\n *\t\t\t__nextHasNoMargin\n *\t\t\tvalue={ gradient }\n *\t\t\tonChange={ ( currentGradient ) => setGradient( currentGradient ) }\n *\t\t\tgradients={ [\n *\t\t\t\t{\n *\t\t\t\t\tname: 'JShine',\n *\t\t\t\t\tgradient:\n *\t\t\t\t\t\t'linear-gradient(135deg,#12c2e9 0%,#c471ed 50%,#f64f59 100%)',\n *\t\t\t\t\tslug: 'jshine',\n *\t\t\t\t},\n *\t\t\t\t{\n *\t\t\t\t\tname: 'Moonlit Asteroid',\n *\t\t\t\t\tgradient:\n *\t\t\t\t\t\t'linear-gradient(135deg,#0F2027 0%, #203A43 0%, #2c5364 100%)',\n *\t\t\t\t\tslug: 'moonlit-asteroid',\n *\t\t\t\t},\n *\t\t\t\t{\n *\t\t\t\t\tname: 'Rastafarie',\n *\t\t\t\t\tgradient:\n *\t\t\t\t\t\t'linear-gradient(135deg,#1E9600 0%, #FFF200 0%, #FF0000 100%)',\n *\t\t\t\t\tslug: 'rastafari',\n *\t\t\t\t},\n *\t\t\t] }\n *\t\t/>\n *\t);\n *};\n *```\n *\n */\nexport function GradientPicker( {\n\t/** Start opting into the new margin-free styles that will become the default in a future version. */\n\t__nextHasNoMargin = false,\n\tclassName,\n\tgradients = [],\n\tonChange,\n\tvalue,\n\tclearable = true,\n\tdisableCustomGradients = false,\n\t__experimentalIsRenderedInSidebar,\n\theadingLevel = 2,\n}: GradientPickerComponentProps ) {\n\tconst clearGradient = useCallback(\n\t\t() => onChange( undefined ),\n\t\t[ onChange ]\n\t);\n\n\tif ( ! __nextHasNoMargin ) {\n\t\tdeprecated( 'Outer margin styles for wp.components.GradientPicker', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.4',\n\t\t\thint: 'Set the `__nextHasNoMargin` prop to true to start opting into the new styles, which will become the default in a future version',\n\t\t} );\n\t}\n\n\tconst deprecatedMarginSpacerProps = ! __nextHasNoMargin\n\t\t? {\n\t\t\t\tmarginTop: ! gradients.length ? 3 : undefined,\n\t\t\t\tmarginBottom: ! clearable ? 6 : 0,\n\t\t }\n\t\t: {};\n\n\treturn (\n\t\t// Outmost Spacer wrapper can be removed when deprecation period is over\n\t\t<Spacer marginBottom={ 0 } { ...deprecatedMarginSpacerProps }>\n\t\t\t<VStack spacing={ gradients.length ? 4 : 0 }>\n\t\t\t\t{ ! disableCustomGradients && (\n\t\t\t\t\t<CustomGradientPicker\n\t\t\t\t\t\t__nextHasNoMargin\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( gradients.length || clearable ) && (\n\t\t\t\t\t<Component\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tclearGradient={ clearGradient }\n\t\t\t\t\t\tgradients={ gradients }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\tclearable &&\n\t\t\t\t\t\t\t! disableCustomGradients && (\n\t\t\t\t\t\t\t\t<CircularOptionPicker.ButtonAction\n\t\t\t\t\t\t\t\t\tonClick={ clearGradient }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Clear' ) }\n\t\t\t\t\t\t\t\t</CircularOptionPicker.ButtonAction>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</Spacer>\n\t);\n}\n\nexport default GradientPicker;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/gradient-picker/index.tsx"],"names":["isMultipleOriginObject","obj","Array","isArray","gradients","isMultipleOriginArray","arr","length","every","gradientObj","SingleOrigin","className","clearGradient","onChange","value","actions","gradientOptions","map","gradient","name","index","color","background","MultipleOrigin","headingLevel","gradientSet","Component","props","GradientPicker","__nextHasNoMargin","clearable","disableCustomGradients","__experimentalIsRenderedInSidebar","undefined","since","version","hint","deprecatedMarginSpacerProps","marginTop","marginBottom"],"mappings":";;;;;;;;;;AAIA;;AADA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AAdA;AACA;AACA;;AAKA;AACA;AACA;AAaA;AACA;AACA,MAAMA,sBAAsB,GAC3BC,GAD8B,IAG9BC,KAAK,CAACC,OAAN,CAAeF,GAAG,CAACG,SAAnB,KAAkC,EAAI,cAAcH,GAAlB,CAHnC;;AAKA,MAAMI,qBAAqB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F;AAKC,MAAA,KAAK,EAAGlB,KALT;AAMC,MAAA,QAAQ,EAAGD;AANZ,MAFF,EAWG,CAAET,SAAS,CAACG,MAAV,IAAoBuB,SAAtB,KACD,4BAAC,SAAD;AACC,MAAA,SAAS,EAAGnB,SADb;AAEC,MAAA,aAAa,EAAGC,aAFjB;AAGC,MAAA,SAAS,EAAGR,SAHb;AAIC,MAAA,QAAQ,EAAGS,QAJZ;AAKC,MAAA,KAAK,EAAGC,KALT;AAMC,MAAA,OAAO,EACNgB,SAAS,IACT,CAAEC,sBADF,IAEC,4BAAC,6BAAD,CAAsB,YAAtB;AACC,QAAA,OAAO,EAAGnB;AADX,SAGG,cAAI,OAAJ,CAHH,CATH;AAgBC,MAAA,YAAY,EAAGY;AAhBhB,MAZF,CADD;AAFD;AAqCA;;eAEcI,c","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { useCallback, useMemo } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport CircularOptionPicker from '../circular-option-picker';\nimport CustomGradientPicker from '../custom-gradient-picker';\nimport { VStack } from '../v-stack';\nimport { ColorHeading } from '../color-palette/styles';\nimport { Spacer } from '../spacer';\nimport type {\n\tGradientPickerComponentProps,\n\tPickerProps,\n\tOriginObject,\n\tGradientObject,\n} from './types';\n\n// The Multiple Origin Gradients have a `gradients` property (an array of\n// gradient objects), while Single Origin ones have a `gradient` property.\nconst isMultipleOriginObject = (\n\tobj: Record< string, any >\n): obj is OriginObject =>\n\tArray.isArray( obj.gradients ) && ! ( 'gradient' in obj );\n\nconst isMultipleOriginArray = ( arr: any[] ): arr is OriginObject[] => {\n\treturn (\n\t\tarr.length > 0 &&\n\t\tarr.every( ( gradientObj ) => isMultipleOriginObject( gradientObj ) )\n\t);\n};\n\nfunction SingleOrigin( {\n\tclassName,\n\tclearGradient,\n\tgradients,\n\tonChange,\n\tvalue,\n\tactions,\n}: PickerProps< GradientObject > ) {\n\tconst gradientOptions = useMemo( () => {\n\t\treturn gradients.map( ( { gradient, name }, index ) => (\n\t\t\t<CircularOptionPicker.Option\n\t\t\t\tkey={ gradient }\n\t\t\t\tvalue={ gradient }\n\t\t\t\tisSelected={ value === gradient }\n\t\t\t\ttooltipText={\n\t\t\t\t\tname ||\n\t\t\t\t\t// translators: %s: gradient code e.g: \"linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);\".\n\t\t\t\t\tsprintf( __( 'Gradient code: %s' ), gradient )\n\t\t\t\t}\n\t\t\t\tstyle={ { color: 'rgba( 0,0,0,0 )', background: gradient } }\n\t\t\t\tonClick={\n\t\t\t\t\tvalue === gradient\n\t\t\t\t\t\t? clearGradient\n\t\t\t\t\t\t: () => onChange( gradient, index )\n\t\t\t\t}\n\t\t\t\taria-label={\n\t\t\t\t\tname\n\t\t\t\t\t\t? // translators: %s: The name of the gradient e.g: \"Angular red to blue\".\n\t\t\t\t\t\t sprintf( __( 'Gradient: %s' ), name )\n\t\t\t\t\t\t: // translators: %s: gradient code e.g: \"linear-gradient(90deg, rgba(98,16,153,1) 0%, rgba(172,110,22,1) 100%);\".\n\t\t\t\t\t\t sprintf( __( 'Gradient code: %s' ), gradient )\n\t\t\t\t}\n\t\t\t/>\n\t\t) );\n\t}, [ gradients, value, onChange, clearGradient ] );\n\treturn (\n\t\t<CircularOptionPicker\n\t\t\tclassName={ className }\n\t\t\toptions={ gradientOptions }\n\t\t\tactions={ actions }\n\t\t/>\n\t);\n}\n\nfunction MultipleOrigin( {\n\tclassName,\n\tclearGradient,\n\tgradients,\n\tonChange,\n\tvalue,\n\tactions,\n\theadingLevel,\n}: PickerProps< OriginObject > ) {\n\treturn (\n\t\t<VStack spacing={ 3 } className={ className }>\n\t\t\t{ gradients.map( ( { name, gradients: gradientSet }, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<VStack spacing={ 2 } key={ index }>\n\t\t\t\t\t\t<ColorHeading level={ headingLevel }>\n\t\t\t\t\t\t\t{ name }\n\t\t\t\t\t\t</ColorHeading>\n\t\t\t\t\t\t<SingleOrigin\n\t\t\t\t\t\t\tclearGradient={ clearGradient }\n\t\t\t\t\t\t\tgradients={ gradientSet }\n\t\t\t\t\t\t\tonChange={ ( gradient ) =>\n\t\t\t\t\t\t\t\tonChange( gradient, index )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t\t{ ...( gradients.length === index + 1\n\t\t\t\t\t\t\t\t? { actions }\n\t\t\t\t\t\t\t\t: {} ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</VStack>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</VStack>\n\t);\n}\n\nfunction Component( props: PickerProps< any > ) {\n\tif ( isMultipleOriginArray( props.gradients ) ) {\n\t\treturn <MultipleOrigin { ...props } />;\n\t}\n\treturn <SingleOrigin { ...props } />;\n}\n\n/**\n * GradientPicker is a React component that renders a color gradient picker to\n * define a multi step gradient. There's either a _linear_ or a _radial_ type\n * available.\n *\n * ```jsx\n *import { GradientPicker } from '@wordpress/components';\n *import { useState } from '@wordpress/element';\n *\n *const myGradientPicker = () => {\n *\tconst [ gradient, setGradient ] = useState( null );\n *\n *\treturn (\n *\t\t<GradientPicker\n *\t\t\t__nextHasNoMargin\n *\t\t\tvalue={ gradient }\n *\t\t\tonChange={ ( currentGradient ) => setGradient( currentGradient ) }\n *\t\t\tgradients={ [\n *\t\t\t\t{\n *\t\t\t\t\tname: 'JShine',\n *\t\t\t\t\tgradient:\n *\t\t\t\t\t\t'linear-gradient(135deg,#12c2e9 0%,#c471ed 50%,#f64f59 100%)',\n *\t\t\t\t\tslug: 'jshine',\n *\t\t\t\t},\n *\t\t\t\t{\n *\t\t\t\t\tname: 'Moonlit Asteroid',\n *\t\t\t\t\tgradient:\n *\t\t\t\t\t\t'linear-gradient(135deg,#0F2027 0%, #203A43 0%, #2c5364 100%)',\n *\t\t\t\t\tslug: 'moonlit-asteroid',\n *\t\t\t\t},\n *\t\t\t\t{\n *\t\t\t\t\tname: 'Rastafarie',\n *\t\t\t\t\tgradient:\n *\t\t\t\t\t\t'linear-gradient(135deg,#1E9600 0%, #FFF200 0%, #FF0000 100%)',\n *\t\t\t\t\tslug: 'rastafari',\n *\t\t\t\t},\n *\t\t\t] }\n *\t\t/>\n *\t);\n *};\n *```\n *\n */\nexport function GradientPicker( {\n\t/** Start opting into the new margin-free styles that will become the default in a future version. */\n\t__nextHasNoMargin = false,\n\tclassName,\n\tgradients = [],\n\tonChange,\n\tvalue,\n\tclearable = true,\n\tdisableCustomGradients = false,\n\t__experimentalIsRenderedInSidebar,\n\theadingLevel = 2,\n}: GradientPickerComponentProps ) {\n\tconst clearGradient = useCallback(\n\t\t() => onChange( undefined ),\n\t\t[ onChange ]\n\t);\n\n\tif ( ! __nextHasNoMargin ) {\n\t\tdeprecated( 'Outer margin styles for wp.components.GradientPicker', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.4',\n\t\t\thint: 'Set the `__nextHasNoMargin` prop to true to start opting into the new styles, which will become the default in a future version',\n\t\t} );\n\t}\n\n\tconst deprecatedMarginSpacerProps = ! __nextHasNoMargin\n\t\t? {\n\t\t\t\tmarginTop: ! gradients.length ? 3 : undefined,\n\t\t\t\tmarginBottom: ! clearable ? 6 : 0,\n\t\t }\n\t\t: {};\n\n\treturn (\n\t\t// Outmost Spacer wrapper can be removed when deprecation period is over\n\t\t<Spacer marginBottom={ 0 } { ...deprecatedMarginSpacerProps }>\n\t\t\t<VStack spacing={ gradients.length ? 4 : 0 }>\n\t\t\t\t{ ! disableCustomGradients && (\n\t\t\t\t\t<CustomGradientPicker\n\t\t\t\t\t\t__nextHasNoMargin\n\t\t\t\t\t\t__experimentalIsRenderedInSidebar={\n\t\t\t\t\t\t\t__experimentalIsRenderedInSidebar\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ ( gradients.length || clearable ) && (\n\t\t\t\t\t<Component\n\t\t\t\t\t\tclassName={ className }\n\t\t\t\t\t\tclearGradient={ clearGradient }\n\t\t\t\t\t\tgradients={ gradients }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tactions={\n\t\t\t\t\t\t\tclearable &&\n\t\t\t\t\t\t\t! disableCustomGradients && (\n\t\t\t\t\t\t\t\t<CircularOptionPicker.ButtonAction\n\t\t\t\t\t\t\t\t\tonClick={ clearGradient }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Clear' ) }\n\t\t\t\t\t\t\t\t</CircularOptionPicker.ButtonAction>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\t\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</VStack>\n\t\t</Spacer>\n\t);\n}\n\nexport default GradientPicker;\n"]}
@@ -9,8 +9,6 @@ exports.default = exports.Grid = void 0;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _context = require("../ui/context");
15
13
 
16
14
  var _view = require("../view");
@@ -26,9 +24,9 @@ var _hook = _interopRequireDefault(require("./hook"));
26
24
  */
27
25
  function UnconnectedGrid(props, forwardedRef) {
28
26
  const gridProps = (0, _hook.default)(props);
29
- return (0, _element.createElement)(_view.View, (0, _extends2.default)({}, gridProps, {
27
+ return (0, _element.createElement)(_view.View, { ...gridProps,
30
28
  ref: forwardedRef
31
- }));
29
+ });
32
30
  }
33
31
  /**
34
32
  * `Grid` is a primitive layout component that can arrange content in a grid configuration.
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/grid/component.tsx"],"names":["UnconnectedGrid","props","forwardedRef","gridProps","Grid"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,eAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,SAAS,GAAG,mBAASF,KAAT,CAAlB;AAEA,SAAO,4BAAC,UAAD,6BAAWE,SAAX;AAAuB,IAAA,GAAG,EAAGD;AAA7B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,IAAI,GAAG,6BAAgBJ,eAAhB,EAAiC,MAAjC,CAAb;;eAEQI,I","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport useGrid from './hook';\nimport type { GridProps } from './types';\n\nfunction UnconnectedGrid(\n\tprops: WordPressComponentProps< GridProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst gridProps = useGrid( props );\n\n\treturn <View { ...gridProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Grid` is a primitive layout component that can arrange content in a grid configuration.\n *\n * ```jsx\n * import {\n * \t__experimentalGrid as Grid,\n * \t__experimentalText as Text\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Grid columns={ 3 }>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</Grid>\n * \t);\n * }\n * ```\n */\nexport const Grid = contextConnect( UnconnectedGrid, 'Grid' );\n\nexport default Grid;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/grid/component.tsx"],"names":["UnconnectedGrid","props","forwardedRef","gridProps","Grid"],"mappings":";;;;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,eAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,SAAS,GAAG,mBAASF,KAAT,CAAlB;AAEA,SAAO,4BAAC,UAAD,OAAWE,SAAX;AAAuB,IAAA,GAAG,EAAGD;AAA7B,IAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,IAAI,GAAG,6BAAgBJ,eAAhB,EAAiC,MAAjC,CAAb;;eAEQI,I","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport useGrid from './hook';\nimport type { GridProps } from './types';\n\nfunction UnconnectedGrid(\n\tprops: WordPressComponentProps< GridProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst gridProps = useGrid( props );\n\n\treturn <View { ...gridProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Grid` is a primitive layout component that can arrange content in a grid configuration.\n *\n * ```jsx\n * import {\n * \t__experimentalGrid as Grid,\n * \t__experimentalText as Text\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<Grid columns={ 3 }>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</Grid>\n * \t);\n * }\n * ```\n */\nexport const Grid = contextConnect( UnconnectedGrid, 'Grid' );\n\nexport default Grid;\n"]}
@@ -21,6 +21,7 @@ function GuidePage(props) {
21
21
  alternative: 'the `pages` prop in <Guide>'
22
22
  });
23
23
  }, []);
24
- return (0, _element.createElement)("div", props);
24
+ return (0, _element.createElement)("div", { ...props
25
+ });
25
26
  }
26
27
  //# sourceMappingURL=page.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/guide/page.tsx"],"names":["GuidePage","props","since","alternative"],"mappings":";;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AASe,SAASA,SAAT,CACdC,KADc,EAEb;AACD,0BAAW,MAAM;AAChB,6BAAY,aAAZ,EAA2B;AAC1BC,MAAAA,KAAK,EAAE,KADmB;AAE1BC,MAAAA,WAAW,EAAE;AAFa,KAA3B;AAIA,GALD,EAKG,EALH;AAOA,SAAO,mCAAUF,KAAV,CAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\n\nexport default function GuidePage(\n\tprops: WordPressComponentProps< {}, 'div', false >\n) {\n\tuseEffect( () => {\n\t\tdeprecated( '<GuidePage>', {\n\t\t\tsince: '5.5',\n\t\t\talternative: 'the `pages` prop in <Guide>',\n\t\t} );\n\t}, [] );\n\n\treturn <div { ...props } />;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/guide/page.tsx"],"names":["GuidePage","props","since","alternative"],"mappings":";;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;AASe,SAASA,SAAT,CACdC,KADc,EAEb;AACD,0BAAW,MAAM;AAChB,6BAAY,aAAZ,EAA2B;AAC1BC,MAAAA,KAAK,EAAE,KADmB;AAE1BC,MAAAA,WAAW,EAAE;AAFa,KAA3B;AAIA,GALD,EAKG,EALH;AAOA,SAAO,wCAAUF;AAAV,IAAP;AACA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useEffect } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\n\nexport default function GuidePage(\n\tprops: WordPressComponentProps< {}, 'div', false >\n) {\n\tuseEffect( () => {\n\t\tdeprecated( '<GuidePage>', {\n\t\t\tsince: '5.5',\n\t\t\talternative: 'the `pages` prop in <Guide>',\n\t\t} );\n\t}, [] );\n\n\treturn <div { ...props } />;\n}\n"]}
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -9,8 +7,6 @@ exports.default = exports.HStack = void 0;
9
7
 
10
8
  var _element = require("@wordpress/element");
11
9
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _context = require("../ui/context");
15
11
 
16
12
  var _view = require("../view");
@@ -22,9 +18,9 @@ var _hook = require("./hook");
22
18
  */
23
19
  function UnconnectedHStack(props, forwardedRef) {
24
20
  const hStackProps = (0, _hook.useHStack)(props);
25
- return (0, _element.createElement)(_view.View, (0, _extends2.default)({}, hStackProps, {
21
+ return (0, _element.createElement)(_view.View, { ...hStackProps,
26
22
  ref: forwardedRef
27
- }));
23
+ });
28
24
  }
29
25
  /**
30
26
  * `HStack` (Horizontal Stack) arranges child elements in a horizontal line.
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/h-stack/component.tsx"],"names":["UnconnectedHStack","props","forwardedRef","hStackProps","HStack"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;AAMA,SAASA,iBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,WAAW,GAAG,qBAAWF,KAAX,CAApB;AAEA,SAAO,4BAAC,UAAD,6BAAWE,WAAX;AAAyB,IAAA,GAAG,EAAGD;AAA/B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,MAAM,GAAG,6BAAgBJ,iBAAhB,EAAmC,QAAnC,CAAf;;eAEQI,M","sourcesContent":["/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport { useHStack } from './hook';\nimport type { Props } from './types';\n\nfunction UnconnectedHStack(\n\tprops: WordPressComponentProps< Props, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) {\n\tconst hStackProps = useHStack( props );\n\n\treturn <View { ...hStackProps } ref={ forwardedRef } />;\n}\n\n/**\n * `HStack` (Horizontal Stack) arranges child elements in a horizontal line.\n *\n * `HStack` can render anything inside.\n *\n * ```jsx\n * import {\n * \t__experimentalHStack as HStack,\n * \t__experimentalText as Text,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<HStack>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</HStack>\n * \t);\n * }\n * ```\n */\nexport const HStack = contextConnect( UnconnectedHStack, 'HStack' );\n\nexport default HStack;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/h-stack/component.tsx"],"names":["UnconnectedHStack","props","forwardedRef","hStackProps","HStack"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;AAMA,SAASA,iBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,WAAW,GAAG,qBAAWF,KAAX,CAApB;AAEA,SAAO,4BAAC,UAAD,OAAWE,WAAX;AAAyB,IAAA,GAAG,EAAGD;AAA/B,IAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,MAAM,GAAG,6BAAgBJ,iBAAhB,EAAmC,QAAnC,CAAf;;eAEQI,M","sourcesContent":["/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport { useHStack } from './hook';\nimport type { Props } from './types';\n\nfunction UnconnectedHStack(\n\tprops: WordPressComponentProps< Props, 'div' >,\n\tforwardedRef: React.ForwardedRef< any >\n) {\n\tconst hStackProps = useHStack( props );\n\n\treturn <View { ...hStackProps } ref={ forwardedRef } />;\n}\n\n/**\n * `HStack` (Horizontal Stack) arranges child elements in a horizontal line.\n *\n * `HStack` can render anything inside.\n *\n * ```jsx\n * import {\n * \t__experimentalHStack as HStack,\n * \t__experimentalText as Text,\n * } from `@wordpress/components`;\n *\n * function Example() {\n * \treturn (\n * \t\t<HStack>\n * \t\t\t<Text>Code</Text>\n * \t\t\t<Text>is</Text>\n * \t\t\t<Text>Poetry</Text>\n * \t\t</HStack>\n * \t);\n * }\n * ```\n */\nexport const HStack = contextConnect( UnconnectedHStack, 'HStack' );\n\nexport default HStack;\n"]}
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -9,8 +7,6 @@ exports.useHStack = useHStack;
9
7
 
10
8
  var _element = require("@wordpress/element");
11
9
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _context = require("../ui/context");
15
11
 
16
12
  var _flex = require("../flex");
@@ -44,10 +40,11 @@ function useHStack(props) {
44
40
 
45
41
  const _key = childElement.key || `hstack-${index}`;
46
42
 
47
- return (0, _element.createElement)(_flex.FlexItem, (0, _extends2.default)({
43
+ return (0, _element.createElement)(_flex.FlexItem, {
48
44
  isBlock: true,
49
- key: _key
50
- }, childElement.props));
45
+ key: _key,
46
+ ...childElement.props
47
+ });
51
48
  }
52
49
 
53
50
  return child;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/h-stack/hook.tsx"],"names":["useHStack","props","alignment","children","direction","spacing","otherProps","align","validChildren","clonedChildren","map","child","index","_isSpacer","childElement","_key","key","propsForFlex","justify","gap","flexProps"],"mappings":";;;;;;;;;;;;;AAQA;;AAKA;;AACA;;AACA;;AAfA;AACA;AACA;;AAGA;AACA;AACA;AAWO,SAASA,SAAT,CAAoBC,KAApB,EAAqE;AAC3E,QAAM;AACLC,IAAAA,SAAS,GAAG,MADP;AAELC,IAAAA,QAFK;AAGLC,IAAAA,SAHK;AAILC,IAAAA,OAAO,GAAG,CAJL;AAKL,OAAGC;AALE,MAMF,+BAAkBL,KAAlB,EAAyB,QAAzB,CANJ;AAQA,QAAMM,KAAK,GAAG,8BAAmBL,SAAnB,EAA8BE,SAA9B,CAAd;AAEA,QAAMI,aAAa,GAAG,wCAAkBL,QAAlB,CAAtB;AACA,QAAMM,cAAc,GAAGD,aAAa,CAACE,GAAd,CAAmB,CAAEC,KAAF,EAASC,KAAT,KAAoB;AAC7D,UAAMC,SAAS,GAAG,kCAAqBF,KAArB,EAA4B,CAAE,QAAF,CAA5B,CAAlB;;AAEA,QAAKE,SAAL,EAAiB;AAChB,YAAMC,YAAY,GAAGH,KAArB;;AACA,YAAMI,IAAI,GAAGD,YAAY,CAACE,GAAb,IAAqB,UAAUJ,KAAO,EAAnD;;AAEA,aAAO,4BAAC,cAAD;AAAU,QAAA,OAAO,MAAjB;AAAkB,QAAA,GAAG,EAAGG;AAAxB,SAAoCD,YAAY,CAACb,KAAjD,EAAP;AACA;;AAED,WAAOU,KAAP;AACA,GAXsB,CAAvB;AAaA,QAAMM,YAAY,GAAG;AACpBd,IAAAA,QAAQ,EAAEM,cADU;AAEpBL,IAAAA,SAFoB;AAGpBc,IAAAA,OAAO,EAAE,QAHW;AAIpB,OAAGX,KAJiB;AAKpB,OAAGD,UALiB;AAMpBa,IAAAA,GAAG,EAAEd;AANe,GAArB;AASA,QAAMe,SAAS,GAAG,mBAASH,YAAT,CAAlB;AAEA,SAAOG,SAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n/**\n * Internal dependencies\n */\nimport {\n\thasConnectNamespace,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../ui/context';\nimport { FlexItem, useFlex } from '../flex';\nimport { getAlignmentProps } from './utils';\nimport { getValidChildren } from '../ui/utils/get-valid-children';\nimport type { Props } from './types';\n\nexport function useHStack( props: WordPressComponentProps< Props, 'div' > ) {\n\tconst {\n\t\talignment = 'edge',\n\t\tchildren,\n\t\tdirection,\n\t\tspacing = 2,\n\t\t...otherProps\n\t} = useContextSystem( props, 'HStack' );\n\n\tconst align = getAlignmentProps( alignment, direction );\n\n\tconst validChildren = getValidChildren( children );\n\tconst clonedChildren = validChildren.map( ( child, index ) => {\n\t\tconst _isSpacer = hasConnectNamespace( child, [ 'Spacer' ] );\n\n\t\tif ( _isSpacer ) {\n\t\t\tconst childElement = child as ReactElement;\n\t\t\tconst _key = childElement.key || `hstack-${ index }`;\n\n\t\t\treturn <FlexItem isBlock key={ _key } { ...childElement.props } />;\n\t\t}\n\n\t\treturn child;\n\t} );\n\n\tconst propsForFlex = {\n\t\tchildren: clonedChildren,\n\t\tdirection,\n\t\tjustify: 'center',\n\t\t...align,\n\t\t...otherProps,\n\t\tgap: spacing,\n\t};\n\n\tconst flexProps = useFlex( propsForFlex );\n\n\treturn flexProps;\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/h-stack/hook.tsx"],"names":["useHStack","props","alignment","children","direction","spacing","otherProps","align","validChildren","clonedChildren","map","child","index","_isSpacer","childElement","_key","key","propsForFlex","justify","gap","flexProps"],"mappings":";;;;;;;;;AAQA;;AAKA;;AACA;;AACA;;AAfA;AACA;AACA;;AAGA;AACA;AACA;AAWO,SAASA,SAAT,CAAoBC,KAApB,EAAqE;AAC3E,QAAM;AACLC,IAAAA,SAAS,GAAG,MADP;AAELC,IAAAA,QAFK;AAGLC,IAAAA,SAHK;AAILC,IAAAA,OAAO,GAAG,CAJL;AAKL,OAAGC;AALE,MAMF,+BAAkBL,KAAlB,EAAyB,QAAzB,CANJ;AAQA,QAAMM,KAAK,GAAG,8BAAmBL,SAAnB,EAA8BE,SAA9B,CAAd;AAEA,QAAMI,aAAa,GAAG,wCAAkBL,QAAlB,CAAtB;AACA,QAAMM,cAAc,GAAGD,aAAa,CAACE,GAAd,CAAmB,CAAEC,KAAF,EAASC,KAAT,KAAoB;AAC7D,UAAMC,SAAS,GAAG,kCAAqBF,KAArB,EAA4B,CAAE,QAAF,CAA5B,CAAlB;;AAEA,QAAKE,SAAL,EAAiB;AAChB,YAAMC,YAAY,GAAGH,KAArB;;AACA,YAAMI,IAAI,GAAGD,YAAY,CAACE,GAAb,IAAqB,UAAUJ,KAAO,EAAnD;;AAEA,aAAO,4BAAC,cAAD;AAAU,QAAA,OAAO,MAAjB;AAAkB,QAAA,GAAG,EAAGG,IAAxB;AAAA,WAAoCD,YAAY,CAACb;AAAjD,QAAP;AACA;;AAED,WAAOU,KAAP;AACA,GAXsB,CAAvB;AAaA,QAAMM,YAAY,GAAG;AACpBd,IAAAA,QAAQ,EAAEM,cADU;AAEpBL,IAAAA,SAFoB;AAGpBc,IAAAA,OAAO,EAAE,QAHW;AAIpB,OAAGX,KAJiB;AAKpB,OAAGD,UALiB;AAMpBa,IAAAA,GAAG,EAAEd;AANe,GAArB;AASA,QAAMe,SAAS,GAAG,mBAASH,YAAT,CAAlB;AAEA,SAAOG,SAAP;AACA","sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n/**\n * Internal dependencies\n */\nimport {\n\thasConnectNamespace,\n\tuseContextSystem,\n\tWordPressComponentProps,\n} from '../ui/context';\nimport { FlexItem, useFlex } from '../flex';\nimport { getAlignmentProps } from './utils';\nimport { getValidChildren } from '../ui/utils/get-valid-children';\nimport type { Props } from './types';\n\nexport function useHStack( props: WordPressComponentProps< Props, 'div' > ) {\n\tconst {\n\t\talignment = 'edge',\n\t\tchildren,\n\t\tdirection,\n\t\tspacing = 2,\n\t\t...otherProps\n\t} = useContextSystem( props, 'HStack' );\n\n\tconst align = getAlignmentProps( alignment, direction );\n\n\tconst validChildren = getValidChildren( children );\n\tconst clonedChildren = validChildren.map( ( child, index ) => {\n\t\tconst _isSpacer = hasConnectNamespace( child, [ 'Spacer' ] );\n\n\t\tif ( _isSpacer ) {\n\t\t\tconst childElement = child as ReactElement;\n\t\t\tconst _key = childElement.key || `hstack-${ index }`;\n\n\t\t\treturn <FlexItem isBlock key={ _key } { ...childElement.props } />;\n\t\t}\n\n\t\treturn child;\n\t} );\n\n\tconst propsForFlex = {\n\t\tchildren: clonedChildren,\n\t\tdirection,\n\t\tjustify: 'center',\n\t\t...align,\n\t\t...otherProps,\n\t\tgap: spacing,\n\t};\n\n\tconst flexProps = useFlex( propsForFlex );\n\n\treturn flexProps;\n}\n"]}
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -9,8 +7,6 @@ exports.default = exports.Heading = void 0;
9
7
 
10
8
  var _element = require("@wordpress/element");
11
9
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _context = require("../ui/context");
15
11
 
16
12
  var _view = require("../view");
@@ -26,9 +22,9 @@ var _hook = require("./hook");
26
22
  */
27
23
  function UnconnectedHeading(props, forwardedRef) {
28
24
  const headerProps = (0, _hook.useHeading)(props);
29
- return (0, _element.createElement)(_view.View, (0, _extends2.default)({}, headerProps, {
25
+ return (0, _element.createElement)(_view.View, { ...headerProps,
30
26
  ref: forwardedRef
31
- }));
27
+ });
32
28
  }
33
29
  /**
34
30
  * `Heading` renders headings and titles using the library's typography system.
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/heading/component.tsx"],"names":["UnconnectedHeading","props","forwardedRef","headerProps","Heading"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,kBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,WAAW,GAAG,sBAAYF,KAAZ,CAApB;AAEA,SAAO,4BAAC,UAAD,6BAAWE,WAAX;AAAyB,IAAA,GAAG,EAAGD;AAA/B,KAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,OAAO,GAAG,6BAAgBJ,kBAAhB,EAAoC,SAApC,CAAhB;;eAEQI,O","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport { useHeading } from './hook';\nimport type { HeadingProps } from './types';\n\nfunction UnconnectedHeading(\n\tprops: WordPressComponentProps< HeadingProps, 'h1' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst headerProps = useHeading( props );\n\n\treturn <View { ...headerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Heading` renders headings and titles using the library's typography system.\n *\n * ```jsx\n * import { __experimentalHeading as Heading } from \"@wordpress/components\";\n *\n * function Example() {\n * return <Heading>Code is Poetry</Heading>;\n * }\n * ```\n */\nexport const Heading = contextConnect( UnconnectedHeading, 'Heading' );\n\nexport default Heading;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/heading/component.tsx"],"names":["UnconnectedHeading","props","forwardedRef","headerProps","Heading"],"mappings":";;;;;;;;;AAQA;;AACA;;AACA;;AAVA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,kBAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,WAAW,GAAG,sBAAYF,KAAZ,CAApB;AAEA,SAAO,4BAAC,UAAD,OAAWE,WAAX;AAAyB,IAAA,GAAG,EAAGD;AAA/B,IAAP;AACA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACO,MAAME,OAAO,GAAG,6BAAgBJ,kBAAhB,EAAoC,SAApC,CAAhB;;eAEQI,O","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../ui/context';\nimport { View } from '../view';\nimport { useHeading } from './hook';\nimport type { HeadingProps } from './types';\n\nfunction UnconnectedHeading(\n\tprops: WordPressComponentProps< HeadingProps, 'h1' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst headerProps = useHeading( props );\n\n\treturn <View { ...headerProps } ref={ forwardedRef } />;\n}\n\n/**\n * `Heading` renders headings and titles using the library's typography system.\n *\n * ```jsx\n * import { __experimentalHeading as Heading } from \"@wordpress/components\";\n *\n * function Example() {\n * return <Heading>Code is Poetry</Heading>;\n * }\n * ```\n */\nexport const Heading = contextConnect( UnconnectedHeading, 'Heading' );\n\nexport default Heading;\n"]}
@@ -129,7 +129,9 @@ function useNavigateRegions(shortcuts = defaultShortcuts) {
129
129
  var _default = (0, _compose.createHigherOrderComponent)(Component => ({
130
130
  shortcuts,
131
131
  ...props
132
- }) => (0, _element.createElement)("div", useNavigateRegions(shortcuts), (0, _element.createElement)(Component, props)), 'navigateRegions');
132
+ }) => (0, _element.createElement)("div", { ...useNavigateRegions(shortcuts)
133
+ }, (0, _element.createElement)(Component, { ...props
134
+ })), 'navigateRegions');
133
135
 
134
136
  exports.default = _default;
135
137
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/navigate-regions/index.tsx"],"names":["defaultShortcuts","previous","modifier","character","next","useNavigateRegions","shortcuts","ref","isFocusingRegions","setIsFocusingRegions","focusRegion","offset","regions","Array","from","current","querySelectorAll","length","nextRegion","wrappingRegion","ownerDocument","activeElement","closest","selectedIndex","indexOf","nextIndex","focus","clickRef","element","onClick","addEventListener","removeEventListener","className","onKeyDown","event","some","isKeyboardEvent","Component","props"],"mappings":";;;;;;;;AAGA;;AACA;;AAKA;;AATA;AACA;AACA;AAUA,MAAMA,gBAAgB,GAAG;AACxBC,EAAAA,QAAQ,EAAE,CACT;AACCC,IAAAA,QAAQ,EAAE,WADX;AAECC,IAAAA,SAAS,EAAE;AAFZ,GADS,EAKT;AACCD,IAAAA,QAAQ,EAAE,WADX;AAECC,IAAAA,SAAS,EAAE;AAFZ,GALS,EAST;AACCD,IAAAA,QAAQ,EAAE,QADX;AAECC,IAAAA,SA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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;eACe,yCACZ2B,SAAF,IACC,CAAE;AAAE/B,EAAAA,SAAF;AAAa,KAAGgC;AAAhB,CAAF,KAEE,mCAAUjC,kBAAkB,CAAEC,SAAF,CAA5B,EACC,4BAAC,SAAD,EAAgBgC,KAAhB,CADD,CAJW,EAQd,iBARc,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useRef } from '@wordpress/element';\nimport {\n\tcreateHigherOrderComponent,\n\tuseRefEffect,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\nimport type { WPKeycodeModifier } from '@wordpress/keycodes';\n\nconst defaultShortcuts = {\n\tprevious: [\n\t\t{\n\t\t\tmodifier: 'ctrlShift',\n\t\t\tcharacter: '`',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'ctrlShift',\n\t\t\tcharacter: '~',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'p',\n\t\t},\n\t] as const,\n\tnext: [\n\t\t{\n\t\t\tmodifier: 'ctrl',\n\t\t\tcharacter: '`',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'n',\n\t\t},\n\t] as const,\n};\n\ntype Shortcuts = {\n\tprevious: readonly { modifier: WPKeycodeModifier; character: string }[];\n\tnext: readonly { modifier: WPKeycodeModifier; character: string }[];\n};\n\nexport function useNavigateRegions( shortcuts: Shortcuts = defaultShortcuts ) {\n\tconst ref = useRef< HTMLDivElement >( null );\n\tconst [ isFocusingRegions, setIsFocusingRegions ] = useState( false );\n\n\tfunction focusRegion( offset: number ) {\n\t\tconst regions = Array.from(\n\t\t\tref.current?.querySelectorAll< HTMLElement >(\n\t\t\t\t'[role=\"region\"][tabindex=\"-1\"]'\n\t\t\t) ?? []\n\t\t);\n\t\tif ( ! regions.length ) {\n\t\t\treturn;\n\t\t}\n\t\tlet nextRegion = regions[ 0 ];\n\t\t// Based off the current element, use closest to determine the wrapping region since this operates up the DOM. Also, match tabindex to avoid edge cases with regions we do not want.\n\t\tconst wrappingRegion =\n\t\t\tref.current?.ownerDocument?.activeElement?.closest< HTMLElement >(\n\t\t\t\t'[role=\"region\"][tabindex=\"-1\"]'\n\t\t\t);\n\t\tconst selectedIndex = wrappingRegion\n\t\t\t? regions.indexOf( wrappingRegion )\n\t\t\t: -1;\n\t\tif ( selectedIndex !== -1 ) {\n\t\t\tlet nextIndex = selectedIndex + offset;\n\t\t\tnextIndex = nextIndex === -1 ? regions.length - 1 : nextIndex;\n\t\t\tnextIndex = nextIndex === regions.length ? 0 : nextIndex;\n\t\t\tnextRegion = regions[ nextIndex ];\n\t\t}\n\n\t\tnextRegion.focus();\n\t\tsetIsFocusingRegions( true );\n\t}\n\n\tconst clickRef = useRefEffect(\n\t\t( element ) => {\n\t\t\tfunction onClick() {\n\t\t\t\tsetIsFocusingRegions( false );\n\t\t\t}\n\n\t\t\telement.addEventListener( 'click', onClick );\n\n\t\t\treturn () => {\n\t\t\t\telement.removeEventListener( 'click', onClick );\n\t\t\t};\n\t\t},\n\t\t[ setIsFocusingRegions ]\n\t);\n\n\treturn {\n\t\tref: useMergeRefs( [ ref, clickRef ] ),\n\t\tclassName: isFocusingRegions ? 'is-focusing-regions' : '',\n\t\tonKeyDown( event: React.KeyboardEvent< HTMLDivElement > ) {\n\t\t\tif (\n\t\t\t\tshortcuts.previous.some( ( { modifier, character } ) => {\n\t\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\tfocusRegion( -1 );\n\t\t\t} else if (\n\t\t\t\tshortcuts.next.some( ( { modifier, character } ) => {\n\t\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\tfocusRegion( 1 );\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * `navigateRegions` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html)\n * adding keyboard navigation to switch between the different DOM elements marked as \"regions\" (role=\"region\").\n * These regions should be focusable (By adding a tabIndex attribute for example). For better accessibility,\n * these elements must be properly labelled to briefly describe the purpose of the content in the region.\n * For more details, see \"Landmark Roles\" in the [WAI-ARIA specification](https://www.w3.org/TR/wai-aria/)\n * and \"Landmark Regions\" in the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/).\n *\n * ```jsx\n * import { navigateRegions } from '@wordpress/components';\n *\n * const MyComponentWithNavigateRegions = navigateRegions( () => (\n * \t<div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Header\">\n * \t\t\tHeader\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Content\">\n * \t\t\tContent\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Sidebar\">\n * \t\t\tSidebar\n * \t\t</div>\n * \t</div>\n * ) );\n * ```\n */\nexport default createHigherOrderComponent(\n\t( Component ) =>\n\t\t( { shortcuts, ...props } ) =>\n\t\t\t(\n\t\t\t\t<div { ...useNavigateRegions( shortcuts ) }>\n\t\t\t\t\t<Component { ...props } />\n\t\t\t\t</div>\n\t\t\t),\n\t'navigateRegions'\n);\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/higher-order/navigate-regions/index.tsx"],"names":["defaultShortcuts","previous","modifier","character","next","useNavigateRegions","shortcuts","ref","isFocusingRegions","setIsFocusingRegions","focusRegion","offset","regions","Array","from","current","querySelectorAll","length","nextRegion","wrappingRegion","ownerDocument","activeElement","closest","selectedIndex","indexOf","nextIndex","focus","clickRef","element","onClick","addEventListener","removeEventListener","className","onKeyDown","event","some","isKeyboardEvent","Component","props"],"mappings":";;;;;;;;AAGA;;AACA;;AAKA;;AATA;AACA;AACA;AAUA,MAAMA,gBAAgB,GAAG;AACxBC,EAAAA,QAAQ,EAAE,CACT;AACCC,IAAAA,QAAQ,EAAE,WADX;AAECC,IAA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AACDO,QAAAA,WAAW,CAAE,CAAF,CAAX;AACA;AACD;;AAjBK,GAAP;AAmBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;eACe,yCACZ2B,SAAF,IACC,CAAE;AAAE/B,EAAAA,SAAF;AAAa,KAAGgC;AAAhB,CAAF,KAEE,wCAAUjC,kBAAkB,CAAEC,SAAF;AAA5B,GACC,4BAAC,SAAD,OAAgBgC;AAAhB,EADD,CAJW,EAQd,iBARc,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useRef } from '@wordpress/element';\nimport {\n\tcreateHigherOrderComponent,\n\tuseRefEffect,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\nimport type { WPKeycodeModifier } from '@wordpress/keycodes';\n\nconst defaultShortcuts = {\n\tprevious: [\n\t\t{\n\t\t\tmodifier: 'ctrlShift',\n\t\t\tcharacter: '`',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'ctrlShift',\n\t\t\tcharacter: '~',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'p',\n\t\t},\n\t] as const,\n\tnext: [\n\t\t{\n\t\t\tmodifier: 'ctrl',\n\t\t\tcharacter: '`',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'n',\n\t\t},\n\t] as const,\n};\n\ntype Shortcuts = {\n\tprevious: readonly { modifier: WPKeycodeModifier; character: string }[];\n\tnext: readonly { modifier: WPKeycodeModifier; character: string }[];\n};\n\nexport function useNavigateRegions( shortcuts: Shortcuts = defaultShortcuts ) {\n\tconst ref = useRef< HTMLDivElement >( null );\n\tconst [ isFocusingRegions, setIsFocusingRegions ] = useState( false );\n\n\tfunction focusRegion( offset: number ) {\n\t\tconst regions = Array.from(\n\t\t\tref.current?.querySelectorAll< HTMLElement >(\n\t\t\t\t'[role=\"region\"][tabindex=\"-1\"]'\n\t\t\t) ?? []\n\t\t);\n\t\tif ( ! regions.length ) {\n\t\t\treturn;\n\t\t}\n\t\tlet nextRegion = regions[ 0 ];\n\t\t// Based off the current element, use closest to determine the wrapping region since this operates up the DOM. Also, match tabindex to avoid edge cases with regions we do not want.\n\t\tconst wrappingRegion =\n\t\t\tref.current?.ownerDocument?.activeElement?.closest< HTMLElement >(\n\t\t\t\t'[role=\"region\"][tabindex=\"-1\"]'\n\t\t\t);\n\t\tconst selectedIndex = wrappingRegion\n\t\t\t? regions.indexOf( wrappingRegion )\n\t\t\t: -1;\n\t\tif ( selectedIndex !== -1 ) {\n\t\t\tlet nextIndex = selectedIndex + offset;\n\t\t\tnextIndex = nextIndex === -1 ? regions.length - 1 : nextIndex;\n\t\t\tnextIndex = nextIndex === regions.length ? 0 : nextIndex;\n\t\t\tnextRegion = regions[ nextIndex ];\n\t\t}\n\n\t\tnextRegion.focus();\n\t\tsetIsFocusingRegions( true );\n\t}\n\n\tconst clickRef = useRefEffect(\n\t\t( element ) => {\n\t\t\tfunction onClick() {\n\t\t\t\tsetIsFocusingRegions( false );\n\t\t\t}\n\n\t\t\telement.addEventListener( 'click', onClick );\n\n\t\t\treturn () => {\n\t\t\t\telement.removeEventListener( 'click', onClick );\n\t\t\t};\n\t\t},\n\t\t[ setIsFocusingRegions ]\n\t);\n\n\treturn {\n\t\tref: useMergeRefs( [ ref, clickRef ] ),\n\t\tclassName: isFocusingRegions ? 'is-focusing-regions' : '',\n\t\tonKeyDown( event: React.KeyboardEvent< HTMLDivElement > ) {\n\t\t\tif (\n\t\t\t\tshortcuts.previous.some( ( { modifier, character } ) => {\n\t\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\tfocusRegion( -1 );\n\t\t\t} else if (\n\t\t\t\tshortcuts.next.some( ( { modifier, character } ) => {\n\t\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\tfocusRegion( 1 );\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * `navigateRegions` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html)\n * adding keyboard navigation to switch between the different DOM elements marked as \"regions\" (role=\"region\").\n * These regions should be focusable (By adding a tabIndex attribute for example). For better accessibility,\n * these elements must be properly labelled to briefly describe the purpose of the content in the region.\n * For more details, see \"Landmark Roles\" in the [WAI-ARIA specification](https://www.w3.org/TR/wai-aria/)\n * and \"Landmark Regions\" in the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/).\n *\n * ```jsx\n * import { navigateRegions } from '@wordpress/components';\n *\n * const MyComponentWithNavigateRegions = navigateRegions( () => (\n * \t<div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Header\">\n * \t\t\tHeader\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Content\">\n * \t\t\tContent\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Sidebar\">\n * \t\t\tSidebar\n * \t\t</div>\n * \t</div>\n * ) );\n * ```\n */\nexport default createHigherOrderComponent(\n\t( Component ) =>\n\t\t( { shortcuts, ...props } ) =>\n\t\t\t(\n\t\t\t\t<div { ...useNavigateRegions( shortcuts ) }>\n\t\t\t\t\t<Component { ...props } />\n\t\t\t\t</div>\n\t\t\t),\n\t'navigateRegions'\n);\n"]}
@@ -26,7 +26,8 @@ const withConstrainedTabbing = (0, _compose.createHigherOrderComponent)(WrappedC
26
26
  return (0, _element.createElement)("div", {
27
27
  ref: ref,
28
28
  tabIndex: -1
29
- }, (0, _element.createElement)(WrappedComponent, props));
29
+ }, (0, _element.createElement)(WrappedComponent, { ...props
30
+ }));
30
31
  }, 'withConstrainedTabbing');
31
32
  var _default = withConstrainedTabbing;
32
33
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-constrained-tabbing/index.tsx"],"names":["withConstrainedTabbing","WrappedComponent","ComponentWithConstrainedTabbing","props","ref"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,sBAAsB,GAAG,yCAC5BC,gBAAF,IACC,SAASC,+BAAT,CAA0CC,KAA1C,EAAkD;AACjD,QAAMC,GAAG,GAAG,qCAAZ;AACA,SACC;AAAK,IAAA,GAAG,EAAGA,GAAX;AAAiB,IAAA,QAAQ,EAAG,CAAC;AAA7B,KACC,4BAAC,gBAAD,EAAuBD,KAAvB,CADD,CADD;AAKA,CAT4B,EAU9B,wBAV8B,CAA/B;eAaeH,sB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateHigherOrderComponent,\n\tuseConstrainedTabbing,\n} from '@wordpress/compose';\n\n/**\n * `withConstrainedTabbing` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html)\n * adding the ability to constrain keyboard navigation with the Tab key within a component.\n * For accessibility reasons, some UI components need to constrain Tab navigation, for example\n * modal dialogs or similar UI. Use of this component is recommended only in cases where a way to\n * navigate away from the wrapped component is implemented by other means, usually by pressing\n * the Escape key or using a specific UI control, e.g. a \"Close\" button.\n */\nconst withConstrainedTabbing = createHigherOrderComponent(\n\t( WrappedComponent ) =>\n\t\tfunction ComponentWithConstrainedTabbing( props ) {\n\t\t\tconst ref = useConstrainedTabbing();\n\t\t\treturn (\n\t\t\t\t<div ref={ ref } tabIndex={ -1 }>\n\t\t\t\t\t<WrappedComponent { ...props } />\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t'withConstrainedTabbing'\n);\n\nexport default withConstrainedTabbing;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/higher-order/with-constrained-tabbing/index.tsx"],"names":["withConstrainedTabbing","WrappedComponent","ComponentWithConstrainedTabbing","props","ref"],"mappings":";;;;;;;;;AAGA;;AAHA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,sBAAsB,GAAG,yCAC5BC,gBAAF,IACC,SAASC,+BAAT,CAA0CC,KAA1C,EAAkD;AACjD,QAAMC,GAAG,GAAG,qCAAZ;AACA,SACC;AAAK,IAAA,GAAG,EAAGA,GAAX;AAAiB,IAAA,QAAQ,EAAG,CAAC;AAA7B,KACC,4BAAC,gBAAD,OAAuBD;AAAvB,IADD,CADD;AAKA,CAT4B,EAU9B,wBAV8B,CAA/B;eAaeH,sB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\tcreateHigherOrderComponent,\n\tuseConstrainedTabbing,\n} from '@wordpress/compose';\n\n/**\n * `withConstrainedTabbing` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html)\n * adding the ability to constrain keyboard navigation with the Tab key within a component.\n * For accessibility reasons, some UI components need to constrain Tab navigation, for example\n * modal dialogs or similar UI. Use of this component is recommended only in cases where a way to\n * navigate away from the wrapped component is implemented by other means, usually by pressing\n * the Escape key or using a specific UI control, e.g. a \"Close\" button.\n */\nconst withConstrainedTabbing = createHigherOrderComponent(\n\t( WrappedComponent ) =>\n\t\tfunction ComponentWithConstrainedTabbing( props ) {\n\t\t\tconst ref = useConstrainedTabbing();\n\t\t\treturn (\n\t\t\t\t<div ref={ ref } tabIndex={ -1 }>\n\t\t\t\t\t<WrappedComponent { ...props } />\n\t\t\t\t</div>\n\t\t\t);\n\t\t},\n\t'withConstrainedTabbing'\n);\n\nexport default withConstrainedTabbing;\n"]}
@@ -9,8 +9,6 @@ exports.default = void 0;
9
9
 
10
10
  var _element = require("@wordpress/element");
11
11
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
12
  var _es = _interopRequireDefault(require("fast-deep-equal/es6"));
15
13
 
16
14
  var _compose = require("@wordpress/compose");
@@ -69,7 +67,9 @@ var _default = mapNodeToProps => (0, _compose.createHigherOrderComponent)(Wrappe
69
67
  }
70
68
 
71
69
  render() {
72
- const wrappedComponent = (0, _element.createElement)(WrappedComponent, (0, _extends2.default)({}, this.props, this.state.fallbackStyles));
70
+ const wrappedComponent = (0, _element.createElement)(WrappedComponent, { ...this.props,
71
+ ...this.state.fallbackStyles
72
+ });
73
73
  return this.props.node ? wrappedComponent : (0, _element.createElement)("div", {
74
74
  ref: this.bindRef
75
75
  }, " ", wrappedComponent, " ");
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-fallback-styles/index.tsx"],"names":["mapNodeToProps","WrappedComponent","Component","constructor","props","nodeRef","node","state","fallbackStyles","undefined","grabStylesCompleted","bindRef","bind","componentDidMount","grabFallbackStyles","componentDidUpdate","newFallbackStyles","setState","Object","values","every","Boolean","render","wrappedComponent"],"mappings":";;;;;;;;;AAQA;;;;AALA;;AAMA;;AATA;AACA;AACA;;AAGA;AACA;AACA;eAeCA,cADc,IAMd,yCAA8BC,gBAAF,IAAwB;AACnD,SAAO,cAAcC,kBAAd,CAAwC;AAG9CC,IAAAA,WAAW,CAAEC,KAAF,EAAiB;AAC3B,YAAOA,KAAP;AACA,WAAKC,OAAL,GAAe,KAAKD,KAAL,CAAWE,IAA1B;AACA,WAAKC,KAAL,GAAa;AACZC,QAAAA,cAAc,EAAEC,SADJ;AAEZC,QAAAA,mBAAmB,EAAE;AAFT,OAAb;AAKA,WAAKC,OAAL,GAAe,KAAKA,OAAL,CAAaC,IAAb,CAAmB,IAAnB,CAAf;AACA;;AAEDD,IAAAA,OAAO,CAAEL,IAAF,EAAyB;AAC/B,UAAK,CAAEA,IAAP,EAAc;AACb;AACA;;AACD,WAAKD,OAAL,GAAeC,IAAf;AACA;;AAEDO,IAAAA,iBAAiB,GAAG;AACnB,WAAKC,kBAAL;AACA;;AAEDC,IAAAA,kBAAkB,GAAG;AACpB,WAAKD,kBAAL;AACA;;AAEDA,IAAAA,kBAAkB,GAAG;AACpB,YAAM;AAAEJ,QAAAA,mBAAF;AAAuBF,QAAAA;AAAvB,UAA0C,KAAKD,KAArD;;AACA,UAAK,KAAKF,OAAL,IAAgB,CAAEK,mBAAvB,EAA6C;AAC5C,cAAMM,iBAAiB,GAAGhB,cAAc,CACvC,KAAKK,OADkC,EAEvC,KAAKD,KAFkC,CAAxC;;AAKA,YACC,CAAE,iBAAeY,iBAAf,EAAkCR,cAAlC,CADH,EAEE;AACD,eAAKS,QAAL,CAAe;AACdT,YAAAA,cAAc,EAAEQ,iBADF;AAEdN,YAAAA,mBAAmB,EAClBQ,MAAM,CAACC,MAAP,CAAeH,iBAAf,EAAmCI,KAAnC,CACCC,OADD;AAHa,WAAf;AAOA;AACD;AACD;;AAEDC,IAAAA,MAAM,GAAG;AACR,YAAMC,gBAAgB,GACrB,4BAAC,gBAAD,6BACM,KAAKnB,KADX,EAEM,KAAKG,KAAL,CAAWC,cAFjB,EADD;AAMA,aAAO,KAAKJ,KAAL,CAAWE,IAAX,GACNiB,gBADM,GAGN;AAAK,QAAA,GAAG,EAAG,KAAKZ;AAAhB,cAA6BY,gBAA7B,MAHD;AAKA;;AA/D6C,GAA/C;AAiEA,CAlED,EAkEG,oBAlEH,C","sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\ntype Props = {\n\tnode?: HTMLElement;\n\t[ key: string ]: any;\n};\n\ntype State = {\n\tfallbackStyles?: { [ key: string ]: any };\n\tgrabStylesCompleted: boolean;\n};\n\nexport default (\n\tmapNodeToProps: (\n\t\tnode: HTMLElement,\n\t\tprops: Props\n\t) => { [ key: string ]: any }\n) =>\n\tcreateHigherOrderComponent( ( WrappedComponent ) => {\n\t\treturn class extends Component< Props, State > {\n\t\t\tnodeRef?: HTMLElement;\n\n\t\t\tconstructor( props: Props ) {\n\t\t\t\tsuper( props );\n\t\t\t\tthis.nodeRef = this.props.node;\n\t\t\t\tthis.state = {\n\t\t\t\t\tfallbackStyles: undefined,\n\t\t\t\t\tgrabStylesCompleted: false,\n\t\t\t\t};\n\n\t\t\t\tthis.bindRef = this.bindRef.bind( this );\n\t\t\t}\n\n\t\t\tbindRef( node: HTMLDivElement ) {\n\t\t\t\tif ( ! node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.nodeRef = node;\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tcomponentDidUpdate() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tgrabFallbackStyles() {\n\t\t\t\tconst { grabStylesCompleted, fallbackStyles } = this.state;\n\t\t\t\tif ( this.nodeRef && ! grabStylesCompleted ) {\n\t\t\t\t\tconst newFallbackStyles = mapNodeToProps(\n\t\t\t\t\t\tthis.nodeRef,\n\t\t\t\t\t\tthis.props\n\t\t\t\t\t);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! fastDeepEqual( newFallbackStyles, fallbackStyles )\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.setState( {\n\t\t\t\t\t\t\tfallbackStyles: newFallbackStyles,\n\t\t\t\t\t\t\tgrabStylesCompleted:\n\t\t\t\t\t\t\t\tObject.values( newFallbackStyles ).every(\n\t\t\t\t\t\t\t\t\tBoolean\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\tconst wrappedComponent = (\n\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t{ ...this.props }\n\t\t\t\t\t\t{ ...this.state.fallbackStyles }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\treturn this.props.node ? (\n\t\t\t\t\twrappedComponent\n\t\t\t\t) : (\n\t\t\t\t\t<div ref={ this.bindRef }> { wrappedComponent } </div>\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}, 'withFallbackStyles' );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/higher-order/with-fallback-styles/index.tsx"],"names":["mapNodeToProps","WrappedComponent","Component","constructor","props","nodeRef","node","state","fallbackStyles","undefined","grabStylesCompleted","bindRef","bind","componentDidMount","grabFallbackStyles","componentDidUpdate","newFallbackStyles","setState","Object","values","every","Boolean","render","wrappedComponent"],"mappings":";;;;;;;;;AAQA;;AALA;;AAMA;;AATA;AACA;AACA;;AAGA;AACA;AACA;eAeCA,cADc,IAMd,yCAA8BC,gBAAF,IAAwB;AACnD,SAAO,cAAcC,kBAAd,CAAwC;AAG9CC,IAAAA,WAAW,CAAEC,KAAF,EAAiB;AAC3B,YAAOA,KAAP;AACA,WAAKC,OAAL,GAAe,KAAKD,KAAL,CAAWE,IAA1B;AACA,WAAKC,KAAL,GAAa;AACZC,QAAAA,cAAc,EAAEC,SADJ;AAEZC,QAAAA,mBAAmB,EAAE;AAFT,OAAb;AAKA,WAAKC,OAAL,GAAe,KAAKA,OAAL,CAAaC,IAAb,CAAmB,IAAnB,CAAf;AACA;;AAEDD,IAAAA,OAAO,CAAEL,IAAF,EAAyB;AAC/B,UAAK,CAAEA,IAAP,EAAc;AACb;AACA;;AACD,WAAKD,OAAL,GAAeC,IAAf;AACA;;AAEDO,IAAAA,iBAAiB,GAAG;AACnB,WAAKC,kBAAL;AACA;;AAEDC,IAAAA,kBAAkB,GAAG;AACpB,WAAKD,kBAAL;AACA;;AAEDA,IAAAA,kBAAkB,GAAG;AACpB,YAAM;AAAEJ,QAAAA,mBAAF;AAAuBF,QAAAA;AAAvB,UAA0C,KAAKD,KAArD;;AACA,UAAK,KAAKF,OAAL,IAAgB,CAAEK,mBAAvB,EAA6C;AAC5C,cAAMM,iBAAiB,GAAGhB,cAAc,CACvC,KAAKK,OADkC,EAEvC,KAAKD,KAFkC,CAAxC;;AAKA,YACC,CAAE,iBAAeY,iBAAf,EAAkCR,cAAlC,CADH,EAEE;AACD,eAAKS,QAAL,CAAe;AACdT,YAAAA,cAAc,EAAEQ,iBADF;AAEdN,YAAAA,mBAAmB,EAClBQ,MAAM,CAACC,MAAP,CAAeH,iBAAf,EAAmCI,KAAnC,CACCC,OADD;AAHa,WAAf;AAOA;AACD;AACD;;AAEDC,IAAAA,MAAM,GAAG;AACR,YAAMC,gBAAgB,GACrB,4BAAC,gBAAD,OACM,KAAKnB,KADX;AAAA,WAEM,KAAKG,KAAL,CAAWC;AAFjB,QADD;AAMA,aAAO,KAAKJ,KAAL,CAAWE,IAAX,GACNiB,gBADM,GAGN;AAAK,QAAA,GAAG,EAAG,KAAKZ;AAAhB,cAA6BY,gBAA7B,MAHD;AAKA;;AA/D6C,GAA/C;AAiEA,CAlED,EAkEG,oBAlEH,C","sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\ntype Props = {\n\tnode?: HTMLElement;\n\t[ key: string ]: any;\n};\n\ntype State = {\n\tfallbackStyles?: { [ key: string ]: any };\n\tgrabStylesCompleted: boolean;\n};\n\nexport default (\n\tmapNodeToProps: (\n\t\tnode: HTMLElement,\n\t\tprops: Props\n\t) => { [ key: string ]: any }\n) =>\n\tcreateHigherOrderComponent( ( WrappedComponent ) => {\n\t\treturn class extends Component< Props, State > {\n\t\t\tnodeRef?: HTMLElement;\n\n\t\t\tconstructor( props: Props ) {\n\t\t\t\tsuper( props );\n\t\t\t\tthis.nodeRef = this.props.node;\n\t\t\t\tthis.state = {\n\t\t\t\t\tfallbackStyles: undefined,\n\t\t\t\t\tgrabStylesCompleted: false,\n\t\t\t\t};\n\n\t\t\t\tthis.bindRef = this.bindRef.bind( this );\n\t\t\t}\n\n\t\t\tbindRef( node: HTMLDivElement ) {\n\t\t\t\tif ( ! node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.nodeRef = node;\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tcomponentDidUpdate() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tgrabFallbackStyles() {\n\t\t\t\tconst { grabStylesCompleted, fallbackStyles } = this.state;\n\t\t\t\tif ( this.nodeRef && ! grabStylesCompleted ) {\n\t\t\t\t\tconst newFallbackStyles = mapNodeToProps(\n\t\t\t\t\t\tthis.nodeRef,\n\t\t\t\t\t\tthis.props\n\t\t\t\t\t);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! fastDeepEqual( newFallbackStyles, fallbackStyles )\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.setState( {\n\t\t\t\t\t\t\tfallbackStyles: newFallbackStyles,\n\t\t\t\t\t\t\tgrabStylesCompleted:\n\t\t\t\t\t\t\t\tObject.values( newFallbackStyles ).every(\n\t\t\t\t\t\t\t\t\tBoolean\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\tconst wrappedComponent = (\n\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t{ ...this.props }\n\t\t\t\t\t\t{ ...this.state.fallbackStyles }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\treturn this.props.node ? (\n\t\t\t\t\twrappedComponent\n\t\t\t\t) : (\n\t\t\t\t\t<div ref={ this.bindRef }> { wrappedComponent } </div>\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}, 'withFallbackStyles' );\n"]}
@@ -100,7 +100,8 @@ function withFilters(hookName) {
100
100
  }
101
101
 
102
102
  render() {
103
- return (0, _element.createElement)(FilteredComponent, this.props);
103
+ return (0, _element.createElement)(FilteredComponent, { ...this.props
104
+ });
104
105
  }
105
106
 
106
107
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-filters/index.tsx"],"names":["ANIMATION_FRAME_PERIOD","withFilters","hookName","OriginalComponent","namespace","FilteredComponent","ensureFilteredComponent","undefined","FilteredComponentRenderer","Component","constructor","props","componentDidMount","instances","push","length","onHooksUpdated","componentWillUnmount","filter","instance","render","throttledForceUpdate","forEach","forceUpdate","updatedHookName"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;AAKA,MAAMA,sBAAsB,GAAG,EAA/B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACe,SAASC,WAAT,CAAsBC,QAAtB,EAAyC;AACvD,SAAO,yCAA8BC,iBAAF,IAAyB;AAC3D,UAAMC,SAAS,GAAG,uBAAuBF,QAAzC;AAEA;AACF;AACA;AACA;AACA;;AACE,QAAIG,iBAAJ;AAEA;AACF;AACA;AACA;;AACE,aAASC,uBAAT,GAAmC;AAClC,UAAKD,iBAAiB,KAAKE,SAA3B,EAAuC;AACtCF,QAAAA,iBAAiB,GAAG,yBACnBH,QADmB,EAEnBC,iBAFmB,CAApB;AAIA;AACD;;AAED,UAAMK,yBAAN,SAAwCC,kBAAxC,CAAkD;AAGjDC,MAAAA,WAAW,CAAEC,KAAF,EAAoC;AAC9C,cAAOA,KAAP;AAEAL,QAAAA,uBAAuB;AACvB;;AAEDM,MAAAA,iBAAiB,GAAG;AACnBJ,QAAAA,yBAAyB,CAACK,SAA1B,CAAoCC,IAApC,CAA0C,IAA1C,EADmB,CAGnB;AACA;;AACA,YAAKN,yBAAyB,CAACK,SAA1B,CAAoCE,MAApC,KAA+C,CAApD,EAAwD;AACvD,gCAAW,aAAX,EAA0BX,SAA1B,EAAqCY,cAArC;AACA,gCAAW,WAAX,EAAwBZ,SAAxB,EAAmCY,cAAnC;AACA;AACD;;AAEDC,MAAAA,oBAAoB,GAAG;AACtBT,QAAAA,yBAAyB,CAACK,SAA1B,GACCL,yBAAyB,CAACK,SAA1B,CAAoCK,MAApC,CACGC,QAAF,IAAgBA,QAAQ,KAAK,IAD9B,CADD,CADsB,CAMtB;AACA;;AACA,YAAKX,yBAAyB,CAACK,SAA1B,CAAoCE,MAApC,KAA+C,CAApD,EAAwD;AACvD,mCAAc,aAAd,EAA6BX,SAA7B;AACA,mCAAc,WAAd,EAA2BA,SAA3B;AACA;AACD;;AAEDgB,MAAAA,MAAM,GAAG;AACR,eAAO,4BAAC,iBAAD,EAAwB,KAAKT,KAA7B,CAAP;AACA;;AApCgD;;AAuClDH,IAAAA,yBAAyB,CAACK,SAA1B,GAAsC,EAAtC;AAEA;AACF;AACA;AACA;;AACE,UAAMQ,oBAAoB,GAAG,uBAAU,MAAM;AAC5C;AACA;AACAhB,MAAAA,iBAAiB,GAAG,yBACnBH,QADmB,EAEnBC,iBAFmB,CAApB,CAH4C,CAQ5C;;AACAK,MAAAA,yBAAyB,CAACK,SAA1B,CAAoCS,OAApC,CAA+CH,QAAF,IAAgB;AAC5DA,QAAAA,QAAQ,CAACI,WAAT;AACA,OAFD;AAGA,KAZ4B,EAY1BvB,sBAZ0B,CAA7B;AAcA;AACF;AACA;AACA;AACA;AACA;AACA;;AACE,aAASgB,cAAT,CAAyBQ,eAAzB,EAAmD;AAClD,UAAKA,eAAe,KAAKtB,QAAzB,EAAoC;AACnCmB,QAAAA,oBAAoB;AACpB;AACD;;AAED,WAAOb,yBAAP;AACA,GAhGM,EAgGJ,aAhGI,CAAP;AAiGA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { addAction, applyFilters, removeAction } from '@wordpress/hooks';\nimport { createHigherOrderComponent, debounce } from '@wordpress/compose';\n\nconst ANIMATION_FRAME_PERIOD = 16;\n\n/**\n * Creates a higher-order component which adds filtering capability to the\n * wrapped component. Filters get applied when the original component is about\n * to be mounted. When a filter is added or removed that matches the hook name,\n * the wrapped component re-renders.\n *\n * @param hookName Hook name exposed to be used by filters.\n *\n * @return Higher-order component factory.\n *\n * ```jsx\n * import { withFilters } from '@wordpress/components';\n * import { addFilter } from '@wordpress/hooks';\n *\n * const MyComponent = ( { title } ) => <h1>{ title }</h1>;\n *\n * const ComponentToAppend = () => <div>Appended component</div>;\n *\n * function withComponentAppended( FilteredComponent ) {\n * \treturn ( props ) => (\n * \t\t<>\n * \t\t\t<FilteredComponent { ...props } />\n * \t\t\t<ComponentToAppend />\n * \t\t</>\n * \t);\n * }\n *\n * addFilter(\n * \t'MyHookName',\n * \t'my-plugin/with-component-appended',\n * \twithComponentAppended\n * );\n *\n * const MyComponentWithFilters = withFilters( 'MyHookName' )( MyComponent );\n * ```\n */\nexport default function withFilters( hookName: string ) {\n\treturn createHigherOrderComponent( ( OriginalComponent ) => {\n\t\tconst namespace = 'core/with-filters/' + hookName;\n\n\t\t/**\n\t\t * The component definition with current filters applied. Each instance\n\t\t * reuse this shared reference as an optimization to avoid excessive\n\t\t * calls to `applyFilters` when many instances exist.\n\t\t */\n\t\tlet FilteredComponent: React.ComponentType;\n\n\t\t/**\n\t\t * Initializes the FilteredComponent variable once, if not already\n\t\t * assigned. Subsequent calls are effectively a noop.\n\t\t */\n\t\tfunction ensureFilteredComponent() {\n\t\t\tif ( FilteredComponent === undefined ) {\n\t\t\t\tFilteredComponent = applyFilters(\n\t\t\t\t\thookName,\n\t\t\t\t\tOriginalComponent\n\t\t\t\t) as React.ComponentType;\n\t\t\t}\n\t\t}\n\n\t\tclass FilteredComponentRenderer extends Component {\n\t\t\tstatic instances: FilteredComponentRenderer[];\n\n\t\t\tconstructor( props: { [ key: string ]: any } ) {\n\t\t\t\tsuper( props );\n\n\t\t\t\tensureFilteredComponent();\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tFilteredComponentRenderer.instances.push( this );\n\n\t\t\t\t// If there were previously no mounted instances for components\n\t\t\t\t// filtered on this hook, add the hook handler.\n\t\t\t\tif ( FilteredComponentRenderer.instances.length === 1 ) {\n\t\t\t\t\taddAction( 'hookRemoved', namespace, onHooksUpdated );\n\t\t\t\t\taddAction( 'hookAdded', namespace, onHooksUpdated );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcomponentWillUnmount() {\n\t\t\t\tFilteredComponentRenderer.instances =\n\t\t\t\t\tFilteredComponentRenderer.instances.filter(\n\t\t\t\t\t\t( instance ) => instance !== this\n\t\t\t\t\t);\n\n\t\t\t\t// If this was the last of the mounted components filtered on\n\t\t\t\t// this hook, remove the hook handler.\n\t\t\t\tif ( FilteredComponentRenderer.instances.length === 0 ) {\n\t\t\t\t\tremoveAction( 'hookRemoved', namespace );\n\t\t\t\t\tremoveAction( 'hookAdded', namespace );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\treturn <FilteredComponent { ...this.props } />;\n\t\t\t}\n\t\t}\n\n\t\tFilteredComponentRenderer.instances = [];\n\n\t\t/**\n\t\t * Updates the FilteredComponent definition, forcing a render for each\n\t\t * mounted instance. This occurs a maximum of once per animation frame.\n\t\t */\n\t\tconst throttledForceUpdate = debounce( () => {\n\t\t\t// Recreate the filtered component, only after delay so that it's\n\t\t\t// computed once, even if many filters added.\n\t\t\tFilteredComponent = applyFilters(\n\t\t\t\thookName,\n\t\t\t\tOriginalComponent\n\t\t\t) as React.ComponentType;\n\n\t\t\t// Force each instance to render.\n\t\t\tFilteredComponentRenderer.instances.forEach( ( instance ) => {\n\t\t\t\tinstance.forceUpdate();\n\t\t\t} );\n\t\t}, ANIMATION_FRAME_PERIOD );\n\n\t\t/**\n\t\t * When a filter is added or removed for the matching hook name, each\n\t\t * mounted instance should re-render with the new filters having been\n\t\t * applied to the original component.\n\t\t *\n\t\t * @param updatedHookName Name of the hook that was updated.\n\t\t */\n\t\tfunction onHooksUpdated( updatedHookName: string ) {\n\t\t\tif ( updatedHookName === hookName ) {\n\t\t\t\tthrottledForceUpdate();\n\t\t\t}\n\t\t}\n\n\t\treturn FilteredComponentRenderer;\n\t}, 'withFilters' );\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/higher-order/with-filters/index.tsx"],"names":["ANIMATION_FRAME_PERIOD","withFilters","hookName","OriginalComponent","namespace","FilteredComponent","ensureFilteredComponent","undefined","FilteredComponentRenderer","Component","constructor","props","componentDidMount","instances","push","length","onHooksUpdated","componentWillUnmount","filter","instance","render","throttledForceUpdate","forEach","forceUpdate","updatedHookName"],"mappings":";;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;AAKA,MAAMA,sBAAsB,GAAG,EAA/B;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACe,SAASC,WAAT,CAAsBC,QAAtB,EAAyC;AACvD,SAAO,yCAA8BC,iBAAF,IAAyB;AAC3D,UAAMC,SAAS,GAAG,uBAAuBF,QAAzC;AAEA;AACF;AACA;AACA;AACA;;AACE,QAAIG,iBAAJ;AAEA;AACF;AACA;AACA;;AACE,aAASC,uBAAT,GAAmC;AAClC,UAAKD,iBAAiB,KAAKE,SAA3B,EAAuC;AACtCF,QAAAA,iBAAiB,GAAG,yBACnBH,QADmB,EAEnBC,iBAFmB,CAApB;AAIA;AACD;;AAED,UAAMK,yBAAN,SAAwCC,kBAAxC,CAAkD;AAGjDC,MAAAA,WAAW,CAAEC,KAAF,EAAoC;AAC9C,cAAOA,KAAP;AAEAL,QAAAA,uBAAuB;AACvB;;AAEDM,MAAAA,iBAAiB,GAAG;AACnBJ,QAAAA,yBAAyB,CAACK,SAA1B,CAAoCC,IAApC,CAA0C,IAA1C,EADmB,CAGnB;AACA;;AACA,YAAKN,yBAAyB,CAACK,SAA1B,CAAoCE,MAApC,KAA+C,CAApD,EAAwD;AACvD,gCAAW,aAAX,EAA0BX,SAA1B,EAAqCY,cAArC;AACA,gCAAW,WAAX,EAAwBZ,SAAxB,EAAmCY,cAAnC;AACA;AACD;;AAEDC,MAAAA,oBAAoB,GAAG;AACtBT,QAAAA,yBAAyB,CAACK,SAA1B,GACCL,yBAAyB,CAACK,SAA1B,CAAoCK,MAApC,CACGC,QAAF,IAAgBA,QAAQ,KAAK,IAD9B,CADD,CADsB,CAMtB;AACA;;AACA,YAAKX,yBAAyB,CAACK,SAA1B,CAAoCE,MAApC,KAA+C,CAApD,EAAwD;AACvD,mCAAc,aAAd,EAA6BX,SAA7B;AACA,mCAAc,WAAd,EAA2BA,SAA3B;AACA;AACD;;AAEDgB,MAAAA,MAAM,GAAG;AACR,eAAO,4BAAC,iBAAD,OAAwB,KAAKT;AAA7B,UAAP;AACA;;AApCgD;;AAuClDH,IAAAA,yBAAyB,CAACK,SAA1B,GAAsC,EAAtC;AAEA;AACF;AACA;AACA;;AACE,UAAMQ,oBAAoB,GAAG,uBAAU,MAAM;AAC5C;AACA;AACAhB,MAAAA,iBAAiB,GAAG,yBACnBH,QADmB,EAEnBC,iBAFmB,CAApB,CAH4C,CAQ5C;;AACAK,MAAAA,yBAAyB,CAACK,SAA1B,CAAoCS,OAApC,CAA+CH,QAAF,IAAgB;AAC5DA,QAAAA,QAAQ,CAACI,WAAT;AACA,OAFD;AAGA,KAZ4B,EAY1BvB,sBAZ0B,CAA7B;AAcA;AACF;AACA;AACA;AACA;AACA;AACA;;AACE,aAASgB,cAAT,CAAyBQ,eAAzB,EAAmD;AAClD,UAAKA,eAAe,KAAKtB,QAAzB,EAAoC;AACnCmB,QAAAA,oBAAoB;AACpB;AACD;;AAED,WAAOb,yBAAP;AACA,GAhGM,EAgGJ,aAhGI,CAAP;AAiGA","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { addAction, applyFilters, removeAction } from '@wordpress/hooks';\nimport { createHigherOrderComponent, debounce } from '@wordpress/compose';\n\nconst ANIMATION_FRAME_PERIOD = 16;\n\n/**\n * Creates a higher-order component which adds filtering capability to the\n * wrapped component. Filters get applied when the original component is about\n * to be mounted. When a filter is added or removed that matches the hook name,\n * the wrapped component re-renders.\n *\n * @param hookName Hook name exposed to be used by filters.\n *\n * @return Higher-order component factory.\n *\n * ```jsx\n * import { withFilters } from '@wordpress/components';\n * import { addFilter } from '@wordpress/hooks';\n *\n * const MyComponent = ( { title } ) => <h1>{ title }</h1>;\n *\n * const ComponentToAppend = () => <div>Appended component</div>;\n *\n * function withComponentAppended( FilteredComponent ) {\n * \treturn ( props ) => (\n * \t\t<>\n * \t\t\t<FilteredComponent { ...props } />\n * \t\t\t<ComponentToAppend />\n * \t\t</>\n * \t);\n * }\n *\n * addFilter(\n * \t'MyHookName',\n * \t'my-plugin/with-component-appended',\n * \twithComponentAppended\n * );\n *\n * const MyComponentWithFilters = withFilters( 'MyHookName' )( MyComponent );\n * ```\n */\nexport default function withFilters( hookName: string ) {\n\treturn createHigherOrderComponent( ( OriginalComponent ) => {\n\t\tconst namespace = 'core/with-filters/' + hookName;\n\n\t\t/**\n\t\t * The component definition with current filters applied. Each instance\n\t\t * reuse this shared reference as an optimization to avoid excessive\n\t\t * calls to `applyFilters` when many instances exist.\n\t\t */\n\t\tlet FilteredComponent: React.ComponentType;\n\n\t\t/**\n\t\t * Initializes the FilteredComponent variable once, if not already\n\t\t * assigned. Subsequent calls are effectively a noop.\n\t\t */\n\t\tfunction ensureFilteredComponent() {\n\t\t\tif ( FilteredComponent === undefined ) {\n\t\t\t\tFilteredComponent = applyFilters(\n\t\t\t\t\thookName,\n\t\t\t\t\tOriginalComponent\n\t\t\t\t) as React.ComponentType;\n\t\t\t}\n\t\t}\n\n\t\tclass FilteredComponentRenderer extends Component {\n\t\t\tstatic instances: FilteredComponentRenderer[];\n\n\t\t\tconstructor( props: { [ key: string ]: any } ) {\n\t\t\t\tsuper( props );\n\n\t\t\t\tensureFilteredComponent();\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tFilteredComponentRenderer.instances.push( this );\n\n\t\t\t\t// If there were previously no mounted instances for components\n\t\t\t\t// filtered on this hook, add the hook handler.\n\t\t\t\tif ( FilteredComponentRenderer.instances.length === 1 ) {\n\t\t\t\t\taddAction( 'hookRemoved', namespace, onHooksUpdated );\n\t\t\t\t\taddAction( 'hookAdded', namespace, onHooksUpdated );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcomponentWillUnmount() {\n\t\t\t\tFilteredComponentRenderer.instances =\n\t\t\t\t\tFilteredComponentRenderer.instances.filter(\n\t\t\t\t\t\t( instance ) => instance !== this\n\t\t\t\t\t);\n\n\t\t\t\t// If this was the last of the mounted components filtered on\n\t\t\t\t// this hook, remove the hook handler.\n\t\t\t\tif ( FilteredComponentRenderer.instances.length === 0 ) {\n\t\t\t\t\tremoveAction( 'hookRemoved', namespace );\n\t\t\t\t\tremoveAction( 'hookAdded', namespace );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\treturn <FilteredComponent { ...this.props } />;\n\t\t\t}\n\t\t}\n\n\t\tFilteredComponentRenderer.instances = [];\n\n\t\t/**\n\t\t * Updates the FilteredComponent definition, forcing a render for each\n\t\t * mounted instance. This occurs a maximum of once per animation frame.\n\t\t */\n\t\tconst throttledForceUpdate = debounce( () => {\n\t\t\t// Recreate the filtered component, only after delay so that it's\n\t\t\t// computed once, even if many filters added.\n\t\t\tFilteredComponent = applyFilters(\n\t\t\t\thookName,\n\t\t\t\tOriginalComponent\n\t\t\t) as React.ComponentType;\n\n\t\t\t// Force each instance to render.\n\t\t\tFilteredComponentRenderer.instances.forEach( ( instance ) => {\n\t\t\t\tinstance.forceUpdate();\n\t\t\t} );\n\t\t}, ANIMATION_FRAME_PERIOD );\n\n\t\t/**\n\t\t * When a filter is added or removed for the matching hook name, each\n\t\t * mounted instance should re-render with the new filters having been\n\t\t * applied to the original component.\n\t\t *\n\t\t * @param updatedHookName Name of the hook that was updated.\n\t\t */\n\t\tfunction onHooksUpdated( updatedHookName: string ) {\n\t\t\tif ( updatedHookName === hookName ) {\n\t\t\t\tthrottledForceUpdate();\n\t\t\t}\n\t\t}\n\n\t\treturn FilteredComponentRenderer;\n\t}, 'withFilters' );\n}\n"]}
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -9,8 +7,6 @@ exports.default = void 0;
9
7
 
10
8
  var _element = require("@wordpress/element");
11
9
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _compose = require("@wordpress/compose");
15
11
 
16
12
  //@ts-nocheck
@@ -21,9 +17,11 @@ var _compose = require("@wordpress/compose");
21
17
  var _default = (0, _compose.createHigherOrderComponent)(WrappedComponent => props => {
22
18
  const [handleFocusOutside, setHandleFocusOutside] = (0, _element.useState)();
23
19
  const bindFocusOutsideHandler = (0, _element.useCallback)(node => setHandleFocusOutside(() => node?.handleFocusOutside ? node.handleFocusOutside.bind(node) : undefined), []);
24
- return (0, _element.createElement)("div", (0, _compose.__experimentalUseFocusOutside)(handleFocusOutside), (0, _element.createElement)(WrappedComponent, (0, _extends2.default)({
25
- ref: bindFocusOutsideHandler
26
- }, props)));
20
+ return (0, _element.createElement)("div", { ...(0, _compose.__experimentalUseFocusOutside)(handleFocusOutside)
21
+ }, (0, _element.createElement)(WrappedComponent, {
22
+ ref: bindFocusOutsideHandler,
23
+ ...props
24
+ }));
27
25
  }, 'withFocusOutside');
28
26
 
29
27
  exports.default = _default;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-focus-outside/index.js"],"names":["WrappedComponent","props","handleFocusOutside","setHandleFocusOutside","bindFocusOutsideHandler","node","bind","undefined"],"mappings":";;;;;;;;;AAKA;;;;AACA;;AANA;;AAEA;AACA;AACA;eAOe,yCACZA,gBAAF,IAA0BC,KAAF,IAAa;AACpC,QAAM,CAAEC,kBAAF,EAAsBC,qBAAtB,IAAgD,wBAAtD;AACA,QAAMC,uBAAuB,GAAG,0BAC7BC,IAAF,IACCF,qBAAqB,CAAE,MACtBE,IAAI,EAAEH,kBAAN,GACGG,IAAI,CAACH,kBAAL,CAAwBI,IAAxB,CAA8BD,IAA9B,CADH,GAEGE,SAHiB,CAFS,EAO/B,EAP+B,CAAhC;AAUA,SACC,mCAAU,4CAAiBL,kBAAjB,CAAV,EACC,4BAAC,gBAAD;AACC,IAAA,GAAG,EAAGE;AADP,KAEMH,KAFN,EADD,CADD;AAQA,CArBa,EAsBd,kBAtBc,C","sourcesContent":["//@ts-nocheck\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useState } from '@wordpress/element';\nimport {\n\tcreateHigherOrderComponent,\n\t__experimentalUseFocusOutside as useFocusOutside,\n} from '@wordpress/compose';\n\nexport default createHigherOrderComponent(\n\t( WrappedComponent ) => ( props ) => {\n\t\tconst [ handleFocusOutside, setHandleFocusOutside ] = useState();\n\t\tconst bindFocusOutsideHandler = useCallback(\n\t\t\t( node ) =>\n\t\t\t\tsetHandleFocusOutside( () =>\n\t\t\t\t\tnode?.handleFocusOutside\n\t\t\t\t\t\t? node.handleFocusOutside.bind( node )\n\t\t\t\t\t\t: undefined\n\t\t\t\t),\n\t\t\t[]\n\t\t);\n\n\t\treturn (\n\t\t\t<div { ...useFocusOutside( handleFocusOutside ) }>\n\t\t\t\t<WrappedComponent\n\t\t\t\t\tref={ bindFocusOutsideHandler }\n\t\t\t\t\t{ ...props }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t},\n\t'withFocusOutside'\n);\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/higher-order/with-focus-outside/index.js"],"names":["WrappedComponent","props","handleFocusOutside","setHandleFocusOutside","bindFocusOutsideHandler","node","bind","undefined"],"mappings":";;;;;;;AAKA;;AACA;;AANA;;AAEA;AACA;AACA;eAOe,yCACZA,gBAAF,IAA0BC,KAAF,IAAa;AACpC,QAAM,CAAEC,kBAAF,EAAsBC,qBAAtB,IAAgD,wBAAtD;AACA,QAAMC,uBAAuB,GAAG,0BAC7BC,IAAF,IACCF,qBAAqB,CAAE,MACtBE,IAAI,EAAEH,kBAAN,GACGG,IAAI,CAACH,kBAAL,CAAwBI,IAAxB,CAA8BD,IAA9B,CADH,GAEGE,SAHiB,CAFS,EAO/B,EAP+B,CAAhC;AAUA,SACC,wCAAU,4CAAiBL,kBAAjB;AAAV,KACC,4BAAC,gBAAD;AACC,IAAA,GAAG,EAAGE,uBADP;AAAA,OAEMH;AAFN,IADD,CADD;AAQA,CArBa,EAsBd,kBAtBc,C","sourcesContent":["//@ts-nocheck\n\n/**\n * WordPress dependencies\n */\nimport { useCallback, useState } from '@wordpress/element';\nimport {\n\tcreateHigherOrderComponent,\n\t__experimentalUseFocusOutside as useFocusOutside,\n} from '@wordpress/compose';\n\nexport default createHigherOrderComponent(\n\t( WrappedComponent ) => ( props ) => {\n\t\tconst [ handleFocusOutside, setHandleFocusOutside ] = useState();\n\t\tconst bindFocusOutsideHandler = useCallback(\n\t\t\t( node ) =>\n\t\t\t\tsetHandleFocusOutside( () =>\n\t\t\t\t\tnode?.handleFocusOutside\n\t\t\t\t\t\t? node.handleFocusOutside.bind( node )\n\t\t\t\t\t\t: undefined\n\t\t\t\t),\n\t\t\t[]\n\t\t);\n\n\t\treturn (\n\t\t\t<div { ...useFocusOutside( handleFocusOutside ) }>\n\t\t\t\t<WrappedComponent\n\t\t\t\t\tref={ bindFocusOutsideHandler }\n\t\t\t\t\t{ ...props }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t},\n\t'withFocusOutside'\n);\n"]}
@@ -1,7 +1,5 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
@@ -9,8 +7,6 @@ exports.default = void 0;
9
7
 
10
8
  var _element = require("@wordpress/element");
11
9
 
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
10
  var _reactNative = require("react-native");
15
11
 
16
12
  var _compose = require("@wordpress/compose");
@@ -25,9 +21,11 @@ var _compose = require("@wordpress/compose");
25
21
  var _default = (0, _compose.createHigherOrderComponent)(WrappedComponent => props => {
26
22
  const [handleFocusOutside, setHandleFocusOutside] = (0, _element.useState)();
27
23
  const bindFocusOutsideHandler = (0, _element.useCallback)(node => setHandleFocusOutside(() => node?.handleFocusOutside ? node.handleFocusOutside.bind(node) : undefined), []);
28
- return (0, _element.createElement)(_reactNative.View, (0, _compose.__experimentalUseFocusOutside)(handleFocusOutside), (0, _element.createElement)(WrappedComponent, (0, _extends2.default)({
29
- ref: bindFocusOutsideHandler
30
- }, props)));
24
+ return (0, _element.createElement)(_reactNative.View, { ...(0, _compose.__experimentalUseFocusOutside)(handleFocusOutside)
25
+ }, (0, _element.createElement)(WrappedComponent, {
26
+ ref: bindFocusOutsideHandler,
27
+ ...props
28
+ }));
31
29
  }, 'withFocusOutside');
32
30
 
33
31
  exports.default = _default;