@wordpress/components 25.6.1 → 26.0.1-next.5a1d1283.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 (526) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/CONTRIBUTING.md +1 -1
  3. package/README.md +3 -8
  4. package/build/color-picker/hsv-color-picker.native.js +92 -0
  5. package/build/color-picker/hsv-color-picker.native.js.map +1 -0
  6. package/build/color-picker/hue-picker.native.js +195 -0
  7. package/build/color-picker/hue-picker.native.js.map +1 -0
  8. package/build/color-picker/index.native.js +3 -2
  9. package/build/color-picker/index.native.js.map +1 -1
  10. package/build/color-picker/saturation-picker.native.js +178 -0
  11. package/build/color-picker/saturation-picker.native.js.map +1 -0
  12. package/build/item-group/item/component.js +0 -1
  13. package/build/item-group/item/component.js.map +1 -1
  14. package/build/item-group/item-group/component.js +0 -1
  15. package/build/item-group/item-group/component.js.map +1 -1
  16. package/build/menu-item/index.js +6 -4
  17. package/build/menu-item/index.js.map +1 -1
  18. package/build/menu-item/types.js.map +1 -1
  19. package/build/mobile/link-settings/link-settings-navigation.native.js +1 -1
  20. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  21. package/build/navigation/index.js +0 -1
  22. package/build/navigation/index.js.map +1 -1
  23. package/build/navigator/navigator-provider/component.js +1 -2
  24. package/build/navigator/navigator-provider/component.js.map +1 -1
  25. package/build/palette-edit/styles.js +10 -10
  26. package/build/palette-edit/styles.js.map +1 -1
  27. package/build/popover/index.js +38 -75
  28. package/build/popover/index.js.map +1 -1
  29. package/build/popover/overlay-middlewares.js.map +1 -1
  30. package/build/popover/types.js.map +1 -1
  31. package/build/popover/utils.js +5 -50
  32. package/build/popover/utils.js.map +1 -1
  33. package/build/progress-bar/styles.js +6 -5
  34. package/build/progress-bar/styles.js.map +1 -1
  35. package/build/search-control/index.native.js +27 -24
  36. package/build/search-control/index.native.js.map +1 -1
  37. package/build/shortcut/index.js +13 -0
  38. package/build/shortcut/index.js.map +1 -1
  39. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +3 -1
  40. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  41. package/build/slot-fill/bubbles-virtually/slot.js +14 -8
  42. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  43. package/build/slot-fill/index.js +5 -0
  44. package/build/slot-fill/index.js.map +1 -1
  45. package/build/spinner/index.js +0 -1
  46. package/build/spinner/index.js.map +1 -1
  47. package/build/theme/index.js +0 -1
  48. package/build/theme/index.js.map +1 -1
  49. package/build/tools-panel/tools-panel/component.js +0 -1
  50. package/build/tools-panel/tools-panel/component.js.map +1 -1
  51. package/build/tools-panel/tools-panel-header/component.js +5 -1
  52. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  53. package/build/tree-select/index.js +0 -1
  54. package/build/tree-select/index.js.map +1 -1
  55. package/build/unit-control/index.js +0 -1
  56. package/build/unit-control/index.js.map +1 -1
  57. package/build/utils/hooks/use-cx.js +2 -1
  58. package/build/utils/hooks/use-cx.js.map +1 -1
  59. package/build/view/component.js +1 -2
  60. package/build/view/component.js.map +1 -1
  61. package/build-module/color-picker/hsv-color-picker.native.js +84 -0
  62. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -0
  63. package/build-module/color-picker/hue-picker.native.js +185 -0
  64. package/build-module/color-picker/hue-picker.native.js.map +1 -0
  65. package/build-module/color-picker/index.native.js +2 -1
  66. package/build-module/color-picker/index.native.js.map +1 -1
  67. package/build-module/color-picker/saturation-picker.native.js +168 -0
  68. package/build-module/color-picker/saturation-picker.native.js.map +1 -0
  69. package/build-module/item-group/item/component.js +0 -1
  70. package/build-module/item-group/item/component.js.map +1 -1
  71. package/build-module/item-group/item-group/component.js +0 -1
  72. package/build-module/item-group/item-group/component.js.map +1 -1
  73. package/build-module/menu-item/index.js +4 -2
  74. package/build-module/menu-item/index.js.map +1 -1
  75. package/build-module/menu-item/types.js.map +1 -1
  76. package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -1
  77. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  78. package/build-module/navigation/index.js +0 -1
  79. package/build-module/navigation/index.js.map +1 -1
  80. package/build-module/navigator/navigator-provider/component.js +1 -2
  81. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  82. package/build-module/palette-edit/styles.js +10 -10
  83. package/build-module/palette-edit/styles.js.map +1 -1
  84. package/build-module/popover/index.js +42 -79
  85. package/build-module/popover/index.js.map +1 -1
  86. package/build-module/popover/overlay-middlewares.js.map +1 -1
  87. package/build-module/popover/types.js.map +1 -1
  88. package/build-module/popover/utils.js +4 -47
  89. package/build-module/popover/utils.js.map +1 -1
  90. package/build-module/progress-bar/styles.js +6 -5
  91. package/build-module/progress-bar/styles.js.map +1 -1
  92. package/build-module/search-control/index.native.js +28 -25
  93. package/build-module/search-control/index.native.js.map +1 -1
  94. package/build-module/shortcut/index.js +13 -0
  95. package/build-module/shortcut/index.js.map +1 -1
  96. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +3 -1
  97. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  98. package/build-module/slot-fill/bubbles-virtually/slot.js +14 -8
  99. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  100. package/build-module/slot-fill/index.js +6 -1
  101. package/build-module/slot-fill/index.js.map +1 -1
  102. package/build-module/spinner/index.js +0 -1
  103. package/build-module/spinner/index.js.map +1 -1
  104. package/build-module/theme/index.js +0 -1
  105. package/build-module/theme/index.js.map +1 -1
  106. package/build-module/tools-panel/tools-panel/component.js +0 -1
  107. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  108. package/build-module/tools-panel/tools-panel-header/component.js +5 -1
  109. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  110. package/build-module/tree-select/index.js +0 -1
  111. package/build-module/tree-select/index.js.map +1 -1
  112. package/build-module/unit-control/index.js +0 -1
  113. package/build-module/unit-control/index.js.map +1 -1
  114. package/build-module/utils/hooks/use-cx.js +2 -1
  115. package/build-module/utils/hooks/use-cx.js.map +1 -1
  116. package/build-module/view/component.js +1 -2
  117. package/build-module/view/component.js.map +1 -1
  118. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  119. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  120. package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
  121. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  122. package/build-types/animate/stories/index.story.d.ts +9 -9
  123. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  124. package/build-types/base-control/stories/index.story.d.ts +4 -4
  125. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  126. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  127. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  128. package/build-types/border-control/stories/index.story.d.ts +2 -2
  129. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  130. package/build-types/button/stories/e2e/index.story.d.ts +3 -3
  131. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  132. package/build-types/button/stories/index.story.d.ts +10 -9
  133. package/build-types/button/stories/index.story.d.ts.map +1 -1
  134. package/build-types/button-group/stories/index.story.d.ts +3 -3
  135. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  136. package/build-types/card/stories/index.story.d.ts +2 -2
  137. package/build-types/card/stories/index.story.d.ts.map +1 -1
  138. package/build-types/checkbox-control/stories/index.story.d.ts +4 -4
  139. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  140. package/build-types/circular-option-picker/stories/index.story.d.ts +2 -2
  141. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  142. package/build-types/color-indicator/stories/index.story.d.ts +3 -3
  143. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  144. package/build-types/color-palette/stories/index.story.d.ts +3 -3
  145. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  146. package/build-types/color-palette/styles.d.ts +1 -1
  147. package/build-types/color-picker/stories/index.story.d.ts +2 -2
  148. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  149. package/build-types/combobox-control/stories/index.story.d.ts +2 -2
  150. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  151. package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
  152. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  153. package/build-types/date-time/date/styles.d.ts +1 -1
  154. package/build-types/date-time/stories/date-time.story.d.ts +5 -5
  155. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  156. package/build-types/date-time/stories/date.story.d.ts +5 -5
  157. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  158. package/build-types/date-time/stories/time.story.d.ts +3 -3
  159. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  160. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  161. package/build-types/disabled/stories/index.story.d.ts +4 -4
  162. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  163. package/build-types/divider/stories/index.story.d.ts +5 -5
  164. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  165. package/build-types/draggable/stories/index.story.d.ts +4 -4
  166. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  167. package/build-types/drop-zone/stories/index.story.d.ts +2 -2
  168. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  169. package/build-types/dropdown/stories/index.story.d.ts +6 -5
  170. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  171. package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
  172. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  173. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +2 -2
  174. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  175. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
  176. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  177. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +2 -2
  178. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  179. package/build-types/elevation/stories/index.story.d.ts +5 -5
  180. package/build-types/elevation/stories/index.story.d.ts.map +1 -1
  181. package/build-types/external-link/stories/index.story.d.ts +3 -3
  182. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  183. package/build-types/flex/stories/index.story.d.ts +4 -4
  184. package/build-types/flex/stories/index.story.d.ts.map +1 -1
  185. package/build-types/focal-point-picker/stories/index.story.d.ts +2 -2
  186. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  187. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +2 -2
  188. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  189. package/build-types/font-size-picker/stories/index.story.d.ts +8 -8
  190. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  191. package/build-types/form-file-upload/stories/index.story.d.ts +2 -2
  192. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  193. package/build-types/form-toggle/stories/index.story.d.ts +3 -3
  194. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  195. package/build-types/form-token-field/stories/index.story.d.ts +7 -7
  196. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  197. package/build-types/gradient-picker/stories/index.story.d.ts +2 -2
  198. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  199. package/build-types/grid/stories/index.story.d.ts +3 -3
  200. package/build-types/grid/stories/index.story.d.ts.map +1 -1
  201. package/build-types/guide/stories/index.story.d.ts +2 -2
  202. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  203. package/build-types/h-stack/stories/e2e/index.story.d.ts +3 -3
  204. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
  205. package/build-types/h-stack/stories/index.story.d.ts +3 -3
  206. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  207. package/build-types/heading/stories/index.story.d.ts +3 -3
  208. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  209. package/build-types/icon/stories/index.story.d.ts +4 -4
  210. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  211. package/build-types/input-control/stories/index.story.d.ts +2 -2
  212. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  213. package/build-types/item-group/item/component.d.ts +0 -1
  214. package/build-types/item-group/item/component.d.ts.map +1 -1
  215. package/build-types/item-group/item-group/component.d.ts +0 -1
  216. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  217. package/build-types/item-group/stories/index.story.d.ts +6 -6
  218. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  219. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
  220. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  221. package/build-types/menu-group/stories/index.story.d.ts +3 -3
  222. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  223. package/build-types/menu-item/index.d.ts +5 -58
  224. package/build-types/menu-item/index.d.ts.map +1 -1
  225. package/build-types/menu-item/stories/index.story.d.ts +74 -0
  226. package/build-types/menu-item/stories/index.story.d.ts.map +1 -0
  227. package/build-types/menu-item/types.d.ts +3 -2
  228. package/build-types/menu-item/types.d.ts.map +1 -1
  229. package/build-types/menu-items-choice/stories/index.story.d.ts +3 -3
  230. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  231. package/build-types/modal/stories/index.story.d.ts +4 -4
  232. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  233. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +3 -3
  234. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  235. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +3 -3
  236. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  237. package/build-types/navigation/index.d.ts +0 -1
  238. package/build-types/navigation/index.d.ts.map +1 -1
  239. package/build-types/navigation/stories/index.story.d.ts +2 -2
  240. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  241. package/build-types/navigation/stories/utils/controlled-state.d.ts +2 -2
  242. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
  243. package/build-types/navigation/stories/utils/default.d.ts +2 -2
  244. package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
  245. package/build-types/navigation/stories/utils/group.d.ts +2 -2
  246. package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
  247. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +2 -2
  248. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
  249. package/build-types/navigation/stories/utils/more-examples.d.ts +2 -2
  250. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
  251. package/build-types/navigation/stories/utils/search.d.ts +2 -2
  252. package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
  253. package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
  254. package/build-types/navigator/navigator-provider/component.d.ts +0 -1
  255. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  256. package/build-types/navigator/stories/index.story.d.ts +5 -5
  257. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  258. package/build-types/notice/stories/index.story.d.ts +3 -3
  259. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  260. package/build-types/number-control/stories/index.story.d.ts +2 -2
  261. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  262. package/build-types/palette-edit/stories/index.story.d.ts +2 -2
  263. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  264. package/build-types/palette-edit/styles.d.ts +1 -1
  265. package/build-types/palette-edit/styles.d.ts.map +1 -1
  266. package/build-types/panel/stories/index.story.d.ts +6 -6
  267. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  268. package/build-types/placeholder/stories/index.story.d.ts +3 -3
  269. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  270. package/build-types/popover/index.d.ts.map +1 -1
  271. package/build-types/popover/overlay-middlewares.d.ts +2 -2
  272. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  273. package/build-types/popover/stories/index.story.d.ts +7 -7
  274. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  275. package/build-types/popover/types.d.ts +6 -0
  276. package/build-types/popover/types.d.ts.map +1 -1
  277. package/build-types/popover/utils.d.ts +1 -21
  278. package/build-types/popover/utils.d.ts.map +1 -1
  279. package/build-types/progress-bar/stories/index.story.d.ts +3 -3
  280. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  281. package/build-types/progress-bar/styles.d.ts.map +1 -1
  282. package/build-types/query-controls/stories/index.story.d.ts +4 -4
  283. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  284. package/build-types/radio-control/stories/index.story.d.ts +3 -3
  285. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  286. package/build-types/range-control/stories/index.story.d.ts +9 -9
  287. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  288. package/build-types/resizable-box/stories/index.story.d.ts +2 -2
  289. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  290. package/build-types/responsive-wrapper/stories/index.story.d.ts +3 -3
  291. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  292. package/build-types/sandbox/stories/index.story.d.ts +2 -2
  293. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  294. package/build-types/scroll-lock/stories/index.story.d.ts +3 -3
  295. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  296. package/build-types/scrollable/stories/index.story.d.ts +3 -3
  297. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  298. package/build-types/search-control/stories/index.story.d.ts +2 -2
  299. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  300. package/build-types/select-control/stories/index.story.d.ts +2 -2
  301. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  302. package/build-types/shortcut/index.d.ts +13 -0
  303. package/build-types/shortcut/index.d.ts.map +1 -1
  304. package/build-types/shortcut/stories/index.story.d.ts +13 -0
  305. package/build-types/shortcut/stories/index.story.d.ts.map +1 -0
  306. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +1 -0
  307. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  308. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -6
  309. package/build-types/slot-fill/index.d.ts +1 -1
  310. package/build-types/slot-fill/index.d.ts.map +1 -1
  311. package/build-types/snackbar/stories/index.story.d.ts +7 -7
  312. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  313. package/build-types/snackbar/stories/list.story.d.ts +3 -3
  314. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  315. package/build-types/spacer/stories/index.story.d.ts +3 -3
  316. package/build-types/spacer/stories/index.story.d.ts.map +1 -1
  317. package/build-types/spinner/index.d.ts +0 -1
  318. package/build-types/spinner/index.d.ts.map +1 -1
  319. package/build-types/spinner/stories/index.story.d.ts +4 -4
  320. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  321. package/build-types/surface/stories/index.story.d.ts +3 -3
  322. package/build-types/surface/stories/index.story.d.ts.map +1 -1
  323. package/build-types/tab-panel/stories/index.story.d.ts +2 -2
  324. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  325. package/build-types/text-control/stories/index.story.d.ts +4 -4
  326. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  327. package/build-types/text-highlight/stories/index.story.d.ts +3 -3
  328. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  329. package/build-types/textarea-control/stories/index.story.d.ts +3 -3
  330. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  331. package/build-types/theme/index.d.ts +0 -1
  332. package/build-types/theme/index.d.ts.map +1 -1
  333. package/build-types/theme/stories/index.story.d.ts +4 -4
  334. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  335. package/build-types/tip/stories/index.story.d.ts +3 -3
  336. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  337. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  338. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  339. package/build-types/toggle-group-control/stories/index.story.d.ts +6 -6
  340. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  341. package/build-types/toolbar/stories/index.story.d.ts +2 -2
  342. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  343. package/build-types/tools-panel/stories/index.story.d.ts +8 -8
  344. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  345. package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
  346. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  347. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  348. package/build-types/tree-grid/stories/index.story.d.ts +2 -2
  349. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  350. package/build-types/tree-select/index.d.ts +0 -1
  351. package/build-types/tree-select/index.d.ts.map +1 -1
  352. package/build-types/tree-select/stories/index.story.d.ts +2 -2
  353. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  354. package/build-types/truncate/stories/index.story.d.ts +4 -4
  355. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  356. package/build-types/unit-control/index.d.ts +0 -1
  357. package/build-types/unit-control/index.d.ts.map +1 -1
  358. package/build-types/unit-control/stories/index.story.d.ts +7 -7
  359. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  360. package/build-types/utils/hooks/use-cx.d.ts +2 -1
  361. package/build-types/utils/hooks/use-cx.d.ts.map +1 -1
  362. package/build-types/v-stack/stories/e2e/index.story.d.ts +3 -3
  363. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
  364. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  365. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  366. package/build-types/view/component.d.ts +0 -1
  367. package/build-types/view/component.d.ts.map +1 -1
  368. package/build-types/view/stories/index.story.d.ts +3 -3
  369. package/build-types/view/stories/index.story.d.ts.map +1 -1
  370. package/build-types/visually-hidden/stories/index.story.d.ts +5 -5
  371. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  372. package/build-types/z-stack/stories/index.story.d.ts +3 -3
  373. package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
  374. package/package.json +20 -20
  375. package/src/alignment-matrix-control/stories/index.story.tsx +7 -3
  376. package/src/angle-picker-control/stories/index.story.tsx +3 -3
  377. package/src/animate/stories/index.story.tsx +12 -10
  378. package/src/base-control/stories/index.story.tsx +5 -9
  379. package/src/border-box-control/stories/index.story.tsx +5 -9
  380. package/src/border-control/stories/index.story.tsx +8 -14
  381. package/src/button/stories/e2e/index.story.tsx +3 -3
  382. package/src/button/stories/index.story.tsx +10 -10
  383. package/src/button-group/stories/index.story.tsx +4 -6
  384. package/src/card/stories/index.story.tsx +5 -5
  385. package/src/checkbox-control/stories/index.story.tsx +7 -6
  386. package/src/circular-option-picker/stories/index.story.tsx +16 -4
  387. package/src/color-indicator/stories/index.story.tsx +4 -6
  388. package/src/color-palette/stories/index.story.tsx +12 -21
  389. package/src/color-picker/hsv-color-picker.native.js +88 -0
  390. package/src/color-picker/hue-picker.native.js +194 -0
  391. package/src/color-picker/index.native.js +2 -1
  392. package/src/color-picker/saturation-picker.native.js +163 -0
  393. package/src/color-picker/stories/index.story.tsx +3 -3
  394. package/src/color-picker/style.native.scss +23 -0
  395. package/src/combobox-control/stories/index.story.tsx +3 -3
  396. package/src/custom-gradient-picker/stories/index.story.tsx +3 -3
  397. package/src/date-time/stories/date-time.story.tsx +8 -10
  398. package/src/date-time/stories/date.story.tsx +8 -9
  399. package/src/date-time/stories/time.story.tsx +4 -4
  400. package/src/dimension-control/stories/index.story.tsx +3 -3
  401. package/src/disabled/stories/index.story.tsx +4 -4
  402. package/src/divider/stories/index.story.tsx +6 -6
  403. package/src/draggable/stories/index.story.tsx +5 -7
  404. package/src/drop-zone/stories/index.story.tsx +3 -3
  405. package/src/dropdown/stories/index.story.tsx +8 -6
  406. package/src/dropdown-menu/stories/index.story.tsx +3 -3
  407. package/src/dropdown-menu-v2/stories/index.story.tsx +24 -10
  408. package/src/duotone-picker/stories/duotone-picker.story.tsx +3 -6
  409. package/src/duotone-picker/stories/duotone-swatch.story.tsx +3 -3
  410. package/src/elevation/stories/index.story.tsx +7 -7
  411. package/src/external-link/stories/index.story.tsx +4 -6
  412. package/src/flex/stories/index.story.tsx +6 -6
  413. package/src/focal-point-picker/stories/index.story.tsx +3 -3
  414. package/src/font-size-picker/stories/e2e/index.story.tsx +3 -3
  415. package/src/font-size-picker/stories/index.story.tsx +10 -10
  416. package/src/form-file-upload/stories/index.story.tsx +3 -3
  417. package/src/form-toggle/stories/index.story.tsx +4 -7
  418. package/src/form-token-field/stories/index.story.tsx +10 -11
  419. package/src/gradient-picker/stories/index.story.tsx +3 -3
  420. package/src/grid/stories/index.story.tsx +4 -4
  421. package/src/guide/stories/index.story.tsx +3 -3
  422. package/src/h-stack/stories/e2e/index.story.tsx +4 -4
  423. package/src/h-stack/stories/index.story.tsx +4 -4
  424. package/src/heading/stories/index.story.tsx +3 -3
  425. package/src/icon/stories/index.story.tsx +5 -5
  426. package/src/input-control/stories/index.story.tsx +5 -3
  427. package/src/item-group/item/component.tsx +0 -1
  428. package/src/item-group/item-group/component.tsx +0 -1
  429. package/src/item-group/stories/index.story.tsx +11 -12
  430. package/src/keyboard-shortcuts/stories/index.story.tsx +3 -3
  431. package/src/menu-group/stories/index.story.tsx +5 -5
  432. package/src/menu-item/README.md +1 -1
  433. package/src/menu-item/index.tsx +5 -2
  434. package/src/menu-item/stories/index.story.tsx +80 -0
  435. package/src/menu-item/types.ts +3 -2
  436. package/src/menu-items-choice/stories/index.story.tsx +4 -6
  437. package/src/mobile/link-settings/link-settings-navigation.native.js +1 -1
  438. package/src/modal/stories/index.story.tsx +5 -10
  439. package/src/navigable-container/stories/navigable-menu.story.tsx +3 -3
  440. package/src/navigable-container/stories/tabbable-container.story.tsx +3 -3
  441. package/src/navigation/index.tsx +0 -1
  442. package/src/navigation/stories/index.story.tsx +16 -2
  443. package/src/navigation/stories/utils/controlled-state.tsx +2 -2
  444. package/src/navigation/stories/utils/default.tsx +2 -2
  445. package/src/navigation/stories/utils/group.tsx +2 -2
  446. package/src/navigation/stories/utils/hide-if-empty.tsx +2 -2
  447. package/src/navigation/stories/utils/more-examples.tsx +2 -2
  448. package/src/navigation/stories/utils/search.tsx +2 -2
  449. package/src/navigator/navigator-provider/component.tsx +0 -1
  450. package/src/navigator/stories/index.story.tsx +9 -10
  451. package/src/notice/stories/index.story.tsx +6 -6
  452. package/src/number-control/stories/index.story.tsx +3 -3
  453. package/src/palette-edit/stories/index.story.tsx +3 -3
  454. package/src/palette-edit/styles.js +0 -1
  455. package/src/panel/stories/index.story.tsx +9 -11
  456. package/src/placeholder/stories/index.story.tsx +4 -6
  457. package/src/popover/README.md +2 -2
  458. package/src/popover/index.tsx +69 -103
  459. package/src/popover/overlay-middlewares.tsx +2 -2
  460. package/src/popover/stories/index.story.tsx +8 -10
  461. package/src/popover/test/index.tsx +15 -1
  462. package/src/popover/types.ts +6 -0
  463. package/src/popover/utils.ts +5 -56
  464. package/src/progress-bar/stories/index.story.tsx +4 -6
  465. package/src/progress-bar/styles.ts +4 -1
  466. package/src/query-controls/stories/index.story.tsx +5 -6
  467. package/src/radio-control/stories/index.story.tsx +4 -6
  468. package/src/radio-group/stories/index.story.js +1 -0
  469. package/src/range-control/stories/index.story.tsx +12 -18
  470. package/src/resizable-box/stories/index.story.tsx +3 -3
  471. package/src/responsive-wrapper/stories/index.story.tsx +4 -5
  472. package/src/sandbox/stories/index.story.tsx +3 -5
  473. package/src/scroll-lock/stories/index.story.tsx +3 -3
  474. package/src/scrollable/stories/index.story.tsx +4 -4
  475. package/src/search-control/index.native.js +39 -27
  476. package/src/search-control/stories/index.story.tsx +3 -3
  477. package/src/select-control/stories/index.story.tsx +3 -3
  478. package/src/shortcut/index.tsx +13 -0
  479. package/src/shortcut/stories/index.story.tsx +33 -0
  480. package/src/slot-fill/README.md +5 -5
  481. package/src/slot-fill/bubbles-virtually/slot-fill-context.js +3 -0
  482. package/src/slot-fill/bubbles-virtually/slot.js +17 -5
  483. package/src/slot-fill/index.js +6 -1
  484. package/src/slot-fill/stories/index.story.js +2 -0
  485. package/src/slot-fill/test/__snapshots__/slot.js.snap +12 -4
  486. package/src/snackbar/stories/index.story.tsx +10 -13
  487. package/src/snackbar/stories/list.story.tsx +3 -3
  488. package/src/spacer/stories/index.story.tsx +4 -4
  489. package/src/spinner/index.tsx +0 -1
  490. package/src/spinner/stories/index.story.tsx +5 -5
  491. package/src/surface/stories/index.story.tsx +4 -4
  492. package/src/tab-panel/stories/index.story.tsx +5 -13
  493. package/src/tab-panel/test/index.tsx +9 -25
  494. package/src/text-control/stories/index.story.tsx +7 -6
  495. package/src/text-highlight/stories/index.story.tsx +4 -6
  496. package/src/textarea-control/stories/index.story.tsx +4 -6
  497. package/src/theme/index.tsx +0 -1
  498. package/src/theme/stories/index.story.tsx +5 -5
  499. package/src/tip/stories/index.story.tsx +4 -4
  500. package/src/toggle-control/stories/index.story.tsx +3 -3
  501. package/src/toggle-group-control/stories/index.story.tsx +17 -11
  502. package/src/toolbar/stories/index.story.tsx +13 -3
  503. package/src/tools-panel/stories/index.story.tsx +17 -12
  504. package/src/tools-panel/tools-panel/component.tsx +0 -1
  505. package/src/tools-panel/tools-panel-header/component.tsx +3 -0
  506. package/src/tree-grid/stories/index.story.tsx +5 -3
  507. package/src/tree-select/index.tsx +0 -1
  508. package/src/tree-select/stories/index.story.tsx +3 -3
  509. package/src/truncate/stories/index.story.tsx +5 -7
  510. package/src/unit-control/index.tsx +0 -1
  511. package/src/unit-control/stories/index.story.tsx +10 -9
  512. package/src/utils/hooks/use-cx.ts +2 -1
  513. package/src/v-stack/stories/e2e/index.story.tsx +4 -4
  514. package/src/v-stack/stories/index.story.tsx +3 -3
  515. package/src/view/component.tsx +0 -1
  516. package/src/view/stories/index.story.tsx +4 -4
  517. package/src/visually-hidden/stories/index.story.tsx +7 -7
  518. package/src/z-stack/stories/index.story.tsx +4 -4
  519. package/tsconfig.tsbuildinfo +1 -1
  520. package/build/popover/limit-shift.js +0 -129
  521. package/build/popover/limit-shift.js.map +0 -1
  522. package/build-module/popover/limit-shift.js +0 -122
  523. package/build-module/popover/limit-shift.js.map +0 -1
  524. package/build-types/popover/limit-shift.d.ts +0 -87
  525. package/build-types/popover/limit-shift.d.ts.map +0 -1
  526. package/src/popover/limit-shift.ts +0 -205
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_reactDom","_framerMotion","_compose","_icons","_deprecated","_primitives","_dom","_button","_scrollLock","_slotFill","_utils","_limitShift","_overlayMiddlewares","SLOT_NAME","exports","ArrowTriangle","createElement","SVG","xmlns","viewBox","className","role","Path","d","vectorEffect","AnimatedWrapper","forwardRef","style","receivedInlineStyles","placement","shouldAnimate","props","forwardedRef","shouldReduceMotion","useReducedMotion","motionInlineStyles","otherMotionProps","useMemo","placementToMotionAnimationProps","computedAnimationProps","animate","motion","div","ref","slotNameContext","createContext","undefined","UnforwardedPopover","_frameOffsetRef$curre","_frameOffsetRef$curre2","headerTitle","onClose","children","noArrow","position","placementProp","offset","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","flip","resize","shift","variant","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","computedFlipProp","computedResizeProp","deprecated","since","version","alternative","computedVariant","arrowRef","useRef","fallbackReferenceElement","setFallbackReferenceElement","useState","referenceOwnerDocument","setReferenceOwnerDocument","anchorRefFallback","useCallback","node","isMobileViewport","useViewportMatch","isExpanded","hasArrow","normalizedPlacementFromProps","positionToPlacement","frameOffsetRef","getFrameOffset","middleware","overlayMiddlewares","name","fn","x","y","current","data","amount","offsetMiddleware","flipMiddleware","size","apply","sizeProps","_refs$floating$curren","firstElementChild","refs","floating","HTMLElement","Object","assign","maxHeight","availableHeight","overflow","shiftMiddleware","crossAxis","limiter","customLimitShift","padding","arrow","element","filter","m","slotName","useContext","slot","useSlot","onDialogClose","type","event","dialogRef","dialogProps","useDialog","__unstableOnClose","reference","referenceCallbackRef","strategy","update","computedPlacement","middlewareData","arrowData","useFloating","whileElementsMounted","referenceParam","floatingParam","updateParam","autoUpdate","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","useLayoutEffect","resultingReferenceOwnerDoc","getReferenceOwnerDocument","fallbackDocument","document","scale","getFrameScale","resultingReferenceElement","getReferenceElement","ownerDocument","defaultView","frameElement","scrollContainer","getScrollContainer","updateFrameOffset","addEventListener","removeEventListener","mergedFloatingRef","useMergeRefs","content","classnames","tabIndex","left","computePopoverPosition","default","icon","close","onClick","split","join","Number","isFinite","Fill","Popover","PopoverSlot","Slot","bubblesVirtually","__unstableSlotNameProvider","Provider","_default"],"sources":["@wordpress/components/src/popover/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport classnames from 'classnames';\nimport type { Middleware, MiddlewareArguments } from '@floating-ui/react-dom';\nimport {\n\tuseFloating,\n\tflip as flipMiddleware,\n\tshift as shiftMiddleware,\n\tautoUpdate,\n\tarrow,\n\toffset as offsetMiddleware,\n\tsize,\n} from '@floating-ui/react-dom';\n// eslint-disable-next-line no-restricted-imports\nimport type { HTMLMotionProps, MotionProps } from 'framer-motion';\n// eslint-disable-next-line no-restricted-imports\nimport { motion, useReducedMotion } 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} from '@wordpress/element';\nimport {\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';\nimport { getScrollContainer } from '@wordpress/dom';\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\tgetFrameOffset,\n\tgetFrameScale,\n\tpositionToPlacement,\n\tplacementToMotionAnimationProps,\n\tgetReferenceOwnerDocument,\n\tgetReferenceElement,\n} from './utils';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type {\n\tPopoverProps,\n\tAnimatedWrapperProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\nimport { limitShift as customLimitShift } from './limit-shift';\nimport { overlayMiddlewares } from './overlay-middlewares';\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 AnimatedWrapper = forwardRef(\n\t(\n\t\t{\n\t\t\tstyle: receivedInlineStyles,\n\t\t\tplacement,\n\t\t\tshouldAnimate = false,\n\t\t\t...props\n\t\t}: HTMLMotionProps< 'div' > & AnimatedWrapperProps,\n\t\tforwardedRef: ForwardedRef< any >\n\t) => {\n\t\tconst shouldReduceMotion = useReducedMotion();\n\n\t\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t\t() => placementToMotionAnimationProps( placement ),\n\t\t\t[ placement ]\n\t\t);\n\n\t\tconst computedAnimationProps: HTMLMotionProps< 'div' > =\n\t\t\tshouldAnimate && ! shouldReduceMotion\n\t\t\t\t? {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t\t\t...receivedInlineStyles,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...otherMotionProps,\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\tanimate: false,\n\t\t\t\t\t\tstyle: receivedInlineStyles,\n\t\t\t\t };\n\n\t\treturn (\n\t\t\t<motion.div\n\t\t\t\t{ ...computedAnimationProps }\n\t\t\t\t{ ...props }\n\t\t\t\tref={ forwardedRef }\n\t\t\t/>\n\t\t);\n\t}\n);\n\nconst slotNameContext = createContext< string | undefined >( undefined );\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 `PopoverProps`).\n\t\tkeyof Omit< MotionProps, 'animate' | 'children' >\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tanimate = true,\n\t\theaderTitle,\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\tvariant,\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} = props;\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\tconst [ referenceOwnerDocument, setReferenceOwnerDocument ] = useState<\n\t\tDocument | undefined\n\t>();\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\t/**\n\t * Offsets the position of the popover when the anchor is inside an iframe.\n\t *\n\t * Store the offset in a ref, due to constraints with floating-ui:\n\t * https://floating-ui.com/docs/react-dom#variables-inside-middleware-functions.\n\t */\n\tconst frameOffsetRef = useRef( getFrameOffset( referenceOwnerDocument ) );\n\n\tconst middleware = [\n\t\t...( placementProp === 'overlay' ? overlayMiddlewares() : [] ),\n\t\t// Custom middleware which adjusts the popover's position by taking into\n\t\t// account the offset of the anchor's iframe (if any) compared to the page.\n\t\t{\n\t\t\tname: 'frameOffset',\n\t\t\tfn( { x, y }: MiddlewareArguments ) {\n\t\t\t\tif ( ! frameOffsetRef.current ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx,\n\t\t\t\t\t\ty,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tx: x + frameOffsetRef.current.x,\n\t\t\t\t\ty: y + frameOffsetRef.current.y,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\t// This will be used in the customLimitShift() function.\n\t\t\t\t\t\tamount: frameOffsetRef.current,\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t},\n\t\t},\n\t\toffsetMiddleware( offsetProp ),\n\t\tcomputedFlipProp ? flipMiddleware() : undefined,\n\t\tcomputedResizeProp\n\t\t\t? size( {\n\t\t\t\t\tapply( sizeProps ) {\n\t\t\t\t\t\tconst { firstElementChild } =\n\t\t\t\t\t\t\trefs.floating.current ?? {};\n\n\t\t\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) )\n\t\t\t\t\t\t\treturn;\n\n\t\t\t\t\t\t// Reduce the height of the popover to the available space.\n\t\t\t\t\t\tObject.assign( firstElementChild.style, {\n\t\t\t\t\t\t\tmaxHeight: `${ sizeProps.availableHeight }px`,\n\t\t\t\t\t\t\toverflow: 'auto',\n\t\t\t\t\t\t} );\n\t\t\t\t\t},\n\t\t\t } )\n\t\t\t: undefined,\n\t\tshift\n\t\t\t? shiftMiddleware( {\n\t\t\t\t\tcrossAxis: true,\n\t\t\t\t\tlimiter: customLimitShift(),\n\t\t\t\t\tpadding: 1, // Necessary to avoid flickering at the edge of the viewport.\n\t\t\t } )\n\t\t\t: undefined,\n\t\tarrow( { element: arrowRef } ),\n\t].filter(\n\t\t( m: Middleware | undefined ): m is Middleware => m !== undefined\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\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// Callback refs (not regular refs). This allows the position to be updated.\n\t\t// when either elements change.\n\t\treference: referenceCallbackRef,\n\t\tfloating,\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\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 resultingReferenceOwnerDoc = getReferenceOwnerDocument( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t\tfallbackDocument: document,\n\t\t} );\n\t\tconst scale = getFrameScale( resultingReferenceOwnerDoc );\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\tscale,\n\t\t} );\n\n\t\treferenceCallbackRef( resultingReferenceElement );\n\n\t\tsetReferenceOwnerDocument( resultingReferenceOwnerDoc );\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\treferenceCallbackRef,\n\t] );\n\n\t// If the reference element is in a different ownerDocument (e.g. iFrame),\n\t// we need to manually update the floating's position as the reference's owner\n\t// document scrolls. Also update the frame offset if the view resizes.\n\tuseLayoutEffect( () => {\n\t\tif (\n\t\t\t// Reference and root documents are the same.\n\t\t\treferenceOwnerDocument === document ||\n\t\t\t// Reference and floating are in the same document.\n\t\t\treferenceOwnerDocument === refs.floating.current?.ownerDocument ||\n\t\t\t// The reference's document has no view (i.e. window)\n\t\t\t// or frame element (ie. it's not an iframe).\n\t\t\t! referenceOwnerDocument?.defaultView?.frameElement\n\t\t) {\n\t\t\tframeOffsetRef.current = undefined;\n\t\t\treturn;\n\t\t}\n\n\t\tconst { defaultView } = referenceOwnerDocument;\n\t\tconst { frameElement } = defaultView;\n\n\t\tconst scrollContainer = frameElement\n\t\t\t? getScrollContainer( frameElement )\n\t\t\t: null;\n\n\t\tconst updateFrameOffset = () => {\n\t\t\tframeOffsetRef.current = getFrameOffset( referenceOwnerDocument );\n\t\t\tupdate();\n\t\t};\n\t\tdefaultView.addEventListener( 'resize', updateFrameOffset );\n\t\tscrollContainer?.addEventListener( 'scroll', updateFrameOffset );\n\n\t\tupdateFrameOffset();\n\n\t\treturn () => {\n\t\t\tdefaultView.removeEventListener( 'resize', updateFrameOffset );\n\t\t\tscrollContainer?.removeEventListener( 'scroll', updateFrameOffset );\n\t\t};\n\t}, [ referenceOwnerDocument, update, refs.floating ] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\tfloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\t// Disable reason: We care to capture the _bubbled_ events from inputs\n\t// within popover as inferring close intent.\n\n\tlet content = (\n\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<AnimatedWrapper\n\t\t\tshouldAnimate={ animate && ! isExpanded }\n\t\t\tplacement={ computedPlacement }\n\t\t\tclassName={ classnames( 'components-popover', className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-positioned': x !== null && y !== null,\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{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t\tstyle={\n\t\t\t\tisExpanded\n\t\t\t\t\t? undefined\n\t\t\t\t\t: {\n\t\t\t\t\t\t\tposition: strategy,\n\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\t// `x` and `y` are framer-motion specific props and are shorthands\n\t\t\t\t\t\t\t// for `translateX` and `translateY`. Currently it is not possible\n\t\t\t\t\t\t\t// to use `translateX` and `translateY` because those values would\n\t\t\t\t\t\t\t// be overridden by the return value of the\n\t\t\t\t\t\t\t// `placementToMotionAnimationProps` function in `AnimatedWrapper`\n\t\t\t\t\t\t\tx: computePopoverPosition( x ),\n\t\t\t\t\t\t\ty: computePopoverPosition( y ),\n\t\t\t\t\t }\n\t\t\t}\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? `${\n\t\t\t\t\t\t\t\t\t\tarrowData.x +\n\t\t\t\t\t\t\t\t\t\t( frameOffsetRef.current?.x ?? 0 )\n\t\t\t\t\t\t\t\t }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? `${\n\t\t\t\t\t\t\t\t\t\tarrowData.y +\n\t\t\t\t\t\t\t\t\t\t( frameOffsetRef.current?.y ?? 0 )\n\t\t\t\t\t\t\t\t }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</AnimatedWrapper>\n\t);\n\n\tif ( slot.ref ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t}\n\n\tif ( anchorRef || anchorRect || anchor ) {\n\t\treturn content;\n\t}\n\n\treturn <span ref={ anchorRefFallback }>{ content }</span>;\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 = forwardRef( UnforwardedPopover );\n\nfunction PopoverSlot(\n\t{ name = SLOT_NAME }: { name?: string },\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Slot\n\t\t\t// @ts-expect-error Need to type `SlotFill`\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":";;;;;;;AAuBA,IAAAA,QAAA,GAAAC,OAAA;AAnBA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AAYA,IAAAI,aAAA,GAAAJ,OAAA;AAeA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,IAAA,GAAAT,OAAA;AAKA,IAAAU,OAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,WAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,SAAA,GAAAZ,OAAA;AACA,IAAAa,MAAA,GAAAb,OAAA;AAgBA,IAAAc,WAAA,GAAAd,OAAA;AACA,IAAAe,mBAAA,GAAAf,OAAA;AAlEA;AACA;AACA;;AAeA;;AAGA;AACA;AACA;;AAqBA;AACA;AACA;;AAuBA;AACA;AACA;AACA;AACA;AACO,MAAMgB,SAAS,GAAG,SAAS;;AAElC;AACA;AACA;AACA;AAAAC,OAAA,CAAAD,SAAA,GAAAA,SA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SAASC,WAAWA,CACnB;EAAElG,IAAI,GAAGvF;AAA6B,CAAC,EACvC8B,GAAwB,EACvB;EACD,OACC,IAAA/C,QAAA,CAAAoB,aAAA,EAACP,SAAA,CAAA8L;EACA;EAAA;IACAC,gBAAgB;IAChBpG,IAAI,EAAGA,IAAM;IACbhF,SAAS,EAAC,cAAc;IACxBuB,GAAG,EAAGA;EAAK,CACX,CAAC;AAEJ;;AAEA;AACA0J,OAAO,CAACE,IAAI,GAAG,IAAA7K,mBAAU,EAAE4K,WAAY,CAAC;AACxC;AACAD,OAAO,CAACI,0BAA0B,GAAG7J,eAAe,CAAC8J,QAAQ;AAAC,IAAAC,QAAA,GAE/CN,OAAO;AAAAvL,OAAA,CAAA8K,OAAA,GAAAe,QAAA"}
1
+ {"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_reactDom","_framerMotion","_compose","_icons","_deprecated","_primitives","_dom","_button","_scrollLock","_slotFill","_utils","_overlayMiddlewares","SLOT_NAME","exports","ArrowTriangle","createElement","SVG","xmlns","viewBox","className","role","Path","d","vectorEffect","AnimatedWrapper","forwardRef","style","receivedInlineStyles","placement","shouldAnimate","props","forwardedRef","shouldReduceMotion","useReducedMotion","motionInlineStyles","otherMotionProps","useMemo","placementToMotionAnimationProps","computedAnimationProps","animate","motion","div","ref","slotNameContext","createContext","undefined","fallbackContainerClassname","getPopoverFallbackContainer","container","document","body","querySelector","append","UnforwardedPopover","headerTitle","onClose","children","noArrow","position","placementProp","offset","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","flip","resize","shift","inline","variant","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","computedFlipProp","computedResizeProp","deprecated","since","version","alternative","computedVariant","arrowRef","useRef","fallbackReferenceElement","setFallbackReferenceElement","useState","referenceOwnerDocument","setReferenceOwnerDocument","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","resultingReferenceOwnerDoc","getReferenceOwnerDocument","fallbackDocument","resultingReferenceElement","getReferenceElement","setReference","defaultView","frameElement","scrollContainer","getScrollContainer","addEventListener","removeEventListener","mergedFloatingRef","useMergeRefs","setFloating","content","classnames","tabIndex","left","computePopoverPosition","default","icon","close","onClick","split","join","Number","isFinite","shouldRenderWithinSlot","hasAnchor","Fill","name","createPortal","Fragment","Popover","PopoverSlot","Slot","bubblesVirtually","__unstableSlotNameProvider","Provider","_default"],"sources":["@wordpress/components/src/popover/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport classnames from 'classnames';\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';\n// eslint-disable-next-line no-restricted-imports\nimport type { HTMLMotionProps, MotionProps } from 'framer-motion';\n// eslint-disable-next-line no-restricted-imports\nimport { motion, useReducedMotion } 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\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';\nimport { getScrollContainer } from '@wordpress/dom';\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\tgetReferenceOwnerDocument,\n\tgetReferenceElement,\n} from './utils';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type {\n\tPopoverProps,\n\tAnimatedWrapperProps,\n\tPopoverAnchorRefReference,\n\tPopoverAnchorRefTopBottom,\n} from './types';\nimport { overlayMiddlewares } from './overlay-middlewares';\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 AnimatedWrapper = forwardRef(\n\t(\n\t\t{\n\t\t\tstyle: receivedInlineStyles,\n\t\t\tplacement,\n\t\t\tshouldAnimate = false,\n\t\t\t...props\n\t\t}: HTMLMotionProps< 'div' > & AnimatedWrapperProps,\n\t\tforwardedRef: ForwardedRef< any >\n\t) => {\n\t\tconst shouldReduceMotion = useReducedMotion();\n\n\t\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t\t() => placementToMotionAnimationProps( placement ),\n\t\t\t[ placement ]\n\t\t);\n\n\t\tconst computedAnimationProps: HTMLMotionProps< 'div' > =\n\t\t\tshouldAnimate && ! shouldReduceMotion\n\t\t\t\t? {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t\t\t...receivedInlineStyles,\n\t\t\t\t\t\t},\n\t\t\t\t\t\t...otherMotionProps,\n\t\t\t\t }\n\t\t\t\t: {\n\t\t\t\t\t\tanimate: false,\n\t\t\t\t\t\tstyle: receivedInlineStyles,\n\t\t\t\t };\n\n\t\treturn (\n\t\t\t<motion.div\n\t\t\t\t{ ...computedAnimationProps }\n\t\t\t\t{ ...props }\n\t\t\t\tref={ forwardedRef }\n\t\t\t/>\n\t\t);\n\t}\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 `PopoverProps`).\n\t\tkeyof Omit< MotionProps, 'animate' | 'children' >\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) => {\n\tconst {\n\t\tanimate = true,\n\t\theaderTitle,\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\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} = props;\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\tconst [ referenceOwnerDocument, setReferenceOwnerDocument ] = useState<\n\t\tDocument | undefined\n\t>();\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\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\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 resultingReferenceOwnerDoc = getReferenceOwnerDocument( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t\tfallbackDocument: document,\n\t\t} );\n\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\n\t\tsetReferenceOwnerDocument( resultingReferenceOwnerDoc );\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\t// If the reference element is in a different ownerDocument (e.g. iFrame),\n\t// we need to manually update the floating's position as the reference's owner\n\t// document scrolls.\n\tuseLayoutEffect( () => {\n\t\tif (\n\t\t\t! referenceOwnerDocument ||\n\t\t\t! referenceOwnerDocument.defaultView\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { defaultView } = referenceOwnerDocument;\n\t\tconst { frameElement } = defaultView;\n\n\t\tconst scrollContainer = frameElement\n\t\t\t? getScrollContainer( frameElement )\n\t\t\t: null;\n\n\t\tdefaultView.addEventListener( 'resize', update );\n\t\tscrollContainer?.addEventListener( 'scroll', update );\n\n\t\treturn () => {\n\t\t\tdefaultView.removeEventListener( 'resize', update );\n\t\t\tscrollContainer?.removeEventListener( 'scroll', update );\n\t\t};\n\t}, [ referenceOwnerDocument, update ] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\trefs.setFloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\t// Disable reason: We care to capture the _bubbled_ events from inputs\n\t// within popover as inferring close intent.\n\n\tlet content = (\n\t\t// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<AnimatedWrapper\n\t\t\tshouldAnimate={ animate && ! isExpanded }\n\t\t\tplacement={ computedPlacement }\n\t\t\tclassName={ classnames( 'components-popover', className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-positioned': x !== null && y !== null,\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{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t\tstyle={\n\t\t\t\tisExpanded\n\t\t\t\t\t? undefined\n\t\t\t\t\t: {\n\t\t\t\t\t\t\tposition: strategy,\n\t\t\t\t\t\t\ttop: 0,\n\t\t\t\t\t\t\tleft: 0,\n\t\t\t\t\t\t\t// `x` and `y` are framer-motion specific props and are shorthands\n\t\t\t\t\t\t\t// for `translateX` and `translateY`. Currently it is not possible\n\t\t\t\t\t\t\t// to use `translateX` and `translateY` because those values would\n\t\t\t\t\t\t\t// be overridden by the return value of the\n\t\t\t\t\t\t\t// `placementToMotionAnimationProps` function in `AnimatedWrapper`\n\t\t\t\t\t\t\tx: computePopoverPosition( x ),\n\t\t\t\t\t\t\ty: computePopoverPosition( y ),\n\t\t\t\t\t }\n\t\t\t}\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</AnimatedWrapper>\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( content, getPopoverFallbackContainer() );\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 = forwardRef( UnforwardedPopover );\n\nfunction PopoverSlot(\n\t{ name = SLOT_NAME }: { name?: string },\n\tref: ForwardedRef< any >\n) {\n\treturn (\n\t\t<Slot\n\t\t\t// @ts-expect-error Need to type `SlotFill`\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":";;;;;;;AAuBA,IAAAA,QAAA,GAAAC,OAAA;AAnBA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAaA,IAAAI,aAAA,GAAAJ,OAAA;AAgBA,IAAAK,QAAA,GAAAL,OAAA;AAKA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AACA,IAAAS,IAAA,GAAAT,OAAA;AAKA,IAAAU,OAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,WAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,SAAA,GAAAZ,OAAA;AACA,IAAAa,M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AAC,QAAA,GAE/CN,OAAO;AAAAtL,OAAA,CAAAwK,OAAA,GAAAoB,QAAA"}
@@ -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 { MiddlewareArguments } 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 }: MiddlewareArguments ) {\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 ) ) return;\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;IAA2B,CAAC,EAAG;MACpC,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;;MAEtD;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"}
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 ) ) return;\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;;MAEtD;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"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/popover/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactNode, MutableRefObject, SyntheticEvent } from 'react';\nimport type { Placement } from '@floating-ui/react-dom';\n\ntype PositionYAxis = 'top' | 'middle' | 'bottom';\ntype PositionXAxis = 'left' | 'center' | 'right';\ntype PositionCorner = 'top' | 'right' | 'bottom' | 'left';\n\ntype DomRectWithOwnerDocument = DOMRect & {\n\townerDocument?: Document;\n};\n\ntype PopoverPlacement = Placement | 'overlay';\n\nexport type AnimatedWrapperProps = {\n\tplacement: PopoverPlacement;\n\tshouldAnimate?: boolean;\n};\n\nexport type PopoverAnchorRefReference = MutableRefObject<\n\tElement | null | undefined\n>;\nexport type PopoverAnchorRefTopBottom = { top: Element; bottom: Element };\n\nexport type VirtualElement = Pick< Element, 'getBoundingClientRect' > & {\n\townerDocument?: Document;\n};\n\nexport type PopoverProps = {\n\t/**\n\t * The name of the Slot in which the popover should be rendered. It should\n\t * be also passed to the corresponding `PopoverSlot` component.\n\t *\n\t * @default 'Popover'\n\t */\n\t__unstableSlotName?: string;\n\t/**\n\t * The element that should be used by the popover as its anchor. It can either\n\t * be an `Element` or, alternatively, a `VirtualElement` — ie. an object with\n\t * the `getBoundingClientRect()` and the `ownerDocument` properties defined.\n\t *\n\t * **The anchor element should be stored in local state** rather than a\n\t * plain React ref to ensure reactive updating when it changes.\n\t */\n\tanchor?: Element | VirtualElement | null;\n\t/**\n\t * Whether the popover should animate when opening.\n\t *\n\t * @default true\n\t */\n\tanimate?: boolean;\n\t/**\n\t * The `children` elements rendered as the popover's content.\n\t */\n\tchildren: ReactNode;\n\t/**\n\t * Show the popover fullscreen on mobile viewports.\n\t */\n\texpandOnMobile?: boolean;\n\t/**\n\t * Specifies whether the popover should flip across its axis if there isn't\n\t * space for it in the normal placement.\n\t * When the using a 'top' placement, the popover will switch to a 'bottom'\n\t * placement. When using a 'left' placement, the popover will switch to a\n\t * `right' placement.\n\t * The popover will retain its alignment of 'start' or 'end' when flipping.\n\t *\n\t * @default true\n\t */\n\tflip?: boolean;\n\t/**\n\t * By default, the _first tabbable element_ in the popover will receive focus\n\t * when it mounts. This is the same as setting this prop to `\"firstElement\"`.\n\t * Specifying a `false` value disables the focus handling entirely (this\n\t * should only be done when an appropriately accessible substitute behavior\n\t * exists).\n\t *\n\t * @default 'firstElement'\n\t */\n\tfocusOnMount?: 'firstElement' | boolean;\n\t/**\n\t * A callback invoked when the focus leaves the opened popover. This should\n\t * only be provided in advanced use-cases when a popover should close under\n\t * specific circumstances (for example, if the new `document.activeElement`\n\t * is content of or otherwise controlling popover visibility).\n\t *\n\t * When not provided, the `onClose` callback will be called instead.\n\t */\n\tonFocusOutside?: ( event: SyntheticEvent ) => void;\n\t/**\n\t * Used to customize the header text shown when the popover is toggled to\n\t * fullscreen on mobile viewports (see the `expandOnMobile` prop).\n\t */\n\theaderTitle?: string;\n\t/**\n\t * Used to show/hide the arrow that points at the popover's anchor.\n\t *\n\t * @default true\n\t */\n\tnoArrow?: boolean;\n\t/**\n\t * The distance (in px) between the anchor and the popover.\n\t */\n\toffset?: number;\n\t/**\n\t * A callback invoked when the popover should be closed.\n\t */\n\tonClose?: () => void;\n\t/**\n\t * Used to specify the popover's position with respect to its anchor.\n\t *\n\t * @default 'bottom-start'\n\t */\n\tplacement?: PopoverPlacement;\n\t/**\n\t * Legacy way to specify the popover's position with respect to its anchor.\n\t * _Note: this prop is deprecated. Use the `placement` prop instead._\n\t */\n\tposition?:\n\t\t| `${ PositionYAxis }`\n\t\t| `${ PositionYAxis } ${ PositionXAxis }`\n\t\t| `${ PositionYAxis } ${ PositionXAxis } ${ PositionCorner }`;\n\t/**\n\t * Adjusts the size of the popover to prevent its contents from going out of\n\t * view when meeting the viewport edges.\n\t *\n\t * @default true\n\t */\n\tresize?: boolean;\n\t/**\n\t * Enables the `Popover` to shift in order to stay in view when meeting the\n\t * viewport edges.\n\t *\n\t * @default false\n\t */\n\tshift?: boolean;\n\t/**\n\t * Specifies the popover's style.\n\t *\n\t * Leave undefined for the default style. Other values are:\n\t * - 'unstyled': The popover is essentially without any visible style, it\n\t * has no background, border, outline or drop shadow, but\n\t * the popover contents are still displayed.\n\t * - 'toolbar': A style that has no elevation, but a high contrast with\n\t * other elements. This is matches the style of the\n\t * `Toolbar` component.\n\t *\n\t * @default undefined\n\t */\n\tvariant?: 'unstyled' | 'toolbar';\n\t// Deprecated props\n\t/**\n\t * Prevent the popover from flipping and resizing when meeting the viewport\n\t * edges. _Note: this prop is deprecated. Instead, provide use the individual\n\t * `flip` and `resize` props._\n\t *\n\t * @deprecated\n\t */\n\t__unstableForcePosition?: boolean;\n\t/**\n\t * An object extending a `DOMRect` with an additional optional `ownerDocument`\n\t * property, used to specify a fixed popover position.\n\t *\n\t * @deprecated\n\t */\n\tanchorRect?: DomRectWithOwnerDocument;\n\t/**\n\t * Used to specify a fixed popover position. It can be an `Element`, a React\n\t * reference to an `element`, an object with a `top` and a `bottom` properties\n\t * (both pointing to elements), or a `range`.\n\t *\n\t * @deprecated\n\t */\n\tanchorRef?:\n\t\t| Element\n\t\t| PopoverAnchorRefReference\n\t\t| PopoverAnchorRefTopBottom\n\t\t| Range;\n\t/**\n\t * A function returning the same value as the one expected by the `anchorRect`\n\t * prop, used to specify a dynamic popover position.\n\t *\n\t * @deprecated\n\t */\n\tgetAnchorRect?: (\n\t\tfallbackReferenceElement: Element | null\n\t) => DomRectWithOwnerDocument;\n\t/**\n\t * Used to enable a different visual style for the popover.\n\t * _Note: this prop is deprecated. Use the `variant` prop with the\n\t * 'toolbar' value instead._\n\t *\n\t * @deprecated\n\t */\n\tisAlternate?: boolean;\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/popover/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ReactNode, MutableRefObject, SyntheticEvent } from 'react';\nimport type { Placement } from '@floating-ui/react-dom';\n\ntype PositionYAxis = 'top' | 'middle' | 'bottom';\ntype PositionXAxis = 'left' | 'center' | 'right';\ntype PositionCorner = 'top' | 'right' | 'bottom' | 'left';\n\ntype DomRectWithOwnerDocument = DOMRect & {\n\townerDocument?: Document;\n};\n\ntype PopoverPlacement = Placement | 'overlay';\n\nexport type AnimatedWrapperProps = {\n\tplacement: PopoverPlacement;\n\tshouldAnimate?: boolean;\n};\n\nexport type PopoverAnchorRefReference = MutableRefObject<\n\tElement | null | undefined\n>;\nexport type PopoverAnchorRefTopBottom = { top: Element; bottom: Element };\n\nexport type VirtualElement = Pick< Element, 'getBoundingClientRect' > & {\n\townerDocument?: Document;\n};\n\nexport type PopoverProps = {\n\t/**\n\t * The name of the Slot in which the popover should be rendered. It should\n\t * be also passed to the corresponding `PopoverSlot` component.\n\t *\n\t * @default 'Popover'\n\t */\n\t__unstableSlotName?: string;\n\t/**\n\t * The element that should be used by the popover as its anchor. It can either\n\t * be an `Element` or, alternatively, a `VirtualElement` — ie. an object with\n\t * the `getBoundingClientRect()` and the `ownerDocument` properties defined.\n\t *\n\t * **The anchor element should be stored in local state** rather than a\n\t * plain React ref to ensure reactive updating when it changes.\n\t */\n\tanchor?: Element | VirtualElement | null;\n\t/**\n\t * Whether the popover should animate when opening.\n\t *\n\t * @default true\n\t */\n\tanimate?: boolean;\n\t/**\n\t * The `children` elements rendered as the popover's content.\n\t */\n\tchildren: ReactNode;\n\t/**\n\t * Show the popover fullscreen on mobile viewports.\n\t */\n\texpandOnMobile?: boolean;\n\t/**\n\t * Specifies whether the popover should flip across its axis if there isn't\n\t * space for it in the normal placement.\n\t * When the using a 'top' placement, the popover will switch to a 'bottom'\n\t * placement. When using a 'left' placement, the popover will switch to a\n\t * `right' placement.\n\t * The popover will retain its alignment of 'start' or 'end' when flipping.\n\t *\n\t * @default true\n\t */\n\tflip?: boolean;\n\t/**\n\t * By default, the _first tabbable element_ in the popover will receive focus\n\t * when it mounts. This is the same as setting this prop to `\"firstElement\"`.\n\t * Specifying a `false` value disables the focus handling entirely (this\n\t * should only be done when an appropriately accessible substitute behavior\n\t * exists).\n\t *\n\t * @default 'firstElement'\n\t */\n\tfocusOnMount?: 'firstElement' | boolean;\n\t/**\n\t * A callback invoked when the focus leaves the opened popover. This should\n\t * only be provided in advanced use-cases when a popover should close under\n\t * specific circumstances (for example, if the new `document.activeElement`\n\t * is content of or otherwise controlling popover visibility).\n\t *\n\t * When not provided, the `onClose` callback will be called instead.\n\t */\n\tonFocusOutside?: ( event: SyntheticEvent ) => void;\n\t/**\n\t * Used to customize the header text shown when the popover is toggled to\n\t * fullscreen on mobile viewports (see the `expandOnMobile` prop).\n\t */\n\theaderTitle?: string;\n\t/**\n\t * Used to show/hide the arrow that points at the popover's anchor.\n\t *\n\t * @default true\n\t */\n\tnoArrow?: boolean;\n\t/**\n\t * The distance (in px) between the anchor and the popover.\n\t */\n\toffset?: number;\n\t/**\n\t * A callback invoked when the popover should be closed.\n\t */\n\tonClose?: () => void;\n\t/**\n\t * Used to specify the popover's position with respect to its anchor.\n\t *\n\t * @default 'bottom-start'\n\t */\n\tplacement?: PopoverPlacement;\n\t/**\n\t * Legacy way to specify the popover's position with respect to its anchor.\n\t * _Note: this prop is deprecated. Use the `placement` prop instead._\n\t */\n\tposition?:\n\t\t| `${ PositionYAxis }`\n\t\t| `${ PositionYAxis } ${ PositionXAxis }`\n\t\t| `${ PositionYAxis } ${ PositionXAxis } ${ PositionCorner }`;\n\t/**\n\t * Adjusts the size of the popover to prevent its contents from going out of\n\t * view when meeting the viewport edges.\n\t *\n\t * @default true\n\t */\n\tresize?: boolean;\n\t/**\n\t * Enables the `Popover` to shift in order to stay in view when meeting the\n\t * viewport edges.\n\t *\n\t * @default false\n\t */\n\tshift?: boolean;\n\t/**\n\t * Specifies the popover's style.\n\t *\n\t * Leave undefined for the default style. Other values are:\n\t * - 'unstyled': The popover is essentially without any visible style, it\n\t * has no background, border, outline or drop shadow, but\n\t * the popover contents are still displayed.\n\t * - 'toolbar': A style that has no elevation, but a high contrast with\n\t * other elements. This is matches the style of the\n\t * `Toolbar` component.\n\t *\n\t * @default undefined\n\t */\n\tvariant?: 'unstyled' | 'toolbar';\n\t/**\n\t * Whether to render the popover inline or within the slot.\n\t *\n\t * @default false\n\t */\n\tinline?: boolean;\n\t// Deprecated props\n\t/**\n\t * Prevent the popover from flipping and resizing when meeting the viewport\n\t * edges. _Note: this prop is deprecated. Instead, provide use the individual\n\t * `flip` and `resize` props._\n\t *\n\t * @deprecated\n\t */\n\t__unstableForcePosition?: boolean;\n\t/**\n\t * An object extending a `DOMRect` with an additional optional `ownerDocument`\n\t * property, used to specify a fixed popover position.\n\t *\n\t * @deprecated\n\t */\n\tanchorRect?: DomRectWithOwnerDocument;\n\t/**\n\t * Used to specify a fixed popover position. It can be an `Element`, a React\n\t * reference to an `element`, an object with a `top` and a `bottom` properties\n\t * (both pointing to elements), or a `range`.\n\t *\n\t * @deprecated\n\t */\n\tanchorRef?:\n\t\t| Element\n\t\t| PopoverAnchorRefReference\n\t\t| PopoverAnchorRefTopBottom\n\t\t| Range;\n\t/**\n\t * A function returning the same value as the one expected by the `anchorRect`\n\t * prop, used to specify a dynamic popover position.\n\t *\n\t * @deprecated\n\t */\n\tgetAnchorRect?: (\n\t\tfallbackReferenceElement: Element | null\n\t) => DomRectWithOwnerDocument;\n\t/**\n\t * Used to enable a different visual style for the popover.\n\t * _Note: this prop is deprecated. Use the `variant` prop with the\n\t * 'toolbar' value instead._\n\t *\n\t * @deprecated\n\t */\n\tisAlternate?: boolean;\n};\n"],"mappings":""}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.positionToPlacement = exports.placementToMotionAnimationProps = exports.getReferenceOwnerDocument = exports.getReferenceElement = exports.getFrameScale = exports.getFrameOffset = exports.computePopoverPosition = void 0;
6
+ exports.positionToPlacement = exports.placementToMotionAnimationProps = exports.getReferenceOwnerDocument = exports.getReferenceElement = exports.computePopoverPosition = void 0;
7
7
  /**
8
8
  * External dependencies
9
9
  */
@@ -180,43 +180,7 @@ const placementToMotionAnimationProps = placement => {
180
180
  }
181
181
  };
182
182
  };
183
-
184
- /**
185
- * Returns the offset of a document's frame element.
186
- *
187
- * @param document The iframe's owner document.
188
- *
189
- * @return The offset of the document's frame element, or undefined if the
190
- * document has no frame element.
191
- */
192
183
  exports.placementToMotionAnimationProps = placementToMotionAnimationProps;
193
- const getFrameOffset = document => {
194
- const frameElement = document?.defaultView?.frameElement;
195
- if (!frameElement) {
196
- return;
197
- }
198
- const iframeRect = frameElement.getBoundingClientRect();
199
- return {
200
- x: iframeRect.left,
201
- y: iframeRect.top
202
- };
203
- };
204
- exports.getFrameOffset = getFrameOffset;
205
- const getFrameScale = document => {
206
- const frameElement = document?.defaultView?.frameElement;
207
- if (!frameElement) {
208
- return {
209
- x: 1,
210
- y: 1
211
- };
212
- }
213
- const rect = frameElement.getBoundingClientRect();
214
- return {
215
- x: rect.width / frameElement.offsetWidth,
216
- y: rect.height / frameElement.offsetHeight
217
- };
218
- };
219
- exports.getFrameScale = getFrameScale;
220
184
  const getReferenceOwnerDocument = ({
221
185
  anchor,
222
186
  anchorRef,
@@ -234,7 +198,9 @@ const getReferenceOwnerDocument = ({
234
198
  // with the `getBoundingClientRect()` function (like real elements).
235
199
  // See https://floating-ui.com/docs/virtual-elements for more info.
236
200
  let resultingReferenceOwnerDoc;
237
- if (anchor) {
201
+ if (anchor?.contextElement) {
202
+ resultingReferenceOwnerDoc = anchor.contextElement?.ownerDocument;
203
+ } else if (anchor) {
238
204
  resultingReferenceOwnerDoc = anchor.ownerDocument;
239
205
  } else if (anchorRef?.top) {
240
206
  resultingReferenceOwnerDoc = anchorRef?.top.ownerDocument;
@@ -258,8 +224,7 @@ const getReferenceElement = ({
258
224
  anchorRef,
259
225
  anchorRect,
260
226
  getAnchorRect,
261
- fallbackReferenceElement,
262
- scale
227
+ fallbackReferenceElement
263
228
  }) => {
264
229
  var _referenceElement;
265
230
  let referenceElement = null;
@@ -305,16 +270,6 @@ const getReferenceElement = ({
305
270
  // anchoring to the popover's parent node.
306
271
  referenceElement = fallbackReferenceElement.parentElement;
307
272
  }
308
- if (referenceElement && (scale.x !== 1 || scale.y !== 1)) {
309
- // If the popover is inside an iframe, the coordinates of the
310
- // reference element need to be scaled to match the iframe's scale.
311
- const rect = referenceElement.getBoundingClientRect();
312
- referenceElement = {
313
- getBoundingClientRect() {
314
- return new window.DOMRect(rect.x * scale.x, rect.y * scale.y, rect.width * scale.x, rect.height * scale.y);
315
- }
316
- };
317
- }
318
273
 
319
274
  // Convert any `undefined` value to `null`.
320
275
  return (_referenceElement = referenceElement) !== null && _referenceElement !== void 0 ? _referenceElement : null;
@@ -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","getFrameOffset","document","frameElement","defaultView","iframeRect","getBoundingClientRect","x","y","getFrameScale","rect","width","offsetWidth","height","offsetHeight","getReferenceOwnerDocument","anchor","anchorRef","anchorRect","getAnchorRect","fallbackReferenceElement","fallbackDocument","_resultingReferenceOw","resultingReferenceOwnerDoc","ownerDocument","startContainer","current","getReferenceElement","_referenceElement","referenceElement","topRect","bottomRect","window","DOMRect","_rect$x","_rect$y","_rect$width","_rect$height","parentElement","computePopoverPosition","c","Number","isNaN","undefined","Math","round"],"sources":["@wordpress/components/src/popover/utils.ts"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { MotionProps } from 'framer-motion';\nimport type { 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\tNonNullable< PopoverProps[ 'placement' ] >\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): NonNullable< PopoverProps[ 'placement' ] > =>\n\tPOSITION_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\n/**\n * Returns the offset of a document's frame element.\n *\n * @param document The iframe's owner document.\n *\n * @return The offset of the document's frame element, or undefined if the\n * document has no frame element.\n */\nexport const getFrameOffset = (\n\tdocument?: Document\n): { x: number; y: number } | undefined => {\n\tconst frameElement = document?.defaultView?.frameElement;\n\tif ( ! frameElement ) {\n\t\treturn;\n\t}\n\tconst iframeRect = frameElement.getBoundingClientRect();\n\treturn { x: iframeRect.left, y: iframeRect.top };\n};\n\nexport const getFrameScale = (\n\tdocument?: Document\n): {\n\tx: number;\n\ty: number;\n} => {\n\tconst frameElement = document?.defaultView?.frameElement as HTMLElement;\n\tif ( ! frameElement ) {\n\t\treturn { x: 1, y: 1 };\n\t}\n\tconst rect = frameElement.getBoundingClientRect();\n\treturn {\n\t\tx: rect.width / frameElement.offsetWidth,\n\t\ty: rect.height / frameElement.offsetHeight,\n\t};\n};\n\nexport const getReferenceOwnerDocument = ( {\n\tanchor,\n\tanchorRef,\n\tanchorRect,\n\tgetAnchorRect,\n\tfallbackReferenceElement,\n\tfallbackDocument,\n}: Pick<\n\tPopoverProps,\n\t'anchorRef' | 'anchorRect' | 'getAnchorRect' | 'anchor'\n> & {\n\tfallbackReferenceElement: Element | null;\n\tfallbackDocument: Document;\n} ): Document => {\n\t// In floating-ui's terms:\n\t// - \"reference\" refers to the popover's anchor element.\n\t// - \"floating\" refers the floating popover's element.\n\t// A floating element can also be positioned relative to a virtual element,\n\t// instead of a real one. A virtual element is represented by an object\n\t// with the `getBoundingClientRect()` function (like real elements).\n\t// See https://floating-ui.com/docs/virtual-elements for more info.\n\tlet resultingReferenceOwnerDoc;\n\tif ( anchor ) {\n\t\tresultingReferenceOwnerDoc = anchor.ownerDocument;\n\t} else if ( ( anchorRef as PopoverAnchorRefTopBottom | undefined )?.top ) {\n\t\tresultingReferenceOwnerDoc = ( anchorRef as PopoverAnchorRefTopBottom )\n\t\t\t?.top.ownerDocument;\n\t} else if ( ( anchorRef as Range | undefined )?.startContainer ) {\n\t\tresultingReferenceOwnerDoc = ( anchorRef as Range ).startContainer\n\t\t\t.ownerDocument;\n\t} else if (\n\t\t( anchorRef as PopoverAnchorRefReference | undefined )?.current\n\t) {\n\t\tresultingReferenceOwnerDoc = (\n\t\t\t( anchorRef as PopoverAnchorRefReference ).current as Element\n\t\t ).ownerDocument;\n\t} else if ( anchorRef as Element | undefined ) {\n\t\t// This one should be deprecated.\n\t\tresultingReferenceOwnerDoc = ( anchorRef as Element ).ownerDocument;\n\t} else if ( anchorRect && anchorRect?.ownerDocument ) {\n\t\tresultingReferenceOwnerDoc = anchorRect.ownerDocument;\n\t} else if ( getAnchorRect ) {\n\t\tresultingReferenceOwnerDoc = getAnchorRect(\n\t\t\tfallbackReferenceElement\n\t\t)?.ownerDocument;\n\t}\n\n\treturn resultingReferenceOwnerDoc ?? fallbackDocument;\n};\n\nexport const getReferenceElement = ( {\n\tanchor,\n\tanchorRef,\n\tanchorRect,\n\tgetAnchorRect,\n\tfallbackReferenceElement,\n\tscale,\n}: Pick<\n\tPopoverProps,\n\t'anchorRef' | 'anchorRect' | 'getAnchorRect' | 'anchor'\n> & {\n\tfallbackReferenceElement: Element | null;\n\tscale: { x: number; y: number };\n} ): ReferenceType | null => {\n\tlet referenceElement = null;\n\n\tif ( anchor ) {\n\t\treferenceElement = anchor;\n\t} else if ( ( anchorRef as PopoverAnchorRefTopBottom | undefined )?.top ) {\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 = (\n\t\t\t\t\tanchorRef as PopoverAnchorRefTopBottom\n\t\t\t\t ).top.getBoundingClientRect();\n\t\t\t\tconst bottomRect = (\n\t\t\t\t\tanchorRef as PopoverAnchorRefTopBottom\n\t\t\t\t ).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 (\n\t\t( anchorRef as PopoverAnchorRefReference | undefined )?.current\n\t) {\n\t\t// Standard React ref.\n\t\treferenceElement = ( anchorRef as PopoverAnchorRefReference ).current;\n\t} else if ( anchorRef as Element | undefined ) {\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\tif ( referenceElement && ( scale.x !== 1 || scale.y !== 1 ) ) {\n\t\t// If the popover is inside an iframe, the coordinates of the\n\t\t// reference element need to be scaled to match the iframe's scale.\n\t\tconst rect = referenceElement.getBoundingClientRect();\n\t\treferenceElement = {\n\t\t\tgetBoundingClientRect() {\n\t\t\t\treturn new window.DOMRect(\n\t\t\t\t\trect.x * scale.x,\n\t\t\t\t\trect.y * scale.y,\n\t\t\t\t\trect.width * scale.x,\n\t\t\t\t\trect.height * scale.y\n\t\t\t\t);\n\t\t\t},\n\t\t};\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;AACA;;AAIA;AACA;AACA;;AAOA,MAAMA,qBAGL,GAAG;EACHC,MAAM,EAAE,QAAQ;EAChBC,GAAG,EAAE,KAAK;EACV,aAAa,EAAE,MAAM;EACrB,cAAc,EAAE,OAAO;EAC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X,KAAK,CAACW,CAAC,EAChBG,IAAI,CAACF,CAAC,GAAGZ,KAAK,CAACY,CAAC,EAChBE,IAAI,CAACC,KAAK,GAAGf,KAAK,CAACW,CAAC,EACpBG,IAAI,CAACG,MAAM,GAAGjB,KAAK,CAACY,CACrB,CAAC;MACF;IACD,CAAC;EACF;;EAEA;EACA,QAAAoB,iBAAA,GAAOC,gBAAgB,cAAAD,iBAAA,cAAAA,iBAAA,GAAI,IAAI;AAChC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA/C,OAAA,CAAA8C,mBAAA,GAAAA,mBAAA;AASO,MAAMY,sBAAsB,GAAKC,CAAgB,IACvDA,CAAC,KAAK,IAAI,IAAIC,MAAM,CAACC,KAAK,CAAEF,CAAE,CAAC,GAAGG,SAAS,GAAGC,IAAI,CAACC,KAAK,CAAEL,CAAE,CAAC;AAAC3D,OAAA,CAAA0D,sBAAA,GAAAA,sBAAA"}
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","getReferenceOwnerDocument","anchor","anchorRef","anchorRect","getAnchorRect","fallbackReferenceElement","fallbackDocument","_resultingReferenceOw","resultingReferenceOwnerDoc","contextElement","ownerDocument","startContainer","current","getReferenceElement","_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 */\n// eslint-disable-next-line no-restricted-imports\nimport type { MotionProps } from 'framer-motion';\nimport type { ReferenceType, VirtualElement } 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\tNonNullable< PopoverProps[ 'placement' ] >\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): NonNullable< PopoverProps[ 'placement' ] > =>\n\tPOSITION_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\nexport const getReferenceOwnerDocument = ( {\n\tanchor,\n\tanchorRef,\n\tanchorRect,\n\tgetAnchorRect,\n\tfallbackReferenceElement,\n\tfallbackDocument,\n}: Pick<\n\tPopoverProps,\n\t'anchorRef' | 'anchorRect' | 'getAnchorRect' | 'anchor'\n> & {\n\tfallbackReferenceElement: Element | null;\n\tfallbackDocument: Document;\n} ): Document => {\n\t// In floating-ui's terms:\n\t// - \"reference\" refers to the popover's anchor element.\n\t// - \"floating\" refers the floating popover's element.\n\t// A floating element can also be positioned relative to a virtual element,\n\t// instead of a real one. A virtual element is represented by an object\n\t// with the `getBoundingClientRect()` function (like real elements).\n\t// See https://floating-ui.com/docs/virtual-elements for more info.\n\tlet resultingReferenceOwnerDoc;\n\tif ( ( anchor as VirtualElement )?.contextElement ) {\n\t\tresultingReferenceOwnerDoc = ( anchor as VirtualElement ).contextElement\n\t\t\t?.ownerDocument;\n\t} else if ( anchor ) {\n\t\tresultingReferenceOwnerDoc = anchor.ownerDocument;\n\t} else if ( ( anchorRef as PopoverAnchorRefTopBottom | undefined )?.top ) {\n\t\tresultingReferenceOwnerDoc = ( anchorRef as PopoverAnchorRefTopBottom )\n\t\t\t?.top.ownerDocument;\n\t} else if ( ( anchorRef as Range | undefined )?.startContainer ) {\n\t\tresultingReferenceOwnerDoc = ( anchorRef as Range ).startContainer\n\t\t\t.ownerDocument;\n\t} else if (\n\t\t( anchorRef as PopoverAnchorRefReference | undefined )?.current\n\t) {\n\t\tresultingReferenceOwnerDoc = (\n\t\t\t( anchorRef as PopoverAnchorRefReference ).current as Element\n\t\t ).ownerDocument;\n\t} else if ( anchorRef as Element | undefined ) {\n\t\t// This one should be deprecated.\n\t\tresultingReferenceOwnerDoc = ( anchorRef as Element ).ownerDocument;\n\t} else if ( anchorRect && anchorRect?.ownerDocument ) {\n\t\tresultingReferenceOwnerDoc = anchorRect.ownerDocument;\n\t} else if ( getAnchorRect ) {\n\t\tresultingReferenceOwnerDoc = getAnchorRect(\n\t\t\tfallbackReferenceElement\n\t\t)?.ownerDocument;\n\t}\n\n\treturn resultingReferenceOwnerDoc ?? fallbackDocument;\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 ( ( anchorRef as PopoverAnchorRefTopBottom | undefined )?.top ) {\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 = (\n\t\t\t\t\tanchorRef as PopoverAnchorRefTopBottom\n\t\t\t\t ).top.getBoundingClientRect();\n\t\t\t\tconst bottomRect = (\n\t\t\t\t\tanchorRef as PopoverAnchorRefTopBottom\n\t\t\t\t ).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 (\n\t\t( anchorRef as PopoverAnchorRefReference | undefined )?.current\n\t) {\n\t\t// Standard React ref.\n\t\treferenceElement = ( anchorRef as PopoverAnchorRefReference ).current;\n\t} else if ( anchorRef as Element | undefined ) {\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;AACA;;AAIA;AACA;AACA;;AAOA,MAAMA,qBAGL,GAAG;EACHC,MAAM,EAAE,QAAQ;EAChBC,GAAG,EAAE,KAAK;EACV,aAAa,EAAE,MAAM;EACrB,cAAc,EAAE,OAAO;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GsD,IAAI,CAACrD,GACnC,CAAC;MACF;IACD,CAAC;EACF,CAAC,MAAM,IAAK8B,wBAAwB,EAAG;IACtC;IACA;IACAU,gBAAgB,GAAGV,wBAAwB,CAACyB,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;AARAlC,OAAA,CAAAiC,mBAAA,GAAAA,mBAAA;AASO,MAAMkB,sBAAsB,GAAKC,CAAgB,IACvDA,CAAC,KAAK,IAAI,IAAIC,MAAM,CAACC,KAAK,CAAEF,CAAE,CAAC,GAAGG,SAAS,GAAGC,IAAI,CAACC,KAAK,CAAEL,CAAE,CAAC;AAACpD,OAAA,CAAAmD,sBAAA,GAAAA,sBAAA"}
@@ -26,7 +26,7 @@ const Track = (0, _base.default)("div", process.env.NODE_ENV === "production" ?
26
26
  } : {
27
27
  target: "e15u147w2",
28
28
  label: "Track"
29
- })("position:relative;overflow:hidden;width:100%;max-width:160px;height:", _utils.CONFIG.borderWidthFocus, ";background-color:var(\n\t\t--wp-components-color-gray-300,\n\t\t", _utils.COLORS.gray[300], "\n\t);border-radius:", _utils.CONFIG.radiusBlockUi, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QitCIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQ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IGlubGluZS1ibG9jaztcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGhlaWdodDogMTAwJTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Jsb2NrVWkgfTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdCR7ICggeyBpc0luZGV0ZXJtaW5hdGUsIHZhbHVlIH0gKSA9PlxuXHRcdGlzSW5kZXRlcm1pbmF0ZVxuXHRcdFx0PyBjc3MoIHtcblx0XHRcdFx0XHRhbmltYXRpb25EdXJhdGlvbjogJzEuNXMnLFxuXHRcdFx0XHRcdGFuaW1hdGlvblRpbWluZ0Z1bmN0aW9uOiAnZWFzZS1pbi1vdXQnLFxuXHRcdFx0XHRcdGFuaW1hdGlvbkl0ZXJhdGlvbkNvdW50OiAnaW5maW5pdGUnLFxuXHRcdFx0XHRcdGFuaW1hdGlvbk5hbWU6IGFuaW1hdGVQcm9ncmVzc0Jhcixcblx0XHRcdFx0XHR3aWR0aDogYCR7IElOREVURVJNSU5BVEVfVFJBQ0tfV0lEVEggfSVgLFxuXHRcdFx0ICB9IClcblx0XHRcdDogY3NzKCB7IHdpZHRoOiBgJHsgdmFsdWUgfSVgIH0gKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFByb2dyZXNzRWxlbWVudCA9IHN0eWxlZC5wcm9ncmVzc2Bcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGxlZnQ6IDA7XG5cdG9wYWNpdHk6IDA7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuIl19 */"));
29
+ })("position:relative;overflow:hidden;width:100%;max-width:160px;height:", _utils.CONFIG.borderWidthFocus, ";background-color:var(\n\t\t--wp-components-color-gray-300,\n\t\t", _utils.COLORS.gray[300], "\n\t);border-radius:", _utils.CONFIG.radiusBlockUi, ";" + (process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Wx1ZSB9JWAsXG5cdFx0XHRcdFx0dHJhbnNpdGlvbjogJ3dpZHRoIDAuNHMgZWFzZS1pbi1vdXQnLFxuXHRcdFx0ICB9ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQcm9ncmVzc0VsZW1lbnQgPSBzdHlsZWQucHJvZ3Jlc3NgXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHRsZWZ0OiAwO1xuXHRvcGFjaXR5OiAwO1xuXHR3aWR0aDogMTAwJTtcblx0aGVpZ2h0OiAxMDAlO1xuYDtcbiJdfQ== */"));
30
30
  exports.Track = Track;
31
31
  const Indicator = (0, _base.default)("div", process.env.NODE_ENV === "production" ? {
32
32
  target: "e15u147w1"
@@ -42,9 +42,10 @@ const Indicator = (0, _base.default)("div", process.env.NODE_ENV === "production
42
42
  animationIterationCount: 'infinite',
43
43
  animationName: animateProgressBar,
44
44
  width: `${INDETERMINATE_TRACK_WIDTH}%`
45
- }, process.env.NODE_ENV === "production" ? "" : ";label:Indicator;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpREsiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9wcm9ncmVzcy1iYXIvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5k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9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cblx0JHsgKCB7IGlzSW5kZXRlcm1pbmF0ZSwgdmFsdWUgfSApID0+XG5cdFx0aXNJbmRldGVybWluYXRlXG5cdFx0XHQ/IGNzcygge1xuXHRcdFx0XHRcdGFuaW1hdGlvbkR1cmF0aW9uOiAnMS41cycsXG5cdFx0XHRcdFx0YW5pbWF0aW9uVGltaW5nRnVuY3Rpb246ICdlYXNlLWluLW91dCcsXG5cdFx0XHRcdFx0YW5pbWF0aW9uSXRlcmF0aW9uQ291bnQ6ICdpbmZpbml0ZScsXG5cdFx0XHRcdFx0YW5pbWF0aW9uTmFtZTogYW5pbWF0ZVByb2dyZXNzQmFyLFxuXHRcdFx0XHRcdHdpZHRoOiBgJHsgSU5ERVRFUk1JTkFURV9UUkFDS19XSURUSCB9JWAsXG5cdFx0XHQgIH0gKVxuXHRcdFx0OiBjc3MoIHsgd2lkdGg6IGAkeyB2YWx1ZSB9JWAgfSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgUHJvZ3Jlc3NFbGVtZW50ID0gc3R5bGVkLnByb2dyZXNzYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogMDtcblx0bGVmdDogMDtcblx0b3BhY2l0eTogMDtcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcbmA7XG4iXX0= */") : /*#__PURE__*/(0, _react.css)({
46
- width: `${value}%`
47
- }, process.env.NODE_ENV === "production" ? "" : ";label:Indicator;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3REsiLCJmaWxlIjoiQHdvcmRwcmVz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G5gO1xuXG5leHBvcnQgY29uc3QgUHJvZ3Jlc3NFbGVtZW50ID0gc3R5bGVkLnByb2dyZXNzYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogMDtcblx0bGVmdDogMDtcblx0b3BhY2l0eTogMDtcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcbmA7XG4iXX0= */"));
45
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Indicator;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpREsiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9wcm9ncmVzcy1iYXIvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5jb25zdCBhbmltYXRlUHJvZ3Jlc3NCYXIgPSBrZXlmcmFtZXMoIHtcblx0JzAlJzoge1xuXHRcdGxlZnQ6ICctNTAlJyxcblx0fSxcblx0JzEwMCUnOiB7XG5cdFx0bGVmdDogJzEwMCUnLFxuXHR9LFxufSApO1xuXG4vLyBXaWR0aCBvZiB0aGUgaW5kaWNhdG9yIGZvciB0aGUgaW5kZXRlcm1pbmF0ZSBwcm9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9uSXRlcmF0aW9uQ291bnQ6ICdpbmZpbml0ZScsXG5cdFx0XHRcdFx0YW5pbWF0aW9uTmFtZTogYW5pbWF0ZVByb2dyZXNzQmFyLFxuXHRcdFx0XHRcdHdpZHRoOiBgJHsgSU5ERVRFUk1JTkFURV9UUkFDS19XSURUSCB9JWAsXG5cdFx0XHQgIH0gKVxuXHRcdFx0OiBjc3MoIHtcblx0XHRcdFx0XHR3aWR0aDogYCR7IHZhbHVlIH0lYCxcblx0XHRcdFx0XHR0cmFuc2l0aW9uOiAnd2lkdGggMC40cyBlYXNlLWluLW91dCcsXG5cdFx0XHQgIH0gKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFByb2dyZXNzRWxlbWVudCA9IHN0eWxlZC5wcm9ncmVzc2Bcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGxlZnQ6IDA7XG5cdG9wYWNpdHk6IDA7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuIl19 */") : /*#__PURE__*/(0, _react.css)({
46
+ width: `${value}%`,
47
+ transition: 'width 0.4s ease-in-out'
48
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Indicator;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3REsiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9wcm9ncmVzcy1iYXIvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0I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tcblxuZXhwb3J0IGNvbnN0IFByb2dyZXNzRWxlbWVudCA9IHN0eWxlZC5wcm9ncmVzc2Bcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGxlZnQ6IDA7XG5cdG9wYWNpdHk6IDA7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuIl19 */"));
48
49
  exports.Indicator = Indicator;
49
50
  const ProgressElement = (0, _base.default)("progress", process.env.NODE_ENV === "production" ? {
50
51
  target: "e15u147w0"
@@ -57,7 +58,7 @@ const ProgressElement = (0, _base.default)("progress", process.env.NODE_ENV ===
57
58
  } : {
58
59
  name: "11fb690",
59
60
  styles: "position:absolute;top:0;left:0;opacity:0;width:100%;height:100%",
60
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyRDhDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuY29uc3QgYW5pbWF0ZVByb2dyZXNzQmFyID0ga2V5ZnJhbWVzKCB7XG5cdCcwJSc6IHtcblx0XHRsZWZ0OiAnLTUwJSc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GVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Jsb2NrVWkgfTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdCR7ICggeyBpc0luZGV0ZXJtaW5hdGUsIHZhbHVlIH0gKSA9PlxuXHRcdGlzSW5kZXRlcm1pbmF0ZVxuXHRcdFx0PyBjc3MoIHtcblx0XHRcdFx0XHRhbmltYXRpb25EdXJhdGlvbjogJzEuNXMnLFxuXHRcdFx0XHRcdGFuaW1hdGlvblRpbWluZ0Z1bmN0aW9uOiAnZWFzZS1pbi1vdXQnLFxuXHRcdFx0XHRcdGFuaW1hdGlvbkl0ZXJhdGlvbkNvdW50OiAnaW5maW5pdGUnLFxuXHRcdFx0XHRcdGFuaW1hdGlvbk5hbWU6IGFuaW1hdGVQcm9ncmVzc0Jhcixcblx0XHRcdFx0XHR3aWR0aDogYCR7IElOREVURVJNSU5BVEVfVFJBQ0tfV0lEVEggfSVgLFxuXHRcdFx0ICB9IClcblx0XHRcdDogY3NzKCB7XG5cdFx0XHRcdFx0d2lkdGg6IGAkeyB2YWx1ZSB9JWAsXG5cdFx0XHRcdFx0dHJhbnNpdGlvbjogJ3dpZHRoIDAuNHMgZWFzZS1pbi1vdXQnLFxuXHRcdFx0ICB9ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQcm9ncmVzc0VsZW1lbnQgPSBzdHlsZWQucHJvZ3Jlc3NgXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHRsZWZ0OiAwO1xuXHRvcGFjaXR5OiAwO1xuXHR3aWR0aDogMTAwJTtcblx0aGVpZ2h0OiAxMDAlO1xuYDtcbiJdfQ== */",
61
62
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
62
63
  });
63
64
  exports.ProgressElement = ProgressElement;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_utils","_EMOTION_STRINGIFIED_CSS_ERROR__","animateProgressBar","keyframes","left","INDETERMINATE_TRACK_WIDTH","exports","Track","_base","default","process","env","NODE_ENV","target","label","CONFIG","borderWidthFocus","COLORS","gray","radiusBlockUi","Indicator","theme","accent","isIndeterminate","value","css","animationDuration","animationTimingFunction","animationIterationCount","animationName","width","ProgressElement","name","styles","map","toString"],"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 * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\nconst animateProgressBar = keyframes( {\n\t'0%': {\n\t\tleft: '-50%',\n\t},\n\t'100%': {\n\t\tleft: '100%',\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\twidth: 100%;\n\tmax-width: 160px;\n\theight: ${ CONFIG.borderWidthFocus };\n\tbackground-color: var(\n\t\t--wp-components-color-gray-300,\n\t\t${ COLORS.gray[ 300 ] }\n\t);\n\tborder-radius: ${ CONFIG.radiusBlockUi };\n`;\n\nexport const Indicator = styled.div< {\n\tisIndeterminate: boolean;\n\tvalue?: number;\n} >`\n\tdisplay: inline-block;\n\tposition: absolute;\n\ttop: 0;\n\theight: 100%;\n\tborder-radius: ${ CONFIG.radiusBlockUi };\n\tbackground-color: ${ COLORS.theme.accent };\n\n\t${ ( { isIndeterminate, value } ) =>\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,\n\t\t\t\t\twidth: `${ INDETERMINATE_TRACK_WIDTH }%`,\n\t\t\t } )\n\t\t\t: css( { width: `${ value }%` } ) };\n`;\n\nexport const ProgressElement = styled.progress`\n\tposition: absolute;\n\ttop: 0;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AA,CAAAC,QAAA,s1EAAC,CAAC,gBACH,IAAAa,UAAG,EAAE;EAAEK,KAAK,EAAG,GAAGN,KAAO;AAAG,CAAC,EAAAd,OAAA,CAAAC,GAAA,CAAAC,QAAA,8CAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,s1EAAC,CAAC,SAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,w1EACnC;AAACN,OAAA,CAAAc,SAAA,GAAAA,SAAA;AAEK,MAAMW,eAAe,OAAAvB,KAAA,CAAAC,OAAA,cAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAoB,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAlC;AAAA,EAO3B;AAACK,OAAA,CAAAyB,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"names":["_react","require","_utils","_EMOTION_STRINGIFIED_CSS_ERROR__","animateProgressBar","keyframes","left","INDETERMINATE_TRACK_WIDTH","exports","Track","_base","default","process","env","NODE_ENV","target","label","CONFIG","borderWidthFocus","COLORS","gray","radiusBlockUi","Indicator","theme","accent","isIndeterminate","value","css","animationDuration","animationTimingFunction","animationIterationCount","animationName","width","transition","ProgressElement","name","styles","map","toString"],"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 * Internal dependencies\n */\nimport { COLORS, CONFIG } from '../utils';\n\nconst animateProgressBar = keyframes( {\n\t'0%': {\n\t\tleft: '-50%',\n\t},\n\t'100%': {\n\t\tleft: '100%',\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\twidth: 100%;\n\tmax-width: 160px;\n\theight: ${ CONFIG.borderWidthFocus };\n\tbackground-color: var(\n\t\t--wp-components-color-gray-300,\n\t\t${ COLORS.gray[ 300 ] }\n\t);\n\tborder-radius: ${ CONFIG.radiusBlockUi };\n`;\n\nexport const Indicator = styled.div< {\n\tisIndeterminate: boolean;\n\tvalue?: number;\n} >`\n\tdisplay: inline-block;\n\tposition: absolute;\n\ttop: 0;\n\theight: 100%;\n\tborder-radius: ${ CONFIG.radiusBlockUi };\n\tbackground-color: ${ COLORS.theme.accent };\n\n\t${ ( { isIndeterminate, value } ) =>\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,\n\t\t\t\t\twidth: `${ INDETERMINATE_TRACK_WIDTH }%`,\n\t\t\t } )\n\t\t\t: css( {\n\t\t\t\t\twidth: `${ value }%`,\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,MAAA,GAAAD,OAAA;AAA0C,SAAAE,iCAAA;AAE1C,MAAMC,kBAAkB,GAAG,IAAAC,gBAAS,EAAE;EACrC,IAAI,EAAE;IACLC,IAAI,EAAE;EACP,CAAC;EACD,MAAM,EAAE;IACPA,IAAI,EAAE;EACP;AACD,CAAE,CAAC;;AAEH;AACO,MAAMC,yBAAyB,GAAG,EAAE;AAACC,OAAA,CAAAD,yBAAA,GAAAA,yBAAA;AAErC,MAAME,KAAK,OAAAC,KAAA,CAAAC,OAAA,SAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;A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IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAnC;AAAA,EAO3B;AAACK,OAAA,CAAA0B,eAAA,GAAAA,eAAA"}
@@ -90,20 +90,36 @@ function SearchControl({
90
90
  // see https://github.com/WordPress/gutenberg/pull/41166
91
91
  // eslint-disable-next-line react-hooks/exhaustive-deps
92
92
  }, [isActive, isDark]);
93
+ const clearInput = (0, _element.useCallback)(() => {
94
+ onChange('');
95
+ }, [onChange]);
96
+ const onPress = (0, _element.useCallback)(() => {
97
+ setIsActive(true);
98
+ inputRef.current?.focus();
99
+ }, []);
100
+ const onFocus = (0, _element.useCallback)(() => {
101
+ setIsActive(true);
102
+ }, []);
103
+ const onCancel = (0, _element.useCallback)(() => {
104
+ clearTimeout(onCancelTimer.current);
105
+ onCancelTimer.current = setTimeout(() => {
106
+ inputRef.current?.blur();
107
+ clearInput();
108
+ setIsActive(false);
109
+ }, 0);
110
+ }, [clearInput]);
111
+ const onKeyboardDidHide = (0, _element.useCallback)(() => {
112
+ if (!isIOS) {
113
+ onCancel();
114
+ }
115
+ }, [isIOS, onCancel]);
93
116
  (0, _element.useEffect)(() => {
94
- const keyboardHideSubscription = _reactNative.Keyboard.addListener('keyboardDidHide', () => {
95
- if (!isIOS) {
96
- onCancel();
97
- }
98
- });
117
+ const keyboardHideSubscription = _reactNative.Keyboard.addListener('keyboardDidHide', onKeyboardDidHide);
99
118
  return () => {
100
119
  clearTimeout(onCancelTimer.current);
101
120
  keyboardHideSubscription.remove();
102
121
  };
103
- // Disable reason: deferring this refactor to the native team.
104
- // see https://github.com/WordPress/gutenberg/pull/41166
105
- // eslint-disable-next-line react-hooks/exhaustive-deps
106
- }, []);
122
+ }, [onKeyboardDidHide]);
107
123
  const {
108
124
  'search-control__container': containerStyle,
109
125
  'search-control__inner-container': innerContainerStyle,
@@ -118,16 +134,6 @@ function SearchControl({
118
134
  'search-control__icon': iconStyle,
119
135
  'search-control__right-icon': rightIconStyle
120
136
  } = currentStyles;
121
- function clearInput() {
122
- onChange('');
123
- }
124
- function onCancel() {
125
- onCancelTimer.current = setTimeout(() => {
126
- inputRef.current.blur();
127
- clearInput();
128
- setIsActive(false);
129
- }, 0);
130
- }
131
137
  function renderLeftButton() {
132
138
  const button = !isIOS && isActive ? (0, _element.createElement)(_components.Button, {
133
139
  label: (0, _i18n.__)('Cancel search'),
@@ -178,10 +184,7 @@ function SearchControl({
178
184
  }
179
185
  return (0, _element.createElement)(_reactNative.TouchableOpacity, {
180
186
  style: containerStyle,
181
- onPress: () => {
182
- setIsActive(true);
183
- inputRef.current.focus();
184
- },
187
+ onPress: onPress,
185
188
  activeOpacity: 1
186
189
  }, (0, _element.createElement)(_reactNative.View, {
187
190
  style: innerContainerStyle
@@ -192,7 +195,7 @@ function SearchControl({
192
195
  style: formInputStyle,
193
196
  placeholderTextColor: placeholderStyle?.color,
194
197
  onChangeText: onChange,
195
- onFocus: () => setIsActive(true),
198
+ onFocus: onFocus,
196
199
  value: value,
197
200
  placeholder: placeholder
198
201
  }), renderRightButton()), isActive && renderCancel()));