@wordpress/components 25.6.1 → 25.8.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 (1064) hide show
  1. package/CHANGELOG.md +70 -1
  2. package/CONTRIBUTING.md +1 -1
  3. package/README.md +3 -8
  4. package/build/animation/index.js +6 -0
  5. package/build/animation/index.js.map +1 -1
  6. package/build/border-control/border-control-dropdown/component.js +1 -1
  7. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  8. package/build/border-control/styles.js +20 -20
  9. package/build/border-control/styles.js.map +1 -1
  10. package/build/box-control/unit-control.js +1 -1
  11. package/build/box-control/unit-control.js.map +1 -1
  12. package/build/button/index.js +9 -1
  13. package/build/button/index.js.map +1 -1
  14. package/build/button/types.js.map +1 -1
  15. package/build/circular-option-picker/circular-option-picker-actions.js +53 -0
  16. package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -0
  17. package/build/circular-option-picker/circular-option-picker-context.js +14 -0
  18. package/build/circular-option-picker/circular-option-picker-context.js.map +1 -0
  19. package/build/circular-option-picker/circular-option-picker-option-group.js +26 -0
  20. package/build/circular-option-picker/circular-option-picker-option-group.js.map +1 -0
  21. package/build/circular-option-picker/circular-option-picker-option.js +122 -0
  22. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -0
  23. package/build/circular-option-picker/circular-option-picker.js +172 -0
  24. package/build/circular-option-picker/circular-option-picker.js.map +1 -0
  25. package/build/circular-option-picker/index.js +29 -137
  26. package/build/circular-option-picker/index.js.map +1 -1
  27. package/build/circular-option-picker/types.js.map +1 -1
  28. package/build/color-palette/index.js +58 -19
  29. package/build/color-palette/index.js.map +1 -1
  30. package/build/color-palette/types.js.map +1 -1
  31. package/build/color-picker/hsv-color-picker.native.js +92 -0
  32. package/build/color-picker/hsv-color-picker.native.js.map +1 -0
  33. package/build/color-picker/hue-picker.native.js +195 -0
  34. package/build/color-picker/hue-picker.native.js.map +1 -0
  35. package/build/color-picker/index.native.js +3 -2
  36. package/build/color-picker/index.native.js.map +1 -1
  37. package/build/color-picker/saturation-picker.native.js +178 -0
  38. package/build/color-picker/saturation-picker.native.js.map +1 -0
  39. package/build/combobox-control/index.js +0 -3
  40. package/build/combobox-control/index.js.map +1 -1
  41. package/build/composite/index.js.map +1 -1
  42. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  43. package/build/date-time/time/timezone.js +1 -1
  44. package/build/date-time/time/timezone.js.map +1 -1
  45. package/build/dropdown/index.js +11 -23
  46. package/build/dropdown/index.js.map +1 -1
  47. package/build/dropdown/types.js.map +1 -1
  48. package/build/dropdown-menu/index.js +7 -1
  49. package/build/dropdown-menu/index.js.map +1 -1
  50. package/build/dropdown-menu/types.js.map +1 -1
  51. package/build/dropdown-menu-v2/styles.js +16 -16
  52. package/build/dropdown-menu-v2/styles.js.map +1 -1
  53. package/build/duotone-picker/color-list-picker/index.js +18 -3
  54. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  55. package/build/duotone-picker/duotone-picker.js +33 -1
  56. package/build/duotone-picker/duotone-picker.js.map +1 -1
  57. package/build/duotone-picker/types.js.map +1 -1
  58. package/build/focusable-iframe/index.js +0 -4
  59. package/build/focusable-iframe/index.js.map +1 -1
  60. package/build/focusable-iframe/types.js +6 -0
  61. package/build/focusable-iframe/types.js.map +1 -0
  62. package/build/form-token-field/index.js +6 -2
  63. package/build/form-token-field/index.js.map +1 -1
  64. package/build/form-token-field/types.js.map +1 -1
  65. package/build/gradient-picker/index.js +57 -15
  66. package/build/gradient-picker/index.js.map +1 -1
  67. package/build/gradient-picker/types.js.map +1 -1
  68. package/build/higher-order/navigate-regions/index.js.map +1 -1
  69. package/build/higher-order/with-focus-outside/index.js +1 -2
  70. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  71. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  72. package/build/index.js +6 -0
  73. package/build/index.js.map +1 -1
  74. package/build/input-control/styles/input-control-styles.js +22 -22
  75. package/build/input-control/styles/input-control-styles.js.map +1 -1
  76. package/build/item-group/item/component.js +0 -1
  77. package/build/item-group/item/component.js.map +1 -1
  78. package/build/item-group/item-group/component.js +0 -1
  79. package/build/item-group/item-group/component.js.map +1 -1
  80. package/build/menu-item/index.js +6 -4
  81. package/build/menu-item/index.js.map +1 -1
  82. package/build/menu-item/types.js.map +1 -1
  83. package/build/mobile/bottom-sheet/index.native.js +1 -0
  84. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  85. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  86. package/build/mobile/link-settings/link-settings-navigation.native.js +1 -1
  87. package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  88. package/build/navigation/index.js +0 -1
  89. package/build/navigation/index.js.map +1 -1
  90. package/build/navigation/use-navigation-tree-nodes.js.map +1 -1
  91. package/build/navigator/navigator-provider/component.js +1 -2
  92. package/build/navigator/navigator-provider/component.js.map +1 -1
  93. package/build/notice/index.js +19 -7
  94. package/build/notice/index.js.map +1 -1
  95. package/build/palette-edit/styles.js +10 -10
  96. package/build/palette-edit/styles.js.map +1 -1
  97. package/build/placeholder/index.js.map +1 -1
  98. package/build/popover/index.js +68 -151
  99. package/build/popover/index.js.map +1 -1
  100. package/build/popover/overlay-middlewares.js.map +1 -1
  101. package/build/popover/types.js.map +1 -1
  102. package/build/popover/utils.js +10 -87
  103. package/build/popover/utils.js.map +1 -1
  104. package/build/progress-bar/styles.js +6 -5
  105. package/build/progress-bar/styles.js.map +1 -1
  106. package/build/search-control/index.js +12 -3
  107. package/build/search-control/index.js.map +1 -1
  108. package/build/search-control/index.native.js +27 -24
  109. package/build/search-control/index.native.js.map +1 -1
  110. package/build/search-control/types.js.map +1 -1
  111. package/build/shortcut/index.js +13 -0
  112. package/build/shortcut/index.js.map +1 -1
  113. package/build/slot-fill/bubbles-virtually/slot-fill-context.js +3 -1
  114. package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  115. package/build/slot-fill/bubbles-virtually/slot.js +14 -8
  116. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  117. package/build/slot-fill/index.js +5 -0
  118. package/build/slot-fill/index.js.map +1 -1
  119. package/build/spinner/index.js +0 -1
  120. package/build/spinner/index.js.map +1 -1
  121. package/build/text/styles.js +7 -7
  122. package/build/text/styles.js.map +1 -1
  123. package/build/theme/index.js +0 -1
  124. package/build/theme/index.js.map +1 -1
  125. package/build/toggle-group-control/toggle-group-control/as-button-group.js +30 -45
  126. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  127. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +40 -41
  128. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  129. package/build/toggle-group-control/toggle-group-control/component.js +10 -5
  130. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  131. package/build/toggle-group-control/toggle-group-control/styles.js +9 -16
  132. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  133. package/build/toggle-group-control/toggle-group-control/utils.js +44 -0
  134. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -0
  135. package/build/toggle-group-control/toggle-group-control-option-base/component.js +36 -17
  136. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  137. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +10 -8
  138. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  139. package/build/toggle-group-control/types.js.map +1 -1
  140. package/build/toolbar/toolbar/index.js +7 -1
  141. package/build/toolbar/toolbar/index.js.map +1 -1
  142. package/build/toolbar/toolbar-dropdown-menu/index.js +1 -3
  143. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  144. package/build/toolbar/toolbar-group/index.js +16 -12
  145. package/build/toolbar/toolbar-group/index.js.map +1 -1
  146. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +0 -2
  147. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  148. package/build/toolbar/toolbar-group/toolbar-group-container.js +3 -1
  149. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  150. package/build/toolbar/toolbar-group/types.js +6 -0
  151. package/build/toolbar/toolbar-group/types.js.map +1 -0
  152. package/build/toolbar/toolbar-item/index.js +1 -1
  153. package/build/toolbar/toolbar-item/index.js.map +1 -1
  154. package/build/tools-panel/tools-panel/component.js +0 -1
  155. package/build/tools-panel/tools-panel/component.js.map +1 -1
  156. package/build/tools-panel/tools-panel-header/component.js +5 -1
  157. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  158. package/build/tooltip/index.js +51 -225
  159. package/build/tooltip/index.js.map +1 -1
  160. package/build/tooltip/types.js +6 -0
  161. package/build/tooltip/types.js.map +1 -0
  162. package/build/tree-select/index.js +0 -1
  163. package/build/tree-select/index.js.map +1 -1
  164. package/build/ui/context/context-connect.js.map +1 -1
  165. package/build/ui/context/wordpress-component.js.map +1 -1
  166. package/build/unit-control/index.js +0 -1
  167. package/build/unit-control/index.js.map +1 -1
  168. package/build/unit-control/styles/unit-control-styles.js +7 -7
  169. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  170. package/build/utils/colors-values.js +1 -1
  171. package/build/utils/colors-values.js.map +1 -1
  172. package/build/utils/hooks/use-cx.js +2 -1
  173. package/build/utils/hooks/use-cx.js.map +1 -1
  174. package/build/utils/use-deprecated-props.js.map +1 -1
  175. package/build/view/component.js +1 -2
  176. package/build/view/component.js.map +1 -1
  177. package/build-module/animation/index.js +1 -1
  178. package/build-module/animation/index.js.map +1 -1
  179. package/build-module/border-control/border-control-dropdown/component.js +1 -1
  180. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  181. package/build-module/border-control/styles.js +20 -20
  182. package/build-module/border-control/styles.js.map +1 -1
  183. package/build-module/box-control/unit-control.js +1 -1
  184. package/build-module/box-control/unit-control.js.map +1 -1
  185. package/build-module/button/index.js +9 -1
  186. package/build-module/button/index.js.map +1 -1
  187. package/build-module/button/types.js.map +1 -1
  188. package/build-module/circular-option-picker/circular-option-picker-actions.js +44 -0
  189. package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -0
  190. package/build-module/circular-option-picker/circular-option-picker-context.js +11 -0
  191. package/build-module/circular-option-picker/circular-option-picker-context.js.map +1 -0
  192. package/build-module/circular-option-picker/circular-option-picker-option-group.js +23 -0
  193. package/build-module/circular-option-picker/circular-option-picker-option-group.js.map +1 -0
  194. package/build-module/circular-option-picker/circular-option-picker-option.js +114 -0
  195. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -0
  196. package/build-module/circular-option-picker/circular-option-picker.js +165 -0
  197. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -0
  198. package/build-module/circular-option-picker/index.js +4 -132
  199. package/build-module/circular-option-picker/index.js.map +1 -1
  200. package/build-module/circular-option-picker/types.js.map +1 -1
  201. package/build-module/color-palette/index.js +58 -19
  202. package/build-module/color-palette/index.js.map +1 -1
  203. package/build-module/color-palette/types.js.map +1 -1
  204. package/build-module/color-picker/hsv-color-picker.native.js +84 -0
  205. package/build-module/color-picker/hsv-color-picker.native.js.map +1 -0
  206. package/build-module/color-picker/hue-picker.native.js +185 -0
  207. package/build-module/color-picker/hue-picker.native.js.map +1 -0
  208. package/build-module/color-picker/index.native.js +2 -1
  209. package/build-module/color-picker/index.native.js.map +1 -1
  210. package/build-module/color-picker/saturation-picker.native.js +168 -0
  211. package/build-module/color-picker/saturation-picker.native.js.map +1 -0
  212. package/build-module/combobox-control/index.js +0 -3
  213. package/build-module/combobox-control/index.js.map +1 -1
  214. package/build-module/composite/index.js +2 -0
  215. package/build-module/composite/index.js.map +1 -1
  216. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  217. package/build-module/date-time/time/timezone.js +1 -1
  218. package/build-module/date-time/time/timezone.js.map +1 -1
  219. package/build-module/dropdown/index.js +12 -24
  220. package/build-module/dropdown/index.js.map +1 -1
  221. package/build-module/dropdown/types.js.map +1 -1
  222. package/build-module/dropdown-menu/index.js +7 -1
  223. package/build-module/dropdown-menu/index.js.map +1 -1
  224. package/build-module/dropdown-menu/types.js.map +1 -1
  225. package/build-module/dropdown-menu-v2/styles.js +16 -16
  226. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  227. package/build-module/duotone-picker/color-list-picker/index.js +18 -3
  228. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  229. package/build-module/duotone-picker/duotone-picker.js +33 -1
  230. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  231. package/build-module/duotone-picker/types.js.map +1 -1
  232. package/build-module/focusable-iframe/index.js +2 -3
  233. package/build-module/focusable-iframe/index.js.map +1 -1
  234. package/build-module/focusable-iframe/types.js +2 -0
  235. package/build-module/focusable-iframe/types.js.map +1 -0
  236. package/build-module/form-token-field/index.js +6 -2
  237. package/build-module/form-token-field/index.js.map +1 -1
  238. package/build-module/form-token-field/types.js.map +1 -1
  239. package/build-module/gradient-picker/index.js +57 -15
  240. package/build-module/gradient-picker/index.js.map +1 -1
  241. package/build-module/gradient-picker/types.js.map +1 -1
  242. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  243. package/build-module/higher-order/with-focus-outside/index.js +1 -3
  244. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  245. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  246. package/build-module/index.js +1 -1
  247. package/build-module/index.js.map +1 -1
  248. package/build-module/input-control/styles/input-control-styles.js +23 -23
  249. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  250. package/build-module/item-group/item/component.js +0 -1
  251. package/build-module/item-group/item/component.js.map +1 -1
  252. package/build-module/item-group/item-group/component.js +0 -1
  253. package/build-module/item-group/item-group/component.js.map +1 -1
  254. package/build-module/menu-item/index.js +4 -2
  255. package/build-module/menu-item/index.js.map +1 -1
  256. package/build-module/menu-item/types.js.map +1 -1
  257. package/build-module/mobile/bottom-sheet/index.native.js +1 -0
  258. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  259. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  260. package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -1
  261. package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
  262. package/build-module/navigation/index.js +0 -1
  263. package/build-module/navigation/index.js.map +1 -1
  264. package/build-module/navigation/use-navigation-tree-nodes.js.map +1 -1
  265. package/build-module/navigator/navigator-provider/component.js +1 -2
  266. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  267. package/build-module/notice/index.js +19 -7
  268. package/build-module/notice/index.js.map +1 -1
  269. package/build-module/palette-edit/styles.js +10 -10
  270. package/build-module/palette-edit/styles.js.map +1 -1
  271. package/build-module/placeholder/index.js.map +1 -1
  272. package/build-module/popover/index.js +72 -155
  273. package/build-module/popover/index.js.map +1 -1
  274. package/build-module/popover/overlay-middlewares.js.map +1 -1
  275. package/build-module/popover/types.js.map +1 -1
  276. package/build-module/popover/utils.js +9 -83
  277. package/build-module/popover/utils.js.map +1 -1
  278. package/build-module/progress-bar/styles.js +6 -5
  279. package/build-module/progress-bar/styles.js.map +1 -1
  280. package/build-module/search-control/index.js +12 -3
  281. package/build-module/search-control/index.js.map +1 -1
  282. package/build-module/search-control/index.native.js +28 -25
  283. package/build-module/search-control/index.native.js.map +1 -1
  284. package/build-module/search-control/types.js.map +1 -1
  285. package/build-module/shortcut/index.js +13 -0
  286. package/build-module/shortcut/index.js.map +1 -1
  287. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +3 -1
  288. package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
  289. package/build-module/slot-fill/bubbles-virtually/slot.js +14 -8
  290. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  291. package/build-module/slot-fill/index.js +6 -1
  292. package/build-module/slot-fill/index.js.map +1 -1
  293. package/build-module/spinner/index.js +0 -1
  294. package/build-module/spinner/index.js.map +1 -1
  295. package/build-module/text/styles.js +7 -7
  296. package/build-module/text/styles.js.map +1 -1
  297. package/build-module/theme/index.js +0 -1
  298. package/build-module/theme/index.js.map +1 -1
  299. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +32 -47
  300. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  301. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +41 -42
  302. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  303. package/build-module/toggle-group-control/toggle-group-control/component.js +10 -6
  304. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  305. package/build-module/toggle-group-control/toggle-group-control/styles.js +8 -14
  306. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  307. package/build-module/toggle-group-control/toggle-group-control/utils.js +42 -0
  308. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -0
  309. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +35 -16
  310. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  311. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +8 -7
  312. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  313. package/build-module/toggle-group-control/types.js.map +1 -1
  314. package/build-module/toolbar/toolbar/index.js +7 -1
  315. package/build-module/toolbar/toolbar/index.js.map +1 -1
  316. package/build-module/toolbar/toolbar-dropdown-menu/index.js +5 -3
  317. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  318. package/build-module/toolbar/toolbar-group/index.js +15 -12
  319. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  320. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js +0 -2
  321. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  322. package/build-module/toolbar/toolbar-group/toolbar-group-container.js +3 -1
  323. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  324. package/build-module/toolbar/toolbar-group/types.js +2 -0
  325. package/build-module/toolbar/toolbar-group/types.js.map +1 -0
  326. package/build-module/toolbar/toolbar-item/index.js +1 -1
  327. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  328. package/build-module/tools-panel/tools-panel/component.js +0 -1
  329. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  330. package/build-module/tools-panel/tools-panel-header/component.js +5 -1
  331. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  332. package/build-module/tooltip/index.js +53 -224
  333. package/build-module/tooltip/index.js.map +1 -1
  334. package/build-module/tooltip/types.js +2 -0
  335. package/build-module/tooltip/types.js.map +1 -0
  336. package/build-module/tree-select/index.js +0 -1
  337. package/build-module/tree-select/index.js.map +1 -1
  338. package/build-module/ui/context/context-connect.js.map +1 -1
  339. package/build-module/ui/context/wordpress-component.js.map +1 -1
  340. package/build-module/unit-control/index.js +0 -1
  341. package/build-module/unit-control/index.js.map +1 -1
  342. package/build-module/unit-control/styles/unit-control-styles.js +7 -7
  343. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  344. package/build-module/utils/colors-values.js +1 -1
  345. package/build-module/utils/colors-values.js.map +1 -1
  346. package/build-module/utils/hooks/use-cx.js +2 -1
  347. package/build-module/utils/hooks/use-cx.js.map +1 -1
  348. package/build-module/utils/use-deprecated-props.js.map +1 -1
  349. package/build-module/view/component.js +1 -2
  350. package/build-module/view/component.js.map +1 -1
  351. package/build-style/style-rtl.css +35 -63
  352. package/build-style/style.css +35 -63
  353. package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
  354. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  355. package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
  356. package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
  357. package/build-types/animate/stories/index.story.d.ts +9 -9
  358. package/build-types/animate/stories/index.story.d.ts.map +1 -1
  359. package/build-types/animation/index.d.ts +1 -1
  360. package/build-types/animation/index.d.ts.map +1 -1
  361. package/build-types/base-control/hooks.d.ts +1 -1
  362. package/build-types/base-control/stories/index.story.d.ts +4 -4
  363. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  364. package/build-types/border-box-control/border-box-control/component.d.ts +1 -1
  365. package/build-types/border-box-control/border-box-control/hook.d.ts +46 -46
  366. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +51 -51
  367. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +1 -1
  368. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +46 -46
  369. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +46 -46
  370. package/build-types/border-box-control/stories/index.story.d.ts +4 -4
  371. package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
  372. package/build-types/border-control/border-control/hook.d.ts +45 -45
  373. package/build-types/border-control/border-control-dropdown/hook.d.ts +45 -45
  374. package/build-types/border-control/border-control-style-picker/hook.d.ts +45 -45
  375. package/build-types/border-control/stories/index.story.d.ts +8 -8
  376. package/build-types/border-control/stories/index.story.d.ts.map +1 -1
  377. package/build-types/box-control/styles/box-control-styles.d.ts +1 -1
  378. package/build-types/button/deprecated.d.ts +16 -22
  379. package/build-types/button/deprecated.d.ts.map +1 -1
  380. package/build-types/button/index.d.ts.map +1 -1
  381. package/build-types/button/stories/e2e/index.story.d.ts +3 -3
  382. package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
  383. package/build-types/button/stories/index.story.d.ts +10 -9
  384. package/build-types/button/stories/index.story.d.ts.map +1 -1
  385. package/build-types/button/types.d.ts +0 -4
  386. package/build-types/button/types.d.ts.map +1 -1
  387. package/build-types/button-group/stories/index.story.d.ts +3 -3
  388. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  389. package/build-types/card/card/hook.d.ts +46 -46
  390. package/build-types/card/card-body/hook.d.ts +46 -46
  391. package/build-types/card/card-divider/hook.d.ts +47 -47
  392. package/build-types/card/card-footer/hook.d.ts +46 -46
  393. package/build-types/card/card-header/hook.d.ts +46 -46
  394. package/build-types/card/card-media/hook.d.ts +46 -46
  395. package/build-types/card/stories/index.story.d.ts +4 -4
  396. package/build-types/card/stories/index.story.d.ts.map +1 -1
  397. package/build-types/checkbox-control/stories/index.story.d.ts +4 -4
  398. package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
  399. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +7 -0
  400. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -0
  401. package/build-types/circular-option-picker/circular-option-picker-context.d.ts +7 -0
  402. package/build-types/circular-option-picker/circular-option-picker-context.d.ts.map +1 -0
  403. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts +7 -0
  404. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts.map +1 -0
  405. package/build-types/circular-option-picker/circular-option-picker-option.d.ts +4 -0
  406. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -0
  407. package/build-types/circular-option-picker/circular-option-picker.d.ts +11 -0
  408. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -0
  409. package/build-types/circular-option-picker/index.d.ts +5 -56
  410. package/build-types/circular-option-picker/index.d.ts.map +1 -1
  411. package/build-types/circular-option-picker/stories/index.story.d.ts +5 -3
  412. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  413. package/build-types/circular-option-picker/test/index.d.ts +2 -0
  414. package/build-types/circular-option-picker/test/index.d.ts.map +1 -0
  415. package/build-types/circular-option-picker/types.d.ts +53 -1
  416. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  417. package/build-types/color-indicator/stories/index.story.d.ts +3 -3
  418. package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
  419. package/build-types/color-palette/index.d.ts +3 -19
  420. package/build-types/color-palette/index.d.ts.map +1 -1
  421. package/build-types/color-palette/stories/index.story.d.ts +6 -39
  422. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  423. package/build-types/color-palette/styles.d.ts +1 -1
  424. package/build-types/color-palette/types.d.ts +31 -1
  425. package/build-types/color-palette/types.d.ts.map +1 -1
  426. package/build-types/color-picker/component.d.ts +1 -1
  427. package/build-types/color-picker/stories/index.story.d.ts +3 -3
  428. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  429. package/build-types/color-picker/styles.d.ts +6 -6
  430. package/build-types/combobox-control/index.d.ts.map +1 -1
  431. package/build-types/combobox-control/stories/index.story.d.ts +4 -4
  432. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  433. package/build-types/composite/index.d.ts +14 -1
  434. package/build-types/composite/index.d.ts.map +1 -1
  435. package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
  436. package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
  437. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -2
  438. package/build-types/date-time/date/styles.d.ts +3 -3
  439. package/build-types/date-time/date-time/styles.d.ts +2 -2
  440. package/build-types/date-time/stories/date-time.story.d.ts +5 -5
  441. package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
  442. package/build-types/date-time/stories/date.story.d.ts +5 -5
  443. package/build-types/date-time/stories/date.story.d.ts.map +1 -1
  444. package/build-types/date-time/stories/time.story.d.ts +3 -3
  445. package/build-types/date-time/stories/time.story.d.ts.map +1 -1
  446. package/build-types/date-time/time/styles.d.ts +12 -12
  447. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  448. package/build-types/disabled/stories/index.story.d.ts +4 -4
  449. package/build-types/disabled/stories/index.story.d.ts.map +1 -1
  450. package/build-types/divider/stories/index.story.d.ts +5 -5
  451. package/build-types/divider/stories/index.story.d.ts.map +1 -1
  452. package/build-types/draggable/stories/index.story.d.ts +4 -4
  453. package/build-types/draggable/stories/index.story.d.ts.map +1 -1
  454. package/build-types/drop-zone/stories/index.story.d.ts +2 -2
  455. package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
  456. package/build-types/dropdown/index.d.ts.map +1 -1
  457. package/build-types/dropdown/stories/index.story.d.ts +6 -5
  458. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  459. package/build-types/dropdown/types.d.ts +12 -4
  460. package/build-types/dropdown/types.d.ts.map +1 -1
  461. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  462. package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
  463. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  464. package/build-types/dropdown-menu/types.d.ts +22 -5
  465. package/build-types/dropdown-menu/types.d.ts.map +1 -1
  466. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +2 -2
  467. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  468. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  469. package/build-types/duotone-picker/duotone-picker.d.ts +1 -1
  470. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  471. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
  472. package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
  473. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +2 -2
  474. package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
  475. package/build-types/duotone-picker/types.d.ts +31 -1
  476. package/build-types/duotone-picker/types.d.ts.map +1 -1
  477. package/build-types/elevation/hook.d.ts +46 -46
  478. package/build-types/elevation/stories/index.story.d.ts +5 -5
  479. package/build-types/elevation/stories/index.story.d.ts.map +1 -1
  480. package/build-types/external-link/stories/index.story.d.ts +3 -3
  481. package/build-types/external-link/stories/index.story.d.ts.map +1 -1
  482. package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
  483. package/build-types/flex/flex/hook.d.ts +46 -46
  484. package/build-types/flex/flex-block/hook.d.ts +46 -46
  485. package/build-types/flex/flex-item/hook.d.ts +46 -46
  486. package/build-types/flex/stories/index.story.d.ts +4 -4
  487. package/build-types/flex/stories/index.story.d.ts.map +1 -1
  488. package/build-types/focal-point-picker/stories/index.story.d.ts +10 -10
  489. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  490. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
  491. package/build-types/focusable-iframe/index.d.ts +4 -5
  492. package/build-types/focusable-iframe/index.d.ts.map +1 -1
  493. package/build-types/focusable-iframe/types.d.ts +8 -0
  494. package/build-types/focusable-iframe/types.d.ts.map +1 -0
  495. package/build-types/font-size-picker/stories/e2e/index.story.d.ts +2 -2
  496. package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
  497. package/build-types/font-size-picker/stories/index.story.d.ts +8 -8
  498. package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
  499. package/build-types/font-size-picker/styles.d.ts +2 -2
  500. package/build-types/form-file-upload/stories/index.story.d.ts +2 -2
  501. package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
  502. package/build-types/form-toggle/stories/index.story.d.ts +3 -3
  503. package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
  504. package/build-types/form-token-field/index.d.ts.map +1 -1
  505. package/build-types/form-token-field/stories/index.story.d.ts +7 -7
  506. package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
  507. package/build-types/form-token-field/types.d.ts +6 -0
  508. package/build-types/form-token-field/types.d.ts.map +1 -1
  509. package/build-types/gradient-picker/index.d.ts +1 -1
  510. package/build-types/gradient-picker/index.d.ts.map +1 -1
  511. package/build-types/gradient-picker/stories/index.story.d.ts +5 -38
  512. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  513. package/build-types/gradient-picker/types.d.ts +31 -1
  514. package/build-types/gradient-picker/types.d.ts.map +1 -1
  515. package/build-types/grid/hook.d.ts +46 -46
  516. package/build-types/grid/stories/index.story.d.ts +3 -3
  517. package/build-types/grid/stories/index.story.d.ts.map +1 -1
  518. package/build-types/guide/stories/index.story.d.ts +2 -2
  519. package/build-types/guide/stories/index.story.d.ts.map +1 -1
  520. package/build-types/h-stack/component.d.ts +1 -1
  521. package/build-types/h-stack/hook.d.ts +46 -46
  522. package/build-types/h-stack/stories/e2e/index.story.d.ts +3 -3
  523. package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
  524. package/build-types/h-stack/stories/index.story.d.ts +3 -3
  525. package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
  526. package/build-types/heading/hook.d.ts +45 -45
  527. package/build-types/heading/stories/index.story.d.ts +3 -3
  528. package/build-types/heading/stories/index.story.d.ts.map +1 -1
  529. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  530. package/build-types/higher-order/with-focus-outside/index.d.ts +1 -0
  531. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  532. package/build-types/higher-order/with-focus-outside/test/index.d.ts +2 -0
  533. package/build-types/higher-order/with-focus-outside/test/index.d.ts.map +1 -0
  534. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  535. package/build-types/icon/stories/index.story.d.ts +4 -4
  536. package/build-types/icon/stories/index.story.d.ts.map +1 -1
  537. package/build-types/index.d.ts +1 -1
  538. package/build-types/index.d.ts.map +1 -1
  539. package/build-types/input-control/stories/index.story.d.ts +2 -2
  540. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  541. package/build-types/isolated-event-container/test/index.d.ts +2 -0
  542. package/build-types/isolated-event-container/test/index.d.ts.map +1 -0
  543. package/build-types/item-group/item/component.d.ts +0 -1
  544. package/build-types/item-group/item/component.d.ts.map +1 -1
  545. package/build-types/item-group/item/hook.d.ts +46 -46
  546. package/build-types/item-group/item-group/component.d.ts +0 -1
  547. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  548. package/build-types/item-group/item-group/hook.d.ts +46 -46
  549. package/build-types/item-group/stories/index.story.d.ts +6 -6
  550. package/build-types/item-group/stories/index.story.d.ts.map +1 -1
  551. package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
  552. package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
  553. package/build-types/menu-group/stories/index.story.d.ts +3 -3
  554. package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
  555. package/build-types/menu-item/index.d.ts +5 -58
  556. package/build-types/menu-item/index.d.ts.map +1 -1
  557. package/build-types/menu-item/stories/index.story.d.ts +74 -0
  558. package/build-types/menu-item/stories/index.story.d.ts.map +1 -0
  559. package/build-types/menu-item/types.d.ts +3 -2
  560. package/build-types/menu-item/types.d.ts.map +1 -1
  561. package/build-types/menu-items-choice/stories/index.story.d.ts +3 -3
  562. package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
  563. package/build-types/modal/stories/index.story.d.ts +4 -4
  564. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  565. package/build-types/navigable-container/menu.d.ts +1 -1
  566. package/build-types/navigable-container/stories/navigable-menu.story.d.ts +3 -3
  567. package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
  568. package/build-types/navigable-container/stories/tabbable-container.story.d.ts +3 -3
  569. package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
  570. package/build-types/navigation/back-button/index.d.ts +1 -1
  571. package/build-types/navigation/index.d.ts +0 -1
  572. package/build-types/navigation/index.d.ts.map +1 -1
  573. package/build-types/navigation/stories/index.story.d.ts +2 -2
  574. package/build-types/navigation/stories/index.story.d.ts.map +1 -1
  575. package/build-types/navigation/stories/utils/controlled-state.d.ts +2 -2
  576. package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
  577. package/build-types/navigation/stories/utils/default.d.ts +2 -2
  578. package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
  579. package/build-types/navigation/stories/utils/group.d.ts +2 -2
  580. package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
  581. package/build-types/navigation/stories/utils/hide-if-empty.d.ts +2 -2
  582. package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
  583. package/build-types/navigation/stories/utils/more-examples.d.ts +2 -2
  584. package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
  585. package/build-types/navigation/stories/utils/search.d.ts +2 -2
  586. package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
  587. package/build-types/navigation/styles/navigation-styles.d.ts +5 -3
  588. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  589. package/build-types/navigator/navigator-back-button/component.d.ts +2 -3
  590. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  591. package/build-types/navigator/navigator-back-button/hook.d.ts +53 -54
  592. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  593. package/build-types/navigator/navigator-button/component.d.ts +2 -3
  594. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  595. package/build-types/navigator/navigator-button/hook.d.ts +53 -54
  596. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  597. package/build-types/navigator/navigator-provider/component.d.ts +0 -1
  598. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  599. package/build-types/navigator/navigator-to-parent-button/component.d.ts +2 -3
  600. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  601. package/build-types/navigator/stories/index.story.d.ts +5 -5
  602. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  603. package/build-types/notice/index.d.ts.map +1 -1
  604. package/build-types/notice/stories/index.story.d.ts +3 -3
  605. package/build-types/notice/stories/index.story.d.ts.map +1 -1
  606. package/build-types/number-control/index.d.ts +3 -3
  607. package/build-types/number-control/stories/index.story.d.ts +5 -5
  608. package/build-types/number-control/stories/index.story.d.ts.map +1 -1
  609. package/build-types/palette-edit/stories/index.story.d.ts +2 -2
  610. package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
  611. package/build-types/palette-edit/styles.d.ts +4 -4
  612. package/build-types/panel/stories/index.story.d.ts +6 -6
  613. package/build-types/panel/stories/index.story.d.ts.map +1 -1
  614. package/build-types/placeholder/index.d.ts.map +1 -1
  615. package/build-types/placeholder/stories/index.story.d.ts +3 -3
  616. package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
  617. package/build-types/popover/index.d.ts +1 -1
  618. package/build-types/popover/index.d.ts.map +1 -1
  619. package/build-types/popover/overlay-middlewares.d.ts +3 -3
  620. package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
  621. package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
  622. package/build-types/popover/stories/index.story.d.ts +7 -7
  623. package/build-types/popover/stories/index.story.d.ts.map +1 -1
  624. package/build-types/popover/types.d.ts +6 -4
  625. package/build-types/popover/types.d.ts.map +1 -1
  626. package/build-types/popover/utils.d.ts +3 -27
  627. package/build-types/popover/utils.d.ts.map +1 -1
  628. package/build-types/progress-bar/stories/index.story.d.ts +3 -3
  629. package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
  630. package/build-types/progress-bar/styles.d.ts.map +1 -1
  631. package/build-types/query-controls/stories/index.story.d.ts +4 -4
  632. package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
  633. package/build-types/radio-control/stories/index.story.d.ts +3 -3
  634. package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
  635. package/build-types/range-control/index.d.ts +1 -1
  636. package/build-types/range-control/stories/index.story.d.ts +9 -9
  637. package/build-types/range-control/stories/index.story.d.ts.map +1 -1
  638. package/build-types/range-control/styles/range-control-styles.d.ts +3 -3
  639. package/build-types/resizable-box/index.d.ts +1 -1
  640. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  641. package/build-types/resizable-box/resize-tooltip/label.d.ts +1 -1
  642. package/build-types/resizable-box/stories/index.story.d.ts +4 -4
  643. package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
  644. package/build-types/responsive-wrapper/stories/index.story.d.ts +3 -3
  645. package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
  646. package/build-types/sandbox/stories/index.story.d.ts +2 -2
  647. package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
  648. package/build-types/scroll-lock/stories/index.story.d.ts +3 -3
  649. package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
  650. package/build-types/scrollable/hook.d.ts +46 -46
  651. package/build-types/scrollable/stories/index.story.d.ts +3 -3
  652. package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
  653. package/build-types/search-control/index.d.ts +4 -2
  654. package/build-types/search-control/index.d.ts.map +1 -1
  655. package/build-types/search-control/stories/index.story.d.ts +10 -6
  656. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  657. package/build-types/search-control/types.d.ts +12 -0
  658. package/build-types/search-control/types.d.ts.map +1 -1
  659. package/build-types/select-control/stories/index.story.d.ts +2 -2
  660. package/build-types/select-control/stories/index.story.d.ts.map +1 -1
  661. package/build-types/shortcut/index.d.ts +13 -0
  662. package/build-types/shortcut/index.d.ts.map +1 -1
  663. package/build-types/shortcut/stories/index.story.d.ts +13 -0
  664. package/build-types/shortcut/stories/index.story.d.ts.map +1 -0
  665. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +1 -0
  666. package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
  667. package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -6
  668. package/build-types/slot-fill/index.d.ts +1 -1
  669. package/build-types/slot-fill/index.d.ts.map +1 -1
  670. package/build-types/snackbar/stories/index.story.d.ts +7 -7
  671. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  672. package/build-types/snackbar/stories/list.story.d.ts +3 -3
  673. package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
  674. package/build-types/spacer/hook.d.ts +46 -46
  675. package/build-types/spacer/stories/index.story.d.ts +3 -3
  676. package/build-types/spacer/stories/index.story.d.ts.map +1 -1
  677. package/build-types/spinner/index.d.ts +1 -2
  678. package/build-types/spinner/index.d.ts.map +1 -1
  679. package/build-types/spinner/stories/index.story.d.ts +4 -4
  680. package/build-types/spinner/stories/index.story.d.ts.map +1 -1
  681. package/build-types/surface/hook.d.ts +46 -46
  682. package/build-types/surface/stories/index.story.d.ts +3 -3
  683. package/build-types/surface/stories/index.story.d.ts.map +1 -1
  684. package/build-types/tab-panel/stories/index.story.d.ts +2 -2
  685. package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
  686. package/build-types/text/hook.d.ts +46 -46
  687. package/build-types/text/styles.d.ts.map +1 -1
  688. package/build-types/text-control/index.d.ts +3 -3
  689. package/build-types/text-control/stories/index.story.d.ts +4 -4
  690. package/build-types/text-control/stories/index.story.d.ts.map +1 -1
  691. package/build-types/text-highlight/stories/index.story.d.ts +3 -3
  692. package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
  693. package/build-types/textarea-control/stories/index.story.d.ts +3 -3
  694. package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
  695. package/build-types/theme/index.d.ts +0 -1
  696. package/build-types/theme/index.d.ts.map +1 -1
  697. package/build-types/theme/stories/index.story.d.ts +4 -4
  698. package/build-types/theme/stories/index.story.d.ts.map +1 -1
  699. package/build-types/tip/stories/index.story.d.ts +3 -3
  700. package/build-types/tip/stories/index.story.d.ts.map +1 -1
  701. package/build-types/toggle-control/stories/index.story.d.ts +4 -4
  702. package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
  703. package/build-types/toggle-group-control/stories/index.story.d.ts +6 -6
  704. package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
  705. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +2 -4
  706. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  707. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +2 -4
  708. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  709. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +2 -2
  710. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  711. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +1 -5
  712. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  713. package/build-types/toggle-group-control/toggle-group-control/utils.d.ts +18 -0
  714. package/build-types/toggle-group-control/toggle-group-control/utils.d.ts.map +1 -0
  715. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
  716. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +5 -1
  717. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  718. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +1 -0
  719. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  720. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  721. package/build-types/toggle-group-control/types.d.ts +13 -24
  722. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  723. package/build-types/toolbar/stories/index.story.d.ts +2 -2
  724. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  725. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  726. package/build-types/toolbar/toolbar-button/index.d.ts +16 -22
  727. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  728. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +3 -1
  729. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  730. package/build-types/toolbar/toolbar-group/index.d.ts +10 -14
  731. package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
  732. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +3 -5
  733. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
  734. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +7 -5
  735. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
  736. package/build-types/toolbar/toolbar-group/types.d.ts +77 -0
  737. package/build-types/toolbar/toolbar-group/types.d.ts.map +1 -0
  738. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  739. package/build-types/tools-panel/stories/index.story.d.ts +8 -8
  740. package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
  741. package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
  742. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  743. package/build-types/tools-panel/tools-panel/hook.d.ts +46 -46
  744. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  745. package/build-types/tools-panel/tools-panel-header/hook.d.ts +46 -46
  746. package/build-types/tools-panel/tools-panel-item/hook.d.ts +46 -46
  747. package/build-types/tooltip/index.d.ts +8 -5
  748. package/build-types/tooltip/index.d.ts.map +1 -1
  749. package/build-types/tooltip/stories/index.story.d.ts +13 -0
  750. package/build-types/tooltip/stories/index.story.d.ts.map +1 -0
  751. package/build-types/tooltip/test/index.d.ts +2 -0
  752. package/build-types/tooltip/test/index.d.ts.map +1 -0
  753. package/build-types/tooltip/test/utils/index.d.ts +11 -0
  754. package/build-types/tooltip/test/utils/index.d.ts.map +1 -0
  755. package/build-types/tooltip/types.d.ts +61 -0
  756. package/build-types/tooltip/types.d.ts.map +1 -0
  757. package/build-types/tree-grid/stories/index.story.d.ts +2 -2
  758. package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
  759. package/build-types/tree-select/index.d.ts +0 -1
  760. package/build-types/tree-select/index.d.ts.map +1 -1
  761. package/build-types/tree-select/stories/index.story.d.ts +2 -2
  762. package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
  763. package/build-types/truncate/hook.d.ts +46 -46
  764. package/build-types/truncate/stories/index.story.d.ts +4 -4
  765. package/build-types/truncate/stories/index.story.d.ts.map +1 -1
  766. package/build-types/ui/tooltip/content.d.ts +1 -1
  767. package/build-types/unit-control/index.d.ts +1 -2
  768. package/build-types/unit-control/index.d.ts.map +1 -1
  769. package/build-types/unit-control/stories/index.story.d.ts +7 -7
  770. package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
  771. package/build-types/unit-control/styles/unit-control-styles.d.ts +3 -3
  772. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  773. package/build-types/unit-control/unit-select-control.d.ts +1 -1
  774. package/build-types/utils/hooks/use-cx.d.ts +2 -1
  775. package/build-types/utils/hooks/use-cx.d.ts.map +1 -1
  776. package/build-types/utils/use-deprecated-props.d.ts +1 -1
  777. package/build-types/v-stack/component.d.ts +1 -1
  778. package/build-types/v-stack/hook.d.ts +46 -46
  779. package/build-types/v-stack/stories/e2e/index.story.d.ts +3 -3
  780. package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
  781. package/build-types/v-stack/stories/index.story.d.ts +4 -4
  782. package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
  783. package/build-types/view/component.d.ts +0 -1
  784. package/build-types/view/component.d.ts.map +1 -1
  785. package/build-types/view/stories/index.story.d.ts +3 -3
  786. package/build-types/view/stories/index.story.d.ts.map +1 -1
  787. package/build-types/visually-hidden/stories/index.story.d.ts +5 -5
  788. package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
  789. package/build-types/z-stack/stories/index.story.d.ts +3 -3
  790. package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
  791. package/package.json +20 -20
  792. package/src/alignment-matrix-control/stories/index.story.tsx +7 -3
  793. package/src/angle-picker-control/stories/index.story.tsx +3 -3
  794. package/src/animate/stories/index.story.tsx +12 -10
  795. package/src/animation/index.tsx +1 -0
  796. package/src/base-control/stories/index.story.tsx +5 -9
  797. package/src/border-box-control/stories/index.story.tsx +5 -9
  798. package/src/border-control/border-control/README.md +2 -2
  799. package/src/border-control/border-control-dropdown/component.tsx +1 -1
  800. package/src/border-control/stories/index.story.tsx +8 -14
  801. package/src/border-control/styles.ts +7 -7
  802. package/src/border-control/test/index.js +79 -69
  803. package/src/box-control/unit-control.tsx +1 -1
  804. package/src/button/README.md +0 -6
  805. package/src/button/index.tsx +9 -1
  806. package/src/button/stories/e2e/index.story.tsx +3 -3
  807. package/src/button/stories/index.story.tsx +10 -10
  808. package/src/button/test/index.tsx +19 -0
  809. package/src/button/types.ts +0 -4
  810. package/src/button-group/stories/index.story.tsx +4 -6
  811. package/src/card/stories/index.story.tsx +5 -5
  812. package/src/checkbox-control/stories/index.story.tsx +7 -6
  813. package/src/circular-option-picker/README.md +14 -0
  814. package/src/circular-option-picker/circular-option-picker-actions.tsx +60 -0
  815. package/src/circular-option-picker/circular-option-picker-context.tsx +12 -0
  816. package/src/circular-option-picker/circular-option-picker-option-group.tsx +34 -0
  817. package/src/circular-option-picker/circular-option-picker-option.tsx +139 -0
  818. package/src/circular-option-picker/circular-option-picker.tsx +202 -0
  819. package/src/circular-option-picker/index.tsx +7 -174
  820. package/src/circular-option-picker/stories/index.story.tsx +42 -5
  821. package/src/circular-option-picker/style.scss +11 -7
  822. package/src/circular-option-picker/test/index.tsx +133 -0
  823. package/src/circular-option-picker/types.ts +64 -1
  824. package/src/color-indicator/stories/index.story.tsx +4 -6
  825. package/src/color-palette/README.md +14 -0
  826. package/src/color-palette/index.tsx +69 -28
  827. package/src/color-palette/stories/index.story.tsx +24 -19
  828. package/src/color-palette/test/index.tsx +32 -30
  829. package/src/color-palette/types.ts +34 -1
  830. package/src/color-picker/hsv-color-picker.native.js +88 -0
  831. package/src/color-picker/hue-picker.native.js +194 -0
  832. package/src/color-picker/index.native.js +2 -1
  833. package/src/color-picker/saturation-picker.native.js +163 -0
  834. package/src/color-picker/stories/index.story.tsx +3 -3
  835. package/src/color-picker/style.native.scss +23 -0
  836. package/src/combobox-control/index.tsx +7 -5
  837. package/src/combobox-control/stories/index.story.tsx +3 -3
  838. package/src/composite/{index.js → index.ts} +3 -0
  839. package/src/confirm-dialog/stories/index.story.js +13 -14
  840. package/src/confirm-dialog/test/index.js +10 -18
  841. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +1 -1
  842. package/src/custom-gradient-picker/gradient-bar/test/utils.ts +5 -5
  843. package/src/custom-gradient-picker/stories/index.story.tsx +3 -3
  844. package/src/date-time/stories/date-time.story.tsx +8 -10
  845. package/src/date-time/stories/date.story.tsx +8 -9
  846. package/src/date-time/stories/time.story.tsx +4 -4
  847. package/src/date-time/time/timezone.tsx +1 -1
  848. package/src/dimension-control/stories/index.story.tsx +3 -3
  849. package/src/disabled/stories/index.story.tsx +4 -4
  850. package/src/divider/stories/index.story.tsx +6 -6
  851. package/src/draggable/stories/index.story.tsx +5 -7
  852. package/src/drop-zone/stories/index.story.tsx +3 -3
  853. package/src/dropdown/README.md +13 -3
  854. package/src/dropdown/index.tsx +16 -34
  855. package/src/dropdown/stories/index.story.tsx +17 -12
  856. package/src/dropdown/types.ts +12 -4
  857. package/src/dropdown-menu/README.md +18 -0
  858. package/src/dropdown-menu/index.tsx +8 -1
  859. package/src/dropdown-menu/stories/index.story.tsx +8 -3
  860. package/src/dropdown-menu/types.ts +23 -6
  861. package/src/dropdown-menu-v2/stories/index.story.tsx +24 -10
  862. package/src/dropdown-menu-v2/styles.ts +1 -1
  863. package/src/duotone-picker/README.md +14 -0
  864. package/src/duotone-picker/color-list-picker/index.tsx +28 -12
  865. package/src/duotone-picker/duotone-picker.tsx +33 -0
  866. package/src/duotone-picker/stories/duotone-picker.story.tsx +3 -6
  867. package/src/duotone-picker/stories/duotone-swatch.story.tsx +3 -3
  868. package/src/duotone-picker/types.ts +34 -1
  869. package/src/elevation/stories/index.story.tsx +7 -7
  870. package/src/external-link/stories/index.story.tsx +4 -6
  871. package/src/flex/stories/index.story.tsx +6 -6
  872. package/src/focal-point-picker/stories/index.story.tsx +3 -3
  873. package/src/focusable-iframe/{index.js → index.tsx} +7 -4
  874. package/src/focusable-iframe/types.ts +9 -0
  875. package/src/font-size-picker/stories/e2e/index.story.tsx +3 -3
  876. package/src/font-size-picker/stories/index.story.tsx +10 -10
  877. package/src/form-file-upload/stories/index.story.tsx +3 -3
  878. package/src/form-toggle/stories/index.story.tsx +4 -7
  879. package/src/form-token-field/README.md +1 -0
  880. package/src/form-token-field/index.tsx +5 -1
  881. package/src/form-token-field/stories/index.story.tsx +10 -11
  882. package/src/form-token-field/style.scss +5 -9
  883. package/src/form-token-field/test/index.tsx +36 -1
  884. package/src/form-token-field/types.ts +7 -1
  885. package/src/gradient-picker/README.md +14 -0
  886. package/src/gradient-picker/index.tsx +60 -11
  887. package/src/gradient-picker/stories/index.story.tsx +3 -3
  888. package/src/gradient-picker/types.ts +34 -1
  889. package/src/grid/stories/index.story.tsx +4 -4
  890. package/src/guide/stories/index.story.tsx +3 -3
  891. package/src/h-stack/stories/e2e/index.story.tsx +4 -4
  892. package/src/h-stack/stories/index.story.tsx +4 -4
  893. package/src/heading/stories/index.story.tsx +3 -3
  894. package/src/higher-order/navigate-regions/index.tsx +5 -6
  895. package/src/higher-order/with-filters/test/index.tsx +36 -43
  896. package/src/higher-order/with-focus-outside/{index.js → index.tsx} +8 -5
  897. package/src/higher-order/with-focus-outside/test/{index.js → index.tsx} +13 -11
  898. package/src/higher-order/with-notices/test/index.tsx +1 -1
  899. package/src/higher-order/with-spoken-messages/index.tsx +7 -8
  900. package/src/icon/stories/index.story.tsx +5 -5
  901. package/src/index.ts +5 -1
  902. package/src/input-control/stories/index.story.tsx +5 -3
  903. package/src/input-control/styles/input-control-styles.tsx +2 -2
  904. package/src/isolated-event-container/test/{index.js → index.tsx} +1 -1
  905. package/src/item-group/item/component.tsx +0 -1
  906. package/src/item-group/item-group/component.tsx +0 -1
  907. package/src/item-group/stories/index.story.tsx +11 -12
  908. package/src/keyboard-shortcuts/stories/index.story.tsx +3 -3
  909. package/src/menu-group/stories/index.story.tsx +5 -5
  910. package/src/menu-item/README.md +1 -1
  911. package/src/menu-item/index.tsx +5 -2
  912. package/src/menu-item/stories/index.story.tsx +80 -0
  913. package/src/menu-item/types.ts +3 -2
  914. package/src/menu-items-choice/stories/index.story.tsx +4 -6
  915. package/src/mobile/bottom-sheet/index.native.js +1 -0
  916. package/src/mobile/global-styles-context/index.native.js +7 -8
  917. package/src/mobile/link-settings/link-settings-navigation.native.js +1 -1
  918. package/src/modal/stories/index.story.tsx +5 -10
  919. package/src/modal/test/index.tsx +107 -0
  920. package/src/navigable-container/stories/navigable-menu.story.tsx +3 -3
  921. package/src/navigable-container/stories/tabbable-container.story.tsx +3 -3
  922. package/src/navigation/index.tsx +0 -1
  923. package/src/navigation/stories/index.story.tsx +16 -2
  924. package/src/navigation/stories/utils/controlled-state.tsx +2 -2
  925. package/src/navigation/stories/utils/default.tsx +2 -2
  926. package/src/navigation/stories/utils/group.tsx +2 -2
  927. package/src/navigation/stories/utils/hide-if-empty.tsx +2 -2
  928. package/src/navigation/stories/utils/more-examples.tsx +2 -2
  929. package/src/navigation/stories/utils/search.tsx +2 -2
  930. package/src/navigation/use-navigation-tree-nodes.tsx +1 -1
  931. package/src/navigator/navigator-provider/component.tsx +0 -1
  932. package/src/navigator/stories/index.story.tsx +9 -10
  933. package/src/notice/index.tsx +18 -6
  934. package/src/notice/stories/index.story.tsx +6 -6
  935. package/src/notice/style.scss +0 -1
  936. package/src/notice/test/__snapshots__/index.tsx.snap +9 -1
  937. package/src/number-control/stories/index.story.tsx +3 -3
  938. package/src/palette-edit/stories/index.story.tsx +3 -3
  939. package/src/palette-edit/styles.js +2 -2
  940. package/src/panel/stories/index.story.tsx +9 -11
  941. package/src/placeholder/index.tsx +1 -0
  942. package/src/placeholder/stories/index.story.tsx +4 -6
  943. package/src/placeholder/style.scss +2 -4
  944. package/src/popover/README.md +2 -2
  945. package/src/popover/index.tsx +106 -203
  946. package/src/popover/overlay-middlewares.tsx +2 -2
  947. package/src/popover/stories/index.story.tsx +8 -10
  948. package/src/popover/test/index.tsx +18 -4
  949. package/src/popover/types.ts +6 -5
  950. package/src/popover/utils.ts +19 -118
  951. package/src/progress-bar/stories/index.story.tsx +4 -6
  952. package/src/progress-bar/styles.ts +4 -1
  953. package/src/query-controls/stories/index.story.tsx +5 -6
  954. package/src/radio-control/stories/index.story.tsx +4 -6
  955. package/src/radio-group/stories/index.story.js +1 -0
  956. package/src/range-control/stories/index.story.tsx +12 -18
  957. package/src/resizable-box/stories/index.story.tsx +3 -3
  958. package/src/responsive-wrapper/stories/index.story.tsx +4 -5
  959. package/src/sandbox/stories/index.story.tsx +3 -5
  960. package/src/scroll-lock/stories/index.story.tsx +3 -3
  961. package/src/scrollable/stories/index.story.tsx +4 -4
  962. package/src/search-control/README.md +7 -0
  963. package/src/search-control/index.native.js +39 -27
  964. package/src/search-control/index.tsx +10 -1
  965. package/src/search-control/stories/index.story.tsx +3 -3
  966. package/src/search-control/style.scss +14 -7
  967. package/src/search-control/types.ts +12 -0
  968. package/src/select-control/stories/index.story.tsx +3 -3
  969. package/src/shortcut/index.tsx +13 -0
  970. package/src/shortcut/stories/index.story.tsx +33 -0
  971. package/src/slot-fill/README.md +5 -5
  972. package/src/slot-fill/bubbles-virtually/slot-fill-context.js +3 -0
  973. package/src/slot-fill/bubbles-virtually/slot.js +17 -5
  974. package/src/slot-fill/index.js +6 -1
  975. package/src/slot-fill/stories/index.story.js +2 -0
  976. package/src/slot-fill/test/__snapshots__/slot.js.snap +12 -4
  977. package/src/snackbar/stories/index.story.tsx +10 -13
  978. package/src/snackbar/stories/list.story.tsx +3 -3
  979. package/src/spacer/stories/index.story.tsx +4 -4
  980. package/src/spinner/index.tsx +0 -1
  981. package/src/spinner/stories/index.story.tsx +5 -5
  982. package/src/surface/stories/index.story.tsx +4 -4
  983. package/src/tab-panel/stories/index.story.tsx +5 -13
  984. package/src/tab-panel/test/index.tsx +14 -25
  985. package/src/text/styles.js +2 -1
  986. package/src/text-control/stories/index.story.tsx +7 -6
  987. package/src/text-highlight/stories/index.story.tsx +4 -6
  988. package/src/textarea-control/stories/index.story.tsx +4 -6
  989. package/src/theme/README.md +5 -5
  990. package/src/theme/index.tsx +0 -1
  991. package/src/theme/stories/index.story.tsx +5 -5
  992. package/src/tip/stories/index.story.tsx +4 -4
  993. package/src/toggle-control/stories/index.story.tsx +3 -3
  994. package/src/toggle-group-control/stories/index.story.tsx +17 -11
  995. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +567 -59
  996. package/src/toggle-group-control/test/index.tsx +110 -56
  997. package/src/toggle-group-control/toggle-group-control/README.md +0 -1
  998. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +39 -57
  999. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +52 -48
  1000. package/src/toggle-group-control/toggle-group-control/component.tsx +12 -6
  1001. package/src/toggle-group-control/toggle-group-control/styles.ts +2 -19
  1002. package/src/toggle-group-control/toggle-group-control/utils.ts +50 -0
  1003. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +70 -20
  1004. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +17 -3
  1005. package/src/toggle-group-control/types.ts +14 -32
  1006. package/src/toolbar/stories/index.story.tsx +16 -8
  1007. package/src/toolbar/test/toolbar-group.tsx +13 -7
  1008. package/src/toolbar/toolbar/index.tsx +9 -1
  1009. package/src/toolbar/toolbar-dropdown-menu/{index.js → index.tsx} +11 -4
  1010. package/src/toolbar/toolbar-group/README.md +2 -2
  1011. package/src/toolbar/toolbar-group/{index.js → index.tsx} +19 -14
  1012. package/src/toolbar/toolbar-group/{toolbar-group-collapsed.js → toolbar-group-collapsed.tsx} +10 -4
  1013. package/src/toolbar/toolbar-group/toolbar-group-container.tsx +16 -0
  1014. package/src/toolbar/toolbar-group/types.ts +92 -0
  1015. package/src/toolbar/toolbar-item/index.tsx +3 -1
  1016. package/src/tools-panel/stories/index.story.tsx +17 -12
  1017. package/src/tools-panel/tools-panel/component.tsx +0 -1
  1018. package/src/tools-panel/tools-panel-header/component.tsx +3 -0
  1019. package/src/tooltip/README.md +31 -28
  1020. package/src/tooltip/index.tsx +106 -0
  1021. package/src/tooltip/stories/index.story.tsx +59 -0
  1022. package/src/tooltip/style.scss +2 -27
  1023. package/src/tooltip/test/index.tsx +335 -0
  1024. package/src/tooltip/test/utils/index.tsx +20 -0
  1025. package/src/tooltip/types.ts +61 -0
  1026. package/src/tree-grid/stories/index.story.tsx +5 -3
  1027. package/src/tree-select/index.tsx +0 -1
  1028. package/src/tree-select/stories/index.story.tsx +3 -3
  1029. package/src/truncate/stories/index.story.tsx +5 -7
  1030. package/src/ui/context/context-connect.ts +3 -3
  1031. package/src/ui/context/wordpress-component.ts +4 -4
  1032. package/src/unit-control/index.tsx +9 -5
  1033. package/src/unit-control/stories/index.story.tsx +10 -9
  1034. package/src/unit-control/styles/unit-control-styles.ts +3 -1
  1035. package/src/unit-control/test/utils.ts +1 -1
  1036. package/src/utils/colors-values.js +1 -1
  1037. package/src/utils/hooks/use-cx.ts +2 -1
  1038. package/src/utils/use-deprecated-props.ts +1 -1
  1039. package/src/v-stack/stories/e2e/index.story.tsx +4 -4
  1040. package/src/v-stack/stories/index.story.tsx +3 -3
  1041. package/src/view/component.tsx +0 -1
  1042. package/src/view/stories/index.story.tsx +4 -4
  1043. package/src/visually-hidden/stories/index.story.tsx +7 -7
  1044. package/src/z-stack/stories/index.story.tsx +4 -4
  1045. package/tsconfig.tsbuildinfo +1 -1
  1046. package/build/popover/limit-shift.js +0 -129
  1047. package/build/popover/limit-shift.js.map +0 -1
  1048. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -78
  1049. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
  1050. package/build-module/popover/limit-shift.js +0 -122
  1051. package/build-module/popover/limit-shift.js.map +0 -1
  1052. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -76
  1053. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
  1054. package/build-types/popover/limit-shift.d.ts +0 -87
  1055. package/build-types/popover/limit-shift.d.ts.map +0 -1
  1056. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts +0 -9
  1057. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts.map +0 -1
  1058. package/src/color-palette/test/__snapshots__/index.tsx.snap +0 -288
  1059. package/src/popover/limit-shift.ts +0 -205
  1060. package/src/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx +0 -84
  1061. package/src/toolbar/toolbar-group/toolbar-group-container.js +0 -8
  1062. package/src/tooltip/index.js +0 -293
  1063. package/src/tooltip/stories/index.story.js +0 -85
  1064. package/src/tooltip/test/index.js +0 -323
@@ -1,10 +1,10 @@
1
- import { createElement } from "@wordpress/element";
1
+ import { createElement, Fragment } from "@wordpress/element";
2
2
  /**
3
3
  * External dependencies
4
4
  */
5
5
 
6
6
  import classnames from 'classnames';
7
- import { useFloating, flip as flipMiddleware, shift as shiftMiddleware, autoUpdate, arrow, offset as offsetMiddleware, size } from '@floating-ui/react-dom';
7
+ import { useFloating, flip as flipMiddleware, shift as shiftMiddleware, limitShift, autoUpdate, arrow, offset as offsetMiddleware, size } from '@floating-ui/react-dom';
8
8
  // eslint-disable-next-line no-restricted-imports
9
9
 
10
10
  // eslint-disable-next-line no-restricted-imports
@@ -13,12 +13,11 @@ import { motion, useReducedMotion } from 'framer-motion';
13
13
  /**
14
14
  * WordPress dependencies
15
15
  */
16
- import { useRef, useLayoutEffect, forwardRef, createContext, useContext, useMemo, useState, useCallback } from '@wordpress/element';
16
+ import { useRef, useLayoutEffect, forwardRef, createContext, useContext, useMemo, useState, useCallback, createPortal } from '@wordpress/element';
17
17
  import { useViewportMatch, useMergeRefs, __experimentalUseDialog as useDialog } from '@wordpress/compose';
18
18
  import { close } from '@wordpress/icons';
19
19
  import deprecated from '@wordpress/deprecated';
20
20
  import { Path, SVG } from '@wordpress/primitives';
21
- import { getScrollContainer } from '@wordpress/dom';
22
21
 
23
22
  /**
24
23
  * Internal dependencies
@@ -26,8 +25,7 @@ import { getScrollContainer } from '@wordpress/dom';
26
25
  import Button from '../button';
27
26
  import ScrollLock from '../scroll-lock';
28
27
  import { Slot, Fill, useSlot } from '../slot-fill';
29
- import { computePopoverPosition, getFrameOffset, getFrameScale, positionToPlacement, placementToMotionAnimationProps, getReferenceOwnerDocument, getReferenceElement } from './utils';
30
- import { limitShift as customLimitShift } from './limit-shift';
28
+ import { computePopoverPosition, positionToPlacement, placementToMotionAnimationProps, getReferenceElement } from './utils';
31
29
  import { overlayMiddlewares } from './overlay-middlewares';
32
30
 
33
31
  /**
@@ -54,36 +52,18 @@ const ArrowTriangle = () => createElement(SVG, {
54
52
  d: "M 0 0 L 50 50 L 100 0",
55
53
  vectorEffect: "non-scaling-stroke"
56
54
  }));
57
- const AnimatedWrapper = forwardRef(({
58
- style: receivedInlineStyles,
59
- placement,
60
- shouldAnimate = false,
61
- ...props
62
- }, forwardedRef) => {
63
- const shouldReduceMotion = useReducedMotion();
64
- const {
65
- style: motionInlineStyles,
66
- ...otherMotionProps
67
- } = useMemo(() => placementToMotionAnimationProps(placement), [placement]);
68
- const computedAnimationProps = shouldAnimate && !shouldReduceMotion ? {
69
- style: {
70
- ...motionInlineStyles,
71
- ...receivedInlineStyles
72
- },
73
- ...otherMotionProps
74
- } : {
75
- animate: false,
76
- style: receivedInlineStyles
77
- };
78
- return createElement(motion.div, {
79
- ...computedAnimationProps,
80
- ...props,
81
- ref: forwardedRef
82
- });
83
- });
84
55
  const slotNameContext = createContext(undefined);
56
+ const fallbackContainerClassname = 'components-popover__fallback-container';
57
+ const getPopoverFallbackContainer = () => {
58
+ let container = document.body.querySelector('.' + fallbackContainerClassname);
59
+ if (!container) {
60
+ container = document.createElement('div');
61
+ container.className = fallbackContainerClassname;
62
+ document.body.append(container);
63
+ }
64
+ return container;
65
+ };
85
66
  const UnforwardedPopover = (props, forwardedRef) => {
86
- var _frameOffsetRef$curre, _frameOffsetRef$curre2;
87
67
  const {
88
68
  animate = true,
89
69
  headerTitle,
@@ -102,6 +82,7 @@ const UnforwardedPopover = (props, forwardedRef) => {
102
82
  flip = true,
103
83
  resize = true,
104
84
  shift = false,
85
+ inline = false,
105
86
  variant,
106
87
  // Deprecated props
107
88
  __unstableForcePosition,
@@ -153,7 +134,6 @@ const UnforwardedPopover = (props, forwardedRef) => {
153
134
  }
154
135
  const arrowRef = useRef(null);
155
136
  const [fallbackReferenceElement, setFallbackReferenceElement] = useState(null);
156
- const [referenceOwnerDocument, setReferenceOwnerDocument] = useState();
157
137
  const anchorRefFallback = useCallback(node => {
158
138
  setFallbackReferenceElement(node);
159
139
  }, []);
@@ -161,39 +141,7 @@ const UnforwardedPopover = (props, forwardedRef) => {
161
141
  const isExpanded = expandOnMobile && isMobileViewport;
162
142
  const hasArrow = !isExpanded && !noArrow;
163
143
  const normalizedPlacementFromProps = position ? positionToPlacement(position) : placementProp;
164
-
165
- /**
166
- * Offsets the position of the popover when the anchor is inside an iframe.
167
- *
168
- * Store the offset in a ref, due to constraints with floating-ui:
169
- * https://floating-ui.com/docs/react-dom#variables-inside-middleware-functions.
170
- */
171
- const frameOffsetRef = useRef(getFrameOffset(referenceOwnerDocument));
172
- const middleware = [...(placementProp === 'overlay' ? overlayMiddlewares() : []),
173
- // Custom middleware which adjusts the popover's position by taking into
174
- // account the offset of the anchor's iframe (if any) compared to the page.
175
- {
176
- name: 'frameOffset',
177
- fn({
178
- x,
179
- y
180
- }) {
181
- if (!frameOffsetRef.current) {
182
- return {
183
- x,
184
- y
185
- };
186
- }
187
- return {
188
- x: x + frameOffsetRef.current.x,
189
- y: y + frameOffsetRef.current.y,
190
- data: {
191
- // This will be used in the customLimitShift() function.
192
- amount: frameOffsetRef.current
193
- }
194
- };
195
- }
196
- }, offsetMiddleware(offsetProp), computedFlipProp ? flipMiddleware() : undefined, computedResizeProp ? size({
144
+ const middleware = [...(placementProp === 'overlay' ? overlayMiddlewares() : []), offsetMiddleware(offsetProp), computedFlipProp && flipMiddleware(), computedResizeProp && size({
197
145
  apply(sizeProps) {
198
146
  var _refs$floating$curren;
199
147
  const {
@@ -209,13 +157,13 @@ const UnforwardedPopover = (props, forwardedRef) => {
209
157
  overflow: 'auto'
210
158
  });
211
159
  }
212
- }) : undefined, shift ? shiftMiddleware({
160
+ }), shift && shiftMiddleware({
213
161
  crossAxis: true,
214
- limiter: customLimitShift(),
162
+ limiter: limitShift(),
215
163
  padding: 1 // Necessary to avoid flickering at the edge of the viewport.
216
- }) : undefined, arrow({
164
+ }), arrow({
217
165
  element: arrowRef
218
- })].filter(m => m !== undefined);
166
+ })];
219
167
  const slotName = useContext(slotNameContext) || __unstableSlotName;
220
168
  const slot = useSlot(slotName);
221
169
  let onDialogClose;
@@ -240,10 +188,6 @@ const UnforwardedPopover = (props, forwardedRef) => {
240
188
  // Positioning coordinates
241
189
  x,
242
190
  y,
243
- // Callback refs (not regular refs). This allows the position to be updated.
244
- // when either elements change.
245
- reference: referenceCallbackRef,
246
- floating,
247
191
  // Object with "regular" refs to both "reference" and "floating"
248
192
  refs,
249
193
  // Type of CSS position property to use (absolute or fixed)
@@ -257,6 +201,7 @@ const UnforwardedPopover = (props, forwardedRef) => {
257
201
  placement: normalizedPlacementFromProps === 'overlay' ? undefined : normalizedPlacementFromProps,
258
202
  middleware,
259
203
  whileElementsMounted: (referenceParam, floatingParam, updateParam) => autoUpdate(referenceParam, floatingParam, updateParam, {
204
+ layoutShift: false,
260
205
  animationFrame: true
261
206
  })
262
207
  });
@@ -273,94 +218,62 @@ const UnforwardedPopover = (props, forwardedRef) => {
273
218
  const anchorRefStartContainer = anchorRef?.startContainer;
274
219
  const anchorRefCurrent = anchorRef?.current;
275
220
  useLayoutEffect(() => {
276
- const resultingReferenceOwnerDoc = getReferenceOwnerDocument({
277
- anchor,
278
- anchorRef,
279
- anchorRect,
280
- getAnchorRect,
281
- fallbackReferenceElement,
282
- fallbackDocument: document
283
- });
284
- const scale = getFrameScale(resultingReferenceOwnerDoc);
285
221
  const resultingReferenceElement = getReferenceElement({
286
222
  anchor,
287
223
  anchorRef,
288
224
  anchorRect,
289
225
  getAnchorRect,
290
- fallbackReferenceElement,
291
- scale
226
+ fallbackReferenceElement
292
227
  });
293
- referenceCallbackRef(resultingReferenceElement);
294
- setReferenceOwnerDocument(resultingReferenceOwnerDoc);
295
- }, [anchor, anchorRef, anchorRefTop, anchorRefBottom, anchorRefStartContainer, anchorRefCurrent, anchorRect, getAnchorRect, fallbackReferenceElement, referenceCallbackRef]);
296
-
297
- // If the reference element is in a different ownerDocument (e.g. iFrame),
298
- // we need to manually update the floating's position as the reference's owner
299
- // document scrolls. Also update the frame offset if the view resizes.
300
- useLayoutEffect(() => {
301
- if (
302
- // Reference and root documents are the same.
303
- referenceOwnerDocument === document ||
304
- // Reference and floating are in the same document.
305
- referenceOwnerDocument === refs.floating.current?.ownerDocument ||
306
- // The reference's document has no view (i.e. window)
307
- // or frame element (ie. it's not an iframe).
308
- !referenceOwnerDocument?.defaultView?.frameElement) {
309
- frameOffsetRef.current = undefined;
310
- return;
311
- }
312
- const {
313
- defaultView
314
- } = referenceOwnerDocument;
315
- const {
316
- frameElement
317
- } = defaultView;
318
- const scrollContainer = frameElement ? getScrollContainer(frameElement) : null;
319
- const updateFrameOffset = () => {
320
- frameOffsetRef.current = getFrameOffset(referenceOwnerDocument);
321
- update();
322
- };
323
- defaultView.addEventListener('resize', updateFrameOffset);
324
- scrollContainer?.addEventListener('scroll', updateFrameOffset);
325
- updateFrameOffset();
326
- return () => {
327
- defaultView.removeEventListener('resize', updateFrameOffset);
328
- scrollContainer?.removeEventListener('scroll', updateFrameOffset);
329
- };
330
- }, [referenceOwnerDocument, update, refs.floating]);
331
- const mergedFloatingRef = useMergeRefs([floating, dialogRef, forwardedRef]);
332
-
333
- // Disable reason: We care to capture the _bubbled_ events from inputs
334
- // within popover as inferring close intent.
228
+ refs.setReference(resultingReferenceElement);
229
+ }, [anchor, anchorRef, anchorRefTop, anchorRefBottom, anchorRefStartContainer, anchorRefCurrent, anchorRect, getAnchorRect, fallbackReferenceElement, refs]);
230
+ const mergedFloatingRef = useMergeRefs([refs.setFloating, dialogRef, forwardedRef]);
231
+ const style = isExpanded ? undefined : {
232
+ position: strategy,
233
+ top: 0,
234
+ left: 0,
235
+ // `x` and `y` are framer-motion specific props and are shorthands
236
+ // for `translateX` and `translateY`. Currently it is not possible
237
+ // to use `translateX` and `translateY` because those values would
238
+ // be overridden by the return value of the
239
+ // `placementToMotionAnimationProps` function.
240
+ x: computePopoverPosition(x),
241
+ y: computePopoverPosition(y)
242
+ };
243
+ const shouldReduceMotion = useReducedMotion();
244
+ const shouldAnimate = animate && !isExpanded && !shouldReduceMotion;
245
+ const [animationFinished, setAnimationFinished] = useState(false);
246
+ const {
247
+ style: motionInlineStyles,
248
+ ...otherMotionProps
249
+ } = useMemo(() => placementToMotionAnimationProps(computedPlacement), [computedPlacement]);
250
+ const animationProps = shouldAnimate ? {
251
+ style: {
252
+ ...motionInlineStyles,
253
+ ...style
254
+ },
255
+ onAnimationComplete: () => setAnimationFinished(true),
256
+ ...otherMotionProps
257
+ } : {
258
+ animate: false,
259
+ style
260
+ };
335
261
 
336
- let content =
337
- // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
338
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
339
- createElement(AnimatedWrapper, {
340
- shouldAnimate: animate && !isExpanded,
341
- placement: computedPlacement,
262
+ // When Floating UI has finished positioning and Framer Motion has finished animating
263
+ // the popover, add the `is-positioned` class to signal that all transitions have finished.
264
+ const isPositioned = (!shouldAnimate || animationFinished) && x !== null && y !== null;
265
+ let content = createElement(motion.div, {
342
266
  className: classnames('components-popover', className, {
343
267
  'is-expanded': isExpanded,
344
- 'is-positioned': x !== null && y !== null,
268
+ 'is-positioned': isPositioned,
345
269
  // Use the 'alternate' classname for 'toolbar' variant for back compat.
346
270
  [`is-${computedVariant === 'toolbar' ? 'alternate' : computedVariant}`]: computedVariant
347
271
  }),
272
+ ...animationProps,
348
273
  ...contentProps,
349
274
  ref: mergedFloatingRef,
350
275
  ...dialogProps,
351
- tabIndex: -1,
352
- style: isExpanded ? undefined : {
353
- position: strategy,
354
- top: 0,
355
- left: 0,
356
- // `x` and `y` are framer-motion specific props and are shorthands
357
- // for `translateX` and `translateY`. Currently it is not possible
358
- // to use `translateX` and `translateY` because those values would
359
- // be overridden by the return value of the
360
- // `placementToMotionAnimationProps` function in `AnimatedWrapper`
361
- x: computePopoverPosition(x),
362
- y: computePopoverPosition(y)
363
- }
276
+ tabIndex: -1
364
277
  }, isExpanded && createElement(ScrollLock, null), isExpanded && createElement("div", {
365
278
  className: "components-popover__header"
366
279
  }, createElement("span", {
@@ -375,21 +288,25 @@ const UnforwardedPopover = (props, forwardedRef) => {
375
288
  ref: arrowCallbackRef,
376
289
  className: ['components-popover__arrow', `is-${computedPlacement.split('-')[0]}`].join(' '),
377
290
  style: {
378
- left: typeof arrowData?.x !== 'undefined' && Number.isFinite(arrowData.x) ? `${arrowData.x + ((_frameOffsetRef$curre = frameOffsetRef.current?.x) !== null && _frameOffsetRef$curre !== void 0 ? _frameOffsetRef$curre : 0)}px` : '',
379
- top: typeof arrowData?.y !== 'undefined' && Number.isFinite(arrowData.y) ? `${arrowData.y + ((_frameOffsetRef$curre2 = frameOffsetRef.current?.y) !== null && _frameOffsetRef$curre2 !== void 0 ? _frameOffsetRef$curre2 : 0)}px` : ''
291
+ left: typeof arrowData?.x !== 'undefined' && Number.isFinite(arrowData.x) ? `${arrowData.x}px` : '',
292
+ top: typeof arrowData?.y !== 'undefined' && Number.isFinite(arrowData.y) ? `${arrowData.y}px` : ''
380
293
  }
381
294
  }, createElement(ArrowTriangle, null)));
382
- if (slot.ref) {
295
+ const shouldRenderWithinSlot = slot.ref && !inline;
296
+ const hasAnchor = anchorRef || anchorRect || anchor;
297
+ if (shouldRenderWithinSlot) {
383
298
  content = createElement(Fill, {
384
299
  name: slotName
385
300
  }, content);
301
+ } else if (!inline) {
302
+ content = createPortal(content, getPopoverFallbackContainer());
386
303
  }
387
- if (anchorRef || anchorRect || anchor) {
304
+ if (hasAnchor) {
388
305
  return content;
389
306
  }
390
- return createElement("span", {
307
+ return createElement(Fragment, null, createElement("span", {
391
308
  ref: anchorRefFallback
392
- }, content);
309
+ }), content);
393
310
  };
394
311
 
395
312
  /**
@@ -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,IAAIC,cAAc,EACtBC,KAAK,IAAIC,eAAe,EACxBC,UAAU,EACVC,KAAK,EACLC,MAAM,IAAIC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AAA;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","Button","ScrollLock","Slot","Fill","useSlot","computePopoverPosition","positionToPlacement","placementToMotionAnimationProps","getReferenceElement","overlayMiddlewares","SLOT_NAME","ArrowTriangle","createElement","xmlns","viewBox","className","role","d","vectorEffect","slotNameContext","undefined","fallbackContainerClassname","getPopoverFallbackContainer","container","document","body","querySelector","append","UnforwardedPopover","props","forwardedRef","animate","headerTitle","onClose","children","noArrow","position","placement","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","anchorRefFallback","node","isMobileViewport","isExpanded","hasArrow","normalizedPlacementFromProps","middleware","apply","sizeProps","_refs$floating$curren","firstElementChild","refs","floating","current","HTMLElement","Object","assign","style","maxHeight","availableHeight","overflow","crossAxis","limiter","padding","element","slotName","slot","onDialogClose","type","event","dialogRef","dialogProps","__unstableOnClose","x","y","strategy","update","computedPlacement","middlewareData","arrowData","whileElementsMounted","referenceParam","floatingParam","updateParam","layoutShift","animationFrame","arrowCallbackRef","anchorRefTop","top","anchorRefBottom","bottom","anchorRefStartContainer","startContainer","anchorRefCurrent","resultingReferenceElement","setReference","mergedFloatingRef","setFloating","left","shouldReduceMotion","shouldAnimate","animationFinished","setAnimationFinished","motionInlineStyles","otherMotionProps","animationProps","onAnimationComplete","isPositioned","content","div","ref","tabIndex","icon","onClick","split","join","Number","isFinite","shouldRenderWithinSlot","hasAnchor","name","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';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport {\n\tcomputePopoverPosition,\n\tpositionToPlacement,\n\tplacementToMotionAnimationProps,\n\tgetReferenceElement,\n} from './utils';\nimport type { WordPressComponentProps } from '../ui/context';\nimport type {\n\tPopoverProps,\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 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\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 resultingReferenceElement = getReferenceElement( {\n\t\t\tanchor,\n\t\t\tanchorRef,\n\t\t\tanchorRect,\n\t\t\tgetAnchorRect,\n\t\t\tfallbackReferenceElement,\n\t\t} );\n\n\t\trefs.setReference( resultingReferenceElement );\n\t}, [\n\t\tanchor,\n\t\tanchorRef,\n\t\tanchorRefTop,\n\t\tanchorRefBottom,\n\t\tanchorRefStartContainer,\n\t\tanchorRefCurrent,\n\t\tanchorRect,\n\t\tgetAnchorRect,\n\t\tfallbackReferenceElement,\n\t\trefs,\n\t] );\n\n\tconst mergedFloatingRef = useMergeRefs( [\n\t\trefs.setFloating,\n\t\tdialogRef,\n\t\tforwardedRef,\n\t] );\n\n\tconst style = isExpanded\n\t\t? undefined\n\t\t: {\n\t\t\t\tposition: strategy,\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\t// `x` and `y` are framer-motion specific props and are shorthands\n\t\t\t\t// for `translateX` and `translateY`. Currently it is not possible\n\t\t\t\t// to use `translateX` and `translateY` because those values would\n\t\t\t\t// be overridden by the return value of the\n\t\t\t\t// `placementToMotionAnimationProps` function.\n\t\t\t\tx: computePopoverPosition( x ),\n\t\t\t\ty: computePopoverPosition( y ),\n\t\t };\n\n\tconst shouldReduceMotion = useReducedMotion();\n\tconst shouldAnimate = animate && ! isExpanded && ! shouldReduceMotion;\n\n\tconst [ animationFinished, setAnimationFinished ] = useState( false );\n\n\tconst { style: motionInlineStyles, ...otherMotionProps } = useMemo(\n\t\t() => placementToMotionAnimationProps( computedPlacement ),\n\t\t[ computedPlacement ]\n\t);\n\n\tconst animationProps: HTMLMotionProps< 'div' > = shouldAnimate\n\t\t? {\n\t\t\t\tstyle: {\n\t\t\t\t\t...motionInlineStyles,\n\t\t\t\t\t...style,\n\t\t\t\t},\n\t\t\t\tonAnimationComplete: () => setAnimationFinished( true ),\n\t\t\t\t...otherMotionProps,\n\t\t }\n\t\t: {\n\t\t\t\tanimate: false,\n\t\t\t\tstyle,\n\t\t };\n\n\t// When Floating UI has finished positioning and Framer Motion has finished animating\n\t// the popover, add the `is-positioned` class to signal that all transitions have finished.\n\tconst isPositioned =\n\t\t( ! shouldAnimate || animationFinished ) && x !== null && y !== null;\n\n\tlet content = (\n\t\t<motion.div\n\t\t\tclassName={ classnames( 'components-popover', className, {\n\t\t\t\t'is-expanded': isExpanded,\n\t\t\t\t'is-positioned': isPositioned,\n\t\t\t\t// Use the 'alternate' classname for 'toolbar' variant for back compat.\n\t\t\t\t[ `is-${\n\t\t\t\t\tcomputedVariant === 'toolbar'\n\t\t\t\t\t\t? 'alternate'\n\t\t\t\t\t\t: computedVariant\n\t\t\t\t}` ]: computedVariant,\n\t\t\t} ) }\n\t\t\t{ ...animationProps }\n\t\t\t{ ...contentProps }\n\t\t\tref={ mergedFloatingRef }\n\t\t\t{ ...dialogProps }\n\t\t\ttabIndex={ -1 }\n\t\t>\n\t\t\t{ /* Prevents scroll on the document */ }\n\t\t\t{ isExpanded && <ScrollLock /> }\n\t\t\t{ isExpanded && (\n\t\t\t\t<div className=\"components-popover__header\">\n\t\t\t\t\t<span className=\"components-popover__header-title\">\n\t\t\t\t\t\t{ headerTitle }\n\t\t\t\t\t</span>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"components-popover__close\"\n\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\tonClick={ onClose }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t) }\n\t\t\t<div className=\"components-popover__content\">{ children }</div>\n\t\t\t{ hasArrow && (\n\t\t\t\t<div\n\t\t\t\t\tref={ arrowCallbackRef }\n\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t'components-popover__arrow',\n\t\t\t\t\t\t`is-${ computedPlacement.split( '-' )[ 0 ] }`,\n\t\t\t\t\t].join( ' ' ) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\tleft:\n\t\t\t\t\t\t\ttypeof arrowData?.x !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.x )\n\t\t\t\t\t\t\t\t? `${ arrowData.x }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t\ttop:\n\t\t\t\t\t\t\ttypeof arrowData?.y !== 'undefined' &&\n\t\t\t\t\t\t\tNumber.isFinite( arrowData.y )\n\t\t\t\t\t\t\t\t? `${ arrowData.y }px`\n\t\t\t\t\t\t\t\t: '',\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t<ArrowTriangle />\n\t\t\t\t</div>\n\t\t\t) }\n\t\t</motion.div>\n\t);\n\n\tconst shouldRenderWithinSlot = slot.ref && ! inline;\n\tconst hasAnchor = anchorRef || anchorRect || anchor;\n\n\tif ( shouldRenderWithinSlot ) {\n\t\tcontent = <Fill name={ slotName }>{ content }</Fill>;\n\t} else if ( ! inline ) {\n\t\tcontent = createPortal( 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,EACfC,UAAU,EACVC,aAAa,EACbC,UAAU,EACVC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,YAAY,QACN,oBAAoB;AAC3B,SACCC,gBAAgB,EAChBC,YAAY,EACZC,uBAAuB,IAAIC,SAAS,QAC9B,oBAAoB;AAC3B,SAASC,KAAK,QAAQ,kBAAkB;AACxC,OAAOC,UAAU,MAAM,uBAAuB;AAC9C,SAASC,IAAI,EAAEC,GAAG,QAAQ,uBAAuB;;AAEjD;AACA;AACA;AACA,OAAOC,M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AG2C,OAAe,CAAC;EACrD,CAAC,MAAM,IAAK,CAAErF,MAAM,EAAG;IACtBqF,OAAO,GAAG5I,YAAY,CAAE4I,OAAO,EAAE7G,2BAA2B,CAAC,CAAE,CAAC;EACjE;EAEA,IAAKwH,SAAS,EAAG;IAChB,OAAOX,OAAO;EACf;EAEA,OACCvH,aAAA,CAAAoI,QAAA,QACCpI,aAAA;IAAMyH,GAAG,EAAGtE;EAAmB,CAAE,CAAC,EAChCoE,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,MAAMc,OAAO,GAAGhK,UAAU,CAAE2C,kBAAmB,CAAC;AAEvD,SAASsH,WAAWA,CACnB;EAAEH,IAAI,GAAGrI;AAA6B,CAAC,EACvC2H,GAAwB,EACvB;EACD,OACCzH,aAAA,CAACV;EACA;EAAA;IACAiJ,gBAAgB;IAChBJ,IAAI,EAAGA,IAAM;IACbhI,SAAS,EAAC,cAAc;IACxBsH,GAAG,EAAGA;EAAK,CACX,CAAC;AAEJ;;AAEA;AACAY,OAAO,CAAC/I,IAAI,GAAGjB,UAAU,CAAEiK,WAAY,CAAC;AACxC;AACAD,OAAO,CAACG,0BAA0B,GAAGjI,eAAe,CAACkI,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 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":""}