@wordpress/components 28.13.1-next.082ed6819.0 → 29.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1020) hide show
  1. package/CHANGELOG.md +53 -2
  2. package/CONTRIBUTING.md +16 -16
  3. package/build/alignment-matrix-control/icon.js +1 -0
  4. package/build/alignment-matrix-control/icon.js.map +1 -1
  5. package/build/alignment-matrix-control/index.js +1 -0
  6. package/build/alignment-matrix-control/index.js.map +1 -1
  7. package/build/angle-picker-control/index.js +1 -1
  8. package/build/angle-picker-control/index.js.map +1 -1
  9. package/build/animation/index.js +0 -6
  10. package/build/animation/index.js.map +1 -1
  11. package/build/autocomplete/autocompleter-ui.js +1 -0
  12. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  13. package/build/autocomplete/autocompleter-ui.native.js +1 -0
  14. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  15. package/build/autocomplete/get-default-use-items.js +1 -0
  16. package/build/autocomplete/get-default-use-items.js.map +1 -1
  17. package/build/border-box-control/border-box-control-split-controls/component.js +1 -1
  18. package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  19. package/build/border-box-control/utils.js +1 -0
  20. package/build/border-box-control/utils.js.map +1 -1
  21. package/build/border-control/border-control/component.js +2 -0
  22. package/build/border-control/border-control/component.js.map +1 -1
  23. package/build/border-control/border-control-dropdown/component.js +1 -0
  24. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  25. package/build/border-control/border-control-style-picker/component.js +1 -0
  26. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  27. package/build/box-control/index.js +35 -28
  28. package/build/box-control/index.js.map +1 -1
  29. package/build/box-control/input-control.js +161 -0
  30. package/build/box-control/input-control.js.map +1 -0
  31. package/build/box-control/types.js.map +1 -1
  32. package/build/box-control/utils.js +51 -48
  33. package/build/box-control/utils.js.map +1 -1
  34. package/build/button/index.native.js +1 -0
  35. package/build/button/index.native.js.map +1 -1
  36. package/build/button/types.js.map +1 -1
  37. package/build/circular-option-picker/circular-option-picker-actions.js +1 -0
  38. package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  39. package/build/circular-option-picker/circular-option-picker-option.js +1 -0
  40. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
  41. package/build/clipboard-button/index.js +5 -3
  42. package/build/clipboard-button/index.js.map +1 -1
  43. package/build/color-indicator/index.native.js +1 -0
  44. package/build/color-indicator/index.native.js.map +1 -1
  45. package/build/color-palette/index.js +1 -0
  46. package/build/color-palette/index.js.map +1 -1
  47. package/build/color-palette/utils.js +1 -0
  48. package/build/color-palette/utils.js.map +1 -1
  49. package/build/color-picker/input-with-slider.js +2 -2
  50. package/build/color-picker/input-with-slider.js.map +1 -1
  51. package/build/combobox-control/index.js +1 -0
  52. package/build/combobox-control/index.js.map +1 -1
  53. package/build/composite/item.js +0 -9
  54. package/build/composite/item.js.map +1 -1
  55. package/build/composite/legacy/index.js +1 -0
  56. package/build/composite/legacy/index.js.map +1 -1
  57. package/build/custom-gradient-picker/gradient-bar/control-points.js +3 -0
  58. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  59. package/build/custom-gradient-picker/gradient-bar/index.js +1 -0
  60. package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  61. package/build/custom-gradient-picker/gradient-bar/utils.js +1 -0
  62. package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  63. package/build/custom-gradient-picker/index.js +3 -0
  64. package/build/custom-gradient-picker/index.js.map +1 -1
  65. package/build/custom-gradient-picker/serializer.js +1 -0
  66. package/build/custom-gradient-picker/serializer.js.map +1 -1
  67. package/build/custom-gradient-picker/types.js.map +1 -1
  68. package/build/custom-gradient-picker/utils.js +1 -0
  69. package/build/custom-gradient-picker/utils.js.map +1 -1
  70. package/build/custom-select-control/index.js +11 -2
  71. package/build/custom-select-control/index.js.map +1 -1
  72. package/build/custom-select-control/types.js.map +1 -1
  73. package/build/dashicon/index.js +1 -0
  74. package/build/dashicon/index.js.map +1 -1
  75. package/build/date-time/date/index.js +1 -0
  76. package/build/date-time/date/index.js.map +1 -1
  77. package/build/date-time/date/use-lilius/index.js +1 -0
  78. package/build/date-time/date/use-lilius/index.js.map +1 -1
  79. package/build/date-time/time/index.js +1 -0
  80. package/build/date-time/time/index.js.map +1 -1
  81. package/build/dimension-control/index.js +1 -0
  82. package/build/dimension-control/index.js.map +1 -1
  83. package/build/dimension-control/sizes.js +1 -0
  84. package/build/dimension-control/sizes.js.map +1 -1
  85. package/build/draggable/index.js +1 -0
  86. package/build/draggable/index.js.map +1 -1
  87. package/build/draggable/index.native.js +1 -0
  88. package/build/draggable/index.native.js.map +1 -1
  89. package/build/drop-zone/index.js +19 -13
  90. package/build/drop-zone/index.js.map +1 -1
  91. package/build/drop-zone/types.js.map +1 -1
  92. package/build/dropdown-menu/index.js +2 -0
  93. package/build/dropdown-menu/index.js.map +1 -1
  94. package/build/dropdown-menu/index.native.js +1 -0
  95. package/build/dropdown-menu/index.native.js.map +1 -1
  96. package/build/duotone-picker/color-list-picker/index.js +10 -14
  97. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  98. package/build/duotone-picker/duotone-picker.js +1 -0
  99. package/build/duotone-picker/duotone-picker.js.map +1 -1
  100. package/build/duotone-picker/utils.js +1 -0
  101. package/build/duotone-picker/utils.js.map +1 -1
  102. package/build/font-size-picker/font-size-picker-select.js +2 -0
  103. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  104. package/build/font-size-picker/font-size-picker-toggle-group.js +1 -0
  105. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  106. package/build/font-size-picker/index.js +2 -0
  107. package/build/font-size-picker/index.js.map +1 -1
  108. package/build/font-size-picker/index.native.js +1 -0
  109. package/build/font-size-picker/index.native.js.map +1 -1
  110. package/build/font-size-picker/utils.js +1 -0
  111. package/build/font-size-picker/utils.js.map +1 -1
  112. package/build/form-file-upload/index.js +11 -1
  113. package/build/form-file-upload/index.js.map +1 -1
  114. package/build/form-file-upload/types.js.map +1 -1
  115. package/build/form-token-field/index.js +6 -0
  116. package/build/form-token-field/index.js.map +1 -1
  117. package/build/form-token-field/suggestions-list.js +1 -0
  118. package/build/form-token-field/suggestions-list.js.map +1 -1
  119. package/build/gradient-picker/index.js +3 -0
  120. package/build/gradient-picker/index.js.map +1 -1
  121. package/build/gradient-picker/types.js.map +1 -1
  122. package/build/guide/index.js +1 -0
  123. package/build/guide/index.js.map +1 -1
  124. package/build/guide/page-control.js +1 -0
  125. package/build/guide/page-control.js.map +1 -1
  126. package/build/h-stack/hook.js +1 -0
  127. package/build/h-stack/hook.js.map +1 -1
  128. package/build/higher-order/navigate-regions/index.js +1 -0
  129. package/build/higher-order/navigate-regions/index.js.map +1 -1
  130. package/build/higher-order/with-fallback-styles/index.js +1 -0
  131. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  132. package/build/higher-order/with-filters/index.js +1 -0
  133. package/build/higher-order/with-filters/index.js.map +1 -1
  134. package/build/higher-order/with-notices/index.js +1 -0
  135. package/build/higher-order/with-notices/index.js.map +1 -1
  136. package/build/icon/index.js +9 -0
  137. package/build/icon/index.js.map +1 -1
  138. package/build/index.js +0 -6
  139. package/build/index.js.map +1 -1
  140. package/build/keyboard-shortcuts/index.js +1 -0
  141. package/build/keyboard-shortcuts/index.js.map +1 -1
  142. package/build/menu/checkbox-item.js +5 -9
  143. package/build/menu/checkbox-item.js.map +1 -1
  144. package/build/menu/group-label.js +4 -1
  145. package/build/menu/group-label.js.map +1 -1
  146. package/build/menu/group.js +4 -1
  147. package/build/menu/group.js.map +1 -1
  148. package/build/menu/item-help-text.js +5 -0
  149. package/build/menu/item-help-text.js.map +1 -1
  150. package/build/menu/item-label.js +5 -0
  151. package/build/menu/item-label.js.map +1 -1
  152. package/build/menu/item.js +4 -8
  153. package/build/menu/item.js.map +1 -1
  154. package/build/menu/radio-item.js +5 -9
  155. package/build/menu/radio-item.js.map +1 -1
  156. package/build/menu/separator.js +5 -2
  157. package/build/menu/separator.js.map +1 -1
  158. package/build/menu/styles.js +16 -16
  159. package/build/menu/styles.js.map +1 -1
  160. package/build/menu-items-choice/index.js +1 -0
  161. package/build/menu-items-choice/index.js.map +1 -1
  162. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -0
  163. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  164. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +1 -0
  165. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  166. package/build/mobile/bottom-sheet/picker-cell.native.js +1 -0
  167. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  168. package/build/mobile/bottom-sheet-select-control/index.native.js +1 -0
  169. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  170. package/build/mobile/color-settings/palette.screen.native.js +1 -0
  171. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  172. package/build/mobile/gradient/index.native.js +1 -0
  173. package/build/mobile/gradient/index.native.js.map +1 -1
  174. package/build/mobile/media-edit/index.native.js +1 -0
  175. package/build/mobile/media-edit/index.native.js.map +1 -1
  176. package/build/mobile/picker/index.android.js +1 -0
  177. package/build/mobile/picker/index.android.js.map +1 -1
  178. package/build/mobile/picker/index.ios.js +1 -0
  179. package/build/mobile/picker/index.ios.js.map +1 -1
  180. package/build/mobile/segmented-control/index.native.js +1 -0
  181. package/build/mobile/segmented-control/index.native.js.map +1 -1
  182. package/build/mobile/utils/get-px-from-css-unit.native.js +1 -0
  183. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  184. package/build/modal/aria-helper.js +0 -1
  185. package/build/modal/aria-helper.js.map +1 -1
  186. package/build/modal/index.js +0 -1
  187. package/build/modal/index.js.map +1 -1
  188. package/build/navigable-container/container.js +1 -0
  189. package/build/navigable-container/container.js.map +1 -1
  190. package/build/navigation/group/index.js +1 -0
  191. package/build/navigation/group/index.js.map +1 -1
  192. package/build/navigation/menu/menu-title-search.js +1 -0
  193. package/build/navigation/menu/menu-title-search.js.map +1 -1
  194. package/build/navigation/menu/search-no-results-found.js +1 -0
  195. package/build/navigation/menu/search-no-results-found.js.map +1 -1
  196. package/build/navigation/styles/navigation-styles.js +12 -12
  197. package/build/navigation/styles/navigation-styles.js.map +1 -1
  198. package/build/navigator/navigator/component.js +1 -0
  199. package/build/navigator/navigator/component.js.map +1 -1
  200. package/build/navigator/navigator-screen/component.js +1 -0
  201. package/build/navigator/navigator-screen/component.js.map +1 -1
  202. package/build/navigator/utils/router.js +1 -0
  203. package/build/navigator/utils/router.js.map +1 -1
  204. package/build/notice/index.js +1 -0
  205. package/build/notice/index.js.map +1 -1
  206. package/build/notice/list.js +1 -0
  207. package/build/notice/list.js.map +1 -1
  208. package/build/notice/list.native.js +1 -0
  209. package/build/notice/list.native.js.map +1 -1
  210. package/build/number-control/index.js +8 -0
  211. package/build/number-control/index.js.map +1 -1
  212. package/build/number-control/types.js.map +1 -1
  213. package/build/palette-edit/index.js +1 -0
  214. package/build/palette-edit/index.js.map +1 -1
  215. package/build/panel/actions.native.js +1 -0
  216. package/build/panel/actions.native.js.map +1 -1
  217. package/build/query-controls/index.js +1 -0
  218. package/build/query-controls/index.js.map +1 -1
  219. package/build/query-controls/terms.js +1 -0
  220. package/build/query-controls/terms.js.map +1 -1
  221. package/build/radio-control/index.js +1 -0
  222. package/build/radio-control/index.js.map +1 -1
  223. package/build/radio-control/index.native.js +1 -0
  224. package/build/radio-control/index.native.js.map +1 -1
  225. package/build/range-control/index.js +2 -1
  226. package/build/range-control/index.js.map +1 -1
  227. package/build/range-control/mark.js +0 -1
  228. package/build/range-control/mark.js.map +1 -1
  229. package/build/range-control/rail.js +1 -0
  230. package/build/range-control/rail.js.map +1 -1
  231. package/build/range-control/styles/range-control-styles.js +33 -45
  232. package/build/range-control/styles/range-control-styles.js.map +1 -1
  233. package/build/resizable-box/index.js +10 -1
  234. package/build/resizable-box/index.js.map +1 -1
  235. package/build/sandbox/index.js +1 -0
  236. package/build/sandbox/index.js.map +1 -1
  237. package/build/sandbox/index.native.js +1 -0
  238. package/build/sandbox/index.native.js.map +1 -1
  239. package/build/search-control/index.native.js +1 -0
  240. package/build/search-control/index.native.js.map +1 -1
  241. package/build/select-control/index.js +1 -0
  242. package/build/select-control/index.js.map +1 -1
  243. package/build/slot-fill/bubbles-virtually/fill.js +8 -12
  244. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  245. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +7 -10
  246. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  247. package/build/slot-fill/bubbles-virtually/slot.js +4 -10
  248. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  249. package/build/slot-fill/provider.js +1 -0
  250. package/build/slot-fill/provider.js.map +1 -1
  251. package/build/slot-fill/slot.js +1 -0
  252. package/build/slot-fill/slot.js.map +1 -1
  253. package/build/slot-fill/types.js.map +1 -1
  254. package/build/snackbar/index.js +1 -0
  255. package/build/snackbar/index.js.map +1 -1
  256. package/build/snackbar/list.js +1 -0
  257. package/build/snackbar/list.js.map +1 -1
  258. package/build/style-provider/index.js +0 -1
  259. package/build/style-provider/index.js.map +1 -1
  260. package/build/tab-panel/index.js +1 -0
  261. package/build/tab-panel/index.js.map +1 -1
  262. package/build/tabs/index.js +1 -0
  263. package/build/tabs/index.js.map +1 -1
  264. package/build/tabs/tab.js +0 -17
  265. package/build/tabs/tab.js.map +1 -1
  266. package/build/text/utils.js +1 -0
  267. package/build/text/utils.js.map +1 -1
  268. package/build/theme/color-algorithms.js +1 -0
  269. package/build/theme/color-algorithms.js.map +1 -1
  270. package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
  271. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  272. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +8 -8
  273. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  274. package/build/toolbar/toolbar-button/index.js +2 -0
  275. package/build/toolbar/toolbar-button/index.js.map +1 -1
  276. package/build/toolbar/toolbar-group/index.js +1 -0
  277. package/build/toolbar/toolbar-group/index.js.map +1 -1
  278. package/build/tools-panel/tools-panel/component.js +2 -0
  279. package/build/tools-panel/tools-panel/component.js.map +1 -1
  280. package/build/tools-panel/tools-panel/hook.js +1 -0
  281. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  282. package/build/tools-panel/tools-panel-header/component.js +1 -0
  283. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  284. package/build/tree-grid/cell.js +4 -1
  285. package/build/tree-grid/cell.js.map +1 -1
  286. package/build/tree-grid/index.js +1 -0
  287. package/build/tree-grid/index.js.map +1 -1
  288. package/build/tree-grid/types.js.map +1 -1
  289. package/build/tree-select/index.js +1 -0
  290. package/build/tree-select/index.js.map +1 -1
  291. package/build/unit-control/index.js +11 -1
  292. package/build/unit-control/index.js.map +1 -1
  293. package/build/unit-control/index.native.js +1 -0
  294. package/build/unit-control/index.native.js.map +1 -1
  295. package/build/unit-control/types.js.map +1 -1
  296. package/build/unit-control/unit-select-control.js +1 -0
  297. package/build/unit-control/unit-select-control.js.map +1 -1
  298. package/build/unit-control/utils.js +1 -0
  299. package/build/unit-control/utils.js.map +1 -1
  300. package/build/utils/colors-values.js +3 -0
  301. package/build/utils/colors-values.js.map +1 -1
  302. package/build/utils/config-values.js +0 -1
  303. package/build/utils/config-values.js.map +1 -1
  304. package/build/utils/get-valid-children.js +1 -0
  305. package/build/utils/get-valid-children.js.map +1 -1
  306. package/build/utils/hooks/use-animated-offset-rect.js +1 -0
  307. package/build/utils/hooks/use-animated-offset-rect.js.map +1 -1
  308. package/build/utils/hooks/use-cx.js +1 -0
  309. package/build/utils/hooks/use-cx.js.map +1 -1
  310. package/build/utils/math.js +1 -0
  311. package/build/utils/math.js.map +1 -1
  312. package/build/utils/rtl.js +1 -0
  313. package/build/utils/rtl.js.map +1 -1
  314. package/build/utils/values.js +1 -0
  315. package/build/utils/values.js.map +1 -1
  316. package/build/z-stack/component.js +1 -0
  317. package/build/z-stack/component.js.map +1 -1
  318. package/build-module/alignment-matrix-control/icon.js +1 -0
  319. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  320. package/build-module/alignment-matrix-control/index.js +1 -0
  321. package/build-module/alignment-matrix-control/index.js.map +1 -1
  322. package/build-module/angle-picker-control/index.js +1 -1
  323. package/build-module/angle-picker-control/index.js.map +1 -1
  324. package/build-module/animation/index.js +1 -1
  325. package/build-module/animation/index.js.map +1 -1
  326. package/build-module/autocomplete/autocompleter-ui.js +1 -0
  327. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  328. package/build-module/autocomplete/autocompleter-ui.native.js +1 -0
  329. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  330. package/build-module/autocomplete/get-default-use-items.js +1 -0
  331. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  332. package/build-module/border-box-control/border-box-control-split-controls/component.js +1 -1
  333. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  334. package/build-module/border-box-control/utils.js +1 -0
  335. package/build-module/border-box-control/utils.js.map +1 -1
  336. package/build-module/border-control/border-control/component.js +2 -0
  337. package/build-module/border-control/border-control/component.js.map +1 -1
  338. package/build-module/border-control/border-control-dropdown/component.js +1 -0
  339. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  340. package/build-module/border-control/border-control-style-picker/component.js +1 -0
  341. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  342. package/build-module/box-control/index.js +37 -30
  343. package/build-module/box-control/index.js.map +1 -1
  344. package/build-module/box-control/input-control.js +153 -0
  345. package/build-module/box-control/input-control.js.map +1 -0
  346. package/build-module/box-control/types.js.map +1 -1
  347. package/build-module/box-control/utils.js +48 -46
  348. package/build-module/box-control/utils.js.map +1 -1
  349. package/build-module/button/index.native.js +1 -0
  350. package/build-module/button/index.native.js.map +1 -1
  351. package/build-module/button/types.js.map +1 -1
  352. package/build-module/circular-option-picker/circular-option-picker-actions.js +1 -0
  353. package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
  354. package/build-module/circular-option-picker/circular-option-picker-option.js +1 -0
  355. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  356. package/build-module/clipboard-button/index.js +5 -3
  357. package/build-module/clipboard-button/index.js.map +1 -1
  358. package/build-module/color-indicator/index.native.js +1 -0
  359. package/build-module/color-indicator/index.native.js.map +1 -1
  360. package/build-module/color-palette/index.js +1 -0
  361. package/build-module/color-palette/index.js.map +1 -1
  362. package/build-module/color-palette/utils.js +1 -0
  363. package/build-module/color-palette/utils.js.map +1 -1
  364. package/build-module/color-picker/input-with-slider.js +2 -2
  365. package/build-module/color-picker/input-with-slider.js.map +1 -1
  366. package/build-module/combobox-control/index.js +1 -0
  367. package/build-module/combobox-control/index.js.map +1 -1
  368. package/build-module/composite/item.js +0 -9
  369. package/build-module/composite/item.js.map +1 -1
  370. package/build-module/composite/legacy/index.js +1 -0
  371. package/build-module/composite/legacy/index.js.map +1 -1
  372. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +3 -0
  373. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  374. package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -0
  375. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  376. package/build-module/custom-gradient-picker/gradient-bar/utils.js +1 -0
  377. package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  378. package/build-module/custom-gradient-picker/index.js +3 -0
  379. package/build-module/custom-gradient-picker/index.js.map +1 -1
  380. package/build-module/custom-gradient-picker/serializer.js +1 -0
  381. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  382. package/build-module/custom-gradient-picker/types.js.map +1 -1
  383. package/build-module/custom-gradient-picker/utils.js +1 -0
  384. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  385. package/build-module/custom-select-control/index.js +11 -2
  386. package/build-module/custom-select-control/index.js.map +1 -1
  387. package/build-module/custom-select-control/types.js.map +1 -1
  388. package/build-module/dashicon/index.js +1 -0
  389. package/build-module/dashicon/index.js.map +1 -1
  390. package/build-module/date-time/date/index.js +1 -0
  391. package/build-module/date-time/date/index.js.map +1 -1
  392. package/build-module/date-time/date/use-lilius/index.js +1 -0
  393. package/build-module/date-time/date/use-lilius/index.js.map +1 -1
  394. package/build-module/date-time/time/index.js +1 -0
  395. package/build-module/date-time/time/index.js.map +1 -1
  396. package/build-module/dimension-control/index.js +1 -0
  397. package/build-module/dimension-control/index.js.map +1 -1
  398. package/build-module/dimension-control/sizes.js +1 -0
  399. package/build-module/dimension-control/sizes.js.map +1 -1
  400. package/build-module/draggable/index.js +1 -0
  401. package/build-module/draggable/index.js.map +1 -1
  402. package/build-module/draggable/index.native.js +1 -0
  403. package/build-module/draggable/index.native.js.map +1 -1
  404. package/build-module/drop-zone/index.js +19 -13
  405. package/build-module/drop-zone/index.js.map +1 -1
  406. package/build-module/drop-zone/types.js.map +1 -1
  407. package/build-module/dropdown-menu/index.js +2 -0
  408. package/build-module/dropdown-menu/index.js.map +1 -1
  409. package/build-module/dropdown-menu/index.native.js +1 -0
  410. package/build-module/dropdown-menu/index.native.js.map +1 -1
  411. package/build-module/duotone-picker/color-list-picker/index.js +11 -15
  412. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  413. package/build-module/duotone-picker/duotone-picker.js +1 -0
  414. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  415. package/build-module/duotone-picker/utils.js +1 -0
  416. package/build-module/duotone-picker/utils.js.map +1 -1
  417. package/build-module/font-size-picker/font-size-picker-select.js +2 -0
  418. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  419. package/build-module/font-size-picker/font-size-picker-toggle-group.js +1 -0
  420. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  421. package/build-module/font-size-picker/index.js +2 -0
  422. package/build-module/font-size-picker/index.js.map +1 -1
  423. package/build-module/font-size-picker/index.native.js +1 -0
  424. package/build-module/font-size-picker/index.native.js.map +1 -1
  425. package/build-module/font-size-picker/utils.js +1 -0
  426. package/build-module/font-size-picker/utils.js.map +1 -1
  427. package/build-module/form-file-upload/index.js +13 -2
  428. package/build-module/form-file-upload/index.js.map +1 -1
  429. package/build-module/form-file-upload/types.js.map +1 -1
  430. package/build-module/form-token-field/index.js +6 -0
  431. package/build-module/form-token-field/index.js.map +1 -1
  432. package/build-module/form-token-field/suggestions-list.js +1 -0
  433. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  434. package/build-module/gradient-picker/index.js +3 -0
  435. package/build-module/gradient-picker/index.js.map +1 -1
  436. package/build-module/gradient-picker/types.js.map +1 -1
  437. package/build-module/guide/index.js +1 -0
  438. package/build-module/guide/index.js.map +1 -1
  439. package/build-module/guide/page-control.js +1 -0
  440. package/build-module/guide/page-control.js.map +1 -1
  441. package/build-module/h-stack/hook.js +1 -0
  442. package/build-module/h-stack/hook.js.map +1 -1
  443. package/build-module/higher-order/navigate-regions/index.js +1 -0
  444. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  445. package/build-module/higher-order/with-fallback-styles/index.js +1 -0
  446. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  447. package/build-module/higher-order/with-filters/index.js +1 -0
  448. package/build-module/higher-order/with-filters/index.js.map +1 -1
  449. package/build-module/higher-order/with-notices/index.js +1 -0
  450. package/build-module/higher-order/with-notices/index.js.map +1 -1
  451. package/build-module/icon/index.js +9 -0
  452. package/build-module/icon/index.js.map +1 -1
  453. package/build-module/index.js +1 -1
  454. package/build-module/index.js.map +1 -1
  455. package/build-module/keyboard-shortcuts/index.js +1 -0
  456. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  457. package/build-module/menu/checkbox-item.js +5 -9
  458. package/build-module/menu/checkbox-item.js.map +1 -1
  459. package/build-module/menu/group-label.js +4 -1
  460. package/build-module/menu/group-label.js.map +1 -1
  461. package/build-module/menu/group.js +4 -1
  462. package/build-module/menu/group.js.map +1 -1
  463. package/build-module/menu/item-help-text.js +6 -1
  464. package/build-module/menu/item-help-text.js.map +1 -1
  465. package/build-module/menu/item-label.js +6 -1
  466. package/build-module/menu/item-label.js.map +1 -1
  467. package/build-module/menu/item.js +4 -8
  468. package/build-module/menu/item.js.map +1 -1
  469. package/build-module/menu/radio-item.js +5 -9
  470. package/build-module/menu/radio-item.js.map +1 -1
  471. package/build-module/menu/separator.js +5 -2
  472. package/build-module/menu/separator.js.map +1 -1
  473. package/build-module/menu/styles.js +16 -16
  474. package/build-module/menu/styles.js.map +1 -1
  475. package/build-module/menu-items-choice/index.js +1 -0
  476. package/build-module/menu-items-choice/index.js.map +1 -1
  477. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -0
  478. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  479. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +1 -0
  480. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  481. package/build-module/mobile/bottom-sheet/picker-cell.native.js +1 -0
  482. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  483. package/build-module/mobile/bottom-sheet-select-control/index.native.js +1 -0
  484. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  485. package/build-module/mobile/color-settings/palette.screen.native.js +1 -0
  486. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  487. package/build-module/mobile/gradient/index.native.js +1 -0
  488. package/build-module/mobile/gradient/index.native.js.map +1 -1
  489. package/build-module/mobile/media-edit/index.native.js +1 -0
  490. package/build-module/mobile/media-edit/index.native.js.map +1 -1
  491. package/build-module/mobile/picker/index.android.js +1 -0
  492. package/build-module/mobile/picker/index.android.js.map +1 -1
  493. package/build-module/mobile/picker/index.ios.js +1 -0
  494. package/build-module/mobile/picker/index.ios.js.map +1 -1
  495. package/build-module/mobile/segmented-control/index.native.js +1 -0
  496. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  497. package/build-module/mobile/utils/get-px-from-css-unit.native.js +1 -0
  498. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  499. package/build-module/modal/aria-helper.js +0 -1
  500. package/build-module/modal/aria-helper.js.map +1 -1
  501. package/build-module/modal/index.js +0 -1
  502. package/build-module/modal/index.js.map +1 -1
  503. package/build-module/navigable-container/container.js +1 -0
  504. package/build-module/navigable-container/container.js.map +1 -1
  505. package/build-module/navigation/group/index.js +1 -0
  506. package/build-module/navigation/group/index.js.map +1 -1
  507. package/build-module/navigation/menu/menu-title-search.js +1 -0
  508. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  509. package/build-module/navigation/menu/search-no-results-found.js +1 -0
  510. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  511. package/build-module/navigation/styles/navigation-styles.js +12 -12
  512. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  513. package/build-module/navigator/navigator/component.js +1 -0
  514. package/build-module/navigator/navigator/component.js.map +1 -1
  515. package/build-module/navigator/navigator-screen/component.js +1 -0
  516. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  517. package/build-module/navigator/utils/router.js +1 -0
  518. package/build-module/navigator/utils/router.js.map +1 -1
  519. package/build-module/notice/index.js +1 -0
  520. package/build-module/notice/index.js.map +1 -1
  521. package/build-module/notice/list.js +1 -0
  522. package/build-module/notice/list.js.map +1 -1
  523. package/build-module/notice/list.native.js +1 -0
  524. package/build-module/notice/list.native.js.map +1 -1
  525. package/build-module/number-control/index.js +8 -0
  526. package/build-module/number-control/index.js.map +1 -1
  527. package/build-module/number-control/types.js.map +1 -1
  528. package/build-module/palette-edit/index.js +1 -0
  529. package/build-module/palette-edit/index.js.map +1 -1
  530. package/build-module/panel/actions.native.js +1 -0
  531. package/build-module/panel/actions.native.js.map +1 -1
  532. package/build-module/query-controls/index.js +1 -0
  533. package/build-module/query-controls/index.js.map +1 -1
  534. package/build-module/query-controls/terms.js +1 -0
  535. package/build-module/query-controls/terms.js.map +1 -1
  536. package/build-module/radio-control/index.js +1 -0
  537. package/build-module/radio-control/index.js.map +1 -1
  538. package/build-module/radio-control/index.native.js +1 -0
  539. package/build-module/radio-control/index.native.js.map +1 -1
  540. package/build-module/range-control/index.js +2 -1
  541. package/build-module/range-control/index.js.map +1 -1
  542. package/build-module/range-control/mark.js +0 -1
  543. package/build-module/range-control/mark.js.map +1 -1
  544. package/build-module/range-control/rail.js +1 -0
  545. package/build-module/range-control/rail.js.map +1 -1
  546. package/build-module/range-control/styles/range-control-styles.js +33 -45
  547. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  548. package/build-module/resizable-box/index.js +10 -1
  549. package/build-module/resizable-box/index.js.map +1 -1
  550. package/build-module/sandbox/index.js +1 -0
  551. package/build-module/sandbox/index.js.map +1 -1
  552. package/build-module/sandbox/index.native.js +1 -0
  553. package/build-module/sandbox/index.native.js.map +1 -1
  554. package/build-module/search-control/index.native.js +1 -0
  555. package/build-module/search-control/index.native.js.map +1 -1
  556. package/build-module/select-control/index.js +1 -0
  557. package/build-module/select-control/index.js.map +1 -1
  558. package/build-module/slot-fill/bubbles-virtually/fill.js +9 -13
  559. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  560. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +7 -10
  561. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  562. package/build-module/slot-fill/bubbles-virtually/slot.js +4 -10
  563. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  564. package/build-module/slot-fill/provider.js +1 -0
  565. package/build-module/slot-fill/provider.js.map +1 -1
  566. package/build-module/slot-fill/slot.js +1 -0
  567. package/build-module/slot-fill/slot.js.map +1 -1
  568. package/build-module/slot-fill/types.js.map +1 -1
  569. package/build-module/snackbar/index.js +1 -0
  570. package/build-module/snackbar/index.js.map +1 -1
  571. package/build-module/snackbar/list.js +1 -0
  572. package/build-module/snackbar/list.js.map +1 -1
  573. package/build-module/style-provider/index.js +0 -1
  574. package/build-module/style-provider/index.js.map +1 -1
  575. package/build-module/tab-panel/index.js +1 -0
  576. package/build-module/tab-panel/index.js.map +1 -1
  577. package/build-module/tabs/index.js +1 -0
  578. package/build-module/tabs/index.js.map +1 -1
  579. package/build-module/tabs/tab.js +0 -15
  580. package/build-module/tabs/tab.js.map +1 -1
  581. package/build-module/text/utils.js +1 -0
  582. package/build-module/text/utils.js.map +1 -1
  583. package/build-module/theme/color-algorithms.js +1 -0
  584. package/build-module/theme/color-algorithms.js.map +1 -1
  585. package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
  586. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  587. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +8 -8
  588. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  589. package/build-module/toolbar/toolbar-button/index.js +2 -0
  590. package/build-module/toolbar/toolbar-button/index.js.map +1 -1
  591. package/build-module/toolbar/toolbar-group/index.js +1 -0
  592. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  593. package/build-module/tools-panel/tools-panel/component.js +2 -0
  594. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  595. package/build-module/tools-panel/tools-panel/hook.js +1 -0
  596. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  597. package/build-module/tools-panel/tools-panel-header/component.js +1 -0
  598. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  599. package/build-module/tree-grid/cell.js +4 -1
  600. package/build-module/tree-grid/cell.js.map +1 -1
  601. package/build-module/tree-grid/index.js +1 -0
  602. package/build-module/tree-grid/index.js.map +1 -1
  603. package/build-module/tree-grid/types.js.map +1 -1
  604. package/build-module/tree-select/index.js +1 -0
  605. package/build-module/tree-select/index.js.map +1 -1
  606. package/build-module/unit-control/index.js +11 -1
  607. package/build-module/unit-control/index.js.map +1 -1
  608. package/build-module/unit-control/index.native.js +1 -0
  609. package/build-module/unit-control/index.native.js.map +1 -1
  610. package/build-module/unit-control/types.js.map +1 -1
  611. package/build-module/unit-control/unit-select-control.js +1 -0
  612. package/build-module/unit-control/unit-select-control.js.map +1 -1
  613. package/build-module/unit-control/utils.js +1 -0
  614. package/build-module/unit-control/utils.js.map +1 -1
  615. package/build-module/utils/colors-values.js +3 -0
  616. package/build-module/utils/colors-values.js.map +1 -1
  617. package/build-module/utils/config-values.js +0 -1
  618. package/build-module/utils/config-values.js.map +1 -1
  619. package/build-module/utils/get-valid-children.js +1 -0
  620. package/build-module/utils/get-valid-children.js.map +1 -1
  621. package/build-module/utils/hooks/use-animated-offset-rect.js +1 -0
  622. package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -1
  623. package/build-module/utils/hooks/use-cx.js +1 -0
  624. package/build-module/utils/hooks/use-cx.js.map +1 -1
  625. package/build-module/utils/math.js +1 -0
  626. package/build-module/utils/math.js.map +1 -1
  627. package/build-module/utils/rtl.js +1 -0
  628. package/build-module/utils/rtl.js.map +1 -1
  629. package/build-module/utils/values.js +1 -0
  630. package/build-module/utils/values.js.map +1 -1
  631. package/build-module/z-stack/component.js +1 -0
  632. package/build-module/z-stack/component.js.map +1 -1
  633. package/build-style/style-rtl.css +15 -11
  634. package/build-style/style.css +15 -11
  635. package/build-types/alignment-matrix-control/styles.d.ts.map +1 -1
  636. package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
  637. package/build-types/animation/index.d.ts +1 -1
  638. package/build-types/animation/index.d.ts.map +1 -1
  639. package/build-types/base-control/hooks.d.ts +4 -4
  640. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  641. package/build-types/border-box-control/border-box-control/hook.d.ts +83 -83
  642. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +93 -93
  643. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +83 -83
  644. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +83 -83
  645. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  646. package/build-types/border-control/border-control/hook.d.ts +83 -83
  647. package/build-types/border-control/border-control-dropdown/hook.d.ts +83 -83
  648. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  649. package/build-types/box-control/index.d.ts +14 -13
  650. package/build-types/box-control/index.d.ts.map +1 -1
  651. package/build-types/box-control/input-control.d.ts +3 -0
  652. package/build-types/box-control/input-control.d.ts.map +1 -0
  653. package/build-types/box-control/stories/index.story.d.ts +852 -816
  654. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  655. package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -1
  656. package/build-types/box-control/styles/box-control-styles.d.ts +3 -2
  657. package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
  658. package/build-types/box-control/types.d.ts +25 -3
  659. package/build-types/box-control/types.d.ts.map +1 -1
  660. package/build-types/box-control/utils.d.ts +23 -15
  661. package/build-types/box-control/utils.d.ts.map +1 -1
  662. package/build-types/button/stories/index.story.d.ts +18 -0
  663. package/build-types/button/stories/index.story.d.ts.map +1 -1
  664. package/build-types/button/types.d.ts +6 -4
  665. package/build-types/button/types.d.ts.map +1 -1
  666. package/build-types/card/card/hook.d.ts +83 -83
  667. package/build-types/card/card-body/hook.d.ts +83 -83
  668. package/build-types/card/card-divider/hook.d.ts +84 -84
  669. package/build-types/card/card-footer/hook.d.ts +83 -83
  670. package/build-types/card/card-header/hook.d.ts +83 -83
  671. package/build-types/card/card-media/hook.d.ts +83 -83
  672. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
  673. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  674. package/build-types/clipboard-button/index.d.ts.map +1 -1
  675. package/build-types/color-picker/styles.d.ts +3 -2
  676. package/build-types/color-picker/styles.d.ts.map +1 -1
  677. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  678. package/build-types/composite/index.d.ts.map +1 -1
  679. package/build-types/composite/item.d.ts.map +1 -1
  680. package/build-types/context/constants.d.ts.map +1 -1
  681. package/build-types/context/get-styled-class-name-from-key.d.ts +1 -9
  682. package/build-types/context/get-styled-class-name-from-key.d.ts.map +1 -1
  683. package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
  684. package/build-types/custom-gradient-picker/index.d.ts +1 -1
  685. package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
  686. package/build-types/custom-gradient-picker/types.d.ts +6 -0
  687. package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
  688. package/build-types/custom-select-control/index.d.ts.map +1 -1
  689. package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
  690. package/build-types/custom-select-control/types.d.ts +7 -0
  691. package/build-types/custom-select-control/types.d.ts.map +1 -1
  692. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  693. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  694. package/build-types/date-time/date/styles.d.ts.map +1 -1
  695. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  696. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  697. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  698. package/build-types/date-time/time/styles.d.ts +8 -4
  699. package/build-types/date-time/time/styles.d.ts.map +1 -1
  700. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  701. package/build-types/drop-zone/index.d.ts +1 -1
  702. package/build-types/drop-zone/index.d.ts.map +1 -1
  703. package/build-types/drop-zone/types.d.ts +5 -0
  704. package/build-types/drop-zone/types.d.ts.map +1 -1
  705. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  706. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  707. package/build-types/elevation/hook.d.ts +83 -83
  708. package/build-types/flex/flex/hook.d.ts +83 -83
  709. package/build-types/flex/flex-block/hook.d.ts +83 -83
  710. package/build-types/flex/flex-item/hook.d.ts +83 -83
  711. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  712. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +2 -1
  713. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
  714. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  715. package/build-types/font-size-picker/index.d.ts.map +1 -1
  716. package/build-types/font-size-picker/styles.d.ts.map +1 -1
  717. package/build-types/form-file-upload/index.d.ts +2 -1
  718. package/build-types/form-file-upload/index.d.ts.map +1 -1
  719. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  720. package/build-types/form-file-upload/types.d.ts +10 -8
  721. package/build-types/form-file-upload/types.d.ts.map +1 -1
  722. package/build-types/form-token-field/index.d.ts.map +1 -1
  723. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  724. package/build-types/gradient-picker/index.d.ts +1 -1
  725. package/build-types/gradient-picker/index.d.ts.map +1 -1
  726. package/build-types/gradient-picker/types.d.ts +6 -0
  727. package/build-types/gradient-picker/types.d.ts.map +1 -1
  728. package/build-types/grid/hook.d.ts +83 -83
  729. package/build-types/h-stack/hook.d.ts +83 -83
  730. package/build-types/heading/hook.d.ts +82 -82
  731. package/build-types/higher-order/with-fallback-styles/index.d.ts +2 -2
  732. package/build-types/higher-order/with-filters/index.d.ts +4 -4
  733. package/build-types/icon/index.d.ts +23 -7
  734. package/build-types/icon/index.d.ts.map +1 -1
  735. package/build-types/icon/stories/index.story.d.ts +7 -1
  736. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  737. package/build-types/index.d.ts +1 -1
  738. package/build-types/index.d.ts.map +1 -1
  739. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  740. package/build-types/item-group/item/hook.d.ts +83 -83
  741. package/build-types/item-group/item-group/hook.d.ts +83 -83
  742. package/build-types/lock-unlock.d.ts +2 -2
  743. package/build-types/menu/checkbox-item.d.ts.map +1 -1
  744. package/build-types/menu/group-label.d.ts.map +1 -1
  745. package/build-types/menu/group.d.ts.map +1 -1
  746. package/build-types/menu/index.d.ts.map +1 -1
  747. package/build-types/menu/item-help-text.d.ts.map +1 -1
  748. package/build-types/menu/item-label.d.ts.map +1 -1
  749. package/build-types/menu/item.d.ts.map +1 -1
  750. package/build-types/menu/radio-item.d.ts.map +1 -1
  751. package/build-types/menu/separator.d.ts.map +1 -1
  752. package/build-types/menu/styles.d.ts.map +1 -1
  753. package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
  754. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  755. package/build-types/navigator/navigator-back-button/hook.d.ts +92 -92
  756. package/build-types/navigator/navigator-button/hook.d.ts +92 -92
  757. package/build-types/number-control/index.d.ts +2 -1
  758. package/build-types/number-control/index.d.ts.map +1 -1
  759. package/build-types/number-control/stories/index.story.d.ts +2 -1
  760. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  761. package/build-types/number-control/types.d.ts +7 -0
  762. package/build-types/number-control/types.d.ts.map +1 -1
  763. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  764. package/build-types/progress-bar/styles.d.ts.map +1 -1
  765. package/build-types/range-control/index.d.ts +1 -1
  766. package/build-types/range-control/index.d.ts.map +1 -1
  767. package/build-types/range-control/mark.d.ts.map +1 -1
  768. package/build-types/range-control/styles/range-control-styles.d.ts +4 -3
  769. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  770. package/build-types/resizable-box/index.d.ts.map +1 -1
  771. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  772. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  773. package/build-types/scrollable/hook.d.ts +83 -83
  774. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  775. package/build-types/select-control/index.d.ts.map +1 -1
  776. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  777. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  778. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  779. package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
  780. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  781. package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
  782. package/build-types/slot-fill/types.d.ts +4 -3
  783. package/build-types/slot-fill/types.d.ts.map +1 -1
  784. package/build-types/spacer/hook.d.ts +83 -83
  785. package/build-types/spinner/styles.d.ts.map +1 -1
  786. package/build-types/surface/hook.d.ts +83 -83
  787. package/build-types/tabs/tab.d.ts +3 -0
  788. package/build-types/tabs/tab.d.ts.map +1 -1
  789. package/build-types/text/hook.d.ts +83 -83
  790. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  791. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  792. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  793. package/build-types/tools-panel/tools-panel/component.d.ts +2 -0
  794. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  795. package/build-types/tools-panel/tools-panel/hook.d.ts +83 -83
  796. package/build-types/tools-panel/tools-panel-header/hook.d.ts +83 -83
  797. package/build-types/tools-panel/tools-panel-item/hook.d.ts +83 -83
  798. package/build-types/tree-grid/cell.d.ts.map +1 -1
  799. package/build-types/tree-grid/types.d.ts +1 -1
  800. package/build-types/tree-grid/types.d.ts.map +1 -1
  801. package/build-types/truncate/hook.d.ts +83 -83
  802. package/build-types/unit-control/index.d.ts +3 -2
  803. package/build-types/unit-control/index.d.ts.map +1 -1
  804. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  805. package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -1
  806. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  807. package/build-types/unit-control/types.d.ts +7 -0
  808. package/build-types/unit-control/types.d.ts.map +1 -1
  809. package/build-types/utils/colors-values.d.ts +3 -0
  810. package/build-types/utils/colors-values.d.ts.map +1 -1
  811. package/build-types/utils/config-values.d.ts +0 -1
  812. package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
  813. package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
  814. package/build-types/utils/rtl.d.ts +1 -1
  815. package/build-types/utils/rtl.d.ts.map +1 -1
  816. package/build-types/v-stack/hook.d.ts +83 -83
  817. package/build-types/z-stack/styles.d.ts.map +1 -1
  818. package/package.json +20 -20
  819. package/src/alignment-matrix-control/stories/index.story.tsx +2 -2
  820. package/src/angle-picker-control/index.tsx +1 -1
  821. package/src/angle-picker-control/stories/index.story.tsx +2 -2
  822. package/src/animation/index.tsx +0 -1
  823. package/src/base-control/stories/index.story.tsx +1 -1
  824. package/src/border-box-control/border-box-control-split-controls/component.tsx +1 -1
  825. package/src/border-box-control/stories/index.story.tsx +1 -1
  826. package/src/border-control/border-control/component.tsx +2 -0
  827. package/src/border-control/stories/index.story.tsx +1 -1
  828. package/src/box-control/README.md +80 -60
  829. package/src/box-control/docs-manifest.json +5 -0
  830. package/src/box-control/index.tsx +47 -29
  831. package/src/box-control/input-control.tsx +197 -0
  832. package/src/box-control/stories/index.story.tsx +2 -1
  833. package/src/box-control/test/index.tsx +33 -26
  834. package/src/box-control/types.ts +80 -55
  835. package/src/box-control/utils.ts +62 -60
  836. package/src/button/README.md +108 -219
  837. package/src/button/docs-manifest.json +5 -0
  838. package/src/button/stories/best-practices.mdx +31 -0
  839. package/src/button/stories/index.story.tsx +18 -0
  840. package/src/button/types.ts +6 -4
  841. package/src/button-group/stories/index.story.tsx +1 -1
  842. package/src/card/stories/index.story.tsx +2 -2
  843. package/src/checkbox-control/stories/index.story.tsx +1 -1
  844. package/src/circular-option-picker/circular-option-picker-actions.tsx +1 -0
  845. package/src/circular-option-picker/circular-option-picker-option.tsx +1 -0
  846. package/src/circular-option-picker/stories/index.story.tsx +2 -2
  847. package/src/circular-option-picker/style.scss +2 -2
  848. package/src/clipboard-button/index.tsx +5 -3
  849. package/src/color-palette/stories/index.story.tsx +3 -3
  850. package/src/color-picker/input-with-slider.tsx +1 -1
  851. package/src/color-picker/stories/index.story.tsx +2 -2
  852. package/src/combobox-control/stories/index.story.tsx +1 -1
  853. package/src/composite/item.tsx +1 -19
  854. package/src/composite/stories/index.story.tsx +3 -3
  855. package/src/confirm-dialog/stories/index.story.tsx +1 -1
  856. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +2 -0
  857. package/src/custom-gradient-picker/index.tsx +2 -0
  858. package/src/custom-gradient-picker/style.scss +1 -1
  859. package/src/custom-gradient-picker/types.ts +6 -0
  860. package/src/custom-select-control/README.md +2 -0
  861. package/src/custom-select-control/index.tsx +11 -2
  862. package/src/custom-select-control/stories/index.story.tsx +3 -2
  863. package/src/custom-select-control/test/index.tsx +13 -9
  864. package/src/custom-select-control/types.ts +7 -0
  865. package/src/custom-select-control-v2/stories/index.story.tsx +2 -2
  866. package/src/date-time/stories/date-time.story.tsx +4 -1
  867. package/src/date-time/stories/date.story.tsx +4 -1
  868. package/src/date-time/stories/time.story.tsx +4 -1
  869. package/src/dimension-control/stories/index.story.tsx +1 -1
  870. package/src/disabled/stories/index.story.tsx +3 -3
  871. package/src/divider/stories/index.story.tsx +1 -1
  872. package/src/draggable/stories/index.story.tsx +2 -2
  873. package/src/drop-zone/index.tsx +21 -24
  874. package/src/drop-zone/types.ts +5 -0
  875. package/src/dropdown/stories/index.story.tsx +7 -7
  876. package/src/dropdown-menu/index.tsx +4 -1
  877. package/src/dropdown-menu/stories/index.story.tsx +3 -3
  878. package/src/dropdown-menu/style.scss +1 -1
  879. package/src/duotone-picker/color-list-picker/index.tsx +8 -8
  880. package/src/duotone-picker/color-list-picker/style.scss +0 -6
  881. package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
  882. package/src/flex/stories/index.story.tsx +1 -1
  883. package/src/font-size-picker/font-size-picker-select.tsx +1 -0
  884. package/src/font-size-picker/index.tsx +1 -0
  885. package/src/font-size-picker/stories/index.story.tsx +1 -1
  886. package/src/form-file-upload/README.md +58 -48
  887. package/src/form-file-upload/docs-manifest.json +5 -0
  888. package/src/form-file-upload/index.tsx +12 -1
  889. package/src/form-file-upload/stories/index.story.tsx +4 -3
  890. package/src/form-file-upload/test/index.tsx +5 -1
  891. package/src/form-file-upload/types.ts +10 -8
  892. package/src/form-token-field/README.md +1 -0
  893. package/src/form-token-field/index.tsx +7 -0
  894. package/src/form-token-field/stories/index.story.tsx +4 -2
  895. package/src/form-token-field/test/index.tsx +5 -1
  896. package/src/gradient-picker/README.md +8 -0
  897. package/src/gradient-picker/index.tsx +2 -0
  898. package/src/gradient-picker/stories/index.story.tsx +1 -1
  899. package/src/gradient-picker/types.ts +6 -0
  900. package/src/grid/stories/index.story.tsx +1 -1
  901. package/src/h-stack/stories/index.story.tsx +2 -2
  902. package/src/icon/README.md +22 -65
  903. package/src/icon/docs-manifest.json +5 -0
  904. package/src/icon/index.tsx +28 -13
  905. package/src/icon/stories/index.story.tsx +50 -8
  906. package/src/index.ts +1 -5
  907. package/src/input-control/stories/index.story.tsx +4 -4
  908. package/src/item-group/stories/index.story.tsx +2 -2
  909. package/src/menu/checkbox-item.tsx +9 -7
  910. package/src/menu/group-label.tsx +8 -1
  911. package/src/menu/group.tsx +8 -1
  912. package/src/menu/item-help-text.tsx +10 -1
  913. package/src/menu/item-label.tsx +10 -1
  914. package/src/menu/item.tsx +8 -6
  915. package/src/menu/radio-item.tsx +9 -7
  916. package/src/menu/separator.tsx +9 -2
  917. package/src/menu/stories/index.story.tsx +2 -2
  918. package/src/menu/styles.ts +1 -1
  919. package/src/menu-group/stories/index.story.tsx +1 -1
  920. package/src/menu-item/stories/index.story.tsx +1 -1
  921. package/src/menu-items-choice/stories/index.story.tsx +1 -1
  922. package/src/menu-items-choice/style.scss +1 -0
  923. package/src/modal/stories/index.story.tsx +2 -2
  924. package/src/modal/test/index.tsx +2 -1
  925. package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
  926. package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
  927. package/src/navigation/stories/index.story.tsx +4 -4
  928. package/src/navigation/styles/navigation-styles.tsx +3 -2
  929. package/src/navigator/stories/index.story.tsx +3 -3
  930. package/src/number-control/README.md +2 -1
  931. package/src/number-control/index.tsx +9 -0
  932. package/src/number-control/stories/index.story.tsx +2 -1
  933. package/src/number-control/test/index.tsx +5 -1
  934. package/src/number-control/types.ts +7 -0
  935. package/src/panel/stories/index.story.tsx +1 -1
  936. package/src/placeholder/stories/index.story.tsx +3 -3
  937. package/src/popover/stories/index.story.tsx +11 -9
  938. package/src/query-controls/stories/index.story.tsx +6 -6
  939. package/src/radio-control/stories/index.story.tsx +1 -1
  940. package/src/radio-group/stories/index.story.tsx +3 -3
  941. package/src/range-control/index.tsx +1 -0
  942. package/src/range-control/mark.tsx +0 -1
  943. package/src/range-control/stories/index.story.tsx +7 -7
  944. package/src/range-control/styles/range-control-styles.ts +18 -19
  945. package/src/resizable-box/index.tsx +10 -0
  946. package/src/resizable-box/stories/index.story.tsx +1 -1
  947. package/src/resizable-box/style.scss +8 -0
  948. package/src/responsive-wrapper/stories/index.story.tsx +1 -1
  949. package/src/sandbox/stories/index.story.tsx +1 -1
  950. package/src/scrollable/stories/index.story.tsx +2 -1
  951. package/src/search-control/stories/index.story.tsx +1 -1
  952. package/src/select-control/stories/index.story.tsx +1 -1
  953. package/src/slot-fill/bubbles-virtually/fill.tsx +7 -11
  954. package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +2 -13
  955. package/src/slot-fill/bubbles-virtually/slot.tsx +4 -7
  956. package/src/slot-fill/stories/index.story.tsx +2 -2
  957. package/src/slot-fill/types.ts +4 -3
  958. package/src/snackbar/stories/index.story.tsx +4 -4
  959. package/src/snackbar/stories/list.story.tsx +2 -2
  960. package/src/surface/stories/index.story.tsx +1 -1
  961. package/src/tabs/tab.tsx +0 -18
  962. package/src/tabs/test/index.tsx +1492 -947
  963. package/src/text-control/stories/index.story.tsx +1 -1
  964. package/src/textarea-control/stories/index.story.tsx +1 -1
  965. package/src/theme/stories/index.story.tsx +1 -1
  966. package/src/toggle-control/stories/index.story.tsx +1 -1
  967. package/src/toggle-group-control/stories/index.story.tsx +1 -1
  968. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +22 -22
  969. package/src/toggle-group-control/toggle-group-control/styles.ts +1 -1
  970. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +6 -6
  971. package/src/toolbar/stories/index.story.tsx +1 -1
  972. package/src/toolbar/toolbar-button/index.tsx +2 -0
  973. package/src/tools-panel/stories/index.story.tsx +15 -3
  974. package/src/tools-panel/test/index.tsx +0 -17
  975. package/src/tools-panel/tools-panel/README.md +4 -0
  976. package/src/tools-panel/tools-panel/component.tsx +2 -0
  977. package/src/tooltip/stories/index.story.tsx +1 -1
  978. package/src/tree-grid/cell.tsx +5 -1
  979. package/src/tree-grid/stories/index.story.tsx +1 -1
  980. package/src/tree-grid/types.ts +1 -1
  981. package/src/tree-select/stories/index.story.tsx +1 -1
  982. package/src/unit-control/README.md +3 -3
  983. package/src/unit-control/index.tsx +11 -1
  984. package/src/unit-control/stories/index.story.tsx +5 -4
  985. package/src/unit-control/test/index.tsx +5 -1
  986. package/src/unit-control/types.ts +7 -0
  987. package/src/utils/colors-values.js +3 -0
  988. package/src/utils/config-values.js +0 -1
  989. package/src/view/stories/index.story.tsx +1 -1
  990. package/src/visually-hidden/stories/index.story.tsx +1 -1
  991. package/src/z-stack/stories/index.story.tsx +1 -1
  992. package/tsconfig.tsbuildinfo +1 -1
  993. package/build/box-control/all-input-control.js +0 -90
  994. package/build/box-control/all-input-control.js.map +0 -1
  995. package/build/box-control/axial-input-controls.js +0 -124
  996. package/build/box-control/axial-input-controls.js.map +0 -1
  997. package/build/box-control/input-controls.js +0 -132
  998. package/build/box-control/input-controls.js.map +0 -1
  999. package/build/menu/use-temporary-focus-visible-fix.js +0 -27
  1000. package/build/menu/use-temporary-focus-visible-fix.js.map +0 -1
  1001. package/build-module/box-control/all-input-control.js +0 -83
  1002. package/build-module/box-control/all-input-control.js.map +0 -1
  1003. package/build-module/box-control/axial-input-controls.js +0 -115
  1004. package/build-module/box-control/axial-input-controls.js.map +0 -1
  1005. package/build-module/box-control/input-controls.js +0 -123
  1006. package/build-module/box-control/input-controls.js.map +0 -1
  1007. package/build-module/menu/use-temporary-focus-visible-fix.js +0 -20
  1008. package/build-module/menu/use-temporary-focus-visible-fix.js.map +0 -1
  1009. package/build-types/box-control/all-input-control.d.ts +0 -3
  1010. package/build-types/box-control/all-input-control.d.ts.map +0 -1
  1011. package/build-types/box-control/axial-input-controls.d.ts +0 -3
  1012. package/build-types/box-control/axial-input-controls.d.ts.map +0 -1
  1013. package/build-types/box-control/input-controls.d.ts +0 -3
  1014. package/build-types/box-control/input-controls.d.ts.map +0 -1
  1015. package/build-types/menu/use-temporary-focus-visible-fix.d.ts +0 -8
  1016. package/build-types/menu/use-temporary-focus-visible-fix.d.ts.map +0 -1
  1017. package/src/box-control/all-input-control.tsx +0 -109
  1018. package/src/box-control/axial-input-controls.tsx +0 -164
  1019. package/src/box-control/input-controls.tsx +0 -166
  1020. package/src/menu/use-temporary-focus-visible-fix.ts +0 -22
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_deprecated","_i18n","_modal","_button","_pageControl","_jsxRuntime","Guide","children","className","contentLabel","finishButtonText","__","onFinish","pages","ref","useRef","currentPage","setCurrentPage","useState","useEffect","frame","current","querySelector","HTMLElement","focus","Children","count","deprecated","since","alternative","_Children$map","map","child","content","canGoBack","canGoForward","length","goBack","goForward","jsx","default","clsx","isDismissible","onRequestClose","onKeyDown","event","code","preventDefault","jsxs","image","numberOfPages","variant","onClick","__next40pxDefaultSize","_default","exports"],"sources":["@wordpress/components/src/guide/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect, Children, useRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Modal from '../modal';\nimport Button from '../button';\nimport PageControl from './page-control';\nimport type { GuideProps } from './types';\n\n/**\n * `Guide` is a React component that renders a _user guide_ in a modal. The guide consists of several pages which the user can step through one by one. The guide is finished when the modal is closed or when the user clicks _Finish_ on the last page of the guide.\n *\n * ```jsx\n * function MyTutorial() {\n * \tconst [ isOpen, setIsOpen ] = useState( true );\n *\n * \tif ( ! isOpen ) {\n * \t\treturn null;\n * \t}\n *\n * \treturn (\n * \t\t<Guide\n * \t\t\tonFinish={ () => setIsOpen( false ) }\n * \t\t\tpages={ [\n * \t\t\t\t{\n * \t\t\t\t\tcontent: <p>Welcome to the ACME Store!</p>,\n * \t\t\t\t},\n * \t\t\t\t{\n * \t\t\t\t\timage: <img src=\"https://acmestore.com/add-to-cart.png\" />,\n * \t\t\t\t\tcontent: (\n * \t\t\t\t\t\t<p>\n * \t\t\t\t\t\t\tClick <i>Add to Cart</i> to buy a product.\n * \t\t\t\t\t\t</p>\n * \t\t\t\t\t),\n * \t\t\t\t},\n * \t\t\t] }\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction Guide( {\n\tchildren,\n\tclassName,\n\tcontentLabel,\n\tfinishButtonText = __( 'Finish' ),\n\tonFinish,\n\tpages = [],\n}: GuideProps ) {\n\tconst ref = useRef< HTMLDivElement >( null );\n\tconst [ currentPage, setCurrentPage ] = useState( 0 );\n\n\tuseEffect( () => {\n\t\t// Place focus at the top of the guide on mount and when the page changes.\n\t\tconst frame = ref.current?.querySelector( '.components-guide' );\n\t\tif ( frame instanceof HTMLElement ) {\n\t\t\tframe.focus();\n\t\t}\n\t}, [ currentPage ] );\n\n\tuseEffect( () => {\n\t\tif ( Children.count( children ) ) {\n\t\t\tdeprecated( 'Passing children to <Guide>', {\n\t\t\t\tsince: '5.5',\n\t\t\t\talternative: 'the `pages` prop',\n\t\t\t} );\n\t\t}\n\t}, [ children ] );\n\n\tif ( Children.count( children ) ) {\n\t\tpages =\n\t\t\tChildren.map( children, ( child ) => ( {\n\t\t\t\tcontent: child,\n\t\t\t} ) ) ?? [];\n\t}\n\n\tconst canGoBack = currentPage > 0;\n\tconst canGoForward = currentPage < pages.length - 1;\n\n\tconst goBack = () => {\n\t\tif ( canGoBack ) {\n\t\t\tsetCurrentPage( currentPage - 1 );\n\t\t}\n\t};\n\n\tconst goForward = () => {\n\t\tif ( canGoForward ) {\n\t\t\tsetCurrentPage( currentPage + 1 );\n\t\t}\n\t};\n\n\tif ( pages.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName={ clsx( 'components-guide', className ) }\n\t\t\tcontentLabel={ contentLabel }\n\t\t\tisDismissible={ pages.length > 1 }\n\t\t\tonRequestClose={ onFinish }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.code === 'ArrowLeft' ) {\n\t\t\t\t\tgoBack();\n\t\t\t\t\t// Do not scroll the modal's contents.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} else if ( event.code === 'ArrowRight' ) {\n\t\t\t\t\tgoForward();\n\t\t\t\t\t// Do not scroll the modal's contents.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t<div className=\"components-guide__container\">\n\t\t\t\t<div className=\"components-guide__page\">\n\t\t\t\t\t{ pages[ currentPage ].image }\n\n\t\t\t\t\t{ pages.length > 1 && (\n\t\t\t\t\t\t<PageControl\n\t\t\t\t\t\t\tcurrentPage={ currentPage }\n\t\t\t\t\t\t\tnumberOfPages={ pages.length }\n\t\t\t\t\t\t\tsetCurrentPage={ setCurrentPage }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ pages[ currentPage ].content }\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"components-guide__footer\">\n\t\t\t\t\t{ canGoBack && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-guide__back-button\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ goBack }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Previous' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canGoForward && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-guide__forward-button\"\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tonClick={ goForward }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Next' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! canGoForward && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-guide__finish-button\"\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tonClick={ onFinish }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ finishButtonText }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n\nexport default Guide;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AAKA,IAAAI,MAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,YAAA,GAAAP,sBAAA,CAAAC,OAAA;AAAyC,IAAAO,WAAA,GAAAP,OAAA;AAjBzC;AACA;AACA;;AAGA;AACA;AACA;;AAKA;AACA;AACA;;AAMA;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;AAC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;UAC9BnB,cAAc,EAAGA;QAAgB,CACjC,CACD,EAECJ,KAAK,CAAEG,WAAW,CAAE,CAACiB,OAAO;MAAA,CAC1B,CAAC,eAEN,IAAA5B,WAAA,CAAA2C,IAAA;QAAKxC,SAAS,EAAC,0BAA0B;QAAAD,QAAA,GACtC2B,SAAS,iBACV,IAAA7B,WAAA,CAAAkC,GAAA,EAACpC,OAAA,CAAAqC,OAAM;UACNhC,SAAS,EAAC,+BAA+B;UACzC2C,OAAO,EAAC,UAAU;UAClBC,OAAO,EAAGf,MAAQ;UAClBgB,qBAAqB;UAAA9C,QAAA,EAEnB,IAAAI,QAAE,EAAE,UAAW;QAAC,CACX,CACR,EACCwB,YAAY,iBACb,IAAA9B,WAAA,CAAAkC,GAAA,EAACpC,OAAA,CAAAqC,OAAM;UACNhC,SAAS,EAAC,kCAAkC;UAC5C2C,OAAO,EAAC,SAAS;UACjBC,OAAO,EAAGd,SAAW;UACrBe,qBAAqB;UAAA9C,QAAA,EAEnB,IAAAI,QAAE,EAAE,MAAO;QAAC,CACP,CACR,EACC,CAAEwB,YAAY,iBACf,IAAA9B,WAAA,CAAAkC,GAAA,EAACpC,OAAA,CAAAqC,OAAM;UACNhC,SAAS,EAAC,iCAAiC;UAC3C2C,OAAO,EAAC,SAAS;UACjBC,OAAO,EAAGxC,QAAU;UACpByC,qBAAqB;UAAA9C,QAAA,EAEnBG;QAAgB,CACX,CACR;MAAA,CACG,CAAC;IAAA,CACF;EAAC,CACA,CAAC;AAEV;AAAC,IAAA4C,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEclC,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_deprecated","_i18n","_modal","_button","_pageControl","_jsxRuntime","Guide","children","className","contentLabel","finishButtonText","__","onFinish","pages","ref","useRef","currentPage","setCurrentPage","useState","useEffect","frame","current","querySelector","HTMLElement","focus","Children","count","deprecated","since","alternative","_Children$map","map","child","content","canGoBack","canGoForward","length","goBack","goForward","jsx","default","clsx","isDismissible","onRequestClose","onKeyDown","event","code","preventDefault","jsxs","image","numberOfPages","variant","onClick","__next40pxDefaultSize","_default","exports"],"sources":["@wordpress/components/src/guide/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useState, useEffect, Children, useRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Modal from '../modal';\nimport Button from '../button';\nimport PageControl from './page-control';\nimport type { GuideProps } from './types';\n\n/**\n * `Guide` is a React component that renders a _user guide_ in a modal. The guide consists of several pages which the user can step through one by one. The guide is finished when the modal is closed or when the user clicks _Finish_ on the last page of the guide.\n *\n * ```jsx\n * function MyTutorial() {\n * \tconst [ isOpen, setIsOpen ] = useState( true );\n *\n * \tif ( ! isOpen ) {\n * \t\treturn null;\n * \t}\n *\n * \treturn (\n * \t\t<Guide\n * \t\t\tonFinish={ () => setIsOpen( false ) }\n * \t\t\tpages={ [\n * \t\t\t\t{\n * \t\t\t\t\tcontent: <p>Welcome to the ACME Store!</p>,\n * \t\t\t\t},\n * \t\t\t\t{\n * \t\t\t\t\timage: <img src=\"https://acmestore.com/add-to-cart.png\" />,\n * \t\t\t\t\tcontent: (\n * \t\t\t\t\t\t<p>\n * \t\t\t\t\t\t\tClick <i>Add to Cart</i> to buy a product.\n * \t\t\t\t\t\t</p>\n * \t\t\t\t\t),\n * \t\t\t\t},\n * \t\t\t] }\n * \t\t/>\n * \t);\n * }\n * ```\n */\nfunction Guide( {\n\tchildren,\n\tclassName,\n\tcontentLabel,\n\tfinishButtonText = __( 'Finish' ),\n\tonFinish,\n\tpages = [],\n}: GuideProps ) {\n\tconst ref = useRef< HTMLDivElement >( null );\n\tconst [ currentPage, setCurrentPage ] = useState( 0 );\n\n\tuseEffect( () => {\n\t\t// Place focus at the top of the guide on mount and when the page changes.\n\t\tconst frame = ref.current?.querySelector( '.components-guide' );\n\t\tif ( frame instanceof HTMLElement ) {\n\t\t\tframe.focus();\n\t\t}\n\t}, [ currentPage ] );\n\n\tuseEffect( () => {\n\t\tif ( Children.count( children ) ) {\n\t\t\tdeprecated( 'Passing children to <Guide>', {\n\t\t\t\tsince: '5.5',\n\t\t\t\talternative: 'the `pages` prop',\n\t\t\t} );\n\t\t}\n\t}, [ children ] );\n\n\tif ( Children.count( children ) ) {\n\t\tpages =\n\t\t\tChildren.map( children, ( child ) => ( {\n\t\t\t\tcontent: child,\n\t\t\t} ) ) ?? [];\n\t}\n\n\tconst canGoBack = currentPage > 0;\n\tconst canGoForward = currentPage < pages.length - 1;\n\n\tconst goBack = () => {\n\t\tif ( canGoBack ) {\n\t\t\tsetCurrentPage( currentPage - 1 );\n\t\t}\n\t};\n\n\tconst goForward = () => {\n\t\tif ( canGoForward ) {\n\t\t\tsetCurrentPage( currentPage + 1 );\n\t\t}\n\t};\n\n\tif ( pages.length === 0 ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<Modal\n\t\t\tclassName={ clsx( 'components-guide', className ) }\n\t\t\tcontentLabel={ contentLabel }\n\t\t\tisDismissible={ pages.length > 1 }\n\t\t\tonRequestClose={ onFinish }\n\t\t\tonKeyDown={ ( event ) => {\n\t\t\t\tif ( event.code === 'ArrowLeft' ) {\n\t\t\t\t\tgoBack();\n\t\t\t\t\t// Do not scroll the modal's contents.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} else if ( event.code === 'ArrowRight' ) {\n\t\t\t\t\tgoForward();\n\t\t\t\t\t// Do not scroll the modal's contents.\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t} }\n\t\t\tref={ ref }\n\t\t>\n\t\t\t<div className=\"components-guide__container\">\n\t\t\t\t<div className=\"components-guide__page\">\n\t\t\t\t\t{ pages[ currentPage ].image }\n\n\t\t\t\t\t{ pages.length > 1 && (\n\t\t\t\t\t\t<PageControl\n\t\t\t\t\t\t\tcurrentPage={ currentPage }\n\t\t\t\t\t\t\tnumberOfPages={ pages.length }\n\t\t\t\t\t\t\tsetCurrentPage={ setCurrentPage }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ pages[ currentPage ].content }\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"components-guide__footer\">\n\t\t\t\t\t{ canGoBack && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-guide__back-button\"\n\t\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\t\tonClick={ goBack }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Previous' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t{ canGoForward && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-guide__forward-button\"\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tonClick={ goForward }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Next' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t\t{ ! canGoForward && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-guide__finish-button\"\n\t\t\t\t\t\t\tvariant=\"primary\"\n\t\t\t\t\t\t\tonClick={ onFinish }\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ finishButtonText }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Modal>\n\t);\n}\n\nexport default Guide;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,I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UAAA9C,QAAA,EAEnBG;QAAgB,CACX,CACR;MAAA,CACG,CAAC;IAAA,CACF;EAAC,CACA,CAAC;AAEV;AAAC,IAAA4C,QAAA,GAAAC,OAAA,CAAAf,OAAA,GAEclC,KAAK","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_button","_interopRequireDefault","_icons","_jsxRuntime","PageControl","currentPage","numberOfPages","setCurrentPage","jsx","className","__","children","Array","from","length","map","_","page","undefined","default","size","icon","PageControlIcon","sprintf","onClick"],"sources":["@wordpress/components/src/guide/page-control.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { PageControlIcon } from './icons';\nimport type { PageControlProps } from './types';\n\nexport default function PageControl( {\n\tcurrentPage,\n\tnumberOfPages,\n\tsetCurrentPage,\n}: PageControlProps ) {\n\treturn (\n\t\t<ul\n\t\t\tclassName=\"components-guide__page-control\"\n\t\t\taria-label={ __( 'Guide controls' ) }\n\t\t>\n\t\t\t{ Array.from( { length: numberOfPages } ).map( ( _, page ) => (\n\t\t\t\t<li\n\t\t\t\t\tkey={ page }\n\t\t\t\t\t// Set aria-current=\"step\" on the active page, see https://www.w3.org/TR/wai-aria-1.1/#aria-current\n\t\t\t\t\taria-current={ page === currentPage ? 'step' : undefined }\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tkey={ page }\n\t\t\t\t\t\ticon={ <PageControlIcon /> }\n\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t/* translators: 1: current page number 2: total number of pages */\n\t\t\t\t\t\t\t__( 'Page %1$d of %2$d' ),\n\t\t\t\t\t\t\tpage + 1,\n\t\t\t\t\t\t\tnumberOfPages\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ () => setCurrentPage( page ) }\n\t\t\t\t\t/>\n\t\t\t\t</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAA0C,IAAAI,WAAA,GAAAJ,OAAA;AAT1C;AACA;AACA;;AAGA;AACA;AACA;;AAKe,SAASK,WAAWA,CAAE;EACpCC,WAAW;EACXC,aAAa;EACbC;AACiB,CAAC,EAAG;EACrB,oBACC,IAAAJ,WAAA,CAAAK,GAAA;IACCC,SAAS,EAAC,gCAAgC;IAC1C,cAAa,IAAAC,QAAE,EAAE,gBAAiB,CAAG;IAAAC,QAAA,EAEnCC,KAAK,CAACC,IAAI,CAAE;MAAEC,MAAM,EAAER;IAAc,CAAE,CAAC,CAACS,GAAG,CAAE,CAAEC,CAAC,EAAEC,IAAI,kBACvD,IAAAd,WAAA,CAAAK,GAAA;MAEC;MACA,gBAAeS,IAAI,KAAKZ,WAAW,GAAG,MAAM,GAAGa,SAAW;MAAAP,QAAA,eAE1D,IAAAR,WAAA,CAAAK,GAAA,EAACR,OAAA,CAAAmB,OAAM;QACNC,IAAI,EAAC,OAAO;QAEZC,IAAI,eAAG,IAAAlB,WAAA,CAAAK,GAAA,EAACN,MAAA,CAAAoB,eAAe,IAAE,CAAG;QAC5B,cAAa,IAAAC,aAAO,EACnB;QACA,IAAAb,QAAE,EAAE,mBAAoB,CAAC,EACzBO,IAAI,GAAG,CAAC,EACRX,aACD,CAAG;QACHkB,OAAO,EAAGA,CAAA,KAAMjB,cAAc,CAAEU,IAAK;MAAG,GARlCA,IASN;IAAC,GAfIA,IAgBH,CACH;EAAC,CACA,CAAC;AAEP","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_button","_interopRequireDefault","_icons","_jsxRuntime","PageControl","currentPage","numberOfPages","setCurrentPage","jsx","className","__","children","Array","from","length","map","_","page","undefined","default","size","icon","PageControlIcon","sprintf","onClick"],"sources":["@wordpress/components/src/guide/page-control.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport { PageControlIcon } from './icons';\nimport type { PageControlProps } from './types';\n\nexport default function PageControl( {\n\tcurrentPage,\n\tnumberOfPages,\n\tsetCurrentPage,\n}: PageControlProps ) {\n\treturn (\n\t\t<ul\n\t\t\tclassName=\"components-guide__page-control\"\n\t\t\taria-label={ __( 'Guide controls' ) }\n\t\t>\n\t\t\t{ Array.from( { length: numberOfPages } ).map( ( _, page ) => (\n\t\t\t\t<li\n\t\t\t\t\tkey={ page }\n\t\t\t\t\t// Set aria-current=\"step\" on the active page, see https://www.w3.org/TR/wai-aria-1.1/#aria-current\n\t\t\t\t\taria-current={ page === currentPage ? 'step' : undefined }\n\t\t\t\t>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\tkey={ page }\n\t\t\t\t\t\ticon={ <PageControlIcon /> }\n\t\t\t\t\t\taria-label={ sprintf(\n\t\t\t\t\t\t\t/* translators: 1: current page number 2: total number of pages */\n\t\t\t\t\t\t\t__( 'Page %1$d of %2$d' ),\n\t\t\t\t\t\t\tpage + 1,\n\t\t\t\t\t\t\tnumberOfPages\n\t\t\t\t\t\t) }\n\t\t\t\t\t\tonClick={ () => setCurrentPage( page ) }\n\t\t\t\t\t/>\n\t\t\t\t</li>\n\t\t\t) ) }\n\t\t</ul>\n\t);\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAA0C,IAAAI,WAAA,GAAAJ,OAAA;AAT1C;AACA;AACA;;AAGA;AACA;AACA;;AAKe,SAASK,WAAWA,CAAE;EACpCC,WAAW;EACXC,aAAa;EACbC;AACiB,CAAC,EAAG;EACrB,oBACC,IAAAJ,WAAA,CAAAK,GAAA;IACCC,SAAS,EAAC,gCAAgC;IAC1C,cAAa,IAAAC,QAAE,EAAE,gBAAiB,CAAG;IAAAC,QAAA,EAEnCC,KAAK,CAACC,IAAI,CAAE;MAAEC,MAAM,EAAER;IAAc,CAAE,CAAC,CAACS,GAAG,CAAE,CAAEC,CAAC,EAAEC,IAAI,kBACvD,IAAAd,WAAA,CAAAK,GAAA;MAEC;MACA,gBAAeS,IAAI,KAAKZ,WAAW,GAAG,MAAM,GAAGa,SAAW;MAAAP,QAAA,eAE1D,IAAAR,WAAA,CAAAK,GAAA,EAACR,OAAA,CAAAmB,OAAM;QACNC,IAAI,EAAC,OAAO;QAEZC,IAAI,eAAG,IAAAlB,WAAA,CAAAK,GAAA,EAACN,MAAA,CAAAoB,eAAe,IAAE,CAAG;QAC5B,cAAa,IAAAC,aAAO,EACnB;QACA,IAAAb,QAAE,EAAE,mBAAoB,CAAC,EACzBO,IAAI,GAAG,CAAC,EACRX,aACD,CAAG;QACHkB,OAAO,EAAGA,CAAA,KAAMjB,cAAc,CAAEU,IAAK;MAAG,GARlCA,IASN;IAAC,GAfIA,IAgBH,CACH;EAAC,CACA,CAAC;AAEP","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_context","require","_flex","_utils","_getValidChildren","_jsxRuntime","useHStack","props","alignment","children","direction","spacing","otherProps","useContextSystem","align","getAlignmentProps","validChildren","getValidChildren","clonedChildren","map","child","index","_isSpacer","hasConnectNamespace","childElement","_key","key","jsx","FlexItem","isBlock","propsForFlex","justify","gap","isColumn","flexProps","useFlex"],"sources":["@wordpress/components/src/h-stack/hook.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { hasConnectNamespace, useContextSystem } from '../context';\nimport { FlexItem, useFlex } from '../flex';\nimport { getAlignmentProps } from './utils';\nimport { getValidChildren } from '../utils/get-valid-children';\nimport type { Props } from './types';\n\nexport function useHStack( props: WordPressComponentProps< Props, 'div' > ) {\n\tconst {\n\t\talignment = 'edge',\n\t\tchildren,\n\t\tdirection,\n\t\tspacing = 2,\n\t\t...otherProps\n\t} = useContextSystem( props, 'HStack' );\n\n\tconst align = getAlignmentProps( alignment, direction );\n\n\tconst validChildren = getValidChildren( children );\n\tconst clonedChildren = validChildren.map( ( child, index ) => {\n\t\tconst _isSpacer = hasConnectNamespace( child, [ 'Spacer' ] );\n\n\t\tif ( _isSpacer ) {\n\t\t\tconst childElement = child as ReactElement;\n\t\t\tconst _key = childElement.key || `hstack-${ index }`;\n\n\t\t\treturn <FlexItem isBlock key={ _key } { ...childElement.props } />;\n\t\t}\n\n\t\treturn child;\n\t} );\n\n\tconst propsForFlex = {\n\t\tchildren: clonedChildren,\n\t\tdirection,\n\t\tjustify: 'center',\n\t\t...align,\n\t\t...otherProps,\n\t\tgap: spacing,\n\t};\n\n\t// Omit `isColumn` because it's not used in HStack.\n\tconst { isColumn, ...flexProps } = useFlex( propsForFlex );\n\n\treturn flexProps;\n}\n"],"mappings":";;;;;;AASA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAA+D,IAAAI,WAAA,GAAAJ,OAAA;AAZ/D;AACA;AACA;;AAGA;AACA;AACA;;AAQO,SAASK,SAASA,CAAEC,KAA8C,EAAG;EAC3E,MAAM;IACLC,SAAS,GAAG,MAAM;IAClBC,QAAQ;IACRC,SAAS;IACTC,OAAO,GAAG,CAAC;IACX,GAAGC;EACJ,CAAC,GAAG,IAAAC,yBAAgB,EAAEN,KAAK,EAAE,QAAS,CAAC;EAEvC,MAAMO,KAAK,GAAG,IAAAC,wBAAiB,EAAEP,SAAS,EAAEE,SAAU,CAAC;EAEvD,MAAMM,aAAa,GAAG,IAAAC,kCAAgB,EAAER,QAAS,CAAC;EAClD,MAAMS,cAAc,GAAGF,aAAa,CAACG,GAAG,CAAE,CAAEC,KAAK,EAAEC,KAAK,KAAM;IAC7D,MAAMC,SAAS,GAAG,IAAAC,4BAAmB,EAAEH,KAAK,EAAE,CAAE,QAAQ,CAAG,CAAC;IAE5D,IAAKE,SAAS,EAAG;MAChB,MAAME,YAAY,GAAGJ,KAAqB;MAC1C,MAAMK,IAAI,GAAGD,YAAY,CAACE,GAAG,IAAI,UAAWL,KAAK,EAAG;MAEpD,oBAAO,IAAAhB,WAAA,CAAAsB,GAAA,EAACzB,KAAA,CAAA0B,QAAQ;QAACC,OAAO;QAAA,GAAmBL,YAAY,CAACjB;MAAK,GAA9BkB,IAAkC,CAAC;IACnE;IAEA,OAAOL,KAAK;EACb,CAAE,CAAC;EAEH,MAAMU,YAAY,GAAG;IACpBrB,QAAQ,EAAES,cAAc;IACxBR,SAAS;IACTqB,OAAO,EAAE,QAAQ;IACjB,GAAGjB,KAAK;IACR,GAAGF,UAAU;IACboB,GAAG,EAAErB;EACN,CAAC;;EAED;EACA,MAAM;IAAEsB,QAAQ;IAAE,GAAGC;EAAU,CAAC,GAAG,IAAAC,aAAO,EAAEL,YAAa,CAAC;EAE1D,OAAOI,SAAS;AACjB","ignoreList":[]}
1
+ {"version":3,"names":["_context","require","_flex","_utils","_getValidChildren","_jsxRuntime","useHStack","props","alignment","children","direction","spacing","otherProps","useContextSystem","align","getAlignmentProps","validChildren","getValidChildren","clonedChildren","map","child","index","_isSpacer","hasConnectNamespace","childElement","_key","key","jsx","FlexItem","isBlock","propsForFlex","justify","gap","isColumn","flexProps","useFlex"],"sources":["@wordpress/components/src/h-stack/hook.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactElement } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { hasConnectNamespace, useContextSystem } from '../context';\nimport { FlexItem, useFlex } from '../flex';\nimport { getAlignmentProps } from './utils';\nimport { getValidChildren } from '../utils/get-valid-children';\nimport type { Props } from './types';\n\nexport function useHStack( props: WordPressComponentProps< Props, 'div' > ) {\n\tconst {\n\t\talignment = 'edge',\n\t\tchildren,\n\t\tdirection,\n\t\tspacing = 2,\n\t\t...otherProps\n\t} = useContextSystem( props, 'HStack' );\n\n\tconst align = getAlignmentProps( alignment, direction );\n\n\tconst validChildren = getValidChildren( children );\n\tconst clonedChildren = validChildren.map( ( child, index ) => {\n\t\tconst _isSpacer = hasConnectNamespace( child, [ 'Spacer' ] );\n\n\t\tif ( _isSpacer ) {\n\t\t\tconst childElement = child as ReactElement;\n\t\t\tconst _key = childElement.key || `hstack-${ index }`;\n\n\t\t\treturn <FlexItem isBlock key={ _key } { ...childElement.props } />;\n\t\t}\n\n\t\treturn child;\n\t} );\n\n\tconst propsForFlex = {\n\t\tchildren: clonedChildren,\n\t\tdirection,\n\t\tjustify: 'center',\n\t\t...align,\n\t\t...otherProps,\n\t\tgap: spacing,\n\t};\n\n\t// Omit `isColumn` because it's not used in HStack.\n\tconst { isColumn, ...flexProps } = useFlex( propsForFlex );\n\n\treturn flexProps;\n}\n"],"mappings":";;;;;;;AASA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAA+D,IAAAI,WAAA,GAAAJ,OAAA;AAZ/D;AACA;AACA;;AAGA;AACA;AACA;;AAQO,SAASK,SAASA,CAAEC,KAA8C,EAAG;EAC3E,MAAM;IACLC,SAAS,GAAG,MAAM;IAClBC,QAAQ;IACRC,SAAS;IACTC,OAAO,GAAG,CAAC;IACX,GAAGC;EACJ,CAAC,GAAG,IAAAC,yBAAgB,EAAEN,KAAK,EAAE,QAAS,CAAC;EAEvC,MAAMO,KAAK,GAAG,IAAAC,wBAAiB,EAAEP,SAAS,EAAEE,SAAU,CAAC;EAEvD,MAAMM,aAAa,GAAG,IAAAC,kCAAgB,EAAER,QAAS,CAAC;EAClD,MAAMS,cAAc,GAAGF,aAAa,CAACG,GAAG,CAAE,CAAEC,KAAK,EAAEC,KAAK,KAAM;IAC7D,MAAMC,SAAS,GAAG,IAAAC,4BAAmB,EAAEH,KAAK,EAAE,CAAE,QAAQ,CAAG,CAAC;IAE5D,IAAKE,SAAS,EAAG;MAChB,MAAME,YAAY,GAAGJ,KAAqB;MAC1C,MAAMK,IAAI,GAAGD,YAAY,CAACE,GAAG,IAAI,UAAWL,KAAK,EAAG;MAEpD,oBAAO,IAAAhB,WAAA,CAAAsB,GAAA,EAACzB,KAAA,CAAA0B,QAAQ;QAACC,OAAO;QAAA,GAAmBL,YAAY,CAACjB;MAAK,GAA9BkB,IAAkC,CAAC;IACnE;IAEA,OAAOL,KAAK;EACb,CAAE,CAAC;EAEH,MAAMU,YAAY,GAAG;IACpBrB,QAAQ,EAAES,cAAc;IACxBR,SAAS;IACTqB,OAAO,EAAE,QAAQ;IACjB,GAAGjB,KAAK;IACR,GAAGF,UAAU;IACboB,GAAG,EAAErB;EACN,CAAC;;EAED;EACA,MAAM;IAAEsB,QAAQ;IAAE,GAAGC;EAAU,CAAC,GAAG,IAAAC,aAAO,EAAEL,YAAa,CAAC;EAE1D,OAAOI,SAAS;AACjB","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_compose","_keycodes","_jsxRuntime","defaultShortcuts","previous","modifier","character","next","useNavigateRegions","shortcuts","ref","useRef","isFocusingRegions","setIsFocusingRegions","useState","focusRegion","offset","_ref$current$querySel","regions","Array","from","current","querySelectorAll","length","nextRegion","wrappingRegion","ownerDocument","activeElement","closest","selectedIndex","indexOf","nextIndex","focus","clickRef","useRefEffect","element","onClick","addEventListener","removeEventListener","useMergeRefs","className","onKeyDown","event","some","isKeyboardEvent","_default","exports","default","createHigherOrderComponent","Component","props","jsx","children"],"sources":["@wordpress/components/src/higher-order/navigate-regions/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useRef } from '@wordpress/element';\nimport {\n\tcreateHigherOrderComponent,\n\tuseRefEffect,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\nimport type { WPKeycodeModifier } from '@wordpress/keycodes';\n\nconst defaultShortcuts = {\n\tprevious: [\n\t\t{\n\t\t\tmodifier: 'ctrlShift',\n\t\t\tcharacter: '`',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'ctrlShift',\n\t\t\tcharacter: '~',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'p',\n\t\t},\n\t] as const,\n\tnext: [\n\t\t{\n\t\t\tmodifier: 'ctrl',\n\t\t\tcharacter: '`',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'n',\n\t\t},\n\t] as const,\n};\n\ntype Shortcuts = {\n\tprevious: readonly { modifier: WPKeycodeModifier; character: string }[];\n\tnext: readonly { modifier: WPKeycodeModifier; character: string }[];\n};\n\nexport function useNavigateRegions( shortcuts: Shortcuts = defaultShortcuts ) {\n\tconst ref = useRef< HTMLDivElement >( null );\n\tconst [ isFocusingRegions, setIsFocusingRegions ] = useState( false );\n\n\tfunction focusRegion( offset: number ) {\n\t\tconst regions = Array.from(\n\t\t\tref.current?.querySelectorAll< HTMLElement >(\n\t\t\t\t'[role=\"region\"][tabindex=\"-1\"]'\n\t\t\t) ?? []\n\t\t);\n\t\tif ( ! regions.length ) {\n\t\t\treturn;\n\t\t}\n\t\tlet nextRegion = regions[ 0 ];\n\t\t// Based off the current element, use closest to determine the wrapping region since this operates up the DOM. Also, match tabindex to avoid edge cases with regions we do not want.\n\t\tconst wrappingRegion =\n\t\t\tref.current?.ownerDocument?.activeElement?.closest< HTMLElement >(\n\t\t\t\t'[role=\"region\"][tabindex=\"-1\"]'\n\t\t\t);\n\t\tconst selectedIndex = wrappingRegion\n\t\t\t? regions.indexOf( wrappingRegion )\n\t\t\t: -1;\n\t\tif ( selectedIndex !== -1 ) {\n\t\t\tlet nextIndex = selectedIndex + offset;\n\t\t\tnextIndex = nextIndex === -1 ? regions.length - 1 : nextIndex;\n\t\t\tnextIndex = nextIndex === regions.length ? 0 : nextIndex;\n\t\t\tnextRegion = regions[ nextIndex ];\n\t\t}\n\n\t\tnextRegion.focus();\n\t\tsetIsFocusingRegions( true );\n\t}\n\n\tconst clickRef = useRefEffect(\n\t\t( element ) => {\n\t\t\tfunction onClick() {\n\t\t\t\tsetIsFocusingRegions( false );\n\t\t\t}\n\n\t\t\telement.addEventListener( 'click', onClick );\n\n\t\t\treturn () => {\n\t\t\t\telement.removeEventListener( 'click', onClick );\n\t\t\t};\n\t\t},\n\t\t[ setIsFocusingRegions ]\n\t);\n\n\treturn {\n\t\tref: useMergeRefs( [ ref, clickRef ] ),\n\t\tclassName: isFocusingRegions ? 'is-focusing-regions' : '',\n\t\tonKeyDown( event: React.KeyboardEvent< HTMLDivElement > ) {\n\t\t\tif (\n\t\t\t\tshortcuts.previous.some( ( { modifier, character } ) => {\n\t\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\tfocusRegion( -1 );\n\t\t\t} else if (\n\t\t\t\tshortcuts.next.some( ( { modifier, character } ) => {\n\t\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\tfocusRegion( 1 );\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * `navigateRegions` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html)\n * adding keyboard navigation to switch between the different DOM elements marked as \"regions\" (role=\"region\").\n * These regions should be focusable (By adding a tabIndex attribute for example). For better accessibility,\n * these elements must be properly labelled to briefly describe the purpose of the content in the region.\n * For more details, see \"Landmark Roles\" in the [WAI-ARIA specification](https://www.w3.org/TR/wai-aria/)\n * and \"Landmark Regions\" in the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/).\n *\n * ```jsx\n * import { navigateRegions } from '@wordpress/components';\n *\n * const MyComponentWithNavigateRegions = navigateRegions( () => (\n * \t<div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Header\">\n * \t\t\tHeader\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Content\">\n * \t\t\tContent\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Sidebar\">\n * \t\t\tSidebar\n * \t\t</div>\n * \t</div>\n * ) );\n * ```\n */\nexport default createHigherOrderComponent(\n\t( Component ) =>\n\t\t( { shortcuts, ...props } ) => (\n\t\t\t<div { ...useNavigateRegions( shortcuts ) }>\n\t\t\t\t<Component { ...props } />\n\t\t\t</div>\n\t\t),\n\t'navigateRegions'\n);\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,SAAA,GAAAF,OAAA;AAAsD,IAAAG,WAAA,GAAAH,OAAA;AATtD;AACA;AACA;;AAUA,MAAMI,gBAAgB,GAAG;EACxBC,QAAQ,EAAE,CACT;IACCC,QAAQ,EAAE,WAAW;IACrBC,SAAS,EAAE;EACZ,CAAC,EACD;IACCD,QAAQ,EAAE,WAAW;IACrBC,SAAS,EAAE;EACZ,CAAC,EACD;IACCD,QAAQ,EAAE,QAAQ;IAClBC,SAAS,EAAE;EACZ,CAAC,CACQ;EACVC,IAAI,EAAE,CACL;IACCF,QAAQ,EAAE,MAAM;IAChBC,SAAS,EAAE;EACZ,CAAC,EACD;IACCD,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AAM,CAAC,kBACxB,IAAAhD,WAAA,CAAAiD,GAAA;EAAA,GAAU3C,kBAAkB,CAAEC,SAAU,CAAC;EAAA2C,QAAA,eACxC,IAAAlD,WAAA,CAAAiD,GAAA,EAACF,SAAS;IAAA,GAAMC;EAAK,CAAI;AAAC,CACtB,CACL,EACF,iBACD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_compose","_keycodes","_jsxRuntime","defaultShortcuts","previous","modifier","character","next","useNavigateRegions","shortcuts","ref","useRef","isFocusingRegions","setIsFocusingRegions","useState","focusRegion","offset","_ref$current$querySel","regions","Array","from","current","querySelectorAll","length","nextRegion","wrappingRegion","ownerDocument","activeElement","closest","selectedIndex","indexOf","nextIndex","focus","clickRef","useRefEffect","element","onClick","addEventListener","removeEventListener","useMergeRefs","className","onKeyDown","event","some","isKeyboardEvent","_default","exports","default","createHigherOrderComponent","Component","props","jsx","children"],"sources":["@wordpress/components/src/higher-order/navigate-regions/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState, useRef } from '@wordpress/element';\nimport {\n\tcreateHigherOrderComponent,\n\tuseRefEffect,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { isKeyboardEvent } from '@wordpress/keycodes';\nimport type { WPKeycodeModifier } from '@wordpress/keycodes';\n\nconst defaultShortcuts = {\n\tprevious: [\n\t\t{\n\t\t\tmodifier: 'ctrlShift',\n\t\t\tcharacter: '`',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'ctrlShift',\n\t\t\tcharacter: '~',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'p',\n\t\t},\n\t] as const,\n\tnext: [\n\t\t{\n\t\t\tmodifier: 'ctrl',\n\t\t\tcharacter: '`',\n\t\t},\n\t\t{\n\t\t\tmodifier: 'access',\n\t\t\tcharacter: 'n',\n\t\t},\n\t] as const,\n};\n\ntype Shortcuts = {\n\tprevious: readonly { modifier: WPKeycodeModifier; character: string }[];\n\tnext: readonly { modifier: WPKeycodeModifier; character: string }[];\n};\n\nexport function useNavigateRegions( shortcuts: Shortcuts = defaultShortcuts ) {\n\tconst ref = useRef< HTMLDivElement >( null );\n\tconst [ isFocusingRegions, setIsFocusingRegions ] = useState( false );\n\n\tfunction focusRegion( offset: number ) {\n\t\tconst regions = Array.from(\n\t\t\tref.current?.querySelectorAll< HTMLElement >(\n\t\t\t\t'[role=\"region\"][tabindex=\"-1\"]'\n\t\t\t) ?? []\n\t\t);\n\t\tif ( ! regions.length ) {\n\t\t\treturn;\n\t\t}\n\t\tlet nextRegion = regions[ 0 ];\n\t\t// Based off the current element, use closest to determine the wrapping region since this operates up the DOM. Also, match tabindex to avoid edge cases with regions we do not want.\n\t\tconst wrappingRegion =\n\t\t\tref.current?.ownerDocument?.activeElement?.closest< HTMLElement >(\n\t\t\t\t'[role=\"region\"][tabindex=\"-1\"]'\n\t\t\t);\n\t\tconst selectedIndex = wrappingRegion\n\t\t\t? regions.indexOf( wrappingRegion )\n\t\t\t: -1;\n\t\tif ( selectedIndex !== -1 ) {\n\t\t\tlet nextIndex = selectedIndex + offset;\n\t\t\tnextIndex = nextIndex === -1 ? regions.length - 1 : nextIndex;\n\t\t\tnextIndex = nextIndex === regions.length ? 0 : nextIndex;\n\t\t\tnextRegion = regions[ nextIndex ];\n\t\t}\n\n\t\tnextRegion.focus();\n\t\tsetIsFocusingRegions( true );\n\t}\n\n\tconst clickRef = useRefEffect(\n\t\t( element ) => {\n\t\t\tfunction onClick() {\n\t\t\t\tsetIsFocusingRegions( false );\n\t\t\t}\n\n\t\t\telement.addEventListener( 'click', onClick );\n\n\t\t\treturn () => {\n\t\t\t\telement.removeEventListener( 'click', onClick );\n\t\t\t};\n\t\t},\n\t\t[ setIsFocusingRegions ]\n\t);\n\n\treturn {\n\t\tref: useMergeRefs( [ ref, clickRef ] ),\n\t\tclassName: isFocusingRegions ? 'is-focusing-regions' : '',\n\t\tonKeyDown( event: React.KeyboardEvent< HTMLDivElement > ) {\n\t\t\tif (\n\t\t\t\tshortcuts.previous.some( ( { modifier, character } ) => {\n\t\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\tfocusRegion( -1 );\n\t\t\t} else if (\n\t\t\t\tshortcuts.next.some( ( { modifier, character } ) => {\n\t\t\t\t\treturn isKeyboardEvent[ modifier ]( event, character );\n\t\t\t\t} )\n\t\t\t) {\n\t\t\t\tfocusRegion( 1 );\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * `navigateRegions` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html)\n * adding keyboard navigation to switch between the different DOM elements marked as \"regions\" (role=\"region\").\n * These regions should be focusable (By adding a tabIndex attribute for example). For better accessibility,\n * these elements must be properly labelled to briefly describe the purpose of the content in the region.\n * For more details, see \"Landmark Roles\" in the [WAI-ARIA specification](https://www.w3.org/TR/wai-aria/)\n * and \"Landmark Regions\" in the [ARIA Authoring Practices Guide](https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/).\n *\n * ```jsx\n * import { navigateRegions } from '@wordpress/components';\n *\n * const MyComponentWithNavigateRegions = navigateRegions( () => (\n * \t<div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Header\">\n * \t\t\tHeader\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Content\">\n * \t\t\tContent\n * \t\t</div>\n * \t\t<div role=\"region\" tabIndex=\"-1\" aria-label=\"Sidebar\">\n * \t\t\tSidebar\n * \t\t</div>\n * \t</div>\n * ) );\n * ```\n */\nexport default createHigherOrderComponent(\n\t( Component ) =>\n\t\t( { shortcuts, ...props } ) => (\n\t\t\t<div { ...useNavigateRegions( shortcuts ) }>\n\t\t\t\t<Component { ...props } />\n\t\t\t</div>\n\t\t),\n\t'navigateRegions'\n);\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AA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;QACnD,OAAOsC,yBAAe,CAAEvC,QAAQ,CAAE,CAAEqC,KAAK,EAAEpC,SAAU,CAAC;MACvD,CAAE,CAAC,EACF;QACDS,WAAW,CAAE,CAAE,CAAC;MACjB;IACD;EACD,CAAC;AACF;;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;AAzBA,IAAA8B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GA0Be,IAAAC,mCAA0B,EACtCC,SAAS,IACV,CAAE;EAAExC,SAAS;EAAE,GAAGyC;AAAM,CAAC,kBACxB,IAAAhD,WAAA,CAAAiD,GAAA;EAAA,GAAU3C,kBAAkB,CAAEC,SAAU,CAAC;EAAA2C,QAAA,eACxC,IAAAlD,WAAA,CAAAiD,GAAA,EAACF,SAAS;IAAA,GAAMC;EAAK,CAAI;AAAC,CACtB,CACL,EACF,iBACD,CAAC","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_es","_interopRequireDefault","require","_element","_compose","_jsxRuntime","_default","mapNodeToProps","createHigherOrderComponent","WrappedComponent","Component","constructor","props","nodeRef","node","state","fallbackStyles","undefined","grabStylesCompleted","bindRef","bind","componentDidMount","grabFallbackStyles","componentDidUpdate","newFallbackStyles","fastDeepEqual","setState","Object","values","every","Boolean","render","wrappedComponent","jsx","jsxs","ref","children","exports","default"],"sources":["@wordpress/components/src/higher-order/with-fallback-styles/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\ntype Props = {\n\tnode?: HTMLElement;\n\t[ key: string ]: any;\n};\n\ntype State = {\n\tfallbackStyles?: { [ key: string ]: any };\n\tgrabStylesCompleted: boolean;\n};\n\nexport default (\n\tmapNodeToProps: (\n\t\tnode: HTMLElement,\n\t\tprops: Props\n\t) => { [ key: string ]: any }\n) =>\n\tcreateHigherOrderComponent( ( WrappedComponent ) => {\n\t\treturn class extends Component< Props, State > {\n\t\t\tnodeRef?: HTMLElement;\n\n\t\t\tconstructor( props: Props ) {\n\t\t\t\tsuper( props );\n\t\t\t\tthis.nodeRef = this.props.node;\n\t\t\t\tthis.state = {\n\t\t\t\t\tfallbackStyles: undefined,\n\t\t\t\t\tgrabStylesCompleted: false,\n\t\t\t\t};\n\n\t\t\t\tthis.bindRef = this.bindRef.bind( this );\n\t\t\t}\n\n\t\t\tbindRef( node: HTMLDivElement ) {\n\t\t\t\tif ( ! node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.nodeRef = node;\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tcomponentDidUpdate() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tgrabFallbackStyles() {\n\t\t\t\tconst { grabStylesCompleted, fallbackStyles } = this.state;\n\t\t\t\tif ( this.nodeRef && ! grabStylesCompleted ) {\n\t\t\t\t\tconst newFallbackStyles = mapNodeToProps(\n\t\t\t\t\t\tthis.nodeRef,\n\t\t\t\t\t\tthis.props\n\t\t\t\t\t);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! fastDeepEqual( newFallbackStyles, fallbackStyles )\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.setState( {\n\t\t\t\t\t\t\tfallbackStyles: newFallbackStyles,\n\t\t\t\t\t\t\tgrabStylesCompleted:\n\t\t\t\t\t\t\t\tObject.values( newFallbackStyles ).every(\n\t\t\t\t\t\t\t\t\tBoolean\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\tconst wrappedComponent = (\n\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t{ ...this.props }\n\t\t\t\t\t\t{ ...this.state.fallbackStyles }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\treturn this.props.node ? (\n\t\t\t\t\twrappedComponent\n\t\t\t\t) : (\n\t\t\t\t\t<div ref={ this.bindRef }> { wrappedComponent } </div>\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}, 'withFallbackStyles' );\n"],"mappings":";;;;;;;AAGA,IAAAA,GAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAAgE,IAAAG,WAAA,GAAAH,OAAA;AAThE;AACA;AACA;AAGA;AACA;AACA;AAFA,IAAAI,QAAA,GAiBCC,cAG6B,IAE7B,IAAAC,mCAA0B,EAAIC,gBAAgB,IAAM;EACnD,OAAO,cAAcC,kBAAS,CAAiB;IAG9CC,WAAWA,CAAEC,KAAY,EAAG;MAC3B,KAAK,CAAEA,KAAM,CAAC;MACd,IAAI,CAACC,OAAO,GAAG,IAAI,CAACD,KAAK,CAACE,IAAI;MAC9B,IAAI,CAACC,KAAK,GAAG;QACZC,cAAc,EAAEC,SAAS;QACzBC,mBAAmB,EAAE;MACtB,CAAC;MAED,IAAI,CAACC,OAAO,GAAG,IAAI,CAACA,OAAO,CAACC,IAAI,CAAE,IAAK,CAAC;IACzC;IAEAD,OAAOA,CAAEL,IAAoB,EAAG;MAC/B,IAAK,CAAEA,IAAI,EAAG;QACb;MACD;MACA,IAAI,CAACD,OAAO,GAAGC,IAAI;IACpB;IAEAO,iBAAiBA,CAAA,EAAG;MACnB,IAAI,CAACC,kBAAkB,CAAC,CAAC;IAC1B;IAEAC,kBAAkBA,CAAA,EAAG;MACpB,IAAI,CAACD,kBAAkB,CAAC,CAAC;IAC1B;IAEAA,kBAAkBA,CAAA,EAAG;MACpB,MAAM;QAAEJ,mBAAmB;QAAEF;MAAe,CAAC,GAAG,IAAI,CAACD,KAAK;MAC1D,IAAK,IAAI,CAACF,OAAO,IAAI,CAAEK,mBAAmB,EAAG;QAC5C,MAAMM,iBAAiB,GAAGjB,cAAc,CACvC,IAAI,CAACM,OAAO,EACZ,IAAI,CAACD,KACN,CAAC;QAED,IACC,CAAE,IAAAa,WAAa,EAAED,iBAAiB,EAAER,cAAe,CAAC,EACnD;UACD,IAAI,CAACU,QAAQ,CAAE;YACdV,cAAc,EAAEQ,iBAAiB;YACjCN,mBAAmB,EAClBS,MAAM,CAACC,MAAM,CAAEJ,iBAAkB,CAAC,CAACK,KAAK,CACvCC,OACD;UACF,CAAE,CAAC;QACJ;MACD;IACD;IAEAC,MAAMA,CAAA,EAAG;MACR,MAAMC,gBAAgB,gBACrB,IAAA3B,WAAA,CAAA4B,GAAA,EAACxB,gBAAgB;QAAA,GACX,IAAI,CAACG,KAAK;QAAA,GACV,IAAI,CAACG,KAAK,CAACC;MAAc,CAC9B,CACD;MACD,OAAO,IAAI,CAACJ,KAAK,CAACE,IAAI,GACrBkB,gBAAgB,gBAEhB,IAAA3B,WAAA,CAAA6B,IAAA;QAAKC,GAAG,EAAG,IAAI,CAAChB,OAAS;QAAAiB,QAAA,GAAC,GAAC,EAAEJ,gBAAgB,EAAE,GAAC;MAAA,CAAK,CACrD;IACF;EACD,CAAC;AACF,CAAC,EAAE,oBAAqB,CAAC;AAAAK,OAAA,CAAAC,OAAA,GAAAhC,QAAA","ignoreList":[]}
1
+ {"version":3,"names":["_es","_interopRequireDefault","require","_element","_compose","_jsxRuntime","_default","mapNodeToProps","createHigherOrderComponent","WrappedComponent","Component","constructor","props","nodeRef","node","state","fallbackStyles","undefined","grabStylesCompleted","bindRef","bind","componentDidMount","grabFallbackStyles","componentDidUpdate","newFallbackStyles","fastDeepEqual","setState","Object","values","every","Boolean","render","wrappedComponent","jsx","jsxs","ref","children","exports","default"],"sources":["@wordpress/components/src/higher-order/with-fallback-styles/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport fastDeepEqual from 'fast-deep-equal/es6';\n\n/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\ntype Props = {\n\tnode?: HTMLElement;\n\t[ key: string ]: any;\n};\n\ntype State = {\n\tfallbackStyles?: { [ key: string ]: any };\n\tgrabStylesCompleted: boolean;\n};\n\nexport default (\n\tmapNodeToProps: (\n\t\tnode: HTMLElement,\n\t\tprops: Props\n\t) => { [ key: string ]: any }\n) =>\n\tcreateHigherOrderComponent( ( WrappedComponent ) => {\n\t\treturn class extends Component< Props, State > {\n\t\t\tnodeRef?: HTMLElement;\n\n\t\t\tconstructor( props: Props ) {\n\t\t\t\tsuper( props );\n\t\t\t\tthis.nodeRef = this.props.node;\n\t\t\t\tthis.state = {\n\t\t\t\t\tfallbackStyles: undefined,\n\t\t\t\t\tgrabStylesCompleted: false,\n\t\t\t\t};\n\n\t\t\t\tthis.bindRef = this.bindRef.bind( this );\n\t\t\t}\n\n\t\t\tbindRef( node: HTMLDivElement ) {\n\t\t\t\tif ( ! node ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.nodeRef = node;\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tcomponentDidUpdate() {\n\t\t\t\tthis.grabFallbackStyles();\n\t\t\t}\n\n\t\t\tgrabFallbackStyles() {\n\t\t\t\tconst { grabStylesCompleted, fallbackStyles } = this.state;\n\t\t\t\tif ( this.nodeRef && ! grabStylesCompleted ) {\n\t\t\t\t\tconst newFallbackStyles = mapNodeToProps(\n\t\t\t\t\t\tthis.nodeRef,\n\t\t\t\t\t\tthis.props\n\t\t\t\t\t);\n\n\t\t\t\t\tif (\n\t\t\t\t\t\t! fastDeepEqual( newFallbackStyles, fallbackStyles )\n\t\t\t\t\t) {\n\t\t\t\t\t\tthis.setState( {\n\t\t\t\t\t\t\tfallbackStyles: newFallbackStyles,\n\t\t\t\t\t\t\tgrabStylesCompleted:\n\t\t\t\t\t\t\t\tObject.values( newFallbackStyles ).every(\n\t\t\t\t\t\t\t\t\tBoolean\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t} );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\tconst wrappedComponent = (\n\t\t\t\t\t<WrappedComponent\n\t\t\t\t\t\t{ ...this.props }\n\t\t\t\t\t\t{ ...this.state.fallbackStyles }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t\treturn this.props.node ? (\n\t\t\t\t\twrappedComponent\n\t\t\t\t) : (\n\t\t\t\t\t<div ref={ this.bindRef }> { wrappedComponent } </div>\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\t}, 'withFallbackStyles' );\n"],"mappings":";;;;;;;;AAGA,IAAAA,GAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAAgE,IAAAG,WAAA,GAAAH,OAAA;AAThE;AACA;AACA;AAGA;AACA;AACA;AAFA,IAAAI,QAAA,GAiBCC,cAG6B,IAE7B,IAAAC,mCAA0B,EAAIC,gBAAgB,IAAM;EACnD,OAAO,cAAcC,kBAAS,CAAiB;IAG9CC,WAAWA,CAAEC,KAAY,EAAG;MAC3B,KAAK,CAAEA,KAAM,CAAC;MACd,IAAI,CAACC,OAAO,GAAG,IAAI,CAACD,KAAK,CAACE,IAAI;MAC9B,IAAI,CAACC,KAAK,GAAG;QACZC,cAAc,EAAEC,SAAS;QACzBC,mBAAmB,EAAE;MACtB,CAAC;MAED,IAAI,CAACC,OAAO,GAAG,IAAI,CAACA,OAAO,CAACC,IAAI,CAAE,IAAK,CAAC;IACzC;IAEAD,OAAOA,CAAEL,IAAoB,EAAG;MAC/B,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
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_hooks","_compose","_jsxRuntime","ANIMATION_FRAME_PERIOD","withFilters","hookName","createHigherOrderComponent","OriginalComponent","namespace","FilteredComponent","ensureFilteredComponent","undefined","applyFilters","FilteredComponentRenderer","Component","constructor","props","componentDidMount","instances","push","length","addAction","onHooksUpdated","componentWillUnmount","filter","instance","removeAction","render","jsx","throttledForceUpdate","debounce","forEach","forceUpdate","updatedHookName"],"sources":["@wordpress/components/src/higher-order/with-filters/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { addAction, applyFilters, removeAction } from '@wordpress/hooks';\nimport { createHigherOrderComponent, debounce } from '@wordpress/compose';\n\nconst ANIMATION_FRAME_PERIOD = 16;\n\n/**\n * Creates a higher-order component which adds filtering capability to the\n * wrapped component. Filters get applied when the original component is about\n * to be mounted. When a filter is added or removed that matches the hook name,\n * the wrapped component re-renders.\n *\n * @param hookName Hook name exposed to be used by filters.\n *\n * @return Higher-order component factory.\n *\n * ```jsx\n * import { withFilters } from '@wordpress/components';\n * import { addFilter } from '@wordpress/hooks';\n *\n * const MyComponent = ( { title } ) => <h1>{ title }</h1>;\n *\n * const ComponentToAppend = () => <div>Appended component</div>;\n *\n * function withComponentAppended( FilteredComponent ) {\n * \treturn ( props ) => (\n * \t\t<>\n * \t\t\t<FilteredComponent { ...props } />\n * \t\t\t<ComponentToAppend />\n * \t\t</>\n * \t);\n * }\n *\n * addFilter(\n * \t'MyHookName',\n * \t'my-plugin/with-component-appended',\n * \twithComponentAppended\n * );\n *\n * const MyComponentWithFilters = withFilters( 'MyHookName' )( MyComponent );\n * ```\n */\nexport default function withFilters( hookName: string ) {\n\treturn createHigherOrderComponent( ( OriginalComponent ) => {\n\t\tconst namespace = 'core/with-filters/' + hookName;\n\n\t\t/**\n\t\t * The component definition with current filters applied. Each instance\n\t\t * reuse this shared reference as an optimization to avoid excessive\n\t\t * calls to `applyFilters` when many instances exist.\n\t\t */\n\t\tlet FilteredComponent: React.ComponentType;\n\n\t\t/**\n\t\t * Initializes the FilteredComponent variable once, if not already\n\t\t * assigned. Subsequent calls are effectively a noop.\n\t\t */\n\t\tfunction ensureFilteredComponent() {\n\t\t\tif ( FilteredComponent === undefined ) {\n\t\t\t\tFilteredComponent = applyFilters(\n\t\t\t\t\thookName,\n\t\t\t\t\tOriginalComponent\n\t\t\t\t) as React.ComponentType;\n\t\t\t}\n\t\t}\n\n\t\tclass FilteredComponentRenderer extends Component {\n\t\t\tstatic instances: FilteredComponentRenderer[];\n\n\t\t\tconstructor( props: { [ key: string ]: any } ) {\n\t\t\t\tsuper( props );\n\n\t\t\t\tensureFilteredComponent();\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tFilteredComponentRenderer.instances.push( this );\n\n\t\t\t\t// If there were previously no mounted instances for components\n\t\t\t\t// filtered on this hook, add the hook handler.\n\t\t\t\tif ( FilteredComponentRenderer.instances.length === 1 ) {\n\t\t\t\t\taddAction( 'hookRemoved', namespace, onHooksUpdated );\n\t\t\t\t\taddAction( 'hookAdded', namespace, onHooksUpdated );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcomponentWillUnmount() {\n\t\t\t\tFilteredComponentRenderer.instances =\n\t\t\t\t\tFilteredComponentRenderer.instances.filter(\n\t\t\t\t\t\t( instance ) => instance !== this\n\t\t\t\t\t);\n\n\t\t\t\t// If this was the last of the mounted components filtered on\n\t\t\t\t// this hook, remove the hook handler.\n\t\t\t\tif ( FilteredComponentRenderer.instances.length === 0 ) {\n\t\t\t\t\tremoveAction( 'hookRemoved', namespace );\n\t\t\t\t\tremoveAction( 'hookAdded', namespace );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\treturn <FilteredComponent { ...this.props } />;\n\t\t\t}\n\t\t}\n\n\t\tFilteredComponentRenderer.instances = [];\n\n\t\t/**\n\t\t * Updates the FilteredComponent definition, forcing a render for each\n\t\t * mounted instance. This occurs a maximum of once per animation frame.\n\t\t */\n\t\tconst throttledForceUpdate = debounce( () => {\n\t\t\t// Recreate the filtered component, only after delay so that it's\n\t\t\t// computed once, even if many filters added.\n\t\t\tFilteredComponent = applyFilters(\n\t\t\t\thookName,\n\t\t\t\tOriginalComponent\n\t\t\t) as React.ComponentType;\n\n\t\t\t// Force each instance to render.\n\t\t\tFilteredComponentRenderer.instances.forEach( ( instance ) => {\n\t\t\t\tinstance.forceUpdate();\n\t\t\t} );\n\t\t}, ANIMATION_FRAME_PERIOD );\n\n\t\t/**\n\t\t * When a filter is added or removed for the matching hook name, each\n\t\t * mounted instance should re-render with the new filters having been\n\t\t * applied to the original component.\n\t\t *\n\t\t * @param updatedHookName Name of the hook that was updated.\n\t\t */\n\t\tfunction onHooksUpdated( updatedHookName: string ) {\n\t\t\tif ( updatedHookName === hookName ) {\n\t\t\t\tthrottledForceUpdate();\n\t\t\t}\n\t\t}\n\n\t\treturn FilteredComponentRenderer;\n\t}, 'withFilters' );\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAA0E,IAAAG,WAAA,GAAAH,OAAA;AAL1E;AACA;AACA;;AAKA,MAAMI,sBAAsB,GAAG,EAAE;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,WAAWA,CAAEC,QAAgB,EAAG;EACvD,OAAO,IAAAC,mCAA0B,EAAIC,iBAAiB,IAAM;IAC3D,MAAMC,SAAS,GAAG,oBAAoB,GAAGH,QAAQ;;IAEjD;AACF;AACA;AACA;AACA;IACE,IAAII,iB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A;MACArB,iBAAiB,GAAG,IAAAG,mBAAY,EAC/BP,QAAQ,EACRE,iBACD,CAAwB;;MAExB;MACAM,yBAAyB,CAACK,SAAS,CAACa,OAAO,CAAIN,QAAQ,IAAM;QAC5DA,QAAQ,CAACO,WAAW,CAAC,CAAC;MACvB,CAAE,CAAC;IACJ,CAAC,EAAE7B,sBAAuB,CAAC;;IAE3B;AACF;AACA;AACA;AACA;AACA;AACA;IACE,SAASmB,cAAcA,CAAEW,eAAuB,EAAG;MAClD,IAAKA,eAAe,KAAK5B,QAAQ,EAAG;QACnCwB,oBAAoB,CAAC,CAAC;MACvB;IACD;IAEA,OAAOhB,yBAAyB;EACjC,CAAC,EAAE,aAAc,CAAC;AACnB","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_hooks","_compose","_jsxRuntime","ANIMATION_FRAME_PERIOD","withFilters","hookName","createHigherOrderComponent","OriginalComponent","namespace","FilteredComponent","ensureFilteredComponent","undefined","applyFilters","FilteredComponentRenderer","Component","constructor","props","componentDidMount","instances","push","length","addAction","onHooksUpdated","componentWillUnmount","filter","instance","removeAction","render","jsx","throttledForceUpdate","debounce","forEach","forceUpdate","updatedHookName"],"sources":["@wordpress/components/src/higher-order/with-filters/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Component } from '@wordpress/element';\nimport { addAction, applyFilters, removeAction } from '@wordpress/hooks';\nimport { createHigherOrderComponent, debounce } from '@wordpress/compose';\n\nconst ANIMATION_FRAME_PERIOD = 16;\n\n/**\n * Creates a higher-order component which adds filtering capability to the\n * wrapped component. Filters get applied when the original component is about\n * to be mounted. When a filter is added or removed that matches the hook name,\n * the wrapped component re-renders.\n *\n * @param hookName Hook name exposed to be used by filters.\n *\n * @return Higher-order component factory.\n *\n * ```jsx\n * import { withFilters } from '@wordpress/components';\n * import { addFilter } from '@wordpress/hooks';\n *\n * const MyComponent = ( { title } ) => <h1>{ title }</h1>;\n *\n * const ComponentToAppend = () => <div>Appended component</div>;\n *\n * function withComponentAppended( FilteredComponent ) {\n * \treturn ( props ) => (\n * \t\t<>\n * \t\t\t<FilteredComponent { ...props } />\n * \t\t\t<ComponentToAppend />\n * \t\t</>\n * \t);\n * }\n *\n * addFilter(\n * \t'MyHookName',\n * \t'my-plugin/with-component-appended',\n * \twithComponentAppended\n * );\n *\n * const MyComponentWithFilters = withFilters( 'MyHookName' )( MyComponent );\n * ```\n */\nexport default function withFilters( hookName: string ) {\n\treturn createHigherOrderComponent( ( OriginalComponent ) => {\n\t\tconst namespace = 'core/with-filters/' + hookName;\n\n\t\t/**\n\t\t * The component definition with current filters applied. Each instance\n\t\t * reuse this shared reference as an optimization to avoid excessive\n\t\t * calls to `applyFilters` when many instances exist.\n\t\t */\n\t\tlet FilteredComponent: React.ComponentType;\n\n\t\t/**\n\t\t * Initializes the FilteredComponent variable once, if not already\n\t\t * assigned. Subsequent calls are effectively a noop.\n\t\t */\n\t\tfunction ensureFilteredComponent() {\n\t\t\tif ( FilteredComponent === undefined ) {\n\t\t\t\tFilteredComponent = applyFilters(\n\t\t\t\t\thookName,\n\t\t\t\t\tOriginalComponent\n\t\t\t\t) as React.ComponentType;\n\t\t\t}\n\t\t}\n\n\t\tclass FilteredComponentRenderer extends Component {\n\t\t\tstatic instances: FilteredComponentRenderer[];\n\n\t\t\tconstructor( props: { [ key: string ]: any } ) {\n\t\t\t\tsuper( props );\n\n\t\t\t\tensureFilteredComponent();\n\t\t\t}\n\n\t\t\tcomponentDidMount() {\n\t\t\t\tFilteredComponentRenderer.instances.push( this );\n\n\t\t\t\t// If there were previously no mounted instances for components\n\t\t\t\t// filtered on this hook, add the hook handler.\n\t\t\t\tif ( FilteredComponentRenderer.instances.length === 1 ) {\n\t\t\t\t\taddAction( 'hookRemoved', namespace, onHooksUpdated );\n\t\t\t\t\taddAction( 'hookAdded', namespace, onHooksUpdated );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tcomponentWillUnmount() {\n\t\t\t\tFilteredComponentRenderer.instances =\n\t\t\t\t\tFilteredComponentRenderer.instances.filter(\n\t\t\t\t\t\t( instance ) => instance !== this\n\t\t\t\t\t);\n\n\t\t\t\t// If this was the last of the mounted components filtered on\n\t\t\t\t// this hook, remove the hook handler.\n\t\t\t\tif ( FilteredComponentRenderer.instances.length === 0 ) {\n\t\t\t\t\tremoveAction( 'hookRemoved', namespace );\n\t\t\t\t\tremoveAction( 'hookAdded', namespace );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\trender() {\n\t\t\t\treturn <FilteredComponent { ...this.props } />;\n\t\t\t}\n\t\t}\n\n\t\tFilteredComponentRenderer.instances = [];\n\n\t\t/**\n\t\t * Updates the FilteredComponent definition, forcing a render for each\n\t\t * mounted instance. This occurs a maximum of once per animation frame.\n\t\t */\n\t\tconst throttledForceUpdate = debounce( () => {\n\t\t\t// Recreate the filtered component, only after delay so that it's\n\t\t\t// computed once, even if many filters added.\n\t\t\tFilteredComponent = applyFilters(\n\t\t\t\thookName,\n\t\t\t\tOriginalComponent\n\t\t\t) as React.ComponentType;\n\n\t\t\t// Force each instance to render.\n\t\t\tFilteredComponentRenderer.instances.forEach( ( instance ) => {\n\t\t\t\tinstance.forceUpdate();\n\t\t\t} );\n\t\t}, ANIMATION_FRAME_PERIOD );\n\n\t\t/**\n\t\t * When a filter is added or removed for the matching hook name, each\n\t\t * mounted instance should re-render with the new filters having been\n\t\t * applied to the original component.\n\t\t *\n\t\t * @param updatedHookName Name of the hook that was updated.\n\t\t */\n\t\tfunction onHooksUpdated( updatedHookName: string ) {\n\t\t\tif ( updatedHookName === hookName ) {\n\t\t\t\tthrottledForceUpdate();\n\t\t\t}\n\t\t}\n\n\t\treturn FilteredComponentRenderer;\n\t}, 'withFilters' );\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAA0E,IAAAG,WAAA,GAAAH,OAAA;AAL1E;AACA;AACA;;AAKA,MA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;UACvD,IAAAM,mBAAY,EAAE,aAAa,EAAElB,SAAU,CAAC;UACxC,IAAAkB,mBAAY,EAAE,WAAW,EAAElB,SAAU,CAAC;QACvC;MACD;MAEAmB,MAAMA,CAAA,EAAG;QACR,oBAAO,IAAAzB,WAAA,CAAA0B,GAAA,EAACnB,iBAAiB;UAAA,GAAM,IAAI,CAACO;QAAK,CAAI,CAAC;MAC/C;IACD;IAEAH,yBAAyB,CAACK,SAAS,GAAG,EAAE;;IAExC;AACF;AACA;AACA;IACE,MAAMW,oBAAoB,GAAG,IAAAC,iBAAQ,EAAE,MAAM;MAC5C;MACA;MACArB,iBAAiB,GAAG,IAAAG,mBAAY,EAC/BP,QAAQ,EACRE,iBACD,CAAwB;;MAExB;MACAM,yBAAyB,CAACK,SAAS,CAACa,OAAO,CAAIN,QAAQ,IAAM;QAC5DA,QAAQ,CAACO,WAAW,CAAC,CAAC;MACvB,CAAE,CAAC;IACJ,CAAC,EAAE7B,sBAAuB,CAAC;;IAE3B;AACF;AACA;AACA;AACA;AACA;AACA;IACE,SAASmB,cAAcA,CAAEW,eAAuB,EAAG;MAClD,IAAKA,eAAe,KAAK5B,QAAQ,EAAG;QACnCwB,oBAAoB,CAAC,CAAC;MACvB;IACD;IAEA,OAAOhB,yBAAyB;EACjC,CAAC,EAAE,aAAc,CAAC;AACnB","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1 +1 @@
1
- {"version":3,"names":["_uuid","require","_element","_compose","_list","_interopRequireDefault","_jsxRuntime","_default","exports","default","createHigherOrderComponent","OriginalComponent","Component","props","ref","noticeList","setNoticeList","useState","noticeOperations","useMemo","createNotice","notice","noticeToAdd","id","uuid","current","createErrorNotice","msg","status","content","removeNotice","filter","removeAllNotices","propsOut","noticeUI","length","jsx","className","notices","onRemove","isForwardRef","render","forwardRef"],"sources":["@wordpress/components/src/higher-order/with-notices/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState, useMemo } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport NoticeList from '../../notice/list';\nimport type { WithNoticeProps } from './types';\n\n/**\n * Override the default edit UI to include notices if supported.\n *\n * Wrapping the original component with `withNotices` encapsulates the component\n * with the additional props `noticeOperations` and `noticeUI`.\n *\n * ```jsx\n * import { withNotices, Button } from '@wordpress/components';\n *\n * const MyComponentWithNotices = withNotices(\n * \t( { noticeOperations, noticeUI } ) => {\n * \t\tconst addError = () =>\n * \t\t\tnoticeOperations.createErrorNotice( 'Error message' );\n * \t\treturn (\n * \t\t\t<div>\n * \t\t\t\t{ noticeUI }\n * \t\t\t\t<Button variant=\"secondary\" onClick={ addError }>\n * \t\t\t\t\tAdd error\n * \t\t\t\t</Button>\n * \t\t\t</div>\n * \t\t);\n * \t}\n * );\n * ```\n *\n * @param OriginalComponent Original component.\n *\n * @return Wrapped component.\n */\nexport default createHigherOrderComponent( ( OriginalComponent ) => {\n\tfunction Component(\n\t\tprops: { [ key: string ]: any },\n\t\tref: React.ForwardedRef< any >\n\t) {\n\t\tconst [ noticeList, setNoticeList ] = useState<\n\t\t\tWithNoticeProps[ 'noticeList' ]\n\t\t>( [] );\n\n\t\tconst noticeOperations = useMemo<\n\t\t\tWithNoticeProps[ 'noticeOperations' ]\n\t\t>( () => {\n\t\t\tconst createNotice: WithNoticeProps[ 'noticeOperations' ][ 'createNotice' ] =\n\t\t\t\t( notice ) => {\n\t\t\t\t\tconst noticeToAdd = notice.id\n\t\t\t\t\t\t? notice\n\t\t\t\t\t\t: { ...notice, id: uuid() };\n\t\t\t\t\tsetNoticeList( ( current ) => [ ...current, noticeToAdd ] );\n\t\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tcreateNotice,\n\t\t\t\tcreateErrorNotice: ( msg ) => {\n\t\t\t\t\t// @ts-expect-error TODO: Missing `id`, potentially a bug\n\t\t\t\t\tcreateNotice( {\n\t\t\t\t\t\tstatus: 'error',\n\t\t\t\t\t\tcontent: msg,\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t\tremoveNotice: ( id ) => {\n\t\t\t\t\tsetNoticeList( ( current ) =>\n\t\t\t\t\t\tcurrent.filter( ( notice ) => notice.id !== id )\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tremoveAllNotices: () => {\n\t\t\t\t\tsetNoticeList( [] );\n\t\t\t\t},\n\t\t\t};\n\t\t}, [] );\n\n\t\tconst propsOut = {\n\t\t\t...props,\n\t\t\tnoticeList,\n\t\t\tnoticeOperations,\n\t\t\tnoticeUI: noticeList.length > 0 && (\n\t\t\t\t<NoticeList\n\t\t\t\t\tclassName=\"components-with-notices-ui\"\n\t\t\t\t\tnotices={ noticeList }\n\t\t\t\t\tonRemove={ noticeOperations.removeNotice }\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\treturn isForwardRef ? (\n\t\t\t<OriginalComponent { ...propsOut } ref={ ref } />\n\t\t) : (\n\t\t\t<OriginalComponent { ...propsOut } />\n\t\t);\n\t}\n\n\tlet isForwardRef: boolean;\n\t// @ts-expect-error - `render` will only be present when OriginalComponent was wrapped with forwardRef().\n\tconst { render } = OriginalComponent;\n\t// Returns a forwardRef if OriginalComponent appears to be a forwardRef.\n\tif ( typeof render === 'function' ) {\n\t\tisForwardRef = true;\n\t\treturn forwardRef( Component );\n\t}\n\treturn Component;\n}, 'withNotices' );\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAA2C,IAAAK,WAAA,GAAAL,OAAA;AAd3C;AACA;AACA;AAGA;AACA;AACA;AAIA;AACA;AACA;AAI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AG,CAAC,iBAC9B,IAAA7B,WAAA,CAAA8B,GAAA,EAAChC,KAAA,CAAAK,OAAU;QACV4B,SAAS,EAAC,4BAA4B;QACtCC,OAAO,EAAGvB,UAAY;QACtBwB,QAAQ,EAAGrB,gBAAgB,CAACY;MAAc,CAC1C;IAEH,CAAC;IAED,OAAOU,YAAY,gBAClB,IAAAlC,WAAA,CAAA8B,GAAA,EAACzB,iBAAiB;MAAA,GAAMsB,QAAQ;MAAGnB,GAAG,EAAGA;IAAK,CAAE,CAAC,gBAEjD,IAAAR,WAAA,CAAA8B,GAAA,EAACzB,iBAAiB;MAAA,GAAMsB;IAAQ,CAAI,CACpC;EACF;EAEA,IAAIO,YAAqB;EACzB;EACA,MAAM;IAAEC;EAAO,CAAC,GAAG9B,iBAAiB;EACpC;EACA,IAAK,OAAO8B,MAAM,KAAK,UAAU,EAAG;IACnCD,YAAY,GAAG,IAAI;IACnB,OAAO,IAAAE,mBAAU,EAAE9B,SAAU,CAAC;EAC/B;EACA,OAAOA,SAAS;AACjB,CAAC,EAAE,aAAc,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_uuid","require","_element","_compose","_list","_interopRequireDefault","_jsxRuntime","_default","exports","default","createHigherOrderComponent","OriginalComponent","Component","props","ref","noticeList","setNoticeList","useState","noticeOperations","useMemo","createNotice","notice","noticeToAdd","id","uuid","current","createErrorNotice","msg","status","content","removeNotice","filter","removeAllNotices","propsOut","noticeUI","length","jsx","className","notices","onRemove","isForwardRef","render","forwardRef"],"sources":["@wordpress/components/src/higher-order/with-notices/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport { v4 as uuid } from 'uuid';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useState, useMemo } from '@wordpress/element';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport NoticeList from '../../notice/list';\nimport type { WithNoticeProps } from './types';\n\n/**\n * Override the default edit UI to include notices if supported.\n *\n * Wrapping the original component with `withNotices` encapsulates the component\n * with the additional props `noticeOperations` and `noticeUI`.\n *\n * ```jsx\n * import { withNotices, Button } from '@wordpress/components';\n *\n * const MyComponentWithNotices = withNotices(\n * \t( { noticeOperations, noticeUI } ) => {\n * \t\tconst addError = () =>\n * \t\t\tnoticeOperations.createErrorNotice( 'Error message' );\n * \t\treturn (\n * \t\t\t<div>\n * \t\t\t\t{ noticeUI }\n * \t\t\t\t<Button variant=\"secondary\" onClick={ addError }>\n * \t\t\t\t\tAdd error\n * \t\t\t\t</Button>\n * \t\t\t</div>\n * \t\t);\n * \t}\n * );\n * ```\n *\n * @param OriginalComponent Original component.\n *\n * @return Wrapped component.\n */\nexport default createHigherOrderComponent( ( OriginalComponent ) => {\n\tfunction Component(\n\t\tprops: { [ key: string ]: any },\n\t\tref: React.ForwardedRef< any >\n\t) {\n\t\tconst [ noticeList, setNoticeList ] = useState<\n\t\t\tWithNoticeProps[ 'noticeList' ]\n\t\t>( [] );\n\n\t\tconst noticeOperations = useMemo<\n\t\t\tWithNoticeProps[ 'noticeOperations' ]\n\t\t>( () => {\n\t\t\tconst createNotice: WithNoticeProps[ 'noticeOperations' ][ 'createNotice' ] =\n\t\t\t\t( notice ) => {\n\t\t\t\t\tconst noticeToAdd = notice.id\n\t\t\t\t\t\t? notice\n\t\t\t\t\t\t: { ...notice, id: uuid() };\n\t\t\t\t\tsetNoticeList( ( current ) => [ ...current, noticeToAdd ] );\n\t\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tcreateNotice,\n\t\t\t\tcreateErrorNotice: ( msg ) => {\n\t\t\t\t\t// @ts-expect-error TODO: Missing `id`, potentially a bug\n\t\t\t\t\tcreateNotice( {\n\t\t\t\t\t\tstatus: 'error',\n\t\t\t\t\t\tcontent: msg,\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t\tremoveNotice: ( id ) => {\n\t\t\t\t\tsetNoticeList( ( current ) =>\n\t\t\t\t\t\tcurrent.filter( ( notice ) => notice.id !== id )\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tremoveAllNotices: () => {\n\t\t\t\t\tsetNoticeList( [] );\n\t\t\t\t},\n\t\t\t};\n\t\t}, [] );\n\n\t\tconst propsOut = {\n\t\t\t...props,\n\t\t\tnoticeList,\n\t\t\tnoticeOperations,\n\t\t\tnoticeUI: noticeList.length > 0 && (\n\t\t\t\t<NoticeList\n\t\t\t\t\tclassName=\"components-with-notices-ui\"\n\t\t\t\t\tnotices={ noticeList }\n\t\t\t\t\tonRemove={ noticeOperations.removeNotice }\n\t\t\t\t/>\n\t\t\t),\n\t\t};\n\n\t\treturn isForwardRef ? (\n\t\t\t<OriginalComponent { ...propsOut } ref={ ref } />\n\t\t) : (\n\t\t\t<OriginalComponent { ...propsOut } />\n\t\t);\n\t}\n\n\tlet isForwardRef: boolean;\n\t// @ts-expect-error - `render` will only be present when OriginalComponent was wrapped with forwardRef().\n\tconst { render } = OriginalComponent;\n\t// Returns a forwardRef if OriginalComponent appears to be a forwardRef.\n\tif ( typeof render === 'function' ) {\n\t\tisForwardRef = true;\n\t\treturn forwardRef( Component );\n\t}\n\treturn Component;\n}, 'withNotices' );\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAA2C,IAAAK,WAAA,GAAAL,OAAA;AAd3C;AACA;AACA;AAGA;AACA;AACA;AAIA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5BA,IAAAM,QAAA,GAAAC,OAAA,CAAAC,OAAA,GA6Be,IAAAC,mCAA0B,EAAIC,iBAAiB,IAAM;EACnE,SAASC,SAASA,CACjBC,KAA+B,EAC/BC,GAA8B,EAC7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;MAAGnB,GAAG,EAAGA;IAAK,CAAE,CAAC,gBAEjD,IAAAR,WAAA,CAAA8B,GAAA,EAACzB,iBAAiB;MAAA,GAAMsB;IAAQ,CAAI,CACpC;EACF;EAEA,IAAIO,YAAqB;EACzB;EACA,MAAM;IAAEC;EAAO,CAAC,GAAG9B,iBAAiB;EACpC;EACA,IAAK,OAAO8B,MAAM,KAAK,UAAU,EAAG;IACnCD,YAAY,GAAG,IAAI;IACnB,OAAO,IAAAE,mBAAU,EAAE9B,SAAU,CAAC;EAC/B;EACA,OAAOA,SAAS;AACjB,CAAC,EAAE,aAAc,CAAC","ignoreList":[]}
@@ -21,6 +21,15 @@ var _jsxRuntime = require("react/jsx-runtime");
21
21
  * Internal dependencies
22
22
  */
23
23
 
24
+ /**
25
+ * Renders a raw icon without any initial styling or wrappers.
26
+ *
27
+ * ```jsx
28
+ * import { wordpress } from '@wordpress/icons';
29
+ *
30
+ * <Icon icon={ wordpress } />
31
+ * ```
32
+ */
24
33
  function Icon({
25
34
  icon = null,
26
35
  size = 'string' === typeof icon ? 20 : 24,
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_primitives","_dashicon","_interopRequireDefault","_jsxRuntime","Icon","icon","size","additionalProps","jsx","default","isValidElement","Dashicon","type","cloneElement","createElement","SVG","appliedProps","props","width","height","_default","exports"],"sources":["@wordpress/components/src/icon/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ComponentType, HTMLProps, SVGProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneElement,\n\tcreateElement,\n\tisValidElement,\n} from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\nimport type { IconKey as DashiconIconKey } from '../dashicon/types';\n\nexport type IconType =\n\t| DashiconIconKey\n\t| ComponentType< { size?: number } >\n\t| ( ( props: { size?: number } ) => JSX.Element )\n\t| JSX.Element;\n\ninterface BaseProps {\n\t/**\n\t * The icon to render. Supported values are: Dashicons (specified as\n\t * strings), functions, Component instances and `null`.\n\t *\n\t * @default null\n\t */\n\ticon?: IconType | null;\n\t/**\n\t * The size (width and height) of the icon.\n\t *\n\t * @default `20` when a Dashicon is rendered, `24` for all other icons.\n\t */\n\tsize?: number;\n}\n\ntype AdditionalProps< T > = T extends ComponentType< infer U >\n\t? U\n\t: T extends DashiconIconKey\n\t? SVGProps< SVGSVGElement >\n\t: {};\n\nexport type Props = BaseProps & AdditionalProps< IconType >;\n\nfunction Icon( {\n\ticon = null,\n\tsize = 'string' === typeof icon ? 20 : 24,\n\t...additionalProps\n}: Props ) {\n\tif ( 'string' === typeof icon ) {\n\t\treturn (\n\t\t\t<Dashicon\n\t\t\t\ticon={ icon }\n\t\t\t\tsize={ size }\n\t\t\t\t{ ...( additionalProps as HTMLProps< HTMLSpanElement > ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isValidElement( icon ) && Dashicon === icon.type ) {\n\t\treturn cloneElement( icon, {\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( 'function' === typeof icon ) {\n\t\treturn createElement( icon, {\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( icon && ( icon.type === 'svg' || icon.type === SVG ) ) {\n\t\tconst appliedProps = {\n\t\t\t...icon.props,\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...additionalProps,\n\t\t};\n\n\t\treturn <SVG { ...appliedProps } />;\n\t}\n\n\tif ( isValidElement( icon ) ) {\n\t\treturn cloneElement( icon, {\n\t\t\t// @ts-ignore Just forwarding the size prop along\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\treturn icon;\n}\n\nexport default Icon;\n"],"mappings":";;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,IAAAI,WAAA,GAAAJ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AOF,IAAI;AACZ;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAZ,OAAA,GAEcL,IAAI","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_primitives","_dashicon","_interopRequireDefault","_jsxRuntime","Icon","icon","size","additionalProps","jsx","default","isValidElement","Dashicon","type","cloneElement","createElement","SVG","appliedProps","props","width","height","_default","exports"],"sources":["@wordpress/components/src/icon/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ComponentType, HTMLProps, SVGProps } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcloneElement,\n\tcreateElement,\n\tisValidElement,\n} from '@wordpress/element';\nimport { SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Dashicon from '../dashicon';\nimport type { IconKey as DashiconIconKey } from '../dashicon/types';\n\nexport type IconType =\n\t| DashiconIconKey\n\t| ComponentType< { size?: number } >\n\t| ( ( props: { size?: number } ) => JSX.Element )\n\t| JSX.Element;\n\ntype AdditionalProps< T > = T extends ComponentType< infer U >\n\t? U\n\t: T extends DashiconIconKey\n\t? SVGProps< SVGSVGElement >\n\t: {};\n\nexport type Props = {\n\t/**\n\t * The icon to render. In most cases, you should use an icon from\n\t * [the `@wordpress/icons` package](https://wordpress.github.io/gutenberg/?path=/story/icons-icon--library).\n\t *\n\t * Other supported values are: component instances, functions,\n\t * [Dashicons](https://developer.wordpress.org/resource/dashicons/)\n\t * (specified as strings), and `null`.\n\t *\n\t * The `size` value, as well as any other additional props, will be passed through.\n\t *\n\t * @default null\n\t */\n\ticon?: IconType | null;\n\t/**\n\t * The size (width and height) of the icon.\n\t *\n\t * Defaults to `20` when `icon` is a string (i.e. a Dashicon id), otherwise `24`.\n\t *\n\t * @default `'string' === typeof icon ? 20 : 24`.\n\t */\n\tsize?: number;\n} & AdditionalProps< IconType >;\n\n/**\n * Renders a raw icon without any initial styling or wrappers.\n *\n * ```jsx\n * import { wordpress } from '@wordpress/icons';\n *\n * <Icon icon={ wordpress } />\n * ```\n */\nfunction Icon( {\n\ticon = null,\n\tsize = 'string' === typeof icon ? 20 : 24,\n\t...additionalProps\n}: Props ) {\n\tif ( 'string' === typeof icon ) {\n\t\treturn (\n\t\t\t<Dashicon\n\t\t\t\ticon={ icon }\n\t\t\t\tsize={ size }\n\t\t\t\t{ ...( additionalProps as HTMLProps< HTMLSpanElement > ) }\n\t\t\t/>\n\t\t);\n\t}\n\n\tif ( isValidElement( icon ) && Dashicon === icon.type ) {\n\t\treturn cloneElement( icon, {\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( 'function' === typeof icon ) {\n\t\treturn createElement( icon, {\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\tif ( icon && ( icon.type === 'svg' || icon.type === SVG ) ) {\n\t\tconst appliedProps = {\n\t\t\t...icon.props,\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...additionalProps,\n\t\t};\n\n\t\treturn <SVG { ...appliedProps } />;\n\t}\n\n\tif ( isValidElement( icon ) ) {\n\t\treturn cloneElement( icon, {\n\t\t\t// @ts-ignore Just forwarding the size prop along\n\t\t\tsize,\n\t\t\t...additionalProps,\n\t\t} );\n\t}\n\n\treturn icon;\n}\n\nexport default Icon;\n"],"mappings":";;;;;;;AAQA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAKA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAmC,IAAAI,WAAA,GAAAJ,OAAA;AAlBnC;AACA;AACA;;AAGA;AACA;AACA;;AAQA;AACA;AACA;;AAwCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASK,IAAIA,CAAE;EACdC,IAAI,GAAG,IAAI;EACXC,IAAI,GAAG,QAAQ,KAAK,OAAOD,IAAI,GAAG,EAAE,GAAG,EAAE;EACzC,GAAGE;AACG,CAAC,EAAG;EACV,IAAK,QAAQ,KAAK,OAAOF,IAAI,EAAG;IAC/B,oBACC,IAAAF,WAAA,CAAAK,GAAA,EAACP,SAAA,CAAAQ,OAAQ;MACRJ,IAAI,EAAGA,IAAM;MACbC,IAAI,EAAGA,IAAM;MAAA,GACNC;IAAe,CACtB,CAAC;EAEJ;EAEA,IAAK,IAAAG,uBAAc,EAAEL,IAAK,CAAC,IAAIM,iBAAQ,KAAKN,IAAI,CAACO,IAAI,EAAG;IACvD,OAAO,IAAAC,qBAAY,EAAER,IAAI,EAAE;MAC1B,GAAGE;IACJ,CAAE,CAAC;EACJ;EAEA,IAAK,UAAU,KAAK,OAAOF,IAAI,EAAG;IACjC,OAAO,IAAAS,sBAAa,EAAET,IAAI,EAAE;MAC3BC,IAAI;MACJ,GAAGC;IACJ,CAAE,CAAC;EACJ;EAEA,IAAKF,IAAI,KAAMA,IAAI,CAACO,IAAI,KAAK,KAAK,IAAIP,IAAI,CAACO,IAAI,KAAKG,eAAG,CAAE,EAAG;IAC3D,MAAMC,YAAY,GAAG;MACpB,GAAGX,IAAI,CAACY,KAAK;MACbC,KAAK,EAAEZ,IAAI;MACXa,MAAM,EAAEb,IAAI;MACZ,GAAGC;IACJ,CAAC;IAED,oBAAO,IAAAJ,WAAA,CAAAK,GAAA,EAACR,WAAA,CAAAe,GAAG;MAAA,GAAMC;IAAY,CAAI,CAAC;EACnC;EAEA,IAAK,IAAAN,uBAAc,EAAEL,IAAK,CAAC,EAAG;IAC7B,OAAO,IAAAQ,qBAAY,EAAER,IAAI,EAAE;MAC1B;MACAC,IAAI;MACJ,GAAGC;IACJ,CAAE,CAAC;EACJ;EAEA,OAAOF,IAAI;AACZ;AAAC,IAAAe,QAAA,GAAAC,OAAA,CAAAZ,OAAA,GAEcL,IAAI","ignoreList":[]}
package/build/index.js CHANGED
@@ -1066,12 +1066,6 @@ Object.defineProperty(exports, "__unstableMotion", {
1066
1066
  return _animation.__unstableMotion;
1067
1067
  }
1068
1068
  });
1069
- Object.defineProperty(exports, "__unstableMotionContext", {
1070
- enumerable: true,
1071
- get: function () {
1072
- return _animation.__unstableMotionContext;
1073
- }
1074
- });
1075
1069
  Object.defineProperty(exports, "__unstableUseAutocompleteProps", {
1076
1070
  enumerable: true,
1077
1071
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"names":["_primitives","require","_alignmentMatrixControl","_interopRequireDefault","_animate","_interopRequireWildcard","_animation","_anglePickerControl","_autocomplete","_baseControl","_borderBoxControl","_borderControl","_boxControl","_button","_buttonGroup","_card","_checkboxControl","_clipboardButton","_paletteEdit","_colorIndicator","_colorPalette","_colorPicker","_comboboxControl","_legacy","_composite","_confirmDialog","_customSelectControl","_dashicon","_dateTime","_dimensionControl","_disabled","_disclosure","_divider","_draggable","_dropZone","_provider","_dropdown","_dropdownContentWrapper","_dropdownMenu","_duotonePicker","_elevation","_externalLink","_flex","_focalPointPicker","_focusableIframe","_fontSizePicker","_formFileUpload","_formToggle","_formTokenField","_gradientPicker","_customGradientPicker","_grid","_guide","_page","_heading","_hStack","_icon","_deprecated","_itemGroup","_inputControl","_inputPrefixWrapper","_inputSuffixWrapper","_keyboardShortcuts","_menuGroup","_menuItem","_menuItemsChoice","_modal","_scrollLock","_navigableContainer","_navigation","_backButton","_group","_item","_menu","_legacy2","_navigator","_notice","_numberControl","_list","_panel","_body","_header","_row","_placeholder","_popover","_progressBar","_queryControls","_radio","_radioGroup","_radioControl","_rangeControl","_resizableBox","_responsiveWrapper","_sandbox","_searchControl","_selectControl","_snackbar","_list2","_spacer","_scrollable","_spinner","_surface","_tabPanel","_text","_textControl","_textareaControl","_textHighlight","_tip","_toggleControl","_toggleGroupControl","_toolbar","_toolsPanel","_tooltip","_treeGrid","_treeSelect","_truncate","_unitControl","_view","_visuallyHidden","_vStack","_isolatedEventContainer","_slotFill","_styleProvider","_zStack","_navigateRegions","_withConstrainedTabbing","_withFallbackStyles","_withFilters","_withFocusOutside","_withFocusReturn","_withNotices","_withSpokenMessages","_privateApis","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set"],"sources":["@wordpress/components/src/index.ts"],"sourcesContent":["// Primitives.\nexport {\n\tSVG,\n\tPath,\n\tCircle,\n\tPolygon,\n\tRect,\n\tG,\n\tLine,\n\tHorizontalRule,\n\tBlockQuotation,\n} from '@wordpress/primitives';\n\n// Components.\nexport {\n\t/** @deprecated Import `AlignmentMatrixControl` instead. */\n\tdefault as __experimentalAlignmentMatrixControl,\n\tdefault as AlignmentMatrixControl,\n} from './alignment-matrix-control';\nexport {\n\tdefault as Animate,\n\tgetAnimateClassName as __unstableGetAnimateClassName,\n} from './animate';\nexport {\n\t__unstableMotion,\n\t__unstableAnimatePresence,\n\t__unstableMotionContext,\n} from './animation';\nexport { default as AnglePickerControl } from './angle-picker-control';\nexport {\n\tdefault as Autocomplete,\n\tuseAutocompleteProps as __unstableUseAutocompleteProps,\n} from './autocomplete';\nexport { default as BaseControl, useBaseControlProps } from './base-control';\nexport {\n\t/** @deprecated Import `BorderBoxControl` instead. */\n\tBorderBoxControl as __experimentalBorderBoxControl,\n\tBorderBoxControl,\n\thasSplitBorders as __experimentalHasSplitBorders,\n\tisDefinedBorder as __experimentalIsDefinedBorder,\n\tisEmptyBorder as __experimentalIsEmptyBorder,\n} from './border-box-control';\nexport {\n\t/** @deprecated Import `BorderControl` instead. */\n\tBorderControl as __experimentalBorderControl,\n\tBorderControl,\n} from './border-control';\nexport {\n\t/** @deprecated Import `BoxControl` instead. */\n\tdefault as __experimentalBoxControl,\n\tdefault as BoxControl,\n\tapplyValueToSides as __experimentalApplyValueToSides,\n} from './box-control';\nexport { default as Button } from './button';\nexport { default as ButtonGroup } from './button-group';\nexport {\n\tCard,\n\tCardBody,\n\tCardDivider,\n\tCardFooter,\n\tCardHeader,\n\tCardMedia,\n} from './card';\nexport { default as CheckboxControl } from './checkbox-control';\nexport { default as ClipboardButton } from './clipboard-button';\nexport { default as __experimentalPaletteEdit } from './palette-edit';\nexport { default as ColorIndicator } from './color-indicator';\nexport { default as ColorPalette } from './color-palette';\nexport { ColorPicker } from './color-picker';\nexport { default as ComboboxControl } from './combobox-control';\nexport {\n\tComposite as __unstableComposite,\n\tCompositeGroup as __unstableCompositeGroup,\n\tCompositeItem as __unstableCompositeItem,\n\tuseCompositeState as __unstableUseCompositeState,\n} from './composite/legacy';\nexport { Composite } from './composite';\nexport { ConfirmDialog as __experimentalConfirmDialog } from './confirm-dialog';\nexport { default as CustomSelectControl } from './custom-select-control';\nexport { default as Dashicon } from './dashicon';\nexport { default as DateTimePicker, DatePicker, TimePicker } from './date-time';\nexport { default as __experimentalDimensionControl } from './dimension-control';\nexport { default as Disabled } from './disabled';\nexport { DisclosureContent as __unstableDisclosureContent } from './disclosure';\nexport { Divider as __experimentalDivider } from './divider';\nexport { default as Draggable } from './draggable';\nexport { default as DropZone } from './drop-zone';\nexport { default as DropZoneProvider } from './drop-zone/provider';\nexport { default as Dropdown } from './dropdown';\nexport { default as __experimentalDropdownContentWrapper } from './dropdown/dropdown-content-wrapper';\nexport { default as DropdownMenu } from './dropdown-menu';\nexport { DuotoneSwatch, DuotonePicker } from './duotone-picker';\nexport { Elevation as __experimentalElevation } from './elevation';\nexport { default as ExternalLink } from './external-link';\nexport { Flex, FlexBlock, FlexItem } from './flex';\nexport { default as FocalPointPicker } from './focal-point-picker';\nexport { default as FocusableIframe } from './focusable-iframe';\nexport { default as FontSizePicker } from './font-size-picker';\nexport { default as FormFileUpload } from './form-file-upload';\nexport { default as FormToggle } from './form-toggle';\nexport { default as FormTokenField } from './form-token-field';\nexport { default as GradientPicker } from './gradient-picker';\nexport { default as CustomGradientPicker } from './custom-gradient-picker';\nexport { Grid as __experimentalGrid } from './grid';\nexport { default as Guide } from './guide';\nexport { default as GuidePage } from './guide/page';\nexport { Heading as __experimentalHeading } from './heading';\nexport { HStack as __experimentalHStack } from './h-stack';\nexport { default as Icon } from './icon';\nexport type { IconType } from './icon';\nexport { default as IconButton } from './button/deprecated';\nexport {\n\tItemGroup as __experimentalItemGroup,\n\tItem as __experimentalItem,\n} from './item-group';\nexport { default as __experimentalInputControl } from './input-control';\nexport { default as __experimentalInputControlPrefixWrapper } from './input-control/input-prefix-wrapper';\nexport { default as __experimentalInputControlSuffixWrapper } from './input-control/input-suffix-wrapper';\nexport { default as KeyboardShortcuts } from './keyboard-shortcuts';\nexport { default as MenuGroup } from './menu-group';\nexport { default as MenuItem } from './menu-item';\nexport { default as MenuItemsChoice } from './menu-items-choice';\nexport { default as Modal } from './modal';\nexport { default as ScrollLock } from './scroll-lock';\nexport { NavigableMenu, TabbableContainer } from './navigable-container';\nexport { default as __experimentalNavigation } from './navigation';\nexport { default as __experimentalNavigationBackButton } from './navigation/back-button';\nexport { default as __experimentalNavigationGroup } from './navigation/group';\nexport { default as __experimentalNavigationItem } from './navigation/item';\nexport { default as __experimentalNavigationMenu } from './navigation/menu';\nexport {\n\t/** @deprecated Import `Navigator` instead. */\n\tNavigatorProvider as __experimentalNavigatorProvider,\n\t/** @deprecated Import `Navigator` and use `Navigator.Screen` instead. */\n\tNavigatorScreen as __experimentalNavigatorScreen,\n\t/** @deprecated Import `Navigator` and use `Navigator.Button` instead. */\n\tNavigatorButton as __experimentalNavigatorButton,\n\t/** @deprecated Import `Navigator` and use `Navigator.BackButton` instead. */\n\tNavigatorBackButton as __experimentalNavigatorBackButton,\n\t/** @deprecated Import `Navigator` and use `Navigator.BackButton` instead. */\n\tNavigatorToParentButton as __experimentalNavigatorToParentButton,\n} from './navigator/legacy';\nexport {\n\tNavigator,\n\tuseNavigator,\n\t/** @deprecated Import `useNavigator` instead. */\n\tuseNavigator as __experimentalUseNavigator,\n} from './navigator';\nexport { default as Notice } from './notice';\nexport { default as __experimentalNumberControl } from './number-control';\nexport { default as NoticeList } from './notice/list';\nexport { default as Panel } from './panel';\nexport { default as PanelBody } from './panel/body';\nexport { default as PanelHeader } from './panel/header';\nexport { default as PanelRow } from './panel/row';\nexport { default as Placeholder } from './placeholder';\nexport { default as Popover } from './popover';\nexport { default as ProgressBar } from './progress-bar';\nexport { default as QueryControls } from './query-controls';\nexport { default as __experimentalRadio } from './radio-group/radio';\nexport { default as __experimentalRadioGroup } from './radio-group';\nexport { default as RadioControl } from './radio-control';\nexport { default as RangeControl } from './range-control';\nexport { default as ResizableBox } from './resizable-box';\nexport { default as ResponsiveWrapper } from './responsive-wrapper';\nexport { default as SandBox } from './sandbox';\nexport { default as SearchControl } from './search-control';\nexport { default as SelectControl } from './select-control';\nexport { default as Snackbar } from './snackbar';\nexport { default as SnackbarList } from './snackbar/list';\nexport { Spacer as __experimentalSpacer } from './spacer';\nexport { Scrollable as __experimentalScrollable } from './scrollable';\nexport { default as Spinner } from './spinner';\nexport { Surface as __experimentalSurface } from './surface';\nexport { default as TabPanel } from './tab-panel';\nexport { Text as __experimentalText } from './text';\nexport { default as TextControl } from './text-control';\nexport { default as TextareaControl } from './textarea-control';\nexport { default as TextHighlight } from './text-highlight';\nexport { default as Tip } from './tip';\nexport { default as ToggleControl } from './toggle-control';\nexport {\n\tToggleGroupControl as __experimentalToggleGroupControl,\n\tToggleGroupControlOption as __experimentalToggleGroupControlOption,\n\tToggleGroupControlOptionIcon as __experimentalToggleGroupControlOptionIcon,\n} from './toggle-group-control';\nexport {\n\tToolbar,\n\tToolbarButton,\n\tToolbarContext as __experimentalToolbarContext,\n\tToolbarDropdownMenu,\n\tToolbarGroup,\n\tToolbarItem,\n} from './toolbar';\nexport {\n\tToolsPanel as __experimentalToolsPanel,\n\tToolsPanelItem as __experimentalToolsPanelItem,\n\tToolsPanelContext as __experimentalToolsPanelContext,\n} from './tools-panel';\nexport { default as Tooltip } from './tooltip';\nexport {\n\tdefault as __experimentalTreeGrid,\n\tTreeGridRow as __experimentalTreeGridRow,\n\tTreeGridCell as __experimentalTreeGridCell,\n\tTreeGridItem as __experimentalTreeGridItem,\n} from './tree-grid';\nexport { default as TreeSelect } from './tree-select';\nexport { Truncate as __experimentalTruncate } from './truncate';\nexport {\n\tdefault as __experimentalUnitControl,\n\tuseCustomUnits as __experimentalUseCustomUnits,\n\tparseQuantityAndUnitFromRawValue as __experimentalParseQuantityAndUnitFromRawValue,\n} from './unit-control';\nexport { View as __experimentalView } from './view';\nexport { VisuallyHidden } from './visually-hidden';\nexport { VStack as __experimentalVStack } from './v-stack';\nexport { default as IsolatedEventContainer } from './isolated-event-container';\nexport {\n\tcreateSlotFill,\n\tSlot,\n\tFill,\n\tProvider as SlotFillProvider,\n\tuseSlot as __experimentalUseSlot,\n\tuseSlotFills as __experimentalUseSlotFills,\n} from './slot-fill';\nexport { default as __experimentalStyleProvider } from './style-provider';\nexport { ZStack as __experimentalZStack } from './z-stack';\n\n// Higher-Order Components.\nexport {\n\tdefault as navigateRegions,\n\tuseNavigateRegions as __unstableUseNavigateRegions,\n} from './higher-order/navigate-regions';\nexport { default as withConstrainedTabbing } from './higher-order/with-constrained-tabbing';\nexport { default as withFallbackStyles } from './higher-order/with-fallback-styles';\nexport { default as withFilters } from './higher-order/with-filters';\nexport { default as withFocusOutside } from './higher-order/with-focus-outside';\nexport {\n\tdefault as withFocusReturn,\n\tProvider as FocusReturnProvider,\n} from './higher-order/with-focus-return';\nexport { default as withNotices } from './higher-order/with-notices';\nexport { default as withSpokenMessages } from './higher-order/with-spoken-messages';\n\n// Private APIs.\nexport { privateApis } from './private-apis';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA","ignoreList":[]}
1
+ {"version":3,"names":["_primitives","require","_alignmentMatrixControl","_interopRequireDefault","_animate","_interopRequireWildcard","_animation","_anglePickerControl","_autocomplete","_baseControl","_borderBoxControl","_borderControl","_boxControl","_button","_buttonGroup","_card","_checkboxControl","_clipboardButton","_paletteEdit","_colorIndicator","_colorPalette","_colorPicker","_comboboxControl","_legacy","_composite","_confirmDialog","_customSelectControl","_dashicon","_dateTime","_dimensionControl","_disabled","_disclosure","_divider","_draggable","_dropZone","_provider","_dropdown","_dropdownContentWrapper","_dropdownMenu","_duotonePicker","_elevation","_externalLink","_flex","_focalPointPicker","_focusableIframe","_fontSizePicker","_formFileUpload","_formToggle","_formTokenField","_gradientPicker","_customGradientPicker","_grid","_guide","_page","_heading","_hStack","_icon","_deprecated","_itemGroup","_inputControl","_inputPrefixWrapper","_inputSuffixWrapper","_keyboardShortcuts","_menuGroup","_menuItem","_menuItemsChoice","_modal","_scrollLock","_navigableContainer","_navigation","_backButton","_group","_item","_menu","_legacy2","_navigator","_notice","_numberControl","_list","_panel","_body","_header","_row","_placeholder","_popover","_progressBar","_queryControls","_radio","_radioGroup","_radioControl","_rangeControl","_resizableBox","_responsiveWrapper","_sandbox","_searchControl","_selectControl","_snackbar","_list2","_spacer","_scrollable","_spinner","_surface","_tabPanel","_text","_textControl","_textareaControl","_textHighlight","_tip","_toggleControl","_toggleGroupControl","_toolbar","_toolsPanel","_tooltip","_treeGrid","_treeSelect","_truncate","_unitControl","_view","_visuallyHidden","_vStack","_isolatedEventContainer","_slotFill","_styleProvider","_zStack","_navigateRegions","_withConstrainedTabbing","_withFallbackStyles","_withFilters","_withFocusOutside","_withFocusReturn","_withNotices","_withSpokenMessages","_privateApis","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set"],"sources":["@wordpress/components/src/index.ts"],"sourcesContent":["// Primitives.\nexport {\n\tSVG,\n\tPath,\n\tCircle,\n\tPolygon,\n\tRect,\n\tG,\n\tLine,\n\tHorizontalRule,\n\tBlockQuotation,\n} from '@wordpress/primitives';\n\n// Components.\nexport {\n\t/** @deprecated Import `AlignmentMatrixControl` instead. */\n\tdefault as __experimentalAlignmentMatrixControl,\n\tdefault as AlignmentMatrixControl,\n} from './alignment-matrix-control';\nexport {\n\tdefault as Animate,\n\tgetAnimateClassName as __unstableGetAnimateClassName,\n} from './animate';\nexport { __unstableMotion, __unstableAnimatePresence } from './animation';\nexport { default as AnglePickerControl } from './angle-picker-control';\nexport {\n\tdefault as Autocomplete,\n\tuseAutocompleteProps as __unstableUseAutocompleteProps,\n} from './autocomplete';\nexport { default as BaseControl, useBaseControlProps } from './base-control';\nexport {\n\t/** @deprecated Import `BorderBoxControl` instead. */\n\tBorderBoxControl as __experimentalBorderBoxControl,\n\tBorderBoxControl,\n\thasSplitBorders as __experimentalHasSplitBorders,\n\tisDefinedBorder as __experimentalIsDefinedBorder,\n\tisEmptyBorder as __experimentalIsEmptyBorder,\n} from './border-box-control';\nexport {\n\t/** @deprecated Import `BorderControl` instead. */\n\tBorderControl as __experimentalBorderControl,\n\tBorderControl,\n} from './border-control';\nexport {\n\t/** @deprecated Import `BoxControl` instead. */\n\tdefault as __experimentalBoxControl,\n\tdefault as BoxControl,\n\tapplyValueToSides as __experimentalApplyValueToSides,\n} from './box-control';\nexport { default as Button } from './button';\nexport { default as ButtonGroup } from './button-group';\nexport {\n\tCard,\n\tCardBody,\n\tCardDivider,\n\tCardFooter,\n\tCardHeader,\n\tCardMedia,\n} from './card';\nexport { default as CheckboxControl } from './checkbox-control';\nexport { default as ClipboardButton } from './clipboard-button';\nexport { default as __experimentalPaletteEdit } from './palette-edit';\nexport { default as ColorIndicator } from './color-indicator';\nexport { default as ColorPalette } from './color-palette';\nexport { ColorPicker } from './color-picker';\nexport { default as ComboboxControl } from './combobox-control';\nexport {\n\tComposite as __unstableComposite,\n\tCompositeGroup as __unstableCompositeGroup,\n\tCompositeItem as __unstableCompositeItem,\n\tuseCompositeState as __unstableUseCompositeState,\n} from './composite/legacy';\nexport { Composite } from './composite';\nexport { ConfirmDialog as __experimentalConfirmDialog } from './confirm-dialog';\nexport { default as CustomSelectControl } from './custom-select-control';\nexport { default as Dashicon } from './dashicon';\nexport { default as DateTimePicker, DatePicker, TimePicker } from './date-time';\nexport { default as __experimentalDimensionControl } from './dimension-control';\nexport { default as Disabled } from './disabled';\nexport { DisclosureContent as __unstableDisclosureContent } from './disclosure';\nexport { Divider as __experimentalDivider } from './divider';\nexport { default as Draggable } from './draggable';\nexport { default as DropZone } from './drop-zone';\nexport { default as DropZoneProvider } from './drop-zone/provider';\nexport { default as Dropdown } from './dropdown';\nexport { default as __experimentalDropdownContentWrapper } from './dropdown/dropdown-content-wrapper';\nexport { default as DropdownMenu } from './dropdown-menu';\nexport { DuotoneSwatch, DuotonePicker } from './duotone-picker';\nexport { Elevation as __experimentalElevation } from './elevation';\nexport { default as ExternalLink } from './external-link';\nexport { Flex, FlexBlock, FlexItem } from './flex';\nexport { default as FocalPointPicker } from './focal-point-picker';\nexport { default as FocusableIframe } from './focusable-iframe';\nexport { default as FontSizePicker } from './font-size-picker';\nexport { default as FormFileUpload } from './form-file-upload';\nexport { default as FormToggle } from './form-toggle';\nexport { default as FormTokenField } from './form-token-field';\nexport { default as GradientPicker } from './gradient-picker';\nexport { default as CustomGradientPicker } from './custom-gradient-picker';\nexport { Grid as __experimentalGrid } from './grid';\nexport { default as Guide } from './guide';\nexport { default as GuidePage } from './guide/page';\nexport { Heading as __experimentalHeading } from './heading';\nexport { HStack as __experimentalHStack } from './h-stack';\nexport { default as Icon } from './icon';\nexport type { IconType } from './icon';\nexport { default as IconButton } from './button/deprecated';\nexport {\n\tItemGroup as __experimentalItemGroup,\n\tItem as __experimentalItem,\n} from './item-group';\nexport { default as __experimentalInputControl } from './input-control';\nexport { default as __experimentalInputControlPrefixWrapper } from './input-control/input-prefix-wrapper';\nexport { default as __experimentalInputControlSuffixWrapper } from './input-control/input-suffix-wrapper';\nexport { default as KeyboardShortcuts } from './keyboard-shortcuts';\nexport { default as MenuGroup } from './menu-group';\nexport { default as MenuItem } from './menu-item';\nexport { default as MenuItemsChoice } from './menu-items-choice';\nexport { default as Modal } from './modal';\nexport { default as ScrollLock } from './scroll-lock';\nexport { NavigableMenu, TabbableContainer } from './navigable-container';\nexport { default as __experimentalNavigation } from './navigation';\nexport { default as __experimentalNavigationBackButton } from './navigation/back-button';\nexport { default as __experimentalNavigationGroup } from './navigation/group';\nexport { default as __experimentalNavigationItem } from './navigation/item';\nexport { default as __experimentalNavigationMenu } from './navigation/menu';\nexport {\n\t/** @deprecated Import `Navigator` instead. */\n\tNavigatorProvider as __experimentalNavigatorProvider,\n\t/** @deprecated Import `Navigator` and use `Navigator.Screen` instead. */\n\tNavigatorScreen as __experimentalNavigatorScreen,\n\t/** @deprecated Import `Navigator` and use `Navigator.Button` instead. */\n\tNavigatorButton as __experimentalNavigatorButton,\n\t/** @deprecated Import `Navigator` and use `Navigator.BackButton` instead. */\n\tNavigatorBackButton as __experimentalNavigatorBackButton,\n\t/** @deprecated Import `Navigator` and use `Navigator.BackButton` instead. */\n\tNavigatorToParentButton as __experimentalNavigatorToParentButton,\n} from './navigator/legacy';\nexport {\n\tNavigator,\n\tuseNavigator,\n\t/** @deprecated Import `useNavigator` instead. */\n\tuseNavigator as __experimentalUseNavigator,\n} from './navigator';\nexport { default as Notice } from './notice';\nexport { default as __experimentalNumberControl } from './number-control';\nexport { default as NoticeList } from './notice/list';\nexport { default as Panel } from './panel';\nexport { default as PanelBody } from './panel/body';\nexport { default as PanelHeader } from './panel/header';\nexport { default as PanelRow } from './panel/row';\nexport { default as Placeholder } from './placeholder';\nexport { default as Popover } from './popover';\nexport { default as ProgressBar } from './progress-bar';\nexport { default as QueryControls } from './query-controls';\nexport { default as __experimentalRadio } from './radio-group/radio';\nexport { default as __experimentalRadioGroup } from './radio-group';\nexport { default as RadioControl } from './radio-control';\nexport { default as RangeControl } from './range-control';\nexport { default as ResizableBox } from './resizable-box';\nexport { default as ResponsiveWrapper } from './responsive-wrapper';\nexport { default as SandBox } from './sandbox';\nexport { default as SearchControl } from './search-control';\nexport { default as SelectControl } from './select-control';\nexport { default as Snackbar } from './snackbar';\nexport { default as SnackbarList } from './snackbar/list';\nexport { Spacer as __experimentalSpacer } from './spacer';\nexport { Scrollable as __experimentalScrollable } from './scrollable';\nexport { default as Spinner } from './spinner';\nexport { Surface as __experimentalSurface } from './surface';\nexport { default as TabPanel } from './tab-panel';\nexport { Text as __experimentalText } from './text';\nexport { default as TextControl } from './text-control';\nexport { default as TextareaControl } from './textarea-control';\nexport { default as TextHighlight } from './text-highlight';\nexport { default as Tip } from './tip';\nexport { default as ToggleControl } from './toggle-control';\nexport {\n\tToggleGroupControl as __experimentalToggleGroupControl,\n\tToggleGroupControlOption as __experimentalToggleGroupControlOption,\n\tToggleGroupControlOptionIcon as __experimentalToggleGroupControlOptionIcon,\n} from './toggle-group-control';\nexport {\n\tToolbar,\n\tToolbarButton,\n\tToolbarContext as __experimentalToolbarContext,\n\tToolbarDropdownMenu,\n\tToolbarGroup,\n\tToolbarItem,\n} from './toolbar';\nexport {\n\tToolsPanel as __experimentalToolsPanel,\n\tToolsPanelItem as __experimentalToolsPanelItem,\n\tToolsPanelContext as __experimentalToolsPanelContext,\n} from './tools-panel';\nexport { default as Tooltip } from './tooltip';\nexport {\n\tdefault as __experimentalTreeGrid,\n\tTreeGridRow as __experimentalTreeGridRow,\n\tTreeGridCell as __experimentalTreeGridCell,\n\tTreeGridItem as __experimentalTreeGridItem,\n} from './tree-grid';\nexport { default as TreeSelect } from './tree-select';\nexport { Truncate as __experimentalTruncate } from './truncate';\nexport {\n\tdefault as __experimentalUnitControl,\n\tuseCustomUnits as __experimentalUseCustomUnits,\n\tparseQuantityAndUnitFromRawValue as __experimentalParseQuantityAndUnitFromRawValue,\n} from './unit-control';\nexport { View as __experimentalView } from './view';\nexport { VisuallyHidden } from './visually-hidden';\nexport { VStack as __experimentalVStack } from './v-stack';\nexport { default as IsolatedEventContainer } from './isolated-event-container';\nexport {\n\tcreateSlotFill,\n\tSlot,\n\tFill,\n\tProvider as SlotFillProvider,\n\tuseSlot as __experimentalUseSlot,\n\tuseSlotFills as __experimentalUseSlotFills,\n} from './slot-fill';\nexport { default as __experimentalStyleProvider } from './style-provider';\nexport { ZStack as __experimentalZStack } from './z-stack';\n\n// Higher-Order Components.\nexport {\n\tdefault as navigateRegions,\n\tuseNavigateRegions as __unstableUseNavigateRegions,\n} from './higher-order/navigate-regions';\nexport { default as withConstrainedTabbing } from './higher-order/with-constrained-tabbing';\nexport { default as withFallbackStyles } from './higher-order/with-fallback-styles';\nexport { default as withFilters } from './higher-order/with-filters';\nexport { default as withFocusOutside } from './higher-order/with-focus-outside';\nexport {\n\tdefault as withFocusReturn,\n\tProvider as FocusReturnProvider,\n} from './higher-order/with-focus-return';\nexport { default as withNotices } from './higher-order/with-notices';\nexport { default as withSpokenMessages } from './higher-order/with-spoken-messages';\n\n// Private APIs.\nexport { privateApis } from './private-apis';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA","ignoreList":[]}
@@ -1,3 +1,4 @@
1
+ /* wp:polyfill */
1
2
  "use strict";
2
3
 
3
4
  Object.defineProperty(exports, "__esModule", {
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_compose","_jsxRuntime","KeyboardShortcut","target","callback","shortcut","bindGlobal","eventName","useKeyboardShortcut","KeyboardShortcuts","children","shortcuts","useRef","element","Object","entries","map","jsx","Children","count","Fragment","jsxs","ref","_default","exports","default"],"sources":["@wordpress/components/src/keyboard-shortcuts/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef, Children } from '@wordpress/element';\nimport { useKeyboardShortcut } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { KeyboardShortcutProps, KeyboardShortcutsProps } from './types';\n\nfunction KeyboardShortcut( {\n\ttarget,\n\tcallback,\n\tshortcut,\n\tbindGlobal,\n\teventName,\n}: KeyboardShortcutProps ) {\n\tuseKeyboardShortcut( shortcut, callback, {\n\t\tbindGlobal,\n\t\ttarget,\n\t\teventName,\n\t} );\n\n\treturn null;\n}\n\n/**\n * `KeyboardShortcuts` is a component which handles keyboard sequences during the lifetime of the rendering element.\n *\n * When passed children, it will capture key events which occur on or within the children. If no children are passed, events are captured on the document.\n *\n * It uses the [Mousetrap](https://craig.is/killing/mice) library to implement keyboard sequence bindings.\n *\n * ```jsx\n * import { KeyboardShortcuts } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyKeyboardShortcuts = () => {\n * \tconst [ isAllSelected, setIsAllSelected ] = useState( false );\n * \tconst selectAll = () => {\n * \t\tsetIsAllSelected( true );\n * \t};\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t<KeyboardShortcuts\n * \t\t\t\tshortcuts={ {\n * \t\t\t\t\t'mod+a': selectAll,\n * \t\t\t\t} }\n * \t\t\t/>\n * \t\t\t[cmd/ctrl + A] Combination pressed? { isAllSelected ? 'Yes' : 'No' }\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nfunction KeyboardShortcuts( {\n\tchildren,\n\tshortcuts,\n\tbindGlobal,\n\teventName,\n}: KeyboardShortcutsProps ) {\n\tconst target = useRef( null );\n\n\tconst element = Object.entries( shortcuts ?? {} ).map(\n\t\t( [ shortcut, callback ] ) => (\n\t\t\t<KeyboardShortcut\n\t\t\t\tkey={ shortcut }\n\t\t\t\tshortcut={ shortcut }\n\t\t\t\tcallback={ callback }\n\t\t\t\tbindGlobal={ bindGlobal }\n\t\t\t\teventName={ eventName }\n\t\t\t\ttarget={ target }\n\t\t\t/>\n\t\t)\n\t);\n\n\t// Render as non-visual if there are no children pressed. Keyboard\n\t// events will be bound to the document instead.\n\tif ( ! Children.count( children ) ) {\n\t\treturn <>{ element }</>;\n\t}\n\n\treturn (\n\t\t<div ref={ target }>\n\t\t\t{ element }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default KeyboardShortcuts;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAAyD,IAAAE,WAAA,GAAAF,OAAA;AAJzD;AACA;AACA;;AAIA;AACA;AACA;;AAGA,SAASG,gBAAgBA,CAAE;EAC1BC,MAAM;EACNC,QAAQ;EACRC,QAAQ;EACRC,UAAU;EACVC;AACsB,CAAC,EAAG;EAC1B,IAAAC,4BAAmB,EAAEH,QAAQ,EAAED,QAAQ,EAAE;IACxCE,UAAU;IACVH,MAAM;IACNI;EACD,CAAE,CAAC;EAEH,OAAO,IAAI;AACZ;;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,SAASE,iBAAiBA,CAAE;EAC3BC,QAAQ;EACRC,SAAS;EACTL,UAAU;EACVC;AACuB,CAAC,EAAG;EAC3B,MAAMJ,MAAM,GAAG,IAAAS,eAAM,EAAE,IAAK,CAAC;EAE7B,MAAMC,OAAO,GAAGC,MAAM,CAACC,OAAO,CAAEJ,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,CAAC,CAAE,CAAC,CAACK,GAAG,CACpD,CAAE,CAAEX,QAAQ,EAAED,QAAQ,CAAE,kBACvB,IAAAH,WAAA,CAAAgB,GAAA,EAACf,gBAAgB;IAEhBG,QAAQ,EAAGA,QAAU;IACrBD,QAAQ,EAAGA,QAAU;IACrBE,UAAU,EAAGA,UAAY;IACzBC,SAAS,EAAGA,SAAW;IACvBJ,MAAM,EAAGA;EAAQ,GALXE,QAMN,CAEH,CAAC;;EAED;EACA;EACA,IAAK,CAAEa,iBAAQ,CAACC,KAAK,CAAET,QAAS,CAAC,EAAG;IACnC,oBAAO,IAAAT,WAAA,CAAAgB,GAAA,EAAAhB,WAAA,CAAAmB,QAAA;MAAAV,QAAA,EAAIG;IAAO,CAAI,CAAC;EACxB;EAEA,oBACC,IAAAZ,WAAA,CAAAoB,IAAA;IAAKC,GAAG,EAAGnB,MAAQ;IAAAO,QAAA,GAChBG,OAAO,EACPH,QAAQ;EAAA,CACN,CAAC;AAER;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEchB,iBAAiB","ignoreList":[]}
1
+ {"version":3,"names":["_element","require","_compose","_jsxRuntime","KeyboardShortcut","target","callback","shortcut","bindGlobal","eventName","useKeyboardShortcut","KeyboardShortcuts","children","shortcuts","useRef","element","Object","entries","map","jsx","Children","count","Fragment","jsxs","ref","_default","exports","default"],"sources":["@wordpress/components/src/keyboard-shortcuts/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useRef, Children } from '@wordpress/element';\nimport { useKeyboardShortcut } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { KeyboardShortcutProps, KeyboardShortcutsProps } from './types';\n\nfunction KeyboardShortcut( {\n\ttarget,\n\tcallback,\n\tshortcut,\n\tbindGlobal,\n\teventName,\n}: KeyboardShortcutProps ) {\n\tuseKeyboardShortcut( shortcut, callback, {\n\t\tbindGlobal,\n\t\ttarget,\n\t\teventName,\n\t} );\n\n\treturn null;\n}\n\n/**\n * `KeyboardShortcuts` is a component which handles keyboard sequences during the lifetime of the rendering element.\n *\n * When passed children, it will capture key events which occur on or within the children. If no children are passed, events are captured on the document.\n *\n * It uses the [Mousetrap](https://craig.is/killing/mice) library to implement keyboard sequence bindings.\n *\n * ```jsx\n * import { KeyboardShortcuts } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyKeyboardShortcuts = () => {\n * \tconst [ isAllSelected, setIsAllSelected ] = useState( false );\n * \tconst selectAll = () => {\n * \t\tsetIsAllSelected( true );\n * \t};\n *\n * \treturn (\n * \t\t<div>\n * \t\t\t<KeyboardShortcuts\n * \t\t\t\tshortcuts={ {\n * \t\t\t\t\t'mod+a': selectAll,\n * \t\t\t\t} }\n * \t\t\t/>\n * \t\t\t[cmd/ctrl + A] Combination pressed? { isAllSelected ? 'Yes' : 'No' }\n * \t\t</div>\n * \t);\n * };\n * ```\n */\nfunction KeyboardShortcuts( {\n\tchildren,\n\tshortcuts,\n\tbindGlobal,\n\teventName,\n}: KeyboardShortcutsProps ) {\n\tconst target = useRef( null );\n\n\tconst element = Object.entries( shortcuts ?? {} ).map(\n\t\t( [ shortcut, callback ] ) => (\n\t\t\t<KeyboardShortcut\n\t\t\t\tkey={ shortcut }\n\t\t\t\tshortcut={ shortcut }\n\t\t\t\tcallback={ callback }\n\t\t\t\tbindGlobal={ bindGlobal }\n\t\t\t\teventName={ eventName }\n\t\t\t\ttarget={ target }\n\t\t\t/>\n\t\t)\n\t);\n\n\t// Render as non-visual if there are no children pressed. Keyboard\n\t// events will be bound to the document instead.\n\tif ( ! Children.count( children ) ) {\n\t\treturn <>{ element }</>;\n\t}\n\n\treturn (\n\t\t<div ref={ target }>\n\t\t\t{ element }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default KeyboardShortcuts;\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAAyD,IAAAE,WAAA,GAAAF,OAAA;AAJzD;AACA;AACA;;AAIA;AACA;AACA;;AAGA,SAASG,gBAAgBA,CAAE;EAC1BC,MAAM;EACNC,QAAQ;EACRC,QAAQ;EACRC,UAAU;EACVC;AACsB,CAAC,EAAG;EAC1B,IAAAC,4BAAmB,EAAEH,QAAQ,EAAED,QAAQ,EAAE;IACxCE,UAAU;IACVH,MAAM;IACNI;EACD,CAAE,CAAC;EAEH,OAAO,IAAI;AACZ;;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,SAASE,iBAAiBA,CAAE;EAC3BC,QAAQ;EACRC,SAAS;EACTL,UAAU;EACVC;AACuB,CAAC,EAAG;EAC3B,MAAMJ,MAAM,GAAG,IAAAS,eAAM,EAAE,IAAK,CAAC;EAE7B,MAAMC,OAAO,GAAGC,MAAM,CAACC,OAAO,CAAEJ,SAAS,aAATA,SAAS,cAATA,SAAS,GAAI,CAAC,CAAE,CAAC,CAACK,GAAG,CACpD,CAAE,CAAEX,QAAQ,EAAED,QAAQ,CAAE,kBACvB,IAAAH,WAAA,CAAAgB,GAAA,EAACf,gBAAgB;IAEhBG,QAAQ,EAAGA,QAAU;IACrBD,QAAQ,EAAGA,QAAU;IACrBE,UAAU,EAAGA,UAAY;IACzBC,SAAS,EAAGA,SAAW;IACvBJ,MAAM,EAAGA;EAAQ,GALXE,QAMN,CAEH,CAAC;;EAED;EACA;EACA,IAAK,CAAEa,iBAAQ,CAACC,KAAK,CAAET,QAAS,CAAC,EAAG;IACnC,oBAAO,IAAAT,WAAA,CAAAgB,GAAA,EAAAhB,WAAA,CAAAmB,QAAA;MAAAV,QAAA,EAAIG;IAAO,CAAI,CAAC;EACxB;EAEA,oBACC,IAAAZ,WAAA,CAAAoB,IAAA;IAAKC,GAAG,EAAGnB,MAAQ;IAAAO,QAAA,GAChBG,OAAO,EACPH,QAAQ;EAAA,CACN,CAAC;AAER;AAAC,IAAAa,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEchB,iBAAiB","ignoreList":[]}
@@ -9,7 +9,6 @@ var _element = require("@wordpress/element");
9
9
  var _icons = require("@wordpress/icons");
10
10
  var _context = require("./context");
11
11
  var Styled = _interopRequireWildcard(require("./styles"));
12
- var _useTemporaryFocusVisibleFix = require("./use-temporary-focus-visible-fix");
13
12
  var _jsxRuntime = require("react/jsx-runtime");
14
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -28,24 +27,21 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
28
27
  const MenuCheckboxItem = exports.MenuCheckboxItem = (0, _element.forwardRef)(function MenuCheckboxItem({
29
28
  suffix,
30
29
  children,
31
- onBlur,
32
30
  hideOnClick = false,
33
31
  ...props
34
32
  }, ref) {
35
- // TODO: Remove when https://github.com/ariakit/ariakit/issues/4083 is fixed
36
- const focusVisibleFixProps = (0, _useTemporaryFocusVisibleFix.useTemporaryFocusVisibleFix)({
37
- onBlur
38
- });
39
33
  const menuContext = (0, _element.useContext)(_context.MenuContext);
34
+ if (!menuContext?.store) {
35
+ throw new Error('Menu.CheckboxItem can only be rendered inside a Menu component');
36
+ }
40
37
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Styled.MenuCheckboxItem, {
41
38
  ref: ref,
42
39
  ...props,
43
- ...focusVisibleFixProps,
44
40
  accessibleWhenDisabled: true,
45
41
  hideOnClick: hideOnClick,
46
- store: menuContext?.store,
42
+ store: menuContext.store,
47
43
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Ariakit.MenuItemCheck, {
48
- store: menuContext?.store,
44
+ store: menuContext.store,
49
45
  render: /*#__PURE__*/(0, _jsxRuntime.jsx)(Styled.ItemPrefixWrapper, {})
50
46
  // Override some ariakit inline styles
51
47
  ,
@@ -1 +1 @@
1
- {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_element","_icons","_context","Styled","_useTemporaryFocusVisibleFix","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","MenuCheckboxItem","exports","forwardRef","suffix","children","onBlur","hideOnClick","props","ref","focusVisibleFixProps","useTemporaryFocusVisibleFix","menuContext","useContext","MenuContext","jsxs","accessibleWhenDisabled","store","jsx","MenuItemCheck","render","ItemPrefixWrapper","style","width","height","Icon","icon","check","size","MenuItemContentWrapper","MenuItemChildrenWrapper","ItemSuffixWrapper"],"sources":["@wordpress/components/src/menu/checkbox-item.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { MenuContext } from './context';\nimport type { MenuCheckboxItemProps } from './types';\nimport * as Styled from './styles';\nimport { useTemporaryFocusVisibleFix } from './use-temporary-focus-visible-fix';\n\nexport const MenuCheckboxItem = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< MenuCheckboxItemProps, 'div', false >\n>( function MenuCheckboxItem(\n\t{ suffix, children, onBlur, hideOnClick = false, ...props },\n\tref\n) {\n\t// TODO: Remove when https://github.com/ariakit/ariakit/issues/4083 is fixed\n\tconst focusVisibleFixProps = useTemporaryFocusVisibleFix( { onBlur } );\n\tconst menuContext = useContext( MenuContext );\n\n\treturn (\n\t\t<Styled.MenuCheckboxItem\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\t{ ...focusVisibleFixProps }\n\t\t\taccessibleWhenDisabled\n\t\t\thideOnClick={ hideOnClick }\n\t\t\tstore={ menuContext?.store }\n\t\t>\n\t\t\t<Ariakit.MenuItemCheck\n\t\t\t\tstore={ menuContext?.store }\n\t\t\t\trender={ <Styled.ItemPrefixWrapper /> }\n\t\t\t\t// Override some ariakit inline styles\n\t\t\t\tstyle={ { width: 'auto', height: 'auto' } }\n\t\t\t>\n\t\t\t\t<Icon icon={ check } size={ 24 } />\n\t\t\t</Ariakit.MenuItemCheck>\n\n\t\t\t<Styled.MenuItemContentWrapper>\n\t\t\t\t<Styled.MenuItemChildrenWrapper>\n\t\t\t\t\t{ children }\n\t\t\t\t</Styled.MenuItemChildrenWrapper>\n\n\t\t\t\t{ suffix && (\n\t\t\t\t\t<Styled.ItemSuffixWrapper>\n\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t</Styled.ItemSuffixWrapper>\n\t\t\t\t) }\n\t\t\t</Styled.MenuItemContentWrapper>\n\t\t</Styled.MenuCheckboxItem>\n\t);\n} );\n"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAMA,IAAAG,QAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAL,uBAAA,CAAAC,OAAA;AACA,IAAAK,4BAAA,GAAAL,OAAA;AAAgF,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAA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AAAzB,WAAA,CAAAsC,GAAA,EAAC9C,OAAO,CAAC+C,aAAa;MACrBF,KAAK,EAAGL,WAAW,EAAEK,KAAO;MAC5BG,MAAM,eAAG,IAAAxC,WAAA,CAAAsC,GAAA,EAACxC,MAAM,CAAC2C,iBAAiB,IAAE;MACpC;MAAA;MACAC,KAAK,EAAG;QAAEC,KAAK,EAAE,MAAM;QAAEC,MAAM,EAAE;MAAO,CAAG;MAAAnB,QAAA,eAE3C,IAAAzB,WAAA,CAAAsC,GAAA,EAAC1C,MAAA,CAAAiD,IAAI;QAACC,IAAI,EAAGC,YAAO;QAACC,IAAI,EAAG;MAAI,CAAE;IAAC,CACb,CAAC,eAExB,IAAAhD,WAAA,CAAAmC,IAAA,EAACrC,MAAM,CAACmD,sBAAsB;MAAAxB,QAAA,gBAC7B,IAAAzB,WAAA,CAAAsC,GAAA,EAACxC,MAAM,CAACoD,uBAAuB;QAAAzB,QAAA,EAC5BA;MAAQ,CACqB,CAAC,EAE/BD,MAAM,iBACP,IAAAxB,WAAA,CAAAsC,GAAA,EAACxC,MAAM,CAACqD,iBAAiB;QAAA1B,QAAA,EACtBD;MAAM,CACiB,CAC1B;IAAA,CAC6B,CAAC;EAAA,CACR,CAAC;AAE5B,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Ariakit","_interopRequireWildcard","require","_element","_icons","_context","Styled","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","MenuCheckboxItem","exports","forwardRef","suffix","children","hideOnClick","props","ref","menuContext","useContext","MenuContext","store","Error","jsxs","accessibleWhenDisabled","jsx","MenuItemCheck","render","ItemPrefixWrapper","style","width","height","Icon","icon","check","size","MenuItemContentWrapper","MenuItemChildrenWrapper","ItemSuffixWrapper"],"sources":["@wordpress/components/src/menu/checkbox-item.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef, useContext } from '@wordpress/element';\nimport { Icon, check } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../context';\nimport { MenuContext } from './context';\nimport type { MenuCheckboxItemProps } from './types';\nimport * as Styled from './styles';\n\nexport const MenuCheckboxItem = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< MenuCheckboxItemProps, 'div', false >\n>( function MenuCheckboxItem(\n\t{ suffix, children, hideOnClick = false, ...props },\n\tref\n) {\n\tconst menuContext = useContext( MenuContext );\n\n\tif ( ! menuContext?.store ) {\n\t\tthrow new Error(\n\t\t\t'Menu.CheckboxItem can only be rendered inside a Menu component'\n\t\t);\n\t}\n\n\treturn (\n\t\t<Styled.MenuCheckboxItem\n\t\t\tref={ ref }\n\t\t\t{ ...props }\n\t\t\taccessibleWhenDisabled\n\t\t\thideOnClick={ hideOnClick }\n\t\t\tstore={ menuContext.store }\n\t\t>\n\t\t\t<Ariakit.MenuItemCheck\n\t\t\t\tstore={ menuContext.store }\n\t\t\t\trender={ <Styled.ItemPrefixWrapper /> }\n\t\t\t\t// Override some ariakit inline styles\n\t\t\t\tstyle={ { width: 'auto', height: 'auto' } }\n\t\t\t>\n\t\t\t\t<Icon icon={ check } size={ 24 } />\n\t\t\t</Ariakit.MenuItemCheck>\n\n\t\t\t<Styled.MenuItemContentWrapper>\n\t\t\t\t<Styled.MenuItemChildrenWrapper>\n\t\t\t\t\t{ children }\n\t\t\t\t</Styled.MenuItemChildrenWrapper>\n\n\t\t\t\t{ suffix && (\n\t\t\t\t\t<Styled.ItemSuffixWrapper>\n\t\t\t\t\t\t{ suffix }\n\t\t\t\t\t</Styled.ItemSuffixWrapper>\n\t\t\t\t) }\n\t\t\t</Styled.MenuItemContentWrapper>\n\t\t</Styled.MenuCheckboxItem>\n\t);\n} );\n"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AA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B,CAAC,EAE/BD,MAAM,iBACP,IAAAxB,WAAA,CAAAoC,GAAA,EAACrC,MAAM,CAACkD,iBAAiB;QAAAxB,QAAA,EACtBD;MAAM,CACiB,CAC1B;IAAA,CAC6B,CAAC;EAAA,CACR,CAAC;AAE5B,CAAE,CAAC","ignoreList":[]}
@@ -21,6 +21,9 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
21
21
 
22
22
  const MenuGroupLabel = exports.MenuGroupLabel = (0, _element.forwardRef)(function MenuGroup(props, ref) {
23
23
  const menuContext = (0, _element.useContext)(_context.MenuContext);
24
+ if (!menuContext?.store) {
25
+ throw new Error('Menu.GroupLabel can only be rendered inside a Menu component');
26
+ }
24
27
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Styled.MenuGroupLabel, {
25
28
  ref: ref,
26
29
  render:
@@ -34,7 +37,7 @@ const MenuGroupLabel = exports.MenuGroupLabel = (0, _element.forwardRef)(functio
34
37
  lineHeight: "16px"
35
38
  }),
36
39
  ...props,
37
- store: menuContext?.store
40
+ store: menuContext.store
38
41
  });
39
42
  });
40
43
  //# sourceMappingURL=group-label.js.map