@wordpress/components 28.8.6 → 28.10.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 (894) hide show
  1. package/CHANGELOG.md +44 -5
  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 +3 -3
  7. package/build/autocomplete/autocompleter-ui.js.map +1 -1
  8. package/build/autocomplete/get-default-use-items.js.map +1 -1
  9. package/build/autocomplete/index.js +5 -1
  10. package/build/autocomplete/index.js.map +1 -1
  11. package/build/base-control/hooks.js.map +1 -1
  12. package/build/base-control/index.js.map +1 -1
  13. package/build/border-box-control/border-box-control/component.js +3 -14
  14. package/build/border-box-control/border-box-control/component.js.map +1 -1
  15. package/build/border-box-control/border-box-control/hook.js.map +1 -1
  16. package/build/border-box-control/styles.js.map +1 -1
  17. package/build/border-box-control/utils.js.map +1 -1
  18. package/build/border-control/border-control/component.js +1 -2
  19. package/build/border-control/border-control/component.js.map +1 -1
  20. package/build/border-control/border-control/hook.js.map +1 -1
  21. package/build/border-control/border-control-dropdown/component.js +2 -14
  22. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  23. package/build/border-control/styles.js +13 -13
  24. package/build/border-control/styles.js.map +1 -1
  25. package/build/border-control/types.js.map +1 -1
  26. package/build/box-control/axial-input-controls.js.map +1 -1
  27. package/build/box-control/icon.js.map +1 -1
  28. package/build/box-control/index.js +4 -4
  29. package/build/box-control/index.js.map +1 -1
  30. package/build/box-control/input-controls.js.map +1 -1
  31. package/build/box-control/types.js.map +1 -1
  32. package/build/button/index.native.js +1 -1
  33. package/build/button/index.native.js.map +1 -1
  34. package/build/card/card/component.js +1 -1
  35. package/build/card/card/component.js.map +1 -1
  36. package/build/card/styles.js.map +1 -1
  37. package/build/color-palette/index.js.map +1 -1
  38. package/build/color-palette/index.native.js +2 -1
  39. package/build/color-palette/index.native.js.map +1 -1
  40. package/build/color-picker/styles.js.map +1 -1
  41. package/build/combobox-control/index.js +1 -1
  42. package/build/combobox-control/index.js.map +1 -1
  43. package/build/composite/legacy/index.js.map +1 -1
  44. package/build/context/context-connect.js +1 -0
  45. package/build/context/context-connect.js.map +1 -1
  46. package/build/context/context-system-provider.js +1 -1
  47. package/build/context/context-system-provider.js.map +1 -1
  48. package/build/context/get-styled-class-name-from-key.js.map +1 -1
  49. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  50. package/build/custom-gradient-picker/index.js.map +1 -1
  51. package/build/custom-gradient-picker/serializer.js.map +1 -1
  52. package/build/custom-gradient-picker/utils.js.map +1 -1
  53. package/build/custom-select-control-v2/styles.js.map +1 -1
  54. package/build/dashicon/index.js.map +1 -1
  55. package/build/date-time/date/styles.js.map +1 -1
  56. package/build/date-time/time/timezone.js.map +1 -1
  57. package/build/draggable/index.js.map +1 -1
  58. package/build/drop-zone/index.js.map +1 -1
  59. package/build/dropdown-menu-v2/styles.js.map +1 -1
  60. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  61. package/build/duotone-picker/utils.js.map +1 -1
  62. package/build/elevation/hook.js.map +1 -1
  63. package/build/external-link/index.js +20 -23
  64. package/build/external-link/index.js.map +1 -1
  65. package/build/focal-point-picker/index.js.map +1 -1
  66. package/build/focal-point-picker/index.native.js.map +1 -1
  67. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  68. package/build/font-size-picker/index.js.map +1 -1
  69. package/build/form-token-field/index.js +2 -1
  70. package/build/form-token-field/index.js.map +1 -1
  71. package/build/form-token-field/suggestions-list.js.map +1 -1
  72. package/build/form-token-field/token-input.js.map +1 -1
  73. package/build/form-token-field/token.js +1 -1
  74. package/build/form-token-field/token.js.map +1 -1
  75. package/build/gradient-picker/index.js.map +1 -1
  76. package/build/grid/hook.js.map +1 -1
  77. package/build/guide/page-control.js +1 -1
  78. package/build/guide/page-control.js.map +1 -1
  79. package/build/h-stack/hook.js.map +1 -1
  80. package/build/heading/hook.js.map +1 -1
  81. package/build/index.js +36 -5
  82. package/build/index.js.map +1 -1
  83. package/build/input-control/index.js.map +1 -1
  84. package/build/input-control/input-base.js.map +1 -1
  85. package/build/input-control/styles/input-control-styles.js.map +1 -1
  86. package/build/item-group/styles.js.map +1 -1
  87. package/build/menu-group/index.js.map +1 -1
  88. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  89. package/build/mobile/bottom-sheet/cell.native.js +4 -4
  90. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  91. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  92. package/build/mobile/bottom-sheet/range-cell.native.js +1 -1
  93. package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  94. package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  95. package/build/mobile/bottom-sheet/stepper-cell/index.native.js +1 -1
  96. package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  97. package/build/mobile/bottom-sheet/switch-cell.native.js +4 -4
  98. package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  99. package/build/mobile/cycle-select-control/index.native.js.map +1 -1
  100. package/build/mobile/gradient/index.native.js.map +1 -1
  101. package/build/mobile/image/index.native.js.map +1 -1
  102. package/build/mobile/link-picker/index.native.js +1 -1
  103. package/build/mobile/link-picker/index.native.js.map +1 -1
  104. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  105. package/build/mobile/picker/index.android.js.map +1 -1
  106. package/build/mobile/segmented-control/index.native.js.map +1 -1
  107. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  108. package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  109. package/build/modal/aria-helper.js +2 -1
  110. package/build/modal/aria-helper.js.map +1 -1
  111. package/build/modal/index.js +2 -1
  112. package/build/modal/index.js.map +1 -1
  113. package/build/modal/use-modal-exit-animation.js.map +1 -1
  114. package/build/navigation/group/index.js.map +1 -1
  115. package/build/navigation/item/base.js.map +1 -1
  116. package/build/navigation/menu/index.js.map +1 -1
  117. package/build/navigation/menu/menu-title-search.js +2 -2
  118. package/build/navigation/menu/menu-title-search.js.map +1 -1
  119. package/build/navigation/menu/menu-title.js.map +1 -1
  120. package/build/navigation/styles/navigation-styles.js.map +1 -1
  121. package/build/navigator/index.js +128 -32
  122. package/build/navigator/index.js.map +1 -1
  123. package/build/navigator/legacy.js +179 -0
  124. package/build/navigator/legacy.js.map +1 -0
  125. package/build/navigator/{navigator-provider → navigator}/component.js +5 -40
  126. package/build/navigator/navigator/component.js.map +1 -0
  127. package/build/navigator/navigator-back-button/component.js +2 -38
  128. package/build/navigator/navigator-back-button/component.js.map +1 -1
  129. package/build/navigator/navigator-back-button/hook.js +1 -1
  130. package/build/navigator/navigator-back-button/hook.js.map +1 -1
  131. package/build/navigator/navigator-button/component.js +2 -37
  132. package/build/navigator/navigator-button/component.js.map +1 -1
  133. package/build/navigator/navigator-button/hook.js +1 -1
  134. package/build/navigator/navigator-button/hook.js.map +1 -1
  135. package/build/navigator/navigator-screen/component.js +40 -62
  136. package/build/navigator/navigator-screen/component.js.map +1 -1
  137. package/build/navigator/navigator-screen/use-screen-animate-presence.js +114 -0
  138. package/build/navigator/navigator-screen/use-screen-animate-presence.js.map +1 -0
  139. package/build/navigator/navigator-to-parent-button/component.js +3 -7
  140. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  141. package/build/navigator/styles.js +78 -35
  142. package/build/navigator/styles.js.map +1 -1
  143. package/build/navigator/types.js.map +1 -1
  144. package/build/navigator/use-navigator.js +4 -1
  145. package/build/navigator/use-navigator.js.map +1 -1
  146. package/build/number-control/styles/number-control-styles.js.map +1 -1
  147. package/build/palette-edit/index.js +1 -1
  148. package/build/palette-edit/index.js.map +1 -1
  149. package/build/popover/index.js +1 -1
  150. package/build/popover/index.js.map +1 -1
  151. package/build/popover/overlay-middlewares.js.map +1 -1
  152. package/build/popover/utils.js.map +1 -1
  153. package/build/progress-bar/index.js.map +1 -1
  154. package/build/progress-bar/styles.js.map +1 -1
  155. package/build/query-controls/index.js.map +1 -1
  156. package/build/query-controls/index.native.js.map +1 -1
  157. package/build/radio-control/index.js.map +1 -1
  158. package/build/radio-control/index.native.js.map +1 -1
  159. package/build/range-control/index.js.map +1 -1
  160. package/build/range-control/index.native.js.map +1 -1
  161. package/build/range-control/rail.js.map +1 -1
  162. package/build/range-control/styles/range-control-styles.js +32 -32
  163. package/build/range-control/styles/range-control-styles.js.map +1 -1
  164. package/build/range-control/tooltip.js +1 -1
  165. package/build/range-control/tooltip.js.map +1 -1
  166. package/build/range-control/utils.js.map +1 -1
  167. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  168. package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
  169. package/build/responsive-wrapper/index.js.map +1 -1
  170. package/build/sandbox/index.js.map +1 -1
  171. package/build/sandbox/index.native.js.map +1 -1
  172. package/build/search-control/index.js +11 -2
  173. package/build/search-control/index.js.map +1 -1
  174. package/build/search-control/index.native.js.map +1 -1
  175. package/build/search-control/types.js.map +1 -1
  176. package/build/select-control/index.js.map +1 -1
  177. package/build/select-control/index.native.js.map +1 -1
  178. package/build/slot-fill/index.js.map +1 -1
  179. package/build/spinner/styles.js.map +1 -1
  180. package/build/style-provider/index.js +1 -0
  181. package/build/style-provider/index.js.map +1 -1
  182. package/build/surface/hook.js.map +1 -1
  183. package/build/surface/styles.js.map +1 -1
  184. package/build/tab-panel/index.js.map +1 -1
  185. package/build/tabs/index.js.map +1 -1
  186. package/build/tabs/styles.js +30 -12
  187. package/build/tabs/styles.js.map +1 -1
  188. package/build/tabs/tab.js +7 -2
  189. package/build/tabs/tab.js.map +1 -1
  190. package/build/tabs/tablist.js +71 -39
  191. package/build/tabs/tablist.js.map +1 -1
  192. package/build/tabs/tabpanel.js.map +1 -1
  193. package/build/tabs/use-track-overflow.js +73 -0
  194. package/build/tabs/use-track-overflow.js.map +1 -0
  195. package/build/text/get-line-height.js.map +1 -1
  196. package/build/text/styles/text-mixins.native.js.map +1 -1
  197. package/build/text/utils.js.map +1 -1
  198. package/build/text-control/index.native.js.map +1 -1
  199. package/build/text-highlight/index.js.map +1 -1
  200. package/build/textarea-control/index.js.map +1 -1
  201. package/build/theme/color-algorithms.js.map +1 -1
  202. package/build/theme/styles.js.map +1 -1
  203. package/build/toggle-control/index.js.map +1 -1
  204. package/build/toggle-control/index.native.js.map +1 -1
  205. package/build/toggle-group-control/toggle-group-control/as-button-group.js +4 -2
  206. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  207. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +13 -2
  208. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  209. package/build/toggle-group-control/toggle-group-control/component.js +15 -8
  210. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  211. package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
  212. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  213. package/build/toggle-group-control/toggle-group-control-option-base/component.js +13 -20
  214. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  215. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +8 -9
  216. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  217. package/build/toggle-group-control/types.js.map +1 -1
  218. package/build/toolbar/toolbar/index.js.map +1 -1
  219. package/build/tools-panel/styles.js.map +1 -1
  220. package/build/unit-control/index.js.map +1 -1
  221. package/build/unit-control/utils.js.map +1 -1
  222. package/build/utils/breakpoint.js.map +1 -1
  223. package/build/utils/colors-values.js.map +1 -1
  224. package/build/utils/config-values.js.map +1 -1
  225. package/build/utils/element-rect.js +22 -13
  226. package/build/utils/element-rect.js.map +1 -1
  227. package/build/utils/font-size.js.map +1 -1
  228. package/build/utils/hooks/use-animated-offset-rect.js +80 -0
  229. package/build/utils/hooks/use-animated-offset-rect.js.map +1 -0
  230. package/build/utils/hooks/use-cx.js.map +1 -1
  231. package/build/utils/hooks/use-on-value-update.js +3 -7
  232. package/build/utils/hooks/use-on-value-update.js.map +1 -1
  233. package/build/utils/math.js +2 -2
  234. package/build/utils/math.js.map +1 -1
  235. package/build/utils/space.js.map +1 -1
  236. package/build/utils/unit-values.js.map +1 -1
  237. package/build/utils/use-responsive-value.js.map +1 -1
  238. package/build-module/alignment-matrix-control/cell.js +1 -2
  239. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  240. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  241. package/build-module/alignment-matrix-control/types.js.map +1 -1
  242. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  243. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  244. package/build-module/angle-picker-control/index.js +1 -2
  245. package/build-module/angle-picker-control/index.js.map +1 -1
  246. package/build-module/autocomplete/autocompleter-ui.js +4 -6
  247. package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
  248. package/build-module/autocomplete/autocompleter-ui.native.js +1 -2
  249. package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
  250. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  251. package/build-module/autocomplete/index.js +6 -4
  252. package/build-module/autocomplete/index.js.map +1 -1
  253. package/build-module/base-control/hooks.js.map +1 -1
  254. package/build-module/base-control/index.js +1 -2
  255. package/build-module/base-control/index.js.map +1 -1
  256. package/build-module/base-control/index.native.js +1 -2
  257. package/build-module/base-control/index.native.js.map +1 -1
  258. package/build-module/border-box-control/border-box-control/component.js +4 -16
  259. package/build-module/border-box-control/border-box-control/component.js.map +1 -1
  260. package/build-module/border-box-control/border-box-control/hook.js.map +1 -1
  261. package/build-module/border-box-control/border-box-control-split-controls/component.js +1 -2
  262. package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
  263. package/build-module/border-box-control/styles.js.map +1 -1
  264. package/build-module/border-box-control/utils.js.map +1 -1
  265. package/build-module/border-control/border-control/component.js +2 -4
  266. package/build-module/border-control/border-control/component.js.map +1 -1
  267. package/build-module/border-control/border-control/hook.js.map +1 -1
  268. package/build-module/border-control/border-control-dropdown/component.js +3 -17
  269. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  270. package/build-module/border-control/styles.js +13 -13
  271. package/build-module/border-control/styles.js.map +1 -1
  272. package/build-module/border-control/types.js.map +1 -1
  273. package/build-module/box-control/all-input-control.js +1 -3
  274. package/build-module/box-control/all-input-control.js.map +1 -1
  275. package/build-module/box-control/axial-input-controls.js +1 -3
  276. package/build-module/box-control/axial-input-controls.js.map +1 -1
  277. package/build-module/box-control/icon.js +1 -2
  278. package/build-module/box-control/icon.js.map +1 -1
  279. package/build-module/box-control/index.js +5 -6
  280. package/build-module/box-control/index.js.map +1 -1
  281. package/build-module/box-control/input-controls.js +1 -3
  282. package/build-module/box-control/input-controls.js.map +1 -1
  283. package/build-module/box-control/types.js.map +1 -1
  284. package/build-module/button/index.js +1 -3
  285. package/build-module/button/index.js.map +1 -1
  286. package/build-module/button/index.native.js +2 -3
  287. package/build-module/button/index.native.js.map +1 -1
  288. package/build-module/card/card/component.js +2 -3
  289. package/build-module/card/card/component.js.map +1 -1
  290. package/build-module/card/styles.js.map +1 -1
  291. package/build-module/checkbox-control/index.js +1 -2
  292. package/build-module/checkbox-control/index.js.map +1 -1
  293. package/build-module/circular-option-picker/circular-option-picker-option.js +1 -2
  294. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  295. package/build-module/circular-option-picker/circular-option-picker.js +1 -2
  296. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  297. package/build-module/color-indicator/index.native.js +1 -2
  298. package/build-module/color-indicator/index.native.js.map +1 -1
  299. package/build-module/color-palette/index.js +1 -2
  300. package/build-module/color-palette/index.js.map +1 -1
  301. package/build-module/color-palette/index.native.js +3 -4
  302. package/build-module/color-palette/index.native.js.map +1 -1
  303. package/build-module/color-picker/component.js +1 -2
  304. package/build-module/color-picker/component.js.map +1 -1
  305. package/build-module/color-picker/hsl-input.js +1 -3
  306. package/build-module/color-picker/hsl-input.js.map +1 -1
  307. package/build-module/color-picker/hsv-color-picker.native.js +1 -2
  308. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -1
  309. package/build-module/color-picker/hue-picker.native.js +1 -2
  310. package/build-module/color-picker/hue-picker.native.js.map +1 -1
  311. package/build-module/color-picker/index.native.js +1 -3
  312. package/build-module/color-picker/index.native.js.map +1 -1
  313. package/build-module/color-picker/input-with-slider.js +1 -2
  314. package/build-module/color-picker/input-with-slider.js.map +1 -1
  315. package/build-module/color-picker/rgb-input.js +1 -3
  316. package/build-module/color-picker/rgb-input.js.map +1 -1
  317. package/build-module/color-picker/saturation-picker.native.js +1 -2
  318. package/build-module/color-picker/saturation-picker.native.js.map +1 -1
  319. package/build-module/color-picker/styles.js.map +1 -1
  320. package/build-module/combobox-control/index.js +2 -3
  321. package/build-module/combobox-control/index.js.map +1 -1
  322. package/build-module/composite/legacy/index.js.map +1 -1
  323. package/build-module/confirm-dialog/component.js +1 -3
  324. package/build-module/confirm-dialog/component.js.map +1 -1
  325. package/build-module/context/context-connect.js +1 -0
  326. package/build-module/context/context-connect.js.map +1 -1
  327. package/build-module/context/context-system-provider.js +1 -1
  328. package/build-module/context/context-system-provider.js.map +1 -1
  329. package/build-module/context/get-styled-class-name-from-key.js.map +1 -1
  330. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +1 -3
  331. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  332. package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -2
  333. package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
  334. package/build-module/custom-gradient-picker/index.js +1 -2
  335. package/build-module/custom-gradient-picker/index.js.map +1 -1
  336. package/build-module/custom-gradient-picker/index.native.js +1 -3
  337. package/build-module/custom-gradient-picker/index.native.js.map +1 -1
  338. package/build-module/custom-gradient-picker/serializer.js.map +1 -1
  339. package/build-module/custom-gradient-picker/utils.js.map +1 -1
  340. package/build-module/custom-select-control/index.js +1 -3
  341. package/build-module/custom-select-control/index.js.map +1 -1
  342. package/build-module/custom-select-control-v2/custom-select.js +1 -2
  343. package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
  344. package/build-module/custom-select-control-v2/item.js +1 -2
  345. package/build-module/custom-select-control-v2/item.js.map +1 -1
  346. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  347. package/build-module/dashicon/index.js.map +1 -1
  348. package/build-module/date-time/date/index.js +1 -2
  349. package/build-module/date-time/date/index.js.map +1 -1
  350. package/build-module/date-time/date/styles.js.map +1 -1
  351. package/build-module/date-time/date-time/index.js +1 -3
  352. package/build-module/date-time/date-time/index.js.map +1 -1
  353. package/build-module/date-time/time/index.js +1 -2
  354. package/build-module/date-time/time/index.js.map +1 -1
  355. package/build-module/date-time/time/time-input/index.js +1 -2
  356. package/build-module/date-time/time/time-input/index.js.map +1 -1
  357. package/build-module/date-time/time/timezone.js.map +1 -1
  358. package/build-module/dimension-control/index.js +1 -3
  359. package/build-module/dimension-control/index.js.map +1 -1
  360. package/build-module/draggable/index.js +1 -3
  361. package/build-module/draggable/index.js.map +1 -1
  362. package/build-module/drop-zone/index.js +1 -2
  363. package/build-module/drop-zone/index.js.map +1 -1
  364. package/build-module/dropdown/index.js +1 -2
  365. package/build-module/dropdown/index.js.map +1 -1
  366. package/build-module/dropdown/index.native.js +1 -2
  367. package/build-module/dropdown/index.native.js.map +1 -1
  368. package/build-module/dropdown-menu/index.js +1 -2
  369. package/build-module/dropdown-menu/index.js.map +1 -1
  370. package/build-module/dropdown-menu/index.native.js +1 -2
  371. package/build-module/dropdown-menu/index.native.js.map +1 -1
  372. package/build-module/dropdown-menu-v2/checkbox-item.js +1 -2
  373. package/build-module/dropdown-menu-v2/checkbox-item.js.map +1 -1
  374. package/build-module/dropdown-menu-v2/index.js +1 -3
  375. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  376. package/build-module/dropdown-menu-v2/item.js +1 -2
  377. package/build-module/dropdown-menu-v2/item.js.map +1 -1
  378. package/build-module/dropdown-menu-v2/radio-item.js +1 -2
  379. package/build-module/dropdown-menu-v2/radio-item.js.map +1 -1
  380. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  381. package/build-module/duotone-picker/color-list-picker/index.js +1 -3
  382. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  383. package/build-module/duotone-picker/duotone-picker.js +1 -2
  384. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  385. package/build-module/duotone-picker/utils.js.map +1 -1
  386. package/build-module/elevation/hook.js.map +1 -1
  387. package/build-module/external-link/index.js +21 -25
  388. package/build-module/external-link/index.js.map +1 -1
  389. package/build-module/external-link/index.native.js +1 -2
  390. package/build-module/external-link/index.native.js.map +1 -1
  391. package/build-module/focal-point-picker/controls.js +1 -2
  392. package/build-module/focal-point-picker/controls.js.map +1 -1
  393. package/build-module/focal-point-picker/focal-point.native.js +1 -2
  394. package/build-module/focal-point-picker/focal-point.native.js.map +1 -1
  395. package/build-module/focal-point-picker/grid.js +1 -2
  396. package/build-module/focal-point-picker/grid.js.map +1 -1
  397. package/build-module/focal-point-picker/index.js +1 -2
  398. package/build-module/focal-point-picker/index.js.map +1 -1
  399. package/build-module/focal-point-picker/index.native.js +1 -2
  400. package/build-module/focal-point-picker/index.native.js.map +1 -1
  401. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  402. package/build-module/focal-point-picker/tooltip/index.native.js +1 -2
  403. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  404. package/build-module/font-size-picker/index.js +1 -2
  405. package/build-module/font-size-picker/index.js.map +1 -1
  406. package/build-module/font-size-picker/index.native.js +1 -3
  407. package/build-module/font-size-picker/index.native.js.map +1 -1
  408. package/build-module/form-file-upload/index.js +1 -2
  409. package/build-module/form-file-upload/index.js.map +1 -1
  410. package/build-module/form-toggle/index.js +1 -2
  411. package/build-module/form-toggle/index.js.map +1 -1
  412. package/build-module/form-token-field/index.js +3 -3
  413. package/build-module/form-token-field/index.js.map +1 -1
  414. package/build-module/form-token-field/suggestions-list.js +1 -2
  415. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  416. package/build-module/form-token-field/token-input.js.map +1 -1
  417. package/build-module/form-token-field/token.js +2 -3
  418. package/build-module/form-token-field/token.js.map +1 -1
  419. package/build-module/gradient-picker/index.js +1 -2
  420. package/build-module/gradient-picker/index.js.map +1 -1
  421. package/build-module/grid/hook.js.map +1 -1
  422. package/build-module/guide/index.js +1 -2
  423. package/build-module/guide/index.js.map +1 -1
  424. package/build-module/guide/page-control.js +1 -1
  425. package/build-module/guide/page-control.js.map +1 -1
  426. package/build-module/h-stack/hook.js.map +1 -1
  427. package/build-module/heading/hook.js.map +1 -1
  428. package/build-module/higher-order/with-fallback-styles/index.js +3 -4
  429. package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
  430. package/build-module/index.js +14 -4
  431. package/build-module/index.js.map +1 -1
  432. package/build-module/input-control/index.js.map +1 -1
  433. package/build-module/input-control/input-base.js +1 -2
  434. package/build-module/input-control/input-base.js.map +1 -1
  435. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  436. package/build-module/item-group/styles.js.map +1 -1
  437. package/build-module/keyboard-shortcuts/index.js +1 -3
  438. package/build-module/keyboard-shortcuts/index.js.map +1 -1
  439. package/build-module/menu-group/index.js +1 -2
  440. package/build-module/menu-group/index.js.map +1 -1
  441. package/build-module/menu-item/index.js +1 -2
  442. package/build-module/menu-item/index.js.map +1 -1
  443. package/build-module/menu-items-choice/index.js +1 -2
  444. package/build-module/menu-items-choice/index.js.map +1 -1
  445. package/build-module/mobile/badge/index.native.js +1 -3
  446. package/build-module/mobile/badge/index.native.js.map +1 -1
  447. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -2
  448. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  449. package/build-module/mobile/bottom-sheet/cell.native.js +5 -6
  450. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  451. package/build-module/mobile/bottom-sheet/color-cell.native.js +1 -2
  452. package/build-module/mobile/bottom-sheet/color-cell.native.js.map +1 -1
  453. package/build-module/mobile/bottom-sheet/index.native.js +1 -3
  454. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  455. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -2
  456. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  457. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -2
  458. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  459. package/build-module/mobile/bottom-sheet/range-cell.native.js +2 -3
  460. package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
  461. package/build-module/mobile/bottom-sheet/range-text-input.native.js +1 -2
  462. package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  463. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +2 -3
  464. package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
  465. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js +1 -2
  466. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.android.js.map +1 -1
  467. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js +1 -2
  468. package/build-module/mobile/bottom-sheet/stepper-cell/stepper.ios.js.map +1 -1
  469. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js +1 -3
  470. package/build-module/mobile/bottom-sheet/sub-sheet/index.native.js.map +1 -1
  471. package/build-module/mobile/bottom-sheet/switch-cell.native.js +4 -4
  472. package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
  473. package/build-module/mobile/bottom-sheet-select-control/index.native.js +1 -3
  474. package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
  475. package/build-module/mobile/bottom-sheet-text-control/index.native.js +1 -3
  476. package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
  477. package/build-module/mobile/color-settings/gradient-picker-screen.native.js +1 -2
  478. package/build-module/mobile/color-settings/gradient-picker-screen.native.js.map +1 -1
  479. package/build-module/mobile/color-settings/index.native.js +1 -2
  480. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  481. package/build-module/mobile/color-settings/palette.screen.native.js +1 -3
  482. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  483. package/build-module/mobile/cycle-select-control/index.native.js.map +1 -1
  484. package/build-module/mobile/focal-point-settings-panel/index.native.js +1 -2
  485. package/build-module/mobile/focal-point-settings-panel/index.native.js.map +1 -1
  486. package/build-module/mobile/gradient/index.native.js +1 -2
  487. package/build-module/mobile/gradient/index.native.js.map +1 -1
  488. package/build-module/mobile/html-text-input/index.native.js +1 -2
  489. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  490. package/build-module/mobile/image/icon-retry.native.js +1 -2
  491. package/build-module/mobile/image/icon-retry.native.js.map +1 -1
  492. package/build-module/mobile/image/image-editing-button.native.js +1 -2
  493. package/build-module/mobile/image/image-editing-button.native.js.map +1 -1
  494. package/build-module/mobile/image/index.native.js +1 -3
  495. package/build-module/mobile/image/index.native.js.map +1 -1
  496. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +1 -2
  497. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  498. package/build-module/mobile/link-picker/index.native.js +2 -3
  499. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  500. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  501. package/build-module/mobile/link-settings/index.native.js +1 -3
  502. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  503. package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -2
  504. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  505. package/build-module/mobile/picker/index.android.js +1 -2
  506. package/build-module/mobile/picker/index.android.js.map +1 -1
  507. package/build-module/mobile/segmented-control/index.native.js +1 -2
  508. package/build-module/mobile/segmented-control/index.native.js.map +1 -1
  509. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
  510. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  511. package/build-module/modal/aria-helper.js +2 -1
  512. package/build-module/modal/aria-helper.js.map +1 -1
  513. package/build-module/modal/index.js +3 -4
  514. package/build-module/modal/index.js.map +1 -1
  515. package/build-module/modal/use-modal-exit-animation.js.map +1 -1
  516. package/build-module/navigation/back-button/index.js +1 -2
  517. package/build-module/navigation/back-button/index.js.map +1 -1
  518. package/build-module/navigation/group/index.js +1 -2
  519. package/build-module/navigation/group/index.js.map +1 -1
  520. package/build-module/navigation/item/base-content.js +1 -3
  521. package/build-module/navigation/item/base-content.js.map +1 -1
  522. package/build-module/navigation/item/base.js.map +1 -1
  523. package/build-module/navigation/item/index.js +1 -2
  524. package/build-module/navigation/item/index.js.map +1 -1
  525. package/build-module/navigation/menu/index.js +1 -2
  526. package/build-module/navigation/menu/index.js.map +1 -1
  527. package/build-module/navigation/menu/menu-title-search.js +2 -2
  528. package/build-module/navigation/menu/menu-title-search.js.map +1 -1
  529. package/build-module/navigation/menu/menu-title.js +1 -2
  530. package/build-module/navigation/menu/menu-title.js.map +1 -1
  531. package/build-module/navigation/menu/search-no-results-found.js +1 -2
  532. package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
  533. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  534. package/build-module/navigator/index.js +130 -5
  535. package/build-module/navigator/index.js.map +1 -1
  536. package/build-module/navigator/legacy.js +167 -0
  537. package/build-module/navigator/legacy.js.map +1 -0
  538. package/build-module/navigator/{navigator-provider → navigator}/component.js +4 -39
  539. package/build-module/navigator/navigator/component.js.map +1 -0
  540. package/build-module/navigator/navigator-back-button/component.js +1 -37
  541. package/build-module/navigator/navigator-back-button/component.js.map +1 -1
  542. package/build-module/navigator/navigator-back-button/hook.js +1 -1
  543. package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
  544. package/build-module/navigator/navigator-button/component.js +1 -36
  545. package/build-module/navigator/navigator-button/component.js.map +1 -1
  546. package/build-module/navigator/navigator-button/hook.js +1 -1
  547. package/build-module/navigator/navigator-button/hook.js.map +1 -1
  548. package/build-module/navigator/navigator-screen/component.js +39 -61
  549. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  550. package/build-module/navigator/navigator-screen/use-screen-animate-presence.js +106 -0
  551. package/build-module/navigator/navigator-screen/use-screen-animate-presence.js.map +1 -0
  552. package/build-module/navigator/navigator-to-parent-button/component.js +2 -6
  553. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  554. package/build-module/navigator/styles.js +77 -33
  555. package/build-module/navigator/styles.js.map +1 -1
  556. package/build-module/navigator/types.js.map +1 -1
  557. package/build-module/navigator/use-navigator.js +4 -1
  558. package/build-module/navigator/use-navigator.js.map +1 -1
  559. package/build-module/notice/index.js +1 -2
  560. package/build-module/notice/index.js.map +1 -1
  561. package/build-module/notice/index.native.js +1 -3
  562. package/build-module/notice/index.native.js.map +1 -1
  563. package/build-module/number-control/index.js +1 -3
  564. package/build-module/number-control/index.js.map +1 -1
  565. package/build-module/number-control/styles/number-control-styles.js.map +1 -1
  566. package/build-module/palette-edit/index.js +2 -4
  567. package/build-module/palette-edit/index.js.map +1 -1
  568. package/build-module/panel/actions.native.js +1 -2
  569. package/build-module/panel/actions.native.js.map +1 -1
  570. package/build-module/panel/body.js +1 -2
  571. package/build-module/panel/body.js.map +1 -1
  572. package/build-module/panel/body.native.js +1 -2
  573. package/build-module/panel/body.native.js.map +1 -1
  574. package/build-module/panel/header.js +1 -2
  575. package/build-module/panel/header.js.map +1 -1
  576. package/build-module/panel/index.js +1 -2
  577. package/build-module/panel/index.js.map +1 -1
  578. package/build-module/placeholder/index.js +1 -2
  579. package/build-module/placeholder/index.js.map +1 -1
  580. package/build-module/popover/index.js +2 -4
  581. package/build-module/popover/index.js.map +1 -1
  582. package/build-module/popover/overlay-middlewares.js.map +1 -1
  583. package/build-module/popover/utils.js.map +1 -1
  584. package/build-module/progress-bar/index.js +1 -2
  585. package/build-module/progress-bar/index.js.map +1 -1
  586. package/build-module/progress-bar/styles.js.map +1 -1
  587. package/build-module/query-controls/index.js.map +1 -1
  588. package/build-module/query-controls/index.native.js +1 -3
  589. package/build-module/query-controls/index.native.js.map +1 -1
  590. package/build-module/radio-control/index.js +1 -2
  591. package/build-module/radio-control/index.js.map +1 -1
  592. package/build-module/radio-control/index.native.js +1 -2
  593. package/build-module/radio-control/index.native.js.map +1 -1
  594. package/build-module/range-control/index.js +1 -2
  595. package/build-module/range-control/index.js.map +1 -1
  596. package/build-module/range-control/index.native.js.map +1 -1
  597. package/build-module/range-control/mark.js +1 -3
  598. package/build-module/range-control/mark.js.map +1 -1
  599. package/build-module/range-control/rail.js +1 -3
  600. package/build-module/range-control/rail.js.map +1 -1
  601. package/build-module/range-control/styles/range-control-styles.js +32 -32
  602. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  603. package/build-module/range-control/tooltip.js +1 -1
  604. package/build-module/range-control/tooltip.js.map +1 -1
  605. package/build-module/range-control/utils.js.map +1 -1
  606. package/build-module/resizable-box/index.js +1 -2
  607. package/build-module/resizable-box/index.js.map +1 -1
  608. package/build-module/resizable-box/resize-tooltip/index.js +1 -2
  609. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  610. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  611. package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
  612. package/build-module/responsive-wrapper/index.js.map +1 -1
  613. package/build-module/sandbox/index.js +1 -2
  614. package/build-module/sandbox/index.js.map +1 -1
  615. package/build-module/sandbox/index.native.js +1 -2
  616. package/build-module/sandbox/index.native.js.map +1 -1
  617. package/build-module/search-control/index.js +11 -2
  618. package/build-module/search-control/index.js.map +1 -1
  619. package/build-module/search-control/index.native.js +1 -2
  620. package/build-module/search-control/index.native.js.map +1 -1
  621. package/build-module/search-control/types.js.map +1 -1
  622. package/build-module/select-control/index.js.map +1 -1
  623. package/build-module/select-control/index.native.js.map +1 -1
  624. package/build-module/slot-fill/index.js +1 -3
  625. package/build-module/slot-fill/index.js.map +1 -1
  626. package/build-module/slot-fill/slot.js +1 -2
  627. package/build-module/slot-fill/slot.js.map +1 -1
  628. package/build-module/snackbar/index.js +1 -2
  629. package/build-module/snackbar/index.js.map +1 -1
  630. package/build-module/snackbar/list.js +1 -2
  631. package/build-module/snackbar/list.js.map +1 -1
  632. package/build-module/spinner/index.js +1 -2
  633. package/build-module/spinner/index.js.map +1 -1
  634. package/build-module/spinner/styles.js.map +1 -1
  635. package/build-module/style-provider/index.js +1 -0
  636. package/build-module/style-provider/index.js.map +1 -1
  637. package/build-module/surface/hook.js.map +1 -1
  638. package/build-module/surface/styles.js.map +1 -1
  639. package/build-module/tab-panel/index.js +1 -2
  640. package/build-module/tab-panel/index.js.map +1 -1
  641. package/build-module/tabs/index.js.map +1 -1
  642. package/build-module/tabs/styles.js +28 -6
  643. package/build-module/tabs/styles.js.map +1 -1
  644. package/build-module/tabs/tab.js +9 -4
  645. package/build-module/tabs/tab.js.map +1 -1
  646. package/build-module/tabs/tablist.js +72 -40
  647. package/build-module/tabs/tablist.js.map +1 -1
  648. package/build-module/tabs/tabpanel.js.map +1 -1
  649. package/build-module/tabs/use-track-overflow.js +67 -0
  650. package/build-module/tabs/use-track-overflow.js.map +1 -0
  651. package/build-module/text/get-line-height.js.map +1 -1
  652. package/build-module/text/styles/text-mixins.native.js.map +1 -1
  653. package/build-module/text/utils.js.map +1 -1
  654. package/build-module/text-control/index.native.js.map +1 -1
  655. package/build-module/text-highlight/index.js +1 -2
  656. package/build-module/text-highlight/index.js.map +1 -1
  657. package/build-module/textarea-control/index.js.map +1 -1
  658. package/build-module/theme/color-algorithms.js.map +1 -1
  659. package/build-module/theme/styles.js.map +1 -1
  660. package/build-module/tip/index.js +1 -2
  661. package/build-module/tip/index.js.map +1 -1
  662. package/build-module/toggle-control/index.js +1 -2
  663. package/build-module/toggle-control/index.js.map +1 -1
  664. package/build-module/toggle-control/index.native.js.map +1 -1
  665. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +4 -2
  666. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  667. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +14 -3
  668. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  669. package/build-module/toggle-group-control/toggle-group-control/component.js +17 -12
  670. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  671. package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
  672. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  673. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +16 -25
  674. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  675. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +7 -8
  676. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  677. package/build-module/toggle-group-control/types.js.map +1 -1
  678. package/build-module/toolbar/toolbar/index.js.map +1 -1
  679. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js +2 -2
  680. package/build-module/toolbar/toolbar-button/toolbar-button-container.native.js.map +1 -1
  681. package/build-module/toolbar/toolbar-group/index.js +1 -2
  682. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  683. package/build-module/tools-panel/styles.js.map +1 -1
  684. package/build-module/tools-panel/tools-panel/component.js +1 -2
  685. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  686. package/build-module/tools-panel/tools-panel-header/component.js +1 -3
  687. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  688. package/build-module/tooltip/index.js +1 -2
  689. package/build-module/tooltip/index.js.map +1 -1
  690. package/build-module/tooltip/index.native.js +1 -3
  691. package/build-module/tooltip/index.native.js.map +1 -1
  692. package/build-module/tree-grid/cell.js +1 -2
  693. package/build-module/tree-grid/cell.js.map +1 -1
  694. package/build-module/unit-control/index.js.map +1 -1
  695. package/build-module/unit-control/index.native.js +1 -3
  696. package/build-module/unit-control/index.native.js.map +1 -1
  697. package/build-module/unit-control/utils.js.map +1 -1
  698. package/build-module/utils/breakpoint.js.map +1 -1
  699. package/build-module/utils/colors-values.js.map +1 -1
  700. package/build-module/utils/config-values.js.map +1 -1
  701. package/build-module/utils/element-rect.js +22 -12
  702. package/build-module/utils/element-rect.js.map +1 -1
  703. package/build-module/utils/font-size.js.map +1 -1
  704. package/build-module/utils/hooks/use-animated-offset-rect.js +74 -0
  705. package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -0
  706. package/build-module/utils/hooks/use-cx.js.map +1 -1
  707. package/build-module/utils/hooks/use-on-value-update.js +3 -6
  708. package/build-module/utils/hooks/use-on-value-update.js.map +1 -1
  709. package/build-module/utils/math.js +2 -2
  710. package/build-module/utils/math.js.map +1 -1
  711. package/build-module/utils/space.js.map +1 -1
  712. package/build-module/utils/unit-values.js.map +1 -1
  713. package/build-module/utils/use-responsive-value.js.map +1 -1
  714. package/build-style/style-rtl.css +30 -14
  715. package/build-style/style.css +30 -14
  716. package/build-types/alignment-matrix-control/types.d.ts +2 -0
  717. package/build-types/alignment-matrix-control/types.d.ts.map +1 -1
  718. package/build-types/autocomplete/index.d.ts.map +1 -1
  719. package/build-types/border-box-control/border-box-control/component.d.ts +5 -15
  720. package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
  721. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +2 -1
  722. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
  723. package/build-types/border-box-control/stories/index.story.d.ts +3 -2
  724. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  725. package/build-types/border-control/border-control/component.d.ts +3 -2
  726. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  727. package/build-types/border-control/border-control-dropdown/component.d.ts +2 -1
  728. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  729. package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
  730. package/build-types/border-control/stories/index.story.d.ts +15 -30
  731. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  732. package/build-types/border-control/styles.d.ts.map +1 -1
  733. package/build-types/border-control/types.d.ts +12 -7
  734. package/build-types/border-control/types.d.ts.map +1 -1
  735. package/build-types/box-control/index.d.ts +4 -4
  736. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  737. package/build-types/box-control/types.d.ts +3 -3
  738. package/build-types/composite/stories/index.story.d.ts +22 -0
  739. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  740. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  741. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  742. package/build-types/index.d.ts +23 -4
  743. package/build-types/index.d.ts.map +1 -1
  744. package/build-types/modal/aria-helper.d.ts.map +1 -1
  745. package/build-types/navigator/index.d.ts +171 -5
  746. package/build-types/navigator/index.d.ts.map +1 -1
  747. package/build-types/navigator/legacy.d.ts +226 -0
  748. package/build-types/navigator/legacy.d.ts.map +1 -0
  749. package/build-types/navigator/navigator/component.d.ts +3 -0
  750. package/build-types/navigator/navigator/component.d.ts.map +1 -0
  751. package/build-types/navigator/navigator-back-button/component.d.ts +0 -35
  752. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  753. package/build-types/navigator/navigator-button/component.d.ts +0 -34
  754. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  755. package/build-types/navigator/navigator-screen/component.d.ts +0 -35
  756. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  757. package/build-types/navigator/navigator-screen/use-screen-animate-presence.d.ts +16 -0
  758. package/build-types/navigator/navigator-screen/use-screen-animate-presence.d.ts.map +1 -0
  759. package/build-types/navigator/navigator-to-parent-button/component.d.ts +0 -4
  760. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  761. package/build-types/navigator/stories/index.story.d.ts +5 -5
  762. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  763. package/build-types/navigator/styles.d.ts +20 -7
  764. package/build-types/navigator/styles.d.ts.map +1 -1
  765. package/build-types/navigator/types.d.ts +19 -1
  766. package/build-types/navigator/types.d.ts.map +1 -1
  767. package/build-types/navigator/use-navigator.d.ts +4 -1
  768. package/build-types/navigator/use-navigator.d.ts.map +1 -1
  769. package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
  770. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  771. package/build-types/search-control/index.d.ts.map +1 -1
  772. package/build-types/search-control/stories/index.story.d.ts +0 -8
  773. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  774. package/build-types/search-control/types.d.ts +3 -0
  775. package/build-types/search-control/types.d.ts.map +1 -1
  776. package/build-types/select-control/stories/index.story.d.ts +7 -0
  777. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  778. package/build-types/tabs/stories/index.story.d.ts +2 -1
  779. package/build-types/tabs/stories/index.story.d.ts.map +1 -1
  780. package/build-types/tabs/styles.d.ts +7 -0
  781. package/build-types/tabs/styles.d.ts.map +1 -1
  782. package/build-types/tabs/tab.d.ts.map +1 -1
  783. package/build-types/tabs/tablist.d.ts.map +1 -1
  784. package/build-types/tabs/use-track-overflow.d.ts +17 -0
  785. package/build-types/tabs/use-track-overflow.d.ts.map +1 -0
  786. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +2 -2
  787. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  788. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +2 -2
  789. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  790. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  791. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  792. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  793. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +0 -1
  794. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  795. package/build-types/toggle-group-control/types.d.ts +2 -1
  796. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  797. package/build-types/utils/element-rect.d.ts +8 -0
  798. package/build-types/utils/element-rect.d.ts.map +1 -1
  799. package/build-types/utils/hooks/use-animated-offset-rect.d.ts +62 -0
  800. package/build-types/utils/hooks/use-animated-offset-rect.d.ts.map +1 -0
  801. package/build-types/utils/hooks/use-on-value-update.d.ts.map +1 -1
  802. package/package.json +20 -20
  803. package/schemas/docs-manifest.json +38 -0
  804. package/src/alignment-matrix-control/README.md +46 -36
  805. package/src/alignment-matrix-control/docs-manifest.json +12 -0
  806. package/src/alignment-matrix-control/types.ts +2 -0
  807. package/src/angle-picker-control/README.md +36 -23
  808. package/src/angle-picker-control/docs-manifest.json +5 -0
  809. package/src/autocomplete/index.tsx +4 -1
  810. package/src/border-box-control/border-box-control/README.md +22 -26
  811. package/src/border-box-control/border-box-control/component.tsx +3 -14
  812. package/src/border-box-control/stories/index.story.tsx +2 -1
  813. package/src/border-control/border-control/README.md +26 -36
  814. package/src/border-control/border-control/component.tsx +1 -2
  815. package/src/border-control/border-control-dropdown/component.tsx +1 -15
  816. package/src/border-control/stories/index.story.tsx +4 -10
  817. package/src/border-control/styles.ts +0 -1
  818. package/src/border-control/test/index.js +2 -15
  819. package/src/border-control/types.ts +12 -7
  820. package/src/box-control/README.md +9 -12
  821. package/src/box-control/index.tsx +4 -4
  822. package/src/box-control/stories/index.story.tsx +1 -1
  823. package/src/box-control/types.ts +3 -3
  824. package/src/button/style.scss +5 -1
  825. package/src/composite/legacy/test/index.tsx +22 -21
  826. package/src/composite/stories/index.story.tsx +42 -0
  827. package/src/composite/test/index.tsx +629 -38
  828. package/src/dropdown/stories/index.story.tsx +1 -0
  829. package/src/dropdown/style.scss +10 -13
  830. package/src/dropdown-menu/stories/index.story.tsx +3 -0
  831. package/src/index.ts +19 -1
  832. package/src/menu-group/style.scss +4 -1
  833. package/src/menu-items-choice/style.scss +2 -0
  834. package/src/modal/aria-helper.ts +1 -0
  835. package/src/navigator/README.md +176 -0
  836. package/src/navigator/index.tsx +131 -0
  837. package/src/navigator/legacy.ts +169 -0
  838. package/src/navigator/{navigator-provider → navigator}/component.tsx +6 -44
  839. package/src/navigator/navigator-back-button/component.tsx +1 -37
  840. package/src/navigator/navigator-back-button/hook.ts +1 -1
  841. package/src/navigator/navigator-button/component.tsx +1 -36
  842. package/src/navigator/navigator-button/hook.ts +1 -1
  843. package/src/navigator/navigator-screen/component.tsx +48 -76
  844. package/src/navigator/navigator-screen/use-screen-animate-presence.ts +177 -0
  845. package/src/navigator/navigator-to-parent-button/component.tsx +2 -7
  846. package/src/navigator/stories/index.story.tsx +55 -54
  847. package/src/navigator/styles.ts +112 -41
  848. package/src/navigator/test/index.tsx +47 -47
  849. package/src/navigator/types.ts +19 -1
  850. package/src/navigator/use-navigator.ts +4 -1
  851. package/src/range-control/styles/range-control-styles.ts +19 -10
  852. package/src/range-control/tooltip.tsx +1 -1
  853. package/src/search-control/README.md +2 -0
  854. package/src/search-control/index.tsx +9 -2
  855. package/src/search-control/stories/index.story.tsx +0 -15
  856. package/src/search-control/test/index.tsx +4 -1
  857. package/src/search-control/types.ts +3 -0
  858. package/src/select-control/stories/index.story.tsx +14 -1
  859. package/src/tabs/stories/index.story.tsx +106 -0
  860. package/src/tabs/styles.ts +161 -58
  861. package/src/tabs/tab.tsx +8 -2
  862. package/src/tabs/tablist.tsx +72 -39
  863. package/src/tabs/use-track-overflow.ts +76 -0
  864. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +208 -44
  865. package/src/toggle-group-control/test/index.tsx +26 -0
  866. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +18 -10
  867. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +30 -12
  868. package/src/toggle-group-control/toggle-group-control/component.tsx +19 -6
  869. package/src/toggle-group-control/toggle-group-control/styles.ts +41 -0
  870. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +15 -28
  871. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +0 -11
  872. package/src/toggle-group-control/types.ts +3 -1
  873. package/src/tools-panel/tools-panel/README.md +10 -10
  874. package/src/utils/element-rect.ts +32 -15
  875. package/src/utils/hooks/use-animated-offset-rect.ts +107 -0
  876. package/src/utils/hooks/use-on-value-update.ts +3 -6
  877. package/tsconfig.tsbuildinfo +1 -1
  878. package/build/navigator/navigator-provider/component.js.map +0 -1
  879. package/build/utils/hooks/use-event.js +0 -41
  880. package/build/utils/hooks/use-event.js.map +0 -1
  881. package/build-module/navigator/navigator-provider/component.js.map +0 -1
  882. package/build-module/utils/hooks/use-event.js +0 -35
  883. package/build-module/utils/hooks/use-event.js.map +0 -1
  884. package/build-types/navigator/navigator-provider/component.d.ts +0 -37
  885. package/build-types/navigator/navigator-provider/component.d.ts.map +0 -1
  886. package/build-types/utils/hooks/use-event.d.ts +0 -20
  887. package/build-types/utils/hooks/use-event.d.ts.map +0 -1
  888. package/src/navigator/index.ts +0 -6
  889. package/src/navigator/navigator-back-button/README.md +0 -15
  890. package/src/navigator/navigator-button/README.md +0 -38
  891. package/src/navigator/navigator-provider/README.md +0 -94
  892. package/src/navigator/navigator-screen/README.md +0 -33
  893. package/src/navigator/navigator-to-parent-button/README.md +0 -17
  894. package/src/utils/hooks/use-event.ts +0 -38
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_reactDom","_framerMotion","_element","_compose","_icons","_deprecated","_primitives","_button","_scrollLock","_slotFill","_utils","_context","_overlayMiddlewares","_styleProvider","_jsxRuntime","SLOT_NAME","exports","ArrowTriangle","jsxs","SVG","xmlns","viewBox","className","role","children","jsx","Path","d","vectorEffect","slotNameContext","createContext","undefined","fallbackContainerClassname","getPopoverFallbackContainer","container","document","body","querySelector","createElement","append","UnforwardedPopover","props","forwardedRef","animate","headerTitle","constrainTabbing","onClose","noArrow","position","placement","placementProp","offset","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","flip","resize","shift","inline","variant","style","contentStyle","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","useContextSystem","computedFlipProp","computedResizeProp","deprecated","since","version","alternative","computedVariant","arrowRef","useRef","fallbackReferenceElement","setFallbackReferenceElement","useState","anchorRefFallback","useCallback","node","isMobileViewport","useViewportMatch","isExpanded","hasArrow","normalizedPlacementFromProps","positionToPlacement","middleware","overlayMiddlewares","offsetMiddleware","flipMiddleware","size","apply","sizeProps","_refs$floating$curren","firstElementChild","refs","floating","current","HTMLElement","Object","assign","maxHeight","availableHeight","overflow","shiftMiddleware","crossAxis","limiter","limitShift","padding","arrow","element","slotName","useContext","slot","useSlot","onDialogClose","type","event","dialogRef","dialogProps","useDialog","__unstableOnClose","x","y","strategy","update","computedPlacement","middlewareData","arrowData","useFloating","whileElementsMounted","referenceParam","floatingParam","updateParam","autoUpdate","layoutShift","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","useLayoutEffect","resultingReferenceElement","getReferenceElement","setReference","mergedFloatingRef","useMergeRefs","setFloating","left","computePopoverPosition","shouldReduceMotion","useReducedMotion","shouldAnimate","animationFinished","setAnimationFinished","motionInlineStyles","otherMotionProps","useMemo","placementToMotionAnimationProps","animationProps","onAnimationComplete","isPositioned","content","motion","div","clsx","ref","tabIndex","default","icon","close","onClick","split","join","Number","isFinite","shouldRenderWithinSlot","hasAnchor","Fill","name","createPortal","StyleProvider","Fragment","Popover","contextConnect","PopoverSlot","Slot","bubblesVirtually","forwardRef","__unstableSlotNameProvider","Provider","_default"],"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":";;;;;;;AAIA,IAAAA,KAA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
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_reactDom","_framerMotion","_element","_compose","_icons","_deprecated","_primitives","_button","_scrollLock","_slotFill","_utils","_context","_overlayMiddlewares","_styleProvider","_jsxRuntime","SLOT_NAME","exports","ArrowTriangle","jsxs","SVG","xmlns","viewBox","className","role","children","jsx","Path","d","vectorEffect","slotNameContext","createContext","undefined","fallbackContainerClassname","getPopoverFallbackContainer","container","document","body","querySelector","createElement","append","UnforwardedPopover","props","forwardedRef","animate","headerTitle","constrainTabbing","onClose","noArrow","position","placement","placementProp","offset","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","flip","resize","shift","inline","variant","style","contentStyle","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","useContextSystem","computedFlipProp","computedResizeProp","deprecated","since","version","alternative","computedVariant","arrowRef","useRef","fallbackReferenceElement","setFallbackReferenceElement","useState","anchorRefFallback","useCallback","node","isMobileViewport","useViewportMatch","isExpanded","hasArrow","normalizedPlacementFromProps","positionToPlacement","middleware","overlayMiddlewares","offsetMiddleware","flipMiddleware","size","apply","sizeProps","_refs$floating$curren","firstElementChild","refs","floating","current","HTMLElement","Object","assign","maxHeight","availableHeight","overflow","shiftMiddleware","crossAxis","limiter","limitShift","padding","arrow","element","slotName","useContext","slot","useSlot","onDialogClose","type","event","dialogRef","dialogProps","useDialog","__unstableOnClose","x","y","strategy","update","computedPlacement","middlewareData","arrowData","useFloating","whileElementsMounted","referenceParam","floatingParam","updateParam","autoUpdate","layoutShift","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","useLayoutEffect","resultingReferenceElement","getReferenceElement","setReference","mergedFloatingRef","useMergeRefs","setFloating","left","computePopoverPosition","shouldReduceMotion","useReducedMotion","shouldAnimate","animationFinished","setAnimationFinished","motionInlineStyles","otherMotionProps","useMemo","placementToMotionAnimationProps","animationProps","onAnimationComplete","isPositioned","content","motion","div","clsx","ref","tabIndex","default","icon","close","onClick","split","join","Number","isFinite","shouldRenderWithinSlot","hasAnchor","Fill","name","createPortal","StyleProvider","Fragment","Popover","contextConnect","PopoverSlot","Slot","bubblesVirtually","forwardRef","__unstableSlotNameProvider","Provider","_default"],"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":";;;;;;;AAIA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAWA,IAAAE,aAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AAWA,IAAAI,QAAA,GAAAJ,OAAA;AAMA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAKA,IAAAQ,OAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,WAAA,GAAAV,sBAAA,CAAAC,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AAMA,IAAAY,QAAA,GAAAZ,OAAA;AAOA,IAAAa,mBAAA,GAAAb,OAAA;AACA,IAAAc,cAAA,GAAAd,OAAA;AAAkD,IAAAe,WAAA,GAAAf,OAAA;AA9DlD;AACA;AACA;;AAgBA;AACA;AACA;;AAsBA;AACA;AACA;;AAoBA;AACA;AACA;AACA;AACA;AACO,MAAMgB,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,SAAS;;AAElC;AACA;AACA;AACA;AACA,MAAME,aAAa,GAAGA,CAAA,kBACrB,IAAAH,WAAA,CAAAI,IAAA,EAACZ,WAAA,CAAAa,GAAG;EACHC,KAAK,EAAC,4BAA4B;EAClCC,OAAO,EAAC,aAAa;EACrBC,SA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W,GAAA,EAAChB,SAAA,CAAA4L,IAAI;IACJC,gBAAgB;IAChBR,IAAI,EAAGA,IAAM;IACbxK,SAAS,EAAC,cAAc;IACxB2J,GAAG,EAAGA;EAAK,CACX,CAAC;AAEJ;;AAEA;AACAiB,OAAO,CAACG,IAAI,GAAG,IAAAE,mBAAU,EAAEH,WAAY,CAAC;AACxC;AACAF,OAAO,CAACM,0BAA0B,GAAG3K,eAAe,CAAC4K,QAAQ;AAAC,IAAAC,QAAA,GAAA1L,OAAA,CAAAmK,OAAA,GAE/Ce,OAAO","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_reactDom","require","overlayMiddlewares","name","fn","rects","reference","size","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":";;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AAJA;AACA;AACA;;AAIO,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,EACD,IAAAC,cAAI,EAAE;IACLC,KAAKA,CAAE;MAAEH,KAAK;MAAEI;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,GAAGZ,KAAK,CAACC,SAAS,CAACW,KAAO,IAAG;QACrCC,MAAM,EAAG,GAAGb,KAAK,CAACC,SAAS,CAACY,MAAQ;MACrC,CAAE,CAAC;IACJ;EACD,CAAE,CAAC,CACH;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_reactDom","require","overlayMiddlewares","name","fn","rects","reference","size","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":";;;;;;AAIA,IAAAA,SAAA,GAAAC,OAAA;AAJA;AACA;AACA;;AAIO,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,EACD,IAAAC,cAAI,EAAE;IACLC,KAAKA,CAAE;MAAEH,KAAK;MAAEI;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,GAAIZ,KAAK,CAACC,SAAS,CAACW,KAAK,IAAK;QACrCC,MAAM,EAAE,GAAIb,KAAK,CAACC,SAAS,CAACY,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","exports","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(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,wBAAyB,CAAC;QACtD,OAAO,IAAIM,MAAM,CAACC,OAAO,EAAAI,OAAA,GACxBI,IAAI,CAACP,CAAC,cAAAG,OAAA,cAAAA,OAAA,GAAII,IAAI,CAACtC,IAAI,GAAAmC,OAAA,GACnBG,IAAI,CAACN,CAAC,cAAAG,OAAA,cAAAA,OAAA,GAAIG,IAAI,CAAChD,GAAG,GAAA8C,WAAA,GAClBE,IAAI,CAACL,KAAK,cAAAG,WAAA,cAAAA,WAAA,GAAIE,IAAI,CAACvC,KAAK,GAAGuC,IAAI,CAACtC,IAAI,GAAAqC,YAAA,GACpCC,IAAI,CAACC,MAAM,cAAAF,YAAA,cAAAA,YAAA,GAAIC,IAAI,CAACjD,MAAM,GAAGiD,IAAI,CAAChD,GACnC,CAAC;MACF;IACD,CAAC;EACF,CAAC,MAAM,IAAKiC,wBAAwB,EAAG;IACtC;IACA;IACAE,gBAAgB,GAAGF,wBAAwB,CAACiB,aAAa;EAC1D;;EAEA;EACA,QAAAhB,iBAAA,GAAOC,gBAAgB,cAAAD,iBAAA,cAAAA,iBAAA,GAAI,IAAI;AAChC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA7B,OAAA,CAAAwB,mBAAA,GAAAA,mBAAA;AASO,MAAMsB,sBAAsB,GAAKC,CAAgB,IACvDA,CAAC,KAAK,IAAI,IAAIC,MAAM,CAACC,KAAK,CAAEF,CAAE,CAAC,GAAGG,SAAS,GAAGC,IAAI,CAACC,KAAK,CAAEL,CAAE,CAAC;AAAC/C,OAAA,CAAA8C,sBAAA,GAAAA,sBAAA","ignoreList":[]}
1
+ {"version":3,"names":["POSITION_TO_PLACEMENT","bottom","top","middle","positionToPlacement","position","_POSITION_TO_PLACEMEN","exports","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;EACrC,kBAAkB,EAAE,cAAc;EAClC,eAAe,EAAE,SAAS;EAC1B,gBAAgB,EAAE,SAAS;EAC3B,iBAAiB,EAAE,SAAS;EAC5B,cAAc,EAAE,SAAS;EACzB,iBAAiB,EAAE,KAAK;EACxB,kBAAkB,EAAE,KAAK;EACzB,mBAAmB,EAAE,KAAK;EAC1B,gBAAgB,EAAE,KAAK;EACvB,gBAAgB,EAAE,WAAW;EAC7B,iBAAiB,EAAE,WAAW;EAC9B,kBAAkB,EAAE,WAAW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AA,EAAAC,WAAA,EAAAC,YAAA;QACvB,MAAMC,IAAI,GAAGhB,aAAa,CAAEC,wBAAyB,CAAC;QACtD,OAAO,IAAIM,MAAM,CAACC,OAAO,EAAAI,OAAA,GACxBI,IAAI,CAACP,CAAC,cAAAG,OAAA,cAAAA,OAAA,GAAII,IAAI,CAACtC,IAAI,GAAAmC,OAAA,GACnBG,IAAI,CAACN,CAAC,cAAAG,OAAA,cAAAA,OAAA,GAAIG,IAAI,CAAChD,GAAG,GAAA8C,WAAA,GAClBE,IAAI,CAACL,KAAK,cAAAG,WAAA,cAAAA,WAAA,GAAIE,IAAI,CAACvC,KAAK,GAAGuC,IAAI,CAACtC,IAAI,GAAAqC,YAAA,GACpCC,IAAI,CAACC,MAAM,cAAAF,YAAA,cAAAA,YAAA,GAAIC,IAAI,CAACjD,MAAM,GAAGiD,IAAI,CAAChD,GACnC,CAAC;MACF;IACD,CAAC;EACF,CAAC,MAAM,IAAKiC,wBAAwB,EAAG;IACtC;IACA;IACAE,gBAAgB,GAAGF,wBAAwB,CAACiB,aAAa;EAC1D;;EAEA;EACA,QAAAhB,iBAAA,GAAOC,gBAAgB,cAAAD,iBAAA,cAAAA,iBAAA,GAAI,IAAI;AAChC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA7B,OAAA,CAAAwB,mBAAA,GAAAA,mBAAA;AASO,MAAMsB,sBAAsB,GAAKC,CAAgB,IACvDA,CAAC,KAAK,IAAI,IAAIC,MAAM,CAACC,KAAK,CAAEF,CAAE,CAAC,GAAGG,SAAS,GAAGC,IAAI,CAACC,KAAK,CAAEL,CAAE,CAAC;AAAC/C,OAAA,CAAA8C,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_element","ProgressBarStyled","_interopRequireWildcard","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","UnforwardedProgressBar","props","ref","className","value","progressProps","isIndeterminate","Number","isFinite","jsxs","Track","children","jsx","Indicator","style","undefined","ProgressElement","max","__","ProgressBar","exports","forwardRef","_default"],"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 ProgressB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AA,CAAA;AAd9C;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAKA,SAASW,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,oBACC,IAAAzB,WAAA,CAAA8B,IAAA,EAAChC,iBAAiB,CAACiC,KAAK;IAACP,SAAS,EAAGA,SAAW;IAAAQ,QAAA,gBAC/C,IAAAhC,WAAA,CAAAiC,GAAA,EAACnC,iBAAiB,CAACoC,SAAS;MAC3BC,KAAK,EAAG;QACP,mBAAmB,EAAE,CAAER,eAAe,GAClC,GAAGF,KAAO,GAAE,GACbW;MACJ,CAAG;MACHT,eAAe,EAAGA;IAAiB,CACnC,CAAC,eACF,IAAA3B,WAAA,CAAAiC,GAAA,EAACnC,iBAAiB,CAACuC,eAAe;MACjCC,GAAG,EAAG,GAAK;MACXb,KAAK,EAAGA,KAAO;MACf,cAAa,IAAAc,QAAE,EAAE,WAAY,CAAG;MAChChB,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;AACO,MAAMc,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAAE,mBAAU,EAAErB,sBAAuB,CAAC;AAAC,IAAAsB,QAAA,GAAAF,OAAA,CAAAlC,OAAA,GAEjDiC,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_element","ProgressBarStyled","_interopRequireWildcard","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","UnforwardedProgressBar","props","ref","className","value","progressProps","isIndeterminate","Number","isFinite","jsxs","Track","children","jsx","Indicator","style","undefined","ProgressElement","max","__","ProgressBar","exports","forwardRef","_default"],"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":";;;;;;AAQA,IAAAA,K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ACA;AACA;;AAIA;AACA;AACA;;AAKA,SAASW,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,oBACC,IAAAzB,WAAA,CAAA8B,IAAA,EAAChC,iBAAiB,CAACiC,KAAK;IAACP,SAAS,EAAGA,SAAW;IAAAQ,QAAA,gBAC/C,IAAAhC,WAAA,CAAAiC,GAAA,EAACnC,iBAAiB,CAACoC,SAAS;MAC3BC,KAAK,EAAG;QACP,mBAAmB,EAAE,CAAER,eAAe,GACnC,GAAIF,KAAK,GAAI,GACbW;MACJ,CAAG;MACHT,eAAe,EAAGA;IAAiB,CACnC,CAAC,eACF,IAAA3B,WAAA,CAAAiC,GAAA,EAACnC,iBAAiB,CAACuC,eAAe;MACjCC,GAAG,EAAG,GAAK;MACXb,KAAK,EAAGA,KAAO;MACf,cAAa,IAAAc,QAAE,EAAE,WAAY,CAAG;MAChChB,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;AACO,MAAMc,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAAE,mBAAU,EAAErB,sBAAuB,CAAC;AAAC,IAAAsB,QAAA,GAAAF,OAAA,CAAAlC,OAAA,GAEjDiC,WAAW","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_i18n","_utils","_EMOTION_STRINGIFIED_CSS_ERROR__","animateProgressBar","isRtl","animationDirection","keyframes","INDETERMINATE_TRACK_WIDTH","exports","Track","_base","default","process","env","NODE_ENV","target","label","CONFIG","borderWidthFocus","COLORS","theme","foreground","radiusFull","_ref","name","styles","map","toString","Indicator","isIndeterminate","css","animationDuration","animationTimingFunction","animationIterationCount","animationName","isRTL","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":";;;;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAA0C,SAAAG,iCAAA,gPAd1C;AACA;AACA,GAFA,CAMA;AACA;AACA,GAFA,CAKA;AACA;AACA;AAGA,SAASC,kBAAkBA,CAAEC,KAAK,GAAG,KAAK,EAAG;EAC5C,MAAMC,kBAAkB,GAAGD,KAAK,GAAG,OAAO,GAAG,MAAM;EAEnD,OAAO,IAAAE,gBAAS,EAAE;IACjB,IAAI,EAAE;MACL,CAAED,kBAAkB,GAAI;IACzB,CAAC;IACD,MAAM,EAAE;MACP,CAAEA,kBAAkB,GAAI;IACzB;EACD,CAAE,CAAC;AACJ;;AAEA;AACO,MAAME,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,EAAE;AAEpC,MAAME,KAAK,GAAAD,OAAA,CAAAC,KAAA,oBAAAC,KAAA,CAAAC,OAAA,SAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,gDAGNC,aAAM,CAACC,gBAAgB,sDAI9BC,aAAM,CAACC,KAAK,CAACC,UAAU,gDAGTJ,aAAM,CAACK,UAAU,mFAAAV,OAAA,CAAAC,GAAA,CAAAC,QAAA,opGASnC;AAAC,IAAAS,IAAA,GAAAX,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAU,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAzB;AAAA;AAEK,MAAM0B,SAAS,GAAApB,OAAA,CAAAoB,SAAA,oBAAAlB,KAAA,CAAAC,OAAA,SAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,8EAOHC,aAAM,CAACK,UAAU,sDAI/BH,aAAM,CAACC,KAAK,CAACC,UAAU,oFAQxB,CAAE;EAAEQ;AAAgB,CAAC,KACvBA,eAAe,gBACZ,IAAAC,UAAG,EAAE;EACLC,iBAAiB,EAAE,MAAM;EACzBC,uBAAuB,EAAE,aAAa;EACtCC,uBAAuB,EAAE,UAAU;EACnCC,aAAa,EAAE/B,kBAAkB,CAAE,IAAAgC,WAAK,EAAC,CAAE,CAAC;EAC5CC,KAAK,EAAG,GAAG7B,yBAA2B;AACtC,CAAC,EAAAK,OAAA,CAAAC,GAAA,CAAAC,QAAA,8CAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,kpGAAC,CAAC,GAAAS,IAIA,SAAAX,OAAA,CAAAC,GAAA,CAAAC,QAAA,opGACP;AAEM,MAAMuB,eAAe,GAAA7B,OAAA,CAAA6B,eAAA,oBAAA3B,KAAA,CAAAC,OAAA,cAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAU,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAzB;AAAA,EAO3B","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_i18n","_utils","_EMOTION_STRINGIFIED_CSS_ERROR__","animateProgressBar","isRtl","animationDirection","keyframes","INDETERMINATE_TRACK_WIDTH","exports","Track","_base","default","process","env","NODE_ENV","target","label","CONFIG","borderWidthFocus","COLORS","theme","foreground","radiusFull","_ref","name","styles","map","toString","Indicator","isIndeterminate","css","animationDuration","animationTimingFunction","animationIterationCount","animationName","isRTL","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":";;;;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAA0C,SAAAG,iCAAA,gPAd1C;AACA;AACA,GAFA,CAMA;AACA;AACA,GAFA,CAKA;AACA;AACA;AAGA,SAASC,kBAAkBA,CAAEC,KAAK,GAAG,KAAK,EAAG;EAC5C,MAAMC,kBAAkB,GAAGD,KAAK,GAAG,OAAO,GAAG,MAAM;EAEnD,OAAO,IAAAE,gBAAS,EAAE;IACjB,IAAI,EAAE;MACL,CAAED,kBAAkB,GAAI;IACzB,CAAC;IACD,MAAM,EAAE;MACP,CAAEA,kBAAkB,GAAI;IACzB;EACD,CAAE,CAAC;AACJ;;AAEA;AACO,MAAME,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,EAAE;AAEpC,MAAME,KAAK,GAAAD,OAAA,CAAAC,KAAA,oBAAAC,KAAA,CAAAC,OAAA,SAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,gDAGNC,aAAM,CAACC,gBAAgB,sDAI9BC,aAAM,CAACC,KAAK,CAACC,UAAU,gDAGTJ,aAAM,CAACK,UAAU,mF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n","require","_authorSelect","_interopRequireDefault","_categorySelect","_formTokenField","_rangeControl","_selectControl","_vStack","_jsxRuntime","DEFAULT_MIN_ITEMS","DEFAULT_MAX_ITEMS","MAX_CATEGORIES_SUGGESTIONS","isSingleCategorySelection","props","isMultipleCategorySelection","QueryControls","authorList","selectedAuthorId","numberOfItems","order","orderBy","maxItems","minItems","onAuthorChange","onNumberOfItemsChange","onOrderChange","onOrderByChange","jsx","VStack","spacing","className","children","default","__nextHasNoMarginBottom","__next40pxDefaultSize","label","__","value","undefined","options","onChange","newOrderBy","newOrder","split","categoriesList","onCategoryChange","noOptionLabel","_x","selectedCategoryId","categorySuggestions","selectedCategories","map","item","id","name","suggestions","Object","keys","maxSuggestions","min","max","required","_default","exports"],"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":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,eAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,aAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,cAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AAAoC,IAAAQ,WAAA,GAAAR,OAAA;AAbpC;AACA;AACA;;AAGA;AACA;AACA;;AAaA,MAAMS,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;AAC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Q,EAAG3B,KAAK,CAACgC,gBAAkB;MACnCa,cAAc,EAAG/C;IAA4B,GAjBzC,kCAkBJ,CACD,EACFY,cAAc,iBACb,IAAAf,WAAA,CAAAmB,GAAA,EAAC1B,aAAA,CAAA+B,OAAY;MACZE,qBAAqB;MAErBlB,UAAU,EAAGA,UAAY;MACzBmB,KAAK,EAAG,IAAAC,QAAE,EAAE,QAAS,CAAG;MACxBU,aAAa,EAAG,IAAAC,QAAE,EAAE,KAAK,EAAE,SAAU,CAAG;MACxC9B,gBAAgB,EAAGA,gBAAkB;MACrCuB,QAAQ,EAAGjB;IAAgB,GALvB,8BAMJ,CACD,EACDC,qBAAqB,iBACpB,IAAAhB,WAAA,CAAAmB,GAAA,EAACtB,aAAA,CAAA2B,OAAY;MACZC,uBAAuB;MACvBC,qBAAqB;MAErBC,KAAK,EAAG,IAAAC,QAAE,EAAE,iBAAkB,CAAG;MACjCC,KAAK,EAAGnB,aAAe;MACvBsB,QAAQ,EAAGhB,qBAAuB;MAClCmC,GAAG,EAAGrC,QAAU;MAChBsC,GAAG,EAAGvC,QAAU;MAChBwC,QAAQ;IAAA,GANJ,8BAOJ,CACD;EACD,CACM,CAAC;AAEX;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA/B,OAAA,GAEcjB,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_authorSelect","_interopRequireDefault","_categorySelect","_formTokenField","_rangeControl","_selectControl","_vStack","_jsxRuntime","DEFAULT_MIN_ITEMS","DEFAULT_MAX_ITEMS","MAX_CATEGORIES_SUGGESTIONS","isSingleCategorySelection","props","isMultipleCategorySelection","QueryControls","authorList","selectedAuthorId","numberOfItems","order","orderBy","maxItems","minItems","onAuthorChange","onNumberOfItemsChange","onOrderChange","onOrderByChange","jsx","VStack","spacing","className","children","default","__nextHasNoMarginBottom","__next40pxDefaultSize","label","__","value","undefined","options","onChange","newOrderBy","newOrder","split","categoriesList","onCategoryChange","noOptionLabel","_x","selectedCategoryId","categorySuggestions","selectedCategories","map","item","id","name","suggestions","Object","keys","maxSuggestions","min","max","required","_default","exports"],"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 }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D,EACDC,qBAAqB,iBACpB,IAAAhB,WAAA,CAAAmB,GAAA,EAACtB,aAAA,CAAA2B,OAAY;MACZC,uBAAuB;MACvBC,qBAAqB;MAErBC,KAAK,EAAG,IAAAC,QAAE,EAAE,iBAAkB,CAAG;MACjCC,KAAK,EAAGnB,aAAe;MACvBsB,QAAQ,EAAGhB,qBAAuB;MAClCmC,GAAG,EAAGrC,QAAU;MAChBsC,GAAG,EAAGvC,QAAU;MAChBwC,QAAQ;IAAA,GANJ,8BAOJ,CACD;EACD,CACM,CAAC;AAEX;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA/B,OAAA,GAEcjB,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_i18n","require","_element","_rangeControl","_interopRequireDefault","_selectControl","_categorySelect","_jsxRuntime","DEFAULT_MIN_ITEMS","DEFAULT_MAX_ITEMS","options","label","__","value","QueryControls","memo","categoriesList","selectedCategoryId","numberOfItems","order","orderBy","maxItems","minItems","onCategoryChange","onNumberOfItemsChange","onOrderChange","onOrderByChange","onChange","useCallback","newOrderBy","newOrder","split","jsxs","Fragment","children","jsx","default","hideCancelButton","noOptionLabel","_x","__next40pxDefaultSize","min","max","required","_default","exports"],"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":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,aAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,cAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,eAAA,GAAAF,sBAAA,CAAAH,OAAA;AAA+C,IAAAM,WAAA,GAAAN,OAAA;AAX/C;AACA;AACA;;AAIA;AACA;AACA;;AAKA,MAAMO,iBAAiB,GAAG,CAAC;AAC3B,MAAMC,iBAAiB,GAAG,GAAG;AAE7B,MAAMC,OAAO,GAAG,CACf;EACCC,KAAK,EAAE,IAAAC,QAAE,EAAE,kBAAmB,CAAC;EAC/BC,KAAK,EAAE;AACR,CAAC,EACD;EACCF,KAAK,EAAE,IAAAC,QAAE,EAAE,kBAAmB,CAAC;EAC/BC,KAAK,EAAE;AACR,CAAC,EACD;EACC;EACAF,KAAK,EAAE,IAAAC,QAAE,EAAE,OAAQ,CAAC;EACpBC,KAAK,EAAE;AACR,CAAC,EACD;EACC;EACAF,KAAK,EAAE,IAAAC,QAAE,EAAE,OAAQ,CAAC;EACpBC,KAAK,EAAE;AACR,CAAC,CACD;AAED,MAAMC,aAAa,GAAG,IAAAC,aAAI,EACzB,CAAE;EACDC,cAAc;EACdC,kBAAkB;EAClBC,aAAa;EACbC,KAAK;EACLC,OAAO;EACPC,QAAQ,GAAGZ,iBAAiB;EAC5Ba,QAAQ,GAAGd,iBAAiB;EAC5Be,gB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KAAK,EAAG,IAAAC,QAAE,EAAE,iBAAkB,CAAG;MACjCC,KAAK,EAAGK,aAAe;MACvBS,QAAQ,EAAGH,qBAAuB;MAClCiB,GAAG,EAAGnB,QAAU;MAChBoB,GAAG,EAAGrB,QAAU;MAChBsB,QAAQ;IAAA,CACR,CACD;EAAA,CACA,CAAC;AAEL,CACD,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAT,OAAA,GAEatB,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["_i18n","require","_element","_rangeControl","_interopRequireDefault","_selectControl","_categorySelect","_jsxRuntime","DEFAULT_MIN_ITEMS","DEFAULT_MAX_ITEMS","options","label","__","value","QueryControls","memo","categoriesList","selectedCategoryId","numberOfItems","order","orderBy","maxItems","minItems","onCategoryChange","onNumberOfItemsChange","onOrderChange","onOrderByChange","onChange","useCallback","newOrderBy","newOrder","split","jsxs","Fragment","children","jsx","default","hideCancelButton","noOptionLabel","_x","__next40pxDefaultSize","min","max","required","_default","exports"],"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={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ChBoB,GAAG,EAAGrB,QAAU;MAChBsB,QAAQ;IAAA,CACR,CACD;EAAA,CACA,CAAC;AAEL,CACD,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAT,OAAA,GAEatB,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_compose","_baseControl","_vStack","_baseControlStyles","_visuallyHidden","_jsxRuntime","generateOptionDescriptionId","radioGroupId","index","generateOptionId","generateHelpId","RadioControl","props","label","className","selected","help","onChange","hideLabelFromVision","options","id","preferredId","additionalProps","useInstanceId","onChangeValue","event","target","value","length","jsxs","clsx","undefined","children","jsx","VisuallyHidden","as","default","VisualLabel","VStack","spacing","map","option","type","name","checked","description","htmlFor","StyledHelp","__nextHasNoMarginBottom","_default","exports"],"sources":["@wordpress/components/src/radio-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { RadioControlProps } from './types';\nimport { VStack } from '../v-stack';\nimport { StyledHelp } from '../base-control/styles/base-control-styles';\nimport { VisuallyHidden } from '../visually-hidden';\n\nfunction generateOptionDescriptionId( radioGroupId: string, index: number ) {\n\treturn `${ radioGroupId }-${ index }-option-description`;\n}\n\nfunction generateOptionId( radioGroupId: string, index: number ) {\n\treturn `${ radioGroupId }-${ index }`;\n}\n\nfunction generateHelpId( radioGroupId: string ) {\n\treturn `${ radioGroupId }__help`;\n}\n\n/**\n * Render a user interface to select the user type using radio inputs.\n *\n * ```jsx\n * import { RadioControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRadioControl = () => {\n * const [ option, setOption ] = useState( 'a' );\n *\n * return (\n * <RadioControl\n * label=\"User type\"\n * help=\"The type of the current user\"\n * selected={ option }\n * options={ [\n * { label: 'Author', value: 'a' },\n * { label: 'Editor', value: 'e' },\n * ] }\n * onChange={ ( value ) => setOption( value ) }\n * />\n * );\n * };\n * ```\n */\nexport function RadioControl(\n\tprops: WordPressComponentProps< RadioControlProps, 'input', false >\n) {\n\tconst {\n\t\tlabel,\n\t\tclassName,\n\t\tselected,\n\t\thelp,\n\t\tonChange,\n\t\thideLabelFromVision,\n\t\toptions = [],\n\t\tid: preferredId,\n\t\t...additionalProps\n\t} = props;\n\tconst id = useInstanceId(\n\t\tRadioControl,\n\t\t'inspector-radio-control',\n\t\tpreferredId\n\t);\n\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\tif ( ! options?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<fieldset\n\t\t\tid={ id }\n\t\t\tclassName={ clsx( className, 'components-radio-control' ) }\n\t\t\taria-describedby={ !! help ? generateHelpId( id ) : undefined }\n\t\t>\n\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t<VisuallyHidden as=\"legend\">{ label }</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t\t{ label }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t) }\n\n\t\t\t<VStack\n\t\t\t\tspacing={ 3 }\n\t\t\t\tclassName={ clsx( 'components-radio-control__group-wrapper', {\n\t\t\t\t\t'has-help': !! help,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ options.map( ( option, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ generateOptionId( id, index ) }\n\t\t\t\t\t\tclassName=\"components-radio-control__option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={ generateOptionId( id, index ) }\n\t\t\t\t\t\t\tclassName=\"components-radio-control__input\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ id }\n\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\t\tchecked={ option.value === selected }\n\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t!! option.description\n\t\t\t\t\t\t\t\t\t? generateOptionDescriptionId( id, index )\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tclassName=\"components-radio-control__label\"\n\t\t\t\t\t\t\thtmlFor={ generateOptionId( id, index ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t{ !! option.description ? (\n\t\t\t\t\t\t\t<StyledHelp\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tid={ generateOptionDescriptionId( id, index ) }\n\t\t\t\t\t\t\t\tclassName=\"components-radio-control__option-description\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ option.description }\n\t\t\t\t\t\t\t</StyledHelp>\n\t\t\t\t\t\t) : null }\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t\t{ !! help && (\n\t\t\t\t<StyledHelp\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tid={ generateHelpId( id ) }\n\t\t\t\t\tclassName=\"components-base-control__help\"\n\t\t\t\t>\n\t\t\t\t\t{ help }\n\t\t\t\t</StyledHelp>\n\t\t\t) }\n\t\t</fieldset>\n\t);\n}\n\nexport default RadioControl;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;A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K,CACR,CAAC,EACN,CAAC,CAAE4B,MAAM,CAACI,WAAW,gBACtB,IAAAxC,WAAA,CAAA4B,GAAA,EAAC9B,kBAAA,CAAA4C,UAAU;UACVC,uBAAuB;UACvB5B,EAAE,EAAGd,2BAA2B,CAAEc,EAAE,EAAEZ,KAAM,CAAG;UAC/CM,SAAS,EAAC,8CAA8C;UAAAkB,QAAA,EAEtDS,MAAM,CAACI;QAAW,CACT,CAAC,GACV,IAAI;MAAA,GAhCFpC,gBAAgB,CAAEW,EAAE,EAAEZ,KAAM,CAiC9B,CACJ;IAAC,CACI,CAAC,EACP,CAAC,CAAEQ,IAAI,iBACR,IAAAX,WAAA,CAAA4B,GAAA,EAAC9B,kBAAA,CAAA4C,UAAU;MACVC,uBAAuB;MACvB5B,EAAE,EAAGV,cAAc,CAAEU,EAAG,CAAG;MAC3BN,SAAS,EAAC,+BAA+B;MAAAkB,QAAA,EAEvChB;IAAI,CACK,CACZ;EAAA,CACQ,CAAC;AAEb;AAAC,IAAAiC,QAAA,GAAAC,OAAA,CAAAd,OAAA,GAEczB,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_compose","_baseControl","_vStack","_baseControlStyles","_visuallyHidden","_jsxRuntime","generateOptionDescriptionId","radioGroupId","index","generateOptionId","generateHelpId","RadioControl","props","label","className","selected","help","onChange","hideLabelFromVision","options","id","preferredId","additionalProps","useInstanceId","onChangeValue","event","target","value","length","jsxs","clsx","undefined","children","jsx","VisuallyHidden","as","default","VisualLabel","VStack","spacing","map","option","type","name","checked","description","htmlFor","StyledHelp","__nextHasNoMarginBottom","_default","exports"],"sources":["@wordpress/components/src/radio-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context';\nimport type { RadioControlProps } from './types';\nimport { VStack } from '../v-stack';\nimport { StyledHelp } from '../base-control/styles/base-control-styles';\nimport { VisuallyHidden } from '../visually-hidden';\n\nfunction generateOptionDescriptionId( radioGroupId: string, index: number ) {\n\treturn `${ radioGroupId }-${ index }-option-description`;\n}\n\nfunction generateOptionId( radioGroupId: string, index: number ) {\n\treturn `${ radioGroupId }-${ index }`;\n}\n\nfunction generateHelpId( radioGroupId: string ) {\n\treturn `${ radioGroupId }__help`;\n}\n\n/**\n * Render a user interface to select the user type using radio inputs.\n *\n * ```jsx\n * import { RadioControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRadioControl = () => {\n * const [ option, setOption ] = useState( 'a' );\n *\n * return (\n * <RadioControl\n * label=\"User type\"\n * help=\"The type of the current user\"\n * selected={ option }\n * options={ [\n * { label: 'Author', value: 'a' },\n * { label: 'Editor', value: 'e' },\n * ] }\n * onChange={ ( value ) => setOption( value ) }\n * />\n * );\n * };\n * ```\n */\nexport function RadioControl(\n\tprops: WordPressComponentProps< RadioControlProps, 'input', false >\n) {\n\tconst {\n\t\tlabel,\n\t\tclassName,\n\t\tselected,\n\t\thelp,\n\t\tonChange,\n\t\thideLabelFromVision,\n\t\toptions = [],\n\t\tid: preferredId,\n\t\t...additionalProps\n\t} = props;\n\tconst id = useInstanceId(\n\t\tRadioControl,\n\t\t'inspector-radio-control',\n\t\tpreferredId\n\t);\n\n\tconst onChangeValue = ( event: ChangeEvent< HTMLInputElement > ) =>\n\t\tonChange( event.target.value );\n\n\tif ( ! options?.length ) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<fieldset\n\t\t\tid={ id }\n\t\t\tclassName={ clsx( className, 'components-radio-control' ) }\n\t\t\taria-describedby={ !! help ? generateHelpId( id ) : undefined }\n\t\t>\n\t\t\t{ hideLabelFromVision ? (\n\t\t\t\t<VisuallyHidden as=\"legend\">{ label }</VisuallyHidden>\n\t\t\t) : (\n\t\t\t\t<BaseControl.VisualLabel as=\"legend\">\n\t\t\t\t\t{ label }\n\t\t\t\t</BaseControl.VisualLabel>\n\t\t\t) }\n\n\t\t\t<VStack\n\t\t\t\tspacing={ 3 }\n\t\t\t\tclassName={ clsx( 'components-radio-control__group-wrapper', {\n\t\t\t\t\t'has-help': !! help,\n\t\t\t\t} ) }\n\t\t\t>\n\t\t\t\t{ options.map( ( option, index ) => (\n\t\t\t\t\t<div\n\t\t\t\t\t\tkey={ generateOptionId( id, index ) }\n\t\t\t\t\t\tclassName=\"components-radio-control__option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\tid={ generateOptionId( id, index ) }\n\t\t\t\t\t\t\tclassName=\"components-radio-control__input\"\n\t\t\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t\t\tname={ id }\n\t\t\t\t\t\t\tvalue={ option.value }\n\t\t\t\t\t\t\tonChange={ onChangeValue }\n\t\t\t\t\t\t\tchecked={ option.value === selected }\n\t\t\t\t\t\t\taria-describedby={\n\t\t\t\t\t\t\t\t!! option.description\n\t\t\t\t\t\t\t\t\t? generateOptionDescriptionId( id, index )\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{ ...additionalProps }\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<label\n\t\t\t\t\t\t\tclassName=\"components-radio-control__label\"\n\t\t\t\t\t\t\thtmlFor={ generateOptionId( id, index ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ option.label }\n\t\t\t\t\t\t</label>\n\t\t\t\t\t\t{ !! option.description ? (\n\t\t\t\t\t\t\t<StyledHelp\n\t\t\t\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\t\t\t\tid={ generateOptionDescriptionId( id, index ) }\n\t\t\t\t\t\t\t\tclassName=\"components-radio-control__option-description\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ option.description }\n\t\t\t\t\t\t\t</StyledHelp>\n\t\t\t\t\t\t) : null }\n\t\t\t\t\t</div>\n\t\t\t\t) ) }\n\t\t\t</VStack>\n\t\t\t{ !! help && (\n\t\t\t\t<StyledHelp\n\t\t\t\t\t__nextHasNoMarginBottom\n\t\t\t\t\tid={ generateHelpId( id ) }\n\t\t\t\t\tclassName=\"components-base-control__help\"\n\t\t\t\t>\n\t\t\t\t\t{ help }\n\t\t\t\t</StyledHelp>\n\t\t\t) }\n\t\t</fieldset>\n\t);\n}\n\nexport default RadioControl;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAGA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,eAAA,GAAAL,OAAA;AAAoD,IAAAM,WAAA,GAAAN,OAAA;AAnBpD;AACA;AACA;;AAIA;AACA;AACA;;AAGA;AACA;AACA;;AAQA,SAASO,2BAA2BA,CAAEC,YAAoB,EAAEC,KAAa,EAAG;EAC3E,OAAO,GAAID,YAAY,IAAMC,KAAK,qBAAsB;AACzD;AAEA,SAASC,gBAAgBA,CAAEF,YAAoB,EAAEC,KAAa,EAAG;EAChE,OAAO,GAAID,YAAY,IAAMC,KAAK,EAAG;AACtC;AAEA,SAASE,cAAcA,CAAEH,YAAoB,EAAG;EAC/C,OAAO,GAAIA,YAAY,QAAS;AACjC;;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;AACO,SAASI,YAAYA,CAC3BC,KAAmE,EAClE;EACD,MAAM;IACLC,KAAK;IACLC,SAAS;IACTC,QAAQ;IACRC,IAAI;IACJC,QAAQ;IACRC,mBAAmB;IACnBC,OAAO,GAAG,EAAE;IACZC,EAAE,EAAEC,WAAW;IACf,GAAGC;EAC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Default","require","_jsxRuntime","RadioControl","onChange","selected","options","props","jsx","Fragment","children","map","option","index","default","label","onPress","value","_default","exports"],"sources":["@wordpress/components/src/radio-control/index.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport RadioCell from '../mobile/bottom-sheet/radio-cell';\n\nfunction RadioControl( { onChange, selected, options = [], ...props } ) {\n\treturn (\n\t\t<>\n\t\t\t{ options.map( ( option, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<RadioCell\n\t\t\t\t\t\tlabel={ option.label }\n\t\t\t\t\t\tonPress={ () => onChange( option.value ) }\n\t\t\t\t\t\tselected={ option.value === selected }\n\t\t\t\t\t\tkey={ `${ option.value }-${ index }` }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n}\n\nexport default RadioControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0D,IAAAC,WAAA,GAAAD,OAAA;AAH1D;AACA;AACA;;AAGA,SAASE,YAAYA,CAAE;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC,OAAO,GAAG,EAAE;EAAE,GAAGC;AAAM,CAAC,EAAG;EACvE,oBACC,IAAAL,WAAA,CAAAM,GAAA,EAAAN,WAAA,CAAAO,QAAA;IAAAC,QAAA,EACGJ,OAAO,CAACK,GAAG,CAAE,CAAEC,MAAM,EAAEC,KAAK,KAAM;MACnC,oBACC,IAAAX,WAAA,CAAAM,GAAA,EAACT,UAAA,CAAAe,OAAS;QACTC,KAAK,EAAGH,MAAM,CAACG,KAAO;QACtBC,OAAO,EAAGA,CAAA,KAAMZ,QAAQ,CAAEQ,MAAM,CAACK,KAAM,CAAG;QAC1CZ,QAAQ,EAAGO,MAAM,CAACK,KAAK,KAAKZ,QAAU;QAAA,GAEjCE;MAAK,GADH,GAAGK,MAAM,CAACK,KAAO,IAAIJ,KAAO,EAEnC,CAAC;IAEJ,CAAE;EAAC,CACF,CAAC;AAEL;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAEcX,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_radioCell","_interopRequireDefault","require","_jsxRuntime","RadioControl","onChange","selected","options","props","jsx","Fragment","children","map","option","index","default","label","onPress","value","_default","exports"],"sources":["@wordpress/components/src/radio-control/index.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport RadioCell from '../mobile/bottom-sheet/radio-cell';\n\nfunction RadioControl( { onChange, selected, options = [], ...props } ) {\n\treturn (\n\t\t<>\n\t\t\t{ options.map( ( option, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<RadioCell\n\t\t\t\t\t\tlabel={ option.label }\n\t\t\t\t\t\tonPress={ () => onChange( option.value ) }\n\t\t\t\t\t\tselected={ option.value === selected }\n\t\t\t\t\t\tkey={ `${ option.value }-${ index }` }\n\t\t\t\t\t\t{ ...props }\n\t\t\t\t\t/>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n}\n\nexport default RadioControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA0D,IAAAC,WAAA,GAAAD,OAAA;AAH1D;AACA;AACA;;AAGA,SAASE,YAAYA,CAAE;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC,OAAO,GAAG,EAAE;EAAE,GAAGC;AAAM,CAAC,EAAG;EACvE,oBACC,IAAAL,WAAA,CAAAM,GAAA,EAAAN,WAAA,CAAAO,QAAA;IAAAC,QAAA,EACGJ,OAAO,CAACK,GAAG,CAAE,CAAEC,MAAM,EAAEC,KAAK,KAAM;MACnC,oBACC,IAAAX,WAAA,CAAAM,GAAA,EAACT,UAAA,CAAAe,OAAS;QACTC,KAAK,EAAGH,MAAM,CAACG,KAAO;QACtBC,OAAO,EAAGA,CAAA,KAAMZ,QAAQ,CAAEQ,MAAM,CAACK,KAAM,CAAG;QAC1CZ,QAAQ,EAAGO,MAAM,CAACK,KAAK,KAAKZ,QAAU;QAAA,GAEjCE;MAAK,GADJ,GAAIK,MAAM,CAACK,KAAK,IAAMJ,KAAK,EAEjC,CAAC;IAEJ,CAAE;EAAC,CACF,CAAC;AAEL;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAL,OAAA,GAEcX,YAAY","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_compose","_baseControl","_button","_icon","_utils","_utils2","_math","_inputRange","_rail","_tooltip","_rangeControlStyles","_space","_jsxRuntime","noop","computeResetValue","resetFallbackValue","initialPosition","undefined","Number","isNaN","UnforwardedRangeControl","props","forwardedRef","__nextHasNoMarginBottom","afterIcon","allowReset","beforeIcon","className","color","colorProp","COLORS","theme","accent","currentInput","disabled","help","hideLabelFromVision","isShiftStepEnabled","label","marks","max","min","onBlur","onChange","onFocus","onMouseLeave","onMouseMove","railColor","renderTooltipContent","v","__next40pxDefaultSize","shiftStep","showTooltip","showTooltipProp","step","trackColor","value","valueProp","withInputField","otherProps","setValue","useControlledRangeValue","initial","isResetPendent","useRef","hasTooltip","hasInputField","setShowTooltip","useState","isFocused","setIsFocused","inputRef","isCurrentlyFocused","current","matches","isThumbFocused","isValueReset","currentValue","inputSliderValue","rangeFillValue","fillValue","fillValueOffset","clamp","classes","clsx","wrapperClasses","id","useInstanceId","describedBy","enableTooltip","isFinite","handleOnRangeChange","event","nextValue","parseFloat","target","handleOnChange","next","floatClamp","handleOnInputNumberBlur","handleOnReset","resetValue","handleShowTooltip","handleHideTooltip","handleOnBlur","handleOnFocus","offsetStyle","isRTL","jsx","default","__associatedWPComponentName","children","jsxs","Root","BeforeIconWrapper","icon","Wrapper","ref","useMergeRefs","Track","style","width","ThumbWrapper","Thumb","tooltipPosition","show","AfterIconWrapper","InputNumber","inputMode","size","__unstableInputWidth","space","ActionRightWrapper","accessibleWhenDisabled","variant","onClick","__","RangeControl","exports","forwardRef","_default"],"sources":["@wordpress/components/src/range-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent, FocusEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport {\n\tActionRightWrapper,\n\tAfterIconWrapper,\n\tBeforeIconWrapper,\n\tInputNumber,\n\tRoot,\n\tTrack,\n\tThumbWrapper,\n\tThumb,\n\tWrapper,\n} from './styles/range-control-styles';\n\nimport type { RangeControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { space } from '../utils/space';\n\nconst noop = () => {};\n\n/**\n * Computes the value that `RangeControl` should reset to when pressing\n * the reset button.\n */\nfunction computeResetValue( {\n\tresetFallbackValue,\n\tinitialPosition,\n}: Pick< RangeControlProps, 'resetFallbackValue' | 'initialPosition' > ) {\n\tif ( resetFallbackValue !== undefined ) {\n\t\treturn ! Number.isNaN( resetFallbackValue ) ? resetFallbackValue : null;\n\t}\n\n\tif ( initialPosition !== undefined ) {\n\t\treturn ! Number.isNaN( initialPosition ) ? initialPosition : null;\n\t}\n\n\treturn null;\n}\n\nfunction UnforwardedRangeControl(\n\tprops: WordPressComponentProps< RangeControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tafterIcon,\n\t\tallowReset = false,\n\t\tbeforeIcon,\n\t\tclassName,\n\t\tcolor: colorProp = COLORS.theme.accent,\n\t\tcurrentInput,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tinitialPosition,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmarks = false,\n\t\tmax = 100,\n\t\tmin = 0,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonFocus = noop,\n\t\tonMouseLeave = noop,\n\t\tonMouseMove = noop,\n\t\trailColor,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tresetFallbackValue,\n\t\t__next40pxDefaultSize = false,\n\t\tshiftStep = 10,\n\t\tshowTooltip: showTooltipProp,\n\t\tstep = 1,\n\t\ttrackColor,\n\t\tvalue: valueProp,\n\t\twithInputField = true,\n\t\t...otherProps\n\t} = props;\n\n\tconst [ value, setValue ] = useControlledRangeValue( {\n\t\tmin,\n\t\tmax,\n\t\tvalue: valueProp ?? null,\n\t\tinitial: initialPosition,\n\t} );\n\tconst isResetPendent = useRef( false );\n\n\tlet hasTooltip = showTooltipProp;\n\tlet hasInputField = withInputField;\n\n\tif ( step === 'any' ) {\n\t\t// The tooltip and number input field are hidden when the step is \"any\"\n\t\t// because the decimals get too lengthy to fit well.\n\t\thasTooltip = false;\n\t\thasInputField = false;\n\t}\n\n\tconst [ showTooltip, setShowTooltip ] = useState( hasTooltip );\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst isCurrentlyFocused = inputRef.current?.matches( ':focus' );\n\tconst isThumbFocused = ! disabled && isFocused;\n\n\tconst isValueReset = value === null;\n\tconst currentValue = value !== undefined ? value : currentInput;\n\n\tconst inputSliderValue = isValueReset ? '' : currentValue;\n\tconst rangeFillValue = isValueReset ? ( max - min ) / 2 + min : value;\n\n\tconst fillValue = isValueReset\n\t\t? 50\n\t\t: ( ( value - min ) / ( max - min ) ) * 100;\n\tconst fillValueOffset = `${ clamp( fillValue, 0, 100 ) }%`;\n\n\tconst classes = clsx( 'components-range-control', className );\n\n\tconst wrapperClasses = clsx(\n\t\t'components-range-control__wrapper',\n\t\t!! marks && 'is-marked'\n\t);\n\n\tconst id = useInstanceId(\n\t\tUnforwardedRangeControl,\n\t\t'inspector-range-control'\n\t);\n\tconst describedBy = !! help ? `${ id }__help` : undefined;\n\tconst enableTooltip = hasTooltip !== false && Number.isFinite( value );\n\n\tconst handleOnRangeChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = parseFloat( event.target.value );\n\t\tsetValue( nextValue );\n\t\tonChange( nextValue );\n\t};\n\n\tconst handleOnChange = ( next?: string ) => {\n\t\t// @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n\t\t// potentially receive a NaN when next is undefined.\n\t\tlet nextValue = parseFloat( next );\n\t\tsetValue( nextValue );\n\n\t\t/*\n\t\t * Calls onChange only when nextValue is numeric\n\t\t * otherwise may queue a reset for the blur event.\n\t\t */\n\t\tif ( ! isNaN( nextValue ) ) {\n\t\t\tif ( nextValue < min || nextValue > max ) {\n\t\t\t\tnextValue = floatClamp( nextValue, min, max ) as number;\n\t\t\t}\n\n\t\t\tonChange( nextValue );\n\t\t\tisResetPendent.current = false;\n\t\t} else if ( allowReset ) {\n\t\t\tisResetPendent.current = true;\n\t\t}\n\t};\n\n\tconst handleOnInputNumberBlur = () => {\n\t\tif ( isResetPendent.current ) {\n\t\t\thandleOnReset();\n\t\t\tisResetPendent.current = false;\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\t// Reset to `resetFallbackValue` if defined, otherwise set internal value\n\t\t// to `null` — which, if propagated to the `value` prop, will cause\n\t\t// the value to be reset to the `initialPosition` prop if defined.\n\t\tconst resetValue = Number.isNaN( resetFallbackValue )\n\t\t\t? null\n\t\t\t: resetFallbackValue ?? null;\n\n\t\tsetValue( resetValue );\n\n\t\t/**\n\t\t * Previously, this callback would always receive undefined as\n\t\t * an argument. This behavior is unexpected, specifically\n\t\t * when resetFallbackValue is defined.\n\t\t *\n\t\t * The value of undefined is not ideal. Passing it through\n\t\t * to internal <input /> elements would change it from a\n\t\t * controlled component to an uncontrolled component.\n\t\t *\n\t\t * For now, to minimize unexpected regressions, we're going to\n\t\t * preserve the undefined callback argument, except when a\n\t\t * resetFallbackValue is defined.\n\t\t */\n\t\tonChange( resetValue ?? undefined );\n\t};\n\n\tconst handleShowTooltip = () => setShowTooltip( true );\n\tconst handleHideTooltip = () => setShowTooltip( false );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused( false );\n\t\thandleHideTooltip();\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused( true );\n\t\thandleShowTooltip();\n\t};\n\n\tconst offsetStyle = {\n\t\t[ isRTL() ? 'right' : 'left' ]: fillValueOffset,\n\t};\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"RangeControl\"\n\t\t\tclassName={ classes }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ `${ id }` }\n\t\t\thelp={ help }\n\t\t>\n\t\t\t<Root\n\t\t\t\tclassName=\"components-range-control__root\"\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t{ beforeIcon && (\n\t\t\t\t\t<BeforeIconWrapper>\n\t\t\t\t\t\t<Icon icon={ beforeIcon } />\n\t\t\t\t\t</BeforeIconWrapper>\n\t\t\t\t) }\n\t\t\t\t<Wrapper\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t\tclassName={ wrapperClasses }\n\t\t\t\t\tcolor={ colorProp }\n\t\t\t\t\tmarks={ !! marks }\n\t\t\t\t>\n\t\t\t\t\t<InputRange\n\t\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t\tclassName=\"components-range-control__slider\"\n\t\t\t\t\t\tdescribedBy={ describedBy }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tid={ `${ id }` }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\t\tonChange={ handleOnRangeChange }\n\t\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\t\tonMouseMove={ onMouseMove }\n\t\t\t\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\t\t\t\tref={ useMergeRefs( [ inputRef, forwardedRef ] ) }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ inputSliderValue ?? undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeRail\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tmarks={ marks }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\trailColor={ railColor }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ rangeFillValue }\n\t\t\t\t\t/>\n\t\t\t\t\t<Track\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tclassName=\"components-range-control__track\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tstyle={ { width: fillValueOffset } }\n\t\t\t\t\t\ttrackColor={ trackColor }\n\t\t\t\t\t/>\n\t\t\t\t\t<ThumbWrapper\n\t\t\t\t\t\tclassName=\"components-range-control__thumb-wrapper\"\n\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Thumb\n\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\tisFocused={ isThumbFocused }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ThumbWrapper>\n\t\t\t\t\t{ enableTooltip && (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tclassName=\"components-range-control__tooltip\"\n\t\t\t\t\t\t\tinputRef={ inputRef }\n\t\t\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\t\t\trenderTooltipContent={ renderTooltipContent }\n\t\t\t\t\t\t\tshow={ isCurrentlyFocused || showTooltip }\n\t\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Wrapper>\n\t\t\t\t{ afterIcon && (\n\t\t\t\t\t<AfterIconWrapper>\n\t\t\t\t\t\t<Icon icon={ afterIcon } />\n\t\t\t\t\t</AfterIconWrapper>\n\t\t\t\t) }\n\t\t\t\t{ hasInputField && (\n\t\t\t\t\t<InputNumber\n\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\tclassName=\"components-range-control__number\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tinputMode=\"decimal\"\n\t\t\t\t\t\tisShiftStepEnabled={ isShiftStepEnabled }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnInputNumberBlur }\n\t\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\t\tshiftStep={ shiftStep }\n\t\t\t\t\t\tsize={\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t? '__unstable-large'\n\t\t\t\t\t\t\t\t: 'default'\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t\t\t__next40pxDefaultSize ? space( 20 ) : space( 16 )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if the `null` value is necessary\n\t\t\t\t\t\tvalue={ inputSliderValue }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ allowReset && (\n\t\t\t\t\t<ActionRightWrapper>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-range-control__reset\"\n\t\t\t\t\t\t\t// If the RangeControl itself is disabled, the reset button shouldn't be in the tab sequence.\n\t\t\t\t\t\t\taccessibleWhenDisabled={ ! disabled }\n\t\t\t\t\t\t\t// The reset button should be disabled if RangeControl itself is disabled,\n\t\t\t\t\t\t\t// or if the current `value` is equal to the value that would be currently\n\t\t\t\t\t\t\t// assigned when clicking the button.\n\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\tdisabled ||\n\t\t\t\t\t\t\t\tvalue ===\n\t\t\t\t\t\t\t\t\tcomputeResetValue( {\n\t\t\t\t\t\t\t\t\t\tresetFallbackValue,\n\t\t\t\t\t\t\t\t\t\tinitialPosition,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</ActionRightWrapper>\n\t\t\t\t) }\n\t\t\t</Root>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ isChecked, setChecked ] = useState( true );\n * return (\n * <RangeControl\n * __nextHasNoMarginBottom\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={50}\n * label=\"Opacity\"\n * max={100}\n * min={0}\n * onChange={() => {}}\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef( UnforwardedRangeControl );\n\nexport default RangeControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,O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G,IAAAiF,YAAK,EAAE,EAAG,CAAC,GAAG,IAAAA,YAAK,EAAE,EAAG,CAChD;QACD7E,IAAI,EAAGA;QACP;QAAA;QACAE,KAAK,EAAGsB;MAAkB,CAC1B,CACD,EACCrD,UAAU,iBACX,IAAAb,WAAA,CAAAgG,GAAA,EAAClG,mBAAA,CAAA0H,kBAAkB;QAAArB,QAAA,eAClB,IAAAnG,WAAA,CAAAgG,GAAA,EAAC1G,OAAA,CAAA2G,OAAM;UACNlF,SAAS,EAAC;UACV;UAAA;UACA0G,sBAAsB,EAAG,CAAEnG;UAC3B;UACA;UACA;UAAA;UACAA,QAAQ,EACPA,QAAQ,IACRsB,KAAK,KACJ1C,iBAAiB,CAAE;YAClBC,kBAAkB;YAClBC;UACD,CAAE,CACH;UACDsH,OAAO,EAAC,WAAW;UACnBL,IAAI,EAAC,OAAO;UACZM,OAAO,EAAGnC,aAAe;UAAAW,QAAA,EAEvB,IAAAyB,QAAE,EAAE,OAAQ;QAAC,CACR;MAAC,CACU,CACpB;IAAA,CACI;EAAC,CACK,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG,IAAAE,mBAAU,EAAEvH,uBAAwB,CAAC;AAAC,IAAAwH,QAAA,GAAAF,OAAA,CAAA7B,OAAA,GAEnD4B,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_i18n","_element","_compose","_baseControl","_button","_icon","_utils","_utils2","_math","_inputRange","_rail","_tooltip","_rangeControlStyles","_space","_jsxRuntime","noop","computeResetValue","resetFallbackValue","initialPosition","undefined","Number","isNaN","UnforwardedRangeControl","props","forwardedRef","__nextHasNoMarginBottom","afterIcon","allowReset","beforeIcon","className","color","colorProp","COLORS","theme","accent","currentInput","disabled","help","hideLabelFromVision","isShiftStepEnabled","label","marks","max","min","onBlur","onChange","onFocus","onMouseLeave","onMouseMove","railColor","renderTooltipContent","v","__next40pxDefaultSize","shiftStep","showTooltip","showTooltipProp","step","trackColor","value","valueProp","withInputField","otherProps","setValue","useControlledRangeValue","initial","isResetPendent","useRef","hasTooltip","hasInputField","setShowTooltip","useState","isFocused","setIsFocused","inputRef","isCurrentlyFocused","current","matches","isThumbFocused","isValueReset","currentValue","inputSliderValue","rangeFillValue","fillValue","fillValueOffset","clamp","classes","clsx","wrapperClasses","id","useInstanceId","describedBy","enableTooltip","isFinite","handleOnRangeChange","event","nextValue","parseFloat","target","handleOnChange","next","floatClamp","handleOnInputNumberBlur","handleOnReset","resetValue","handleShowTooltip","handleHideTooltip","handleOnBlur","handleOnFocus","offsetStyle","isRTL","jsx","default","__associatedWPComponentName","children","jsxs","Root","BeforeIconWrapper","icon","Wrapper","ref","useMergeRefs","Track","style","width","ThumbWrapper","Thumb","tooltipPosition","show","AfterIconWrapper","InputNumber","inputMode","size","__unstableInputWidth","space","ActionRightWrapper","accessibleWhenDisabled","variant","onClick","__","RangeControl","exports","forwardRef","_default"],"sources":["@wordpress/components/src/range-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ChangeEvent, FocusEvent, ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { __, isRTL } from '@wordpress/i18n';\nimport { useRef, useState, forwardRef } from '@wordpress/element';\nimport { useInstanceId, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport Button from '../button';\nimport Icon from '../icon';\nimport { COLORS } from '../utils';\nimport { floatClamp, useControlledRangeValue } from './utils';\nimport { clamp } from '../utils/math';\nimport InputRange from './input-range';\nimport RangeRail from './rail';\nimport SimpleTooltip from './tooltip';\nimport {\n\tActionRightWrapper,\n\tAfterIconWrapper,\n\tBeforeIconWrapper,\n\tInputNumber,\n\tRoot,\n\tTrack,\n\tThumbWrapper,\n\tThumb,\n\tWrapper,\n} from './styles/range-control-styles';\n\nimport type { RangeControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\nimport { space } from '../utils/space';\n\nconst noop = () => {};\n\n/**\n * Computes the value that `RangeControl` should reset to when pressing\n * the reset button.\n */\nfunction computeResetValue( {\n\tresetFallbackValue,\n\tinitialPosition,\n}: Pick< RangeControlProps, 'resetFallbackValue' | 'initialPosition' > ) {\n\tif ( resetFallbackValue !== undefined ) {\n\t\treturn ! Number.isNaN( resetFallbackValue ) ? resetFallbackValue : null;\n\t}\n\n\tif ( initialPosition !== undefined ) {\n\t\treturn ! Number.isNaN( initialPosition ) ? initialPosition : null;\n\t}\n\n\treturn null;\n}\n\nfunction UnforwardedRangeControl(\n\tprops: WordPressComponentProps< RangeControlProps, 'input', false >,\n\tforwardedRef: ForwardedRef< HTMLInputElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom = false,\n\t\tafterIcon,\n\t\tallowReset = false,\n\t\tbeforeIcon,\n\t\tclassName,\n\t\tcolor: colorProp = COLORS.theme.accent,\n\t\tcurrentInput,\n\t\tdisabled = false,\n\t\thelp,\n\t\thideLabelFromVision = false,\n\t\tinitialPosition,\n\t\tisShiftStepEnabled = true,\n\t\tlabel,\n\t\tmarks = false,\n\t\tmax = 100,\n\t\tmin = 0,\n\t\tonBlur = noop,\n\t\tonChange = noop,\n\t\tonFocus = noop,\n\t\tonMouseLeave = noop,\n\t\tonMouseMove = noop,\n\t\trailColor,\n\t\trenderTooltipContent = ( v ) => v,\n\t\tresetFallbackValue,\n\t\t__next40pxDefaultSize = false,\n\t\tshiftStep = 10,\n\t\tshowTooltip: showTooltipProp,\n\t\tstep = 1,\n\t\ttrackColor,\n\t\tvalue: valueProp,\n\t\twithInputField = true,\n\t\t...otherProps\n\t} = props;\n\n\tconst [ value, setValue ] = useControlledRangeValue( {\n\t\tmin,\n\t\tmax,\n\t\tvalue: valueProp ?? null,\n\t\tinitial: initialPosition,\n\t} );\n\tconst isResetPendent = useRef( false );\n\n\tlet hasTooltip = showTooltipProp;\n\tlet hasInputField = withInputField;\n\n\tif ( step === 'any' ) {\n\t\t// The tooltip and number input field are hidden when the step is \"any\"\n\t\t// because the decimals get too lengthy to fit well.\n\t\thasTooltip = false;\n\t\thasInputField = false;\n\t}\n\n\tconst [ showTooltip, setShowTooltip ] = useState( hasTooltip );\n\tconst [ isFocused, setIsFocused ] = useState( false );\n\n\tconst inputRef = useRef< HTMLInputElement >();\n\tconst isCurrentlyFocused = inputRef.current?.matches( ':focus' );\n\tconst isThumbFocused = ! disabled && isFocused;\n\n\tconst isValueReset = value === null;\n\tconst currentValue = value !== undefined ? value : currentInput;\n\n\tconst inputSliderValue = isValueReset ? '' : currentValue;\n\tconst rangeFillValue = isValueReset ? ( max - min ) / 2 + min : value;\n\n\tconst fillValue = isValueReset\n\t\t? 50\n\t\t: ( ( value - min ) / ( max - min ) ) * 100;\n\tconst fillValueOffset = `${ clamp( fillValue, 0, 100 ) }%`;\n\n\tconst classes = clsx( 'components-range-control', className );\n\n\tconst wrapperClasses = clsx(\n\t\t'components-range-control__wrapper',\n\t\t!! marks && 'is-marked'\n\t);\n\n\tconst id = useInstanceId(\n\t\tUnforwardedRangeControl,\n\t\t'inspector-range-control'\n\t);\n\tconst describedBy = !! help ? `${ id }__help` : undefined;\n\tconst enableTooltip = hasTooltip !== false && Number.isFinite( value );\n\n\tconst handleOnRangeChange = ( event: ChangeEvent< HTMLInputElement > ) => {\n\t\tconst nextValue = parseFloat( event.target.value );\n\t\tsetValue( nextValue );\n\t\tonChange( nextValue );\n\t};\n\n\tconst handleOnChange = ( next?: string ) => {\n\t\t// @ts-expect-error TODO: Investigate if it's problematic for setValue() to\n\t\t// potentially receive a NaN when next is undefined.\n\t\tlet nextValue = parseFloat( next );\n\t\tsetValue( nextValue );\n\n\t\t/*\n\t\t * Calls onChange only when nextValue is numeric\n\t\t * otherwise may queue a reset for the blur event.\n\t\t */\n\t\tif ( ! isNaN( nextValue ) ) {\n\t\t\tif ( nextValue < min || nextValue > max ) {\n\t\t\t\tnextValue = floatClamp( nextValue, min, max ) as number;\n\t\t\t}\n\n\t\t\tonChange( nextValue );\n\t\t\tisResetPendent.current = false;\n\t\t} else if ( allowReset ) {\n\t\t\tisResetPendent.current = true;\n\t\t}\n\t};\n\n\tconst handleOnInputNumberBlur = () => {\n\t\tif ( isResetPendent.current ) {\n\t\t\thandleOnReset();\n\t\t\tisResetPendent.current = false;\n\t\t}\n\t};\n\n\tconst handleOnReset = () => {\n\t\t// Reset to `resetFallbackValue` if defined, otherwise set internal value\n\t\t// to `null` — which, if propagated to the `value` prop, will cause\n\t\t// the value to be reset to the `initialPosition` prop if defined.\n\t\tconst resetValue = Number.isNaN( resetFallbackValue )\n\t\t\t? null\n\t\t\t: resetFallbackValue ?? null;\n\n\t\tsetValue( resetValue );\n\n\t\t/**\n\t\t * Previously, this callback would always receive undefined as\n\t\t * an argument. This behavior is unexpected, specifically\n\t\t * when resetFallbackValue is defined.\n\t\t *\n\t\t * The value of undefined is not ideal. Passing it through\n\t\t * to internal <input /> elements would change it from a\n\t\t * controlled component to an uncontrolled component.\n\t\t *\n\t\t * For now, to minimize unexpected regressions, we're going to\n\t\t * preserve the undefined callback argument, except when a\n\t\t * resetFallbackValue is defined.\n\t\t */\n\t\tonChange( resetValue ?? undefined );\n\t};\n\n\tconst handleShowTooltip = () => setShowTooltip( true );\n\tconst handleHideTooltip = () => setShowTooltip( false );\n\n\tconst handleOnBlur = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonBlur( event );\n\t\tsetIsFocused( false );\n\t\thandleHideTooltip();\n\t};\n\n\tconst handleOnFocus = ( event: FocusEvent< HTMLInputElement > ) => {\n\t\tonFocus( event );\n\t\tsetIsFocused( true );\n\t\thandleShowTooltip();\n\t};\n\n\tconst offsetStyle = {\n\t\t[ isRTL() ? 'right' : 'left' ]: fillValueOffset,\n\t};\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t__associatedWPComponentName=\"RangeControl\"\n\t\t\tclassName={ classes }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ `${ id }` }\n\t\t\thelp={ help }\n\t\t>\n\t\t\t<Root\n\t\t\t\tclassName=\"components-range-control__root\"\n\t\t\t\t__next40pxDefaultSize={ __next40pxDefaultSize }\n\t\t\t>\n\t\t\t\t{ beforeIcon && (\n\t\t\t\t\t<BeforeIconWrapper>\n\t\t\t\t\t\t<Icon icon={ beforeIcon } />\n\t\t\t\t\t</BeforeIconWrapper>\n\t\t\t\t) }\n\t\t\t\t<Wrapper\n\t\t\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\t\t\tclassName={ wrapperClasses }\n\t\t\t\t\tcolor={ colorProp }\n\t\t\t\t\tmarks={ !! marks }\n\t\t\t\t>\n\t\t\t\t\t<InputRange\n\t\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\t\tclassName=\"components-range-control__slider\"\n\t\t\t\t\t\tdescribedBy={ describedBy }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tid={ `${ id }` }\n\t\t\t\t\t\tlabel={ label }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnBlur }\n\t\t\t\t\t\tonChange={ handleOnRangeChange }\n\t\t\t\t\t\tonFocus={ handleOnFocus }\n\t\t\t\t\t\tonMouseMove={ onMouseMove }\n\t\t\t\t\t\tonMouseLeave={ onMouseLeave }\n\t\t\t\t\t\tref={ useMergeRefs( [ inputRef, forwardedRef ] ) }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ inputSliderValue ?? undefined }\n\t\t\t\t\t/>\n\t\t\t\t\t<RangeRail\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tmarks={ marks }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\trailColor={ railColor }\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\tvalue={ rangeFillValue }\n\t\t\t\t\t/>\n\t\t\t\t\t<Track\n\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\tclassName=\"components-range-control__track\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tstyle={ { width: fillValueOffset } }\n\t\t\t\t\t\ttrackColor={ trackColor }\n\t\t\t\t\t/>\n\t\t\t\t\t<ThumbWrapper\n\t\t\t\t\t\tclassName=\"components-range-control__thumb-wrapper\"\n\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t>\n\t\t\t\t\t\t<Thumb\n\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\tisFocused={ isThumbFocused }\n\t\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</ThumbWrapper>\n\t\t\t\t\t{ enableTooltip && (\n\t\t\t\t\t\t<SimpleTooltip\n\t\t\t\t\t\t\tclassName=\"components-range-control__tooltip\"\n\t\t\t\t\t\t\tinputRef={ inputRef }\n\t\t\t\t\t\t\ttooltipPosition=\"bottom\"\n\t\t\t\t\t\t\trenderTooltipContent={ renderTooltipContent }\n\t\t\t\t\t\t\tshow={ isCurrentlyFocused || showTooltip }\n\t\t\t\t\t\t\tstyle={ offsetStyle }\n\t\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</Wrapper>\n\t\t\t\t{ afterIcon && (\n\t\t\t\t\t<AfterIconWrapper>\n\t\t\t\t\t\t<Icon icon={ afterIcon } />\n\t\t\t\t\t</AfterIconWrapper>\n\t\t\t\t) }\n\t\t\t\t{ hasInputField && (\n\t\t\t\t\t<InputNumber\n\t\t\t\t\t\taria-label={ label }\n\t\t\t\t\t\tclassName=\"components-range-control__number\"\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tinputMode=\"decimal\"\n\t\t\t\t\t\tisShiftStepEnabled={ isShiftStepEnabled }\n\t\t\t\t\t\tmax={ max }\n\t\t\t\t\t\tmin={ min }\n\t\t\t\t\t\tonBlur={ handleOnInputNumberBlur }\n\t\t\t\t\t\tonChange={ handleOnChange }\n\t\t\t\t\t\tshiftStep={ shiftStep }\n\t\t\t\t\t\tsize={\n\t\t\t\t\t\t\t__next40pxDefaultSize\n\t\t\t\t\t\t\t\t? '__unstable-large'\n\t\t\t\t\t\t\t\t: 'default'\n\t\t\t\t\t\t}\n\t\t\t\t\t\t__unstableInputWidth={\n\t\t\t\t\t\t\t__next40pxDefaultSize ? space( 20 ) : space( 16 )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstep={ step }\n\t\t\t\t\t\t// @ts-expect-error TODO: Investigate if the `null` value is necessary\n\t\t\t\t\t\tvalue={ inputSliderValue }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t\t{ allowReset && (\n\t\t\t\t\t<ActionRightWrapper>\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tclassName=\"components-range-control__reset\"\n\t\t\t\t\t\t\t// If the RangeControl itself is disabled, the reset button shouldn't be in the tab sequence.\n\t\t\t\t\t\t\taccessibleWhenDisabled={ ! disabled }\n\t\t\t\t\t\t\t// The reset button should be disabled if RangeControl itself is disabled,\n\t\t\t\t\t\t\t// or if the current `value` is equal to the value that would be currently\n\t\t\t\t\t\t\t// assigned when clicking the button.\n\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\tdisabled ||\n\t\t\t\t\t\t\t\tvalue ===\n\t\t\t\t\t\t\t\t\tcomputeResetValue( {\n\t\t\t\t\t\t\t\t\t\tresetFallbackValue,\n\t\t\t\t\t\t\t\t\t\tinitialPosition,\n\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\tonClick={ handleOnReset }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</ActionRightWrapper>\n\t\t\t\t) }\n\t\t\t</Root>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * RangeControls are used to make selections from a range of incremental values.\n *\n * ```jsx\n * import { RangeControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyRangeControl = () => {\n * const [ isChecked, setChecked ] = useState( true );\n * return (\n * <RangeControl\n * __nextHasNoMarginBottom\n * help=\"Please select how transparent you would like this.\"\n * initialPosition={50}\n * label=\"Opacity\"\n * max={100}\n * min={0}\n * onChange={() => {}}\n * />\n * );\n * };\n * ```\n */\nexport const RangeControl = forwardRef( UnforwardedRangeControl );\n\nexport default RangeControl;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAKA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,OAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,KAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAX,sBAAA,CAAAC,OAAA;AACA,IAAAW,KAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,QAAA,GAAAb,sBAAA,CAAAC,OAAA;AACA,IAAAa,mBAAA,GAAAb,OAAA;AAcA,IAAAc,MAAA,GAAAd,OAAA;AAAuC,IAAAe,WAAA,GAAAf,OAAA;AAvCvC;AACA;AACA;;AAIA;AACA;AACA;;AA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