@wordpress/components 29.3.0 → 29.5.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 (568) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/build/alignment-matrix-control/icon.js +0 -1
  3. package/build/alignment-matrix-control/icon.js.map +1 -1
  4. package/build/alignment-matrix-control/index.js +0 -1
  5. package/build/alignment-matrix-control/index.js.map +1 -1
  6. package/build/autocomplete/autocompleter-ui.js +0 -1
  7. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  8. package/build/autocomplete/autocompleter-ui.native.js +0 -1
  9. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  10. package/build/autocomplete/get-default-use-items.js +0 -1
  11. package/build/autocomplete/get-default-use-items.js.map +1 -1
  12. package/build/autocomplete/index.js +0 -1
  13. package/build/autocomplete/index.js.map +1 -1
  14. package/build/border-box-control/utils.js +0 -1
  15. package/build/border-box-control/utils.js.map +1 -1
  16. package/build/border-control/border-control-dropdown/component.js +19 -22
  17. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  18. package/build/border-control/border-control-dropdown/hook.js +3 -3
  19. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  20. package/build/border-control/border-control-style-picker/component.js +0 -1
  21. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  22. package/build/border-control/styles.js +24 -19
  23. package/build/border-control/styles.js.map +1 -1
  24. package/build/box-control/index.js +0 -1
  25. package/build/box-control/index.js.map +1 -1
  26. package/build/box-control/input-control.js +0 -1
  27. package/build/box-control/input-control.js.map +1 -1
  28. package/build/box-control/utils.js +0 -1
  29. package/build/box-control/utils.js.map +1 -1
  30. package/build/button/index.native.js +0 -1
  31. package/build/button/index.native.js.map +1 -1
  32. package/build/circular-option-picker/circular-option-picker.js +1 -0
  33. package/build/circular-option-picker/circular-option-picker.js.map +1 -1
  34. package/build/circular-option-picker/index.js +7 -0
  35. package/build/circular-option-picker/index.js.map +1 -1
  36. package/build/circular-option-picker/types.js.map +1 -1
  37. package/build/circular-option-picker/utils.js +31 -0
  38. package/build/circular-option-picker/utils.js.map +1 -0
  39. package/build/color-indicator/index.native.js +0 -1
  40. package/build/color-indicator/index.native.js.map +1 -1
  41. package/build/color-palette/index.js +9 -30
  42. package/build/color-palette/index.js.map +1 -1
  43. package/build/color-palette/index.native.js +0 -1
  44. package/build/color-palette/index.native.js.map +1 -1
  45. package/build/color-palette/utils.js +0 -1
  46. package/build/color-palette/utils.js.map +1 -1
  47. package/build/combobox-control/index.js +4 -3
  48. package/build/combobox-control/index.js.map +1 -1
  49. package/build/combobox-control/types.js.map +1 -1
  50. package/build/composite/legacy/index.js +0 -1
  51. package/build/composite/legacy/index.js.map +1 -1
  52. package/build/context/context-connect.js +0 -1
  53. package/build/context/context-connect.js.map +1 -1
  54. package/build/custom-gradient-picker/gradient-bar/control-points.js +0 -1
  55. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  56. package/build/custom-gradient-picker/gradient-bar/index.js +0 -1
  57. package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  58. package/build/custom-gradient-picker/gradient-bar/utils.js +0 -1
  59. package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  60. package/build/custom-gradient-picker/index.js +0 -1
  61. package/build/custom-gradient-picker/index.js.map +1 -1
  62. package/build/custom-gradient-picker/serializer.js +0 -1
  63. package/build/custom-gradient-picker/serializer.js.map +1 -1
  64. package/build/custom-gradient-picker/utils.js +0 -1
  65. package/build/custom-gradient-picker/utils.js.map +1 -1
  66. package/build/custom-select-control/index.js +0 -1
  67. package/build/custom-select-control/index.js.map +1 -1
  68. package/build/dashicon/index.js +0 -1
  69. package/build/dashicon/index.js.map +1 -1
  70. package/build/date-time/date/index.js +0 -1
  71. package/build/date-time/date/index.js.map +1 -1
  72. package/build/date-time/date/use-lilius/index.js +0 -1
  73. package/build/date-time/date/use-lilius/index.js.map +1 -1
  74. package/build/date-time/time/index.js +0 -1
  75. package/build/date-time/time/index.js.map +1 -1
  76. package/build/dimension-control/index.js +0 -1
  77. package/build/dimension-control/index.js.map +1 -1
  78. package/build/dimension-control/sizes.js +0 -1
  79. package/build/dimension-control/sizes.js.map +1 -1
  80. package/build/draggable/index.js +0 -1
  81. package/build/draggable/index.js.map +1 -1
  82. package/build/draggable/index.native.js +0 -1
  83. package/build/draggable/index.native.js.map +1 -1
  84. package/build/dropdown-menu/index.js +0 -1
  85. package/build/dropdown-menu/index.js.map +1 -1
  86. package/build/dropdown-menu/index.native.js +0 -1
  87. package/build/dropdown-menu/index.native.js.map +1 -1
  88. package/build/duotone-picker/color-list-picker/index.js +0 -1
  89. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  90. package/build/duotone-picker/duotone-picker.js +8 -29
  91. package/build/duotone-picker/duotone-picker.js.map +1 -1
  92. package/build/duotone-picker/utils.js +0 -1
  93. package/build/duotone-picker/utils.js.map +1 -1
  94. package/build/external-link/index.js +0 -1
  95. package/build/external-link/index.js.map +1 -1
  96. package/build/font-size-picker/font-size-picker-select.js +4 -15
  97. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  98. package/build/font-size-picker/font-size-picker-toggle-group.js +0 -1
  99. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  100. package/build/font-size-picker/index.js +0 -1
  101. package/build/font-size-picker/index.js.map +1 -1
  102. package/build/font-size-picker/index.native.js +0 -1
  103. package/build/font-size-picker/index.native.js.map +1 -1
  104. package/build/font-size-picker/types.js.map +1 -1
  105. package/build/font-size-picker/utils.js +0 -1
  106. package/build/font-size-picker/utils.js.map +1 -1
  107. package/build/form-token-field/index.js +0 -1
  108. package/build/form-token-field/index.js.map +1 -1
  109. package/build/form-token-field/suggestions-list.js +0 -1
  110. package/build/form-token-field/suggestions-list.js.map +1 -1
  111. package/build/gradient-picker/index.js +8 -29
  112. package/build/gradient-picker/index.js.map +1 -1
  113. package/build/guide/index.js +0 -1
  114. package/build/guide/index.js.map +1 -1
  115. package/build/guide/page-control.js +0 -1
  116. package/build/guide/page-control.js.map +1 -1
  117. package/build/h-stack/hook.js +0 -1
  118. package/build/h-stack/hook.js.map +1 -1
  119. package/build/higher-order/navigate-regions/index.js +0 -1
  120. package/build/higher-order/navigate-regions/index.js.map +1 -1
  121. package/build/higher-order/with-fallback-styles/index.js +0 -1
  122. package/build/higher-order/with-fallback-styles/index.js.map +1 -1
  123. package/build/higher-order/with-filters/index.js +0 -1
  124. package/build/higher-order/with-filters/index.js.map +1 -1
  125. package/build/higher-order/with-notices/index.js +0 -1
  126. package/build/higher-order/with-notices/index.js.map +1 -1
  127. package/build/input-control/styles/input-control-styles.js +22 -22
  128. package/build/input-control/styles/input-control-styles.js.map +1 -1
  129. package/build/keyboard-shortcuts/index.js +0 -1
  130. package/build/keyboard-shortcuts/index.js.map +1 -1
  131. package/build/menu-items-choice/index.js +0 -1
  132. package/build/menu-items-choice/index.js.map +1 -1
  133. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +0 -1
  134. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  135. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +0 -1
  136. package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  137. package/build/mobile/bottom-sheet/picker-cell.native.js +0 -1
  138. package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  139. package/build/mobile/bottom-sheet/switch-cell.native.js +1 -1
  140. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  141. package/build/mobile/bottom-sheet-select-control/index.native.js +0 -1
  142. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  143. package/build/mobile/color-settings/palette.screen.native.js +0 -1
  144. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  145. package/build/mobile/gradient/index.native.js +0 -1
  146. package/build/mobile/gradient/index.native.js.map +1 -1
  147. package/build/mobile/media-edit/index.native.js +0 -1
  148. package/build/mobile/media-edit/index.native.js.map +1 -1
  149. package/build/mobile/picker/index.android.js +0 -1
  150. package/build/mobile/picker/index.android.js.map +1 -1
  151. package/build/mobile/picker/index.ios.js +0 -1
  152. package/build/mobile/picker/index.ios.js.map +1 -1
  153. package/build/mobile/segmented-control/index.native.js +0 -1
  154. package/build/mobile/segmented-control/index.native.js.map +1 -1
  155. package/build/mobile/utils/get-px-from-css-unit.native.js +0 -1
  156. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  157. package/build/navigable-container/container.js +0 -1
  158. package/build/navigable-container/container.js.map +1 -1
  159. package/build/navigation/group/index.js +0 -1
  160. package/build/navigation/group/index.js.map +1 -1
  161. package/build/navigation/menu/menu-title-search.js +0 -1
  162. package/build/navigation/menu/menu-title-search.js.map +1 -1
  163. package/build/navigation/menu/search-no-results-found.js +0 -1
  164. package/build/navigation/menu/search-no-results-found.js.map +1 -1
  165. package/build/navigator/navigator/component.js +0 -1
  166. package/build/navigator/navigator/component.js.map +1 -1
  167. package/build/navigator/navigator-screen/component.js +0 -1
  168. package/build/navigator/navigator-screen/component.js.map +1 -1
  169. package/build/navigator/utils/router.js +0 -1
  170. package/build/navigator/utils/router.js.map +1 -1
  171. package/build/notice/index.js +0 -1
  172. package/build/notice/index.js.map +1 -1
  173. package/build/notice/list.js +0 -1
  174. package/build/notice/list.js.map +1 -1
  175. package/build/notice/list.native.js +0 -1
  176. package/build/notice/list.native.js.map +1 -1
  177. package/build/number-control/index.js +2 -2
  178. package/build/number-control/index.js.map +1 -1
  179. package/build/palette-edit/index.js +0 -1
  180. package/build/palette-edit/index.js.map +1 -1
  181. package/build/panel/actions.native.js +0 -1
  182. package/build/panel/actions.native.js.map +1 -1
  183. package/build/query-controls/index.js +0 -1
  184. package/build/query-controls/index.js.map +1 -1
  185. package/build/query-controls/terms.js +0 -1
  186. package/build/query-controls/terms.js.map +1 -1
  187. package/build/radio-control/index.js +0 -1
  188. package/build/radio-control/index.js.map +1 -1
  189. package/build/radio-control/index.native.js +0 -1
  190. package/build/radio-control/index.native.js.map +1 -1
  191. package/build/range-control/rail.js +0 -1
  192. package/build/range-control/rail.js.map +1 -1
  193. package/build/resizable-box/index.js +0 -1
  194. package/build/resizable-box/index.js.map +1 -1
  195. package/build/sandbox/index.js +0 -1
  196. package/build/sandbox/index.js.map +1 -1
  197. package/build/sandbox/index.native.js +0 -1
  198. package/build/sandbox/index.native.js.map +1 -1
  199. package/build/search-control/index.native.js +0 -1
  200. package/build/search-control/index.native.js.map +1 -1
  201. package/build/select-control/index.js +0 -1
  202. package/build/select-control/index.js.map +1 -1
  203. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +0 -1
  204. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  205. package/build/slot-fill/provider.js +0 -1
  206. package/build/slot-fill/provider.js.map +1 -1
  207. package/build/slot-fill/slot.js +0 -1
  208. package/build/slot-fill/slot.js.map +1 -1
  209. package/build/snackbar/index.js +0 -1
  210. package/build/snackbar/index.js.map +1 -1
  211. package/build/snackbar/list.js +0 -1
  212. package/build/snackbar/list.js.map +1 -1
  213. package/build/tab-panel/index.js +0 -1
  214. package/build/tab-panel/index.js.map +1 -1
  215. package/build/tabs/index.js +0 -1
  216. package/build/tabs/index.js.map +1 -1
  217. package/build/text/utils.js +0 -1
  218. package/build/text/utils.js.map +1 -1
  219. package/build/textarea-control/styles/textarea-control-styles.js +3 -3
  220. package/build/textarea-control/styles/textarea-control-styles.js.map +1 -1
  221. package/build/theme/color-algorithms.js +0 -1
  222. package/build/theme/color-algorithms.js.map +1 -1
  223. package/build/toolbar/toolbar-group/index.js +0 -1
  224. package/build/toolbar/toolbar-group/index.js.map +1 -1
  225. package/build/tools-panel/tools-panel/hook.js +0 -1
  226. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  227. package/build/tools-panel/tools-panel-header/component.js +0 -1
  228. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  229. package/build/tree-grid/index.js +0 -1
  230. package/build/tree-grid/index.js.map +1 -1
  231. package/build/tree-select/index.js +0 -1
  232. package/build/tree-select/index.js.map +1 -1
  233. package/build/unit-control/index.js +0 -1
  234. package/build/unit-control/index.js.map +1 -1
  235. package/build/unit-control/index.native.js +0 -1
  236. package/build/unit-control/index.native.js.map +1 -1
  237. package/build/unit-control/unit-select-control.js +0 -1
  238. package/build/unit-control/unit-select-control.js.map +1 -1
  239. package/build/unit-control/utils.js +0 -1
  240. package/build/unit-control/utils.js.map +1 -1
  241. package/build/utils/get-valid-children.js +0 -1
  242. package/build/utils/get-valid-children.js.map +1 -1
  243. package/build/utils/hooks/use-animated-offset-rect.js +0 -1
  244. package/build/utils/hooks/use-animated-offset-rect.js.map +1 -1
  245. package/build/utils/hooks/use-cx.js +0 -1
  246. package/build/utils/hooks/use-cx.js.map +1 -1
  247. package/build/utils/math.js +0 -1
  248. package/build/utils/math.js.map +1 -1
  249. package/build/utils/rtl.js +0 -1
  250. package/build/utils/rtl.js.map +1 -1
  251. package/build/utils/values.js +0 -1
  252. package/build/utils/values.js.map +1 -1
  253. package/build/z-stack/component.js +0 -1
  254. package/build/z-stack/component.js.map +1 -1
  255. package/build-module/alignment-matrix-control/icon.js +0 -1
  256. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  257. package/build-module/alignment-matrix-control/index.js +0 -1
  258. package/build-module/alignment-matrix-control/index.js.map +1 -1
  259. package/build-module/autocomplete/autocompleter-ui.js +0 -1
  260. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  261. package/build-module/autocomplete/autocompleter-ui.native.js +0 -1
  262. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  263. package/build-module/autocomplete/get-default-use-items.js +0 -1
  264. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  265. package/build-module/autocomplete/index.js +0 -1
  266. package/build-module/autocomplete/index.js.map +1 -1
  267. package/build-module/border-box-control/utils.js +0 -1
  268. package/build-module/border-box-control/utils.js.map +1 -1
  269. package/build-module/border-control/border-control-dropdown/component.js +19 -22
  270. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  271. package/build-module/border-control/border-control-dropdown/hook.js +3 -3
  272. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  273. package/build-module/border-control/border-control-style-picker/component.js +0 -1
  274. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  275. package/build-module/border-control/styles.js +22 -13
  276. package/build-module/border-control/styles.js.map +1 -1
  277. package/build-module/box-control/index.js +0 -1
  278. package/build-module/box-control/index.js.map +1 -1
  279. package/build-module/box-control/input-control.js +0 -1
  280. package/build-module/box-control/input-control.js.map +1 -1
  281. package/build-module/box-control/utils.js +0 -1
  282. package/build-module/box-control/utils.js.map +1 -1
  283. package/build-module/button/index.native.js +0 -1
  284. package/build-module/button/index.native.js.map +1 -1
  285. package/build-module/circular-option-picker/circular-option-picker.js +1 -0
  286. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  287. package/build-module/circular-option-picker/index.js +1 -0
  288. package/build-module/circular-option-picker/index.js.map +1 -1
  289. package/build-module/circular-option-picker/types.js.map +1 -1
  290. package/build-module/circular-option-picker/utils.js +25 -0
  291. package/build-module/circular-option-picker/utils.js.map +1 -0
  292. package/build-module/color-indicator/index.native.js +0 -1
  293. package/build-module/color-indicator/index.native.js.map +1 -1
  294. package/build-module/color-palette/index.js +7 -30
  295. package/build-module/color-palette/index.js.map +1 -1
  296. package/build-module/color-palette/index.native.js +0 -1
  297. package/build-module/color-palette/index.native.js.map +1 -1
  298. package/build-module/color-palette/utils.js +0 -1
  299. package/build-module/color-palette/utils.js.map +1 -1
  300. package/build-module/combobox-control/index.js +4 -3
  301. package/build-module/combobox-control/index.js.map +1 -1
  302. package/build-module/combobox-control/types.js.map +1 -1
  303. package/build-module/composite/legacy/index.js +0 -1
  304. package/build-module/composite/legacy/index.js.map +1 -1
  305. package/build-module/context/context-connect.js +0 -1
  306. package/build-module/context/context-connect.js.map +1 -1
  307. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +0 -1
  308. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  309. package/build-module/custom-gradient-picker/gradient-bar/index.js +0 -1
  310. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  311. package/build-module/custom-gradient-picker/gradient-bar/utils.js +0 -1
  312. package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
  313. package/build-module/custom-gradient-picker/index.js +0 -1
  314. package/build-module/custom-gradient-picker/index.js.map +1 -1
  315. package/build-module/custom-gradient-picker/serializer.js +0 -1
  316. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  317. package/build-module/custom-gradient-picker/utils.js +0 -1
  318. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  319. package/build-module/custom-select-control/index.js +0 -1
  320. package/build-module/custom-select-control/index.js.map +1 -1
  321. package/build-module/dashicon/index.js +0 -1
  322. package/build-module/dashicon/index.js.map +1 -1
  323. package/build-module/date-time/date/index.js +0 -1
  324. package/build-module/date-time/date/index.js.map +1 -1
  325. package/build-module/date-time/date/use-lilius/index.js +0 -1
  326. package/build-module/date-time/date/use-lilius/index.js.map +1 -1
  327. package/build-module/date-time/time/index.js +0 -1
  328. package/build-module/date-time/time/index.js.map +1 -1
  329. package/build-module/dimension-control/index.js +0 -1
  330. package/build-module/dimension-control/index.js.map +1 -1
  331. package/build-module/dimension-control/sizes.js +0 -1
  332. package/build-module/dimension-control/sizes.js.map +1 -1
  333. package/build-module/draggable/index.js +0 -1
  334. package/build-module/draggable/index.js.map +1 -1
  335. package/build-module/draggable/index.native.js +0 -1
  336. package/build-module/draggable/index.native.js.map +1 -1
  337. package/build-module/dropdown-menu/index.js +0 -1
  338. package/build-module/dropdown-menu/index.js.map +1 -1
  339. package/build-module/dropdown-menu/index.native.js +0 -1
  340. package/build-module/dropdown-menu/index.native.js.map +1 -1
  341. package/build-module/duotone-picker/color-list-picker/index.js +0 -1
  342. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  343. package/build-module/duotone-picker/duotone-picker.js +6 -29
  344. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  345. package/build-module/duotone-picker/utils.js +0 -1
  346. package/build-module/duotone-picker/utils.js.map +1 -1
  347. package/build-module/external-link/index.js +0 -1
  348. package/build-module/external-link/index.js.map +1 -1
  349. package/build-module/font-size-picker/font-size-picker-select.js +4 -15
  350. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  351. package/build-module/font-size-picker/font-size-picker-toggle-group.js +0 -1
  352. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  353. package/build-module/font-size-picker/index.js +0 -1
  354. package/build-module/font-size-picker/index.js.map +1 -1
  355. package/build-module/font-size-picker/index.native.js +0 -1
  356. package/build-module/font-size-picker/index.native.js.map +1 -1
  357. package/build-module/font-size-picker/types.js.map +1 -1
  358. package/build-module/font-size-picker/utils.js +0 -1
  359. package/build-module/font-size-picker/utils.js.map +1 -1
  360. package/build-module/form-token-field/index.js +0 -1
  361. package/build-module/form-token-field/index.js.map +1 -1
  362. package/build-module/form-token-field/suggestions-list.js +0 -1
  363. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  364. package/build-module/gradient-picker/index.js +6 -29
  365. package/build-module/gradient-picker/index.js.map +1 -1
  366. package/build-module/guide/index.js +0 -1
  367. package/build-module/guide/index.js.map +1 -1
  368. package/build-module/guide/page-control.js +0 -1
  369. package/build-module/guide/page-control.js.map +1 -1
  370. package/build-module/h-stack/hook.js +0 -1
  371. package/build-module/h-stack/hook.js.map +1 -1
  372. package/build-module/higher-order/navigate-regions/index.js +0 -1
  373. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  374. package/build-module/higher-order/with-fallback-styles/index.js +0 -1
  375. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  376. package/build-module/higher-order/with-filters/index.js +0 -1
  377. package/build-module/higher-order/with-filters/index.js.map +1 -1
  378. package/build-module/higher-order/with-notices/index.js +0 -1
  379. package/build-module/higher-order/with-notices/index.js.map +1 -1
  380. package/build-module/input-control/styles/input-control-styles.js +22 -22
  381. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  382. package/build-module/keyboard-shortcuts/index.js +0 -1
  383. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  384. package/build-module/menu-items-choice/index.js +0 -1
  385. package/build-module/menu-items-choice/index.js.map +1 -1
  386. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +0 -1
  387. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  388. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +0 -1
  389. package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
  390. package/build-module/mobile/bottom-sheet/picker-cell.native.js +0 -1
  391. package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
  392. package/build-module/mobile/bottom-sheet/switch-cell.native.js +1 -1
  393. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  394. package/build-module/mobile/bottom-sheet-select-control/index.native.js +0 -1
  395. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  396. package/build-module/mobile/color-settings/palette.screen.native.js +0 -1
  397. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  398. package/build-module/mobile/gradient/index.native.js +0 -1
  399. package/build-module/mobile/gradient/index.native.js.map +1 -1
  400. package/build-module/mobile/media-edit/index.native.js +0 -1
  401. package/build-module/mobile/media-edit/index.native.js.map +1 -1
  402. package/build-module/mobile/picker/index.android.js +0 -1
  403. package/build-module/mobile/picker/index.android.js.map +1 -1
  404. package/build-module/mobile/picker/index.ios.js +0 -1
  405. package/build-module/mobile/picker/index.ios.js.map +1 -1
  406. package/build-module/mobile/segmented-control/index.native.js +0 -1
  407. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  408. package/build-module/mobile/utils/get-px-from-css-unit.native.js +0 -1
  409. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  410. package/build-module/navigable-container/container.js +0 -1
  411. package/build-module/navigable-container/container.js.map +1 -1
  412. package/build-module/navigation/group/index.js +0 -1
  413. package/build-module/navigation/group/index.js.map +1 -1
  414. package/build-module/navigation/menu/menu-title-search.js +0 -1
  415. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  416. package/build-module/navigation/menu/search-no-results-found.js +0 -1
  417. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  418. package/build-module/navigator/navigator/component.js +0 -1
  419. package/build-module/navigator/navigator/component.js.map +1 -1
  420. package/build-module/navigator/navigator-screen/component.js +0 -1
  421. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  422. package/build-module/navigator/utils/router.js +0 -1
  423. package/build-module/navigator/utils/router.js.map +1 -1
  424. package/build-module/notice/index.js +0 -1
  425. package/build-module/notice/index.js.map +1 -1
  426. package/build-module/notice/list.js +0 -1
  427. package/build-module/notice/list.js.map +1 -1
  428. package/build-module/notice/list.native.js +0 -1
  429. package/build-module/notice/list.native.js.map +1 -1
  430. package/build-module/number-control/index.js +2 -2
  431. package/build-module/number-control/index.js.map +1 -1
  432. package/build-module/palette-edit/index.js +0 -1
  433. package/build-module/palette-edit/index.js.map +1 -1
  434. package/build-module/panel/actions.native.js +0 -1
  435. package/build-module/panel/actions.native.js.map +1 -1
  436. package/build-module/query-controls/index.js +0 -1
  437. package/build-module/query-controls/index.js.map +1 -1
  438. package/build-module/query-controls/terms.js +0 -1
  439. package/build-module/query-controls/terms.js.map +1 -1
  440. package/build-module/radio-control/index.js +0 -1
  441. package/build-module/radio-control/index.js.map +1 -1
  442. package/build-module/radio-control/index.native.js +0 -1
  443. package/build-module/radio-control/index.native.js.map +1 -1
  444. package/build-module/range-control/rail.js +0 -1
  445. package/build-module/range-control/rail.js.map +1 -1
  446. package/build-module/resizable-box/index.js +0 -1
  447. package/build-module/resizable-box/index.js.map +1 -1
  448. package/build-module/sandbox/index.js +0 -1
  449. package/build-module/sandbox/index.js.map +1 -1
  450. package/build-module/sandbox/index.native.js +0 -1
  451. package/build-module/sandbox/index.native.js.map +1 -1
  452. package/build-module/search-control/index.native.js +0 -1
  453. package/build-module/search-control/index.native.js.map +1 -1
  454. package/build-module/select-control/index.js +0 -1
  455. package/build-module/select-control/index.js.map +1 -1
  456. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +0 -1
  457. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  458. package/build-module/slot-fill/provider.js +0 -1
  459. package/build-module/slot-fill/provider.js.map +1 -1
  460. package/build-module/slot-fill/slot.js +0 -1
  461. package/build-module/slot-fill/slot.js.map +1 -1
  462. package/build-module/snackbar/index.js +0 -1
  463. package/build-module/snackbar/index.js.map +1 -1
  464. package/build-module/snackbar/list.js +0 -1
  465. package/build-module/snackbar/list.js.map +1 -1
  466. package/build-module/tab-panel/index.js +0 -1
  467. package/build-module/tab-panel/index.js.map +1 -1
  468. package/build-module/tabs/index.js +0 -1
  469. package/build-module/tabs/index.js.map +1 -1
  470. package/build-module/text/utils.js +0 -1
  471. package/build-module/text/utils.js.map +1 -1
  472. package/build-module/textarea-control/styles/textarea-control-styles.js +3 -3
  473. package/build-module/textarea-control/styles/textarea-control-styles.js.map +1 -1
  474. package/build-module/theme/color-algorithms.js +0 -1
  475. package/build-module/theme/color-algorithms.js.map +1 -1
  476. package/build-module/toolbar/toolbar-group/index.js +0 -1
  477. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  478. package/build-module/tools-panel/tools-panel/hook.js +0 -1
  479. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  480. package/build-module/tools-panel/tools-panel-header/component.js +0 -1
  481. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  482. package/build-module/tree-grid/index.js +0 -1
  483. package/build-module/tree-grid/index.js.map +1 -1
  484. package/build-module/tree-select/index.js +0 -1
  485. package/build-module/tree-select/index.js.map +1 -1
  486. package/build-module/unit-control/index.js +0 -1
  487. package/build-module/unit-control/index.js.map +1 -1
  488. package/build-module/unit-control/index.native.js +0 -1
  489. package/build-module/unit-control/index.native.js.map +1 -1
  490. package/build-module/unit-control/unit-select-control.js +0 -1
  491. package/build-module/unit-control/unit-select-control.js.map +1 -1
  492. package/build-module/unit-control/utils.js +0 -1
  493. package/build-module/unit-control/utils.js.map +1 -1
  494. package/build-module/utils/get-valid-children.js +0 -1
  495. package/build-module/utils/get-valid-children.js.map +1 -1
  496. package/build-module/utils/hooks/use-animated-offset-rect.js +0 -1
  497. package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -1
  498. package/build-module/utils/hooks/use-cx.js +0 -1
  499. package/build-module/utils/hooks/use-cx.js.map +1 -1
  500. package/build-module/utils/math.js +0 -1
  501. package/build-module/utils/math.js.map +1 -1
  502. package/build-module/utils/rtl.js +0 -1
  503. package/build-module/utils/rtl.js.map +1 -1
  504. package/build-module/utils/values.js +0 -1
  505. package/build-module/utils/values.js.map +1 -1
  506. package/build-module/z-stack/component.js +0 -1
  507. package/build-module/z-stack/component.js.map +1 -1
  508. package/build-style/style-rtl.css +9 -6
  509. package/build-style/style.css +10 -6
  510. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  511. package/build-types/border-control/border-control-dropdown/hook.d.ts +1 -1
  512. package/build-types/border-control/styles.d.ts +1 -1
  513. package/build-types/border-control/styles.d.ts.map +1 -1
  514. package/build-types/circular-option-picker/index.d.ts +1 -0
  515. package/build-types/circular-option-picker/index.d.ts.map +1 -1
  516. package/build-types/circular-option-picker/types.d.ts +11 -7
  517. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  518. package/build-types/circular-option-picker/utils.d.ts +17 -0
  519. package/build-types/circular-option-picker/utils.d.ts.map +1 -0
  520. package/build-types/color-palette/index.d.ts.map +1 -1
  521. package/build-types/combobox-control/index.d.ts.map +1 -1
  522. package/build-types/combobox-control/stories/index.story.d.ts +4 -0
  523. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  524. package/build-types/combobox-control/types.d.ts +7 -0
  525. package/build-types/combobox-control/types.d.ts.map +1 -1
  526. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  527. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  528. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  529. package/build-types/font-size-picker/types.d.ts +4 -0
  530. package/build-types/font-size-picker/types.d.ts.map +1 -1
  531. package/build-types/gradient-picker/index.d.ts.map +1 -1
  532. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  533. package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
  534. package/package.json +19 -19
  535. package/src/border-box-control/test/index.tsx +1 -1
  536. package/src/border-control/border-control-dropdown/component.tsx +8 -12
  537. package/src/border-control/border-control-dropdown/hook.ts +3 -3
  538. package/src/border-control/styles.ts +4 -10
  539. package/src/border-control/test/index.js +1 -1
  540. package/src/circular-option-picker/README.md +13 -0
  541. package/src/circular-option-picker/circular-option-picker.tsx +1 -1
  542. package/src/circular-option-picker/index.tsx +1 -0
  543. package/src/circular-option-picker/stories/index.story.tsx +1 -1
  544. package/src/circular-option-picker/test/index.tsx +1 -0
  545. package/src/circular-option-picker/types.ts +11 -10
  546. package/src/circular-option-picker/utils.tsx +27 -0
  547. package/src/color-palette/index.tsx +11 -29
  548. package/src/color-palette/test/index.tsx +1 -1
  549. package/src/combobox-control/README.md +9 -1
  550. package/src/combobox-control/index.tsx +4 -1
  551. package/src/combobox-control/style.scss +4 -1
  552. package/src/combobox-control/types.ts +7 -0
  553. package/src/duotone-picker/duotone-picker.tsx +10 -28
  554. package/src/font-size-picker/README.md +2 -0
  555. package/src/font-size-picker/font-size-picker-select.tsx +4 -23
  556. package/src/font-size-picker/stories/index.story.tsx +4 -0
  557. package/src/font-size-picker/test/index.tsx +2 -24
  558. package/src/font-size-picker/types.ts +4 -0
  559. package/src/gradient-picker/index.tsx +10 -28
  560. package/src/input-control/styles/input-control-styles.tsx +9 -1
  561. package/src/mobile/bottom-sheet/switch-cell.native.js +1 -1
  562. package/src/notice/README.md +1 -1
  563. package/src/notice/style.scss +1 -0
  564. package/src/number-control/README.md +1 -1
  565. package/src/number-control/index.tsx +2 -2
  566. package/src/text-control/style.scss +6 -0
  567. package/src/textarea-control/styles/textarea-control-styles.ts +0 -2
  568. package/tsconfig.tsbuildinfo +1 -1
@@ -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;AAF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A3B,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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AI,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,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  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,iBAAsC;;IAE1C;AACF;AACA;AACA;IACE,SAASC,uBAAuBA,CAAA,EAAG;MAClC,IAAKD,iBAAiB,KAAKE,SAAS,EAAG;QACtCF,iBAAiB,GAAG,IAAAG,mBAAY,EAC/BP,QAAQ,EACRE,iBACD,CAAwB;MACzB;IACD;IAEA,MAAMM,yBAAyB,SAASC,kBAAS,CAAC;MAGjDC,WAAWA,CAAEC,KAA+B,EAAG;QAC9C,KAAK,CAAEA,KAAM,CAAC;QAEdN,uBAAuB,CAAC,CAAC;MAC1B;MAEAO,iBAAiBA,CAAA,EAAG;QACnBJ,yBAAyB,CAACK,SAAS,CAACC,IAAI,CAAE,IAAK,CAAC;;QAEhD;QACA;QACA,IAAKN,yBAAyB,CAACK,SAAS,CAACE,MAAM,KAAK,CAAC,EAAG;UACvD,IAAAC,gBAAS,EAAE,aAAa,EAAEb,SAAS,EAAEc,cAAe,CAAC;UACrD,IAAAD,gBAAS,EAAE,WAAW,EAAEb,SAAS,EAAEc,cAAe,CAAC;QACpD;MACD;MAEAC,oBAAoBA,CAAA,EAAG;QACtBV,yBAAyB,CAACK,SAAS,GAClCL,yBAAyB,CAACK,SAAS,CAACM,MAAM,CACvCC,QAAQ,IAAMA,QAAQ,KAAK,IAC9B,CAAC;;QAEF;QACA;QACA,IAAKZ,yBAAyB,CAACK,SAAS,CAACE,MAAM,KAAK,CAAC,EAAG;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
+ {"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,iBAAsC;;IAE1C;AACF;AACA;AACA;IACE,SAASC,uBAAuBA,CAAA,EAAG;MAClC,IAAKD,iBAAiB,KAAKE,SAAS,EAAG;QACtCF,iBAAiB,GAAG,IAAAG,mBAAY,EAC/BP,QAAQ,EACRE,iBACD,CAAwB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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,4 +1,3 @@
1
- /* wp:polyfill */
2
1
  "use strict";
3
2
 
4
3
  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;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,EAC7B;IACD,MAAM,CAAEC,UAAU,EAAEC,aAAa,CAAE,GAAG,IAAAC,iBAAQ,EAE3C,EAAG,CAAC;IAEP,MAAMC,gBAAgB,GAAG,IAAAC,gBAAO,EAE7B,MAAM;MACR,MAAMC,YAAqE,GACxEC,MAAM,IAAM;QACb,MAAMC,WAAW,GAAGD,MAAM,CAACE,EAAE,GAC1BF,MAAM,GACN;UAAE,GAAGA,MAAM;UAAEE,E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AG,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,EAC7B;IACD,MAAM,CAAEC,UAAU,EAAEC,aAAa,CAAE,GAAG,IAAAC,iBAAQ,EAE3C,EAAG,CAAC;IAEP,MAAMC,gBAAgB,GAAG,IAAAC,gBAAO,EAE7B,MAAM;MACR,MAAMC,YAAqE,GACxEC,MAAM,IAAM;QACb,MAAMC,WAAW,GAAGD,MAAM,CAACE,EAAE,GAC1BF,MAAM,GACN;UAAE,GAAGA,MAAM;UAAEE,EAAE,EAAE,IAAAC,QAAI,EAAC;QAAE,CAAC;QAC5BR,aAAa,CAAIS,OAAO,IAAM,CAAE,GAAGA,OAAO,EAAEH,WAAW,CAAG,CAAC;MAC5D,CAAC;MAEF,OAAO;QACNF,YAAY;QACZM,iBAAiB,EAAIC,GAAG,IAAM;UAC7B;UACAP,YAAY,CAAE;YACbQ,MAAM,EAAE,OAAO;YACfC,OAAO,EAAEF;UACV,CAAE,CAAC;QACJ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