@wordpress/components 25.6.0 → 25.7.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 (864) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/CONTRIBUTING.md +2 -2
  3. package/README.md +3 -8
  4. package/build/color-palette/utils.js +2 -9
  5. package/build/color-palette/utils.js.map +1 -1
  6. package/build/color-picker/hsv-color-picker.native.js +92 -0
  7. package/build/color-picker/hsv-color-picker.native.js.map +1 -0
  8. package/build/color-picker/hue-picker.native.js +195 -0
  9. package/build/color-picker/hue-picker.native.js.map +1 -0
  10. package/build/color-picker/index.native.js +3 -2
  11. package/build/color-picker/index.native.js.map +1 -1
  12. package/build/color-picker/saturation-picker.native.js +178 -0
  13. package/build/color-picker/saturation-picker.native.js.map +1 -0
  14. package/build/item-group/item/component.js +0 -1
  15. package/build/item-group/item/component.js.map +1 -1
  16. package/build/item-group/item-group/component.js +0 -1
  17. package/build/item-group/item-group/component.js.map +1 -1
  18. package/build/menu-item/index.js +6 -4
  19. package/build/menu-item/index.js.map +1 -1
  20. package/build/menu-item/types.js.map +1 -1
  21. package/build/mobile/link-settings/link-settings-navigation.native.js +1 -1
  22. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  23. package/build/navigation/index.js +0 -1
  24. package/build/navigation/index.js.map +1 -1
  25. package/build/navigator/navigator-provider/component.js +1 -2
  26. package/build/navigator/navigator-provider/component.js.map +1 -1
  27. package/build/palette-edit/styles.js +10 -10
  28. package/build/palette-edit/styles.js.map +1 -1
  29. package/build/popover/index.js +38 -75
  30. package/build/popover/index.js.map +1 -1
  31. package/build/popover/overlay-middlewares.js.map +1 -1
  32. package/build/popover/types.js.map +1 -1
  33. package/build/popover/utils.js +5 -50
  34. package/build/popover/utils.js.map +1 -1
  35. package/build/progress-bar/styles.js +6 -5
  36. package/build/progress-bar/styles.js.map +1 -1
  37. package/build/sandbox/index.js +1 -1
  38. package/build/sandbox/index.js.map +1 -1
  39. package/build/search-control/index.native.js +27 -24
  40. package/build/search-control/index.native.js.map +1 -1
  41. package/build/shortcut/index.js +13 -0
  42. package/build/shortcut/index.js.map +1 -1
  43. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +4 -2
  44. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  45. package/build/slot-fill/bubbles-virtually/slot.js +14 -8
  46. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  47. package/build/slot-fill/index.js +5 -0
  48. package/build/slot-fill/index.js.map +1 -1
  49. package/build/snackbar/index.js +1 -1
  50. package/build/snackbar/index.js.map +1 -1
  51. package/build/spinner/index.js +0 -1
  52. package/build/spinner/index.js.map +1 -1
  53. package/build/theme/color-algorithms.js +2 -2
  54. package/build/theme/color-algorithms.js.map +1 -1
  55. package/build/theme/index.js +0 -1
  56. package/build/theme/index.js.map +1 -1
  57. package/build/toolbar/toolbar-item/index.js +1 -1
  58. package/build/toolbar/toolbar-item/index.js.map +1 -1
  59. package/build/toolbar/toolbar-item/index.native.js +1 -1
  60. package/build/toolbar/toolbar-item/index.native.js.map +1 -1
  61. package/build/tools-panel/tools-panel/component.js +0 -1
  62. package/build/tools-panel/tools-panel/component.js.map +1 -1
  63. package/build/tools-panel/tools-panel-header/component.js +5 -1
  64. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  65. package/build/tree-select/index.js +0 -1
  66. package/build/tree-select/index.js.map +1 -1
  67. package/build/ui/context/constants.js +2 -6
  68. package/build/ui/context/constants.js.map +1 -1
  69. package/build/ui/context/context-connect.js +1 -1
  70. package/build/ui/context/context-connect.js.map +1 -1
  71. package/build/ui/context/context-system-provider.js +1 -1
  72. package/build/ui/context/context-system-provider.js.map +1 -1
  73. package/build/ui/context/use-context-system.js +1 -1
  74. package/build/ui/context/use-context-system.js.map +1 -1
  75. package/build/unit-control/index.js +0 -1
  76. package/build/unit-control/index.js.map +1 -1
  77. package/build/utils/hooks/use-cx.js +2 -1
  78. package/build/utils/hooks/use-cx.js.map +1 -1
  79. package/build/utils/math.js +0 -12
  80. package/build/utils/math.js.map +1 -1
  81. package/build/utils/values.js +3 -66
  82. package/build/utils/values.js.map +1 -1
  83. package/build/view/component.js +1 -2
  84. package/build/view/component.js.map +1 -1
  85. package/build-module/color-palette/utils.js +0 -6
  86. package/build-module/color-palette/utils.js.map +1 -1
  87. package/build-module/color-picker/hsv-color-picker.native.js +84 -0
  88. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -0
  89. package/build-module/color-picker/hue-picker.native.js +185 -0
  90. package/build-module/color-picker/hue-picker.native.js.map +1 -0
  91. package/build-module/color-picker/index.native.js +2 -1
  92. package/build-module/color-picker/index.native.js.map +1 -1
  93. package/build-module/color-picker/saturation-picker.native.js +168 -0
  94. package/build-module/color-picker/saturation-picker.native.js.map +1 -0
  95. package/build-module/item-group/item/component.js +0 -1
  96. package/build-module/item-group/item/component.js.map +1 -1
  97. package/build-module/item-group/item-group/component.js +0 -1
  98. package/build-module/item-group/item-group/component.js.map +1 -1
  99. package/build-module/menu-item/index.js +4 -2
  100. package/build-module/menu-item/index.js.map +1 -1
  101. package/build-module/menu-item/types.js.map +1 -1
  102. package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -1
  103. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  104. package/build-module/navigation/index.js +0 -1
  105. package/build-module/navigation/index.js.map +1 -1
  106. package/build-module/navigator/navigator-provider/component.js +1 -2
  107. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  108. package/build-module/palette-edit/styles.js +10 -10
  109. package/build-module/palette-edit/styles.js.map +1 -1
  110. package/build-module/popover/index.js +42 -79
  111. package/build-module/popover/index.js.map +1 -1
  112. package/build-module/popover/overlay-middlewares.js.map +1 -1
  113. package/build-module/popover/types.js.map +1 -1
  114. package/build-module/popover/utils.js +4 -47
  115. package/build-module/popover/utils.js.map +1 -1
  116. package/build-module/progress-bar/styles.js +6 -5
  117. package/build-module/progress-bar/styles.js.map +1 -1
  118. package/build-module/sandbox/index.js +1 -1
  119. package/build-module/sandbox/index.js.map +1 -1
  120. package/build-module/search-control/index.native.js +28 -25
  121. package/build-module/search-control/index.native.js.map +1 -1
  122. package/build-module/shortcut/index.js +13 -0
  123. package/build-module/shortcut/index.js.map +1 -1
  124. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +4 -2
  125. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  126. package/build-module/slot-fill/bubbles-virtually/slot.js +14 -8
  127. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  128. package/build-module/slot-fill/index.js +6 -1
  129. package/build-module/slot-fill/index.js.map +1 -1
  130. package/build-module/snackbar/index.js +1 -1
  131. package/build-module/snackbar/index.js.map +1 -1
  132. package/build-module/spinner/index.js +0 -1
  133. package/build-module/spinner/index.js.map +1 -1
  134. package/build-module/theme/color-algorithms.js +2 -2
  135. package/build-module/theme/color-algorithms.js.map +1 -1
  136. package/build-module/theme/index.js +0 -1
  137. package/build-module/theme/index.js.map +1 -1
  138. package/build-module/toolbar/toolbar-item/index.js +1 -1
  139. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  140. package/build-module/toolbar/toolbar-item/index.native.js +1 -1
  141. package/build-module/toolbar/toolbar-item/index.native.js.map +1 -1
  142. package/build-module/tools-panel/tools-panel/component.js +0 -1
  143. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  144. package/build-module/tools-panel/tools-panel-header/component.js +5 -1
  145. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  146. package/build-module/tree-select/index.js +0 -1
  147. package/build-module/tree-select/index.js.map +1 -1
  148. package/build-module/ui/context/constants.js +0 -2
  149. package/build-module/ui/context/constants.js.map +1 -1
  150. package/build-module/ui/context/context-connect.js +1 -1
  151. package/build-module/ui/context/context-connect.js.map +1 -1
  152. package/build-module/ui/context/context-system-provider.js +1 -1
  153. package/build-module/ui/context/context-system-provider.js.map +1 -1
  154. package/build-module/ui/context/use-context-system.js +1 -1
  155. package/build-module/ui/context/use-context-system.js.map +1 -1
  156. package/build-module/unit-control/index.js +0 -1
  157. package/build-module/unit-control/index.js.map +1 -1
  158. package/build-module/utils/hooks/use-cx.js +2 -1
  159. package/build-module/utils/hooks/use-cx.js.map +1 -1
  160. package/build-module/utils/math.js +0 -11
  161. package/build-module/utils/math.js.map +1 -1
  162. package/build-module/utils/values.js +0 -60
  163. package/build-module/utils/values.js.map +1 -1
  164. package/build-module/view/component.js +1 -2
  165. package/build-module/view/component.js.map +1 -1
  166. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  167. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  168. package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
  169. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  170. package/build-types/animate/stories/index.story.d.ts +9 -9
  171. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  172. package/build-types/base-control/stories/index.story.d.ts +4 -4
  173. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  174. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  175. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  176. package/build-types/border-control/stories/index.story.d.ts +2 -2
  177. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  178. package/build-types/button/stories/e2e/index.story.d.ts +3 -3
  179. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  180. package/build-types/button/stories/index.story.d.ts +10 -9
  181. package/build-types/button/stories/index.story.d.ts.map +1 -1
  182. package/build-types/button-group/stories/index.story.d.ts +3 -3
  183. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  184. package/build-types/card/stories/index.story.d.ts +2 -2
  185. package/build-types/card/stories/index.story.d.ts.map +1 -1
  186. package/build-types/checkbox-control/stories/index.story.d.ts +4 -4
  187. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  188. package/build-types/circular-option-picker/stories/index.story.d.ts +2 -2
  189. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  190. package/build-types/color-indicator/stories/index.story.d.ts +3 -3
  191. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  192. package/build-types/color-palette/stories/index.story.d.ts +3 -3
  193. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  194. package/build-types/color-palette/styles.d.ts +1 -1
  195. package/build-types/color-palette/utils.d.ts +0 -1
  196. package/build-types/color-palette/utils.d.ts.map +1 -1
  197. package/build-types/color-picker/stories/index.story.d.ts +2 -2
  198. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  199. package/build-types/combobox-control/stories/index.story.d.ts +2 -2
  200. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  201. package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
  202. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  203. package/build-types/date-time/date/styles.d.ts +1 -1
  204. package/build-types/date-time/stories/date-time.story.d.ts +5 -5
  205. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  206. package/build-types/date-time/stories/date.story.d.ts +5 -5
  207. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  208. package/build-types/date-time/stories/time.story.d.ts +3 -3
  209. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  210. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  211. package/build-types/disabled/stories/index.story.d.ts +4 -4
  212. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  213. package/build-types/divider/stories/index.story.d.ts +5 -5
  214. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  215. package/build-types/draggable/stories/index.story.d.ts +4 -4
  216. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  217. package/build-types/drop-zone/stories/index.story.d.ts +2 -2
  218. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  219. package/build-types/dropdown/stories/index.story.d.ts +6 -5
  220. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  221. package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
  222. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  223. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +2 -2
  224. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  225. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
  226. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  227. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +2 -2
  228. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  229. package/build-types/elevation/stories/index.story.d.ts +5 -5
  230. package/build-types/elevation/stories/index.story.d.ts.map +1 -1
  231. package/build-types/external-link/stories/index.story.d.ts +3 -3
  232. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  233. package/build-types/flex/stories/index.story.d.ts +4 -4
  234. package/build-types/flex/stories/index.story.d.ts.map +1 -1
  235. package/build-types/focal-point-picker/stories/index.story.d.ts +2 -2
  236. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  237. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +2 -2
  238. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  239. package/build-types/font-size-picker/stories/index.story.d.ts +8 -8
  240. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  241. package/build-types/form-file-upload/stories/index.story.d.ts +2 -2
  242. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  243. package/build-types/form-toggle/stories/index.story.d.ts +3 -3
  244. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  245. package/build-types/form-token-field/stories/index.story.d.ts +7 -7
  246. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  247. package/build-types/gradient-picker/stories/index.story.d.ts +2 -2
  248. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  249. package/build-types/grid/stories/index.story.d.ts +3 -3
  250. package/build-types/grid/stories/index.story.d.ts.map +1 -1
  251. package/build-types/guide/stories/index.story.d.ts +2 -2
  252. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  253. package/build-types/h-stack/stories/e2e/index.story.d.ts +3 -3
  254. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
  255. package/build-types/h-stack/stories/index.story.d.ts +3 -3
  256. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  257. package/build-types/heading/stories/index.story.d.ts +3 -3
  258. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  259. package/build-types/icon/stories/index.story.d.ts +4 -4
  260. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  261. package/build-types/input-control/stories/index.story.d.ts +2 -2
  262. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  263. package/build-types/item-group/item/component.d.ts +0 -1
  264. package/build-types/item-group/item/component.d.ts.map +1 -1
  265. package/build-types/item-group/item/hook.d.ts +1 -1
  266. package/build-types/item-group/item-group/component.d.ts +0 -1
  267. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  268. package/build-types/item-group/stories/index.story.d.ts +6 -6
  269. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  270. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
  271. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  272. package/build-types/menu-group/stories/index.story.d.ts +3 -3
  273. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  274. package/build-types/menu-item/index.d.ts +5 -58
  275. package/build-types/menu-item/index.d.ts.map +1 -1
  276. package/build-types/menu-item/stories/index.story.d.ts +74 -0
  277. package/build-types/menu-item/stories/index.story.d.ts.map +1 -0
  278. package/build-types/menu-item/types.d.ts +3 -2
  279. package/build-types/menu-item/types.d.ts.map +1 -1
  280. package/build-types/menu-items-choice/stories/index.story.d.ts +3 -3
  281. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  282. package/build-types/modal/stories/index.story.d.ts +4 -4
  283. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  284. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +3 -3
  285. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  286. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +3 -3
  287. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  288. package/build-types/navigation/index.d.ts +0 -1
  289. package/build-types/navigation/index.d.ts.map +1 -1
  290. package/build-types/navigation/stories/index.story.d.ts +2 -2
  291. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  292. package/build-types/navigation/stories/utils/controlled-state.d.ts +2 -2
  293. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
  294. package/build-types/navigation/stories/utils/default.d.ts +2 -2
  295. package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
  296. package/build-types/navigation/stories/utils/group.d.ts +2 -2
  297. package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
  298. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +2 -2
  299. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
  300. package/build-types/navigation/stories/utils/more-examples.d.ts +2 -2
  301. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
  302. package/build-types/navigation/stories/utils/search.d.ts +2 -2
  303. package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
  304. package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
  305. package/build-types/navigator/navigator-provider/component.d.ts +0 -1
  306. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  307. package/build-types/navigator/stories/index.story.d.ts +5 -5
  308. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  309. package/build-types/notice/stories/index.story.d.ts +3 -3
  310. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  311. package/build-types/number-control/stories/index.story.d.ts +2 -2
  312. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  313. package/build-types/palette-edit/stories/index.story.d.ts +2 -2
  314. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  315. package/build-types/palette-edit/styles.d.ts +1 -1
  316. package/build-types/palette-edit/styles.d.ts.map +1 -1
  317. package/build-types/panel/stories/index.story.d.ts +6 -6
  318. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  319. package/build-types/placeholder/stories/index.story.d.ts +3 -3
  320. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  321. package/build-types/popover/index.d.ts.map +1 -1
  322. package/build-types/popover/overlay-middlewares.d.ts +2 -2
  323. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  324. package/build-types/popover/stories/index.story.d.ts +7 -7
  325. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  326. package/build-types/popover/types.d.ts +6 -0
  327. package/build-types/popover/types.d.ts.map +1 -1
  328. package/build-types/popover/utils.d.ts +1 -21
  329. package/build-types/popover/utils.d.ts.map +1 -1
  330. package/build-types/progress-bar/stories/index.story.d.ts +3 -3
  331. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  332. package/build-types/progress-bar/styles.d.ts.map +1 -1
  333. package/build-types/query-controls/stories/index.story.d.ts +4 -4
  334. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  335. package/build-types/radio-control/stories/index.story.d.ts +3 -3
  336. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  337. package/build-types/range-control/stories/index.story.d.ts +9 -9
  338. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  339. package/build-types/resizable-box/stories/index.story.d.ts +2 -2
  340. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  341. package/build-types/responsive-wrapper/stories/index.story.d.ts +3 -3
  342. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  343. package/build-types/sandbox/index.d.ts.map +1 -1
  344. package/build-types/sandbox/stories/index.story.d.ts +2 -2
  345. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  346. package/build-types/scroll-lock/stories/index.story.d.ts +3 -3
  347. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  348. package/build-types/scrollable/stories/index.story.d.ts +3 -3
  349. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  350. package/build-types/search-control/stories/index.story.d.ts +2 -16
  351. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  352. package/build-types/select-control/stories/index.story.d.ts +2 -2
  353. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  354. package/build-types/shortcut/index.d.ts +13 -0
  355. package/build-types/shortcut/index.d.ts.map +1 -1
  356. package/build-types/shortcut/stories/index.story.d.ts +13 -0
  357. package/build-types/shortcut/stories/index.story.d.ts.map +1 -0
  358. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +1 -0
  359. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  360. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -6
  361. package/build-types/slot-fill/index.d.ts +1 -1
  362. package/build-types/slot-fill/index.d.ts.map +1 -1
  363. package/build-types/snackbar/stories/index.story.d.ts +7 -7
  364. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  365. package/build-types/snackbar/stories/list.story.d.ts +3 -3
  366. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  367. package/build-types/spacer/stories/index.story.d.ts +3 -3
  368. package/build-types/spacer/stories/index.story.d.ts.map +1 -1
  369. package/build-types/spinner/index.d.ts +0 -1
  370. package/build-types/spinner/index.d.ts.map +1 -1
  371. package/build-types/spinner/stories/index.story.d.ts +4 -4
  372. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  373. package/build-types/surface/stories/index.story.d.ts +3 -3
  374. package/build-types/surface/stories/index.story.d.ts.map +1 -1
  375. package/build-types/tab-panel/stories/index.story.d.ts +2 -2
  376. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  377. package/build-types/text-control/stories/index.story.d.ts +4 -4
  378. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  379. package/build-types/text-highlight/stories/index.story.d.ts +3 -3
  380. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  381. package/build-types/textarea-control/stories/index.story.d.ts +3 -3
  382. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  383. package/build-types/theme/index.d.ts +0 -1
  384. package/build-types/theme/index.d.ts.map +1 -1
  385. package/build-types/theme/stories/index.story.d.ts +4 -4
  386. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  387. package/build-types/tip/stories/index.story.d.ts +3 -3
  388. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  389. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  390. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  391. package/build-types/toggle-group-control/stories/index.story.d.ts +6 -6
  392. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  393. package/build-types/toolbar/stories/index.story.d.ts +2 -2
  394. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  395. package/build-types/tools-panel/stories/index.story.d.ts +8 -8
  396. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  397. package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
  398. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  399. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  400. package/build-types/tree-grid/stories/index.story.d.ts +2 -2
  401. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  402. package/build-types/tree-select/index.d.ts +0 -1
  403. package/build-types/tree-select/index.d.ts.map +1 -1
  404. package/build-types/tree-select/stories/index.story.d.ts +2 -2
  405. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  406. package/build-types/truncate/stories/index.story.d.ts +4 -4
  407. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  408. package/build-types/ui/context/constants.d.ts +0 -2
  409. package/build-types/ui/context/constants.d.ts.map +1 -1
  410. package/build-types/unit-control/index.d.ts +0 -1
  411. package/build-types/unit-control/index.d.ts.map +1 -1
  412. package/build-types/unit-control/stories/index.story.d.ts +7 -7
  413. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  414. package/build-types/utils/hooks/use-cx.d.ts +2 -1
  415. package/build-types/utils/hooks/use-cx.d.ts.map +1 -1
  416. package/build-types/utils/math.d.ts +0 -8
  417. package/build-types/utils/math.d.ts.map +1 -1
  418. package/build-types/utils/values.d.ts +0 -13
  419. package/build-types/utils/values.d.ts.map +1 -1
  420. package/build-types/v-stack/stories/e2e/index.story.d.ts +3 -3
  421. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
  422. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  423. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  424. package/build-types/view/component.d.ts +0 -1
  425. package/build-types/view/component.d.ts.map +1 -1
  426. package/build-types/view/stories/index.story.d.ts +3 -3
  427. package/build-types/view/stories/index.story.d.ts.map +1 -1
  428. package/build-types/visually-hidden/stories/index.story.d.ts +5 -5
  429. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  430. package/build-types/z-stack/stories/index.story.d.ts +3 -3
  431. package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
  432. package/package.json +20 -20
  433. package/src/alignment-matrix-control/stories/index.story.tsx +8 -4
  434. package/src/alignment-matrix-control/test/index.tsx +6 -2
  435. package/src/angle-picker-control/stories/index.story.tsx +4 -4
  436. package/src/animate/stories/index.story.tsx +13 -11
  437. package/src/base-control/stories/index.story.tsx +6 -10
  438. package/src/border-box-control/stories/index.story.tsx +6 -10
  439. package/src/border-control/stories/index.story.tsx +9 -15
  440. package/src/button/stories/e2e/index.story.tsx +3 -3
  441. package/src/button/stories/index.story.tsx +11 -11
  442. package/src/button-group/stories/index.story.tsx +5 -7
  443. package/src/card/stories/index.story.tsx +6 -6
  444. package/src/checkbox-control/stories/index.story.tsx +8 -7
  445. package/src/circular-option-picker/stories/index.story.tsx +20 -5
  446. package/src/color-indicator/stories/index.story.tsx +5 -7
  447. package/src/color-palette/stories/index.story.tsx +13 -22
  448. package/src/color-palette/test/index.tsx +15 -9
  449. package/src/color-palette/test/utils.ts +0 -15
  450. package/src/color-palette/utils.ts +0 -7
  451. package/src/color-picker/hsv-color-picker.native.js +88 -0
  452. package/src/color-picker/hue-picker.native.js +194 -0
  453. package/src/color-picker/index.native.js +2 -1
  454. package/src/color-picker/saturation-picker.native.js +163 -0
  455. package/src/color-picker/stories/index.story.tsx +4 -4
  456. package/src/color-picker/style.native.scss +23 -0
  457. package/src/combobox-control/stories/index.story.tsx +4 -4
  458. package/src/confirm-dialog/stories/index.story.js +1 -1
  459. package/src/custom-gradient-picker/stories/index.story.tsx +4 -4
  460. package/src/date-time/stories/date-time.story.tsx +9 -11
  461. package/src/date-time/stories/date.story.tsx +9 -10
  462. package/src/date-time/stories/time.story.tsx +5 -5
  463. package/src/dimension-control/stories/index.story.tsx +4 -4
  464. package/src/disabled/stories/index.story.tsx +5 -5
  465. package/src/divider/stories/index.story.tsx +7 -7
  466. package/src/draggable/stories/index.story.tsx +5 -7
  467. package/src/drop-zone/stories/index.story.tsx +4 -4
  468. package/src/dropdown/stories/index.story.tsx +8 -6
  469. package/src/dropdown-menu/stories/index.story.tsx +4 -4
  470. package/src/dropdown-menu-v2/stories/index.story.tsx +28 -11
  471. package/src/duotone-picker/stories/duotone-picker.story.tsx +4 -7
  472. package/src/duotone-picker/stories/duotone-swatch.story.tsx +4 -4
  473. package/src/elevation/stories/index.story.tsx +8 -8
  474. package/src/external-link/stories/index.story.tsx +5 -7
  475. package/src/flex/stories/index.story.tsx +7 -7
  476. package/src/focal-point-picker/stories/index.story.tsx +4 -4
  477. package/src/font-size-picker/stories/e2e/index.story.tsx +3 -3
  478. package/src/font-size-picker/stories/index.story.tsx +11 -11
  479. package/src/form-file-upload/stories/index.story.tsx +4 -4
  480. package/src/form-toggle/stories/index.story.tsx +5 -8
  481. package/src/form-token-field/stories/index.story.tsx +11 -12
  482. package/src/gradient-picker/stories/index.story.tsx +4 -4
  483. package/src/grid/stories/index.story.tsx +5 -5
  484. package/src/guide/stories/index.story.tsx +3 -3
  485. package/src/h-stack/stories/e2e/index.story.tsx +4 -4
  486. package/src/h-stack/stories/index.story.tsx +5 -5
  487. package/src/heading/stories/index.story.tsx +4 -4
  488. package/src/icon/stories/index.story.tsx +6 -6
  489. package/src/input-control/stories/index.story.tsx +6 -4
  490. package/src/item-group/item/component.tsx +0 -1
  491. package/src/item-group/item-group/component.tsx +0 -1
  492. package/src/item-group/stories/index.story.tsx +12 -13
  493. package/src/keyboard-shortcuts/stories/index.story.tsx +4 -4
  494. package/src/menu-group/stories/index.story.tsx +6 -6
  495. package/src/menu-item/README.md +1 -1
  496. package/src/menu-item/index.tsx +5 -2
  497. package/src/menu-item/stories/index.story.tsx +80 -0
  498. package/src/menu-item/types.ts +3 -2
  499. package/src/menu-items-choice/stories/index.story.tsx +5 -7
  500. package/src/mobile/link-settings/link-settings-navigation.native.js +1 -1
  501. package/src/modal/stories/index.story.tsx +5 -10
  502. package/src/navigable-container/stories/navigable-menu.story.tsx +4 -4
  503. package/src/navigable-container/stories/tabbable-container.story.tsx +4 -4
  504. package/src/navigation/index.tsx +0 -1
  505. package/src/navigation/stories/index.story.tsx +17 -3
  506. package/src/navigation/stories/utils/controlled-state.tsx +2 -2
  507. package/src/navigation/stories/utils/default.tsx +2 -2
  508. package/src/navigation/stories/utils/group.tsx +2 -2
  509. package/src/navigation/stories/utils/hide-if-empty.tsx +2 -2
  510. package/src/navigation/stories/utils/more-examples.tsx +2 -2
  511. package/src/navigation/stories/utils/search.tsx +2 -2
  512. package/src/navigator/navigator-provider/component.tsx +0 -1
  513. package/src/navigator/stories/index.story.tsx +10 -11
  514. package/src/notice/stories/index.story.tsx +7 -7
  515. package/src/number-control/stories/index.story.tsx +4 -4
  516. package/src/palette-edit/stories/index.story.tsx +4 -4
  517. package/src/palette-edit/styles.js +0 -1
  518. package/src/panel/stories/index.story.tsx +10 -12
  519. package/src/placeholder/stories/index.story.tsx +5 -7
  520. package/src/popover/README.md +2 -2
  521. package/src/popover/index.tsx +69 -103
  522. package/src/popover/overlay-middlewares.tsx +2 -2
  523. package/src/popover/stories/index.story.tsx +8 -10
  524. package/src/popover/test/index.tsx +15 -1
  525. package/src/popover/types.ts +6 -0
  526. package/src/popover/utils.ts +5 -56
  527. package/src/progress-bar/stories/index.story.tsx +5 -7
  528. package/src/progress-bar/styles.ts +4 -1
  529. package/src/query-controls/stories/index.story.tsx +6 -7
  530. package/src/radio-control/stories/index.story.tsx +5 -7
  531. package/src/radio-group/stories/index.story.js +1 -0
  532. package/src/range-control/stories/index.story.tsx +13 -19
  533. package/src/resizable-box/stories/index.story.tsx +4 -4
  534. package/src/responsive-wrapper/stories/index.story.tsx +5 -6
  535. package/src/sandbox/index.tsx +4 -1
  536. package/src/sandbox/stories/index.story.tsx +4 -6
  537. package/src/scroll-lock/stories/index.story.tsx +4 -4
  538. package/src/scrollable/stories/index.story.tsx +5 -5
  539. package/src/search-control/index.native.js +39 -27
  540. package/src/search-control/stories/index.story.tsx +4 -4
  541. package/src/select-control/stories/index.story.tsx +4 -4
  542. package/src/shortcut/index.tsx +13 -0
  543. package/src/shortcut/stories/index.story.tsx +33 -0
  544. package/src/slot-fill/README.md +5 -5
  545. package/src/slot-fill/bubbles-virtually/slot-fill-context.js +3 -0
  546. package/src/slot-fill/bubbles-virtually/slot.js +17 -5
  547. package/src/slot-fill/index.js +6 -1
  548. package/src/slot-fill/stories/index.story.js +3 -1
  549. package/src/slot-fill/test/__snapshots__/slot.js.snap +12 -4
  550. package/src/snackbar/stories/index.story.tsx +11 -14
  551. package/src/snackbar/stories/list.story.tsx +4 -4
  552. package/src/spacer/stories/index.story.tsx +5 -5
  553. package/src/spinner/index.tsx +0 -1
  554. package/src/spinner/stories/index.story.tsx +6 -6
  555. package/src/surface/stories/index.story.tsx +5 -5
  556. package/src/tab-panel/stories/index.story.tsx +6 -14
  557. package/src/tab-panel/test/index.tsx +9 -25
  558. package/src/text/test/index.tsx +1 -1
  559. package/src/text-control/stories/index.story.tsx +8 -7
  560. package/src/text-highlight/stories/index.story.tsx +5 -7
  561. package/src/textarea-control/stories/index.story.tsx +5 -7
  562. package/src/theme/index.tsx +0 -1
  563. package/src/theme/stories/index.story.tsx +7 -7
  564. package/src/tip/stories/index.story.tsx +5 -5
  565. package/src/toggle-control/stories/index.story.tsx +4 -4
  566. package/src/toggle-group-control/stories/index.story.tsx +18 -12
  567. package/src/toolbar/stories/index.story.tsx +14 -4
  568. package/src/tools-panel/stories/index.story.tsx +18 -13
  569. package/src/tools-panel/tools-panel/component.tsx +0 -1
  570. package/src/tools-panel/tools-panel-header/component.tsx +3 -0
  571. package/src/tooltip/stories/index.story.js +1 -1
  572. package/src/tree-grid/stories/index.story.tsx +5 -3
  573. package/src/tree-select/index.tsx +0 -1
  574. package/src/tree-select/stories/index.story.tsx +4 -4
  575. package/src/truncate/stories/index.story.tsx +6 -8
  576. package/src/ui/context/constants.js +0 -2
  577. package/src/unit-control/index.tsx +0 -1
  578. package/src/unit-control/stories/index.story.tsx +11 -10
  579. package/src/utils/hooks/use-cx.ts +2 -1
  580. package/src/utils/math.js +0 -11
  581. package/src/utils/values.js +0 -81
  582. package/src/v-stack/stories/e2e/index.story.tsx +4 -4
  583. package/src/v-stack/stories/index.story.tsx +4 -4
  584. package/src/view/component.tsx +0 -1
  585. package/src/view/stories/index.story.tsx +5 -5
  586. package/src/visually-hidden/stories/index.story.tsx +8 -8
  587. package/src/z-stack/stories/index.story.tsx +5 -5
  588. package/tsconfig.tsbuildinfo +1 -1
  589. package/build/popover/limit-shift.js +0 -129
  590. package/build/popover/limit-shift.js.map +0 -1
  591. package/build/ui/utils/get-high-dpi.js +0 -16
  592. package/build/ui/utils/get-high-dpi.js.map +0 -1
  593. package/build/utils/browsers.js +0 -32
  594. package/build/utils/browsers.js.map +0 -1
  595. package/build/utils/events.js +0 -43
  596. package/build/utils/events.js.map +0 -1
  597. package/build-module/popover/limit-shift.js +0 -122
  598. package/build-module/popover/limit-shift.js.map +0 -1
  599. package/build-module/ui/utils/get-high-dpi.js +0 -11
  600. package/build-module/ui/utils/get-high-dpi.js.map +0 -1
  601. package/build-module/utils/browsers.js +0 -25
  602. package/build-module/utils/browsers.js.map +0 -1
  603. package/build-module/utils/events.js +0 -37
  604. package/build-module/utils/events.js.map +0 -1
  605. package/build-types/alignment-matrix-control/stories/index.d.ts +0 -14
  606. package/build-types/alignment-matrix-control/stories/index.d.ts.map +0 -1
  607. package/build-types/angle-picker-control/stories/index.d.ts +0 -15
  608. package/build-types/angle-picker-control/stories/index.d.ts.map +0 -1
  609. package/build-types/animate/stories/index.d.ts +0 -18
  610. package/build-types/animate/stories/index.d.ts.map +0 -1
  611. package/build-types/base-control/stories/index.d.ts +0 -25
  612. package/build-types/base-control/stories/index.d.ts.map +0 -1
  613. package/build-types/border-box-control/stories/index.d.ts +0 -17
  614. package/build-types/border-box-control/stories/index.d.ts.map +0 -1
  615. package/build-types/border-control/stories/index.d.ts +0 -119
  616. package/build-types/border-control/stories/index.d.ts.map +0 -1
  617. package/build-types/button/stories/e2e/index.d.ts +0 -15
  618. package/build-types/button/stories/e2e/index.d.ts.map +0 -1
  619. package/build-types/button/stories/index.d.ts +0 -20
  620. package/build-types/button/stories/index.d.ts.map +0 -1
  621. package/build-types/button-group/stories/index.d.ts +0 -12
  622. package/build-types/button-group/stories/index.d.ts.map +0 -1
  623. package/build-types/card/stories/index.d.ts +0 -32
  624. package/build-types/card/stories/index.d.ts.map +0 -1
  625. package/build-types/checkbox-control/stories/index.d.ts +0 -13
  626. package/build-types/checkbox-control/stories/index.d.ts.map +0 -1
  627. package/build-types/circular-option-picker/stories/index.d.ts +0 -14
  628. package/build-types/circular-option-picker/stories/index.d.ts.map +0 -1
  629. package/build-types/color-indicator/stories/index.d.ts +0 -12
  630. package/build-types/color-indicator/stories/index.d.ts.map +0 -1
  631. package/build-types/color-palette/stories/index.d.ts +0 -46
  632. package/build-types/color-palette/stories/index.d.ts.map +0 -1
  633. package/build-types/color-picker/stories/index.d.ts +0 -19
  634. package/build-types/color-picker/stories/index.d.ts.map +0 -1
  635. package/build-types/combobox-control/stories/index.d.ts +0 -18
  636. package/build-types/combobox-control/stories/index.d.ts.map +0 -1
  637. package/build-types/custom-gradient-picker/stories/index.d.ts +0 -12
  638. package/build-types/custom-gradient-picker/stories/index.d.ts.map +0 -1
  639. package/build-types/date-time/stories/date-time.d.ts +0 -14
  640. package/build-types/date-time/stories/date-time.d.ts.map +0 -1
  641. package/build-types/date-time/stories/date.d.ts +0 -14
  642. package/build-types/date-time/stories/date.d.ts.map +0 -1
  643. package/build-types/date-time/stories/time.d.ts +0 -12
  644. package/build-types/date-time/stories/time.d.ts.map +0 -1
  645. package/build-types/dimension-control/stories/index.d.ts +0 -12
  646. package/build-types/dimension-control/stories/index.d.ts.map +0 -1
  647. package/build-types/disabled/stories/index.d.ts +0 -13
  648. package/build-types/disabled/stories/index.d.ts.map +0 -1
  649. package/build-types/divider/stories/index.d.ts +0 -11
  650. package/build-types/divider/stories/index.d.ts.map +0 -1
  651. package/build-types/draggable/stories/index.d.ts +0 -20
  652. package/build-types/draggable/stories/index.d.ts.map +0 -1
  653. package/build-types/drop-zone/stories/index.d.ts +0 -12
  654. package/build-types/drop-zone/stories/index.d.ts.map +0 -1
  655. package/build-types/dropdown/stories/index.d.ts +0 -23
  656. package/build-types/dropdown/stories/index.d.ts.map +0 -1
  657. package/build-types/dropdown-menu/stories/index.d.ts +0 -14
  658. package/build-types/dropdown-menu/stories/index.d.ts.map +0 -1
  659. package/build-types/dropdown-menu-v2/stories/index.d.ts +0 -11
  660. package/build-types/dropdown-menu-v2/stories/index.d.ts.map +0 -1
  661. package/build-types/duotone-picker/stories/duotone-picker.d.ts +0 -12
  662. package/build-types/duotone-picker/stories/duotone-picker.d.ts.map +0 -1
  663. package/build-types/duotone-picker/stories/duotone-swatch.d.ts +0 -14
  664. package/build-types/duotone-picker/stories/duotone-swatch.d.ts.map +0 -1
  665. package/build-types/elevation/stories/index.d.ts +0 -22
  666. package/build-types/elevation/stories/index.d.ts.map +0 -1
  667. package/build-types/external-link/stories/index.d.ts +0 -12
  668. package/build-types/external-link/stories/index.d.ts.map +0 -1
  669. package/build-types/flex/stories/index.d.ts +0 -13
  670. package/build-types/flex/stories/index.d.ts.map +0 -1
  671. package/build-types/focal-point-picker/stories/index.d.ts +0 -15
  672. package/build-types/focal-point-picker/stories/index.d.ts.map +0 -1
  673. package/build-types/font-size-picker/stories/e2e/index.d.ts +0 -16
  674. package/build-types/font-size-picker/stories/e2e/index.d.ts.map +0 -1
  675. package/build-types/font-size-picker/stories/index.d.ts +0 -31
  676. package/build-types/font-size-picker/stories/index.d.ts.map +0 -1
  677. package/build-types/form-file-upload/stories/index.d.ts +0 -23
  678. package/build-types/form-file-upload/stories/index.d.ts.map +0 -1
  679. package/build-types/form-toggle/stories/index.d.ts +0 -12
  680. package/build-types/form-toggle/stories/index.d.ts.map +0 -1
  681. package/build-types/form-token-field/stories/index.d.ts +0 -26
  682. package/build-types/form-token-field/stories/index.d.ts.map +0 -1
  683. package/build-types/gradient-picker/stories/index.d.ts +0 -14
  684. package/build-types/gradient-picker/stories/index.d.ts.map +0 -1
  685. package/build-types/grid/stories/index.d.ts +0 -9
  686. package/build-types/grid/stories/index.d.ts.map +0 -1
  687. package/build-types/guide/stories/index.d.ts +0 -9
  688. package/build-types/guide/stories/index.d.ts.map +0 -1
  689. package/build-types/h-stack/stories/e2e/index.d.ts +0 -9
  690. package/build-types/h-stack/stories/e2e/index.d.ts.map +0 -1
  691. package/build-types/h-stack/stories/index.d.ts +0 -9
  692. package/build-types/h-stack/stories/index.d.ts.map +0 -1
  693. package/build-types/heading/stories/index.d.ts +0 -12
  694. package/build-types/heading/stories/index.d.ts.map +0 -1
  695. package/build-types/icon/stories/index.d.ts +0 -22
  696. package/build-types/icon/stories/index.d.ts.map +0 -1
  697. package/build-types/input-control/stories/index.d.ts +0 -28
  698. package/build-types/input-control/stories/index.d.ts.map +0 -1
  699. package/build-types/item-group/stories/index.d.ts +0 -15
  700. package/build-types/item-group/stories/index.d.ts.map +0 -1
  701. package/build-types/keyboard-shortcuts/stories/index.d.ts +0 -12
  702. package/build-types/keyboard-shortcuts/stories/index.d.ts.map +0 -1
  703. package/build-types/menu-group/stories/index.d.ts +0 -17
  704. package/build-types/menu-group/stories/index.d.ts.map +0 -1
  705. package/build-types/menu-items-choice/stories/index.d.ts +0 -12
  706. package/build-types/menu-items-choice/stories/index.d.ts.map +0 -1
  707. package/build-types/modal/stories/index.d.ts +0 -10
  708. package/build-types/modal/stories/index.d.ts.map +0 -1
  709. package/build-types/navigable-container/stories/navigable-menu.d.ts +0 -12
  710. package/build-types/navigable-container/stories/navigable-menu.d.ts.map +0 -1
  711. package/build-types/navigable-container/stories/tabbable-container.d.ts +0 -12
  712. package/build-types/navigable-container/stories/tabbable-container.d.ts.map +0 -1
  713. package/build-types/navigation/stories/index.d.ts +0 -18
  714. package/build-types/navigation/stories/index.d.ts.map +0 -1
  715. package/build-types/navigator/stories/index.d.ts +0 -11
  716. package/build-types/navigator/stories/index.d.ts.map +0 -1
  717. package/build-types/notice/stories/index.d.ts +0 -17
  718. package/build-types/notice/stories/index.d.ts.map +0 -1
  719. package/build-types/number-control/stories/index.d.ts +0 -25
  720. package/build-types/number-control/stories/index.d.ts.map +0 -1
  721. package/build-types/palette-edit/stories/index.d.ts +0 -13
  722. package/build-types/palette-edit/stories/index.d.ts.map +0 -1
  723. package/build-types/panel/stories/index.d.ts +0 -19
  724. package/build-types/panel/stories/index.d.ts.map +0 -1
  725. package/build-types/placeholder/stories/index.d.ts +0 -12
  726. package/build-types/placeholder/stories/index.d.ts.map +0 -1
  727. package/build-types/popover/limit-shift.d.ts +0 -87
  728. package/build-types/popover/limit-shift.d.ts.map +0 -1
  729. package/build-types/popover/stories/e2e/index.d.ts +0 -8
  730. package/build-types/popover/stories/e2e/index.d.ts.map +0 -1
  731. package/build-types/popover/stories/index.d.ts +0 -13
  732. package/build-types/popover/stories/index.d.ts.map +0 -1
  733. package/build-types/progress-bar/stories/index.d.ts +0 -12
  734. package/build-types/progress-bar/stories/index.d.ts.map +0 -1
  735. package/build-types/query-controls/stories/index.d.ts +0 -13
  736. package/build-types/query-controls/stories/index.d.ts.map +0 -1
  737. package/build-types/radio-control/stories/index.d.ts +0 -12
  738. package/build-types/radio-control/stories/index.d.ts.map +0 -1
  739. package/build-types/range-control/stories/index.d.ts +0 -48
  740. package/build-types/range-control/stories/index.d.ts.map +0 -1
  741. package/build-types/resizable-box/stories/index.d.ts +0 -61
  742. package/build-types/resizable-box/stories/index.d.ts.map +0 -1
  743. package/build-types/responsive-wrapper/stories/index.d.ts +0 -22
  744. package/build-types/responsive-wrapper/stories/index.d.ts.map +0 -1
  745. package/build-types/sandbox/stories/index.d.ts +0 -12
  746. package/build-types/sandbox/stories/index.d.ts.map +0 -1
  747. package/build-types/scroll-lock/stories/index.d.ts +0 -9
  748. package/build-types/scroll-lock/stories/index.d.ts.map +0 -1
  749. package/build-types/scrollable/stories/index.d.ts +0 -9
  750. package/build-types/scrollable/stories/index.d.ts.map +0 -1
  751. package/build-types/search-control/stories/index.d.ts +0 -47
  752. package/build-types/search-control/stories/index.d.ts.map +0 -1
  753. package/build-types/select-control/stories/index.d.ts +0 -19
  754. package/build-types/select-control/stories/index.d.ts.map +0 -1
  755. package/build-types/snackbar/stories/index.d.ts +0 -16
  756. package/build-types/snackbar/stories/index.d.ts.map +0 -1
  757. package/build-types/snackbar/stories/list.d.ts +0 -12
  758. package/build-types/snackbar/stories/list.d.ts.map +0 -1
  759. package/build-types/spacer/stories/index.d.ts +0 -12
  760. package/build-types/spacer/stories/index.d.ts.map +0 -1
  761. package/build-types/spinner/stories/index.d.ts +0 -13
  762. package/build-types/spinner/stories/index.d.ts.map +0 -1
  763. package/build-types/surface/stories/index.d.ts +0 -12
  764. package/build-types/surface/stories/index.d.ts.map +0 -1
  765. package/build-types/tab-panel/stories/index.d.ts +0 -16
  766. package/build-types/tab-panel/stories/index.d.ts.map +0 -1
  767. package/build-types/text-control/stories/index.d.ts +0 -13
  768. package/build-types/text-control/stories/index.d.ts.map +0 -1
  769. package/build-types/text-highlight/stories/index.d.ts +0 -12
  770. package/build-types/text-highlight/stories/index.d.ts.map +0 -1
  771. package/build-types/textarea-control/stories/index.d.ts +0 -12
  772. package/build-types/textarea-control/stories/index.d.ts.map +0 -1
  773. package/build-types/theme/stories/index.d.ts +0 -17
  774. package/build-types/theme/stories/index.d.ts.map +0 -1
  775. package/build-types/tip/stories/index.d.ts +0 -12
  776. package/build-types/tip/stories/index.d.ts.map +0 -1
  777. package/build-types/toggle-control/stories/index.d.ts +0 -13
  778. package/build-types/toggle-control/stories/index.d.ts.map +0 -1
  779. package/build-types/toggle-group-control/stories/index.d.ts +0 -27
  780. package/build-types/toggle-group-control/stories/index.d.ts.map +0 -1
  781. package/build-types/toolbar/stories/index.d.ts +0 -14
  782. package/build-types/toolbar/stories/index.d.ts.map +0 -1
  783. package/build-types/tools-panel/stories/index.d.ts +0 -17
  784. package/build-types/tools-panel/stories/index.d.ts.map +0 -1
  785. package/build-types/tree-grid/stories/index.d.ts +0 -13
  786. package/build-types/tree-grid/stories/index.d.ts.map +0 -1
  787. package/build-types/tree-select/stories/index.d.ts +0 -12
  788. package/build-types/tree-select/stories/index.d.ts.map +0 -1
  789. package/build-types/truncate/stories/index.d.ts +0 -13
  790. package/build-types/truncate/stories/index.d.ts.map +0 -1
  791. package/build-types/ui/control-group/component.d.ts +0 -27
  792. package/build-types/ui/control-group/component.d.ts.map +0 -1
  793. package/build-types/ui/control-group/context.d.ts +0 -4
  794. package/build-types/ui/control-group/context.d.ts.map +0 -1
  795. package/build-types/ui/control-group/hook.d.ts +0 -266
  796. package/build-types/ui/control-group/hook.d.ts.map +0 -1
  797. package/build-types/ui/control-group/index.d.ts +0 -4
  798. package/build-types/ui/control-group/index.d.ts.map +0 -1
  799. package/build-types/ui/control-group/styles.d.ts +0 -8
  800. package/build-types/ui/control-group/styles.d.ts.map +0 -1
  801. package/build-types/ui/control-group/types.d.ts +0 -27
  802. package/build-types/ui/control-group/types.d.ts.map +0 -1
  803. package/build-types/ui/control-label/component.d.ts +0 -23
  804. package/build-types/ui/control-label/component.d.ts.map +0 -1
  805. package/build-types/ui/control-label/hook.d.ts +0 -265
  806. package/build-types/ui/control-label/hook.d.ts.map +0 -1
  807. package/build-types/ui/control-label/index.d.ts +0 -3
  808. package/build-types/ui/control-label/index.d.ts.map +0 -1
  809. package/build-types/ui/control-label/styles.d.ts +0 -7
  810. package/build-types/ui/control-label/styles.d.ts.map +0 -1
  811. package/build-types/ui/control-label/types.d.ts +0 -9
  812. package/build-types/ui/control-label/types.d.ts.map +0 -1
  813. package/build-types/ui/form-group/form-group-content.d.ts +0 -7
  814. package/build-types/ui/form-group/form-group-content.d.ts.map +0 -1
  815. package/build-types/ui/form-group/form-group-context.d.ts +0 -11
  816. package/build-types/ui/form-group/form-group-context.d.ts.map +0 -1
  817. package/build-types/ui/form-group/form-group-help.d.ts +0 -18
  818. package/build-types/ui/form-group/form-group-help.d.ts.map +0 -1
  819. package/build-types/ui/form-group/form-group-label.d.ts +0 -8
  820. package/build-types/ui/form-group/form-group-label.d.ts.map +0 -1
  821. package/build-types/ui/form-group/form-group-styles.d.ts +0 -2
  822. package/build-types/ui/form-group/form-group-styles.d.ts.map +0 -1
  823. package/build-types/ui/form-group/form-group.d.ts +0 -53
  824. package/build-types/ui/form-group/form-group.d.ts.map +0 -1
  825. package/build-types/ui/form-group/index.d.ts +0 -4
  826. package/build-types/ui/form-group/index.d.ts.map +0 -1
  827. package/build-types/ui/form-group/types.d.ts +0 -30
  828. package/build-types/ui/form-group/types.d.ts.map +0 -1
  829. package/build-types/ui/form-group/use-form-group.d.ts +0 -593
  830. package/build-types/ui/form-group/use-form-group.d.ts.map +0 -1
  831. package/build-types/ui/index.d.ts +0 -6
  832. package/build-types/ui/index.d.ts.map +0 -1
  833. package/build-types/ui/spinner/component.d.ts +0 -13
  834. package/build-types/ui/spinner/component.d.ts.map +0 -1
  835. package/build-types/ui/spinner/index.d.ts +0 -2
  836. package/build-types/ui/spinner/index.d.ts.map +0 -1
  837. package/build-types/ui/spinner/styles.d.ts +0 -13
  838. package/build-types/ui/spinner/styles.d.ts.map +0 -1
  839. package/build-types/ui/spinner/utils.d.ts +0 -3
  840. package/build-types/ui/spinner/utils.d.ts.map +0 -1
  841. package/build-types/ui/utils/get-high-dpi.d.ts +0 -3
  842. package/build-types/ui/utils/get-high-dpi.d.ts.map +0 -1
  843. package/build-types/unit-control/stories/index.d.ts +0 -33
  844. package/build-types/unit-control/stories/index.d.ts.map +0 -1
  845. package/build-types/utils/browsers.d.ts +0 -11
  846. package/build-types/utils/browsers.d.ts.map +0 -1
  847. package/build-types/utils/events.d.ts +0 -11
  848. package/build-types/utils/events.d.ts.map +0 -1
  849. package/build-types/v-stack/stories/e2e/index.d.ts +0 -9
  850. package/build-types/v-stack/stories/e2e/index.d.ts.map +0 -1
  851. package/build-types/v-stack/stories/index.d.ts +0 -13
  852. package/build-types/v-stack/stories/index.d.ts.map +0 -1
  853. package/build-types/view/stories/index.d.ts +0 -12
  854. package/build-types/view/stories/index.d.ts.map +0 -1
  855. package/build-types/visually-hidden/stories/index.d.ts +0 -14
  856. package/build-types/visually-hidden/stories/index.d.ts.map +0 -1
  857. package/build-types/z-stack/stories/index.d.ts +0 -6
  858. package/build-types/z-stack/stories/index.d.ts.map +0 -1
  859. package/src/popover/limit-shift.ts +0 -205
  860. package/src/ui/utils/get-high-dpi.ts +0 -20
  861. package/src/utils/browsers.js +0 -36
  862. package/src/utils/events.ts +0 -50
  863. package/src/utils/test/events.js +0 -63
  864. package/src/utils/test/values.js +0 -101
@@ -1 +1 @@
1
- {"version":3,"names":["classnames","useFloating","flip","flipMiddleware","shift","shiftMiddleware","autoUpdate","arrow","offset","offsetMiddleware","size","motion","useReducedMotion","useRef","useLayoutEffect","forwardRef","createContext","useContext","useMemo","useState","useCallback","useViewportMatch","useMergeRefs","__experimentalUseDialog","useDialog","close","deprecated","Path","SVG","getScrollContainer","Button","ScrollLock","Slot","Fill","useSlot","computePopoverPosition","getFrameOffset","getFrameScale","positionToPlacement","placementToMotionAnimationProps","getReferenceOwnerDocument","getReferenceElement","limitShift","customLimitShift","overlayMiddlewares","SLOT_NAME","ArrowTriangle","createElement","xmlns","viewBox","className","role","d","vectorEffect","AnimatedWrapper","style","receivedInlineStyles","placement","shouldAnimate","props","forwardedRef","shouldReduceMotion","motionInlineStyles","otherMotionProps","computedAnimationProps","animate","div","ref","slotNameContext","undefined","UnforwardedPopover","_frameOffsetRef$curre","_frameOffsetRef$curre2","headerTitle","onClose","children","noArrow","position","placementProp","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","resize","variant","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","computedFlipProp","computedResizeProp","since","version","alternative","computedVariant","arrowRef","fallbackReferenceElement","setFallbackReferenceElement","referenceOwnerDocument","setReferenceOwnerDocument","anchorRefFallback","node","isMobileViewport","isExpanded","hasArrow","normalizedPlacementFromProps","frameOffsetRef","middleware","name","fn","x","y","current","data","amount","apply","sizeProps","_refs$floating$curren","firstElementChild","refs","floating","HTMLElement","Object","assign","maxHeight","availableHeight","overflow","crossAxis","limiter","padding","element","filter","m","slotName","slot","onDialogClose","type","event","dialogRef","dialogProps","__unstableOnClose","reference","referenceCallbackRef","strategy","update","computedPlacement","middlewareData","arrowData","whileElementsMounted","referenceParam","floatingParam","updateParam","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","resultingReferenceOwnerDoc","fallbackDocument","document","scale","resultingReferenceElement","ownerDocument","defaultView","frameElement","scrollContainer","updateFrameOffset","addEventListener","removeEventListener","mergedFloatingRef","content","tabIndex","left","icon","onClick","split","join","Number","isFinite","Popover","PopoverSlot","bubblesVirtually","__unstableSlotNameProvider","Provider"],"sources":["@wordpress/components/src/popover/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport 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":";AAAA;AACA;AACA;;AAEA,OAAOA,UAAU,MAAM,YAAY;AAEnC,SACCC,WAAW,EACXC,IAAI,IAAI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AAS,IAAIC,UAAU,IAAIR,MAAM,EAAG;IACxC,OAAOiG,OAAO;EACf;EAEA,OAAOnI,aAAA;IAAMoB,GAAG,EAAGqC;EAAmB,GAAG0E,OAAe,CAAC;AAC1D,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMS,OAAO,GAAG5K,UAAU,CAAEuD,kBAAmB,CAAC;AAEvD,SAASsH,WAAWA,CACnB;EAAE5E,IAAI,GAAGnE;AAA6B,CAAC,EACvCsB,GAAwB,EACvB;EACD,OACCpB,aAAA,CAACf;EACA;EAAA;IACA6J,gBAAgB;IAChB7E,IAAI,EAAGA,IAAM;IACb9D,SAAS,EAAC,cAAc;IACxBiB,GAAG,EAAGA;EAAK,CACX,CAAC;AAEJ;;AAEA;AACAwH,OAAO,CAAC3J,IAAI,GAAGjB,UAAU,CAAE6K,WAAY,CAAC;AACxC;AACAD,OAAO,CAACG,0BAA0B,GAAG1H,eAAe,CAAC2H,QAAQ;AAE7D,eAAeJ,OAAO"}
1
+ {"version":3,"names":["classnames","useFloating","flip","flipMiddleware","shift","shiftMiddleware","limitShift","autoUpdate","arrow","offset","offsetMiddleware","size","motion","useReducedMotion","useRef","useLayoutEffect","forwardRef","createContext","useContext","useMemo","useState","useCallback","createPortal","useViewportMatch","useMergeRefs","__experimentalUseDialog","useDialog","close","deprecated","Path","SVG","getScrollContainer","Button","ScrollLock","Slot","Fill","useSlot","computePopoverPosition","positionToPlacement","placementToMotionAnimationProps","getReferenceOwnerDocument","getReferenceElement","overlayMiddlewares","SLOT_NAME","ArrowTriangle","createElement","xmlns","viewBox","className","role","d","vectorEffect","AnimatedWrapper","style","receivedInlineStyles","placement","shouldAnimate","props","forwardedRef","shouldReduceMotion","motionInlineStyles","otherMotionProps","computedAnimationProps","animate","div","ref","slotNameContext","undefined","fallbackContainerClassname","getPopoverFallbackContainer","container","document","body","querySelector","append","UnforwardedPopover","headerTitle","onClose","children","noArrow","position","placementProp","offsetProp","focusOnMount","anchor","expandOnMobile","onFocusOutside","__unstableSlotName","resize","inline","variant","__unstableForcePosition","anchorRef","anchorRect","getAnchorRect","isAlternate","contentProps","computedFlipProp","computedResizeProp","since","version","alternative","computedVariant","arrowRef","fallbackReferenceElement","setFallbackReferenceElement","referenceOwnerDocument","setReferenceOwnerDocument","anchorRefFallback","node","isMobileViewport","isExpanded","hasArrow","normalizedPlacementFromProps","middleware","apply","sizeProps","_refs$floating$curren","firstElementChild","refs","floating","current","HTMLElement","Object","assign","maxHeight","availableHeight","overflow","crossAxis","limiter","padding","element","slotName","slot","onDialogClose","type","event","dialogRef","dialogProps","__unstableOnClose","x","y","strategy","update","computedPlacement","middlewareData","arrowData","whileElementsMounted","referenceParam","floatingParam","updateParam","layoutShift","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","resultingReferenceOwnerDoc","fallbackDocument","resultingReferenceElement","setReference","defaultView","frameElement","scrollContainer","addEventListener","removeEventListener","mergedFloatingRef","setFloating","content","tabIndex","left","icon","onClick","split","join","Number","isFinite","shouldRenderWithinSlot","hasAnchor","name","Fragment","Popover","PopoverSlot","bubblesVirtually","__unstableSlotNameProvider","Provider"],"sources":["@wordpress/components/src/popover/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef, SyntheticEvent, RefCallback } from 'react';\nimport 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":";AAAA;AACA;AACA;;AAEA,OAAOA,UAAU,MAAM,YAAY;AACnC,SACCC,WAAW,EACXC,IAAI,IAAIC,cAAc,EACtBC,KAAK,IAAIC,eAAe,EACxBC,UAAU,EACVC,UAAU,EACVC,KAAK,EACLC,MAAM,IAAIC,gBAAgB,EAC1BC,IAAI,QACE,wBAAwB;AAC/B;;AAEA;AACA,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,eAAe;;AAExD;AACA;AACA;AACA,SACCC,MAAM,EACNC,eAAe,EACf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SAAS,IAAIC,UAAU,IAAIT,MAAM;EAEnD,IAAKiG,sBAAsB,EAAG;IAC7BT,OAAO,GAAG/H,aAAA,CAACV,IAAI;MAACoJ,IAAI,EAAGnD;IAAU,GAAGwC,OAAe,CAAC;EACrD,CAAC,MAAM,IAAK,CAAEnF,MAAM,EAAG;IACtBmF,OAAO,GAAGtJ,YAAY,CAAEsJ,OAAO,EAAEvG,2BAA2B,CAAC,CAAE,CAAC;EACjE;EAEA,IAAKiH,SAAS,EAAG;IAChB,OAAOV,OAAO;EACf;EAEA,OACC/H,aAAA,CAAA2I,QAAA,QACC3I,aAAA;IAAMoB,GAAG,EAAG2C;EAAmB,CAAE,CAAC,EAChCgE,OACD,CAAC;AAEL,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMa,OAAO,GAAGzK,UAAU,CAAE2D,kBAAmB,CAAC;AAEvD,SAAS+G,WAAWA,CACnB;EAAEH,IAAI,GAAG5I;AAA6B,CAAC,EACvCsB,GAAwB,EACvB;EACD,OACCpB,aAAA,CAACX;EACA;EAAA;IACAyJ,gBAAgB;IAChBJ,IAAI,EAAGA,IAAM;IACbvI,SAAS,EAAC,cAAc;IACxBiB,GAAG,EAAGA;EAAK,CACX,CAAC;AAEJ;;AAEA;AACAwH,OAAO,CAACvJ,IAAI,GAAGlB,UAAU,CAAE0K,WAAY,CAAC;AACxC;AACAD,OAAO,CAACG,0BAA0B,GAAG1H,eAAe,CAAC2H,QAAQ;AAE7D,eAAeJ,OAAO"}
@@ -1 +1 @@
1
- {"version":3,"names":["size","overlayMiddlewares","name","fn","rects","reference","apply","elements","_elements$floating","firstElementChild","floating","HTMLElement","Object","assign","style","width","height"],"sources":["@wordpress/components/src/popover/overlay-middlewares.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { 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":"AAAA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,wBAAwB;AAE7C,OAAO,SAASC,kBAAkBA,CAAA,EAAG;EACpC,OAAO,CACN;IACCC,IAAI,EAAE,SAAS;IACfC,EAAEA,CAAE;MAAEC;IAA2B,CAAC,EAAG;MACpC,OAAOA,KAAK,CAACC,SAAS;IACvB;EACD,CAAC,EACDL,IAAI,CAAE;IACLM,KAAKA,CAAE;MAAEF,KAAK;MAAEG;IAAS,CAAC,EAAG;MAAA,IAAAC,kBAAA;MAC5B,MAAM;QAAEC;MAAkB,CAAC,IAAAD,kBAAA,GAAGD,QAAQ,CAACG,QAAQ,cAAAF,kBAAA,cAAAA,kBAAA,GAAI,CAAC,CAAC;;MAErD;MACA,IAAK,EAAIC,iBAAiB,YAAYE,WAAW,CAAE,EAAG;;MAEtD;MACAC,MAAM,CAACC,MAAM,CAAEJ,iBAAiB,CAACK,KAAK,EAAE;QACvCC,KAAK,EAAG,GAAGX,KAAK,CAACC,SAAS,CAACU,KAAO,IAAG;QACrCC,MAAM,EAAG,GAAGZ,KAAK,CAACC,SAAS,CAACW,MAAQ;MACrC,CAAE,CAAC;IACJ;EACD,CAAE,CAAC,CACH;AACF"}
1
+ {"version":3,"names":["size","overlayMiddlewares","name","fn","rects","reference","apply","elements","_elements$floating","firstElementChild","floating","HTMLElement","Object","assign","style","width","height"],"sources":["@wordpress/components/src/popover/overlay-middlewares.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { MiddlewareState } from '@floating-ui/react-dom';\nimport { size } from '@floating-ui/react-dom';\n\nexport function overlayMiddlewares() {\n\treturn [\n\t\t{\n\t\t\tname: 'overlay',\n\t\t\tfn( { rects }: MiddlewareState ) {\n\t\t\t\treturn rects.reference;\n\t\t\t},\n\t\t},\n\t\tsize( {\n\t\t\tapply( { rects, elements } ) {\n\t\t\t\tconst { firstElementChild } = elements.floating ?? {};\n\n\t\t\t\t// Only HTMLElement instances have the `style` property.\n\t\t\t\tif ( ! ( firstElementChild instanceof HTMLElement ) ) 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":"AAAA;AACA;AACA;;AAEA,SAASA,IAAI,QAAQ,wBAAwB;AAE7C,OAAO,SAASC,kBAAkBA,CAAA,EAAG;EACpC,OAAO,CACN;IACCC,IAAI,EAAE,SAAS;IACfC,EAAEA,CAAE;MAAEC;IAAuB,CAAC,EAAG;MAChC,OAAOA,KAAK,CAACC,SAAS;IACvB;EACD,CAAC,EACDL,IAAI,CAAE;IACLM,KAAKA,CAAE;MAAEF,KAAK;MAAEG;IAAS,CAAC,EAAG;MAAA,IAAAC,kBAAA;MAC5B,MAAM;QAAEC;MAAkB,CAAC,IAAAD,kBAAA,GAAGD,QAAQ,CAACG,QAAQ,cAAAF,kBAAA,cAAAA,kBAAA,GAAI,CAAC,CAAC;;MAErD;MACA,IAAK,EAAIC,iBAAiB,YAAYE,WAAW,CAAE,EAAG;;MAEtD;MACAC,MAAM,CAACC,MAAM,CAAEJ,iBAAiB,CAACK,KAAK,EAAE;QACvCC,KAAK,EAAG,GAAGX,KAAK,CAACC,SAAS,CAACU,KAAO,IAAG;QACrCC,MAAM,EAAG,GAAGZ,KAAK,CAACC,SAAS,CAACW,MAAQ;MACrC,CAAE,CAAC;IACJ;EACD,CAAE,CAAC,CACH;AACF"}
@@ -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":""}
@@ -174,40 +174,6 @@ export const placementToMotionAnimationProps = placement => {
174
174
  }
175
175
  };
176
176
  };
177
-
178
- /**
179
- * Returns the offset of a document's frame element.
180
- *
181
- * @param document The iframe's owner document.
182
- *
183
- * @return The offset of the document's frame element, or undefined if the
184
- * document has no frame element.
185
- */
186
- export const getFrameOffset = document => {
187
- const frameElement = document?.defaultView?.frameElement;
188
- if (!frameElement) {
189
- return;
190
- }
191
- const iframeRect = frameElement.getBoundingClientRect();
192
- return {
193
- x: iframeRect.left,
194
- y: iframeRect.top
195
- };
196
- };
197
- export const getFrameScale = document => {
198
- const frameElement = document?.defaultView?.frameElement;
199
- if (!frameElement) {
200
- return {
201
- x: 1,
202
- y: 1
203
- };
204
- }
205
- const rect = frameElement.getBoundingClientRect();
206
- return {
207
- x: rect.width / frameElement.offsetWidth,
208
- y: rect.height / frameElement.offsetHeight
209
- };
210
- };
211
177
  export const getReferenceOwnerDocument = ({
212
178
  anchor,
213
179
  anchorRef,
@@ -225,7 +191,9 @@ export const getReferenceOwnerDocument = ({
225
191
  // with the `getBoundingClientRect()` function (like real elements).
226
192
  // See https://floating-ui.com/docs/virtual-elements for more info.
227
193
  let resultingReferenceOwnerDoc;
228
- if (anchor) {
194
+ if (anchor?.contextElement) {
195
+ resultingReferenceOwnerDoc = anchor.contextElement?.ownerDocument;
196
+ } else if (anchor) {
229
197
  resultingReferenceOwnerDoc = anchor.ownerDocument;
230
198
  } else if (anchorRef?.top) {
231
199
  resultingReferenceOwnerDoc = anchorRef?.top.ownerDocument;
@@ -248,8 +216,7 @@ export const getReferenceElement = ({
248
216
  anchorRef,
249
217
  anchorRect,
250
218
  getAnchorRect,
251
- fallbackReferenceElement,
252
- scale
219
+ fallbackReferenceElement
253
220
  }) => {
254
221
  var _referenceElement;
255
222
  let referenceElement = null;
@@ -295,16 +262,6 @@ export const getReferenceElement = ({
295
262
  // anchoring to the popover's parent node.
296
263
  referenceElement = fallbackReferenceElement.parentElement;
297
264
  }
298
- if (referenceElement && (scale.x !== 1 || scale.y !== 1)) {
299
- // If the popover is inside an iframe, the coordinates of the
300
- // reference element need to be scaled to match the iframe's scale.
301
- const rect = referenceElement.getBoundingClientRect();
302
- referenceElement = {
303
- getBoundingClientRect() {
304
- return new window.DOMRect(rect.x * scale.x, rect.y * scale.y, rect.width * scale.x, rect.height * scale.y);
305
- }
306
- };
307
- }
308
265
 
309
266
  // Convert any `undefined` value to `null`.
310
267
  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","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;EACvB,aAAa,EAAE,YAAY;EAC3B,eAAe,EAAE,QAAQ;EACzB,cAAc,EAAE,cAAc;EAC9B,UAAU,EAAE,SAAS;EACrB,YAAY,EAAE,KAAK;EACnB,WAAW,EAAE,WAAW;EACxB,kBAAkB,EAAE,MAAM;EAC1B,mBAAmB,EAAE,MAAM;EAC3B,oBAAoB,EAAE,UAAU;EAChC,iBAAiB,EAAE,YAAY;EAC/B,mBAAmB,EAAE,OAAO;EAC5B,oBAAoB,EAAE,OAAO;EAC7B,qBAAqB,EAAE,WAAW;EAClC,kBAAkB,EAAE,aAAa;EACjC,kBAAkB,EAAE,YAAY;EAChC,mBAAmB,EAAE,YAAY;EACjC,oBAAoB,EAAE,YAAY;EAClC,iBAAiB,EAAE,YAAY;EAC/B,oBAAoB,EAAE,QAAQ;EAC9B,qBAAqB,EAAE,QAAQ;EAC/B,sBAAsB,EAAE,QAAQ;EAChC,mBAAmB,EAAE,QAAQ;EAC7B,mBAAmB,EAAE,cAAc;EACnC,oBAAoB,EAAE,cAAc;EACpC,qBAAqB,EAAE,cAAc;EACrC,kBAAkB,EAAE,cAAc;EAClC,eAAe,EAAE,SA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gB,GAAGT,wBAAwB,CAACkB,aAAa;EAC1D;EAEA,IAAKT,gBAAgB,KAAMjC,KAAK,CAACW,CAAC,KAAK,CAAC,IAAIX,KAAK,CAACY,CAAC,KAAK,CAAC,CAAE,EAAG;IAC7D;IACA;IACA,MAAME,IAAI,GAAGmB,gBAAgB,CAACvB,qBAAqB,CAAC,CAAC;IACrDuB,gBAAgB,GAAG;MAClBvB,qBAAqBA,CAAA,EAAG;QACvB,OAAO,IAAI0B,MAAM,CAACC,OAAO,CACxBvB,IAAI,CAACH,CAAC,GAAGX,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;AACA,OAAO,MAAMW,sBAAsB,GAAKC,CAAgB,IACvDA,CAAC,KAAK,IAAI,IAAIC,MAAM,CAACC,KAAK,CAAEF,CAAE,CAAC,GAAGG,SAAS,GAAGC,IAAI,CAACC,KAAK,CAAEL,CAAE,CAAC"}
1
+ {"version":3,"names":["POSITION_TO_PLACEMENT","bottom","top","middle","positionToPlacement","position","_POSITION_TO_PLACEMEN","PLACEMENT_TO_ANIMATION_ORIGIN","originX","originY","right","left","overlay","placementToMotionAnimationProps","placement","translateProp","startsWith","translateDirection","style","initial","opacity","scale","animate","transition","duration","ease","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;EACvB,aAAa,EAAE,YAAY;EAC3B,eAAe,EAAE,QAAQ;EACzB,cAAc,EAAE,cAAc;EAC9B,UAAU,EAAE,SAAS;EACrB,YAAY,EAAE,KAAK;EACnB,WAAW,EAAE,WAAW;EACxB,kBAAkB,EAAE,MAAM;EAC1B,mBAAmB,EAAE,MAAM;EAC3B,oBAAoB,EAAE,UAAU;EAChC,iBAAiB,EAAE,YAAY;EAC/B,mBAAmB,EAAE,OAAO;EAC5B,oBAAoB,EAAE,OAAO;EAC7B,qBAAqB,EAAE,WAAW;EAClC,kBAAkB,EAAE,aAAa;EACjC,kBAAkB,EAAE,YAAY;EAChC,mBAAmB,EAAE,YAAY;EACjC,oBAAoB,EAAE,YAAY;EAClC,iBAAiB,EAAE,YAAY;EAC/B,oBAAoB,EAAE,QAAQ;EAC9B,qBAAqB,EAAE,QAAQ;EAC/B,sBAAsB,EAAE,QAAQ;EAChC,mBAAmB,EAAE,QAAQ;EAC7B,mBAAmB,EAAE,cAAc;EACnC,oBAAoB,EAAE,cAAc;EACpC,qBAAqB,EAAE,cAAc;EACrC,kBAAkB,EAAE,cAAc;EAClC,eAAe,EAAE,SAAS;EAC1B,gBAAgB,EAAE,SAAS;EAC3B,iBAAiB,EAAE,SAAS;EAC5B,cAAc,EAAE,SAAS;EACzB,iBAAiB,EAAE,KAAK;EACxB,kBAAkB,EAAE,KAAK;EACzB,mBAAmB,EAAE,KAAK;EAC1B,gBAAgB,EAAE,KAAK;EACvB,gBAAgB,EAAE,WAAW;EAC7B,iBAAiB,EAAE,WAAW;EAC9B,kBAAkB,EAA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IAAI,CAAC5C,KAAK,GAAG4C,IAAI,CAAC3C,IAAI,GAAA0C,YAAA,GACpCC,IAAI,CAACC,MAAM,cAAAF,YAAA,cAAAA,YAAA,GAAIC,IAAI,CAACrD,MAAM,GAAGqD,IAAI,CAACpD,GACnC,CAAC;MACF;IACD,CAAC;EACF,CAAC,MAAM,IAAK6B,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;AACA,OAAO,MAAMiB,sBAAsB,GAAKC,CAAgB,IACvDA,CAAC,KAAK,IAAI,IAAIC,MAAM,CAACC,KAAK,CAAEF,CAAE,CAAC,GAAGG,SAAS,GAAGC,IAAI,CAACC,KAAK,CAAEL,CAAE,CAAC"}
@@ -26,7 +26,7 @@ export const Track = _styled("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:", CONFIG.borderWidthFocus, ";background-color:var(\n\t\t--wp-components-color-gray-300,\n\t\t", COLORS.gray[300], "\n\t);border-radius:", CONFIG.radiusBlockUi, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QitCIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGV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sdWU/OiBudW1iZXI7XG59ID5gXG5cdGRpc3BsYXk6IGlubGluZS1ibG9jaztcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGhlaWdodDogMTAwJTtcblx0Ym9yZGVyLXJhZGl1czogJHsgQ09ORklHLnJhZGl1c0Jsb2NrVWkgfTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdCR7ICggeyBpc0luZGV0ZXJtaW5hdGUsIHZhbHVlIH0gKSA9PlxuXHRcdGlzSW5kZXRlcm1pbmF0ZVxuXHRcdFx0PyBjc3MoIHtcblx0XHRcdFx0XHRhbmltYXRpb25EdXJhdGlvbjogJzEuNXMnLFxuXHRcdFx0XHRcdGFuaW1hdGlvblRpbWluZ0Z1bmN0aW9uOiAnZWFzZS1pbi1vdXQnLFxuXHRcdFx0XHRcdGFuaW1hdGlvbkl0ZXJhdGlvbkNvdW50OiAnaW5maW5pdGUnLFxuXHRcdFx0XHRcdGFuaW1hdGlvbk5hbWU6IGFuaW1hdGVQcm9ncmVzc0Jhcixcblx0XHRcdFx0XHR3aWR0aDogYCR7IElOREVURVJNSU5BVEVfVFJBQ0tfV0lEVEggfSVgLFxuXHRcdFx0ICB9IClcblx0XHRcdDogY3NzKCB7IHdpZHRoOiBgJHsgdmFsdWUgfSVgIH0gKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFByb2dyZXNzRWxlbWVudCA9IHN0eWxlZC5wcm9ncmVzc2Bcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGxlZnQ6IDA7XG5cdG9wYWNpdHk6IDA7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuIl19 */"));
29
+ })("position:relative;overflow:hidden;width:100%;max-width:160px;height:", CONFIG.borderWidthFocus, ";background-color:var(\n\t\t--wp-components-color-gray-300,\n\t\t", COLORS.gray[300], "\n\t);border-radius:", CONFIG.radiusBlockUi, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1QitCIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuY29uc3QgYW5pbWF0ZVByb2dyZXNzQmFyID0ga2V5ZnJhbWVzKCB7XG5cdCcwJSc6IHtcblx0XHRsZWZ0OiAnLTUwJScsXG5cdH0sXG5cdCcxMDAlJzoge1xuXHRcdGxlZnQ6ICcxMDAlJyxcblx0fSxcbn0gKTtcblxuLy8gV2lkdGggb2YgdGhlIGluZGljYXRvciBmb3IgdGhlIGluZGV0ZXJtaW5hdGUgcHJvZ3Jlc3MgYmFyXG5leHBvcnQgY29uc3QgSU5ERVRFUk1JTkFURV9UUkFDS19XSURUSCA9IDUwO1xuXG5leHBvcnQgY29uc3QgVHJhY2sgPSBzdHlsZWQuZGl2YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdG92ZXJmbG93OiBoaWRkZW47XG5cdHdpZHRoOiAxMDAlO1xuXHRtYXgtd2lkdGg6IDE2MHB4O1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x0XHRcdFx0d2lkdGg6IGAkeyB2YWx1ZSB9JWAsXG5cdFx0XHRcdFx0dHJhbnNpdGlvbjogJ3dpZHRoIDAuNHMgZWFzZS1pbi1vdXQnLFxuXHRcdFx0ICB9ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQcm9ncmVzc0VsZW1lbnQgPSBzdHlsZWQucHJvZ3Jlc3NgXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHRsZWZ0OiAwO1xuXHRvcGFjaXR5OiAwO1xuXHR3aWR0aDogMTAwJTtcblx0aGVpZ2h0OiAxMDAlO1xuYDtcbiJdfQ== */"));
30
30
  export const Indicator = _styled("div", process.env.NODE_ENV === "production" ? {
31
31
  target: "e15u147w1"
32
32
  } : {
@@ -41,9 +41,10 @@ export const Indicator = _styled("div", process.env.NODE_ENV === "production" ?
41
41
  animationIterationCount: 'infinite',
42
42
  animationName: animateProgressBar,
43
43
  width: `${INDETERMINATE_TRACK_WIDTH}%`
44
- }, process.env.NODE_ENV === "production" ? "" : ";label:Indicator;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpREsiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9wcm9ncmVzcy1iYXIvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50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kaXVzQmxvY2tVaSB9O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cblx0JHsgKCB7IGlzSW5kZXRlcm1pbmF0ZSwgdmFsdWUgfSApID0+XG5cdFx0aXNJbmRldGVybWluYXRlXG5cdFx0XHQ/IGNzcygge1xuXHRcdFx0XHRcdGFuaW1hdGlvbkR1cmF0aW9uOiAnMS41cycsXG5cdFx0XHRcdFx0YW5pbWF0aW9uVGltaW5nRnVuY3Rpb246ICdlYXNlLWluLW91dCcsXG5cdFx0XHRcdFx0YW5pbWF0aW9uSXRlcmF0aW9uQ291bnQ6ICdpbmZpbml0ZScsXG5cdFx0XHRcdFx0YW5pbWF0aW9uTmFtZTogYW5pbWF0ZVByb2dyZXNzQmFyLFxuXHRcdFx0XHRcdHdpZHRoOiBgJHsgSU5ERVRFUk1JTkFURV9UUkFDS19XSURUSCB9JWAsXG5cdFx0XHQgIH0gKVxuXHRcdFx0OiBjc3MoIHsgd2lkdGg6IGAkeyB2YWx1ZSB9JWAgfSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgUHJvZ3Jlc3NFbGVtZW50ID0gc3R5bGVkLnByb2dyZXNzYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogMDtcblx0bGVmdDogMDtcblx0b3BhY2l0eTogMDtcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcbmA7XG4iXX0= */") : /*#__PURE__*/css({
45
- width: `${value}%`
46
- }, process.env.NODE_ENV === "production" ? "" : ";label:Indicator;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3REsiLCJmaWxlIjoiQHd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AgfSApIH07XG5gO1xuXG5leHBvcnQgY29uc3QgUHJvZ3Jlc3NFbGVtZW50ID0gc3R5bGVkLnByb2dyZXNzYFxuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHRvcDogMDtcblx0bGVmdDogMDtcblx0b3BhY2l0eTogMDtcblx0d2lkdGg6IDEwMCU7XG5cdGhlaWdodDogMTAwJTtcbmA7XG4iXX0= */"));
44
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Indicator;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpREsiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9wcm9ncmVzcy1iYXIvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0IHsgY3NzLCBrZXlmcmFtZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENPTE9SUywgQ09ORklHIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG5jb25zdCBhbmltYXRlUHJvZ3Jlc3NCYXIgPSBrZXlmcmFtZXMoIHtcblx0JzAlJzoge1xuXHRcdGxlZnQ6ICctNTAlJyxcblx0fSxcblx0JzEwMCUnOiB7XG5cdFx0bGVmdDogJzEwMCUnLFxuXHR9LFxufSApO1xuXG4vLyBXaWR0aCBvZiB0aGUgaW5kaWNhdG9yIGZvciB0aGUgaW5kZXRlcm1pbmF0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W5pbWF0aW9uSXRlcmF0aW9uQ291bnQ6ICdpbmZpbml0ZScsXG5cdFx0XHRcdFx0YW5pbWF0aW9uTmFtZTogYW5pbWF0ZVByb2dyZXNzQmFyLFxuXHRcdFx0XHRcdHdpZHRoOiBgJHsgSU5ERVRFUk1JTkFURV9UUkFDS19XSURUSCB9JWAsXG5cdFx0XHQgIH0gKVxuXHRcdFx0OiBjc3MoIHtcblx0XHRcdFx0XHR3aWR0aDogYCR7IHZhbHVlIH0lYCxcblx0XHRcdFx0XHR0cmFuc2l0aW9uOiAnd2lkdGggMC40cyBlYXNlLWluLW91dCcsXG5cdFx0XHQgIH0gKSB9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFByb2dyZXNzRWxlbWVudCA9IHN0eWxlZC5wcm9ncmVzc2Bcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGxlZnQ6IDA7XG5cdG9wYWNpdHk6IDA7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuIl19 */") : /*#__PURE__*/css({
45
+ width: `${value}%`,
46
+ transition: 'width 0.4s ease-in-out'
47
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Indicator;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3REsiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy9wcm9ncmVzcy1iYXIvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J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YDtcblxuZXhwb3J0IGNvbnN0IFByb2dyZXNzRWxlbWVudCA9IHN0eWxlZC5wcm9ncmVzc2Bcblx0cG9zaXRpb246IGFic29sdXRlO1xuXHR0b3A6IDA7XG5cdGxlZnQ6IDA7XG5cdG9wYWNpdHk6IDA7XG5cdHdpZHRoOiAxMDAlO1xuXHRoZWlnaHQ6IDEwMCU7XG5gO1xuIl19 */"));
47
48
  export const ProgressElement = _styled("progress", process.env.NODE_ENV === "production" ? {
48
49
  target: "e15u147w0"
49
50
  } : {
@@ -55,7 +56,7 @@ export const ProgressElement = _styled("progress", process.env.NODE_ENV === "pro
55
56
  } : {
56
57
  name: "11fb690",
57
58
  styles: "position:absolute;top:0;left:0;opacity:0;width:100%;height:100%",
58
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUEyRDhDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvcHJvZ3Jlc3MtYmFyL3N0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRXh0ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcbmltcG9ydCB7IGNzcywga2V5ZnJhbWVzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vKipcbiAqIEludGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgeyBDT0xPUlMsIENPTkZJRyB9IGZyb20gJy4uL3V0aWxzJztcblxuY29uc3QgYW5pbWF0ZVByb2dyZXNzQmFyID0ga2V5ZnJhbWVzKCB7XG5cdCcwJSc6IHtcblx0XHRsZWZ0OiAnLTUwJScsXG5cdH0sXG5cd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HsgQ09ORklHLnJhZGl1c0Jsb2NrVWkgfTtcblx0YmFja2dyb3VuZC1jb2xvcjogJHsgQ09MT1JTLnRoZW1lLmFjY2VudCB9O1xuXG5cdCR7ICggeyBpc0luZGV0ZXJtaW5hdGUsIHZhbHVlIH0gKSA9PlxuXHRcdGlzSW5kZXRlcm1pbmF0ZVxuXHRcdFx0PyBjc3MoIHtcblx0XHRcdFx0XHRhbmltYXRpb25EdXJhdGlvbjogJzEuNXMnLFxuXHRcdFx0XHRcdGFuaW1hdGlvblRpbWluZ0Z1bmN0aW9uOiAnZWFzZS1pbi1vdXQnLFxuXHRcdFx0XHRcdGFuaW1hdGlvbkl0ZXJhdGlvbkNvdW50OiAnaW5maW5pdGUnLFxuXHRcdFx0XHRcdGFuaW1hdGlvbk5hbWU6IGFuaW1hdGVQcm9ncmVzc0Jhcixcblx0XHRcdFx0XHR3aWR0aDogYCR7IElOREVURVJNSU5BVEVfVFJBQ0tfV0lEVEggfSVgLFxuXHRcdFx0ICB9IClcblx0XHRcdDogY3NzKCB7XG5cdFx0XHRcdFx0d2lkdGg6IGAkeyB2YWx1ZSB9JWAsXG5cdFx0XHRcdFx0dHJhbnNpdGlvbjogJ3dpZHRoIDAuNHMgZWFzZS1pbi1vdXQnLFxuXHRcdFx0ICB9ICkgfTtcbmA7XG5cbmV4cG9ydCBjb25zdCBQcm9ncmVzc0VsZW1lbnQgPSBzdHlsZWQucHJvZ3Jlc3NgXG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0dG9wOiAwO1xuXHRsZWZ0OiAwO1xuXHRvcGFjaXR5OiAwO1xuXHR3aWR0aDogMTAwJTtcblx0aGVpZ2h0OiAxMDAlO1xuYDtcbiJdfQ== */",
59
60
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
60
61
  });
61
62
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["css","keyframes","COLORS","CONFIG","animateProgressBar","left","INDETERMINATE_TRACK_WIDTH","Track","_styled","process","env","NODE_ENV","target","label","borderWidthFocus","gray","radiusBlockUi","Indicator","theme","accent","isIndeterminate","value","animationDuration","animationTimingFunction","animationIterationCount","animationName","width","ProgressElement","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__"],"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;\n\tleft: 0;\n\topacity: 0;\n\twidth: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AAZ,OAAA,CAAAC,GAAA,CAAAC,QAAA,8CAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,s1EAAC,CAAC,SAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,w1EACnC;AAED,OAAO,MAAMgB,eAAe,GAAAnB,OAAA,aAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAiB,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAO3B"}
1
+ {"version":3,"names":["css","keyframes","COLORS","CONFIG","animateProgressBar","left","INDETERMINATE_TRACK_WIDTH","Track","_styled","process","env","NODE_ENV","target","label","borderWidthFocus","gray","radiusBlockUi","Indicator","theme","accent","isIndeterminate","value","animationDuration","animationTimingFunction","animationIterationCount","animationName","width","transition","ProgressElement","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__"],"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":";;AAAA;AACA;AACA;;AAEA,SAASA,GAAG,EAAEC,SAAS,QAAQ,gBAAgB;;AAE/C;AACA;AACA;AACA,SAASC,MAAM,EAAEC,MAAM,QAAQ,UAAU;AAEzC,MAAMC,kBAAkB,GAAGH,SAAS,CAAE;EACrC,IAAI,EAAE;IACLI,IAAI,EAAE;EACP,CAAC;EACD,MAAM,EAAE;IACPA,IAAI,EAAE;EACP;AACD,CAAE,CAAC;;AAEH;AACA,OAAO,MAAMC,yBAAyB,GAAG,EAAE;AAE3C,OAAO,MAAMC,KAAK,GAAAC,OAAA,QAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,2EAKNV,MAAM,CAACW,gBAAgB,uEAG9BZ,MAAM,CAACa,IAAI,CAAE,GAAG,CAAE,0BAEJZ,MAAM,CAACa,aAAa,SAAAP,OAAA,CAAAC,GAAA,CAAAC,QAAA,w7EACtC;AAED,OAAO,MAAMM,SAAS,GAAAT,OAAA,QAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,8EAQHV,MAAM,CAACa,aAAa,wBACjBd,MAAM,CAACgB,KAAK,CAACC,MAAM,OAErC,CAAE;EAAEC,eAAe;EAAEC;AAAM,CAAC,KAC9BD,eAAe,gBACZpB,GAAG,CAAE;EACLsB,iBAAiB,EAAE,MAAM;EACzBC,uBAAuB,EAAE,aAAa;EACtCC,uBAAuB,EAAE,UAAU;EACnCC,aAAa,EAAErB,kBAAkB;EACjCsB,KAAK,EAAG,GAAGpB,yBAA2B;AACtC,CAAC,EAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA,8CAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,k7EAAC,CAAC,gBACHX,GAAG,CAAE;EACL0B,KAAK,EAAG,GAAGL,KAAO,GAAE;EACpBM,UAAU,EAAE;AACZ,CAAC,EAAAlB,OAAA,CAAAC,GAAA,CAAAC,QAAA,8CAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,k7EAAC,CAAC,SAAAF,OAAA,CAAAC,GAAA,CAAAC,QAAA,o7EACP;AAED,OAAO,MAAMiB,eAAe,GAAApB,OAAA,aAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAkB,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAO3B"}
@@ -206,7 +206,7 @@ function SandBox({
206
206
  defaultView?.addEventListener('message', checkMessageForResize);
207
207
  return () => {
208
208
  iframe?.removeEventListener('load', tryNoForceSandBox, false);
209
- defaultView?.addEventListener('message', checkMessageForResize);
209
+ defaultView?.removeEventListener('message', checkMessageForResize);
210
210
  };
211
211
  // Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.
212
212
  // See https://github.com/WordPress/gutenberg/pull/44378
@@ -1 +1 @@
1
- {"version":3,"names":["renderToString","useRef","useState","useEffect","useFocusableIframe","useMergeRefs","observeAndResizeJS","MutationObserver","window","document","body","parent","sendResize","clientBoundingRect","getBoundingClientRect","postMessage","action","width","height","observer","observe","attributes","attributeOldValue","characterData","characterDataOldValue","childList","subtree","addEventListener","removeViewportStyles","ruleOrNode","style","forEach","test","Array","prototype","call","querySelectorAll","styleSheets","stylesheet","cssRules","rules","position","setAttribute","SandBox","html","title","type","styles","scripts","onFocus","ref","setWidth","setHeight","isFrameAccessible","current","contentDocument","e","trySandBox","forceRerender","ownerDocument","getAttribute","htmlDoc","createElement","lang","documentElement","className","dangerouslySetInnerHTML","__html","map","i","key","toString","src","open","write","close","tryNoForceSandBox","checkMessageForResize","event","iframe","contentWindow","source","data","JSON","parse","defaultView","removeEventListener","sandbox","Math","ceil"],"sources":["@wordpress/components/src/sandbox/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\trenderToString,\n\tuseRef,\n\tuseState,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useFocusableIframe, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { SandBoxProps } from './types';\n\nconst observeAndResizeJS = function () {\n\tconst { MutationObserver } = window;\n\n\tif ( ! MutationObserver || ! document.body || ! window.parent ) {\n\t\treturn;\n\t}\n\n\tfunction sendResize() {\n\t\tconst clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\twindow.parent.postMessage(\n\t\t\t{\n\t\t\t\taction: 'resize',\n\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\theight: clientBoundingRect.height,\n\t\t\t},\n\t\t\t'*'\n\t\t);\n\t}\n\n\tconst observer = new MutationObserver( sendResize );\n\tobserver.observe( document.body, {\n\t\tattributes: true,\n\t\tattributeOldValue: false,\n\t\tcharacterData: true,\n\t\tcharacterDataOldValue: false,\n\t\tchildList: true,\n\t\tsubtree: true,\n\t} );\n\n\twindow.addEventListener( 'load', sendResize, true );\n\n\t// Hack: Remove viewport unit styles, as these are relative\n\t// the iframe root and interfere with our mechanism for\n\t// determining the unconstrained page bounds.\n\tfunction removeViewportStyles( ruleOrNode: ElementCSSInlineStyle ) {\n\t\tif ( ruleOrNode.style ) {\n\t\t\t(\n\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ] as const\n\t\t\t ).forEach( function ( style ) {\n\t\t\t\tif (\n\t\t\t\t\t/^\\\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] )\n\t\t\t\t) {\n\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tArray.prototype.forEach.call(\n\t\tdocument.querySelectorAll( '[style]' ),\n\t\tremoveViewportStyles\n\t);\n\tArray.prototype.forEach.call(\n\t\tdocument.styleSheets,\n\t\tfunction ( stylesheet ) {\n\t\t\tArray.prototype.forEach.call(\n\t\t\t\tstylesheet.cssRules || stylesheet.rules,\n\t\t\t\tremoveViewportStyles\n\t\t\t);\n\t\t}\n\t);\n\n\tdocument.body.style.position = 'absolute';\n\tdocument.body.style.width = '100%';\n\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\n\tsendResize();\n\n\t// Resize events can change the width of elements with 100% width, but we don't\n\t// get an DOM mutations for that, so do the resize when the window is resized, too.\n\twindow.addEventListener( 'resize', sendResize, true );\n};\n\n// TODO: These styles shouldn't be coupled with WordPress.\nconst style = `\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n`;\n\n/**\n * This component provides an isolated environment for arbitrary HTML via iframes.\n *\n * ```jsx\n * import { SandBox } from '@wordpress/components';\n *\n * const MySandBox = () => (\n * \t<SandBox html=\"<p>Content</p>\" title=\"SandBox\" type=\"embed\" />\n * );\n * ```\n */\nfunction SandBox( {\n\thtml = '',\n\ttitle = '',\n\ttype,\n\tstyles = [],\n\tscripts = [],\n\tonFocus,\n}: SandBoxProps ) {\n\tconst ref = useRef< HTMLIFrameElement >();\n\tconst [ width, setWidth ] = useState( 0 );\n\tconst [ height, setHeight ] = useState( 0 );\n\n\tfunction isFrameAccessible() {\n\t\ttry {\n\t\t\treturn !! ref.current?.contentDocument?.body;\n\t\t} catch ( e ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tfunction trySandBox( forceRerender = false ) {\n\t\tif ( ! isFrameAccessible() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { contentDocument, ownerDocument } =\n\t\t\tref.current as HTMLIFrameElement & {\n\t\t\t\tcontentDocument: Document;\n\t\t\t};\n\n\t\tif (\n\t\t\t! forceRerender &&\n\t\t\tnull !==\n\t\t\t\tcontentDocument?.body.getAttribute(\n\t\t\t\t\t'data-resizable-iframe-connected'\n\t\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Put the html snippet into a html document, and then write it to the iframe's document\n\t\t// we can use this in the future to inject custom styles or scripts.\n\t\t// Scripts go into the body rather than the head, to support embedded content such as Instagram\n\t\t// that expect the scripts to be part of the body.\n\t\tconst htmlDoc = (\n\t\t\t<html\n\t\t\t\tlang={ ownerDocument.documentElement.lang }\n\t\t\t\tclassName={ type }\n\t\t\t>\n\t\t\t\t<head>\n\t\t\t\t\t<title>{ title }</title>\n\t\t\t\t\t<style dangerouslySetInnerHTML={ { __html: style } } />\n\t\t\t\t\t{ styles.map( ( rules, i ) => (\n\t\t\t\t\t\t<style\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={ { __html: rules } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</head>\n\t\t\t\t<body\n\t\t\t\t\tdata-resizable-iframe-connected=\"data-resizable-iframe-connected\"\n\t\t\t\t\tclassName={ type }\n\t\t\t\t>\n\t\t\t\t\t<div dangerouslySetInnerHTML={ { __html: html } } />\n\t\t\t\t\t<script\n\t\t\t\t\t\ttype=\"text/javascript\"\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: `(${ observeAndResizeJS.toString() })();`,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ scripts.map( ( src ) => (\n\t\t\t\t\t\t<script key={ src } src={ src } />\n\t\t\t\t\t) ) }\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t);\n\n\t\t// Writing the document like this makes it act in the same way as if it was\n\t\t// loaded over the network, so DOM creation and mutation, script execution, etc.\n\t\t// all work as expected.\n\t\tcontentDocument.open();\n\t\tcontentDocument.write( '<!DOCTYPE html>' + renderToString( htmlDoc ) );\n\t\tcontentDocument.close();\n\t}\n\n\tuseEffect( () => {\n\t\ttrySandBox();\n\n\t\tfunction tryNoForceSandBox() {\n\t\t\ttrySandBox( false );\n\t\t}\n\n\t\tfunction checkMessageForResize( event: MessageEvent ) {\n\t\t\tconst iframe = ref.current;\n\n\t\t\t// Verify that the mounted element is the source of the message.\n\t\t\tif ( ! iframe || iframe.contentWindow !== event.source ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Attempt to parse the message data as JSON if passed as string.\n\t\t\tlet data = event.data || {};\n\n\t\t\tif ( 'string' === typeof data ) {\n\t\t\t\ttry {\n\t\t\t\t\tdata = JSON.parse( data );\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\t// Update the state only if the message is formatted as we expect,\n\t\t\t// i.e. as an object with a 'resize' action.\n\t\t\tif ( 'resize' !== data.action ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetWidth( data.width );\n\t\t\tsetHeight( data.height );\n\t\t}\n\n\t\tconst iframe = ref.current;\n\t\tconst defaultView = iframe?.ownerDocument?.defaultView;\n\n\t\t// This used to be registered using <iframe onLoad={} />, but it made the iframe blank\n\t\t// after reordering the containing block. See these two issues for more details:\n\t\t// https://github.com/WordPress/gutenberg/issues/6146\n\t\t// https://github.com/facebook/react/issues/18752\n\t\tiframe?.addEventListener( 'load', tryNoForceSandBox, false );\n\t\tdefaultView?.addEventListener( 'message', checkMessageForResize );\n\n\t\treturn () => {\n\t\t\tiframe?.removeEventListener( 'load', tryNoForceSandBox, false );\n\t\t\tdefaultView?.addEventListener( 'message', checkMessageForResize );\n\t\t};\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tuseEffect( () => {\n\t\ttrySandBox();\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ title, styles, scripts ] );\n\n\tuseEffect( () => {\n\t\ttrySandBox( true );\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ html, type ] );\n\n\treturn (\n\t\t<iframe\n\t\t\tref={ useMergeRefs( [ ref, useFocusableIframe() ] ) }\n\t\t\ttitle={ title }\n\t\t\tclassName=\"components-sandbox\"\n\t\t\tsandbox=\"allow-scripts allow-same-origin allow-presentation\"\n\t\t\tonFocus={ onFocus }\n\t\t\twidth={ Math.ceil( width ) }\n\t\t\theight={ Math.ceil( height ) }\n\t\t/>\n\t);\n}\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,MAAM,GAAG7B,GAAG,CAACI,OAAO;IAC1B,MAAM+B,WAAW,GAAGN,MAAM,EAAEpB,aAAa,EAAE0B,WAAW;;IAEtD;IACA;IACA;IACA;IACAN,MAAM,EAAEpD,gBAAgB,CAAE,MAAM,EAAEiD,iBAAiB,EAAE,KAAM,CAAC;IAC5DS,WAAW,EAAE1D,gBAAgB,CAAE,SAAS,EAAEkD,qBAAsB,CAAC;IAEjE,OAAO,MAAM;MACZE,MAAM,EAAEO,mBAAmB,CAAE,MAAM,EAAEV,iBAAiB,EAAE,KAAM,CAAC;MAC/DS,WAAW,EAAE1D,gBAAgB,CAAE,SAAS,EAAEkD,qBAAsB,CAAC;IAClE,CAAC;IACD;IACA;IACA;EACD,CAAC,EAAE,EAAG,CAAC;EAEP1E,SAAS,CAAE,MAAM;IAChBsD,UAAU,CAAC,CAAC;IACZ;IACA;IACA;EACD,CAAC,EAAE,CAAEZ,KAAK,EAAEE,MAAM,EAAEC,OAAO,CAAG,CAAC;EAE/B7C,SAAS,CAAE,MAAM;IAChBsD,UAAU,CAAE,IAAK,CAAC;IAClB;IACA;IACA;EACD,CAAC,EAAE,CAAEb,IAAI,EAAEE,IAAI,CAAG,CAAC;EAEnB,OACCgB,aAAA;IACCZ,GAAG,EAAG7C,YAAY,CAAE,CAAE6C,GAAG,EAAE9C,kBAAkB,CAAC,CAAC,CAAG,CAAG;IACrDyC,KAAK,EAAGA,KAAO;IACfoB,SAAS,EAAC,oBAAoB;IAC9BsB,OAAO,EAAC,oDAAoD;IAC5DtC,OAAO,EAAGA,OAAS;IACnBhC,KAAK,EAAGuE,IAAI,CAACC,IAAI,CAAExE,KAAM,CAAG;IAC5BC,MAAM,EAAGsE,IAAI,CAACC,IAAI,CAAEvE,MAAO;EAAG,CAC9B,CAAC;AAEJ;AAEA,eAAeyB,OAAO"}
1
+ {"version":3,"names":["renderToString","useRef","useState","useEffect","useFocusableIframe","useMergeRefs","observeAndResizeJS","MutationObserver","window","document","body","parent","sendResize","clientBoundingRect","getBoundingClientRect","postMessage","action","width","height","observer","observe","attributes","attributeOldValue","characterData","characterDataOldValue","childList","subtree","addEventListener","removeViewportStyles","ruleOrNode","style","forEach","test","Array","prototype","call","querySelectorAll","styleSheets","stylesheet","cssRules","rules","position","setAttribute","SandBox","html","title","type","styles","scripts","onFocus","ref","setWidth","setHeight","isFrameAccessible","current","contentDocument","e","trySandBox","forceRerender","ownerDocument","getAttribute","htmlDoc","createElement","lang","documentElement","className","dangerouslySetInnerHTML","__html","map","i","key","toString","src","open","write","close","tryNoForceSandBox","checkMessageForResize","event","iframe","contentWindow","source","data","JSON","parse","defaultView","removeEventListener","sandbox","Math","ceil"],"sources":["@wordpress/components/src/sandbox/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport {\n\trenderToString,\n\tuseRef,\n\tuseState,\n\tuseEffect,\n} from '@wordpress/element';\nimport { useFocusableIframe, useMergeRefs } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport type { SandBoxProps } from './types';\n\nconst observeAndResizeJS = function () {\n\tconst { MutationObserver } = window;\n\n\tif ( ! MutationObserver || ! document.body || ! window.parent ) {\n\t\treturn;\n\t}\n\n\tfunction sendResize() {\n\t\tconst clientBoundingRect = document.body.getBoundingClientRect();\n\n\t\twindow.parent.postMessage(\n\t\t\t{\n\t\t\t\taction: 'resize',\n\t\t\t\twidth: clientBoundingRect.width,\n\t\t\t\theight: clientBoundingRect.height,\n\t\t\t},\n\t\t\t'*'\n\t\t);\n\t}\n\n\tconst observer = new MutationObserver( sendResize );\n\tobserver.observe( document.body, {\n\t\tattributes: true,\n\t\tattributeOldValue: false,\n\t\tcharacterData: true,\n\t\tcharacterDataOldValue: false,\n\t\tchildList: true,\n\t\tsubtree: true,\n\t} );\n\n\twindow.addEventListener( 'load', sendResize, true );\n\n\t// Hack: Remove viewport unit styles, as these are relative\n\t// the iframe root and interfere with our mechanism for\n\t// determining the unconstrained page bounds.\n\tfunction removeViewportStyles( ruleOrNode: ElementCSSInlineStyle ) {\n\t\tif ( ruleOrNode.style ) {\n\t\t\t(\n\t\t\t\t[ 'width', 'height', 'minHeight', 'maxHeight' ] as const\n\t\t\t ).forEach( function ( style ) {\n\t\t\t\tif (\n\t\t\t\t\t/^\\\\d+(vmin|vmax|vh|vw)$/.test( ruleOrNode.style[ style ] )\n\t\t\t\t) {\n\t\t\t\t\truleOrNode.style[ style ] = '';\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t}\n\n\tArray.prototype.forEach.call(\n\t\tdocument.querySelectorAll( '[style]' ),\n\t\tremoveViewportStyles\n\t);\n\tArray.prototype.forEach.call(\n\t\tdocument.styleSheets,\n\t\tfunction ( stylesheet ) {\n\t\t\tArray.prototype.forEach.call(\n\t\t\t\tstylesheet.cssRules || stylesheet.rules,\n\t\t\t\tremoveViewportStyles\n\t\t\t);\n\t\t}\n\t);\n\n\tdocument.body.style.position = 'absolute';\n\tdocument.body.style.width = '100%';\n\tdocument.body.setAttribute( 'data-resizable-iframe-connected', '' );\n\n\tsendResize();\n\n\t// Resize events can change the width of elements with 100% width, but we don't\n\t// get an DOM mutations for that, so do the resize when the window is resized, too.\n\twindow.addEventListener( 'resize', sendResize, true );\n};\n\n// TODO: These styles shouldn't be coupled with WordPress.\nconst style = `\n\tbody {\n\t\tmargin: 0;\n\t}\n\thtml,\n\tbody,\n\tbody > div {\n\t\twidth: 100%;\n\t}\n\thtml.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio,\n\tbody.wp-has-aspect-ratio > div,\n\tbody.wp-has-aspect-ratio > div iframe {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: hidden; /* If it has an aspect ratio, it shouldn't scroll. */\n\t}\n\tbody > div > * {\n\t\tmargin-top: 0 !important; /* Has to have !important to override inline styles. */\n\t\tmargin-bottom: 0 !important;\n\t}\n`;\n\n/**\n * This component provides an isolated environment for arbitrary HTML via iframes.\n *\n * ```jsx\n * import { SandBox } from '@wordpress/components';\n *\n * const MySandBox = () => (\n * \t<SandBox html=\"<p>Content</p>\" title=\"SandBox\" type=\"embed\" />\n * );\n * ```\n */\nfunction SandBox( {\n\thtml = '',\n\ttitle = '',\n\ttype,\n\tstyles = [],\n\tscripts = [],\n\tonFocus,\n}: SandBoxProps ) {\n\tconst ref = useRef< HTMLIFrameElement >();\n\tconst [ width, setWidth ] = useState( 0 );\n\tconst [ height, setHeight ] = useState( 0 );\n\n\tfunction isFrameAccessible() {\n\t\ttry {\n\t\t\treturn !! ref.current?.contentDocument?.body;\n\t\t} catch ( e ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tfunction trySandBox( forceRerender = false ) {\n\t\tif ( ! isFrameAccessible() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { contentDocument, ownerDocument } =\n\t\t\tref.current as HTMLIFrameElement & {\n\t\t\t\tcontentDocument: Document;\n\t\t\t};\n\n\t\tif (\n\t\t\t! forceRerender &&\n\t\t\tnull !==\n\t\t\t\tcontentDocument?.body.getAttribute(\n\t\t\t\t\t'data-resizable-iframe-connected'\n\t\t\t\t)\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Put the html snippet into a html document, and then write it to the iframe's document\n\t\t// we can use this in the future to inject custom styles or scripts.\n\t\t// Scripts go into the body rather than the head, to support embedded content such as Instagram\n\t\t// that expect the scripts to be part of the body.\n\t\tconst htmlDoc = (\n\t\t\t<html\n\t\t\t\tlang={ ownerDocument.documentElement.lang }\n\t\t\t\tclassName={ type }\n\t\t\t>\n\t\t\t\t<head>\n\t\t\t\t\t<title>{ title }</title>\n\t\t\t\t\t<style dangerouslySetInnerHTML={ { __html: style } } />\n\t\t\t\t\t{ styles.map( ( rules, i ) => (\n\t\t\t\t\t\t<style\n\t\t\t\t\t\t\tkey={ i }\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={ { __html: rules } }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) ) }\n\t\t\t\t</head>\n\t\t\t\t<body\n\t\t\t\t\tdata-resizable-iframe-connected=\"data-resizable-iframe-connected\"\n\t\t\t\t\tclassName={ type }\n\t\t\t\t>\n\t\t\t\t\t<div dangerouslySetInnerHTML={ { __html: html } } />\n\t\t\t\t\t<script\n\t\t\t\t\t\ttype=\"text/javascript\"\n\t\t\t\t\t\tdangerouslySetInnerHTML={ {\n\t\t\t\t\t\t\t__html: `(${ observeAndResizeJS.toString() })();`,\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t{ scripts.map( ( src ) => (\n\t\t\t\t\t\t<script key={ src } src={ src } />\n\t\t\t\t\t) ) }\n\t\t\t\t</body>\n\t\t\t</html>\n\t\t);\n\n\t\t// Writing the document like this makes it act in the same way as if it was\n\t\t// loaded over the network, so DOM creation and mutation, script execution, etc.\n\t\t// all work as expected.\n\t\tcontentDocument.open();\n\t\tcontentDocument.write( '<!DOCTYPE html>' + renderToString( htmlDoc ) );\n\t\tcontentDocument.close();\n\t}\n\n\tuseEffect( () => {\n\t\ttrySandBox();\n\n\t\tfunction tryNoForceSandBox() {\n\t\t\ttrySandBox( false );\n\t\t}\n\n\t\tfunction checkMessageForResize( event: MessageEvent ) {\n\t\t\tconst iframe = ref.current;\n\n\t\t\t// Verify that the mounted element is the source of the message.\n\t\t\tif ( ! iframe || iframe.contentWindow !== event.source ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Attempt to parse the message data as JSON if passed as string.\n\t\t\tlet data = event.data || {};\n\n\t\t\tif ( 'string' === typeof data ) {\n\t\t\t\ttry {\n\t\t\t\t\tdata = JSON.parse( data );\n\t\t\t\t} catch ( e ) {}\n\t\t\t}\n\n\t\t\t// Update the state only if the message is formatted as we expect,\n\t\t\t// i.e. as an object with a 'resize' action.\n\t\t\tif ( 'resize' !== data.action ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetWidth( data.width );\n\t\t\tsetHeight( data.height );\n\t\t}\n\n\t\tconst iframe = ref.current;\n\t\tconst defaultView = iframe?.ownerDocument?.defaultView;\n\n\t\t// This used to be registered using <iframe onLoad={} />, but it made the iframe blank\n\t\t// after reordering the containing block. See these two issues for more details:\n\t\t// https://github.com/WordPress/gutenberg/issues/6146\n\t\t// https://github.com/facebook/react/issues/18752\n\t\tiframe?.addEventListener( 'load', tryNoForceSandBox, false );\n\t\tdefaultView?.addEventListener( 'message', checkMessageForResize );\n\n\t\treturn () => {\n\t\t\tiframe?.removeEventListener( 'load', tryNoForceSandBox, false );\n\t\t\tdefaultView?.removeEventListener(\n\t\t\t\t'message',\n\t\t\t\tcheckMessageForResize\n\t\t\t);\n\t\t};\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [] );\n\n\tuseEffect( () => {\n\t\ttrySandBox();\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ title, styles, scripts ] );\n\n\tuseEffect( () => {\n\t\ttrySandBox( true );\n\t\t// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.\n\t\t// See https://github.com/WordPress/gutenberg/pull/44378\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ html, type ] );\n\n\treturn (\n\t\t<iframe\n\t\t\tref={ useMergeRefs( [ ref, useFocusableIframe() ] ) }\n\t\t\ttitle={ title }\n\t\t\tclassName=\"components-sandbox\"\n\t\t\tsandbox=\"allow-scripts allow-same-origin allow-presentation\"\n\t\t\tonFocus={ onFocus }\n\t\t\twidth={ Math.ceil( width ) }\n\t\t\theight={ Math.ceil( height ) }\n\t\t/>\n\t);\n}\n\nexport default SandBox;\n"],"mappings":";AAAA;AACA;AACA;AACA,SACCA,cAAc,EACdC,MAAM,EACNC,QAAQ,EACRC,SAAS,QACH,oBAAoB;AAC3B,SAASC,kBAAkB,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