@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 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-constrained-tabbing/index.tsx"],"names":["createHigherOrderComponent","useConstrainedTabbing","withConstrainedTabbing","WrappedComponent","ComponentWithConstrainedTabbing","props","ref"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,0BADD,EAECC,qBAFD,QAGO,oBAHP;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,sBAAsB,GAAGF,0BAA0B,CACtDG,gBAAF,IACC,SAASC,+BAAT,CAA0CC,KAA1C,EAAkD;AACjD,QAAMC,GAAG,GAAGL,qBAAqB,EAAjC;AACA,SACC;AAAK,IAAA,GAAG,EAAGK,GAAX;AAAiB,IAAA,QAAQ,EAAG,CAAC;AAA7B,KACC,cAAC,gBAAD,EAAuBD,KAAvB,CADD,CADD;AAKA,CATsD,EAUxD,wBAVwD,CAAzD;AAaA,eAAeH,sBAAf","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":["createHigherOrderComponent","useConstrainedTabbing","withConstrainedTabbing","WrappedComponent","ComponentWithConstrainedTabbing","props","ref"],"mappings":";;AAAA;AACA;AACA;AACA,SACCA,0BADD,EAECC,qBAFD,QAGO,oBAHP;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,sBAAsB,GAAGF,0BAA0B,CACtDG,gBAAF,IACC,SAASC,+BAAT,CAA0CC,KAA1C,EAAkD;AACjD,QAAMC,GAAG,GAAGL,qBAAqB,EAAjC;AACA,SACC;AAAK,IAAA,GAAG,EAAGK,GAAX;AAAiB,IAAA,QAAQ,EAAG,CAAC;AAA7B,KACC,cAAC,gBAAD,OAAuBD;AAAvB,IADD,CADD;AAKA,CATsD,EAUxD,wBAVwD,CAAzD;AAaA,eAAeH,sBAAf","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,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -58,7 +57,9 @@ export default (mapNodeToProps => createHigherOrderComponent(WrappedComponent =>
58
57
  }
59
58
 
60
59
  render() {
61
- const wrappedComponent = createElement(WrappedComponent, _extends({}, this.props, this.state.fallbackStyles));
60
+ const wrappedComponent = createElement(WrappedComponent, { ...this.props,
61
+ ...this.state.fallbackStyles
62
+ });
62
63
  return this.props.node ? wrappedComponent : createElement("div", {
63
64
  ref: this.bindRef
64
65
  }, " ", wrappedComponent, " ");
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-fallback-styles/index.tsx"],"names":["fastDeepEqual","Component","createHigherOrderComponent","mapNodeToProps","WrappedComponent","constructor","props","nodeRef","node","state","fallbackStyles","undefined","grabStylesCompleted","bindRef","bind","componentDidMount","grabFallbackStyles","componentDidUpdate","newFallbackStyles","setState","Object","values","every","Boolean","render","wrappedComponent"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,aAAP,MAA0B,qBAA1B;AAEA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,0BAAT,QAA2C,o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AMA,aAAO,KAAKJ,KAAL,CAAWE,IAAX,GACNiB,gBADM,GAGN;AAAK,QAAA,GAAG,EAAG,KAAKZ;AAAhB,cAA6BY,gBAA7B,MAHD;AAKA;;AA/D6C,GAA/C;AAiEA,CAlEyB,EAkEvB,oBAlEuB,CAN3B","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":["fastDeepEqual","Component","createHigherOrderComponent","mapNodeToProps","WrappedComponent","constructor","props","nodeRef","node","state","fallbackStyles","undefined","grabStylesCompleted","bindRef","bind","componentDidMount","grabFallbackStyles","componentDidUpdate","newFallbackStyles","setState","Object","values","every","Boolean","render","wrappedComponent"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,aAAP,MAA0B,qBAA1B;AAEA;AACA;AACA;;AACA,SAASC,SAAT,QAA0B,oBAA1B;AACA,SAASC,0BAAT,QAA2C,oBAA3C;AAYA,gBACCC,cADc,IAMdD,0BAA0B,CAAIE,gBAAF,IAAwB;AACnD,SAAO,cAAcH,SAAd,CAAwC;AAG9CI,IAAAA,WAAW,CAAEC,KAAF,EAAiB;AA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C,GAA/C;AAiEA,CAlEyB,EAkEvB,oBAlEuB,CAN3B","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"]}
@@ -92,7 +92,8 @@ export default function withFilters(hookName) {
92
92
  }
93
93
 
94
94
  render() {
95
- return createElement(FilteredComponent, this.props);
95
+ return createElement(FilteredComponent, { ...this.props
96
+ });
96
97
  }
97
98
 
98
99
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-filters/index.tsx"],"names":["Component","addAction","applyFilters","removeAction","createHigherOrderComponent","debounce","ANIMATION_FRAME_PERIOD","withFilters","hookName","OriginalComponent","namespace","FilteredComponent","ensureFilteredComponent","undefined","FilteredComponentRenderer","constructor","props","componentDidMount","instances","push","length","onHooksUpdated","componentWillUnmount","filter","instance","render","throttledForceUpdate","forEach","forceUpdate","updatedHookName"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,oBAA1B;AACA,SAASC,SAAT,EAAoBC,YAApB,EAAkCC,YAAlC,QAAsD,kBAAtD;AACA,SAASC,0BAAT,EAAqCC,QAArC,QAAqD,oBAArD;AAEA,MAAMC,sBAAsB,GAAG,EAA/B;AAEA;A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D;AACvDjB,UAAAA,YAAY,CAAE,aAAF,EAAiBO,SAAjB,CAAZ;AACAP,UAAAA,YAAY,CAAE,WAAF,EAAeO,SAAf,CAAZ;AACA;AACD;;AAEDe,MAAAA,MAAM,GAAG;AACR,eAAO,cAAC,iBAAD,EAAwB,KAAKT,KAA7B,CAAP;AACA;;AApCgD;;AAuClDF,IAAAA,yBAAyB,CAACI,SAA1B,GAAsC,EAAtC;AAEA;AACF;AACA;AACA;;AACE,UAAMQ,oBAAoB,GAAGrB,QAAQ,CAAE,MAAM;AAC5C;AACA;AACAM,MAAAA,iBAAiB,GAAGT,YAAY,CAC/BM,QAD+B,EAE/BC,iBAF+B,CAAhC,CAH4C,CAQ5C;;AACAK,MAAAA,yBAAyB,CAACI,SAA1B,CAAoCS,OAApC,CAA+CH,QAAF,IAAgB;AAC5DA,QAAAA,QAAQ,CAACI,WAAT;AACA,OAFD;AAGA,KAZoC,EAYlCtB,sBAZkC,CAArC;AAcA;AACF;AACA;AACA;AACA;AACA;AACA;;AACE,aAASe,cAAT,CAAyBQ,eAAzB,EAAmD;AAClD,UAAKA,eAAe,KAAKrB,QAAzB,EAAoC;AACnCkB,QAAAA,oBAAoB;AACpB;AACD;;AAED,WAAOZ,yBAAP;AACA,GAhGgC,EAgG9B,aAhG8B,CAAjC;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":["Component","addAction","applyFilters","removeAction","createHigherOrderComponent","debounce","ANIMATION_FRAME_PERIOD","withFilters","hookName","OriginalComponent","namespace","FilteredComponent","ensureFilteredComponent","undefined","FilteredComponentRenderer","constructor","props","componentDidMount","instances","push","length","onHooksUpdated","componentWillUnmount","filter","instance","render","throttledForceUpdate","forEach","forceUpdate","updatedHookName"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,oBAA1B;AACA,SAASC,SAAT,EAAoBC,YAApB,EAAkCC,YAAlC,QAAsD,kBAAtD;AACA,SAASC,0BAAT,EAAqCC,QAArC,QAAqD,oBAArD;AAEA,MAAMC,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;;AACA,eAAe,SAASC,WAAT,CAAsBC,QAAtB,EAAyC;AACvD,SAAOJ,0BAA0B,CAAIK,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,GAAGT,YAAY,CAC/BM,QAD+B,EAE/BC,iBAF+B,CAAhC;AAIA;AACD;;AAED,UAAMK,yBAAN,SAAwCd,SAAxC,CAAkD;AAGjDe,MAAAA,WAAW,CAAEC,KAAF,EAAoC;AAC9C,cAAOA,KAAP;AAEAJ,QAAAA,uBAAuB;AACvB;;AAEDK,MAAAA,iBAAiB,GAAG;AACnBH,QAAAA,yBAAyB,CAACI,SAA1B,CAAoCC,IAApC,CAA0C,IAA1C,EADmB,CAGnB;AACA;;AACA,YAAKL,yBAAyB,CAACI,SAA1B,CAAoCE,MAApC,KAA+C,CAApD,EAAwD;AACvDnB,UAAAA,SAAS,CAAE,aAAF,EAAiBS,SAAjB,EAA4BW,cAA5B,CAAT;AACApB,UAAAA,SAAS,CAAE,WAAF,EAAeS,SAAf,EAA0BW,cAA1B,CAAT;AACA;AACD;;AAEDC,MAAAA,oBAAoB,GAAG;AACtBR,QAAAA,yBAAyB,CAACI,SAA1B,GACCJ,yBAAyB,CAACI,SAA1B,CAAoCK,MAApC,CACGC,QAAF,IAAgBA,QAAQ,KAAK,IAD9B,CADD,CADsB,CAMtB;AACA;;AACA,YAAKV,yBAAyB,CAACI,SAA1B,CAAoCE,MAApC,KAA+C,CAApD,EAAwD;AACvDjB,UAAAA,YAAY,CAAE,aAAF,EAAiBO,SAAjB,CAAZ;AACAP,UAAAA,YAAY,CAAE,WAAF,EAAeO,SAAf,CAAZ;AACA;AACD;;AAEDe,MAAAA,MAAM,GAAG;AACR,eAAO,cAAC,iBAAD,OAAwB,KAAKT;AAA7B,UAAP;AACA;;AApCgD;;AAuClDF,IAAAA,yBAAyB,CAACI,SAA1B,GAAsC,EAAtC;AAEA;AACF;AACA;AACA;;AACE,UAAMQ,oBAAoB,GAAGrB,QAAQ,CAAE,MAAM;AAC5C;AACA;AACAM,MAAAA,iBAAiB,GAAGT,YAAY,CAC/BM,QAD+B,EAE/BC,iBAF+B,CAAhC,CAH4C,CAQ5C;;AACAK,MAAAA,yBAAyB,CAACI,SAA1B,CAAoCS,OAApC,CAA+CH,QAAF,IAAgB;AAC5DA,QAAAA,QAAQ,CAACI,WAAT;AACA,OAFD;AAGA,KAZoC,EAYlCtB,sBAZkC,CAArC;AAcA;AACF;AACA;AACA;AACA;AACA;AACA;;AACE,aAASe,cAAT,CAAyBQ,eAAzB,EAAmD;AAClD,UAAKA,eAAe,KAAKrB,QAAzB,EAAoC;AACnCkB,QAAAA,oBAAoB;AACpB;AACD;;AAED,WAAOZ,yBAAP;AACA,GAhGgC,EAgG9B,aAhG8B,CAAjC;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,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
  //@ts-nocheck
4
3
 
@@ -10,8 +9,10 @@ import { createHigherOrderComponent, __experimentalUseFocusOutside as useFocusOu
10
9
  export default createHigherOrderComponent(WrappedComponent => props => {
11
10
  const [handleFocusOutside, setHandleFocusOutside] = useState();
12
11
  const bindFocusOutsideHandler = useCallback(node => setHandleFocusOutside(() => node?.handleFocusOutside ? node.handleFocusOutside.bind(node) : undefined), []);
13
- return createElement("div", useFocusOutside(handleFocusOutside), createElement(WrappedComponent, _extends({
14
- ref: bindFocusOutsideHandler
15
- }, props)));
12
+ return createElement("div", { ...useFocusOutside(handleFocusOutside)
13
+ }, createElement(WrappedComponent, {
14
+ ref: bindFocusOutsideHandler,
15
+ ...props
16
+ }));
16
17
  }, 'withFocusOutside');
17
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-focus-outside/index.js"],"names":["useCallback","useState","createHigherOrderComponent","__experimentalUseFocusOutside","useFocusOutside","WrappedComponent","props","handleFocusOutside","setHandleFocusOutside","bindFocusOutsideHandler","node","bind","undefined"],"mappings":";;AAAA;;AAEA;AACA;AACA;AACA,SAASA,WAAT,EAAsBC,QAAtB,QAAsC,oBAAtC;AACA,SACCC,0BADD,EAECC,6BAA6B,IAAIC,eAFlC,QAGO,oBAHP;AAKA,eAAeF,0BAA0B,CACtCG,gBAAF,IAA0BC,KAAF,IAAa;AACpC,QAAM,CAAEC,kBAAF,EAAsBC,qBAAtB,IAAgDP,QAAQ,EAA9D;AACA,QAAMQ,uBAAuB,GAAGT,WAAW,CACxCU,IAAF,IACCF,qBAAqB,CAAE,MACtBE,IAAI,EAAEH,kBAAN,GACGG,IAAI,CAACH,kBAAL,CAAwBI,IAAxB,CAA8BD,IAA9B,CADH,GAEGE,SAHiB,CAFoB,EAO1C,EAP0C,CAA3C;AAUA,SACC,qBAAUR,eAAe,CAAEG,kBAAF,CAAzB,EACC,cAAC,gBAAD;AACC,IAAA,GAAG,EAAGE;AADP,KAEMH,KAFN,EADD,CADD;AAQA,CArBuC,EAsBxC,kBAtBwC,CAAzC","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":["useCallback","useState","createHigherOrderComponent","__experimentalUseFocusOutside","useFocusOutside","WrappedComponent","props","handleFocusOutside","setHandleFocusOutside","bindFocusOutsideHandler","node","bind","undefined"],"mappings":";AAAA;;AAEA;AACA;AACA;AACA,SAASA,WAAT,EAAsBC,QAAtB,QAAsC,oBAAtC;AACA,SACCC,0BADD,EAECC,6BAA6B,IAAIC,eAFlC,QAGO,oBAHP;AAKA,eAAeF,0BAA0B,CACtCG,gBAAF,IAA0BC,KAAF,IAAa;AACpC,QAAM,CAAEC,kBAAF,EAAsBC,qBAAtB,IAAgDP,QAAQ,EAA9D;AACA,QAAMQ,uBAAuB,GAAGT,WAAW,CACxCU,IAAF,IACCF,qBAAqB,CAAE,MACtBE,IAAI,EAAEH,kBAAN,GACGG,IAAI,CAACH,kBAAL,CAAwBI,IAAxB,CAA8BD,IAA9B,CADH,GAEGE,SAHiB,CAFoB,EAO1C,EAP0C,CAA3C;AAUA,SACC,0BAAUR,eAAe,CAAEG,kBAAF;AAAzB,KACC,cAAC,gBAAD;AACC,IAAA,GAAG,EAAGE,uBADP;AAAA,OAEMH;AAFN,IADD,CADD;AAQA,CArBuC,EAsBxC,kBAtBwC,CAAzC","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,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -14,8 +13,10 @@ import { createHigherOrderComponent, __experimentalUseFocusOutside as useFocusOu
14
13
  export default createHigherOrderComponent(WrappedComponent => props => {
15
14
  const [handleFocusOutside, setHandleFocusOutside] = useState();
16
15
  const bindFocusOutsideHandler = useCallback(node => setHandleFocusOutside(() => node?.handleFocusOutside ? node.handleFocusOutside.bind(node) : undefined), []);
17
- return createElement(View, useFocusOutside(handleFocusOutside), createElement(WrappedComponent, _extends({
18
- ref: bindFocusOutsideHandler
19
- }, props)));
16
+ return createElement(View, { ...useFocusOutside(handleFocusOutside)
17
+ }, createElement(WrappedComponent, {
18
+ ref: bindFocusOutsideHandler,
19
+ ...props
20
+ }));
20
21
  }, 'withFocusOutside');
21
22
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-focus-outside/index.native.js"],"names":["View","useCallback","useState","createHigherOrderComponent","__experimentalUseFocusOutside","useFocusOutside","WrappedComponent","props","handleFocusOutside","setHandleFocusOutside","bindFocusOutsideHandler","node","bind","undefined"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,cAArB;AACA;AACA;AACA;;AACA,SAASC,WAAT,EAAsBC,QAAtB,QAAsC,oBAAtC;AACA,SACCC,0BADD,EAECC,6BAA6B,IAAIC,eAFlC,QAGO,oBAHP;AAKA,eAAeF,0BAA0B,CACtCG,gBAAF,IAA0BC,KAAF,IAAa;AACpC,QAAM,CAAEC,kBAAF,EAAsBC,qBAAtB,IAAgDP,QAAQ,EAA9D;AACA,QAAMQ,uBAAuB,GAAGT,WAAW,CACxCU,IAAF,IACCF,qBAAqB,CAAE,MACtBE,IAAI,EAAEH,kBAAN,GACGG,IAAI,CAACH,kBAAL,CAAwBI,IAAxB,CAA8BD,IAA9B,CADH,GAEGE,SAHiB,CAFoB,EAO1C,EAP0C,CAA3C;AAUA,SACC,cAAC,IAAD,EAAWR,eAAe,CAAEG,kBAAF,CAA1B,EACC,cAAC,gBAAD;AACC,IAAA,GAAG,EAAGE;AADP,KAEMH,KAFN,EADD,CADD;AAQA,CArBuC,EAsBxC,kBAtBwC,CAAzC","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":["View","useCallback","useState","createHigherOrderComponent","__experimentalUseFocusOutside","useFocusOutside","WrappedComponent","props","handleFocusOutside","setHandleFocusOutside","bindFocusOutsideHandler","node","bind","undefined"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,cAArB;AACA;AACA;AACA;;AACA,SAASC,WAAT,EAAsBC,QAAtB,QAAsC,oBAAtC;AACA,SACCC,0BADD,EAECC,6BAA6B,IAAIC,eAFlC,QAGO,oBAHP;AAKA,eAAeF,0BAA0B,CACtCG,gBAAF,IAA0BC,KAAF,IAAa;AACpC,QAAM,CAAEC,kBAAF,EAAsBC,qBAAtB,IAAgDP,QAAQ,EAA9D;AACA,QAAMQ,uBAAuB,GAAGT,WAAW,CACxCU,IAAF,IACCF,qBAAqB,CAAE,MACtBE,IAAI,EAAEH,kBAAN,GACGG,IAAI,CAACH,kBAAL,CAAwBI,IAAxB,CAA8BD,IAA9B,CADH,GAEGE,SAHiB,CAFoB,EAO1C,EAP0C,CAA3C;AAUA,SACC,cAAC,IAAD,OAAWR,eAAe,CAAEG,kBAAF;AAA1B,KACC,cAAC,gBAAD;AACC,IAAA,GAAG,EAAGE,uBADP;AAAA,OAEMH;AAFN,IADD,CADD;AAQA,CArBuC,EAsBxC,kBAtBwC,CAAzC","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"]}
@@ -41,7 +41,8 @@ options => {
41
41
  const ref = useFocusReturn(onFocusReturn);
42
42
  return createElement("div", {
43
43
  ref: ref
44
- }, createElement(WrappedComponent, props));
44
+ }, createElement(WrappedComponent, { ...props
45
+ }));
45
46
  };
46
47
 
47
48
  return WithFocusReturn;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-focus-return/index.tsx"],"names":["Component","createHigherOrderComponent","useFocusReturn","deprecated","isComponentLike","object","options","HoC","onFocusReturn","WrappedComponent","WithFocusReturn","props","ref","Provider","children","since","hint"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,oBAA1B;AACA,SAASC,0BAAT,EAAqCC,cAArC,QAA2D,oBAA3D;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,eAAT,CAA0BC,MAA1B,EAAuE;AACtE,SAAOA,MAAM,YAAYL,SAAlB,IAA+B,OAAOK,MAAP,KAAkB,UAAxD;AACA;;AAMD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeJ,0BAA0B,EACxC;AACEK,OAAF,IAAwD;AACvD,QAAMC,GAAG,GACR,CAAE;AAAEC,IAAAA;AAAF,MAA2B,EAA7B,KACEC,gBAAF,IAA6C;AAC5C,UAAMC,eAAe,GACpBC,KADuB,IAEnB;AACJ,YAAMC,GAAG,GAAGV,cAAc,CAAEM,aAAF,CAA1B;AACA,aACC;AAAK,QAAA,GAAG,EAAGI;AAAX,SACC,cAAC,gBAAD,EAAuBD,KAAvB,CADD,CADD;AAKA,KATD;;AAWA,WAAOD,eAAP;AACA,GAfF;;AAiBA,MAAKN,eAAe,CAAEE,OAAF,CAApB,EAAkC;AACjC,UAAMG,gBAAgB,GAAGH,OAAzB;AACA,WAAOC,GAAG,GAAIE,gBAAJ,CAAV;AACA;;AAED,SAAOF,GAAG,CAAED,OAAF,CAAV;AACA,CA1BuC,EA2BxC,iBA3BwC,CAAzC;AA8BA,OAAO,MAAMO,QAAQ,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAAmD;AAC1EX,EAAAA,UAAU,CAAE,6CAAF,EAAiD;AAC1DY,IAAAA,KAAK,EAAE,KADmD;AAE1DC,IAAAA,IAAI,EAAE;AAFoD,GAAjD,CAAV;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":["Component","createHigherOrderComponent","useFocusReturn","deprecated","isComponentLike","object","options","HoC","onFocusReturn","WrappedComponent","WithFocusReturn","props","ref","Provider","children","since","hint"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,oBAA1B;AACA,SAASC,0BAAT,EAAqCC,cAArC,QAA2D,oBAA3D;AACA,OAAOC,UAAP,MAAuB,uBAAvB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,SAASC,eAAT,CAA0BC,MAA1B,EAAuE;AACtE,SAAOA,MAAM,YAAYL,SAAlB,IAA+B,OAAOK,MAAP,KAAkB,UAAxD;AACA;;AAMD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeJ,0BAA0B,EACxC;AACEK,OAAF,IAAwD;AACvD,QAAMC,GAAG,GACR,CAAE;AAAEC,IAAAA;AAAF,MAA2B,EAA7B,KACEC,gBAAF,IAA6C;AAC5C,UAAMC,eAAe,GACpBC,KADuB,IAEnB;AACJ,YAAMC,GAAG,GAAGV,cAAc,CAAEM,aAAF,CAA1B;AACA,aACC;AAAK,QAAA,GAAG,EAAGI;AAAX,SACC,cAAC,gBAAD,OAAuBD;AAAvB,QADD,CADD;AAKA,KATD;;AAWA,WAAOD,eAAP;AACA,GAfF;;AAiBA,MAAKN,eAAe,CAAEE,OAAF,CAApB,EAAkC;AACjC,UAAMG,gBAAgB,GAAGH,OAAzB;AACA,WAAOC,GAAG,GAAIE,gBAAJ,CAAV;AACA;;AAED,SAAOF,GAAG,CAAED,OAAF,CAAV;AACA,CA1BuC,EA2BxC,iBA3BwC,CAAzC;AA8BA,OAAO,MAAMO,QAAQ,GAAG,CAAE;AAAEC,EAAAA;AAAF,CAAF,KAAmD;AAC1EX,EAAAA,UAAU,CAAE,6CAAF,EAAiD;AAC1DY,IAAAA,KAAK,EAAE,KADmD;AAE1DC,IAAAA,IAAI,EAAE;AAFoD,GAAjD,CAAV;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,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -83,9 +82,10 @@ export default createHigherOrderComponent(OriginalComponent => {
83
82
  onRemove: noticeOperations.removeNotice
84
83
  })
85
84
  };
86
- return isForwardRef ? createElement(OriginalComponent, _extends({}, propsOut, {
85
+ return isForwardRef ? createElement(OriginalComponent, { ...propsOut,
87
86
  ref: ref
88
- })) : createElement(OriginalComponent, propsOut);
87
+ }) : createElement(OriginalComponent, { ...propsOut
88
+ });
89
89
  }
90
90
 
91
91
  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":["v4","uuid","forwardRef","useState","useMemo","createHigherOrderComponent","NoticeList","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":";;;AAAA;AACA;AACA;AACA,SAASA,EAAE,IAAIC,IAAf,QAA2B,MAA3B;AAEA;AACA;AACA;;AACA,SAASC,UAAT,EAAqBC,QAArB,EAA+BC,OAA/B,QAA8C,oBAA9C;AACA,SAASC,0BAAT,QAA2C,oBAA3C;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,mBAAvB;;AAGA;AACA;AACA;AACA;AACA;AACA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AoB,CAApB,IACT,cAAC,UAAD;AACC,QAAA,SAAS,EAAC,4BADX;AAEC,QAAA,OAAO,EAAGjB,UAFX;AAGC,QAAA,QAAQ,EAAGE,gBAAgB,CAACU;AAH7B;AALe,KAAjB;AAaA,WAAOM,YAAY,GAClB,cAAC,iBAAD,eAAwBH,QAAxB;AAAmC,MAAA,GAAG,EAAGhB;AAAzC,OADkB,GAGlB,cAAC,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,WAAO3B,UAAU,CAAEM,SAAF,CAAjB;AACA;;AACD,SAAOA,SAAP;AACA,CArEwC,EAqEtC,aArEsC,CAAzC","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":["v4","uuid","forwardRef","useState","useMemo","createHigherOrderComponent","NoticeList","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":";;AAAA;AACA;AACA;AACA,SAASA,EAAE,IAAIC,IAAf,QAA2B,MAA3B;AAEA;AACA;AACA;;AACA,SAASC,UAAT,EAAqBC,QAArB,EAA+BC,OAA/B,QAA8C,oBAA9C;AACA,SAASC,0BAAT,QAA2C,oBAA3C;AAEA;AACA;AACA;;AACA,OAAOC,UAAP,MAAuB,mBAAvB;;AAGA;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,eAAeD,0BAA0B,CAAIE,iBAAF,IAAyB;AACnE,WAASC,SAAT,CACCC,KADD,EAECC,GAFD,EAGE;AACD,UAAM,CAAEC,UAAF,EAAcC,aAAd,IAAgCT,QAAQ,CAE3C,EAF2C,CAA9C;AAIA,UAAMU,gBAAgB,GAAGT,OAAO,CAE7B,MAAM;AACR,YAAMU,YAAqE,GACxEC,MAAF,IAAc;AACb,cAAMC,WAAW,GAAGD,MAAM,CAACE,EAAP,GACjBF,MADiB,GAEj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AAkB,UAAvB,EAAoC;AACnCD,IAAAA,YAAY,GAAG,IAAf;AACA,WAAO3B,UAAU,CAAEM,SAAF,CAAjB;AACA;;AACD,SAAOA,SAAP;AACA,CArEwC,EAqEtC,aArEsC,CAAzC","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,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -19,8 +18,8 @@ import { speak } from '@wordpress/a11y';
19
18
  * @return {WPComponent} The wrapped component.
20
19
  */
21
20
 
22
- export default createHigherOrderComponent(Component => props => createElement(Component, _extends({}, props, {
21
+ export default createHigherOrderComponent(Component => props => createElement(Component, { ...props,
23
22
  speak: speak,
24
23
  debouncedSpeak: useDebounce(speak, 500)
25
- })), 'withSpokenMessages');
24
+ }), 'withSpokenMessages');
26
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/higher-order/with-spoken-messages/index.tsx"],"names":["createHigherOrderComponent","useDebounce","speak","Component","props"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,0BAAT,EAAqCC,WAArC,QAAwD,oBAAxD;AACA,SAASC,KAAT,QAAsB,iBAAtB;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAeF,0BAA0B,CACtCG,SAAF,IAAmBC,KAAF,IAEf,cAAC,SAAD,eACMA,KADN;AAEC,EAAA,KAAK,EAAGF,KAFT;AAGC,EAAA,cAAc,EAAGD,WAAW,CAAEC,KAAF,EAAS,GAAT;AAH7B,GAHsC,EASxC,oBATwC,CAAzC","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":["createHigherOrderComponent","useDebounce","speak","Component","props"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,0BAAT,EAAqCC,WAArC,QAAwD,oBAAxD;AACA,SAASC,KAAT,QAAsB,iBAAtB;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,eAAeF,0BAA0B,CACtCG,SAAF,IAAmBC,KAAF,IAEf,cAAC,SAAD,OACMA,KADN;AAEC,EAAA,KAAK,EAAGF,KAFT;AAGC,EAAA,cAAc,EAAGD,WAAW,CAAEC,KAAF,EAAS,GAAT;AAH7B,EAHsC,EASxC,oBATwC,CAAzC","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,5 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
-
3
1
  /**
4
2
  * External dependencies
5
3
  */
@@ -21,10 +19,11 @@ function Icon({
21
19
  ...additionalProps
22
20
  }) {
23
21
  if ('string' === typeof icon) {
24
- return createElement(Dashicon, _extends({
22
+ return createElement(Dashicon, {
25
23
  icon: icon,
26
- size: size
27
- }, additionalProps));
24
+ size: size,
25
+ ...additionalProps
26
+ });
28
27
  }
29
28
 
30
29
  if (isValidElement(icon) && Dashicon === icon.type) {
@@ -45,7 +44,8 @@ function Icon({
45
44
  height: size,
46
45
  ...additionalProps
47
46
  };
48
- return createElement(SVG, appliedProps);
47
+ return createElement(SVG, { ...appliedProps
48
+ });
49
49
  }
50
50
 
51
51
  if (isValidElement(icon)) {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/icon/index.tsx"],"names":["cloneElement","createElement","isValidElement","SVG","Dashicon","Icon","icon","size","additionalProps","type","appliedProps","props","width","height"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SACCA,YADD,EAECC,aAFD,EAGCC,cAHD,QAIO,oBAJP;AAKA,SAASC,GAAT,QAAoB,uBAApB;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,aAArB;;AAiCA,SAASC,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,cAAC,QAAD;AACC,MAAA,IAAI,EAAGA,IADR;AAEC,MAAA,IAAI,EAAGC;AAFR,OAGQC,eAHR,EADD;AAOA;;AAED,MAAKN,cAAc,CAAEI,IAAF,CAAd,IAA0BF,QAAQ,KAAKE,IAAI,CAACG,IAAjD,EAAwD;AACvD,WAAOT,YAAY,CAAEM,IAAF,EAAQ,EAC1B,GAAGE;AADuB,KAAR,CAAnB;AAGA;;AAED,MAAK,eAAe,OAAOF,IAA3B,EAAkC;AACjC,WAAOL,aAAa,CAAEK,IAAF,EAAQ;AAC3BC,MAAAA,IAD2B;AAE3B,SAAGC;AAFwB,KAAR,CAApB;AAIA;;AAED,MAAKF,IAAI,KAAMA,IAAI,CAACG,IAAL,KAAc,KAAd,IAAuBH,IAAI,CAACG,IAAL,KAAcN,GAA3C,CAAT,EAA4D;AAC3D,UAAMO,YAAY,GAAG,EACpB,GAAGJ,IAAI,CAACK,KADY;AAEpBC,MAAAA,KAAK,EAAEL,IAFa;AAGpBM,MAAAA,MAAM,EAAEN,IAHY;AAIpB,SAAGC;AAJiB,KAArB;AAOA,WAAO,cAAC,GAAD,EAAUE,YAAV,CAAP;AACA;;AAED,MAAKR,cAAc,CAAEI,IAAF,CAAnB,EAA8B;AAC7B,WAAON,YAAY,CAAEM,IAAF,EAAQ;AAC1B;AACAC,MAAAA,IAF0B;AAG1B,SAAGC;AAHuB,KAAR,CAAnB;AAKA;;AAED,SAAOF,IAAP;AACA;;AAED,eAAeD,IAAf","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":["cloneElement","createElement","isValidElement","SVG","Dashicon","Icon","icon","size","additionalProps","type","appliedProps","props","width","height"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SACCA,YADD,EAECC,aAFD,EAGCC,cAHD,QAIO,oBAJP;AAKA,SAASC,GAAT,QAAoB,uBAApB;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,aAArB;;AAiCA,SAASC,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,cAAC,QAAD;AACC,MAAA,IAAI,EAAGA,IADR;AAEC,MAAA,IAAI,EAAGC,IAFR;AAAA,SAGQC;AAHR,MADD;AAOA;;AAED,MAAKN,cAAc,CAAEI,IAAF,CAAd,IAA0BF,QAAQ,KAAKE,IAAI,CAACG,IAAjD,EAAwD;AACvD,WAAOT,YAAY,CAAEM,IAAF,EAAQ,EAC1B,GAAGE;AADuB,KAAR,CAAnB;AAGA;;AAED,MAAK,eAAe,OAAOF,IAA3B,EAAkC;AACjC,WAAOL,aAAa,CAAEK,IAAF,EAAQ;AAC3BC,MAAAA,IAD2B;AAE3B,SAAGC;AAFwB,KAAR,CAApB;AAIA;;AAED,MAAKF,IAAI,KAAMA,IAAI,CAACG,IAAL,KAAc,KAAd,IAAuBH,IAAI,CAACG,IAAL,KAAcN,GAA3C,CAAT,EAA4D;AAC3D,UAAMO,YAAY,GAAG,EACpB,GAAGJ,IAAI,CAACK,KADY;AAEpBC,MAAAA,KAAK,EAAEL,IAFa;AAGpBM,MAAAA,MAAM,EAAEN,IAHY;AAIpB,SAAGC;AAJiB,KAArB;AAOA,WAAO,cAAC,GAAD,OAAUE;AAAV,MAAP;AACA;;AAED,MAAKR,cAAc,CAAEI,IAAF,CAAnB,EAA8B;AAC7B,WAAON,YAAY,CAAEM,IAAF,EAAQ;AAC1B;AACAC,MAAAA,IAF0B;AAG1B,SAAGC;AAHuB,KAAR,CAAnB;AAKA;;AAED,SAAOF,IAAP;AACA;;AAED,eAAeD,IAAf","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,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -84,7 +83,8 @@ export function UnforwardedInputControl({
84
83
  size: size,
85
84
  style: style,
86
85
  suffix: suffix
87
- }, createElement(InputField, _extends({}, props, helpProp, {
86
+ }, createElement(InputField, { ...props,
87
+ ...helpProp,
88
88
  __next36pxDefaultSize: __next36pxDefaultSize,
89
89
  className: "components-input-control__input",
90
90
  disabled: disabled,
@@ -98,8 +98,9 @@ export function UnforwardedInputControl({
98
98
  ref: ref,
99
99
  setIsFocused: setIsFocused,
100
100
  size: size,
101
- stateReducer: stateReducer
102
- }, draftHookProps))));
101
+ stateReducer: stateReducer,
102
+ ...draftHookProps
103
+ })));
103
104
  }
104
105
  /**
105
106
  * 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":["classNames","useInstanceId","useState","forwardRef","InputBase","InputField","space","useDraft","BaseControl","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":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;;AAGA;AACA;AACA;AACA,SAASC,aAAT,QAA8B,oBAA9B;AACA,SAASC,QAAT,EAAmBC,UAAnB,QAAqC,oBAArC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AAEA,SAASC,KAAT,QAAsB,mBAAtB;AACA,SAASC,QAAT,QAAyB,SAAzB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;;AAEA,MAAMC,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,SAASC,WAAT,CAAsBC,MAAtB,EAAwC;AACvC,QAAMC,UAAU,GAAGX,aAAa,CAAEY,YAAF,CAAhC;AACA,QAAMC,EAAE,GAAI,2BAA2BF,UAAY,EAAnD;AAEA,SAAOD,MAAM,IAAIG,EAAjB;AACA;;AAED,OAA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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAM5B,YAAY,GAAGV,UAAU,CAAEY,uBAAF,CAA/B;AAEP,eAAeF,YAAf","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":["classNames","useInstanceId","useState","forwardRef","InputBase","InputField","space","useDraft","BaseControl","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":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;;AAGA;AACA;AACA;AACA,SAASC,aAAT,QAA8B,oBAA9B;AACA,SAASC,QAAT,EAAmBC,UAAnB,QAAqC,oBAArC;AAEA;AACA;AACA;;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AAEA,SAASC,KAAT,QAAsB,mBAAtB;AACA,SAASC,QAAT,QAAyB,SAAzB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;;AAEA,MAAMC,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,SAASC,WAAT,CAAsBC,MAAtB,EAAwC;AACvC,QAAMC,UAAU,GAAGX,aAAa,CAAEY,YAAF,CAAhC;AACA,QAAMC,EAAE,GAAI,2BAA2BF,UAAY,EAAnD;AAEA,SAAOD,MAAM,IAAIG,EAAjB;AACA;;AAED,OAAO,SAASC,uBAAT,CACN;AACCC,EAAAA,qBADD;AAECC,EAAAA,sBAAsB,EAAEC,YAAY,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ACA;AACA;AACA;AACA;;AACA,OAAO,MAAM5B,YAAY,GAAGV,UAAU,CAAEY,uBAAF,CAA/B;AAEP,eAAeF,YAAf","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,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -86,13 +85,14 @@ export function InputBase({
86
85
  };
87
86
  }, [paddingLeft, paddingRight]);
88
87
  return (// @ts-expect-error The `direction` prop from Flex (FlexDirection) conflicts with legacy SVGAttributes `direction` (string) that come from React intrinsic prop definitions.
89
- createElement(Root, _extends({}, props, getUIFlexProps(labelPosition), {
88
+ createElement(Root, { ...props,
89
+ ...getUIFlexProps(labelPosition),
90
90
  className: className,
91
91
  gap: 2,
92
92
  isFocused: isFocused,
93
93
  labelPosition: labelPosition,
94
94
  ref: ref
95
- }), createElement(Label, {
95
+ }, createElement(Label, {
96
96
  className: "components-input-control__label",
97
97
  hideLabelFromVision: hideLabelFromVision,
98
98
  labelPosition: labelPosition,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/input-control/input-base.tsx"],"names":["useInstanceId","forwardRef","useMemo","Backdrop","Label","Container","Root","Prefix","Suffix","getSizeConfig","ContextSystemProvider","useUniqueId","idProp","instanceId","InputBase","id","getUIFlexProps","labelPosition","props","direction","expanded","gap","justify","__next36pxDefaultSize","__unstableInputWidth","children","className","disabled","hideLabelFromVision","isFocused","label","prefix","size","suffix","ref","hideLabel","paddingLeft","paddingRight","inputSize","prefixSuffixContextValue","InputControlPrefixWrapper","InputControlSuffixWrapper"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,oBAA9B;AACA,SAASC,UAAT,EAAqBC,OAArB,QAAoC,oBAApC;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MA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AMGN,QANH,EAOGQ,MAAM,IACP,cAAC,MAAD;AAAQ,MAAA,SAAS,EAAC;AAAlB,OACGA,MADH,CARF,CAPD,EAoBC,cAAC,QAAD;AAAU,MAAA,QAAQ,EAAGN,QAArB;AAAgC,MAAA,SAAS,EAAGE;AAA5C,MApBD,CAjBD;AAFD;AA2CA;AAED,eAAe5B,UAAU,CAAEa,SAAF,CAAzB","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Backdrop from './backdrop';\nimport Label from './label';\nimport {\n\tContainer,\n\tRoot,\n\tPrefix,\n\tSuffix,\n\tgetSizeConfig,\n} from './styles/input-control-styles';\nimport type { InputBaseProps, LabelPosition } from './types';\nimport { ContextSystemProvider, WordPressComponentProps } from '../ui/context';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( InputBase );\n\tconst id = `input-base-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\n// Adapter to map props for the new ui/flex component.\nfunction getUIFlexProps( labelPosition?: LabelPosition ) {\n\tconst props: {\n\t\tdirection?: string;\n\t\tgap?: number;\n\t\tjustify?: string;\n\t\texpanded?: boolean;\n\t} = {};\n\tswitch ( labelPosition ) {\n\t\tcase 'top':\n\t\t\tprops.direction = 'column';\n\t\t\tprops.expanded = false;\n\t\t\tprops.gap = 0;\n\t\t\tbreak;\n\t\tcase 'bottom':\n\t\t\tprops.direction = 'column-reverse';\n\t\t\tprops.expanded = false;\n\t\t\tprops.gap = 0;\n\t\t\tbreak;\n\t\tcase 'edge':\n\t\t\tprops.justify = 'space-between';\n\t\t\tbreak;\n\t}\n\n\treturn props;\n}\n\nexport function InputBase(\n\t{\n\t\t__next36pxDefaultSize,\n\t\t__unstableInputWidth,\n\t\tchildren,\n\t\tclassName,\n\t\tdisabled = false,\n\t\thideLabelFromVision = false,\n\t\tlabelPosition,\n\t\tid: idProp,\n\t\tisFocused = false,\n\t\tlabel,\n\t\tprefix,\n\t\tsize = 'default',\n\t\tsuffix,\n\t\t...props\n\t}: WordPressComponentProps< InputBaseProps, 'div' >,\n\tref: ForwardedRef< HTMLDivElement >\n) {\n\tconst id = useUniqueId( idProp );\n\tconst hideLabel = hideLabelFromVision || ! label;\n\n\tconst { paddingLeft, paddingRight } = getSizeConfig( {\n\t\tinputSize: size,\n\t\t__next36pxDefaultSize,\n\t} );\n\tconst prefixSuffixContextValue = useMemo( () => {\n\t\treturn {\n\t\t\tInputControlPrefixWrapper: { paddingLeft },\n\t\t\tInputControlSuffixWrapper: { paddingRight },\n\t\t};\n\t}, [ paddingLeft, paddingRight ] );\n\n\treturn (\n\t\t// @ts-expect-error The `direction` prop from Flex (FlexDirection) conflicts with legacy SVGAttributes `direction` (string) that come from React intrinsic prop definitions.\n\t\t<Root\n\t\t\t{ ...props }\n\t\t\t{ ...getUIFlexProps( labelPosition ) }\n\t\t\tclassName={ className }\n\t\t\tgap={ 2 }\n\t\t\tisFocused={ isFocused }\n\t\t\tlabelPosition={ labelPosition }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t<Label\n\t\t\t\tclassName=\"components-input-control__label\"\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\thtmlFor={ id }\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</Label>\n\t\t\t<Container\n\t\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\t\tclassName=\"components-input-control__container\"\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideLabel={ hideLabel }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t>\n\t\t\t\t<ContextSystemProvider value={ prefixSuffixContextValue }>\n\t\t\t\t\t{ prefix && (\n\t\t\t\t\t\t<Prefix className=\"components-input-control__prefix\">\n\t\t\t\t\t\t\t{ prefix }\n\t\t\t\t\t\t</Prefix>\n\t\t\t\t\t) }\n\t\t\t\t\t{ children }\n\t\t\t\t\t{ suffix && (\n\t\t\t\t\t\t<Suffix className=\"components-input-control__suffix\">\n\t\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t\t</Suffix>\n\t\t\t\t\t) }\n\t\t\t\t</ContextSystemProvider>\n\t\t\t\t<Backdrop disabled={ disabled } isFocused={ isFocused } />\n\t\t\t</Container>\n\t\t</Root>\n\t);\n}\n\nexport default forwardRef( InputBase );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/input-control/input-base.tsx"],"names":["useInstanceId","forwardRef","useMemo","Backdrop","Label","Container","Root","Prefix","Suffix","getSizeConfig","ContextSystemProvider","useUniqueId","idProp","instanceId","InputBase","id","getUIFlexProps","labelPosition","props","direction","expanded","gap","justify","__next36pxDefaultSize","__unstableInputWidth","children","className","disabled","hideLabelFromVision","isFocused","label","prefix","size","suffix","ref","hideLabel","paddingLeft","paddingRight","inputSize","prefixSuffixContextValue","InputControlPrefixWrapper","InputControlSuffixWrapper"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,oBAA9B;AACA,SAASC,UAAT,EAAqBC,OAArB,QAAoC,oBAApC;AAEA;AACA;AACA;;AACA,OAAOC,QAAP,MAAqB,YAArB;AACA,OAAOC,KAAP,MAAkB,SAAlB;AACA,SACCC,SADD,EAECC,IAFD,EAGCC,MAHD,EAICC,MAJD,EAKCC,aALD,QAMO,+BANP;AAQA,SAASC,qBAAT,QAA+D,eAA/D;;AAEA,SAASC,WAAT,CAAsBC,MAAtB,EAAwC;AACvC,QAAMC,UAAU,GAAGb,aAAa,CAAEc,SAAF,CAAhC;AACA,QAAMC,EAAE,GAAI,sBAAsBF,UAAY,EAA9C;AAEA,SAAOD,MAAM,IAAIG,EAAjB;AACA,C,CAED;;;AACA,SAASC,cAAT,CAAyBC,aAAzB,EAAyD;AACxD,QAAMC,KAKL,GAAG,EALJ;;AAMA,UAAS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AE;AAAEJ,QAAAA;AAAF;AAFrB,KAAP;AAIA,GALuC,EAKrC,CAAED,WAAF,EAAeC,YAAf,CALqC,CAAxC;AAOA,SACC;AACA,kBAAC,IAAD,OACMnB,KADN;AAAA,SAEMF,cAAc,CAAEC,aAAF,CAFpB;AAGC,MAAA,SAAS,EAAGS,SAHb;AAIC,MAAA,GAAG,EAAG,CAJP;AAKC,MAAA,SAAS,EAAGG,SALb;AAMC,MAAA,aAAa,EAAGZ,aANjB;AAOC,MAAA,GAAG,EAAGiB;AAPP,OASC,cAAC,KAAD;AACC,MAAA,SAAS,EAAC,iCADX;AAEC,MAAA,mBAAmB,EAAGN,mBAFvB;AAGC,MAAA,aAAa,EAAGX,aAHjB;AAIC,MAAA,OAAO,EAAGF;AAJX,OAMGe,KANH,CATD,EAiBC,cAAC,SAAD;AACC,MAAA,oBAAoB,EAAGN,oBADxB;AAEC,MAAA,SAAS,EAAC,qCAFX;AAGC,MAAA,QAAQ,EAAGG,QAHZ;AAIC,MAAA,SAAS,EAAGQ,SAJb;AAKC,MAAA,aAAa,EAAGlB;AALjB,OAOC,cAAC,qBAAD;AAAuB,MAAA,KAAK,EAAGsB;AAA/B,OACGR,MAAM,IACP,cAAC,MAAD;AAAQ,MAAA,SAAS,EAAC;AAAlB,OACGA,MADH,CAFF,EAMGN,QANH,EAOGQ,MAAM,IACP,cAAC,MAAD;AAAQ,MAAA,SAAS,EAAC;AAAlB,OACGA,MADH,CARF,CAPD,EAoBC,cAAC,QAAD;AAAU,MAAA,QAAQ,EAAGN,QAArB;AAAgC,MAAA,SAAS,EAAGE;AAA5C,MApBD,CAjBD;AAFD;AA2CA;AAED,eAAe5B,UAAU,CAAEa,SAAF,CAAzB","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Backdrop from './backdrop';\nimport Label from './label';\nimport {\n\tContainer,\n\tRoot,\n\tPrefix,\n\tSuffix,\n\tgetSizeConfig,\n} from './styles/input-control-styles';\nimport type { InputBaseProps, LabelPosition } from './types';\nimport { ContextSystemProvider, WordPressComponentProps } from '../ui/context';\n\nfunction useUniqueId( idProp?: string ) {\n\tconst instanceId = useInstanceId( InputBase );\n\tconst id = `input-base-control-${ instanceId }`;\n\n\treturn idProp || id;\n}\n\n// Adapter to map props for the new ui/flex component.\nfunction getUIFlexProps( labelPosition?: LabelPosition ) {\n\tconst props: {\n\t\tdirection?: string;\n\t\tgap?: number;\n\t\tjustify?: string;\n\t\texpanded?: boolean;\n\t} = {};\n\tswitch ( labelPosition ) {\n\t\tcase 'top':\n\t\t\tprops.direction = 'column';\n\t\t\tprops.expanded = false;\n\t\t\tprops.gap = 0;\n\t\t\tbreak;\n\t\tcase 'bottom':\n\t\t\tprops.direction = 'column-reverse';\n\t\t\tprops.expanded = false;\n\t\t\tprops.gap = 0;\n\t\t\tbreak;\n\t\tcase 'edge':\n\t\t\tprops.justify = 'space-between';\n\t\t\tbreak;\n\t}\n\n\treturn props;\n}\n\nexport function InputBase(\n\t{\n\t\t__next36pxDefaultSize,\n\t\t__unstableInputWidth,\n\t\tchildren,\n\t\tclassName,\n\t\tdisabled = false,\n\t\thideLabelFromVision = false,\n\t\tlabelPosition,\n\t\tid: idProp,\n\t\tisFocused = false,\n\t\tlabel,\n\t\tprefix,\n\t\tsize = 'default',\n\t\tsuffix,\n\t\t...props\n\t}: WordPressComponentProps< InputBaseProps, 'div' >,\n\tref: ForwardedRef< HTMLDivElement >\n) {\n\tconst id = useUniqueId( idProp );\n\tconst hideLabel = hideLabelFromVision || ! label;\n\n\tconst { paddingLeft, paddingRight } = getSizeConfig( {\n\t\tinputSize: size,\n\t\t__next36pxDefaultSize,\n\t} );\n\tconst prefixSuffixContextValue = useMemo( () => {\n\t\treturn {\n\t\t\tInputControlPrefixWrapper: { paddingLeft },\n\t\t\tInputControlSuffixWrapper: { paddingRight },\n\t\t};\n\t}, [ paddingLeft, paddingRight ] );\n\n\treturn (\n\t\t// @ts-expect-error The `direction` prop from Flex (FlexDirection) conflicts with legacy SVGAttributes `direction` (string) that come from React intrinsic prop definitions.\n\t\t<Root\n\t\t\t{ ...props }\n\t\t\t{ ...getUIFlexProps( labelPosition ) }\n\t\t\tclassName={ className }\n\t\t\tgap={ 2 }\n\t\t\tisFocused={ isFocused }\n\t\t\tlabelPosition={ labelPosition }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t<Label\n\t\t\t\tclassName=\"components-input-control__label\"\n\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t\thtmlFor={ id }\n\t\t\t>\n\t\t\t\t{ label }\n\t\t\t</Label>\n\t\t\t<Container\n\t\t\t\t__unstableInputWidth={ __unstableInputWidth }\n\t\t\t\tclassName=\"components-input-control__container\"\n\t\t\t\tdisabled={ disabled }\n\t\t\t\thideLabel={ hideLabel }\n\t\t\t\tlabelPosition={ labelPosition }\n\t\t\t>\n\t\t\t\t<ContextSystemProvider value={ prefixSuffixContextValue }>\n\t\t\t\t\t{ prefix && (\n\t\t\t\t\t\t<Prefix className=\"components-input-control__prefix\">\n\t\t\t\t\t\t\t{ prefix }\n\t\t\t\t\t\t</Prefix>\n\t\t\t\t\t) }\n\t\t\t\t\t{ children }\n\t\t\t\t\t{ suffix && (\n\t\t\t\t\t\t<Suffix className=\"components-input-control__suffix\">\n\t\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t\t</Suffix>\n\t\t\t\t\t) }\n\t\t\t\t</ContextSystemProvider>\n\t\t\t\t<Backdrop disabled={ disabled } isFocused={ isFocused } />\n\t\t\t</Container>\n\t\t</Root>\n\t);\n}\n\nexport default forwardRef( InputBase );\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -202,7 +201,8 @@ function InputField({
202
201
  };
203
202
  }
204
203
 
205
- return createElement(Input, _extends({}, props, dragProps, {
204
+ return createElement(Input, { ...props,
205
+ ...dragProps,
206
206
  className: "components-input-control__input",
207
207
  disabled: disabled,
208
208
  dragCursor: dragCursor,
@@ -219,7 +219,7 @@ function InputField({
219
219
  ,
220
220
  value: value !== null && value !== void 0 ? value : '',
221
221
  type: type
222
- }));
222
+ });
223
223
  }
224
224
 
225
225
  const ForwardedComponent = forwardRef(InputField);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/input-control/input-field.tsx"],"names":["useDrag","forwardRef","useRef","useDragCursor","Input","useInputControlStateReducer","noop","InputField","disabled","dragDirection","dragThreshold","id","isDragEnabled","isFocused","isPressEnterToChange","onBlur","onChange","onDrag","onDragEnd","onDragStart","onFocus","onKeyDown","onValidate","size","setIsFocused","stateReducer","state","value","valueProp","type","props","ref","change","commit","drag","dragEnd","dragStart","invalidate","pressDown","pressEnter","pressUp","reset","isDragging","isDirty","wasDirtyOnBlur","dragCursor","handleOnBlur","event","target","validity","valid","current","handleOnCommit","handleOnFocus","handleOnChange","nextValue","currentTarget","err","handleOnKeyDown","key","preventDefault","dragGestureProps","dragProps","distance","dragging","stopPropagation","axis","threshold","enabled","pointer","capture","handleOnMouseDown","onMouseDown","ownerDocument","activeElement","focus","ForwardedComponent"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;;AAWA;AACA;AACA;AACA,SAASC,UAAT,EAAqBC,MAArB,QAAmC,oBAAnC;AACA;AACA;AACA;;AAEA,SAASC,aAAT,QAA8B,SAA9B;AACA,SAASC,KAAT,QAAsB,+BAAtB;AACA,SAASC,2BAAT,QAA4C,mBAA5C;;AAGA,MAAMC,IAAI,GAAG,MAAM,CAAE,CAArB;;AAEA,SAASC,UAAT,CACC;AACCC,EAAAA,QAAQ,GAAG,KADZ;AAECC,EAAAA,aAAa,GAAG,GAFjB;AAGCC,EAAAA,aAAa,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,EAAExD,aAHV;AAICyD,IAAAA,OAAO,EAAE;AAAEC,MAAAA,OAAO,EAAE;AAAX;AAJV,GApC+B,CAAhC;AA4CA,QAAMR,SAAS,GAAGlD,aAAa,GAAGiD,gBAAgB,EAAnB,GAAwB,EAAvD;AACA;AACD;AACA;AACA;;AACC,MAAIU,iBAAJ;;AACA,MAAK1C,IAAI,KAAK,QAAd,EAAyB;AACxB0C,IAAAA,iBAAiB,GAAKxB,KAAF,IAA6C;AAChEjB,MAAAA,KAAK,CAAC0C,WAAN,GAAqBzB,KAArB;;AACA,UACCA,KAAK,CAACS,aAAN,KACAT,KAAK,CAACS,aAAN,CAAoBiB,aAApB,CAAkCC,aAFnC,EAGE;AACD3B,QAAAA,KAAK,CAACS,aAAN,CAAoBmB,KAApB;AACA;AACD,KARD;AASA;;AAED,SACC,cAAC,KAAD,eACM7C,KADN,EAEMgC,SAFN;AAGC,IAAA,SAAS,EAAC,iCAHX;AAIC,IAAA,QAAQ,EAAGtD,QAJZ;AAKC,IAAA,UAAU,EAAGqC,UALd;AAMC,IAAA,UAAU,EAAGH,UANd;AAOC,IAAA,EAAE,EAAG/B,EAPN;AAQC,IAAA,MAAM,EAAGmC,YARV;AASC,IAAA,QAAQ,EAAGQ,cATZ;AAUC,IAAA,OAAO,EAAGD,aAVX;AAWC,IAAA,SAAS,EAAGK,eAXb;AAYC,IAAA,WAAW,EAAGa,iBAZf;AAaC,IAAA,GAAG,EAAGxC,GAbP;AAcC,IAAA,SAAS,EAAGR,IAdb,CAeC;AACA;AAhBD;AAiBC,IAAA,KAAK,EAAGI,KAAH,aAAGA,KAAH,cAAGA,KAAH,GAAY,EAjBlB;AAkBC,IAAA,IAAI,EAAGE;AAlBR,KADD;AAsBA;;AAED,MAAM+C,kBAAkB,GAAG3E,UAAU,CAAEM,UAAF,CAArC;AAEA,eAAeqE,kBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { useDrag } from '@use-gesture/react';\nimport type {\n\tSyntheticEvent,\n\tChangeEvent,\n\tKeyboardEvent,\n\tPointerEvent,\n\tFocusEvent,\n\tForwardedRef,\n\tMouseEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useRef } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport { useDragCursor } from './utils';\nimport { Input } from './styles/input-control-styles';\nimport { useInputControlStateReducer } from './reducer/reducer';\nimport type { InputFieldProps } from './types';\n\nconst noop = () => {};\n\nfunction InputField(\n\t{\n\t\tdisabled = false,\n\t\tdragDirection = 'n',\n\t\tdragThreshold = 10,\n\t\tid,\n\t\tisDragEnabled = false,\n\t\tisFocused,\n\t\tisPressEnterToChange = false,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonDrag = noop,\n\t\tonDragEnd = noop,\n\t\tonDragStart = noop,\n\t\tonFocus = noop,\n\t\tonKeyDown = noop,\n\t\tonValidate = noop,\n\t\tsize = 'default',\n\t\tsetIsFocused,\n\t\tstateReducer = ( state: any ) => state,\n\t\tvalue: valueProp,\n\t\ttype,\n\t\t...props\n\t}: WordPressComponentProps< InputFieldProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t// State.\n\t\tstate,\n\t\t// Actions.\n\t\tchange,\n\t\tcommit,\n\t\tdrag,\n\t\tdragEnd,\n\t\tdragStart,\n\t\tinvalidate,\n\t\tpressDown,\n\t\tpressEnter,\n\t\tpressUp,\n\t\treset,\n\t} = useInputControlStateReducer(\n\t\tstateReducer,\n\t\t{\n\t\t\tisDragEnabled,\n\t\t\tvalue: valueProp,\n\t\t\tisPressEnterToChange,\n\t\t},\n\t\tonChange\n\t);\n\n\tconst { value, isDragging, isDirty } = state;\n\tconst wasDirtyOnBlur = useRef( false );\n\n\tconst dragCursor = useDragCursor( isDragging, dragDirection );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused?.( false );\n\n\t\t/**\n\t\t * If isPressEnterToChange is set, this commits the value to\n\t\t * the onChange callback.\n\t\t */\n\t\tif ( isDirty || ! event.target.validity.valid ) {\n\t\t\twasDirtyOnBlur.current = true;\n\t\t\thandleOnCommit( event );\n\t\t}\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused?.( true );\n\t};\n\n\tconst handleOnChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = event.target.value;\n\t\tchange( nextValue, event );\n\t};\n\n\tconst handleOnCommit = ( event: SyntheticEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = event.currentTarget.value;\n\n\t\ttry {\n\t\t\tonValidate( nextValue );\n\t\t\tcommit( nextValue, event );\n\t\t} catch ( err ) {\n\t\t\tinvalidate( err, event );\n\t\t}\n\t};\n\n\tconst handleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\tconst { key } = event;\n\t\tonKeyDown( event );\n\n\t\tswitch ( key ) {\n\t\t\tcase 'ArrowUp':\n\t\t\t\tpressUp( event );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrowDown':\n\t\t\t\tpressDown( event );\n\t\t\t\tbreak;\n\n\t\t\tcase 'Enter':\n\t\t\t\tpressEnter( event );\n\n\t\t\t\tif ( isPressEnterToChange ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\thandleOnCommit( event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'Escape':\n\t\t\t\tif ( isPressEnterToChange && isDirty ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treset( valueProp, event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tconst dragGestureProps = useDrag< PointerEvent< HTMLInputElement > >(\n\t\t( dragProps ) => {\n\t\t\tconst { distance, dragging, event, target } = dragProps;\n\n\t\t\t// The `target` prop always references the `input` element while, by\n\t\t\t// default, the `dragProps.event.target` property would reference the real\n\t\t\t// event target (i.e. any DOM element that the pointer is hovering while\n\t\t\t// dragging). Ensuring that the `target` is always the `input` element\n\t\t\t// allows consumers of `InputControl` (or any higher-level control) to\n\t\t\t// check the input's validity by accessing `event.target.validity.valid`.\n\t\t\tdragProps.event = {\n\t\t\t\t...dragProps.event,\n\t\t\t\ttarget,\n\t\t\t};\n\n\t\t\tif ( ! distance ) return;\n\t\t\tevent.stopPropagation();\n\n\t\t\t/**\n\t\t\t * Quick return if no longer dragging.\n\t\t\t * This prevents unnecessary value calculations.\n\t\t\t */\n\t\t\tif ( ! dragging ) {\n\t\t\t\tonDragEnd( dragProps );\n\t\t\t\tdragEnd( dragProps );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonDrag( dragProps );\n\t\t\tdrag( dragProps );\n\n\t\t\tif ( ! isDragging ) {\n\t\t\t\tonDragStart( dragProps );\n\t\t\t\tdragStart( dragProps );\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\taxis: dragDirection === 'e' || dragDirection === 'w' ? 'x' : 'y',\n\t\t\tthreshold: dragThreshold,\n\t\t\tenabled: isDragEnabled,\n\t\t\tpointer: { capture: false },\n\t\t}\n\t);\n\n\tconst dragProps = isDragEnabled ? dragGestureProps() : {};\n\t/*\n\t * Works around the odd UA (e.g. Firefox) that does not focus inputs of\n\t * type=number when their spinner arrows are pressed.\n\t */\n\tlet handleOnMouseDown;\n\tif ( type === 'number' ) {\n\t\thandleOnMouseDown = ( event: MouseEvent< HTMLInputElement > ) => {\n\t\t\tprops.onMouseDown?.( event );\n\t\t\tif (\n\t\t\t\tevent.currentTarget !==\n\t\t\t\tevent.currentTarget.ownerDocument.activeElement\n\t\t\t) {\n\t\t\t\tevent.currentTarget.focus();\n\t\t\t}\n\t\t};\n\t}\n\n\treturn (\n\t\t<Input\n\t\t\t{ ...props }\n\t\t\t{ ...dragProps }\n\t\t\tclassName=\"components-input-control__input\"\n\t\t\tdisabled={ disabled }\n\t\t\tdragCursor={ dragCursor }\n\t\t\tisDragging={ isDragging }\n\t\t\tid={ id }\n\t\t\tonBlur={ handleOnBlur }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonFocus={ handleOnFocus }\n\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\tonMouseDown={ handleOnMouseDown }\n\t\t\tref={ ref }\n\t\t\tinputSize={ size }\n\t\t\t// Fallback to `''` to avoid \"uncontrolled to controlled\" warning.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/47250 for details.\n\t\t\tvalue={ value ?? '' }\n\t\t\ttype={ type }\n\t\t/>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( InputField );\n\nexport default ForwardedComponent;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/input-control/input-field.tsx"],"names":["useDrag","forwardRef","useRef","useDragCursor","Input","useInputControlStateReducer","noop","InputField","disabled","dragDirection","dragThreshold","id","isDragEnabled","isFocused","isPressEnterToChange","onBlur","onChange","onDrag","onDragEnd","onDragStart","onFocus","onKeyDown","onValidate","size","setIsFocused","stateReducer","state","value","valueProp","type","props","ref","change","commit","drag","dragEnd","dragStart","invalidate","pressDown","pressEnter","pressUp","reset","isDragging","isDirty","wasDirtyOnBlur","dragCursor","handleOnBlur","event","target","validity","valid","current","handleOnCommit","handleOnFocus","handleOnChange","nextValue","currentTarget","err","handleOnKeyDown","key","preventDefault","dragGestureProps","dragProps","distance","dragging","stopPropagation","axis","threshold","enabled","pointer","capture","handleOnMouseDown","onMouseDown","ownerDocument","activeElement","focus","ForwardedComponent"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,OAAT,QAAwB,oBAAxB;;AAWA;AACA;AACA;AACA,SAASC,UAAT,EAAqBC,MAArB,QAAmC,oBAAnC;AACA;AACA;AACA;;AAEA,SAASC,aAAT,QAA8B,SAA9B;AACA,SAASC,KAAT,QAAsB,+BAAtB;AACA,SAASC,2BAAT,QAA4C,mBAA5C;;AAGA,MAAMC,IAAI,GAAG,MAAM,CAAE,CAArB;;AA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AF,CAArC;AAEA,eAAeqE,kBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { useDrag } from '@use-gesture/react';\nimport type {\n\tSyntheticEvent,\n\tChangeEvent,\n\tKeyboardEvent,\n\tPointerEvent,\n\tFocusEvent,\n\tForwardedRef,\n\tMouseEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useRef } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../ui/context';\nimport { useDragCursor } from './utils';\nimport { Input } from './styles/input-control-styles';\nimport { useInputControlStateReducer } from './reducer/reducer';\nimport type { InputFieldProps } from './types';\n\nconst noop = () => {};\n\nfunction InputField(\n\t{\n\t\tdisabled = false,\n\t\tdragDirection = 'n',\n\t\tdragThreshold = 10,\n\t\tid,\n\t\tisDragEnabled = false,\n\t\tisFocused,\n\t\tisPressEnterToChange = false,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonDrag = noop,\n\t\tonDragEnd = noop,\n\t\tonDragStart = noop,\n\t\tonFocus = noop,\n\t\tonKeyDown = noop,\n\t\tonValidate = noop,\n\t\tsize = 'default',\n\t\tsetIsFocused,\n\t\tstateReducer = ( state: any ) => state,\n\t\tvalue: valueProp,\n\t\ttype,\n\t\t...props\n\t}: WordPressComponentProps< InputFieldProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t// State.\n\t\tstate,\n\t\t// Actions.\n\t\tchange,\n\t\tcommit,\n\t\tdrag,\n\t\tdragEnd,\n\t\tdragStart,\n\t\tinvalidate,\n\t\tpressDown,\n\t\tpressEnter,\n\t\tpressUp,\n\t\treset,\n\t} = useInputControlStateReducer(\n\t\tstateReducer,\n\t\t{\n\t\t\tisDragEnabled,\n\t\t\tvalue: valueProp,\n\t\t\tisPressEnterToChange,\n\t\t},\n\t\tonChange\n\t);\n\n\tconst { value, isDragging, isDirty } = state;\n\tconst wasDirtyOnBlur = useRef( false );\n\n\tconst dragCursor = useDragCursor( isDragging, dragDirection );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused?.( false );\n\n\t\t/**\n\t\t * If isPressEnterToChange is set, this commits the value to\n\t\t * the onChange callback.\n\t\t */\n\t\tif ( isDirty || ! event.target.validity.valid ) {\n\t\t\twasDirtyOnBlur.current = true;\n\t\t\thandleOnCommit( event );\n\t\t}\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused?.( true );\n\t};\n\n\tconst handleOnChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = event.target.value;\n\t\tchange( nextValue, event );\n\t};\n\n\tconst handleOnCommit = ( event: SyntheticEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = event.currentTarget.value;\n\n\t\ttry {\n\t\t\tonValidate( nextValue );\n\t\t\tcommit( nextValue, event );\n\t\t} catch ( err ) {\n\t\t\tinvalidate( err, event );\n\t\t}\n\t};\n\n\tconst handleOnKeyDown = ( event: KeyboardEvent< HTMLInputElement > ) => {\n\t\tconst { key } = event;\n\t\tonKeyDown( event );\n\n\t\tswitch ( key ) {\n\t\t\tcase 'ArrowUp':\n\t\t\t\tpressUp( event );\n\t\t\t\tbreak;\n\n\t\t\tcase 'ArrowDown':\n\t\t\t\tpressDown( event );\n\t\t\t\tbreak;\n\n\t\t\tcase 'Enter':\n\t\t\t\tpressEnter( event );\n\n\t\t\t\tif ( isPressEnterToChange ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\thandleOnCommit( event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'Escape':\n\t\t\t\tif ( isPressEnterToChange && isDirty ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treset( valueProp, event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t};\n\n\tconst dragGestureProps = useDrag< PointerEvent< HTMLInputElement > >(\n\t\t( dragProps ) => {\n\t\t\tconst { distance, dragging, event, target } = dragProps;\n\n\t\t\t// The `target` prop always references the `input` element while, by\n\t\t\t// default, the `dragProps.event.target` property would reference the real\n\t\t\t// event target (i.e. any DOM element that the pointer is hovering while\n\t\t\t// dragging). Ensuring that the `target` is always the `input` element\n\t\t\t// allows consumers of `InputControl` (or any higher-level control) to\n\t\t\t// check the input's validity by accessing `event.target.validity.valid`.\n\t\t\tdragProps.event = {\n\t\t\t\t...dragProps.event,\n\t\t\t\ttarget,\n\t\t\t};\n\n\t\t\tif ( ! distance ) return;\n\t\t\tevent.stopPropagation();\n\n\t\t\t/**\n\t\t\t * Quick return if no longer dragging.\n\t\t\t * This prevents unnecessary value calculations.\n\t\t\t */\n\t\t\tif ( ! dragging ) {\n\t\t\t\tonDragEnd( dragProps );\n\t\t\t\tdragEnd( dragProps );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonDrag( dragProps );\n\t\t\tdrag( dragProps );\n\n\t\t\tif ( ! isDragging ) {\n\t\t\t\tonDragStart( dragProps );\n\t\t\t\tdragStart( dragProps );\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\taxis: dragDirection === 'e' || dragDirection === 'w' ? 'x' : 'y',\n\t\t\tthreshold: dragThreshold,\n\t\t\tenabled: isDragEnabled,\n\t\t\tpointer: { capture: false },\n\t\t}\n\t);\n\n\tconst dragProps = isDragEnabled ? dragGestureProps() : {};\n\t/*\n\t * Works around the odd UA (e.g. Firefox) that does not focus inputs of\n\t * type=number when their spinner arrows are pressed.\n\t */\n\tlet handleOnMouseDown;\n\tif ( type === 'number' ) {\n\t\thandleOnMouseDown = ( event: MouseEvent< HTMLInputElement > ) => {\n\t\t\tprops.onMouseDown?.( event );\n\t\t\tif (\n\t\t\t\tevent.currentTarget !==\n\t\t\t\tevent.currentTarget.ownerDocument.activeElement\n\t\t\t) {\n\t\t\t\tevent.currentTarget.focus();\n\t\t\t}\n\t\t};\n\t}\n\n\treturn (\n\t\t<Input\n\t\t\t{ ...props }\n\t\t\t{ ...dragProps }\n\t\t\tclassName=\"components-input-control__input\"\n\t\t\tdisabled={ disabled }\n\t\t\tdragCursor={ dragCursor }\n\t\t\tisDragging={ isDragging }\n\t\t\tid={ id }\n\t\t\tonBlur={ handleOnBlur }\n\t\t\tonChange={ handleOnChange }\n\t\t\tonFocus={ handleOnFocus }\n\t\t\tonKeyDown={ handleOnKeyDown }\n\t\t\tonMouseDown={ handleOnMouseDown }\n\t\t\tref={ ref }\n\t\t\tinputSize={ size }\n\t\t\t// Fallback to `''` to avoid \"uncontrolled to controlled\" warning.\n\t\t\t// See https://github.com/WordPress/gutenberg/pull/47250 for details.\n\t\t\tvalue={ value ?? '' }\n\t\t\ttype={ type }\n\t\t/>\n\t);\n}\n\nconst ForwardedComponent = forwardRef( InputField );\n\nexport default ForwardedComponent;\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -13,11 +12,11 @@ import { contextConnect, useContextSystem } from '../ui/context';
13
12
 
14
13
  function UnconnectedInputControlPrefixWrapper(props, forwardedRef) {
15
14
  const derivedProps = useContextSystem(props, 'InputControlPrefixWrapper');
16
- return createElement(Spacer, _extends({
17
- marginBottom: 0
18
- }, derivedProps, {
15
+ return createElement(Spacer, {
16
+ marginBottom: 0,
17
+ ...derivedProps,
19
18
  ref: forwardedRef
20
- }));
19
+ });
21
20
  }
22
21
  /**
23
22
  * A convenience wrapper for the `prefix` when you want to apply
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/input-control/input-prefix-wrapper.tsx"],"names":["Spacer","contextConnect","useContextSystem","UnconnectedInputControlPrefixWrapper","props","forwardedRef","derivedProps","InputControlPrefixWrapper"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,MAAT,QAAuB,WAAvB;AACA,SAECC,cAFD,EAGCC,gBAHD,QAIO,eAJP;;AAOA,SAASC,oCAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,YAAY,GAAGJ,gBAAgB,CAAEE,KAAF,EAAS,2BAAT,CAArC;AAEA,SACC,cAAC,MAAD;AAAQ,IAAA,YAAY,EAAG;AAAvB,KAAgCE,YAAhC;AAA+C,IAAA,GAAG,EAAGD;AAArD,KADD;AAGA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAME,yBAAyB,GAAGN,cAAc,CACtDE,oCADsD,EAEtD,2BAFsD,CAAhD;AAKP,eAAeI,yBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { Spacer } from '../spacer';\nimport {\n\tWordPressComponentProps,\n\tcontextConnect,\n\tuseContextSystem,\n} from '../ui/context';\nimport type { InputControlPrefixWrapperProps } from './types';\n\nfunction UnconnectedInputControlPrefixWrapper(\n\tprops: WordPressComponentProps< InputControlPrefixWrapperProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst derivedProps = useContextSystem( props, 'InputControlPrefixWrapper' );\n\n\treturn (\n\t\t<Spacer marginBottom={ 0 } { ...derivedProps } ref={ forwardedRef } />\n\t);\n}\n\n/**\n * A convenience wrapper for the `prefix` when you want to apply\n * standard padding in accordance with the size variant.\n *\n * ```jsx\n * import {\n * __experimentalInputControl as InputControl,\n * __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n * } from '@wordpress/components';\n *\n * <InputControl\n * prefix={<InputControlPrefixWrapper>@</InputControlPrefixWrapper>}\n * />\n * ```\n */\nexport const InputControlPrefixWrapper = contextConnect(\n\tUnconnectedInputControlPrefixWrapper,\n\t'InputControlPrefixWrapper'\n);\n\nexport default InputControlPrefixWrapper;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/input-control/input-prefix-wrapper.tsx"],"names":["Spacer","contextConnect","useContextSystem","UnconnectedInputControlPrefixWrapper","props","forwardedRef","derivedProps","InputControlPrefixWrapper"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,MAAT,QAAuB,WAAvB;AACA,SAECC,cAFD,EAGCC,gBAHD,QAIO,eAJP;;AAOA,SAASC,oCAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAMC,YAAY,GAAGJ,gBAAgB,CAAEE,KAAF,EAAS,2BAAT,CAArC;AAEA,SACC,cAAC,MAAD;AAAQ,IAAA,YAAY,EAAG,CAAvB;AAAA,OAAgCE,YAAhC;AAA+C,IAAA,GAAG,EAAGD;AAArD,IADD;AAGA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAME,yBAAyB,GAAGN,cAAc,CACtDE,oCADsD,EAEtD,2BAFsD,CAAhD;AAKP,eAAeI,yBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { Spacer } from '../spacer';\nimport {\n\tWordPressComponentProps,\n\tcontextConnect,\n\tuseContextSystem,\n} from '../ui/context';\nimport type { InputControlPrefixWrapperProps } from './types';\n\nfunction UnconnectedInputControlPrefixWrapper(\n\tprops: WordPressComponentProps< InputControlPrefixWrapperProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst derivedProps = useContextSystem( props, 'InputControlPrefixWrapper' );\n\n\treturn (\n\t\t<Spacer marginBottom={ 0 } { ...derivedProps } ref={ forwardedRef } />\n\t);\n}\n\n/**\n * A convenience wrapper for the `prefix` when you want to apply\n * standard padding in accordance with the size variant.\n *\n * ```jsx\n * import {\n * __experimentalInputControl as InputControl,\n * __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n * } from '@wordpress/components';\n *\n * <InputControl\n * prefix={<InputControlPrefixWrapper>@</InputControlPrefixWrapper>}\n * />\n * ```\n */\nexport const InputControlPrefixWrapper = contextConnect(\n\tUnconnectedInputControlPrefixWrapper,\n\t'InputControlPrefixWrapper'\n);\n\nexport default InputControlPrefixWrapper;\n"]}