@wordpress/components 25.7.0 → 25.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (607) hide show
  1. package/CHANGELOG.md +55 -1
  2. package/build/animation/index.js +6 -0
  3. package/build/animation/index.js.map +1 -1
  4. package/build/border-control/border-control-dropdown/component.js +1 -1
  5. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  6. package/build/border-control/styles.js +20 -20
  7. package/build/border-control/styles.js.map +1 -1
  8. package/build/box-control/unit-control.js +1 -1
  9. package/build/box-control/unit-control.js.map +1 -1
  10. package/build/button/index.js +9 -1
  11. package/build/button/index.js.map +1 -1
  12. package/build/button/types.js.map +1 -1
  13. package/build/circular-option-picker/circular-option-picker-actions.js +53 -0
  14. package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -0
  15. package/build/circular-option-picker/circular-option-picker-context.js +14 -0
  16. package/build/circular-option-picker/circular-option-picker-context.js.map +1 -0
  17. package/build/circular-option-picker/circular-option-picker-option-group.js +26 -0
  18. package/build/circular-option-picker/circular-option-picker-option-group.js.map +1 -0
  19. package/build/circular-option-picker/circular-option-picker-option.js +122 -0
  20. package/build/circular-option-picker/circular-option-picker-option.js.map +1 -0
  21. package/build/circular-option-picker/circular-option-picker.js +172 -0
  22. package/build/circular-option-picker/circular-option-picker.js.map +1 -0
  23. package/build/circular-option-picker/index.js +29 -137
  24. package/build/circular-option-picker/index.js.map +1 -1
  25. package/build/circular-option-picker/types.js.map +1 -1
  26. package/build/color-palette/index.js +58 -19
  27. package/build/color-palette/index.js.map +1 -1
  28. package/build/color-palette/types.js.map +1 -1
  29. package/build/combobox-control/index.js +0 -3
  30. package/build/combobox-control/index.js.map +1 -1
  31. package/build/composite/index.js.map +1 -1
  32. package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  33. package/build/date-time/time/timezone.js +1 -1
  34. package/build/date-time/time/timezone.js.map +1 -1
  35. package/build/dropdown/index.js +11 -23
  36. package/build/dropdown/index.js.map +1 -1
  37. package/build/dropdown/types.js.map +1 -1
  38. package/build/dropdown-menu/index.js +7 -1
  39. package/build/dropdown-menu/index.js.map +1 -1
  40. package/build/dropdown-menu/types.js.map +1 -1
  41. package/build/dropdown-menu-v2/styles.js +16 -16
  42. package/build/dropdown-menu-v2/styles.js.map +1 -1
  43. package/build/duotone-picker/color-list-picker/index.js +18 -3
  44. package/build/duotone-picker/color-list-picker/index.js.map +1 -1
  45. package/build/duotone-picker/duotone-picker.js +33 -1
  46. package/build/duotone-picker/duotone-picker.js.map +1 -1
  47. package/build/duotone-picker/types.js.map +1 -1
  48. package/build/focusable-iframe/index.js +0 -4
  49. package/build/focusable-iframe/index.js.map +1 -1
  50. package/build/focusable-iframe/types.js +6 -0
  51. package/build/focusable-iframe/types.js.map +1 -0
  52. package/build/form-token-field/index.js +6 -2
  53. package/build/form-token-field/index.js.map +1 -1
  54. package/build/form-token-field/types.js.map +1 -1
  55. package/build/gradient-picker/index.js +57 -15
  56. package/build/gradient-picker/index.js.map +1 -1
  57. package/build/gradient-picker/types.js.map +1 -1
  58. package/build/higher-order/navigate-regions/index.js.map +1 -1
  59. package/build/higher-order/with-focus-outside/index.js +1 -2
  60. package/build/higher-order/with-focus-outside/index.js.map +1 -1
  61. package/build/higher-order/with-spoken-messages/index.js.map +1 -1
  62. package/build/index.js +6 -0
  63. package/build/index.js.map +1 -1
  64. package/build/input-control/styles/input-control-styles.js +22 -22
  65. package/build/input-control/styles/input-control-styles.js.map +1 -1
  66. package/build/mobile/bottom-sheet/index.native.js +1 -0
  67. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  68. package/build/mobile/global-styles-context/index.native.js.map +1 -1
  69. package/build/navigation/use-navigation-tree-nodes.js.map +1 -1
  70. package/build/notice/index.js +19 -7
  71. package/build/notice/index.js.map +1 -1
  72. package/build/palette-edit/styles.js +10 -10
  73. package/build/palette-edit/styles.js.map +1 -1
  74. package/build/placeholder/index.js.map +1 -1
  75. package/build/popover/index.js +37 -83
  76. package/build/popover/index.js.map +1 -1
  77. package/build/popover/types.js.map +1 -1
  78. package/build/popover/utils.js +9 -41
  79. package/build/popover/utils.js.map +1 -1
  80. package/build/search-control/index.js +12 -3
  81. package/build/search-control/index.js.map +1 -1
  82. package/build/search-control/types.js.map +1 -1
  83. package/build/text/styles.js +7 -7
  84. package/build/text/styles.js.map +1 -1
  85. package/build/toggle-group-control/toggle-group-control/as-button-group.js +30 -45
  86. package/build/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  87. package/build/toggle-group-control/toggle-group-control/as-radio-group.js +40 -41
  88. package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  89. package/build/toggle-group-control/toggle-group-control/component.js +10 -5
  90. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  91. package/build/toggle-group-control/toggle-group-control/styles.js +9 -16
  92. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  93. package/build/toggle-group-control/toggle-group-control/utils.js +44 -0
  94. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -0
  95. package/build/toggle-group-control/toggle-group-control-option-base/component.js +36 -17
  96. package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  97. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +10 -8
  98. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  99. package/build/toggle-group-control/types.js.map +1 -1
  100. package/build/toolbar/toolbar/index.js +7 -1
  101. package/build/toolbar/toolbar/index.js.map +1 -1
  102. package/build/toolbar/toolbar-dropdown-menu/index.js +1 -3
  103. package/build/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  104. package/build/toolbar/toolbar-group/index.js +16 -12
  105. package/build/toolbar/toolbar-group/index.js.map +1 -1
  106. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js +0 -2
  107. package/build/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  108. package/build/toolbar/toolbar-group/toolbar-group-container.js +3 -1
  109. package/build/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  110. package/build/toolbar/toolbar-group/types.js +6 -0
  111. package/build/toolbar/toolbar-group/types.js.map +1 -0
  112. package/build/toolbar/toolbar-item/index.js +1 -1
  113. package/build/toolbar/toolbar-item/index.js.map +1 -1
  114. package/build/tooltip/index.js +51 -225
  115. package/build/tooltip/index.js.map +1 -1
  116. package/build/tooltip/types.js +6 -0
  117. package/build/tooltip/types.js.map +1 -0
  118. package/build/ui/context/context-connect.js.map +1 -1
  119. package/build/ui/context/wordpress-component.js.map +1 -1
  120. package/build/unit-control/index.js.map +1 -1
  121. package/build/unit-control/styles/unit-control-styles.js +7 -7
  122. package/build/unit-control/styles/unit-control-styles.js.map +1 -1
  123. package/build/utils/colors-values.js +1 -1
  124. package/build/utils/colors-values.js.map +1 -1
  125. package/build/utils/use-deprecated-props.js.map +1 -1
  126. package/build-module/animation/index.js +1 -1
  127. package/build-module/animation/index.js.map +1 -1
  128. package/build-module/border-control/border-control-dropdown/component.js +1 -1
  129. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  130. package/build-module/border-control/styles.js +20 -20
  131. package/build-module/border-control/styles.js.map +1 -1
  132. package/build-module/box-control/unit-control.js +1 -1
  133. package/build-module/box-control/unit-control.js.map +1 -1
  134. package/build-module/button/index.js +9 -1
  135. package/build-module/button/index.js.map +1 -1
  136. package/build-module/button/types.js.map +1 -1
  137. package/build-module/circular-option-picker/circular-option-picker-actions.js +44 -0
  138. package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -0
  139. package/build-module/circular-option-picker/circular-option-picker-context.js +11 -0
  140. package/build-module/circular-option-picker/circular-option-picker-context.js.map +1 -0
  141. package/build-module/circular-option-picker/circular-option-picker-option-group.js +23 -0
  142. package/build-module/circular-option-picker/circular-option-picker-option-group.js.map +1 -0
  143. package/build-module/circular-option-picker/circular-option-picker-option.js +114 -0
  144. package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -0
  145. package/build-module/circular-option-picker/circular-option-picker.js +165 -0
  146. package/build-module/circular-option-picker/circular-option-picker.js.map +1 -0
  147. package/build-module/circular-option-picker/index.js +4 -132
  148. package/build-module/circular-option-picker/index.js.map +1 -1
  149. package/build-module/circular-option-picker/types.js.map +1 -1
  150. package/build-module/color-palette/index.js +58 -19
  151. package/build-module/color-palette/index.js.map +1 -1
  152. package/build-module/color-palette/types.js.map +1 -1
  153. package/build-module/combobox-control/index.js +0 -3
  154. package/build-module/combobox-control/index.js.map +1 -1
  155. package/build-module/composite/index.js +2 -0
  156. package/build-module/composite/index.js.map +1 -1
  157. package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
  158. package/build-module/date-time/time/timezone.js +1 -1
  159. package/build-module/date-time/time/timezone.js.map +1 -1
  160. package/build-module/dropdown/index.js +12 -24
  161. package/build-module/dropdown/index.js.map +1 -1
  162. package/build-module/dropdown/types.js.map +1 -1
  163. package/build-module/dropdown-menu/index.js +7 -1
  164. package/build-module/dropdown-menu/index.js.map +1 -1
  165. package/build-module/dropdown-menu/types.js.map +1 -1
  166. package/build-module/dropdown-menu-v2/styles.js +16 -16
  167. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  168. package/build-module/duotone-picker/color-list-picker/index.js +18 -3
  169. package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
  170. package/build-module/duotone-picker/duotone-picker.js +33 -1
  171. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  172. package/build-module/duotone-picker/types.js.map +1 -1
  173. package/build-module/focusable-iframe/index.js +2 -3
  174. package/build-module/focusable-iframe/index.js.map +1 -1
  175. package/build-module/focusable-iframe/types.js +2 -0
  176. package/build-module/focusable-iframe/types.js.map +1 -0
  177. package/build-module/form-token-field/index.js +6 -2
  178. package/build-module/form-token-field/index.js.map +1 -1
  179. package/build-module/form-token-field/types.js.map +1 -1
  180. package/build-module/gradient-picker/index.js +57 -15
  181. package/build-module/gradient-picker/index.js.map +1 -1
  182. package/build-module/gradient-picker/types.js.map +1 -1
  183. package/build-module/higher-order/navigate-regions/index.js.map +1 -1
  184. package/build-module/higher-order/with-focus-outside/index.js +1 -3
  185. package/build-module/higher-order/with-focus-outside/index.js.map +1 -1
  186. package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
  187. package/build-module/index.js +1 -1
  188. package/build-module/index.js.map +1 -1
  189. package/build-module/input-control/styles/input-control-styles.js +23 -23
  190. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  191. package/build-module/mobile/bottom-sheet/index.native.js +1 -0
  192. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  193. package/build-module/mobile/global-styles-context/index.native.js.map +1 -1
  194. package/build-module/navigation/use-navigation-tree-nodes.js.map +1 -1
  195. package/build-module/notice/index.js +19 -7
  196. package/build-module/notice/index.js.map +1 -1
  197. package/build-module/palette-edit/styles.js +10 -10
  198. package/build-module/palette-edit/styles.js.map +1 -1
  199. package/build-module/placeholder/index.js.map +1 -1
  200. package/build-module/popover/index.js +38 -84
  201. package/build-module/popover/index.js.map +1 -1
  202. package/build-module/popover/types.js.map +1 -1
  203. package/build-module/popover/utils.js +8 -39
  204. package/build-module/popover/utils.js.map +1 -1
  205. package/build-module/search-control/index.js +12 -3
  206. package/build-module/search-control/index.js.map +1 -1
  207. package/build-module/search-control/types.js.map +1 -1
  208. package/build-module/text/styles.js +7 -7
  209. package/build-module/text/styles.js.map +1 -1
  210. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js +32 -47
  211. package/build-module/toggle-group-control/toggle-group-control/as-button-group.js.map +1 -1
  212. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +41 -42
  213. package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
  214. package/build-module/toggle-group-control/toggle-group-control/component.js +10 -6
  215. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  216. package/build-module/toggle-group-control/toggle-group-control/styles.js +8 -14
  217. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  218. package/build-module/toggle-group-control/toggle-group-control/utils.js +42 -0
  219. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -0
  220. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +35 -16
  221. package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
  222. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +8 -7
  223. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  224. package/build-module/toggle-group-control/types.js.map +1 -1
  225. package/build-module/toolbar/toolbar/index.js +7 -1
  226. package/build-module/toolbar/toolbar/index.js.map +1 -1
  227. package/build-module/toolbar/toolbar-dropdown-menu/index.js +5 -3
  228. package/build-module/toolbar/toolbar-dropdown-menu/index.js.map +1 -1
  229. package/build-module/toolbar/toolbar-group/index.js +15 -12
  230. package/build-module/toolbar/toolbar-group/index.js.map +1 -1
  231. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js +0 -2
  232. package/build-module/toolbar/toolbar-group/toolbar-group-collapsed.js.map +1 -1
  233. package/build-module/toolbar/toolbar-group/toolbar-group-container.js +3 -1
  234. package/build-module/toolbar/toolbar-group/toolbar-group-container.js.map +1 -1
  235. package/build-module/toolbar/toolbar-group/types.js +2 -0
  236. package/build-module/toolbar/toolbar-group/types.js.map +1 -0
  237. package/build-module/toolbar/toolbar-item/index.js +1 -1
  238. package/build-module/toolbar/toolbar-item/index.js.map +1 -1
  239. package/build-module/tooltip/index.js +53 -224
  240. package/build-module/tooltip/index.js.map +1 -1
  241. package/build-module/tooltip/types.js +2 -0
  242. package/build-module/tooltip/types.js.map +1 -0
  243. package/build-module/ui/context/context-connect.js.map +1 -1
  244. package/build-module/ui/context/wordpress-component.js.map +1 -1
  245. package/build-module/unit-control/index.js.map +1 -1
  246. package/build-module/unit-control/styles/unit-control-styles.js +7 -7
  247. package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
  248. package/build-module/utils/colors-values.js +1 -1
  249. package/build-module/utils/colors-values.js.map +1 -1
  250. package/build-module/utils/use-deprecated-props.js.map +1 -1
  251. package/build-style/style-rtl.css +35 -63
  252. package/build-style/style.css +35 -63
  253. package/build-types/animation/index.d.ts +1 -1
  254. package/build-types/animation/index.d.ts.map +1 -1
  255. package/build-types/base-control/hooks.d.ts +1 -1
  256. package/build-types/border-box-control/border-box-control/component.d.ts +1 -1
  257. package/build-types/border-box-control/border-box-control/hook.d.ts +46 -46
  258. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +51 -51
  259. package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +1 -1
  260. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +46 -46
  261. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +46 -46
  262. package/build-types/border-box-control/stories/index.story.d.ts +2 -2
  263. package/build-types/border-control/border-control/hook.d.ts +45 -45
  264. package/build-types/border-control/border-control-dropdown/hook.d.ts +45 -45
  265. package/build-types/border-control/border-control-style-picker/hook.d.ts +45 -45
  266. package/build-types/border-control/stories/index.story.d.ts +6 -6
  267. package/build-types/box-control/styles/box-control-styles.d.ts +1 -1
  268. package/build-types/button/deprecated.d.ts +16 -22
  269. package/build-types/button/deprecated.d.ts.map +1 -1
  270. package/build-types/button/index.d.ts.map +1 -1
  271. package/build-types/button/types.d.ts +0 -4
  272. package/build-types/button/types.d.ts.map +1 -1
  273. package/build-types/card/card/hook.d.ts +46 -46
  274. package/build-types/card/card-body/hook.d.ts +46 -46
  275. package/build-types/card/card-divider/hook.d.ts +47 -47
  276. package/build-types/card/card-footer/hook.d.ts +46 -46
  277. package/build-types/card/card-header/hook.d.ts +46 -46
  278. package/build-types/card/card-media/hook.d.ts +46 -46
  279. package/build-types/card/stories/index.story.d.ts +2 -2
  280. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +7 -0
  281. package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -0
  282. package/build-types/circular-option-picker/circular-option-picker-context.d.ts +7 -0
  283. package/build-types/circular-option-picker/circular-option-picker-context.d.ts.map +1 -0
  284. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts +7 -0
  285. package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts.map +1 -0
  286. package/build-types/circular-option-picker/circular-option-picker-option.d.ts +4 -0
  287. package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -0
  288. package/build-types/circular-option-picker/circular-option-picker.d.ts +11 -0
  289. package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -0
  290. package/build-types/circular-option-picker/index.d.ts +5 -56
  291. package/build-types/circular-option-picker/index.d.ts.map +1 -1
  292. package/build-types/circular-option-picker/stories/index.story.d.ts +3 -1
  293. package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
  294. package/build-types/circular-option-picker/test/index.d.ts +2 -0
  295. package/build-types/circular-option-picker/test/index.d.ts.map +1 -0
  296. package/build-types/circular-option-picker/types.d.ts +53 -1
  297. package/build-types/circular-option-picker/types.d.ts.map +1 -1
  298. package/build-types/color-palette/index.d.ts +3 -19
  299. package/build-types/color-palette/index.d.ts.map +1 -1
  300. package/build-types/color-palette/stories/index.story.d.ts +3 -36
  301. package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
  302. package/build-types/color-palette/styles.d.ts +1 -1
  303. package/build-types/color-palette/types.d.ts +31 -1
  304. package/build-types/color-palette/types.d.ts.map +1 -1
  305. package/build-types/color-picker/component.d.ts +1 -1
  306. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  307. package/build-types/color-picker/styles.d.ts +6 -6
  308. package/build-types/combobox-control/index.d.ts.map +1 -1
  309. package/build-types/combobox-control/stories/index.story.d.ts +2 -2
  310. package/build-types/composite/index.d.ts +14 -1
  311. package/build-types/composite/index.d.ts.map +1 -1
  312. package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -2
  313. package/build-types/date-time/date/styles.d.ts +3 -3
  314. package/build-types/date-time/date-time/styles.d.ts +2 -2
  315. package/build-types/date-time/time/styles.d.ts +12 -12
  316. package/build-types/dropdown/index.d.ts.map +1 -1
  317. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  318. package/build-types/dropdown/types.d.ts +12 -4
  319. package/build-types/dropdown/types.d.ts.map +1 -1
  320. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  321. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  322. package/build-types/dropdown-menu/types.d.ts +22 -5
  323. package/build-types/dropdown-menu/types.d.ts.map +1 -1
  324. package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
  325. package/build-types/duotone-picker/duotone-picker.d.ts +1 -1
  326. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  327. package/build-types/duotone-picker/types.d.ts +31 -1
  328. package/build-types/duotone-picker/types.d.ts.map +1 -1
  329. package/build-types/elevation/hook.d.ts +46 -46
  330. package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
  331. package/build-types/flex/flex/hook.d.ts +46 -46
  332. package/build-types/flex/flex-block/hook.d.ts +46 -46
  333. package/build-types/flex/flex-item/hook.d.ts +46 -46
  334. package/build-types/focal-point-picker/stories/index.story.d.ts +8 -8
  335. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
  336. package/build-types/focusable-iframe/index.d.ts +4 -5
  337. package/build-types/focusable-iframe/index.d.ts.map +1 -1
  338. package/build-types/focusable-iframe/types.d.ts +8 -0
  339. package/build-types/focusable-iframe/types.d.ts.map +1 -0
  340. package/build-types/font-size-picker/styles.d.ts +2 -2
  341. package/build-types/form-token-field/index.d.ts.map +1 -1
  342. package/build-types/form-token-field/types.d.ts +6 -0
  343. package/build-types/form-token-field/types.d.ts.map +1 -1
  344. package/build-types/gradient-picker/index.d.ts +1 -1
  345. package/build-types/gradient-picker/index.d.ts.map +1 -1
  346. package/build-types/gradient-picker/stories/index.story.d.ts +3 -36
  347. package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
  348. package/build-types/gradient-picker/types.d.ts +31 -1
  349. package/build-types/gradient-picker/types.d.ts.map +1 -1
  350. package/build-types/grid/hook.d.ts +46 -46
  351. package/build-types/h-stack/component.d.ts +1 -1
  352. package/build-types/h-stack/hook.d.ts +46 -46
  353. package/build-types/heading/hook.d.ts +45 -45
  354. package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
  355. package/build-types/higher-order/with-focus-outside/index.d.ts +1 -0
  356. package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
  357. package/build-types/higher-order/with-focus-outside/test/index.d.ts +2 -0
  358. package/build-types/higher-order/with-focus-outside/test/index.d.ts.map +1 -0
  359. package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
  360. package/build-types/index.d.ts +1 -1
  361. package/build-types/index.d.ts.map +1 -1
  362. package/build-types/isolated-event-container/test/index.d.ts +2 -0
  363. package/build-types/isolated-event-container/test/index.d.ts.map +1 -0
  364. package/build-types/item-group/item/hook.d.ts +46 -46
  365. package/build-types/item-group/item-group/hook.d.ts +46 -46
  366. package/build-types/menu-item/index.d.ts +1 -1
  367. package/build-types/menu-item/stories/index.story.d.ts +4 -4
  368. package/build-types/navigable-container/menu.d.ts +1 -1
  369. package/build-types/navigation/back-button/index.d.ts +1 -1
  370. package/build-types/navigation/styles/navigation-styles.d.ts +5 -3
  371. package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
  372. package/build-types/navigator/navigator-back-button/component.d.ts +2 -3
  373. package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
  374. package/build-types/navigator/navigator-back-button/hook.d.ts +53 -54
  375. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  376. package/build-types/navigator/navigator-button/component.d.ts +2 -3
  377. package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
  378. package/build-types/navigator/navigator-button/hook.d.ts +53 -54
  379. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  380. package/build-types/navigator/navigator-to-parent-button/component.d.ts +2 -3
  381. package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
  382. package/build-types/notice/index.d.ts.map +1 -1
  383. package/build-types/number-control/index.d.ts +3 -3
  384. package/build-types/number-control/stories/index.story.d.ts +3 -3
  385. package/build-types/palette-edit/styles.d.ts +4 -4
  386. package/build-types/palette-edit/styles.d.ts.map +1 -1
  387. package/build-types/placeholder/index.d.ts.map +1 -1
  388. package/build-types/popover/index.d.ts +1 -1
  389. package/build-types/popover/index.d.ts.map +1 -1
  390. package/build-types/popover/overlay-middlewares.d.ts +1 -1
  391. package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
  392. package/build-types/popover/types.d.ts +0 -4
  393. package/build-types/popover/types.d.ts.map +1 -1
  394. package/build-types/popover/utils.d.ts +2 -6
  395. package/build-types/popover/utils.d.ts.map +1 -1
  396. package/build-types/range-control/index.d.ts +1 -1
  397. package/build-types/range-control/styles/range-control-styles.d.ts +3 -3
  398. package/build-types/resizable-box/index.d.ts +1 -1
  399. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  400. package/build-types/resizable-box/resize-tooltip/label.d.ts +1 -1
  401. package/build-types/resizable-box/stories/index.story.d.ts +2 -2
  402. package/build-types/scrollable/hook.d.ts +46 -46
  403. package/build-types/search-control/index.d.ts +4 -2
  404. package/build-types/search-control/index.d.ts.map +1 -1
  405. package/build-types/search-control/stories/index.story.d.ts +8 -4
  406. package/build-types/search-control/stories/index.story.d.ts.map +1 -1
  407. package/build-types/search-control/types.d.ts +12 -0
  408. package/build-types/search-control/types.d.ts.map +1 -1
  409. package/build-types/spacer/hook.d.ts +46 -46
  410. package/build-types/spinner/index.d.ts +1 -1
  411. package/build-types/surface/hook.d.ts +46 -46
  412. package/build-types/text/hook.d.ts +46 -46
  413. package/build-types/text/styles.d.ts.map +1 -1
  414. package/build-types/text-control/index.d.ts +3 -3
  415. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  416. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +2 -4
  417. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
  418. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +2 -4
  419. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
  420. package/build-types/toggle-group-control/toggle-group-control/component.d.ts +2 -2
  421. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  422. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +1 -5
  423. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  424. package/build-types/toggle-group-control/toggle-group-control/utils.d.ts +18 -0
  425. package/build-types/toggle-group-control/toggle-group-control/utils.d.ts.map +1 -0
  426. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
  427. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +5 -1
  428. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  429. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +1 -0
  430. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  431. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  432. package/build-types/toggle-group-control/types.d.ts +13 -24
  433. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  434. package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
  435. package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
  436. package/build-types/toolbar/toolbar-button/index.d.ts +16 -22
  437. package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
  438. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +3 -1
  439. package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
  440. package/build-types/toolbar/toolbar-group/index.d.ts +10 -14
  441. package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
  442. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +3 -5
  443. package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
  444. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +7 -5
  445. package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
  446. package/build-types/toolbar/toolbar-group/types.d.ts +77 -0
  447. package/build-types/toolbar/toolbar-group/types.d.ts.map +1 -0
  448. package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
  449. package/build-types/tools-panel/tools-panel/hook.d.ts +46 -46
  450. package/build-types/tools-panel/tools-panel-header/hook.d.ts +46 -46
  451. package/build-types/tools-panel/tools-panel-item/hook.d.ts +46 -46
  452. package/build-types/tooltip/index.d.ts +8 -5
  453. package/build-types/tooltip/index.d.ts.map +1 -1
  454. package/build-types/tooltip/stories/index.story.d.ts +13 -0
  455. package/build-types/tooltip/stories/index.story.d.ts.map +1 -0
  456. package/build-types/tooltip/test/index.d.ts +2 -0
  457. package/build-types/tooltip/test/index.d.ts.map +1 -0
  458. package/build-types/tooltip/test/utils/index.d.ts +11 -0
  459. package/build-types/tooltip/test/utils/index.d.ts.map +1 -0
  460. package/build-types/tooltip/types.d.ts +61 -0
  461. package/build-types/tooltip/types.d.ts.map +1 -0
  462. package/build-types/truncate/hook.d.ts +46 -46
  463. package/build-types/ui/tooltip/content.d.ts +1 -1
  464. package/build-types/unit-control/index.d.ts +1 -1
  465. package/build-types/unit-control/index.d.ts.map +1 -1
  466. package/build-types/unit-control/styles/unit-control-styles.d.ts +3 -3
  467. package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
  468. package/build-types/unit-control/unit-select-control.d.ts +1 -1
  469. package/build-types/utils/use-deprecated-props.d.ts +1 -1
  470. package/build-types/v-stack/component.d.ts +1 -1
  471. package/build-types/v-stack/hook.d.ts +46 -46
  472. package/build-types/v-stack/stories/index.story.d.ts +2 -2
  473. package/package.json +19 -19
  474. package/src/animation/index.tsx +1 -0
  475. package/src/border-control/border-control/README.md +2 -2
  476. package/src/border-control/border-control-dropdown/component.tsx +1 -1
  477. package/src/border-control/styles.ts +7 -7
  478. package/src/border-control/test/index.js +79 -69
  479. package/src/box-control/unit-control.tsx +1 -1
  480. package/src/button/README.md +0 -6
  481. package/src/button/index.tsx +9 -1
  482. package/src/button/test/index.tsx +19 -0
  483. package/src/button/types.ts +0 -4
  484. package/src/circular-option-picker/README.md +14 -0
  485. package/src/circular-option-picker/circular-option-picker-actions.tsx +60 -0
  486. package/src/circular-option-picker/circular-option-picker-context.tsx +12 -0
  487. package/src/circular-option-picker/circular-option-picker-option-group.tsx +34 -0
  488. package/src/circular-option-picker/circular-option-picker-option.tsx +139 -0
  489. package/src/circular-option-picker/circular-option-picker.tsx +202 -0
  490. package/src/circular-option-picker/index.tsx +7 -174
  491. package/src/circular-option-picker/stories/index.story.tsx +34 -9
  492. package/src/circular-option-picker/style.scss +11 -7
  493. package/src/circular-option-picker/test/index.tsx +133 -0
  494. package/src/circular-option-picker/types.ts +64 -1
  495. package/src/color-palette/README.md +14 -0
  496. package/src/color-palette/index.tsx +69 -28
  497. package/src/color-palette/stories/index.story.tsx +16 -2
  498. package/src/color-palette/test/index.tsx +32 -30
  499. package/src/color-palette/types.ts +34 -1
  500. package/src/combobox-control/index.tsx +7 -5
  501. package/src/composite/{index.js → index.ts} +3 -0
  502. package/src/confirm-dialog/stories/index.story.js +13 -14
  503. package/src/confirm-dialog/test/index.js +10 -18
  504. package/src/custom-gradient-picker/gradient-bar/control-points.tsx +1 -1
  505. package/src/custom-gradient-picker/gradient-bar/test/utils.ts +5 -5
  506. package/src/date-time/time/timezone.tsx +1 -1
  507. package/src/dropdown/README.md +13 -3
  508. package/src/dropdown/index.tsx +16 -34
  509. package/src/dropdown/stories/index.story.tsx +10 -7
  510. package/src/dropdown/types.ts +12 -4
  511. package/src/dropdown-menu/README.md +18 -0
  512. package/src/dropdown-menu/index.tsx +8 -1
  513. package/src/dropdown-menu/stories/index.story.tsx +5 -0
  514. package/src/dropdown-menu/types.ts +23 -6
  515. package/src/dropdown-menu-v2/styles.ts +1 -1
  516. package/src/duotone-picker/README.md +14 -0
  517. package/src/duotone-picker/color-list-picker/index.tsx +28 -12
  518. package/src/duotone-picker/duotone-picker.tsx +33 -0
  519. package/src/duotone-picker/types.ts +34 -1
  520. package/src/focusable-iframe/{index.js → index.tsx} +7 -4
  521. package/src/focusable-iframe/types.ts +9 -0
  522. package/src/form-token-field/README.md +1 -0
  523. package/src/form-token-field/index.tsx +5 -1
  524. package/src/form-token-field/style.scss +5 -9
  525. package/src/form-token-field/test/index.tsx +36 -1
  526. package/src/form-token-field/types.ts +7 -1
  527. package/src/gradient-picker/README.md +14 -0
  528. package/src/gradient-picker/index.tsx +60 -11
  529. package/src/gradient-picker/types.ts +34 -1
  530. package/src/higher-order/navigate-regions/index.tsx +5 -6
  531. package/src/higher-order/with-filters/test/index.tsx +36 -43
  532. package/src/higher-order/with-focus-outside/{index.js → index.tsx} +8 -5
  533. package/src/higher-order/with-focus-outside/test/{index.js → index.tsx} +13 -11
  534. package/src/higher-order/with-notices/test/index.tsx +1 -1
  535. package/src/higher-order/with-spoken-messages/index.tsx +7 -8
  536. package/src/index.ts +5 -1
  537. package/src/input-control/styles/input-control-styles.tsx +2 -2
  538. package/src/isolated-event-container/test/{index.js → index.tsx} +1 -1
  539. package/src/mobile/bottom-sheet/index.native.js +1 -0
  540. package/src/mobile/global-styles-context/index.native.js +7 -8
  541. package/src/modal/test/index.tsx +107 -0
  542. package/src/navigation/use-navigation-tree-nodes.tsx +1 -1
  543. package/src/notice/index.tsx +18 -6
  544. package/src/notice/style.scss +0 -1
  545. package/src/notice/test/__snapshots__/index.tsx.snap +9 -1
  546. package/src/palette-edit/styles.js +2 -1
  547. package/src/placeholder/index.tsx +1 -0
  548. package/src/placeholder/style.scss +2 -4
  549. package/src/popover/index.tsx +47 -110
  550. package/src/popover/test/index.tsx +3 -3
  551. package/src/popover/types.ts +0 -5
  552. package/src/popover/utils.ts +19 -67
  553. package/src/search-control/README.md +7 -0
  554. package/src/search-control/index.tsx +10 -1
  555. package/src/search-control/style.scss +14 -7
  556. package/src/search-control/types.ts +12 -0
  557. package/src/tab-panel/test/index.tsx +5 -0
  558. package/src/text/styles.js +2 -1
  559. package/src/theme/README.md +5 -5
  560. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +567 -59
  561. package/src/toggle-group-control/test/index.tsx +110 -56
  562. package/src/toggle-group-control/toggle-group-control/README.md +0 -1
  563. package/src/toggle-group-control/toggle-group-control/as-button-group.tsx +39 -57
  564. package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +52 -48
  565. package/src/toggle-group-control/toggle-group-control/component.tsx +12 -6
  566. package/src/toggle-group-control/toggle-group-control/styles.ts +2 -19
  567. package/src/toggle-group-control/toggle-group-control/utils.ts +50 -0
  568. package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +70 -20
  569. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +17 -3
  570. package/src/toggle-group-control/types.ts +14 -32
  571. package/src/toolbar/stories/index.story.tsx +3 -5
  572. package/src/toolbar/test/toolbar-group.tsx +13 -7
  573. package/src/toolbar/toolbar/index.tsx +9 -1
  574. package/src/toolbar/toolbar-dropdown-menu/{index.js → index.tsx} +11 -4
  575. package/src/toolbar/toolbar-group/README.md +2 -2
  576. package/src/toolbar/toolbar-group/{index.js → index.tsx} +19 -14
  577. package/src/toolbar/toolbar-group/{toolbar-group-collapsed.js → toolbar-group-collapsed.tsx} +10 -4
  578. package/src/toolbar/toolbar-group/toolbar-group-container.tsx +16 -0
  579. package/src/toolbar/toolbar-group/types.ts +92 -0
  580. package/src/toolbar/toolbar-item/index.tsx +3 -1
  581. package/src/tooltip/README.md +31 -28
  582. package/src/tooltip/index.tsx +106 -0
  583. package/src/tooltip/stories/index.story.tsx +59 -0
  584. package/src/tooltip/style.scss +2 -27
  585. package/src/tooltip/test/index.tsx +335 -0
  586. package/src/tooltip/test/utils/index.tsx +20 -0
  587. package/src/tooltip/types.ts +61 -0
  588. package/src/ui/context/context-connect.ts +3 -3
  589. package/src/ui/context/wordpress-component.ts +4 -4
  590. package/src/unit-control/index.tsx +9 -4
  591. package/src/unit-control/styles/unit-control-styles.ts +3 -1
  592. package/src/unit-control/test/utils.ts +1 -1
  593. package/src/utils/colors-values.js +1 -1
  594. package/src/utils/use-deprecated-props.ts +1 -1
  595. package/tsconfig.tsbuildinfo +1 -1
  596. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -78
  597. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
  598. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -76
  599. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
  600. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts +0 -9
  601. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts.map +0 -1
  602. package/src/color-palette/test/__snapshots__/index.tsx.snap +0 -288
  603. package/src/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx +0 -84
  604. package/src/toolbar/toolbar-group/toolbar-group-container.js +0 -8
  605. package/src/tooltip/index.js +0 -293
  606. package/src/tooltip/stories/index.story.js +0 -85
  607. package/src/tooltip/test/index.js +0 -323
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_flex","_text","_utils","_space","_EMOTION_STRINGIFIED_CSS_ERROR__","_ref2","process","env","NODE_ENV","name","styles","map","toString","rootFocusedStyles","isFocused","Root","_base","default","Flex","target","label","exports","containerDisabledStyles","disabled","backgroundColor","COLORS","ui","backgroundDisabled","background","css","_ref","containerWidthStyles","__unstableInputWidth","labelPosition","flex","width","Container","disabledStyles","color","textDisabled","fontSizeStyles","inputSize","size","sizes","small","fontSize","fontSizeMobile","getSizeConfig","__next36pxDefaultSize","height","lineHeight","minHeight","paddingLeft","space","paddingRight","sizeStyles","props","customPaddings","paddingInlineStart","paddingInlineEnd","dragStyles","isDragging","dragCursor","defaultArrowStyles","activeDragCursorStyles","Input","gray","BaseLabel","Text","baseLabelTypography","Label","_element","createElement","as","LabelWrapper","FlexItem","backdropFocusedStyles","borderColor","borderFocus","border","boxShadow","outline","outlineOffset","borderDisabled","borderStyle","borderWidth","BackdropUI","rtl","Prefix","Suffix"],"sources":["@wordpress/components/src/input-control/styles/input-control-styles.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { SerializedStyles } from '@emotion/react';\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport type { CSSProperties, ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../ui/context';\nimport { Flex, FlexItem } from '../../flex';\nimport { Text } from '../../text';\nimport { baseLabelTypography, COLORS, rtl } from '../../utils';\nimport type { LabelPosition, Size } from '../types';\nimport { space } from '../../ui/utils/space';\n\ntype ContainerProps = {\n\tdisabled?: boolean;\n\thideLabel?: boolean;\n\t__unstableInputWidth?: CSSProperties[ 'width' ];\n\tlabelPosition?: LabelPosition;\n};\n\ntype RootProps = {\n\tisFocused?: boolean;\n\tlabelPosition?: LabelPosition;\n};\n\nconst rootFocusedStyles = ( { isFocused }: RootProps ) => {\n\tif ( ! isFocused ) return '';\n\n\treturn css( { zIndex: 1 } );\n};\n\nexport const Root = styled( Flex )< RootProps >`\n\tbox-sizing: border-box;\n\tposition: relative;\n\tborder-radius: 2px;\n\tpadding-top: 0;\n\t${ rootFocusedStyles }\n`;\n\nconst containerDisabledStyles = ( { disabled }: ContainerProps ) => {\n\tconst backgroundColor = disabled\n\t\t? COLORS.ui.backgroundDisabled\n\t\t: COLORS.ui.background;\n\n\treturn css( { backgroundColor } );\n};\n\nconst containerWidthStyles = ( {\n\t__unstableInputWidth,\n\tlabelPosition,\n}: ContainerProps ) => {\n\tif ( ! __unstableInputWidth ) return css( { width: '100%' } );\n\n\tif ( labelPosition === 'side' ) return '';\n\n\tif ( labelPosition === 'edge' ) {\n\t\treturn css( {\n\t\t\tflex: `0 0 ${ __unstableInputWidth }`,\n\t\t} );\n\t}\n\n\treturn css( { width: __unstableInputWidth } );\n};\n\nexport const Container = styled.div< ContainerProps >`\n\talign-items: center;\n\tbox-sizing: border-box;\n\tborder-radius: inherit;\n\tdisplay: flex;\n\tflex: 1;\n\tposition: relative;\n\n\t${ containerDisabledStyles }\n\t${ containerWidthStyles }\n`;\n\ntype InputProps = {\n\t__next36pxDefaultSize?: boolean;\n\tdisabled?: boolean;\n\tinputSize?: Size;\n\tisDragging?: boolean;\n\tdragCursor?: CSSProperties[ 'cursor' ];\n\tpaddingInlineStart?: CSSProperties[ 'paddingInlineStart' ];\n\tpaddingInlineEnd?: CSSProperties[ 'paddingInlineEnd' ];\n};\n\nconst disabledStyles = ( { disabled }: InputProps ) => {\n\tif ( ! disabled ) return '';\n\n\treturn css( {\n\t\tcolor: COLORS.ui.textDisabled,\n\t} );\n};\n\nconst fontSizeStyles = ( { inputSize: size }: InputProps ) => {\n\tconst sizes = {\n\t\tdefault: '13px',\n\t\tsmall: '11px',\n\t\t'__unstable-large': '13px',\n\t};\n\n\tconst fontSize = sizes[ size as Size ] || sizes.default;\n\tconst fontSizeMobile = '16px';\n\n\tif ( ! fontSize ) return '';\n\n\treturn css`\n\t\tfont-size: ${ fontSizeMobile };\n\n\t\t@media ( min-width: 600px ) {\n\t\t\tfont-size: ${ fontSize };\n\t\t}\n\t`;\n};\n\nexport const getSizeConfig = ( {\n\tinputSize: size,\n\t__next36pxDefaultSize,\n}: InputProps ) => {\n\t// Paddings may be overridden by the custom paddings props.\n\tconst sizes = {\n\t\tdefault: {\n\t\t\theight: 36,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 36,\n\t\t\tpaddingLeft: space( 4 ),\n\t\t\tpaddingRight: space( 4 ),\n\t\t},\n\t\tsmall: {\n\t\t\theight: 24,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 24,\n\t\t\tpaddingLeft: space( 2 ),\n\t\t\tpaddingRight: space( 2 ),\n\t\t},\n\t\t'__unstable-large': {\n\t\t\theight: 40,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 40,\n\t\t\tpaddingLeft: space( 4 ),\n\t\t\tpaddingRight: space( 4 ),\n\t\t},\n\t};\n\n\tif ( ! __next36pxDefaultSize ) {\n\t\tsizes.default = {\n\t\t\theight: 30,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 30,\n\t\t\tpaddingLeft: space( 2 ),\n\t\t\tpaddingRight: space( 2 ),\n\t\t};\n\t}\n\n\treturn sizes[ size as Size ] || sizes.default;\n};\n\nconst sizeStyles = ( props: InputProps ) => {\n\treturn css( getSizeConfig( props ) );\n};\n\nconst customPaddings = ( {\n\tpaddingInlineStart,\n\tpaddingInlineEnd,\n}: InputProps ) => {\n\treturn css( { paddingInlineStart, paddingInlineEnd } );\n};\n\nconst dragStyles = ( { isDragging, dragCursor }: InputProps ) => {\n\tlet defaultArrowStyles: SerializedStyles | undefined;\n\tlet activeDragCursorStyles: SerializedStyles | undefined;\n\n\tif ( isDragging ) {\n\t\tdefaultArrowStyles = css`\n\t\t\tcursor: ${ dragCursor };\n\t\t\tuser-select: none;\n\n\t\t\t&::-webkit-outer-spin-button,\n\t\t\t&::-webkit-inner-spin-button {\n\t\t\t\t-webkit-appearance: none !important;\n\t\t\t\tmargin: 0 !important;\n\t\t\t}\n\t\t`;\n\t}\n\n\tif ( isDragging && dragCursor ) {\n\t\tactiveDragCursorStyles = css`\n\t\t\t&:active {\n\t\t\t\tcursor: ${ dragCursor };\n\t\t\t}\n\t\t`;\n\t}\n\n\treturn css`\n\t\t${ defaultArrowStyles }\n\t\t${ activeDragCursorStyles }\n\t`;\n};\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const Input = styled.input< InputProps >`\n\t&&& {\n\t\tbackground-color: transparent;\n\t\tbox-sizing: border-box;\n\t\tborder: none;\n\t\tbox-shadow: none !important;\n\t\tcolor: ${ COLORS.gray[ 900 ] };\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\tmargin: 0;\n\t\toutline: none;\n\t\twidth: 100%;\n\n\t\t${ dragStyles }\n\t\t${ disabledStyles }\n\t\t${ fontSizeStyles }\n\t\t${ sizeStyles }\n\t\t${ customPaddings }\n\n\t\t&::-webkit-input-placeholder {\n\t\t\tline-height: normal;\n\t\t}\n\t}\n`;\n\nconst BaseLabel = styled( Text )< { labelPosition?: LabelPosition } >`\n\t&&& {\n\t\t${ baseLabelTypography };\n\n\t\tbox-sizing: border-box;\n\t\tdisplay: block;\n\t\tpadding-top: 0;\n\t\tpadding-bottom: 0;\n\t\tmax-width: 100%;\n\t\tz-index: 1;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t}\n`;\n\nexport const Label = (\n\tprops: WordPressComponentProps<\n\t\t{ labelPosition?: LabelPosition; children: ReactNode },\n\t\t'label',\n\t\tfalse\n\t>\n) => <BaseLabel { ...props } as=\"label\" />;\n\nexport const LabelWrapper = styled( FlexItem )`\n\tmax-width: calc( 100% - 10px );\n`;\n\ntype BackdropProps = {\n\tdisabled?: boolean;\n\tisFocused?: boolean;\n};\n\nconst backdropFocusedStyles = ( {\n\tdisabled,\n\tisFocused,\n}: BackdropProps ): SerializedStyles => {\n\tlet borderColor = isFocused ? COLORS.ui.borderFocus : COLORS.ui.border;\n\n\tlet boxShadow;\n\tlet outline;\n\tlet outlineOffset;\n\n\tif ( isFocused ) {\n\t\tboxShadow = `0 0 0 1px ${ COLORS.ui.borderFocus } inset`;\n\t\t// Windows High Contrast mode will show this outline, but not the box-shadow.\n\t\toutline = `2px solid transparent`;\n\t\toutlineOffset = `-2px`;\n\t}\n\n\tif ( disabled ) {\n\t\tborderColor = COLORS.ui.borderDisabled;\n\t}\n\n\treturn css( {\n\t\tboxShadow,\n\t\tborderColor,\n\t\tborderStyle: 'solid',\n\t\tborderWidth: 1,\n\t\toutline,\n\t\toutlineOffset,\n\t} );\n};\n\nexport const BackdropUI = styled.div< BackdropProps >`\n\t&&& {\n\t\tbox-sizing: border-box;\n\t\tborder-radius: inherit;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tpointer-events: none;\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\n\t\t${ backdropFocusedStyles }\n\t\t${ rtl( { paddingLeft: 2 } ) }\n\t}\n`;\n\nexport const Prefix = styled.span`\n\tbox-sizing: border-box;\n\tdisplay: block;\n`;\n\nexport const Suffix = styled.span`\n\talign-items: center;\n\talign-self: stretch;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n`;\n"],"mappings":";;;;;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AAA6C,SAAAK,iCAAA;AAAA,IAAAC,KAAA,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAR;AAAA;AAc7C,MAAMS,iBAAiB,GAAGA,CAAE;EAAEC;AAAqB,CAAC,KAAM;EACzD,IAAK,CAAEA,SAAS,EAAG,OAAO,EAAE;EAE5B,OAAAT,KAAA;AACD,CAAC;AAEM,MAAMU,IAAI,GAAG,kBAAAC,KAAA,CAAAC,OAAA,EAAQC,UAAI,EAAAZ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAW,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,6EAK9BP,iBAAiB,SAAAP,OAAA,CAAAC,GAAA,CAAAC,QAAA,4hUACpB;AAACa,OAAA,CAAAN,IAAA,GAAAA,IAAA;AAEF,MAAMO,uBAAuB,GAAGA,CAAE;EAAEC;AAAyB,CAAC,KAAM;EACnE,MAAMC,eAAe,GAAGD,QAAQ,GAC7BE,aAAM,CAACC,EAAE,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D,qBAAqB,OACrB,IAAAW,UAAG,EAAE;EAAEnC,WAAW,EAAE;AAAE,CAAE,CAAC,UAAA9C,OAAA,CAAAC,GAAA,CAAAC,QAAA,4hUAE7B;AAACa,OAAA,CAAAiE,UAAA,GAAAA,UAAA;AAEK,MAAME,MAAM,OAAAxE,KAAA,CAAAC,OAAA,UAAAX,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAW,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAd,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAR;AAAA,EAGlB;AAACiB,OAAA,CAAAmE,MAAA,GAAAA,MAAA;AAEK,MAAMC,MAAM,OAAAzE,KAAA,CAAAC,OAAA,UAAAX,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAW,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAd,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAR;AAAA,EAKlB;AAACiB,OAAA,CAAAoE,MAAA,GAAAA,MAAA"}
1
+ {"version":3,"names":["_react","require","_flex","_text","_utils","_space","_EMOTION_STRINGIFIED_CSS_ERROR__","_ref2","process","env","NODE_ENV","name","styles","map","toString","rootFocusedStyles","isFocused","Root","_base","default","Flex","target","label","exports","containerDisabledStyles","disabled","backgroundColor","COLORS","ui","backgroundDisabled","background","css","_ref","containerWidthStyles","__unstableInputWidth","labelPosition","flex","width","Container","disabledStyles","color","textDisabled","fontSizeStyles","inputSize","size","sizes","small","fontSize","fontSizeMobile","getSizeConfig","__next36pxDefaultSize","height","lineHeight","minHeight","paddingLeft","space","paddingRight","sizeStyles","props","customPaddings","paddingInlineStart","paddingInlineEnd","dragStyles","isDragging","dragCursor","defaultArrowStyles","activeDragCursorStyles","Input","gray","BaseLabel","Text","baseLabelTypography","Label","_element","createElement","as","LabelWrapper","FlexItem","backdropFocusedStyles","borderColor","borderFocus","border","boxShadow","outline","outlineOffset","CONFIG","controlBoxShadowFocus","borderDisabled","borderStyle","borderWidth","BackdropUI","rtl","Prefix","Suffix"],"sources":["@wordpress/components/src/input-control/styles/input-control-styles.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { SerializedStyles } from '@emotion/react';\nimport { css } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport type { CSSProperties, ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../ui/context';\nimport { Flex, FlexItem } from '../../flex';\nimport { Text } from '../../text';\nimport { baseLabelTypography, COLORS, CONFIG, rtl } from '../../utils';\nimport type { LabelPosition, Size } from '../types';\nimport { space } from '../../ui/utils/space';\n\ntype ContainerProps = {\n\tdisabled?: boolean;\n\thideLabel?: boolean;\n\t__unstableInputWidth?: CSSProperties[ 'width' ];\n\tlabelPosition?: LabelPosition;\n};\n\ntype RootProps = {\n\tisFocused?: boolean;\n\tlabelPosition?: LabelPosition;\n};\n\nconst rootFocusedStyles = ( { isFocused }: RootProps ) => {\n\tif ( ! isFocused ) return '';\n\n\treturn css( { zIndex: 1 } );\n};\n\nexport const Root = styled( Flex )< RootProps >`\n\tbox-sizing: border-box;\n\tposition: relative;\n\tborder-radius: 2px;\n\tpadding-top: 0;\n\t${ rootFocusedStyles }\n`;\n\nconst containerDisabledStyles = ( { disabled }: ContainerProps ) => {\n\tconst backgroundColor = disabled\n\t\t? COLORS.ui.backgroundDisabled\n\t\t: COLORS.ui.background;\n\n\treturn css( { backgroundColor } );\n};\n\nconst containerWidthStyles = ( {\n\t__unstableInputWidth,\n\tlabelPosition,\n}: ContainerProps ) => {\n\tif ( ! __unstableInputWidth ) return css( { width: '100%' } );\n\n\tif ( labelPosition === 'side' ) return '';\n\n\tif ( labelPosition === 'edge' ) {\n\t\treturn css( {\n\t\t\tflex: `0 0 ${ __unstableInputWidth }`,\n\t\t} );\n\t}\n\n\treturn css( { width: __unstableInputWidth } );\n};\n\nexport const Container = styled.div< ContainerProps >`\n\talign-items: center;\n\tbox-sizing: border-box;\n\tborder-radius: inherit;\n\tdisplay: flex;\n\tflex: 1;\n\tposition: relative;\n\n\t${ containerDisabledStyles }\n\t${ containerWidthStyles }\n`;\n\ntype InputProps = {\n\t__next36pxDefaultSize?: boolean;\n\tdisabled?: boolean;\n\tinputSize?: Size;\n\tisDragging?: boolean;\n\tdragCursor?: CSSProperties[ 'cursor' ];\n\tpaddingInlineStart?: CSSProperties[ 'paddingInlineStart' ];\n\tpaddingInlineEnd?: CSSProperties[ 'paddingInlineEnd' ];\n};\n\nconst disabledStyles = ( { disabled }: InputProps ) => {\n\tif ( ! disabled ) return '';\n\n\treturn css( {\n\t\tcolor: COLORS.ui.textDisabled,\n\t} );\n};\n\nconst fontSizeStyles = ( { inputSize: size }: InputProps ) => {\n\tconst sizes = {\n\t\tdefault: '13px',\n\t\tsmall: '11px',\n\t\t'__unstable-large': '13px',\n\t};\n\n\tconst fontSize = sizes[ size as Size ] || sizes.default;\n\tconst fontSizeMobile = '16px';\n\n\tif ( ! fontSize ) return '';\n\n\treturn css`\n\t\tfont-size: ${ fontSizeMobile };\n\n\t\t@media ( min-width: 600px ) {\n\t\t\tfont-size: ${ fontSize };\n\t\t}\n\t`;\n};\n\nexport const getSizeConfig = ( {\n\tinputSize: size,\n\t__next36pxDefaultSize,\n}: InputProps ) => {\n\t// Paddings may be overridden by the custom paddings props.\n\tconst sizes = {\n\t\tdefault: {\n\t\t\theight: 36,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 36,\n\t\t\tpaddingLeft: space( 4 ),\n\t\t\tpaddingRight: space( 4 ),\n\t\t},\n\t\tsmall: {\n\t\t\theight: 24,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 24,\n\t\t\tpaddingLeft: space( 2 ),\n\t\t\tpaddingRight: space( 2 ),\n\t\t},\n\t\t'__unstable-large': {\n\t\t\theight: 40,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 40,\n\t\t\tpaddingLeft: space( 4 ),\n\t\t\tpaddingRight: space( 4 ),\n\t\t},\n\t};\n\n\tif ( ! __next36pxDefaultSize ) {\n\t\tsizes.default = {\n\t\t\theight: 30,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 30,\n\t\t\tpaddingLeft: space( 2 ),\n\t\t\tpaddingRight: space( 2 ),\n\t\t};\n\t}\n\n\treturn sizes[ size as Size ] || sizes.default;\n};\n\nconst sizeStyles = ( props: InputProps ) => {\n\treturn css( getSizeConfig( props ) );\n};\n\nconst customPaddings = ( {\n\tpaddingInlineStart,\n\tpaddingInlineEnd,\n}: InputProps ) => {\n\treturn css( { paddingInlineStart, paddingInlineEnd } );\n};\n\nconst dragStyles = ( { isDragging, dragCursor }: InputProps ) => {\n\tlet defaultArrowStyles: SerializedStyles | undefined;\n\tlet activeDragCursorStyles: SerializedStyles | undefined;\n\n\tif ( isDragging ) {\n\t\tdefaultArrowStyles = css`\n\t\t\tcursor: ${ dragCursor };\n\t\t\tuser-select: none;\n\n\t\t\t&::-webkit-outer-spin-button,\n\t\t\t&::-webkit-inner-spin-button {\n\t\t\t\t-webkit-appearance: none !important;\n\t\t\t\tmargin: 0 !important;\n\t\t\t}\n\t\t`;\n\t}\n\n\tif ( isDragging && dragCursor ) {\n\t\tactiveDragCursorStyles = css`\n\t\t\t&:active {\n\t\t\t\tcursor: ${ dragCursor };\n\t\t\t}\n\t\t`;\n\t}\n\n\treturn css`\n\t\t${ defaultArrowStyles }\n\t\t${ activeDragCursorStyles }\n\t`;\n};\n\n// TODO: Resolve need to use &&& to increase specificity\n// https://github.com/WordPress/gutenberg/issues/18483\n\nexport const Input = styled.input< InputProps >`\n\t&&& {\n\t\tbackground-color: transparent;\n\t\tbox-sizing: border-box;\n\t\tborder: none;\n\t\tbox-shadow: none !important;\n\t\tcolor: ${ COLORS.gray[ 900 ] };\n\t\tdisplay: block;\n\t\tfont-family: inherit;\n\t\tmargin: 0;\n\t\toutline: none;\n\t\twidth: 100%;\n\n\t\t${ dragStyles }\n\t\t${ disabledStyles }\n\t\t${ fontSizeStyles }\n\t\t${ sizeStyles }\n\t\t${ customPaddings }\n\n\t\t&::-webkit-input-placeholder {\n\t\t\tline-height: normal;\n\t\t}\n\t}\n`;\n\nconst BaseLabel = styled( Text )< { labelPosition?: LabelPosition } >`\n\t&&& {\n\t\t${ baseLabelTypography };\n\n\t\tbox-sizing: border-box;\n\t\tdisplay: block;\n\t\tpadding-top: 0;\n\t\tpadding-bottom: 0;\n\t\tmax-width: 100%;\n\t\tz-index: 1;\n\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t}\n`;\n\nexport const Label = (\n\tprops: WordPressComponentProps<\n\t\t{ labelPosition?: LabelPosition; children: ReactNode },\n\t\t'label',\n\t\tfalse\n\t>\n) => <BaseLabel { ...props } as=\"label\" />;\n\nexport const LabelWrapper = styled( FlexItem )`\n\tmax-width: calc( 100% - 10px );\n`;\n\ntype BackdropProps = {\n\tdisabled?: boolean;\n\tisFocused?: boolean;\n};\n\nconst backdropFocusedStyles = ( {\n\tdisabled,\n\tisFocused,\n}: BackdropProps ): SerializedStyles => {\n\tlet borderColor = isFocused ? COLORS.ui.borderFocus : COLORS.ui.border;\n\n\tlet boxShadow;\n\tlet outline;\n\tlet outlineOffset;\n\n\tif ( isFocused ) {\n\t\tboxShadow = CONFIG.controlBoxShadowFocus;\n\t\t// Windows High Contrast mode will show this outline, but not the box-shadow.\n\t\toutline = `2px solid transparent`;\n\t\toutlineOffset = `-2px`;\n\t}\n\n\tif ( disabled ) {\n\t\tborderColor = COLORS.ui.borderDisabled;\n\t}\n\n\treturn css( {\n\t\tboxShadow,\n\t\tborderColor,\n\t\tborderStyle: 'solid',\n\t\tborderWidth: 1,\n\t\toutline,\n\t\toutlineOffset,\n\t} );\n};\n\nexport const BackdropUI = styled.div< BackdropProps >`\n\t&&& {\n\t\tbox-sizing: border-box;\n\t\tborder-radius: inherit;\n\t\tbottom: 0;\n\t\tleft: 0;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tpointer-events: none;\n\t\tposition: absolute;\n\t\tright: 0;\n\t\ttop: 0;\n\n\t\t${ backdropFocusedStyles }\n\t\t${ rtl( { paddingLeft: 2 } ) }\n\t}\n`;\n\nexport const Prefix = styled.span`\n\tbox-sizing: border-box;\n\tdisplay: block;\n`;\n\nexport const Suffix = styled.span`\n\talign-items: center;\n\talign-self: stretch;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n`;\n"],"mappings":";;;;;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AAA6C,SAAAK,iCAAA;AAAA,IAAAC,KAAA,GAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAR;AAAA;AAc7C,MAAMS,iBAAiB,GAAGA,CAAE;EAAEC;AAAqB,CAAC,KAAM;EACzD,IAAK,CAAEA,SAAS,EAAG,OAAO,EAAE;EAE5B,OAAAT,KAAA;AACD,CAAC;AAEM,MAAMU,IAAI,GAAG,kBAAAC,KAAA,CAAAC,OAAA,EAAQC,UAAI,EAAAZ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAW,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,6EAK9BP,iBAAiB,SAAAP,OAAA,CAAAC,GAAA,CAAAC,QAAA,ghUACpB;AAACa,OAAA,CAAAN,IAAA,GAAAA,IAAA;AAEF,MAAMO,uBAAuB,GAAGA,CAAE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QAAA;EAAAW,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,8IAalBwD,qBAAqB,OACrB,IAAAa,UAAG,EAAE;EAAErC,WAAW,EAAE;AAAE,CAAE,CAAC,UAAA9C,OAAA,CAAAC,GAAA,CAAAC,QAAA,ghUAE7B;AAACa,OAAA,CAAAmE,UAAA,GAAAA,UAAA;AAEK,MAAME,MAAM,OAAA1E,KAAA,CAAAC,OAAA,UAAAX,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAW,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAd,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAR;AAAA,EAGlB;AAACiB,OAAA,CAAAqE,MAAA,GAAAA,MAAA;AAEK,MAAMC,MAAM,OAAA3E,KAAA,CAAAC,OAAA,UAAAX,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAW,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,GAAAd,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAR;AAAA,EAKlB;AAACiB,OAAA,CAAAsE,MAAA,GAAAA,MAAA"}
@@ -472,6 +472,7 @@ class BottomSheet extends _element.Component {
472
472
  onMoveShouldSetResponder: scrollEnabled && panResponder.panHandlers.onMoveShouldSetResponder,
473
473
  onMoveShouldSetResponderCapture: scrollEnabled && panResponder.panHandlers.onMoveShouldSetResponderCapture,
474
474
  onAccessibilityEscape: this.onCloseBottomSheet,
475
+ testID: "bottom-sheet",
475
476
  ...rest
476
477
  }, (0, _element.createElement)(_keyboardAvoidingView.default, {
477
478
  behavior: _reactNative.Platform.OS === 'ios' && 'padding',
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_reactNative","_reactNativeModal","_interopRequireDefault","_reactNativeSafeArea","_reactNativeBridge","_compose","_styles","_button","_cell","_cyclePickerCell","_pickerCell","_switchCell","_rangeCell","_colorCell","_linkCell","_linkSuggestionItemCell","_radioCell","_navigationScreen","_navigationContainer","_keyboardAvoidingView","_subSheet","_navBar","_bottomSheetContext","DEFAULT_LAYOUT_ANIMATION","LayoutAnimation","Presets","easeInEaseOut","BottomSheet","Component","constructor","arguments","onSafeAreaInsetsUpdate","bind","onScroll","isScrolling","onShouldEnableScroll","onDismiss","onShouldSetBottomSheetMaxHeight","setIsFullScreen","onDimensionsChange","onHeaderLayout","onCloseBottomSheet","onHandleClosingBottomSheet","onHardwareButtonPress","onHandleHardwareButtonPress","keyboardShow","keyboardHide","headerHeight","keyboardHeight","lastLayoutAnimation","lastLayoutAnimationFinished","state","safeAreaBottomInset","safeAreaTopInset","bounces","maxHeight","scrollEnabled","handleClosingBottomSheet","handleHardwareButtonPress","isMaxHeightSet","isFullScreen","props","e","isVisible","height","endCoordinates","performKeyboardLayoutAnimation","onSetMaxHeight","onKeyboardShow","onKeyboardHide","event","duration","easing","animationConfig","type","Types","layoutAnimation","update","create","property","Properties","opacity","delete","configureNext","performRegularLayoutAnimation","useLastLayoutAnimation","Platform","OS","componentDidMount","SafeArea","getSafeAreaInsetsForRootView","then","androidModalClosedSubscription","subscribeAndroidModalClosed","onClose","dimensionsChangeSubscription","Dimensions","addEventListener","keyboardShowListener","Keyboard","addListener","keyboardHideListener","safeAreaEventSubscription","componentWillUnmount","remove","result","safeAreaInsets","bottom","top","setState","width","get","statusBarHeight","StatusBar","currentHeight","maxHeightWithOpenKeyboard","Math","min","nativeEvent","layout","round","isCloseToBottom","layoutMeasurement","contentOffset","contentSize","y","isCloseToTop","value","action","getContentStyle","paddingBottom","styles","scrollableContent","render","title","leftButton","rightButton","header","hideHeader","style","contentStyle","getStylesFromColorScheme","children","withHeaderSeparator","hasNavigation","rest","panResponder","PanResponder","onMoveShouldSetPanResponder","evt","gestureState","dy","backgroundStyle","background","backgroundDark","bottomSheetHeaderTitleStyle","bottomSheetHeaderTitle","bottomSheetHeaderTitleDark","listStyle","flexGrow","flexShrink","setMinHeightToMaxHeight","minHeight","listProps","disableScrollViewPanResponder","onScrollBeginDrag","onScrollEndDrag","scrollEventThrottle","contentContainerStyle","content","emptyHeader","automaticallyAdjustContentInsets","WrapperView","View","ScrollView","getHeader","createElement","Fragment","bottomSheetHeader","flex","Text","maxFontSizeMultiplier","separator","showDragIndicator","allowDragIndicator","default","bottomModal","animationInTiming","animationOutTiming","backdropTransitionInTiming","backdropTransitionOutTiming","backdropOpacity","onBackdropPress","onBackButtonPress","onSwipeComplete","undefined","onModalHide","swipeDirection","onMoveShouldSetResponder","panHandlers","onMoveShouldSetResponderCapture","onAccessibilityEscape","behavior","borderColor","marginTop","backgroundFullScreen","keyboardVerticalOffset","onLayout","testID","dragIndicator","BottomSheetProvider","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","isBottomSheetContentScrolling","TouchableHighlight","accessible","getWidth","maxWidth","ThemedBottomSheet","withPreferredColorScheme","Button","Cell","SubSheet","BottomSheetSubSheet","NavBar","CyclePickerCell","PickerCell","SwitchCell","RangeCell","ColorCell","LinkCell","LinkSuggestionItemCell","RadioCell","NavigationScreen","NavigationContainer","_default","exports"],"sources":["@wordpress/components/src/mobile/bottom-sheet/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tDimensions,\n\tKeyboard,\n\tLayoutAnimation,\n\tPanResponder,\n\tPlatform,\n\tScrollView,\n\tStatusBar,\n\tText,\n\tTouchableHighlight,\n\tView,\n} from 'react-native';\nimport Modal from 'react-native-modal';\nimport SafeArea from 'react-native-safe-area';\n\n/**\n * WordPress dependencies\n */\nimport { subscribeAndroidModalClosed } from '@wordpress/react-native-bridge';\nimport { Component } from '@wordpress/element';\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './styles.scss';\nimport Button from './button';\nimport Cell from './cell';\nimport CyclePickerCell from './cycle-picker-cell';\nimport PickerCell from './picker-cell';\nimport SwitchCell from './switch-cell';\nimport RangeCell from './range-cell';\nimport ColorCell from './color-cell';\nimport LinkCell from './link-cell';\nimport LinkSuggestionItemCell from './link-suggestion-item-cell';\nimport RadioCell from './radio-cell';\nimport NavigationScreen from './bottom-sheet-navigation/navigation-screen';\nimport NavigationContainer from './bottom-sheet-navigation/navigation-container';\nimport KeyboardAvoidingView from './keyboard-avoiding-view';\nimport BottomSheetSubSheet from './sub-sheet';\nimport NavBar from './nav-bar';\nimport { BottomSheetProvider } from './bottom-sheet-context';\n\nconst DEFAULT_LAYOUT_ANIMATION = LayoutAnimation.Presets.easeInEaseOut;\n\nclass BottomSheet extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onSafeAreaInsetsUpdate = this.onSafeAreaInsetsUpdate.bind( this );\n\t\tthis.onScroll = this.onScroll.bind( this );\n\t\tthis.isScrolling = this.isScrolling.bind( this );\n\t\tthis.onShouldEnableScroll = this.onShouldEnableScroll.bind( this );\n\t\tthis.onDismiss = this.onDismiss.bind( this );\n\t\tthis.onShouldSetBottomSheetMaxHeight =\n\t\t\tthis.onShouldSetBottomSheetMaxHeight.bind( this );\n\n\t\tthis.setIsFullScreen = this.setIsFullScreen.bind( this );\n\n\t\tthis.onDimensionsChange = this.onDimensionsChange.bind( this );\n\t\tthis.onHeaderLayout = this.onHeaderLayout.bind( this );\n\t\tthis.onCloseBottomSheet = this.onCloseBottomSheet.bind( this );\n\t\tthis.onHandleClosingBottomSheet =\n\t\t\tthis.onHandleClosingBottomSheet.bind( this );\n\t\tthis.onHardwareButtonPress = this.onHardwareButtonPress.bind( this );\n\t\tthis.onHandleHardwareButtonPress =\n\t\t\tthis.onHandleHardwareButtonPress.bind( this );\n\t\tthis.keyboardShow = this.keyboardShow.bind( this );\n\t\tthis.keyboardHide = this.keyboardHide.bind( this );\n\n\t\tthis.headerHeight = 0;\n\t\tthis.keyboardHeight = 0;\n\t\tthis.lastLayoutAnimation = null;\n\t\tthis.lastLayoutAnimationFinished = false;\n\n\t\tthis.state = {\n\t\t\tsafeAreaBottomInset: 0,\n\t\t\tsafeAreaTopInset: 0,\n\t\t\tbounces: false,\n\t\t\tmaxHeight: 0,\n\t\t\tscrollEnabled: true,\n\t\t\tisScrolling: false,\n\t\t\thandleClosingBottomSheet: null,\n\t\t\thandleHardwareButtonPress: null,\n\t\t\tisMaxHeightSet: true,\n\t\t\tisFullScreen: this.props.isFullScreen || false,\n\t\t};\n\t}\n\n\tkeyboardShow( e ) {\n\t\tif ( ! this.props.isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { height } = e.endCoordinates;\n\t\tthis.keyboardHeight = height;\n\t\tthis.performKeyboardLayoutAnimation( e );\n\t\tthis.onSetMaxHeight();\n\t\tthis.props.onKeyboardShow?.();\n\t}\n\n\tkeyboardHide( e ) {\n\t\tif ( ! this.props.isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.keyboardHeight = 0;\n\t\tthis.performKeyboardLayoutAnimation( e );\n\t\tthis.onSetMaxHeight();\n\t\tthis.props.onKeyboardHide?.();\n\t}\n\n\tperformKeyboardLayoutAnimation( event ) {\n\t\tconst { duration, easing } = event;\n\n\t\tif ( duration && easing ) {\n\t\t\t// This layout animation is the same as the React Native's KeyboardAvoidingView component.\n\t\t\t// Reference: https://github.com/facebook/react-native/blob/266b21baf35e052ff28120f79c06c4f6dddc51a9/Libraries/Components/Keyboard/KeyboardAvoidingView.js#L119-L128.\n\t\t\tconst animationConfig = {\n\t\t\t\t// We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m.\n\t\t\t\tduration: duration > 10 ? duration : 10,\n\t\t\t\ttype: LayoutAnimation.Types[ easing ] || 'keyboard',\n\t\t\t};\n\t\t\tconst layoutAnimation = {\n\t\t\t\tduration: animationConfig.duration,\n\t\t\t\tupdate: animationConfig,\n\t\t\t\tcreate: {\n\t\t\t\t\t...animationConfig,\n\t\t\t\t\tproperty: LayoutAnimation.Properties.opacity,\n\t\t\t\t},\n\t\t\t\tdelete: {\n\t\t\t\t\t...animationConfig,\n\t\t\t\t\tproperty: LayoutAnimation.Properties.opacity,\n\t\t\t\t},\n\t\t\t};\n\t\t\tthis.lastLayoutAnimationFinished = false;\n\t\t\tLayoutAnimation.configureNext( layoutAnimation, () => {\n\t\t\t\tthis.lastLayoutAnimationFinished = true;\n\t\t\t} );\n\t\t\tthis.lastLayoutAnimation = layoutAnimation;\n\t\t} else {\n\t\t\t// TODO: Reinstate animations, possibly replacing `LayoutAnimation` with\n\t\t\t// more nuanced `Animated` usage or replacing our custom `BottomSheet`\n\t\t\t// with `@gorhom/bottom-sheet`. This animation was disabled to avoid a\n\t\t\t// preexisting bug: https://github.com/WordPress/gutenberg/issues/30562\n\t\t\t// this.performRegularLayoutAnimation( {\n\t\t\t// \tuseLastLayoutAnimation: false,\n\t\t\t// } );.\n\t\t}\n\t}\n\n\tperformRegularLayoutAnimation( { useLastLayoutAnimation } ) {\n\t\t// On Android, we should prevent triggering multiple layout animations at the same time because it can produce visual glitches.\n\t\tif (\n\t\t\tPlatform.OS === 'android' &&\n\t\t\tthis.lastLayoutAnimation &&\n\t\t\t! this.lastLayoutAnimationFinished\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst layoutAnimation = useLastLayoutAnimation\n\t\t\t? this.lastLayoutAnimation || DEFAULT_LAYOUT_ANIMATION\n\t\t\t: DEFAULT_LAYOUT_ANIMATION;\n\n\t\tthis.lastLayoutAnimationFinished = false;\n\t\tLayoutAnimation.configureNext( layoutAnimation, () => {\n\t\t\tthis.lastLayoutAnimationFinished = true;\n\t\t} );\n\t\tthis.lastLayoutAnimation = layoutAnimation;\n\t}\n\n\tcomponentDidMount() {\n\t\tSafeArea.getSafeAreaInsetsForRootView().then(\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\n\t\tif ( Platform.OS === 'android' ) {\n\t\t\tthis.androidModalClosedSubscription = subscribeAndroidModalClosed(\n\t\t\t\t() => {\n\t\t\t\t\tthis.props.onClose();\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tthis.dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tthis.onDimensionsChange\n\t\t);\n\n\t\t// 'Will' keyboard events are not available on Android.\n\t\t// Reference: https://reactnative.dev/docs/0.61/keyboard#addlistener.\n\t\tthis.keyboardShowListener = Keyboard.addListener(\n\t\t\tPlatform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow',\n\t\t\tthis.keyboardShow\n\t\t);\n\t\tthis.keyboardHideListener = Keyboard.addListener(\n\t\t\tPlatform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide',\n\t\t\tthis.keyboardHide\n\t\t);\n\n\t\tthis.safeAreaEventSubscription = SafeArea.addEventListener(\n\t\t\t'safeAreaInsetsForRootViewDidChange',\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t\tthis.onSetMaxHeight();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.dimensionsChangeSubscription.remove();\n\t\tthis.keyboardShowListener.remove();\n\t\tthis.keyboardHideListener.remove();\n\t\tif ( this.androidModalClosedSubscription ) {\n\t\t\tthis.androidModalClosedSubscription.remove();\n\t\t}\n\t\tif ( this.safeAreaEventSubscription === null ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.safeAreaEventSubscription.remove();\n\t\tthis.safeAreaEventSubscription = null;\n\t}\n\n\tonSafeAreaInsetsUpdate( result ) {\n\t\tconst { safeAreaBottomInset, safeAreaTopInset } = this.state;\n\t\tif ( this.safeAreaEventSubscription === null ) {\n\t\t\treturn;\n\t\t}\n\t\tconst { safeAreaInsets } = result;\n\t\tif (\n\t\t\tsafeAreaBottomInset !== safeAreaInsets.bottom ||\n\t\t\tsafeAreaTopInset !== safeAreaInsets.top\n\t\t) {\n\t\t\tthis.setState( {\n\t\t\t\tsafeAreaBottomInset: safeAreaInsets.bottom,\n\t\t\t\tsafeAreaTopInset: safeAreaInsets.top,\n\t\t\t} );\n\t\t}\n\t}\n\n\tonSetMaxHeight() {\n\t\tconst { height, width } = Dimensions.get( 'window' );\n\t\tconst { safeAreaBottomInset } = this.state;\n\t\tconst statusBarHeight =\n\t\t\tPlatform.OS === 'android' ? StatusBar.currentHeight : 0;\n\n\t\t// `maxHeight` when modal is opened along with a keyboard.\n\t\tconst maxHeightWithOpenKeyboard =\n\t\t\t0.95 *\n\t\t\t( Dimensions.get( 'window' ).height -\n\t\t\t\tthis.keyboardHeight -\n\t\t\t\tstatusBarHeight -\n\t\t\t\tthis.headerHeight );\n\n\t\t// In landscape orientation, set `maxHeight` to ~96% of the height.\n\t\tif ( width > height ) {\n\t\t\tthis.setState( {\n\t\t\t\tmaxHeight: Math.min(\n\t\t\t\t\t0.96 * height - this.headerHeight,\n\t\t\t\t\tmaxHeightWithOpenKeyboard\n\t\t\t\t),\n\t\t\t} );\n\t\t\t// In portrait orientation, set `maxHeight` to ~59% of the height.\n\t\t} else {\n\t\t\tthis.setState( {\n\t\t\t\tmaxHeight: Math.min(\n\t\t\t\t\theight * 0.59 - safeAreaBottomInset - this.headerHeight,\n\t\t\t\t\tmaxHeightWithOpenKeyboard\n\t\t\t\t),\n\t\t\t} );\n\t\t}\n\t}\n\n\tonDimensionsChange() {\n\t\tthis.onSetMaxHeight();\n\t\tthis.setState( { bounces: false } );\n\t}\n\n\tonHeaderLayout( { nativeEvent } ) {\n\t\tconst { height } = nativeEvent.layout;\n\t\t// The layout animation should only be triggered if the header\n\t\t// height has changed after being mounted.\n\t\tif (\n\t\t\tthis.headerHeight !== 0 &&\n\t\t\tMath.round( height ) !== Math.round( this.headerHeight )\n\t\t) {\n\t\t\tthis.performRegularLayoutAnimation( {\n\t\t\t\tuseLastLayoutAnimation: true,\n\t\t\t} );\n\t\t}\n\t\tthis.headerHeight = height;\n\t\tthis.onSetMaxHeight();\n\t}\n\n\tisCloseToBottom( { layoutMeasurement, contentOffset, contentSize } ) {\n\t\treturn (\n\t\t\tlayoutMeasurement.height + contentOffset.y >=\n\t\t\tcontentSize.height - contentOffset.y\n\t\t);\n\t}\n\n\tisCloseToTop( { contentOffset } ) {\n\t\treturn contentOffset.y < 10;\n\t}\n\n\tonScroll( { nativeEvent } ) {\n\t\tif ( this.isCloseToTop( nativeEvent ) ) {\n\t\t\tthis.setState( { bounces: false } );\n\t\t} else {\n\t\t\tthis.setState( { bounces: true } );\n\t\t}\n\t}\n\n\tonDismiss() {\n\t\tconst { onDismiss } = this.props;\n\n\t\tif ( onDismiss ) {\n\t\t\tonDismiss();\n\t\t}\n\n\t\tthis.onCloseBottomSheet();\n\t}\n\n\tonShouldEnableScroll( value ) {\n\t\tthis.setState( { scrollEnabled: value } );\n\t}\n\n\tonShouldSetBottomSheetMaxHeight( value ) {\n\t\tthis.setState( { isMaxHeightSet: value } );\n\t}\n\n\tisScrolling( value ) {\n\t\tthis.setState( { isScrolling: value } );\n\t}\n\n\tonHandleClosingBottomSheet( action ) {\n\t\tthis.setState( { handleClosingBottomSheet: action } );\n\t}\n\n\tonHandleHardwareButtonPress( action ) {\n\t\tthis.setState( { handleHardwareButtonPress: action } );\n\t}\n\n\tonCloseBottomSheet() {\n\t\tconst { onClose } = this.props;\n\t\tconst { handleClosingBottomSheet } = this.state;\n\t\tif ( handleClosingBottomSheet ) {\n\t\t\thandleClosingBottomSheet();\n\t\t\tthis.onHandleClosingBottomSheet( null );\n\t\t}\n\t\tif ( onClose ) {\n\t\t\tonClose();\n\t\t}\n\t\tthis.onShouldSetBottomSheetMaxHeight( true );\n\t}\n\n\tsetIsFullScreen( isFullScreen ) {\n\t\tif ( isFullScreen !== this.state.isFullScreen ) {\n\t\t\tif ( isFullScreen ) {\n\t\t\t\tthis.setState( { isFullScreen, isMaxHeightSet: false } );\n\t\t\t} else {\n\t\t\t\tthis.setState( { isFullScreen, isMaxHeightSet: true } );\n\t\t\t}\n\t\t}\n\t}\n\n\tonHardwareButtonPress() {\n\t\tconst { onClose } = this.props;\n\t\tconst { handleHardwareButtonPress } = this.state;\n\t\tif ( handleHardwareButtonPress && handleHardwareButtonPress() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( onClose ) {\n\t\t\treturn onClose();\n\t\t}\n\t}\n\n\tgetContentStyle() {\n\t\tconst { safeAreaBottomInset } = this.state;\n\t\treturn {\n\t\t\tpaddingBottom:\n\t\t\t\t( safeAreaBottomInset || 0 ) +\n\t\t\t\tstyles.scrollableContent.paddingBottom,\n\t\t};\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\ttitle = '',\n\t\t\tisVisible,\n\t\t\tleftButton,\n\t\t\trightButton,\n\t\t\theader,\n\t\t\thideHeader,\n\t\t\tstyle = {},\n\t\t\tcontentStyle = {},\n\t\t\tgetStylesFromColorScheme,\n\t\t\tchildren,\n\t\t\twithHeaderSeparator = false,\n\t\t\thasNavigation,\n\t\t\tonDismiss,\n\t\t\t...rest\n\t\t} = this.props;\n\t\tconst {\n\t\t\tmaxHeight,\n\t\t\tbounces,\n\t\t\tsafeAreaBottomInset,\n\t\t\tsafeAreaTopInset,\n\t\t\tisScrolling,\n\t\t\tscrollEnabled,\n\t\t\tisMaxHeightSet,\n\t\t\tisFullScreen,\n\t\t} = this.state;\n\n\t\tconst panResponder = PanResponder.create( {\n\t\t\tonMoveShouldSetPanResponder: ( evt, gestureState ) => {\n\t\t\t\t// 'swiping-to-close' option is temporarily and partially disabled\n\t\t\t\t// on Android ( swipe / drag is still available in the top most area - near drag indicator).\n\t\t\t\tif ( Platform.OS === 'ios' ) {\n\t\t\t\t\t// Activates swipe down over child Touchables if the swipe is long enough.\n\t\t\t\t\t// With this we can adjust sensibility on the swipe vs tap gestures.\n\t\t\t\t\tif ( gestureState.dy > 3 && ! bounces ) {\n\t\t\t\t\t\tgestureState.dy = 0;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t},\n\t\t} );\n\n\t\tconst backgroundStyle = getStylesFromColorScheme(\n\t\t\tstyles.background,\n\t\t\tstyles.backgroundDark\n\t\t);\n\n\t\tconst bottomSheetHeaderTitleStyle = getStylesFromColorScheme(\n\t\t\tstyles.bottomSheetHeaderTitle,\n\t\t\tstyles.bottomSheetHeaderTitleDark\n\t\t);\n\n\t\tlet listStyle = {};\n\t\tif ( isFullScreen ) {\n\t\t\tlistStyle = { flexGrow: 1, flexShrink: 1 };\n\t\t} else if ( isMaxHeightSet ) {\n\t\t\tlistStyle = { maxHeight };\n\n\t\t\t// Allow setting a \"static\" height of the bottom sheet\n\t\t\t// by setting the min height to the max height.\n\t\t\tif ( this.props.setMinHeightToMaxHeight ) {\n\t\t\t\tlistStyle.minHeight = maxHeight;\n\t\t\t}\n\t\t}\n\n\t\tconst listProps = {\n\t\t\tdisableScrollViewPanResponder: true,\n\t\t\tbounces,\n\t\t\tonScroll: this.onScroll,\n\t\t\tonScrollBeginDrag: this.onScrollBeginDrag,\n\t\t\tonScrollEndDrag: this.onScrollEndDrag,\n\t\t\tscrollEventThrottle: 16,\n\t\t\tcontentContainerStyle: [\n\t\t\t\tstyles.content,\n\t\t\t\thideHeader && styles.emptyHeader,\n\t\t\t\tcontentStyle,\n\t\t\t\tisFullScreen && { flexGrow: 1 },\n\t\t\t],\n\t\t\tstyle: listStyle,\n\t\t\tsafeAreaBottomInset,\n\t\t\tscrollEnabled,\n\t\t\tautomaticallyAdjustContentInsets: false,\n\t\t};\n\n\t\tconst WrapperView = hasNavigation ? View : ScrollView;\n\n\t\tconst getHeader = () => (\n\t\t\t<>\n\t\t\t\t{ header || (\n\t\t\t\t\t<View style={ styles.bottomSheetHeader }>\n\t\t\t\t\t\t<View style={ styles.flex }>{ leftButton }</View>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tstyle={ bottomSheetHeaderTitleStyle }\n\t\t\t\t\t\t\tmaxFontSizeMultiplier={ 3 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<View style={ styles.flex }>{ rightButton }</View>\n\t\t\t\t\t</View>\n\t\t\t\t) }\n\t\t\t\t{ withHeaderSeparator && <View style={ styles.separator } /> }\n\t\t\t</>\n\t\t);\n\n\t\tconst showDragIndicator = () => {\n\t\t\t// If iOS or not fullscreen show the drag indicator.\n\t\t\tif ( Platform.OS === 'ios' || ! this.state.isFullScreen ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Otherwise check the allowDragIndicator.\n\t\t\treturn this.props.allowDragIndicator;\n\t\t};\n\n\t\treturn (\n\t\t\t<Modal\n\t\t\t\tisVisible={ isVisible }\n\t\t\t\tstyle={ styles.bottomModal }\n\t\t\t\tanimationInTiming={ 400 }\n\t\t\t\tanimationOutTiming={ 300 }\n\t\t\t\tbackdropTransitionInTiming={ 50 }\n\t\t\t\tbackdropTransitionOutTiming={ 50 }\n\t\t\t\tbackdropOpacity={ 0.2 }\n\t\t\t\tonBackdropPress={ this.onCloseBottomSheet }\n\t\t\t\tonBackButtonPress={ this.onHardwareButtonPress }\n\t\t\t\tonSwipeComplete={ this.onCloseBottomSheet }\n\t\t\t\tonDismiss={ Platform.OS === 'ios' ? this.onDismiss : undefined }\n\t\t\t\tonModalHide={\n\t\t\t\t\tPlatform.OS === 'android' ? this.onDismiss : undefined\n\t\t\t\t}\n\t\t\t\tswipeDirection=\"down\"\n\t\t\t\tonMoveShouldSetResponder={\n\t\t\t\t\tscrollEnabled &&\n\t\t\t\t\tpanResponder.panHandlers.onMoveShouldSetResponder\n\t\t\t\t}\n\t\t\t\tonMoveShouldSetResponderCapture={\n\t\t\t\t\tscrollEnabled &&\n\t\t\t\t\tpanResponder.panHandlers.onMoveShouldSetResponderCapture\n\t\t\t\t}\n\t\t\t\tonAccessibilityEscape={ this.onCloseBottomSheet }\n\t\t\t\t{ ...rest }\n\t\t\t>\n\t\t\t\t<KeyboardAvoidingView\n\t\t\t\t\tbehavior={ Platform.OS === 'ios' && 'padding' }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...backgroundStyle,\n\t\t\t\t\t\tborderColor: 'rgba(0, 0, 0, 0.1)',\n\t\t\t\t\t\tmarginTop:\n\t\t\t\t\t\t\tPlatform.OS === 'ios' && isFullScreen\n\t\t\t\t\t\t\t\t? safeAreaTopInset\n\t\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t\tflex: isFullScreen ? 1 : undefined,\n\t\t\t\t\t\t...( Platform.OS === 'android' && isFullScreen\n\t\t\t\t\t\t\t? styles.backgroundFullScreen\n\t\t\t\t\t\t\t: {} ),\n\t\t\t\t\t\t...style,\n\t\t\t\t\t} }\n\t\t\t\t\tkeyboardVerticalOffset={ -safeAreaBottomInset }\n\t\t\t\t>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ styles.header }\n\t\t\t\t\t\tonLayout={ this.onHeaderLayout }\n\t\t\t\t\t\ttestID={ `${ rest.testID || 'bottom-sheet' }-header` }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showDragIndicator() && (\n\t\t\t\t\t\t\t<View style={ styles.dragIndicator } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! hideHeader && getHeader() }\n\t\t\t\t\t</View>\n\t\t\t\t\t<WrapperView\n\t\t\t\t\t\t{ ...( hasNavigation\n\t\t\t\t\t\t\t? { style: listProps.style }\n\t\t\t\t\t\t\t: listProps ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BottomSheetProvider\n\t\t\t\t\t\t\tvalue={ {\n\t\t\t\t\t\t\t\tshouldEnableBottomSheetScroll:\n\t\t\t\t\t\t\t\t\tthis.onShouldEnableScroll,\n\t\t\t\t\t\t\t\tshouldEnableBottomSheetMaxHeight:\n\t\t\t\t\t\t\t\t\tthis.onShouldSetBottomSheetMaxHeight,\n\t\t\t\t\t\t\t\tisBottomSheetContentScrolling: isScrolling,\n\t\t\t\t\t\t\t\tonHandleClosingBottomSheet:\n\t\t\t\t\t\t\t\t\tthis.onHandleClosingBottomSheet,\n\t\t\t\t\t\t\t\tonHandleHardwareButtonPress:\n\t\t\t\t\t\t\t\t\tthis.onHandleHardwareButtonPress,\n\t\t\t\t\t\t\t\tlistProps,\n\t\t\t\t\t\t\t\tsetIsFullScreen: this.setIsFullScreen,\n\t\t\t\t\t\t\t\tsafeAreaBottomInset,\n\t\t\t\t\t\t\t\tmaxHeight,\n\t\t\t\t\t\t\t\tisMaxHeightSet,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ hasNavigation ? (\n\t\t\t\t\t\t\t\t<>{ children }</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<TouchableHighlight accessible={ false }>\n\t\t\t\t\t\t\t\t\t<>{ children }</>\n\t\t\t\t\t\t\t\t</TouchableHighlight>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BottomSheetProvider>\n\t\t\t\t\t\t{ ! hasNavigation && (\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t\t\t\tsafeAreaBottomInset ||\n\t\t\t\t\t\t\t\t\t\tstyles.scrollableContent.paddingBottom,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</WrapperView>\n\t\t\t\t</KeyboardAvoidingView>\n\t\t\t</Modal>\n\t\t);\n\t}\n}\n\nfunction getWidth() {\n\treturn Math.min(\n\t\tDimensions.get( 'window' ).width,\n\t\tstyles.background.maxWidth\n\t);\n}\n\nconst ThemedBottomSheet = withPreferredColorScheme( BottomSheet );\n\nThemedBottomSheet.getWidth = getWidth;\nThemedBottomSheet.Button = Button;\nThemedBottomSheet.Cell = Cell;\nThemedBottomSheet.SubSheet = BottomSheetSubSheet;\nThemedBottomSheet.NavBar = NavBar;\nThemedBottomSheet.CyclePickerCell = CyclePickerCell;\nThemedBottomSheet.PickerCell = PickerCell;\nThemedBottomSheet.SwitchCell = SwitchCell;\nThemedBottomSheet.RangeCell = RangeCell;\nThemedBottomSheet.ColorCell = ColorCell;\nThemedBottomSheet.LinkCell = LinkCell;\nThemedBottomSheet.LinkSuggestionItemCell = LinkSuggestionItemCell;\nThemedBottomSheet.RadioCell = RadioCell;\nThemedBottomSheet.NavigationScreen = NavigationScreen;\nThemedBottomSheet.NavigationContainer = NavigationContainer;\n\nexport default ThemedBottomSheet;\n"],"mappings":";;;;;;;AAsBA,IAAAA,QAAA,GAAAC,OAAA;AAnBA,IAAAC,YAAA,GAAAD,OAAA;AAYA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAD,sBAAA,CAAAH,OAAA;AAKA,IAAAK,kBAAA,GAAAL,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AAKA,IAAAO,OAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,OAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,KAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,gBAAA,GAAAP,sBAAA,CAAAH,OAAA;AACA,IAAAW,WAAA,GAAAR,sBAAA,CAAAH,OAAA;AACA,IAAAY,WAAA,GAAAT,sBAAA,CAAAH,OAAA;AACA,IAAAa,UAAA,GAAAV,sBAAA,CAAAH,OAAA;AACA,IAAAc,UAAA,GAAAX,sBAAA,CAAAH,OAAA;AACA,IAAAe,SAAA,GAAAZ,sBAAA,CAAAH,OAAA;AACA,IAAAgB,uBAAA,GAAAb,sBAAA,CAAAH,OAAA;AACA,IAAAiB,UAAA,GAAAd,sBAAA,CAAAH,OAAA;AACA,IAAAkB,iBAAA,GAAAf,sBAAA,CAAAH,OAAA;AACA,IAAAmB,oBAAA,GAAAhB,sBAAA,CAAAH,OAAA;AACA,IAAAoB,qBAAA,GAAAjB,sBAAA,CAAAH,OAAA;AACA,IAAAqB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GA,kBAAS;AACvCV,iBAAiB,CAACW,SAAS,GAAGA,kBAAS;AACvCX,iBAAiB,CAACY,QAAQ,GAAGA,iBAAQ;AACrCZ,iBAAiB,CAACa,sBAAsB,GAAGA,+BAAsB;AACjEb,iBAAiB,CAACc,SAAS,GAAGA,kBAAS;AACvCd,iBAAiB,CAACe,gBAAgB,GAAGA,yBAAgB;AACrDf,iBAAiB,CAACgB,mBAAmB,GAAGA,4BAAmB;AAAC,IAAAC,QAAA,GAE7CjB,iBAAiB;AAAAkB,OAAA,CAAAnD,OAAA,GAAAkD,QAAA"}
1
+ {"version":3,"names":["_element","require","_reactNative","_reactNativeModal","_interopRequireDefault","_reactNativeSafeArea","_reactNativeBridge","_compose","_styles","_button","_cell","_cyclePickerCell","_pickerCell","_switchCell","_rangeCell","_colorCell","_linkCell","_linkSuggestionItemCell","_radioCell","_navigationScreen","_navigationContainer","_keyboardAvoidingView","_subSheet","_navBar","_bottomSheetContext","DEFAULT_LAYOUT_ANIMATION","LayoutAnimation","Presets","easeInEaseOut","BottomSheet","Component","constructor","arguments","onSafeAreaInsetsUpdate","bind","onScroll","isScrolling","onShouldEnableScroll","onDismiss","onShouldSetBottomSheetMaxHeight","setIsFullScreen","onDimensionsChange","onHeaderLayout","onCloseBottomSheet","onHandleClosingBottomSheet","onHardwareButtonPress","onHandleHardwareButtonPress","keyboardShow","keyboardHide","headerHeight","keyboardHeight","lastLayoutAnimation","lastLayoutAnimationFinished","state","safeAreaBottomInset","safeAreaTopInset","bounces","maxHeight","scrollEnabled","handleClosingBottomSheet","handleHardwareButtonPress","isMaxHeightSet","isFullScreen","props","e","isVisible","height","endCoordinates","performKeyboardLayoutAnimation","onSetMaxHeight","onKeyboardShow","onKeyboardHide","event","duration","easing","animationConfig","type","Types","layoutAnimation","update","create","property","Properties","opacity","delete","configureNext","performRegularLayoutAnimation","useLastLayoutAnimation","Platform","OS","componentDidMount","SafeArea","getSafeAreaInsetsForRootView","then","androidModalClosedSubscription","subscribeAndroidModalClosed","onClose","dimensionsChangeSubscription","Dimensions","addEventListener","keyboardShowListener","Keyboard","addListener","keyboardHideListener","safeAreaEventSubscription","componentWillUnmount","remove","result","safeAreaInsets","bottom","top","setState","width","get","statusBarHeight","StatusBar","currentHeight","maxHeightWithOpenKeyboard","Math","min","nativeEvent","layout","round","isCloseToBottom","layoutMeasurement","contentOffset","contentSize","y","isCloseToTop","value","action","getContentStyle","paddingBottom","styles","scrollableContent","render","title","leftButton","rightButton","header","hideHeader","style","contentStyle","getStylesFromColorScheme","children","withHeaderSeparator","hasNavigation","rest","panResponder","PanResponder","onMoveShouldSetPanResponder","evt","gestureState","dy","backgroundStyle","background","backgroundDark","bottomSheetHeaderTitleStyle","bottomSheetHeaderTitle","bottomSheetHeaderTitleDark","listStyle","flexGrow","flexShrink","setMinHeightToMaxHeight","minHeight","listProps","disableScrollViewPanResponder","onScrollBeginDrag","onScrollEndDrag","scrollEventThrottle","contentContainerStyle","content","emptyHeader","automaticallyAdjustContentInsets","WrapperView","View","ScrollView","getHeader","createElement","Fragment","bottomSheetHeader","flex","Text","maxFontSizeMultiplier","separator","showDragIndicator","allowDragIndicator","default","bottomModal","animationInTiming","animationOutTiming","backdropTransitionInTiming","backdropTransitionOutTiming","backdropOpacity","onBackdropPress","onBackButtonPress","onSwipeComplete","undefined","onModalHide","swipeDirection","onMoveShouldSetResponder","panHandlers","onMoveShouldSetResponderCapture","onAccessibilityEscape","testID","behavior","borderColor","marginTop","backgroundFullScreen","keyboardVerticalOffset","onLayout","dragIndicator","BottomSheetProvider","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","isBottomSheetContentScrolling","TouchableHighlight","accessible","getWidth","maxWidth","ThemedBottomSheet","withPreferredColorScheme","Button","Cell","SubSheet","BottomSheetSubSheet","NavBar","CyclePickerCell","PickerCell","SwitchCell","RangeCell","ColorCell","LinkCell","LinkSuggestionItemCell","RadioCell","NavigationScreen","NavigationContainer","_default","exports"],"sources":["@wordpress/components/src/mobile/bottom-sheet/index.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tDimensions,\n\tKeyboard,\n\tLayoutAnimation,\n\tPanResponder,\n\tPlatform,\n\tScrollView,\n\tStatusBar,\n\tText,\n\tTouchableHighlight,\n\tView,\n} from 'react-native';\nimport Modal from 'react-native-modal';\nimport SafeArea from 'react-native-safe-area';\n\n/**\n * WordPress dependencies\n */\nimport { subscribeAndroidModalClosed } from '@wordpress/react-native-bridge';\nimport { Component } from '@wordpress/element';\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './styles.scss';\nimport Button from './button';\nimport Cell from './cell';\nimport CyclePickerCell from './cycle-picker-cell';\nimport PickerCell from './picker-cell';\nimport SwitchCell from './switch-cell';\nimport RangeCell from './range-cell';\nimport ColorCell from './color-cell';\nimport LinkCell from './link-cell';\nimport LinkSuggestionItemCell from './link-suggestion-item-cell';\nimport RadioCell from './radio-cell';\nimport NavigationScreen from './bottom-sheet-navigation/navigation-screen';\nimport NavigationContainer from './bottom-sheet-navigation/navigation-container';\nimport KeyboardAvoidingView from './keyboard-avoiding-view';\nimport BottomSheetSubSheet from './sub-sheet';\nimport NavBar from './nav-bar';\nimport { BottomSheetProvider } from './bottom-sheet-context';\n\nconst DEFAULT_LAYOUT_ANIMATION = LayoutAnimation.Presets.easeInEaseOut;\n\nclass BottomSheet extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\t\tthis.onSafeAreaInsetsUpdate = this.onSafeAreaInsetsUpdate.bind( this );\n\t\tthis.onScroll = this.onScroll.bind( this );\n\t\tthis.isScrolling = this.isScrolling.bind( this );\n\t\tthis.onShouldEnableScroll = this.onShouldEnableScroll.bind( this );\n\t\tthis.onDismiss = this.onDismiss.bind( this );\n\t\tthis.onShouldSetBottomSheetMaxHeight =\n\t\t\tthis.onShouldSetBottomSheetMaxHeight.bind( this );\n\n\t\tthis.setIsFullScreen = this.setIsFullScreen.bind( this );\n\n\t\tthis.onDimensionsChange = this.onDimensionsChange.bind( this );\n\t\tthis.onHeaderLayout = this.onHeaderLayout.bind( this );\n\t\tthis.onCloseBottomSheet = this.onCloseBottomSheet.bind( this );\n\t\tthis.onHandleClosingBottomSheet =\n\t\t\tthis.onHandleClosingBottomSheet.bind( this );\n\t\tthis.onHardwareButtonPress = this.onHardwareButtonPress.bind( this );\n\t\tthis.onHandleHardwareButtonPress =\n\t\t\tthis.onHandleHardwareButtonPress.bind( this );\n\t\tthis.keyboardShow = this.keyboardShow.bind( this );\n\t\tthis.keyboardHide = this.keyboardHide.bind( this );\n\n\t\tthis.headerHeight = 0;\n\t\tthis.keyboardHeight = 0;\n\t\tthis.lastLayoutAnimation = null;\n\t\tthis.lastLayoutAnimationFinished = false;\n\n\t\tthis.state = {\n\t\t\tsafeAreaBottomInset: 0,\n\t\t\tsafeAreaTopInset: 0,\n\t\t\tbounces: false,\n\t\t\tmaxHeight: 0,\n\t\t\tscrollEnabled: true,\n\t\t\tisScrolling: false,\n\t\t\thandleClosingBottomSheet: null,\n\t\t\thandleHardwareButtonPress: null,\n\t\t\tisMaxHeightSet: true,\n\t\t\tisFullScreen: this.props.isFullScreen || false,\n\t\t};\n\t}\n\n\tkeyboardShow( e ) {\n\t\tif ( ! this.props.isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst { height } = e.endCoordinates;\n\t\tthis.keyboardHeight = height;\n\t\tthis.performKeyboardLayoutAnimation( e );\n\t\tthis.onSetMaxHeight();\n\t\tthis.props.onKeyboardShow?.();\n\t}\n\n\tkeyboardHide( e ) {\n\t\tif ( ! this.props.isVisible ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.keyboardHeight = 0;\n\t\tthis.performKeyboardLayoutAnimation( e );\n\t\tthis.onSetMaxHeight();\n\t\tthis.props.onKeyboardHide?.();\n\t}\n\n\tperformKeyboardLayoutAnimation( event ) {\n\t\tconst { duration, easing } = event;\n\n\t\tif ( duration && easing ) {\n\t\t\t// This layout animation is the same as the React Native's KeyboardAvoidingView component.\n\t\t\t// Reference: https://github.com/facebook/react-native/blob/266b21baf35e052ff28120f79c06c4f6dddc51a9/Libraries/Components/Keyboard/KeyboardAvoidingView.js#L119-L128.\n\t\t\tconst animationConfig = {\n\t\t\t\t// We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m.\n\t\t\t\tduration: duration > 10 ? duration : 10,\n\t\t\t\ttype: LayoutAnimation.Types[ easing ] || 'keyboard',\n\t\t\t};\n\t\t\tconst layoutAnimation = {\n\t\t\t\tduration: animationConfig.duration,\n\t\t\t\tupdate: animationConfig,\n\t\t\t\tcreate: {\n\t\t\t\t\t...animationConfig,\n\t\t\t\t\tproperty: LayoutAnimation.Properties.opacity,\n\t\t\t\t},\n\t\t\t\tdelete: {\n\t\t\t\t\t...animationConfig,\n\t\t\t\t\tproperty: LayoutAnimation.Properties.opacity,\n\t\t\t\t},\n\t\t\t};\n\t\t\tthis.lastLayoutAnimationFinished = false;\n\t\t\tLayoutAnimation.configureNext( layoutAnimation, () => {\n\t\t\t\tthis.lastLayoutAnimationFinished = true;\n\t\t\t} );\n\t\t\tthis.lastLayoutAnimation = layoutAnimation;\n\t\t} else {\n\t\t\t// TODO: Reinstate animations, possibly replacing `LayoutAnimation` with\n\t\t\t// more nuanced `Animated` usage or replacing our custom `BottomSheet`\n\t\t\t// with `@gorhom/bottom-sheet`. This animation was disabled to avoid a\n\t\t\t// preexisting bug: https://github.com/WordPress/gutenberg/issues/30562\n\t\t\t// this.performRegularLayoutAnimation( {\n\t\t\t// \tuseLastLayoutAnimation: false,\n\t\t\t// } );.\n\t\t}\n\t}\n\n\tperformRegularLayoutAnimation( { useLastLayoutAnimation } ) {\n\t\t// On Android, we should prevent triggering multiple layout animations at the same time because it can produce visual glitches.\n\t\tif (\n\t\t\tPlatform.OS === 'android' &&\n\t\t\tthis.lastLayoutAnimation &&\n\t\t\t! this.lastLayoutAnimationFinished\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst layoutAnimation = useLastLayoutAnimation\n\t\t\t? this.lastLayoutAnimation || DEFAULT_LAYOUT_ANIMATION\n\t\t\t: DEFAULT_LAYOUT_ANIMATION;\n\n\t\tthis.lastLayoutAnimationFinished = false;\n\t\tLayoutAnimation.configureNext( layoutAnimation, () => {\n\t\t\tthis.lastLayoutAnimationFinished = true;\n\t\t} );\n\t\tthis.lastLayoutAnimation = layoutAnimation;\n\t}\n\n\tcomponentDidMount() {\n\t\tSafeArea.getSafeAreaInsetsForRootView().then(\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\n\t\tif ( Platform.OS === 'android' ) {\n\t\t\tthis.androidModalClosedSubscription = subscribeAndroidModalClosed(\n\t\t\t\t() => {\n\t\t\t\t\tthis.props.onClose();\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\n\t\tthis.dimensionsChangeSubscription = Dimensions.addEventListener(\n\t\t\t'change',\n\t\t\tthis.onDimensionsChange\n\t\t);\n\n\t\t// 'Will' keyboard events are not available on Android.\n\t\t// Reference: https://reactnative.dev/docs/0.61/keyboard#addlistener.\n\t\tthis.keyboardShowListener = Keyboard.addListener(\n\t\t\tPlatform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow',\n\t\t\tthis.keyboardShow\n\t\t);\n\t\tthis.keyboardHideListener = Keyboard.addListener(\n\t\t\tPlatform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide',\n\t\t\tthis.keyboardHide\n\t\t);\n\n\t\tthis.safeAreaEventSubscription = SafeArea.addEventListener(\n\t\t\t'safeAreaInsetsForRootViewDidChange',\n\t\t\tthis.onSafeAreaInsetsUpdate\n\t\t);\n\t\tthis.onSetMaxHeight();\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.dimensionsChangeSubscription.remove();\n\t\tthis.keyboardShowListener.remove();\n\t\tthis.keyboardHideListener.remove();\n\t\tif ( this.androidModalClosedSubscription ) {\n\t\t\tthis.androidModalClosedSubscription.remove();\n\t\t}\n\t\tif ( this.safeAreaEventSubscription === null ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.safeAreaEventSubscription.remove();\n\t\tthis.safeAreaEventSubscription = null;\n\t}\n\n\tonSafeAreaInsetsUpdate( result ) {\n\t\tconst { safeAreaBottomInset, safeAreaTopInset } = this.state;\n\t\tif ( this.safeAreaEventSubscription === null ) {\n\t\t\treturn;\n\t\t}\n\t\tconst { safeAreaInsets } = result;\n\t\tif (\n\t\t\tsafeAreaBottomInset !== safeAreaInsets.bottom ||\n\t\t\tsafeAreaTopInset !== safeAreaInsets.top\n\t\t) {\n\t\t\tthis.setState( {\n\t\t\t\tsafeAreaBottomInset: safeAreaInsets.bottom,\n\t\t\t\tsafeAreaTopInset: safeAreaInsets.top,\n\t\t\t} );\n\t\t}\n\t}\n\n\tonSetMaxHeight() {\n\t\tconst { height, width } = Dimensions.get( 'window' );\n\t\tconst { safeAreaBottomInset } = this.state;\n\t\tconst statusBarHeight =\n\t\t\tPlatform.OS === 'android' ? StatusBar.currentHeight : 0;\n\n\t\t// `maxHeight` when modal is opened along with a keyboard.\n\t\tconst maxHeightWithOpenKeyboard =\n\t\t\t0.95 *\n\t\t\t( Dimensions.get( 'window' ).height -\n\t\t\t\tthis.keyboardHeight -\n\t\t\t\tstatusBarHeight -\n\t\t\t\tthis.headerHeight );\n\n\t\t// In landscape orientation, set `maxHeight` to ~96% of the height.\n\t\tif ( width > height ) {\n\t\t\tthis.setState( {\n\t\t\t\tmaxHeight: Math.min(\n\t\t\t\t\t0.96 * height - this.headerHeight,\n\t\t\t\t\tmaxHeightWithOpenKeyboard\n\t\t\t\t),\n\t\t\t} );\n\t\t\t// In portrait orientation, set `maxHeight` to ~59% of the height.\n\t\t} else {\n\t\t\tthis.setState( {\n\t\t\t\tmaxHeight: Math.min(\n\t\t\t\t\theight * 0.59 - safeAreaBottomInset - this.headerHeight,\n\t\t\t\t\tmaxHeightWithOpenKeyboard\n\t\t\t\t),\n\t\t\t} );\n\t\t}\n\t}\n\n\tonDimensionsChange() {\n\t\tthis.onSetMaxHeight();\n\t\tthis.setState( { bounces: false } );\n\t}\n\n\tonHeaderLayout( { nativeEvent } ) {\n\t\tconst { height } = nativeEvent.layout;\n\t\t// The layout animation should only be triggered if the header\n\t\t// height has changed after being mounted.\n\t\tif (\n\t\t\tthis.headerHeight !== 0 &&\n\t\t\tMath.round( height ) !== Math.round( this.headerHeight )\n\t\t) {\n\t\t\tthis.performRegularLayoutAnimation( {\n\t\t\t\tuseLastLayoutAnimation: true,\n\t\t\t} );\n\t\t}\n\t\tthis.headerHeight = height;\n\t\tthis.onSetMaxHeight();\n\t}\n\n\tisCloseToBottom( { layoutMeasurement, contentOffset, contentSize } ) {\n\t\treturn (\n\t\t\tlayoutMeasurement.height + contentOffset.y >=\n\t\t\tcontentSize.height - contentOffset.y\n\t\t);\n\t}\n\n\tisCloseToTop( { contentOffset } ) {\n\t\treturn contentOffset.y < 10;\n\t}\n\n\tonScroll( { nativeEvent } ) {\n\t\tif ( this.isCloseToTop( nativeEvent ) ) {\n\t\t\tthis.setState( { bounces: false } );\n\t\t} else {\n\t\t\tthis.setState( { bounces: true } );\n\t\t}\n\t}\n\n\tonDismiss() {\n\t\tconst { onDismiss } = this.props;\n\n\t\tif ( onDismiss ) {\n\t\t\tonDismiss();\n\t\t}\n\n\t\tthis.onCloseBottomSheet();\n\t}\n\n\tonShouldEnableScroll( value ) {\n\t\tthis.setState( { scrollEnabled: value } );\n\t}\n\n\tonShouldSetBottomSheetMaxHeight( value ) {\n\t\tthis.setState( { isMaxHeightSet: value } );\n\t}\n\n\tisScrolling( value ) {\n\t\tthis.setState( { isScrolling: value } );\n\t}\n\n\tonHandleClosingBottomSheet( action ) {\n\t\tthis.setState( { handleClosingBottomSheet: action } );\n\t}\n\n\tonHandleHardwareButtonPress( action ) {\n\t\tthis.setState( { handleHardwareButtonPress: action } );\n\t}\n\n\tonCloseBottomSheet() {\n\t\tconst { onClose } = this.props;\n\t\tconst { handleClosingBottomSheet } = this.state;\n\t\tif ( handleClosingBottomSheet ) {\n\t\t\thandleClosingBottomSheet();\n\t\t\tthis.onHandleClosingBottomSheet( null );\n\t\t}\n\t\tif ( onClose ) {\n\t\t\tonClose();\n\t\t}\n\t\tthis.onShouldSetBottomSheetMaxHeight( true );\n\t}\n\n\tsetIsFullScreen( isFullScreen ) {\n\t\tif ( isFullScreen !== this.state.isFullScreen ) {\n\t\t\tif ( isFullScreen ) {\n\t\t\t\tthis.setState( { isFullScreen, isMaxHeightSet: false } );\n\t\t\t} else {\n\t\t\t\tthis.setState( { isFullScreen, isMaxHeightSet: true } );\n\t\t\t}\n\t\t}\n\t}\n\n\tonHardwareButtonPress() {\n\t\tconst { onClose } = this.props;\n\t\tconst { handleHardwareButtonPress } = this.state;\n\t\tif ( handleHardwareButtonPress && handleHardwareButtonPress() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( onClose ) {\n\t\t\treturn onClose();\n\t\t}\n\t}\n\n\tgetContentStyle() {\n\t\tconst { safeAreaBottomInset } = this.state;\n\t\treturn {\n\t\t\tpaddingBottom:\n\t\t\t\t( safeAreaBottomInset || 0 ) +\n\t\t\t\tstyles.scrollableContent.paddingBottom,\n\t\t};\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\ttitle = '',\n\t\t\tisVisible,\n\t\t\tleftButton,\n\t\t\trightButton,\n\t\t\theader,\n\t\t\thideHeader,\n\t\t\tstyle = {},\n\t\t\tcontentStyle = {},\n\t\t\tgetStylesFromColorScheme,\n\t\t\tchildren,\n\t\t\twithHeaderSeparator = false,\n\t\t\thasNavigation,\n\t\t\tonDismiss,\n\t\t\t...rest\n\t\t} = this.props;\n\t\tconst {\n\t\t\tmaxHeight,\n\t\t\tbounces,\n\t\t\tsafeAreaBottomInset,\n\t\t\tsafeAreaTopInset,\n\t\t\tisScrolling,\n\t\t\tscrollEnabled,\n\t\t\tisMaxHeightSet,\n\t\t\tisFullScreen,\n\t\t} = this.state;\n\n\t\tconst panResponder = PanResponder.create( {\n\t\t\tonMoveShouldSetPanResponder: ( evt, gestureState ) => {\n\t\t\t\t// 'swiping-to-close' option is temporarily and partially disabled\n\t\t\t\t// on Android ( swipe / drag is still available in the top most area - near drag indicator).\n\t\t\t\tif ( Platform.OS === 'ios' ) {\n\t\t\t\t\t// Activates swipe down over child Touchables if the swipe is long enough.\n\t\t\t\t\t// With this we can adjust sensibility on the swipe vs tap gestures.\n\t\t\t\t\tif ( gestureState.dy > 3 && ! bounces ) {\n\t\t\t\t\t\tgestureState.dy = 0;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t},\n\t\t} );\n\n\t\tconst backgroundStyle = getStylesFromColorScheme(\n\t\t\tstyles.background,\n\t\t\tstyles.backgroundDark\n\t\t);\n\n\t\tconst bottomSheetHeaderTitleStyle = getStylesFromColorScheme(\n\t\t\tstyles.bottomSheetHeaderTitle,\n\t\t\tstyles.bottomSheetHeaderTitleDark\n\t\t);\n\n\t\tlet listStyle = {};\n\t\tif ( isFullScreen ) {\n\t\t\tlistStyle = { flexGrow: 1, flexShrink: 1 };\n\t\t} else if ( isMaxHeightSet ) {\n\t\t\tlistStyle = { maxHeight };\n\n\t\t\t// Allow setting a \"static\" height of the bottom sheet\n\t\t\t// by setting the min height to the max height.\n\t\t\tif ( this.props.setMinHeightToMaxHeight ) {\n\t\t\t\tlistStyle.minHeight = maxHeight;\n\t\t\t}\n\t\t}\n\n\t\tconst listProps = {\n\t\t\tdisableScrollViewPanResponder: true,\n\t\t\tbounces,\n\t\t\tonScroll: this.onScroll,\n\t\t\tonScrollBeginDrag: this.onScrollBeginDrag,\n\t\t\tonScrollEndDrag: this.onScrollEndDrag,\n\t\t\tscrollEventThrottle: 16,\n\t\t\tcontentContainerStyle: [\n\t\t\t\tstyles.content,\n\t\t\t\thideHeader && styles.emptyHeader,\n\t\t\t\tcontentStyle,\n\t\t\t\tisFullScreen && { flexGrow: 1 },\n\t\t\t],\n\t\t\tstyle: listStyle,\n\t\t\tsafeAreaBottomInset,\n\t\t\tscrollEnabled,\n\t\t\tautomaticallyAdjustContentInsets: false,\n\t\t};\n\n\t\tconst WrapperView = hasNavigation ? View : ScrollView;\n\n\t\tconst getHeader = () => (\n\t\t\t<>\n\t\t\t\t{ header || (\n\t\t\t\t\t<View style={ styles.bottomSheetHeader }>\n\t\t\t\t\t\t<View style={ styles.flex }>{ leftButton }</View>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tstyle={ bottomSheetHeaderTitleStyle }\n\t\t\t\t\t\t\tmaxFontSizeMultiplier={ 3 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<View style={ styles.flex }>{ rightButton }</View>\n\t\t\t\t\t</View>\n\t\t\t\t) }\n\t\t\t\t{ withHeaderSeparator && <View style={ styles.separator } /> }\n\t\t\t</>\n\t\t);\n\n\t\tconst showDragIndicator = () => {\n\t\t\t// If iOS or not fullscreen show the drag indicator.\n\t\t\tif ( Platform.OS === 'ios' || ! this.state.isFullScreen ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Otherwise check the allowDragIndicator.\n\t\t\treturn this.props.allowDragIndicator;\n\t\t};\n\n\t\treturn (\n\t\t\t<Modal\n\t\t\t\tisVisible={ isVisible }\n\t\t\t\tstyle={ styles.bottomModal }\n\t\t\t\tanimationInTiming={ 400 }\n\t\t\t\tanimationOutTiming={ 300 }\n\t\t\t\tbackdropTransitionInTiming={ 50 }\n\t\t\t\tbackdropTransitionOutTiming={ 50 }\n\t\t\t\tbackdropOpacity={ 0.2 }\n\t\t\t\tonBackdropPress={ this.onCloseBottomSheet }\n\t\t\t\tonBackButtonPress={ this.onHardwareButtonPress }\n\t\t\t\tonSwipeComplete={ this.onCloseBottomSheet }\n\t\t\t\tonDismiss={ Platform.OS === 'ios' ? this.onDismiss : undefined }\n\t\t\t\tonModalHide={\n\t\t\t\t\tPlatform.OS === 'android' ? this.onDismiss : undefined\n\t\t\t\t}\n\t\t\t\tswipeDirection=\"down\"\n\t\t\t\tonMoveShouldSetResponder={\n\t\t\t\t\tscrollEnabled &&\n\t\t\t\t\tpanResponder.panHandlers.onMoveShouldSetResponder\n\t\t\t\t}\n\t\t\t\tonMoveShouldSetResponderCapture={\n\t\t\t\t\tscrollEnabled &&\n\t\t\t\t\tpanResponder.panHandlers.onMoveShouldSetResponderCapture\n\t\t\t\t}\n\t\t\t\tonAccessibilityEscape={ this.onCloseBottomSheet }\n\t\t\t\ttestID=\"bottom-sheet\"\n\t\t\t\t{ ...rest }\n\t\t\t>\n\t\t\t\t<KeyboardAvoidingView\n\t\t\t\t\tbehavior={ Platform.OS === 'ios' && 'padding' }\n\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t...backgroundStyle,\n\t\t\t\t\t\tborderColor: 'rgba(0, 0, 0, 0.1)',\n\t\t\t\t\t\tmarginTop:\n\t\t\t\t\t\t\tPlatform.OS === 'ios' && isFullScreen\n\t\t\t\t\t\t\t\t? safeAreaTopInset\n\t\t\t\t\t\t\t\t: 0,\n\t\t\t\t\t\tflex: isFullScreen ? 1 : undefined,\n\t\t\t\t\t\t...( Platform.OS === 'android' && isFullScreen\n\t\t\t\t\t\t\t? styles.backgroundFullScreen\n\t\t\t\t\t\t\t: {} ),\n\t\t\t\t\t\t...style,\n\t\t\t\t\t} }\n\t\t\t\t\tkeyboardVerticalOffset={ -safeAreaBottomInset }\n\t\t\t\t>\n\t\t\t\t\t<View\n\t\t\t\t\t\tstyle={ styles.header }\n\t\t\t\t\t\tonLayout={ this.onHeaderLayout }\n\t\t\t\t\t\ttestID={ `${ rest.testID || 'bottom-sheet' }-header` }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ showDragIndicator() && (\n\t\t\t\t\t\t\t<View style={ styles.dragIndicator } />\n\t\t\t\t\t\t) }\n\t\t\t\t\t\t{ ! hideHeader && getHeader() }\n\t\t\t\t\t</View>\n\t\t\t\t\t<WrapperView\n\t\t\t\t\t\t{ ...( hasNavigation\n\t\t\t\t\t\t\t? { style: listProps.style }\n\t\t\t\t\t\t\t: listProps ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t<BottomSheetProvider\n\t\t\t\t\t\t\tvalue={ {\n\t\t\t\t\t\t\t\tshouldEnableBottomSheetScroll:\n\t\t\t\t\t\t\t\t\tthis.onShouldEnableScroll,\n\t\t\t\t\t\t\t\tshouldEnableBottomSheetMaxHeight:\n\t\t\t\t\t\t\t\t\tthis.onShouldSetBottomSheetMaxHeight,\n\t\t\t\t\t\t\t\tisBottomSheetContentScrolling: isScrolling,\n\t\t\t\t\t\t\t\tonHandleClosingBottomSheet:\n\t\t\t\t\t\t\t\t\tthis.onHandleClosingBottomSheet,\n\t\t\t\t\t\t\t\tonHandleHardwareButtonPress:\n\t\t\t\t\t\t\t\t\tthis.onHandleHardwareButtonPress,\n\t\t\t\t\t\t\t\tlistProps,\n\t\t\t\t\t\t\t\tsetIsFullScreen: this.setIsFullScreen,\n\t\t\t\t\t\t\t\tsafeAreaBottomInset,\n\t\t\t\t\t\t\t\tmaxHeight,\n\t\t\t\t\t\t\t\tisMaxHeightSet,\n\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ hasNavigation ? (\n\t\t\t\t\t\t\t\t<>{ children }</>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<TouchableHighlight accessible={ false }>\n\t\t\t\t\t\t\t\t\t<>{ children }</>\n\t\t\t\t\t\t\t\t</TouchableHighlight>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</BottomSheetProvider>\n\t\t\t\t\t\t{ ! hasNavigation && (\n\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\theight:\n\t\t\t\t\t\t\t\t\t\tsafeAreaBottomInset ||\n\t\t\t\t\t\t\t\t\t\tstyles.scrollableContent.paddingBottom,\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</WrapperView>\n\t\t\t\t</KeyboardAvoidingView>\n\t\t\t</Modal>\n\t\t);\n\t}\n}\n\nfunction getWidth() {\n\treturn Math.min(\n\t\tDimensions.get( 'window' ).width,\n\t\tstyles.background.maxWidth\n\t);\n}\n\nconst ThemedBottomSheet = withPreferredColorScheme( BottomSheet );\n\nThemedBottomSheet.getWidth = getWidth;\nThemedBottomSheet.Button = Button;\nThemedBottomSheet.Cell = Cell;\nThemedBottomSheet.SubSheet = BottomSheetSubSheet;\nThemedBottomSheet.NavBar = NavBar;\nThemedBottomSheet.CyclePickerCell = CyclePickerCell;\nThemedBottomSheet.PickerCell = PickerCell;\nThemedBottomSheet.SwitchCell = SwitchCell;\nThemedBottomSheet.RangeCell = RangeCell;\nThemedBottomSheet.ColorCell = ColorCell;\nThemedBottomSheet.LinkCell = LinkCell;\nThemedBottomSheet.LinkSuggestionItemCell = LinkSuggestionItemCell;\nThemedBottomSheet.RadioCell = RadioCell;\nThemedBottomSheet.NavigationScreen = NavigationScreen;\nThemedBottomSheet.NavigationContainer = NavigationContainer;\n\nexport default ThemedBottomSheet;\n"],"mappings":";;;;;;;AAsBA,IAAAA,QAAA,GAAAC,OAAA;AAnBA,IAAAC,YAAA,GAAAD,OAAA;AAYA,IAAAE,iBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,oBAAA,GAAAD,sBAAA,CAAAH,OAAA;AAKA,IAAAK,kBAAA,GAAAL,OAAA;AAEA,IAAAM,QAAA,GAAAN,OAAA;AAKA,IAAAO,OAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,OAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,KAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,gBAAA,GAAAP,sBAAA,CAAAH,OAAA;AACA,IAAAW,WAAA,GAAAR,sBAAA,CAAAH,OAAA;AACA,IAAAY,WAAA,GAAAT,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AAEA,MAAMC,iBAAiB,GAAG,IAAAC,iCAAwB,EAAEhM,WAAY,CAAC;AAEjE+L,iBAAiB,CAACF,QAAQ,GAAGA,QAAQ;AACrCE,iBAAiB,CAACE,MAAM,GAAGA,eAAM;AACjCF,iBAAiB,CAACG,IAAI,GAAGA,aAAI;AAC7BH,iBAAiB,CAACI,QAAQ,GAAGC,iBAAmB;AAChDL,iBAAiB,CAACM,MAAM,GAAGA,eAAM;AACjCN,iBAAiB,CAACO,eAAe,GAAGA,wBAAe;AACnDP,iBAAiB,CAACQ,UAAU,GAAGA,mBAAU;AACzCR,iBAAiB,CAACS,UAAU,GAAGA,mBAAU;AACzCT,iBAAiB,CAACU,SAAS,GAAGA,kBAAS;AACvCV,iBAAiB,CAACW,SAAS,GAAGA,kBAAS;AACvCX,iBAAiB,CAACY,QAAQ,GAAGA,iBAAQ;AACrCZ,iBAAiB,CAACa,sBAAsB,GAAGA,+BAAsB;AACjEb,iBAAiB,CAACc,SAAS,GAAGA,kBAAS;AACvCd,iBAAiB,CAACe,gBAAgB,GAAGA,yBAAgB;AACrDf,iBAAiB,CAACgB,mBAAmB,GAAGA,4BAAmB;AAAC,IAAAC,QAAA,GAE7CjB,iBAAiB;AAAAkB,OAAA,CAAAnD,OAAA,GAAAkD,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_utils","GlobalStylesContext","createContext","style","BLOCK_STYLE_ATTRIBUTES","getMergedGlobalStyles","baseGlobalStyles","globalStyle","wrapperPropsStyle","blockAttributes","defaultColors","blockName","fontSizes","baseGlobalColors","baseColors","color","typography","elements","link","blocks","blockStyleAttributes","Object","fromEntries","entries","filter","key","includes","wrapperPropsStyleFiltered","mergedStyle","blockColors","getBlockColors","blockPaddings","getBlockPaddings","blockTypography","getBlockTypography","exports","useGlobalStyles","globalStyles","useContext","withGlobalStyles","WrappedComponent","props","createElement","Consumer","_default","default"],"sources":["@wordpress/components/src/mobile/global-styles-context/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tBLOCK_STYLE_ATTRIBUTES,\n\tgetBlockPaddings,\n\tgetBlockColors,\n\tgetBlockTypography,\n} from './utils';\n\nconst GlobalStylesContext = createContext( { style: {} } );\n\nGlobalStylesContext.BLOCK_STYLE_ATTRIBUTES = BLOCK_STYLE_ATTRIBUTES;\n\nexport const getMergedGlobalStyles = (\n\tbaseGlobalStyles,\n\tglobalStyle,\n\twrapperPropsStyle,\n\tblockAttributes,\n\tdefaultColors,\n\tblockName,\n\tfontSizes\n) => {\n\t// Current support for general styles and blocks.\n\tconst baseGlobalColors = {\n\t\tbaseColors: {\n\t\t\tcolor: baseGlobalStyles?.color,\n\t\t\ttypography: baseGlobalStyles?.typography,\n\t\t\telements: {\n\t\t\t\tlink: baseGlobalStyles?.elements?.link,\n\t\t\t},\n\t\t\tblocks: {\n\t\t\t\t'core/button': baseGlobalStyles?.blocks?.[ 'core/button' ],\n\t\t\t},\n\t\t},\n\t};\n\n\tconst blockStyleAttributes = Object.fromEntries(\n\t\tObject.entries( blockAttributes ?? {} ).filter( ( [ key ] ) =>\n\t\t\tBLOCK_STYLE_ATTRIBUTES.includes( key )\n\t\t)\n\t);\n\n\t// This prevents certain wrapper styles from being applied to blocks that\n\t// don't support them yet.\n\tconst wrapperPropsStyleFiltered = Object.fromEntries(\n\t\tObject.entries( wrapperPropsStyle ?? {} ).filter( ( [ key ] ) =>\n\t\t\tBLOCK_STYLE_ATTRIBUTES.includes( key )\n\t\t)\n\t);\n\n\tconst mergedStyle = {\n\t\t...baseGlobalColors,\n\t\t...globalStyle,\n\t\t...wrapperPropsStyleFiltered,\n\t};\n\tconst blockColors = getBlockColors(\n\t\tblockStyleAttributes,\n\t\tdefaultColors,\n\t\tblockName,\n\t\tbaseGlobalStyles\n\t);\n\tconst blockPaddings = getBlockPaddings(\n\t\tmergedStyle,\n\t\twrapperPropsStyle,\n\t\tblockStyleAttributes,\n\t\tblockColors\n\t);\n\tconst blockTypography = getBlockTypography(\n\t\tblockStyleAttributes,\n\t\tfontSizes,\n\t\tblockName,\n\t\tbaseGlobalStyles\n\t);\n\n\treturn {\n\t\t...mergedStyle,\n\t\t...blockPaddings,\n\t\t...blockColors,\n\t\t...blockTypography,\n\t};\n};\n\nexport const useGlobalStyles = () => {\n\tconst globalStyles = useContext( GlobalStylesContext );\n\n\treturn globalStyles;\n};\n\nexport const withGlobalStyles = ( WrappedComponent ) => ( props ) =>\n\t(\n\t\t<GlobalStylesContext.Consumer>\n\t\t\t{ ( globalStyles ) => (\n\t\t\t\t<WrappedComponent { ...props } globalStyles={ globalStyles } />\n\t\t\t) }\n\t\t</GlobalStylesContext.Consumer>\n\t);\n\nexport default GlobalStylesContext;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,GAAAD,OAAA;AARA;AACA;AACA;;AAGA;AACA;AACA;;AAQA,MAAME,mBAAmB,GAAG,IAAAC,sBAAa,EAAE;EAAEC,KAAK,EAAE,CAAC;AAAE,CAAE,CAAC;AAE1DF,mBAAmB,CAACG,sBAAsB,GAAGA,6BAAsB;AAE5D,MAAMC,qBAAqB,GAAGA,CACpCC,gBAAgB,EAChBC,WAAW,EACXC,iBAAiB,EACjBC,eAAe,EACfC,aAAa,EACbC,SAAS,EACTC,SAAS,KACL;EACJ;EACA,MAAMC,gBAAgB,GAAG;IACxBC,UAAU,EAAE;MACXC,KAAK,EAAET,gBAAgB,EAAES,KAAK;MAC9BC,UAAU,EAAEV,gBAAgB,EAAEU,UAAU;MACxCC,QAAQ,EAAE;QACTC,IAAI,EAAEZ,gBAAgB,EAAEW,QAAQ,EAAEC;MACnC,CAAC;MACDC,MAAM,EAAE;QACP,aAAa,EAAEb,gBAAgB,EAAEa,MAAM,GAAI,aAAa;MACzD;IACD;EACD,CAAC;EAED,MAAMC,oBAAoB,GAAGC,MAAM,CAACC,WAAW,CAC9CD,MAAM,C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EAACzC,mBAAmB,CAAC0C,QAAQ,QACxBN,YAAY,IACf,IAAAvC,QAAA,CAAA4C,aAAA,EAACF,gBAAgB;EAAA,GAAMC,KAAK;EAAGJ,YAAY,EAAGA;AAAc,CAAE,CAElC,CAC9B;AAACF,OAAA,CAAAI,gBAAA,GAAAA,gBAAA;AAAA,IAAAK,QAAA,GAEY3C,mBAAmB;AAAAkC,OAAA,CAAAU,OAAA,GAAAD,QAAA"}
1
+ {"version":3,"names":["_element","require","_utils","GlobalStylesContext","createContext","style","BLOCK_STYLE_ATTRIBUTES","getMergedGlobalStyles","baseGlobalStyles","globalStyle","wrapperPropsStyle","blockAttributes","defaultColors","blockName","fontSizes","baseGlobalColors","baseColors","color","typography","elements","link","blocks","blockStyleAttributes","Object","fromEntries","entries","filter","key","includes","wrapperPropsStyleFiltered","mergedStyle","blockColors","getBlockColors","blockPaddings","getBlockPaddings","blockTypography","getBlockTypography","exports","useGlobalStyles","globalStyles","useContext","withGlobalStyles","WrappedComponent","props","createElement","Consumer","_default","default"],"sources":["@wordpress/components/src/mobile/global-styles-context/index.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { createContext, useContext } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport {\n\tBLOCK_STYLE_ATTRIBUTES,\n\tgetBlockPaddings,\n\tgetBlockColors,\n\tgetBlockTypography,\n} from './utils';\n\nconst GlobalStylesContext = createContext( { style: {} } );\n\nGlobalStylesContext.BLOCK_STYLE_ATTRIBUTES = BLOCK_STYLE_ATTRIBUTES;\n\nexport const getMergedGlobalStyles = (\n\tbaseGlobalStyles,\n\tglobalStyle,\n\twrapperPropsStyle,\n\tblockAttributes,\n\tdefaultColors,\n\tblockName,\n\tfontSizes\n) => {\n\t// Current support for general styles and blocks.\n\tconst baseGlobalColors = {\n\t\tbaseColors: {\n\t\t\tcolor: baseGlobalStyles?.color,\n\t\t\ttypography: baseGlobalStyles?.typography,\n\t\t\telements: {\n\t\t\t\tlink: baseGlobalStyles?.elements?.link,\n\t\t\t},\n\t\t\tblocks: {\n\t\t\t\t'core/button': baseGlobalStyles?.blocks?.[ 'core/button' ],\n\t\t\t},\n\t\t},\n\t};\n\n\tconst blockStyleAttributes = Object.fromEntries(\n\t\tObject.entries( blockAttributes ?? {} ).filter( ( [ key ] ) =>\n\t\t\tBLOCK_STYLE_ATTRIBUTES.includes( key )\n\t\t)\n\t);\n\n\t// This prevents certain wrapper styles from being applied to blocks that\n\t// don't support them yet.\n\tconst wrapperPropsStyleFiltered = Object.fromEntries(\n\t\tObject.entries( wrapperPropsStyle ?? {} ).filter( ( [ key ] ) =>\n\t\t\tBLOCK_STYLE_ATTRIBUTES.includes( key )\n\t\t)\n\t);\n\n\tconst mergedStyle = {\n\t\t...baseGlobalColors,\n\t\t...globalStyle,\n\t\t...wrapperPropsStyleFiltered,\n\t};\n\tconst blockColors = getBlockColors(\n\t\tblockStyleAttributes,\n\t\tdefaultColors,\n\t\tblockName,\n\t\tbaseGlobalStyles\n\t);\n\tconst blockPaddings = getBlockPaddings(\n\t\tmergedStyle,\n\t\twrapperPropsStyle,\n\t\tblockStyleAttributes,\n\t\tblockColors\n\t);\n\tconst blockTypography = getBlockTypography(\n\t\tblockStyleAttributes,\n\t\tfontSizes,\n\t\tblockName,\n\t\tbaseGlobalStyles\n\t);\n\n\treturn {\n\t\t...mergedStyle,\n\t\t...blockPaddings,\n\t\t...blockColors,\n\t\t...blockTypography,\n\t};\n};\n\nexport const useGlobalStyles = () => {\n\tconst globalStyles = useContext( GlobalStylesContext );\n\n\treturn globalStyles;\n};\n\nexport const withGlobalStyles = ( WrappedComponent ) => ( props ) => (\n\t<GlobalStylesContext.Consumer>\n\t\t{ ( globalStyles ) => (\n\t\t\t<WrappedComponent { ...props } globalStyles={ globalStyles } />\n\t\t) }\n\t</GlobalStylesContext.Consumer>\n);\n\nexport default GlobalStylesContext;\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAKA,IAAAC,MAAA,G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AAC,qBAAc,EACjCV,oBAAoB,EACpBV,aAAa,EACbC,SAAS,EACTL,gBACD,CAAC;EACD,MAAMyB,aAAa,GAAG,IAAAC,uBAAgB,EACrCJ,WAAW,EACXpB,iBAAiB,EACjBY,oBAAoB,EACpBS,WACD,CAAC;EACD,MAAMI,eAAe,GAAG,IAAAC,yBAAkB,EACzCd,oBAAoB,EACpBR,SAAS,EACTD,SAAS,EACTL,gBACD,CAAC;EAED,OAAO;IACN,GAAGsB,WAAW;IACd,GAAGG,aAAa;IAChB,GAAGF,WAAW;IACd,GAAGI;EACJ,CAAC;AACF,CAAC;AAACE,OAAA,CAAA9B,qBAAA,GAAAA,qBAAA;AAEK,MAAM+B,eAAe,GAAGA,CAAA,KAAM;EACpC,MAAMC,YAAY,GAAG,IAAAC,mBAAU,EAAErC,mBAAoB,CAAC;EAEtD,OAAOoC,YAAY;AACpB,CAAC;AAACF,OAAA,CAAAC,eAAA,GAAAA,eAAA;AAEK,MAAMG,gBAAgB,GAAKC,gBAAgB,IAAQC,KAAK,IAC9D,IAAA3C,QAAA,CAAA4C,aAAA,EAACzC,mBAAmB,CAAC0C,QAAQ,QACxBN,YAAY,IACf,IAAAvC,QAAA,CAAA4C,aAAA,EAACF,gBAAgB;EAAA,GAAMC,KAAK;EAAGJ,YAAY,EAAGA;AAAc,CAAE,CAElC,CAC9B;AAACF,OAAA,CAAAI,gBAAA,GAAAA,gBAAA;AAAA,IAAAK,QAAA,GAEa3C,mBAAmB;AAAAkC,OAAA,CAAAU,OAAA,GAAAD,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","useNavigationTreeNodes","nodes","setNodes","useState","getNode","key","addNode","value","children","newNode","original","removeNode","removedNode","remainingNodes"],"sources":["@wordpress/components/src/navigation/use-navigation-tree-nodes.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\nexport function useNavigationTreeNodes<\n\tTNode extends { children?: React.ReactNode; [ key: string ]: unknown }\n>() {\n\tconst [ nodes, setNodes ] = useState<\n\t\tRecord< string, Omit< TNode, 'children' > >\n\t>( {} );\n\n\tconst getNode = ( key: string ) => nodes[ key ];\n\n\tconst addNode = ( key: string, value: TNode ) => {\n\t\tconst { children, ...newNode } = value;\n\t\treturn setNodes( ( original ) => ( {\n\t\t\t...original,\n\t\t\t[ key ]: newNode,\n\t\t} ) );\n\t};\n\n\tconst removeNode = ( key: keyof typeof nodes ) => {\n\t\treturn setNodes( ( original ) => {\n\t\t\tconst { [ key ]: removedNode, ...remainingNodes } = original;\n\t\t\treturn remainingNodes;\n\t\t} );\n\t};\n\n\treturn { nodes, getNode, addNode, removeNode };\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,SAASC,sBAAsBA,CAAA,EAElC;EACH,MAAM,CAAEC,KAAK,EAAEC,QAAQ,CAAE,GAAG,IAAAC,iBAAQ,EAEjC,CAAC,CAAE,CAAC;EAEP,MAAMC,OAAO,GAAKC,GAAW,IAAMJ,KAAK,CAAEI,GAAG,CAAE;EAE/C,MAAMC,OAAO,GAAGA,CAAED,GAAW,EAAEE,KAAY,KAAM;IAChD,MAAM;MAAEC,QAAQ;MAAE,GAAGC;IAAQ,CAAC,GAAGF,KAAK;IACtC,OAAOL,QAAQ,CAAIQ,QAAQ,KAAQ;MAClC,GAAGA,QAAQ;MACX,CAAEL,GAAG,GAAII;IACV,CAAC,CAAG,CAAC;EACN,CAAC;EAED,MAAME,UAAU,GAAKN,GAAuB,IAAM;IACjD,OAAOH,QAAQ,CAAIQ,QAAQ,IAAM;MAChC,MAAM;QAAE,CAAEL,GAAG,GAAIO,WAAW;QAAE,GAAGC;MAAe,CAAC,GAAGH,QAAQ;MAC5D,OAAOG,cAAc;IACtB,CAAE,CAAC;EACJ,CAAC;EAED,OAAO;IAAEZ,KAAK;IAAEG,OAAO;IAAEE,OAAO;IAAEK;EAAW,CAAC;AAC/C"}
1
+ {"version":3,"names":["_element","require","useNavigationTreeNodes","nodes","setNodes","useState","getNode","key","addNode","value","children","newNode","original","removeNode","removedNode","remainingNodes"],"sources":["@wordpress/components/src/navigation/use-navigation-tree-nodes.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useState } from '@wordpress/element';\n\nexport function useNavigationTreeNodes<\n\tTNode extends { children?: React.ReactNode; [ key: string ]: unknown },\n>() {\n\tconst [ nodes, setNodes ] = useState<\n\t\tRecord< string, Omit< TNode, 'children' > >\n\t>( {} );\n\n\tconst getNode = ( key: string ) => nodes[ key ];\n\n\tconst addNode = ( key: string, value: TNode ) => {\n\t\tconst { children, ...newNode } = value;\n\t\treturn setNodes( ( original ) => ( {\n\t\t\t...original,\n\t\t\t[ key ]: newNode,\n\t\t} ) );\n\t};\n\n\tconst removeNode = ( key: keyof typeof nodes ) => {\n\t\treturn setNodes( ( original ) => {\n\t\t\tconst { [ key ]: removedNode, ...remainingNodes } = original;\n\t\t\treturn remainingNodes;\n\t\t} );\n\t};\n\n\treturn { nodes, getNode, addNode, removeNode };\n}\n"],"mappings":";;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,SAASC,sBAAsBA,CAAA,EAElC;EACH,MAAM,CAAEC,KAAK,EAAEC,QAAQ,CAAE,GAAG,IAAAC,iBAAQ,EAEjC,CAAC,CAAE,CAAC;EAEP,MAAMC,OAAO,GAAKC,GAAW,IAAMJ,KAAK,CAAEI,GAAG,CAAE;EAE/C,MAAMC,OAAO,GAAGA,CAAED,GAAW,EAAEE,KAAY,KAAM;IAChD,MAAM;MAAEC,QAAQ;MAAE,GAAGC;IAAQ,CAAC,GAAGF,KAAK;IACtC,OAAOL,QAAQ,CAAIQ,QAAQ,KAAQ;MAClC,GAAGA,QAAQ;MACX,CAAEL,GAAG,GAAII;IACV,CAAC,CAAG,CAAC;EACN,CAAC;EAED,MAAME,UAAU,GAAKN,GAAuB,IAAM;IACjD,OAAOH,QAAQ,CAAIQ,QAAQ,IAAM;MAChC,MAAM;QAAE,CAAEL,GAAG,GAAIO,WAAW;QAAE,GAAGC;MAAe,CAAC,GAAGH,QAAQ;MAC5D,OAAOG,cAAc;IACtB,CAAE,CAAC;EACJ,CAAC;EAED,OAAO;IAAEZ,KAAK;IAAEG,OAAO;IAAEE,OAAO;IAAEK;EAAW,CAAC;AAC/C"}
@@ -11,6 +11,7 @@ var _i18n = require("@wordpress/i18n");
11
11
  var _a11y = require("@wordpress/a11y");
12
12
  var _icons = require("@wordpress/icons");
13
13
  var _button = _interopRequireDefault(require("../button"));
14
+ var _visuallyHidden = require("../visually-hidden");
14
15
  /**
15
16
  * External dependencies
16
17
  */
@@ -43,11 +44,24 @@ function getDefaultPoliteness(status) {
43
44
  case 'warning':
44
45
  case 'info':
45
46
  return 'polite';
46
- case 'error':
47
+ // The default will also catch the 'error' status.
47
48
  default:
48
49
  return 'assertive';
49
50
  }
50
51
  }
52
+ function getStatusLabel(status) {
53
+ switch (status) {
54
+ case 'warning':
55
+ return (0, _i18n.__)('Warning notice');
56
+ case 'info':
57
+ return (0, _i18n.__)('Information notice');
58
+ case 'error':
59
+ return (0, _i18n.__)('Error notice');
60
+ // The default will also catch the 'success' status.
61
+ default:
62
+ return (0, _i18n.__)('Notice');
63
+ }
64
+ }
51
65
 
52
66
  /**
53
67
  * `Notice` is a component used to communicate feedback to the user.
@@ -82,14 +96,13 @@ function Notice({
82
96
  if (__unstableHTML && typeof children === 'string') {
83
97
  children = (0, _element.createElement)(_element.RawHTML, null, children);
84
98
  }
85
- const onDismissNotice = event => {
86
- event?.preventDefault?.();
99
+ const onDismissNotice = () => {
87
100
  onDismiss();
88
101
  onRemove();
89
102
  };
90
103
  return (0, _element.createElement)("div", {
91
104
  className: classes
92
- }, (0, _element.createElement)("div", {
105
+ }, (0, _element.createElement)(_visuallyHidden.VisuallyHidden, null, getStatusLabel(status)), (0, _element.createElement)("div", {
93
106
  className: "components-notice__content"
94
107
  }, children, (0, _element.createElement)("div", {
95
108
  className: "components-notice__actions"
@@ -119,9 +132,8 @@ function Notice({
119
132
  }))), isDismissible && (0, _element.createElement)(_button.default, {
120
133
  className: "components-notice__dismiss",
121
134
  icon: _icons.close,
122
- label: (0, _i18n.__)('Dismiss this notice'),
123
- onClick: onDismissNotice,
124
- showTooltip: false
135
+ label: (0, _i18n.__)('Close'),
136
+ onClick: onDismissNotice
125
137
  }));
126
138
  }
127
139
  var _default = Notice;
@@ -1 +1 @@
1
- {"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_i18n","_a11y","_icons","_button","noop","useSpokenMessage","message","politeness","spokenMessage","renderToString","useEffect","speak","getDefaultPoliteness","status","Notice","className","children","onRemove","isDismissible","actions","__unstableHTML","onDismiss","classes","classnames","createElement","RawHTML","onDismissNotice","event","preventDefault","map","buttonCustomClasses","label","isPrimary","variant","noDefaultClasses","onClick","url","index","computedVariant","default","key","href","undefined","icon","close","__","showTooltip","_default","exports"],"sources":["@wordpress/components/src/notice/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { RawHTML, useEffect, renderToString } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\nimport { close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { NoticeAction, NoticeProps } from './types';\nimport type { SyntheticEvent } from 'react';\nimport type { DeprecatedButtonProps } from '../button/types';\n\nconst noop = () => {};\n\n/**\n * Custom hook which announces the message with the given politeness, if a\n * valid message is provided.\n */\nfunction useSpokenMessage(\n\tmessage: NoticeProps[ 'spokenMessage' ],\n\tpoliteness: NoticeProps[ 'politeness' ]\n) {\n\tconst spokenMessage =\n\t\ttypeof message === 'string' ? message : renderToString( message );\n\n\tuseEffect( () => {\n\t\tif ( spokenMessage ) {\n\t\t\tspeak( spokenMessage, politeness );\n\t\t}\n\t}, [ spokenMessage, politeness ] );\n}\n\nfunction getDefaultPoliteness( status: NoticeProps[ 'status' ] ) {\n\tswitch ( status ) {\n\t\tcase 'success':\n\t\tcase 'warning':\n\t\tcase 'info':\n\t\t\treturn 'polite';\n\n\t\tcase 'error':\n\t\tdefault:\n\t\t\treturn 'assertive';\n\t}\n}\n\n/**\n * `Notice` is a component used to communicate feedback to the user.\n *\n *```jsx\n * import { Notice } from `@wordpress/components`;\n *\n * const MyNotice = () => (\n * <Notice status=\"error\">An unknown error occurred.</Notice>\n * );\n * ```\n */\nfunction Notice( {\n\tclassName,\n\tstatus = 'info',\n\tchildren,\n\tspokenMessage = children,\n\tonRemove = noop,\n\tisDismissible = true,\n\tactions = [],\n\tpoliteness = getDefaultPoliteness( status ),\n\t__unstableHTML,\n\t// onDismiss is a callback executed when the notice is dismissed.\n\t// It is distinct from onRemove, which _looks_ like a callback but is\n\t// actually the function to call to remove the notice from the UI.\n\tonDismiss = noop,\n}: NoticeProps ) {\n\tuseSpokenMessage( spokenMessage, politeness );\n\n\tconst classes = classnames(\n\t\tclassName,\n\t\t'components-notice',\n\t\t'is-' + status,\n\t\t{\n\t\t\t'is-dismissible': isDismissible,\n\t\t}\n\t);\n\n\tif ( __unstableHTML && typeof children === 'string' ) {\n\t\tchildren = <RawHTML>{ children }</RawHTML>;\n\t}\n\n\tconst onDismissNotice = ( event: SyntheticEvent ) => {\n\t\tevent?.preventDefault?.();\n\t\tonDismiss();\n\t\tonRemove();\n\t};\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t<div className=\"components-notice__content\">\n\t\t\t\t{ children }\n\t\t\t\t<div className=\"components-notice__actions\">\n\t\t\t\t\t{ actions.map(\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tclassName: buttonCustomClasses,\n\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\tisPrimary,\n\t\t\t\t\t\t\t\tvariant,\n\t\t\t\t\t\t\t\tnoDefaultClasses = false,\n\t\t\t\t\t\t\t\tonClick,\n\t\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\t}: NoticeAction &\n\t\t\t\t\t\t\t\t// `isPrimary` is a legacy prop included for\n\t\t\t\t\t\t\t\t// backcompat, but `variant` should be used\n\t\t\t\t\t\t\t\t// instead.\n\t\t\t\t\t\t\t\tPick< DeprecatedButtonProps, 'isPrimary' >,\n\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\tlet computedVariant = variant;\n\t\t\t\t\t\t\tif ( variant !== 'primary' && ! noDefaultClasses ) {\n\t\t\t\t\t\t\t\tcomputedVariant = ! url ? 'secondary' : 'link';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\ttypeof computedVariant === 'undefined' &&\n\t\t\t\t\t\t\t\tisPrimary\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcomputedVariant = 'primary';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\t\t\t\tvariant={ computedVariant }\n\t\t\t\t\t\t\t\t\tonClick={ url ? undefined : onClick }\n\t\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t\t'components-notice__action',\n\t\t\t\t\t\t\t\t\t\tbuttonCustomClasses\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\t\t{ label }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ isDismissible && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"components-notice__dismiss\"\n\t\t\t\t\ticon={ close }\n\t\t\t\t\tlabel={ __( 'Dismiss this notice' ) }\n\t\t\t\t\tonClick={ onDismissNotice }\n\t\t\t\t\tshowToo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,OAAM;MACNC,GAAG,EAAGH,KAAO;MACbI,IAAI,EAAGL,GAAK;MACZH,OAAO,EAAGK,eAAiB;MAC3BH,OAAO,EAAGC,GAAG,GAAGM,SAAS,GAAGP,OAAS;MACrCpB,SAAS,EAAG,IAAAQ,mBAAU,EACrB,2BAA2B,EAC3BO,mBACD;IAAG,GAEDC,KACK,CAAC;EAEX,CACD,CACI,CACD,CAAC,EACJb,aAAa,IACd,IAAAtB,QAAA,CAAA4B,aAAA,EAACrB,OAAA,CAAAoC,OAAM;IACNxB,SAAS,EAAC,4BAA4B;IACtC4B,IAAI,EAAGC,YAAO;IACdb,KAAK,EAAG,IAAAc,QAAE,EAAE,qBAAsB,CAAG;IACrCV,OAAO,EAAGT,eAAiB;IAC3BoB,WAAW,EAAG;EAAO,CACrB,CAEE,CAAC;AAER;AAAC,IAAAC,QAAA,GAEcjC,MAAM;AAAAkC,OAAA,CAAAT,OAAA,GAAAQ,QAAA"}
1
+ {"version":3,"names":["_element","require","_classnames","_interopRequireDefault","_i18n","_a11y","_icons","_button","_visuallyHidden","noop","useSpokenMessage","message","politeness","spokenMessage","renderToString","useEffect","speak","getDefaultPoliteness","status","getStatusLabel","__","Notice","className","children","onRemove","isDismissible","actions","__unstableHTML","onDismiss","classes","classnames","createElement","RawHTML","onDismissNotice","VisuallyHidden","map","buttonCustomClasses","label","isPrimary","variant","noDefaultClasses","onClick","url","index","computedVariant","default","key","href","undefined","icon","close","_default","exports"],"sources":["@wordpress/components/src/notice/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { RawHTML, useEffect, renderToString } from '@wordpress/element';\nimport { speak } from '@wordpress/a11y';\nimport { close } from '@wordpress/icons';\n\n/**\n * Internal dependencies\n */\nimport Button from '../button';\nimport type { NoticeAction, NoticeProps } from './types';\nimport type { DeprecatedButtonProps } from '../button/types';\nimport { VisuallyHidden } from '../visually-hidden';\n\nconst noop = () => {};\n\n/**\n * Custom hook which announces the message with the given politeness, if a\n * valid message is provided.\n */\nfunction useSpokenMessage(\n\tmessage: NoticeProps[ 'spokenMessage' ],\n\tpoliteness: NoticeProps[ 'politeness' ]\n) {\n\tconst spokenMessage =\n\t\ttypeof message === 'string' ? message : renderToString( message );\n\n\tuseEffect( () => {\n\t\tif ( spokenMessage ) {\n\t\t\tspeak( spokenMessage, politeness );\n\t\t}\n\t}, [ spokenMessage, politeness ] );\n}\n\nfunction getDefaultPoliteness( status: NoticeProps[ 'status' ] ) {\n\tswitch ( status ) {\n\t\tcase 'success':\n\t\tcase 'warning':\n\t\tcase 'info':\n\t\t\treturn 'polite';\n\t\t// The default will also catch the 'error' status.\n\t\tdefault:\n\t\t\treturn 'assertive';\n\t}\n}\n\nfunction getStatusLabel( status: NoticeProps[ 'status' ] ) {\n\tswitch ( status ) {\n\t\tcase 'warning':\n\t\t\treturn __( 'Warning notice' );\n\t\tcase 'info':\n\t\t\treturn __( 'Information notice' );\n\t\tcase 'error':\n\t\t\treturn __( 'Error notice' );\n\t\t// The default will also catch the 'success' status.\n\t\tdefault:\n\t\t\treturn __( 'Notice' );\n\t}\n}\n\n/**\n * `Notice` is a component used to communicate feedback to the user.\n *\n *```jsx\n * import { Notice } from `@wordpress/components`;\n *\n * const MyNotice = () => (\n * <Notice status=\"error\">An unknown error occurred.</Notice>\n * );\n * ```\n */\nfunction Notice( {\n\tclassName,\n\tstatus = 'info',\n\tchildren,\n\tspokenMessage = children,\n\tonRemove = noop,\n\tisDismissible = true,\n\tactions = [],\n\tpoliteness = getDefaultPoliteness( status ),\n\t__unstableHTML,\n\t// onDismiss is a callback executed when the notice is dismissed.\n\t// It is distinct from onRemove, which _looks_ like a callback but is\n\t// actually the function to call to remove the notice from the UI.\n\tonDismiss = noop,\n}: NoticeProps ) {\n\tuseSpokenMessage( spokenMessage, politeness );\n\n\tconst classes = classnames(\n\t\tclassName,\n\t\t'components-notice',\n\t\t'is-' + status,\n\t\t{\n\t\t\t'is-dismissible': isDismissible,\n\t\t}\n\t);\n\n\tif ( __unstableHTML && typeof children === 'string' ) {\n\t\tchildren = <RawHTML>{ children }</RawHTML>;\n\t}\n\n\tconst onDismissNotice = () => {\n\t\tonDismiss();\n\t\tonRemove();\n\t};\n\n\treturn (\n\t\t<div className={ classes }>\n\t\t\t<VisuallyHidden>{ getStatusLabel( status ) }</VisuallyHidden>\n\t\t\t<div className=\"components-notice__content\">\n\t\t\t\t{ children }\n\t\t\t\t<div className=\"components-notice__actions\">\n\t\t\t\t\t{ actions.map(\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tclassName: buttonCustomClasses,\n\t\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\t\tisPrimary,\n\t\t\t\t\t\t\t\tvariant,\n\t\t\t\t\t\t\t\tnoDefaultClasses = false,\n\t\t\t\t\t\t\t\tonClick,\n\t\t\t\t\t\t\t\turl,\n\t\t\t\t\t\t\t}: NoticeAction &\n\t\t\t\t\t\t\t\t// `isPrimary` is a legacy prop included for\n\t\t\t\t\t\t\t\t// backcompat, but `variant` should be used\n\t\t\t\t\t\t\t\t// instead.\n\t\t\t\t\t\t\t\tPick< DeprecatedButtonProps, 'isPrimary' >,\n\t\t\t\t\t\t\tindex\n\t\t\t\t\t\t) => {\n\t\t\t\t\t\t\tlet computedVariant = variant;\n\t\t\t\t\t\t\tif ( variant !== 'primary' && ! noDefaultClasses ) {\n\t\t\t\t\t\t\t\tcomputedVariant = ! url ? 'secondary' : 'link';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\ttypeof computedVariant === 'undefined' &&\n\t\t\t\t\t\t\t\tisPrimary\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tcomputedVariant = 'primary';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tkey={ index }\n\t\t\t\t\t\t\t\t\thref={ url }\n\t\t\t\t\t\t\t\t\tvariant={ computedVariant }\n\t\t\t\t\t\t\t\t\tonClick={ url ? undefined : onClick }\n\t\t\t\t\t\t\t\t\tclassName={ classnames(\n\t\t\t\t\t\t\t\t\t\t'components-notice__action',\n\t\t\t\t\t\t\t\t\t\tbuttonCustomClasses\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\t\t{ label }\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ isDismissible && (\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"components-notice__dismiss\"\n\t\t\t\t\ticon={ close }\n\t\t\t\t\tlabel={ __( 'Close' ) }\n\t\t\t\t\tonClick={ onDismissNotice }\n\t\t\t\t/>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\nexport default Notice;\n"],"mappings":";;;;;;;AASA,IAAAA,QAAA,GAAAC,OAAA;AANA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAKA,IAAAG,KAAA,GAAAH,OAAA;AAEA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAKA,IAAAM,OAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAGA,IAAAO,eAAA,GAAAP,OAAA;AAnBA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAMA,MAAMQ,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;;AAErB;AACA;AACA;AACA;AACA,SAASC,gBAAgBA,CACxBC,OAAuC,EACvCC,UAAuC,EACtC;EACD,MAAMC,aAAa,GAClB,OAAOF,OAAO,KAAK,QAAQ,GAAGA,OAAO,GAAG,IAAAG,uBAAc,EAAEH,OAAQ,CAAC;EAElE,IAAAI,kBAAS,EAAE,MAAM;IAChB,IAA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