@wordpress/components 28.6.0 → 28.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 (698) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/CONTRIBUTING.md +42 -19
  3. package/build/alignment-matrix-control/cell.js +4 -7
  4. package/build/alignment-matrix-control/cell.js.map +1 -1
  5. package/build/alignment-matrix-control/icon.js +31 -19
  6. package/build/alignment-matrix-control/icon.js.map +1 -1
  7. package/build/alignment-matrix-control/index.js +55 -51
  8. package/build/alignment-matrix-control/index.js.map +1 -1
  9. package/build/alignment-matrix-control/styles.js +73 -0
  10. package/build/alignment-matrix-control/styles.js.map +1 -0
  11. package/build/alignment-matrix-control/types.js.map +1 -1
  12. package/build/angle-picker-control/angle-circle.js +9 -9
  13. package/build/angle-picker-control/angle-circle.js.map +1 -1
  14. package/build/border-control/border-control/component.js +18 -13
  15. package/build/border-control/border-control/component.js.map +1 -1
  16. package/build/box-control/all-input-control.js +1 -2
  17. package/build/box-control/all-input-control.js.map +1 -1
  18. package/build/box-control/utils.js +1 -1
  19. package/build/box-control/utils.js.map +1 -1
  20. package/build/card/card/component.js +2 -2
  21. package/build/card/card/component.js.map +1 -1
  22. package/build/card/styles.js +18 -18
  23. package/build/card/styles.js.map +1 -1
  24. package/build/circular-option-picker/circular-option-picker-option.js +15 -9
  25. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
  26. package/build/circular-option-picker/circular-option-picker.js +15 -12
  27. package/build/circular-option-picker/circular-option-picker.js.map +1 -1
  28. package/build/circular-option-picker/types.js.map +1 -1
  29. package/build/clipboard-button/index.js +6 -6
  30. package/build/clipboard-button/index.js.map +1 -1
  31. package/build/color-palette/utils.js +1 -2
  32. package/build/color-palette/utils.js.map +1 -1
  33. package/build/color-picker/color-copy-button.js +8 -8
  34. package/build/color-picker/color-copy-button.js.map +1 -1
  35. package/build/color-picker/hex-input.js +8 -8
  36. package/build/color-picker/hex-input.js.map +1 -1
  37. package/build/color-picker/input-with-slider.js +8 -8
  38. package/build/color-picker/input-with-slider.js.map +1 -1
  39. package/build/color-picker/styles.js +8 -8
  40. package/build/color-picker/styles.js.map +1 -1
  41. package/build/combobox-control/index.js +3 -1
  42. package/build/combobox-control/index.js.map +1 -1
  43. package/build/combobox-control/types.js.map +1 -1
  44. package/build/composite/context.js +1 -1
  45. package/build/composite/context.js.map +1 -1
  46. package/build/composite/group-label.js +33 -0
  47. package/build/composite/group-label.js.map +1 -0
  48. package/build/composite/group.js +33 -0
  49. package/build/composite/group.js.map +1 -0
  50. package/build/composite/hover.js +33 -0
  51. package/build/composite/hover.js.map +1 -0
  52. package/build/composite/index.js +63 -118
  53. package/build/composite/index.js.map +1 -1
  54. package/build/composite/item.js +33 -0
  55. package/build/composite/item.js.map +1 -0
  56. package/build/composite/legacy/index.js +59 -7
  57. package/build/composite/legacy/index.js.map +1 -1
  58. package/build/composite/row.js +33 -0
  59. package/build/composite/row.js.map +1 -0
  60. package/build/composite/typeahead.js +33 -0
  61. package/build/composite/typeahead.js.map +1 -0
  62. package/build/composite/types.js.map +1 -1
  63. package/build/custom-gradient-picker/gradient-bar/control-points.js +8 -8
  64. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  65. package/build/custom-select-control-v2/styles.js +12 -14
  66. package/build/custom-select-control-v2/styles.js.map +1 -1
  67. package/build/date-time/date/index.js +1 -1
  68. package/build/date-time/date/index.js.map +1 -1
  69. package/build/date-time/date/styles.js +37 -26
  70. package/build/date-time/date/styles.js.map +1 -1
  71. package/build/date-time/date/use-lilius/index.js +163 -0
  72. package/build/date-time/date/use-lilius/index.js.map +1 -0
  73. package/build/date-time/time/time-input/index.js +17 -19
  74. package/build/date-time/time/time-input/index.js.map +1 -1
  75. package/build/dimension-control/index.js +6 -1
  76. package/build/dimension-control/index.js.map +1 -1
  77. package/build/draggable/index.js +4 -4
  78. package/build/draggable/index.js.map +1 -1
  79. package/build/dropdown-menu-v2/checkbox-item.js +69 -0
  80. package/build/dropdown-menu-v2/checkbox-item.js.map +1 -0
  81. package/build/dropdown-menu-v2/context.js +17 -0
  82. package/build/dropdown-menu-v2/context.js.map +1 -0
  83. package/build/dropdown-menu-v2/group-label.js +40 -0
  84. package/build/dropdown-menu-v2/group-label.js.map +1 -0
  85. package/build/dropdown-menu-v2/group.js +29 -0
  86. package/build/dropdown-menu-v2/group.js.map +1 -0
  87. package/build/dropdown-menu-v2/index.js +58 -146
  88. package/build/dropdown-menu-v2/index.js.map +1 -1
  89. package/build/dropdown-menu-v2/item-help-text.js +27 -0
  90. package/build/dropdown-menu-v2/item-help-text.js.map +1 -0
  91. package/build/dropdown-menu-v2/item-label.js +27 -0
  92. package/build/dropdown-menu-v2/item-label.js.map +1 -0
  93. package/build/dropdown-menu-v2/item.js +53 -0
  94. package/build/dropdown-menu-v2/item.js.map +1 -0
  95. package/build/dropdown-menu-v2/radio-item.js +79 -0
  96. package/build/dropdown-menu-v2/radio-item.js.map +1 -0
  97. package/build/dropdown-menu-v2/separator.js +30 -0
  98. package/build/dropdown-menu-v2/separator.js.map +1 -0
  99. package/build/dropdown-menu-v2/styles.js +55 -79
  100. package/build/dropdown-menu-v2/styles.js.map +1 -1
  101. package/build/dropdown-menu-v2/types.js.map +1 -1
  102. package/build/dropdown-menu-v2/use-temporary-focus-visible-fix.js +27 -0
  103. package/build/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +1 -0
  104. package/build/focal-point-picker/styles/focal-point-style.js +7 -2
  105. package/build/focal-point-picker/styles/focal-point-style.js.map +1 -1
  106. package/build/form-token-field/types.js.map +1 -1
  107. package/build/index.js +13 -0
  108. package/build/index.js.map +1 -1
  109. package/build/input-control/index.js +2 -2
  110. package/build/input-control/index.js.map +1 -1
  111. package/build/input-control/input-base.js +5 -10
  112. package/build/input-control/input-base.js.map +1 -1
  113. package/build/input-control/input-prefix-wrapper.js +3 -3
  114. package/build/input-control/input-prefix-wrapper.js.map +1 -1
  115. package/build/input-control/input-suffix-wrapper.js +2 -3
  116. package/build/input-control/input-suffix-wrapper.js.map +1 -1
  117. package/build/input-control/reducer/reducer.js +8 -8
  118. package/build/input-control/reducer/reducer.js.map +1 -1
  119. package/build/input-control/styles/input-control-styles.js +75 -45
  120. package/build/input-control/styles/input-control-styles.js.map +1 -1
  121. package/build/input-control/types.js.map +1 -1
  122. package/build/input-control/utils.js +3 -3
  123. package/build/input-control/utils.js.map +1 -1
  124. package/build/item-group/styles.js +10 -10
  125. package/build/item-group/styles.js.map +1 -1
  126. package/build/modal/index.js +32 -17
  127. package/build/modal/index.js.map +1 -1
  128. package/build/modal/types.js.map +1 -1
  129. package/build/modal/use-modal-exit-animation.js +75 -0
  130. package/build/modal/use-modal-exit-animation.js.map +1 -0
  131. package/build/navigation/index.js +4 -4
  132. package/build/navigation/index.js.map +1 -1
  133. package/build/navigation/styles/navigation-styles.js +13 -13
  134. package/build/navigation/styles/navigation-styles.js.map +1 -1
  135. package/build/navigator/index.js +12 -13
  136. package/build/navigator/index.js.map +1 -1
  137. package/build/navigator/navigator-back-button/hook.js +2 -2
  138. package/build/navigator/navigator-back-button/hook.js.map +1 -1
  139. package/build/navigator/navigator-button/hook.js +2 -2
  140. package/build/navigator/navigator-button/hook.js.map +1 -1
  141. package/build/navigator/navigator-provider/component.js +99 -67
  142. package/build/navigator/navigator-provider/component.js.map +1 -1
  143. package/build/navigator/navigator-screen/component.js +5 -0
  144. package/build/navigator/navigator-screen/component.js.map +1 -1
  145. package/build/navigator/navigator-to-parent-button/component.js +2 -2
  146. package/build/navigator/navigator-to-parent-button/component.js.map +1 -1
  147. package/build/navigator/types.js.map +1 -1
  148. package/build/navigator/use-navigator.js +1 -2
  149. package/build/navigator/use-navigator.js.map +1 -1
  150. package/build/palette-edit/index.js +2 -2
  151. package/build/palette-edit/index.js.map +1 -1
  152. package/build/private-apis.js +1 -14
  153. package/build/private-apis.js.map +1 -1
  154. package/build/range-control/styles/range-control-styles.js +30 -30
  155. package/build/range-control/styles/range-control-styles.js.map +1 -1
  156. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
  157. package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  158. package/build/select-control/styles/select-control-styles.js +12 -12
  159. package/build/select-control/styles/select-control-styles.js.map +1 -1
  160. package/build/slot-fill/bubbles-virtually/fill.js +4 -4
  161. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  162. package/build/slot-fill/index.js +1 -0
  163. package/build/slot-fill/index.js.map +1 -1
  164. package/build/snackbar/index.js +4 -4
  165. package/build/snackbar/index.js.map +1 -1
  166. package/build/tabs/index.js +4 -4
  167. package/build/tabs/index.js.map +1 -1
  168. package/build/tabs/styles.js +3 -3
  169. package/build/tabs/styles.js.map +1 -1
  170. package/build/tabs/tablist.js +5 -4
  171. package/build/tabs/tablist.js.map +1 -1
  172. package/build/toggle-group-control/toggle-group-control/utils.js +6 -6
  173. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  174. package/build/tools-panel/tools-panel/hook.js +6 -6
  175. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  176. package/build/unit-control/styles/unit-control-styles.js +7 -7
  177. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  178. package/build/utils/config-values.js +10 -9
  179. package/build/utils/config-values.js.map +1 -1
  180. package/build/utils/element-rect.js +73 -105
  181. package/build/utils/element-rect.js.map +1 -1
  182. package/build/utils/hooks/use-update-effect.js +4 -4
  183. package/build/utils/hooks/use-update-effect.js.map +1 -1
  184. package/build-module/alignment-matrix-control/cell.js +2 -5
  185. package/build-module/alignment-matrix-control/cell.js.map +1 -1
  186. package/build-module/alignment-matrix-control/icon.js +31 -19
  187. package/build-module/alignment-matrix-control/icon.js.map +1 -1
  188. package/build-module/alignment-matrix-control/index.js +55 -50
  189. package/build-module/alignment-matrix-control/index.js.map +1 -1
  190. package/build-module/alignment-matrix-control/styles.js +70 -0
  191. package/build-module/alignment-matrix-control/styles.js.map +1 -0
  192. package/build-module/alignment-matrix-control/types.js.map +1 -1
  193. package/build-module/angle-picker-control/angle-circle.js +9 -9
  194. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  195. package/build-module/border-control/border-control/component.js +18 -13
  196. package/build-module/border-control/border-control/component.js.map +1 -1
  197. package/build-module/box-control/all-input-control.js +2 -2
  198. package/build-module/box-control/all-input-control.js.map +1 -1
  199. package/build-module/box-control/utils.js +1 -1
  200. package/build-module/box-control/utils.js.map +1 -1
  201. package/build-module/card/card/component.js +2 -2
  202. package/build-module/card/card/component.js.map +1 -1
  203. package/build-module/card/styles.js +18 -18
  204. package/build-module/card/styles.js.map +1 -1
  205. package/build-module/circular-option-picker/circular-option-picker-option.js +16 -10
  206. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
  207. package/build-module/circular-option-picker/circular-option-picker.js +16 -13
  208. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
  209. package/build-module/circular-option-picker/types.js.map +1 -1
  210. package/build-module/clipboard-button/index.js +6 -6
  211. package/build-module/clipboard-button/index.js.map +1 -1
  212. package/build-module/color-palette/utils.js +1 -2
  213. package/build-module/color-palette/utils.js.map +1 -1
  214. package/build-module/color-picker/color-copy-button.js +8 -8
  215. package/build-module/color-picker/color-copy-button.js.map +1 -1
  216. package/build-module/color-picker/hex-input.js +7 -8
  217. package/build-module/color-picker/hex-input.js.map +1 -1
  218. package/build-module/color-picker/input-with-slider.js +7 -8
  219. package/build-module/color-picker/input-with-slider.js.map +1 -1
  220. package/build-module/color-picker/styles.js +8 -8
  221. package/build-module/color-picker/styles.js.map +1 -1
  222. package/build-module/combobox-control/index.js +3 -1
  223. package/build-module/combobox-control/index.js.map +1 -1
  224. package/build-module/combobox-control/types.js.map +1 -1
  225. package/build-module/composite/context.js +1 -1
  226. package/build-module/composite/context.js.map +1 -1
  227. package/build-module/composite/group-label.js +25 -0
  228. package/build-module/composite/group-label.js.map +1 -0
  229. package/build-module/composite/group.js +25 -0
  230. package/build-module/composite/group.js.map +1 -0
  231. package/build-module/composite/hover.js +25 -0
  232. package/build-module/composite/hover.js.map +1 -0
  233. package/build-module/composite/index.js +64 -118
  234. package/build-module/composite/index.js.map +1 -1
  235. package/build-module/composite/item.js +25 -0
  236. package/build-module/composite/item.js.map +1 -0
  237. package/build-module/composite/legacy/index.js +57 -8
  238. package/build-module/composite/legacy/index.js.map +1 -1
  239. package/build-module/composite/row.js +25 -0
  240. package/build-module/composite/row.js.map +1 -0
  241. package/build-module/composite/typeahead.js +25 -0
  242. package/build-module/composite/typeahead.js.map +1 -0
  243. package/build-module/composite/types.js.map +1 -1
  244. package/build-module/custom-gradient-picker/gradient-bar/control-points.js +8 -8
  245. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  246. package/build-module/custom-select-control-v2/styles.js +12 -14
  247. package/build-module/custom-select-control-v2/styles.js.map +1 -1
  248. package/build-module/date-time/date/index.js +1 -2
  249. package/build-module/date-time/date/index.js.map +1 -1
  250. package/build-module/date-time/date/styles.js +33 -26
  251. package/build-module/date-time/date/styles.js.map +1 -1
  252. package/build-module/date-time/date/use-lilius/index.js +158 -0
  253. package/build-module/date-time/date/use-lilius/index.js.map +1 -0
  254. package/build-module/date-time/time/time-input/index.js +17 -19
  255. package/build-module/date-time/time/time-input/index.js.map +1 -1
  256. package/build-module/dimension-control/index.js +6 -1
  257. package/build-module/dimension-control/index.js.map +1 -1
  258. package/build-module/draggable/index.js +4 -4
  259. package/build-module/draggable/index.js.map +1 -1
  260. package/build-module/dropdown-menu-v2/checkbox-item.js +62 -0
  261. package/build-module/dropdown-menu-v2/checkbox-item.js.map +1 -0
  262. package/build-module/dropdown-menu-v2/context.js +11 -0
  263. package/build-module/dropdown-menu-v2/context.js.map +1 -0
  264. package/build-module/dropdown-menu-v2/group-label.js +32 -0
  265. package/build-module/dropdown-menu-v2/group-label.js.map +1 -0
  266. package/build-module/dropdown-menu-v2/group.js +21 -0
  267. package/build-module/dropdown-menu-v2/group.js.map +1 -0
  268. package/build-module/dropdown-menu-v2/index.js +57 -144
  269. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  270. package/build-module/dropdown-menu-v2/item-help-text.js +19 -0
  271. package/build-module/dropdown-menu-v2/item-help-text.js.map +1 -0
  272. package/build-module/dropdown-menu-v2/item-label.js +19 -0
  273. package/build-module/dropdown-menu-v2/item-label.js.map +1 -0
  274. package/build-module/dropdown-menu-v2/item.js +46 -0
  275. package/build-module/dropdown-menu-v2/item.js.map +1 -0
  276. package/build-module/dropdown-menu-v2/radio-item.js +72 -0
  277. package/build-module/dropdown-menu-v2/radio-item.js.map +1 -0
  278. package/build-module/dropdown-menu-v2/separator.js +22 -0
  279. package/build-module/dropdown-menu-v2/separator.js.map +1 -0
  280. package/build-module/dropdown-menu-v2/styles.js +55 -79
  281. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  282. package/build-module/dropdown-menu-v2/types.js.map +1 -1
  283. package/build-module/dropdown-menu-v2/use-temporary-focus-visible-fix.js +20 -0
  284. package/build-module/dropdown-menu-v2/use-temporary-focus-visible-fix.js.map +1 -0
  285. package/build-module/focal-point-picker/styles/focal-point-style.js +6 -2
  286. package/build-module/focal-point-picker/styles/focal-point-style.js.map +1 -1
  287. package/build-module/form-token-field/types.js.map +1 -1
  288. package/build-module/index.js +3 -1
  289. package/build-module/index.js.map +1 -1
  290. package/build-module/input-control/index.js +2 -2
  291. package/build-module/input-control/index.js.map +1 -1
  292. package/build-module/input-control/input-base.js +6 -11
  293. package/build-module/input-control/input-base.js.map +1 -1
  294. package/build-module/input-control/input-prefix-wrapper.js +4 -3
  295. package/build-module/input-control/input-prefix-wrapper.js.map +1 -1
  296. package/build-module/input-control/input-suffix-wrapper.js +3 -3
  297. package/build-module/input-control/input-suffix-wrapper.js.map +1 -1
  298. package/build-module/input-control/reducer/reducer.js +8 -8
  299. package/build-module/input-control/reducer/reducer.js.map +1 -1
  300. package/build-module/input-control/styles/input-control-styles.js +74 -44
  301. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  302. package/build-module/input-control/types.js.map +1 -1
  303. package/build-module/input-control/utils.js +3 -3
  304. package/build-module/input-control/utils.js.map +1 -1
  305. package/build-module/item-group/styles.js +10 -10
  306. package/build-module/item-group/styles.js.map +1 -1
  307. package/build-module/modal/index.js +34 -17
  308. package/build-module/modal/index.js.map +1 -1
  309. package/build-module/modal/types.js.map +1 -1
  310. package/build-module/modal/use-modal-exit-animation.js +68 -0
  311. package/build-module/modal/use-modal-exit-animation.js.map +1 -0
  312. package/build-module/navigation/index.js +4 -4
  313. package/build-module/navigation/index.js.map +1 -1
  314. package/build-module/navigation/styles/navigation-styles.js +14 -14
  315. package/build-module/navigation/styles/navigation-styles.js.map +1 -1
  316. package/build-module/navigator/index.js +6 -6
  317. package/build-module/navigator/index.js.map +1 -1
  318. package/build-module/navigator/navigator-back-button/hook.js +1 -1
  319. package/build-module/navigator/navigator-back-button/hook.js.map +1 -1
  320. package/build-module/navigator/navigator-button/hook.js +1 -1
  321. package/build-module/navigator/navigator-button/hook.js.map +1 -1
  322. package/build-module/navigator/navigator-provider/component.js +99 -67
  323. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  324. package/build-module/navigator/navigator-screen/component.js +4 -0
  325. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  326. package/build-module/navigator/navigator-to-parent-button/component.js +1 -1
  327. package/build-module/navigator/navigator-to-parent-button/component.js.map +1 -1
  328. package/build-module/navigator/types.js.map +1 -1
  329. package/build-module/navigator/use-navigator.js +1 -2
  330. package/build-module/navigator/use-navigator.js.map +1 -1
  331. package/build-module/palette-edit/index.js +2 -2
  332. package/build-module/palette-edit/index.js.map +1 -1
  333. package/build-module/private-apis.js +1 -14
  334. package/build-module/private-apis.js.map +1 -1
  335. package/build-module/range-control/styles/range-control-styles.js +31 -31
  336. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  337. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +5 -5
  338. package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
  339. package/build-module/select-control/styles/select-control-styles.js +13 -13
  340. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  341. package/build-module/slot-fill/bubbles-virtually/fill.js +4 -4
  342. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  343. package/build-module/slot-fill/index.js +1 -0
  344. package/build-module/slot-fill/index.js.map +1 -1
  345. package/build-module/snackbar/index.js +4 -4
  346. package/build-module/snackbar/index.js.map +1 -1
  347. package/build-module/tabs/index.js +4 -4
  348. package/build-module/tabs/index.js.map +1 -1
  349. package/build-module/tabs/styles.js +4 -4
  350. package/build-module/tabs/styles.js.map +1 -1
  351. package/build-module/tabs/tablist.js +5 -4
  352. package/build-module/tabs/tablist.js.map +1 -1
  353. package/build-module/toggle-group-control/toggle-group-control/utils.js +6 -6
  354. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  355. package/build-module/tools-panel/tools-panel/hook.js +6 -6
  356. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  357. package/build-module/unit-control/styles/unit-control-styles.js +7 -7
  358. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  359. package/build-module/utils/config-values.js +10 -9
  360. package/build-module/utils/config-values.js.map +1 -1
  361. package/build-module/utils/element-rect.js +74 -105
  362. package/build-module/utils/element-rect.js.map +1 -1
  363. package/build-module/utils/hooks/use-update-effect.js +4 -4
  364. package/build-module/utils/hooks/use-update-effect.js.map +1 -1
  365. package/build-style/style-rtl.css +60 -31
  366. package/build-style/style.css +60 -31
  367. package/build-types/alignment-matrix-control/cell.d.ts +1 -1
  368. package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
  369. package/build-types/alignment-matrix-control/icon.d.ts +1 -1
  370. package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
  371. package/build-types/alignment-matrix-control/index.d.ts +16 -6
  372. package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
  373. package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
  374. package/build-types/alignment-matrix-control/{styles/alignment-matrix-control-styles.d.ts → styles.d.ts} +9 -10
  375. package/build-types/alignment-matrix-control/styles.d.ts.map +1 -0
  376. package/build-types/alignment-matrix-control/types.d.ts +12 -1
  377. package/build-types/alignment-matrix-control/types.d.ts.map +1 -1
  378. package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
  379. package/build-types/border-control/border-control/component.d.ts.map +1 -1
  380. package/build-types/box-control/all-input-control.d.ts.map +1 -1
  381. package/build-types/box-control/stories/index.story.d.ts.map +1 -1
  382. package/build-types/box-control/utils.d.ts +1 -1
  383. package/build-types/box-control/utils.d.ts.map +1 -1
  384. package/build-types/button-group/stories/index.story.d.ts +2 -2
  385. package/build-types/button-group/stories/index.story.d.ts.map +1 -1
  386. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
  387. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
  388. package/build-types/circular-option-picker/types.d.ts +2 -2
  389. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  390. package/build-types/color-palette/utils.d.ts.map +1 -1
  391. package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
  392. package/build-types/color-picker/hex-input.d.ts.map +1 -1
  393. package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
  394. package/build-types/color-picker/styles.d.ts.map +1 -1
  395. package/build-types/combobox-control/index.d.ts.map +1 -1
  396. package/build-types/combobox-control/stories/index.story.d.ts +4 -0
  397. package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
  398. package/build-types/combobox-control/types.d.ts +5 -0
  399. package/build-types/combobox-control/types.d.ts.map +1 -1
  400. package/build-types/composite/context.d.ts.map +1 -1
  401. package/build-types/composite/group-label.d.ts +3 -0
  402. package/build-types/composite/group-label.d.ts.map +1 -0
  403. package/build-types/composite/group.d.ts +3 -0
  404. package/build-types/composite/group.d.ts.map +1 -0
  405. package/build-types/composite/hover.d.ts +3 -0
  406. package/build-types/composite/hover.d.ts.map +1 -0
  407. package/build-types/composite/index.d.ts +63 -47
  408. package/build-types/composite/index.d.ts.map +1 -1
  409. package/build-types/composite/item.d.ts +3 -0
  410. package/build-types/composite/item.d.ts.map +1 -0
  411. package/build-types/composite/legacy/index.d.ts +23 -3
  412. package/build-types/composite/legacy/index.d.ts.map +1 -1
  413. package/build-types/composite/legacy/stories/index.story.d.ts.map +1 -1
  414. package/build-types/composite/row.d.ts +3 -0
  415. package/build-types/composite/row.d.ts.map +1 -0
  416. package/build-types/composite/stories/index.story.d.ts +9 -8
  417. package/build-types/composite/stories/index.story.d.ts.map +1 -1
  418. package/build-types/composite/typeahead.d.ts +3 -0
  419. package/build-types/composite/typeahead.d.ts.map +1 -0
  420. package/build-types/composite/types.d.ts +12 -11
  421. package/build-types/composite/types.d.ts.map +1 -1
  422. package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
  423. package/build-types/date-time/date/index.d.ts +0 -3
  424. package/build-types/date-time/date/index.d.ts.map +1 -1
  425. package/build-types/date-time/date/styles.d.ts.map +1 -1
  426. package/build-types/date-time/date/test/use-lilius.d.ts +2 -0
  427. package/build-types/date-time/date/test/use-lilius.d.ts.map +1 -0
  428. package/build-types/date-time/date/use-lilius/index.d.ts +169 -0
  429. package/build-types/date-time/date/use-lilius/index.d.ts.map +1 -0
  430. package/build-types/date-time/time/time-input/index.d.ts.map +1 -1
  431. package/build-types/dimension-control/index.d.ts +1 -1
  432. package/build-types/dimension-control/index.d.ts.map +1 -1
  433. package/build-types/dimension-control/stories/index.story.d.ts +5 -0
  434. package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
  435. package/build-types/dropdown-menu-v2/checkbox-item.d.ts +3 -0
  436. package/build-types/dropdown-menu-v2/checkbox-item.d.ts.map +1 -0
  437. package/build-types/dropdown-menu-v2/context.d.ts +6 -0
  438. package/build-types/dropdown-menu-v2/context.d.ts.map +1 -0
  439. package/build-types/dropdown-menu-v2/group-label.d.ts +3 -0
  440. package/build-types/dropdown-menu-v2/group-label.d.ts.map +1 -0
  441. package/build-types/dropdown-menu-v2/group.d.ts +3 -0
  442. package/build-types/dropdown-menu-v2/group.d.ts.map +1 -0
  443. package/build-types/dropdown-menu-v2/index.d.ts +39 -18
  444. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  445. package/build-types/dropdown-menu-v2/item-help-text.d.ts +6 -0
  446. package/build-types/dropdown-menu-v2/item-help-text.d.ts.map +1 -0
  447. package/build-types/dropdown-menu-v2/item-label.d.ts +6 -0
  448. package/build-types/dropdown-menu-v2/item-label.d.ts.map +1 -0
  449. package/build-types/dropdown-menu-v2/item.d.ts +3 -0
  450. package/build-types/dropdown-menu-v2/item.d.ts.map +1 -0
  451. package/build-types/dropdown-menu-v2/radio-item.d.ts +3 -0
  452. package/build-types/dropdown-menu-v2/radio-item.d.ts.map +1 -0
  453. package/build-types/dropdown-menu-v2/separator.d.ts +3 -0
  454. package/build-types/dropdown-menu-v2/separator.d.ts.map +1 -0
  455. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +10 -10
  456. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  457. package/build-types/dropdown-menu-v2/styles.d.ts +14 -6
  458. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  459. package/build-types/dropdown-menu-v2/types.d.ts +6 -0
  460. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  461. package/build-types/dropdown-menu-v2/use-temporary-focus-visible-fix.d.ts +8 -0
  462. package/build-types/dropdown-menu-v2/use-temporary-focus-visible-fix.d.ts.map +1 -0
  463. package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
  464. package/build-types/form-token-field/types.d.ts +1 -0
  465. package/build-types/form-token-field/types.d.ts.map +1 -1
  466. package/build-types/index.d.ts +4 -1
  467. package/build-types/index.d.ts.map +1 -1
  468. package/build-types/input-control/input-base.d.ts.map +1 -1
  469. package/build-types/input-control/input-prefix-wrapper.d.ts +2 -2
  470. package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -1
  471. package/build-types/input-control/input-suffix-wrapper.d.ts +2 -2
  472. package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -1
  473. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  474. package/build-types/input-control/stories/index.story.d.ts +9 -0
  475. package/build-types/input-control/stories/index.story.d.ts.map +1 -1
  476. package/build-types/input-control/styles/input-control-styles.d.ts +15 -9
  477. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  478. package/build-types/input-control/types.d.ts +23 -6
  479. package/build-types/input-control/types.d.ts.map +1 -1
  480. package/build-types/modal/index.d.ts.map +1 -1
  481. package/build-types/modal/stories/index.story.d.ts +3 -0
  482. package/build-types/modal/stories/index.story.d.ts.map +1 -1
  483. package/build-types/modal/types.d.ts +6 -10
  484. package/build-types/modal/types.d.ts.map +1 -1
  485. package/build-types/modal/use-modal-exit-animation.d.ts +9 -0
  486. package/build-types/modal/use-modal-exit-animation.d.ts.map +1 -0
  487. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  488. package/build-types/navigator/index.d.ts +6 -6
  489. package/build-types/navigator/index.d.ts.map +1 -1
  490. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  491. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  492. package/build-types/navigator/stories/index.story.d.ts +1 -1
  493. package/build-types/navigator/stories/index.story.d.ts.map +1 -1
  494. package/build-types/navigator/types.d.ts +3 -1
  495. package/build-types/navigator/types.d.ts.map +1 -1
  496. package/build-types/navigator/use-navigator.d.ts +1 -2
  497. package/build-types/navigator/use-navigator.d.ts.map +1 -1
  498. package/build-types/private-apis.d.ts.map +1 -1
  499. package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
  500. package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
  501. package/build-types/select-control/styles/select-control-styles.d.ts +1 -1
  502. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  503. package/build-types/slot-fill/index.d.ts +3 -0
  504. package/build-types/slot-fill/index.d.ts.map +1 -1
  505. package/build-types/tabs/index.d.ts.map +1 -1
  506. package/build-types/tabs/styles.d.ts.map +1 -1
  507. package/build-types/tabs/tablist.d.ts.map +1 -1
  508. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  509. package/build-types/utils/config-values.d.ts +3 -4
  510. package/build-types/utils/element-rect.d.ts +32 -74
  511. package/build-types/utils/element-rect.d.ts.map +1 -1
  512. package/package.json +19 -20
  513. package/src/alignment-matrix-control/README.md +1 -5
  514. package/src/alignment-matrix-control/cell.tsx +3 -9
  515. package/src/alignment-matrix-control/icon.tsx +48 -30
  516. package/src/alignment-matrix-control/index.tsx +60 -50
  517. package/src/alignment-matrix-control/stories/index.story.tsx +3 -12
  518. package/src/alignment-matrix-control/styles.ts +113 -0
  519. package/src/alignment-matrix-control/types.ts +12 -1
  520. package/src/angle-picker-control/angle-circle.tsx +11 -9
  521. package/src/border-control/border-control/component.tsx +23 -16
  522. package/src/box-control/README.md +7 -0
  523. package/src/box-control/all-input-control.tsx +2 -3
  524. package/src/box-control/utils.ts +1 -1
  525. package/src/button-group/stories/index.story.tsx +10 -15
  526. package/src/card/card/component.tsx +1 -1
  527. package/src/card/styles.ts +1 -1
  528. package/src/card/test/__snapshots__/index.tsx.snap +54 -54
  529. package/src/circular-option-picker/circular-option-picker-option.tsx +16 -19
  530. package/src/circular-option-picker/circular-option-picker.tsx +26 -12
  531. package/src/circular-option-picker/types.ts +2 -2
  532. package/src/clipboard-button/index.tsx +6 -6
  533. package/src/color-palette/test/utils.ts +21 -2
  534. package/src/color-palette/utils.ts +1 -3
  535. package/src/color-picker/color-copy-button.tsx +10 -8
  536. package/src/color-picker/hex-input.tsx +6 -10
  537. package/src/color-picker/input-with-slider.tsx +6 -10
  538. package/src/color-picker/styles.ts +1 -1
  539. package/src/combobox-control/README.md +7 -0
  540. package/src/combobox-control/index.tsx +2 -0
  541. package/src/combobox-control/test/index.tsx +40 -0
  542. package/src/combobox-control/types.ts +5 -0
  543. package/src/composite/README.md +5 -24
  544. package/src/composite/{context.ts → context.tsx} +1 -2
  545. package/src/composite/group-label.tsx +30 -0
  546. package/src/composite/group.tsx +30 -0
  547. package/src/composite/hover.tsx +30 -0
  548. package/src/composite/index.tsx +71 -166
  549. package/src/composite/item.tsx +30 -0
  550. package/src/composite/legacy/index.tsx +73 -11
  551. package/src/composite/legacy/stories/index.story.tsx +2 -1
  552. package/src/composite/legacy/test/index.tsx +57 -1
  553. package/src/composite/row.tsx +30 -0
  554. package/src/composite/stories/index.story.tsx +254 -365
  555. package/src/composite/typeahead.tsx +30 -0
  556. package/src/composite/types.ts +14 -16
  557. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +10 -10
  558. package/src/custom-gradient-picker/style.scss +2 -21
  559. package/src/custom-select-control-v2/styles.ts +5 -4
  560. package/src/date-time/date/index.tsx +1 -1
  561. package/src/date-time/date/styles.ts +33 -13
  562. package/src/date-time/date/test/use-lilius.ts +417 -0
  563. package/src/date-time/date/use-lilius/index.ts +394 -0
  564. package/src/date-time/time/test/index.tsx +3 -6
  565. package/src/date-time/time/time-input/index.tsx +25 -25
  566. package/src/date-time/time/time-input/test/index.tsx +6 -7
  567. package/src/dimension-control/README.md +4 -0
  568. package/src/dimension-control/index.tsx +7 -1
  569. package/src/dimension-control/stories/index.story.tsx +7 -2
  570. package/src/dimension-control/test/__snapshots__/index.test.js.snap +16 -16
  571. package/src/dimension-control/test/index.test.js +1 -0
  572. package/src/draggable/index.tsx +4 -4
  573. package/src/dropdown-menu-v2/README.md +73 -60
  574. package/src/dropdown-menu-v2/checkbox-item.tsx +63 -0
  575. package/src/dropdown-menu-v2/context.tsx +13 -0
  576. package/src/dropdown-menu-v2/group-label.tsx +37 -0
  577. package/src/dropdown-menu-v2/group.tsx +26 -0
  578. package/src/dropdown-menu-v2/index.tsx +57 -197
  579. package/src/dropdown-menu-v2/item-help-text.tsx +23 -0
  580. package/src/dropdown-menu-v2/item-label.tsx +23 -0
  581. package/src/dropdown-menu-v2/item.tsx +50 -0
  582. package/src/dropdown-menu-v2/radio-item.tsx +70 -0
  583. package/src/dropdown-menu-v2/separator.tsx +27 -0
  584. package/src/dropdown-menu-v2/stories/index.story.tsx +295 -262
  585. package/src/dropdown-menu-v2/styles.ts +103 -67
  586. package/src/dropdown-menu-v2/test/index.tsx +159 -132
  587. package/src/dropdown-menu-v2/types.ts +7 -0
  588. package/src/dropdown-menu-v2/use-temporary-focus-visible-fix.ts +22 -0
  589. package/src/focal-point-picker/styles/focal-point-style.ts +6 -1
  590. package/src/form-toggle/style.scss +2 -1
  591. package/src/form-token-field/style.scss +2 -3
  592. package/src/form-token-field/types.ts +1 -0
  593. package/src/index.ts +6 -1
  594. package/src/input-control/index.tsx +2 -2
  595. package/src/input-control/input-base.tsx +4 -14
  596. package/src/input-control/input-prefix-wrapper.tsx +8 -4
  597. package/src/input-control/input-suffix-wrapper.tsx +4 -6
  598. package/src/input-control/reducer/reducer.ts +13 -10
  599. package/src/input-control/stories/index.story.tsx +31 -12
  600. package/src/input-control/styles/input-control-styles.tsx +42 -11
  601. package/src/input-control/types.ts +23 -7
  602. package/src/input-control/utils.ts +3 -3
  603. package/src/item-group/styles.ts +3 -3
  604. package/src/item-group/test/__snapshots__/index.js.snap +3 -3
  605. package/src/modal/index.tsx +47 -24
  606. package/src/modal/stories/index.story.tsx +8 -14
  607. package/src/modal/style.scss +34 -11
  608. package/src/modal/types.ts +6 -18
  609. package/src/modal/use-modal-exit-animation.ts +99 -0
  610. package/src/navigation/index.tsx +4 -4
  611. package/src/navigation/styles/navigation-styles.tsx +3 -3
  612. package/src/navigator/index.ts +6 -6
  613. package/src/navigator/navigator-back-button/hook.ts +1 -1
  614. package/src/navigator/navigator-button/hook.ts +1 -1
  615. package/src/navigator/navigator-provider/README.md +2 -3
  616. package/src/navigator/navigator-provider/component.tsx +97 -82
  617. package/src/navigator/navigator-screen/component.tsx +7 -0
  618. package/src/navigator/navigator-to-parent-button/component.tsx +1 -1
  619. package/src/navigator/stories/index.story.tsx +82 -253
  620. package/src/navigator/test/index.tsx +8 -0
  621. package/src/navigator/types.ts +3 -1
  622. package/src/navigator/use-navigator.ts +1 -3
  623. package/src/palette-edit/index.tsx +2 -2
  624. package/src/popover/style.scss +3 -2
  625. package/src/private-apis.ts +1 -23
  626. package/src/range-control/styles/range-control-styles.ts +8 -7
  627. package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts +2 -2
  628. package/src/resizable-box/style.scss +3 -3
  629. package/src/select-control/README.md +2 -2
  630. package/src/select-control/styles/select-control-styles.ts +5 -5
  631. package/src/slot-fill/bubbles-virtually/fill.tsx +4 -4
  632. package/src/slot-fill/index.tsx +1 -0
  633. package/src/snackbar/index.tsx +4 -4
  634. package/src/snackbar/style.scss +1 -1
  635. package/src/tab-panel/style.scss +0 -1
  636. package/src/tabs/index.tsx +8 -4
  637. package/src/tabs/styles.ts +42 -14
  638. package/src/tabs/tablist.tsx +5 -4
  639. package/src/text-control/style.scss +3 -2
  640. package/src/toggle-group-control/toggle-group-control/utils.ts +7 -7
  641. package/src/tools-panel/tools-panel/hook.ts +6 -6
  642. package/src/tooltip/style.scss +1 -0
  643. package/src/unit-control/styles/unit-control-styles.ts +2 -1
  644. package/src/utils/config-values.js +10 -9
  645. package/src/utils/element-rect.ts +93 -130
  646. package/src/utils/hooks/use-update-effect.js +4 -4
  647. package/tsconfig.tsbuildinfo +1 -1
  648. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +0 -66
  649. package/build/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +0 -1
  650. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js +0 -77
  651. package/build/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +0 -1
  652. package/build/navigator/navigator-back-button/index.js +0 -14
  653. package/build/navigator/navigator-back-button/index.js.map +0 -1
  654. package/build/navigator/navigator-button/index.js +0 -14
  655. package/build/navigator/navigator-button/index.js.map +0 -1
  656. package/build/navigator/navigator-provider/index.js +0 -14
  657. package/build/navigator/navigator-provider/index.js.map +0 -1
  658. package/build/navigator/navigator-screen/index.js +0 -14
  659. package/build/navigator/navigator-screen/index.js.map +0 -1
  660. package/build/navigator/navigator-to-parent-button/index.js +0 -14
  661. package/build/navigator/navigator-to-parent-button/index.js.map +0 -1
  662. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js +0 -63
  663. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.js.map +0 -1
  664. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js +0 -72
  665. package/build-module/alignment-matrix-control/styles/alignment-matrix-control-styles.js.map +0 -1
  666. package/build-module/navigator/navigator-back-button/index.js +0 -2
  667. package/build-module/navigator/navigator-back-button/index.js.map +0 -1
  668. package/build-module/navigator/navigator-button/index.js +0 -2
  669. package/build-module/navigator/navigator-button/index.js.map +0 -1
  670. package/build-module/navigator/navigator-provider/index.js +0 -2
  671. package/build-module/navigator/navigator-provider/index.js.map +0 -1
  672. package/build-module/navigator/navigator-screen/index.js +0 -2
  673. package/build-module/navigator/navigator-screen/index.js.map +0 -1
  674. package/build-module/navigator/navigator-to-parent-button/index.js +0 -2
  675. package/build-module/navigator/navigator-to-parent-button/index.js.map +0 -1
  676. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +0 -18
  677. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts.map +0 -1
  678. package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +0 -1
  679. package/build-types/composite/stories/utils.d.ts +0 -29
  680. package/build-types/composite/stories/utils.d.ts.map +0 -1
  681. package/build-types/navigator/navigator-back-button/index.d.ts +0 -2
  682. package/build-types/navigator/navigator-back-button/index.d.ts.map +0 -1
  683. package/build-types/navigator/navigator-button/index.d.ts +0 -2
  684. package/build-types/navigator/navigator-button/index.d.ts.map +0 -1
  685. package/build-types/navigator/navigator-provider/index.d.ts +0 -2
  686. package/build-types/navigator/navigator-provider/index.d.ts.map +0 -1
  687. package/build-types/navigator/navigator-screen/index.d.ts +0 -2
  688. package/build-types/navigator/navigator-screen/index.d.ts.map +0 -1
  689. package/build-types/navigator/navigator-to-parent-button/index.d.ts +0 -2
  690. package/build-types/navigator/navigator-to-parent-button/index.d.ts.map +0 -1
  691. package/src/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.ts +0 -77
  692. package/src/alignment-matrix-control/styles/alignment-matrix-control-styles.ts +0 -102
  693. package/src/composite/stories/utils.tsx +0 -76
  694. package/src/navigator/navigator-back-button/index.ts +0 -1
  695. package/src/navigator/navigator-button/index.ts +0 -1
  696. package/src/navigator/navigator-provider/index.ts +0 -1
  697. package/src/navigator/navigator-screen/index.ts +0 -1
  698. package/src/navigator/navigator-to-parent-button/index.ts +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_compose","_i18n","_icons","_dom","ariaHelper","_interopRequireWildcard","_button","_styleProvider","_withIgnoreImeEvents","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalContext","createContext","Set","bodyOpenClasses","Map","UnforwardedModal","props","forwardedRef","bodyOpenClassName","role","title","focusOnMount","shouldCloseOnEsc","shouldCloseOnClickOutside","isDismissible","aria","labelledby","undefined","describedby","onRequestClose","icon","closeButtonLabel","children","style","overlayClassName","className","contentLabel","onKeyDown","isFullScreen","size","headerActions","__experimentalHideHeader","ref","useRef","instanceId","useInstanceId","Modal","headingId","focusOnMountRef","useFocusOnMount","constrainedTabbingRef","useConstrainedTabbing","focusReturnRef","useFocusReturn","contentRef","childrenContainerRef","hasScrolledContent","setHasScrolledContent","useState","hasScrollableContent","setHasScrollableContent","sizeClass","isContentScrollable","useCallback","current","closestScrollContainer","getScrollContainer","useEffect","modalize","unmodalize","refOnRequestClose","dismissers","useContext","nestedDismissers","add","dismisser","delete","_bodyOpenClasses$get","theClass","oneMore","document","body","classList","oneLess","remove","useLayoutEffect","window","ResizeObserver","resizeObserver","observe","disconnect","handleEscapeKeyDown","event","code","key","defaultPrevented","preventDefault","onContentContainerScroll","_e$currentTarget$scro","scrollY","currentTarget","scrollTop","pressTarget","overlayPressHandlers","onPointerDown","target","onPointerUp","button","isSameTarget","modal","jsx","useMergeRefs","clsx","withIgnoreIMEEvents","tabIndex","jsxs","onScroll","__","id","onClick","close","label","createPortal","Provider","value","exports","forwardRef","_default"],"sources":["@wordpress/components/src/modal/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\nimport type { ForwardedRef, KeyboardEvent, RefObject, UIEvent } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreatePortal,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tforwardRef,\n\tuseLayoutEffect,\n\tcreateContext,\n\tuseContext,\n} from '@wordpress/element';\nimport {\n\tuseInstanceId,\n\tuseFocusReturn,\n\tuseFocusOnMount,\n\tuseConstrainedTabbing,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { close } from '@wordpress/icons';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport * as ariaHelper from './aria-helper';\nimport Button from '../button';\nimport StyleProvider from '../style-provider';\nimport type { ModalProps } from './types';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\ntype Dismissers = Set<\n\tRefObject< ModalProps[ 'onRequestClose' ] | undefined >\n>;\nconst ModalContext = createContext< Dismissers >( new Set() );\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map< string, number >();\n\nfunction UnforwardedModal(\n\tprops: ModalProps,\n\tforwardedRef: ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\tbodyOpenClassName = 'modal-open',\n\t\trole = 'dialog',\n\t\ttitle = null,\n\t\tfocusOnMount = true,\n\t\tshouldCloseOnEsc = true,\n\t\tshouldCloseOnClickOutside = true,\n\t\tisDismissible = true,\n\t\t/* Accessibility. */\n\t\taria = {\n\t\t\tlabelledby: undefined,\n\t\t\tdescribedby: undefined,\n\t\t},\n\t\tonRequestClose,\n\t\ticon,\n\t\tcloseButtonLabel,\n\t\tchildren,\n\t\tstyle,\n\t\toverlayClassName,\n\t\tclassName,\n\t\tcontentLabel,\n\t\tonKeyDown,\n\t\tisFullScreen = false,\n\t\tsize,\n\t\theaderActions = null,\n\t\t__experimentalHideHeader = false,\n\t} = props;\n\n\tconst ref = useRef< HTMLDivElement >();\n\n\tconst instanceId = useInstanceId( Modal );\n\tconst headingId = title\n\t\t? `components-modal-header-${ instanceId }`\n\t\t: aria.labelledby;\n\n\t// The focus hook does not support 'firstContentElement' but this is a valid\n\t// value for the Modal's focusOnMount prop. The following code ensures the focus\n\t// hook will focus the first focusable node within the element to which it is applied.\n\t// When `firstContentElement` is passed as the value of the focusOnMount prop,\n\t// the focus hook is applied to the Modal's content element.\n\t// Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n\t// focus hook will focus the first element in the Modal's **content** when\n\t// `firstContentElement` is passed.\n\tconst focusOnMountRef = useFocusOnMount(\n\t\tfocusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount\n\t);\n\tconst constrainedTabbingRef = useConstrainedTabbing();\n\tconst focusReturnRef = useFocusReturn();\n\tconst contentRef = useRef< HTMLDivElement >( null );\n\tconst childrenContainerRef = useRef< HTMLDivElement >( null );\n\n\tconst [ hasScrolledContent, setHasScrolledContent ] = useState( false );\n\tconst [ hasScrollableContent, setHasScrollableContent ] = useState( false );\n\n\tlet sizeClass;\n\tif ( isFullScreen || size === 'fill' ) {\n\t\tsizeClass = 'is-full-screen';\n\t} else if ( size ) {\n\t\tsizeClass = `has-size-${ size }`;\n\t}\n\n\t// Determines whether the Modal content is scrollable and updates the state.\n\tconst isContentScrollable = useCallback( () => {\n\t\tif ( ! contentRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst closestScrollContainer = getScrollContainer( contentRef.current );\n\n\t\tif ( contentRef.current === closestScrollContainer ) {\n\t\t\tsetHasScrollableContent( true );\n\t\t} else {\n\t\t\tsetHasScrollableContent( false );\n\t\t}\n\t}, [ contentRef ] );\n\n\t// Accessibly isolates/unisolates the modal.\n\tuseEffect( () => {\n\t\tariaHelper.modalize( ref.current );\n\t\treturn () => ariaHelper.unmodalize();\n\t}, [] );\n\n\t// Keeps a fresh ref for the subsequent effect.\n\tconst refOnRequestClose = useRef< ModalProps[ 'onRequestClose' ] >();\n\tuseEffect( () => {\n\t\trefOnRequestClose.current = onRequestClose;\n\t}, [ onRequestClose ] );\n\n\t// The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n\t// one should remain open at a time and the list enables closing prior ones.\n\tconst dismissers = useContext( ModalContext );\n\t// Used for the tracking and dismissing any nested modals.\n\tconst [ nestedDismissers ] = useState< Dismissers >( () => new Set() );\n\n\t// Updates the stack tracking open modals at this level and calls\n\t// onRequestClose for any prior and/or nested modals as applicable.\n\tuseEffect( () => {\n\t\t// add this modal instance to the dismissers set\n\t\tdismissers.add( refOnRequestClose );\n\t\t// request that all the other modals close themselves\n\t\tfor ( const dismisser of dismissers ) {\n\t\t\tif ( dismisser !== refOnRequestClose ) {\n\t\t\t\tdismisser.current?.();\n\t\t\t}\n\t\t}\n\t\treturn () => {\n\t\t\t// request that all the nested modals close themselves\n\t\t\tfor ( const dismisser of nestedDismissers ) {\n\t\t\t\tdismisser.current?.();\n\t\t\t}\n\t\t\t// remove this modal instance from the dismissers set\n\t\t\tdismissers.delete( refOnRequestClose );\n\t\t};\n\t}, [ dismissers, nestedDismissers ] );\n\n\t// Adds/removes the value of bodyOpenClassName to body element.\n\tuseEffect( () => {\n\t\tconst theClass = bodyOpenClassName;\n\t\tconst oneMore = 1 + ( bodyOpenClasses.get( theClass ) ?? 0 );\n\t\tbodyOpenClasses.set( theClass, oneMore );\n\t\tdocument.body.classList.add( bodyOpenClassName );\n\t\treturn () => {\n\t\t\tconst oneLess = bodyOpenClasses.get( theClass )! - 1;\n\t\t\tif ( oneLess === 0 ) {\n\t\t\t\tdocument.body.classList.remove( theClass );\n\t\t\t\tbodyOpenClasses.delete( theClass );\n\t\t\t} else {\n\t\t\t\tbodyOpenClasses.set( theClass, oneLess );\n\t\t\t}\n\t\t};\n\t}, [ bodyOpenClassName ] );\n\n\t// Calls the isContentScrollable callback when the Modal children container resizes.\n\tuseLayoutEffect( () => {\n\t\tif ( ! window.ResizeObserver || ! childrenContainerRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resizeObserver = new ResizeObserver( isContentScrollable );\n\t\tresizeObserver.observe( childrenContainerRef.current );\n\n\t\tisContentScrollable();\n\n\t\treturn () => {\n\t\t\tresizeObserver.disconnect();\n\t\t};\n\t}, [ isContentScrollable, childrenContainerRef ] );\n\n\tfunction handleEscapeKeyDown( event: KeyboardEvent< HTMLDivElement > ) {\n\t\tif (\n\t\t\tshouldCloseOnEsc &&\n\t\t\t( event.code === 'Escape' || event.key === 'Escape' ) &&\n\t\t\t! event.defaultPrevented\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\tif ( onRequestClose ) {\n\t\t\t\tonRequestClose( event );\n\t\t\t}\n\t\t}\n\t}\n\n\tconst onContentContainerScroll = useCallback(\n\t\t( e: UIEvent< HTMLDivElement > ) => {\n\t\t\tconst scrollY = e?.currentTarget?.scrollTop ?? -1;\n\n\t\t\tif ( ! hasScrolledContent && scrollY > 0 ) {\n\t\t\t\tsetHasScrolledContent( true );\n\t\t\t} else if ( hasScrolledContent && scrollY <= 0 ) {\n\t\t\t\tsetHasScrolledContent( false );\n\t\t\t}\n\t\t},\n\t\t[ hasScrolledContent ]\n\t);\n\n\tlet pressTarget: EventTarget | null = null;\n\tconst overlayPressHandlers: {\n\t\tonPointerDown: React.PointerEventHandler< HTMLDivElement >;\n\t\tonPointerUp: React.PointerEventHandler< HTMLDivElement >;\n\t} = {\n\t\tonPointerDown: ( event ) => {\n\t\t\tif ( event.target === event.currentTarget ) {\n\t\t\t\tpressTarget = event.target;\n\t\t\t\t// Avoids focus changing so that focus return works as expected.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t// Closes the modal with two exceptions. 1. Opening the context menu on\n\t\t// the overlay. 2. Pressing on the overlay then dragging the pointer\n\t\t// over the modal and releasing. Due to the modal being a child of the\n\t\t// overlay, such a gesture is a `click` on the overlay and cannot be\n\t\t// excepted by a `click` handler. Thus the tactic of handling\n\t\t// `pointerup` and comparing its target to that of the `pointerdown`.\n\t\tonPointerUp: ( { target, button } ) => {\n\t\t\tconst isSameTarget = target === pressTarget;\n\t\t\tpressTarget = null;\n\t\t\tif ( button === 0 && isSameTarget ) {\n\t\t\t\tonRequestClose();\n\t\t\t}\n\t\t},\n\t};\n\n\tconst modal = (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tref={ useMergeRefs( [ ref, forwardedRef ] ) }\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-modal__screen-overlay',\n\t\t\t\toverlayClassName\n\t\t\t) }\n\t\t\tonKeyDown={ withIgnoreIMEEvents( handleEscapeKeyDown ) }\n\t\t\t{ ...( shouldCloseOnClickOutside ? overlayPressHandlers : {} ) }\n\t\t>\n\t\t\t<StyleProvider document={ document }>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-modal__frame',\n\t\t\t\t\t\tsizeClass,\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\tconstrainedTabbingRef,\n\t\t\t\t\t\tfocusReturnRef,\n\t\t\t\t\t\tfocusOnMount !== 'firstContentElement'\n\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t] ) }\n\t\t\t\t\trole={ role }\n\t\t\t\t\taria-label={ contentLabel }\n\t\t\t\t\taria-labelledby={ contentLabel ? undefined : headingId }\n\t\t\t\t\taria-describedby={ aria.describedby }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx( 'components-modal__content', {\n\t\t\t\t\t\t\t'hide-header': __experimentalHideHeader,\n\t\t\t\t\t\t\t'is-scrollable': hasScrollableContent,\n\t\t\t\t\t\t\t'has-scrolled-content': hasScrolledContent,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\trole=\"document\"\n\t\t\t\t\t\tonScroll={ onContentContainerScroll }\n\t\t\t\t\t\tref={ contentRef }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\thasScrollableContent\n\t\t\t\t\t\t\t\t? __( 'Scrollable section' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttabIndex={ hasScrollableContent ? 0 : undefined }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! __experimentalHideHeader && (\n\t\t\t\t\t\t\t<div className=\"components-modal__header\">\n\t\t\t\t\t\t\t\t<div className=\"components-modal__header-heading-container\">\n\t\t\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__icon-container\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ icon }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ title && (\n\t\t\t\t\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\t\t\t\t\tid={ headingId }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__header-heading\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{ headerActions }\n\t\t\t\t\t\t\t\t{ isDismissible && (\n\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\tonClick={ onRequestClose }\n\t\t\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\tcloseButtonLabel || __( 'Close' )\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\t\t\tchildrenContainerRef,\n\t\t\t\t\t\t\t\tfocusOnMount === 'firstContentElement'\n\t\t\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t] ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</StyleProvider>\n\t\t</div>\n\t);\n\n\treturn createPortal(\n\t\t<ModalContext.Provider value={ nestedDismissers }>\n\t\t\t{ modal }\n\t\t</ModalContext.Provider>,\n\t\tdocument.body\n\t);\n}\n\n/**\n * Modals give users information and choices related to a task they’re trying to\n * accomplish. They can contain critical information, require decisions, or\n * involve multiple tasks.\n *\n * ```jsx\n * import { Button, Modal } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyModal = () => {\n * const [ isOpen, setOpen ] = useState( false );\n * const openModal = () => setOpen( true );\n * const closeModal = () => setOpen( false );\n *\n * return (\n * <>\n * <Button variant=\"secondary\" onClick={ openModal }>\n * Open Modal\n * </Button>\n * { isOpen && (\n * <Modal title=\"This is my modal\" onRequestClose={ closeModal }>\n * <Button variant=\"secondary\" onClick={ closeModal }>\n * My custom close button\n * </Button>\n * </Modal>\n * ) }\n * </>\n * );\n * };\n * ```\n */\nexport const Modal = forwardRef( UnforwardedModal );\n\nexport default Modal;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,QAAA,GAAAD,OAAA;AAWA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAKA,IAAAM,UAAA,GAAAC,uBAAA,CAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,cAAA,GAAAV,sBAAA,CAAAC,OAAA;AAEA,IAAAU,oBAAA,GAAAV,OAAA;AAAsE,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAY,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMnC,KAAK,GAAA+E,OAAA,CAAA/E,KAAA,GAAG,IAAAgF,mBAAU,EAAE/G,gBAAiB,CAAC;AAAC,IAAAgH,QAAA,GAAAF,OAAA,CAAAjI,OAAA,GAErCkD,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_compose","_i18n","_icons","_dom","ariaHelper","_interopRequireWildcard","_button","_styleProvider","_withIgnoreImeEvents","_spacer","_useModalExitAnimation","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ModalContext","createContext","Set","bodyOpenClasses","Map","UnforwardedModal","props","forwardedRef","bodyOpenClassName","role","title","focusOnMount","shouldCloseOnEsc","shouldCloseOnClickOutside","isDismissible","aria","labelledby","undefined","describedby","onRequestClose","icon","closeButtonLabel","children","style","overlayClassName","overlayClassnameProp","className","contentLabel","onKeyDown","isFullScreen","size","headerActions","__experimentalHideHeader","ref","useRef","instanceId","useInstanceId","Modal","headingId","focusOnMountRef","useFocusOnMount","constrainedTabbingRef","useConstrainedTabbing","focusReturnRef","useFocusReturn","contentRef","childrenContainerRef","hasScrolledContent","setHasScrolledContent","useState","hasScrollableContent","setHasScrollableContent","sizeClass","isContentScrollable","useCallback","current","closestScrollContainer","getScrollContainer","useEffect","modalize","unmodalize","onRequestCloseRef","dismissers","useContext","nestedDismissers","add","dismisser","delete","_bodyOpenClasses$get","theClass","oneMore","document","body","classList","oneLess","remove","closeModal","frameRef","frameStyle","overlayClassname","useModalExitAnimation","useLayoutEffect","window","ResizeObserver","resizeObserver","observe","disconnect","handleEscapeKeyDown","event","code","key","defaultPrevented","preventDefault","then","onContentContainerScroll","_e$currentTarget$scro","scrollY","currentTarget","scrollTop","pressTarget","overlayPressHandlers","onPointerDown","target","onPointerUp","button","isSameTarget","modal","jsx","useMergeRefs","clsx","withIgnoreIMEEvents","tabIndex","jsxs","onScroll","__","id","Fragment","Spacer","marginBottom","marginLeft","onClick","close","label","createPortal","Provider","value","exports","forwardRef","_default"],"sources":["@wordpress/components/src/modal/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tcreatePortal,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n\tforwardRef,\n\tuseLayoutEffect,\n\tcreateContext,\n\tuseContext,\n} from '@wordpress/element';\nimport {\n\tuseInstanceId,\n\tuseFocusReturn,\n\tuseFocusOnMount,\n\tuseConstrainedTabbing,\n\tuseMergeRefs,\n} from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\nimport { close } from '@wordpress/icons';\nimport { getScrollContainer } from '@wordpress/dom';\n\n/**\n * Internal dependencies\n */\nimport * as ariaHelper from './aria-helper';\nimport Button from '../button';\nimport StyleProvider from '../style-provider';\nimport type { ModalProps } from './types';\nimport { withIgnoreIMEEvents } from '../utils/with-ignore-ime-events';\nimport { Spacer } from '../spacer';\nimport { useModalExitAnimation } from './use-modal-exit-animation';\n\n// Used to track and dismiss the prior modal when another opens unless nested.\ntype Dismissers = Set<\n\tReact.RefObject< ModalProps[ 'onRequestClose' ] | undefined >\n>;\nconst ModalContext = createContext< Dismissers >( new Set() );\n\n// Used to track body class names applied while modals are open.\nconst bodyOpenClasses = new Map< string, number >();\n\nfunction UnforwardedModal(\n\tprops: ModalProps,\n\tforwardedRef: React.ForwardedRef< HTMLDivElement >\n) {\n\tconst {\n\t\tbodyOpenClassName = 'modal-open',\n\t\trole = 'dialog',\n\t\ttitle = null,\n\t\tfocusOnMount = true,\n\t\tshouldCloseOnEsc = true,\n\t\tshouldCloseOnClickOutside = true,\n\t\tisDismissible = true,\n\t\t/* Accessibility. */\n\t\taria = {\n\t\t\tlabelledby: undefined,\n\t\t\tdescribedby: undefined,\n\t\t},\n\t\tonRequestClose,\n\t\ticon,\n\t\tcloseButtonLabel,\n\t\tchildren,\n\t\tstyle,\n\t\toverlayClassName: overlayClassnameProp,\n\t\tclassName,\n\t\tcontentLabel,\n\t\tonKeyDown,\n\t\tisFullScreen = false,\n\t\tsize,\n\t\theaderActions = null,\n\t\t__experimentalHideHeader = false,\n\t} = props;\n\n\tconst ref = useRef< HTMLDivElement >();\n\n\tconst instanceId = useInstanceId( Modal );\n\tconst headingId = title\n\t\t? `components-modal-header-${ instanceId }`\n\t\t: aria.labelledby;\n\n\t// The focus hook does not support 'firstContentElement' but this is a valid\n\t// value for the Modal's focusOnMount prop. The following code ensures the focus\n\t// hook will focus the first focusable node within the element to which it is applied.\n\t// When `firstContentElement` is passed as the value of the focusOnMount prop,\n\t// the focus hook is applied to the Modal's content element.\n\t// Otherwise, the focus hook is applied to the Modal's ref. This ensures that the\n\t// focus hook will focus the first element in the Modal's **content** when\n\t// `firstContentElement` is passed.\n\tconst focusOnMountRef = useFocusOnMount(\n\t\tfocusOnMount === 'firstContentElement' ? 'firstElement' : focusOnMount\n\t);\n\tconst constrainedTabbingRef = useConstrainedTabbing();\n\tconst focusReturnRef = useFocusReturn();\n\tconst contentRef = useRef< HTMLDivElement >( null );\n\tconst childrenContainerRef = useRef< HTMLDivElement >( null );\n\n\tconst [ hasScrolledContent, setHasScrolledContent ] = useState( false );\n\tconst [ hasScrollableContent, setHasScrollableContent ] = useState( false );\n\n\tlet sizeClass;\n\tif ( isFullScreen || size === 'fill' ) {\n\t\tsizeClass = 'is-full-screen';\n\t} else if ( size ) {\n\t\tsizeClass = `has-size-${ size }`;\n\t}\n\n\t// Determines whether the Modal content is scrollable and updates the state.\n\tconst isContentScrollable = useCallback( () => {\n\t\tif ( ! contentRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst closestScrollContainer = getScrollContainer( contentRef.current );\n\n\t\tif ( contentRef.current === closestScrollContainer ) {\n\t\t\tsetHasScrollableContent( true );\n\t\t} else {\n\t\t\tsetHasScrollableContent( false );\n\t\t}\n\t}, [ contentRef ] );\n\n\t// Accessibly isolates/unisolates the modal.\n\tuseEffect( () => {\n\t\tariaHelper.modalize( ref.current );\n\t\treturn () => ariaHelper.unmodalize();\n\t}, [] );\n\n\t// Keeps a fresh ref for the subsequent effect.\n\tconst onRequestCloseRef = useRef< ModalProps[ 'onRequestClose' ] >();\n\tuseEffect( () => {\n\t\tonRequestCloseRef.current = onRequestClose;\n\t}, [ onRequestClose ] );\n\n\t// The list of `onRequestClose` callbacks of open (non-nested) Modals. Only\n\t// one should remain open at a time and the list enables closing prior ones.\n\tconst dismissers = useContext( ModalContext );\n\t// Used for the tracking and dismissing any nested modals.\n\tconst [ nestedDismissers ] = useState< Dismissers >( () => new Set() );\n\n\t// Updates the stack tracking open modals at this level and calls\n\t// onRequestClose for any prior and/or nested modals as applicable.\n\tuseEffect( () => {\n\t\t// add this modal instance to the dismissers set\n\t\tdismissers.add( onRequestCloseRef );\n\t\t// request that all the other modals close themselves\n\t\tfor ( const dismisser of dismissers ) {\n\t\t\tif ( dismisser !== onRequestCloseRef ) {\n\t\t\t\tdismisser.current?.();\n\t\t\t}\n\t\t}\n\t\treturn () => {\n\t\t\t// request that all the nested modals close themselves\n\t\t\tfor ( const dismisser of nestedDismissers ) {\n\t\t\t\tdismisser.current?.();\n\t\t\t}\n\t\t\t// remove this modal instance from the dismissers set\n\t\t\tdismissers.delete( onRequestCloseRef );\n\t\t};\n\t}, [ dismissers, nestedDismissers ] );\n\n\t// Adds/removes the value of bodyOpenClassName to body element.\n\tuseEffect( () => {\n\t\tconst theClass = bodyOpenClassName;\n\t\tconst oneMore = 1 + ( bodyOpenClasses.get( theClass ) ?? 0 );\n\t\tbodyOpenClasses.set( theClass, oneMore );\n\t\tdocument.body.classList.add( bodyOpenClassName );\n\t\treturn () => {\n\t\t\tconst oneLess = bodyOpenClasses.get( theClass )! - 1;\n\t\t\tif ( oneLess === 0 ) {\n\t\t\t\tdocument.body.classList.remove( theClass );\n\t\t\t\tbodyOpenClasses.delete( theClass );\n\t\t\t} else {\n\t\t\t\tbodyOpenClasses.set( theClass, oneLess );\n\t\t\t}\n\t\t};\n\t}, [ bodyOpenClassName ] );\n\n\tconst { closeModal, frameRef, frameStyle, overlayClassname } =\n\t\tuseModalExitAnimation();\n\n\t// Calls the isContentScrollable callback when the Modal children container resizes.\n\tuseLayoutEffect( () => {\n\t\tif ( ! window.ResizeObserver || ! childrenContainerRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst resizeObserver = new ResizeObserver( isContentScrollable );\n\t\tresizeObserver.observe( childrenContainerRef.current );\n\n\t\tisContentScrollable();\n\n\t\treturn () => {\n\t\t\tresizeObserver.disconnect();\n\t\t};\n\t}, [ isContentScrollable, childrenContainerRef ] );\n\n\tfunction handleEscapeKeyDown(\n\t\tevent: React.KeyboardEvent< HTMLDivElement >\n\t) {\n\t\tif (\n\t\t\tshouldCloseOnEsc &&\n\t\t\t( event.code === 'Escape' || event.key === 'Escape' ) &&\n\t\t\t! event.defaultPrevented\n\t\t) {\n\t\t\tevent.preventDefault();\n\t\t\tcloseModal().then( () => onRequestClose( event ) );\n\t\t}\n\t}\n\n\tconst onContentContainerScroll = useCallback(\n\t\t( e: React.UIEvent< HTMLDivElement > ) => {\n\t\t\tconst scrollY = e?.currentTarget?.scrollTop ?? -1;\n\n\t\t\tif ( ! hasScrolledContent && scrollY > 0 ) {\n\t\t\t\tsetHasScrolledContent( true );\n\t\t\t} else if ( hasScrolledContent && scrollY <= 0 ) {\n\t\t\t\tsetHasScrolledContent( false );\n\t\t\t}\n\t\t},\n\t\t[ hasScrolledContent ]\n\t);\n\n\tlet pressTarget: EventTarget | null = null;\n\tconst overlayPressHandlers: {\n\t\tonPointerDown: React.PointerEventHandler< HTMLDivElement >;\n\t\tonPointerUp: React.PointerEventHandler< HTMLDivElement >;\n\t} = {\n\t\tonPointerDown: ( event ) => {\n\t\t\tif ( event.target === event.currentTarget ) {\n\t\t\t\tpressTarget = event.target;\n\t\t\t\t// Avoids focus changing so that focus return works as expected.\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\t// Closes the modal with two exceptions. 1. Opening the context menu on\n\t\t// the overlay. 2. Pressing on the overlay then dragging the pointer\n\t\t// over the modal and releasing. Due to the modal being a child of the\n\t\t// overlay, such a gesture is a `click` on the overlay and cannot be\n\t\t// excepted by a `click` handler. Thus the tactic of handling\n\t\t// `pointerup` and comparing its target to that of the `pointerdown`.\n\t\tonPointerUp: ( { target, button } ) => {\n\t\t\tconst isSameTarget = target === pressTarget;\n\t\t\tpressTarget = null;\n\t\t\tif ( button === 0 && isSameTarget ) {\n\t\t\t\tcloseModal().then( () => onRequestClose() );\n\t\t\t}\n\t\t},\n\t};\n\n\tconst modal = (\n\t\t// eslint-disable-next-line jsx-a11y/no-static-element-interactions\n\t\t<div\n\t\t\tref={ useMergeRefs( [ ref, forwardedRef ] ) }\n\t\t\tclassName={ clsx(\n\t\t\t\t'components-modal__screen-overlay',\n\t\t\t\toverlayClassname,\n\t\t\t\toverlayClassnameProp\n\t\t\t) }\n\t\t\tonKeyDown={ withIgnoreIMEEvents( handleEscapeKeyDown ) }\n\t\t\t{ ...( shouldCloseOnClickOutside ? overlayPressHandlers : {} ) }\n\t\t>\n\t\t\t<StyleProvider document={ document }>\n\t\t\t\t<div\n\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t'components-modal__frame',\n\t\t\t\t\t\tsizeClass,\n\t\t\t\t\t\tclassName\n\t\t\t\t\t) }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...frameStyle,\n\t\t\t\t\t\t...style,\n\t\t\t\t\t} }\n\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\tframeRef,\n\t\t\t\t\t\tconstrainedTabbingRef,\n\t\t\t\t\t\tfocusReturnRef,\n\t\t\t\t\t\tfocusOnMount !== 'firstContentElement'\n\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t: null,\n\t\t\t\t\t] ) }\n\t\t\t\t\trole={ role }\n\t\t\t\t\taria-label={ contentLabel }\n\t\t\t\t\taria-labelledby={ contentLabel ? undefined : headingId }\n\t\t\t\t\taria-describedby={ aria.describedby }\n\t\t\t\t\ttabIndex={ -1 }\n\t\t\t\t\tonKeyDown={ onKeyDown }\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ clsx( 'components-modal__content', {\n\t\t\t\t\t\t\t'hide-header': __experimentalHideHeader,\n\t\t\t\t\t\t\t'is-scrollable': hasScrollableContent,\n\t\t\t\t\t\t\t'has-scrolled-content': hasScrolledContent,\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t\trole=\"document\"\n\t\t\t\t\t\tonScroll={ onContentContainerScroll }\n\t\t\t\t\t\tref={ contentRef }\n\t\t\t\t\t\taria-label={\n\t\t\t\t\t\t\thasScrollableContent\n\t\t\t\t\t\t\t\t? __( 'Scrollable section' )\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttabIndex={ hasScrollableContent ? 0 : undefined }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ ! __experimentalHideHeader && (\n\t\t\t\t\t\t\t<div className=\"components-modal__header\">\n\t\t\t\t\t\t\t\t<div className=\"components-modal__header-heading-container\">\n\t\t\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__icon-container\"\n\t\t\t\t\t\t\t\t\t\t\taria-hidden\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ icon }\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t\t{ title && (\n\t\t\t\t\t\t\t\t\t\t<h1\n\t\t\t\t\t\t\t\t\t\t\tid={ headingId }\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"components-modal__header-heading\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{ headerActions }\n\t\t\t\t\t\t\t\t{ isDismissible && (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<Spacer\n\t\t\t\t\t\t\t\t\t\t\tmarginBottom={ 0 }\n\t\t\t\t\t\t\t\t\t\t\tmarginLeft={ 3 }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t\t\t\t\t\t\tonClick={ (\n\t\t\t\t\t\t\t\t\t\t\t\tevent: React.MouseEvent< HTMLButtonElement >\n\t\t\t\t\t\t\t\t\t\t\t) =>\n\t\t\t\t\t\t\t\t\t\t\t\tcloseModal().then( () =>\n\t\t\t\t\t\t\t\t\t\t\t\t\tonRequestClose( event )\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\ticon={ close }\n\t\t\t\t\t\t\t\t\t\t\tlabel={\n\t\t\t\t\t\t\t\t\t\t\t\tcloseButtonLabel ||\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Close' )\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tref={ useMergeRefs( [\n\t\t\t\t\t\t\t\tchildrenContainerRef,\n\t\t\t\t\t\t\t\tfocusOnMount === 'firstContentElement'\n\t\t\t\t\t\t\t\t\t? focusOnMountRef\n\t\t\t\t\t\t\t\t\t: null,\n\t\t\t\t\t\t\t] ) }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</StyleProvider>\n\t\t</div>\n\t);\n\n\treturn createPortal(\n\t\t<ModalContext.Provider value={ nestedDismissers }>\n\t\t\t{ modal }\n\t\t</ModalContext.Provider>,\n\t\tdocument.body\n\t);\n}\n\n/**\n * Modals give users information and choices related to a task they’re trying to\n * accomplish. They can contain critical information, require decisions, or\n * involve multiple tasks.\n *\n * ```jsx\n * import { Button, Modal } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyModal = () => {\n * const [ isOpen, setOpen ] = useState( false );\n * const openModal = () => setOpen( true );\n * const closeModal = () => setOpen( false );\n *\n * return (\n * <>\n * <Button variant=\"secondary\" onClick={ openModal }>\n * Open Modal\n * </Button>\n * { isOpen && (\n * <Modal title=\"This is my modal\" onRequestClose={ closeModal }>\n * <Button variant=\"secondary\" onClick={ closeModal }>\n * My custom close button\n * </Button>\n * </Modal>\n * ) }\n * </>\n * );\n * };\n * ```\n */\nexport const Modal = forwardRef( UnforwardedModal );\n\nexport default Modal;\n"],"mappings":";;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAWA,IAAAE,QAAA,GAAAF,OAAA;AAOA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AAKA,IAAAM,UAAA,GAAAC,uBAAA,CAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAT,sBAAA,CAAAC,OAAA;AACA,IAAAS,cAAA,GAAAV,sBAAA,CAAAC,OAAA;AAEA,IAAAU,oBAAA,GAAAV,OAAA;AACA,IAAAW,OAAA,GAAAX,OAAA;AACA,IAAAY,sBAAA,GAAAZ,OAAA;AAAmE,IAAAa,WAAA,GAAAb,OAAA;A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;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMnC,KAAK,GAAAyF,OAAA,CAAAzF,KAAA,GAAG,IAAA0F,mBAAU,EAAE1H,gBAAiB,CAAC;AAAC,IAAA2H,QAAA,GAAAF,OAAA,CAAA5I,OAAA,GAErCmD,KAAK","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/modal/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tAriaRole,\n\tCSSProperties,\n\tReactNode,\n\tKeyboardEventHandler,\n\tKeyboardEvent,\n\tSyntheticEvent,\n} from 'react';\n\n/**\n * WordPress dependencies\n */\nimport type { useFocusOnMount } from '@wordpress/compose';\n\nexport type ModalProps = {\n\taria?: {\n\t\t/**\n\t\t * If this property is added, it will be added to the modal content\n\t\t * `div` as `aria-describedby`.\n\t\t */\n\t\tdescribedby?: string;\n\t\t/**\n\t\t * If this property is added, it will be added to the modal content\n\t\t * `div` as `aria-labelledby`. Use this when you are rendering the title\n\t\t * yourself within the modal's content area instead of using the `title`\n\t\t * prop. This ensures the title is usable by assistive technology.\n\t\t *\n\t\t * Titles are required for accessibility reasons, see `contentLabel` and\n\t\t * `title` for other ways to provide a title.\n\t\t */\n\t\tlabelledby?: string;\n\t};\n\t/**\n\t * Class name added to the body element when the modal is open.\n\t *\n\t * @default 'modal-open'\n\t */\n\tbodyOpenClassName?: string;\n\t/**\n\t * The children elements.\n\t */\n\tchildren: ReactNode;\n\t/**\n\t * If this property is added, it will an additional class name to the modal\n\t * content `div`.\n\t */\n\tclassName?: string;\n\t/**\n\t * Label on the close button.\n\t *\n\t * @default `__( 'Close' )`\n\t */\n\tcloseButtonLabel?: string;\n\t/**\n\t * If this property is added, it will be added to the modal content `div` as\n\t * `aria-label`.\n\t *\n\t * Titles are required for accessibility reasons, see `aria.labelledby` and\n\t * `title` for other ways to provide a title.\n\t */\n\tcontentLabel?: string;\n\t/**\n\t * If this property is true, it will focus the first tabbable element\n\t * rendered in the modal.\n\t *\n\t * @default true\n\t */\n\tfocusOnMount?:\n\t\t| Parameters< typeof useFocusOnMount >[ 0 ]\n\t\t| 'firstContentElement';\n\t/**\n\t * Elements that are injected into the modal header to the left of the close button (if rendered).\n\t * Hidden if `__experimentalHideHeader` is `true`.\n\t *\n\t * @default null\n\t */\n\theaderActions?: ReactNode;\n\n\t/**\n\t * If this property is added, an icon will be added before the title.\n\t */\n\ticon?: JSX.Element;\n\t/**\n\t * If this property is set to false, the modal will not display a close icon\n\t * and cannot be dismissed.\n\t *\n\t * @default true\n\t */\n\tisDismissible?: boolean;\n\t/**\n\t * This property when set to `true` will render a full screen modal.\n\t *\n\t * @default false\n\t */\n\tisFullScreen?: boolean;\n\t/**\n\t * If this property is added it will cause the modal to render at a preset\n\t * width, or expand to fill the screen. This prop will be ignored if\n\t * `isFullScreen` is set to `true`.\n\t *\n\t * Note: `Modal`'s width can also be controlled by adjusting the width of the\n\t * modal's contents, or via CSS using the `style` prop.\n\t */\n\tsize?: 'small' | 'medium' | 'large' | 'fill';\n\t/**\n\t * Handle the key down on the modal frame `div`.\n\t */\n\tonKeyDown?: KeyboardEventHandler< HTMLDivElement >;\n\t/**\n\t * This function is called to indicate that the modal should be closed.\n\t */\n\tonRequestClose: (\n\t\tevent?: KeyboardEvent< HTMLDivElement > | SyntheticEvent\n\t) => void;\n\t/**\n\t * If this property is added, it will an additional class name to the modal\n\t * overlay `div`.\n\t */\n\toverlayClassName?: string;\n\t/**\n\t * If this property is added, it will override the default role of the\n\t * modal.\n\t *\n\t * @default 'dialog'\n\t */\n\trole?: AriaRole;\n\t/**\n\t * If this property is added, it will determine whether the modal requests\n\t * to close when a mouse click occurs outside of the modal content.\n\t *\n\t * @default true\n\t */\n\tshouldCloseOnClickOutside?: boolean;\n\t/**\n\t * If this property is added, it will determine whether the modal requests\n\t * to close when the escape key is pressed.\n\t *\n\t * @default true\n\t */\n\tshouldCloseOnEsc?: boolean;\n\t/**\n\t * If this property is added, it will be added to the modal frame `div`.\n\t */\n\tstyle?: CSSProperties;\n\t/**\n\t * This property is used as the modal header's title.\n\t *\n\t * Titles are required for accessibility reasons, see `aria.labelledby` and\n\t * `contentLabel` for other ways to provide a title.\n\t */\n\ttitle?: string;\n\t/**\n\t * When set to `true`, the Modal's header (including the icon, title and\n\t * close button) will not be rendered.\n\t *\n\t * _Warning_: This property is still experimental. “Experimental” means this\n\t * is an early implementation subject to drastic and breaking changes.\n\t *\n\t * @default false\n\t */\n\t__experimentalHideHeader?: boolean;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/modal/types.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport type { useFocusOnMount } from '@wordpress/compose';\n\nexport type ModalProps = {\n\taria?: {\n\t\t/**\n\t\t * If this property is added, it will be added to the modal content\n\t\t * `div` as `aria-describedby`.\n\t\t */\n\t\tdescribedby?: string;\n\t\t/**\n\t\t * If this property is added, it will be added to the modal content\n\t\t * `div` as `aria-labelledby`. Use this when you are rendering the title\n\t\t * yourself within the modal's content area instead of using the `title`\n\t\t * prop. This ensures the title is usable by assistive technology.\n\t\t *\n\t\t * Titles are required for accessibility reasons, see `contentLabel` and\n\t\t * `title` for other ways to provide a title.\n\t\t */\n\t\tlabelledby?: string;\n\t};\n\t/**\n\t * Class name added to the body element when the modal is open.\n\t *\n\t * @default 'modal-open'\n\t */\n\tbodyOpenClassName?: string;\n\t/**\n\t * The children elements.\n\t */\n\tchildren: React.ReactNode;\n\t/**\n\t * If this property is added, it will an additional class name to the modal\n\t * content `div`.\n\t */\n\tclassName?: string;\n\t/**\n\t * Label on the close button.\n\t *\n\t * @default `__( 'Close' )`\n\t */\n\tcloseButtonLabel?: string;\n\t/**\n\t * If this property is added, it will be added to the modal content `div` as\n\t * `aria-label`.\n\t *\n\t * Titles are required for accessibility reasons, see `aria.labelledby` and\n\t * `title` for other ways to provide a title.\n\t */\n\tcontentLabel?: string;\n\t/**\n\t * If this property is true, it will focus the first tabbable element\n\t * rendered in the modal.\n\t *\n\t * @default true\n\t */\n\tfocusOnMount?:\n\t\t| Parameters< typeof useFocusOnMount >[ 0 ]\n\t\t| 'firstContentElement';\n\t/**\n\t * Elements that are injected into the modal header to the left of the close button (if rendered).\n\t * Hidden if `__experimentalHideHeader` is `true`.\n\t *\n\t * @default null\n\t */\n\theaderActions?: React.ReactNode;\n\n\t/**\n\t * If this property is added, an icon will be added before the title.\n\t */\n\ticon?: JSX.Element;\n\t/**\n\t * If this property is set to false, the modal will not display a close icon\n\t * and cannot be dismissed.\n\t *\n\t * @default true\n\t */\n\tisDismissible?: boolean;\n\t/**\n\t * This property when set to `true` will render a full screen modal.\n\t *\n\t * @default false\n\t */\n\tisFullScreen?: boolean;\n\t/**\n\t * If this property is added it will cause the modal to render at a preset\n\t * width, or expand to fill the screen. This prop will be ignored if\n\t * `isFullScreen` is set to `true`.\n\t *\n\t * Note: `Modal`'s width can also be controlled by adjusting the width of the\n\t * modal's contents, or via CSS using the `style` prop.\n\t */\n\tsize?: 'small' | 'medium' | 'large' | 'fill';\n\t/**\n\t * Handle the key down on the modal frame `div`.\n\t */\n\tonKeyDown?: React.KeyboardEventHandler< HTMLDivElement >;\n\t/**\n\t * This function is called to indicate that the modal should be closed.\n\t */\n\tonRequestClose: (\n\t\tevent?: React.KeyboardEvent< HTMLDivElement > | React.SyntheticEvent\n\t) => void;\n\t/**\n\t * If this property is added, it will an additional class name to the modal\n\t * overlay `div`.\n\t */\n\toverlayClassName?: string;\n\t/**\n\t * If this property is added, it will override the default role of the\n\t * modal.\n\t *\n\t * @default 'dialog'\n\t */\n\trole?: React.AriaRole;\n\t/**\n\t * If this property is added, it will determine whether the modal requests\n\t * to close when a mouse click occurs outside of the modal content.\n\t *\n\t * @default true\n\t */\n\tshouldCloseOnClickOutside?: boolean;\n\t/**\n\t * If this property is added, it will determine whether the modal requests\n\t * to close when the escape key is pressed.\n\t *\n\t * @default true\n\t */\n\tshouldCloseOnEsc?: boolean;\n\t/**\n\t * If this property is added, it will be added to the modal frame `div`.\n\t */\n\tstyle?: React.CSSProperties;\n\t/**\n\t * This property is used as the modal header's title.\n\t *\n\t * Titles are required for accessibility reasons, see `aria.labelledby` and\n\t * `contentLabel` for other ways to provide a title.\n\t */\n\ttitle?: string;\n\t/**\n\t * When set to `true`, the Modal's header (including the icon, title and\n\t * close button) will not be rendered.\n\t *\n\t * _Warning_: This property is still experimental. “Experimental” means this\n\t * is an early implementation subject to drastic and breaking changes.\n\t *\n\t * @default false\n\t */\n\t__experimentalHideHeader?: boolean;\n};\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useModalExitAnimation = useModalExitAnimation;
8
+ var _compose = require("@wordpress/compose");
9
+ var _element = require("@wordpress/element");
10
+ var _utils = require("../utils");
11
+ var _warning = _interopRequireDefault(require("@wordpress/warning"));
12
+ /**
13
+ * WordPress dependencies
14
+ */
15
+
16
+ /**
17
+ * Internal dependencies
18
+ */
19
+
20
+ // Animation duration (ms) extracted to JS in order to be used on a setTimeout.
21
+ const FRAME_ANIMATION_DURATION = _utils.CONFIG.transitionDuration;
22
+ const FRAME_ANIMATION_DURATION_NUMBER = Number.parseInt(_utils.CONFIG.transitionDuration);
23
+ const EXIT_ANIMATION_NAME = 'components-modal__disappear-animation';
24
+ function useModalExitAnimation() {
25
+ const frameRef = (0, _element.useRef)();
26
+ const [isAnimatingOut, setIsAnimatingOut] = (0, _element.useState)(false);
27
+ const isReducedMotion = (0, _compose.useReducedMotion)();
28
+ const closeModal = (0, _element.useCallback)(() => new Promise(closeModalResolve => {
29
+ // Grab a "stable" reference of the frame element, since
30
+ // the value held by the react ref might change at runtime.
31
+ const frameEl = frameRef.current;
32
+ if (isReducedMotion) {
33
+ closeModalResolve();
34
+ return;
35
+ }
36
+ if (!frameEl) {
37
+ globalThis.SCRIPT_DEBUG === true ? (0, _warning.default)("wp.components.Modal: the Modal component can't be closed with an exit animation because of a missing reference to the modal frame element.") : void 0;
38
+ closeModalResolve();
39
+ return;
40
+ }
41
+ let handleAnimationEnd;
42
+ const startAnimation = () => new Promise(animationResolve => {
43
+ handleAnimationEnd = e => {
44
+ if (e.animationName === EXIT_ANIMATION_NAME) {
45
+ animationResolve();
46
+ }
47
+ };
48
+ frameEl.addEventListener('animationend', handleAnimationEnd);
49
+ setIsAnimatingOut(true);
50
+ });
51
+ const animationTimeout = () => new Promise(timeoutResolve => {
52
+ setTimeout(() => timeoutResolve(),
53
+ // Allow an extra 20% of the animation duration for the
54
+ // animationend event to fire, in case the animation frame is
55
+ // slightly delayes by some other events in the event loop.
56
+ FRAME_ANIMATION_DURATION_NUMBER * 1.2);
57
+ });
58
+ Promise.race([startAnimation(), animationTimeout()]).then(() => {
59
+ if (handleAnimationEnd) {
60
+ frameEl.removeEventListener('animationend', handleAnimationEnd);
61
+ }
62
+ setIsAnimatingOut(false);
63
+ closeModalResolve();
64
+ });
65
+ }), [isReducedMotion]);
66
+ return {
67
+ overlayClassname: isAnimatingOut ? 'is-animating-out' : undefined,
68
+ frameRef,
69
+ frameStyle: {
70
+ '--modal-frame-animation-duration': `${FRAME_ANIMATION_DURATION}`
71
+ },
72
+ closeModal
73
+ };
74
+ }
75
+ //# sourceMappingURL=use-modal-exit-animation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_compose","require","_element","_utils","_warning","_interopRequireDefault","FRAME_ANIMATION_DURATION","CONFIG","transitionDuration","FRAME_ANIMATION_DURATION_NUMBER","Number","parseInt","EXIT_ANIMATION_NAME","useModalExitAnimation","frameRef","useRef","isAnimatingOut","setIsAnimatingOut","useState","isReducedMotion","useReducedMotion","closeModal","useCallback","Promise","closeModalResolve","frameEl","current","globalThis","SCRIPT_DEBUG","warning","handleAnimationEnd","startAnimation","animationResolve","e","animationName","addEventListener","animationTimeout","timeoutResolve","setTimeout","race","then","removeEventListener","overlayClassname","undefined","frameStyle"],"sources":["@wordpress/components/src/modal/use-modal-exit-animation.ts"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useReducedMotion } from '@wordpress/compose';\nimport { useCallback, useRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { CONFIG } from '../utils';\nimport warning from '@wordpress/warning';\n\n// Animation duration (ms) extracted to JS in order to be used on a setTimeout.\nconst FRAME_ANIMATION_DURATION = CONFIG.transitionDuration;\nconst FRAME_ANIMATION_DURATION_NUMBER = Number.parseInt(\n\tCONFIG.transitionDuration\n);\n\nconst EXIT_ANIMATION_NAME = 'components-modal__disappear-animation';\n\nexport function useModalExitAnimation() {\n\tconst frameRef = useRef< HTMLDivElement >();\n\tconst [ isAnimatingOut, setIsAnimatingOut ] = useState( false );\n\tconst isReducedMotion = useReducedMotion();\n\n\tconst closeModal = useCallback(\n\t\t() =>\n\t\t\tnew Promise< void >( ( closeModalResolve ) => {\n\t\t\t\t// Grab a \"stable\" reference of the frame element, since\n\t\t\t\t// the value held by the react ref might change at runtime.\n\t\t\t\tconst frameEl = frameRef.current;\n\n\t\t\t\tif ( isReducedMotion ) {\n\t\t\t\t\tcloseModalResolve();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif ( ! frameEl ) {\n\t\t\t\t\twarning(\n\t\t\t\t\t\t\"wp.components.Modal: the Modal component can't be closed with an exit animation because of a missing reference to the modal frame element.\"\n\t\t\t\t\t);\n\t\t\t\t\tcloseModalResolve();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet handleAnimationEnd:\n\t\t\t\t\t| undefined\n\t\t\t\t\t| ( ( e: AnimationEvent ) => void );\n\n\t\t\t\tconst startAnimation = () =>\n\t\t\t\t\tnew Promise< void >( ( animationResolve ) => {\n\t\t\t\t\t\thandleAnimationEnd = ( e: AnimationEvent ) => {\n\t\t\t\t\t\t\tif ( e.animationName === EXIT_ANIMATION_NAME ) {\n\t\t\t\t\t\t\t\tanimationResolve();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tframeEl.addEventListener(\n\t\t\t\t\t\t\t'animationend',\n\t\t\t\t\t\t\thandleAnimationEnd\n\t\t\t\t\t\t);\n\t\t\t\t\t\tsetIsAnimatingOut( true );\n\t\t\t\t\t} );\n\t\t\t\tconst animationTimeout = () =>\n\t\t\t\t\tnew Promise< void >( ( timeoutResolve ) => {\n\t\t\t\t\t\tsetTimeout(\n\t\t\t\t\t\t\t() => timeoutResolve(),\n\t\t\t\t\t\t\t// Allow an extra 20% of the animation duration for the\n\t\t\t\t\t\t\t// animationend event to fire, in case the animation frame is\n\t\t\t\t\t\t\t// slightly delayes by some other events in the event loop.\n\t\t\t\t\t\t\tFRAME_ANIMATION_DURATION_NUMBER * 1.2\n\t\t\t\t\t\t);\n\t\t\t\t\t} );\n\n\t\t\t\tPromise.race( [ startAnimation(), animationTimeout() ] ).then(\n\t\t\t\t\t() => {\n\t\t\t\t\t\tif ( handleAnimationEnd ) {\n\t\t\t\t\t\t\tframeEl.removeEventListener(\n\t\t\t\t\t\t\t\t'animationend',\n\t\t\t\t\t\t\t\thandleAnimationEnd\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsetIsAnimatingOut( false );\n\t\t\t\t\t\tcloseModalResolve();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t} ),\n\t\t[ isReducedMotion ]\n\t);\n\n\treturn {\n\t\toverlayClassname: isAnimatingOut ? 'is-animating-out' : undefined,\n\t\tframeRef,\n\t\tframeStyle: {\n\t\t\t'--modal-frame-animation-duration': `${ FRAME_ANIMATION_DURATION }`,\n\t\t},\n\t\tcloseModal,\n\t};\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,G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,CACT,MAAMD,cAAc,CAAC,CAAC;MACtB;MACA;MACA;MACA5B,+BAA+B,GAAG,GACnC,CAAC;IACF,CAAE,CAAC;IAEJc,OAAO,CAACgB,IAAI,CAAE,CAAER,cAAc,CAAC,CAAC,EAAEK,gBAAgB,CAAC,CAAC,CAAG,CAAC,CAACI,IAAI,CAC5D,MAAM;MACL,IAAKV,kBAAkB,EAAG;QACzBL,OAAO,CAACgB,mBAAmB,CAC1B,cAAc,EACdX,kBACD,CAAC;MACF;MACAb,iBAAiB,CAAE,KAAM,CAAC;MAC1BO,iBAAiB,CAAC,CAAC;IACpB,CACD,CAAC;EACF,CAAE,CAAC,EACJ,CAAEL,eAAe,CAClB,CAAC;EAED,OAAO;IACNuB,gBAAgB,EAAE1B,cAAc,GAAG,kBAAkB,GAAG2B,SAAS;IACjE7B,QAAQ;IACR8B,UAAU,EAAE;MACX,kCAAkC,EAAG,GAAGtC,wBAA0B;IACnE,CAAC;IACDe;EACD,CAAC;AACF","ignoreList":[]}
@@ -92,10 +92,10 @@ function Navigation({
92
92
  };
93
93
 
94
94
  // Used to prevent the sliding animation on mount
95
- const isMounted = (0, _element.useRef)(false);
95
+ const isMountedRef = (0, _element.useRef)(false);
96
96
  (0, _element.useEffect)(() => {
97
- if (!isMounted.current) {
98
- isMounted.current = true;
97
+ if (!isMountedRef.current) {
98
+ isMountedRef.current = true;
99
99
  }
100
100
  }, []);
101
101
  (0, _element.useEffect)(() => {
@@ -121,7 +121,7 @@ function Navigation({
121
121
  className: classes,
122
122
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
123
123
  className: animateClassName ? (0, _clsx.default)({
124
- [animateClassName]: isMounted.current && slideOrigin
124
+ [animateClassName]: isMountedRef.current && slideOrigin
125
125
  }) : undefined,
126
126
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_context.NavigationContext.Provider, {
127
127
  value: context,
@@ -1 +1 @@
1
- {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_i18n","_animate","_constants","_context","_navigationStyles","_useCreateNavigationTree","_jsxRuntime","noop","Navigation","activeItem","activeMenu","ROOT_MENU","children","className","onActivateMenu","menu","setMenu","useState","slideOrigin","setSlideOrigin","navigationTree","useCreateNavigationTree","defaultSlideOrigin","isRTL","setActiveMenu","menuId","slideInOrigin","getMenu","isMounted","useRef","useEffect","current","context","classes","clsx","animateClassName","getAnimateClassName","type","origin","jsx","NavigationUI","undefined","NavigationContext","Provider","value","_default","exports","default"],"sources":["@wordpress/components/src/navigation/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { getAnimateClassName } from '../animate';\nimport { ROOT_MENU } from './constants';\nimport { NavigationContext } from './context';\nimport { NavigationUI } from './styles/navigation-styles';\nimport { useCreateNavigationTree } from './use-create-navigation-tree';\n\nimport type {\n\tNavigationProps,\n\tNavigationContext as NavigationContextType,\n} from './types';\n\nconst noop = () => {};\n\n/**\n * Render a navigation list with optional groupings and hierarchy.\n *\n * @deprecated Use `Navigator` instead.\n *\n * ```jsx\n * import {\n * __experimentalNavigation as Navigation,\n * __experimentalNavigationGroup as NavigationGroup,\n * __experimentalNavigationItem as NavigationItem,\n * __experimentalNavigationMenu as NavigationMenu,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n * <Navigation>\n * <NavigationMenu title=\"Home\">\n * <NavigationGroup title=\"Group 1\">\n * <NavigationItem item=\"item-1\" title=\"Item 1\" />\n * <NavigationItem item=\"item-2\" title=\"Item 2\" />\n * </NavigationGroup>\n * <NavigationGroup title=\"Group 2\">\n * <NavigationItem\n * item=\"item-3\"\n * navigateToMenu=\"category\"\n * title=\"Category\"\n * />\n * </NavigationGroup>\n * </NavigationMenu>\n *\n * <NavigationMenu\n * backButtonLabel=\"Home\"\n * menu=\"category\"\n * parentMenu=\"root\"\n * title=\"Category\"\n * >\n * <NavigationItem badge=\"1\" item=\"child-1\" title=\"Child 1\" />\n * <NavigationItem item=\"child-2\" title=\"Child 2\" />\n * </NavigationMenu>\n * </Navigation>\n * );\n * ```\n */\nexport function Navigation( {\n\tactiveItem,\n\tactiveMenu = ROOT_MENU,\n\tchildren,\n\tclassName,\n\tonActivateMenu = noop,\n}: NavigationProps ) {\n\tconst [ menu, setMenu ] = useState( activeMenu );\n\tconst [ slideOrigin, setSlideOrigin ] = useState< 'left' | 'right' >();\n\tconst navigationTree = useCreateNavigationTree();\n\tconst defaultSlideOrigin = isRTL() ? 'right' : 'left';\n\n\tconst setActiveMenu: NavigationContextType[ 'setActiveMenu' ] = (\n\t\tmenuId,\n\t\tslideInOrigin = defaultSlideOrigin\n\t) => {\n\t\tif ( ! navigationTree.getMenu( menuId ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetSlideOrigin( slideInOrigin );\n\t\tsetMenu( menuId );\n\t\tonActivateMenu( menuId );\n\t};\n\n\t// Used to prevent the sliding animation on mount\n\tconst isMounted = useRef( false );\n\tuseEffect( () => {\n\t\tif ( ! isMounted.current ) {\n\t\t\tisMounted.current = true;\n\t\t}\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( activeMenu !== menu ) {\n\t\t\tsetActiveMenu( activeMenu );\n\t\t}\n\t\t// Ignore exhaustive-deps here, as it would require either a larger refactor or some questionable workarounds.\n\t\t// See https://github.com/WordPress/gutenberg/pull/41612 for context.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ activeMenu ] );\n\n\tconst context = {\n\t\tactiveItem,\n\t\tactiveMenu: menu,\n\t\tsetActiveMenu,\n\t\tnavigationTree,\n\t};\n\n\tconst classes = clsx( 'components-navigation', className );\n\tconst animateClassName = getAnimateClassName( {\n\t\ttype: 'slide-in',\n\t\torigin: slideOrigin,\n\t} );\n\n\treturn (\n\t\t<NavigationUI className={ classes }>\n\t\t\t<div\n\t\t\t\tkey={ menu }\n\t\t\t\tclassName={\n\t\t\t\t\tanimateClassName\n\t\t\t\t\t\t? clsx( {\n\t\t\t\t\t\t\t\t[ animateClassName ]:\n\t\t\t\t\t\t\t\t\tisMounted.current && slideOrigin,\n\t\t\t\t\t\t } )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<NavigationContext.Provider value={ context }>\n\t\t\t\t\t{ children }\n\t\t\t\t</NavigationContext.Provider>\n\t\t\t</div>\n\t\t</NavigationUI>\n\t);\n}\n\nexport default Navigation;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AACA,IAAAO,wBAAA,GAAAP,OAAA;AAAuE,IAAAQ,WAAA,GAAAR,OAAA;AAlBvE;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAYA,MAAMS,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,UAAUA,CAAE;EAC3BC,UAAU;EACVC,UAAU,GAAGC,oBAAS;EACtBC,QAAQ;EACRC,SAAS;EACTC,cAAc,GAAGP;AACD,CAAC,EAAG;EACpB,MAAM,CAAEQ,IAAI,EAAEC,OAAO,CAAE,GAAG,IAAAC,iBAAQ,EAAEP,UAAW,CAAC;EAChD,MAAM,CAAEQ,WAAW,EAAEC,cAAc,CAAE,GAAG,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AEC1B,SAAS,EACRsB,gBAAgB,GACb,IAAAD,aAAI,EAAE;QACN,CAAEC,gBAAgB,GACjBP,SAAS,CAACG,OAAO,IAAIb;MACtB,CAAE,CAAC,GACHuB,SACH;MAAA7B,QAAA,eAED,IAAAN,WAAA,CAAAiC,GAAA,EAACpC,QAAA,CAAAuC,iBAAiB,CAACC,QAAQ;QAACC,KAAK,EAAGZ,OAAS;QAAApB,QAAA,EAC1CA;MAAQ,CACiB;IAAC,GAZvBG,IAaF;EAAC,CACO,CAAC;AAEjB;AAAC,IAAA8B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcvC,UAAU","ignoreList":[]}
1
+ {"version":3,"names":["_clsx","_interopRequireDefault","require","_element","_i18n","_animate","_constants","_context","_navigationStyles","_useCreateNavigationTree","_jsxRuntime","noop","Navigation","activeItem","activeMenu","ROOT_MENU","children","className","onActivateMenu","menu","setMenu","useState","slideOrigin","setSlideOrigin","navigationTree","useCreateNavigationTree","defaultSlideOrigin","isRTL","setActiveMenu","menuId","slideInOrigin","getMenu","isMountedRef","useRef","useEffect","current","context","classes","clsx","animateClassName","getAnimateClassName","type","origin","jsx","NavigationUI","undefined","NavigationContext","Provider","value","_default","exports","default"],"sources":["@wordpress/components/src/navigation/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { useEffect, useRef, useState } from '@wordpress/element';\nimport { isRTL } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { getAnimateClassName } from '../animate';\nimport { ROOT_MENU } from './constants';\nimport { NavigationContext } from './context';\nimport { NavigationUI } from './styles/navigation-styles';\nimport { useCreateNavigationTree } from './use-create-navigation-tree';\n\nimport type {\n\tNavigationProps,\n\tNavigationContext as NavigationContextType,\n} from './types';\n\nconst noop = () => {};\n\n/**\n * Render a navigation list with optional groupings and hierarchy.\n *\n * @deprecated Use `Navigator` instead.\n *\n * ```jsx\n * import {\n * __experimentalNavigation as Navigation,\n * __experimentalNavigationGroup as NavigationGroup,\n * __experimentalNavigationItem as NavigationItem,\n * __experimentalNavigationMenu as NavigationMenu,\n * } from '@wordpress/components';\n *\n * const MyNavigation = () => (\n * <Navigation>\n * <NavigationMenu title=\"Home\">\n * <NavigationGroup title=\"Group 1\">\n * <NavigationItem item=\"item-1\" title=\"Item 1\" />\n * <NavigationItem item=\"item-2\" title=\"Item 2\" />\n * </NavigationGroup>\n * <NavigationGroup title=\"Group 2\">\n * <NavigationItem\n * item=\"item-3\"\n * navigateToMenu=\"category\"\n * title=\"Category\"\n * />\n * </NavigationGroup>\n * </NavigationMenu>\n *\n * <NavigationMenu\n * backButtonLabel=\"Home\"\n * menu=\"category\"\n * parentMenu=\"root\"\n * title=\"Category\"\n * >\n * <NavigationItem badge=\"1\" item=\"child-1\" title=\"Child 1\" />\n * <NavigationItem item=\"child-2\" title=\"Child 2\" />\n * </NavigationMenu>\n * </Navigation>\n * );\n * ```\n */\nexport function Navigation( {\n\tactiveItem,\n\tactiveMenu = ROOT_MENU,\n\tchildren,\n\tclassName,\n\tonActivateMenu = noop,\n}: NavigationProps ) {\n\tconst [ menu, setMenu ] = useState( activeMenu );\n\tconst [ slideOrigin, setSlideOrigin ] = useState< 'left' | 'right' >();\n\tconst navigationTree = useCreateNavigationTree();\n\tconst defaultSlideOrigin = isRTL() ? 'right' : 'left';\n\n\tconst setActiveMenu: NavigationContextType[ 'setActiveMenu' ] = (\n\t\tmenuId,\n\t\tslideInOrigin = defaultSlideOrigin\n\t) => {\n\t\tif ( ! navigationTree.getMenu( menuId ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetSlideOrigin( slideInOrigin );\n\t\tsetMenu( menuId );\n\t\tonActivateMenu( menuId );\n\t};\n\n\t// Used to prevent the sliding animation on mount\n\tconst isMountedRef = useRef( false );\n\tuseEffect( () => {\n\t\tif ( ! isMountedRef.current ) {\n\t\t\tisMountedRef.current = true;\n\t\t}\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tif ( activeMenu !== menu ) {\n\t\t\tsetActiveMenu( activeMenu );\n\t\t}\n\t\t// Ignore exhaustive-deps here, as it would require either a larger refactor or some questionable workarounds.\n\t\t// See https://github.com/WordPress/gutenberg/pull/41612 for context.\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ activeMenu ] );\n\n\tconst context = {\n\t\tactiveItem,\n\t\tactiveMenu: menu,\n\t\tsetActiveMenu,\n\t\tnavigationTree,\n\t};\n\n\tconst classes = clsx( 'components-navigation', className );\n\tconst animateClassName = getAnimateClassName( {\n\t\ttype: 'slide-in',\n\t\torigin: slideOrigin,\n\t} );\n\n\treturn (\n\t\t<NavigationUI className={ classes }>\n\t\t\t<div\n\t\t\t\tkey={ menu }\n\t\t\t\tclassName={\n\t\t\t\t\tanimateClassName\n\t\t\t\t\t\t? clsx( {\n\t\t\t\t\t\t\t\t[ animateClassName ]:\n\t\t\t\t\t\t\t\t\tisMountedRef.current && slideOrigin,\n\t\t\t\t\t\t } )\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<NavigationContext.Provider value={ context }>\n\t\t\t\t\t{ children }\n\t\t\t\t</NavigationContext.Provider>\n\t\t\t</div>\n\t\t</NavigationUI>\n\t);\n}\n\nexport default Navigation;\n"],"mappings":";;;;;;;;AAGA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAKA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AACA,IAAAO,wBAAA,GAAAP,OAAA;AAAuE,IAAAQ,WAAA,GAAAR,OAAA;AAlBvE;AACA;AACA;;AAGA;AACA;AACA;;AAIA;AACA;AACA;;AAYA,MAAMS,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;;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