@wordpress/components 28.9.0 → 28.11.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 (1108) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/build/alignment-matrix-control/icon.js.map +1 -1
  3. package/build/alignment-matrix-control/types.js.map +1 -1
  4. package/build/alignment-matrix-control/utils.js.map +1 -1
  5. package/build/angle-picker-control/angle-circle.js.map +1 -1
  6. package/build/autocomplete/autocompleter-ui.js +5 -9
  7. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  8. package/build/autocomplete/autocompleter-ui.native.js +2 -4
  9. package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
  10. package/build/autocomplete/get-default-use-items.js.map +1 -1
  11. package/build/autocomplete/index.js +5 -5
  12. package/build/autocomplete/index.js.map +1 -1
  13. package/build/base-control/hooks.js.map +1 -1
  14. package/build/base-control/index.js.map +1 -1
  15. package/build/base-control/types.js.map +1 -1
  16. package/build/border-box-control/border-box-control/component.js +1 -0
  17. package/build/border-box-control/border-box-control/component.js.map +1 -1
  18. package/build/border-box-control/border-box-control/hook.js +6 -0
  19. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  20. package/build/border-box-control/styles.js.map +1 -1
  21. package/build/border-box-control/utils.js.map +1 -1
  22. package/build/border-control/border-control/component.js +1 -0
  23. package/build/border-control/border-control/component.js.map +1 -1
  24. package/build/border-control/border-control/hook.js +6 -0
  25. package/build/border-control/border-control/hook.js.map +1 -1
  26. package/build/border-control/border-control-dropdown/component.js +12 -12
  27. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  28. package/build/border-control/styles.js.map +1 -1
  29. package/build/box-control/axial-input-controls.js.map +1 -1
  30. package/build/box-control/icon.js.map +1 -1
  31. package/build/box-control/index.js.map +1 -1
  32. package/build/box-control/input-controls.js.map +1 -1
  33. package/build/button/index.native.js +1 -1
  34. package/build/button/index.native.js.map +1 -1
  35. package/build/card/card/component.js +1 -1
  36. package/build/card/card/component.js.map +1 -1
  37. package/build/card/styles.js.map +1 -1
  38. package/build/color-palette/index.js +1 -1
  39. package/build/color-palette/index.js.map +1 -1
  40. package/build/color-palette/index.native.js +3 -3
  41. package/build/color-palette/index.native.js.map +1 -1
  42. package/build/color-picker/index.native.js +0 -1
  43. package/build/color-picker/index.native.js.map +1 -1
  44. package/build/color-picker/styles.js.map +1 -1
  45. package/build/combobox-control/index.js +1 -1
  46. package/build/combobox-control/index.js.map +1 -1
  47. package/build/composite/legacy/index.js +5 -2
  48. package/build/composite/legacy/index.js.map +1 -1
  49. package/build/context/context-connect.js +1 -0
  50. package/build/context/context-connect.js.map +1 -1
  51. package/build/context/context-system-provider.js +1 -1
  52. package/build/context/context-system-provider.js.map +1 -1
  53. package/build/context/get-styled-class-name-from-key.js.map +1 -1
  54. package/build/custom-gradient-picker/gradient-bar/control-points.js +1 -1
  55. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  56. package/build/custom-gradient-picker/index.js.map +1 -1
  57. package/build/custom-gradient-picker/serializer.js.map +1 -1
  58. package/build/custom-gradient-picker/utils.js.map +1 -1
  59. package/build/custom-select-control-v2/styles.js.map +1 -1
  60. package/build/dashicon/index.js.map +1 -1
  61. package/build/date-time/date/index.js +0 -1
  62. package/build/date-time/date/index.js.map +1 -1
  63. package/build/date-time/date/styles.js.map +1 -1
  64. package/build/date-time/time/timezone.js.map +1 -1
  65. package/build/draggable/index.js.map +1 -1
  66. package/build/drop-zone/index.js +1 -2
  67. package/build/drop-zone/index.js.map +1 -1
  68. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  69. package/build/duotone-picker/utils.js.map +1 -1
  70. package/build/elevation/hook.js.map +1 -1
  71. package/build/external-link/index.js +20 -23
  72. package/build/external-link/index.js.map +1 -1
  73. package/build/focal-point-picker/index.js.map +1 -1
  74. package/build/focal-point-picker/index.native.js.map +1 -1
  75. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  76. package/build/font-size-picker/index.js.map +1 -1
  77. package/build/font-size-picker/index.native.js +6 -6
  78. package/build/font-size-picker/index.native.js.map +1 -1
  79. package/build/form-token-field/index.js +2 -4
  80. package/build/form-token-field/index.js.map +1 -1
  81. package/build/form-token-field/suggestions-list.js +7 -3
  82. package/build/form-token-field/suggestions-list.js.map +1 -1
  83. package/build/form-token-field/token-input.js.map +1 -1
  84. package/build/form-token-field/token.js +1 -1
  85. package/build/form-token-field/token.js.map +1 -1
  86. package/build/gradient-picker/index.js.map +1 -1
  87. package/build/grid/hook.js.map +1 -1
  88. package/build/guide/page-control.js +1 -1
  89. package/build/guide/page-control.js.map +1 -1
  90. package/build/h-stack/hook.js.map +1 -1
  91. package/build/heading/hook.js.map +1 -1
  92. package/build/input-control/index.js.map +1 -1
  93. package/build/input-control/input-base.js.map +1 -1
  94. package/build/input-control/styles/input-control-styles.js.map +1 -1
  95. package/build/item-group/styles.js.map +1 -1
  96. package/build/{dropdown-menu-v2 → menu}/checkbox-item.js +8 -8
  97. package/build/menu/checkbox-item.js.map +1 -0
  98. package/build/{dropdown-menu-v2 → menu}/context.js +2 -2
  99. package/build/menu/context.js.map +1 -0
  100. package/build/{dropdown-menu-v2 → menu}/group-label.js +5 -5
  101. package/build/menu/group-label.js.map +1 -0
  102. package/build/{dropdown-menu-v2 → menu}/group.js +5 -5
  103. package/build/menu/group.js.map +1 -0
  104. package/build/{dropdown-menu-v2 → menu}/index.js +38 -38
  105. package/build/menu/index.js.map +1 -0
  106. package/build/{dropdown-menu-v2 → menu}/item-help-text.js +3 -3
  107. package/build/menu/item-help-text.js.map +1 -0
  108. package/build/{dropdown-menu-v2 → menu}/item-label.js +3 -3
  109. package/build/menu/item-label.js.map +1 -0
  110. package/build/{dropdown-menu-v2 → menu}/item.js +7 -7
  111. package/build/menu/item.js.map +1 -0
  112. package/build/{dropdown-menu-v2 → menu}/radio-item.js +8 -8
  113. package/build/menu/radio-item.js.map +1 -0
  114. package/build/{dropdown-menu-v2 → menu}/separator.js +6 -6
  115. package/build/menu/separator.js.map +1 -0
  116. package/build/menu/styles.js +150 -0
  117. package/build/menu/styles.js.map +1 -0
  118. package/build/menu/types.js.map +1 -0
  119. package/build/menu/use-temporary-focus-visible-fix.js.map +1 -0
  120. package/build/menu-group/index.js.map +1 -1
  121. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +3 -5
  122. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  123. package/build/mobile/bottom-sheet/cell.native.js +4 -4
  124. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  125. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  126. package/build/mobile/bottom-sheet/range-cell.native.js +1 -1
  127. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  128. package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  129. package/build/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  130. package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  131. package/build/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
  132. package/build/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  133. package/build/mobile/bottom-sheet/switch-cell.native.js +4 -4
  134. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  135. package/build/mobile/bottom-sheet-select-control/index.native.js +2 -2
  136. package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  137. package/build/mobile/color-settings/index.native.js +1 -3
  138. package/build/mobile/color-settings/index.native.js.map +1 -1
  139. package/build/mobile/color-settings/picker-screen.native.js +1 -3
  140. package/build/mobile/color-settings/picker-screen.native.js.map +1 -1
  141. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  142. package/build/mobile/gradient/index.native.js.map +1 -1
  143. package/build/mobile/image/index.native.js +1 -3
  144. package/build/mobile/image/index.native.js.map +1 -1
  145. package/build/mobile/keyboard-avoiding-view/index.ios.js +1 -3
  146. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  147. package/build/mobile/link-picker/index.native.js +1 -1
  148. package/build/mobile/link-picker/index.native.js.map +1 -1
  149. package/build/mobile/link-picker/link-picker-results.native.js +2 -5
  150. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  151. package/build/mobile/link-picker/link-picker-screen.native.js +1 -3
  152. package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  153. package/build/mobile/link-settings/index.native.js +6 -18
  154. package/build/mobile/link-settings/index.native.js.map +1 -1
  155. package/build/mobile/link-settings/link-settings-screen.native.js +1 -3
  156. package/build/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  157. package/build/mobile/picker/index.android.js.map +1 -1
  158. package/build/mobile/segmented-control/index.native.js +2 -6
  159. package/build/mobile/segmented-control/index.native.js.map +1 -1
  160. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  161. package/build/mobile/utils/use-unit-converter-to-mobile.native.js +2 -6
  162. package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  163. package/build/modal/aria-helper.js +2 -1
  164. package/build/modal/aria-helper.js.map +1 -1
  165. package/build/modal/index.js +2 -1
  166. package/build/modal/index.js.map +1 -1
  167. package/build/modal/use-modal-exit-animation.js.map +1 -1
  168. package/build/navigation/group/index.js.map +1 -1
  169. package/build/navigation/index.js +1 -2
  170. package/build/navigation/index.js.map +1 -1
  171. package/build/navigation/item/base.js.map +1 -1
  172. package/build/navigation/item/use-navigation-tree-item.js +2 -2
  173. package/build/navigation/item/use-navigation-tree-item.js.map +1 -1
  174. package/build/navigation/menu/index.js.map +1 -1
  175. package/build/navigation/menu/menu-title-search.js +4 -4
  176. package/build/navigation/menu/menu-title-search.js.map +1 -1
  177. package/build/navigation/menu/menu-title.js.map +1 -1
  178. package/build/navigation/menu/use-navigation-tree-menu.js +2 -2
  179. package/build/navigation/menu/use-navigation-tree-menu.js.map +1 -1
  180. package/build/navigation/styles/navigation-styles.js.map +1 -1
  181. package/build/navigator/navigator/component.js.map +1 -1
  182. package/build/navigator/navigator-button/hook.js.map +1 -1
  183. package/build/number-control/styles/number-control-styles.js.map +1 -1
  184. package/build/palette-edit/index.js +29 -4
  185. package/build/palette-edit/index.js.map +1 -1
  186. package/build/palette-edit/styles.js +13 -28
  187. package/build/palette-edit/styles.js.map +1 -1
  188. package/build/popover/index.js +1 -1
  189. package/build/popover/index.js.map +1 -1
  190. package/build/popover/overlay-middlewares.js.map +1 -1
  191. package/build/popover/utils.js.map +1 -1
  192. package/build/private-apis.js +4 -4
  193. package/build/private-apis.js.map +1 -1
  194. package/build/progress-bar/index.js.map +1 -1
  195. package/build/progress-bar/styles.js.map +1 -1
  196. package/build/query-controls/index.js.map +1 -1
  197. package/build/query-controls/index.native.js.map +1 -1
  198. package/build/radio-control/index.js.map +1 -1
  199. package/build/radio-control/index.native.js.map +1 -1
  200. package/build/radio-group/index.js +3 -1
  201. package/build/radio-group/index.js.map +1 -1
  202. package/build/range-control/index.js.map +1 -1
  203. package/build/range-control/index.native.js.map +1 -1
  204. package/build/range-control/rail.js.map +1 -1
  205. package/build/range-control/styles/range-control-styles.js +32 -32
  206. package/build/range-control/styles/range-control-styles.js.map +1 -1
  207. package/build/range-control/tooltip.js +1 -1
  208. package/build/range-control/tooltip.js.map +1 -1
  209. package/build/range-control/utils.js.map +1 -1
  210. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  211. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  212. package/build/responsive-wrapper/index.js.map +1 -1
  213. package/build/sandbox/index.js +3 -6
  214. package/build/sandbox/index.js.map +1 -1
  215. package/build/sandbox/index.native.js +1 -3
  216. package/build/sandbox/index.native.js.map +1 -1
  217. package/build/search-control/index.js +6 -0
  218. package/build/search-control/index.js.map +1 -1
  219. package/build/search-control/index.native.js +1 -3
  220. package/build/search-control/index.native.js.map +1 -1
  221. package/build/search-control/types.js.map +1 -1
  222. package/build/select-control/index.js.map +1 -1
  223. package/build/select-control/index.native.js.map +1 -1
  224. package/build/slot-fill/bubbles-virtually/slot.js +1 -2
  225. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  226. package/build/slot-fill/fill.js +3 -6
  227. package/build/slot-fill/fill.js.map +1 -1
  228. package/build/slot-fill/index.js.map +1 -1
  229. package/build/spacer/hook.js +5 -3
  230. package/build/spacer/hook.js.map +1 -1
  231. package/build/spinner/styles.js.map +1 -1
  232. package/build/style-provider/index.js +1 -0
  233. package/build/style-provider/index.js.map +1 -1
  234. package/build/surface/hook.js.map +1 -1
  235. package/build/surface/styles.js.map +1 -1
  236. package/build/tab-panel/index.js +4 -1
  237. package/build/tab-panel/index.js.map +1 -1
  238. package/build/tabs/index.js +48 -113
  239. package/build/tabs/index.js.map +1 -1
  240. package/build/tabs/styles.js +31 -13
  241. package/build/tabs/styles.js.map +1 -1
  242. package/build/tabs/tab.js +30 -8
  243. package/build/tabs/tab.js.map +1 -1
  244. package/build/tabs/tablist.js +67 -56
  245. package/build/tabs/tablist.js.map +1 -1
  246. package/build/tabs/tabpanel.js.map +1 -1
  247. package/build/tabs/types.js.map +1 -1
  248. package/build/text/get-line-height.js.map +1 -1
  249. package/build/text/styles/text-mixins.native.js.map +1 -1
  250. package/build/text/utils.js.map +1 -1
  251. package/build/text-control/index.native.js.map +1 -1
  252. package/build/text-highlight/index.js.map +1 -1
  253. package/build/textarea-control/index.js.map +1 -1
  254. package/build/theme/color-algorithms.js.map +1 -1
  255. package/build/theme/styles.js.map +1 -1
  256. package/build/toggle-control/index.js.map +1 -1
  257. package/build/toggle-control/index.native.js.map +1 -1
  258. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +9 -1
  259. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  260. package/build/toggle-group-control/toggle-group-control/component.js +4 -61
  261. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  262. package/build/toggle-group-control/toggle-group-control-option-base/component.js +10 -10
  263. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  264. package/build/toggle-group-control/types.js.map +1 -1
  265. package/build/toolbar/toolbar/index.js +3 -0
  266. package/build/toolbar/toolbar/index.js.map +1 -1
  267. package/build/tools-panel/styles.js.map +1 -1
  268. package/build/tools-panel/tools-panel-header/component.js +1 -1
  269. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  270. package/build/tools-panel/tools-panel-item/hook.js +0 -2
  271. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  272. package/build/tooltip/index.js +5 -1
  273. package/build/tooltip/index.js.map +1 -1
  274. package/build/tooltip/index.native.js +5 -15
  275. package/build/tooltip/index.native.js.map +1 -1
  276. package/build/unit-control/index.js.map +1 -1
  277. package/build/unit-control/index.native.js +2 -6
  278. package/build/unit-control/index.native.js.map +1 -1
  279. package/build/unit-control/utils.js.map +1 -1
  280. package/build/utils/breakpoint.js.map +1 -1
  281. package/build/utils/colors-values.js.map +1 -1
  282. package/build/utils/config-values.js.map +1 -1
  283. package/build/utils/deprecated-36px-size.js +27 -0
  284. package/build/utils/deprecated-36px-size.js.map +1 -0
  285. package/build/utils/element-rect.js +13 -2
  286. package/build/utils/element-rect.js.map +1 -1
  287. package/build/utils/font-size.js.map +1 -1
  288. package/build/utils/hooks/use-animated-offset-rect.js +81 -0
  289. package/build/utils/hooks/use-animated-offset-rect.js.map +1 -0
  290. package/build/utils/hooks/use-cx.js.map +1 -1
  291. package/build/utils/hooks/use-update-effect.js +0 -2
  292. package/build/utils/hooks/use-update-effect.js.map +1 -1
  293. package/build/utils/math.js +2 -2
  294. package/build/utils/math.js.map +1 -1
  295. package/build/utils/space.js.map +1 -1
  296. package/build/utils/unit-values.js.map +1 -1
  297. package/build/utils/use-responsive-value.js.map +1 -1
  298. package/build-module/alignment-matrix-control/cell.js +1 -2
  299. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  300. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  301. package/build-module/alignment-matrix-control/types.js.map +1 -1
  302. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  303. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  304. package/build-module/angle-picker-control/index.js +1 -2
  305. package/build-module/angle-picker-control/index.js.map +1 -1
  306. package/build-module/autocomplete/autocompleter-ui.js +6 -12
  307. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  308. package/build-module/autocomplete/autocompleter-ui.native.js +3 -6
  309. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  310. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  311. package/build-module/autocomplete/index.js +6 -8
  312. package/build-module/autocomplete/index.js.map +1 -1
  313. package/build-module/base-control/hooks.js.map +1 -1
  314. package/build-module/base-control/index.js +1 -2
  315. package/build-module/base-control/index.js.map +1 -1
  316. package/build-module/base-control/index.native.js +1 -2
  317. package/build-module/base-control/index.native.js.map +1 -1
  318. package/build-module/base-control/types.js.map +1 -1
  319. package/build-module/border-box-control/border-box-control/component.js +2 -2
  320. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  321. package/build-module/border-box-control/border-box-control/hook.js +6 -0
  322. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  323. package/build-module/border-box-control/border-box-control-split-controls/component.js +1 -2
  324. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  325. package/build-module/border-box-control/styles.js.map +1 -1
  326. package/build-module/border-box-control/utils.js.map +1 -1
  327. package/build-module/border-control/border-control/component.js +2 -2
  328. package/build-module/border-control/border-control/component.js.map +1 -1
  329. package/build-module/border-control/border-control/hook.js +7 -0
  330. package/build-module/border-control/border-control/hook.js.map +1 -1
  331. package/build-module/border-control/border-control-dropdown/component.js +13 -15
  332. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  333. package/build-module/border-control/styles.js.map +1 -1
  334. package/build-module/box-control/all-input-control.js +1 -3
  335. package/build-module/box-control/all-input-control.js.map +1 -1
  336. package/build-module/box-control/axial-input-controls.js +1 -3
  337. package/build-module/box-control/axial-input-controls.js.map +1 -1
  338. package/build-module/box-control/icon.js +1 -2
  339. package/build-module/box-control/icon.js.map +1 -1
  340. package/build-module/box-control/index.js +1 -2
  341. package/build-module/box-control/index.js.map +1 -1
  342. package/build-module/box-control/input-controls.js +1 -3
  343. package/build-module/box-control/input-controls.js.map +1 -1
  344. package/build-module/button/index.js +1 -3
  345. package/build-module/button/index.js.map +1 -1
  346. package/build-module/button/index.native.js +2 -3
  347. package/build-module/button/index.native.js.map +1 -1
  348. package/build-module/card/card/component.js +2 -3
  349. package/build-module/card/card/component.js.map +1 -1
  350. package/build-module/card/styles.js.map +1 -1
  351. package/build-module/checkbox-control/index.js +1 -2
  352. package/build-module/checkbox-control/index.js.map +1 -1
  353. package/build-module/circular-option-picker/circular-option-picker-option.js +1 -2
  354. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  355. package/build-module/circular-option-picker/circular-option-picker.js +1 -2
  356. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  357. package/build-module/color-indicator/index.native.js +1 -2
  358. package/build-module/color-indicator/index.native.js.map +1 -1
  359. package/build-module/color-palette/index.js +2 -3
  360. package/build-module/color-palette/index.js.map +1 -1
  361. package/build-module/color-palette/index.native.js +4 -6
  362. package/build-module/color-palette/index.native.js.map +1 -1
  363. package/build-module/color-picker/component.js +1 -2
  364. package/build-module/color-picker/component.js.map +1 -1
  365. package/build-module/color-picker/hsl-input.js +1 -3
  366. package/build-module/color-picker/hsl-input.js.map +1 -1
  367. package/build-module/color-picker/hsv-color-picker.native.js +1 -2
  368. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -1
  369. package/build-module/color-picker/hue-picker.native.js +1 -2
  370. package/build-module/color-picker/hue-picker.native.js.map +1 -1
  371. package/build-module/color-picker/index.native.js +1 -4
  372. package/build-module/color-picker/index.native.js.map +1 -1
  373. package/build-module/color-picker/input-with-slider.js +1 -2
  374. package/build-module/color-picker/input-with-slider.js.map +1 -1
  375. package/build-module/color-picker/rgb-input.js +1 -3
  376. package/build-module/color-picker/rgb-input.js.map +1 -1
  377. package/build-module/color-picker/saturation-picker.native.js +1 -2
  378. package/build-module/color-picker/saturation-picker.native.js.map +1 -1
  379. package/build-module/color-picker/styles.js.map +1 -1
  380. package/build-module/combobox-control/index.js +2 -3
  381. package/build-module/combobox-control/index.js.map +1 -1
  382. package/build-module/composite/legacy/index.js +5 -2
  383. package/build-module/composite/legacy/index.js.map +1 -1
  384. package/build-module/confirm-dialog/component.js +1 -3
  385. package/build-module/confirm-dialog/component.js.map +1 -1
  386. package/build-module/context/context-connect.js +1 -0
  387. package/build-module/context/context-connect.js.map +1 -1
  388. package/build-module/context/context-system-provider.js +1 -1
  389. package/build-module/context/context-system-provider.js.map +1 -1
  390. package/build-module/context/get-styled-class-name-from-key.js.map +1 -1
  391. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +2 -4
  392. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  393. package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -2
  394. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  395. package/build-module/custom-gradient-picker/index.js +1 -2
  396. package/build-module/custom-gradient-picker/index.js.map +1 -1
  397. package/build-module/custom-gradient-picker/index.native.js +1 -3
  398. package/build-module/custom-gradient-picker/index.native.js.map +1 -1
  399. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  400. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  401. package/build-module/custom-select-control/index.js +1 -3
  402. package/build-module/custom-select-control/index.js.map +1 -1
  403. package/build-module/custom-select-control-v2/custom-select.js +1 -2
  404. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  405. package/build-module/custom-select-control-v2/item.js +1 -2
  406. package/build-module/custom-select-control-v2/item.js.map +1 -1
  407. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  408. package/build-module/dashicon/index.js.map +1 -1
  409. package/build-module/date-time/date/index.js +1 -3
  410. package/build-module/date-time/date/index.js.map +1 -1
  411. package/build-module/date-time/date/styles.js.map +1 -1
  412. package/build-module/date-time/date-time/index.js +1 -3
  413. package/build-module/date-time/date-time/index.js.map +1 -1
  414. package/build-module/date-time/time/index.js +1 -2
  415. package/build-module/date-time/time/index.js.map +1 -1
  416. package/build-module/date-time/time/time-input/index.js +1 -2
  417. package/build-module/date-time/time/time-input/index.js.map +1 -1
  418. package/build-module/date-time/time/timezone.js.map +1 -1
  419. package/build-module/dimension-control/index.js +1 -3
  420. package/build-module/dimension-control/index.js.map +1 -1
  421. package/build-module/draggable/index.js +1 -3
  422. package/build-module/draggable/index.js.map +1 -1
  423. package/build-module/drop-zone/index.js +2 -4
  424. package/build-module/drop-zone/index.js.map +1 -1
  425. package/build-module/dropdown/index.js +1 -2
  426. package/build-module/dropdown/index.js.map +1 -1
  427. package/build-module/dropdown/index.native.js +1 -2
  428. package/build-module/dropdown/index.native.js.map +1 -1
  429. package/build-module/dropdown-menu/index.js +1 -2
  430. package/build-module/dropdown-menu/index.js.map +1 -1
  431. package/build-module/dropdown-menu/index.native.js +1 -2
  432. package/build-module/dropdown-menu/index.native.js.map +1 -1
  433. package/build-module/duotone-picker/color-list-picker/index.js +1 -3
  434. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  435. package/build-module/duotone-picker/duotone-picker.js +1 -2
  436. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  437. package/build-module/duotone-picker/utils.js.map +1 -1
  438. package/build-module/elevation/hook.js.map +1 -1
  439. package/build-module/external-link/index.js +21 -25
  440. package/build-module/external-link/index.js.map +1 -1
  441. package/build-module/external-link/index.native.js +1 -2
  442. package/build-module/external-link/index.native.js.map +1 -1
  443. package/build-module/focal-point-picker/controls.js +1 -2
  444. package/build-module/focal-point-picker/controls.js.map +1 -1
  445. package/build-module/focal-point-picker/focal-point.native.js +1 -2
  446. package/build-module/focal-point-picker/focal-point.native.js.map +1 -1
  447. package/build-module/focal-point-picker/grid.js +1 -2
  448. package/build-module/focal-point-picker/grid.js.map +1 -1
  449. package/build-module/focal-point-picker/index.js +1 -2
  450. package/build-module/focal-point-picker/index.js.map +1 -1
  451. package/build-module/focal-point-picker/index.native.js +1 -2
  452. package/build-module/focal-point-picker/index.native.js.map +1 -1
  453. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  454. package/build-module/focal-point-picker/tooltip/index.native.js +1 -2
  455. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  456. package/build-module/font-size-picker/index.js +1 -2
  457. package/build-module/font-size-picker/index.js.map +1 -1
  458. package/build-module/font-size-picker/index.native.js +8 -10
  459. package/build-module/font-size-picker/index.native.js.map +1 -1
  460. package/build-module/form-file-upload/index.js +1 -2
  461. package/build-module/form-file-upload/index.js.map +1 -1
  462. package/build-module/form-toggle/index.js +1 -2
  463. package/build-module/form-toggle/index.js.map +1 -1
  464. package/build-module/form-token-field/index.js +3 -6
  465. package/build-module/form-token-field/index.js.map +1 -1
  466. package/build-module/form-token-field/suggestions-list.js +8 -5
  467. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  468. package/build-module/form-token-field/token-input.js.map +1 -1
  469. package/build-module/form-token-field/token.js +2 -3
  470. package/build-module/form-token-field/token.js.map +1 -1
  471. package/build-module/gradient-picker/index.js +1 -2
  472. package/build-module/gradient-picker/index.js.map +1 -1
  473. package/build-module/grid/hook.js.map +1 -1
  474. package/build-module/guide/index.js +1 -2
  475. package/build-module/guide/index.js.map +1 -1
  476. package/build-module/guide/page-control.js +1 -1
  477. package/build-module/guide/page-control.js.map +1 -1
  478. package/build-module/h-stack/hook.js.map +1 -1
  479. package/build-module/heading/hook.js.map +1 -1
  480. package/build-module/higher-order/with-fallback-styles/index.js +3 -4
  481. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  482. package/build-module/input-control/index.js.map +1 -1
  483. package/build-module/input-control/input-base.js +1 -2
  484. package/build-module/input-control/input-base.js.map +1 -1
  485. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  486. package/build-module/item-group/styles.js.map +1 -1
  487. package/build-module/keyboard-shortcuts/index.js +1 -3
  488. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  489. package/build-module/{dropdown-menu-v2 → menu}/checkbox-item.js +9 -10
  490. package/build-module/menu/checkbox-item.js.map +1 -0
  491. package/build-module/{dropdown-menu-v2 → menu}/context.js +1 -1
  492. package/build-module/menu/context.js.map +1 -0
  493. package/build-module/{dropdown-menu-v2 → menu}/group-label.js +5 -5
  494. package/build-module/menu/group-label.js.map +1 -0
  495. package/build-module/menu/group.js +21 -0
  496. package/build-module/menu/group.js.map +1 -0
  497. package/build-module/{dropdown-menu-v2 → menu}/index.js +47 -49
  498. package/build-module/menu/index.js.map +1 -0
  499. package/build-module/{dropdown-menu-v2 → menu}/item-help-text.js +2 -2
  500. package/build-module/menu/item-help-text.js.map +1 -0
  501. package/build-module/{dropdown-menu-v2 → menu}/item-label.js +2 -2
  502. package/build-module/menu/item-label.js.map +1 -0
  503. package/build-module/{dropdown-menu-v2 → menu}/item.js +8 -9
  504. package/build-module/menu/item.js.map +1 -0
  505. package/build-module/{dropdown-menu-v2 → menu}/radio-item.js +9 -10
  506. package/build-module/menu/radio-item.js.map +1 -0
  507. package/build-module/menu/separator.js +22 -0
  508. package/build-module/menu/separator.js.map +1 -0
  509. package/build-module/menu/styles.js +143 -0
  510. package/build-module/menu/styles.js.map +1 -0
  511. package/build-module/menu/types.js.map +1 -0
  512. package/build-module/menu/use-temporary-focus-visible-fix.js.map +1 -0
  513. package/build-module/menu-group/index.js +1 -2
  514. package/build-module/menu-group/index.js.map +1 -1
  515. package/build-module/menu-item/index.js +1 -2
  516. package/build-module/menu-item/index.js.map +1 -1
  517. package/build-module/menu-items-choice/index.js +1 -2
  518. package/build-module/menu-items-choice/index.js.map +1 -1
  519. package/build-module/mobile/badge/index.native.js +1 -3
  520. package/build-module/mobile/badge/index.native.js.map +1 -1
  521. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +4 -7
  522. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  523. package/build-module/mobile/bottom-sheet/cell.native.js +5 -6
  524. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  525. package/build-module/mobile/bottom-sheet/color-cell.native.js +1 -2
  526. package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  527. package/build-module/mobile/bottom-sheet/index.native.js +1 -3
  528. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  529. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -2
  530. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  531. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -2
  532. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  533. package/build-module/mobile/bottom-sheet/range-cell.native.js +2 -3
  534. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  535. package/build-module/mobile/bottom-sheet/range-text-input.native.js +1 -2
  536. package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  537. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +2 -3
  538. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  539. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js +1 -2
  540. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
  541. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js +1 -2
  542. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
  543. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js +2 -6
  544. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  545. package/build-module/mobile/bottom-sheet/switch-cell.native.js +4 -4
  546. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  547. package/build-module/mobile/bottom-sheet-select-control/index.native.js +3 -5
  548. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  549. package/build-module/mobile/bottom-sheet-text-control/index.native.js +1 -3
  550. package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  551. package/build-module/mobile/color-settings/gradient-picker-screen.native.js +1 -2
  552. package/build-module/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
  553. package/build-module/mobile/color-settings/index.native.js +2 -5
  554. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  555. package/build-module/mobile/color-settings/palette.screen.native.js +1 -3
  556. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  557. package/build-module/mobile/color-settings/picker-screen.native.js +1 -3
  558. package/build-module/mobile/color-settings/picker-screen.native.js.map +1 -1
  559. package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
  560. package/build-module/mobile/focal-point-settings-panel/index.native.js +1 -2
  561. package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  562. package/build-module/mobile/gradient/index.native.js +1 -2
  563. package/build-module/mobile/gradient/index.native.js.map +1 -1
  564. package/build-module/mobile/html-text-input/index.native.js +1 -2
  565. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  566. package/build-module/mobile/image/icon-retry.native.js +1 -2
  567. package/build-module/mobile/image/icon-retry.native.js.map +1 -1
  568. package/build-module/mobile/image/image-editing-button.native.js +1 -2
  569. package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
  570. package/build-module/mobile/image/index.native.js +2 -6
  571. package/build-module/mobile/image/index.native.js.map +1 -1
  572. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +2 -5
  573. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  574. package/build-module/mobile/link-picker/index.native.js +2 -3
  575. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  576. package/build-module/mobile/link-picker/link-picker-results.native.js +2 -5
  577. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  578. package/build-module/mobile/link-picker/link-picker-screen.native.js +1 -3
  579. package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  580. package/build-module/mobile/link-settings/index.native.js +7 -21
  581. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  582. package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -2
  583. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  584. package/build-module/mobile/link-settings/link-settings-screen.native.js +1 -3
  585. package/build-module/mobile/link-settings/link-settings-screen.native.js.map +1 -1
  586. package/build-module/mobile/picker/index.android.js +1 -2
  587. package/build-module/mobile/picker/index.android.js.map +1 -1
  588. package/build-module/mobile/segmented-control/index.native.js +3 -8
  589. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  590. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  591. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js +2 -6
  592. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  593. package/build-module/modal/aria-helper.js +2 -1
  594. package/build-module/modal/aria-helper.js.map +1 -1
  595. package/build-module/modal/index.js +3 -4
  596. package/build-module/modal/index.js.map +1 -1
  597. package/build-module/modal/use-modal-exit-animation.js.map +1 -1
  598. package/build-module/navigation/back-button/index.js +1 -2
  599. package/build-module/navigation/back-button/index.js.map +1 -1
  600. package/build-module/navigation/group/index.js +1 -2
  601. package/build-module/navigation/group/index.js.map +1 -1
  602. package/build-module/navigation/index.js +1 -2
  603. package/build-module/navigation/index.js.map +1 -1
  604. package/build-module/navigation/item/base-content.js +1 -3
  605. package/build-module/navigation/item/base-content.js.map +1 -1
  606. package/build-module/navigation/item/base.js.map +1 -1
  607. package/build-module/navigation/item/index.js +1 -2
  608. package/build-module/navigation/item/index.js.map +1 -1
  609. package/build-module/navigation/item/use-navigation-tree-item.js +2 -2
  610. package/build-module/navigation/item/use-navigation-tree-item.js.map +1 -1
  611. package/build-module/navigation/menu/index.js +1 -2
  612. package/build-module/navigation/menu/index.js.map +1 -1
  613. package/build-module/navigation/menu/menu-title-search.js +4 -4
  614. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  615. package/build-module/navigation/menu/menu-title.js +1 -2
  616. package/build-module/navigation/menu/menu-title.js.map +1 -1
  617. package/build-module/navigation/menu/search-no-results-found.js +1 -2
  618. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  619. package/build-module/navigation/menu/use-navigation-tree-menu.js +2 -2
  620. package/build-module/navigation/menu/use-navigation-tree-menu.js.map +1 -1
  621. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  622. package/build-module/navigator/navigator/component.js.map +1 -1
  623. package/build-module/navigator/navigator-button/hook.js.map +1 -1
  624. package/build-module/notice/index.js +1 -2
  625. package/build-module/notice/index.js.map +1 -1
  626. package/build-module/notice/index.native.js +1 -3
  627. package/build-module/notice/index.native.js.map +1 -1
  628. package/build-module/number-control/index.js +1 -3
  629. package/build-module/number-control/index.js.map +1 -1
  630. package/build-module/number-control/styles/number-control-styles.js.map +1 -1
  631. package/build-module/palette-edit/index.js +31 -9
  632. package/build-module/palette-edit/index.js.map +1 -1
  633. package/build-module/palette-edit/styles.js +13 -29
  634. package/build-module/palette-edit/styles.js.map +1 -1
  635. package/build-module/panel/actions.native.js +1 -2
  636. package/build-module/panel/actions.native.js.map +1 -1
  637. package/build-module/panel/body.js +1 -2
  638. package/build-module/panel/body.js.map +1 -1
  639. package/build-module/panel/body.native.js +1 -2
  640. package/build-module/panel/body.native.js.map +1 -1
  641. package/build-module/panel/header.js +1 -2
  642. package/build-module/panel/header.js.map +1 -1
  643. package/build-module/panel/index.js +1 -2
  644. package/build-module/panel/index.js.map +1 -1
  645. package/build-module/placeholder/index.js +1 -2
  646. package/build-module/placeholder/index.js.map +1 -1
  647. package/build-module/popover/index.js +2 -4
  648. package/build-module/popover/index.js.map +1 -1
  649. package/build-module/popover/overlay-middlewares.js.map +1 -1
  650. package/build-module/popover/utils.js.map +1 -1
  651. package/build-module/private-apis.js +3 -3
  652. package/build-module/private-apis.js.map +1 -1
  653. package/build-module/progress-bar/index.js +1 -2
  654. package/build-module/progress-bar/index.js.map +1 -1
  655. package/build-module/progress-bar/styles.js.map +1 -1
  656. package/build-module/query-controls/index.js.map +1 -1
  657. package/build-module/query-controls/index.native.js +1 -3
  658. package/build-module/query-controls/index.native.js.map +1 -1
  659. package/build-module/radio-control/index.js +1 -2
  660. package/build-module/radio-control/index.js.map +1 -1
  661. package/build-module/radio-control/index.native.js +1 -2
  662. package/build-module/radio-control/index.native.js.map +1 -1
  663. package/build-module/radio-group/index.js +3 -1
  664. package/build-module/radio-group/index.js.map +1 -1
  665. package/build-module/range-control/index.js +1 -2
  666. package/build-module/range-control/index.js.map +1 -1
  667. package/build-module/range-control/index.native.js.map +1 -1
  668. package/build-module/range-control/mark.js +1 -3
  669. package/build-module/range-control/mark.js.map +1 -1
  670. package/build-module/range-control/rail.js +1 -3
  671. package/build-module/range-control/rail.js.map +1 -1
  672. package/build-module/range-control/styles/range-control-styles.js +32 -32
  673. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  674. package/build-module/range-control/tooltip.js +1 -1
  675. package/build-module/range-control/tooltip.js.map +1 -1
  676. package/build-module/range-control/utils.js.map +1 -1
  677. package/build-module/resizable-box/index.js +1 -2
  678. package/build-module/resizable-box/index.js.map +1 -1
  679. package/build-module/resizable-box/resize-tooltip/index.js +1 -2
  680. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  681. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  682. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  683. package/build-module/responsive-wrapper/index.js.map +1 -1
  684. package/build-module/sandbox/index.js +4 -8
  685. package/build-module/sandbox/index.js.map +1 -1
  686. package/build-module/sandbox/index.native.js +2 -5
  687. package/build-module/sandbox/index.native.js.map +1 -1
  688. package/build-module/search-control/index.js +6 -0
  689. package/build-module/search-control/index.js.map +1 -1
  690. package/build-module/search-control/index.native.js +2 -5
  691. package/build-module/search-control/index.native.js.map +1 -1
  692. package/build-module/search-control/types.js.map +1 -1
  693. package/build-module/select-control/index.js.map +1 -1
  694. package/build-module/select-control/index.native.js.map +1 -1
  695. package/build-module/slot-fill/bubbles-virtually/slot.js +1 -2
  696. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  697. package/build-module/slot-fill/fill.js +3 -6
  698. package/build-module/slot-fill/fill.js.map +1 -1
  699. package/build-module/slot-fill/index.js +1 -3
  700. package/build-module/slot-fill/index.js.map +1 -1
  701. package/build-module/slot-fill/slot.js +1 -2
  702. package/build-module/slot-fill/slot.js.map +1 -1
  703. package/build-module/snackbar/index.js +1 -2
  704. package/build-module/snackbar/index.js.map +1 -1
  705. package/build-module/snackbar/list.js +1 -2
  706. package/build-module/snackbar/list.js.map +1 -1
  707. package/build-module/spacer/hook.js +5 -3
  708. package/build-module/spacer/hook.js.map +1 -1
  709. package/build-module/spinner/index.js +1 -2
  710. package/build-module/spinner/index.js.map +1 -1
  711. package/build-module/spinner/styles.js.map +1 -1
  712. package/build-module/style-provider/index.js +1 -0
  713. package/build-module/style-provider/index.js.map +1 -1
  714. package/build-module/surface/hook.js.map +1 -1
  715. package/build-module/surface/styles.js.map +1 -1
  716. package/build-module/tab-panel/index.js +5 -3
  717. package/build-module/tab-panel/index.js.map +1 -1
  718. package/build-module/tabs/index.js +47 -112
  719. package/build-module/tabs/index.js.map +1 -1
  720. package/build-module/tabs/styles.js +29 -7
  721. package/build-module/tabs/styles.js.map +1 -1
  722. package/build-module/tabs/tab.js +30 -10
  723. package/build-module/tabs/tab.js.map +1 -1
  724. package/build-module/tabs/tablist.js +67 -56
  725. package/build-module/tabs/tablist.js.map +1 -1
  726. package/build-module/tabs/tabpanel.js.map +1 -1
  727. package/build-module/tabs/types.js.map +1 -1
  728. package/build-module/text/get-line-height.js.map +1 -1
  729. package/build-module/text/styles/text-mixins.native.js.map +1 -1
  730. package/build-module/text/utils.js.map +1 -1
  731. package/build-module/text-control/index.native.js.map +1 -1
  732. package/build-module/text-highlight/index.js +1 -2
  733. package/build-module/text-highlight/index.js.map +1 -1
  734. package/build-module/textarea-control/index.js.map +1 -1
  735. package/build-module/theme/color-algorithms.js.map +1 -1
  736. package/build-module/theme/styles.js.map +1 -1
  737. package/build-module/tip/index.js +1 -2
  738. package/build-module/tip/index.js.map +1 -1
  739. package/build-module/toggle-control/index.js +1 -2
  740. package/build-module/toggle-control/index.js.map +1 -1
  741. package/build-module/toggle-control/index.native.js.map +1 -1
  742. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +10 -2
  743. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  744. package/build-module/toggle-group-control/toggle-group-control/component.js +6 -66
  745. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  746. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +11 -12
  747. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  748. package/build-module/toggle-group-control/types.js.map +1 -1
  749. package/build-module/toolbar/toolbar/index.js +3 -0
  750. package/build-module/toolbar/toolbar/index.js.map +1 -1
  751. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js +2 -2
  752. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
  753. package/build-module/toolbar/toolbar-group/index.js +1 -2
  754. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  755. package/build-module/tools-panel/styles.js.map +1 -1
  756. package/build-module/tools-panel/tools-panel/component.js +1 -2
  757. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  758. package/build-module/tools-panel/tools-panel-header/component.js +2 -4
  759. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  760. package/build-module/tools-panel/tools-panel-item/hook.js +0 -2
  761. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  762. package/build-module/tooltip/index.js +6 -3
  763. package/build-module/tooltip/index.js.map +1 -1
  764. package/build-module/tooltip/index.native.js +6 -18
  765. package/build-module/tooltip/index.native.js.map +1 -1
  766. package/build-module/tree-grid/cell.js +1 -2
  767. package/build-module/tree-grid/cell.js.map +1 -1
  768. package/build-module/unit-control/index.js.map +1 -1
  769. package/build-module/unit-control/index.native.js +3 -9
  770. package/build-module/unit-control/index.native.js.map +1 -1
  771. package/build-module/unit-control/utils.js.map +1 -1
  772. package/build-module/utils/breakpoint.js.map +1 -1
  773. package/build-module/utils/colors-values.js.map +1 -1
  774. package/build-module/utils/config-values.js.map +1 -1
  775. package/build-module/utils/deprecated-36px-size.js +19 -0
  776. package/build-module/utils/deprecated-36px-size.js.map +1 -0
  777. package/build-module/utils/element-rect.js +13 -2
  778. package/build-module/utils/element-rect.js.map +1 -1
  779. package/build-module/utils/font-size.js.map +1 -1
  780. package/build-module/utils/hooks/use-animated-offset-rect.js +75 -0
  781. package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -0
  782. package/build-module/utils/hooks/use-cx.js.map +1 -1
  783. package/build-module/utils/hooks/use-update-effect.js +0 -2
  784. package/build-module/utils/hooks/use-update-effect.js.map +1 -1
  785. package/build-module/utils/math.js +2 -2
  786. package/build-module/utils/math.js.map +1 -1
  787. package/build-module/utils/space.js.map +1 -1
  788. package/build-module/utils/unit-values.js.map +1 -1
  789. package/build-module/utils/use-responsive-value.js.map +1 -1
  790. package/build-style/style-rtl.css +14 -11
  791. package/build-style/style.css +14 -11
  792. package/build-types/alignment-matrix-control/types.d.ts +2 -0
  793. package/build-types/alignment-matrix-control/types.d.ts.map +1 -1
  794. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  795. package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
  796. package/build-types/autocomplete/index.d.ts.map +1 -1
  797. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  798. package/build-types/base-control/types.d.ts +3 -0
  799. package/build-types/base-control/types.d.ts.map +1 -1
  800. package/build-types/border-box-control/border-box-control/component.d.ts +1 -0
  801. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  802. package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
  803. package/build-types/border-control/border-control/component.d.ts +1 -0
  804. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  805. package/build-types/border-control/border-control/hook.d.ts.map +1 -1
  806. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  807. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  808. package/build-types/button/stories/index.story.d.ts.map +1 -1
  809. package/build-types/card/stories/index.story.d.ts.map +1 -1
  810. package/build-types/composite/legacy/index.d.ts.map +1 -1
  811. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  812. package/build-types/date-time/date/index.d.ts.map +1 -1
  813. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  814. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  815. package/build-types/drop-zone/index.d.ts.map +1 -1
  816. package/build-types/form-token-field/index.d.ts.map +1 -1
  817. package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
  818. package/build-types/item-group/stories/index.story.d.ts +1 -1
  819. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  820. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  821. package/build-types/menu/checkbox-item.d.ts +3 -0
  822. package/build-types/menu/checkbox-item.d.ts.map +1 -0
  823. package/build-types/menu/context.d.ts +6 -0
  824. package/build-types/menu/context.d.ts.map +1 -0
  825. package/build-types/menu/group-label.d.ts +3 -0
  826. package/build-types/menu/group-label.d.ts.map +1 -0
  827. package/build-types/menu/group.d.ts +3 -0
  828. package/build-types/menu/group.d.ts.map +1 -0
  829. package/build-types/menu/index.d.ts +40 -0
  830. package/build-types/menu/index.d.ts.map +1 -0
  831. package/build-types/{dropdown-menu-v2 → menu}/item-help-text.d.ts +1 -1
  832. package/build-types/menu/item-help-text.d.ts.map +1 -0
  833. package/build-types/{dropdown-menu-v2 → menu}/item-label.d.ts +1 -1
  834. package/build-types/menu/item-label.d.ts.map +1 -0
  835. package/build-types/menu/item.d.ts +3 -0
  836. package/build-types/menu/item.d.ts.map +1 -0
  837. package/build-types/menu/radio-item.d.ts +3 -0
  838. package/build-types/menu/radio-item.d.ts.map +1 -0
  839. package/build-types/menu/separator.d.ts +3 -0
  840. package/build-types/menu/separator.d.ts.map +1 -0
  841. package/build-types/menu/stories/index.story.d.ts +16 -0
  842. package/build-types/menu/stories/index.story.d.ts.map +1 -0
  843. package/build-types/{dropdown-menu-v2 → menu}/styles.d.ts +13 -13
  844. package/build-types/menu/styles.d.ts.map +1 -0
  845. package/build-types/menu/test/index.d.ts.map +1 -0
  846. package/build-types/{dropdown-menu-v2 → menu}/types.d.ts +22 -21
  847. package/build-types/menu/types.d.ts.map +1 -0
  848. package/build-types/menu/use-temporary-focus-visible-fix.d.ts.map +1 -0
  849. package/build-types/modal/aria-helper.d.ts.map +1 -1
  850. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  851. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  852. package/build-types/navigation/index.d.ts.map +1 -1
  853. package/build-types/palette-edit/index.d.ts +3 -0
  854. package/build-types/palette-edit/index.d.ts.map +1 -1
  855. package/build-types/palette-edit/styles.d.ts +0 -256
  856. package/build-types/palette-edit/styles.d.ts.map +1 -1
  857. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  858. package/build-types/radio-group/index.d.ts.map +1 -1
  859. package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
  860. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  861. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  862. package/build-types/sandbox/index.d.ts.map +1 -1
  863. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  864. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  865. package/build-types/search-control/index.d.ts.map +1 -1
  866. package/build-types/search-control/stories/index.story.d.ts +0 -8
  867. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  868. package/build-types/search-control/types.d.ts +3 -0
  869. package/build-types/search-control/types.d.ts.map +1 -1
  870. package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
  871. package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
  872. package/build-types/slot-fill/fill.d.ts.map +1 -1
  873. package/build-types/slot-fill/stories/index.story.d.ts.map +1 -1
  874. package/build-types/spacer/hook.d.ts.map +1 -1
  875. package/build-types/tab-panel/index.d.ts.map +1 -1
  876. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  877. package/build-types/tabs/index.d.ts +21 -8
  878. package/build-types/tabs/index.d.ts.map +1 -1
  879. package/build-types/tabs/stories/index.story.d.ts +1 -1
  880. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  881. package/build-types/tabs/styles.d.ts +13 -3
  882. package/build-types/tabs/styles.d.ts.map +1 -1
  883. package/build-types/tabs/tab.d.ts +0 -3
  884. package/build-types/tabs/tab.d.ts.map +1 -1
  885. package/build-types/tabs/tablist.d.ts.map +1 -1
  886. package/build-types/tabs/types.d.ts +85 -48
  887. package/build-types/tabs/types.d.ts.map +1 -1
  888. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  889. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  890. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  891. package/build-types/toggle-group-control/types.d.ts +1 -0
  892. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  893. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  894. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  895. package/build-types/tooltip/index.d.ts.map +1 -1
  896. package/build-types/utils/deprecated-36px-size.d.ts +6 -0
  897. package/build-types/utils/deprecated-36px-size.d.ts.map +1 -0
  898. package/build-types/utils/element-rect.d.ts +1 -1
  899. package/build-types/utils/element-rect.d.ts.map +1 -1
  900. package/build-types/utils/hooks/use-animated-offset-rect.d.ts +69 -0
  901. package/build-types/utils/hooks/use-animated-offset-rect.d.ts.map +1 -0
  902. package/build-types/utils/hooks/use-update-effect.d.ts.map +1 -1
  903. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  904. package/package.json +21 -20
  905. package/schemas/docs-manifest.json +38 -0
  906. package/src/alignment-matrix-control/README.md +45 -36
  907. package/src/alignment-matrix-control/docs-manifest.json +12 -0
  908. package/src/alignment-matrix-control/types.ts +2 -0
  909. package/src/angle-picker-control/README.md +35 -23
  910. package/src/angle-picker-control/docs-manifest.json +5 -0
  911. package/src/animate/stories/index.story.tsx +2 -1
  912. package/src/autocomplete/autocompleter-ui.native.js +2 -4
  913. package/src/autocomplete/autocompleter-ui.tsx +2 -6
  914. package/src/autocomplete/index.tsx +4 -5
  915. package/src/base-control/README.md +58 -47
  916. package/src/base-control/docs-manifest.json +12 -0
  917. package/src/base-control/stories/index.story.tsx +4 -0
  918. package/src/base-control/types.ts +3 -0
  919. package/src/border-box-control/border-box-control/README.md +1 -0
  920. package/src/border-box-control/border-box-control/component.tsx +1 -0
  921. package/src/border-box-control/border-box-control/hook.ts +7 -0
  922. package/src/border-box-control/stories/index.story.tsx +1 -0
  923. package/src/border-box-control/test/index.tsx +1 -0
  924. package/src/border-control/border-control/README.md +1 -0
  925. package/src/border-control/border-control/component.tsx +1 -0
  926. package/src/border-control/border-control/hook.ts +7 -1
  927. package/src/border-control/border-control-dropdown/component.tsx +24 -12
  928. package/src/border-control/stories/index.story.tsx +1 -0
  929. package/src/border-control/test/index.js +1 -0
  930. package/src/button/stories/index.story.tsx +2 -1
  931. package/src/button/style.scss +5 -1
  932. package/src/card/stories/index.story.tsx +2 -1
  933. package/src/color-palette/index.native.js +1 -2
  934. package/src/color-palette/index.tsx +1 -1
  935. package/src/color-palette/style.scss +2 -4
  936. package/src/color-picker/index.native.js +0 -1
  937. package/src/composite/legacy/index.tsx +5 -2
  938. package/src/composite/stories/index.story.tsx +2 -1
  939. package/src/composite/test/index.tsx +629 -38
  940. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +1 -1
  941. package/src/date-time/date/index.tsx +0 -1
  942. package/src/disabled/stories/index.story.tsx +2 -1
  943. package/src/draggable/stories/index.story.tsx +2 -1
  944. package/src/drop-zone/index.tsx +1 -2
  945. package/src/drop-zone/style.scss +1 -1
  946. package/src/font-size-picker/index.native.js +7 -7
  947. package/src/form-token-field/index.tsx +0 -3
  948. package/src/form-token-field/style.scss +4 -1
  949. package/src/form-token-field/suggestions-list.tsx +6 -0
  950. package/src/item-group/stories/index.story.tsx +8 -4
  951. package/src/keyboard-shortcuts/stories/index.story.tsx +2 -1
  952. package/src/{dropdown-menu-v2 → menu}/README.md +34 -34
  953. package/src/{dropdown-menu-v2 → menu}/checkbox-item.tsx +14 -14
  954. package/src/menu/context.tsx +13 -0
  955. package/src/{dropdown-menu-v2 → menu}/group-label.tsx +8 -8
  956. package/src/menu/group.tsx +26 -0
  957. package/src/{dropdown-menu-v2 → menu}/index.tsx +65 -70
  958. package/src/{dropdown-menu-v2 → menu}/item-help-text.tsx +3 -7
  959. package/src/{dropdown-menu-v2 → menu}/item-label.tsx +3 -7
  960. package/src/{dropdown-menu-v2 → menu}/item.tsx +13 -13
  961. package/src/{dropdown-menu-v2 → menu}/radio-item.tsx +14 -14
  962. package/src/menu/separator.tsx +27 -0
  963. package/src/menu/stories/index.story.tsx +542 -0
  964. package/src/{dropdown-menu-v2 → menu}/styles.ts +17 -17
  965. package/src/{dropdown-menu-v2 → menu}/test/index.tsx +145 -225
  966. package/src/{dropdown-menu-v2 → menu}/types.ts +24 -23
  967. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +3 -5
  968. package/src/mobile/bottom-sheet/range-cell.native.js +1 -1
  969. package/src/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  970. package/src/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
  971. package/src/mobile/bottom-sheet-select-control/index.native.js +2 -2
  972. package/src/mobile/color-settings/index.native.js +1 -3
  973. package/src/mobile/color-settings/picker-screen.native.js +1 -3
  974. package/src/mobile/image/index.native.js +1 -3
  975. package/src/mobile/keyboard-avoiding-view/index.ios.js +1 -3
  976. package/src/mobile/link-picker/link-picker-results.native.js +2 -5
  977. package/src/mobile/link-picker/link-picker-screen.native.js +1 -3
  978. package/src/mobile/link-settings/index.native.js +6 -18
  979. package/src/mobile/link-settings/link-settings-screen.native.js +1 -3
  980. package/src/mobile/segmented-control/index.native.js +2 -6
  981. package/src/mobile/utils/use-unit-converter-to-mobile.native.js +2 -6
  982. package/src/modal/aria-helper.ts +1 -0
  983. package/src/navigable-container/stories/navigable-menu.story.tsx +2 -1
  984. package/src/navigable-container/stories/tabbable-container.story.tsx +2 -1
  985. package/src/navigation/index.tsx +1 -2
  986. package/src/navigation/item/use-navigation-tree-item.tsx +2 -2
  987. package/src/navigation/menu/menu-title-search.tsx +2 -2
  988. package/src/navigation/menu/use-navigation-tree-menu.tsx +2 -2
  989. package/src/palette-edit/index.tsx +34 -10
  990. package/src/palette-edit/styles.ts +1 -67
  991. package/src/palette-edit/test/index.tsx +50 -1
  992. package/src/panel/stories/index.story.tsx +2 -1
  993. package/src/private-apis.ts +3 -3
  994. package/src/radio-group/index.tsx +2 -0
  995. package/src/range-control/styles/range-control-styles.ts +19 -10
  996. package/src/range-control/tooltip.tsx +1 -1
  997. package/src/resizable-box/stories/index.story.tsx +2 -1
  998. package/src/sandbox/index.native.js +1 -3
  999. package/src/sandbox/index.tsx +3 -6
  1000. package/src/sandbox/stories/index.story.tsx +2 -1
  1001. package/src/scroll-lock/stories/index.story.tsx +2 -1
  1002. package/src/search-control/README.md +2 -0
  1003. package/src/search-control/index.native.js +1 -3
  1004. package/src/search-control/index.tsx +7 -0
  1005. package/src/search-control/stories/index.story.tsx +0 -15
  1006. package/src/search-control/test/index.tsx +4 -1
  1007. package/src/search-control/types.ts +3 -0
  1008. package/src/shortcut/stories/index.story.tsx +2 -1
  1009. package/src/slot-fill/bubbles-virtually/slot.tsx +1 -2
  1010. package/src/slot-fill/fill.ts +3 -6
  1011. package/src/slot-fill/stories/index.story.tsx +2 -1
  1012. package/src/spacer/hook.ts +3 -2
  1013. package/src/tab-panel/index.tsx +3 -0
  1014. package/src/tab-panel/stories/index.story.tsx +2 -1
  1015. package/src/tab-panel/style.scss +1 -3
  1016. package/src/tabs/README.md +63 -21
  1017. package/src/tabs/index.tsx +112 -189
  1018. package/src/tabs/stories/index.story.tsx +5 -2
  1019. package/src/tabs/styles.ts +123 -46
  1020. package/src/tabs/tab.tsx +31 -5
  1021. package/src/tabs/tablist.tsx +74 -59
  1022. package/src/tabs/test/index.tsx +131 -118
  1023. package/src/tabs/types.ts +89 -49
  1024. package/src/theme/stories/index.story.tsx +2 -1
  1025. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +6 -6
  1026. package/src/toggle-group-control/test/index.tsx +39 -0
  1027. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +11 -1
  1028. package/src/toggle-group-control/toggle-group-control/component.tsx +4 -98
  1029. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +15 -15
  1030. package/src/toggle-group-control/types.ts +1 -0
  1031. package/src/toolbar/toolbar/index.tsx +3 -0
  1032. package/src/tools-panel/tools-panel-header/component.tsx +1 -1
  1033. package/src/tools-panel/tools-panel-item/hook.ts +0 -2
  1034. package/src/tooltip/index.native.js +5 -15
  1035. package/src/tooltip/index.tsx +8 -1
  1036. package/src/tooltip/test/index.tsx +78 -0
  1037. package/src/unit-control/index.native.js +2 -6
  1038. package/src/utils/deprecated-36px-size.ts +24 -0
  1039. package/src/utils/element-rect.ts +14 -2
  1040. package/src/utils/hooks/use-animated-offset-rect.ts +119 -0
  1041. package/src/utils/hooks/use-update-effect.js +0 -2
  1042. package/src/visually-hidden/stories/index.story.tsx +2 -1
  1043. package/tsconfig.tsbuildinfo +1 -1
  1044. package/build/dropdown-menu-v2/checkbox-item.js.map +0 -1
  1045. package/build/dropdown-menu-v2/context.js.map +0 -1
  1046. package/build/dropdown-menu-v2/group-label.js.map +0 -1
  1047. package/build/dropdown-menu-v2/group.js.map +0 -1
  1048. package/build/dropdown-menu-v2/index.js.map +0 -1
  1049. package/build/dropdown-menu-v2/item-help-text.js.map +0 -1
  1050. package/build/dropdown-menu-v2/item-label.js.map +0 -1
  1051. package/build/dropdown-menu-v2/item.js.map +0 -1
  1052. package/build/dropdown-menu-v2/radio-item.js.map +0 -1
  1053. package/build/dropdown-menu-v2/separator.js.map +0 -1
  1054. package/build/dropdown-menu-v2/styles.js +0 -150
  1055. package/build/dropdown-menu-v2/styles.js.map +0 -1
  1056. package/build/dropdown-menu-v2/types.js.map +0 -1
  1057. package/build/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +0 -1
  1058. package/build-module/dropdown-menu-v2/checkbox-item.js.map +0 -1
  1059. package/build-module/dropdown-menu-v2/context.js.map +0 -1
  1060. package/build-module/dropdown-menu-v2/group-label.js.map +0 -1
  1061. package/build-module/dropdown-menu-v2/group.js +0 -21
  1062. package/build-module/dropdown-menu-v2/group.js.map +0 -1
  1063. package/build-module/dropdown-menu-v2/index.js.map +0 -1
  1064. package/build-module/dropdown-menu-v2/item-help-text.js.map +0 -1
  1065. package/build-module/dropdown-menu-v2/item-label.js.map +0 -1
  1066. package/build-module/dropdown-menu-v2/item.js.map +0 -1
  1067. package/build-module/dropdown-menu-v2/radio-item.js.map +0 -1
  1068. package/build-module/dropdown-menu-v2/separator.js +0 -22
  1069. package/build-module/dropdown-menu-v2/separator.js.map +0 -1
  1070. package/build-module/dropdown-menu-v2/styles.js +0 -143
  1071. package/build-module/dropdown-menu-v2/styles.js.map +0 -1
  1072. package/build-module/dropdown-menu-v2/types.js.map +0 -1
  1073. package/build-module/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +0 -1
  1074. package/build-types/dropdown-menu-v2/checkbox-item.d.ts +0 -3
  1075. package/build-types/dropdown-menu-v2/checkbox-item.d.ts.map +0 -1
  1076. package/build-types/dropdown-menu-v2/context.d.ts +0 -6
  1077. package/build-types/dropdown-menu-v2/context.d.ts.map +0 -1
  1078. package/build-types/dropdown-menu-v2/group-label.d.ts +0 -3
  1079. package/build-types/dropdown-menu-v2/group-label.d.ts.map +0 -1
  1080. package/build-types/dropdown-menu-v2/group.d.ts +0 -3
  1081. package/build-types/dropdown-menu-v2/group.d.ts.map +0 -1
  1082. package/build-types/dropdown-menu-v2/index.d.ts +0 -40
  1083. package/build-types/dropdown-menu-v2/index.d.ts.map +0 -1
  1084. package/build-types/dropdown-menu-v2/item-help-text.d.ts.map +0 -1
  1085. package/build-types/dropdown-menu-v2/item-label.d.ts.map +0 -1
  1086. package/build-types/dropdown-menu-v2/item.d.ts +0 -3
  1087. package/build-types/dropdown-menu-v2/item.d.ts.map +0 -1
  1088. package/build-types/dropdown-menu-v2/radio-item.d.ts +0 -3
  1089. package/build-types/dropdown-menu-v2/radio-item.d.ts.map +0 -1
  1090. package/build-types/dropdown-menu-v2/separator.d.ts +0 -3
  1091. package/build-types/dropdown-menu-v2/separator.d.ts.map +0 -1
  1092. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +0 -16
  1093. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +0 -1
  1094. package/build-types/dropdown-menu-v2/styles.d.ts.map +0 -1
  1095. package/build-types/dropdown-menu-v2/test/index.d.ts.map +0 -1
  1096. package/build-types/dropdown-menu-v2/types.d.ts.map +0 -1
  1097. package/build-types/dropdown-menu-v2/use-temporary-focus-visible-fix.d.ts.map +0 -1
  1098. package/src/dropdown-menu-v2/context.tsx +0 -13
  1099. package/src/dropdown-menu-v2/group.tsx +0 -26
  1100. package/src/dropdown-menu-v2/separator.tsx +0 -27
  1101. package/src/dropdown-menu-v2/stories/index.story.tsx +0 -639
  1102. /package/build/{dropdown-menu-v2 → menu}/types.js +0 -0
  1103. /package/build/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.js +0 -0
  1104. /package/build-module/{dropdown-menu-v2 → menu}/types.js +0 -0
  1105. /package/build-module/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.js +0 -0
  1106. /package/build-types/{dropdown-menu-v2 → menu}/test/index.d.ts +0 -0
  1107. /package/build-types/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.d.ts +0 -0
  1108. /package/src/{dropdown-menu-v2 → menu}/use-temporary-focus-visible-fix.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["Text","View","styles","BottomSeparatorCover","jsx","_jsx","jsxs","_jsxs","PanelBody","children","title","style","titleStyle","panelContainer","accessibilityRole","sectionHeaderText"],"sources":["@wordpress/components/src/panel/body.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Text, View } from 'react-native';\n\n/**\n * Internal dependencies\n */\nimport styles from './body.scss';\nimport BottomSeparatorCover from './bottom-separator-cover';\n\nexport function PanelBody( { children, title, style, titleStyle = {} } ) {\n\treturn (\n\t\t<View style={ [ styles.panelContainer, style ] }>\n\t\t\t{ title && (\n\t\t\t\t<Text\n\t\t\t\t\taccessibilityRole=\"header\"\n\t\t\t\t\tstyle={ [ styles.sectionHeaderText, titleStyle ] }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t\t{ children }\n\t\t\t<BottomSeparatorCover />\n\t\t</View>\n\t);\n}\n\nexport default PanelBody;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,IAAI,QAAQ,cAAc;;AAEzC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,aAAa;AAChC,OAAOC,oBAAoB,MAAM,0BAA0B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAE5D,OAAO,SAASC,SAASA,CAAE;EAAEC,QAAQ;EAAEC,KAAK;EAAEC,KAAK;EAAEC,UAAU,GAAG,CAAC;AAAE,CAAC,EAAG;EACxE,oBACCL,KAAA,CAACN,IAAI;IAACU,KAAK,EAAG,CAAET,MAAM,CAACW,cAAc,EAAEF,KAAK,CAAI;IAAAF,QAAA,GAC7CC,KAAK,iBACNL,IAAA,CAACL,IAAI;MACJc,iBAAiB,EAAC,QAAQ;MAC1BH,KAAK,EAAG,CAAET,MAAM,CAACa,iBAAiB,EAAEH,UAAU,CAAI;MAAAH,QAAA,EAEhDC;IAAK,CACF,CACN,EACCD,QAAQ,eACVJ,IAAA,CAACF,oBAAoB,IAAE,CAAC;EAAA,CACnB,CAAC;AAET;AAEA,eAAeK,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["Text","View","styles","BottomSeparatorCover","jsx","_jsx","jsxs","_jsxs","PanelBody","children","title","style","titleStyle","panelContainer","accessibilityRole","sectionHeaderText"],"sources":["@wordpress/components/src/panel/body.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { Text, View } from 'react-native';\n\n/**\n * Internal dependencies\n */\nimport styles from './body.scss';\nimport BottomSeparatorCover from './bottom-separator-cover';\n\nexport function PanelBody( { children, title, style, titleStyle = {} } ) {\n\treturn (\n\t\t<View style={ [ styles.panelContainer, style ] }>\n\t\t\t{ title && (\n\t\t\t\t<Text\n\t\t\t\t\taccessibilityRole=\"header\"\n\t\t\t\t\tstyle={ [ styles.sectionHeaderText, titleStyle ] }\n\t\t\t\t>\n\t\t\t\t\t{ title }\n\t\t\t\t</Text>\n\t\t\t) }\n\t\t\t{ children }\n\t\t\t<BottomSeparatorCover />\n\t\t</View>\n\t);\n}\n\nexport default PanelBody;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,IAAI,EAAEC,IAAI,QAAQ,cAAc;;AAEzC;AACA;AACA;AACA,OAAOC,MAAM,MAAM,aAAa;AAChC,OAAOC,oBAAoB,MAAM,0BAA0B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE5D,OAAO,SAASC,SAASA,CAAE;EAAEC,QAAQ;EAAEC,KAAK;EAAEC,KAAK;EAAEC,UAAU,GAAG,CAAC;AAAE,CAAC,EAAG;EACxE,oBACCL,KAAA,CAACN,IAAI;IAACU,KAAK,EAAG,CAAET,MAAM,CAACW,cAAc,EAAEF,KAAK,CAAI;IAAAF,QAAA,GAC7CC,KAAK,iBACNL,IAAA,CAACL,IAAI;MACJc,iBAAiB,EAAC,QAAQ;MAC1BH,KAAK,EAAG,CAAET,MAAM,CAACa,iBAAiB,EAAEH,UAAU,CAAI;MAAAH,QAAA,EAEhDC;IAAK,CACF,CACN,EACCD,QAAQ,eACVJ,IAAA,CAACF,oBAAoB,IAAE,CAAC;EAAA,CACnB,CAAC;AAET;AAEA,eAAeK,SAAS","ignoreList":[]}
@@ -1,5 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
2
  /**
4
3
  * Internal dependencies
5
4
  */
@@ -1 +1 @@
1
- {"version":3,"names":["PanelHeader","label","children","_jsxs","className","_jsx"],"sources":["@wordpress/components/src/panel/header.tsx"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { PanelHeaderProps } from './types';\n\n/**\n * `PanelHeader` renders the header for the `Panel`.\n * This is used by the `Panel` component under the hood,\n * so it does not typically need to be used.\n */\nfunction PanelHeader( { label, children }: PanelHeaderProps ) {\n\treturn (\n\t\t<div className=\"components-panel__header\">\n\t\t\t{ label && <h2>{ label }</h2> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PanelHeader;\n"],"mappings":";;AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,SAASA,WAAWA,CAAE;EAAEC,KAAK;EAAEC;AAA2B,CAAC,EAAG;EAC7D,oBACCC,KAAA;IAAKC,SAAS,EAAC,0BAA0B;IAAAF,QAAA,GACtCD,KAAK,iBAAII,IAAA;MAAAH,QAAA,EAAMD;IAAK,CAAM,CAAC,EAC3BC,QAAQ;EAAA,CACN,CAAC;AAER;AAEA,eAAeF,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["PanelHeader","label","children","_jsxs","className","_jsx"],"sources":["@wordpress/components/src/panel/header.tsx"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport type { PanelHeaderProps } from './types';\n\n/**\n * `PanelHeader` renders the header for the `Panel`.\n * This is used by the `Panel` component under the hood,\n * so it does not typically need to be used.\n */\nfunction PanelHeader( { label, children }: PanelHeaderProps ) {\n\treturn (\n\t\t<div className=\"components-panel__header\">\n\t\t\t{ label && <h2>{ label }</h2> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\nexport default PanelHeader;\n"],"mappings":";AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,SAASA,WAAWA,CAAE;EAAEC,KAAK;EAAEC;AAA2B,CAAC,EAAG;EAC7D,oBACCC,KAAA;IAAKC,SAAS,EAAC,0BAA0B;IAAAF,QAAA,GACtCD,KAAK,iBAAII,IAAA;MAAAH,QAAA,EAAMD;IAAK,CAAM,CAAC,EAC3BC,QAAQ;EAAA,CACN,CAAC;AAER;AAEA,eAAeF,WAAW","ignoreList":[]}
@@ -12,8 +12,7 @@ import { forwardRef } from '@wordpress/element';
12
12
  * Internal dependencies
13
13
  */
14
14
  import PanelHeader from './header';
15
- import { jsx as _jsx } from "react/jsx-runtime";
16
- import { jsxs as _jsxs } from "react/jsx-runtime";
15
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
16
  function UnforwardedPanel({
18
17
  header,
19
18
  className,
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","forwardRef","PanelHeader","jsx","_jsx","jsxs","_jsxs","UnforwardedPanel","header","className","children","ref","classNames","label","Panel"],"sources":["@wordpress/components/src/panel/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport PanelHeader from './header';\nimport type { PanelProps } from './types';\n\nfunction UnforwardedPanel(\n\t{ header, className, children }: PanelProps,\n\tref: React.ForwardedRef< HTMLDivElement >\n) {\n\tconst classNames = clsx( className, 'components-panel' );\n\treturn (\n\t\t<div className={ classNames } ref={ ref }>\n\t\t\t{ header && <PanelHeader label={ header } /> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\n/**\n * `Panel` expands and collapses multiple sections of content.\n *\n * ```jsx\n * import { Panel, PanelBody, PanelRow } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPanel = () => (\n * \t<Panel header=\"My Panel\">\n * \t\t<PanelBody title=\"My Block Settings\" icon={ more } initialOpen={ true }>\n * \t\t\t<PanelRow>My Panel Inputs and Labels</PanelRow>\n * \t\t</PanelBody>\n * \t</Panel>\n * );\n * ```\n */\nexport const Panel = forwardRef( UnforwardedPanel );\n\nexport default Panel;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAGnC,SAASC,gBAAgBA,CACxB;EAAEC,MAAM;EAAEC,SAAS;EAAEC;AAAqB,CAAC,EAC3CC,GAAyC,EACxC;EACD,MAAMC,UAAU,GAAGZ,IAAI,CAAES,SAAS,EAAE,kBAAmB,CAAC;EACxD,oBACCH,KAAA;IAAKG,SAAS,EAAGG,UAAY;IAACD,GAAG,EAAGA,GAAK;IAAAD,QAAA,GACtCF,MAAM,iBAAIJ,IAAA,CAACF,WAAW;MAACW,KAAK,EAAGL;IAAQ,CAAE,CAAC,EAC1CE,QAAQ;EAAA,CACN,CAAC;AAER;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,KAAK,GAAGb,UAAU,CAAEM,gBAAiB,CAAC;AAEnD,eAAeO,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["clsx","forwardRef","PanelHeader","jsx","_jsx","jsxs","_jsxs","UnforwardedPanel","header","className","children","ref","classNames","label","Panel"],"sources":["@wordpress/components/src/panel/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport PanelHeader from './header';\nimport type { PanelProps } from './types';\n\nfunction UnforwardedPanel(\n\t{ header, className, children }: PanelProps,\n\tref: React.ForwardedRef< HTMLDivElement >\n) {\n\tconst classNames = clsx( className, 'components-panel' );\n\treturn (\n\t\t<div className={ classNames } ref={ ref }>\n\t\t\t{ header && <PanelHeader label={ header } /> }\n\t\t\t{ children }\n\t\t</div>\n\t);\n}\n\n/**\n * `Panel` expands and collapses multiple sections of content.\n *\n * ```jsx\n * import { Panel, PanelBody, PanelRow } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPanel = () => (\n * \t<Panel header=\"My Panel\">\n * \t\t<PanelBody title=\"My Block Settings\" icon={ more } initialOpen={ true }>\n * \t\t\t<PanelRow>My Panel Inputs and Labels</PanelRow>\n * \t\t</PanelBody>\n * \t</Panel>\n * );\n * ```\n */\nexport const Panel = forwardRef( UnforwardedPanel );\n\nexport default Panel;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGnC,SAASC,gBAAgBA,CACxB;EAAEC,MAAM;EAAEC,SAAS;EAAEC;AAAqB,CAAC,EAC3CC,GAAyC,EACxC;EACD,MAAMC,UAAU,GAAGZ,IAAI,CAAES,SAAS,EAAE,kBAAmB,CAAC;EACxD,oBACCH,KAAA;IAAKG,SAAS,EAAGG,UAAY;IAACD,GAAG,EAAGA,GAAK;IAAAD,QAAA,GACtCF,MAAM,iBAAIJ,IAAA,CAACF,WAAW;MAACW,KAAK,EAAGL;IAAQ,CAAE,CAAC,EAC1CE,QAAQ;EAAA,CACN,CAAC;AAER;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,KAAK,GAAGb,UAAU,CAAEM,gBAAiB,CAAC;AAEnD,eAAeO,KAAK","ignoreList":[]}
@@ -15,8 +15,7 @@ import { speak } from '@wordpress/a11y';
15
15
  * Internal dependencies
16
16
  */
17
17
  import Icon from '../icon';
18
- import { jsx as _jsx } from "react/jsx-runtime";
19
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
19
  const PlaceholderIllustration = /*#__PURE__*/_jsx(SVG, {
21
20
  className: "components-placeholder__illustration",
22
21
  fill: "none",
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useResizeObserver","SVG","Path","useEffect","speak","Icon","jsx","_jsx","jsxs","_jsxs","PlaceholderIllustration","className","fill","xmlns","viewBox","preserveAspectRatio","children","vectorEffect","d","Placeholder","props","icon","label","instructions","notices","preview","isColumnLayout","withIllustration","additionalProps","resizeListener","width","modifierClassNames","classes","fieldsetClasses"],"sources":["@wordpress/components/src/placeholder/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useResizeObserver } from '@wordpress/compose';\nimport { SVG, Path } from '@wordpress/primitives';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport Icon from '../icon';\nimport type { PlaceholderProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst PlaceholderIllustration = (\n\t<SVG\n\t\tclassName=\"components-placeholder__illustration\"\n\t\tfill=\"none\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 60 60\"\n\t\tpreserveAspectRatio=\"none\"\n\t>\n\t\t<Path vectorEffect=\"non-scaling-stroke\" d=\"M60 60 0 0\" />\n\t</SVG>\n);\n\n/**\n * Renders a placeholder. Normally used by blocks to render their empty state.\n *\n * ```jsx\n * import { Placeholder } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPlaceholder = () => <Placeholder icon={ more } label=\"Placeholder\" />;\n * ```\n */\nexport function Placeholder(\n\tprops: WordPressComponentProps< PlaceholderProps, 'div', false >\n) {\n\tconst {\n\t\ticon,\n\t\tchildren,\n\t\tlabel,\n\t\tinstructions,\n\t\tclassName,\n\t\tnotices,\n\t\tpreview,\n\t\tisColumnLayout,\n\t\twithIllustration,\n\t\t...additionalProps\n\t} = props;\n\tconst [ resizeListener, { width } ] = useResizeObserver();\n\n\t// Since `useResizeObserver` will report a width of `null` until after the\n\t// first render, avoid applying any modifier classes until width is known.\n\tlet modifierClassNames;\n\tif ( typeof width === 'number' ) {\n\t\tmodifierClassNames = {\n\t\t\t'is-large': width >= 480,\n\t\t\t'is-medium': width >= 160 && width < 480,\n\t\t\t'is-small': width < 160,\n\t\t};\n\t}\n\n\tconst classes = clsx(\n\t\t'components-placeholder',\n\t\tclassName,\n\t\tmodifierClassNames,\n\t\twithIllustration ? 'has-illustration' : null\n\t);\n\n\tconst fieldsetClasses = clsx( 'components-placeholder__fieldset', {\n\t\t'is-column-layout': isColumnLayout,\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( instructions ) {\n\t\t\tspeak( instructions );\n\t\t}\n\t}, [ instructions ] );\n\n\treturn (\n\t\t<div { ...additionalProps } className={ classes }>\n\t\t\t{ withIllustration ? PlaceholderIllustration : null }\n\t\t\t{ resizeListener }\n\t\t\t{ notices }\n\t\t\t{ preview && (\n\t\t\t\t<div className=\"components-placeholder__preview\">\n\t\t\t\t\t{ preview }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-placeholder__label\">\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t{ label }\n\t\t\t</div>\n\t\t\t{ !! instructions && (\n\t\t\t\t<div className=\"components-placeholder__instructions\">\n\t\t\t\t\t{ instructions }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className={ fieldsetClasses }>{ children }</div>\n\t\t</div>\n\t);\n}\n\nexport default Placeholder;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,GAAG,EAAEC,IAAI,QAAQ,uBAAuB;AACjD,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,OAAOC,IAAI,MAAM,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAI3B,MAAMC,uBAAuB,gBAC5BH,IAAA,CAACN,GAAG;EACHU,SAAS,EAAC,sCAAsC;EAChDC,IAAI,EAAC,MAAM;EACXC,KAAK,EAAC,4BAA4B;EAClCC,OAAO,EAAC,WAAW;EACnBC,mBAAmB,EAAC,MAAM;EAAAC,QAAA,eAE1BT,IAAA,CAACL,IAAI;IAACe,YAAY,EAAC,oBAAoB;IAACC,CAAC,EAAC;EAAY,CAAE;AAAC,CACrD,CACL;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CAC1BC,KAAgE,EAC/D;EACD,MAAM;IACLC,IAAI;IACJL,QAAQ;IACRM,KAAK;IACLC,YAAY;IACZZ,SAAS;IACTa,OAAO;IACPC,OAAO;IACPC,cAAc;IACdC,gBAAgB;IAChB,GAAGC;EACJ,CAAC,GAAGR,KAAK;EACT,MAAM,CAAES,cAAc,EAAE;IAAEC;EAAM,CAAC,CAAE,GAAG9B,iBAAiB,CAAC,CAAC;;EAEzD;EACA;EACA,IAAI+B,kBAAkB;EACtB,IAAK,OAAOD,KAAK,KAAK,QAAQ,EAAG;IAChCC,kBAAkB,GAAG;MACpB,UAAU,EAAED,KAAK,IAAI,GAAG;MACxB,WAAW,EAAEA,KAAK,IAAI,GAAG,IAAIA,KAAK,GAAG,GAAG;MACxC,UAAU,EAAEA,KAAK,GAAG;IACrB,CAAC;EACF;EAEA,MAAME,OAAO,GAAGjC,IAAI,CACnB,wBAAwB,EACxBY,SAAS,EACToB,kBAAkB,EAClBJ,gBAAgB,GAAG,kBAAkB,GAAG,IACzC,CAAC;EAED,MAAMM,eAAe,GAAGlC,IAAI,CAAE,kCAAkC,EAAE;IACjE,kBAAkB,EAAE2B;EACrB,CAAE,CAAC;EAEHvB,SAAS,CAAE,MAAM;IAChB,IAAKoB,YAAY,EAAG;MACnBnB,KAAK,CAAEmB,YAAa,CAAC;IACtB;EACD,CAAC,EAAE,CAAEA,YAAY,CAAG,CAAC;EAErB,oBACCd,KAAA;IAAA,GAAUmB,eAAe;IAAGjB,SAAS,EAAGqB,OAAS;IAAAhB,QAAA,GAC9CW,gBAAgB,GAAGjB,uBAAuB,GAAG,IAAI,EACjDmB,cAAc,EACdL,OAAO,EACPC,OAAO,iBACRlB,IAAA;MAAKI,SAAS,EAAC,iCAAiC;MAAAK,QAAA,EAC7CS;IAAO,CACL,CACL,eACDhB,KAAA;MAAKE,SAAS,EAAC,+BAA+B;MAAAK,QAAA,gBAC7CT,IAAA,CAACF,IAAI;QAACgB,IAAI,EAAGA;MAAM,CAAE,CAAC,EACpBC,KAAK;IAAA,CACH,CAAC,EACJ,CAAC,CAAEC,YAAY,iBAChBhB,IAAA;MAAKI,SAAS,EAAC,sCAAsC;MAAAK,QAAA,EAClDO;IAAY,CACV,CACL,eACDhB,IAAA;MAAKI,SAAS,EAAGsB,eAAiB;MAAAjB,QAAA,EAAGA;IAAQ,CAAO,CAAC;EAAA,CACjD,CAAC;AAER;AAEA,eAAeG,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useResizeObserver","SVG","Path","useEffect","speak","Icon","jsx","_jsx","jsxs","_jsxs","PlaceholderIllustration","className","fill","xmlns","viewBox","preserveAspectRatio","children","vectorEffect","d","Placeholder","props","icon","label","instructions","notices","preview","isColumnLayout","withIllustration","additionalProps","resizeListener","width","modifierClassNames","classes","fieldsetClasses"],"sources":["@wordpress/components/src/placeholder/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useResizeObserver } from '@wordpress/compose';\nimport { SVG, Path } from '@wordpress/primitives';\nimport { useEffect } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\n\n/**\n * Internal dependencies\n */\nimport Icon from '../icon';\nimport type { PlaceholderProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nconst PlaceholderIllustration = (\n\t<SVG\n\t\tclassName=\"components-placeholder__illustration\"\n\t\tfill=\"none\"\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 60 60\"\n\t\tpreserveAspectRatio=\"none\"\n\t>\n\t\t<Path vectorEffect=\"non-scaling-stroke\" d=\"M60 60 0 0\" />\n\t</SVG>\n);\n\n/**\n * Renders a placeholder. Normally used by blocks to render their empty state.\n *\n * ```jsx\n * import { Placeholder } from '@wordpress/components';\n * import { more } from '@wordpress/icons';\n *\n * const MyPlaceholder = () => <Placeholder icon={ more } label=\"Placeholder\" />;\n * ```\n */\nexport function Placeholder(\n\tprops: WordPressComponentProps< PlaceholderProps, 'div', false >\n) {\n\tconst {\n\t\ticon,\n\t\tchildren,\n\t\tlabel,\n\t\tinstructions,\n\t\tclassName,\n\t\tnotices,\n\t\tpreview,\n\t\tisColumnLayout,\n\t\twithIllustration,\n\t\t...additionalProps\n\t} = props;\n\tconst [ resizeListener, { width } ] = useResizeObserver();\n\n\t// Since `useResizeObserver` will report a width of `null` until after the\n\t// first render, avoid applying any modifier classes until width is known.\n\tlet modifierClassNames;\n\tif ( typeof width === 'number' ) {\n\t\tmodifierClassNames = {\n\t\t\t'is-large': width >= 480,\n\t\t\t'is-medium': width >= 160 && width < 480,\n\t\t\t'is-small': width < 160,\n\t\t};\n\t}\n\n\tconst classes = clsx(\n\t\t'components-placeholder',\n\t\tclassName,\n\t\tmodifierClassNames,\n\t\twithIllustration ? 'has-illustration' : null\n\t);\n\n\tconst fieldsetClasses = clsx( 'components-placeholder__fieldset', {\n\t\t'is-column-layout': isColumnLayout,\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( instructions ) {\n\t\t\tspeak( instructions );\n\t\t}\n\t}, [ instructions ] );\n\n\treturn (\n\t\t<div { ...additionalProps } className={ classes }>\n\t\t\t{ withIllustration ? PlaceholderIllustration : null }\n\t\t\t{ resizeListener }\n\t\t\t{ notices }\n\t\t\t{ preview && (\n\t\t\t\t<div className=\"components-placeholder__preview\">\n\t\t\t\t\t{ preview }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-placeholder__label\">\n\t\t\t\t<Icon icon={ icon } />\n\t\t\t\t{ label }\n\t\t\t</div>\n\t\t\t{ !! instructions && (\n\t\t\t\t<div className=\"components-placeholder__instructions\">\n\t\t\t\t\t{ instructions }\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className={ fieldsetClasses }>{ children }</div>\n\t\t</div>\n\t);\n}\n\nexport default Placeholder;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,oBAAoB;AACtD,SAASC,GAAG,EAAEC,IAAI,QAAQ,uBAAuB;AACjD,SAASC,SAAS,QAAQ,oBAAoB;AAC9C,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,OAAOC,IAAI,MAAM,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAI3B,MAAMC,uBAAuB,gBAC5BH,IAAA,CAACN,GAAG;EACHU,SAAS,EAAC,sCAAsC;EAChDC,IAAI,EAAC,MAAM;EACXC,KAAK,EAAC,4BAA4B;EAClCC,OAAO,EAAC,WAAW;EACnBC,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EACPC,OAAO,iBACRlB,IAAA;MAAKI,SAAS,EAAC,iCAAiC;MAAAK,QAAA,EAC7CS;IAAO,CACL,CACL,eACDhB,KAAA;MAAKE,SAAS,EAAC,+BAA+B;MAAAK,QAAA,gBAC7CT,IAAA,CAACF,IAAI;QAACgB,IAAI,EAAGA;MAAM,CAAE,CAAC,EACpBC,KAAK;IAAA,CACH,CAAC,EACJ,CAAC,CAAEC,YAAY,iBAChBhB,IAAA;MAAKI,SAAS,EAAC,sCAAsC;MAAAK,QAAA,EAClDO;IAAY,CACV,CACL,eACDhB,IAAA;MAAKI,SAAS,EAAGsB,eAAiB;MAAAjB,QAAA,EAAGA;IAAQ,CAAO,CAAC;EAAA,CACjD,CAAC;AAER;AAEA,eAAeG,WAAW","ignoreList":[]}
@@ -31,9 +31,7 @@ import { StyleProvider } from '../style-provider';
31
31
  *
32
32
  * @type {string}
33
33
  */
34
- import { jsx as _jsx } from "react/jsx-runtime";
35
- import { jsxs as _jsxs } from "react/jsx-runtime";
36
- import { Fragment as _Fragment } from "react/jsx-runtime";
34
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
37
35
  export const SLOT_NAME = 'Popover';
38
36
 
39
37
  // An SVG displaying a triangle facing down, filled with a solid
@@ -316,7 +314,7 @@ const UnforwardedPopover = (props, forwardedRef) => {
316
314
  children: content
317
315
  });
318
316
  } else if (!inline) {
319
- content = createPortal( /*#__PURE__*/_jsx(StyleProvider, {
317
+ content = createPortal(/*#__PURE__*/_jsx(StyleProvider, {
320
318
  document: document,
321
319
  children: content
322
320
  }), getPopoverFallbackContainer());
@@ -1 +1 @@
1
- {"version":3,"names":["clsx","useFloating","flip","flipMiddleware","shift","shiftMiddleware","limitShift","autoUpdate","arrow","offset","offsetMiddleware","size","motion","useRef","useLayoutEffect","forwardRef","createContext","useContext","useMemo","useState","useCallback","createPortal","useReducedMotion","useViewportMatch","useMergeRefs","__experimentalUseDialog","useDialog","close","deprecated","Path","SVG","Button","ScrollLock","Slot","Fill","useSlot","computePopoverPosition","positionToPlacement","placementToMotionAnimationProps","getReferenceElement","contextConnect","useContextSystem","overlayMiddlewares","StyleProvider","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SLOT_NAME","ArrowTriangle","xmlns","viewBox","className","role","children","d","vectorEffect","slotNameContext","undefined","fallbackContainerClassname","getPopoverFallbackContainer","container","document","body","querySelector","createElement","append","UnforwardedPopover","props","forwardedRef","animate","headerTitle","constrainTabbing","onClose","noArrow","position","placement","placementProp","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","resize","inline","variant","style","contentStyle","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","computedFlipProp","computedResizeProp","since","version","alternative","computedVariant","arrowRef","fallbackReferenceElement","setFallbackReferenceElement","anchorRefFallback","node","isMobileViewport","isExpanded","hasArrow","normalizedPlacementFromProps","middleware","apply","sizeProps","_refs$floating$curren","firstElementChild","refs","floating","current","HTMLElement","Object","assign","maxHeight","availableHeight","overflow","crossAxis","limiter","padding","element","slotName","slot","onDialogClose","type","event","dialogRef","dialogProps","__unstableOnClose","x","y","strategy","update","computedPlacement","middlewareData","arrowData","whileElementsMounted","referenceParam","floatingParam","updateParam","layoutShift","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","resultingReferenceElement","setReference","mergedFloatingRef","setFloating","left","shouldReduceMotion","shouldAnimate","animationFinished","setAnimationFinished","motionInlineStyles","otherMotionProps","animationProps","onAnimationComplete","isPositioned","content","div","ref","tabIndex","icon","onClick","split","join","Number","isFinite","shouldRenderWithinSlot","hasAnchor","name","Popover","PopoverSlot","bubblesVirtually","__unstableSlotNameProvider","Provider"],"sources":["@wordpress/components/src/popover/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport clsx from 'clsx';\nimport {\n\tuseFloating,\n\tflip as flipMiddleware,\n\tshift as shiftMiddleware,\n\tlimitShift,\n\tautoUpdate,\n\tarrow,\n\toffset as offsetMiddleware,\n\tsize,\n} from '@floating-ui/react-dom';\nimport type { HTMLMotionProps, MotionProps } from 'framer-motion';\nimport { motion } from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tforwardRef,\n\tcreateContext,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tuseCallback,\n\tcreatePortal,\n} from '@wordpress/element';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseMergeRefs,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\nimport { Path, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport {\n\tcomputePopoverPosition,\n\tpositionToPlacement,\n\tplacementToMotionAnimationProps,\n\tgetReferenceElement,\n} from './utils';\nimport { contextConnect, useContextSystem } from '../context';\nimport type { WordPressComponentProps } from '../context';\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\nimport { overlayMiddlewares } from './overlay-middlewares';\nimport { StyleProvider } from '../style-provider';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nexport const SLOT_NAME = 'Popover';\n\n// An SVG displaying a triangle facing down, filled with a solid\n// color and bordered in such a way to create an arrow-like effect.\n// Keeping the SVG's viewbox squared simplify the arrow positioning\n// calculations.\nconst ArrowTriangle = () => (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 100 100\"\n\t\tclassName=\"components-popover__triangle\"\n\t\trole=\"presentation\"\n\t>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-bg\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t/>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-border\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t/>\n\t</SVG>\n);\n\nconst slotNameContext = createContext< string | undefined >( undefined );\n\nconst fallbackContainerClassname = 'components-popover__fallback-container';\nconst getPopoverFallbackContainer = () => {\n\tlet container = document.body.querySelector(\n\t\t'.' + fallbackContainerClassname\n\t);\n\tif ( ! container ) {\n\t\tcontainer = document.createElement( 'div' );\n\t\tcontainer.className = fallbackContainerClassname;\n\t\tdocument.body.append( container );\n\t}\n\n\treturn container;\n};\n\nconst UnforwardedPopover = (\n\tprops: Omit<\n\t\tWordPressComponentProps< PopoverProps, 'div', false >,\n\t\t// To avoid overlaps between the standard HTML attributes and the props\n\t\t// expected by `framer-motion`, omit all framer motion props from popover\n\t\t// props (except for `animate` and `children` which are re-defined in\n\t\t// `PopoverProps`, and `style` which is merged safely).\n\t\tkeyof Omit< MotionProps, 'animate' | 'children' | 'style' >\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tanimate = true,\n\t\theaderTitle,\n\t\tconstrainTabbing,\n\t\tonClose,\n\t\tchildren,\n\t\tclassName,\n\t\tnoArrow = true,\n\t\tposition,\n\t\tplacement: placementProp = 'bottom-start',\n\t\toffset: offsetProp = 0,\n\t\tfocusOnMount = 'firstElement',\n\t\tanchor,\n\t\texpandOnMobile,\n\t\tonFocusOutside,\n\t\t__unstableSlotName = SLOT_NAME,\n\t\tflip = true,\n\t\tresize = true,\n\t\tshift = false,\n\t\tinline = false,\n\t\tvariant,\n\t\tstyle: contentStyle,\n\n\t\t// Deprecated props\n\t\t__unstableForcePosition,\n\t\tanchorRef,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tisAlternate,\n\n\t\t// Rest\n\t\t...contentProps\n\t} = useContextSystem( props, 'Popover' );\n\n\tlet computedFlipProp = flip;\n\tlet computedResizeProp = resize;\n\tif ( __unstableForcePosition !== undefined ) {\n\t\tdeprecated( '`__unstableForcePosition` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`flip={ false }` and `resize={ false }`',\n\t\t} );\n\n\t\t// Back-compat, set the `flip` and `resize` props\n\t\t// to `false` to replicate `__unstableForcePosition`.\n\t\tcomputedFlipProp = ! __unstableForcePosition;\n\t\tcomputedResizeProp = ! __unstableForcePosition;\n\t}\n\n\tif ( anchorRef !== undefined ) {\n\t\tdeprecated( '`anchorRef` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( anchorRect !== undefined ) {\n\t\tdeprecated( '`anchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( getAnchorRect !== undefined ) {\n\t\tdeprecated( '`getAnchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tconst computedVariant = isAlternate ? 'toolbar' : variant;\n\tif ( isAlternate !== undefined ) {\n\t\tdeprecated( '`isAlternate` prop in wp.components.Popover', {\n\t\t\tsince: '6.2',\n\t\t\talternative: \"`variant` prop with the `'toolbar'` value\",\n\t\t} );\n\t}\n\n\tconst arrowRef = useRef< HTMLElement | null >( null );\n\n\tconst [ fallbackReferenceElement, setFallbackReferenceElement ] =\n\t\tuseState< HTMLSpanElement | null >( null );\n\n\tconst anchorRefFallback: RefCallback< HTMLSpanElement > = useCallback(\n\t\t( node ) => {\n\t\t\tsetFallbackReferenceElement( node );\n\t\t},\n\t\t[]\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isExpanded = expandOnMobile && isMobileViewport;\n\tconst hasArrow = ! isExpanded && ! noArrow;\n\tconst normalizedPlacementFromProps = position\n\t\t? positionToPlacement( position )\n\t\t: placementProp;\n\n\tconst middleware = [\n\t\t...( placementProp === 'overlay' ? overlayMiddlewares() : [] ),\n\t\toffsetMiddleware( offsetProp ),\n\t\tcomputedFlipProp && flipMiddleware(),\n\t\tcomputedResizeProp &&\n\t\t\tsize( {\n\t\t\t\tapply( sizeProps ) {\n\t\t\t\t\tconst { firstElementChild } = refs.floating.current ?? {};\n\n\t\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\t\tmaxHeight: `${ sizeProps.availableHeight }px`,\n\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t} ),\n\t\tshift &&\n\t\t\tshiftMiddleware( {\n\t\t\t\tcrossAxis: true,\n\t\t\t\tlimiter: limitShift(),\n\t\t\t\tpadding: 1, // Necessary to avoid flickering at the edge of the viewport.\n\t\t\t} ),\n\t\tarrow( { element: arrowRef } ),\n\t];\n\tconst slotName = useContext( slotNameContext ) || __unstableSlotName;\n\tconst slot = useSlot( slotName );\n\n\tlet onDialogClose;\n\n\tif ( onClose || onFocusOutside ) {\n\t\tonDialogClose = ( type: string | undefined, event: SyntheticEvent ) => {\n\t\t\t// Ideally the popover should have just a single onClose prop and\n\t\t\t// not three props that potentially do the same thing.\n\t\t\tif ( type === 'focus-outside' && onFocusOutside ) {\n\t\t\t\tonFocusOutside( event );\n\t\t\t} else if ( onClose ) {\n\t\t\t\tonClose();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst [ dialogRef, dialogProps ] = useDialog( {\n\t\tconstrainTabbing,\n\t\tfocusOnMount,\n\t\t__unstableOnClose: onDialogClose,\n\t\t// @ts-expect-error The __unstableOnClose property needs to be deprecated first (see https://github.com/WordPress/gutenberg/pull/27675)\n\t\tonClose: onDialogClose,\n\t} );\n\n\tconst {\n\t\t// Positioning coordinates\n\t\tx,\n\t\ty,\n\t\t// Object with \"regular\" refs to both \"reference\" and \"floating\"\n\t\trefs,\n\t\t// Type of CSS position property to use (absolute or fixed)\n\t\tstrategy,\n\t\tupdate,\n\t\tplacement: computedPlacement,\n\t\tmiddlewareData: { arrow: arrowData },\n\t} = useFloating( {\n\t\tplacement:\n\t\t\tnormalizedPlacementFromProps === 'overlay'\n\t\t\t\t? undefined\n\t\t\t\t: normalizedPlacementFromProps,\n\t\tmiddleware,\n\t\twhileElementsMounted: ( referenceParam, floatingParam, updateParam ) =>\n\t\t\tautoUpdate( referenceParam, floatingParam, updateParam, {\n\t\t\t\tlayoutShift: false,\n\t\t\t\tanimationFrame: true,\n\t\t\t} ),\n\t} );\n\n\tconst arrowCallbackRef = useCallback(\n\t\t( node: HTMLElement | null ) => {\n\t\t\tarrowRef.current = node;\n\t\t\tupdate();\n\t\t},\n\t\t[ update ]\n\t);\n\n\t// When any of the possible anchor \"sources\" change,\n\t// recompute the reference element (real or virtual) and its owner document.\n\n\tconst anchorRefTop = ( anchorRef as PopoverAnchorRefTopBottom | undefined )\n\t\t?.top;\n\tconst anchorRefBottom = (\n\t\tanchorRef as PopoverAnchorRefTopBottom | undefined\n\t )?.bottom;\n\tconst anchorRefStartContainer = ( anchorRef as Range | undefined )\n\t\t?.startContainer;\n\tconst anchorRefCurrent = ( anchorRef as PopoverAnchorRefReference )\n\t\t?.current;\n\n\tuseLayoutEffect( () => {\n\t\tconst resultingReferenceElement = getReferenceElement( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t} );\n\n\t\trefs.setReference( resultingReferenceElement );\n\t}, [\n\t\tanchor,\n\t\tanchorRef,\n\t\tanchorRefTop,\n\t\tanchorRefBottom,\n\t\tanchorRefStartContainer,\n\t\tanchorRefCurrent,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tfallbackReferenceElement,\n\t\trefs,\n\t] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\trefs.setFloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\tconst style = isExpanded\n\t\t? undefined\n\t\t: {\n\t\t\t\tposition: strategy,\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\t// `x` and `y` are framer-motion specific props and are shorthands\n\t\t\t\t// for `translateX` and `translateY`. Currently it is not possible\n\t\t\t\t// to use `translateX` and `translateY` because those values would\n\t\t\t\t// be overridden by the return value of the\n\t\t\t\t// `placementToMotionAnimationProps` function.\n\t\t\t\tx: computePopoverPosition( x ),\n\t\t\t\ty: computePopoverPosition( y ),\n\t\t };\n\n\tconst shouldReduceMotion = useReducedMotion();\n\tconst shouldAnimate = animate && ! isExpanded && ! shouldReduceMotion;\n\n\tconst [ animationFinished, setAnimationFinished ] = useState( false );\n\n\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t() => placementToMotionAnimationProps( computedPlacement ),\n\t\t[ computedPlacement ]\n\t);\n\n\tconst animationProps: HTMLMotionProps< 'div' > = shouldAnimate\n\t\t? {\n\t\t\t\tstyle: {\n\t\t\t\t\t...contentStyle,\n\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t...style,\n\t\t\t\t},\n\t\t\t\tonAnimationComplete: () => setAnimationFinished( true ),\n\t\t\t\t...otherMotionProps,\n\t\t }\n\t\t: {\n\t\t\t\tanimate: false,\n\t\t\t\tstyle: {\n\t\t\t\t\t...contentStyle,\n\t\t\t\t\t...style,\n\t\t\t\t},\n\t\t };\n\n\t// When Floating UI has finished positioning and Framer Motion has finished animating\n\t// the popover, add the `is-positioned` class to signal that all transitions have finished.\n\tconst isPositioned =\n\t\t( ! shouldAnimate || animationFinished ) && x !== null && y !== null;\n\n\tlet content = (\n\t\t<motion.div\n\t\t\tclassName={ clsx( className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-positioned': isPositioned,\n\t\t\t\t// Use the 'alternate' classname for 'toolbar' variant for back compat.\n\t\t\t\t[ `is-${\n\t\t\t\t\tcomputedVariant === 'toolbar'\n\t\t\t\t\t\t? 'alternate'\n\t\t\t\t\t\t: computedVariant\n\t\t\t\t}` ]: computedVariant,\n\t\t\t} ) }\n\t\t\t{ ...animationProps }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t>\n\t\t\t{ /* Prevents scroll on the document */ }\n\t\t\t{ isExpanded && <ScrollLock /> }\n\t\t\t{ isExpanded && (\n\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"components-popover__close\"\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-popover__content\">{ children }</div>\n\t\t\t{ hasArrow && (\n\t\t\t\t<div\n\t\t\t\t\tref={ arrowCallbackRef }\n\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t'components-popover__arrow',\n\t\t\t\t\t\t`is-${ computedPlacement.split( '-' )[ 0 ] }`,\n\t\t\t\t\t].join( ' ' ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tleft:\n\t\t\t\t\t\t\ttypeof arrowData?.x !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.x )\n\t\t\t\t\t\t\t\t? `${ arrowData.x }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\ttop:\n\t\t\t\t\t\t\ttypeof arrowData?.y !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.y )\n\t\t\t\t\t\t\t\t? `${ arrowData.y }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<ArrowTriangle />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</motion.div>\n\t);\n\n\tconst shouldRenderWithinSlot = slot.ref && ! inline;\n\tconst hasAnchor = anchorRef || anchorRect || anchor;\n\n\tif ( shouldRenderWithinSlot ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t} else if ( ! inline ) {\n\t\tcontent = createPortal(\n\t\t\t<StyleProvider document={ document }>{ content }</StyleProvider>,\n\t\t\tgetPopoverFallbackContainer()\n\t\t);\n\t}\n\n\tif ( hasAnchor ) {\n\t\treturn content;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<span ref={ anchorRefFallback } />\n\t\t\t{ content }\n\t\t</>\n\t);\n};\n\n/**\n * `Popover` renders its content in a floating modal. If no explicit anchor is passed via props, it anchors to its parent element by default.\n *\n * ```jsx\n * import { Button, Popover } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyPopover = () => {\n * \tconst [ isVisible, setIsVisible ] = useState( false );\n * \tconst toggleVisible = () => {\n * \t\tsetIsVisible( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<Button variant=\"secondary\" onClick={ toggleVisible }>\n * \t\t\tToggle Popover!\n * \t\t\t{ isVisible && <Popover>Popover is toggled!</Popover> }\n * \t\t</Button>\n * \t);\n * };\n * ```\n *\n */\nexport const Popover = contextConnect( UnforwardedPopover, 'Popover' );\n\nfunction PopoverSlot(\n\t{ name = SLOT_NAME }: { name?: string },\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Slot\n\t\t\tbubblesVirtually\n\t\t\tname={ name }\n\t\t\tclassName=\"popover-slot\"\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\n// @ts-expect-error For Legacy Reasons\nPopover.Slot = forwardRef( PopoverSlot );\n// @ts-expect-error For Legacy Reasons\nPopover.__unstableSlotNameProvider = slot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M,EAAG;IACtBsF,OAAO,GAAGxJ,YAAY,eACrBwB,IAAA,CAACF,aAAa;MAACqB,QAAQ,EAAGA,QAAU;MAAAR,QAAA,EAAGqH;IAAO,CAAiB,CAAC,EAChE/G,2BAA2B,CAAC,CAC7B,CAAC;EACF;EAEA,IAAK0H,SAAS,EAAG;IAChB,OAAOX,OAAO;EACf;EAEA,oBACC9H,KAAA,CAAAE,SAAA;IAAAO,QAAA,gBACCX,IAAA;MAAMkI,GAAG,EAAGrE;IAAmB,CAAE,CAAC,EAChCmE,OAAO;EAAA,CACR,CAAC;AAEL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMa,OAAO,GAAGlJ,cAAc,CAAE6B,kBAAkB,EAAE,SAAU,CAAC;AAEtE,SAASsH,WAAWA,CACnB;EAAEF,IAAI,GAAGvI;AAA6B,CAAC,EACvC6H,GAAwB,EACvB;EACD,oBACClI,IAAA,CAACZ,IAAI;IACJ2J,gBAAgB;IAChBH,IAAI,EAAGA,IAAM;IACbnI,SAAS,EAAC,cAAc;IACxByH,GAAG,EAAGA;EAAK,CACX,CAAC;AAEJ;;AAEA;AACAW,OAAO,CAACzJ,IAAI,GAAGlB,UAAU,CAAE4K,WAAY,CAAC;AACxC;AACAD,OAAO,CAACG,0BAA0B,GAAGlI,eAAe,CAACmI,QAAQ;AAE7D,eAAeJ,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["clsx","useFloating","flip","flipMiddleware","shift","shiftMiddleware","limitShift","autoUpdate","arrow","offset","offsetMiddleware","size","motion","useRef","useLayoutEffect","forwardRef","createContext","useContext","useMemo","useState","useCallback","createPortal","useReducedMotion","useViewportMatch","useMergeRefs","__experimentalUseDialog","useDialog","close","deprecated","Path","SVG","Button","ScrollLock","Slot","Fill","useSlot","computePopoverPosition","positionToPlacement","placementToMotionAnimationProps","getReferenceElement","contextConnect","useContextSystem","overlayMiddlewares","StyleProvider","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","SLOT_NAME","ArrowTriangle","xmlns","viewBox","className","role","children","d","vectorEffect","slotNameContext","undefined","fallbackContainerClassname","getPopoverFallbackContainer","container","document","body","querySelector","createElement","append","UnforwardedPopover","props","forwardedRef","animate","headerTitle","constrainTabbing","onClose","noArrow","position","placement","placementProp","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","resize","inline","variant","style","contentStyle","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","computedFlipProp","computedResizeProp","since","version","alternative","computedVariant","arrowRef","fallbackReferenceElement","setFallbackReferenceElement","anchorRefFallback","node","isMobileViewport","isExpanded","hasArrow","normalizedPlacementFromProps","middleware","apply","sizeProps","_refs$floating$curren","firstElementChild","refs","floating","current","HTMLElement","Object","assign","maxHeight","availableHeight","overflow","crossAxis","limiter","padding","element","slotName","slot","onDialogClose","type","event","dialogRef","dialogProps","__unstableOnClose","x","y","strategy","update","computedPlacement","middlewareData","arrowData","whileElementsMounted","referenceParam","floatingParam","updateParam","layoutShift","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","resultingReferenceElement","setReference","mergedFloatingRef","setFloating","left","shouldReduceMotion","shouldAnimate","animationFinished","setAnimationFinished","motionInlineStyles","otherMotionProps","animationProps","onAnimationComplete","isPositioned","content","div","ref","tabIndex","icon","onClick","split","join","Number","isFinite","shouldRenderWithinSlot","hasAnchor","name","Popover","PopoverSlot","bubblesVirtually","__unstableSlotNameProvider","Provider"],"sources":["@wordpress/components/src/popover/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport clsx from 'clsx';\nimport {\n\tuseFloating,\n\tflip as flipMiddleware,\n\tshift as shiftMiddleware,\n\tlimitShift,\n\tautoUpdate,\n\tarrow,\n\toffset as offsetMiddleware,\n\tsize,\n} from '@floating-ui/react-dom';\nimport type { HTMLMotionProps, MotionProps } from 'framer-motion';\nimport { motion } from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseRef,\n\tuseLayoutEffect,\n\tforwardRef,\n\tcreateContext,\n\tuseContext,\n\tuseMemo,\n\tuseState,\n\tuseCallback,\n\tcreatePortal,\n} from '@wordpress/element';\nimport {\n\tuseReducedMotion,\n\tuseViewportMatch,\n\tuseMergeRefs,\n\t__experimentalUseDialog as useDialog,\n} from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\nimport { Path, SVG } from '@wordpress/primitives';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport {\n\tcomputePopoverPosition,\n\tpositionToPlacement,\n\tplacementToMotionAnimationProps,\n\tgetReferenceElement,\n} from './utils';\nimport { contextConnect, useContextSystem } from '../context';\nimport type { WordPressComponentProps } from '../context';\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\nimport { overlayMiddlewares } from './overlay-middlewares';\nimport { StyleProvider } from '../style-provider';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nexport const SLOT_NAME = 'Popover';\n\n// An SVG displaying a triangle facing down, filled with a solid\n// color and bordered in such a way to create an arrow-like effect.\n// Keeping the SVG's viewbox squared simplify the arrow positioning\n// calculations.\nconst ArrowTriangle = () => (\n\t<SVG\n\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\tviewBox=\"0 0 100 100\"\n\t\tclassName=\"components-popover__triangle\"\n\t\trole=\"presentation\"\n\t>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-bg\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t/>\n\t\t<Path\n\t\t\tclassName=\"components-popover__triangle-border\"\n\t\t\td=\"M 0 0 L 50 50 L 100 0\"\n\t\t\tvectorEffect=\"non-scaling-stroke\"\n\t\t/>\n\t</SVG>\n);\n\nconst slotNameContext = createContext< string | undefined >( undefined );\n\nconst fallbackContainerClassname = 'components-popover__fallback-container';\nconst getPopoverFallbackContainer = () => {\n\tlet container = document.body.querySelector(\n\t\t'.' + fallbackContainerClassname\n\t);\n\tif ( ! container ) {\n\t\tcontainer = document.createElement( 'div' );\n\t\tcontainer.className = fallbackContainerClassname;\n\t\tdocument.body.append( container );\n\t}\n\n\treturn container;\n};\n\nconst UnforwardedPopover = (\n\tprops: Omit<\n\t\tWordPressComponentProps< PopoverProps, 'div', false >,\n\t\t// To avoid overlaps between the standard HTML attributes and the props\n\t\t// expected by `framer-motion`, omit all framer motion props from popover\n\t\t// props (except for `animate` and `children` which are re-defined in\n\t\t// `PopoverProps`, and `style` which is merged safely).\n\t\tkeyof Omit< MotionProps, 'animate' | 'children' | 'style' >\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tanimate = true,\n\t\theaderTitle,\n\t\tconstrainTabbing,\n\t\tonClose,\n\t\tchildren,\n\t\tclassName,\n\t\tnoArrow = true,\n\t\tposition,\n\t\tplacement: placementProp = 'bottom-start',\n\t\toffset: offsetProp = 0,\n\t\tfocusOnMount = 'firstElement',\n\t\tanchor,\n\t\texpandOnMobile,\n\t\tonFocusOutside,\n\t\t__unstableSlotName = SLOT_NAME,\n\t\tflip = true,\n\t\tresize = true,\n\t\tshift = false,\n\t\tinline = false,\n\t\tvariant,\n\t\tstyle: contentStyle,\n\n\t\t// Deprecated props\n\t\t__unstableForcePosition,\n\t\tanchorRef,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tisAlternate,\n\n\t\t// Rest\n\t\t...contentProps\n\t} = useContextSystem( props, 'Popover' );\n\n\tlet computedFlipProp = flip;\n\tlet computedResizeProp = resize;\n\tif ( __unstableForcePosition !== undefined ) {\n\t\tdeprecated( '`__unstableForcePosition` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\tversion: '6.3',\n\t\t\talternative: '`flip={ false }` and `resize={ false }`',\n\t\t} );\n\n\t\t// Back-compat, set the `flip` and `resize` props\n\t\t// to `false` to replicate `__unstableForcePosition`.\n\t\tcomputedFlipProp = ! __unstableForcePosition;\n\t\tcomputedResizeProp = ! __unstableForcePosition;\n\t}\n\n\tif ( anchorRef !== undefined ) {\n\t\tdeprecated( '`anchorRef` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( anchorRect !== undefined ) {\n\t\tdeprecated( '`anchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tif ( getAnchorRect !== undefined ) {\n\t\tdeprecated( '`getAnchorRect` prop in wp.components.Popover', {\n\t\t\tsince: '6.1',\n\t\t\talternative: '`anchor` prop',\n\t\t} );\n\t}\n\n\tconst computedVariant = isAlternate ? 'toolbar' : variant;\n\tif ( isAlternate !== undefined ) {\n\t\tdeprecated( '`isAlternate` prop in wp.components.Popover', {\n\t\t\tsince: '6.2',\n\t\t\talternative: \"`variant` prop with the `'toolbar'` value\",\n\t\t} );\n\t}\n\n\tconst arrowRef = useRef< HTMLElement | null >( null );\n\n\tconst [ fallbackReferenceElement, setFallbackReferenceElement ] =\n\t\tuseState< HTMLSpanElement | null >( null );\n\n\tconst anchorRefFallback: RefCallback< HTMLSpanElement > = useCallback(\n\t\t( node ) => {\n\t\t\tsetFallbackReferenceElement( node );\n\t\t},\n\t\t[]\n\t);\n\n\tconst isMobileViewport = useViewportMatch( 'medium', '<' );\n\tconst isExpanded = expandOnMobile && isMobileViewport;\n\tconst hasArrow = ! isExpanded && ! noArrow;\n\tconst normalizedPlacementFromProps = position\n\t\t? positionToPlacement( position )\n\t\t: placementProp;\n\n\tconst middleware = [\n\t\t...( placementProp === 'overlay' ? overlayMiddlewares() : [] ),\n\t\toffsetMiddleware( offsetProp ),\n\t\tcomputedFlipProp && flipMiddleware(),\n\t\tcomputedResizeProp &&\n\t\t\tsize( {\n\t\t\t\tapply( sizeProps ) {\n\t\t\t\t\tconst { firstElementChild } = refs.floating.current ?? {};\n\n\t\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\t\tmaxHeight: `${ sizeProps.availableHeight }px`,\n\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t} ),\n\t\tshift &&\n\t\t\tshiftMiddleware( {\n\t\t\t\tcrossAxis: true,\n\t\t\t\tlimiter: limitShift(),\n\t\t\t\tpadding: 1, // Necessary to avoid flickering at the edge of the viewport.\n\t\t\t} ),\n\t\tarrow( { element: arrowRef } ),\n\t];\n\tconst slotName = useContext( slotNameContext ) || __unstableSlotName;\n\tconst slot = useSlot( slotName );\n\n\tlet onDialogClose;\n\n\tif ( onClose || onFocusOutside ) {\n\t\tonDialogClose = ( type: string | undefined, event: SyntheticEvent ) => {\n\t\t\t// Ideally the popover should have just a single onClose prop and\n\t\t\t// not three props that potentially do the same thing.\n\t\t\tif ( type === 'focus-outside' && onFocusOutside ) {\n\t\t\t\tonFocusOutside( event );\n\t\t\t} else if ( onClose ) {\n\t\t\t\tonClose();\n\t\t\t}\n\t\t};\n\t}\n\n\tconst [ dialogRef, dialogProps ] = useDialog( {\n\t\tconstrainTabbing,\n\t\tfocusOnMount,\n\t\t__unstableOnClose: onDialogClose,\n\t\t// @ts-expect-error The __unstableOnClose property needs to be deprecated first (see https://github.com/WordPress/gutenberg/pull/27675)\n\t\tonClose: onDialogClose,\n\t} );\n\n\tconst {\n\t\t// Positioning coordinates\n\t\tx,\n\t\ty,\n\t\t// Object with \"regular\" refs to both \"reference\" and \"floating\"\n\t\trefs,\n\t\t// Type of CSS position property to use (absolute or fixed)\n\t\tstrategy,\n\t\tupdate,\n\t\tplacement: computedPlacement,\n\t\tmiddlewareData: { arrow: arrowData },\n\t} = useFloating( {\n\t\tplacement:\n\t\t\tnormalizedPlacementFromProps === 'overlay'\n\t\t\t\t? undefined\n\t\t\t\t: normalizedPlacementFromProps,\n\t\tmiddleware,\n\t\twhileElementsMounted: ( referenceParam, floatingParam, updateParam ) =>\n\t\t\tautoUpdate( referenceParam, floatingParam, updateParam, {\n\t\t\t\tlayoutShift: false,\n\t\t\t\tanimationFrame: true,\n\t\t\t} ),\n\t} );\n\n\tconst arrowCallbackRef = useCallback(\n\t\t( node: HTMLElement | null ) => {\n\t\t\tarrowRef.current = node;\n\t\t\tupdate();\n\t\t},\n\t\t[ update ]\n\t);\n\n\t// When any of the possible anchor \"sources\" change,\n\t// recompute the reference element (real or virtual) and its owner document.\n\n\tconst anchorRefTop = ( anchorRef as PopoverAnchorRefTopBottom | undefined )\n\t\t?.top;\n\tconst anchorRefBottom = (\n\t\tanchorRef as PopoverAnchorRefTopBottom | undefined\n\t )?.bottom;\n\tconst anchorRefStartContainer = ( anchorRef as Range | undefined )\n\t\t?.startContainer;\n\tconst anchorRefCurrent = ( anchorRef as PopoverAnchorRefReference )\n\t\t?.current;\n\n\tuseLayoutEffect( () => {\n\t\tconst resultingReferenceElement = getReferenceElement( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t} );\n\n\t\trefs.setReference( resultingReferenceElement );\n\t}, [\n\t\tanchor,\n\t\tanchorRef,\n\t\tanchorRefTop,\n\t\tanchorRefBottom,\n\t\tanchorRefStartContainer,\n\t\tanchorRefCurrent,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tfallbackReferenceElement,\n\t\trefs,\n\t] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\trefs.setFloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\tconst style = isExpanded\n\t\t? undefined\n\t\t: {\n\t\t\t\tposition: strategy,\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\t// `x` and `y` are framer-motion specific props and are shorthands\n\t\t\t\t// for `translateX` and `translateY`. Currently it is not possible\n\t\t\t\t// to use `translateX` and `translateY` because those values would\n\t\t\t\t// be overridden by the return value of the\n\t\t\t\t// `placementToMotionAnimationProps` function.\n\t\t\t\tx: computePopoverPosition( x ),\n\t\t\t\ty: computePopoverPosition( y ),\n\t\t };\n\n\tconst shouldReduceMotion = useReducedMotion();\n\tconst shouldAnimate = animate && ! isExpanded && ! shouldReduceMotion;\n\n\tconst [ animationFinished, setAnimationFinished ] = useState( false );\n\n\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t() => placementToMotionAnimationProps( computedPlacement ),\n\t\t[ computedPlacement ]\n\t);\n\n\tconst animationProps: HTMLMotionProps< 'div' > = shouldAnimate\n\t\t? {\n\t\t\t\tstyle: {\n\t\t\t\t\t...contentStyle,\n\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t...style,\n\t\t\t\t},\n\t\t\t\tonAnimationComplete: () => setAnimationFinished( true ),\n\t\t\t\t...otherMotionProps,\n\t\t }\n\t\t: {\n\t\t\t\tanimate: false,\n\t\t\t\tstyle: {\n\t\t\t\t\t...contentStyle,\n\t\t\t\t\t...style,\n\t\t\t\t},\n\t\t };\n\n\t// When Floating UI has finished positioning and Framer Motion has finished animating\n\t// the popover, add the `is-positioned` class to signal that all transitions have finished.\n\tconst isPositioned =\n\t\t( ! shouldAnimate || animationFinished ) && x !== null && y !== null;\n\n\tlet content = (\n\t\t<motion.div\n\t\t\tclassName={ clsx( className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-positioned': isPositioned,\n\t\t\t\t// Use the 'alternate' classname for 'toolbar' variant for back compat.\n\t\t\t\t[ `is-${\n\t\t\t\t\tcomputedVariant === 'toolbar'\n\t\t\t\t\t\t? 'alternate'\n\t\t\t\t\t\t: computedVariant\n\t\t\t\t}` ]: computedVariant,\n\t\t\t} ) }\n\t\t\t{ ...animationProps }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t>\n\t\t\t{ /* Prevents scroll on the document */ }\n\t\t\t{ isExpanded && <ScrollLock /> }\n\t\t\t{ isExpanded && (\n\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"components-popover__close\"\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-popover__content\">{ children }</div>\n\t\t\t{ hasArrow && (\n\t\t\t\t<div\n\t\t\t\t\tref={ arrowCallbackRef }\n\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t'components-popover__arrow',\n\t\t\t\t\t\t`is-${ computedPlacement.split( '-' )[ 0 ] }`,\n\t\t\t\t\t].join( ' ' ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tleft:\n\t\t\t\t\t\t\ttypeof arrowData?.x !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.x )\n\t\t\t\t\t\t\t\t? `${ arrowData.x }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\ttop:\n\t\t\t\t\t\t\ttypeof arrowData?.y !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.y )\n\t\t\t\t\t\t\t\t? `${ arrowData.y }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<ArrowTriangle />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</motion.div>\n\t);\n\n\tconst shouldRenderWithinSlot = slot.ref && ! inline;\n\tconst hasAnchor = anchorRef || anchorRect || anchor;\n\n\tif ( shouldRenderWithinSlot ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t} else if ( ! inline ) {\n\t\tcontent = createPortal(\n\t\t\t<StyleProvider document={ document }>{ content }</StyleProvider>,\n\t\t\tgetPopoverFallbackContainer()\n\t\t);\n\t}\n\n\tif ( hasAnchor ) {\n\t\treturn content;\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<span ref={ anchorRefFallback } />\n\t\t\t{ content }\n\t\t</>\n\t);\n};\n\n/**\n * `Popover` renders its content in a floating modal. If no explicit anchor is passed via props, it anchors to its parent element by default.\n *\n * ```jsx\n * import { Button, Popover } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyPopover = () => {\n * \tconst [ isVisible, setIsVisible ] = useState( false );\n * \tconst toggleVisible = () => {\n * \t\tsetIsVisible( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<Button variant=\"secondary\" onClick={ toggleVisible }>\n * \t\t\tToggle Popover!\n * \t\t\t{ isVisible && <Popover>Popover is toggled!</Popover> }\n * \t\t</Button>\n * \t);\n * };\n * ```\n *\n */\nexport const Popover = contextConnect( UnforwardedPopover, 'Popover' );\n\nfunction PopoverSlot(\n\t{ name = SLOT_NAME }: { name?: string },\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Slot\n\t\t\tbubblesVirtually\n\t\t\tname={ name }\n\t\t\tclassName=\"popover-slot\"\n\t\t\tref={ ref }\n\t\t/>\n\t);\n}\n\n// @ts-expect-error For Legacy Reasons\nPopover.Slot = forwardRef( PopoverSlot );\n// @ts-expect-error For Legacy Reasons\nPopover.__unstableSlotNameProvider = slotNameContext.Provider;\n\nexport default Popover;\n"],"mappings":"AAAA;AACA;AACA;;AAEA,OAAOA,I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EAAGA,QAAU;MAAAR,QAAA,EAAGqH;IAAO,CAAiB,CAAC,EAChE/G,2BAA2B,CAAC,CAC7B,CAAC;EACF;EAEA,IAAK0H,SAAS,EAAG;IAChB,OAAOX,OAAO;EACf;EAEA,oBACC9H,KAAA,CAAAE,SAAA;IAAAO,QAAA,gBACCX,IAAA;MAAMkI,GAAG,EAAGrE;IAAmB,CAAE,CAAC,EAChCmE,OAAO;EAAA,CACR,CAAC;AAEL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMa,OAAO,GAAGlJ,cAAc,CAAE6B,kBAAkB,EAAE,SAAU,CAAC;AAEtE,SAASsH,WAAWA,CACnB;EAAEF,IAAI,GAAGvI;AAA6B,CAAC,EACvC6H,GAAwB,EACvB;EACD,oBACClI,IAAA,CAACZ,IAAI;IACJ2J,gBAAgB;IAChBH,IAAI,EAAGA,IAAM;IACbnI,SAAS,EAAC,cAAc;IACxByH,GAAG,EAAGA;EAAK,CACX,CAAC;AAEJ;;AAEA;AACAW,OAAO,CAACzJ,IAAI,GAAGlB,UAAU,CAAE4K,WAAY,CAAC;AACxC;AACAD,OAAO,CAACG,0BAA0B,GAAGlI,eAAe,CAACmI,QAAQ;AAE7D,eAAeJ,OAAO","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["size","overlayMiddlewares","name","fn","rects","reference","apply","elements","_elements$floating","firstElementChild","floating","HTMLElement","Object","assign","style","width","height"],"sources":["@wordpress/components/src/popover/overlay-middlewares.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { MiddlewareState } from '@floating-ui/react-dom';\nimport { size } from '@floating-ui/react-dom';\n\nexport function overlayMiddlewares() {\n\treturn [\n\t\t{\n\t\t\tname: 'overlay',\n\t\t\tfn( { rects }: MiddlewareState ) {\n\t\t\t\treturn rects.reference;\n\t\t\t},\n\t\t},\n\t\tsize( {\n\t\t\tapply( { rects, elements } ) {\n\t\t\t\tconst { firstElementChild } = elements.floating ?? {};\n\n\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\twidth: `${ rects.reference.width }px`,\n\t\t\t\t\theight: `${ rects.reference.height }px`,\n\t\t\t\t} );\n\t\t\t},\n\t\t} ),\n\t];\n}\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,wBAAwB;AAE7C,OAAO,SAASC,kBAAkBA,CAAA,EAAG;EACpC,OAAO,CACN;IACCC,IAAI,EAAE,SAAS;IACfC,EAAEA,CAAE;MAAEC;IAAuB,CAAC,EAAG;MAChC,OAAOA,KAAK,CAACC,SAAS;IACvB;EACD,CAAC,EACDL,IAAI,CAAE;IACLM,KAAKA,CAAE;MAAEF,KAAK;MAAEG;IAAS,CAAC,EAAG;MAAA,IAAAC,kBAAA;MAC5B,MAAM;QAAEC;MAAkB,CAAC,IAAAD,kBAAA,GAAGD,QAAQ,CAACG,QAAQ,cAAAF,kBAAA,cAAAA,kBAAA,GAAI,CAAC,CAAC;;MAErD;MACA,IAAK,EAAIC,iBAAiB,YAAYE,WAAW,CAAE,EAAG;QACrD;MACD;;MAEA;MACAC,MAAM,CAACC,MAAM,CAAEJ,iBAAiB,CAACK,KAAK,EAAE;QACvCC,KAAK,EAAG,GAAGX,KAAK,CAACC,SAAS,CAACU,KAAO,IAAG;QACrCC,MAAM,EAAG,GAAGZ,KAAK,CAACC,SAAS,CAACW,MAAQ;MACrC,CAAE,CAAC;IACJ;EACD,CAAE,CAAC,CACH;AACF","ignoreList":[]}
1
+ {"version":3,"names":["size","overlayMiddlewares","name","fn","rects","reference","apply","elements","_elements$floating","firstElementChild","floating","HTMLElement","Object","assign","style","width","height"],"sources":["@wordpress/components/src/popover/overlay-middlewares.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { MiddlewareState } from '@floating-ui/react-dom';\nimport { size } from '@floating-ui/react-dom';\n\nexport function overlayMiddlewares() {\n\treturn [\n\t\t{\n\t\t\tname: 'overlay',\n\t\t\tfn( { rects }: MiddlewareState ) {\n\t\t\t\treturn rects.reference;\n\t\t\t},\n\t\t},\n\t\tsize( {\n\t\t\tapply( { rects, elements } ) {\n\t\t\t\tconst { firstElementChild } = elements.floating ?? {};\n\n\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\twidth: `${ rects.reference.width }px`,\n\t\t\t\t\theight: `${ rects.reference.height }px`,\n\t\t\t\t} );\n\t\t\t},\n\t\t} ),\n\t];\n}\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,wBAAwB;AAE7C,OAAO,SAASC,kBAAkBA,CAAA,EAAG;EACpC,OAAO,CACN;IACCC,IAAI,EAAE,SAAS;IACfC,EAAEA,CAAE;MAAEC;IAAuB,CAAC,EAAG;MAChC,OAAOA,KAAK,CAACC,SAAS;IACvB;EACD,CAAC,EACDL,IAAI,CAAE;IACLM,KAAKA,CAAE;MAAEF,KAAK;MAAEG;IAAS,CAAC,EAAG;MAAA,IAAAC,kBAAA;MAC5B,MAAM;QAAEC;MAAkB,CAAC,IAAAD,kBAAA,GAAGD,QAAQ,CAACG,QAAQ,cAAAF,kBAAA,cAAAA,kBAAA,GAAI,CAAC,CAAC;;MAErD;MACA,IAAK,EAAIC,iBAAiB,YAAYE,WAAW,CAAE,EAAG;QACrD;MACD;;MAEA;MACAC,MAAM,CAACC,MAAM,CAAEJ,iBAAiB,CAACK,KAAK,EAAE;QACvCC,KAAK,EAAE,GAAIX,KAAK,CAACC,SAAS,CAACU,KAAK,IAAK;QACrCC,MAAM,EAAE,GAAIZ,KAAK,CAACC,SAAS,CAACW,MAAM;MACnC,CAAE,CAAC;IACJ;EACD,CAAE,CAAC,CACH;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["POSITION_TO_PLACEMENT","bottom","top","middle","positionToPlacement","position","_POSITION_TO_PLACEMEN","PLACEMENT_TO_ANIMATION_ORIGIN","originX","originY","right","left","overlay","placementToMotionAnimationProps","placement","translateProp","startsWith","translateDirection","style","initial","opacity","scale","animate","transition","duration","ease","isTopBottom","anchorRef","isRef","current","getReferenceElement","anchor","anchorRect","getAnchorRect","fallbackReferenceElement","_referenceElement","referenceElement","getBoundingClientRect","topRect","bottomRect","window","DOMRect","x","y","width","_rect$x","_rect$y","_rect$width","_rect$height","rect","height","parentElement","computePopoverPosition","c","Number","isNaN","undefined","Math","round"],"sources":["@wordpress/components/src/popover/utils.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { MotionProps } from 'framer-motion';\nimport type { Placement, ReferenceType } from '@floating-ui/react-dom';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\n\nconst POSITION_TO_PLACEMENT: Record<\n\tNonNullable< PopoverProps[ 'position' ] >,\n\tPlacement\n> = {\n\tbottom: 'bottom',\n\ttop: 'top',\n\t'middle left': 'left',\n\t'middle right': 'right',\n\t'bottom left': 'bottom-end',\n\t'bottom center': 'bottom',\n\t'bottom right': 'bottom-start',\n\t'top left': 'top-end',\n\t'top center': 'top',\n\t'top right': 'top-start',\n\t'middle left left': 'left',\n\t'middle left right': 'left',\n\t'middle left bottom': 'left-end',\n\t'middle left top': 'left-start',\n\t'middle right left': 'right',\n\t'middle right right': 'right',\n\t'middle right bottom': 'right-end',\n\t'middle right top': 'right-start',\n\t'bottom left left': 'bottom-end',\n\t'bottom left right': 'bottom-end',\n\t'bottom left bottom': 'bottom-end',\n\t'bottom left top': 'bottom-end',\n\t'bottom center left': 'bottom',\n\t'bottom center right': 'bottom',\n\t'bottom center bottom': 'bottom',\n\t'bottom center top': 'bottom',\n\t'bottom right left': 'bottom-start',\n\t'bottom right right': 'bottom-start',\n\t'bottom right bottom': 'bottom-start',\n\t'bottom right top': 'bottom-start',\n\t'top left left': 'top-end',\n\t'top left right': 'top-end',\n\t'top left bottom': 'top-end',\n\t'top left top': 'top-end',\n\t'top center left': 'top',\n\t'top center right': 'top',\n\t'top center bottom': 'top',\n\t'top center top': 'top',\n\t'top right left': 'top-start',\n\t'top right right': 'top-start',\n\t'top right bottom': 'top-start',\n\t'top right top': 'top-start',\n\t// `middle`/`middle center [corner?]` positions are associated to a fallback\n\t// `bottom` placement because there aren't any corresponding placement values.\n\tmiddle: 'bottom',\n\t'middle center': 'bottom',\n\t'middle center bottom': 'bottom',\n\t'middle center left': 'bottom',\n\t'middle center right': 'bottom',\n\t'middle center top': 'bottom',\n};\n\n/**\n * Converts the `Popover`'s legacy \"position\" prop to the new \"placement\" prop\n * (used by `floating-ui`).\n *\n * @param position The legacy position\n * @return The corresponding placement\n */\nexport const positionToPlacement = (\n\tposition: NonNullable< PopoverProps[ 'position' ] >\n) => POSITION_TO_PLACEMENT[ position ] ?? 'bottom';\n\n/**\n * @typedef AnimationOrigin\n * @type {Object}\n * @property {number} originX A number between 0 and 1 (in CSS logical properties jargon, 0 is \"start\", 0.5 is \"center\", and 1 is \"end\")\n * @property {number} originY A number between 0 and 1 (0 is top, 0.5 is center, and 1 is bottom)\n */\n\nconst PLACEMENT_TO_ANIMATION_ORIGIN: Record<\n\tNonNullable< PopoverProps[ 'placement' ] >,\n\t{ originX: number; originY: number }\n> = {\n\ttop: { originX: 0.5, originY: 1 }, // open from bottom, center\n\t'top-start': { originX: 0, originY: 1 }, // open from bottom, left\n\t'top-end': { originX: 1, originY: 1 }, // open from bottom, right\n\tright: { originX: 0, originY: 0.5 }, // open from middle, left\n\t'right-start': { originX: 0, originY: 0 }, // open from top, left\n\t'right-end': { originX: 0, originY: 1 }, // open from bottom, left\n\tbottom: { originX: 0.5, originY: 0 }, // open from top, center\n\t'bottom-start': { originX: 0, originY: 0 }, // open from top, left\n\t'bottom-end': { originX: 1, originY: 0 }, // open from top, right\n\tleft: { originX: 1, originY: 0.5 }, // open from middle, right\n\t'left-start': { originX: 1, originY: 0 }, // open from top, right\n\t'left-end': { originX: 1, originY: 1 }, // open from bottom, right\n\toverlay: { originX: 0.5, originY: 0.5 }, // open from center, center\n};\n\n/**\n * Given the floating-ui `placement`, compute the framer-motion props for the\n * popover's entry animation.\n *\n * @param placement A placement string from floating ui\n * @return The object containing the motion props\n */\nexport const placementToMotionAnimationProps = (\n\tplacement: NonNullable< PopoverProps[ 'placement' ] >\n): MotionProps => {\n\tconst translateProp =\n\t\tplacement.startsWith( 'top' ) || placement.startsWith( 'bottom' )\n\t\t\t? 'translateY'\n\t\t\t: 'translateX';\n\tconst translateDirection =\n\t\tplacement.startsWith( 'top' ) || placement.startsWith( 'left' )\n\t\t\t? 1\n\t\t\t: -1;\n\n\treturn {\n\t\tstyle: PLACEMENT_TO_ANIMATION_ORIGIN[ placement ],\n\t\tinitial: {\n\t\t\topacity: 0,\n\t\t\tscale: 0,\n\t\t\t[ translateProp ]: `${ 2 * translateDirection }em`,\n\t\t},\n\t\tanimate: { opacity: 1, scale: 1, [ translateProp ]: 0 },\n\t\ttransition: { duration: 0.1, ease: [ 0, 0, 0.2, 1 ] },\n\t};\n};\n\nfunction isTopBottom(\n\tanchorRef: PopoverProps[ 'anchorRef' ]\n): anchorRef is PopoverAnchorRefTopBottom {\n\treturn !! ( anchorRef as PopoverAnchorRefTopBottom )?.top;\n}\n\nfunction isRef(\n\tanchorRef: PopoverProps[ 'anchorRef' ]\n): anchorRef is PopoverAnchorRefReference {\n\treturn !! ( anchorRef as PopoverAnchorRefReference )?.current;\n}\n\nexport const getReferenceElement = ( {\n\tanchor,\n\tanchorRef,\n\tanchorRect,\n\tgetAnchorRect,\n\tfallbackReferenceElement,\n}: Pick<\n\tPopoverProps,\n\t'anchorRef' | 'anchorRect' | 'getAnchorRect' | 'anchor'\n> & {\n\tfallbackReferenceElement: Element | null;\n} ): ReferenceType | null => {\n\tlet referenceElement = null;\n\n\tif ( anchor ) {\n\t\treferenceElement = anchor;\n\t} else if ( isTopBottom( anchorRef ) ) {\n\t\t// Create a virtual element for the ref. The expectation is that\n\t\t// if anchorRef.top is defined, then anchorRef.bottom is defined too.\n\t\t// Seems to be used by the block toolbar, when multiple blocks are selected\n\t\t// (top and bottom blocks are used to calculate the resulting rect).\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst topRect = anchorRef.top.getBoundingClientRect();\n\t\t\t\tconst bottomRect = anchorRef.bottom.getBoundingClientRect();\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\ttopRect.x,\n\t\t\t\t\ttopRect.y,\n\t\t\t\t\ttopRect.width,\n\t\t\t\t\tbottomRect.bottom - topRect.top\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t} else if ( isRef( anchorRef ) ) {\n\t\t// Standard React ref.\n\t\treferenceElement = anchorRef.current;\n\t} else if ( anchorRef ) {\n\t\t// If `anchorRef` holds directly the element's value (no `current` key)\n\t\t// This is a weird scenario and should be deprecated.\n\t\treferenceElement = anchorRef as Element;\n\t} else if ( anchorRect ) {\n\t\t// Create a virtual element for the ref.\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn anchorRect;\n\t\t\t},\n\t\t};\n\t} else if ( getAnchorRect ) {\n\t\t// Create a virtual element for the ref.\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst rect = getAnchorRect( fallbackReferenceElement );\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\trect.x ?? rect.left,\n\t\t\t\t\trect.y ?? rect.top,\n\t\t\t\t\trect.width ?? rect.right - rect.left,\n\t\t\t\t\trect.height ?? rect.bottom - rect.top\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t} else if ( fallbackReferenceElement ) {\n\t\t// If no explicit ref is passed via props, fall back to\n\t\t// anchoring to the popover's parent node.\n\t\treferenceElement = fallbackReferenceElement.parentElement;\n\t}\n\n\t// Convert any `undefined` value to `null`.\n\treturn referenceElement ?? null;\n};\n\n/**\n * Computes the final coordinate that needs to be applied to the floating\n * element when applying transform inline styles, defaulting to `undefined`\n * if the provided value is `null` or `NaN`.\n *\n * @param c input coordinate (usually as returned from floating-ui)\n * @return The coordinate's value to be used for inline styles. An `undefined`\n * return value means \"no style set\" for this coordinate.\n */\nexport const computePopoverPosition = ( c: number | null ) =>\n\tc === null || Number.isNaN( c ) ? undefined : Math.round( c );\n"],"mappings":"AAAA;AACA;AACA;;AAIA;AACA;AACA;;AAOA,MAAMA,qBAGL,GAAG;EACHC,MAAM,EAAE,QAAQ;EAChBC,GAAG,EAAE,KAAK;EACV,aAAa,EAAE,MAAM;EACrB,cAAc,EAAE,OAAO;EACvB,aAAa,EAAE,YAAY;EAC3B,eAAe,EAAE,QAAQ;EACzB,cAAc,EAAE,cAAc;EAC9B,UAAU,EAAE,SAAS;EACrB,YAAY,EAAE,KAAK;EACnB,WAAW,EAAE,WAAW;EACxB,kBAAkB,EAAE,MAAM;EAC1B,mBAAmB,EAAE,MAAM;EAC3B,oBAAoB,EAAE,UAAU;EAChC,iBAAiB,EAAE,YAAY;EAC/B,mBAAmB,EAAE,OAAO;EAC5B,oBAAoB,EAAE,OAAO;EAC7B,qBAAqB,EAAE,WAAW;EAClC,kBAAkB,EAAE,aAAa;EACjC,kBAAkB,EAAE,YAAY;EAChC,mBAAmB,EAAE,YAAY;EACjC,oBAAoB,EAAE,YAAY;EAClC,iBAAiB,EAAE,YAAY;EAC/B,oBAAoB,EAAE,QAAQ;EAC9B,qBAAqB,EAAE,QAAQ;EAC/B,sBAAsB,EAAE,QAAQ;EAChC,mBAAmB,EAAE,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AACC,KAAK,CAAEF,CAAE,CAAC,GAAGG,SAAS,GAAGC,IAAI,CAACC,KAAK,CAAEL,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["POSITION_TO_PLACEMENT","bottom","top","middle","positionToPlacement","position","_POSITION_TO_PLACEMEN","PLACEMENT_TO_ANIMATION_ORIGIN","originX","originY","right","left","overlay","placementToMotionAnimationProps","placement","translateProp","startsWith","translateDirection","style","initial","opacity","scale","animate","transition","duration","ease","isTopBottom","anchorRef","isRef","current","getReferenceElement","anchor","anchorRect","getAnchorRect","fallbackReferenceElement","_referenceElement","referenceElement","getBoundingClientRect","topRect","bottomRect","window","DOMRect","x","y","width","_rect$x","_rect$y","_rect$width","_rect$height","rect","height","parentElement","computePopoverPosition","c","Number","isNaN","undefined","Math","round"],"sources":["@wordpress/components/src/popover/utils.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { MotionProps } from 'framer-motion';\nimport type { Placement, ReferenceType } from '@floating-ui/react-dom';\n\n/**\n * Internal dependencies\n */\nimport type {\n\tPopoverProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\n\nconst POSITION_TO_PLACEMENT: Record<\n\tNonNullable< PopoverProps[ 'position' ] >,\n\tPlacement\n> = {\n\tbottom: 'bottom',\n\ttop: 'top',\n\t'middle left': 'left',\n\t'middle right': 'right',\n\t'bottom left': 'bottom-end',\n\t'bottom center': 'bottom',\n\t'bottom right': 'bottom-start',\n\t'top left': 'top-end',\n\t'top center': 'top',\n\t'top right': 'top-start',\n\t'middle left left': 'left',\n\t'middle left right': 'left',\n\t'middle left bottom': 'left-end',\n\t'middle left top': 'left-start',\n\t'middle right left': 'right',\n\t'middle right right': 'right',\n\t'middle right bottom': 'right-end',\n\t'middle right top': 'right-start',\n\t'bottom left left': 'bottom-end',\n\t'bottom left right': 'bottom-end',\n\t'bottom left bottom': 'bottom-end',\n\t'bottom left top': 'bottom-end',\n\t'bottom center left': 'bottom',\n\t'bottom center right': 'bottom',\n\t'bottom center bottom': 'bottom',\n\t'bottom center top': 'bottom',\n\t'bottom right left': 'bottom-start',\n\t'bottom right right': 'bottom-start',\n\t'bottom right bottom': 'bottom-start',\n\t'bottom right top': 'bottom-start',\n\t'top left left': 'top-end',\n\t'top left right': 'top-end',\n\t'top left bottom': 'top-end',\n\t'top left top': 'top-end',\n\t'top center left': 'top',\n\t'top center right': 'top',\n\t'top center bottom': 'top',\n\t'top center top': 'top',\n\t'top right left': 'top-start',\n\t'top right right': 'top-start',\n\t'top right bottom': 'top-start',\n\t'top right top': 'top-start',\n\t// `middle`/`middle center [corner?]` positions are associated to a fallback\n\t// `bottom` placement because there aren't any corresponding placement values.\n\tmiddle: 'bottom',\n\t'middle center': 'bottom',\n\t'middle center bottom': 'bottom',\n\t'middle center left': 'bottom',\n\t'middle center right': 'bottom',\n\t'middle center top': 'bottom',\n};\n\n/**\n * Converts the `Popover`'s legacy \"position\" prop to the new \"placement\" prop\n * (used by `floating-ui`).\n *\n * @param position The legacy position\n * @return The corresponding placement\n */\nexport const positionToPlacement = (\n\tposition: NonNullable< PopoverProps[ 'position' ] >\n) => POSITION_TO_PLACEMENT[ position ] ?? 'bottom';\n\n/**\n * @typedef AnimationOrigin\n * @type {Object}\n * @property {number} originX A number between 0 and 1 (in CSS logical properties jargon, 0 is \"start\", 0.5 is \"center\", and 1 is \"end\")\n * @property {number} originY A number between 0 and 1 (0 is top, 0.5 is center, and 1 is bottom)\n */\n\nconst PLACEMENT_TO_ANIMATION_ORIGIN: Record<\n\tNonNullable< PopoverProps[ 'placement' ] >,\n\t{ originX: number; originY: number }\n> = {\n\ttop: { originX: 0.5, originY: 1 }, // open from bottom, center\n\t'top-start': { originX: 0, originY: 1 }, // open from bottom, left\n\t'top-end': { originX: 1, originY: 1 }, // open from bottom, right\n\tright: { originX: 0, originY: 0.5 }, // open from middle, left\n\t'right-start': { originX: 0, originY: 0 }, // open from top, left\n\t'right-end': { originX: 0, originY: 1 }, // open from bottom, left\n\tbottom: { originX: 0.5, originY: 0 }, // open from top, center\n\t'bottom-start': { originX: 0, originY: 0 }, // open from top, left\n\t'bottom-end': { originX: 1, originY: 0 }, // open from top, right\n\tleft: { originX: 1, originY: 0.5 }, // open from middle, right\n\t'left-start': { originX: 1, originY: 0 }, // open from top, right\n\t'left-end': { originX: 1, originY: 1 }, // open from bottom, right\n\toverlay: { originX: 0.5, originY: 0.5 }, // open from center, center\n};\n\n/**\n * Given the floating-ui `placement`, compute the framer-motion props for the\n * popover's entry animation.\n *\n * @param placement A placement string from floating ui\n * @return The object containing the motion props\n */\nexport const placementToMotionAnimationProps = (\n\tplacement: NonNullable< PopoverProps[ 'placement' ] >\n): MotionProps => {\n\tconst translateProp =\n\t\tplacement.startsWith( 'top' ) || placement.startsWith( 'bottom' )\n\t\t\t? 'translateY'\n\t\t\t: 'translateX';\n\tconst translateDirection =\n\t\tplacement.startsWith( 'top' ) || placement.startsWith( 'left' )\n\t\t\t? 1\n\t\t\t: -1;\n\n\treturn {\n\t\tstyle: PLACEMENT_TO_ANIMATION_ORIGIN[ placement ],\n\t\tinitial: {\n\t\t\topacity: 0,\n\t\t\tscale: 0,\n\t\t\t[ translateProp ]: `${ 2 * translateDirection }em`,\n\t\t},\n\t\tanimate: { opacity: 1, scale: 1, [ translateProp ]: 0 },\n\t\ttransition: { duration: 0.1, ease: [ 0, 0, 0.2, 1 ] },\n\t};\n};\n\nfunction isTopBottom(\n\tanchorRef: PopoverProps[ 'anchorRef' ]\n): anchorRef is PopoverAnchorRefTopBottom {\n\treturn !! ( anchorRef as PopoverAnchorRefTopBottom )?.top;\n}\n\nfunction isRef(\n\tanchorRef: PopoverProps[ 'anchorRef' ]\n): anchorRef is PopoverAnchorRefReference {\n\treturn !! ( anchorRef as PopoverAnchorRefReference )?.current;\n}\n\nexport const getReferenceElement = ( {\n\tanchor,\n\tanchorRef,\n\tanchorRect,\n\tgetAnchorRect,\n\tfallbackReferenceElement,\n}: Pick<\n\tPopoverProps,\n\t'anchorRef' | 'anchorRect' | 'getAnchorRect' | 'anchor'\n> & {\n\tfallbackReferenceElement: Element | null;\n} ): ReferenceType | null => {\n\tlet referenceElement = null;\n\n\tif ( anchor ) {\n\t\treferenceElement = anchor;\n\t} else if ( isTopBottom( anchorRef ) ) {\n\t\t// Create a virtual element for the ref. The expectation is that\n\t\t// if anchorRef.top is defined, then anchorRef.bottom is defined too.\n\t\t// Seems to be used by the block toolbar, when multiple blocks are selected\n\t\t// (top and bottom blocks are used to calculate the resulting rect).\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst topRect = anchorRef.top.getBoundingClientRect();\n\t\t\t\tconst bottomRect = anchorRef.bottom.getBoundingClientRect();\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\ttopRect.x,\n\t\t\t\t\ttopRect.y,\n\t\t\t\t\ttopRect.width,\n\t\t\t\t\tbottomRect.bottom - topRect.top\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t} else if ( isRef( anchorRef ) ) {\n\t\t// Standard React ref.\n\t\treferenceElement = anchorRef.current;\n\t} else if ( anchorRef ) {\n\t\t// If `anchorRef` holds directly the element's value (no `current` key)\n\t\t// This is a weird scenario and should be deprecated.\n\t\treferenceElement = anchorRef as Element;\n\t} else if ( anchorRect ) {\n\t\t// Create a virtual element for the ref.\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn anchorRect;\n\t\t\t},\n\t\t};\n\t} else if ( getAnchorRect ) {\n\t\t// Create a virtual element for the ref.\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\tconst rect = getAnchorRect( fallbackReferenceElement );\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\trect.x ?? rect.left,\n\t\t\t\t\trect.y ?? rect.top,\n\t\t\t\t\trect.width ?? rect.right - rect.left,\n\t\t\t\t\trect.height ?? rect.bottom - rect.top\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\t} else if ( fallbackReferenceElement ) {\n\t\t// If no explicit ref is passed via props, fall back to\n\t\t// anchoring to the popover's parent node.\n\t\treferenceElement = fallbackReferenceElement.parentElement;\n\t}\n\n\t// Convert any `undefined` value to `null`.\n\treturn referenceElement ?? null;\n};\n\n/**\n * Computes the final coordinate that needs to be applied to the floating\n * element when applying transform inline styles, defaulting to `undefined`\n * if the provided value is `null` or `NaN`.\n *\n * @param c input coordinate (usually as returned from floating-ui)\n * @return The coordinate's value to be used for inline styles. An `undefined`\n * return value means \"no style set\" for this coordinate.\n */\nexport const computePopoverPosition = ( c: number | null ) =>\n\tc === null || Number.isNaN( c ) ? undefined : Math.round( c );\n"],"mappings":"AAAA;AACA;AACA;;AAIA;AACA;AACA;;AAOA,MAAMA,qBAGL,GAAG;EACHC,MAAM,EAAE,QAAQ;EAChBC,GAAG,EAAE,KAAK;EACV,aAAa,EAAE,MAAM;EACrB,cAAc,EAAE,OAAO;EACvB,aAAa,EAAE,YAAY;EAC3B,eAAe,EAAE,QAAQ;EACzB,cAAc,EAAE,cAAc;EAC9B,UAAU,EAAE,SAAS;EACrB,YAAY,EAAE,KAAK;EACnB,WAAW,EAAE,WAAW;EACxB,kBAAkB,EAAE,MAAM;EAC1B,mBAAmB,EAAE,MAAM;EAC3B,oBAAoB,EAAE,UAAU;EAChC,iBAAiB,EAAE,YAAY;EAC/B,mBAAmB,EAAE,OAAO;EAC5B,oBAAoB,EAAE,OAAO;EAC7B,qBAAqB,EAAE,WAAW;EAClC,kBAAkB,EAAE,aAAa;EACjC,kBAAkB,EAAE,YAAY;EAChC,mBAAmB,EAAE,YAAY;EACjC,oBAAoB,EAAE,YAAY;EAClC,iBAAiB,EAAE,YAAY;EAC/B,oBAAoB,EAAE,QAAQ;EAC9B,qBAAqB,EAAE,QAAQ;EAC/B,sBAAsB,EAAE,QAAQ;EAChC,mBAAmB,EAAE,QAAQ;EAC7B,mBAAmB,EAAE,cAAc;EACnC,oBAAoB,EAAE,cAAc;EACpC,qBAAqB,EAAE,cAAc;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","ignoreList":[]}
@@ -3,10 +3,10 @@
3
3
  */
4
4
  import { positionToPlacement as __experimentalPopoverLegacyPositionToPlacement } from './popover/utils';
5
5
  import { createPrivateSlotFill } from './slot-fill';
6
- import { DropdownMenuV2 } from './dropdown-menu-v2';
6
+ import { Menu } from './menu';
7
7
  import { ComponentsContext } from './context/context-system-provider';
8
8
  import Theme from './theme';
9
- import Tabs from './tabs';
9
+ import { Tabs } from './tabs';
10
10
  import { kebabCase } from './utils/strings';
11
11
  import { lock } from './lock-unlock';
12
12
  export const privateApis = {};
@@ -16,7 +16,7 @@ lock(privateApis, {
16
16
  ComponentsContext,
17
17
  Tabs,
18
18
  Theme,
19
- DropdownMenuV2,
19
+ Menu,
20
20
  kebabCase
21
21
  });
22
22
  //# sourceMappingURL=private-apis.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["positionToPlacement","__experimentalPopoverLegacyPositionToPlacement","createPrivateSlotFill","DropdownMenuV2","ComponentsContext","Theme","Tabs","kebabCase","lock","privateApis"],"sources":["@wordpress/components/src/private-apis.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { positionToPlacement as __experimentalPopoverLegacyPositionToPlacement } from './popover/utils';\nimport { createPrivateSlotFill } from './slot-fill';\nimport { DropdownMenuV2 } from './dropdown-menu-v2';\nimport { ComponentsContext } from './context/context-system-provider';\nimport Theme from './theme';\nimport Tabs from './tabs';\nimport { kebabCase } from './utils/strings';\nimport { lock } from './lock-unlock';\n\nexport const privateApis = {};\nlock( privateApis, {\n\t__experimentalPopoverLegacyPositionToPlacement,\n\tcreatePrivateSlotFill,\n\tComponentsContext,\n\tTabs,\n\tTheme,\n\tDropdownMenuV2,\n\tkebabCase,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAmB,IAAIC,8CAA8C,QAAQ,iBAAiB;AACvG,SAASC,qBAAqB,QAAQ,aAAa;AACnD,SAASC,cAAc,QAAQ,oBAAoB;AACnD,SAASC,iBAAiB,QAAQ,mCAAmC;AACrE,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,IAAI,MAAM,QAAQ;AACzB,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,IAAI,QAAQ,eAAe;AAEpC,OAAO,MAAMC,WAAW,GAAG,CAAC,CAAC;AAC7BD,IAAI,CAAEC,WAAW,EAAE;EAClBR,8CAA8C;EAC9CC,qBAAqB;EACrBE,iBAAiB;EACjBE,IAAI;EACJD,KAAK;EACLF,cAAc;EACdI;AACD,CAAE,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["positionToPlacement","__experimentalPopoverLegacyPositionToPlacement","createPrivateSlotFill","Menu","ComponentsContext","Theme","Tabs","kebabCase","lock","privateApis"],"sources":["@wordpress/components/src/private-apis.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { positionToPlacement as __experimentalPopoverLegacyPositionToPlacement } from './popover/utils';\nimport { createPrivateSlotFill } from './slot-fill';\nimport { Menu } from './menu';\nimport { ComponentsContext } from './context/context-system-provider';\nimport Theme from './theme';\nimport { Tabs } from './tabs';\nimport { kebabCase } from './utils/strings';\nimport { lock } from './lock-unlock';\n\nexport const privateApis = {};\nlock( privateApis, {\n\t__experimentalPopoverLegacyPositionToPlacement,\n\tcreatePrivateSlotFill,\n\tComponentsContext,\n\tTabs,\n\tTheme,\n\tMenu,\n\tkebabCase,\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,mBAAmB,IAAIC,8CAA8C,QAAQ,iBAAiB;AACvG,SAASC,qBAAqB,QAAQ,aAAa;AACnD,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,iBAAiB,QAAQ,mCAAmC;AACrE,OAAOC,KAAK,MAAM,SAAS;AAC3B,SAASC,IAAI,QAAQ,QAAQ;AAC7B,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,IAAI,QAAQ,eAAe;AAEpC,OAAO,MAAMC,WAAW,GAAG,CAAC,CAAC;AAC7BD,IAAI,CAAEC,WAAW,EAAE;EAClBR,8CAA8C;EAC9CC,qBAAqB;EACrBE,iBAAiB;EACjBE,IAAI;EACJD,KAAK;EACLF,IAAI;EACJI;AACD,CAAE,CAAC","ignoreList":[]}
@@ -12,8 +12,7 @@ import { forwardRef } from '@wordpress/element';
12
12
  * Internal dependencies
13
13
  */
14
14
  import * as ProgressBarStyled from './styles';
15
- import { jsx as _jsx } from "react/jsx-runtime";
16
- import { jsxs as _jsxs } from "react/jsx-runtime";
15
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
16
  function UnforwardedProgressBar(props, ref) {
18
17
  const {
19
18
  className,
@@ -1 +1 @@
1
- {"version":3,"names":["__","forwardRef","ProgressBarStyled","jsx","_jsx","jsxs","_jsxs","UnforwardedProgressBar","props","ref","className","value","progressProps","isIndeterminate","Number","isFinite","Track","children","Indicator","style","undefined","ProgressElement","max","ProgressBar"],"sources":["@wordpress/components/src/progress-bar/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as ProgressBarStyled from './styles';\nimport type { ProgressBarProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction UnforwardedProgressBar(\n\tprops: WordPressComponentProps< ProgressBarProps, 'progress', false >,\n\tref: ForwardedRef< HTMLProgressElement >\n) {\n\tconst { className, value, ...progressProps } = props;\n\tconst isIndeterminate = ! Number.isFinite( value );\n\n\treturn (\n\t\t<ProgressBarStyled.Track className={ className }>\n\t\t\t<ProgressBarStyled.Indicator\n\t\t\t\tstyle={ {\n\t\t\t\t\t'--indicator-width': ! isIndeterminate\n\t\t\t\t\t\t? `${ value }%`\n\t\t\t\t\t\t: undefined,\n\t\t\t\t} }\n\t\t\t\tisIndeterminate={ isIndeterminate }\n\t\t\t/>\n\t\t\t<ProgressBarStyled.ProgressElement\n\t\t\t\tmax={ 100 }\n\t\t\t\tvalue={ value }\n\t\t\t\taria-label={ __( 'Loading …' ) }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...progressProps }\n\t\t\t/>\n\t\t</ProgressBarStyled.Track>\n\t);\n}\n\n/**\n * A simple horizontal progress bar component.\n *\n * Supports two modes: determinate and indeterminate. A progress bar is determinate\n * when a specific progress value has been specified (from 0 to 100), and indeterminate\n * when a value hasn't been specified.\n *\n * ```jsx\n * import { ProgressBar } from '@wordpress/components';\n *\n * const MyLoadingComponent = () => {\n * \treturn <ProgressBar />;\n * };\n * ```\n */\nexport const ProgressBar = forwardRef( UnforwardedProgressBar );\n\nexport default ProgressBar;\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAO,KAAKC,iBAAiB,MAAM,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAI9C,SAASC,sBAAsBA,CAC9BC,KAAqE,EACrEC,GAAwC,EACvC;EACD,MAAM;IAAEC,SAAS;IAAEC,KAAK;IAAE,GAAGC;EAAc,CAAC,GAAGJ,KAAK;EACpD,MAAMK,eAAe,GAAG,CAAEC,MAAM,CAACC,QAAQ,CAAEJ,KAAM,CAAC;EAElD,oBACCL,KAAA,CAACJ,iBAAiB,CAACc,KAAK;IAACN,SAAS,EAAGA,SAAW;IAAAO,QAAA,gBAC/Cb,IAAA,CAACF,iBAAiB,CAACgB,SAAS;MAC3BC,KAAK,EAAG;QACP,mBAAmB,EAAE,CAAEN,eAAe,GAClC,GAAGF,KAAO,GAAE,GACbS;MACJ,CAAG;MACHP,eAAe,EAAGA;IAAiB,CACnC,CAAC,eACFT,IAAA,CAACF,iBAAiB,CAACmB,eAAe;MACjCC,GAAG,EAAG,GAAK;MACXX,KAAK,EAAGA,KAAO;MACf,cAAaX,EAAE,CAAE,WAAY,CAAG;MAChCS,GAAG,EAAGA,GAAK;MAAA,GACNG;IAAa,CAClB,CAAC;EAAA,CACsB,CAAC;AAE5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMW,WAAW,GAAGtB,UAAU,CAAEM,sBAAuB,CAAC;AAE/D,eAAegB,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["__","forwardRef","ProgressBarStyled","jsx","_jsx","jsxs","_jsxs","UnforwardedProgressBar","props","ref","className","value","progressProps","isIndeterminate","Number","isFinite","Track","children","Indicator","style","undefined","ProgressElement","max","ProgressBar"],"sources":["@wordpress/components/src/progress-bar/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport * as ProgressBarStyled from './styles';\nimport type { ProgressBarProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction UnforwardedProgressBar(\n\tprops: WordPressComponentProps< ProgressBarProps, 'progress', false >,\n\tref: ForwardedRef< HTMLProgressElement >\n) {\n\tconst { className, value, ...progressProps } = props;\n\tconst isIndeterminate = ! Number.isFinite( value );\n\n\treturn (\n\t\t<ProgressBarStyled.Track className={ className }>\n\t\t\t<ProgressBarStyled.Indicator\n\t\t\t\tstyle={ {\n\t\t\t\t\t'--indicator-width': ! isIndeterminate\n\t\t\t\t\t\t? `${ value }%`\n\t\t\t\t\t\t: undefined,\n\t\t\t\t} }\n\t\t\t\tisIndeterminate={ isIndeterminate }\n\t\t\t/>\n\t\t\t<ProgressBarStyled.ProgressElement\n\t\t\t\tmax={ 100 }\n\t\t\t\tvalue={ value }\n\t\t\t\taria-label={ __( 'Loading …' ) }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...progressProps }\n\t\t\t/>\n\t\t</ProgressBarStyled.Track>\n\t);\n}\n\n/**\n * A simple horizontal progress bar component.\n *\n * Supports two modes: determinate and indeterminate. A progress bar is determinate\n * when a specific progress value has been specified (from 0 to 100), and indeterminate\n * when a value hasn't been specified.\n *\n * ```jsx\n * import { ProgressBar } from '@wordpress/components';\n *\n * const MyLoadingComponent = () => {\n * \treturn <ProgressBar />;\n * };\n * ```\n */\nexport const ProgressBar = forwardRef( UnforwardedProgressBar );\n\nexport default ProgressBar;\n"],"mappings":"AAAA;AACA;AACA;;AAGA;AACA;AACA;AACA,SAASA,EAAE,QAAQ,iBAAiB;AACpC,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAO,KAAKC,iBAAiB,MAAM,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAI9C,SAASC,sBAAsBA,CAC9BC,KAAqE,EACrEC,GAAwC,EACvC;EACD,MAAM;IAAEC,SAAS;IAAEC,KAAK;IAAE,GAAGC;EAAc,CAAC,GAAGJ,KAAK;EACpD,MAAMK,eAAe,GAAG,CAAEC,MAAM,CAACC,QAAQ,CAAEJ,KAAM,CAAC;EAElD,oBACCL,KAAA,CAACJ,iBAAiB,CAACc,KAAK;IAACN,SAAS,EAAGA,SAAW;IAAAO,QAAA,gBAC/Cb,IAAA,CAACF,iBAAiB,CAACgB,SAAS;MAC3BC,KAAK,EAAG;QACP,mBAAmB,EAAE,CAAEN,eAAe,GACnC,GAAIF,KAAK,GAAI,GACbS;MACJ,CAAG;MACHP,eAAe,EAAGA;IAAiB,CACnC,CAAC,eACFT,IAAA,CAACF,iBAAiB,CAACmB,eAAe;MACjCC,GAAG,EAAG,GAAK;MACXX,KAAK,EAAGA,KAAO;MACf,cAAaX,EAAE,CAAE,WAAY,CAAG;MAChCS,GAAG,EAAGA,GAAK;MAAA,GACNG;IAAa,CAClB,CAAC;EAAA,CACsB,CAAC;AAE5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMW,WAAW,GAAGtB,UAAU,CAAEM,sBAAuB,CAAC;AAE/D,eAAegB,WAAW","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["css","keyframes","isRTL","COLORS","CONFIG","animateProgressBar","isRtl","animationDirection","INDETERMINATE_TRACK_WIDTH","Track","_styled","process","env","NODE_ENV","target","label","borderWidthFocus","theme","foreground","radiusFull","_ref","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","Indicator","isIndeterminate","animationDuration","animationTimingFunction","animationIterationCount","animationName","width","ProgressElement"],"sources":["@wordpress/components/src/progress-bar/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css, keyframes } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\nfunction animateProgressBar( isRtl = false ) {\n\tconst animationDirection = isRtl ? 'right' : 'left';\n\n\treturn keyframes( {\n\t\t'0%': {\n\t\t\t[ animationDirection ]: '-50%',\n\t\t},\n\t\t'100%': {\n\t\t\t[ animationDirection ]: '100%',\n\t\t},\n\t} );\n}\n\n// Width of the indicator for the indeterminate progress bar\nexport const INDETERMINATE_TRACK_WIDTH = 50;\n\nexport const Track = styled.div`\n\tposition: relative;\n\toverflow: hidden;\n\theight: ${ CONFIG.borderWidthFocus };\n\t/* Text color at 10% opacity */\n\tbackground-color: color-mix(\n\t\tin srgb,\n\t\t${ COLORS.theme.foreground },\n\t\ttransparent 90%\n\t);\n\tborder-radius: ${ CONFIG.radiusFull };\n\n\t// Windows high contrast mode.\n\toutline: 2px solid transparent;\n\toutline-offset: 2px;\n\n\t:where( & ) {\n\t\twidth: 160px;\n\t}\n`;\n\nexport const Indicator = styled.div< {\n\tisIndeterminate: boolean;\n} >`\n\tdisplay: inline-block;\n\tposition: absolute;\n\ttop: 0;\n\theight: 100%;\n\tborder-radius: ${ CONFIG.radiusFull };\n\t/* Text color at 90% opacity */\n\tbackground-color: color-mix(\n\t\tin srgb,\n\t\t${ COLORS.theme.foreground },\n\t\ttransparent 10%\n\t);\n\n\t// Windows high contrast mode.\n\toutline: 2px solid transparent;\n\toutline-offset: -2px;\n\n\t${ ( { isIndeterminate } ) =>\n\t\tisIndeterminate\n\t\t\t? css( {\n\t\t\t\t\tanimationDuration: '1.5s',\n\t\t\t\t\tanimationTimingFunction: 'ease-in-out',\n\t\t\t\t\tanimationIterationCount: 'infinite',\n\t\t\t\t\tanimationName: animateProgressBar( isRTL() ),\n\t\t\t\t\twidth: `${ INDETERMINATE_TRACK_WIDTH }%`,\n\t\t\t } )\n\t\t\t: css( {\n\t\t\t\t\twidth: 'var(--indicator-width)',\n\t\t\t\t\ttransition: 'width 0.4s ease-in-out',\n\t\t\t } ) };\n`;\n\nexport const ProgressElement = styled.progress`\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\topacity: 0;\n\twidth: 100%;\n\theight: 100%;\n`;\n"],"mappings":";;AAAA;AACA;AACA;;AAEA,SAASA,GAAG,EAAEC,SAAS,QAAQ,gBAAgB;;AAE/C;AACA;AACA;AACA,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,MAAM,QAAQ,UAAU;AAEzC,SAASC,kBAAkBA,CAAEC,KAAK,GAAG,KAAK,EAAG;EAC5C,MAAMC,kBAAkB,GAAGD,KAAK,GAAG,OAAO,GAAG,MAAM;EAEnD,OAAOL,SAAS,CAAE;IACjB,IAAI,EAAE;MACL,CAAEM,kBAAkB,GAAI;IACzB,CAAC;IACD,MAAM,EAAE;MACP,CAAEA,kBAAkB,GAAI;IACzB;EACD,CAAE,CAAC;AACJ;;AAEA;AACA,OAAO,MAAMC,yBAAyB,GAAG,EAAE;AAE3C,OAAO,MAAMC,KAAK,gBAAAC,OAAA,QAAAC,OAAA,CAAAC,GAAA,CAAAC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,QAAA,EAAAC;AAAA,EAO3B","ignoreList":[]}
1
+ {"version":3,"names":["css","keyframes","isRTL","COLORS","CONFIG","animateProgressBar","isRtl","animationDirection","INDETERMINATE_TRACK_WIDTH","Track","_styled","process","env","NODE_ENV","target","label","borderWidthFocus","theme","foreground","radiusFull","_ref","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__","Indicator","isIndeterminate","animationDuration","animationTimingFunction","animationIterationCount","animationName","width","ProgressElement"],"sources":["@wordpress/components/src/progress-bar/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport { css, keyframes } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\nfunction animateProgressBar( isRtl = false ) {\n\tconst animationDirection = isRtl ? 'right' : 'left';\n\n\treturn keyframes( {\n\t\t'0%': {\n\t\t\t[ animationDirection ]: '-50%',\n\t\t},\n\t\t'100%': {\n\t\t\t[ animationDirection ]: '100%',\n\t\t},\n\t} );\n}\n\n// Width of the indicator for the indeterminate progress bar\nexport const INDETERMINATE_TRACK_WIDTH = 50;\n\nexport const Track = styled.div`\n\tposition: relative;\n\toverflow: hidden;\n\theight: ${ CONFIG.borderWidthFocus };\n\t/* Text color at 10% opacity */\n\tbackground-color: color-mix(\n\t\tin srgb,\n\t\t${ COLORS.theme.foreground },\n\t\ttransparent 90%\n\t);\n\tborder-radius: ${ CONFIG.radiusFull };\n\n\t// Windows high contrast mode.\n\toutline: 2px solid transparent;\n\toutline-offset: 2px;\n\n\t:where( & ) {\n\t\twidth: 160px;\n\t}\n`;\n\nexport const Indicator = styled.div< {\n\tisIndeterminate: boolean;\n} >`\n\tdisplay: inline-block;\n\tposition: absolute;\n\ttop: 0;\n\theight: 100%;\n\tborder-radius: ${ CONFIG.radiusFull };\n\t/* Text color at 90% opacity */\n\tbackground-color: color-mix(\n\t\tin srgb,\n\t\t${ COLORS.theme.foreground },\n\t\ttransparent 10%\n\t);\n\n\t// Windows high contrast mode.\n\toutline: 2px solid transparent;\n\toutline-offset: -2px;\n\n\t${ ( { isIndeterminate } ) =>\n\t\tisIndeterminate\n\t\t\t? css( {\n\t\t\t\t\tanimationDuration: '1.5s',\n\t\t\t\t\tanimationTimingFunction: 'ease-in-out',\n\t\t\t\t\tanimationIterationCount: 'infinite',\n\t\t\t\t\tanimationName: animateProgressBar( isRTL() ),\n\t\t\t\t\twidth: `${ INDETERMINATE_TRACK_WIDTH }%`,\n\t\t\t } )\n\t\t\t: css( {\n\t\t\t\t\twidth: 'var(--indicator-width)',\n\t\t\t\t\ttransition: 'width 0.4s ease-in-out',\n\t\t\t } ) };\n`;\n\nexport const ProgressElement = styled.progress`\n\tposition: absolute;\n\ttop: 0;\n\tleft: 0;\n\topacity: 0;\n\twidth: 100%;\n\theight: 100%;\n`;\n"],"mappings":";;AAAA;AACA;AACA;;AAEA,SAASA,GAAG,EAAEC,SAAS,QAAQ,gBAAgB;;AAE/C;AACA;AACA;AACA,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA;AACA,SAASC,MAAM,EAAEC,MAAM,QAAQ,UAAU;AAEzC,SAASC,kBAAkBA,CAAEC,KAAK,GAAG,KAAK,EAAG;EAC5C,MAAMC,kBAAkB,GAAGD,KAAK,GAAG,OAAO,GAAG,MAAM;EAEnD,OAAOL,SAAS,CAAE;IACjB,IAAI,EAAE;MACL,CAAEM,kBAAkB,GAAI;IACzB,CAAC;IACD,MAAM,EAAE;MACP,CAAEA,kBAAkB,GAAI;IACzB;EACD,CAAE,CAAC;AACJ;;AAEA;AACA,OAAO,MAAMC,yBAAyB,GAAG,EAAE;AAE3C,OAAO,MAAMC,KAAK,gBAAAC,OAAA,QAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,gDAGNX,MAAM,CAACY,gBAAgB,sDA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ect","FormTokenField","RangeControl","SelectControl","VStack","jsx","_jsx","DEFAULT_MIN_ITEMS","DEFAULT_MAX_ITEMS","MAX_CATEGORIES_SUGGESTIONS","isSingleCategorySelection","props","isMultipleCategorySelection","QueryControls","authorList","selectedAuthorId","numberOfItems","order","orderBy","maxItems","minItems","onAuthorChange","onNumberOfItemsChange","onOrderChange","onOrderByChange","spacing","className","children","__nextHasNoMarginBottom","__next40pxDefaultSize","label","value","undefined","options","onChange","newOrderBy","newOrder","split","categoriesList","onCategoryChange","noOptionLabel","selectedCategoryId","categorySuggestions","selectedCategories","map","item","id","name","suggestions","Object","keys","maxSuggestions","min","max","required"],"sources":["@wordpress/components/src/query-controls/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AuthorSelect from './author-select';\nimport CategorySelect from './category-select';\nimport FormTokenField from '../form-token-field';\nimport RangeControl from '../range-control';\nimport SelectControl from '../select-control';\nimport { VStack } from '../v-stack';\nimport type {\n\tQueryControlsProps,\n\tQueryControlsWithMultipleCategorySelectionProps,\n\tQueryControlsWithSingleCategorySelectionProps,\n} from './types';\n\nconst DEFAULT_MIN_ITEMS = 1;\nconst DEFAULT_MAX_ITEMS = 100;\nconst MAX_CATEGORIES_SUGGESTIONS = 20;\n\nfunction isSingleCategorySelection(\n\tprops: QueryControlsProps\n): props is QueryControlsWithSingleCategorySelectionProps {\n\treturn 'categoriesList' in props;\n}\n\nfunction isMultipleCategorySelection(\n\tprops: QueryControlsProps\n): props is QueryControlsWithMultipleCategorySelectionProps {\n\treturn 'categorySuggestions' in props;\n}\n\n/**\n * Controls to query for posts.\n *\n * ```jsx\n * const MyQueryControls = () => (\n * <QueryControls\n * { ...{ maxItems, minItems, numberOfItems, order, orderBy } }\n * onOrderByChange={ ( newOrderBy ) => {\n * updateQuery( { orderBy: newOrderBy } )\n * }\n * onOrderChange={ ( newOrder ) => {\n * updateQuery( { order: newOrder } )\n * }\n * categoriesList={ categories }\n * selectedCategoryId={ category }\n * onCategoryChange={ ( newCategory ) => {\n * updateQuery( { category: newCategory } )\n * }\n * onNumberOfItemsChange={ ( newNumberOfItems ) => {\n * updateQuery( { numberOfItems: newNumberOfItems } )\n * } }\n * />\n * );\n * ```\n */\nexport function QueryControls( {\n\tauthorList,\n\tselectedAuthorId,\n\tnumberOfItems,\n\torder,\n\torderBy,\n\tmaxItems = DEFAULT_MAX_ITEMS,\n\tminItems = DEFAULT_MIN_ITEMS,\n\tonAuthorChange,\n\tonNumberOfItemsChange,\n\tonOrderChange,\n\tonOrderByChange,\n\t// Props for single OR multiple category selection are not destructured here,\n\t// but instead are destructured inline where necessary.\n\t...props\n}: QueryControlsProps ) {\n\treturn (\n\t\t<VStack spacing=\"4\" className=\"components-query-controls\">\n\t\t\t{ [\n\t\t\t\tonOrderChange && onOrderByChange && (\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tkey=\"query-controls-order-select\"\n\t\t\t\t\t\tlabel={ __( 'Order by' ) }\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\torderBy === undefined || order === undefined\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: `${ orderBy }/${ order }`\n\t\t\t\t\t\t}\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Newest to oldest' ),\n\t\t\t\t\t\t\t\tvalue: 'date/desc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Oldest to newest' ),\n\t\t\t\t\t\t\t\tvalue: 'date/asc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: Label for ordering posts by title in ascending order. */\n\t\t\t\t\t\t\t\tlabel: __( 'A → Z' ),\n\t\t\t\t\t\t\t\tvalue: 'title/asc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: Label for ordering posts by title in descending order. */\n\t\t\t\t\t\t\t\tlabel: __( 'Z → A' ),\n\t\t\t\t\t\t\t\tvalue: 'title/desc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tif ( typeof value !== 'string' ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst [ newOrderBy, newOrder ] = value.split( '/' );\n\t\t\t\t\t\t\tif ( newOrder !== order ) {\n\t\t\t\t\t\t\t\tonOrderChange(\n\t\t\t\t\t\t\t\t\tnewOrder as NonNullable<\n\t\t\t\t\t\t\t\t\t\tQueryControlsProps[ 'order' ]\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( newOrderBy !== orderBy ) {\n\t\t\t\t\t\t\t\tonOrderByChange(\n\t\t\t\t\t\t\t\t\tnewOrderBy as NonNullable<\n\t\t\t\t\t\t\t\t\t\tQueryControlsProps[ 'orderBy' ]\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tisSingleCategorySelection( props ) &&\n\t\t\t\t\tprops.categoriesList &&\n\t\t\t\t\tprops.onCategoryChange && (\n\t\t\t\t\t\t<CategorySelect\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tkey=\"query-controls-category-select\"\n\t\t\t\t\t\t\tcategoriesList={ props.categoriesList }\n\t\t\t\t\t\t\tlabel={ __( 'Category' ) }\n\t\t\t\t\t\t\tnoOptionLabel={ _x( 'All', 'categories' ) }\n\t\t\t\t\t\t\tselectedCategoryId={ props.selectedCategoryId }\n\t\t\t\t\t\t\tonChange={ props.onCategoryChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\tisMultipleCategorySelection( props ) &&\n\t\t\t\t\tprops.categorySuggestions &&\n\t\t\t\t\tprops.onCategoryChange && (\n\t\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tkey=\"query-controls-categories-select\"\n\t\t\t\t\t\t\tlabel={ __( 'Categories' ) }\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tprops.selectedCategories &&\n\t\t\t\t\t\t\t\tprops.selectedCategories.map( ( item ) => ( {\n\t\t\t\t\t\t\t\t\tid: item.id,\n\t\t\t\t\t\t\t\t\t// Keeping the fallback to `item.value` for legacy reasons,\n\t\t\t\t\t\t\t\t\t// even if items of `selectedCategories` should not have a\n\t\t\t\t\t\t\t\t\t// `value` property.\n\t\t\t\t\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\t\t\t\t\tvalue: item.name || item.value,\n\t\t\t\t\t\t\t\t} ) )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ Object.keys(\n\t\t\t\t\t\t\t\tprops.categorySuggestions\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonChange={ props.onCategoryChange }\n\t\t\t\t\t\t\tmaxSuggestions={ MAX_CATEGORIES_SUGGESTIONS }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\tonAuthorChange && (\n\t\t\t\t\t<AuthorSelect\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tkey=\"query-controls-author-select\"\n\t\t\t\t\t\tauthorList={ authorList }\n\t\t\t\t\t\tlabel={ __( 'Author' ) }\n\t\t\t\t\t\tnoOptionLabel={ _x( 'All', 'authors' ) }\n\t\t\t\t\t\tselectedAuthorId={ selectedAuthorId }\n\t\t\t\t\t\tonChange={ onAuthorChange }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tonNumberOfItemsChange && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tkey=\"query-controls-range-control\"\n\t\t\t\t\t\tlabel={ __( 'Number of items' ) }\n\t\t\t\t\t\tvalue={ numberOfItems }\n\t\t\t\t\t\tonChange={ onNumberOfItemsChange }\n\t\t\t\t\t\tmin={ minItems }\n\t\t\t\t\t\tmax={ maxItems }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t] }\n\t\t</VStack>\n\t);\n}\n\nexport default QueryControls;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;;AAExC;AACA;AACA;AACA,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,OAAOC,cAAc,MAAM,qBAAqB;AAChD,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,SAASC,MAAM,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOpC,MAAMC,iBAAiB,GAAG,CAAC;AAC3B,MAAMC,iBAAiB,GAAG,GAAG;AAC7B,MAAMC,0BAA0B,GAAG,EAAE;AAErC,SAASC,yBAAyBA,CACjCC,KAAyB,EACgC;EACzD,OAAO,gBAAgB,IAAIA,KAAK;AACjC;AAEA,SAASC,2BAA2BA,CACnCD,KAAyB,EACkC;EAC3D,OAAO,qBAAqB,IAAIA,KAAK;AACtC;;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,OAAO,SAASE,aAAaA,CAAE;EAC9BC,UAAU;EACVC,gBAAgB;EAChBC,aAAa;EACb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xCiB,gBAAgB,EAAGA,gBAAkB;MACrCmB,QAAQ,EAAGb;IAAgB,GALvB,8BAMJ,CACD,EACDC,qBAAqB,iBACpBhB,IAAA,CAACJ,YAAY;MACZ0B,uBAAuB;MACvBC,qBAAqB;MAErBC,KAAK,EAAGjC,EAAE,CAAE,iBAAkB,CAAG;MACjCkC,KAAK,EAAGf,aAAe;MACvBkB,QAAQ,EAAGZ,qBAAuB;MAClC8B,GAAG,EAAGhC,QAAU;MAChBiC,GAAG,EAAGlC,QAAU;MAChBmC,QAAQ;IAAA,GANJ,8BAOJ,CACD;EACD,CACM,CAAC;AAEX;AAEA,eAAezC,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["__","_x","AuthorSelect","CategorySelect","FormTokenField","RangeControl","SelectControl","VStack","jsx","_jsx","DEFAULT_MIN_ITEMS","DEFAULT_MAX_ITEMS","MAX_CATEGORIES_SUGGESTIONS","isSingleCategorySelection","props","isMultipleCategorySelection","QueryControls","authorList","selectedAuthorId","numberOfItems","order","orderBy","maxItems","minItems","onAuthorChange","onNumberOfItemsChange","onOrderChange","onOrderByChange","spacing","className","children","__nextHasNoMarginBottom","__next40pxDefaultSize","label","value","undefined","options","onChange","newOrderBy","newOrder","split","categoriesList","onCategoryChange","noOptionLabel","selectedCategoryId","categorySuggestions","selectedCategories","map","item","id","name","suggestions","Object","keys","maxSuggestions","min","max","required"],"sources":["@wordpress/components/src/query-controls/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport AuthorSelect from './author-select';\nimport CategorySelect from './category-select';\nimport FormTokenField from '../form-token-field';\nimport RangeControl from '../range-control';\nimport SelectControl from '../select-control';\nimport { VStack } from '../v-stack';\nimport type {\n\tQueryControlsProps,\n\tQueryControlsWithMultipleCategorySelectionProps,\n\tQueryControlsWithSingleCategorySelectionProps,\n} from './types';\n\nconst DEFAULT_MIN_ITEMS = 1;\nconst DEFAULT_MAX_ITEMS = 100;\nconst MAX_CATEGORIES_SUGGESTIONS = 20;\n\nfunction isSingleCategorySelection(\n\tprops: QueryControlsProps\n): props is QueryControlsWithSingleCategorySelectionProps {\n\treturn 'categoriesList' in props;\n}\n\nfunction isMultipleCategorySelection(\n\tprops: QueryControlsProps\n): props is QueryControlsWithMultipleCategorySelectionProps {\n\treturn 'categorySuggestions' in props;\n}\n\n/**\n * Controls to query for posts.\n *\n * ```jsx\n * const MyQueryControls = () => (\n * <QueryControls\n * { ...{ maxItems, minItems, numberOfItems, order, orderBy } }\n * onOrderByChange={ ( newOrderBy ) => {\n * updateQuery( { orderBy: newOrderBy } )\n * }\n * onOrderChange={ ( newOrder ) => {\n * updateQuery( { order: newOrder } )\n * }\n * categoriesList={ categories }\n * selectedCategoryId={ category }\n * onCategoryChange={ ( newCategory ) => {\n * updateQuery( { category: newCategory } )\n * }\n * onNumberOfItemsChange={ ( newNumberOfItems ) => {\n * updateQuery( { numberOfItems: newNumberOfItems } )\n * } }\n * />\n * );\n * ```\n */\nexport function QueryControls( {\n\tauthorList,\n\tselectedAuthorId,\n\tnumberOfItems,\n\torder,\n\torderBy,\n\tmaxItems = DEFAULT_MAX_ITEMS,\n\tminItems = DEFAULT_MIN_ITEMS,\n\tonAuthorChange,\n\tonNumberOfItemsChange,\n\tonOrderChange,\n\tonOrderByChange,\n\t// Props for single OR multiple category selection are not destructured here,\n\t// but instead are destructured inline where necessary.\n\t...props\n}: QueryControlsProps ) {\n\treturn (\n\t\t<VStack spacing=\"4\" className=\"components-query-controls\">\n\t\t\t{ [\n\t\t\t\tonOrderChange && onOrderByChange && (\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tkey=\"query-controls-order-select\"\n\t\t\t\t\t\tlabel={ __( 'Order by' ) }\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\torderBy === undefined || order === undefined\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: `${ orderBy }/${ order }`\n\t\t\t\t\t\t}\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Newest to oldest' ),\n\t\t\t\t\t\t\t\tvalue: 'date/desc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tlabel: __( 'Oldest to newest' ),\n\t\t\t\t\t\t\t\tvalue: 'date/asc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: Label for ordering posts by title in ascending order. */\n\t\t\t\t\t\t\t\tlabel: __( 'A → Z' ),\n\t\t\t\t\t\t\t\tvalue: 'title/asc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* translators: Label for ordering posts by title in descending order. */\n\t\t\t\t\t\t\t\tlabel: __( 'Z → A' ),\n\t\t\t\t\t\t\t\tvalue: 'title/desc',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( value ) => {\n\t\t\t\t\t\t\tif ( typeof value !== 'string' ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tconst [ newOrderBy, newOrder ] = value.split( '/' );\n\t\t\t\t\t\t\tif ( newOrder !== order ) {\n\t\t\t\t\t\t\t\tonOrderChange(\n\t\t\t\t\t\t\t\t\tnewOrder as NonNullable<\n\t\t\t\t\t\t\t\t\t\tQueryControlsProps[ 'order' ]\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( newOrderBy !== orderBy ) {\n\t\t\t\t\t\t\t\tonOrderByChange(\n\t\t\t\t\t\t\t\t\tnewOrderBy as NonNullable<\n\t\t\t\t\t\t\t\t\t\tQueryControlsProps[ 'orderBy' ]\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tisSingleCategorySelection( props ) &&\n\t\t\t\t\tprops.categoriesList &&\n\t\t\t\t\tprops.onCategoryChange && (\n\t\t\t\t\t\t<CategorySelect\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\tkey=\"query-controls-category-select\"\n\t\t\t\t\t\t\tcategoriesList={ props.categoriesList }\n\t\t\t\t\t\t\tlabel={ __( 'Category' ) }\n\t\t\t\t\t\t\tnoOptionLabel={ _x( 'All', 'categories' ) }\n\t\t\t\t\t\t\tselectedCategoryId={ props.selectedCategoryId }\n\t\t\t\t\t\t\tonChange={ props.onCategoryChange }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\tisMultipleCategorySelection( props ) &&\n\t\t\t\t\tprops.categorySuggestions &&\n\t\t\t\t\tprops.onCategoryChange && (\n\t\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\tkey=\"query-controls-categories-select\"\n\t\t\t\t\t\t\tlabel={ __( 'Categories' ) }\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tprops.selectedCategories &&\n\t\t\t\t\t\t\t\tprops.selectedCategories.map( ( item ) => ( {\n\t\t\t\t\t\t\t\t\tid: item.id,\n\t\t\t\t\t\t\t\t\t// Keeping the fallback to `item.value` for legacy reasons,\n\t\t\t\t\t\t\t\t\t// even if items of `selectedCategories` should not have a\n\t\t\t\t\t\t\t\t\t// `value` property.\n\t\t\t\t\t\t\t\t\t// @ts-expect-error\n\t\t\t\t\t\t\t\t\tvalue: item.name || item.value,\n\t\t\t\t\t\t\t\t} ) )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ Object.keys(\n\t\t\t\t\t\t\t\tprops.categorySuggestions\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tonChange={ props.onCategoryChange }\n\t\t\t\t\t\t\tmaxSuggestions={ MAX_CATEGORIES_SUGGESTIONS }\n\t\t\t\t\t\t/>\n\t\t\t\t\t),\n\t\t\t\tonAuthorChange && (\n\t\t\t\t\t<AuthorSelect\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tkey=\"query-controls-author-select\"\n\t\t\t\t\t\tauthorList={ authorList }\n\t\t\t\t\t\tlabel={ __( 'Author' ) }\n\t\t\t\t\t\tnoOptionLabel={ _x( 'All', 'authors' ) }\n\t\t\t\t\t\tselectedAuthorId={ selectedAuthorId }\n\t\t\t\t\t\tonChange={ onAuthorChange }\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t\tonNumberOfItemsChange && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tkey=\"query-controls-range-control\"\n\t\t\t\t\t\tlabel={ __( 'Number of items' ) }\n\t\t\t\t\t\tvalue={ numberOfItems }\n\t\t\t\t\t\tonChange={ onNumberOfItemsChange }\n\t\t\t\t\t\tmin={ minItems }\n\t\t\t\t\t\tmax={ maxItems }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t),\n\t\t\t] }\n\t\t</VStack>\n\t);\n}\n\nexport default QueryControls;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;;AAExC;AACA;AACA;AACA,OAAOC,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,OAAOC,cAAc,MAAM,qBAAqB;AAChD,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,SAASC,MAAM,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAOpC,MAAMC,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A;QACA;QACA;QACAf,KAAK,EAAEc,IAAI,CAACE,IAAI,IAAIF,IAAI,CAACd;MAC1B,CAAC,CAAG,CACJ;MACDiB,WAAW,EAAGC,MAAM,CAACC,IAAI,CACxBvC,KAAK,CAAC+B,mBACP,CAAG;MACHR,QAAQ,EAAGvB,KAAK,CAAC4B,gBAAkB;MACnCY,cAAc,EAAG1C;IAA4B,GAjBzC,kCAkBJ,CACD,EACFY,cAAc,iBACbf,IAAA,CAACP,YAAY;MACZ8B,qBAAqB;MAErBf,UAAU,EAAGA,UAAY;MACzBgB,KAAK,EAAGjC,EAAE,CAAE,QAAS,CAAG;MACxB2C,aAAa,EAAG1C,EAAE,CAAE,KAAK,EAAE,SAAU,CAAG;MACxCiB,gBAAgB,EAAGA,gBAAkB;MACrCmB,QAAQ,EAAGb;IAAgB,GALvB,8BAMJ,CACD,EACDC,qBAAqB,iBACpBhB,IAAA,CAACJ,YAAY;MACZ0B,uBAAuB;MACvBC,qBAAqB;MAErBC,KAAK,EAAGjC,EAAE,CAAE,iBAAkB,CAAG;MACjCkC,KAAK,EAAGf,aAAe;MACvBkB,QAAQ,EAAGZ,qBAAuB;MAClC8B,GAAG,EAAGhC,QAAU;MAChBiC,GAAG,EAAGlC,QAAU;MAChBmC,QAAQ;IAAA,GANJ,8BAOJ,CACD;EACD,CACM,CAAC;AAEX;AAEA,eAAezC,aAAa","ignoreList":[]}
@@ -10,9 +10,7 @@ import { useCallback, memo } from '@wordpress/element';
10
10
  import RangeControl from '../range-control';
11
11
  import SelectControl from '../select-control';
12
12
  import CategorySelect from './category-select';
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { Fragment as _Fragment } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
14
  const DEFAULT_MIN_ITEMS = 1;
17
15
  const DEFAULT_MAX_ITEMS = 100;
18
16
  const options = [{
@@ -1 +1 @@
1
- {"version":3,"names":["__","_x","useCallback","memo","RangeControl","SelectControl","CategorySelect","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DEFAULT_MIN_ITEMS","DEFAULT_MAX_ITEMS","options","label","value","QueryControls","categoriesList","selectedCategoryId","numberOfItems","order","orderBy","maxItems","minItems","onCategoryChange","onNumberOfItemsChange","onOrderChange","onOrderByChange","onChange","newOrderBy","newOrder","split","children","hideCancelButton","noOptionLabel","__next40pxDefaultSize","min","max","required"],"sources":["@wordpress/components/src/query-controls/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useCallback, memo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RangeControl from '../range-control';\nimport SelectControl from '../select-control';\nimport CategorySelect from './category-select';\n\nconst DEFAULT_MIN_ITEMS = 1;\nconst DEFAULT_MAX_ITEMS = 100;\n\nconst options = [\n\t{\n\t\tlabel: __( 'Newest to oldest' ),\n\t\tvalue: 'date/desc',\n\t},\n\t{\n\t\tlabel: __( 'Oldest to newest' ),\n\t\tvalue: 'date/asc',\n\t},\n\t{\n\t\t/* translators: Label for ordering posts by title in ascending order. */\n\t\tlabel: __( 'A → Z' ),\n\t\tvalue: 'title/asc',\n\t},\n\t{\n\t\t/* translators: Label for ordering posts by title in descending order. */\n\t\tlabel: __( 'Z → A' ),\n\t\tvalue: 'title/desc',\n\t},\n];\n\nconst QueryControls = memo(\n\t( {\n\t\tcategoriesList,\n\t\tselectedCategoryId,\n\t\tnumberOfItems,\n\t\torder,\n\t\torderBy,\n\t\tmaxItems = DEFAULT_MAX_ITEMS,\n\t\tminItems = DEFAULT_MIN_ITEMS,\n\t\tonCategoryChange,\n\t\tonNumberOfItemsChange,\n\t\tonOrderChange,\n\t\tonOrderByChange,\n\t} ) => {\n\t\tconst onChange = useCallback(\n\t\t\t( value ) => {\n\t\t\t\tconst [ newOrderBy, newOrder ] = value.split( '/' );\n\t\t\t\tif ( newOrder !== order ) {\n\t\t\t\t\tonOrderChange( newOrder );\n\t\t\t\t}\n\t\t\t\tif ( newOrderBy !== orderBy ) {\n\t\t\t\t\tonOrderByChange( newOrderBy );\n\t\t\t\t}\n\t\t\t},\n\t\t\t[ order, orderBy, onOrderByChange, onOrderChange ]\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ onOrderChange && onOrderByChange && (\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Order by' ) }\n\t\t\t\t\t\tvalue={ `${ orderBy }/${ order }` }\n\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\thideCancelButton\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ onCategoryChange && (\n\t\t\t\t\t<CategorySelect\n\t\t\t\t\t\tcategoriesList={ categoriesList }\n\t\t\t\t\t\tlabel={ __( 'Category' ) }\n\t\t\t\t\t\tnoOptionLabel={ _x( 'All', 'categories' ) }\n\t\t\t\t\t\tselectedCategoryId={ selectedCategoryId }\n\t\t\t\t\t\tonChange={ onCategoryChange }\n\t\t\t\t\t\thideCancelButton\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ onNumberOfItemsChange && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Number of items' ) }\n\t\t\t\t\t\tvalue={ numberOfItems }\n\t\t\t\t\t\tonChange={ onNumberOfItemsChange }\n\t\t\t\t\t\tmin={ minItems }\n\t\t\t\t\t\tmax={ maxItems }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n);\n\nexport default QueryControls;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,WAAW,EAAEC,IAAI,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA,OAAOC,YAA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,CACjD,CAAC;EAED,oBACChB,KAAA,CAAAF,SAAA;IAAAwB,QAAA,GACGN,aAAa,IAAIC,eAAe,iBACjCrB,IAAA,CAACH,aAAa;MACbW,KAAK,EAAGhB,EAAE,CAAE,UAAW,CAAG;MAC1BiB,KAAK,EAAI,GAAGM,OAAS,IAAID,KAAO,EAAG;MACnCP,OAAO,EAAGA,OAAS;MACnBe,QAAQ,EAAGA,QAAU;MACrBK,gBAAgB;IAAA,CAChB,CACD,EACCT,gBAAgB,iBACjBlB,IAAA,CAACF,cAAc;MACda,cAAc,EAAGA,cAAgB;MACjCH,KAAK,EAAGhB,EAAE,CAAE,UAAW,CAAG;MAC1BoC,aAAa,EAAGnC,EAAE,CAAE,KAAK,EAAE,YAAa,CAAG;MAC3CmB,kBAAkB,EAAGA,kBAAoB;MACzCU,QAAQ,EAAGJ,gBAAkB;MAC7BS,gBAAgB;IAAA,CAChB,CACD,EACCR,qBAAqB,iBACtBnB,IAAA,CAACJ,YAAY;MACZiC,qBAAqB;MACrBrB,KAAK,EAAGhB,EAAE,CAAE,iBAAkB,CAAG;MACjCiB,KAAK,EAAGI,aAAe;MACvBS,QAAQ,EAAGH,qBAAuB;MAClCW,GAAG,EAAGb,QAAU;MAChBc,GAAG,EAAGf,QAAU;MAChBgB,QAAQ;IAAA,CACR,CACD;EAAA,CACA,CAAC;AAEL,CACD,CAAC;AAED,eAAetB,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["__","_x","useCallback","memo","RangeControl","SelectControl","CategorySelect","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","DEFAULT_MIN_ITEMS","DEFAULT_MAX_ITEMS","options","label","value","QueryControls","categoriesList","selectedCategoryId","numberOfItems","order","orderBy","maxItems","minItems","onCategoryChange","onNumberOfItemsChange","onOrderChange","onOrderByChange","onChange","newOrderBy","newOrder","split","children","hideCancelButton","noOptionLabel","__next40pxDefaultSize","min","max","required"],"sources":["@wordpress/components/src/query-controls/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __, _x } from '@wordpress/i18n';\nimport { useCallback, memo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport RangeControl from '../range-control';\nimport SelectControl from '../select-control';\nimport CategorySelect from './category-select';\n\nconst DEFAULT_MIN_ITEMS = 1;\nconst DEFAULT_MAX_ITEMS = 100;\n\nconst options = [\n\t{\n\t\tlabel: __( 'Newest to oldest' ),\n\t\tvalue: 'date/desc',\n\t},\n\t{\n\t\tlabel: __( 'Oldest to newest' ),\n\t\tvalue: 'date/asc',\n\t},\n\t{\n\t\t/* translators: Label for ordering posts by title in ascending order. */\n\t\tlabel: __( 'A → Z' ),\n\t\tvalue: 'title/asc',\n\t},\n\t{\n\t\t/* translators: Label for ordering posts by title in descending order. */\n\t\tlabel: __( 'Z → A' ),\n\t\tvalue: 'title/desc',\n\t},\n];\n\nconst QueryControls = memo(\n\t( {\n\t\tcategoriesList,\n\t\tselectedCategoryId,\n\t\tnumberOfItems,\n\t\torder,\n\t\torderBy,\n\t\tmaxItems = DEFAULT_MAX_ITEMS,\n\t\tminItems = DEFAULT_MIN_ITEMS,\n\t\tonCategoryChange,\n\t\tonNumberOfItemsChange,\n\t\tonOrderChange,\n\t\tonOrderByChange,\n\t} ) => {\n\t\tconst onChange = useCallback(\n\t\t\t( value ) => {\n\t\t\t\tconst [ newOrderBy, newOrder ] = value.split( '/' );\n\t\t\t\tif ( newOrder !== order ) {\n\t\t\t\t\tonOrderChange( newOrder );\n\t\t\t\t}\n\t\t\t\tif ( newOrderBy !== orderBy ) {\n\t\t\t\t\tonOrderByChange( newOrderBy );\n\t\t\t\t}\n\t\t\t},\n\t\t\t[ order, orderBy, onOrderByChange, onOrderChange ]\n\t\t);\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{ onOrderChange && onOrderByChange && (\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Order by' ) }\n\t\t\t\t\t\tvalue={ `${ orderBy }/${ order }` }\n\t\t\t\t\t\toptions={ options }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t\thideCancelButton\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ onCategoryChange && (\n\t\t\t\t\t<CategorySelect\n\t\t\t\t\t\tcategoriesList={ categoriesList }\n\t\t\t\t\t\tlabel={ __( 'Category' ) }\n\t\t\t\t\t\tnoOptionLabel={ _x( 'All', 'categories' ) }\n\t\t\t\t\t\tselectedCategoryId={ selectedCategoryId }\n\t\t\t\t\t\tonChange={ onCategoryChange }\n\t\t\t\t\t\thideCancelButton\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ onNumberOfItemsChange && (\n\t\t\t\t\t<RangeControl\n\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\tlabel={ __( 'Number of items' ) }\n\t\t\t\t\t\tvalue={ numberOfItems }\n\t\t\t\t\t\tonChange={ onNumberOfItemsChange }\n\t\t\t\t\t\tmin={ minItems }\n\t\t\t\t\t\tmax={ maxItems }\n\t\t\t\t\t\trequired\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n);\n\nexport default QueryControls;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,EAAE,EAAEC,EAAE,QAAQ,iBAAiB;AACxC,SAASC,WAAW,EAAEC,IAAI,QAAQ,oBAAoB;;AAEtD;AACA;AACA;AACA,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,aAAa,MAAM,mBAAmB;AAC7C,OAAOC,cAAc,MAAM,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/C,MAAMC,iBAAiB,GAAG,CAAC;AAC3B,MAAMC,iBAAiB,GAAG,GAAG;AAE7B,MAAMC,OAAO,GAAG,CACf;EACCC,KAAK,EAAEhB,EAAE,CAAE,kBAAmB,CAAC;EAC/BiB,KAAK,EAAE;AACR,CAAC,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MACjCH,KAAK,EAAGhB,EAAE,CAAE,UAAW,CAAG;MAC1BoC,aAAa,EAAGnC,EAAE,CAAE,KAAK,EAAE,YAAa,CAAG;MAC3CmB,kBAAkB,EAAGA,kBAAoB;MACzCU,QAAQ,EAAGJ,gBAAkB;MAC7BS,gBAAgB;IAAA,CAChB,CACD,EACCR,qBAAqB,iBACtBnB,IAAA,CAACJ,YAAY;MACZiC,qBAAqB;MACrBrB,KAAK,EAAGhB,EAAE,CAAE,iBAAkB,CAAG;MACjCiB,KAAK,EAAGI,aAAe;MACvBS,QAAQ,EAAGH,qBAAuB;MAClCW,GAAG,EAAGb,QAAU;MAChBc,GAAG,EAAGf,QAAU;MAChBgB,QAAQ;IAAA,CACR,CACD;EAAA,CACA,CAAC;AAEL,CACD,CAAC;AAED,eAAetB,aAAa","ignoreList":[]}
@@ -14,8 +14,7 @@ import BaseControl from '../base-control';
14
14
  import { VStack } from '../v-stack';
15
15
  import { StyledHelp } from '../base-control/styles/base-control-styles';
16
16
  import { VisuallyHidden } from '../visually-hidden';
17
- import { jsx as _jsx } from "react/jsx-runtime";
18
- import { jsxs as _jsxs } from "react/jsx-runtime";
17
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
18
  function generateOptionDescriptionId(radioGroupId, index) {
20
19
  return `${radioGroupId}-${index}-option-description`;
21
20
  }