@wordpress/components 25.1.0 → 25.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (993) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/README.md +1 -1
  3. package/build/alignment-matrix-control/cell.js +4 -5
  4. package/build/alignment-matrix-control/cell.js.map +1 -1
  5. package/build/alignment-matrix-control/icon.js +2 -4
  6. package/build/alignment-matrix-control/icon.js.map +1 -1
  7. package/build/alignment-matrix-control/index.js +6 -7
  8. package/build/alignment-matrix-control/index.js.map +1 -1
  9. package/build/angle-picker-control/angle-circle.js +4 -7
  10. package/build/angle-picker-control/angle-circle.js.map +1 -1
  11. package/build/angle-picker-control/index.js +2 -4
  12. package/build/angle-picker-control/index.js.map +1 -1
  13. package/build/autocomplete/autocompleter-ui.js +28 -1
  14. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  15. package/build/autocomplete/index.js +0 -20
  16. package/build/autocomplete/index.js.map +1 -1
  17. package/build/base-control/index.js +2 -4
  18. package/build/base-control/index.js.map +1 -1
  19. package/build/border-box-control/border-box-control/component.js +4 -6
  20. package/build/border-box-control/border-box-control/component.js.map +1 -1
  21. package/build/border-box-control/border-box-control-linked-button/component.js +2 -4
  22. package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  23. package/build/border-box-control/border-box-control-split-controls/component.js +15 -13
  24. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  25. package/build/border-box-control/border-box-control-visualizer/component.js +2 -6
  26. package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  27. package/build/border-control/border-control/component.js +4 -6
  28. package/build/border-control/border-control/component.js.map +1 -1
  29. package/build/border-control/border-control-dropdown/component.js +4 -6
  30. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  31. package/build/border-control/border-control-style-picker/component.js +2 -4
  32. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  33. package/build/box-control/all-input-control.js +2 -4
  34. package/build/box-control/all-input-control.js.map +1 -1
  35. package/build/box-control/axial-input-controls.js +2 -4
  36. package/build/box-control/axial-input-controls.js.map +1 -1
  37. package/build/box-control/icon.js +4 -7
  38. package/build/box-control/icon.js.map +1 -1
  39. package/build/box-control/index.js +7 -6
  40. package/build/box-control/index.js.map +1 -1
  41. package/build/box-control/input-controls.js +2 -4
  42. package/build/box-control/input-controls.js.map +1 -1
  43. package/build/box-control/linked-button.js +2 -4
  44. package/build/box-control/linked-button.js.map +1 -1
  45. package/build/box-control/unit-control.js +6 -6
  46. package/build/box-control/unit-control.js.map +1 -1
  47. package/build/button/deprecated.js +2 -4
  48. package/build/button/deprecated.js.map +1 -1
  49. package/build/button/index.js +7 -3
  50. package/build/button/index.js.map +1 -1
  51. package/build/button-group/index.js +4 -5
  52. package/build/button-group/index.js.map +1 -1
  53. package/build/card/card/component.js +2 -4
  54. package/build/card/card/component.js.map +1 -1
  55. package/build/card/card-body/component.js +4 -8
  56. package/build/card/card-body/component.js.map +1 -1
  57. package/build/card/card-divider/component.js +2 -6
  58. package/build/card/card-divider/component.js.map +1 -1
  59. package/build/card/card-footer/component.js +2 -6
  60. package/build/card/card-footer/component.js.map +1 -1
  61. package/build/card/card-header/component.js +2 -6
  62. package/build/card/card-header/component.js.map +1 -1
  63. package/build/card/card-media/component.js +2 -6
  64. package/build/card/card-media/component.js.map +1 -1
  65. package/build/checkbox-control/index.js +4 -5
  66. package/build/checkbox-control/index.js.map +1 -1
  67. package/build/circular-option-picker/index.js +19 -16
  68. package/build/circular-option-picker/index.js.map +1 -1
  69. package/build/clipboard-button/index.js +9 -20
  70. package/build/clipboard-button/index.js.map +1 -1
  71. package/build/clipboard-button/types.js +6 -0
  72. package/build/clipboard-button/types.js.map +1 -0
  73. package/build/color-control/index.native.js +4 -5
  74. package/build/color-control/index.native.js.map +1 -1
  75. package/build/color-indicator/index.js +4 -5
  76. package/build/color-indicator/index.js.map +1 -1
  77. package/build/color-palette/index.js +11 -11
  78. package/build/color-palette/index.js.map +1 -1
  79. package/build/color-picker/color-input.js +6 -3
  80. package/build/color-picker/color-input.js.map +1 -1
  81. package/build/color-picker/component.js +4 -5
  82. package/build/color-picker/component.js.map +1 -1
  83. package/build/color-picker/legacy-adapter.js +2 -1
  84. package/build/color-picker/legacy-adapter.js.map +1 -1
  85. package/build/confirm-dialog/component.js +4 -5
  86. package/build/confirm-dialog/component.js.map +1 -1
  87. package/build/custom-gradient-picker/gradient-bar/control-points.js +8 -8
  88. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  89. package/build/custom-select-control/index.js +34 -32
  90. package/build/custom-select-control/index.js.map +1 -1
  91. package/build/dashicon/index.js +4 -7
  92. package/build/dashicon/index.js.map +1 -1
  93. package/build/dashicon/index.native.js +4 -7
  94. package/build/dashicon/index.native.js.map +1 -1
  95. package/build/disabled/index.js +4 -7
  96. package/build/disabled/index.js.map +1 -1
  97. package/build/divider/component.js +4 -8
  98. package/build/divider/component.js.map +1 -1
  99. package/build/drop-zone/index.js +2 -4
  100. package/build/drop-zone/index.js.map +1 -1
  101. package/build/dropdown/dropdown-content-wrapper.js +2 -6
  102. package/build/dropdown/dropdown-content-wrapper.js.map +1 -1
  103. package/build/dropdown/index.js +29 -24
  104. package/build/dropdown/index.js.map +1 -1
  105. package/build/dropdown-menu/index.js +98 -93
  106. package/build/dropdown-menu/index.js.map +1 -1
  107. package/build/dropdown-menu/index.native.js +2 -4
  108. package/build/dropdown-menu/index.native.js.map +1 -1
  109. package/build/dropdown-menu-v2/index.js +14 -12
  110. package/build/dropdown-menu-v2/index.js.map +1 -1
  111. package/build/dropdown-menu-v2/styles.js +16 -16
  112. package/build/dropdown-menu-v2/styles.js.map +1 -1
  113. package/build/elevation/component.js +2 -6
  114. package/build/elevation/component.js.map +1 -1
  115. package/build/external-link/index.js +2 -4
  116. package/build/external-link/index.js.map +1 -1
  117. package/build/flex/flex/component.js +2 -6
  118. package/build/flex/flex/component.js.map +1 -1
  119. package/build/flex/flex-block/component.js +2 -6
  120. package/build/flex/flex-block/component.js.map +1 -1
  121. package/build/flex/flex-item/component.js +2 -6
  122. package/build/flex/flex-item/component.js.map +1 -1
  123. package/build/focal-point-picker/controls.js +4 -7
  124. package/build/focal-point-picker/controls.js.map +1 -1
  125. package/build/focal-point-picker/focal-point.js +2 -4
  126. package/build/focal-point-picker/focal-point.js.map +1 -1
  127. package/build/focal-point-picker/grid.js +2 -6
  128. package/build/focal-point-picker/grid.js.map +1 -1
  129. package/build/focal-point-picker/index.js +4 -6
  130. package/build/focal-point-picker/index.js.map +1 -1
  131. package/build/focal-point-picker/index.native.js +2 -4
  132. package/build/focal-point-picker/index.native.js.map +1 -1
  133. package/build/focal-point-picker/media.js +7 -10
  134. package/build/focal-point-picker/media.js.map +1 -1
  135. package/build/focal-point-picker/tooltip/index.native.js +2 -4
  136. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  137. package/build/focusable-iframe/index.js +4 -5
  138. package/build/focusable-iframe/index.js.map +1 -1
  139. package/build/footer-message-control/index.native.js +2 -1
  140. package/build/footer-message-control/index.native.js.map +1 -1
  141. package/build/form-file-upload/index.js +4 -5
  142. package/build/form-file-upload/index.js.map +1 -1
  143. package/build/form-toggle/index.js +4 -5
  144. package/build/form-toggle/index.js.map +1 -1
  145. package/build/form-token-field/index.js +4 -5
  146. package/build/form-token-field/index.js.map +1 -1
  147. package/build/form-token-field/token-input.js +4 -6
  148. package/build/form-token-field/token-input.js.map +1 -1
  149. package/build/gradient-picker/index.js +14 -12
  150. package/build/gradient-picker/index.js.map +1 -1
  151. package/build/grid/component.js +2 -4
  152. package/build/grid/component.js.map +1 -1
  153. package/build/guide/page.js +2 -1
  154. package/build/guide/page.js.map +1 -1
  155. package/build/h-stack/component.js +2 -6
  156. package/build/h-stack/component.js.map +1 -1
  157. package/build/h-stack/hook.js +4 -7
  158. package/build/h-stack/hook.js.map +1 -1
  159. package/build/heading/component.js +2 -6
  160. package/build/heading/component.js.map +1 -1
  161. package/build/higher-order/navigate-regions/index.js +3 -1
  162. package/build/higher-order/navigate-regions/index.js.map +1 -1
  163. package/build/higher-order/with-constrained-tabbing/index.js +2 -1
  164. package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
  165. package/build/higher-order/with-fallback-styles/index.js +3 -3
  166. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  167. package/build/higher-order/with-filters/index.js +2 -1
  168. package/build/higher-order/with-filters/index.js.map +1 -1
  169. package/build/higher-order/with-focus-outside/index.js +5 -7
  170. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  171. package/build/higher-order/with-focus-outside/index.native.js +5 -7
  172. package/build/higher-order/with-focus-outside/index.native.js.map +1 -1
  173. package/build/higher-order/with-focus-return/index.js +2 -1
  174. package/build/higher-order/with-focus-return/index.js.map +1 -1
  175. package/build/higher-order/with-notices/index.js +3 -4
  176. package/build/higher-order/with-notices/index.js.map +1 -1
  177. package/build/higher-order/with-spoken-messages/index.js +2 -6
  178. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  179. package/build/icon/index.js +6 -6
  180. package/build/icon/index.js.map +1 -1
  181. package/build/input-control/index.js +5 -5
  182. package/build/input-control/index.js.map +1 -1
  183. package/build/input-control/input-base.js +3 -4
  184. package/build/input-control/input-base.js.map +1 -1
  185. package/build/input-control/input-field.js +3 -6
  186. package/build/input-control/input-field.js.map +1 -1
  187. package/build/input-control/input-prefix-wrapper.js +4 -8
  188. package/build/input-control/input-prefix-wrapper.js.map +1 -1
  189. package/build/input-control/input-suffix-wrapper.js +4 -8
  190. package/build/input-control/input-suffix-wrapper.js.map +1 -1
  191. package/build/input-control/label.js +4 -7
  192. package/build/input-control/label.js.map +1 -1
  193. package/build/input-control/styles/input-control-styles.js +2 -4
  194. package/build/input-control/styles/input-control-styles.js.map +1 -1
  195. package/build/isolated-event-container/index.js +2 -4
  196. package/build/isolated-event-container/index.js.map +1 -1
  197. package/build/item-group/item/component.js +2 -6
  198. package/build/item-group/item/component.js.map +1 -1
  199. package/build/item-group/item-group/component.js +2 -6
  200. package/build/item-group/item-group/component.js.map +1 -1
  201. package/build/item-group/styles.js +10 -10
  202. package/build/item-group/styles.js.map +1 -1
  203. package/build/menu-item/index.js +4 -5
  204. package/build/menu-item/index.js.map +1 -1
  205. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -6
  206. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  207. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +2 -1
  208. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  209. package/build/mobile/bottom-sheet/cell.native.js +5 -6
  210. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  211. package/build/mobile/bottom-sheet/color-cell.native.js +2 -4
  212. package/build/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  213. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js +4 -5
  214. package/build/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  215. package/build/mobile/bottom-sheet/footer-message-cell.native.js +2 -4
  216. package/build/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  217. package/build/mobile/bottom-sheet/index.native.js +8 -8
  218. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  219. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +4 -7
  220. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  221. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -4
  222. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  223. package/build/mobile/bottom-sheet/picker-cell.native.js +4 -5
  224. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  225. package/build/mobile/bottom-sheet/radio-cell.native.js +2 -4
  226. package/build/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  227. package/build/mobile/bottom-sheet/range-cell.native.js +2 -4
  228. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  229. package/build/mobile/bottom-sheet/ripple.native.js +4 -6
  230. package/build/mobile/bottom-sheet/ripple.native.js.map +1 -1
  231. package/build/mobile/bottom-sheet/switch-cell.native.js +2 -4
  232. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  233. package/build/mobile/color-settings/index.native.js +5 -5
  234. package/build/mobile/color-settings/index.native.js.map +1 -1
  235. package/build/mobile/cycle-select-control/index.native.js +4 -5
  236. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  237. package/build/mobile/focal-point-settings-panel/index.native.js +5 -5
  238. package/build/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  239. package/build/mobile/global-styles-context/index.native.js +2 -6
  240. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  241. package/build/mobile/gradient/index.native.js +4 -5
  242. package/build/mobile/gradient/index.native.js.map +1 -1
  243. package/build/mobile/image/image-editing-button.native.js +4 -5
  244. package/build/mobile/image/image-editing-button.native.js.map +1 -1
  245. package/build/mobile/image/index.native.js +15 -15
  246. package/build/mobile/image/index.native.js.map +1 -1
  247. package/build/mobile/keyboard-avoiding-view/index.ios.js +2 -4
  248. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  249. package/build/mobile/keyboard-aware-flat-list/index.android.js +4 -5
  250. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  251. package/build/mobile/keyboard-aware-flat-list/index.ios.js +2 -1
  252. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  253. package/build/mobile/link-picker/link-picker-results.native.js +4 -6
  254. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  255. package/build/mobile/link-settings/link-settings-navigation.native.js +4 -5
  256. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  257. package/build/mobile/link-settings/link-settings-screen.native.js +2 -4
  258. package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  259. package/build/mobile/picker/index.ios.js +4 -6
  260. package/build/mobile/picker/index.ios.js.map +1 -1
  261. package/build/mobile/segmented-control/index.native.js +4 -5
  262. package/build/mobile/segmented-control/index.native.js.map +1 -1
  263. package/build/modal/index.js +4 -6
  264. package/build/modal/index.js.map +1 -1
  265. package/build/navigable-container/container.js +6 -9
  266. package/build/navigable-container/container.js.map +1 -1
  267. package/build/navigable-container/menu.js +4 -5
  268. package/build/navigable-container/menu.js.map +1 -1
  269. package/build/navigable-container/tabbable.js +4 -5
  270. package/build/navigable-container/tabbable.js.map +1 -1
  271. package/build/navigation/item/base.js +4 -5
  272. package/build/navigation/item/base.js.map +1 -1
  273. package/build/navigation/item/index.js +3 -4
  274. package/build/navigation/item/index.js.map +1 -1
  275. package/build/navigator/navigator-back-button/component.js +4 -7
  276. package/build/navigator/navigator-back-button/component.js.map +1 -1
  277. package/build/navigator/navigator-button/component.js +4 -7
  278. package/build/navigator/navigator-button/component.js.map +1 -1
  279. package/build/navigator/navigator-provider/component.js +4 -5
  280. package/build/navigator/navigator-provider/component.js.map +1 -1
  281. package/build/navigator/navigator-screen/component.js +9 -10
  282. package/build/navigator/navigator-screen/component.js.map +1 -1
  283. package/build/navigator/navigator-to-parent-button/component.js +4 -7
  284. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  285. package/build/notice/list.js +2 -4
  286. package/build/notice/list.js.map +1 -1
  287. package/build/notice/list.native.js +2 -4
  288. package/build/notice/list.native.js.map +1 -1
  289. package/build/number-control/index.js +4 -6
  290. package/build/number-control/index.js.map +1 -1
  291. package/build/palette-edit/index.js +11 -12
  292. package/build/palette-edit/index.js.map +1 -1
  293. package/build/panel/body.js +8 -8
  294. package/build/panel/body.js.map +1 -1
  295. package/build/placeholder/index.js +2 -4
  296. package/build/placeholder/index.js.map +1 -1
  297. package/build/popover/index.js +11 -12
  298. package/build/popover/index.js.map +1 -1
  299. package/build/popover/utils.js +15 -1
  300. package/build/popover/utils.js.map +1 -1
  301. package/build/query-controls/category-select.js +4 -6
  302. package/build/query-controls/category-select.js.map +1 -1
  303. package/build/radio-control/index.js +4 -5
  304. package/build/radio-control/index.js.map +1 -1
  305. package/build/radio-control/index.native.js +4 -5
  306. package/build/radio-control/index.native.js.map +1 -1
  307. package/build/radio-group/index.js +5 -5
  308. package/build/radio-group/index.js.map +1 -1
  309. package/build/radio-group/radio/index.js +5 -5
  310. package/build/radio-group/radio/index.js.map +1 -1
  311. package/build/range-control/index.js +2 -4
  312. package/build/range-control/index.js.map +1 -1
  313. package/build/range-control/index.native.js +4 -5
  314. package/build/range-control/index.native.js.map +1 -1
  315. package/build/range-control/input-range.js +2 -6
  316. package/build/range-control/input-range.js.map +1 -1
  317. package/build/range-control/mark.js +2 -4
  318. package/build/range-control/mark.js.map +1 -1
  319. package/build/range-control/rail.js +6 -7
  320. package/build/range-control/rail.js.map +1 -1
  321. package/build/range-control/tooltip.js +2 -4
  322. package/build/range-control/tooltip.js.map +1 -1
  323. package/build/resizable-box/index.js +5 -5
  324. package/build/resizable-box/index.js.map +1 -1
  325. package/build/resizable-box/resize-tooltip/index.js +4 -5
  326. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  327. package/build/resizable-box/resize-tooltip/label.js +4 -7
  328. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  329. package/build/scrollable/component.js +2 -6
  330. package/build/scrollable/component.js.map +1 -1
  331. package/build/search-control/index.js +2 -4
  332. package/build/search-control/index.js.map +1 -1
  333. package/build/select-control/index.js +2 -4
  334. package/build/select-control/index.js.map +1 -1
  335. package/build/select-control/index.native.js +4 -5
  336. package/build/select-control/index.native.js.map +1 -1
  337. package/build/slot-fill/bubbles-virtually/slot.js +4 -5
  338. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  339. package/build/slot-fill/index.js +17 -13
  340. package/build/slot-fill/index.js.map +1 -1
  341. package/build/slot-fill/index.native.js +10 -9
  342. package/build/slot-fill/index.native.js.map +1 -1
  343. package/build/slot-fill/slot.js +2 -4
  344. package/build/slot-fill/slot.js.map +1 -1
  345. package/build/snackbar/list.js +2 -4
  346. package/build/snackbar/list.js.map +1 -1
  347. package/build/spacer/component.js +2 -6
  348. package/build/spacer/component.js.map +1 -1
  349. package/build/spinner/index.js +4 -6
  350. package/build/spinner/index.js.map +1 -1
  351. package/build/surface/component.js +2 -6
  352. package/build/surface/component.js.map +1 -1
  353. package/build/tab-panel/index.js +4 -5
  354. package/build/tab-panel/index.js.map +1 -1
  355. package/build/text/component.js +4 -6
  356. package/build/text/component.js.map +1 -1
  357. package/build/text-control/index.js +4 -5
  358. package/build/text-control/index.js.map +1 -1
  359. package/build/text-control/index.native.js +4 -5
  360. package/build/text-control/index.native.js.map +1 -1
  361. package/build/textarea-control/index.js +4 -5
  362. package/build/textarea-control/index.js.map +1 -1
  363. package/build/theme/index.js +4 -7
  364. package/build/theme/index.js.map +1 -1
  365. package/build/toggle-control/index.native.js +4 -5
  366. package/build/toggle-control/index.native.js.map +1 -1
  367. package/build/toggle-group-control/toggle-group-control/as-button-group.js +4 -6
  368. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  369. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +4 -6
  370. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  371. package/build/toggle-group-control/toggle-group-control/component.js +2 -4
  372. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  373. package/build/toggle-group-control/toggle-group-control-option/component.js +2 -6
  374. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  375. package/build/toggle-group-control/toggle-group-control-option-base/component.js +6 -7
  376. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  377. package/build/toggle-group-control/toggle-group-control-option-icon/component.js +2 -4
  378. package/build/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  379. package/build/toolbar/toolbar/index.js +9 -13
  380. package/build/toolbar/toolbar/index.js.map +1 -1
  381. package/build/toolbar/toolbar/toolbar-container.js +9 -13
  382. package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
  383. package/build/toolbar/toolbar-button/index.js +13 -11
  384. package/build/toolbar/toolbar-button/index.js.map +1 -1
  385. package/build/toolbar/toolbar-context/index.js.map +1 -1
  386. package/build/toolbar/toolbar-dropdown-menu/index.js +8 -10
  387. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  388. package/build/toolbar/toolbar-group/index.js +11 -10
  389. package/build/toolbar/toolbar-group/index.js.map +1 -1
  390. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -6
  391. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  392. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js +4 -5
  393. package/build/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  394. package/build/toolbar/toolbar-group/toolbar-group-container.js +4 -7
  395. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  396. package/build/toolbar/toolbar-item/index.js +13 -11
  397. package/build/toolbar/toolbar-item/index.js.map +1 -1
  398. package/build/toolbar/toolbar-item/types.js +6 -0
  399. package/build/toolbar/toolbar-item/types.js.map +1 -0
  400. package/build/tools-panel/tools-panel/component.js +2 -4
  401. package/build/tools-panel/tools-panel/component.js.map +1 -1
  402. package/build/tools-panel/tools-panel-header/component.js +2 -4
  403. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  404. package/build/tools-panel/tools-panel-item/component.js +4 -8
  405. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  406. package/build/tooltip/index.js +4 -5
  407. package/build/tooltip/index.js.map +1 -1
  408. package/build/tooltip/index.native.js +2 -1
  409. package/build/tooltip/index.native.js.map +1 -1
  410. package/build/tree-grid/cell.js +2 -4
  411. package/build/tree-grid/cell.js.map +1 -1
  412. package/build/tree-grid/index.js +2 -4
  413. package/build/tree-grid/index.js.map +1 -1
  414. package/build/tree-grid/item.js +4 -5
  415. package/build/tree-grid/item.js.map +1 -1
  416. package/build/tree-grid/roving-tab-index-item.js +2 -1
  417. package/build/tree-grid/roving-tab-index-item.js.map +1 -1
  418. package/build/tree-grid/row.js +2 -6
  419. package/build/tree-grid/row.js.map +1 -1
  420. package/build/tree-select/index.js +4 -7
  421. package/build/tree-select/index.js.map +1 -1
  422. package/build/truncate/component.js +4 -6
  423. package/build/truncate/component.js.map +1 -1
  424. package/build/ui/control-group/component.js +8 -12
  425. package/build/ui/control-group/component.js.map +1 -1
  426. package/build/ui/control-label/component.js +4 -8
  427. package/build/ui/control-label/component.js.map +1 -1
  428. package/build/ui/form-group/form-group-content.js +4 -5
  429. package/build/ui/form-group/form-group-content.js.map +1 -1
  430. package/build/ui/form-group/form-group-label.js +2 -1
  431. package/build/ui/form-group/form-group-label.js.map +1 -1
  432. package/build/ui/form-group/form-group.js +8 -8
  433. package/build/ui/form-group/form-group.js.map +1 -1
  434. package/build/ui/shortcut/component.js +4 -7
  435. package/build/ui/shortcut/component.js.map +1 -1
  436. package/build/ui/spinner/component.js +2 -6
  437. package/build/ui/spinner/component.js.map +1 -1
  438. package/build/ui/tooltip/component.js +3 -4
  439. package/build/ui/tooltip/component.js.map +1 -1
  440. package/build/ui/tooltip/content.js +5 -8
  441. package/build/ui/tooltip/content.js.map +1 -1
  442. package/build/unit-control/index.js +31 -94
  443. package/build/unit-control/index.js.map +1 -1
  444. package/build/unit-control/index.native.js +7 -7
  445. package/build/unit-control/index.native.js.map +1 -1
  446. package/build/unit-control/unit-select-control.js +15 -7
  447. package/build/unit-control/unit-select-control.js.map +1 -1
  448. package/build/v-stack/component.js +2 -6
  449. package/build/v-stack/component.js.map +1 -1
  450. package/build/visually-hidden/component.js +4 -8
  451. package/build/visually-hidden/component.js.map +1 -1
  452. package/build/z-stack/component.js +2 -6
  453. package/build/z-stack/component.js.map +1 -1
  454. package/build-module/alignment-matrix-control/cell.js +4 -4
  455. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  456. package/build-module/alignment-matrix-control/icon.js +2 -3
  457. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  458. package/build-module/alignment-matrix-control/index.js +6 -6
  459. package/build-module/alignment-matrix-control/index.js.map +1 -1
  460. package/build-module/angle-picker-control/angle-circle.js +4 -4
  461. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  462. package/build-module/angle-picker-control/index.js +2 -3
  463. package/build-module/angle-picker-control/index.js.map +1 -1
  464. package/build-module/autocomplete/autocompleter-ui.js +27 -2
  465. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  466. package/build-module/autocomplete/index.js +1 -19
  467. package/build-module/autocomplete/index.js.map +1 -1
  468. package/build-module/base-control/index.js +2 -3
  469. package/build-module/base-control/index.js.map +1 -1
  470. package/build-module/border-box-control/border-box-control/component.js +4 -5
  471. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  472. package/build-module/border-box-control/border-box-control-linked-button/component.js +2 -3
  473. package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  474. package/build-module/border-box-control/border-box-control-split-controls/component.js +15 -12
  475. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  476. package/build-module/border-box-control/border-box-control-visualizer/component.js +2 -3
  477. package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
  478. package/build-module/border-control/border-control/component.js +4 -5
  479. package/build-module/border-control/border-control/component.js.map +1 -1
  480. package/build-module/border-control/border-control-dropdown/component.js +4 -5
  481. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  482. package/build-module/border-control/border-control-style-picker/component.js +2 -3
  483. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  484. package/build-module/box-control/all-input-control.js +2 -3
  485. package/build-module/box-control/all-input-control.js.map +1 -1
  486. package/build-module/box-control/axial-input-controls.js +2 -3
  487. package/build-module/box-control/axial-input-controls.js.map +1 -1
  488. package/build-module/box-control/icon.js +4 -4
  489. package/build-module/box-control/icon.js.map +1 -1
  490. package/build-module/box-control/index.js +7 -5
  491. package/build-module/box-control/index.js.map +1 -1
  492. package/build-module/box-control/input-controls.js +2 -3
  493. package/build-module/box-control/input-controls.js.map +1 -1
  494. package/build-module/box-control/linked-button.js +2 -3
  495. package/build-module/box-control/linked-button.js.map +1 -1
  496. package/build-module/box-control/unit-control.js +6 -5
  497. package/build-module/box-control/unit-control.js.map +1 -1
  498. package/build-module/button/deprecated.js +2 -3
  499. package/build-module/button/deprecated.js.map +1 -1
  500. package/build-module/button/index.js +7 -2
  501. package/build-module/button/index.js.map +1 -1
  502. package/build-module/button-group/index.js +4 -4
  503. package/build-module/button-group/index.js.map +1 -1
  504. package/build-module/card/card/component.js +2 -3
  505. package/build-module/card/card/component.js.map +1 -1
  506. package/build-module/card/card-body/component.js +4 -5
  507. package/build-module/card/card-body/component.js.map +1 -1
  508. package/build-module/card/card-divider/component.js +2 -3
  509. package/build-module/card/card-divider/component.js.map +1 -1
  510. package/build-module/card/card-footer/component.js +2 -3
  511. package/build-module/card/card-footer/component.js.map +1 -1
  512. package/build-module/card/card-header/component.js +2 -3
  513. package/build-module/card/card-header/component.js.map +1 -1
  514. package/build-module/card/card-media/component.js +2 -3
  515. package/build-module/card/card-media/component.js.map +1 -1
  516. package/build-module/checkbox-control/index.js +4 -4
  517. package/build-module/checkbox-control/index.js.map +1 -1
  518. package/build-module/circular-option-picker/index.js +19 -15
  519. package/build-module/circular-option-picker/index.js.map +1 -1
  520. package/build-module/clipboard-button/index.js +9 -20
  521. package/build-module/clipboard-button/index.js.map +1 -1
  522. package/build-module/clipboard-button/types.js +2 -0
  523. package/build-module/clipboard-button/types.js.map +1 -0
  524. package/build-module/color-control/index.native.js +4 -4
  525. package/build-module/color-control/index.native.js.map +1 -1
  526. package/build-module/color-indicator/index.js +4 -4
  527. package/build-module/color-indicator/index.js.map +1 -1
  528. package/build-module/color-palette/index.js +11 -10
  529. package/build-module/color-palette/index.js.map +1 -1
  530. package/build-module/color-picker/color-input.js +6 -3
  531. package/build-module/color-picker/color-input.js.map +1 -1
  532. package/build-module/color-picker/component.js +4 -4
  533. package/build-module/color-picker/component.js.map +1 -1
  534. package/build-module/color-picker/legacy-adapter.js +2 -1
  535. package/build-module/color-picker/legacy-adapter.js.map +1 -1
  536. package/build-module/confirm-dialog/component.js +4 -4
  537. package/build-module/confirm-dialog/component.js.map +1 -1
  538. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +8 -7
  539. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  540. package/build-module/custom-select-control/index.js +34 -31
  541. package/build-module/custom-select-control/index.js.map +1 -1
  542. package/build-module/dashicon/index.js +4 -4
  543. package/build-module/dashicon/index.js.map +1 -1
  544. package/build-module/dashicon/index.native.js +4 -4
  545. package/build-module/dashicon/index.native.js.map +1 -1
  546. package/build-module/disabled/index.js +4 -4
  547. package/build-module/disabled/index.js.map +1 -1
  548. package/build-module/divider/component.js +4 -5
  549. package/build-module/divider/component.js.map +1 -1
  550. package/build-module/drop-zone/index.js +2 -3
  551. package/build-module/drop-zone/index.js.map +1 -1
  552. package/build-module/dropdown/dropdown-content-wrapper.js +2 -3
  553. package/build-module/dropdown/dropdown-content-wrapper.js.map +1 -1
  554. package/build-module/dropdown/index.js +29 -24
  555. package/build-module/dropdown/index.js.map +1 -1
  556. package/build-module/dropdown-menu/index.js +95 -91
  557. package/build-module/dropdown-menu/index.js.map +1 -1
  558. package/build-module/dropdown-menu/index.native.js +2 -3
  559. package/build-module/dropdown-menu/index.native.js.map +1 -1
  560. package/build-module/dropdown-menu-v2/index.js +14 -11
  561. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  562. package/build-module/dropdown-menu-v2/styles.js +16 -16
  563. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  564. package/build-module/elevation/component.js +2 -3
  565. package/build-module/elevation/component.js.map +1 -1
  566. package/build-module/external-link/index.js +2 -3
  567. package/build-module/external-link/index.js.map +1 -1
  568. package/build-module/flex/flex/component.js +2 -3
  569. package/build-module/flex/flex/component.js.map +1 -1
  570. package/build-module/flex/flex-block/component.js +2 -3
  571. package/build-module/flex/flex-block/component.js.map +1 -1
  572. package/build-module/flex/flex-item/component.js +2 -3
  573. package/build-module/flex/flex-item/component.js.map +1 -1
  574. package/build-module/focal-point-picker/controls.js +4 -4
  575. package/build-module/focal-point-picker/controls.js.map +1 -1
  576. package/build-module/focal-point-picker/focal-point.js +2 -3
  577. package/build-module/focal-point-picker/focal-point.js.map +1 -1
  578. package/build-module/focal-point-picker/grid.js +2 -3
  579. package/build-module/focal-point-picker/grid.js.map +1 -1
  580. package/build-module/focal-point-picker/index.js +4 -5
  581. package/build-module/focal-point-picker/index.js.map +1 -1
  582. package/build-module/focal-point-picker/index.native.js +2 -3
  583. package/build-module/focal-point-picker/index.native.js.map +1 -1
  584. package/build-module/focal-point-picker/media.js +7 -7
  585. package/build-module/focal-point-picker/media.js.map +1 -1
  586. package/build-module/focal-point-picker/tooltip/index.native.js +2 -3
  587. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  588. package/build-module/focusable-iframe/index.js +4 -4
  589. package/build-module/focusable-iframe/index.js.map +1 -1
  590. package/build-module/footer-message-control/index.native.js +2 -1
  591. package/build-module/footer-message-control/index.native.js.map +1 -1
  592. package/build-module/form-file-upload/index.js +4 -4
  593. package/build-module/form-file-upload/index.js.map +1 -1
  594. package/build-module/form-toggle/index.js +4 -4
  595. package/build-module/form-toggle/index.js.map +1 -1
  596. package/build-module/form-token-field/index.js +4 -4
  597. package/build-module/form-token-field/index.js.map +1 -1
  598. package/build-module/form-token-field/token-input.js +4 -5
  599. package/build-module/form-token-field/token-input.js.map +1 -1
  600. package/build-module/gradient-picker/index.js +14 -11
  601. package/build-module/gradient-picker/index.js.map +1 -1
  602. package/build-module/grid/component.js +2 -3
  603. package/build-module/grid/component.js.map +1 -1
  604. package/build-module/guide/page.js +2 -1
  605. package/build-module/guide/page.js.map +1 -1
  606. package/build-module/h-stack/component.js +2 -3
  607. package/build-module/h-stack/component.js.map +1 -1
  608. package/build-module/h-stack/hook.js +4 -4
  609. package/build-module/h-stack/hook.js.map +1 -1
  610. package/build-module/heading/component.js +2 -3
  611. package/build-module/heading/component.js.map +1 -1
  612. package/build-module/higher-order/navigate-regions/index.js +3 -1
  613. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  614. package/build-module/higher-order/with-constrained-tabbing/index.js +2 -1
  615. package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
  616. package/build-module/higher-order/with-fallback-styles/index.js +3 -2
  617. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  618. package/build-module/higher-order/with-filters/index.js +2 -1
  619. package/build-module/higher-order/with-filters/index.js.map +1 -1
  620. package/build-module/higher-order/with-focus-outside/index.js +5 -4
  621. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  622. package/build-module/higher-order/with-focus-outside/index.native.js +5 -4
  623. package/build-module/higher-order/with-focus-outside/index.native.js.map +1 -1
  624. package/build-module/higher-order/with-focus-return/index.js +2 -1
  625. package/build-module/higher-order/with-focus-return/index.js.map +1 -1
  626. package/build-module/higher-order/with-notices/index.js +3 -3
  627. package/build-module/higher-order/with-notices/index.js.map +1 -1
  628. package/build-module/higher-order/with-spoken-messages/index.js +2 -3
  629. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  630. package/build-module/icon/index.js +6 -6
  631. package/build-module/icon/index.js.map +1 -1
  632. package/build-module/input-control/index.js +5 -4
  633. package/build-module/input-control/index.js.map +1 -1
  634. package/build-module/input-control/input-base.js +3 -3
  635. package/build-module/input-control/input-base.js.map +1 -1
  636. package/build-module/input-control/input-field.js +3 -3
  637. package/build-module/input-control/input-field.js.map +1 -1
  638. package/build-module/input-control/input-prefix-wrapper.js +4 -5
  639. package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
  640. package/build-module/input-control/input-suffix-wrapper.js +4 -5
  641. package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
  642. package/build-module/input-control/label.js +4 -4
  643. package/build-module/input-control/label.js.map +1 -1
  644. package/build-module/input-control/styles/input-control-styles.js +2 -3
  645. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  646. package/build-module/isolated-event-container/index.js +2 -3
  647. package/build-module/isolated-event-container/index.js.map +1 -1
  648. package/build-module/item-group/item/component.js +2 -3
  649. package/build-module/item-group/item/component.js.map +1 -1
  650. package/build-module/item-group/item-group/component.js +2 -3
  651. package/build-module/item-group/item-group/component.js.map +1 -1
  652. package/build-module/item-group/styles.js +10 -10
  653. package/build-module/item-group/styles.js.map +1 -1
  654. package/build-module/menu-item/index.js +4 -4
  655. package/build-module/menu-item/index.js.map +1 -1
  656. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -5
  657. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  658. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +2 -1
  659. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  660. package/build-module/mobile/bottom-sheet/cell.native.js +5 -5
  661. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  662. package/build-module/mobile/bottom-sheet/color-cell.native.js +2 -3
  663. package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  664. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js +4 -4
  665. package/build-module/mobile/bottom-sheet/cycle-picker-cell.native.js.map +1 -1
  666. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js +2 -3
  667. package/build-module/mobile/bottom-sheet/footer-message-cell.native.js.map +1 -1
  668. package/build-module/mobile/bottom-sheet/index.native.js +8 -7
  669. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  670. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +4 -4
  671. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  672. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +2 -3
  673. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  674. package/build-module/mobile/bottom-sheet/picker-cell.native.js +4 -4
  675. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  676. package/build-module/mobile/bottom-sheet/radio-cell.native.js +2 -3
  677. package/build-module/mobile/bottom-sheet/radio-cell.native.js.map +1 -1
  678. package/build-module/mobile/bottom-sheet/range-cell.native.js +2 -3
  679. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  680. package/build-module/mobile/bottom-sheet/ripple.native.js +4 -5
  681. package/build-module/mobile/bottom-sheet/ripple.native.js.map +1 -1
  682. package/build-module/mobile/bottom-sheet/switch-cell.native.js +2 -3
  683. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  684. package/build-module/mobile/color-settings/index.native.js +5 -4
  685. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  686. package/build-module/mobile/cycle-select-control/index.native.js +4 -4
  687. package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
  688. package/build-module/mobile/focal-point-settings-panel/index.native.js +5 -4
  689. package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  690. package/build-module/mobile/global-styles-context/index.native.js +2 -3
  691. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  692. package/build-module/mobile/gradient/index.native.js +4 -4
  693. package/build-module/mobile/gradient/index.native.js.map +1 -1
  694. package/build-module/mobile/image/image-editing-button.native.js +4 -4
  695. package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
  696. package/build-module/mobile/image/index.native.js +15 -14
  697. package/build-module/mobile/image/index.native.js.map +1 -1
  698. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +2 -3
  699. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  700. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +4 -4
  701. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  702. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -1
  703. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  704. package/build-module/mobile/link-picker/link-picker-results.native.js +4 -5
  705. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  706. package/build-module/mobile/link-settings/link-settings-navigation.native.js +4 -4
  707. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  708. package/build-module/mobile/link-settings/link-settings-screen.native.js +2 -3
  709. package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  710. package/build-module/mobile/picker/index.ios.js +4 -5
  711. package/build-module/mobile/picker/index.ios.js.map +1 -1
  712. package/build-module/mobile/segmented-control/index.native.js +4 -4
  713. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  714. package/build-module/modal/index.js +4 -5
  715. package/build-module/modal/index.js.map +1 -1
  716. package/build-module/navigable-container/container.js +6 -6
  717. package/build-module/navigable-container/container.js.map +1 -1
  718. package/build-module/navigable-container/menu.js +4 -4
  719. package/build-module/navigable-container/menu.js.map +1 -1
  720. package/build-module/navigable-container/tabbable.js +4 -4
  721. package/build-module/navigable-container/tabbable.js.map +1 -1
  722. package/build-module/navigation/item/base.js +4 -4
  723. package/build-module/navigation/item/base.js.map +1 -1
  724. package/build-module/navigation/item/index.js +3 -3
  725. package/build-module/navigation/item/index.js.map +1 -1
  726. package/build-module/navigator/navigator-back-button/component.js +4 -4
  727. package/build-module/navigator/navigator-back-button/component.js.map +1 -1
  728. package/build-module/navigator/navigator-button/component.js +4 -4
  729. package/build-module/navigator/navigator-button/component.js.map +1 -1
  730. package/build-module/navigator/navigator-provider/component.js +4 -4
  731. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  732. package/build-module/navigator/navigator-screen/component.js +9 -7
  733. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  734. package/build-module/navigator/navigator-to-parent-button/component.js +4 -4
  735. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  736. package/build-module/notice/list.js +2 -3
  737. package/build-module/notice/list.js.map +1 -1
  738. package/build-module/notice/list.native.js +2 -3
  739. package/build-module/notice/list.native.js.map +1 -1
  740. package/build-module/number-control/index.js +4 -5
  741. package/build-module/number-control/index.js.map +1 -1
  742. package/build-module/palette-edit/index.js +11 -11
  743. package/build-module/palette-edit/index.js.map +1 -1
  744. package/build-module/panel/body.js +8 -7
  745. package/build-module/panel/body.js.map +1 -1
  746. package/build-module/placeholder/index.js +2 -3
  747. package/build-module/placeholder/index.js.map +1 -1
  748. package/build-module/popover/index.js +12 -12
  749. package/build-module/popover/index.js.map +1 -1
  750. package/build-module/popover/utils.js +11 -0
  751. package/build-module/popover/utils.js.map +1 -1
  752. package/build-module/query-controls/category-select.js +4 -5
  753. package/build-module/query-controls/category-select.js.map +1 -1
  754. package/build-module/radio-control/index.js +4 -4
  755. package/build-module/radio-control/index.js.map +1 -1
  756. package/build-module/radio-control/index.native.js +4 -4
  757. package/build-module/radio-control/index.native.js.map +1 -1
  758. package/build-module/radio-group/index.js +5 -4
  759. package/build-module/radio-group/index.js.map +1 -1
  760. package/build-module/radio-group/radio/index.js +5 -4
  761. package/build-module/radio-group/radio/index.js.map +1 -1
  762. package/build-module/range-control/index.js +2 -3
  763. package/build-module/range-control/index.js.map +1 -1
  764. package/build-module/range-control/index.native.js +4 -4
  765. package/build-module/range-control/index.native.js.map +1 -1
  766. package/build-module/range-control/input-range.js +2 -3
  767. package/build-module/range-control/input-range.js.map +1 -1
  768. package/build-module/range-control/mark.js +2 -3
  769. package/build-module/range-control/mark.js.map +1 -1
  770. package/build-module/range-control/rail.js +6 -6
  771. package/build-module/range-control/rail.js.map +1 -1
  772. package/build-module/range-control/tooltip.js +2 -3
  773. package/build-module/range-control/tooltip.js.map +1 -1
  774. package/build-module/resizable-box/index.js +5 -4
  775. package/build-module/resizable-box/index.js.map +1 -1
  776. package/build-module/resizable-box/resize-tooltip/index.js +4 -4
  777. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  778. package/build-module/resizable-box/resize-tooltip/label.js +4 -4
  779. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  780. package/build-module/scrollable/component.js +2 -3
  781. package/build-module/scrollable/component.js.map +1 -1
  782. package/build-module/search-control/index.js +2 -3
  783. package/build-module/search-control/index.js.map +1 -1
  784. package/build-module/select-control/index.js +2 -3
  785. package/build-module/select-control/index.js.map +1 -1
  786. package/build-module/select-control/index.native.js +4 -4
  787. package/build-module/select-control/index.native.js.map +1 -1
  788. package/build-module/slot-fill/bubbles-virtually/slot.js +4 -4
  789. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  790. package/build-module/slot-fill/index.js +17 -12
  791. package/build-module/slot-fill/index.js.map +1 -1
  792. package/build-module/slot-fill/index.native.js +10 -8
  793. package/build-module/slot-fill/index.native.js.map +1 -1
  794. package/build-module/slot-fill/slot.js +2 -3
  795. package/build-module/slot-fill/slot.js.map +1 -1
  796. package/build-module/snackbar/list.js +2 -3
  797. package/build-module/snackbar/list.js.map +1 -1
  798. package/build-module/spacer/component.js +2 -3
  799. package/build-module/spacer/component.js.map +1 -1
  800. package/build-module/spinner/index.js +4 -5
  801. package/build-module/spinner/index.js.map +1 -1
  802. package/build-module/surface/component.js +2 -3
  803. package/build-module/surface/component.js.map +1 -1
  804. package/build-module/tab-panel/index.js +4 -4
  805. package/build-module/tab-panel/index.js.map +1 -1
  806. package/build-module/text/component.js +4 -5
  807. package/build-module/text/component.js.map +1 -1
  808. package/build-module/text-control/index.js +4 -4
  809. package/build-module/text-control/index.js.map +1 -1
  810. package/build-module/text-control/index.native.js +4 -4
  811. package/build-module/text-control/index.native.js.map +1 -1
  812. package/build-module/textarea-control/index.js +4 -4
  813. package/build-module/textarea-control/index.js.map +1 -1
  814. package/build-module/theme/index.js +4 -4
  815. package/build-module/theme/index.js.map +1 -1
  816. package/build-module/toggle-control/index.native.js +4 -4
  817. package/build-module/toggle-control/index.native.js.map +1 -1
  818. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +4 -5
  819. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  820. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +4 -5
  821. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  822. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -3
  823. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  824. package/build-module/toggle-group-control/toggle-group-control-option/component.js +2 -3
  825. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  826. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +6 -6
  827. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  828. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js +2 -3
  829. package/build-module/toggle-group-control/toggle-group-control-option-icon/component.js.map +1 -1
  830. package/build-module/toolbar/toolbar/index.js +10 -13
  831. package/build-module/toolbar/toolbar/index.js.map +1 -1
  832. package/build-module/toolbar/toolbar/toolbar-container.js +9 -12
  833. package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
  834. package/build-module/toolbar/toolbar-button/index.js +13 -10
  835. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  836. package/build-module/toolbar/toolbar-context/index.js.map +1 -1
  837. package/build-module/toolbar/toolbar-dropdown-menu/index.js +8 -9
  838. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  839. package/build-module/toolbar/toolbar-group/index.js +11 -9
  840. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  841. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js +6 -5
  842. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  843. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js +4 -4
  844. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.native.js.map +1 -1
  845. package/build-module/toolbar/toolbar-group/toolbar-group-container.js +4 -4
  846. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  847. package/build-module/toolbar/toolbar-item/index.js +13 -10
  848. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  849. package/build-module/toolbar/toolbar-item/types.js +2 -0
  850. package/build-module/toolbar/toolbar-item/types.js.map +1 -0
  851. package/build-module/tools-panel/tools-panel/component.js +2 -3
  852. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  853. package/build-module/tools-panel/tools-panel-header/component.js +2 -3
  854. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  855. package/build-module/tools-panel/tools-panel-item/component.js +4 -5
  856. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  857. package/build-module/tooltip/index.js +4 -4
  858. package/build-module/tooltip/index.js.map +1 -1
  859. package/build-module/tooltip/index.native.js +2 -1
  860. package/build-module/tooltip/index.native.js.map +1 -1
  861. package/build-module/tree-grid/cell.js +2 -3
  862. package/build-module/tree-grid/cell.js.map +1 -1
  863. package/build-module/tree-grid/index.js +2 -3
  864. package/build-module/tree-grid/index.js.map +1 -1
  865. package/build-module/tree-grid/item.js +4 -4
  866. package/build-module/tree-grid/item.js.map +1 -1
  867. package/build-module/tree-grid/roving-tab-index-item.js +2 -1
  868. package/build-module/tree-grid/roving-tab-index-item.js.map +1 -1
  869. package/build-module/tree-grid/row.js +2 -3
  870. package/build-module/tree-grid/row.js.map +1 -1
  871. package/build-module/tree-select/index.js +4 -4
  872. package/build-module/tree-select/index.js.map +1 -1
  873. package/build-module/truncate/component.js +4 -5
  874. package/build-module/truncate/component.js.map +1 -1
  875. package/build-module/ui/control-group/component.js +8 -9
  876. package/build-module/ui/control-group/component.js.map +1 -1
  877. package/build-module/ui/control-label/component.js +4 -5
  878. package/build-module/ui/control-label/component.js.map +1 -1
  879. package/build-module/ui/form-group/form-group-content.js +4 -4
  880. package/build-module/ui/form-group/form-group-content.js.map +1 -1
  881. package/build-module/ui/form-group/form-group-label.js +2 -1
  882. package/build-module/ui/form-group/form-group-label.js.map +1 -1
  883. package/build-module/ui/form-group/form-group.js +8 -7
  884. package/build-module/ui/form-group/form-group.js.map +1 -1
  885. package/build-module/ui/shortcut/component.js +4 -4
  886. package/build-module/ui/shortcut/component.js.map +1 -1
  887. package/build-module/ui/spinner/component.js +2 -3
  888. package/build-module/ui/spinner/component.js.map +1 -1
  889. package/build-module/ui/tooltip/component.js +3 -3
  890. package/build-module/ui/tooltip/component.js.map +1 -1
  891. package/build-module/ui/tooltip/content.js +5 -5
  892. package/build-module/ui/tooltip/content.js.map +1 -1
  893. package/build-module/unit-control/index.js +31 -88
  894. package/build-module/unit-control/index.js.map +1 -1
  895. package/build-module/unit-control/index.native.js +7 -6
  896. package/build-module/unit-control/index.native.js.map +1 -1
  897. package/build-module/unit-control/unit-select-control.js +19 -6
  898. package/build-module/unit-control/unit-select-control.js.map +1 -1
  899. package/build-module/v-stack/component.js +2 -3
  900. package/build-module/v-stack/component.js.map +1 -1
  901. package/build-module/visually-hidden/component.js +4 -5
  902. package/build-module/visually-hidden/component.js.map +1 -1
  903. package/build-module/z-stack/component.js +2 -3
  904. package/build-module/z-stack/component.js.map +1 -1
  905. package/build-style/style-rtl.css +8 -14
  906. package/build-style/style.css +8 -14
  907. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  908. package/build-types/autocomplete/index.d.ts.map +1 -1
  909. package/build-types/button/stories/e2e/index.d.ts +1 -0
  910. package/build-types/button/stories/e2e/index.d.ts.map +1 -1
  911. package/build-types/circular-option-picker/types.d.ts +2 -2
  912. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  913. package/build-types/clipboard-button/index.d.ts +4 -15
  914. package/build-types/clipboard-button/index.d.ts.map +1 -1
  915. package/build-types/clipboard-button/types.d.ts +11 -0
  916. package/build-types/clipboard-button/types.d.ts.map +1 -0
  917. package/build-types/dropdown/index.d.ts +1 -1
  918. package/build-types/dropdown/index.d.ts.map +1 -1
  919. package/build-types/dropdown/types.d.ts +7 -0
  920. package/build-types/dropdown/types.d.ts.map +1 -1
  921. package/build-types/dropdown-menu/index.d.ts +1 -1
  922. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  923. package/build-types/dropdown-menu/stories/index.d.ts +4 -3
  924. package/build-types/dropdown-menu/stories/index.d.ts.map +1 -1
  925. package/build-types/dropdown-menu/types.d.ts +7 -0
  926. package/build-types/dropdown-menu/types.d.ts.map +1 -1
  927. package/build-types/dropdown-menu-v2/styles.d.ts +4 -4
  928. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  929. package/build-types/dropdown-menu-v2/types.d.ts +2 -2
  930. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  931. package/build-types/item-group/styles.d.ts.map +1 -1
  932. package/build-types/popover/index.d.ts.map +1 -1
  933. package/build-types/popover/stories/index.d.ts +0 -1
  934. package/build-types/popover/stories/index.d.ts.map +1 -1
  935. package/build-types/popover/utils.d.ts +10 -0
  936. package/build-types/popover/utils.d.ts.map +1 -1
  937. package/build-types/toolbar/stories/index.d.ts.map +1 -1
  938. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  939. package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
  940. package/build-types/toolbar/toolbar-context/index.d.ts +2 -2
  941. package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
  942. package/build-types/toolbar/toolbar-item/index.d.ts +4 -6
  943. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  944. package/build-types/toolbar/toolbar-item/types.d.ts +17 -0
  945. package/build-types/toolbar/toolbar-item/types.d.ts.map +1 -0
  946. package/build-types/unit-control/index.d.ts +3 -6
  947. package/build-types/unit-control/index.d.ts.map +1 -1
  948. package/build-types/unit-control/stories/index.d.ts.map +1 -1
  949. package/build-types/unit-control/unit-select-control.d.ts +7 -6
  950. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  951. package/package.json +20 -19
  952. package/src/autocomplete/autocompleter-ui.tsx +44 -2
  953. package/src/autocomplete/index.tsx +2 -32
  954. package/src/box-control/test/index.tsx +28 -60
  955. package/src/button/stories/e2e/index.tsx +22 -0
  956. package/src/button/style.scss +5 -13
  957. package/src/circular-option-picker/types.ts +2 -5
  958. package/src/clipboard-button/{index.js → index.tsx} +11 -17
  959. package/src/clipboard-button/types.ts +11 -0
  960. package/src/dropdown/index.tsx +20 -10
  961. package/src/dropdown/types.ts +8 -0
  962. package/src/dropdown-menu/index.tsx +101 -85
  963. package/src/dropdown-menu/stories/index.tsx +1 -1
  964. package/src/dropdown-menu/types.ts +8 -0
  965. package/src/dropdown-menu-v2/index.tsx +2 -2
  966. package/src/dropdown-menu-v2/styles.ts +7 -5
  967. package/src/dropdown-menu-v2/types.ts +2 -2
  968. package/src/item-group/styles.ts +12 -4
  969. package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +16 -29
  970. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  971. package/src/mobile/html-text-input/test/__snapshots__/index.native.js.snap +46 -0
  972. package/src/mobile/html-text-input/test/index.native.js +2 -2
  973. package/src/mobile/image/index.native.js +1 -1
  974. package/src/mobile/link-settings/test/link-settings-navigation.native.js +5 -16
  975. package/src/modal/style.scss +2 -2
  976. package/src/popover/index.tsx +3 -2
  977. package/src/popover/stories/index.tsx +0 -13
  978. package/src/popover/test/index.tsx +22 -1
  979. package/src/popover/utils.ts +12 -0
  980. package/src/search-control/README.md +7 -1
  981. package/src/toolbar/stories/index.tsx +0 -3
  982. package/src/toolbar/toolbar/index.tsx +3 -6
  983. package/src/toolbar/toolbar/toolbar-container.tsx +5 -9
  984. package/src/toolbar/toolbar-context/index.ts +2 -4
  985. package/src/toolbar/toolbar-dropdown-menu/index.js +0 -1
  986. package/src/toolbar/toolbar-item/index.tsx +13 -15
  987. package/src/toolbar/toolbar-item/types.ts +27 -0
  988. package/src/tooltip/test/index.native.js +1 -3
  989. package/src/unit-control/index.tsx +29 -95
  990. package/src/unit-control/stories/index.tsx +0 -4
  991. package/src/unit-control/test/index.tsx +151 -223
  992. package/src/unit-control/unit-select-control.tsx +20 -10
  993. package/tsconfig.tsbuildinfo +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar/toolbar-container.tsx"],"names":["useToolbarState","Toolbar","forwardRef","isRTL","ToolbarContext","UnforwardedToolbarContainer","label","props","ref","toolbarState","loop","baseId","id","rtl","ToolbarContainer"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,OAA1B,QAAyC,gBAAzC;;AAGA;AACA;AACA;AACA,SAASC,UAAT,QAA2B,oBAA3B;AACA,SAASC,KAAT,QAAsB,iBAAtB;AAEA;AACA;AACA;;AACA,OAAOC,cAAP,MAA2B,oBAA3B;;AAIA,SAASC,2BAAT,CACC;AAAEC,EAAAA,KAAF;AAAS,KAAGC;AAAZ,CADD,EAECC,GAFD,EAGE;AACD;AACA;AACA;AACA,QAAMC,YAAY,GAAGT,eAAe,CAAE;AACrCU,IAAAA,IAAI,EAAE,IAD+B;AAErCC,IAAAA,MAAM,EAAEJ,KAAK,CAACK,EAFuB;AAGrCC,IAAAA,GAAG,EAAEV,KAAK;AAH2B,GAAF,CAApC;AAMA,SACC;AACA,kBAAC,cAAD,CAAgB,QAAhB;AAAyB,MAAA,KAAK,EAAGM;AAAjC,OACC,cAAC,OAAD;AACC,MAAA,GAAG,EAAGD,GADP;AAEC,oBAAaF;AAFd,OAGMG,YAHN,EAIMF,KAJN,EADD;AAFD;AAWA;;AAED,OAAO,MAAMO,gBAAgB,GAAGZ,UAAU,CAAEG,2BAAF,CAAnC;AACP,eAAeS,gBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { useToolbarState, Toolbar } from 'reakit/Toolbar';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\nimport type { ToolbarProps } from './types';\nimport type { WordPressComponentProps } from '../../ui/context';\n\nfunction UnforwardedToolbarContainer(\n\t{ label, ...props }: WordPressComponentProps< ToolbarProps, 'div', false >,\n\tref: ForwardedRef< any >\n) {\n\t// https://reakit.io/docs/basic-concepts/#state-hooks\n\t// Passing baseId for server side rendering (which includes snapshots)\n\t// If an id prop is passed to Toolbar, toolbar items will use it as a base for their ids\n\tconst toolbarState = useToolbarState( {\n\t\tloop: true,\n\t\tbaseId: props.id,\n\t\trtl: isRTL(),\n\t} );\n\n\treturn (\n\t\t// This will provide state for `ToolbarButton`'s\n\t\t<ToolbarContext.Provider value={ toolbarState }>\n\t\t\t<Toolbar\n\t\t\t\tref={ ref }\n\t\t\t\taria-label={ label }\n\t\t\t\t{ ...toolbarState }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</ToolbarContext.Provider>\n\t);\n}\n\nexport const ToolbarContainer = forwardRef( UnforwardedToolbarContainer );\nexport default ToolbarContainer;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar/toolbar-container.tsx"],"names":["useToolbarStore","Toolbar","forwardRef","isRTL","ToolbarContext","UnforwardedToolbarContainer","label","props","ref","toolbarStore","focusLoop","rtl","ToolbarContainer"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,eAAT,EAA0BC,OAA1B,QAAyC,wBAAzC;;AAGA;AACA;AACA;AACA,SAASC,UAAT,QAA2B,oBAA3B;AACA,SAASC,KAAT,QAAsB,iBAAtB;AAEA;AACA;AACA;;AACA,OAAOC,cAAP,MAA2B,oBAA3B;;AAIA,SAASC,2BAAT,CACC;AAAEC,EAAAA,KAAF;AAAS,KAAGC;AAAZ,CADD,EAECC,GAFD,EAGE;AACD,QAAMC,YAAY,GAAGT,eAAe,CAAE;AACrCU,IAAAA,SAAS,EAAE,IAD0B;AAErCC,IAAAA,GAAG,EAAER,KAAK;AAF2B,GAAF,CAApC;AAKA,SACC;AACA,kBAAC,cAAD,CAAgB,QAAhB;AAAyB,MAAA,KAAK,EAAGM;AAAjC,OACC,cAAC,OAAD;AACC,MAAA,GAAG,EAAGD,GADP;AAEC,oBAAaF,KAFd;AAGC,MAAA,KAAK,EAAGG,YAHT;AAAA,SAIMF;AAJN,MADD;AAFD;AAWA;;AAED,OAAO,MAAMK,gBAAgB,GAAGV,UAAU,CAAEG,2BAAF,CAAnC;AACP,eAAeO,gBAAf","sourcesContent":["/**\n * External dependencies\n */\nimport { useToolbarStore, Toolbar } from '@ariakit/react/toolbar';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\nimport type { ToolbarProps } from './types';\nimport type { WordPressComponentProps } from '../../ui/context';\n\nfunction UnforwardedToolbarContainer(\n\t{ label, ...props }: WordPressComponentProps< ToolbarProps, 'div', false >,\n\tref: ForwardedRef< any >\n) {\n\tconst toolbarStore = useToolbarStore( {\n\t\tfocusLoop: true,\n\t\trtl: isRTL(),\n\t} );\n\n\treturn (\n\t\t// This will provide state for `ToolbarButton`'s\n\t\t<ToolbarContext.Provider value={ toolbarStore }>\n\t\t\t<Toolbar\n\t\t\t\tref={ ref }\n\t\t\t\taria-label={ label }\n\t\t\t\tstore={ toolbarStore }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t</ToolbarContext.Provider>\n\t);\n}\n\nexport const ToolbarContainer = forwardRef( UnforwardedToolbarContainer );\nexport default ToolbarContainer;\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
  /**
@@ -34,7 +33,7 @@ function UnforwardedToolbarButton({
34
33
  if (!accessibleToolbarState) {
35
34
  return createElement(ToolbarButtonContainer, {
36
35
  className: containerClassName
37
- }, createElement(Button, _extends({
36
+ }, createElement(Button, {
38
37
  ref: ref,
39
38
  icon: props.icon,
40
39
  label: title,
@@ -50,22 +49,26 @@ function UnforwardedToolbarButton({
50
49
  className: classnames('components-toolbar__control', className),
51
50
  isPressed: isActive,
52
51
  disabled: isDisabled,
53
- "data-toolbar-item": true
54
- }, extraProps, props), children));
52
+ "data-toolbar-item": true,
53
+ ...extraProps,
54
+ ...props
55
+ }, children));
55
56
  } // ToobarItem will pass all props to the render prop child, which will pass
56
57
  // all props to Button. This means that ToolbarButton has the same API as
57
58
  // Button.
58
59
 
59
60
 
60
- return createElement(ToolbarItem, _extends({
61
- className: classnames('components-toolbar-button', className)
62
- }, extraProps, props, {
61
+ return createElement(ToolbarItem, {
62
+ className: classnames('components-toolbar-button', className),
63
+ ...extraProps,
64
+ ...props,
63
65
  ref: ref
64
- }), toolbarItemProps => createElement(Button, _extends({
66
+ }, toolbarItemProps => createElement(Button, {
65
67
  label: title,
66
68
  isPressed: isActive,
67
- disabled: isDisabled
68
- }, toolbarItemProps), children));
69
+ disabled: isDisabled,
70
+ ...toolbarItemProps
71
+ }, children));
69
72
  }
70
73
  /**
71
74
  * ToolbarButton can be used to add actions to a toolbar, usually inside a Toolbar
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-button/index.tsx"],"names":["classnames","useContext","forwardRef","Button","ToolbarItem","ToolbarContext","ToolbarButtonContainer","UnforwardedToolbarButton","children","className","containerClassName","extraProps","isActive","isDisabled","title","props","ref","accessibleToolbarState","icon","shortcut","subscript","event","stopPropagation","onClick","toolbarItemProps","ToolbarButton"],"mappings":";;;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;;AAGA;AACA;AACA;AACA,SAASC,UAAT,EAAqBC,UAArB,QAAuC,oBAAvC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,sBAAP,MAAmC,4BAAnC;;AAKA,SAASC,wBAAT,CACC;AACCC,EAAAA,QADD;AAECC,EAAAA,SAFD;AAGCC,EAAAA,kBAHD;AAICC,EAAAA,UAJD;AAKCC,EAAAA,QALD;AAMCC,EAAAA,UAND;AAOCC,EAAAA,KAPD;AAQC,KAAGC;AARJ,CADD,EAWCC,GAXD,EAYE;AACD,QAAMC,sBAAsB,GAAGhB,UAAU,CAAEI,cAAF,CAAzC;;AAEA,MAAK,CAAEY,sBAAP,EAAgC;AAC/B,WACC,cAAC,sBAAD;AAAwB,MAAA,SAAS,EAAGP;AAApC,OACC,cAAC,MAAD;AACC,MAAA,GAAG,EAAGM,GADP;AAEC,MAAA,IAAI,EAAGD,KAAK,CAACG,IAFd;AAGC,MAAA,KAAK,EAAGJ,KAHT;AAIC,MAAA,QAAQ,EAAGC,KAAK,CAACI,QAJlB;AAKC,wBAAiBJ,KAAK,CAACK,SALxB;AAMC,MAAA,OAAO,EACNC,KADS,IAKL;AACJA,QAAAA,KAAK,CAACC,eAAN,GADI,CAEJ;;AACA,YAAKP,KAAK,CAACQ,OAAX,EAAqB;AACpBR,UAAAA,KAAK,CAACQ,OAAN,CAAeF,KAAf;AACA;AACD,OAjBF;AAkBC,MAAA,SAAS,EAAGrB,UAAU,CACrB,6BADqB,EAErBS,SAFqB,CAlBvB;AAsBC,MAAA,SAAS,EAAGG,QAtBb;AAuBC,MAAA,QAAQ,EAAGC,UAvBZ;AAwBC;AAxBD,OAyBMF,UAzBN,EA0BMI,KA1BN,GA4BGP,QA5BH,CADD,CADD;AAkCA,GAtCA,CAwCD;AACA;AACA;;;AACA,SACC,cAAC,WAAD;AACC,IAAA,SAAS,EAAGR,UAAU,CAAE,2BAAF,EAA+BS,SAA/B;AADvB,KAEME,UAFN,EAGMI,KAHN;AAIC,IAAA,GAAG,EAAGC;AAJP,MAMKQ,gBAAF,IACD,cAAC,MAAD;AACC,IAAA,KAAK,EAAGV,KADT;AAEC,IAAA,SAAS,EAAGF,QAFb;AAGC,IAAA,QAAQ,EAAGC;AAHZ,KAIMW,gBAJN,GAMGhB,QANH,CAPF,CADD;AAmBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAMiB,aAAa,GAAGvB,UAAU,CAAEK,wBAAF,CAAhC;AACP,eAAekB,aAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarButtonContainer from './toolbar-button-container';\nimport type { ToolbarButtonProps } from './types';\nimport type { WordPressComponentProps } from '../../ui/context';\nimport type React from 'react';\n\nfunction UnforwardedToolbarButton(\n\t{\n\t\tchildren,\n\t\tclassName,\n\t\tcontainerClassName,\n\t\textraProps,\n\t\tisActive,\n\t\tisDisabled,\n\t\ttitle,\n\t\t...props\n\t}: WordPressComponentProps< ToolbarButtonProps, typeof Button, false >,\n\tref: ForwardedRef< any >\n) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn (\n\t\t\t<ToolbarButtonContainer className={ containerClassName }>\n\t\t\t\t<Button\n\t\t\t\t\tref={ ref }\n\t\t\t\t\ticon={ props.icon }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tshortcut={ props.shortcut }\n\t\t\t\t\tdata-subscript={ props.subscript }\n\t\t\t\t\tonClick={ (\n\t\t\t\t\t\tevent: React.MouseEvent<\n\t\t\t\t\t\t\tHTMLButtonElement & HTMLAnchorElement,\n\t\t\t\t\t\t\tMouseEvent\n\t\t\t\t\t\t>\n\t\t\t\t\t) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t// TODO: Possible bug; maybe use onClick instead of props.onClick.\n\t\t\t\t\t\tif ( props.onClick ) {\n\t\t\t\t\t\t\tprops.onClick( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'components-toolbar__control',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\tdata-toolbar-item\n\t\t\t\t\t{ ...extraProps }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t</ToolbarButtonContainer>\n\t\t);\n\t}\n\n\t// ToobarItem will pass all props to the render prop child, which will pass\n\t// all props to Button. This means that ToolbarButton has the same API as\n\t// Button.\n\treturn (\n\t\t<ToolbarItem\n\t\t\tclassName={ classnames( 'components-toolbar-button', className ) }\n\t\t\t{ ...extraProps }\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\t{ ...toolbarItemProps }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\n/**\n * ToolbarButton can be used to add actions to a toolbar, usually inside a Toolbar\n * or ToolbarGroup when used to create general interfaces.\n *\n * ```jsx\n * import { Toolbar, ToolbarButton } from '@wordpress/components';\n * import { edit } from '@wordpress/icons';\n *\n * function MyToolbar() {\n * return (\n *\t\t<Toolbar label=\"Options\">\n *\t\t\t<ToolbarButton\n *\t\t\t\ticon={ edit }\n *\t\t\t\tlabel=\"Edit\"\n *\t\t\t\tonClick={ () => alert( 'Editing' ) }\n *\t\t\t/>\n *\t\t</Toolbar>\n * );\n * }\n * ```\n */\nexport const ToolbarButton = forwardRef( UnforwardedToolbarButton );\nexport default ToolbarButton;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-button/index.tsx"],"names":["classnames","useContext","forwardRef","Button","ToolbarItem","ToolbarContext","ToolbarButtonContainer","UnforwardedToolbarButton","children","className","containerClassName","extraProps","isActive","isDisabled","title","props","ref","accessibleToolbarState","icon","shortcut","subscript","event","stopPropagation","onClick","toolbarItemProps","ToolbarButton"],"mappings":";;AAAA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;;AAGA;AACA;AACA;AACA,SAASC,UAAT,EAAqBC,UAArB,QAAuC,oBAAvC;AAEA;AACA;AACA;;AACA,OAAOC,MAAP,MAAmB,cAAnB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,sBAAP,MAAmC,4BAAnC;;AAKA,SAASC,wBAAT,CACC;AACCC,EAAAA,QADD;AAECC,EAAAA,SAFD;AAGCC,EAAAA,kBAHD;AAICC,EAAAA,UAJD;AAKCC,EAAAA,QALD;AAMCC,EAAAA,UAND;AAOCC,EAAAA,KAPD;AAQC,KAAGC;AARJ,CADD,EAWCC,GAXD,EAYE;AACD,QAAMC,sBAAsB,GAAGhB,UAAU,CAAEI,cAAF,CAAzC;;AAEA,MAAK,CAAEY,sBAAP,EAAgC;AAC/B,WACC,cAAC,sBAAD;AAAwB,MAAA,SAAS,EAAGP;AAApC,OACC,cAAC,MAAD;AACC,MAAA,GAAG,EAAGM,GADP;AAEC,MAAA,IAAI,EAAGD,KAAK,CAACG,IAFd;AAGC,MAAA,KAAK,EAAGJ,KAHT;AAIC,MAAA,QAAQ,EAAGC,KAAK,CAACI,QAJlB;AAKC,wBAAiBJ,KAAK,CAACK,SALxB;AAMC,MAAA,OAAO,EACNC,KADS,IAKL;AACJA,QAAAA,KAAK,CAACC,eAAN,GADI,CAEJ;;AACA,YAAKP,KAAK,CAACQ,OAAX,EAAqB;AACpBR,UAAAA,KAAK,CAACQ,OAAN,CAAeF,KAAf;AACA;AACD,OAjBF;AAkBC,MAAA,SAAS,EAAGrB,UAAU,CACrB,6BADqB,EAErBS,SAFqB,CAlBvB;AAsBC,MAAA,SAAS,EAAGG,QAtBb;AAuBC,MAAA,QAAQ,EAAGC,UAvBZ;AAwBC,+BAxBD;AAAA,SAyBMF,UAzBN;AAAA,SA0BMI;AA1BN,OA4BGP,QA5BH,CADD,CADD;AAkCA,GAtCA,CAwCD;AACA;AACA;;;AACA,SACC,cAAC,WAAD;AACC,IAAA,SAAS,EAAGR,UAAU,CAAE,2BAAF,EAA+BS,SAA/B,CADvB;AAAA,OAEME,UAFN;AAAA,OAGMI,KAHN;AAIC,IAAA,GAAG,EAAGC;AAJP,KAMKQ,gBAAF,IACD,cAAC,MAAD;AACC,IAAA,KAAK,EAAGV,KADT;AAEC,IAAA,SAAS,EAAGF,QAFb;AAGC,IAAA,QAAQ,EAAGC,UAHZ;AAAA,OAIMW;AAJN,KAMGhB,QANH,CAPF,CADD;AAmBA;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAMiB,aAAa,GAAGvB,UAAU,CAAEK,wBAAF,CAAhC;AACP,eAAekB,aAAf","sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useContext, forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport Button from '../../button';\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarButtonContainer from './toolbar-button-container';\nimport type { ToolbarButtonProps } from './types';\nimport type { WordPressComponentProps } from '../../ui/context';\nimport type React from 'react';\n\nfunction UnforwardedToolbarButton(\n\t{\n\t\tchildren,\n\t\tclassName,\n\t\tcontainerClassName,\n\t\textraProps,\n\t\tisActive,\n\t\tisDisabled,\n\t\ttitle,\n\t\t...props\n\t}: WordPressComponentProps< ToolbarButtonProps, typeof Button, false >,\n\tref: ForwardedRef< any >\n) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn (\n\t\t\t<ToolbarButtonContainer className={ containerClassName }>\n\t\t\t\t<Button\n\t\t\t\t\tref={ ref }\n\t\t\t\t\ticon={ props.icon }\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tshortcut={ props.shortcut }\n\t\t\t\t\tdata-subscript={ props.subscript }\n\t\t\t\t\tonClick={ (\n\t\t\t\t\t\tevent: React.MouseEvent<\n\t\t\t\t\t\t\tHTMLButtonElement & HTMLAnchorElement,\n\t\t\t\t\t\t\tMouseEvent\n\t\t\t\t\t\t>\n\t\t\t\t\t) => {\n\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t// TODO: Possible bug; maybe use onClick instead of props.onClick.\n\t\t\t\t\t\tif ( props.onClick ) {\n\t\t\t\t\t\t\tprops.onClick( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t'components-toolbar__control',\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\tdata-toolbar-item\n\t\t\t\t\t{ ...extraProps }\n\t\t\t\t\t{ ...props }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t</ToolbarButtonContainer>\n\t\t);\n\t}\n\n\t// ToobarItem will pass all props to the render prop child, which will pass\n\t// all props to Button. This means that ToolbarButton has the same API as\n\t// Button.\n\treturn (\n\t\t<ToolbarItem\n\t\t\tclassName={ classnames( 'components-toolbar-button', className ) }\n\t\t\t{ ...extraProps }\n\t\t\t{ ...props }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<Button\n\t\t\t\t\tlabel={ title }\n\t\t\t\t\tisPressed={ isActive }\n\t\t\t\t\tdisabled={ isDisabled }\n\t\t\t\t\t{ ...toolbarItemProps }\n\t\t\t\t>\n\t\t\t\t\t{ children }\n\t\t\t\t</Button>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\n/**\n * ToolbarButton can be used to add actions to a toolbar, usually inside a Toolbar\n * or ToolbarGroup when used to create general interfaces.\n *\n * ```jsx\n * import { Toolbar, ToolbarButton } from '@wordpress/components';\n * import { edit } from '@wordpress/icons';\n *\n * function MyToolbar() {\n * return (\n *\t\t<Toolbar label=\"Options\">\n *\t\t\t<ToolbarButton\n *\t\t\t\ticon={ edit }\n *\t\t\t\tlabel=\"Edit\"\n *\t\t\t\tonClick={ () => alert( 'Editing' ) }\n *\t\t\t/>\n *\t\t</Toolbar>\n * );\n * }\n * ```\n */\nexport const ToolbarButton = forwardRef( UnforwardedToolbarButton );\nexport default ToolbarButton;\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-context/index.ts"],"names":["createContext","ToolbarContext","undefined"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,oBAA9B;AAEA,MAAMC,cAAc,GAAGD,aAAa,CACnCE,SADmC,CAApC;AAIA,eAAeD,cAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ToolbarStateReturn } from 'reakit/Toolbar';\n\n/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nconst ToolbarContext = createContext< ToolbarStateReturn | undefined >(\n\tundefined\n);\n\nexport default ToolbarContext;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-context/index.ts"],"names":["createContext","ToolbarContext","undefined"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,aAAT,QAA8B,oBAA9B;AAEA,MAAMC,cAAc,GAAGD,aAAa,CAA8BE,SAA9B,CAApC;AAEA,eAAeD,cAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ToolbarStore } from '@ariakit/react/toolbar';\n\n/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\nconst ToolbarContext = createContext< ToolbarStore | undefined >( undefined );\n\nexport default ToolbarContext;\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
 
@@ -18,21 +17,21 @@ function ToolbarDropdownMenu(props, ref) {
18
17
  const accessibleToolbarState = useContext(ToolbarContext);
19
18
 
20
19
  if (!accessibleToolbarState) {
21
- return createElement(DropdownMenu, props);
20
+ return createElement(DropdownMenu, { ...props
21
+ });
22
22
  } // ToobarItem will pass all props to the render prop child, which will pass
23
23
  // all props to the toggle of DropdownMenu. This means that ToolbarDropdownMenu
24
24
  // has the same API as DropdownMenu.
25
25
 
26
26
 
27
- return createElement(ToolbarItem, _extends({
28
- ref: ref
29
- }, props.toggleProps), toolbarItemProps => createElement(DropdownMenu, _extends({}, props, {
30
- popoverProps: {
31
- variant: 'toolbar',
32
- ...props.popoverProps
27
+ return createElement(ToolbarItem, {
28
+ ref: ref,
29
+ ...props.toggleProps
30
+ }, toolbarItemProps => createElement(DropdownMenu, { ...props,
31
+ popoverProps: { ...props.popoverProps
33
32
  },
34
33
  toggleProps: toolbarItemProps
35
- })));
34
+ }));
36
35
  }
37
36
 
38
37
  export default forwardRef(ToolbarDropdownMenu);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-dropdown-menu/index.js"],"names":["forwardRef","useContext","ToolbarItem","ToolbarContext","DropdownMenu","ToolbarDropdownMenu","props","ref","accessibleToolbarState","toggleProps","toolbarItemProps","variant","popoverProps"],"mappings":";;AAAA;;AAEA;AACA;AACA;AACA,SAASA,UAAT,EAAqBC,UAArB,QAAuC,oBAAvC;AAEA;AACA;AACA;;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,qBAAzB;;AAEA,SAASC,mBAAT,CAA8BC,KAA9B,EAAqCC,GAArC,EAA2C;AAC1C,QAAMC,sBAAsB,GAAGP,UAAU,CAAEE,cAAF,CAAzC;;AAEA,MAAK,CAAEK,sBAAP,EAAgC;AAC/B,WAAO,cAAC,YAAD,EAAmBF,KAAnB,CAAP;AACA,GALyC,CAO1C;AACA;AACA;;;AACA,SACC,cAAC,WAAD;AAAa,IAAA,GAAG,EAAGC;AAAnB,KAA8BD,KAAK,CAACG,WAApC,GACKC,gBAAF,IACD,cAAC,YAAD,eACMJ,KADN;AAEC,IAAA,YAAY,EAAG;AACdK,MAAAA,OAAO,EAAE,SADK;AAEd,SAAGL,KAAK,CAACM;AAFK,KAFhB;AAMC,IAAA,WAAW,EAAGF;AANf,KAFF,CADD;AAcA;;AAED,eAAeV,UAAU,CAAEK,mBAAF,CAAzB","sourcesContent":["// @ts-nocheck\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport DropdownMenu from '../../dropdown-menu';\n\nfunction ToolbarDropdownMenu( props, ref ) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn <DropdownMenu { ...props } />;\n\t}\n\n\t// ToobarItem will pass all props to the render prop child, which will pass\n\t// all props to the toggle of DropdownMenu. This means that ToolbarDropdownMenu\n\t// has the same API as DropdownMenu.\n\treturn (\n\t\t<ToolbarItem ref={ ref } { ...props.toggleProps }>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<DropdownMenu\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\tvariant: 'toolbar',\n\t\t\t\t\t\t...props.popoverProps,\n\t\t\t\t\t} }\n\t\t\t\t\ttoggleProps={ toolbarItemProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\nexport default forwardRef( ToolbarDropdownMenu );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-dropdown-menu/index.js"],"names":["forwardRef","useContext","ToolbarItem","ToolbarContext","DropdownMenu","ToolbarDropdownMenu","props","ref","accessibleToolbarState","toggleProps","toolbarItemProps","popoverProps"],"mappings":";AAAA;;AAEA;AACA;AACA;AACA,SAASA,UAAT,EAAqBC,UAArB,QAAuC,oBAAvC;AAEA;AACA;AACA;;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,qBAAzB;;AAEA,SAASC,mBAAT,CAA8BC,KAA9B,EAAqCC,GAArC,EAA2C;AAC1C,QAAMC,sBAAsB,GAAGP,UAAU,CAAEE,cAAF,CAAzC;;AAEA,MAAK,CAAEK,sBAAP,EAAgC;AAC/B,WAAO,cAAC,YAAD,OAAmBF;AAAnB,MAAP;AACA,GALyC,CAO1C;AACA;AACA;;;AACA,SACC,cAAC,WAAD;AAAa,IAAA,GAAG,EAAGC,GAAnB;AAAA,OAA8BD,KAAK,CAACG;AAApC,KACKC,gBAAF,IACD,cAAC,YAAD,OACMJ,KADN;AAEC,IAAA,YAAY,EAAG,EACd,GAAGA,KAAK,CAACK;AADK,KAFhB;AAKC,IAAA,WAAW,EAAGD;AALf,IAFF,CADD;AAaA;;AAED,eAAeV,UAAU,CAAEK,mBAAF,CAAzB","sourcesContent":["// @ts-nocheck\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ToolbarItem from '../toolbar-item';\nimport ToolbarContext from '../toolbar-context';\nimport DropdownMenu from '../../dropdown-menu';\n\nfunction ToolbarDropdownMenu( props, ref ) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ! accessibleToolbarState ) {\n\t\treturn <DropdownMenu { ...props } />;\n\t}\n\n\t// ToobarItem will pass all props to the render prop child, which will pass\n\t// all props to the toggle of DropdownMenu. This means that ToolbarDropdownMenu\n\t// has the same API as DropdownMenu.\n\treturn (\n\t\t<ToolbarItem ref={ ref } { ...props.toggleProps }>\n\t\t\t{ ( toolbarItemProps ) => (\n\t\t\t\t<DropdownMenu\n\t\t\t\t\t{ ...props }\n\t\t\t\t\tpopoverProps={ {\n\t\t\t\t\t\t...props.popoverProps,\n\t\t\t\t\t} }\n\t\t\t\t\ttoggleProps={ toolbarItemProps }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</ToolbarItem>\n\t);\n}\n\nexport default forwardRef( ToolbarDropdownMenu );\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
 
@@ -77,20 +76,23 @@ function ToolbarGroup({
77
76
  }
78
77
 
79
78
  if (isCollapsed) {
80
- return createElement(ToolbarGroupCollapsed, _extends({
79
+ return createElement(ToolbarGroupCollapsed, {
81
80
  label: title,
82
81
  controls: controlSets,
83
82
  className: finalClassName,
84
- children: children
85
- }, props));
83
+ children: children,
84
+ ...props
85
+ });
86
86
  }
87
87
 
88
- return createElement(ToolbarGroupContainer, _extends({
89
- className: finalClassName
90
- }, props), controlSets?.flatMap((controlSet, indexOfSet) => controlSet.map((control, indexOfControl) => createElement(ToolbarButton, _extends({
88
+ return createElement(ToolbarGroupContainer, {
89
+ className: finalClassName,
90
+ ...props
91
+ }, controlSets?.flatMap((controlSet, indexOfSet) => controlSet.map((control, indexOfControl) => createElement(ToolbarButton, {
91
92
  key: [indexOfSet, indexOfControl].join(),
92
- containerClassName: indexOfSet > 0 && indexOfControl === 0 ? 'has-left-divider' : null
93
- }, control)))), children);
93
+ containerClassName: indexOfSet > 0 && indexOfControl === 0 ? 'has-left-divider' : null,
94
+ ...control
95
+ }))), children);
94
96
  }
95
97
 
96
98
  export default ToolbarGroup;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/index.js"],"names":["classnames","useContext","ToolbarButton","ToolbarGroupContainer","ToolbarGroupCollapsed","ToolbarContext","ToolbarGroup","controls","children","className","isCollapsed","title","props","accessibleToolbarState","length","finalClassName","controlSets","Array","isArray","flatMap","controlSet","indexOfSet","map","control","indexOfControl","join"],"mappings":";;AAAA;;AAEA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,UAAT,QAA2B,oBAA3B;AAEA;AACA;AACA;;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,qBAAP,MAAkC,2BAAlC;AACA,OAAOC,qBAAP,MAAkC,2BAAlC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;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,SAASC,YAAT,CAAuB;AACtBC,EAAAA,QAAQ,GAAG,EADW;AAEtBC,EAAAA,QAFsB;AAGtBC,EAAAA,SAHsB;AAItBC,EAAAA,WAJsB;AAKtBC,EAAAA,KALsB;AAMtB,KAAGC;AANmB,CAAvB,EAOI;AACH;AACA;AACA,QAAMC,sBAAsB,GAAGZ,UAAU,CAAEI,cAAF,CAAzC;;AAEA,MAAK,CAAE,CAAEE,QAAF,IAAc,CAAEA,QAAQ,CAACO,MAA3B,KAAuC,CAAEN,QAA9C,EAAyD;AACxD,WAAO,IAAP;AACA;;AAED,QAAMO,cAAc,GAAGf,UAAU,EAChC;AACA;AACAa,EAAAA,sBAAsB,GACnB,0BADmB,GAEnB,oBAL6B,EAMhCJ,SANgC,CAAjC,CATG,CAkBH;;AACA,MAAIO,WAAW,GAAGT,QAAlB;;AACA,MAAK,CAAEU,KAAK,CAACC,OAAN,CAAeF,WAAW,CAAE,CAAF,CAA1B,CAAP,EAA2C;AAC1CA,IAAAA,WAAW,GAAG,CAAEA,WAAF,CAAd;AACA;;AAED,MAAKN,WAAL,EAAmB;AAClB,WACC,cAAC,qBAAD;AACC,MAAA,KAAK,EAAGC,KADT;AAEC,MAAA,QAAQ,EAAGK,WAFZ;AAGC,MAAA,SAAS,EAAGD,cAHb;AAIC,MAAA,QAAQ,EAAGP;AAJZ,OAKMI,KALN,EADD;AASA;;AAED,SACC,cAAC,qBAAD;AAAuB,IAAA,SAAS,EAAGG;AAAnC,KAAyDH,KAAzD,GACGI,WAAW,EAAEG,OAAb,CAAsB,CAAEC,UAAF,EAAcC,UAAd,KACvBD,UAAU,CAACE,GAAX,CAAgB,CAAEC,OAAF,EAAWC,cAAX,KACf,cAAC,aAAD;AACC,IAAA,GAAG,EAAG,CAAEH,UAAF,EAAcG,cAAd,EAA+BC,IAA/B,EADP;AAEC,IAAA,kBAAkB,EACjBJ,UAAU,GAAG,CAAb,IAAkBG,cAAc,KAAK,CAArC,GACG,kBADH,GAEG;AALL,KAOMD,OAPN,EADD,CADC,CADH,EAcGf,QAdH,CADD;AAkBA;;AAED,eAAeF,YAAf","sourcesContent":["// @ts-nocheck\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ToolbarButton from '../toolbar-button';\nimport ToolbarGroupContainer from './toolbar-group-container';\nimport ToolbarGroupCollapsed from './toolbar-group-collapsed';\nimport ToolbarContext from '../toolbar-context';\n\n/**\n * Renders a collapsible group of controls\n *\n * The `controls` prop accepts an array of sets. A set is an array of controls.\n * Controls have the following shape:\n *\n * ```\n * {\n * icon: string,\n * title: string,\n * subscript: string,\n * onClick: Function,\n * isActive: boolean,\n * isDisabled: boolean\n * }\n * ```\n *\n * For convenience it is also possible to pass only an array of controls. It is\n * then assumed this is the only set.\n *\n * Either `controls` or `children` is required, otherwise this components\n * renders nothing.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.controls] The controls to render in this toolbar.\n * @param {WPElement} [props.children] Any other things to render inside the toolbar besides the controls.\n * @param {string} [props.className] Class to set on the container div.\n * @param {boolean} [props.isCollapsed] Turns ToolbarGroup into a dropdown menu.\n * @param {string} [props.title] ARIA label for dropdown menu if is collapsed.\n */\nfunction ToolbarGroup( {\n\tcontrols = [],\n\tchildren,\n\tclassName,\n\tisCollapsed,\n\ttitle,\n\t...props\n} ) {\n\t// It'll contain state if `ToolbarGroup` is being used within\n\t// `<Toolbar label=\"label\" />`\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ( ! controls || ! controls.length ) && ! children ) {\n\t\treturn null;\n\t}\n\n\tconst finalClassName = classnames(\n\t\t// Unfortunately, there's legacy code referencing to `.components-toolbar`\n\t\t// So we can't get rid of it\n\t\taccessibleToolbarState\n\t\t\t? 'components-toolbar-group'\n\t\t\t: 'components-toolbar',\n\t\tclassName\n\t);\n\n\t// Normalize controls to nested array of objects (sets of controls)\n\tlet controlSets = controls;\n\tif ( ! Array.isArray( controlSets[ 0 ] ) ) {\n\t\tcontrolSets = [ controlSets ];\n\t}\n\n\tif ( isCollapsed ) {\n\t\treturn (\n\t\t\t<ToolbarGroupCollapsed\n\t\t\t\tlabel={ title }\n\t\t\t\tcontrols={ controlSets }\n\t\t\t\tclassName={ finalClassName }\n\t\t\t\tchildren={ children }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<ToolbarGroupContainer className={ finalClassName } { ...props }>\n\t\t\t{ controlSets?.flatMap( ( controlSet, indexOfSet ) =>\n\t\t\t\tcontrolSet.map( ( control, indexOfControl ) => (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tkey={ [ indexOfSet, indexOfControl ].join() }\n\t\t\t\t\t\tcontainerClassName={\n\t\t\t\t\t\t\tindexOfSet > 0 && indexOfControl === 0\n\t\t\t\t\t\t\t\t? 'has-left-divider'\n\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...control }\n\t\t\t\t\t/>\n\t\t\t\t) )\n\t\t\t) }\n\t\t\t{ children }\n\t\t</ToolbarGroupContainer>\n\t);\n}\n\nexport default ToolbarGroup;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/index.js"],"names":["classnames","useContext","ToolbarButton","ToolbarGroupContainer","ToolbarGroupCollapsed","ToolbarContext","ToolbarGroup","controls","children","className","isCollapsed","title","props","accessibleToolbarState","length","finalClassName","controlSets","Array","isArray","flatMap","controlSet","indexOfSet","map","control","indexOfControl","join"],"mappings":";AAAA;;AAEA;AACA;AACA;AACA,OAAOA,UAAP,MAAuB,YAAvB;AAEA;AACA;AACA;;AACA,SAASC,UAAT,QAA2B,oBAA3B;AAEA;AACA;AACA;;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,qBAAP,MAAkC,2BAAlC;AACA,OAAOC,qBAAP,MAAkC,2BAAlC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;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,SAASC,YAAT,CAAuB;AACtBC,EAAAA,QAAQ,GAAG,EADW;AAEtBC,EAAAA,QAFsB;AAGtBC,EAAAA,SAHsB;AAItBC,EAAAA,WAJsB;AAKtBC,EAAAA,KALsB;AAMtB,KAAGC;AANmB,CAAvB,EAOI;AACH;AACA;AACA,QAAMC,sBAAsB,GAAGZ,UAAU,CAAEI,cAAF,CAAzC;;AAEA,MAAK,CAAE,CAAEE,QAAF,IAAc,CAAEA,QAAQ,CAACO,MAA3B,KAAuC,CAAEN,QAA9C,EAAyD;AACxD,WAAO,IAAP;AACA;;AAED,QAAMO,cAAc,GAAGf,UAAU,EAChC;AACA;AACAa,EAAAA,sBAAsB,GACnB,0BADmB,GAEnB,oBAL6B,EAMhCJ,SANgC,CAAjC,CATG,CAkBH;;AACA,MAAIO,WAAW,GAAGT,QAAlB;;AACA,MAAK,CAAEU,KAAK,CAACC,OAAN,CAAeF,WAAW,CAAE,CAAF,CAA1B,CAAP,EAA2C;AAC1CA,IAAAA,WAAW,GAAG,CAAEA,WAAF,CAAd;AACA;;AAED,MAAKN,WAAL,EAAmB;AAClB,WACC,cAAC,qBAAD;AACC,MAAA,KAAK,EAAGC,KADT;AAEC,MAAA,QAAQ,EAAGK,WAFZ;AAGC,MAAA,SAAS,EAAGD,cAHb;AAIC,MAAA,QAAQ,EAAGP,QAJZ;AAAA,SAKMI;AALN,MADD;AASA;;AAED,SACC,cAAC,qBAAD;AAAuB,IAAA,SAAS,EAAGG,cAAnC;AAAA,OAAyDH;AAAzD,KACGI,WAAW,EAAEG,OAAb,CAAsB,CAAEC,UAAF,EAAcC,UAAd,KACvBD,UAAU,CAACE,GAAX,CAAgB,CAAEC,OAAF,EAAWC,cAAX,KACf,cAAC,aAAD;AACC,IAAA,GAAG,EAAG,CAAEH,UAAF,EAAcG,cAAd,EAA+BC,IAA/B,EADP;AAEC,IAAA,kBAAkB,EACjBJ,UAAU,GAAG,CAAb,IAAkBG,cAAc,KAAK,CAArC,GACG,kBADH,GAEG,IALL;AAAA,OAOMD;AAPN,IADD,CADC,CADH,EAcGf,QAdH,CADD;AAkBA;;AAED,eAAeF,YAAf","sourcesContent":["// @ts-nocheck\n\n/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport ToolbarButton from '../toolbar-button';\nimport ToolbarGroupContainer from './toolbar-group-container';\nimport ToolbarGroupCollapsed from './toolbar-group-collapsed';\nimport ToolbarContext from '../toolbar-context';\n\n/**\n * Renders a collapsible group of controls\n *\n * The `controls` prop accepts an array of sets. A set is an array of controls.\n * Controls have the following shape:\n *\n * ```\n * {\n * icon: string,\n * title: string,\n * subscript: string,\n * onClick: Function,\n * isActive: boolean,\n * isDisabled: boolean\n * }\n * ```\n *\n * For convenience it is also possible to pass only an array of controls. It is\n * then assumed this is the only set.\n *\n * Either `controls` or `children` is required, otherwise this components\n * renders nothing.\n *\n * @param {Object} props Component props.\n * @param {Array} [props.controls] The controls to render in this toolbar.\n * @param {WPElement} [props.children] Any other things to render inside the toolbar besides the controls.\n * @param {string} [props.className] Class to set on the container div.\n * @param {boolean} [props.isCollapsed] Turns ToolbarGroup into a dropdown menu.\n * @param {string} [props.title] ARIA label for dropdown menu if is collapsed.\n */\nfunction ToolbarGroup( {\n\tcontrols = [],\n\tchildren,\n\tclassName,\n\tisCollapsed,\n\ttitle,\n\t...props\n} ) {\n\t// It'll contain state if `ToolbarGroup` is being used within\n\t// `<Toolbar label=\"label\" />`\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( ( ! controls || ! controls.length ) && ! children ) {\n\t\treturn null;\n\t}\n\n\tconst finalClassName = classnames(\n\t\t// Unfortunately, there's legacy code referencing to `.components-toolbar`\n\t\t// So we can't get rid of it\n\t\taccessibleToolbarState\n\t\t\t? 'components-toolbar-group'\n\t\t\t: 'components-toolbar',\n\t\tclassName\n\t);\n\n\t// Normalize controls to nested array of objects (sets of controls)\n\tlet controlSets = controls;\n\tif ( ! Array.isArray( controlSets[ 0 ] ) ) {\n\t\tcontrolSets = [ controlSets ];\n\t}\n\n\tif ( isCollapsed ) {\n\t\treturn (\n\t\t\t<ToolbarGroupCollapsed\n\t\t\t\tlabel={ title }\n\t\t\t\tcontrols={ controlSets }\n\t\t\t\tclassName={ finalClassName }\n\t\t\t\tchildren={ children }\n\t\t\t\t{ ...props }\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<ToolbarGroupContainer className={ finalClassName } { ...props }>\n\t\t\t{ controlSets?.flatMap( ( controlSet, indexOfSet ) =>\n\t\t\t\tcontrolSet.map( ( control, indexOfControl ) => (\n\t\t\t\t\t<ToolbarButton\n\t\t\t\t\t\tkey={ [ indexOfSet, indexOfControl ].join() }\n\t\t\t\t\t\tcontainerClassName={\n\t\t\t\t\t\t\tindexOfSet > 0 && indexOfControl === 0\n\t\t\t\t\t\t\t\t? 'has-left-divider'\n\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{ ...control }\n\t\t\t\t\t/>\n\t\t\t\t) )\n\t\t\t) }\n\t\t\t{ children }\n\t\t</ToolbarGroupContainer>\n\t);\n}\n\nexport default ToolbarGroup;\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
 
@@ -23,15 +22,17 @@ function ToolbarGroupCollapsed({
23
22
  // `<Toolbar label="label" />`
24
23
  const accessibleToolbarState = useContext(ToolbarContext);
25
24
 
26
- const renderDropdownMenu = internalToggleProps => createElement(DropdownMenu, _extends({
25
+ const renderDropdownMenu = internalToggleProps => createElement(DropdownMenu, {
27
26
  controls: controls,
28
27
  toggleProps: { ...internalToggleProps,
29
28
  'data-toolbar-item': true
30
- }
31
- }, props));
29
+ },
30
+ ...props
31
+ });
32
32
 
33
33
  if (accessibleToolbarState) {
34
- return createElement(ToolbarItem, toggleProps, renderDropdownMenu);
34
+ return createElement(ToolbarItem, { ...toggleProps
35
+ }, renderDropdownMenu);
35
36
  }
36
37
 
37
38
  return renderDropdownMenu(toggleProps);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/toolbar-group-collapsed.js"],"names":["useContext","DropdownMenu","ToolbarContext","ToolbarItem","ToolbarGroupCollapsed","controls","toggleProps","props","accessibleToolbarState","renderDropdownMenu","internalToggleProps"],"mappings":";;AAAA;;AAEA;AACA;AACA;AACA,SAASA,UAAT,QAA2B,oBAA3B;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,qBAAzB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,WAAP,MAAwB,iBAAxB;;AAEA,SAASC,qBAAT,CAAgC;AAAEC,EAAAA,QAAQ,GAAG,EAAb;AAAiBC,EAAAA,WAAjB;AAA8B,KAAGC;AAAjC,CAAhC,EAA2E;AAC1E;AACA;AACA,QAAMC,sBAAsB,GAAGR,UAAU,CAAEE,cAAF,CAAzC;;AAEA,QAAMO,kBAAkB,GAAKC,mBAAF,IAC1B,cAAC,YAAD;AACC,IAAA,QAAQ,EAAGL,QADZ;AAEC,IAAA,WAAW,EAAG,EACb,GAAGK,mBADU;AAEb,2BAAqB;AAFR;AAFf,KAMMH,KANN,EADD;;AAWA,MAAKC,sBAAL,EAA8B;AAC7B,WACC,cAAC,WAAD,EAAkBF,WAAlB,EAAkCG,kBAAlC,CADD;AAGA;;AAED,SAAOA,kBAAkB,CAAEH,WAAF,CAAzB;AACA;;AAED,eAAeF,qBAAf","sourcesContent":["// @ts-nocheck\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport DropdownMenu from '../../dropdown-menu';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarItem from '../toolbar-item';\n\nfunction ToolbarGroupCollapsed( { controls = [], toggleProps, ...props } ) {\n\t// It'll contain state if `ToolbarGroup` is being used within\n\t// `<Toolbar label=\"label\" />`\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tconst renderDropdownMenu = ( internalToggleProps ) => (\n\t\t<DropdownMenu\n\t\t\tcontrols={ controls }\n\t\t\ttoggleProps={ {\n\t\t\t\t...internalToggleProps,\n\t\t\t\t'data-toolbar-item': true,\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n\n\tif ( accessibleToolbarState ) {\n\t\treturn (\n\t\t\t<ToolbarItem { ...toggleProps }>{ renderDropdownMenu }</ToolbarItem>\n\t\t);\n\t}\n\n\treturn renderDropdownMenu( toggleProps );\n}\n\nexport default ToolbarGroupCollapsed;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/toolbar-group-collapsed.js"],"names":["useContext","DropdownMenu","ToolbarContext","ToolbarItem","ToolbarGroupCollapsed","controls","toggleProps","props","accessibleToolbarState","renderDropdownMenu","internalToggleProps"],"mappings":";AAAA;;AAEA;AACA;AACA;AACA,SAASA,UAAT,QAA2B,oBAA3B;AAEA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,qBAAzB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,WAAP,MAAwB,iBAAxB;;AAEA,SAASC,qBAAT,CAAgC;AAAEC,EAAAA,QAAQ,GAAG,EAAb;AAAiBC,EAAAA,WAAjB;AAA8B,KAAGC;AAAjC,CAAhC,EAA2E;AAC1E;AACA;AACA,QAAMC,sBAAsB,GAAGR,UAAU,CAAEE,cAAF,CAAzC;;AAEA,QAAMO,kBAAkB,GAAKC,mBAAF,IAC1B,cAAC,YAAD;AACC,IAAA,QAAQ,EAAGL,QADZ;AAEC,IAAA,WAAW,EAAG,EACb,GAAGK,mBADU;AAEb,2BAAqB;AAFR,KAFf;AAAA,OAMMH;AANN,IADD;;AAWA,MAAKC,sBAAL,EAA8B;AAC7B,WACC,cAAC,WAAD,OAAkBF;AAAlB,OAAkCG,kBAAlC,CADD;AAGA;;AAED,SAAOA,kBAAkB,CAAEH,WAAF,CAAzB;AACA;;AAED,eAAeF,qBAAf","sourcesContent":["// @ts-nocheck\n\n/**\n * WordPress dependencies\n */\nimport { useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport DropdownMenu from '../../dropdown-menu';\nimport ToolbarContext from '../toolbar-context';\nimport ToolbarItem from '../toolbar-item';\n\nfunction ToolbarGroupCollapsed( { controls = [], toggleProps, ...props } ) {\n\t// It'll contain state if `ToolbarGroup` is being used within\n\t// `<Toolbar label=\"label\" />`\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tconst renderDropdownMenu = ( internalToggleProps ) => (\n\t\t<DropdownMenu\n\t\t\tcontrols={ controls }\n\t\t\ttoggleProps={ {\n\t\t\t\t...internalToggleProps,\n\t\t\t\t'data-toolbar-item': true,\n\t\t\t} }\n\t\t\t{ ...props }\n\t\t/>\n\t);\n\n\tif ( accessibleToolbarState ) {\n\t\treturn (\n\t\t\t<ToolbarItem { ...toggleProps }>{ renderDropdownMenu }</ToolbarItem>\n\t\t);\n\t}\n\n\treturn renderDropdownMenu( toggleProps );\n}\n\nexport default ToolbarGroupCollapsed;\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
  /**
@@ -25,9 +24,10 @@ function ToolbarGroupCollapsed({
25
24
  }) {
26
25
  return createElement(View, {
27
26
  style: [getStylesFromColorScheme(styles.container, styles.containerDark), passedStyle]
28
- }, createElement(DropdownMenu, _extends({
29
- controls: controls
30
- }, props)));
27
+ }, createElement(DropdownMenu, {
28
+ controls: controls,
29
+ ...props
30
+ }));
31
31
  }
32
32
 
33
33
  export default withPreferredColorScheme(ToolbarGroupCollapsed);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/toolbar-group-collapsed.native.js"],"names":["View","withPreferredColorScheme","DropdownMenu","styles","ToolbarGroupCollapsed","controls","getStylesFromColorScheme","passedStyle","props","container","containerDark"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,cAArB;AACA;AACA;AACA;;AACA,SAASC,wBAAT,QAAyC,oBAAzC;AACA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,qBAAzB;AACA,OAAOC,MAAP,MAAmB,cAAnB;;AAEA,SAASC,qBAAT,CAAgC;AAC/BC,EAAAA,QAAQ,GAAG,EADoB;AAE/BC,EAAAA,wBAF+B;AAG/BC,EAAAA,WAH+B;AAI/B,KAAGC;AAJ4B,CAAhC,EAKI;AACH,SACC,cAAC,IAAD;AACC,IAAA,KAAK,EAAG,CACPF,wBAAwB,CACvBH,MAAM,CAACM,SADgB,EAEvBN,MAAM,CAACO,aAFgB,CADjB,EAKPH,WALO;AADT,KASC,cAAC,YAAD;AAAc,IAAA,QAAQ,EAAGF;AAAzB,KAAyCG,KAAzC,EATD,CADD;AAaA;;AAED,eAAeP,wBAAwB,CAAEG,qBAAF,CAAvC","sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { withPreferredColorScheme } from '@wordpress/compose';\n/**\n * Internal dependencies\n */\nimport DropdownMenu from '../../dropdown-menu';\nimport styles from './style.scss';\n\nfunction ToolbarGroupCollapsed( {\n\tcontrols = [],\n\tgetStylesFromColorScheme,\n\tpassedStyle,\n\t...props\n} ) {\n\treturn (\n\t\t<View\n\t\t\tstyle={ [\n\t\t\t\tgetStylesFromColorScheme(\n\t\t\t\t\tstyles.container,\n\t\t\t\t\tstyles.containerDark\n\t\t\t\t),\n\t\t\t\tpassedStyle,\n\t\t\t] }\n\t\t>\n\t\t\t<DropdownMenu controls={ controls } { ...props } />\n\t\t</View>\n\t);\n}\n\nexport default withPreferredColorScheme( ToolbarGroupCollapsed );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/toolbar-group-collapsed.native.js"],"names":["View","withPreferredColorScheme","DropdownMenu","styles","ToolbarGroupCollapsed","controls","getStylesFromColorScheme","passedStyle","props","container","containerDark"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,IAAT,QAAqB,cAArB;AACA;AACA;AACA;;AACA,SAASC,wBAAT,QAAyC,oBAAzC;AACA;AACA;AACA;;AACA,OAAOC,YAAP,MAAyB,qBAAzB;AACA,OAAOC,MAAP,MAAmB,cAAnB;;AAEA,SAASC,qBAAT,CAAgC;AAC/BC,EAAAA,QAAQ,GAAG,EADoB;AAE/BC,EAAAA,wBAF+B;AAG/BC,EAAAA,WAH+B;AAI/B,KAAGC;AAJ4B,CAAhC,EAKI;AACH,SACC,cAAC,IAAD;AACC,IAAA,KAAK,EAAG,CACPF,wBAAwB,CACvBH,MAAM,CAACM,SADgB,EAEvBN,MAAM,CAACO,aAFgB,CADjB,EAKPH,WALO;AADT,KASC,cAAC,YAAD;AAAc,IAAA,QAAQ,EAAGF,QAAzB;AAAA,OAAyCG;AAAzC,IATD,CADD;AAaA;;AAED,eAAeP,wBAAwB,CAAEG,qBAAF,CAAvC","sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { withPreferredColorScheme } from '@wordpress/compose';\n/**\n * Internal dependencies\n */\nimport DropdownMenu from '../../dropdown-menu';\nimport styles from './style.scss';\n\nfunction ToolbarGroupCollapsed( {\n\tcontrols = [],\n\tgetStylesFromColorScheme,\n\tpassedStyle,\n\t...props\n} ) {\n\treturn (\n\t\t<View\n\t\t\tstyle={ [\n\t\t\t\tgetStylesFromColorScheme(\n\t\t\t\t\tstyles.container,\n\t\t\t\t\tstyles.containerDark\n\t\t\t\t),\n\t\t\t\tpassedStyle,\n\t\t\t] }\n\t\t>\n\t\t\t<DropdownMenu controls={ controls } { ...props } />\n\t\t</View>\n\t);\n}\n\nexport default withPreferredColorScheme( ToolbarGroupCollapsed );\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
  // @ts-nocheck
@@ -6,9 +5,10 @@ const ToolbarGroupContainer = ({
6
5
  className,
7
6
  children,
8
7
  ...props
9
- }) => createElement("div", _extends({
10
- className: className
11
- }, props), children);
8
+ }) => createElement("div", {
9
+ className: className,
10
+ ...props
11
+ }, children);
12
12
 
13
13
  export default ToolbarGroupContainer;
14
14
  //# sourceMappingURL=toolbar-group-container.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/toolbar-group-container.js"],"names":["ToolbarGroupContainer","className","children","props"],"mappings":";;;AAAA;AAEA,MAAMA,qBAAqB,GAAG,CAAE;AAAEC,EAAAA,SAAF;AAAaC,EAAAA,QAAb;AAAuB,KAAGC;AAA1B,CAAF,KAC7B;AAAK,EAAA,SAAS,EAAGF;AAAjB,GAAkCE,KAAlC,GACGD,QADH,CADD;;AAKA,eAAeF,qBAAf","sourcesContent":["// @ts-nocheck\n\nconst ToolbarGroupContainer = ( { className, children, ...props } ) => (\n\t<div className={ className } { ...props }>\n\t\t{ children }\n\t</div>\n);\nexport default ToolbarGroupContainer;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-group/toolbar-group-container.js"],"names":["ToolbarGroupContainer","className","children","props"],"mappings":";;AAAA;AAEA,MAAMA,qBAAqB,GAAG,CAAE;AAAEC,EAAAA,SAAF;AAAaC,EAAAA,QAAb;AAAuB,KAAGC;AAA1B,CAAF,KAC7B;AAAK,EAAA,SAAS,EAAGF,SAAjB;AAAA,KAAkCE;AAAlC,GACGD,QADH,CADD;;AAKA,eAAeF,qBAAf","sourcesContent":["// @ts-nocheck\n\nconst ToolbarGroupContainer = ( { className, children, ...props } ) => (\n\t<div className={ className } { ...props }>\n\t\t{ children }\n\t</div>\n);\nexport default ToolbarGroupContainer;\n"]}
@@ -1,10 +1,9 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
5
4
  * External dependencies
6
5
  */
7
- import { ToolbarItem as BaseToolbarItem } from 'reakit/Toolbar';
6
+ import { ToolbarItem as BaseToolbarItem } from '@ariakit/react/toolbar';
8
7
 
9
8
  /**
10
9
  * WordPress dependencies
@@ -22,9 +21,10 @@ function ToolbarItem({
22
21
  as: Component,
23
22
  ...props
24
23
  }, ref) {
25
- const accessibleToolbarState = useContext(ToolbarContext);
24
+ const accessibleToolbarStore = useContext(ToolbarContext);
25
+ const isRenderProp = typeof children === 'function';
26
26
 
27
- if (typeof children !== 'function' && !Component) {
27
+ if (!isRenderProp && !Component) {
28
28
  typeof process !== "undefined" && process.env && process.env.NODE_ENV !== "production" ? warning('`ToolbarItem` is a generic headless component. You must pass either a `children` prop as a function or an `as` prop as a component. ' + 'See https://developer.wordpress.org/block-editor/components/toolbar-item/') : void 0;
29
29
  return null;
30
30
  }
@@ -34,21 +34,24 @@ function ToolbarItem({
34
34
  'data-toolbar-item': true
35
35
  };
36
36
 
37
- if (!accessibleToolbarState) {
37
+ if (!accessibleToolbarStore) {
38
38
  if (Component) {
39
- return createElement(Component, allProps, children);
39
+ return createElement(Component, { ...allProps
40
+ }, children);
40
41
  }
41
42
 
42
- if (typeof children !== 'function') {
43
+ if (!isRenderProp) {
43
44
  return null;
44
45
  }
45
46
 
46
47
  return children(allProps);
47
48
  }
48
49
 
49
- return createElement(BaseToolbarItem, _extends({}, accessibleToolbarState, allProps, {
50
- as: Component
51
- }), children);
50
+ const render = isRenderProp ? children : Component && createElement(Component, null);
51
+ return createElement(BaseToolbarItem, { ...allProps,
52
+ store: accessibleToolbarStore,
53
+ render: render
54
+ });
52
55
  }
53
56
 
54
57
  export default forwardRef(ToolbarItem);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-item/index.tsx"],"names":["ToolbarItem","BaseToolbarItem","forwardRef","useContext","warning","ToolbarContext","children","as","Component","props","ref","accessibleToolbarState","allProps"],"mappings":";;;AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,eAAxB,QAA+C,gBAA/C;;AAGA;AACA;AACA;AACA,SAASC,UAAT,EAAqBC,UAArB,QAAuC,oBAAvC;AACA,OAAOC,OAAP,MAAoB,oBAApB;AAEA;AACA;AACA;;AACA,OAAOC,cAAP,MAA2B,oBAA3B;;AAEA,SAASL,WAAT,CACC;AACCM,EAAAA,QADD;AAECC,EAAAA,EAAE,EAAEC,SAFL;AAGC,KAAGC;AAHJ,CADD,EAMCC,GAND,EAOE;AACD,QAAMC,sBAAsB,GAAGR,UAAU,CAAEE,cAAF,CAAzC;;AAEA,MAAK,OAAOC,QAAP,KAAoB,UAApB,IAAkC,CAAEE,SAAzC,EAAqD;AACpD,6FAAAJ,OAAO,CACN,yIACC,2EAFK,CAAP;AAIA,WAAO,IAAP;AACA;;AAED,QAAMQ,QAAQ,GAAG,EAAE,GAAGH,KAAL;AAAYC,IAAAA,GAAZ;AAAiB,yBAAqB;AAAtC,GAAjB;;AAEA,MAAK,CAAEC,sBAAP,EAAgC;AAC/B,QAAKH,SAAL,EAAiB;AAChB,aAAO,cAAC,SAAD,EAAgBI,QAAhB,EAA6BN,QAA7B,CAAP;AACA;;AACD,QAAK,OAAOA,QAAP,KAAoB,UAAzB,EAAsC;AACrC,aAAO,IAAP;AACA;;AACD,WAAOA,QAAQ,CAAEM,QAAF,CAAf;AACA;;AAED,SACC,cAAC,eAAD,eACMD,sBADN,EAEMC,QAFN;AAGC,IAAA,EAAE,EAAGJ;AAHN,MAKGF,QALH,CADD;AASA;;AAED,eAAeJ,UAAU,CAAEF,WAAF,CAAzB","sourcesContent":["/**\n * External dependencies\n */\nimport { ToolbarItem as BaseToolbarItem } from 'reakit/Toolbar';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\n\nfunction ToolbarItem(\n\t{\n\t\tchildren,\n\t\tas: Component,\n\t\t...props\n\t}: React.ComponentPropsWithoutRef< typeof BaseToolbarItem >,\n\tref: ForwardedRef< any >\n) {\n\tconst accessibleToolbarState = useContext( ToolbarContext );\n\n\tif ( typeof children !== 'function' && ! Component ) {\n\t\twarning(\n\t\t\t'`ToolbarItem` is a generic headless component. You must pass either a `children` prop as a function or an `as` prop as a component. ' +\n\t\t\t\t'See https://developer.wordpress.org/block-editor/components/toolbar-item/'\n\t\t);\n\t\treturn null;\n\t}\n\n\tconst allProps = { ...props, ref, 'data-toolbar-item': true };\n\n\tif ( ! accessibleToolbarState ) {\n\t\tif ( Component ) {\n\t\t\treturn <Component { ...allProps }>{ children }</Component>;\n\t\t}\n\t\tif ( typeof children !== 'function' ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn children( allProps );\n\t}\n\n\treturn (\n\t\t<BaseToolbarItem\n\t\t\t{ ...accessibleToolbarState }\n\t\t\t{ ...allProps }\n\t\t\tas={ Component }\n\t\t>\n\t\t\t{ children }\n\t\t</BaseToolbarItem>\n\t);\n}\n\nexport default forwardRef( ToolbarItem );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/toolbar/toolbar-item/index.tsx"],"names":["ToolbarItem","BaseToolbarItem","forwardRef","useContext","warning","ToolbarContext","children","as","Component","props","ref","accessibleToolbarStore","isRenderProp","allProps","render"],"mappings":";;AAAA;AACA;AACA;AACA,SAASA,WAAW,IAAIC,eAAxB,QAA+C,wBAA/C;;AAGA;AACA;AACA;AACA,SAASC,UAAT,EAAqBC,UAArB,QAAuC,oBAAvC;AACA,OAAOC,OAAP,MAAoB,oBAApB;AAEA;AACA;AACA;;AACA,OAAOC,cAAP,MAA2B,oBAA3B;;AAGA,SAASL,WAAT,CACC;AAAEM,EAAAA,QAAF;AAAYC,EAAAA,EAAE,EAAEC,SAAhB;AAA2B,KAAGC;AAA9B,CADD,EAECC,GAFD,EAGE;AACD,QAAMC,sBAAsB,GAAGR,UAAU,CAAEE,cAAF,CAAzC;AACA,QAAMO,YAAY,GAAG,OAAON,QAAP,KAAoB,UAAzC;;AAEA,MAAK,CAAEM,YAAF,IAAkB,CAAEJ,SAAzB,EAAqC;AACpC,6FAAAJ,OAAO,CACN,yIACC,2EAFK,CAAP;AAIA,WAAO,IAAP;AACA;;AAED,QAAMS,QAAQ,GAAG,EAAE,GAAGJ,KAAL;AAAYC,IAAAA,GAAZ;AAAiB,yBAAqB;AAAtC,GAAjB;;AAEA,MAAK,CAAEC,sBAAP,EAAgC;AAC/B,QAAKH,SAAL,EAAiB;AAChB,aAAO,cAAC,SAAD,OAAgBK;AAAhB,SAA6BP,QAA7B,CAAP;AACA;;AACD,QAAK,CAAEM,YAAP,EAAsB;AACrB,aAAO,IAAP;AACA;;AACD,WAAON,QAAQ,CAAEO,QAAF,CAAf;AACA;;AAED,QAAMC,MAAM,GAAGF,YAAY,GAAGN,QAAH,GAAcE,SAAS,IAAI,cAAC,SAAD,OAAtD;AAEA,SACC,cAAC,eAAD,OACMK,QADN;AAEC,IAAA,KAAK,EAAGF,sBAFT;AAGC,IAAA,MAAM,EAAGG;AAHV,IADD;AAOA;;AAED,eAAeZ,UAAU,CAAEF,WAAF,CAAzB","sourcesContent":["/**\n * External dependencies\n */\nimport { ToolbarItem as BaseToolbarItem } from '@ariakit/react/toolbar';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport warning from '@wordpress/warning';\n\n/**\n * Internal dependencies\n */\nimport ToolbarContext from '../toolbar-context';\nimport type { ToolbarItemProps } from './types';\n\nfunction ToolbarItem(\n\t{ children, as: Component, ...props }: ToolbarItemProps,\n\tref: ForwardedRef< any >\n) {\n\tconst accessibleToolbarStore = useContext( ToolbarContext );\n\tconst isRenderProp = typeof children === 'function';\n\n\tif ( ! isRenderProp && ! Component ) {\n\t\twarning(\n\t\t\t'`ToolbarItem` is a generic headless component. You must pass either a `children` prop as a function or an `as` prop as a component. ' +\n\t\t\t\t'See https://developer.wordpress.org/block-editor/components/toolbar-item/'\n\t\t);\n\t\treturn null;\n\t}\n\n\tconst allProps = { ...props, ref, 'data-toolbar-item': true };\n\n\tif ( ! accessibleToolbarStore ) {\n\t\tif ( Component ) {\n\t\t\treturn <Component { ...allProps }>{ children }</Component>;\n\t\t}\n\t\tif ( ! isRenderProp ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn children( allProps );\n\t}\n\n\tconst render = isRenderProp ? children : Component && <Component />;\n\n\treturn (\n\t\t<BaseToolbarItem\n\t\t\t{ ...allProps }\n\t\t\tstore={ accessibleToolbarStore }\n\t\t\trender={ render }\n\t\t/>\n\t);\n}\n\nexport default forwardRef( ToolbarItem );\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -24,10 +23,10 @@ const UnconnectedToolsPanel = (props, forwardedRef) => {
24
23
  headingLevel,
25
24
  ...toolsPanelProps
26
25
  } = useToolsPanel(props);
27
- return createElement(Grid, _extends({}, toolsPanelProps, {
26
+ return createElement(Grid, { ...toolsPanelProps,
28
27
  columns: 2,
29
28
  ref: forwardedRef
30
- }), createElement(ToolsPanelContext.Provider, {
29
+ }, createElement(ToolsPanelContext.Provider, {
31
30
  value: panelContext
32
31
  }, createElement(ToolsPanelHeader, {
33
32
  label: label,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/tools-panel/tools-panel/component.tsx"],"names":["ToolsPanelHeader","ToolsPanelContext","useToolsPanel","Grid","contextConnect","UnconnectedToolsPanel","props","forwardedRef","children","label","panelContext","resetAllItems","toggleItem","headingLevel","toolsPanelProps","ToolsPanel"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAOA,gBAAP,MAA6B,uBAA7B;AACA,SAASC,iBAAT,QAAkC,YAAlC;AACA,SAASC,aAAT,QAA8B,QAA9B;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,cAAT,QAAwD,kBAAxD;;AAGA,MAAMC,qBAAqB,GAAG,CAC7BC,KAD6B,EAE7BC,YAF6B,KAGzB;AACJ,QAAM;AACLC,IAAAA,QADK;AAELC,IAAAA,KAFK;AAGLC,IAAAA,YAHK;AAILC,IAAAA,aAJK;AAKLC,IAAAA,UALK;AAMLC,IAAAA,YANK;AAOL,OAAGC;AAPE,MAQFZ,aAAa,CAAEI,KAAF,CARjB;AAUA,SACC,cAAC,IAAD,eAAWQ,eAAX;AAA6B,IAAA,OAAO,EAAG,CAAvC;AAA2C,IAAA,GAAG,EAAGP;AAAjD,MACC,cAAC,iBAAD,CAAmB,QAAnB;AAA4B,IAAA,KAAK,EAAGG;AAApC,KACC,cAAC,gBAAD;AACC,IAAA,KAAK,EAAGD,KADT;AAEC,IAAA,QAAQ,EAAGE,aAFZ;AAGC,IAAA,UAAU,EAAGC,UAHd;AAIC,IAAA,YAAY,EAAGC;AAJhB,IADD,EAOGL,QAPH,CADD,CADD;AAaA,CA3BD;AA6BA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAMO,UAAU,GAAGX,cAAc,CAAEC,qBAAF,EAAyB,YAAzB,CAAjC;AAEP,eAAeU,UAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ToolsPanelHeader from '../tools-panel-header';\nimport { ToolsPanelContext } from '../context';\nimport { useToolsPanel } from './hook';\nimport { Grid } from '../../grid';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport type { ToolsPanelProps } from '../types';\n\nconst UnconnectedToolsPanel = (\n\tprops: WordPressComponentProps< ToolsPanelProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tchildren,\n\t\tlabel,\n\t\tpanelContext,\n\t\tresetAllItems,\n\t\ttoggleItem,\n\t\theadingLevel,\n\t\t...toolsPanelProps\n\t} = useToolsPanel( props );\n\n\treturn (\n\t\t<Grid { ...toolsPanelProps } columns={ 2 } ref={ forwardedRef }>\n\t\t\t<ToolsPanelContext.Provider value={ panelContext }>\n\t\t\t\t<ToolsPanelHeader\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tresetAll={ resetAllItems }\n\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t/>\n\t\t\t\t{ children }\n\t\t\t</ToolsPanelContext.Provider>\n\t\t</Grid>\n\t);\n};\n\n/**\n * The `ToolsPanel` is a container component that displays its children preceded\n * by a header. The header includes a dropdown menu which is automatically\n * generated from the panel's inner `ToolsPanelItems`.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import {\n * __experimentalToolsPanel as ToolsPanel,\n * __experimentalToolsPanelItem as ToolsPanelItem,\n * __experimentalUnitControl as UnitControl\n * } from '@wordpress/components';\n *\n * function Example() {\n * const [ height, setHeight ] = useState();\n * const [ width, setWidth ] = useState();\n *\n * const resetAll = () => {\n * setHeight();\n * setWidth();\n * }\n *\n * return (\n * <ToolsPanel label={ __( 'Dimensions' ) } resetAll={ resetAll }>\n * <ToolsPanelItem\n * hasValue={ () => !! height }\n * label={ __( 'Height' ) }\n * onDeselect={ () => setHeight() }\n * >\n * <UnitControl\n * label={ __( 'Height' ) }\n * onChange={ setHeight }\n * value={ height }\n * />\n * </ToolsPanelItem>\n * <ToolsPanelItem\n * hasValue={ () => !! width }\n * label={ __( 'Width' ) }\n * onDeselect={ () => setWidth() }\n * >\n * <UnitControl\n * label={ __( 'Width' ) }\n * onChange={ setWidth }\n * value={ width }\n * />\n * </ToolsPanelItem>\n * </ToolsPanel>\n * );\n * }\n * ```\n */\nexport const ToolsPanel = contextConnect( UnconnectedToolsPanel, 'ToolsPanel' );\n\nexport default ToolsPanel;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/tools-panel/tools-panel/component.tsx"],"names":["ToolsPanelHeader","ToolsPanelContext","useToolsPanel","Grid","contextConnect","UnconnectedToolsPanel","props","forwardedRef","children","label","panelContext","resetAllItems","toggleItem","headingLevel","toolsPanelProps","ToolsPanel"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAOA,gBAAP,MAA6B,uBAA7B;AACA,SAASC,iBAAT,QAAkC,YAAlC;AACA,SAASC,aAAT,QAA8B,QAA9B;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,cAAT,QAAwD,kBAAxD;;AAGA,MAAMC,qBAAqB,GAAG,CAC7BC,KAD6B,EAE7BC,YAF6B,KAGzB;AACJ,QAAM;AACLC,IAAAA,QADK;AAELC,IAAAA,KAFK;AAGLC,IAAAA,YAHK;AAILC,IAAAA,aAJK;AAKLC,IAAAA,UALK;AAMLC,IAAAA,YANK;AAOL,OAAGC;AAPE,MAQFZ,aAAa,CAAEI,KAAF,CARjB;AAUA,SACC,cAAC,IAAD,OAAWQ,eAAX;AAA6B,IAAA,OAAO,EAAG,CAAvC;AAA2C,IAAA,GAAG,EAAGP;AAAjD,KACC,cAAC,iBAAD,CAAmB,QAAnB;AAA4B,IAAA,KAAK,EAAGG;AAApC,KACC,cAAC,gBAAD;AACC,IAAA,KAAK,EAAGD,KADT;AAEC,IAAA,QAAQ,EAAGE,aAFZ;AAGC,IAAA,UAAU,EAAGC,UAHd;AAIC,IAAA,YAAY,EAAGC;AAJhB,IADD,EAOGL,QAPH,CADD,CADD;AAaA,CA3BD;AA6BA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA,OAAO,MAAMO,UAAU,GAAGX,cAAc,CAAEC,qBAAF,EAAyB,YAAzB,CAAjC;AAEP,eAAeU,UAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport ToolsPanelHeader from '../tools-panel-header';\nimport { ToolsPanelContext } from '../context';\nimport { useToolsPanel } from './hook';\nimport { Grid } from '../../grid';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport type { ToolsPanelProps } from '../types';\n\nconst UnconnectedToolsPanel = (\n\tprops: WordPressComponentProps< ToolsPanelProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tchildren,\n\t\tlabel,\n\t\tpanelContext,\n\t\tresetAllItems,\n\t\ttoggleItem,\n\t\theadingLevel,\n\t\t...toolsPanelProps\n\t} = useToolsPanel( props );\n\n\treturn (\n\t\t<Grid { ...toolsPanelProps } columns={ 2 } ref={ forwardedRef }>\n\t\t\t<ToolsPanelContext.Provider value={ panelContext }>\n\t\t\t\t<ToolsPanelHeader\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\tresetAll={ resetAllItems }\n\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\theadingLevel={ headingLevel }\n\t\t\t\t/>\n\t\t\t\t{ children }\n\t\t\t</ToolsPanelContext.Provider>\n\t\t</Grid>\n\t);\n};\n\n/**\n * The `ToolsPanel` is a container component that displays its children preceded\n * by a header. The header includes a dropdown menu which is automatically\n * generated from the panel's inner `ToolsPanelItems`.\n *\n * @example\n * ```jsx\n * import { __ } from '@wordpress/i18n';\n * import {\n * __experimentalToolsPanel as ToolsPanel,\n * __experimentalToolsPanelItem as ToolsPanelItem,\n * __experimentalUnitControl as UnitControl\n * } from '@wordpress/components';\n *\n * function Example() {\n * const [ height, setHeight ] = useState();\n * const [ width, setWidth ] = useState();\n *\n * const resetAll = () => {\n * setHeight();\n * setWidth();\n * }\n *\n * return (\n * <ToolsPanel label={ __( 'Dimensions' ) } resetAll={ resetAll }>\n * <ToolsPanelItem\n * hasValue={ () => !! height }\n * label={ __( 'Height' ) }\n * onDeselect={ () => setHeight() }\n * >\n * <UnitControl\n * label={ __( 'Height' ) }\n * onChange={ setHeight }\n * value={ height }\n * />\n * </ToolsPanelItem>\n * <ToolsPanelItem\n * hasValue={ () => !! width }\n * label={ __( 'Width' ) }\n * onDeselect={ () => setWidth() }\n * >\n * <UnitControl\n * label={ __( 'Width' ) }\n * onChange={ setWidth }\n * value={ width }\n * />\n * </ToolsPanelItem>\n * </ToolsPanel>\n * );\n * }\n * ```\n */\nexport const ToolsPanel = contextConnect( UnconnectedToolsPanel, 'ToolsPanel' );\n\nexport default ToolsPanel;\n"]}
@@ -1,4 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
1
  import { createElement, Fragment } from "@wordpress/element";
3
2
 
4
3
  /**
@@ -126,9 +125,9 @@ const ToolsPanelHeader = (props, forwardedRef) => {
126
125
  _x('%s options', 'Button label to reveal tool panel options'), labelText);
127
126
  const dropdownMenuDescriptionText = areAllOptionalControlsHidden ? __('All options are currently hidden') : undefined;
128
127
  const canResetAll = [...defaultItems, ...optionalItems].some(([, isSelected]) => isSelected);
129
- return createElement(HStack, _extends({}, headerProps, {
128
+ return createElement(HStack, { ...headerProps,
130
129
  ref: forwardedRef
131
- }), createElement(Heading, {
130
+ }, createElement(Heading, {
132
131
  level: headingLevel,
133
132
  className: headingClassName
134
133
  }, labelText), hasMenuItems && createElement(DropdownMenu, {
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/tools-panel/tools-panel-header/component.tsx"],"names":["speak","check","moreVertical","plus","__","_x","sprintf","DropdownMenu","MenuGroup","MenuItem","HStack","Heading","useToolsPanelHeader","contextConnect","ResetLabel","DefaultControlsGroup","itemClassName","items","toggleItem","length","resetSuffix","map","label","hasValue","OptionalControlsGroup","isSelected","itemLabel","ToolsPanelHeader","props","forwardedRef","areAllOptionalControlsHidden","defaultControlsItemClassName","dropdownMenuClassName","hasMenuItems","headingClassName","headingLevel","labelText","menuItems","resetAll","headerProps","defaultItems","Object","entries","default","optionalItems","optional","dropDownMenuIcon","dropDownMenuLabelText","dropdownMenuDescriptionText","undefined","canResetAll","some","className","isSmall","describedBy","ConnectedToolsPanelHeader"],"mappings":"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","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport { check, moreVertical, plus } from '@wordpress/icons';\nimport { __, _x, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport DropdownMenu from '../../dropdown-menu';\nimport MenuGroup from '../../menu-group';\nimport MenuItem from '../../menu-item';\nimport { HStack } from '../../h-stack';\nimport { Heading } from '../../heading';\nimport { useToolsPanelHeader } from './hook';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { ResetLabel } from '../styles';\nimport type {\n\tToolsPanelControlsGroupProps,\n\tToolsPanelHeaderProps,\n} from '../types';\n\nconst DefaultControlsGroup = ( {\n\titemClassName,\n\titems,\n\ttoggleItem,\n}: ToolsPanelControlsGroupProps ) => {\n\tif ( ! items.length ) {\n\t\treturn null;\n\t}\n\n\tconst resetSuffix = <ResetLabel aria-hidden>{ __( 'Reset' ) }</ResetLabel>;\n\n\treturn (\n\t\t<MenuGroup label={ __( 'Defaults' ) }>\n\t\t\t{ items.map( ( [ label, hasValue ] ) => {\n\t\t\t\tif ( hasValue ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\t\tclassName={ itemClassName }\n\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t__( 'Reset %s' ),\n\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\ttoggleItem( label );\n\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t\t\t__( '%s reset to default' ),\n\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsuffix={ resetSuffix }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\tclassName={ itemClassName }\n\t\t\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t\t\t\tisSelected\n\t\t\t\t\t\taria-disabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</MenuGroup>\n\t);\n};\n\nconst OptionalControlsGroup = ( {\n\titems,\n\ttoggleItem,\n}: ToolsPanelControlsGroupProps ) => {\n\tif ( ! items.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t{ items.map( ( [ label, isSelected ] ) => {\n\t\t\t\tconst itemLabel = isSelected\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t// translators: %s: The name of the control being hidden and reset e.g. \"Padding\".\n\t\t\t\t\t\t\t__( 'Hide and reset %s' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t// translators: %s: The name of the control to display e.g. \"Padding\".\n\t\t\t\t\t\t\t__( 'Show %s' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t );\n\n\t\t\t\treturn (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\ticon={ isSelected && check }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tlabel={ itemLabel }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif ( isSelected ) {\n\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t\t\t__( '%s hidden and reset to default' ),\n\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t\t\t__( '%s is now visible' ),\n\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttoggleItem( label );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</MenuGroup>\n\t);\n};\n\nconst ToolsPanelHeader = (\n\tprops: WordPressComponentProps< ToolsPanelHeaderProps, 'h2' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tareAllOptionalControlsHidden,\n\t\tdefaultControlsItemClassName,\n\t\tdropdownMenuClassName,\n\t\thasMenuItems,\n\t\theadingClassName,\n\t\theadingLevel = 2,\n\t\tlabel: labelText,\n\t\tmenuItems,\n\t\tresetAll,\n\t\ttoggleItem,\n\t\t...headerProps\n\t} = useToolsPanelHeader( props );\n\n\tif ( ! labelText ) {\n\t\treturn null;\n\t}\n\n\tconst defaultItems = Object.entries( menuItems?.default || {} );\n\tconst optionalItems = Object.entries( menuItems?.optional || {} );\n\tconst dropDownMenuIcon = areAllOptionalControlsHidden ? plus : moreVertical;\n\tconst dropDownMenuLabelText = sprintf(\n\t\t// translators: %s: The name of the tool e.g. \"Color\" or \"Typography\".\n\t\t_x( '%s options', 'Button label to reveal tool panel options' ),\n\t\tlabelText\n\t);\n\tconst dropdownMenuDescriptionText = areAllOptionalControlsHidden\n\t\t? __( 'All options are currently hidden' )\n\t\t: undefined;\n\n\tconst canResetAll = [ ...defaultItems, ...optionalItems ].some(\n\t\t( [ , isSelected ] ) => isSelected\n\t);\n\n\treturn (\n\t\t<HStack { ...headerProps } ref={ forwardedRef }>\n\t\t\t<Heading level={ headingLevel } className={ headingClassName }>\n\t\t\t\t{ labelText }\n\t\t\t</Heading>\n\t\t\t{ hasMenuItems && (\n\t\t\t\t<DropdownMenu\n\t\t\t\t\ticon={ dropDownMenuIcon }\n\t\t\t\t\tlabel={ dropDownMenuLabelText }\n\t\t\t\t\tmenuProps={ { className: dropdownMenuClassName } }\n\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\tisSmall: true,\n\t\t\t\t\t\tdescribedBy: dropdownMenuDescriptionText,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ () => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<DefaultControlsGroup\n\t\t\t\t\t\t\t\titems={ defaultItems }\n\t\t\t\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\t\t\t\titemClassName={ defaultControlsItemClassName }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<OptionalControlsGroup\n\t\t\t\t\t\t\t\titems={ optionalItems }\n\t\t\t\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\taria-disabled={ ! canResetAll }\n\t\t\t\t\t\t\t\t\tvariant={ 'tertiary' }\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tif ( canResetAll ) {\n\t\t\t\t\t\t\t\t\t\t\tresetAll();\n\t\t\t\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'All options reset' ),\n\t\t\t\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Reset all' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</DropdownMenu>\n\t\t\t) }\n\t\t</HStack>\n\t);\n};\n\nconst ConnectedToolsPanelHeader = contextConnect(\n\tToolsPanelHeader,\n\t'ToolsPanelHeader'\n);\n\nexport default ConnectedToolsPanelHeader;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/tools-panel/tools-panel-header/component.tsx"],"names":["speak","check","moreVertical","plus","__","_x","sprintf","DropdownMenu","MenuGroup","MenuItem","HStack","Heading","useToolsPanelHeader","contextConnect","ResetLabel","DefaultControlsGroup","itemClassName","items","toggleItem","length","resetSuffix","map","label","hasValue","OptionalControlsGroup","isSelected","itemLabel","ToolsPanelHeader","props","forwardedRef","areAllOptionalControlsHidden","defaultControlsItemClassName","dropdownMenuClassName","hasMenuItems","headingClassName","headingLevel","labelText","menuItems","resetAll","headerProps","defaultItems","Object","entries","default","optionalItems","optional","dropDownMenuIcon","dropDownMenuLabelText","dropdownMenuDescriptionText","undefined","canResetAll","some","className","isSmall","describedBy","ConnectedToolsPanelHeader"],"mappings":"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","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { speak } from '@wordpress/a11y';\nimport { check, moreVertical, plus } from '@wordpress/icons';\nimport { __, _x, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport DropdownMenu from '../../dropdown-menu';\nimport MenuGroup from '../../menu-group';\nimport MenuItem from '../../menu-item';\nimport { HStack } from '../../h-stack';\nimport { Heading } from '../../heading';\nimport { useToolsPanelHeader } from './hook';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { ResetLabel } from '../styles';\nimport type {\n\tToolsPanelControlsGroupProps,\n\tToolsPanelHeaderProps,\n} from '../types';\n\nconst DefaultControlsGroup = ( {\n\titemClassName,\n\titems,\n\ttoggleItem,\n}: ToolsPanelControlsGroupProps ) => {\n\tif ( ! items.length ) {\n\t\treturn null;\n\t}\n\n\tconst resetSuffix = <ResetLabel aria-hidden>{ __( 'Reset' ) }</ResetLabel>;\n\n\treturn (\n\t\t<MenuGroup label={ __( 'Defaults' ) }>\n\t\t\t{ items.map( ( [ label, hasValue ] ) => {\n\t\t\t\tif ( hasValue ) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\t\tclassName={ itemClassName }\n\t\t\t\t\t\t\trole=\"menuitem\"\n\t\t\t\t\t\t\tlabel={ sprintf(\n\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t__( 'Reset %s' ),\n\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\ttoggleItem( label );\n\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t\t\t__( '%s reset to default' ),\n\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\tsuffix={ resetSuffix }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\tclassName={ itemClassName }\n\t\t\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t\t\t\tisSelected\n\t\t\t\t\t\taria-disabled\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</MenuGroup>\n\t);\n};\n\nconst OptionalControlsGroup = ( {\n\titems,\n\ttoggleItem,\n}: ToolsPanelControlsGroupProps ) => {\n\tif ( ! items.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<MenuGroup label={ __( 'Tools' ) }>\n\t\t\t{ items.map( ( [ label, isSelected ] ) => {\n\t\t\t\tconst itemLabel = isSelected\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t// translators: %s: The name of the control being hidden and reset e.g. \"Padding\".\n\t\t\t\t\t\t\t__( 'Hide and reset %s' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t )\n\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t// translators: %s: The name of the control to display e.g. \"Padding\".\n\t\t\t\t\t\t\t__( 'Show %s' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t );\n\n\t\t\t\treturn (\n\t\t\t\t\t<MenuItem\n\t\t\t\t\t\tkey={ label }\n\t\t\t\t\t\ticon={ isSelected && check }\n\t\t\t\t\t\tisSelected={ isSelected }\n\t\t\t\t\t\tlabel={ itemLabel }\n\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\tif ( isSelected ) {\n\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t\t\t__( '%s hidden and reset to default' ),\n\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t\t\t// translators: %s: The name of the control being reset e.g. \"Padding\".\n\t\t\t\t\t\t\t\t\t\t__( '%s is now visible' ),\n\t\t\t\t\t\t\t\t\t\tlabel\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttoggleItem( label );\n\t\t\t\t\t\t} }\n\t\t\t\t\t\trole=\"menuitemcheckbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ label }\n\t\t\t\t\t</MenuItem>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</MenuGroup>\n\t);\n};\n\nconst ToolsPanelHeader = (\n\tprops: WordPressComponentProps< ToolsPanelHeaderProps, 'h2' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tareAllOptionalControlsHidden,\n\t\tdefaultControlsItemClassName,\n\t\tdropdownMenuClassName,\n\t\thasMenuItems,\n\t\theadingClassName,\n\t\theadingLevel = 2,\n\t\tlabel: labelText,\n\t\tmenuItems,\n\t\tresetAll,\n\t\ttoggleItem,\n\t\t...headerProps\n\t} = useToolsPanelHeader( props );\n\n\tif ( ! labelText ) {\n\t\treturn null;\n\t}\n\n\tconst defaultItems = Object.entries( menuItems?.default || {} );\n\tconst optionalItems = Object.entries( menuItems?.optional || {} );\n\tconst dropDownMenuIcon = areAllOptionalControlsHidden ? plus : moreVertical;\n\tconst dropDownMenuLabelText = sprintf(\n\t\t// translators: %s: The name of the tool e.g. \"Color\" or \"Typography\".\n\t\t_x( '%s options', 'Button label to reveal tool panel options' ),\n\t\tlabelText\n\t);\n\tconst dropdownMenuDescriptionText = areAllOptionalControlsHidden\n\t\t? __( 'All options are currently hidden' )\n\t\t: undefined;\n\n\tconst canResetAll = [ ...defaultItems, ...optionalItems ].some(\n\t\t( [ , isSelected ] ) => isSelected\n\t);\n\n\treturn (\n\t\t<HStack { ...headerProps } ref={ forwardedRef }>\n\t\t\t<Heading level={ headingLevel } className={ headingClassName }>\n\t\t\t\t{ labelText }\n\t\t\t</Heading>\n\t\t\t{ hasMenuItems && (\n\t\t\t\t<DropdownMenu\n\t\t\t\t\ticon={ dropDownMenuIcon }\n\t\t\t\t\tlabel={ dropDownMenuLabelText }\n\t\t\t\t\tmenuProps={ { className: dropdownMenuClassName } }\n\t\t\t\t\ttoggleProps={ {\n\t\t\t\t\t\tisSmall: true,\n\t\t\t\t\t\tdescribedBy: dropdownMenuDescriptionText,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ () => (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<DefaultControlsGroup\n\t\t\t\t\t\t\t\titems={ defaultItems }\n\t\t\t\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\t\t\t\titemClassName={ defaultControlsItemClassName }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<OptionalControlsGroup\n\t\t\t\t\t\t\t\titems={ optionalItems }\n\t\t\t\t\t\t\t\ttoggleItem={ toggleItem }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<MenuGroup>\n\t\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\t\taria-disabled={ ! canResetAll }\n\t\t\t\t\t\t\t\t\tvariant={ 'tertiary' }\n\t\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\t\tif ( canResetAll ) {\n\t\t\t\t\t\t\t\t\t\t\tresetAll();\n\t\t\t\t\t\t\t\t\t\t\tspeak(\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'All options reset' ),\n\t\t\t\t\t\t\t\t\t\t\t\t'assertive'\n\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ __( 'Reset all' ) }\n\t\t\t\t\t\t\t\t</MenuItem>\n\t\t\t\t\t\t\t</MenuGroup>\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\t\t\t\t</DropdownMenu>\n\t\t\t) }\n\t\t</HStack>\n\t);\n};\n\nconst ConnectedToolsPanelHeader = contextConnect(\n\tToolsPanelHeader,\n\t'ToolsPanelHeader'\n);\n\nexport default ConnectedToolsPanelHeader;\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
  /**
@@ -23,14 +22,14 @@ const UnconnectedToolsPanelItem = (props, forwardedRef) => {
23
22
  } = useToolsPanelItem(props);
24
23
 
25
24
  if (!isShown) {
26
- return shouldRenderPlaceholder ? createElement(View, _extends({}, toolsPanelItemProps, {
25
+ return shouldRenderPlaceholder ? createElement(View, { ...toolsPanelItemProps,
27
26
  ref: forwardedRef
28
- })) : null;
27
+ }) : null;
29
28
  }
30
29
 
31
- return createElement(View, _extends({}, toolsPanelItemProps, {
30
+ return createElement(View, { ...toolsPanelItemProps,
32
31
  ref: forwardedRef
33
- }), children);
32
+ }, children);
34
33
  };
35
34
 
36
35
  export const ToolsPanelItem = contextConnect(UnconnectedToolsPanelItem, 'ToolsPanelItem');
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/tools-panel/tools-panel-item/component.tsx"],"names":["useToolsPanelItem","View","contextConnect","UnconnectedToolsPanelItem","props","forwardedRef","children","isShown","shouldRenderPlaceholder","toolsPanelItemProps","ToolsPanelItem"],"mappings":";;;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,iBAAT,QAAkC,QAAlC;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,cAAT,QAAwD,kBAAxD;;AAGA;AACA;AACA,MAAMC,yBAAyB,GAAG,CACjCC,KADiC,EAEjCC,YAFiC,KAG7B;AACJ,QAAM;AACLC,IAAAA,QADK;AAELC,IAAAA,OAFK;AAGLC,IAAAA,uBAHK;AAIL,OAAGC;AAJE,MAKFT,iBAAiB,CAAEI,KAAF,CALrB;;AAOA,MAAK,CAAEG,OAAP,EAAiB;AAChB,WAAOC,uBAAuB,GAC7B,cAAC,IAAD,eAAWC,mBAAX;AAAiC,MAAA,GAAG,EAAGJ;AAAvC,OAD6B,GAE1B,IAFJ;AAGA;;AAED,SACC,cAAC,IAAD,eAAWI,mBAAX;AAAiC,IAAA,GAAG,EAAGJ;AAAvC,MACGC,QADH,CADD;AAKA,CAtBD;;AAwBA,OAAO,MAAMI,cAAc,GAAGR,cAAc,CAC3CC,yBAD2C,EAE3C,gBAF2C,CAArC;AAKP,eAAeO,cAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelItem } from './hook';\nimport { View } from '../../view';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport type { ToolsPanelItemProps } from '../types';\n\n// This wraps controls to be conditionally displayed within a tools panel. It\n// prevents props being applied to HTML elements that would make them invalid.\nconst UnconnectedToolsPanelItem = (\n\tprops: WordPressComponentProps< ToolsPanelItemProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tchildren,\n\t\tisShown,\n\t\tshouldRenderPlaceholder,\n\t\t...toolsPanelItemProps\n\t} = useToolsPanelItem( props );\n\n\tif ( ! isShown ) {\n\t\treturn shouldRenderPlaceholder ? (\n\t\t\t<View { ...toolsPanelItemProps } ref={ forwardedRef } />\n\t\t) : null;\n\t}\n\n\treturn (\n\t\t<View { ...toolsPanelItemProps } ref={ forwardedRef }>\n\t\t\t{ children }\n\t\t</View>\n\t);\n};\n\nexport const ToolsPanelItem = contextConnect(\n\tUnconnectedToolsPanelItem,\n\t'ToolsPanelItem'\n);\n\nexport default ToolsPanelItem;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/tools-panel/tools-panel-item/component.tsx"],"names":["useToolsPanelItem","View","contextConnect","UnconnectedToolsPanelItem","props","forwardedRef","children","isShown","shouldRenderPlaceholder","toolsPanelItemProps","ToolsPanelItem"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,iBAAT,QAAkC,QAAlC;AACA,SAASC,IAAT,QAAqB,YAArB;AACA,SAASC,cAAT,QAAwD,kBAAxD;;AAGA;AACA;AACA,MAAMC,yBAAyB,GAAG,CACjCC,KADiC,EAEjCC,YAFiC,KAG7B;AACJ,QAAM;AACLC,IAAAA,QADK;AAELC,IAAAA,OAFK;AAGLC,IAAAA,uBAHK;AAIL,OAAGC;AAJE,MAKFT,iBAAiB,CAAEI,KAAF,CALrB;;AAOA,MAAK,CAAEG,OAAP,EAAiB;AAChB,WAAOC,uBAAuB,GAC7B,cAAC,IAAD,OAAWC,mBAAX;AAAiC,MAAA,GAAG,EAAGJ;AAAvC,MAD6B,GAE1B,IAFJ;AAGA;;AAED,SACC,cAAC,IAAD,OAAWI,mBAAX;AAAiC,IAAA,GAAG,EAAGJ;AAAvC,KACGC,QADH,CADD;AAKA,CAtBD;;AAwBA,OAAO,MAAMI,cAAc,GAAGR,cAAc,CAC3CC,yBAD2C,EAE3C,gBAF2C,CAArC;AAKP,eAAeO,cAAf","sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { useToolsPanelItem } from './hook';\nimport { View } from '../../view';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport type { ToolsPanelItemProps } from '../types';\n\n// This wraps controls to be conditionally displayed within a tools panel. It\n// prevents props being applied to HTML elements that would make them invalid.\nconst UnconnectedToolsPanelItem = (\n\tprops: WordPressComponentProps< ToolsPanelItemProps, 'div' >,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tchildren,\n\t\tisShown,\n\t\tshouldRenderPlaceholder,\n\t\t...toolsPanelItemProps\n\t} = useToolsPanelItem( props );\n\n\tif ( ! isShown ) {\n\t\treturn shouldRenderPlaceholder ? (\n\t\t\t<View { ...toolsPanelItemProps } ref={ forwardedRef } />\n\t\t) : null;\n\t}\n\n\treturn (\n\t\t<View { ...toolsPanelItemProps } ref={ forwardedRef }>\n\t\t\t{ children }\n\t\t</View>\n\t);\n};\n\nexport const ToolsPanelItem = contextConnect(\n\tUnconnectedToolsPanelItem,\n\t'ToolsPanelItem'\n);\n\nexport default ToolsPanelItem;\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
 
@@ -66,7 +65,7 @@ const addPopoverToGrandchildren = ({
66
65
  text,
67
66
  className,
68
67
  ...props
69
- }) => concatChildren(grandchildren, isOver && createElement(Popover, _extends({
68
+ }) => concatChildren(grandchildren, isOver && createElement(Popover, {
70
69
  focusOnMount: false,
71
70
  position: position,
72
71
  className: classNames('components-tooltip', className),
@@ -74,8 +73,9 @@ const addPopoverToGrandchildren = ({
74
73
  animate: false,
75
74
  offset: offset,
76
75
  anchor: anchor,
77
- shift: true
78
- }, props), text, createElement(Shortcut, {
76
+ shift: true,
77
+ ...props
78
+ }, text, createElement(Shortcut, {
79
79
  className: "components-tooltip__shortcut",
80
80
  shortcut: shortcut
81
81
  })));