@wordpress/components 25.13.0 → 25.15.1-next.79a6196f.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 (743) hide show
  1. package/CHANGELOG.md +89 -1
  2. package/CONTRIBUTING.md +57 -115
  3. package/LICENSE.md +1 -1
  4. package/build/base-control/index.js +17 -13
  5. package/build/base-control/index.js.map +1 -1
  6. package/build/border-box-control/border-box-control-linked-button/component.js +1 -1
  7. package/build/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  8. package/build/border-control/border-control-dropdown/component.js +4 -2
  9. package/build/border-control/border-control-dropdown/component.js.map +1 -1
  10. package/build/border-control/border-control-dropdown/hook.js +3 -2
  11. package/build/border-control/border-control-dropdown/hook.js.map +1 -1
  12. package/build/border-control/border-control-style-picker/component.js +1 -1
  13. package/build/border-control/border-control-style-picker/component.js.map +1 -1
  14. package/build/border-control/styles.js +17 -17
  15. package/build/border-control/styles.js.map +1 -1
  16. package/build/box-control/index.js +1 -1
  17. package/build/box-control/index.js.map +1 -1
  18. package/build/box-control/linked-button.js +1 -1
  19. package/build/box-control/linked-button.js.map +1 -1
  20. package/build/button/index.js +1 -1
  21. package/build/button/index.js.map +1 -1
  22. package/build/checkbox-control/index.js +1 -1
  23. package/build/checkbox-control/index.js.map +1 -1
  24. package/build/checkbox-control/types.js.map +1 -1
  25. package/build/color-palette/index.native.js +11 -7
  26. package/build/color-palette/index.native.js.map +1 -1
  27. package/build/color-picker/color-copy-button.js +1 -1
  28. package/build/color-picker/color-copy-button.js.map +1 -1
  29. package/build/context/wordpress-component.js.map +1 -1
  30. package/build/custom-select-control-v2/index.js +11 -10
  31. package/build/custom-select-control-v2/index.js.map +1 -1
  32. package/build/date-time/date/styles.js +8 -8
  33. package/build/date-time/date/styles.js.map +1 -1
  34. package/build/date-time/time/timezone.js +11 -2
  35. package/build/date-time/time/timezone.js.map +1 -1
  36. package/build/dimension-control/index.js +2 -0
  37. package/build/dimension-control/index.js.map +1 -1
  38. package/build/dimension-control/types.js.map +1 -1
  39. package/build/dropdown-menu-v2/index.js +205 -159
  40. package/build/dropdown-menu-v2/index.js.map +1 -1
  41. package/build/dropdown-menu-v2/styles.js +86 -77
  42. package/build/dropdown-menu-v2/styles.js.map +1 -1
  43. package/build/dropdown-menu-v2/types.js.map +1 -1
  44. package/build/duotone-picker/duotone-picker.js +4 -3
  45. package/build/duotone-picker/duotone-picker.js.map +1 -1
  46. package/build/focal-point-picker/controls.js +5 -1
  47. package/build/focal-point-picker/controls.js.map +1 -1
  48. package/build/focal-point-picker/index.js +2 -0
  49. package/build/focal-point-picker/index.js.map +1 -1
  50. package/build/focal-point-picker/styles/focal-point-picker-style.js +15 -15
  51. package/build/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  52. package/build/focal-point-picker/types.js.map +1 -1
  53. package/build/font-size-picker/font-size-picker-select.js +2 -0
  54. package/build/font-size-picker/font-size-picker-select.js.map +1 -1
  55. package/build/font-size-picker/font-size-picker-toggle-group.js +2 -0
  56. package/build/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  57. package/build/font-size-picker/index.js +10 -3
  58. package/build/font-size-picker/index.js.map +1 -1
  59. package/build/font-size-picker/index.native.js +6 -3
  60. package/build/font-size-picker/index.native.js.map +1 -1
  61. package/build/font-size-picker/types.js.map +1 -1
  62. package/build/form-token-field/index.js +10 -5
  63. package/build/form-token-field/index.js.map +1 -1
  64. package/build/form-token-field/token.js +1 -0
  65. package/build/form-token-field/token.js.map +1 -1
  66. package/build/gradient-picker/index.js +3 -2
  67. package/build/gradient-picker/index.js.map +1 -1
  68. package/build/index.native.js +20 -19
  69. package/build/index.native.js.map +1 -1
  70. package/build/input-control/styles/input-control-styles.js +32 -29
  71. package/build/input-control/styles/input-control-styles.js.map +1 -1
  72. package/build/input-control/types.js.map +1 -1
  73. package/build/lock-unlock.js +18 -0
  74. package/build/lock-unlock.js.map +1 -0
  75. package/build/mobile/bottom-sheet/index.native.js +8 -0
  76. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  77. package/build/mobile/color-settings/palette.screen.native.js +8 -4
  78. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  79. package/build/mobile/global-styles-context/utils.native.js +39 -13
  80. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  81. package/build/mobile/image/constants.js +12 -0
  82. package/build/mobile/image/constants.js.map +1 -0
  83. package/build/mobile/image/index.native.js +26 -18
  84. package/build/mobile/image/index.native.js.map +1 -1
  85. package/build/mobile/keyboard-aware-flat-list/index.android.js +40 -8
  86. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  87. package/build/mobile/keyboard-aware-flat-list/index.ios.js +44 -68
  88. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  89. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js +39 -0
  90. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js.map +1 -0
  91. package/build/mobile/keyboard-aware-flat-list/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +22 -29
  92. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-section.native.js.map +1 -0
  93. package/build/mobile/keyboard-aware-flat-list/use-scroll.native.js +93 -0
  94. package/build/mobile/keyboard-aware-flat-list/use-scroll.native.js.map +1 -0
  95. package/build/mobile/utils/get-px-from-css-unit.native.js +302 -0
  96. package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -0
  97. package/build/modal/index.js +18 -13
  98. package/build/modal/index.js.map +1 -1
  99. package/build/navigation/menu/menu-title.js +1 -1
  100. package/build/navigation/menu/menu-title.js.map +1 -1
  101. package/build/navigator/navigator-provider/component.js +13 -15
  102. package/build/navigator/navigator-provider/component.js.map +1 -1
  103. package/build/navigator/navigator-screen/component.js +23 -63
  104. package/build/navigator/navigator-screen/component.js.map +1 -1
  105. package/build/navigator/styles.js +52 -0
  106. package/build/navigator/styles.js.map +1 -0
  107. package/build/number-control/index.js +4 -8
  108. package/build/number-control/index.js.map +1 -1
  109. package/build/number-control/types.js.map +1 -1
  110. package/build/palette-edit/index.js +15 -34
  111. package/build/palette-edit/index.js.map +1 -1
  112. package/build/private-apis.js +11 -26
  113. package/build/private-apis.js.map +1 -1
  114. package/build/private-apis.native.js +21 -0
  115. package/build/private-apis.native.js.map +1 -0
  116. package/build/query-controls/author-select.js +3 -1
  117. package/build/query-controls/author-select.js.map +1 -1
  118. package/build/query-controls/category-select.js +3 -1
  119. package/build/query-controls/category-select.js.map +1 -1
  120. package/build/query-controls/index.js +6 -1
  121. package/build/query-controls/index.js.map +1 -1
  122. package/build/query-controls/types.js.map +1 -1
  123. package/build/radio-control/index.js +1 -0
  124. package/build/radio-control/index.js.map +1 -1
  125. package/build/range-control/index.js +1 -1
  126. package/build/range-control/index.js.map +1 -1
  127. package/build/select-control/styles/select-control-styles.js +15 -25
  128. package/build/select-control/styles/select-control-styles.js.map +1 -1
  129. package/build/slot-fill/index.js +3 -2
  130. package/build/slot-fill/index.js.map +1 -1
  131. package/build/slot-fill/types.js.map +1 -1
  132. package/build/snackbar/types.js.map +1 -1
  133. package/build/tabs/index.js +18 -1
  134. package/build/tabs/index.js.map +1 -1
  135. package/build/tabs/styles.js +3 -3
  136. package/build/tabs/styles.js.map +1 -1
  137. package/build/tabs/tab.js +2 -2
  138. package/build/tabs/tab.js.map +1 -1
  139. package/build/tabs/tabpanel.js +11 -8
  140. package/build/tabs/tabpanel.js.map +1 -1
  141. package/build/tabs/types.js.map +1 -1
  142. package/build/toggle-group-control/toggle-group-control/component.js +4 -4
  143. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  144. package/build/toggle-group-control/toggle-group-control/styles.js +29 -15
  145. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  146. package/build/toggle-group-control/toggle-group-control/utils.js +17 -17
  147. package/build/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  148. package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  149. package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  150. package/build/tools-panel/tools-panel/component.js +3 -1
  151. package/build/tools-panel/tools-panel/component.js.map +1 -1
  152. package/build/tools-panel/tools-panel-header/component.js +9 -8
  153. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  154. package/build/tools-panel/tools-panel-item/hook.js +11 -11
  155. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  156. package/build/tools-panel/types.js.map +1 -1
  157. package/build/tooltip/index.js +34 -10
  158. package/build/tooltip/index.js.map +1 -1
  159. package/build/tooltip/types.js.map +1 -1
  160. package/build/truncate/hook.js +10 -4
  161. package/build/truncate/hook.js.map +1 -1
  162. package/build/truncate/types.js.map +1 -1
  163. package/build/unit-control/index.js +1 -1
  164. package/build/unit-control/index.js.map +1 -1
  165. package/build/utils/strings.js +34 -3
  166. package/build/utils/strings.js.map +1 -1
  167. package/build-module/base-control/index.js +16 -12
  168. package/build-module/base-control/index.js.map +1 -1
  169. package/build-module/border-box-control/border-box-control-linked-button/component.js +1 -1
  170. package/build-module/border-box-control/border-box-control-linked-button/component.js.map +1 -1
  171. package/build-module/border-control/border-control-dropdown/component.js +4 -2
  172. package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
  173. package/build-module/border-control/border-control-dropdown/hook.js +3 -2
  174. package/build-module/border-control/border-control-dropdown/hook.js.map +1 -1
  175. package/build-module/border-control/border-control-style-picker/component.js +1 -1
  176. package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
  177. package/build-module/border-control/styles.js +17 -17
  178. package/build-module/border-control/styles.js.map +1 -1
  179. package/build-module/box-control/index.js +1 -1
  180. package/build-module/box-control/index.js.map +1 -1
  181. package/build-module/box-control/linked-button.js +1 -1
  182. package/build-module/box-control/linked-button.js.map +1 -1
  183. package/build-module/button/index.js +1 -1
  184. package/build-module/button/index.js.map +1 -1
  185. package/build-module/checkbox-control/index.js +1 -1
  186. package/build-module/checkbox-control/index.js.map +1 -1
  187. package/build-module/checkbox-control/types.js.map +1 -1
  188. package/build-module/color-palette/index.native.js +11 -7
  189. package/build-module/color-palette/index.native.js.map +1 -1
  190. package/build-module/color-picker/color-copy-button.js +1 -1
  191. package/build-module/color-picker/color-copy-button.js.map +1 -1
  192. package/build-module/context/wordpress-component.js.map +1 -1
  193. package/build-module/custom-select-control-v2/index.js +11 -10
  194. package/build-module/custom-select-control-v2/index.js.map +1 -1
  195. package/build-module/date-time/date/styles.js +8 -8
  196. package/build-module/date-time/date/styles.js.map +1 -1
  197. package/build-module/date-time/time/timezone.js +11 -2
  198. package/build-module/date-time/time/timezone.js.map +1 -1
  199. package/build-module/dimension-control/index.js +2 -0
  200. package/build-module/dimension-control/index.js.map +1 -1
  201. package/build-module/dimension-control/types.js.map +1 -1
  202. package/build-module/dropdown-menu-v2/index.js +201 -154
  203. package/build-module/dropdown-menu-v2/index.js.map +1 -1
  204. package/build-module/dropdown-menu-v2/styles.js +68 -61
  205. package/build-module/dropdown-menu-v2/styles.js.map +1 -1
  206. package/build-module/dropdown-menu-v2/types.js.map +1 -1
  207. package/build-module/duotone-picker/duotone-picker.js +4 -3
  208. package/build-module/duotone-picker/duotone-picker.js.map +1 -1
  209. package/build-module/focal-point-picker/controls.js +5 -1
  210. package/build-module/focal-point-picker/controls.js.map +1 -1
  211. package/build-module/focal-point-picker/index.js +2 -0
  212. package/build-module/focal-point-picker/index.js.map +1 -1
  213. package/build-module/focal-point-picker/styles/focal-point-picker-style.js +15 -15
  214. package/build-module/focal-point-picker/styles/focal-point-picker-style.js.map +1 -1
  215. package/build-module/focal-point-picker/types.js.map +1 -1
  216. package/build-module/font-size-picker/font-size-picker-select.js +2 -0
  217. package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
  218. package/build-module/font-size-picker/font-size-picker-toggle-group.js +2 -0
  219. package/build-module/font-size-picker/font-size-picker-toggle-group.js.map +1 -1
  220. package/build-module/font-size-picker/index.js +10 -3
  221. package/build-module/font-size-picker/index.js.map +1 -1
  222. package/build-module/font-size-picker/index.native.js +5 -2
  223. package/build-module/font-size-picker/index.native.js.map +1 -1
  224. package/build-module/font-size-picker/types.js.map +1 -1
  225. package/build-module/form-token-field/index.js +10 -5
  226. package/build-module/form-token-field/index.js.map +1 -1
  227. package/build-module/form-token-field/token.js +1 -0
  228. package/build-module/form-token-field/token.js.map +1 -1
  229. package/build-module/gradient-picker/index.js +3 -2
  230. package/build-module/gradient-picker/index.js.map +1 -1
  231. package/build-module/index.native.js +6 -3
  232. package/build-module/index.native.js.map +1 -1
  233. package/build-module/input-control/styles/input-control-styles.js +31 -29
  234. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  235. package/build-module/input-control/types.js.map +1 -1
  236. package/build-module/lock-unlock.js +9 -0
  237. package/build-module/lock-unlock.js.map +1 -0
  238. package/build-module/mobile/bottom-sheet/index.native.js +9 -1
  239. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  240. package/build-module/mobile/color-settings/palette.screen.native.js +8 -4
  241. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  242. package/build-module/mobile/global-styles-context/utils.native.js +38 -13
  243. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  244. package/build-module/mobile/image/constants.js +5 -0
  245. package/build-module/mobile/image/constants.js.map +1 -0
  246. package/build-module/mobile/image/index.native.js +25 -16
  247. package/build-module/mobile/image/index.native.js.map +1 -1
  248. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +40 -6
  249. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  250. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +46 -68
  251. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  252. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js +33 -0
  253. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js.map +1 -0
  254. package/build-module/mobile/keyboard-aware-flat-list/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +21 -27
  255. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-section.native.js.map +1 -0
  256. package/build-module/mobile/keyboard-aware-flat-list/use-scroll.native.js +86 -0
  257. package/build-module/mobile/keyboard-aware-flat-list/use-scroll.native.js.map +1 -0
  258. package/build-module/mobile/utils/get-px-from-css-unit.native.js +294 -0
  259. package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -0
  260. package/build-module/modal/index.js +18 -13
  261. package/build-module/modal/index.js.map +1 -1
  262. package/build-module/navigation/menu/menu-title.js +1 -1
  263. package/build-module/navigation/menu/menu-title.js.map +1 -1
  264. package/build-module/navigator/navigator-provider/component.js +3 -16
  265. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  266. package/build-module/navigator/navigator-screen/component.js +16 -70
  267. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  268. package/build-module/navigator/styles.js +47 -0
  269. package/build-module/navigator/styles.js.map +1 -0
  270. package/build-module/number-control/index.js +4 -8
  271. package/build-module/number-control/index.js.map +1 -1
  272. package/build-module/number-control/types.js.map +1 -1
  273. package/build-module/palette-edit/index.js +14 -33
  274. package/build-module/palette-edit/index.js.map +1 -1
  275. package/build-module/private-apis.js +10 -23
  276. package/build-module/private-apis.js.map +1 -1
  277. package/build-module/private-apis.native.js +14 -0
  278. package/build-module/private-apis.native.js.map +1 -0
  279. package/build-module/query-controls/author-select.js +3 -1
  280. package/build-module/query-controls/author-select.js.map +1 -1
  281. package/build-module/query-controls/category-select.js +3 -1
  282. package/build-module/query-controls/category-select.js.map +1 -1
  283. package/build-module/query-controls/index.js +6 -1
  284. package/build-module/query-controls/index.js.map +1 -1
  285. package/build-module/query-controls/types.js.map +1 -1
  286. package/build-module/radio-control/index.js +1 -0
  287. package/build-module/radio-control/index.js.map +1 -1
  288. package/build-module/range-control/index.js +1 -1
  289. package/build-module/range-control/index.js.map +1 -1
  290. package/build-module/select-control/styles/select-control-styles.js +15 -25
  291. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  292. package/build-module/slot-fill/index.js +3 -2
  293. package/build-module/slot-fill/index.js.map +1 -1
  294. package/build-module/slot-fill/types.js.map +1 -1
  295. package/build-module/snackbar/types.js.map +1 -1
  296. package/build-module/tabs/index.js +18 -1
  297. package/build-module/tabs/index.js.map +1 -1
  298. package/build-module/tabs/styles.js +3 -3
  299. package/build-module/tabs/styles.js.map +1 -1
  300. package/build-module/tabs/tab.js +2 -2
  301. package/build-module/tabs/tab.js.map +1 -1
  302. package/build-module/tabs/tabpanel.js +11 -8
  303. package/build-module/tabs/tabpanel.js.map +1 -1
  304. package/build-module/tabs/types.js.map +1 -1
  305. package/build-module/toggle-group-control/toggle-group-control/component.js +4 -4
  306. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  307. package/build-module/toggle-group-control/toggle-group-control/styles.js +29 -15
  308. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  309. package/build-module/toggle-group-control/toggle-group-control/utils.js +17 -17
  310. package/build-module/toggle-group-control/toggle-group-control/utils.js.map +1 -1
  311. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
  312. package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
  313. package/build-module/tools-panel/tools-panel/component.js +3 -1
  314. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  315. package/build-module/tools-panel/tools-panel-header/component.js +9 -8
  316. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  317. package/build-module/tools-panel/tools-panel-item/hook.js +11 -11
  318. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  319. package/build-module/tools-panel/types.js.map +1 -1
  320. package/build-module/tooltip/index.js +34 -12
  321. package/build-module/tooltip/index.js.map +1 -1
  322. package/build-module/tooltip/types.js.map +1 -1
  323. package/build-module/truncate/hook.js +10 -4
  324. package/build-module/truncate/hook.js.map +1 -1
  325. package/build-module/truncate/types.js.map +1 -1
  326. package/build-module/unit-control/index.js +1 -1
  327. package/build-module/unit-control/index.js.map +1 -1
  328. package/build-module/utils/strings.js +32 -2
  329. package/build-module/utils/strings.js.map +1 -1
  330. package/build-style/style-rtl.css +30 -6
  331. package/build-style/style.css +30 -6
  332. package/build-types/base-control/index.d.ts +3 -27
  333. package/build-types/base-control/index.d.ts.map +1 -1
  334. package/build-types/base-control/stories/index.story.d.ts +4 -1
  335. package/build-types/base-control/stories/index.story.d.ts.map +1 -1
  336. package/build-types/border-box-control/border-box-control/hook.d.ts +4 -4
  337. package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +6 -6
  338. package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +4 -4
  339. package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +4 -4
  340. package/build-types/border-box-control/stories/index.story.d.ts +1 -1
  341. package/build-types/border-control/border-control/hook.d.ts +4 -4
  342. package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
  343. package/build-types/border-control/border-control-dropdown/hook.d.ts +5 -4
  344. package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
  345. package/build-types/border-control/border-control-style-picker/hook.d.ts +4 -4
  346. package/build-types/border-control/stories/index.story.d.ts +6 -6
  347. package/build-types/border-control/styles.d.ts +1 -1
  348. package/build-types/border-control/styles.d.ts.map +1 -1
  349. package/build-types/box-control/stories/index.story.d.ts +42 -42
  350. package/build-types/box-control/styles/box-control-styles.d.ts +1 -1
  351. package/build-types/button/deprecated.d.ts +3 -3
  352. package/build-types/card/card/hook.d.ts +4 -4
  353. package/build-types/card/card-body/hook.d.ts +4 -4
  354. package/build-types/card/card-divider/hook.d.ts +4 -4
  355. package/build-types/card/card-footer/hook.d.ts +4 -4
  356. package/build-types/card/card-header/hook.d.ts +4 -4
  357. package/build-types/card/card-media/hook.d.ts +4 -4
  358. package/build-types/checkbox-control/index.d.ts.map +1 -1
  359. package/build-types/checkbox-control/types.d.ts +3 -2
  360. package/build-types/checkbox-control/types.d.ts.map +1 -1
  361. package/build-types/color-palette/styles.d.ts +2 -2
  362. package/build-types/color-picker/component.d.ts +2 -2
  363. package/build-types/color-picker/stories/index.story.d.ts +1 -1
  364. package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
  365. package/build-types/color-picker/styles.d.ts +3 -3
  366. package/build-types/composite/test/index.d.ts.map +1 -0
  367. package/build-types/context/wordpress-component.d.ts +3 -3
  368. package/build-types/context/wordpress-component.d.ts.map +1 -1
  369. package/build-types/custom-select-control-v2/index.d.ts +3 -2
  370. package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
  371. package/build-types/custom-select-control-v2/stories/index.story.d.ts +4 -3
  372. package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
  373. package/build-types/date-time/date/styles.d.ts +3 -3
  374. package/build-types/date-time/date-time/styles.d.ts +1 -1
  375. package/build-types/date-time/time/styles.d.ts +4 -4
  376. package/build-types/date-time/time/timezone.d.ts.map +1 -1
  377. package/build-types/dimension-control/index.d.ts.map +1 -1
  378. package/build-types/dimension-control/types.d.ts +6 -0
  379. package/build-types/dimension-control/types.d.ts.map +1 -1
  380. package/build-types/dropdown/index.d.ts +1 -1
  381. package/build-types/dropdown/index.d.ts.map +1 -1
  382. package/build-types/dropdown/stories/index.story.d.ts +3 -3
  383. package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
  384. package/build-types/dropdown-menu/index.d.ts +1 -1
  385. package/build-types/dropdown-menu/index.d.ts.map +1 -1
  386. package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
  387. package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
  388. package/build-types/dropdown-menu-v2/index.d.ts +18 -15
  389. package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
  390. package/build-types/dropdown-menu-v2/stories/index.story.d.ts +7 -2
  391. package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
  392. package/build-types/dropdown-menu-v2/styles.d.ts +77 -23
  393. package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
  394. package/build-types/dropdown-menu-v2/types.d.ts +89 -173
  395. package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
  396. package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
  397. package/build-types/elevation/hook.d.ts +4 -4
  398. package/build-types/flex/flex/hook.d.ts +4 -4
  399. package/build-types/flex/flex-block/hook.d.ts +4 -4
  400. package/build-types/flex/flex-item/hook.d.ts +4 -4
  401. package/build-types/focal-point-picker/controls.d.ts +1 -1
  402. package/build-types/focal-point-picker/controls.d.ts.map +1 -1
  403. package/build-types/focal-point-picker/index.d.ts +1 -1
  404. package/build-types/focal-point-picker/index.d.ts.map +1 -1
  405. package/build-types/focal-point-picker/stories/index.story.d.ts +8 -4
  406. package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
  407. package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
  408. package/build-types/focal-point-picker/types.d.ts +7 -0
  409. package/build-types/focal-point-picker/types.d.ts.map +1 -1
  410. package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
  411. package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
  412. package/build-types/font-size-picker/index.d.ts.map +1 -1
  413. package/build-types/font-size-picker/styles.d.ts +1 -1
  414. package/build-types/font-size-picker/types.d.ts +8 -1
  415. package/build-types/font-size-picker/types.d.ts.map +1 -1
  416. package/build-types/form-token-field/index.d.ts.map +1 -1
  417. package/build-types/form-token-field/token.d.ts.map +1 -1
  418. package/build-types/grid/hook.d.ts +4 -4
  419. package/build-types/h-stack/hook.d.ts +4 -4
  420. package/build-types/heading/component.d.ts +1 -1
  421. package/build-types/heading/hook.d.ts +4 -4
  422. package/build-types/input-control/styles/input-control-styles.d.ts +11 -0
  423. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  424. package/build-types/input-control/types.d.ts +1 -1
  425. package/build-types/input-control/types.d.ts.map +1 -1
  426. package/build-types/item-group/item/hook.d.ts +4 -4
  427. package/build-types/item-group/item-group/hook.d.ts +4 -4
  428. package/build-types/lock-unlock.d.ts +3 -0
  429. package/build-types/lock-unlock.d.ts.map +1 -0
  430. package/build-types/menu-item/index.d.ts +1 -1
  431. package/build-types/menu-item/stories/index.story.d.ts +4 -4
  432. package/build-types/mobile/image/constants.d.ts +5 -0
  433. package/build-types/mobile/image/constants.d.ts.map +1 -0
  434. package/build-types/modal/index.d.ts.map +1 -1
  435. package/build-types/navigation/styles/navigation-styles.d.ts +3 -3
  436. package/build-types/navigator/navigator-back-button/hook.d.ts +6 -6
  437. package/build-types/navigator/navigator-button/hook.d.ts +6 -6
  438. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  439. package/build-types/navigator/navigator-screen/component.d.ts +1 -7
  440. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  441. package/build-types/navigator/styles.d.ts +9 -0
  442. package/build-types/navigator/styles.d.ts.map +1 -0
  443. package/build-types/number-control/index.d.ts +1 -1
  444. package/build-types/number-control/index.d.ts.map +1 -1
  445. package/build-types/number-control/stories/index.story.d.ts +1 -1
  446. package/build-types/number-control/types.d.ts +1 -1
  447. package/build-types/palette-edit/index.d.ts +2 -2
  448. package/build-types/palette-edit/index.d.ts.map +1 -1
  449. package/build-types/palette-edit/styles.d.ts +3 -3
  450. package/build-types/popover/index.d.ts +1 -1
  451. package/build-types/popover/index.d.ts.map +1 -1
  452. package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
  453. package/build-types/private-apis.d.ts +0 -1
  454. package/build-types/private-apis.d.ts.map +1 -1
  455. package/build-types/query-controls/author-select.d.ts +1 -1
  456. package/build-types/query-controls/author-select.d.ts.map +1 -1
  457. package/build-types/query-controls/category-select.d.ts +1 -1
  458. package/build-types/query-controls/category-select.d.ts.map +1 -1
  459. package/build-types/query-controls/index.d.ts +1 -1
  460. package/build-types/query-controls/index.d.ts.map +1 -1
  461. package/build-types/query-controls/types.d.ts +9 -0
  462. package/build-types/query-controls/types.d.ts.map +1 -1
  463. package/build-types/radio-control/index.d.ts.map +1 -1
  464. package/build-types/range-control/index.d.ts +1 -1
  465. package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
  466. package/build-types/resizable-box/index.d.ts +1 -1
  467. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  468. package/build-types/resizable-box/stories/index.story.d.ts +2 -2
  469. package/build-types/scrollable/hook.d.ts +4 -4
  470. package/build-types/search-control/index.d.ts +1 -1
  471. package/build-types/search-control/stories/index.story.d.ts +2 -2
  472. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  473. package/build-types/slot-fill/index.d.ts +1 -1
  474. package/build-types/slot-fill/index.d.ts.map +1 -1
  475. package/build-types/slot-fill/types.d.ts +4 -0
  476. package/build-types/slot-fill/types.d.ts.map +1 -1
  477. package/build-types/snackbar/index.d.ts +2 -2
  478. package/build-types/snackbar/stories/index.story.d.ts +0 -3
  479. package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
  480. package/build-types/snackbar/types.d.ts +1 -1
  481. package/build-types/snackbar/types.d.ts.map +1 -1
  482. package/build-types/spacer/hook.d.ts +4 -4
  483. package/build-types/surface/hook.d.ts +4 -4
  484. package/build-types/tabs/index.d.ts +2 -2
  485. package/build-types/tabs/index.d.ts.map +1 -1
  486. package/build-types/tabs/styles.d.ts.map +1 -1
  487. package/build-types/tabs/tab.d.ts +2 -1
  488. package/build-types/tabs/tab.d.ts.map +1 -1
  489. package/build-types/tabs/tabpanel.d.ts +3 -2
  490. package/build-types/tabs/tabpanel.d.ts.map +1 -1
  491. package/build-types/tabs/types.d.ts +8 -3
  492. package/build-types/tabs/types.d.ts.map +1 -1
  493. package/build-types/text/hook.d.ts +4 -4
  494. package/build-types/text-control/index.d.ts +1 -1
  495. package/build-types/textarea-control/index.d.ts +1 -1
  496. package/build-types/toggle-control/stories/index.story.d.ts +2 -2
  497. package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +1 -1
  498. package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +1 -1
  499. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  500. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +2 -2
  501. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  502. package/build-types/toggle-group-control/toggle-group-control/utils.d.ts.map +1 -1
  503. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +1 -1
  504. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -1
  505. package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
  506. package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
  507. package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +1 -1
  508. package/build-types/toolbar/toolbar-button/index.d.ts +3 -3
  509. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  510. package/build-types/tools-panel/tools-panel/hook.d.ts +5 -4
  511. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  512. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  513. package/build-types/tools-panel/tools-panel-header/hook.d.ts +5 -4
  514. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  515. package/build-types/tools-panel/tools-panel-item/hook.d.ts +4 -4
  516. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  517. package/build-types/tools-panel/types.d.ts +9 -0
  518. package/build-types/tools-panel/types.d.ts.map +1 -1
  519. package/build-types/tooltip/index.d.ts +1 -1
  520. package/build-types/tooltip/index.d.ts.map +1 -1
  521. package/build-types/tooltip/stories/index.story.d.ts +10 -1
  522. package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
  523. package/build-types/tooltip/types.d.ts +3 -0
  524. package/build-types/tooltip/types.d.ts.map +1 -1
  525. package/build-types/truncate/hook.d.ts +5 -5
  526. package/build-types/truncate/hook.d.ts.map +1 -1
  527. package/build-types/truncate/types.d.ts +4 -0
  528. package/build-types/truncate/types.d.ts.map +1 -1
  529. package/build-types/unit-control/index.d.ts +1 -1
  530. package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -1
  531. package/build-types/utils/strings.d.ts +14 -2
  532. package/build-types/utils/strings.d.ts.map +1 -1
  533. package/build-types/v-stack/hook.d.ts +4 -4
  534. package/build-types/v-stack/stories/index.story.d.ts +1 -1
  535. package/package.json +20 -21
  536. package/src/alignment-matrix-control/test/index.tsx +10 -16
  537. package/src/base-control/index.tsx +21 -16
  538. package/src/border-box-control/border-box-control-linked-button/component.tsx +1 -1
  539. package/src/border-control/border-control-dropdown/component.tsx +3 -1
  540. package/src/border-control/border-control-dropdown/hook.ts +3 -2
  541. package/src/border-control/border-control-style-picker/component.tsx +1 -1
  542. package/src/border-control/styles.ts +2 -9
  543. package/src/box-control/index.tsx +1 -1
  544. package/src/box-control/linked-button.tsx +1 -1
  545. package/src/button/README.md +32 -6
  546. package/src/button/index.tsx +1 -1
  547. package/src/button-group/README.md +0 -6
  548. package/src/card/card/README.md +1 -1
  549. package/src/checkbox-control/README.md +3 -10
  550. package/src/checkbox-control/index.tsx +8 -6
  551. package/src/checkbox-control/test/__snapshots__/index.tsx.snap +3 -8
  552. package/src/checkbox-control/test/index.tsx +7 -0
  553. package/src/checkbox-control/types.ts +3 -2
  554. package/src/color-palette/index.native.js +18 -7
  555. package/src/color-picker/color-copy-button.tsx +1 -1
  556. package/src/combobox-control/README.md +0 -6
  557. package/src/composite/test/index.tsx +576 -0
  558. package/src/context/wordpress-component.ts +11 -6
  559. package/src/custom-select-control/README.md +0 -6
  560. package/src/custom-select-control/test/index.js +367 -35
  561. package/src/custom-select-control-v2/index.tsx +13 -12
  562. package/src/date-time/date/styles.ts +3 -3
  563. package/src/date-time/time/timezone.tsx +15 -3
  564. package/src/dimension-control/index.tsx +2 -0
  565. package/src/dimension-control/test/__snapshots__/index.test.js.snap +2 -2
  566. package/src/dimension-control/types.ts +6 -0
  567. package/src/dropdown-menu/README.md +0 -5
  568. package/src/dropdown-menu-v2/README.md +75 -136
  569. package/src/dropdown-menu-v2/index.tsx +321 -231
  570. package/src/dropdown-menu-v2/stories/index.story.tsx +522 -126
  571. package/src/dropdown-menu-v2/styles.ts +226 -151
  572. package/src/dropdown-menu-v2/test/index.tsx +480 -188
  573. package/src/dropdown-menu-v2/types.ts +98 -184
  574. package/src/duotone-picker/duotone-picker.tsx +7 -3
  575. package/src/focal-point-picker/controls.tsx +4 -0
  576. package/src/focal-point-picker/index.tsx +2 -0
  577. package/src/focal-point-picker/styles/focal-point-picker-style.ts +1 -1
  578. package/src/focal-point-picker/types.ts +7 -0
  579. package/src/font-size-picker/font-size-picker-select.tsx +2 -0
  580. package/src/font-size-picker/font-size-picker-toggle-group.tsx +9 -1
  581. package/src/font-size-picker/index.native.js +8 -2
  582. package/src/font-size-picker/index.tsx +15 -5
  583. package/src/font-size-picker/types.ts +8 -1
  584. package/src/form-toggle/README.md +0 -6
  585. package/src/form-toggle/style.scss +4 -2
  586. package/src/form-token-field/index.tsx +11 -7
  587. package/src/form-token-field/test/index.tsx +97 -0
  588. package/src/form-token-field/token.tsx +1 -0
  589. package/src/gradient-picker/index.tsx +2 -2
  590. package/src/index.native.js +6 -3
  591. package/src/input-control/styles/input-control-styles.tsx +10 -8
  592. package/src/input-control/types.ts +1 -1
  593. package/src/lock-unlock.js +10 -0
  594. package/src/menu-group/README.md +0 -8
  595. package/src/menu-items-choice/README.md +0 -7
  596. package/src/mobile/bottom-sheet/index.native.js +15 -1
  597. package/src/mobile/color-settings/palette.screen.native.js +7 -5
  598. package/src/mobile/global-styles-context/test/fixtures/theme.native.js +0 -20
  599. package/src/mobile/global-styles-context/test/utils.native.js +22 -0
  600. package/src/mobile/global-styles-context/utils.native.js +42 -19
  601. package/src/mobile/image/constants.js +1 -0
  602. package/src/mobile/image/index.native.js +55 -18
  603. package/src/mobile/image/style.native.scss +35 -9
  604. package/src/mobile/keyboard-aware-flat-list/index.android.js +50 -5
  605. package/src/mobile/keyboard-aware-flat-list/index.ios.js +65 -91
  606. package/src/mobile/keyboard-aware-flat-list/test/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +27 -25
  607. package/src/mobile/keyboard-aware-flat-list/test/use-scroll.native.js +71 -0
  608. package/src/mobile/keyboard-aware-flat-list/use-scroll-to-element.native.js +41 -0
  609. package/src/mobile/keyboard-aware-flat-list/{use-scroll-to-text-input.native.js → use-scroll-to-section.native.js} +22 -27
  610. package/src/mobile/keyboard-aware-flat-list/use-scroll.native.js +100 -0
  611. package/src/mobile/link-settings/style.native.scss +0 -17
  612. package/src/mobile/utils/get-px-from-css-unit.native.js +329 -0
  613. package/src/mobile/utils/test/get-px-from-css-unit.native.js +172 -0
  614. package/src/modal/README.md +0 -6
  615. package/src/modal/index.tsx +18 -16
  616. package/src/modal/test/index.tsx +90 -1
  617. package/src/navigation/menu/menu-title.tsx +1 -1
  618. package/src/navigator/navigator-provider/component.tsx +3 -4
  619. package/src/navigator/navigator-screen/component.tsx +15 -93
  620. package/src/navigator/styles.ts +71 -0
  621. package/src/navigator/test/index.tsx +0 -64
  622. package/src/notice/README.md +0 -6
  623. package/src/number-control/README.md +2 -2
  624. package/src/number-control/index.tsx +4 -8
  625. package/src/number-control/types.ts +1 -1
  626. package/src/palette-edit/index.tsx +14 -43
  627. package/src/palette-edit/style.scss +2 -2
  628. package/src/panel/README.md +0 -6
  629. package/src/private-apis.native.js +13 -0
  630. package/src/private-apis.ts +12 -37
  631. package/src/query-controls/author-select.tsx +2 -0
  632. package/src/query-controls/category-select.tsx +2 -0
  633. package/src/query-controls/index.tsx +6 -1
  634. package/src/query-controls/types.ts +9 -0
  635. package/src/radio-control/README.md +0 -6
  636. package/src/radio-control/index.tsx +4 -1
  637. package/src/radio-control/style.scss +29 -2
  638. package/src/radio-group/README.md +0 -6
  639. package/src/range-control/README.md +1 -9
  640. package/src/range-control/index.tsx +1 -1
  641. package/src/search-control/README.md +1 -5
  642. package/src/select-control/README.md +0 -6
  643. package/src/select-control/styles/select-control-styles.ts +10 -28
  644. package/src/slot-fill/index.tsx +5 -2
  645. package/src/slot-fill/types.ts +5 -0
  646. package/src/snackbar/README.md +0 -6
  647. package/src/snackbar/stories/index.story.tsx +7 -5
  648. package/src/snackbar/style.scss +4 -3
  649. package/src/snackbar/types.ts +2 -1
  650. package/src/spacer/README.md +0 -2
  651. package/src/spinner/README.md +2 -0
  652. package/src/tab-panel/README.md +0 -5
  653. package/src/tab-panel/test/index.tsx +39 -56
  654. package/src/tabs/README.md +4 -4
  655. package/src/tabs/index.tsx +22 -1
  656. package/src/tabs/stories/index.story.tsx +48 -48
  657. package/src/tabs/styles.ts +7 -1
  658. package/src/tabs/tab.tsx +3 -3
  659. package/src/tabs/tabpanel.tsx +13 -8
  660. package/src/tabs/test/index.tsx +236 -106
  661. package/src/tabs/types.ts +8 -3
  662. package/src/text-control/README.md +0 -6
  663. package/src/textarea-control/README.md +0 -6
  664. package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +12 -16
  665. package/src/toggle-group-control/test/index.tsx +107 -41
  666. package/src/toggle-group-control/toggle-group-control/component.tsx +5 -4
  667. package/src/toggle-group-control/toggle-group-control/styles.ts +13 -19
  668. package/src/toggle-group-control/toggle-group-control/utils.ts +15 -20
  669. package/src/toggle-group-control/toggle-group-control-option/README.md +1 -1
  670. package/src/toggle-group-control/toggle-group-control-option-base/README.md +1 -1
  671. package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +3 -2
  672. package/src/toggle-group-control/toggle-group-control-option-icon/README.md +1 -1
  673. package/src/toolbar/toolbar/README.md +0 -6
  674. package/src/tools-panel/test/index.tsx +12 -20
  675. package/src/tools-panel/tools-panel/README.md +7 -0
  676. package/src/tools-panel/tools-panel/component.tsx +2 -0
  677. package/src/tools-panel/tools-panel-header/README.md +7 -0
  678. package/src/tools-panel/tools-panel-header/component.tsx +20 -13
  679. package/src/tools-panel/tools-panel-item/hook.ts +10 -21
  680. package/src/tools-panel/types.ts +9 -0
  681. package/src/tooltip/README.md +4 -0
  682. package/src/tooltip/index.tsx +48 -10
  683. package/src/tooltip/stories/index.story.tsx +18 -1
  684. package/src/tooltip/test/index.tsx +404 -254
  685. package/src/tooltip/types.ts +4 -0
  686. package/src/tree-grid/README.md +0 -4
  687. package/src/truncate/README.md +8 -0
  688. package/src/truncate/hook.ts +17 -10
  689. package/src/truncate/test/index.tsx +54 -27
  690. package/src/truncate/types.ts +4 -0
  691. package/src/unit-control/index.tsx +1 -1
  692. package/src/utils/strings.ts +30 -2
  693. package/src/utils/test/strings.js +96 -1
  694. package/tsconfig.tsbuildinfo +1 -1
  695. package/build/dropdown-menu-v2-ariakit/index.js +0 -256
  696. package/build/dropdown-menu-v2-ariakit/index.js.map +0 -1
  697. package/build/dropdown-menu-v2-ariakit/styles.js +0 -180
  698. package/build/dropdown-menu-v2-ariakit/styles.js.map +0 -1
  699. package/build/dropdown-menu-v2-ariakit/types.js +0 -6
  700. package/build/dropdown-menu-v2-ariakit/types.js.map +0 -1
  701. package/build/mobile/inserter-button/index.native.js +0 -98
  702. package/build/mobile/inserter-button/index.native.js.map +0 -1
  703. package/build/mobile/inserter-button/sparkles.js +0 -23
  704. package/build/mobile/inserter-button/sparkles.js.map +0 -1
  705. package/build/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js.map +0 -1
  706. package/build/mobile/link-settings/image-link-destinations-screen.native.js +0 -119
  707. package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +0 -1
  708. package/build-module/dropdown-menu-v2-ariakit/index.js +0 -237
  709. package/build-module/dropdown-menu-v2-ariakit/index.js.map +0 -1
  710. package/build-module/dropdown-menu-v2-ariakit/styles.js +0 -165
  711. package/build-module/dropdown-menu-v2-ariakit/styles.js.map +0 -1
  712. package/build-module/dropdown-menu-v2-ariakit/types.js +0 -2
  713. package/build-module/dropdown-menu-v2-ariakit/types.js.map +0 -1
  714. package/build-module/mobile/inserter-button/index.native.js +0 -89
  715. package/build-module/mobile/inserter-button/index.native.js.map +0 -1
  716. package/build-module/mobile/inserter-button/sparkles.js +0 -15
  717. package/build-module/mobile/inserter-button/sparkles.js.map +0 -1
  718. package/build-module/mobile/keyboard-aware-flat-list/use-scroll-to-text-input.native.js.map +0 -1
  719. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +0 -110
  720. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +0 -1
  721. package/build-types/dropdown-menu-v2-ariakit/index.d.ts +0 -20
  722. package/build-types/dropdown-menu-v2-ariakit/index.d.ts.map +0 -1
  723. package/build-types/dropdown-menu-v2-ariakit/stories/index.story.d.ts +0 -16
  724. package/build-types/dropdown-menu-v2-ariakit/stories/index.story.d.ts.map +0 -1
  725. package/build-types/dropdown-menu-v2-ariakit/styles.d.ts +0 -96
  726. package/build-types/dropdown-menu-v2-ariakit/styles.d.ts.map +0 -1
  727. package/build-types/dropdown-menu-v2-ariakit/test/index.d.ts.map +0 -1
  728. package/build-types/dropdown-menu-v2-ariakit/types.d.ts +0 -168
  729. package/build-types/dropdown-menu-v2-ariakit/types.d.ts.map +0 -1
  730. package/build-types/mobile/inserter-button/sparkles.d.ts +0 -3
  731. package/build-types/mobile/inserter-button/sparkles.d.ts.map +0 -1
  732. package/src/dropdown-menu-v2-ariakit/README.md +0 -331
  733. package/src/dropdown-menu-v2-ariakit/index.tsx +0 -383
  734. package/src/dropdown-menu-v2-ariakit/stories/index.story.tsx +0 -617
  735. package/src/dropdown-menu-v2-ariakit/styles.ts +0 -333
  736. package/src/dropdown-menu-v2-ariakit/test/index.tsx +0 -1108
  737. package/src/dropdown-menu-v2-ariakit/types.ts +0 -179
  738. package/src/mobile/inserter-button/README.md +0 -62
  739. package/src/mobile/inserter-button/index.native.js +0 -116
  740. package/src/mobile/inserter-button/sparkles.js +0 -15
  741. package/src/mobile/inserter-button/style.native.scss +0 -72
  742. package/src/mobile/link-settings/image-link-destinations-screen.native.js +0 -152
  743. /package/build-types/{dropdown-menu-v2-ariakit → composite}/test/index.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"names":["_react2","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","__next40pxDefaultSize","height","lineHeight","minHeight","paddingLeft","space","paddingRight","sizeStyles","props","customPaddings","paddingInlineStart","paddingInlineEnd","dragStyles","isDragging","dragCursor","defaultArrowStyles","activeDragCursorStyles","Input","gray","BaseLabel","Text","baseLabelTypography","Label","_react","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 '../../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 '../../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__next40pxDefaultSize?: 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__next40pxDefaultSize,\n}: InputProps ) => {\n\t// Paddings may be overridden by the custom paddings props.\n\tconst sizes = {\n\t\tdefault: {\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\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 ( ! __next40pxDefaultSize ) {\n\t\tsizes.default = {\n\t\t\theight: 32,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 32,\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,OAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AAA0C,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;AAc1C,MAAMS,iBAAiB,GAAGA,CAAE;EAAEC;AAAqB,CAAC,KAAM;EACzD,IAAK,CAAEA,SAAS,EAAG,OAAO,EAAE;EAE5B,OAA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","_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","compact","fontSize","fontSizeMobile","getSizeConfig","__next40pxDefaultSize","height","lineHeight","minHeight","paddingLeft","space","paddingRight","sizeStyles","props","customPaddings","paddingInlineStart","paddingInlineEnd","dragStyles","isDragging","dragCursor","defaultArrowStyles","activeDragCursorStyles","Input","gray","BaseLabel","Text","baseLabelTypography","Label","_react","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 '../../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 '../../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__next40pxDefaultSize?: 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\nexport const fontSizeStyles = ( { inputSize: size }: InputProps ) => {\n\tconst sizes = {\n\t\tdefault: '13px',\n\t\tsmall: '11px',\n\t\tcompact: '13px',\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__next40pxDefaultSize,\n}: InputProps ) => {\n\t// Paddings may be overridden by the custom paddings props.\n\tconst sizes = {\n\t\tdefault: {\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\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\tcompact: {\n\t\t\theight: 32,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 32,\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 ( ! __next40pxDefaultSize ) {\n\t\tsizes.default = sizes.compact;\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,OAAA,GAAAC,OAAA;AAQA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAEA,IAAAI,MAAA,GAAAJ,OAAA;AAA0C,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;AAc1C,MAAMS,iB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CAAAC,GAAA,CAAAC,QAAA;EAAAC,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAR;AAAA,EAKlB;AAACiB,OAAA,CAAAuE,MAAA,GAAAA,MAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["@wordpress/components/src/input-control/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tCSSProperties,\n\tReactNode,\n\tSyntheticEvent,\n\tHTMLInputTypeAttribute,\n} from 'react';\nimport type { useDrag } from '@use-gesture/react';\n\n/**\n * Internal dependencies\n */\nimport type { StateReducer } from './reducer/state';\nimport type { WordPressComponentProps } from '../context';\nimport type { FlexProps } from '../flex/types';\nimport type { BaseControlProps } from '../base-control/types';\n\nexport type LabelPosition = 'top' | 'bottom' | 'side' | 'edge';\n\nexport type DragDirection = 'n' | 's' | 'e' | 'w';\n\nexport type DragProps = Parameters< Parameters< typeof useDrag >[ 0 ] >[ 0 ];\n\nexport type Size = 'default' | 'small' | '__unstable-large';\n\ninterface BaseProps {\n\t/**\n\t * Deprecated. Use `__next40pxDefaultSize` instead.\n\t *\n\t * @default false\n\t * @deprecated\n\t */\n\t__next36pxDefaultSize?: boolean;\n\t/**\n\t * Start opting into the larger default height that will become the default size in a future version.\n\t *\n\t * @default false\n\t */\n\t__next40pxDefaultSize?: boolean;\n\t__unstableInputWidth?: CSSProperties[ 'width' ];\n\t/**\n\t * If true, the label will only be visible to screen readers.\n\t *\n\t * @default false\n\t */\n\thideLabelFromVision?: boolean;\n\t/**\n\t * Whether the component should be in a focused state.\n\t * Used to coordinate focus states when the actual focused element and the component handling\n\t * visual focus are separate.\n\t *\n\t * @default false\n\t */\n\tisFocused: boolean;\n\t/**\n\t * The position of the label.\n\t *\n\t * @default 'top'\n\t */\n\tlabelPosition?: LabelPosition;\n\t/**\n\t * Adjusts the size of the input.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: Size;\n}\n\nexport type InputChangeCallback< P = {} > = (\n\tnextValue: string | undefined,\n\textra: { event: SyntheticEvent } & P\n) => void;\n\nexport interface InputFieldProps\n\textends Omit< BaseProps, '__next36pxDefaultSize' > {\n\t/**\n\t * Determines the drag axis.\n\t *\n\t * @default 'n'\n\t */\n\tdragDirection?: DragDirection;\n\t/**\n\t * If `isDragEnabled` is true, this controls the amount of `px` to have been dragged before\n\t * the drag gesture is actually triggered.\n\t *\n\t * @default 10\n\t */\n\tdragThreshold?: number;\n\t/**\n\t * If true, enables mouse drag gestures.\n\t *\n\t * @default false\n\t */\n\tisDragEnabled?: boolean;\n\t/**\n\t * If true, the `ENTER` key press is required in order to trigger an `onChange`.\n\t * If enabled, a change is also triggered when tabbing away (`onBlur`).\n\t *\n\t * @default false\n\t */\n\tisPressEnterToChange?: boolean;\n\t/**\n\t * A function that receives the value of the input.\n\t */\n\tonChange?: InputChangeCallback;\n\tonValidate?: (\n\t\tnextValue: string,\n\t\tevent?: SyntheticEvent< HTMLInputElement >\n\t) => void;\n\tpaddingInlineStart?: CSSProperties[ 'paddingInlineStart' ];\n\tpaddingInlineEnd?: CSSProperties[ 'paddingInlineEnd' ];\n\tsetIsFocused: ( isFocused: boolean ) => void;\n\tstateReducer?: StateReducer;\n\t/**\n\t * The current value of the input.\n\t */\n\tvalue?: string;\n\tonDragEnd?: ( dragProps: DragProps ) => void;\n\tonDragStart?: ( dragProps: DragProps ) => void;\n\tonDrag?: ( dragProps: DragProps ) => void;\n\t/**\n\t * Type of the input element to render.\n\t *\n\t * @default 'text'\n\t */\n\ttype?: HTMLInputTypeAttribute;\n}\n\nexport interface InputBaseProps extends BaseProps, FlexProps {\n\tchildren: ReactNode;\n\t/**\n\t * Renders an element on the left side of the input.\n\t *\n\t * By default, the prefix is aligned with the edge of the input border, with no padding.\n\t * If you want to apply standard padding in accordance with the size variant, wrap the element in\n\t * the provided `<InputControlPrefixWrapper>` component.\n\t *\n\t * @example\n\t * import {\n\t * __experimentalInputControl as InputControl,\n\t * __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n\t * } from '@wordpress/components';\n\t *\n\t * <InputControl\n\t * prefix={<InputControlPrefixWrapper>@</InputControlPrefixWrapper>}\n\t * />\n\t */\n\tprefix?: ReactNode;\n\t/**\n\t * Renders an element on the right side of the input.\n\t *\n\t * By default, the suffix is aligned with the edge of the input border, with no padding.\n\t * If you want to apply standard padding in accordance with the size variant, wrap the element in\n\t * the provided `<InputControlSuffixWrapper>` component.\n\t *\n\t * @example\n\t * import {\n\t * __experimentalInputControl as InputControl,\n\t * __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,\n\t * } from '@wordpress/components';\n\t *\n\t * <InputControl\n\t * suffix={<InputControlSuffixWrapper>%</InputControlSuffixWrapper>}\n\t * />\n\t */\n\tsuffix?: ReactNode;\n\t/**\n\t * If true, the `input` will be disabled.\n\t *\n\t * @default false\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * If this property is added, a label will be generated using label property as the content.\n\t */\n\tlabel?: ReactNode;\n}\n\nexport interface InputControlProps\n\textends Omit< InputBaseProps, 'children' | 'isFocused' | keyof FlexProps >,\n\t\tPick< BaseControlProps, 'help' >,\n\t\t/**\n\t\t * The `prefix` prop in `WordPressComponentProps< InputFieldProps, 'input', false >` comes from the\n\t\t * `HTMLInputAttributes` and clashes with the one from `InputBaseProps`. So we have to omit it from\n\t\t * `WordPressComponentProps< InputFieldProps, 'input', false >` in order that `InputBaseProps[ 'prefix' ]`\n\t\t * be the only prefix prop. Otherwise it tries to do a union of the two prefix properties and you end up\n\t\t * with an unresolvable type.\n\t\t *\n\t\t * `isFocused`, `setIsFocused`, `paddingInlineStart`, and `paddingInlineEnd` are managed internally by\n\t\t * the InputControl, but the rest of the props for InputField are passed through.\n\t\t */\n\t\tOmit<\n\t\t\tWordPressComponentProps< InputFieldProps, 'input', false >,\n\t\t\t| 'stateReducer'\n\t\t\t| 'prefix'\n\t\t\t| 'isFocused'\n\t\t\t| 'setIsFocused'\n\t\t\t| 'paddingInlineStart'\n\t\t\t| 'paddingInlineEnd'\n\t\t> {\n\t__unstableStateReducer?: InputFieldProps[ 'stateReducer' ];\n}\n\nexport interface InputControlLabelProps {\n\tchildren: ReactNode;\n\thideLabelFromVision?: BaseProps[ 'hideLabelFromVision' ];\n\tlabelPosition?: BaseProps[ 'labelPosition' ];\n\tsize?: BaseProps[ 'size' ];\n}\n\nexport type InputControlPrefixWrapperProps = {\n\t/**\n\t * The prefix to be inserted.\n\t */\n\tchildren: ReactNode;\n};\n\nexport type InputControlSuffixWrapperProps = {\n\t/**\n\t * The suffix to be inserted.\n\t */\n\tchildren: ReactNode;\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["@wordpress/components/src/input-control/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type {\n\tCSSProperties,\n\tReactNode,\n\tSyntheticEvent,\n\tHTMLInputTypeAttribute,\n} from 'react';\nimport type { useDrag } from '@use-gesture/react';\n\n/**\n * Internal dependencies\n */\nimport type { StateReducer } from './reducer/state';\nimport type { WordPressComponentProps } from '../context';\nimport type { FlexProps } from '../flex/types';\nimport type { BaseControlProps } from '../base-control/types';\n\nexport type LabelPosition = 'top' | 'bottom' | 'side' | 'edge';\n\nexport type DragDirection = 'n' | 's' | 'e' | 'w';\n\nexport type DragProps = Parameters< Parameters< typeof useDrag >[ 0 ] >[ 0 ];\n\nexport type Size = 'default' | 'small' | 'compact' | '__unstable-large';\n\ninterface BaseProps {\n\t/**\n\t * Deprecated. Use `__next40pxDefaultSize` instead.\n\t *\n\t * @default false\n\t * @deprecated\n\t */\n\t__next36pxDefaultSize?: boolean;\n\t/**\n\t * Start opting into the larger default height that will become the default size in a future version.\n\t *\n\t * @default false\n\t */\n\t__next40pxDefaultSize?: boolean;\n\t__unstableInputWidth?: CSSProperties[ 'width' ];\n\t/**\n\t * If true, the label will only be visible to screen readers.\n\t *\n\t * @default false\n\t */\n\thideLabelFromVision?: boolean;\n\t/**\n\t * Whether the component should be in a focused state.\n\t * Used to coordinate focus states when the actual focused element and the component handling\n\t * visual focus are separate.\n\t *\n\t * @default false\n\t */\n\tisFocused: boolean;\n\t/**\n\t * The position of the label.\n\t *\n\t * @default 'top'\n\t */\n\tlabelPosition?: LabelPosition;\n\t/**\n\t * Adjusts the size of the input.\n\t *\n\t * @default 'default'\n\t */\n\tsize?: Size;\n}\n\nexport type InputChangeCallback< P = {} > = (\n\tnextValue: string | undefined,\n\textra: { event: SyntheticEvent } & P\n) => void;\n\nexport interface InputFieldProps\n\textends Omit< BaseProps, '__next36pxDefaultSize' > {\n\t/**\n\t * Determines the drag axis.\n\t *\n\t * @default 'n'\n\t */\n\tdragDirection?: DragDirection;\n\t/**\n\t * If `isDragEnabled` is true, this controls the amount of `px` to have been dragged before\n\t * the drag gesture is actually triggered.\n\t *\n\t * @default 10\n\t */\n\tdragThreshold?: number;\n\t/**\n\t * If true, enables mouse drag gestures.\n\t *\n\t * @default false\n\t */\n\tisDragEnabled?: boolean;\n\t/**\n\t * If true, the `ENTER` key press is required in order to trigger an `onChange`.\n\t * If enabled, a change is also triggered when tabbing away (`onBlur`).\n\t *\n\t * @default false\n\t */\n\tisPressEnterToChange?: boolean;\n\t/**\n\t * A function that receives the value of the input.\n\t */\n\tonChange?: InputChangeCallback;\n\tonValidate?: (\n\t\tnextValue: string,\n\t\tevent?: SyntheticEvent< HTMLInputElement >\n\t) => void;\n\tpaddingInlineStart?: CSSProperties[ 'paddingInlineStart' ];\n\tpaddingInlineEnd?: CSSProperties[ 'paddingInlineEnd' ];\n\tsetIsFocused: ( isFocused: boolean ) => void;\n\tstateReducer?: StateReducer;\n\t/**\n\t * The current value of the input.\n\t */\n\tvalue?: string;\n\tonDragEnd?: ( dragProps: DragProps ) => void;\n\tonDragStart?: ( dragProps: DragProps ) => void;\n\tonDrag?: ( dragProps: DragProps ) => void;\n\t/**\n\t * Type of the input element to render.\n\t *\n\t * @default 'text'\n\t */\n\ttype?: HTMLInputTypeAttribute;\n}\n\nexport interface InputBaseProps extends BaseProps, FlexProps {\n\tchildren: ReactNode;\n\t/**\n\t * Renders an element on the left side of the input.\n\t *\n\t * By default, the prefix is aligned with the edge of the input border, with no padding.\n\t * If you want to apply standard padding in accordance with the size variant, wrap the element in\n\t * the provided `<InputControlPrefixWrapper>` component.\n\t *\n\t * @example\n\t * import {\n\t * __experimentalInputControl as InputControl,\n\t * __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,\n\t * } from '@wordpress/components';\n\t *\n\t * <InputControl\n\t * prefix={<InputControlPrefixWrapper>@</InputControlPrefixWrapper>}\n\t * />\n\t */\n\tprefix?: ReactNode;\n\t/**\n\t * Renders an element on the right side of the input.\n\t *\n\t * By default, the suffix is aligned with the edge of the input border, with no padding.\n\t * If you want to apply standard padding in accordance with the size variant, wrap the element in\n\t * the provided `<InputControlSuffixWrapper>` component.\n\t *\n\t * @example\n\t * import {\n\t * __experimentalInputControl as InputControl,\n\t * __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,\n\t * } from '@wordpress/components';\n\t *\n\t * <InputControl\n\t * suffix={<InputControlSuffixWrapper>%</InputControlSuffixWrapper>}\n\t * />\n\t */\n\tsuffix?: ReactNode;\n\t/**\n\t * If true, the `input` will be disabled.\n\t *\n\t * @default false\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * If this property is added, a label will be generated using label property as the content.\n\t */\n\tlabel?: ReactNode;\n}\n\nexport interface InputControlProps\n\textends Omit< InputBaseProps, 'children' | 'isFocused' | keyof FlexProps >,\n\t\tPick< BaseControlProps, 'help' >,\n\t\t/**\n\t\t * The `prefix` prop in `WordPressComponentProps< InputFieldProps, 'input', false >` comes from the\n\t\t * `HTMLInputAttributes` and clashes with the one from `InputBaseProps`. So we have to omit it from\n\t\t * `WordPressComponentProps< InputFieldProps, 'input', false >` in order that `InputBaseProps[ 'prefix' ]`\n\t\t * be the only prefix prop. Otherwise it tries to do a union of the two prefix properties and you end up\n\t\t * with an unresolvable type.\n\t\t *\n\t\t * `isFocused`, `setIsFocused`, `paddingInlineStart`, and `paddingInlineEnd` are managed internally by\n\t\t * the InputControl, but the rest of the props for InputField are passed through.\n\t\t */\n\t\tOmit<\n\t\t\tWordPressComponentProps< InputFieldProps, 'input', false >,\n\t\t\t| 'stateReducer'\n\t\t\t| 'prefix'\n\t\t\t| 'isFocused'\n\t\t\t| 'setIsFocused'\n\t\t\t| 'paddingInlineStart'\n\t\t\t| 'paddingInlineEnd'\n\t\t> {\n\t__unstableStateReducer?: InputFieldProps[ 'stateReducer' ];\n}\n\nexport interface InputControlLabelProps {\n\tchildren: ReactNode;\n\thideLabelFromVision?: BaseProps[ 'hideLabelFromVision' ];\n\tlabelPosition?: BaseProps[ 'labelPosition' ];\n\tsize?: BaseProps[ 'size' ];\n}\n\nexport type InputControlPrefixWrapperProps = {\n\t/**\n\t * The prefix to be inserted.\n\t */\n\tchildren: ReactNode;\n};\n\nexport type InputControlSuffixWrapperProps = {\n\t/**\n\t * The suffix to be inserted.\n\t */\n\tchildren: ReactNode;\n};\n"],"mappings":""}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.unlock = exports.lock = void 0;
7
+ var _privateApis = require("@wordpress/private-apis");
8
+ /**
9
+ * WordPress dependencies
10
+ */
11
+
12
+ const {
13
+ lock,
14
+ unlock
15
+ } = (0, _privateApis.__dangerousOptInToUnstableAPIsOnlyForCoreModules)('I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.', '@wordpress/components');
16
+ exports.unlock = unlock;
17
+ exports.lock = lock;
18
+ //# sourceMappingURL=lock-unlock.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_privateApis","require","lock","unlock","__dangerousOptInToUnstableAPIsOnlyForCoreModules","exports"],"sources":["@wordpress/components/src/lock-unlock.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';\n\nexport const { lock, unlock } =\n\t__dangerousOptInToUnstableAPIsOnlyForCoreModules(\n\t\t'I know using unstable features means my theme or plugin will inevitably break in the next version of WordPress.',\n\t\t'@wordpress/components'\n\t);\n"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAGO,MAAM;EAAEC,IAAI;EAAEC;AAAO,CAAC,GAC5B,IAAAC,6DAAgD,EAC/C,iHAAiH,EACjH,uBACD,CAAC;AAACC,OAAA,CAAAF,MAAA,GAAAA,MAAA;AAAAE,OAAA,CAAAH,IAAA,GAAAA,IAAA"}
@@ -175,6 +175,9 @@ class BottomSheet extends _element.Component {
175
175
  if (this.androidModalClosedSubscription) {
176
176
  this.androidModalClosedSubscription.remove();
177
177
  }
178
+ if (this.props.isVisible) {
179
+ (0, _reactNativeBridge.showAndroidSoftKeyboard)();
180
+ }
178
181
  if (this.safeAreaEventSubscription === null) {
179
182
  return;
180
183
  }
@@ -275,6 +278,9 @@ class BottomSheet extends _element.Component {
275
278
  const {
276
279
  onDismiss
277
280
  } = this.props;
281
+
282
+ // Restore Keyboard Visibility
283
+ (0, _reactNativeBridge.showAndroidSoftKeyboard)();
278
284
  if (onDismiss) {
279
285
  onDismiss();
280
286
  }
@@ -474,6 +480,8 @@ class BottomSheet extends _element.Component {
474
480
  onMoveShouldSetResponderCapture: scrollEnabled && panResponder.panHandlers.onMoveShouldSetResponderCapture,
475
481
  onAccessibilityEscape: this.onCloseBottomSheet,
476
482
  testID: "bottom-sheet",
483
+ hardwareAccelerated: true,
484
+ useNativeDriverForBackdrop: true,
477
485
  ...rest
478
486
  }, (0, _react.createElement)(_keyboardAvoidingView.default, {
479
487
  behavior: _reactNative.Platform.OS === 'ios' && 'padding',
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_reactNativeModal","_interopRequireDefault","_reactNativeSafeArea","_reactNativeBridge","_element","_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","_react","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":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAYA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAD,sBAAA,CAAAF,OAAA;AAKA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAKA,IAAAO,OAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,OAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,KAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,gBAAA,GAAAR,sBAAA,CAAAF,OAAA;AACA,IAAAW,WAAA,GAAAT,sBAAA,CAAAF,OAAA;AACA,IAAAY,WAAA,GAAAV,sBAAA,CAAAF,OAAA;AACA,IAAAa,UAAA,GAAAX,sBAAA,CAAAF,OAAA;AACA,IAAAc,UAAA,GAAAZ,sBAAA,CAAAF,OAAA;AACA,IAAAe,SAAA,GAAAb,sBAAA,CAAAF,OAAA;AACA,IAAAgB,uBAAA,GAAAd,sBAAA,CAAAF,OAAA;AACA,IAAAiB,UAAA,GAAAf,sBAAA,CAAAF,OAAA;AACA,IAAAkB,iBAAA,GAAAhB,sBAAA,CAAAF,OAAA;AACA,IAAAmB,oBAAA,GAAAjB,sBAAA,CAAAF,OAAA;AACA,IAAAoB,qBAAA,GAAAlB,sBAAA,CAAAF,OAAA;AACA,IAAAqB,SAAA,GAAAnB,sBAAA,CAAAF,OAAA;AACA,IAAAsB,OAAA,GAAApB,sBAAA,CAAAF,OAAA;AACA,IAAA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AiB,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":["_reactNative","require","_reactNativeModal","_interopRequireDefault","_reactNativeSafeArea","_reactNativeBridge","_element","_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","showAndroidSoftKeyboard","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","_react","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","hardwareAccelerated","useNativeDriverForBackdrop","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 {\n\tsubscribeAndroidModalClosed,\n\tshowAndroidSoftKeyboard,\n} 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\n\t\tif ( this.props.isVisible ) {\n\t\t\tshowAndroidSoftKeyboard();\n\t\t}\n\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\t// Restore Keyboard Visibility\n\t\tshowAndroidSoftKeyboard();\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\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\thardwareAccelerated={ true }\n\t\t\t\tuseNativeDriverForBackdrop={ true }\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":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAYA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAD,sBAAA,CAAAF,OAAA;AAKA,IAAAI,kBAAA,GAAAJ,OAAA;AAIA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAKA,IAAAO,OAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,OAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,KAA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C,KAAK,EAAG;QACP5E,MAAM,EACLZ,mBAAmB,IACnBgF,eAAM,CAACC,iBAAiB,CAACF;MAC3B;IAAG,CACH,CAEU,CACQ,CAChB,CAAC;EAEV;AACD;AAEA,SAASyF,QAAQA,CAAA,EAAG;EACnB,OAAOvG,IAAI,CAACC,GAAG,CACdtB,uBAAU,CAACgB,GAAG,CAAE,QAAS,CAAC,CAACD,KAAK,EAChCqB,eAAM,CAACsB,UAAU,CAACmE,QACnB,CAAC;AACF;AAEA,MAAMC,iBAAiB,GAAG,IAAAC,iCAAwB,EAAEpM,WAAY,CAAC;AAEjEmM,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,CAAArD,OAAA,GAAAoD,QAAA"}
@@ -36,7 +36,6 @@ const HIT_SLOP = {
36
36
  left: 8,
37
37
  right: 8
38
38
  };
39
- const THEME_PALETTE_NAME = 'Theme';
40
39
  const PaletteScreen = () => {
41
40
  const route = (0, _native.useRoute)();
42
41
  const navigation = (0, _native.useNavigation)();
@@ -59,10 +58,13 @@ const PaletteScreen = () => {
59
58
  const [currentValue, setCurrentValue] = (0, _element.useState)(colorValue);
60
59
  const isGradientColor = isGradient(currentValue);
61
60
  const selectedSegmentIndex = isGradientColor ? 1 : 0;
62
- const allAvailableColors = (0, _components.useMobileGlobalStylesColors)();
63
61
  const [currentSegment, setCurrentSegment] = (0, _element.useState)(segments[selectedSegmentIndex]);
64
62
  const isGradientSegment = currentSegment === _utils.colorsUtils.segments[1];
65
63
  const currentSegmentColors = !isGradientSegment ? defaultSettings.colors : defaultSettings.gradients;
64
+ const allAvailableColors = (0, _components.useMobileGlobalStylesColors)();
65
+ const allAvailableGradients = currentSegmentColors.flatMap(({
66
+ gradients
67
+ }) => gradients).filter(Boolean);
66
68
  const horizontalSeparatorStyle = (0, _compose.usePreferredColorSchemeStyle)(_style.default.horizontalSeparator, _style.default.horizontalSeparatorDark);
67
69
  const clearButtonStyle = (0, _compose.usePreferredColorSchemeStyle)(_style.default.clearButton, _style.default.clearButtonDark);
68
70
  const selectedColorTextStyle = (0, _compose.usePreferredColorSchemeStyle)(_style.default.colorText, _style.default.colorTextDark);
@@ -147,9 +149,11 @@ const PaletteScreen = () => {
147
149
  const paletteSettings = {
148
150
  colors: palette.colors,
149
151
  gradients: palette.gradients,
150
- allColors: allAvailableColors
152
+ allColors: allAvailableColors,
153
+ allGradients: allAvailableGradients
151
154
  };
152
- const enableCustomColor = !isGradientSegment && palette.name === THEME_PALETTE_NAME;
155
+ // Limit to show the custom indicator to the first available palette
156
+ const enableCustomColor = paletteKey === 0;
153
157
  return (0, _react.createElement)(_colorPalette.default, {
154
158
  enableCustomColor: enableCustomColor,
155
159
  label: palette.name,
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_i18n","_element","_compose","_components","_native","_colorPalette","_interopRequireDefault","_colorIndicator","_navBar","_segmentedControl","_utils","_style","HIT_SLOP","top","bottom","left","right","THEME_PALETTE_NAME","PaletteScreen","route","useRoute","navigation","useNavigation","shouldEnableBottomSheetScroll","useContext","BottomSheetContext","label","onColorChange","onGradientChange","onColorCleared","colorValue","defaultSettings","hideNavigation","params","segments","isGradient","colorsUtils","currentValue","setCurrentValue","useState","isGradientColor","selectedSegmentIndex","allAvailableColors","useMobileGlobalStylesColors","currentSegment","setCurrentSegment","isGradientSegment","currentSegmentColors","colors","gradients","horizontalSeparatorStyle","usePreferredColorSchemeStyle","styles","horizontalSeparator","horizontalSeparatorDark","clearButtonStyle","clearButton","clearButtonDark","selectedColorTextStyle","colorText","colorTextDark","isSolidSegment","isCustomGadientShown","setColor","color","onClear","undefined","onCustomPress","navigate","screens","picker","gradientPicker","getClearButton","_react","createElement","TouchableWithoutFeedback","onPress","hitSlop","View","style","clearButtonContainer","Text","__","getFooter","default","segmentHandler","selectedIndex","indexOf","addonLeft","colorIndicator","addonRight","footer","flex","maxFontSizeMultiplier","selectable","toUpperCase","selectColorText","BackButton","goBack","Heading","colorPalettes","map","palette","paletteKey","paletteSettings","allColors","enableCustomColor","name","key","activeColor","Fragment","PanelBody","ColorControl","withColorIndicator","_default","exports"],"sources":["@wordpress/components/src/mobile/color-settings/palette.screen.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, Text, TouchableWithoutFeedback } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState, useContext } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport {\n\tColorControl,\n\tPanelBody,\n\tBottomSheetContext,\n\tuseMobileGlobalStylesColors,\n} from '@wordpress/components';\nimport { useRoute, useNavigation } from '@react-navigation/native';\n\n/**\n * Internal dependencies\n */\nimport ColorPalette from '../../color-palette';\nimport ColorIndicator from '../../color-indicator';\nimport NavBar from '../bottom-sheet/nav-bar';\nimport SegmentedControls from '../segmented-control';\nimport { colorsUtils } from './utils';\n\nimport styles from './style.scss';\n\nconst HIT_SLOP = { top: 8, bottom: 8, left: 8, right: 8 };\nconst THEME_PALETTE_NAME = 'Theme';\n\nconst PaletteScreen = () => {\n\tconst route = useRoute();\n\tconst navigation = useNavigation();\n\tconst { shouldEnableBottomSheetScroll } = useContext( BottomSheetContext );\n\tconst {\n\t\tlabel,\n\t\tonColorChange,\n\t\tonGradientChange,\n\t\tonColorCleared,\n\t\tcolorValue,\n\t\tdefaultSettings,\n\t\thideNavigation = false,\n\t} = route.params || {};\n\tconst { segments, isGradient } = colorsUtils;\n\tconst [ currentValue, setCurrentValue ] = useState( colorValue );\n\tconst isGradientColor = isGradient( currentValue );\n\tconst selectedSegmentIndex = isGradientColor ? 1 : 0;\n\tconst allAvailableColors = useMobileGlobalStylesColors();\n\n\tconst [ currentSegment, setCurrentSegment ] = useState(\n\t\tsegments[ selectedSegmentIndex ]\n\t);\n\tconst isGradientSegment = currentSegment === colorsUtils.segments[ 1 ];\n\tconst currentSegmentColors = ! isGradientSegment\n\t\t? defaultSettings.colors\n\t\t: defaultSettings.gradients;\n\n\tconst horizontalSeparatorStyle = usePreferredColorSchemeStyle(\n\t\tstyles.horizontalSeparator,\n\t\tstyles.horizontalSeparatorDark\n\t);\n\tconst clearButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.clearButton,\n\t\tstyles.clearButtonDark\n\t);\n\tconst selectedColorTextStyle = usePreferredColorSchemeStyle(\n\t\tstyles.colorText,\n\t\tstyles.colorTextDark\n\t);\n\n\tconst isSolidSegment = currentSegment === segments[ 0 ];\n\tconst isCustomGadientShown = ! isSolidSegment && isGradientColor;\n\n\tconst setColor = ( color ) => {\n\t\tsetCurrentValue( color );\n\t\tif ( isSolidSegment && onColorChange && onGradientChange ) {\n\t\t\tonColorChange( color );\n\t\t} else if ( isSolidSegment && onColorChange ) {\n\t\t\tonColorChange( color );\n\t\t} else if ( ! isSolidSegment && onGradientChange ) {\n\t\t\tonGradientChange( color );\n\t\t}\n\t};\n\n\tfunction onClear() {\n\t\tsetCurrentValue( undefined );\n\n\t\tif ( onColorCleared ) {\n\t\t\tonColorCleared();\n\t\t}\n\t}\n\n\tfunction onCustomPress() {\n\t\tif ( isSolidSegment ) {\n\t\t\tnavigation.navigate( colorsUtils.screens.picker, {\n\t\t\t\tcurrentValue,\n\t\t\t\tsetColor,\n\t\t\t} );\n\t\t} else {\n\t\t\tnavigation.navigate( colorsUtils.screens.gradientPicker, {\n\t\t\t\tsetColor,\n\t\t\t\tisGradientColor,\n\t\t\t\tcurrentValue,\n\t\t\t} );\n\t\t}\n\t}\n\n\tfunction getClearButton() {\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback onPress={ onClear } hitSlop={ HIT_SLOP }>\n\t\t\t\t<View style={ styles.clearButtonContainer }>\n\t\t\t\t\t<Text style={ clearButtonStyle }>{ __( 'Reset' ) }</Text>\n\t\t\t\t</View>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t}\n\n\tfunction getFooter() {\n\t\tif ( onGradientChange ) {\n\t\t\treturn (\n\t\t\t\t<SegmentedControls\n\t\t\t\t\tsegments={ segments }\n\t\t\t\t\tsegmentHandler={ setCurrentSegment }\n\t\t\t\t\tselectedIndex={ segments.indexOf( currentSegment ) }\n\t\t\t\t\taddonLeft={\n\t\t\t\t\t\tcurrentValue && (\n\t\t\t\t\t\t\t<ColorIndicator\n\t\t\t\t\t\t\t\tcolor={ currentValue }\n\t\t\t\t\t\t\t\tstyle={ styles.colorIndicator }\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\taddonRight={ currentValue && getClearButton() }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t<View style={ styles.footer }>\n\t\t\t\t<View style={ styles.flex }>\n\t\t\t\t\t{ currentValue && (\n\t\t\t\t\t\t<ColorIndicator\n\t\t\t\t\t\t\tcolor={ currentValue }\n\t\t\t\t\t\t\tstyle={ styles.colorIndicator }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</View>\n\t\t\t\t{ currentValue ? (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={ selectedColorTextStyle }\n\t\t\t\t\t\tmaxFontSizeMultiplier={ 2 }\n\t\t\t\t\t\tselectable\n\t\t\t\t\t>\n\t\t\t\t\t\t{ currentValue.toUpperCase() }\n\t\t\t\t\t</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={ styles.selectColorText }\n\t\t\t\t\t\tmaxFontSizeMultiplier={ 2 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Select a color above' ) }\n\t\t\t\t\t</Text>\n\t\t\t\t) }\n\t\t\t\t<View style={ styles.flex }>\n\t\t\t\t\t{ currentValue && getClearButton() }\n\t\t\t\t</View>\n\t\t\t</View>\n\t\t);\n\t}\n\treturn (\n\t\t<View>\n\t\t\t{ ! hideNavigation && (\n\t\t\t\t<NavBar>\n\t\t\t\t\t<NavBar.BackButton onPress={ navigation.goBack } />\n\t\t\t\t\t<NavBar.Heading>{ label } </NavBar.Heading>\n\t\t\t\t</NavBar>\n\t\t\t) }\n\n\t\t\t<View style={ styles.colorPalettes }>\n\t\t\t\t{ currentSegmentColors.map( ( palette, paletteKey ) => {\n\t\t\t\t\tconst paletteSettings = {\n\t\t\t\t\t\tcolors: palette.colors,\n\t\t\t\t\t\tgradients: palette.gradients,\n\t\t\t\t\t\tallColors: allAvailableColors,\n\t\t\t\t\t};\n\t\t\t\t\tconst enableCustomColor =\n\t\t\t\t\t\t! isGradientSegment &&\n\t\t\t\t\t\tpalette.name === THEME_PALETTE_NAME;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\t\tenableCustomColor={ enableCustomColor }\n\t\t\t\t\t\t\tlabel={ palette.name }\n\t\t\t\t\t\t\tkey={ paletteKey }\n\t\t\t\t\t\t\tsetColor={ setColor }\n\t\t\t\t\t\t\tactiveColor={ currentValue }\n\t\t\t\t\t\t\tisGradientColor={ isGradientColor }\n\t\t\t\t\t\t\tcurrentSegment={ currentSegment }\n\t\t\t\t\t\t\tonCustomPress={ onCustomPress }\n\t\t\t\t\t\t\tshouldEnableBottomSheetScroll={\n\t\t\t\t\t\t\t\tshouldEnableBottomSheetScroll\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdefaultSettings={ paletteSettings }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</View>\n\n\t\t\t{ isCustomGadientShown && (\n\t\t\t\t<>\n\t\t\t\t\t<View style={ horizontalSeparatorStyle } />\n\t\t\t\t\t<PanelBody>\n\t\t\t\t\t\t<ColorControl\n\t\t\t\t\t\t\tlabel={ __( 'Customize Gradient' ) }\n\t\t\t\t\t\t\tonPress={ onCustomPress }\n\t\t\t\t\t\t\twithColorIndicator={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<View style={ horizontalSeparatorStyle } />\n\t\t\t{ getFooter() }\n\t\t</View>\n\t);\n};\n\nexport default PaletteScreen;\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAMA,IAAAK,OAAA,GAAAL,OAAA;AAKA,IAAAM,aAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,eAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,OAAA,GAAAF,sBAAA,CAAAP,OAAA;AACA,IAAAU,iBAAA,GAAAH,sBAAA,CAAAP,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AAEA,IAAAY,MAAA,GAAAL,sBAAA,CAAAP,OAAA;AA5BA;AACA;AACA;;AAGA;AACA;AACA;;AAYA;AACA;AACA;;AASA,MAAMa,QAAQ,GAAG;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AAiB,IACnBwD,OAAO,CAACK,IAAI,KAAK1F,kBAAkB;IAEpC,OACC,IAAAwD,MAAA,CAAAC,aAAA,EAACrE,aAAA,CAAA+E,OAAY;MACZsB,iBAAiB,EAAGA,iBAAmB;MACvChF,KAAK,EAAG4E,OAAO,CAACK,IAAM;MACtBC,GAAG,EAAGL,UAAY;MAClBxC,QAAQ,EAAGA,QAAU;MACrB8C,WAAW,EAAGxE,YAAc;MAC5BG,eAAe,EAAGA,eAAiB;MACnCI,cAAc,EAAGA,cAAgB;MACjCuB,aAAa,EAAGA,aAAe;MAC/B5C,6BAA6B,EAC5BA,6BACA;MACDQ,eAAe,EAAGyE;IAAiB,CACnC,CAAC;EAEJ,CAAE,CACG,CAAC,EAEL1C,oBAAoB,IACrB,IAAAW,MAAA,CAAAC,aAAA,EAAAD,MAAA,CAAAqC,QAAA,QACC,IAAArC,MAAA,CAAAC,aAAA,EAAC5E,YAAA,CAAAgF,IAAI;IAACC,KAAK,EAAG7B;EAA0B,CAAE,CAAC,EAC3C,IAAAuB,MAAA,CAAAC,aAAA,EAACvE,WAAA,CAAA4G,SAAS,QACT,IAAAtC,MAAA,CAAAC,aAAA,EAACvE,WAAA,CAAA6G,YAAY;IACZtF,KAAK,EAAG,IAAAwD,QAAE,EAAE,oBAAqB,CAAG;IACpCN,OAAO,EAAGT,aAAe;IACzB8C,kBAAkB,EAAG;EAAO,CAC5B,CACS,CACV,CACF,EACD,IAAAxC,MAAA,CAAAC,aAAA,EAAC5E,YAAA,CAAAgF,IAAI;IAACC,KAAK,EAAG7B;EAA0B,CAAE,CAAC,EACzCiC,SAAS,CAAC,CACP,CAAC;AAET,CAAC;AAAC,IAAA+B,QAAA,GAEahG,aAAa;AAAAiG,OAAA,CAAA/B,OAAA,GAAA8B,QAAA"}
1
+ {"version":3,"names":["_reactNative","require","_i18n","_element","_compose","_components","_native","_colorPalette","_interopRequireDefault","_colorIndicator","_navBar","_segmentedControl","_utils","_style","HIT_SLOP","top","bottom","left","right","PaletteScreen","route","useRoute","navigation","useNavigation","shouldEnableBottomSheetScroll","useContext","BottomSheetContext","label","onColorChange","onGradientChange","onColorCleared","colorValue","defaultSettings","hideNavigation","params","segments","isGradient","colorsUtils","currentValue","setCurrentValue","useState","isGradientColor","selectedSegmentIndex","currentSegment","setCurrentSegment","isGradientSegment","currentSegmentColors","colors","gradients","allAvailableColors","useMobileGlobalStylesColors","allAvailableGradients","flatMap","filter","Boolean","horizontalSeparatorStyle","usePreferredColorSchemeStyle","styles","horizontalSeparator","horizontalSeparatorDark","clearButtonStyle","clearButton","clearButtonDark","selectedColorTextStyle","colorText","colorTextDark","isSolidSegment","isCustomGadientShown","setColor","color","onClear","undefined","onCustomPress","navigate","screens","picker","gradientPicker","getClearButton","_react","createElement","TouchableWithoutFeedback","onPress","hitSlop","View","style","clearButtonContainer","Text","__","getFooter","default","segmentHandler","selectedIndex","indexOf","addonLeft","colorIndicator","addonRight","footer","flex","maxFontSizeMultiplier","selectable","toUpperCase","selectColorText","BackButton","goBack","Heading","colorPalettes","map","palette","paletteKey","paletteSettings","allColors","allGradients","enableCustomColor","name","key","activeColor","Fragment","PanelBody","ColorControl","withColorIndicator","_default","exports"],"sources":["@wordpress/components/src/mobile/color-settings/palette.screen.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { View, Text, TouchableWithoutFeedback } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { useState, useContext } from '@wordpress/element';\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\nimport {\n\tColorControl,\n\tPanelBody,\n\tBottomSheetContext,\n\tuseMobileGlobalStylesColors,\n} from '@wordpress/components';\nimport { useRoute, useNavigation } from '@react-navigation/native';\n\n/**\n * Internal dependencies\n */\nimport ColorPalette from '../../color-palette';\nimport ColorIndicator from '../../color-indicator';\nimport NavBar from '../bottom-sheet/nav-bar';\nimport SegmentedControls from '../segmented-control';\nimport { colorsUtils } from './utils';\n\nimport styles from './style.scss';\n\nconst HIT_SLOP = { top: 8, bottom: 8, left: 8, right: 8 };\n\nconst PaletteScreen = () => {\n\tconst route = useRoute();\n\tconst navigation = useNavigation();\n\tconst { shouldEnableBottomSheetScroll } = useContext( BottomSheetContext );\n\tconst {\n\t\tlabel,\n\t\tonColorChange,\n\t\tonGradientChange,\n\t\tonColorCleared,\n\t\tcolorValue,\n\t\tdefaultSettings,\n\t\thideNavigation = false,\n\t} = route.params || {};\n\tconst { segments, isGradient } = colorsUtils;\n\tconst [ currentValue, setCurrentValue ] = useState( colorValue );\n\tconst isGradientColor = isGradient( currentValue );\n\tconst selectedSegmentIndex = isGradientColor ? 1 : 0;\n\n\tconst [ currentSegment, setCurrentSegment ] = useState(\n\t\tsegments[ selectedSegmentIndex ]\n\t);\n\tconst isGradientSegment = currentSegment === colorsUtils.segments[ 1 ];\n\tconst currentSegmentColors = ! isGradientSegment\n\t\t? defaultSettings.colors\n\t\t: defaultSettings.gradients;\n\tconst allAvailableColors = useMobileGlobalStylesColors();\n\tconst allAvailableGradients = currentSegmentColors\n\t\t.flatMap( ( { gradients } ) => gradients )\n\t\t.filter( Boolean );\n\n\tconst horizontalSeparatorStyle = usePreferredColorSchemeStyle(\n\t\tstyles.horizontalSeparator,\n\t\tstyles.horizontalSeparatorDark\n\t);\n\tconst clearButtonStyle = usePreferredColorSchemeStyle(\n\t\tstyles.clearButton,\n\t\tstyles.clearButtonDark\n\t);\n\tconst selectedColorTextStyle = usePreferredColorSchemeStyle(\n\t\tstyles.colorText,\n\t\tstyles.colorTextDark\n\t);\n\n\tconst isSolidSegment = currentSegment === segments[ 0 ];\n\tconst isCustomGadientShown = ! isSolidSegment && isGradientColor;\n\n\tconst setColor = ( color ) => {\n\t\tsetCurrentValue( color );\n\t\tif ( isSolidSegment && onColorChange && onGradientChange ) {\n\t\t\tonColorChange( color );\n\t\t} else if ( isSolidSegment && onColorChange ) {\n\t\t\tonColorChange( color );\n\t\t} else if ( ! isSolidSegment && onGradientChange ) {\n\t\t\tonGradientChange( color );\n\t\t}\n\t};\n\n\tfunction onClear() {\n\t\tsetCurrentValue( undefined );\n\n\t\tif ( onColorCleared ) {\n\t\t\tonColorCleared();\n\t\t}\n\t}\n\n\tfunction onCustomPress() {\n\t\tif ( isSolidSegment ) {\n\t\t\tnavigation.navigate( colorsUtils.screens.picker, {\n\t\t\t\tcurrentValue,\n\t\t\t\tsetColor,\n\t\t\t} );\n\t\t} else {\n\t\t\tnavigation.navigate( colorsUtils.screens.gradientPicker, {\n\t\t\t\tsetColor,\n\t\t\t\tisGradientColor,\n\t\t\t\tcurrentValue,\n\t\t\t} );\n\t\t}\n\t}\n\n\tfunction getClearButton() {\n\t\treturn (\n\t\t\t<TouchableWithoutFeedback onPress={ onClear } hitSlop={ HIT_SLOP }>\n\t\t\t\t<View style={ styles.clearButtonContainer }>\n\t\t\t\t\t<Text style={ clearButtonStyle }>{ __( 'Reset' ) }</Text>\n\t\t\t\t</View>\n\t\t\t</TouchableWithoutFeedback>\n\t\t);\n\t}\n\n\tfunction getFooter() {\n\t\tif ( onGradientChange ) {\n\t\t\treturn (\n\t\t\t\t<SegmentedControls\n\t\t\t\t\tsegments={ segments }\n\t\t\t\t\tsegmentHandler={ setCurrentSegment }\n\t\t\t\t\tselectedIndex={ segments.indexOf( currentSegment ) }\n\t\t\t\t\taddonLeft={\n\t\t\t\t\t\tcurrentValue && (\n\t\t\t\t\t\t\t<ColorIndicator\n\t\t\t\t\t\t\t\tcolor={ currentValue }\n\t\t\t\t\t\t\t\tstyle={ styles.colorIndicator }\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\taddonRight={ currentValue && getClearButton() }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t<View style={ styles.footer }>\n\t\t\t\t<View style={ styles.flex }>\n\t\t\t\t\t{ currentValue && (\n\t\t\t\t\t\t<ColorIndicator\n\t\t\t\t\t\t\tcolor={ currentValue }\n\t\t\t\t\t\t\tstyle={ styles.colorIndicator }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</View>\n\t\t\t\t{ currentValue ? (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={ selectedColorTextStyle }\n\t\t\t\t\t\tmaxFontSizeMultiplier={ 2 }\n\t\t\t\t\t\tselectable\n\t\t\t\t\t>\n\t\t\t\t\t\t{ currentValue.toUpperCase() }\n\t\t\t\t\t</Text>\n\t\t\t\t) : (\n\t\t\t\t\t<Text\n\t\t\t\t\t\tstyle={ styles.selectColorText }\n\t\t\t\t\t\tmaxFontSizeMultiplier={ 2 }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Select a color above' ) }\n\t\t\t\t\t</Text>\n\t\t\t\t) }\n\t\t\t\t<View style={ styles.flex }>\n\t\t\t\t\t{ currentValue && getClearButton() }\n\t\t\t\t</View>\n\t\t\t</View>\n\t\t);\n\t}\n\treturn (\n\t\t<View>\n\t\t\t{ ! hideNavigation && (\n\t\t\t\t<NavBar>\n\t\t\t\t\t<NavBar.BackButton onPress={ navigation.goBack } />\n\t\t\t\t\t<NavBar.Heading>{ label } </NavBar.Heading>\n\t\t\t\t</NavBar>\n\t\t\t) }\n\n\t\t\t<View style={ styles.colorPalettes }>\n\t\t\t\t{ currentSegmentColors.map( ( palette, paletteKey ) => {\n\t\t\t\t\tconst paletteSettings = {\n\t\t\t\t\t\tcolors: palette.colors,\n\t\t\t\t\t\tgradients: palette.gradients,\n\t\t\t\t\t\tallColors: allAvailableColors,\n\t\t\t\t\t\tallGradients: allAvailableGradients,\n\t\t\t\t\t};\n\t\t\t\t\t// Limit to show the custom indicator to the first available palette\n\t\t\t\t\tconst enableCustomColor = paletteKey === 0;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<ColorPalette\n\t\t\t\t\t\t\tenableCustomColor={ enableCustomColor }\n\t\t\t\t\t\t\tlabel={ palette.name }\n\t\t\t\t\t\t\tkey={ paletteKey }\n\t\t\t\t\t\t\tsetColor={ setColor }\n\t\t\t\t\t\t\tactiveColor={ currentValue }\n\t\t\t\t\t\t\tisGradientColor={ isGradientColor }\n\t\t\t\t\t\t\tcurrentSegment={ currentSegment }\n\t\t\t\t\t\t\tonCustomPress={ onCustomPress }\n\t\t\t\t\t\t\tshouldEnableBottomSheetScroll={\n\t\t\t\t\t\t\t\tshouldEnableBottomSheetScroll\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdefaultSettings={ paletteSettings }\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</View>\n\n\t\t\t{ isCustomGadientShown && (\n\t\t\t\t<>\n\t\t\t\t\t<View style={ horizontalSeparatorStyle } />\n\t\t\t\t\t<PanelBody>\n\t\t\t\t\t\t<ColorControl\n\t\t\t\t\t\t\tlabel={ __( 'Customize Gradient' ) }\n\t\t\t\t\t\t\tonPress={ onCustomPress }\n\t\t\t\t\t\t\twithColorIndicator={ false }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t</>\n\t\t\t) }\n\t\t\t<View style={ horizontalSeparatorStyle } />\n\t\t\t{ getFooter() }\n\t\t</View>\n\t);\n};\n\nexport default PaletteScreen;\n"],"mappings":";;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAMA,IAAAK,OAAA,GAAAL,OAAA;AAKA,IAAAM,aAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,eAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,OAAA,GAAAF,sBAAA,CAAAP,OAAA;AACA,IAAAU,iBAAA,GAAAH,sBAAA,CAAAP,OAAA;AACA,IAAAW,MAAA,GAAAX,OAAA;AAEA,IAAAY,MAAA,GAAAL,sBAAA,CAAAP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C,QAAA,GAEarG,aAAa;AAAAsG,OAAA,CAAAhC,OAAA,GAAA+B,QAAA"}
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -18,6 +19,7 @@ var _reactNative = require("react-native");
18
19
  var _colord = require("colord");
19
20
  var _blockEditor = require("@wordpress/block-editor");
20
21
  var _compose = require("@wordpress/compose");
22
+ var _getPxFromCssUnit = _interopRequireDefault(require("../utils/get-px-from-css-unit"));
21
23
  var _index = require("./index.native");
22
24
  /**
23
25
  * External dependencies
@@ -203,6 +205,19 @@ function parseStylesVariables(styles, mappedValues, customValues) {
203
205
  const customValuesData = customValues !== null && customValues !== void 0 ? customValues : JSON.parse(stylesBase);
204
206
  stylesBase = stylesBase.replace(regex, (_$1, $2) => {
205
207
  const path = $2.split('--');
208
+
209
+ // Supports cases for variables like var(--wp--custom--color--background)
210
+ if (path[0] === 'color') {
211
+ const colorKey = path[path.length - 1];
212
+ if (mappedValues?.color) {
213
+ const matchedValue = mappedValues.color?.values?.find(({
214
+ slug
215
+ }) => slug === colorKey);
216
+ if (matchedValue) {
217
+ return `${matchedValue?.color}`;
218
+ }
219
+ }
220
+ }
206
221
  if (path.reduce((prev, curr) => prev && prev[curr], customValuesData)) {
207
222
  return getValueFromObjectPath(customValuesData, path);
208
223
  }
@@ -228,7 +243,7 @@ function parseStylesVariables(styles, mappedValues, customValues) {
228
243
  height
229
244
  } = _reactNative.Dimensions.get('window');
230
245
  stylesBase = stylesBase.replace(fontSizeRegex, (_$1, $2) => {
231
- const parsedFontSize = (0, _blockEditor.getPxFromCssUnit)($2, {
246
+ const parsedFontSize = (0, _getPxFromCssUnit.default)($2, {
232
247
  width,
233
248
  height,
234
249
  fontSize: DEFAULT_FONT_SIZE
@@ -266,23 +281,34 @@ function getMappedValues(features, palette) {
266
281
  * @return {Object} normalized sizes.
267
282
  */
268
283
  function normalizeFontSizes(fontSizes) {
269
- // Adds normalized PX values for each of the different keys.
270
284
  if (!fontSizes) {
271
285
  return fontSizes;
272
286
  }
273
- const normalizedFontSizes = {};
274
287
  const dimensions = _reactNative.Dimensions.get('window');
275
- ['default', 'theme', 'custom'].forEach(key => {
276
- if (fontSizes[key]) {
277
- normalizedFontSizes[key] = fontSizes[key]?.map(fontSizeObject => {
278
- fontSizeObject.sizePx = (0, _blockEditor.getPxFromCssUnit)(fontSizeObject.size, {
279
- width: dimensions.width,
280
- height: dimensions.height,
281
- fontSize: DEFAULT_FONT_SIZE
282
- });
283
- return fontSizeObject;
288
+ const normalizedFontSizes = {};
289
+ const keysToProcess = [];
290
+
291
+ // Check if 'theme' or 'custom' keys exist and add them to keysToProcess array
292
+ if (fontSizes?.theme) {
293
+ keysToProcess.push('theme');
294
+ }
295
+ if (fontSizes?.custom) {
296
+ keysToProcess.push('custom');
297
+ }
298
+
299
+ // If neither 'theme' nor 'custom' exist, add 'default' if it exists
300
+ if (keysToProcess.length === 0 && fontSizes?.default) {
301
+ keysToProcess.push('default');
302
+ }
303
+ keysToProcess.forEach(key => {
304
+ normalizedFontSizes[key] = fontSizes[key].map(fontSizeObject => {
305
+ fontSizeObject.sizePx = (0, _getPxFromCssUnit.default)(fontSizeObject.size, {
306
+ width: dimensions.width,
307
+ height: dimensions.height,
308
+ fontSize: DEFAULT_FONT_SIZE
284
309
  });
285
- }
310
+ return fontSizeObject;
311
+ });
286
312
  });
287
313
  return normalizedFontSizes;
288
314
  }