@wordpress/components 25.1.0 → 25.1.2

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 (1049) hide show
  1. package/CHANGELOG.md +29 -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 +20 -7
  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 +13 -6
  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/font-size-picker/index.js +5 -3
  140. package/build/font-size-picker/index.js.map +1 -1
  141. package/build/font-size-picker/styles.js +19 -26
  142. package/build/font-size-picker/styles.js.map +1 -1
  143. package/build/footer-message-control/index.native.js +2 -1
  144. package/build/footer-message-control/index.native.js.map +1 -1
  145. package/build/form-file-upload/index.js +4 -5
  146. package/build/form-file-upload/index.js.map +1 -1
  147. package/build/form-toggle/index.js +4 -5
  148. package/build/form-toggle/index.js.map +1 -1
  149. package/build/form-token-field/index.js +4 -5
  150. package/build/form-token-field/index.js.map +1 -1
  151. package/build/form-token-field/token-input.js +4 -6
  152. package/build/form-token-field/token-input.js.map +1 -1
  153. package/build/gradient-picker/index.js +14 -12
  154. package/build/gradient-picker/index.js.map +1 -1
  155. package/build/grid/component.js +2 -4
  156. package/build/grid/component.js.map +1 -1
  157. package/build/guide/page.js +2 -1
  158. package/build/guide/page.js.map +1 -1
  159. package/build/h-stack/component.js +2 -6
  160. package/build/h-stack/component.js.map +1 -1
  161. package/build/h-stack/hook.js +4 -7
  162. package/build/h-stack/hook.js.map +1 -1
  163. package/build/heading/component.js +2 -6
  164. package/build/heading/component.js.map +1 -1
  165. package/build/higher-order/navigate-regions/index.js +3 -1
  166. package/build/higher-order/navigate-regions/index.js.map +1 -1
  167. package/build/higher-order/with-constrained-tabbing/index.js +2 -1
  168. package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
  169. package/build/higher-order/with-fallback-styles/index.js +3 -3
  170. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  171. package/build/higher-order/with-filters/index.js +2 -1
  172. package/build/higher-order/with-filters/index.js.map +1 -1
  173. package/build/higher-order/with-focus-outside/index.js +5 -7
  174. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  175. package/build/higher-order/with-focus-outside/index.native.js +5 -7
  176. package/build/higher-order/with-focus-outside/index.native.js.map +1 -1
  177. package/build/higher-order/with-focus-return/index.js +2 -1
  178. package/build/higher-order/with-focus-return/index.js.map +1 -1
  179. package/build/higher-order/with-notices/index.js +3 -4
  180. package/build/higher-order/with-notices/index.js.map +1 -1
  181. package/build/higher-order/with-spoken-messages/index.js +2 -6
  182. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  183. package/build/icon/index.js +6 -6
  184. package/build/icon/index.js.map +1 -1
  185. package/build/input-control/index.js +5 -5
  186. package/build/input-control/index.js.map +1 -1
  187. package/build/input-control/input-base.js +3 -4
  188. package/build/input-control/input-base.js.map +1 -1
  189. package/build/input-control/input-field.js +3 -6
  190. package/build/input-control/input-field.js.map +1 -1
  191. package/build/input-control/input-prefix-wrapper.js +4 -8
  192. package/build/input-control/input-prefix-wrapper.js.map +1 -1
  193. package/build/input-control/input-suffix-wrapper.js +4 -8
  194. package/build/input-control/input-suffix-wrapper.js.map +1 -1
  195. package/build/input-control/label.js +4 -7
  196. package/build/input-control/label.js.map +1 -1
  197. package/build/input-control/styles/input-control-styles.js +2 -4
  198. package/build/input-control/styles/input-control-styles.js.map +1 -1
  199. package/build/isolated-event-container/index.js +2 -4
  200. package/build/isolated-event-container/index.js.map +1 -1
  201. package/build/item-group/item/component.js +2 -6
  202. package/build/item-group/item/component.js.map +1 -1
  203. package/build/item-group/item-group/component.js +2 -6
  204. package/build/item-group/item-group/component.js.map +1 -1
  205. package/build/item-group/styles.js +10 -10
  206. package/build/item-group/styles.js.map +1 -1
  207. package/build/menu-item/index.js +4 -5
  208. package/build/menu-item/index.js.map +1 -1
  209. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -6
  210. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  211. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +2 -1
  212. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  213. package/build/mobile/bottom-sheet/cell.native.js +5 -6
  214. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  215. package/build/mobile/bottom-sheet/color-cell.native.js +2 -4
  216. package/build/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  217. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js +4 -5
  218. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  219. package/build/mobile/bottom-sheet/footer-message-cell.native.js +2 -4
  220. package/build/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  221. package/build/mobile/bottom-sheet/index.native.js +8 -8
  222. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  223. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +4 -7
  224. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  225. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -4
  226. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  227. package/build/mobile/bottom-sheet/picker-cell.native.js +4 -5
  228. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  229. package/build/mobile/bottom-sheet/radio-cell.native.js +2 -4
  230. package/build/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  231. package/build/mobile/bottom-sheet/range-cell.native.js +2 -4
  232. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  233. package/build/mobile/bottom-sheet/ripple.native.js +4 -6
  234. package/build/mobile/bottom-sheet/ripple.native.js.map +1 -1
  235. package/build/mobile/bottom-sheet/switch-cell.native.js +2 -4
  236. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  237. package/build/mobile/color-settings/index.native.js +5 -5
  238. package/build/mobile/color-settings/index.native.js.map +1 -1
  239. package/build/mobile/cycle-select-control/index.native.js +4 -5
  240. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  241. package/build/mobile/focal-point-settings-panel/index.native.js +5 -5
  242. package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  243. package/build/mobile/global-styles-context/index.native.js +2 -6
  244. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  245. package/build/mobile/gradient/index.native.js +4 -5
  246. package/build/mobile/gradient/index.native.js.map +1 -1
  247. package/build/mobile/image/image-editing-button.native.js +4 -5
  248. package/build/mobile/image/image-editing-button.native.js.map +1 -1
  249. package/build/mobile/image/index.native.js +15 -15
  250. package/build/mobile/image/index.native.js.map +1 -1
  251. package/build/mobile/keyboard-avoiding-view/index.ios.js +2 -4
  252. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  253. package/build/mobile/keyboard-aware-flat-list/index.android.js +4 -5
  254. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  255. package/build/mobile/keyboard-aware-flat-list/index.ios.js +2 -1
  256. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  257. package/build/mobile/link-picker/link-picker-results.native.js +4 -6
  258. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  259. package/build/mobile/link-settings/link-settings-navigation.native.js +4 -5
  260. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  261. package/build/mobile/link-settings/link-settings-screen.native.js +2 -4
  262. package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  263. package/build/mobile/picker/index.ios.js +4 -6
  264. package/build/mobile/picker/index.ios.js.map +1 -1
  265. package/build/mobile/segmented-control/index.native.js +4 -5
  266. package/build/mobile/segmented-control/index.native.js.map +1 -1
  267. package/build/modal/index.js +4 -6
  268. package/build/modal/index.js.map +1 -1
  269. package/build/navigable-container/container.js +6 -9
  270. package/build/navigable-container/container.js.map +1 -1
  271. package/build/navigable-container/menu.js +4 -5
  272. package/build/navigable-container/menu.js.map +1 -1
  273. package/build/navigable-container/tabbable.js +4 -5
  274. package/build/navigable-container/tabbable.js.map +1 -1
  275. package/build/navigation/item/base.js +4 -5
  276. package/build/navigation/item/base.js.map +1 -1
  277. package/build/navigation/item/index.js +3 -4
  278. package/build/navigation/item/index.js.map +1 -1
  279. package/build/navigator/navigator-back-button/component.js +4 -7
  280. package/build/navigator/navigator-back-button/component.js.map +1 -1
  281. package/build/navigator/navigator-button/component.js +4 -7
  282. package/build/navigator/navigator-button/component.js.map +1 -1
  283. package/build/navigator/navigator-provider/component.js +4 -5
  284. package/build/navigator/navigator-provider/component.js.map +1 -1
  285. package/build/navigator/navigator-screen/component.js +9 -10
  286. package/build/navigator/navigator-screen/component.js.map +1 -1
  287. package/build/navigator/navigator-to-parent-button/component.js +4 -7
  288. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  289. package/build/notice/list.js +2 -4
  290. package/build/notice/list.js.map +1 -1
  291. package/build/notice/list.native.js +2 -4
  292. package/build/notice/list.native.js.map +1 -1
  293. package/build/number-control/index.js +12 -10
  294. package/build/number-control/index.js.map +1 -1
  295. package/build/number-control/styles/number-control-styles.js +9 -15
  296. package/build/number-control/styles/number-control-styles.js.map +1 -1
  297. package/build/palette-edit/index.js +11 -12
  298. package/build/palette-edit/index.js.map +1 -1
  299. package/build/panel/body.js +8 -8
  300. package/build/panel/body.js.map +1 -1
  301. package/build/placeholder/index.js +2 -4
  302. package/build/placeholder/index.js.map +1 -1
  303. package/build/popover/index.js +11 -12
  304. package/build/popover/index.js.map +1 -1
  305. package/build/popover/utils.js +15 -1
  306. package/build/popover/utils.js.map +1 -1
  307. package/build/query-controls/category-select.js +4 -6
  308. package/build/query-controls/category-select.js.map +1 -1
  309. package/build/radio-control/index.js +4 -5
  310. package/build/radio-control/index.js.map +1 -1
  311. package/build/radio-control/index.native.js +4 -5
  312. package/build/radio-control/index.native.js.map +1 -1
  313. package/build/radio-group/index.js +5 -5
  314. package/build/radio-group/index.js.map +1 -1
  315. package/build/radio-group/radio/index.js +5 -5
  316. package/build/radio-group/radio/index.js.map +1 -1
  317. package/build/range-control/index.js +2 -4
  318. package/build/range-control/index.js.map +1 -1
  319. package/build/range-control/index.native.js +4 -5
  320. package/build/range-control/index.native.js.map +1 -1
  321. package/build/range-control/input-range.js +2 -6
  322. package/build/range-control/input-range.js.map +1 -1
  323. package/build/range-control/mark.js +2 -4
  324. package/build/range-control/mark.js.map +1 -1
  325. package/build/range-control/rail.js +6 -7
  326. package/build/range-control/rail.js.map +1 -1
  327. package/build/range-control/tooltip.js +2 -4
  328. package/build/range-control/tooltip.js.map +1 -1
  329. package/build/resizable-box/index.js +5 -5
  330. package/build/resizable-box/index.js.map +1 -1
  331. package/build/resizable-box/resize-tooltip/index.js +4 -5
  332. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  333. package/build/resizable-box/resize-tooltip/label.js +4 -7
  334. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  335. package/build/scrollable/component.js +2 -6
  336. package/build/scrollable/component.js.map +1 -1
  337. package/build/search-control/index.js +2 -4
  338. package/build/search-control/index.js.map +1 -1
  339. package/build/select-control/index.js +4 -5
  340. package/build/select-control/index.js.map +1 -1
  341. package/build/select-control/index.native.js +4 -5
  342. package/build/select-control/index.native.js.map +1 -1
  343. package/build/slot-fill/bubbles-virtually/slot.js +4 -5
  344. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  345. package/build/slot-fill/index.js +17 -13
  346. package/build/slot-fill/index.js.map +1 -1
  347. package/build/slot-fill/index.native.js +10 -9
  348. package/build/slot-fill/index.native.js.map +1 -1
  349. package/build/slot-fill/slot.js +2 -4
  350. package/build/slot-fill/slot.js.map +1 -1
  351. package/build/snackbar/list.js +2 -4
  352. package/build/snackbar/list.js.map +1 -1
  353. package/build/spacer/component.js +2 -6
  354. package/build/spacer/component.js.map +1 -1
  355. package/build/spinner/index.js +4 -6
  356. package/build/spinner/index.js.map +1 -1
  357. package/build/surface/component.js +2 -6
  358. package/build/surface/component.js.map +1 -1
  359. package/build/tab-panel/index.js +4 -5
  360. package/build/tab-panel/index.js.map +1 -1
  361. package/build/text/component.js +4 -6
  362. package/build/text/component.js.map +1 -1
  363. package/build/text-control/index.js +4 -5
  364. package/build/text-control/index.js.map +1 -1
  365. package/build/text-control/index.native.js +4 -5
  366. package/build/text-control/index.native.js.map +1 -1
  367. package/build/textarea-control/index.js +4 -5
  368. package/build/textarea-control/index.js.map +1 -1
  369. package/build/theme/index.js +4 -7
  370. package/build/theme/index.js.map +1 -1
  371. package/build/toggle-control/index.native.js +4 -5
  372. package/build/toggle-control/index.native.js.map +1 -1
  373. package/build/toggle-group-control/toggle-group-control/as-button-group.js +4 -6
  374. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  375. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +4 -6
  376. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  377. package/build/toggle-group-control/toggle-group-control/component.js +2 -4
  378. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  379. package/build/toggle-group-control/toggle-group-control-option/component.js +2 -6
  380. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  381. package/build/toggle-group-control/toggle-group-control-option-base/component.js +6 -7
  382. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  383. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +2 -4
  384. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  385. package/build/toolbar/toolbar/index.js +9 -13
  386. package/build/toolbar/toolbar/index.js.map +1 -1
  387. package/build/toolbar/toolbar/toolbar-container.js +9 -13
  388. package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
  389. package/build/toolbar/toolbar-button/index.js +13 -11
  390. package/build/toolbar/toolbar-button/index.js.map +1 -1
  391. package/build/toolbar/toolbar-context/index.js.map +1 -1
  392. package/build/toolbar/toolbar-dropdown-menu/index.js +8 -10
  393. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  394. package/build/toolbar/toolbar-group/index.js +11 -10
  395. package/build/toolbar/toolbar-group/index.js.map +1 -1
  396. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -6
  397. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  398. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js +4 -5
  399. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  400. package/build/toolbar/toolbar-group/toolbar-group-container.js +4 -7
  401. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  402. package/build/toolbar/toolbar-item/index.js +13 -11
  403. package/build/toolbar/toolbar-item/index.js.map +1 -1
  404. package/build/toolbar/toolbar-item/types.js +6 -0
  405. package/build/toolbar/toolbar-item/types.js.map +1 -0
  406. package/build/tools-panel/tools-panel/component.js +2 -4
  407. package/build/tools-panel/tools-panel/component.js.map +1 -1
  408. package/build/tools-panel/tools-panel-header/component.js +2 -4
  409. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  410. package/build/tools-panel/tools-panel-item/component.js +4 -8
  411. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  412. package/build/tooltip/index.js +4 -5
  413. package/build/tooltip/index.js.map +1 -1
  414. package/build/tooltip/index.native.js +2 -1
  415. package/build/tooltip/index.native.js.map +1 -1
  416. package/build/tree-grid/cell.js +2 -4
  417. package/build/tree-grid/cell.js.map +1 -1
  418. package/build/tree-grid/index.js +2 -4
  419. package/build/tree-grid/index.js.map +1 -1
  420. package/build/tree-grid/item.js +4 -5
  421. package/build/tree-grid/item.js.map +1 -1
  422. package/build/tree-grid/roving-tab-index-item.js +2 -1
  423. package/build/tree-grid/roving-tab-index-item.js.map +1 -1
  424. package/build/tree-grid/row.js +2 -6
  425. package/build/tree-grid/row.js.map +1 -1
  426. package/build/tree-select/index.js +4 -7
  427. package/build/tree-select/index.js.map +1 -1
  428. package/build/truncate/component.js +4 -6
  429. package/build/truncate/component.js.map +1 -1
  430. package/build/ui/control-group/component.js +8 -12
  431. package/build/ui/control-group/component.js.map +1 -1
  432. package/build/ui/control-label/component.js +4 -8
  433. package/build/ui/control-label/component.js.map +1 -1
  434. package/build/ui/form-group/form-group-content.js +4 -5
  435. package/build/ui/form-group/form-group-content.js.map +1 -1
  436. package/build/ui/form-group/form-group-label.js +2 -1
  437. package/build/ui/form-group/form-group-label.js.map +1 -1
  438. package/build/ui/form-group/form-group.js +8 -8
  439. package/build/ui/form-group/form-group.js.map +1 -1
  440. package/build/ui/shortcut/component.js +4 -7
  441. package/build/ui/shortcut/component.js.map +1 -1
  442. package/build/ui/spinner/component.js +2 -6
  443. package/build/ui/spinner/component.js.map +1 -1
  444. package/build/ui/tooltip/component.js +3 -4
  445. package/build/ui/tooltip/component.js.map +1 -1
  446. package/build/ui/tooltip/content.js +5 -8
  447. package/build/ui/tooltip/content.js.map +1 -1
  448. package/build/unit-control/index.js +31 -94
  449. package/build/unit-control/index.js.map +1 -1
  450. package/build/unit-control/index.native.js +7 -7
  451. package/build/unit-control/index.native.js.map +1 -1
  452. package/build/unit-control/unit-select-control.js +15 -7
  453. package/build/unit-control/unit-select-control.js.map +1 -1
  454. package/build/v-stack/component.js +2 -6
  455. package/build/v-stack/component.js.map +1 -1
  456. package/build/visually-hidden/component.js +4 -8
  457. package/build/visually-hidden/component.js.map +1 -1
  458. package/build/z-stack/component.js +7 -9
  459. package/build/z-stack/component.js.map +1 -1
  460. package/build/z-stack/styles.js +23 -42
  461. package/build/z-stack/styles.js.map +1 -1
  462. package/build-module/alignment-matrix-control/cell.js +4 -4
  463. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  464. package/build-module/alignment-matrix-control/icon.js +2 -3
  465. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  466. package/build-module/alignment-matrix-control/index.js +6 -6
  467. package/build-module/alignment-matrix-control/index.js.map +1 -1
  468. package/build-module/angle-picker-control/angle-circle.js +4 -4
  469. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  470. package/build-module/angle-picker-control/index.js +2 -3
  471. package/build-module/angle-picker-control/index.js.map +1 -1
  472. package/build-module/autocomplete/autocompleter-ui.js +27 -2
  473. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  474. package/build-module/autocomplete/index.js +1 -19
  475. package/build-module/autocomplete/index.js.map +1 -1
  476. package/build-module/base-control/index.js +2 -3
  477. package/build-module/base-control/index.js.map +1 -1
  478. package/build-module/border-box-control/border-box-control/component.js +4 -5
  479. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  480. package/build-module/border-box-control/border-box-control-linked-button/component.js +2 -3
  481. package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  482. package/build-module/border-box-control/border-box-control-split-controls/component.js +15 -12
  483. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  484. package/build-module/border-box-control/border-box-control-visualizer/component.js +2 -3
  485. package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  486. package/build-module/border-control/border-control/component.js +4 -5
  487. package/build-module/border-control/border-control/component.js.map +1 -1
  488. package/build-module/border-control/border-control-dropdown/component.js +4 -5
  489. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  490. package/build-module/border-control/border-control-style-picker/component.js +2 -3
  491. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  492. package/build-module/box-control/all-input-control.js +2 -3
  493. package/build-module/box-control/all-input-control.js.map +1 -1
  494. package/build-module/box-control/axial-input-controls.js +2 -3
  495. package/build-module/box-control/axial-input-controls.js.map +1 -1
  496. package/build-module/box-control/icon.js +4 -4
  497. package/build-module/box-control/icon.js.map +1 -1
  498. package/build-module/box-control/index.js +7 -5
  499. package/build-module/box-control/index.js.map +1 -1
  500. package/build-module/box-control/input-controls.js +2 -3
  501. package/build-module/box-control/input-controls.js.map +1 -1
  502. package/build-module/box-control/linked-button.js +2 -3
  503. package/build-module/box-control/linked-button.js.map +1 -1
  504. package/build-module/box-control/unit-control.js +6 -5
  505. package/build-module/box-control/unit-control.js.map +1 -1
  506. package/build-module/button/deprecated.js +2 -3
  507. package/build-module/button/deprecated.js.map +1 -1
  508. package/build-module/button/index.js +20 -6
  509. package/build-module/button/index.js.map +1 -1
  510. package/build-module/button-group/index.js +4 -4
  511. package/build-module/button-group/index.js.map +1 -1
  512. package/build-module/card/card/component.js +2 -3
  513. package/build-module/card/card/component.js.map +1 -1
  514. package/build-module/card/card-body/component.js +4 -5
  515. package/build-module/card/card-body/component.js.map +1 -1
  516. package/build-module/card/card-divider/component.js +2 -3
  517. package/build-module/card/card-divider/component.js.map +1 -1
  518. package/build-module/card/card-footer/component.js +2 -3
  519. package/build-module/card/card-footer/component.js.map +1 -1
  520. package/build-module/card/card-header/component.js +2 -3
  521. package/build-module/card/card-header/component.js.map +1 -1
  522. package/build-module/card/card-media/component.js +2 -3
  523. package/build-module/card/card-media/component.js.map +1 -1
  524. package/build-module/checkbox-control/index.js +4 -4
  525. package/build-module/checkbox-control/index.js.map +1 -1
  526. package/build-module/circular-option-picker/index.js +19 -15
  527. package/build-module/circular-option-picker/index.js.map +1 -1
  528. package/build-module/clipboard-button/index.js +9 -20
  529. package/build-module/clipboard-button/index.js.map +1 -1
  530. package/build-module/clipboard-button/types.js +2 -0
  531. package/build-module/clipboard-button/types.js.map +1 -0
  532. package/build-module/color-control/index.native.js +4 -4
  533. package/build-module/color-control/index.native.js.map +1 -1
  534. package/build-module/color-indicator/index.js +4 -4
  535. package/build-module/color-indicator/index.js.map +1 -1
  536. package/build-module/color-palette/index.js +11 -10
  537. package/build-module/color-palette/index.js.map +1 -1
  538. package/build-module/color-picker/color-input.js +6 -3
  539. package/build-module/color-picker/color-input.js.map +1 -1
  540. package/build-module/color-picker/component.js +4 -4
  541. package/build-module/color-picker/component.js.map +1 -1
  542. package/build-module/color-picker/legacy-adapter.js +2 -1
  543. package/build-module/color-picker/legacy-adapter.js.map +1 -1
  544. package/build-module/confirm-dialog/component.js +14 -6
  545. package/build-module/confirm-dialog/component.js.map +1 -1
  546. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +8 -7
  547. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  548. package/build-module/custom-select-control/index.js +34 -31
  549. package/build-module/custom-select-control/index.js.map +1 -1
  550. package/build-module/dashicon/index.js +4 -4
  551. package/build-module/dashicon/index.js.map +1 -1
  552. package/build-module/dashicon/index.native.js +4 -4
  553. package/build-module/dashicon/index.native.js.map +1 -1
  554. package/build-module/disabled/index.js +4 -4
  555. package/build-module/disabled/index.js.map +1 -1
  556. package/build-module/divider/component.js +4 -5
  557. package/build-module/divider/component.js.map +1 -1
  558. package/build-module/drop-zone/index.js +2 -3
  559. package/build-module/drop-zone/index.js.map +1 -1
  560. package/build-module/dropdown/dropdown-content-wrapper.js +2 -3
  561. package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -1
  562. package/build-module/dropdown/index.js +29 -24
  563. package/build-module/dropdown/index.js.map +1 -1
  564. package/build-module/dropdown-menu/index.js +95 -91
  565. package/build-module/dropdown-menu/index.js.map +1 -1
  566. package/build-module/dropdown-menu/index.native.js +2 -3
  567. package/build-module/dropdown-menu/index.native.js.map +1 -1
  568. package/build-module/dropdown-menu-v2/index.js +14 -11
  569. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  570. package/build-module/dropdown-menu-v2/styles.js +16 -16
  571. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  572. package/build-module/elevation/component.js +2 -3
  573. package/build-module/elevation/component.js.map +1 -1
  574. package/build-module/external-link/index.js +2 -3
  575. package/build-module/external-link/index.js.map +1 -1
  576. package/build-module/flex/flex/component.js +2 -3
  577. package/build-module/flex/flex/component.js.map +1 -1
  578. package/build-module/flex/flex-block/component.js +2 -3
  579. package/build-module/flex/flex-block/component.js.map +1 -1
  580. package/build-module/flex/flex-item/component.js +2 -3
  581. package/build-module/flex/flex-item/component.js.map +1 -1
  582. package/build-module/focal-point-picker/controls.js +4 -4
  583. package/build-module/focal-point-picker/controls.js.map +1 -1
  584. package/build-module/focal-point-picker/focal-point.js +2 -3
  585. package/build-module/focal-point-picker/focal-point.js.map +1 -1
  586. package/build-module/focal-point-picker/grid.js +2 -3
  587. package/build-module/focal-point-picker/grid.js.map +1 -1
  588. package/build-module/focal-point-picker/index.js +4 -5
  589. package/build-module/focal-point-picker/index.js.map +1 -1
  590. package/build-module/focal-point-picker/index.native.js +2 -3
  591. package/build-module/focal-point-picker/index.native.js.map +1 -1
  592. package/build-module/focal-point-picker/media.js +7 -7
  593. package/build-module/focal-point-picker/media.js.map +1 -1
  594. package/build-module/focal-point-picker/tooltip/index.native.js +2 -3
  595. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  596. package/build-module/focusable-iframe/index.js +4 -4
  597. package/build-module/focusable-iframe/index.js.map +1 -1
  598. package/build-module/font-size-picker/index.js +5 -4
  599. package/build-module/font-size-picker/index.js.map +1 -1
  600. package/build-module/font-size-picker/styles.js +17 -23
  601. package/build-module/font-size-picker/styles.js.map +1 -1
  602. package/build-module/footer-message-control/index.native.js +2 -1
  603. package/build-module/footer-message-control/index.native.js.map +1 -1
  604. package/build-module/form-file-upload/index.js +4 -4
  605. package/build-module/form-file-upload/index.js.map +1 -1
  606. package/build-module/form-toggle/index.js +4 -4
  607. package/build-module/form-toggle/index.js.map +1 -1
  608. package/build-module/form-token-field/index.js +4 -4
  609. package/build-module/form-token-field/index.js.map +1 -1
  610. package/build-module/form-token-field/token-input.js +4 -5
  611. package/build-module/form-token-field/token-input.js.map +1 -1
  612. package/build-module/gradient-picker/index.js +14 -11
  613. package/build-module/gradient-picker/index.js.map +1 -1
  614. package/build-module/grid/component.js +2 -3
  615. package/build-module/grid/component.js.map +1 -1
  616. package/build-module/guide/page.js +2 -1
  617. package/build-module/guide/page.js.map +1 -1
  618. package/build-module/h-stack/component.js +2 -3
  619. package/build-module/h-stack/component.js.map +1 -1
  620. package/build-module/h-stack/hook.js +4 -4
  621. package/build-module/h-stack/hook.js.map +1 -1
  622. package/build-module/heading/component.js +2 -3
  623. package/build-module/heading/component.js.map +1 -1
  624. package/build-module/higher-order/navigate-regions/index.js +3 -1
  625. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  626. package/build-module/higher-order/with-constrained-tabbing/index.js +2 -1
  627. package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
  628. package/build-module/higher-order/with-fallback-styles/index.js +3 -2
  629. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  630. package/build-module/higher-order/with-filters/index.js +2 -1
  631. package/build-module/higher-order/with-filters/index.js.map +1 -1
  632. package/build-module/higher-order/with-focus-outside/index.js +5 -4
  633. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  634. package/build-module/higher-order/with-focus-outside/index.native.js +5 -4
  635. package/build-module/higher-order/with-focus-outside/index.native.js.map +1 -1
  636. package/build-module/higher-order/with-focus-return/index.js +2 -1
  637. package/build-module/higher-order/with-focus-return/index.js.map +1 -1
  638. package/build-module/higher-order/with-notices/index.js +3 -3
  639. package/build-module/higher-order/with-notices/index.js.map +1 -1
  640. package/build-module/higher-order/with-spoken-messages/index.js +2 -3
  641. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  642. package/build-module/icon/index.js +6 -6
  643. package/build-module/icon/index.js.map +1 -1
  644. package/build-module/input-control/index.js +5 -4
  645. package/build-module/input-control/index.js.map +1 -1
  646. package/build-module/input-control/input-base.js +3 -3
  647. package/build-module/input-control/input-base.js.map +1 -1
  648. package/build-module/input-control/input-field.js +3 -3
  649. package/build-module/input-control/input-field.js.map +1 -1
  650. package/build-module/input-control/input-prefix-wrapper.js +4 -5
  651. package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
  652. package/build-module/input-control/input-suffix-wrapper.js +4 -5
  653. package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
  654. package/build-module/input-control/label.js +4 -4
  655. package/build-module/input-control/label.js.map +1 -1
  656. package/build-module/input-control/styles/input-control-styles.js +2 -3
  657. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  658. package/build-module/isolated-event-container/index.js +2 -3
  659. package/build-module/isolated-event-container/index.js.map +1 -1
  660. package/build-module/item-group/item/component.js +2 -3
  661. package/build-module/item-group/item/component.js.map +1 -1
  662. package/build-module/item-group/item-group/component.js +2 -3
  663. package/build-module/item-group/item-group/component.js.map +1 -1
  664. package/build-module/item-group/styles.js +10 -10
  665. package/build-module/item-group/styles.js.map +1 -1
  666. package/build-module/menu-item/index.js +4 -4
  667. package/build-module/menu-item/index.js.map +1 -1
  668. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -5
  669. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  670. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +2 -1
  671. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  672. package/build-module/mobile/bottom-sheet/cell.native.js +5 -5
  673. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  674. package/build-module/mobile/bottom-sheet/color-cell.native.js +2 -3
  675. package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  676. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js +4 -4
  677. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  678. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js +2 -3
  679. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  680. package/build-module/mobile/bottom-sheet/index.native.js +8 -7
  681. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  682. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +4 -4
  683. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  684. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -3
  685. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  686. package/build-module/mobile/bottom-sheet/picker-cell.native.js +4 -4
  687. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  688. package/build-module/mobile/bottom-sheet/radio-cell.native.js +2 -3
  689. package/build-module/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  690. package/build-module/mobile/bottom-sheet/range-cell.native.js +2 -3
  691. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  692. package/build-module/mobile/bottom-sheet/ripple.native.js +4 -5
  693. package/build-module/mobile/bottom-sheet/ripple.native.js.map +1 -1
  694. package/build-module/mobile/bottom-sheet/switch-cell.native.js +2 -3
  695. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  696. package/build-module/mobile/color-settings/index.native.js +5 -4
  697. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  698. package/build-module/mobile/cycle-select-control/index.native.js +4 -4
  699. package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
  700. package/build-module/mobile/focal-point-settings-panel/index.native.js +5 -4
  701. package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  702. package/build-module/mobile/global-styles-context/index.native.js +2 -3
  703. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  704. package/build-module/mobile/gradient/index.native.js +4 -4
  705. package/build-module/mobile/gradient/index.native.js.map +1 -1
  706. package/build-module/mobile/image/image-editing-button.native.js +4 -4
  707. package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
  708. package/build-module/mobile/image/index.native.js +15 -14
  709. package/build-module/mobile/image/index.native.js.map +1 -1
  710. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +2 -3
  711. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  712. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +4 -4
  713. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  714. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -1
  715. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  716. package/build-module/mobile/link-picker/link-picker-results.native.js +4 -5
  717. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  718. package/build-module/mobile/link-settings/link-settings-navigation.native.js +4 -4
  719. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  720. package/build-module/mobile/link-settings/link-settings-screen.native.js +2 -3
  721. package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  722. package/build-module/mobile/picker/index.ios.js +4 -5
  723. package/build-module/mobile/picker/index.ios.js.map +1 -1
  724. package/build-module/mobile/segmented-control/index.native.js +4 -4
  725. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  726. package/build-module/modal/index.js +4 -5
  727. package/build-module/modal/index.js.map +1 -1
  728. package/build-module/navigable-container/container.js +6 -6
  729. package/build-module/navigable-container/container.js.map +1 -1
  730. package/build-module/navigable-container/menu.js +4 -4
  731. package/build-module/navigable-container/menu.js.map +1 -1
  732. package/build-module/navigable-container/tabbable.js +4 -4
  733. package/build-module/navigable-container/tabbable.js.map +1 -1
  734. package/build-module/navigation/item/base.js +4 -4
  735. package/build-module/navigation/item/base.js.map +1 -1
  736. package/build-module/navigation/item/index.js +3 -3
  737. package/build-module/navigation/item/index.js.map +1 -1
  738. package/build-module/navigator/navigator-back-button/component.js +4 -4
  739. package/build-module/navigator/navigator-back-button/component.js.map +1 -1
  740. package/build-module/navigator/navigator-button/component.js +4 -4
  741. package/build-module/navigator/navigator-button/component.js.map +1 -1
  742. package/build-module/navigator/navigator-provider/component.js +4 -4
  743. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  744. package/build-module/navigator/navigator-screen/component.js +9 -7
  745. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  746. package/build-module/navigator/navigator-to-parent-button/component.js +4 -4
  747. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  748. package/build-module/notice/list.js +2 -3
  749. package/build-module/notice/list.js.map +1 -1
  750. package/build-module/notice/list.native.js +2 -3
  751. package/build-module/notice/list.native.js.map +1 -1
  752. package/build-module/number-control/index.js +12 -10
  753. package/build-module/number-control/index.js.map +1 -1
  754. package/build-module/number-control/styles/number-control-styles.js +7 -14
  755. package/build-module/number-control/styles/number-control-styles.js.map +1 -1
  756. package/build-module/palette-edit/index.js +11 -11
  757. package/build-module/palette-edit/index.js.map +1 -1
  758. package/build-module/panel/body.js +8 -7
  759. package/build-module/panel/body.js.map +1 -1
  760. package/build-module/placeholder/index.js +2 -3
  761. package/build-module/placeholder/index.js.map +1 -1
  762. package/build-module/popover/index.js +12 -12
  763. package/build-module/popover/index.js.map +1 -1
  764. package/build-module/popover/utils.js +11 -0
  765. package/build-module/popover/utils.js.map +1 -1
  766. package/build-module/query-controls/category-select.js +4 -5
  767. package/build-module/query-controls/category-select.js.map +1 -1
  768. package/build-module/radio-control/index.js +4 -4
  769. package/build-module/radio-control/index.js.map +1 -1
  770. package/build-module/radio-control/index.native.js +4 -4
  771. package/build-module/radio-control/index.native.js.map +1 -1
  772. package/build-module/radio-group/index.js +5 -4
  773. package/build-module/radio-group/index.js.map +1 -1
  774. package/build-module/radio-group/radio/index.js +5 -4
  775. package/build-module/radio-group/radio/index.js.map +1 -1
  776. package/build-module/range-control/index.js +2 -3
  777. package/build-module/range-control/index.js.map +1 -1
  778. package/build-module/range-control/index.native.js +4 -4
  779. package/build-module/range-control/index.native.js.map +1 -1
  780. package/build-module/range-control/input-range.js +2 -3
  781. package/build-module/range-control/input-range.js.map +1 -1
  782. package/build-module/range-control/mark.js +2 -3
  783. package/build-module/range-control/mark.js.map +1 -1
  784. package/build-module/range-control/rail.js +6 -6
  785. package/build-module/range-control/rail.js.map +1 -1
  786. package/build-module/range-control/tooltip.js +2 -3
  787. package/build-module/range-control/tooltip.js.map +1 -1
  788. package/build-module/resizable-box/index.js +5 -4
  789. package/build-module/resizable-box/index.js.map +1 -1
  790. package/build-module/resizable-box/resize-tooltip/index.js +4 -4
  791. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  792. package/build-module/resizable-box/resize-tooltip/label.js +4 -4
  793. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  794. package/build-module/scrollable/component.js +2 -3
  795. package/build-module/scrollable/component.js.map +1 -1
  796. package/build-module/search-control/index.js +2 -3
  797. package/build-module/search-control/index.js.map +1 -1
  798. package/build-module/select-control/index.js +4 -4
  799. package/build-module/select-control/index.js.map +1 -1
  800. package/build-module/select-control/index.native.js +4 -4
  801. package/build-module/select-control/index.native.js.map +1 -1
  802. package/build-module/slot-fill/bubbles-virtually/slot.js +4 -4
  803. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  804. package/build-module/slot-fill/index.js +17 -12
  805. package/build-module/slot-fill/index.js.map +1 -1
  806. package/build-module/slot-fill/index.native.js +10 -8
  807. package/build-module/slot-fill/index.native.js.map +1 -1
  808. package/build-module/slot-fill/slot.js +2 -3
  809. package/build-module/slot-fill/slot.js.map +1 -1
  810. package/build-module/snackbar/list.js +2 -3
  811. package/build-module/snackbar/list.js.map +1 -1
  812. package/build-module/spacer/component.js +2 -3
  813. package/build-module/spacer/component.js.map +1 -1
  814. package/build-module/spinner/index.js +4 -5
  815. package/build-module/spinner/index.js.map +1 -1
  816. package/build-module/surface/component.js +2 -3
  817. package/build-module/surface/component.js.map +1 -1
  818. package/build-module/tab-panel/index.js +4 -4
  819. package/build-module/tab-panel/index.js.map +1 -1
  820. package/build-module/text/component.js +4 -5
  821. package/build-module/text/component.js.map +1 -1
  822. package/build-module/text-control/index.js +4 -4
  823. package/build-module/text-control/index.js.map +1 -1
  824. package/build-module/text-control/index.native.js +4 -4
  825. package/build-module/text-control/index.native.js.map +1 -1
  826. package/build-module/textarea-control/index.js +4 -4
  827. package/build-module/textarea-control/index.js.map +1 -1
  828. package/build-module/theme/index.js +4 -4
  829. package/build-module/theme/index.js.map +1 -1
  830. package/build-module/toggle-control/index.native.js +4 -4
  831. package/build-module/toggle-control/index.native.js.map +1 -1
  832. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +4 -5
  833. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  834. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +4 -5
  835. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  836. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -3
  837. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  838. package/build-module/toggle-group-control/toggle-group-control-option/component.js +2 -3
  839. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  840. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +6 -6
  841. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  842. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +2 -3
  843. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  844. package/build-module/toolbar/toolbar/index.js +10 -13
  845. package/build-module/toolbar/toolbar/index.js.map +1 -1
  846. package/build-module/toolbar/toolbar/toolbar-container.js +9 -12
  847. package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
  848. package/build-module/toolbar/toolbar-button/index.js +13 -10
  849. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  850. package/build-module/toolbar/toolbar-context/index.js.map +1 -1
  851. package/build-module/toolbar/toolbar-dropdown-menu/index.js +8 -9
  852. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  853. package/build-module/toolbar/toolbar-group/index.js +11 -9
  854. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  855. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -5
  856. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  857. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js +4 -4
  858. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  859. package/build-module/toolbar/toolbar-group/toolbar-group-container.js +4 -4
  860. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  861. package/build-module/toolbar/toolbar-item/index.js +13 -10
  862. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  863. package/build-module/toolbar/toolbar-item/types.js +2 -0
  864. package/build-module/toolbar/toolbar-item/types.js.map +1 -0
  865. package/build-module/tools-panel/tools-panel/component.js +2 -3
  866. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  867. package/build-module/tools-panel/tools-panel-header/component.js +2 -3
  868. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  869. package/build-module/tools-panel/tools-panel-item/component.js +4 -5
  870. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  871. package/build-module/tooltip/index.js +4 -4
  872. package/build-module/tooltip/index.js.map +1 -1
  873. package/build-module/tooltip/index.native.js +2 -1
  874. package/build-module/tooltip/index.native.js.map +1 -1
  875. package/build-module/tree-grid/cell.js +2 -3
  876. package/build-module/tree-grid/cell.js.map +1 -1
  877. package/build-module/tree-grid/index.js +2 -3
  878. package/build-module/tree-grid/index.js.map +1 -1
  879. package/build-module/tree-grid/item.js +4 -4
  880. package/build-module/tree-grid/item.js.map +1 -1
  881. package/build-module/tree-grid/roving-tab-index-item.js +2 -1
  882. package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
  883. package/build-module/tree-grid/row.js +2 -3
  884. package/build-module/tree-grid/row.js.map +1 -1
  885. package/build-module/tree-select/index.js +4 -4
  886. package/build-module/tree-select/index.js.map +1 -1
  887. package/build-module/truncate/component.js +4 -5
  888. package/build-module/truncate/component.js.map +1 -1
  889. package/build-module/ui/control-group/component.js +8 -9
  890. package/build-module/ui/control-group/component.js.map +1 -1
  891. package/build-module/ui/control-label/component.js +4 -5
  892. package/build-module/ui/control-label/component.js.map +1 -1
  893. package/build-module/ui/form-group/form-group-content.js +4 -4
  894. package/build-module/ui/form-group/form-group-content.js.map +1 -1
  895. package/build-module/ui/form-group/form-group-label.js +2 -1
  896. package/build-module/ui/form-group/form-group-label.js.map +1 -1
  897. package/build-module/ui/form-group/form-group.js +8 -7
  898. package/build-module/ui/form-group/form-group.js.map +1 -1
  899. package/build-module/ui/shortcut/component.js +4 -4
  900. package/build-module/ui/shortcut/component.js.map +1 -1
  901. package/build-module/ui/spinner/component.js +2 -3
  902. package/build-module/ui/spinner/component.js.map +1 -1
  903. package/build-module/ui/tooltip/component.js +3 -3
  904. package/build-module/ui/tooltip/component.js.map +1 -1
  905. package/build-module/ui/tooltip/content.js +5 -5
  906. package/build-module/ui/tooltip/content.js.map +1 -1
  907. package/build-module/unit-control/index.js +31 -88
  908. package/build-module/unit-control/index.js.map +1 -1
  909. package/build-module/unit-control/index.native.js +7 -6
  910. package/build-module/unit-control/index.native.js.map +1 -1
  911. package/build-module/unit-control/unit-select-control.js +19 -6
  912. package/build-module/unit-control/unit-select-control.js.map +1 -1
  913. package/build-module/v-stack/component.js +2 -3
  914. package/build-module/v-stack/component.js.map +1 -1
  915. package/build-module/visually-hidden/component.js +4 -5
  916. package/build-module/visually-hidden/component.js.map +1 -1
  917. package/build-module/z-stack/component.js +7 -6
  918. package/build-module/z-stack/component.js.map +1 -1
  919. package/build-module/z-stack/styles.js +22 -44
  920. package/build-module/z-stack/styles.js.map +1 -1
  921. package/build-style/style-rtl.css +16 -21
  922. package/build-style/style.css +16 -21
  923. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  924. package/build-types/autocomplete/index.d.ts.map +1 -1
  925. package/build-types/button/deprecated.d.ts +6 -6
  926. package/build-types/button/index.d.ts.map +1 -1
  927. package/build-types/button/stories/e2e/index.d.ts +1 -0
  928. package/build-types/button/stories/e2e/index.d.ts.map +1 -1
  929. package/build-types/button/types.d.ts +16 -9
  930. package/build-types/button/types.d.ts.map +1 -1
  931. package/build-types/circular-option-picker/types.d.ts +2 -2
  932. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  933. package/build-types/clipboard-button/index.d.ts +4 -15
  934. package/build-types/clipboard-button/index.d.ts.map +1 -1
  935. package/build-types/clipboard-button/types.d.ts +11 -0
  936. package/build-types/clipboard-button/types.d.ts.map +1 -0
  937. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  938. package/build-types/dropdown/index.d.ts +1 -1
  939. package/build-types/dropdown/index.d.ts.map +1 -1
  940. package/build-types/dropdown/types.d.ts +7 -0
  941. package/build-types/dropdown/types.d.ts.map +1 -1
  942. package/build-types/dropdown-menu/index.d.ts +1 -1
  943. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  944. package/build-types/dropdown-menu/stories/index.d.ts +4 -3
  945. package/build-types/dropdown-menu/stories/index.d.ts.map +1 -1
  946. package/build-types/dropdown-menu/types.d.ts +7 -0
  947. package/build-types/dropdown-menu/types.d.ts.map +1 -1
  948. package/build-types/dropdown-menu-v2/styles.d.ts +4 -4
  949. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  950. package/build-types/dropdown-menu-v2/types.d.ts +2 -2
  951. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  952. package/build-types/font-size-picker/index.d.ts.map +1 -1
  953. package/build-types/font-size-picker/styles.d.ts +0 -6
  954. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  955. package/build-types/item-group/styles.d.ts.map +1 -1
  956. package/build-types/navigator/navigator-back-button/component.d.ts +1 -1
  957. package/build-types/navigator/navigator-back-button/hook.d.ts +1 -1
  958. package/build-types/navigator/navigator-button/component.d.ts +1 -1
  959. package/build-types/navigator/navigator-button/hook.d.ts +1 -1
  960. package/build-types/navigator/navigator-to-parent-button/component.d.ts +1 -1
  961. package/build-types/number-control/index.d.ts.map +1 -1
  962. package/build-types/number-control/styles/number-control-styles.d.ts +5 -3
  963. package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
  964. package/build-types/popover/index.d.ts.map +1 -1
  965. package/build-types/popover/stories/index.d.ts +0 -1
  966. package/build-types/popover/stories/index.d.ts.map +1 -1
  967. package/build-types/popover/utils.d.ts +10 -0
  968. package/build-types/popover/utils.d.ts.map +1 -1
  969. package/build-types/select-control/index.d.ts.map +1 -1
  970. package/build-types/select-control/types.d.ts +6 -0
  971. package/build-types/select-control/types.d.ts.map +1 -1
  972. package/build-types/toolbar/stories/index.d.ts.map +1 -1
  973. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  974. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  975. package/build-types/toolbar/toolbar-button/index.d.ts +6 -6
  976. package/build-types/toolbar/toolbar-context/index.d.ts +2 -2
  977. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
  978. package/build-types/toolbar/toolbar-item/index.d.ts +4 -6
  979. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  980. package/build-types/toolbar/toolbar-item/types.d.ts +17 -0
  981. package/build-types/toolbar/toolbar-item/types.d.ts.map +1 -0
  982. package/build-types/unit-control/index.d.ts +3 -6
  983. package/build-types/unit-control/index.d.ts.map +1 -1
  984. package/build-types/unit-control/stories/index.d.ts.map +1 -1
  985. package/build-types/unit-control/unit-select-control.d.ts +7 -6
  986. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  987. package/build-types/z-stack/component.d.ts.map +1 -1
  988. package/build-types/z-stack/stories/index.d.ts.map +1 -1
  989. package/build-types/z-stack/styles.d.ts +5 -4
  990. package/build-types/z-stack/styles.d.ts.map +1 -1
  991. package/package.json +21 -20
  992. package/src/autocomplete/autocompleter-ui.tsx +44 -2
  993. package/src/autocomplete/index.tsx +2 -32
  994. package/src/box-control/test/index.tsx +28 -60
  995. package/src/button/README.md +15 -0
  996. package/src/button/index.tsx +11 -4
  997. package/src/button/stories/e2e/index.tsx +22 -0
  998. package/src/button/style.scss +18 -25
  999. package/src/button/test/index.tsx +13 -0
  1000. package/src/button/types.ts +17 -9
  1001. package/src/circular-option-picker/types.ts +2 -5
  1002. package/src/clipboard-button/{index.js → index.tsx} +11 -17
  1003. package/src/clipboard-button/types.ts +11 -0
  1004. package/src/confirm-dialog/component.tsx +12 -2
  1005. package/src/confirm-dialog/stories/index.js +8 -15
  1006. package/src/confirm-dialog/test/index.js +42 -0
  1007. package/src/dropdown/index.tsx +20 -10
  1008. package/src/dropdown/types.ts +8 -0
  1009. package/src/dropdown-menu/index.tsx +101 -85
  1010. package/src/dropdown-menu/stories/index.tsx +1 -1
  1011. package/src/dropdown-menu/types.ts +8 -0
  1012. package/src/dropdown-menu-v2/index.tsx +2 -2
  1013. package/src/dropdown-menu-v2/styles.ts +7 -5
  1014. package/src/dropdown-menu-v2/types.ts +2 -2
  1015. package/src/font-size-picker/index.tsx +9 -5
  1016. package/src/font-size-picker/styles.ts +0 -10
  1017. package/src/item-group/styles.ts +13 -5
  1018. package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +16 -29
  1019. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  1020. package/src/mobile/html-text-input/test/__snapshots__/index.native.js.snap +46 -0
  1021. package/src/mobile/html-text-input/test/index.native.js +2 -2
  1022. package/src/mobile/image/index.native.js +1 -1
  1023. package/src/mobile/link-settings/test/link-settings-navigation.native.js +5 -16
  1024. package/src/modal/style.scss +2 -2
  1025. package/src/number-control/index.tsx +6 -3
  1026. package/src/number-control/styles/number-control-styles.ts +8 -16
  1027. package/src/popover/index.tsx +3 -2
  1028. package/src/popover/stories/index.tsx +0 -13
  1029. package/src/popover/test/index.tsx +22 -1
  1030. package/src/popover/utils.ts +12 -0
  1031. package/src/search-control/README.md +7 -1
  1032. package/src/select-control/index.tsx +1 -0
  1033. package/src/select-control/types.ts +6 -0
  1034. package/src/toolbar/stories/index.tsx +0 -3
  1035. package/src/toolbar/toolbar/index.tsx +3 -6
  1036. package/src/toolbar/toolbar/toolbar-container.tsx +5 -9
  1037. package/src/toolbar/toolbar-context/index.ts +2 -4
  1038. package/src/toolbar/toolbar-dropdown-menu/index.js +0 -1
  1039. package/src/toolbar/toolbar-item/index.tsx +13 -15
  1040. package/src/toolbar/toolbar-item/types.ts +27 -0
  1041. package/src/tooltip/test/index.native.js +1 -3
  1042. package/src/unit-control/index.tsx +29 -95
  1043. package/src/unit-control/stories/index.tsx +0 -4
  1044. package/src/unit-control/test/index.tsx +151 -223
  1045. package/src/unit-control/unit-select-control.tsx +20 -10
  1046. package/src/z-stack/component.tsx +4 -2
  1047. package/src/z-stack/stories/index.tsx +6 -13
  1048. package/src/z-stack/styles.ts +23 -24
  1049. package/tsconfig.tsbuildinfo +1 -1
@@ -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":"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","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":"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","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;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-focus-outside/index.native.js"],"names":["WrappedComponent","props","handleFocusOutside","setHandleFocusOutside","bindFocusOutsideHandler","node","bind","undefined"],"mappings":";;;;;;;;;AAOA;;;;AAJA;;AAKA;;AARA;AACA;AACA;;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,4BAAC,iBAAD,EAAW,4CAAiBL,kBAAjB,CAAX,EACC,4BAAC,gBAAD;AACC,IAAA,GAAG,EAAGE;AADP,KAEMH,KAFN,EADD,CADD;AAQA,CArBa,EAsBd,kBAtBc,C","sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\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<View { ...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</View>\n\t\t);\n\t},\n\t'withFocusOutside'\n);\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/higher-order/with-focus-outside/index.native.js"],"names":["WrappedComponent","props","handleFocusOutside","setHandleFocusOutside","bindFocusOutsideHandler","node","bind","undefined"],"mappings":";;;;;;;AAOA;;AAJA;;AAKA;;AARA;AACA;AACA;;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,4BAAC,iBAAD,OAAW,4CAAiBL,kBAAjB;AAAX,KACC,4BAAC,gBAAD;AACC,IAAA,GAAG,EAAGE,uBADP;AAAA,OAEMH;AAFN,IADD,CADD;AAQA,CArBa,EAsBd,kBAtBc,C","sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\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<View { ...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</View>\n\t\t);\n\t},\n\t'withFocusOutside'\n);\n"]}
@@ -51,7 +51,8 @@ options => {
51
51
  const ref = (0, _compose.useFocusReturn)(onFocusReturn);
52
52
  return (0, _element.createElement)("div", {
53
53
  ref: ref
54
- }, (0, _element.createElement)(WrappedComponent, props));
54
+ }, (0, _element.createElement)(WrappedComponent, { ...props
55
+ }));
55
56
  };
56
57
 
57
58
  return WithFocusReturn;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-focus-return/index.tsx"],"names":["isComponentLike","object","Component","options","HoC","onFocusReturn","WrappedComponent","WithFocusReturn","props","ref","Provider","children","since","hint"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,eAAT,CAA0BC,MAA1B,EAAuE;AACtE,SAAOA,MAAM,YAAYC,kBAAlB,IAA+B,OAAOD,MAAP,KAAkB,UAAxD;AACA;;AAMD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;eACe,0CACd;AACEE,OAAF,IAAwD;AACvD,QAAMC,GAAG,GACR,CAAE;AAAEC,IAAAA;AAAF,MAA2B,EAA7B,KACEC,gBAAF,IAA6C;AAC5C,UAAMC,eAAe,GACpBC,KADuB,IAEnB;AACJ,YAAMC,GAAG,GAAG,6BAAgBJ,aAAhB,CAAZ;AACA,aACC;AAAK,QAAA,GAAG,EAAGI;AAAX,SACC,4BAAC,gBAAD,EAAuBD,KAAvB,CADD,CADD;AAKA,KATD;;AAWA,WAAOD,eAAP;AACA,GAfF;;AAiBA,MAAKP,eAAe,CAAEG,OAAF,CAApB,EAAkC;AACjC,UAAMG,gBAAgB,GAAGH,OAAzB;AACA,WAAOC,GAAG,GAAIE,gBAAJ,CAAV;AACA;;AAED,SAAOF,GAAG,CAAED,OAAF,CAAV;AACA,CA1Ba,EA2Bd,iBA3Bc,C;;;;AA8BR,MAAMO,QAAQ,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAAmD;AAC1E,2BAAY,6CAAZ,EAA2D;AAC1DC,IAAAA,KAAK,EAAE,KADmD;AAE1DC,IAAAA,IAAI,EAAE;AAFoD,GAA3D;AAKA,SAAOF,QAAP;AACA,CAPM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent, useFocusReturn } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Returns true if the given object is component-like. An object is component-\n * like if it is an instance of wp.element.Component, or is a function.\n *\n * @param object Object to test.\n *\n * @return Whether object is component-like.\n */\nfunction isComponentLike( object: any ): object is React.ComponentType {\n\treturn object instanceof Component || typeof object === 'function';\n}\n\ntype Props = {\n\tonFocusReturn?: () => void;\n};\n\n/**\n * Higher Order Component used to be used to wrap disposable elements like\n * sidebars, modals, dropdowns. When mounting the wrapped component, we track a\n * reference to the current active element so we know where to restore focus\n * when the component is unmounted.\n *\n * @param options The component to be enhanced with\n * focus return behavior, or an object\n * describing the component and the\n * focus return characteristics.\n *\n * @return Higher Order Component with the focus restauration behaviour.\n */\nexport default createHigherOrderComponent(\n\t// @ts-expect-error TODO: Reconcile with intended `createHigherOrderComponent` types\n\t( options: WPComponent | Record< string, unknown > ) => {\n\t\tconst HoC =\n\t\t\t( { onFocusReturn }: Props = {} ) =>\n\t\t\t( WrappedComponent: React.ComponentType ) => {\n\t\t\t\tconst WithFocusReturn = (\n\t\t\t\t\tprops: Record< string, unknown >\n\t\t\t\t) => {\n\t\t\t\t\tconst ref = useFocusReturn( onFocusReturn );\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div ref={ ref }>\n\t\t\t\t\t\t\t<WrappedComponent { ...props } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\treturn WithFocusReturn;\n\t\t\t};\n\n\t\tif ( isComponentLike( options ) ) {\n\t\t\tconst WrappedComponent = options;\n\t\t\treturn HoC()( WrappedComponent );\n\t\t}\n\n\t\treturn HoC( options );\n\t},\n\t'withFocusReturn'\n);\n\nexport const Provider = ( { children }: { children: React.ReactNode } ) => {\n\tdeprecated( 'wp.components.FocusReturnProvider component', {\n\t\tsince: '5.7',\n\t\thint: 'This provider is not used anymore. You can just remove it from your codebase',\n\t} );\n\n\treturn children;\n};\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/higher-order/with-focus-return/index.tsx"],"names":["isComponentLike","object","Component","options","HoC","onFocusReturn","WrappedComponent","WithFocusReturn","props","ref","Provider","children","since","hint"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AALA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,eAAT,CAA0BC,MAA1B,EAAuE;AACtE,SAAOA,MAAM,YAAYC,kBAAlB,IAA+B,OAAOD,MAAP,KAAkB,UAAxD;AACA;;AAMD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;eACe,0CACd;AACEE,OAAF,IAAwD;AACvD,QAAMC,GAAG,GACR,CAAE;AAAEC,IAAAA;AAAF,MAA2B,EAA7B,KACEC,gBAAF,IAA6C;AAC5C,UAAMC,eAAe,GACpBC,KADuB,IAEnB;AACJ,YAAMC,GAAG,GAAG,6BAAgBJ,aAAhB,CAAZ;AACA,aACC;AAAK,QAAA,GAAG,EAAGI;AAAX,SACC,4BAAC,gBAAD,OAAuBD;AAAvB,QADD,CADD;AAKA,KATD;;AAWA,WAAOD,eAAP;AACA,GAfF;;AAiBA,MAAKP,eAAe,CAAEG,OAAF,CAApB,EAAkC;AACjC,UAAMG,gBAAgB,GAAGH,OAAzB;AACA,WAAOC,GAAG,GAAIE,gBAAJ,CAAV;AACA;;AAED,SAAOF,GAAG,CAAED,OAAF,CAAV;AACA,CA1Ba,EA2Bd,iBA3Bc,C;;;;AA8BR,MAAMO,QAAQ,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAAmD;AAC1E,2BAAY,6CAAZ,EAA2D;AAC1DC,IAAAA,KAAK,EAAE,KADmD;AAE1DC,IAAAA,IAAI,EAAE;AAFoD,GAA3D;AAKA,SAAOF,QAAP;AACA,CAPM","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent, useFocusReturn } from '@wordpress/compose';\nimport deprecated from '@wordpress/deprecated';\n\n/**\n * Returns true if the given object is component-like. An object is component-\n * like if it is an instance of wp.element.Component, or is a function.\n *\n * @param object Object to test.\n *\n * @return Whether object is component-like.\n */\nfunction isComponentLike( object: any ): object is React.ComponentType {\n\treturn object instanceof Component || typeof object === 'function';\n}\n\ntype Props = {\n\tonFocusReturn?: () => void;\n};\n\n/**\n * Higher Order Component used to be used to wrap disposable elements like\n * sidebars, modals, dropdowns. When mounting the wrapped component, we track a\n * reference to the current active element so we know where to restore focus\n * when the component is unmounted.\n *\n * @param options The component to be enhanced with\n * focus return behavior, or an object\n * describing the component and the\n * focus return characteristics.\n *\n * @return Higher Order Component with the focus restauration behaviour.\n */\nexport default createHigherOrderComponent(\n\t// @ts-expect-error TODO: Reconcile with intended `createHigherOrderComponent` types\n\t( options: WPComponent | Record< string, unknown > ) => {\n\t\tconst HoC =\n\t\t\t( { onFocusReturn }: Props = {} ) =>\n\t\t\t( WrappedComponent: React.ComponentType ) => {\n\t\t\t\tconst WithFocusReturn = (\n\t\t\t\t\tprops: Record< string, unknown >\n\t\t\t\t) => {\n\t\t\t\t\tconst ref = useFocusReturn( onFocusReturn );\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div ref={ ref }>\n\t\t\t\t\t\t\t<WrappedComponent { ...props } />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t);\n\t\t\t\t};\n\n\t\t\t\treturn WithFocusReturn;\n\t\t\t};\n\n\t\tif ( isComponentLike( options ) ) {\n\t\t\tconst WrappedComponent = options;\n\t\t\treturn HoC()( WrappedComponent );\n\t\t}\n\n\t\treturn HoC( options );\n\t},\n\t'withFocusReturn'\n);\n\nexport const Provider = ( { children }: { children: React.ReactNode } ) => {\n\tdeprecated( 'wp.components.FocusReturnProvider component', {\n\t\tsince: '5.7',\n\t\thint: 'This provider is not used anymore. You can just remove it from your codebase',\n\t} );\n\n\treturn children;\n};\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 _uuid = require("uuid");
15
13
 
16
14
  var _compose = require("@wordpress/compose");
@@ -95,9 +93,10 @@ var _default = (0, _compose.createHigherOrderComponent)(OriginalComponent => {
95
93
  onRemove: noticeOperations.removeNotice
96
94
  })
97
95
  };
98
- return isForwardRef ? (0, _element.createElement)(OriginalComponent, (0, _extends2.default)({}, propsOut, {
96
+ return isForwardRef ? (0, _element.createElement)(OriginalComponent, { ...propsOut,
99
97
  ref: ref
100
- })) : (0, _element.createElement)(OriginalComponent, propsOut);
98
+ }) : (0, _element.createElement)(OriginalComponent, { ...propsOut
99
+ });
101
100
  }
102
101
 
103
102
  let isForwardRef; // @ts-expect-error - `render` will only be present when OriginalComponent was wrapped with forwardRef().
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-notices/index.tsx"],"names":["OriginalComponent","Component","props","ref","noticeList","setNoticeList","noticeOperations","createNotice","notice","noticeToAdd","id","current","createErrorNotice","msg","status","content","removeNotice","filter","removeAllNotices","propsOut","noticeUI","length","isForwardRef","render"],"mappings":";;;;;;;;;AAQA;;;;AALA;;AAMA;;AAKA;;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;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;eACe,yCAA8BA,iBAAF,IAAyB;AACnE,WAASC,SAAT,CACCC,KADD,EAECC,GAFD,EAGE;AACD,UAAM,CAAEC,UAAF,EAAcC,aAAd,IAAgC,uBAEnC,EAFmC,CAAtC;AAIA,UAAMC,gBAAgB,GAAG,sBAEtB,MAAM;AACR,YAAMC,YAAqE,GACxEC,MAAF,IAAc;AACb,cAAMC,WAAW,GAAGD,MAAM,CAACE,EAAP,GACjBF,MADiB,GAEjB,EAAE,GAAGA,MAAL;AAAaE,UAAAA,EAAE,EAAE;AAAjB,SAFH;AAGAL,QAAAA,aAAa,CAAIM,OAAF,IAAe,CAAE,GAAGA,OAAL,EAAcF,WAAd,CAAjB,CAAb;AACA,OANF;;AAQA,aAAO;AACNF,QAAAA,YADM;AAENK,QAAAA,iBAAiB,EAAIC,GAAF,IAAW;AAC7B;AACAN,UAAAA,YAAY,CAAE;AACbO,YAAAA,MAAM,EAAE,OADK;AAEbC,YAAAA,OAAO,EAAEF;AAFI,WAAF,CAAZ;AAIA,SARK;AASNG,QAAAA,YAAY,EAAIN,EAAF,IAAU;AACvBL,UAAAA,aAAa,CAAIM,OAAF,IACdA,OAAO,CAACM,MAAR,CAAkBT,MAAF,IAAcA,MAAM,CAACE,EAAP,KAAcA,EAA5C,CADY,CAAb;AAGA,SAbK;AAcNQ,QAAAA,gBAAgB,EAAE,MAAM;AACvBb,UAAAA,aAAa,CAAE,EAAF,CAAb;AACA;AAhBK,OAAP;AAkBA,KA7BwB,EA6BtB,EA7BsB,CAAzB;AA+BA,UAAMc,QAAQ,GAAG,EAChB,GAAGjB,KADa;AAEhBE,MAAAA,UAFgB;AAGhBE,MAAAA,gBAHgB;AAIhBc,MAAAA,QAAQ,EAAEhB,UAAU,CAACiB,MAAX,GAAoB,CAApB,IACT,4BAAC,aAAD;AACC,QAAA,SAAS,EAAC,4BADX;AAEC,QAAA,OAAO,EAAGjB,UAFX;AAGC,QAAA,QAAQ,EAAGE,gBAAgB,CAACU;AAH7B;AALe,KAAjB;AAaA,WAAOM,YAAY,GAClB,4BAAC,iBAAD,6BAAwBH,QAAxB;AAAmC,MAAA,GAAG,EAAGhB;AAAzC,OADkB,GAGlB,4BAAC,iBAAD,EAAwBgB,QAAxB,CAHD;AAKA;;AAED,MAAIG,YAAJ,CA5DmE,CA6DnE;;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAavB,iBAAnB,CA9DmE,CA+DnE;;AACA,MAAK,OAAOuB,MAAP,KAAkB,UAAvB,EAAoC;AACnCD,IAAAA,YAAY,GAAG,IAAf;AACA,WAAO,yBAAYrB,SAAZ,CAAP;AACA;;AACD,SAAOA,SAAP;AACA,CArEc,EAqEZ,aArEY,C","sourcesContent":["/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState, useMemo } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport NoticeList from '../../notice/list';\nimport type { WithNoticeProps } from './types';\n\n/**\n * Override the default edit UI to include notices if supported.\n *\n * Wrapping the original component with `withNotices` encapsulates the component\n * with the additional props `noticeOperations` and `noticeUI`.\n *\n * ```jsx\n * import { withNotices, Button } from '@wordpress/components';\n *\n * const MyComponentWithNotices = withNotices(\n * \t( { noticeOperations, noticeUI } ) => {\n * \t\tconst addError = () =>\n * \t\t\tnoticeOperations.createErrorNotice( 'Error message' );\n * \t\treturn (\n * \t\t\t<div>\n * \t\t\t\t{ noticeUI }\n * \t\t\t\t<Button variant=\"secondary\" onClick={ addError }>\n * \t\t\t\t\tAdd error\n * \t\t\t\t</Button>\n * \t\t\t</div>\n * \t\t);\n * \t}\n * );\n * ```\n *\n * @param OriginalComponent Original component.\n *\n * @return Wrapped component.\n */\nexport default createHigherOrderComponent( ( OriginalComponent ) => {\n\tfunction Component(\n\t\tprops: { [ key: string ]: any },\n\t\tref: React.ForwardedRef< any >\n\t) {\n\t\tconst [ noticeList, setNoticeList ] = useState<\n\t\t\tWithNoticeProps[ 'noticeList' ]\n\t\t>( [] );\n\n\t\tconst noticeOperations = useMemo<\n\t\t\tWithNoticeProps[ 'noticeOperations' ]\n\t\t>( () => {\n\t\t\tconst createNotice: WithNoticeProps[ 'noticeOperations' ][ 'createNotice' ] =\n\t\t\t\t( notice ) => {\n\t\t\t\t\tconst noticeToAdd = notice.id\n\t\t\t\t\t\t? notice\n\t\t\t\t\t\t: { ...notice, id: uuid() };\n\t\t\t\t\tsetNoticeList( ( current ) => [ ...current, noticeToAdd ] );\n\t\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tcreateNotice,\n\t\t\t\tcreateErrorNotice: ( msg ) => {\n\t\t\t\t\t// @ts-expect-error TODO: Missing `id`, potentially a bug\n\t\t\t\t\tcreateNotice( {\n\t\t\t\t\t\tstatus: 'error',\n\t\t\t\t\t\tcontent: msg,\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t\tremoveNotice: ( id ) => {\n\t\t\t\t\tsetNoticeList( ( current ) =>\n\t\t\t\t\t\tcurrent.filter( ( notice ) => notice.id !== id )\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tremoveAllNotices: () => {\n\t\t\t\t\tsetNoticeList( [] );\n\t\t\t\t},\n\t\t\t};\n\t\t}, [] );\n\n\t\tconst propsOut = {\n\t\t\t...props,\n\t\t\tnoticeList,\n\t\t\tnoticeOperations,\n\t\t\tnoticeUI: noticeList.length > 0 && (\n\t\t\t\t<NoticeList\n\t\t\t\t\tclassName=\"components-with-notices-ui\"\n\t\t\t\t\tnotices={ noticeList }\n\t\t\t\t\tonRemove={ noticeOperations.removeNotice }\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\treturn isForwardRef ? (\n\t\t\t<OriginalComponent { ...propsOut } ref={ ref } />\n\t\t) : (\n\t\t\t<OriginalComponent { ...propsOut } />\n\t\t);\n\t}\n\n\tlet isForwardRef: boolean;\n\t// @ts-expect-error - `render` will only be present when OriginalComponent was wrapped with forwardRef().\n\tconst { render } = OriginalComponent;\n\t// Returns a forwardRef if OriginalComponent appears to be a forwardRef.\n\tif ( typeof render === 'function' ) {\n\t\tisForwardRef = true;\n\t\treturn forwardRef( Component );\n\t}\n\treturn Component;\n}, 'withNotices' );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/higher-order/with-notices/index.tsx"],"names":["OriginalComponent","Component","props","ref","noticeList","setNoticeList","noticeOperations","createNotice","notice","noticeToAdd","id","current","createErrorNotice","msg","status","content","removeNotice","filter","removeAllNotices","propsOut","noticeUI","length","isForwardRef","render"],"mappings":";;;;;;;;;AAQA;;AALA;;AAMA;;AAKA;;AAdA;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;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;eACe,yCAA8BA,iBAAF,IAAyB;AACnE,WAASC,SAAT,CACCC,KADD,EAECC,GAFD,EAGE;AACD,UAAM,CAAEC,UAAF,EAAcC,aAAd,IAAgC,uBAEnC,EAFmC,CAAtC;AAIA,UAAMC,gBAAgB,GAAG,sBAEtB,MAAM;AACR,YAAMC,YAAqE,GACxEC,MAAF,IAAc;AACb,cAAMC,WAAW,GAAGD,MAAM,CAACE,EAAP,GACjBF,MADiB,GAEjB,EAAE,GAAGA,MAAL;AAAaE,UAAAA,EAAE,EAAE;AAAjB,SAFH;AAGAL,QAAAA,aAAa,CAAIM,OAAF,IAAe,CAAE,GAAGA,OAAL,EAAcF,WAAd,CAAjB,CAAb;AACA,OANF;;AAQA,aAAO;AACNF,QAAAA,YADM;AAENK,QAAAA,iBAAiB,EAAIC,GAAF,IAAW;AAC7B;AACAN,UAAAA,YAAY,CAAE;AACbO,YAAAA,MAAM,EAAE,OADK;AAEbC,YAAAA,OAAO,EAAEF;AAFI,WAAF,CAAZ;AAIA,SARK;AASNG,QAAAA,YAAY,EAAIN,EAAF,IAAU;AACvBL,UAAAA,aAAa,CAAIM,OAAF,IACdA,OAAO,CAACM,MAAR,CAAkBT,MAAF,IAAcA,MAAM,CAACE,EAAP,KAAcA,EAA5C,CADY,CAAb;AAGA,SAbK;AAcNQ,QAAAA,gBAAgB,EAAE,MAAM;AACvBb,UAAAA,aAAa,CAAE,EAAF,CAAb;AACA;AAhBK,OAAP;AAkBA,KA7BwB,EA6BtB,EA7BsB,CAAzB;AA+BA,UAAMc,QAAQ,GAAG,EAChB,GAAGjB,KADa;AAEhBE,MAAAA,UAFgB;AAGhBE,MAAAA,gBAHgB;AAIhBc,MAAAA,QAAQ,EAAEhB,UAAU,CAACiB,MAAX,GAAoB,CAApB,IACT,4BAAC,aAAD;AACC,QAAA,SAAS,EAAC,4BADX;AAEC,QAAA,OAAO,EAAGjB,UAFX;AAGC,QAAA,QAAQ,EAAGE,gBAAgB,CAACU;AAH7B;AALe,KAAjB;AAaA,WAAOM,YAAY,GAClB,4BAAC,iBAAD,OAAwBH,QAAxB;AAAmC,MAAA,GAAG,EAAGhB;AAAzC,MADkB,GAGlB,4BAAC,iBAAD,OAAwBgB;AAAxB,MAHD;AAKA;;AAED,MAAIG,YAAJ,CA5DmE,CA6DnE;;AACA,QAAM;AAAEC,IAAAA;AAAF,MAAavB,iBAAnB,CA9DmE,CA+DnE;;AACA,MAAK,OAAOuB,MAAP,KAAkB,UAAvB,EAAoC;AACnCD,IAAAA,YAAY,GAAG,IAAf;AACA,WAAO,yBAAYrB,SAAZ,CAAP;AACA;;AACD,SAAOA,SAAP;AACA,CArEc,EAqEZ,aArEY,C","sourcesContent":["/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState, useMemo } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport NoticeList from '../../notice/list';\nimport type { WithNoticeProps } from './types';\n\n/**\n * Override the default edit UI to include notices if supported.\n *\n * Wrapping the original component with `withNotices` encapsulates the component\n * with the additional props `noticeOperations` and `noticeUI`.\n *\n * ```jsx\n * import { withNotices, Button } from '@wordpress/components';\n *\n * const MyComponentWithNotices = withNotices(\n * \t( { noticeOperations, noticeUI } ) => {\n * \t\tconst addError = () =>\n * \t\t\tnoticeOperations.createErrorNotice( 'Error message' );\n * \t\treturn (\n * \t\t\t<div>\n * \t\t\t\t{ noticeUI }\n * \t\t\t\t<Button variant=\"secondary\" onClick={ addError }>\n * \t\t\t\t\tAdd error\n * \t\t\t\t</Button>\n * \t\t\t</div>\n * \t\t);\n * \t}\n * );\n * ```\n *\n * @param OriginalComponent Original component.\n *\n * @return Wrapped component.\n */\nexport default createHigherOrderComponent( ( OriginalComponent ) => {\n\tfunction Component(\n\t\tprops: { [ key: string ]: any },\n\t\tref: React.ForwardedRef< any >\n\t) {\n\t\tconst [ noticeList, setNoticeList ] = useState<\n\t\t\tWithNoticeProps[ 'noticeList' ]\n\t\t>( [] );\n\n\t\tconst noticeOperations = useMemo<\n\t\t\tWithNoticeProps[ 'noticeOperations' ]\n\t\t>( () => {\n\t\t\tconst createNotice: WithNoticeProps[ 'noticeOperations' ][ 'createNotice' ] =\n\t\t\t\t( notice ) => {\n\t\t\t\t\tconst noticeToAdd = notice.id\n\t\t\t\t\t\t? notice\n\t\t\t\t\t\t: { ...notice, id: uuid() };\n\t\t\t\t\tsetNoticeList( ( current ) => [ ...current, noticeToAdd ] );\n\t\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tcreateNotice,\n\t\t\t\tcreateErrorNotice: ( msg ) => {\n\t\t\t\t\t// @ts-expect-error TODO: Missing `id`, potentially a bug\n\t\t\t\t\tcreateNotice( {\n\t\t\t\t\t\tstatus: 'error',\n\t\t\t\t\t\tcontent: msg,\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t\tremoveNotice: ( id ) => {\n\t\t\t\t\tsetNoticeList( ( current ) =>\n\t\t\t\t\t\tcurrent.filter( ( notice ) => notice.id !== id )\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tremoveAllNotices: () => {\n\t\t\t\t\tsetNoticeList( [] );\n\t\t\t\t},\n\t\t\t};\n\t\t}, [] );\n\n\t\tconst propsOut = {\n\t\t\t...props,\n\t\t\tnoticeList,\n\t\t\tnoticeOperations,\n\t\t\tnoticeUI: noticeList.length > 0 && (\n\t\t\t\t<NoticeList\n\t\t\t\t\tclassName=\"components-with-notices-ui\"\n\t\t\t\t\tnotices={ noticeList }\n\t\t\t\t\tonRemove={ noticeOperations.removeNotice }\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\treturn isForwardRef ? (\n\t\t\t<OriginalComponent { ...propsOut } ref={ ref } />\n\t\t) : (\n\t\t\t<OriginalComponent { ...propsOut } />\n\t\t);\n\t}\n\n\tlet isForwardRef: boolean;\n\t// @ts-expect-error - `render` will only be present when OriginalComponent was wrapped with forwardRef().\n\tconst { render } = OriginalComponent;\n\t// Returns a forwardRef if OriginalComponent appears to be a forwardRef.\n\tif ( typeof render === 'function' ) {\n\t\tisForwardRef = true;\n\t\treturn forwardRef( Component );\n\t}\n\treturn Component;\n}, 'withNotices' );\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
  var _a11y = require("@wordpress/a11y");
@@ -31,10 +27,10 @@ var _a11y = require("@wordpress/a11y");
31
27
  *
32
28
  * @return {WPComponent} The wrapped component.
33
29
  */
34
- var _default = (0, _compose.createHigherOrderComponent)(Component => props => (0, _element.createElement)(Component, (0, _extends2.default)({}, props, {
30
+ var _default = (0, _compose.createHigherOrderComponent)(Component => props => (0, _element.createElement)(Component, { ...props,
35
31
  speak: _a11y.speak,
36
32
  debouncedSpeak: (0, _compose.useDebounce)(_a11y.speak, 500)
37
- })), 'withSpokenMessages');
33
+ }), 'withSpokenMessages');
38
34
 
39
35
  exports.default = _default;
40
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-spoken-messages/index.tsx"],"names":["Component","props","speak"],"mappings":";;;;;;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;;AAIA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;eACe,yCACZA,SAAF,IAAmBC,KAAF,IAEf,4BAAC,SAAD,6BACMA,KADN;AAEC,EAAA,KAAK,EAAGC,WAFT;AAGC,EAAA,cAAc,EAAG,0BAAaA,WAAb,EAAoB,GAApB;AAHlB,GAHY,EASd,oBATc,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/** @typedef {import('@wordpress/element').WPComponent} WPComponent */\n\n/**\n * A Higher Order Component used to be provide speak and debounced speak\n * functions.\n *\n * @see https://developer.wordpress.org/block-editor/packages/packages-a11y/#speak\n *\n * @param {WPComponent} Component The component to be wrapped.\n *\n * @return {WPComponent} The wrapped component.\n */\nexport default createHigherOrderComponent(\n\t( Component ) => ( props ) =>\n\t\t(\n\t\t\t<Component\n\t\t\t\t{ ...props }\n\t\t\t\tspeak={ speak }\n\t\t\t\tdebouncedSpeak={ useDebounce( speak, 500 ) }\n\t\t\t/>\n\t\t),\n\t'withSpokenMessages'\n);\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/higher-order/with-spoken-messages/index.tsx"],"names":["Component","props","speak"],"mappings":";;;;;;;;;AAGA;;AACA;;AAJA;AACA;AACA;;AAIA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;eACe,yCACZA,SAAF,IAAmBC,KAAF,IAEf,4BAAC,SAAD,OACMA,KADN;AAEC,EAAA,KAAK,EAAGC,WAFT;AAGC,EAAA,cAAc,EAAG,0BAAaA,WAAb,EAAoB,GAApB;AAHlB,EAHY,EASd,oBATc,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createHigherOrderComponent, useDebounce } from '@wordpress/compose';\nimport { speak } from '@wordpress/a11y';\n\n/** @typedef {import('@wordpress/element').WPComponent} WPComponent */\n\n/**\n * A Higher Order Component used to be provide speak and debounced speak\n * functions.\n *\n * @see https://developer.wordpress.org/block-editor/packages/packages-a11y/#speak\n *\n * @param {WPComponent} Component The component to be wrapped.\n *\n * @return {WPComponent} The wrapped component.\n */\nexport default createHigherOrderComponent(\n\t( Component ) => ( props ) =>\n\t\t(\n\t\t\t<Component\n\t\t\t\t{ ...props }\n\t\t\t\tspeak={ speak }\n\t\t\t\tdebouncedSpeak={ useDebounce( speak, 500 ) }\n\t\t\t/>\n\t\t),\n\t'withSpokenMessages'\n);\n"]}
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
 
10
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
-
12
10
  var _element = require("@wordpress/element");
13
11
 
14
12
  var _primitives = require("@wordpress/primitives");
@@ -32,10 +30,11 @@ function Icon({
32
30
  ...additionalProps
33
31
  }) {
34
32
  if ('string' === typeof icon) {
35
- return (0, _element.createElement)(_dashicon.default, (0, _extends2.default)({
33
+ return (0, _element.createElement)(_dashicon.default, {
36
34
  icon: icon,
37
- size: size
38
- }, additionalProps));
35
+ size: size,
36
+ ...additionalProps
37
+ });
39
38
  }
40
39
 
41
40
  if ((0, _element.isValidElement)(icon) && _dashicon.default === icon.type) {
@@ -56,7 +55,8 @@ function Icon({
56
55
  height: size,
57
56
  ...additionalProps
58
57
  };
59
- return (0, _element.createElement)(_primitives.SVG, appliedProps);
58
+ return (0, _element.createElement)(_primitives.SVG, { ...appliedProps
59
+ });
60
60
  }
61
61
 
62
62
  if ((0, _element.isValidElement)(icon)) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/icon/index.tsx"],"names":["Icon","icon","size","additionalProps","Dashicon","type","SVG","appliedProps","props","width","height"],"mappings":";;;;;;;;;;;AAQA;;AAKA;;AAKA;;AAlBA;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;AAkCA,SAASA,IAAT,CAAe;AACdC,EAAAA,IAAI,GAAG,IADO;AAEdC,EAAAA,IAAI,GAAG,aAAa,OAAOD,IAApB,GAA2B,EAA3B,GAAgC,EAFzB;AAGd,KAAGE;AAHW,CAAf,EAIW;AACV,MAAK,aAAa,OAAOF,IAAzB,EAAgC;AAC/B,WACC,4BAAC,iBAAD;AACC,MAAA,IAAI,EAAGA,IADR;AAEC,MAAA,IAAI,EAAGC;AAFR,OAGQC,eAHR,EADD;AAOA;;AAED,MAAK,6BAAgBF,IAAhB,KAA0BG,sBAAaH,IAAI,CAACI,IAAjD,EAAwD;AACvD,WAAO,2BAAcJ,IAAd,EAAoB,EAC1B,GAAGE;AADuB,KAApB,CAAP;AAGA;;AAED,MAAK,eAAe,OAAOF,IAA3B,EAAkC;AACjC,WAAO,4BAAeA,IAAf,EAAqB;AAC3BC,MAAAA,IAD2B;AAE3B,SAAGC;AAFwB,KAArB,CAAP;AAIA;;AAED,MAAKF,IAAI,KAAMA,IAAI,CAACI,IAAL,KAAc,KAAd,IAAuBJ,IAAI,CAACI,IAAL,KAAcC,eAA3C,CAAT,EAA4D;AAC3D,UAAMC,YAAY,GAAG,EACpB,GAAGN,IAAI,CAACO,KADY;AAEpBC,MAAAA,KAAK,EAAEP,IAFa;AAGpBQ,MAAAA,MAAM,EAAER,IAHY;AAIpB,SAAGC;AAJiB,KAArB;AAOA,WAAO,4BAAC,eAAD,EAAUI,YAAV,CAAP;AACA;;AAED,MAAK,6BAAgBN,IAAhB,CAAL,EAA8B;AAC7B,WAAO,2BAAcA,IAAd,EAAoB;AAC1B;AACAC,MAAAA,IAF0B;AAG1B,SAAGC;AAHuB,KAApB,CAAP;AAKA;;AAED,SAAOF,IAAP;AACA;;eAEcD,I","sourcesContent":["/**\n * External dependencies\n */\nimport type { ComponentType, HTMLProps, SVGProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneElement,\n\tcreateElement,\n\tisValidElement,\n} from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\nimport type { IconKey as DashiconIconKey } from '../dashicon/types';\n\nexport type IconType =\n\t| DashiconIconKey\n\t| ComponentType< { size?: number } >\n\t| ( ( props: { size?: number } ) => JSX.Element )\n\t| JSX.Element;\n\ninterface BaseProps {\n\t/**\n\t * The icon to render. Supported values are: Dashicons (specified as\n\t * strings), functions, Component instances and `null`.\n\t *\n\t * @default null\n\t */\n\ticon?: IconType | null;\n\t/**\n\t * The size (width and height) of the icon.\n\t *\n\t * @default `20` when a Dashicon is rendered, `24` for all other icons.\n\t */\n\tsize?: number;\n}\n\ntype AdditionalProps< T > = T extends ComponentType< infer U >\n\t? U\n\t: T extends DashiconIconKey\n\t? SVGProps< SVGSVGElement >\n\t: {};\n\nexport type Props = BaseProps & AdditionalProps< IconType >;\n\nfunction Icon( {\n\ticon = null,\n\tsize = 'string' === typeof icon ? 20 : 24,\n\t...additionalProps\n}: Props ) {\n\tif ( 'string' === typeof icon ) {\n\t\treturn (\n\t\t\t<Dashicon\n\t\t\t\ticon={ icon }\n\t\t\t\tsize={ size }\n\t\t\t\t{ ...( additionalProps as HTMLProps< HTMLSpanElement > ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isValidElement( icon ) && Dashicon === icon.type ) {\n\t\treturn cloneElement( icon, {\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( 'function' === typeof icon ) {\n\t\treturn createElement( icon, {\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( icon && ( icon.type === 'svg' || icon.type === SVG ) ) {\n\t\tconst appliedProps = {\n\t\t\t...icon.props,\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...additionalProps,\n\t\t};\n\n\t\treturn <SVG { ...appliedProps } />;\n\t}\n\n\tif ( isValidElement( icon ) ) {\n\t\treturn cloneElement( icon, {\n\t\t\t// @ts-ignore Just forwarding the size prop along\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\treturn icon;\n}\n\nexport default Icon;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/icon/index.tsx"],"names":["Icon","icon","size","additionalProps","Dashicon","type","SVG","appliedProps","props","width","height"],"mappings":";;;;;;;;;AAQA;;AAKA;;AAKA;;AAlBA;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;AAkCA,SAASA,IAAT,CAAe;AACdC,EAAAA,IAAI,GAAG,IADO;AAEdC,EAAAA,IAAI,GAAG,aAAa,OAAOD,IAApB,GAA2B,EAA3B,GAAgC,EAFzB;AAGd,KAAGE;AAHW,CAAf,EAIW;AACV,MAAK,aAAa,OAAOF,IAAzB,EAAgC;AAC/B,WACC,4BAAC,iBAAD;AACC,MAAA,IAAI,EAAGA,IADR;AAEC,MAAA,IAAI,EAAGC,IAFR;AAAA,SAGQC;AAHR,MADD;AAOA;;AAED,MAAK,6BAAgBF,IAAhB,KAA0BG,sBAAaH,IAAI,CAACI,IAAjD,EAAwD;AACvD,WAAO,2BAAcJ,IAAd,EAAoB,EAC1B,GAAGE;AADuB,KAApB,CAAP;AAGA;;AAED,MAAK,eAAe,OAAOF,IAA3B,EAAkC;AACjC,WAAO,4BAAeA,IAAf,EAAqB;AAC3BC,MAAAA,IAD2B;AAE3B,SAAGC;AAFwB,KAArB,CAAP;AAIA;;AAED,MAAKF,IAAI,KAAMA,IAAI,CAACI,IAAL,KAAc,KAAd,IAAuBJ,IAAI,CAACI,IAAL,KAAcC,eAA3C,CAAT,EAA4D;AAC3D,UAAMC,YAAY,GAAG,EACpB,GAAGN,IAAI,CAACO,KADY;AAEpBC,MAAAA,KAAK,EAAEP,IAFa;AAGpBQ,MAAAA,MAAM,EAAER,IAHY;AAIpB,SAAGC;AAJiB,KAArB;AAOA,WAAO,4BAAC,eAAD,OAAUI;AAAV,MAAP;AACA;;AAED,MAAK,6BAAgBN,IAAhB,CAAL,EAA8B;AAC7B,WAAO,2BAAcA,IAAd,EAAoB;AAC1B;AACAC,MAAAA,IAF0B;AAG1B,SAAGC;AAHuB,KAApB,CAAP;AAKA;;AAED,SAAOF,IAAP;AACA;;eAEcD,I","sourcesContent":["/**\n * External dependencies\n */\nimport type { ComponentType, HTMLProps, SVGProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneElement,\n\tcreateElement,\n\tisValidElement,\n} from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\nimport type { IconKey as DashiconIconKey } from '../dashicon/types';\n\nexport type IconType =\n\t| DashiconIconKey\n\t| ComponentType< { size?: number } >\n\t| ( ( props: { size?: number } ) => JSX.Element )\n\t| JSX.Element;\n\ninterface BaseProps {\n\t/**\n\t * The icon to render. Supported values are: Dashicons (specified as\n\t * strings), functions, Component instances and `null`.\n\t *\n\t * @default null\n\t */\n\ticon?: IconType | null;\n\t/**\n\t * The size (width and height) of the icon.\n\t *\n\t * @default `20` when a Dashicon is rendered, `24` for all other icons.\n\t */\n\tsize?: number;\n}\n\ntype AdditionalProps< T > = T extends ComponentType< infer U >\n\t? U\n\t: T extends DashiconIconKey\n\t? SVGProps< SVGSVGElement >\n\t: {};\n\nexport type Props = BaseProps & AdditionalProps< IconType >;\n\nfunction Icon( {\n\ticon = null,\n\tsize = 'string' === typeof icon ? 20 : 24,\n\t...additionalProps\n}: Props ) {\n\tif ( 'string' === typeof icon ) {\n\t\treturn (\n\t\t\t<Dashicon\n\t\t\t\ticon={ icon }\n\t\t\t\tsize={ size }\n\t\t\t\t{ ...( additionalProps as HTMLProps< HTMLSpanElement > ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isValidElement( icon ) && Dashicon === icon.type ) {\n\t\treturn cloneElement( icon, {\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( 'function' === typeof icon ) {\n\t\treturn createElement( icon, {\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( icon && ( icon.type === 'svg' || icon.type === SVG ) ) {\n\t\tconst appliedProps = {\n\t\t\t...icon.props,\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...additionalProps,\n\t\t};\n\n\t\treturn <SVG { ...appliedProps } />;\n\t}\n\n\tif ( isValidElement( icon ) ) {\n\t\treturn cloneElement( icon, {\n\t\t\t// @ts-ignore Just forwarding the size prop along\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\treturn icon;\n}\n\nexport default Icon;\n"]}
@@ -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
  var _compose = require("@wordpress/compose");
@@ -101,7 +99,8 @@ function UnforwardedInputControl({
101
99
  size: size,
102
100
  style: style,
103
101
  suffix: suffix
104
- }, (0, _element.createElement)(_inputField.default, (0, _extends2.default)({}, props, helpProp, {
102
+ }, (0, _element.createElement)(_inputField.default, { ...props,
103
+ ...helpProp,
105
104
  __next36pxDefaultSize: __next36pxDefaultSize,
106
105
  className: "components-input-control__input",
107
106
  disabled: disabled,
@@ -115,8 +114,9 @@ function UnforwardedInputControl({
115
114
  ref: ref,
116
115
  setIsFocused: setIsFocused,
117
116
  size: size,
118
- stateReducer: stateReducer
119
- }, draftHookProps))));
117
+ stateReducer: stateReducer,
118
+ ...draftHookProps
119
+ })));
120
120
  }
121
121
  /**
122
122
  * InputControl components let users enter and edit text. This is an experimental component
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/input-control/index.tsx"],"names":["noop","useUniqueId","idProp","instanceId","InputControl","id","UnforwardedInputControl","__next36pxDefaultSize","__unstableStateReducer","stateReducer","state","__unstableInputWidth","className","disabled","help","hideLabelFromVision","isPressEnterToChange","label","labelPosition","onChange","onValidate","onKeyDown","prefix","size","style","suffix","value","props","ref","isFocused","setIsFocused","classes","draftHookProps","onBlur","helpPropName","helpProp","undefined"],"mappings":"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","sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InputBase from './input-base';\nimport InputField from './input-field';\nimport type { InputControlProps } from './types';\nimport { space } from '../ui/utils/space';\nimport { useDraft } from './utils';\nimport BaseControl from '../base-control';\n\nconst noop = () => {};\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( InputControl );\n\tconst id = `inspector-input-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\nexport function UnforwardedInputControl(\n\t{\n\t\t__next36pxDefaultSize,\n\t\t__unstableStateReducer: stateReducer = ( state ) => state,\n\t\t__unstableInputWidth,\n\t\tclassName,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tid: idProp,\n\t\tisPressEnterToChange = false,\n\t\tlabel,\n\t\tlabelPosition = 'top',\n\t\tonChange = noop,\n\t\tonValidate = noop,\n\t\tonKeyDown = noop,\n\t\tprefix,\n\t\tsize = 'default',\n\t\tstyle,\n\t\tsuffix,\n\t\tvalue,\n\t\t...props\n\t}: InputControlProps,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst id = useUniqueId( idProp );\n\tconst classes = classNames( 'components-input-control', className );\n\n\tconst draftHookProps = useDraft( {\n\t\tvalue,\n\t\tonBlur: props.onBlur,\n\t\tonChange,\n\t} );\n\n\t// ARIA descriptions can only contain plain text, so fall back to aria-details if not.\n\tconst helpPropName =\n\t\ttypeof help === 'string' ? 'aria-describedby' : 'aria-details';\n\tconst helpProp = !! help ? { [ helpPropName ]: `${ id }__help` } : {};\n\n\treturn (\n\t\t<BaseControl\n\t\t\tclassName={ classes }\n\t\t\thelp={ help }\n\t\t\tid={ id }\n\t\t\t__nextHasNoMarginBottom\n\t\t>\n\t\t\t<InputBase\n\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tgap={ 3 }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tid={ id }\n\t\t\t\tisFocused={ isFocused }\n\t\t\t\tjustify=\"left\"\n\t\t\t\tlabel={ label }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\tprefix={ prefix }\n\t\t\t\tsize={ size }\n\t\t\t\tstyle={ style }\n\t\t\t\tsuffix={ suffix }\n\t\t\t>\n\t\t\t\t<InputField\n\t\t\t\t\t{ ...props }\n\t\t\t\t\t{ ...helpProp }\n\t\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t\tclassName=\"components-input-control__input\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tid={ id }\n\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\tonValidate={ onValidate }\n\t\t\t\t\tpaddingInlineStart={ prefix ? space( 2 ) : undefined }\n\t\t\t\t\tpaddingInlineEnd={ suffix ? space( 2 ) : undefined }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tsetIsFocused={ setIsFocused }\n\t\t\t\t\tsize={ size }\n\t\t\t\t\tstateReducer={ stateReducer }\n\t\t\t\t\t{ ...draftHookProps }\n\t\t\t\t/>\n\t\t\t</InputBase>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * InputControl components let users enter and edit text. This is an experimental component\n * intended to (in time) merge with or replace `TextControl`.\n *\n * ```jsx\n * import { __experimentalInputControl as InputControl } from '@wordpress/components';\n * import { useState } from '@wordpress/compose';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '' );\n *\n * return (\n * \t<InputControl\n * \t\tvalue={ value }\n * \t\tonChange={ ( nextValue ) => setValue( nextValue ?? '' ) }\n * \t/>\n * );\n * };\n * ```\n */\nexport const InputControl = forwardRef( UnforwardedInputControl );\n\nexport default InputControl;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/input-control/index.tsx"],"names":["noop","useUniqueId","idProp","instanceId","InputControl","id","UnforwardedInputControl","__next36pxDefaultSize","__unstableStateReducer","stateReducer","state","__unstableInputWidth","className","disabled","help","hideLabelFromVision","isPressEnterToChange","label","labelPosition","onChange","onValidate","onKeyDown","prefix","size","style","suffix","value","props","ref","isFocused","setIsFocused","classes","draftHookProps","onBlur","helpPropName","helpProp","undefined"],"mappings":"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","sourcesContent":["/**\n * External dependencies\n */\nimport classNames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { useState, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport InputBase from './input-base';\nimport InputField from './input-field';\nimport type { InputControlProps } from './types';\nimport { space } from '../ui/utils/space';\nimport { useDraft } from './utils';\nimport BaseControl from '../base-control';\n\nconst noop = () => {};\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( InputControl );\n\tconst id = `inspector-input-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\nexport function UnforwardedInputControl(\n\t{\n\t\t__next36pxDefaultSize,\n\t\t__unstableStateReducer: stateReducer = ( state ) => state,\n\t\t__unstableInputWidth,\n\t\tclassName,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tid: idProp,\n\t\tisPressEnterToChange = false,\n\t\tlabel,\n\t\tlabelPosition = 'top',\n\t\tonChange = noop,\n\t\tonValidate = noop,\n\t\tonKeyDown = noop,\n\t\tprefix,\n\t\tsize = 'default',\n\t\tstyle,\n\t\tsuffix,\n\t\tvalue,\n\t\t...props\n\t}: InputControlProps,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst id = useUniqueId( idProp );\n\tconst classes = classNames( 'components-input-control', className );\n\n\tconst draftHookProps = useDraft( {\n\t\tvalue,\n\t\tonBlur: props.onBlur,\n\t\tonChange,\n\t} );\n\n\t// ARIA descriptions can only contain plain text, so fall back to aria-details if not.\n\tconst helpPropName =\n\t\ttypeof help === 'string' ? 'aria-describedby' : 'aria-details';\n\tconst helpProp = !! help ? { [ helpPropName ]: `${ id }__help` } : {};\n\n\treturn (\n\t\t<BaseControl\n\t\t\tclassName={ classes }\n\t\t\thelp={ help }\n\t\t\tid={ id }\n\t\t\t__nextHasNoMarginBottom\n\t\t>\n\t\t\t<InputBase\n\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\t\tdisabled={ disabled }\n\t\t\t\tgap={ 3 }\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tid={ id }\n\t\t\t\tisFocused={ isFocused }\n\t\t\t\tjustify=\"left\"\n\t\t\t\tlabel={ label }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\tprefix={ prefix }\n\t\t\t\tsize={ size }\n\t\t\t\tstyle={ style }\n\t\t\t\tsuffix={ suffix }\n\t\t\t>\n\t\t\t\t<InputField\n\t\t\t\t\t{ ...props }\n\t\t\t\t\t{ ...helpProp }\n\t\t\t\t\t__next36pxDefaultSize={ __next36pxDefaultSize }\n\t\t\t\t\tclassName=\"components-input-control__input\"\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tid={ id }\n\t\t\t\t\tisFocused={ isFocused }\n\t\t\t\t\tisPressEnterToChange={ isPressEnterToChange }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t\tonValidate={ onValidate }\n\t\t\t\t\tpaddingInlineStart={ prefix ? space( 2 ) : undefined }\n\t\t\t\t\tpaddingInlineEnd={ suffix ? space( 2 ) : undefined }\n\t\t\t\t\tref={ ref }\n\t\t\t\t\tsetIsFocused={ setIsFocused }\n\t\t\t\t\tsize={ size }\n\t\t\t\t\tstateReducer={ stateReducer }\n\t\t\t\t\t{ ...draftHookProps }\n\t\t\t\t/>\n\t\t\t</InputBase>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * InputControl components let users enter and edit text. This is an experimental component\n * intended to (in time) merge with or replace `TextControl`.\n *\n * ```jsx\n * import { __experimentalInputControl as InputControl } from '@wordpress/components';\n * import { useState } from '@wordpress/compose';\n *\n * const Example = () => {\n * const [ value, setValue ] = useState( '' );\n *\n * return (\n * \t<InputControl\n * \t\tvalue={ value }\n * \t\tonChange={ ( nextValue ) => setValue( nextValue ?? '' ) }\n * \t/>\n * );\n * };\n * ```\n */\nexport const InputControl = forwardRef( UnforwardedInputControl );\n\nexport default InputControl;\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 _compose = require("@wordpress/compose");
16
14
 
17
15
  var _backdrop = _interopRequireDefault(require("./backdrop"));
@@ -100,13 +98,14 @@ function InputBase({
100
98
  };
101
99
  }, [paddingLeft, paddingRight]);
102
100
  return (// @ts-expect-error The `direction` prop from Flex (FlexDirection) conflicts with legacy SVGAttributes `direction` (string) that come from React intrinsic prop definitions.
103
- (0, _element.createElement)(_inputControlStyles.Root, (0, _extends2.default)({}, props, getUIFlexProps(labelPosition), {
101
+ (0, _element.createElement)(_inputControlStyles.Root, { ...props,
102
+ ...getUIFlexProps(labelPosition),
104
103
  className: className,
105
104
  gap: 2,
106
105
  isFocused: isFocused,
107
106
  labelPosition: labelPosition,
108
107
  ref: ref
109
- }), (0, _element.createElement)(_label.default, {
108
+ }, (0, _element.createElement)(_label.default, {
110
109
  className: "components-input-control__label",
111
110
  hideLabelFromVision: hideLabelFromVision,
112
111
  labelPosition: labelPosition,