@wordpress/components 19.5.0 → 19.6.1

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 (633) hide show
  1. package/CHANGELOG.md +23 -5
  2. package/build/alignment-matrix-control/utils.js +1 -1
  3. package/build/alignment-matrix-control/utils.js.map +1 -1
  4. package/build/angle-picker-control/angle-circle.js +1 -1
  5. package/build/angle-picker-control/angle-circle.js.map +1 -1
  6. package/build/animation/index.js +0 -6
  7. package/build/animation/index.js.map +1 -1
  8. package/build/autocomplete/get-default-use-items.js +3 -3
  9. package/build/autocomplete/get-default-use-items.js.map +1 -1
  10. package/build/base-field/hook.js +1 -1
  11. package/build/base-field/hook.js.map +1 -1
  12. package/build/box-control/icon.js +1 -1
  13. package/build/box-control/icon.js.map +1 -1
  14. package/build/box-control/index.js +4 -4
  15. package/build/box-control/index.js.map +1 -1
  16. package/build/box-control/utils.js +12 -8
  17. package/build/box-control/utils.js.map +1 -1
  18. package/build/button/index.js +5 -5
  19. package/build/button/index.js.map +1 -1
  20. package/build/button/index.native.js +7 -7
  21. package/build/button/index.native.js.map +1 -1
  22. package/build/color-picker/color-display.js +1 -1
  23. package/build/color-picker/color-display.js.map +1 -1
  24. package/build/color-picker/styles.js +8 -8
  25. package/build/color-picker/styles.js.map +1 -1
  26. package/build/combobox-control/index.js +1 -1
  27. package/build/combobox-control/index.js.map +1 -1
  28. package/build/confirm-dialog/component.js +4 -2
  29. package/build/confirm-dialog/component.js.map +1 -1
  30. package/build/date-time/time.js +7 -4
  31. package/build/date-time/time.js.map +1 -1
  32. package/build/divider/component.js +5 -4
  33. package/build/divider/component.js.map +1 -1
  34. package/build/draggable/index.js +3 -3
  35. package/build/draggable/index.js.map +1 -1
  36. package/build/focal-point-picker/index.native.js +7 -7
  37. package/build/focal-point-picker/index.native.js.map +1 -1
  38. package/build/focal-point-picker/tooltip/index.native.js +1 -1
  39. package/build/focal-point-picker/tooltip/index.native.js.map +1 -1
  40. package/build/font-size-picker/index.js +1 -1
  41. package/build/font-size-picker/index.js.map +1 -1
  42. package/build/form-token-field/index.js +6 -6
  43. package/build/form-token-field/index.js.map +1 -1
  44. package/build/form-token-field/suggestions-list.js +2 -2
  45. package/build/form-token-field/suggestions-list.js.map +1 -1
  46. package/build/heading/component.js +6 -5
  47. package/build/heading/component.js.map +1 -1
  48. package/build/heading/hook.js +1 -1
  49. package/build/heading/hook.js.map +1 -1
  50. package/build/higher-order/with-notices/index.js +1 -1
  51. package/build/higher-order/with-notices/index.js.map +1 -1
  52. package/build/index.js +2 -2
  53. package/build/index.js.map +1 -1
  54. package/build/index.native.js.map +1 -1
  55. package/build/input-control/input-base.js +1 -1
  56. package/build/input-control/input-base.js.map +1 -1
  57. package/build/input-control/input-field.js +12 -10
  58. package/build/input-control/input-field.js.map +1 -1
  59. package/build/input-control/styles/input-control-styles.js +25 -25
  60. package/build/input-control/styles/input-control-styles.js.map +1 -1
  61. package/build/isolated-event-container/index.js +1 -1
  62. package/build/isolated-event-container/index.js.map +1 -1
  63. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  64. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  65. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  66. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  67. package/build/mobile/bottom-sheet/cell.native.js +1 -1
  68. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  69. package/build/mobile/bottom-sheet/index.native.js +11 -11
  70. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  71. package/build/mobile/bottom-sheet/link-cell.native.js +1 -1
  72. package/build/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  73. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  74. package/build/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  75. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  76. package/build/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  77. package/build/mobile/global-styles-context/utils.native.js +10 -10
  78. package/build/mobile/global-styles-context/utils.native.js.map +1 -1
  79. package/build/mobile/gradient/index.native.js +2 -2
  80. package/build/mobile/gradient/index.native.js.map +1 -1
  81. package/build/mobile/html-text-input/container.ios.js +3 -3
  82. package/build/mobile/html-text-input/container.ios.js.map +1 -1
  83. package/build/mobile/html-text-input/index.native.js +1 -1
  84. package/build/mobile/html-text-input/index.native.js.map +1 -1
  85. package/build/mobile/image/index.native.js +1 -1
  86. package/build/mobile/image/index.native.js.map +1 -1
  87. package/build/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  88. package/build/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  89. package/build/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  90. package/build/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  91. package/build/mobile/link-picker/index.native.js +3 -3
  92. package/build/mobile/link-picker/index.native.js.map +1 -1
  93. package/build/mobile/link-picker/link-picker-results.native.js +8 -8
  94. package/build/mobile/link-picker/link-picker-results.native.js.map +1 -1
  95. package/build/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  96. package/build/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
  97. package/build/mobile/link-settings/index.native.js +1 -1
  98. package/build/mobile/link-settings/index.native.js.map +1 -1
  99. package/build/modal/aria-helper.js +1 -1
  100. package/build/modal/aria-helper.js.map +1 -1
  101. package/build/modal/index.js +2 -2
  102. package/build/modal/index.js.map +1 -1
  103. package/build/navigable-container/container.js +2 -2
  104. package/build/navigable-container/container.js.map +1 -1
  105. package/build/navigable-container/tabbable.js +1 -1
  106. package/build/navigable-container/tabbable.js.map +1 -1
  107. package/build/navigation/item/index.js +1 -1
  108. package/build/navigation/item/index.js.map +1 -1
  109. package/build/navigation/menu/index.js +1 -1
  110. package/build/navigation/menu/index.js.map +1 -1
  111. package/build/navigator/navigator-provider/component.js +2 -2
  112. package/build/navigator/navigator-provider/component.js.map +1 -1
  113. package/build/navigator/navigator-screen/component.js +1 -1
  114. package/build/navigator/navigator-screen/component.js.map +1 -1
  115. package/build/number-control/index.js +1 -1
  116. package/build/number-control/index.js.map +1 -1
  117. package/build/panel/body.js +2 -2
  118. package/build/panel/body.js.map +1 -1
  119. package/build/popover/index.js +3 -3
  120. package/build/popover/index.js.map +1 -1
  121. package/build/popover/utils.js +6 -6
  122. package/build/popover/utils.js.map +1 -1
  123. package/build/radio-group/index.js +1 -1
  124. package/build/radio-group/index.js.map +1 -1
  125. package/build/range-control/styles/range-control-styles.js +29 -29
  126. package/build/range-control/styles/range-control-styles.js.map +1 -1
  127. package/build/sandbox/index.js +5 -5
  128. package/build/sandbox/index.js.map +1 -1
  129. package/build/sandbox/index.native.js +1 -1
  130. package/build/sandbox/index.native.js.map +1 -1
  131. package/build/select-control/index.js +1 -1
  132. package/build/select-control/index.js.map +1 -1
  133. package/build/select-control/styles/select-control-styles.js +5 -5
  134. package/build/select-control/styles/select-control-styles.js.map +1 -1
  135. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  136. package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  137. package/build/slot-fill/bubbles-virtually/slot.js +1 -1
  138. package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
  139. package/build/slot-fill/fill.js +1 -1
  140. package/build/slot-fill/fill.js.map +1 -1
  141. package/build/slot-fill/provider.js +1 -1
  142. package/build/slot-fill/provider.js.map +1 -1
  143. package/build/snackbar/index.js +1 -1
  144. package/build/snackbar/index.js.map +1 -1
  145. package/build/snackbar/list.js +1 -1
  146. package/build/snackbar/list.js.map +1 -1
  147. package/build/style-provider/index.js +2 -2
  148. package/build/style-provider/index.js.map +1 -1
  149. package/build/toggle-group-control/toggle-group-control/component.js +2 -2
  150. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  151. package/build/toggle-group-control/toggle-group-control-option/component.js +1 -4
  152. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  153. package/build/toggle-group-control/toggle-group-control-option/styles.js +12 -19
  154. package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  155. package/build/toolbar/index.js +1 -1
  156. package/build/toolbar/index.js.map +1 -1
  157. package/build/tooltip/index.js +3 -3
  158. package/build/tooltip/index.js.map +1 -1
  159. package/build/tooltip/index.native.js +7 -7
  160. package/build/tooltip/index.native.js.map +1 -1
  161. package/build/tree-grid/index.js +4 -1
  162. package/build/tree-grid/index.js.map +1 -1
  163. package/build/truncate/utils.js +1 -1
  164. package/build/truncate/utils.js.map +1 -1
  165. package/build/ui/context/context-connect.js +8 -15
  166. package/build/ui/context/context-connect.js.map +1 -1
  167. package/build/ui/context/context-system-provider.js +2 -2
  168. package/build/ui/context/context-system-provider.js.map +1 -1
  169. package/build/ui/context/index.js.map +1 -1
  170. package/build/ui/utils/colors.js +2 -2
  171. package/build/ui/utils/colors.js.map +1 -1
  172. package/build/ui/utils/space.js +2 -2
  173. package/build/ui/utils/space.js.map +1 -1
  174. package/build/unit-control/index.js +38 -29
  175. package/build/unit-control/index.js.map +1 -1
  176. package/build/unit-control/index.native.js +4 -2
  177. package/build/unit-control/index.native.js.map +1 -1
  178. package/build/unit-control/unit-select-control.js +1 -1
  179. package/build/unit-control/unit-select-control.js.map +1 -1
  180. package/build/unit-control/utils.js +96 -104
  181. package/build/unit-control/utils.js.map +1 -1
  182. package/build/utils/breakpoint-values.js +1 -1
  183. package/build/utils/breakpoint-values.js.map +1 -1
  184. package/build/utils/colors-values.js +1 -1
  185. package/build/utils/colors-values.js.map +1 -1
  186. package/build-module/alignment-matrix-control/utils.js +1 -1
  187. package/build-module/alignment-matrix-control/utils.js.map +1 -1
  188. package/build-module/angle-picker-control/angle-circle.js +1 -1
  189. package/build-module/angle-picker-control/angle-circle.js.map +1 -1
  190. package/build-module/animation/index.js +1 -1
  191. package/build-module/animation/index.js.map +1 -1
  192. package/build-module/autocomplete/get-default-use-items.js +3 -3
  193. package/build-module/autocomplete/get-default-use-items.js.map +1 -1
  194. package/build-module/base-field/hook.js +1 -1
  195. package/build-module/base-field/hook.js.map +1 -1
  196. package/build-module/box-control/icon.js +1 -1
  197. package/build-module/box-control/icon.js.map +1 -1
  198. package/build-module/box-control/index.js +5 -5
  199. package/build-module/box-control/index.js.map +1 -1
  200. package/build-module/box-control/utils.js +13 -9
  201. package/build-module/box-control/utils.js.map +1 -1
  202. package/build-module/button/index.js +5 -5
  203. package/build-module/button/index.js.map +1 -1
  204. package/build-module/button/index.native.js +7 -7
  205. package/build-module/button/index.native.js.map +1 -1
  206. package/build-module/color-picker/color-display.js +1 -1
  207. package/build-module/color-picker/color-display.js.map +1 -1
  208. package/build-module/color-picker/styles.js +8 -8
  209. package/build-module/color-picker/styles.js.map +1 -1
  210. package/build-module/combobox-control/index.js +1 -1
  211. package/build-module/combobox-control/index.js.map +1 -1
  212. package/build-module/confirm-dialog/component.js +4 -5
  213. package/build-module/confirm-dialog/component.js.map +1 -1
  214. package/build-module/date-time/time.js +7 -4
  215. package/build-module/date-time/time.js.map +1 -1
  216. package/build-module/divider/component.js +3 -3
  217. package/build-module/divider/component.js.map +1 -1
  218. package/build-module/draggable/index.js +3 -3
  219. package/build-module/draggable/index.js.map +1 -1
  220. package/build-module/focal-point-picker/index.native.js +7 -7
  221. package/build-module/focal-point-picker/index.native.js.map +1 -1
  222. package/build-module/focal-point-picker/tooltip/index.native.js +1 -1
  223. package/build-module/focal-point-picker/tooltip/index.native.js.map +1 -1
  224. package/build-module/font-size-picker/index.js +1 -1
  225. package/build-module/font-size-picker/index.js.map +1 -1
  226. package/build-module/form-token-field/index.js +6 -6
  227. package/build-module/form-token-field/index.js.map +1 -1
  228. package/build-module/form-token-field/suggestions-list.js +2 -2
  229. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  230. package/build-module/heading/component.js +4 -4
  231. package/build-module/heading/component.js.map +1 -1
  232. package/build-module/heading/hook.js +1 -1
  233. package/build-module/heading/hook.js.map +1 -1
  234. package/build-module/higher-order/with-notices/index.js +1 -1
  235. package/build-module/higher-order/with-notices/index.js.map +1 -1
  236. package/build-module/index.js +4 -4
  237. package/build-module/index.js.map +1 -1
  238. package/build-module/index.native.js +4 -4
  239. package/build-module/index.native.js.map +1 -1
  240. package/build-module/input-control/input-base.js +1 -1
  241. package/build-module/input-control/input-base.js.map +1 -1
  242. package/build-module/input-control/input-field.js +13 -10
  243. package/build-module/input-control/input-field.js.map +1 -1
  244. package/build-module/input-control/styles/input-control-styles.js +25 -25
  245. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  246. package/build-module/isolated-event-container/index.js +1 -1
  247. package/build-module/isolated-event-container/index.js.map +1 -1
  248. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  249. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  250. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  251. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  252. package/build-module/mobile/bottom-sheet/cell.native.js +1 -1
  253. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  254. package/build-module/mobile/bottom-sheet/index.native.js +11 -11
  255. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  256. package/build-module/mobile/bottom-sheet/link-cell.native.js +1 -1
  257. package/build-module/mobile/bottom-sheet/link-cell.native.js.map +1 -1
  258. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  259. package/build-module/mobile/bottom-sheet/link-suggestion-item-cell.native.js.map +1 -1
  260. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  261. package/build-module/mobile/bottom-sheet/nav-bar/back-button.native.js.map +1 -1
  262. package/build-module/mobile/global-styles-context/utils.native.js +10 -10
  263. package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
  264. package/build-module/mobile/gradient/index.native.js +2 -2
  265. package/build-module/mobile/gradient/index.native.js.map +1 -1
  266. package/build-module/mobile/html-text-input/container.ios.js +3 -3
  267. package/build-module/mobile/html-text-input/container.ios.js.map +1 -1
  268. package/build-module/mobile/html-text-input/index.native.js +1 -1
  269. package/build-module/mobile/html-text-input/index.native.js.map +1 -1
  270. package/build-module/mobile/image/index.native.js +1 -1
  271. package/build-module/mobile/image/index.native.js.map +1 -1
  272. package/build-module/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  273. package/build-module/mobile/keyboard-aware-flat-list/index.android.js.map +1 -1
  274. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  275. package/build-module/mobile/keyboard-aware-flat-list/index.ios.js.map +1 -1
  276. package/build-module/mobile/link-picker/index.native.js +3 -3
  277. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  278. package/build-module/mobile/link-picker/link-picker-results.native.js +8 -8
  279. package/build-module/mobile/link-picker/link-picker-results.native.js.map +1 -1
  280. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  281. package/build-module/mobile/link-settings/image-link-destinations-screen.native.js.map +1 -1
  282. package/build-module/mobile/link-settings/index.native.js +1 -1
  283. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  284. package/build-module/modal/aria-helper.js +1 -1
  285. package/build-module/modal/aria-helper.js.map +1 -1
  286. package/build-module/modal/index.js +2 -2
  287. package/build-module/modal/index.js.map +1 -1
  288. package/build-module/navigable-container/container.js +2 -2
  289. package/build-module/navigable-container/container.js.map +1 -1
  290. package/build-module/navigable-container/tabbable.js +1 -1
  291. package/build-module/navigable-container/tabbable.js.map +1 -1
  292. package/build-module/navigation/item/index.js +1 -1
  293. package/build-module/navigation/item/index.js.map +1 -1
  294. package/build-module/navigation/menu/index.js +1 -1
  295. package/build-module/navigation/menu/index.js.map +1 -1
  296. package/build-module/navigator/navigator-provider/component.js +2 -2
  297. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  298. package/build-module/navigator/navigator-screen/component.js +1 -1
  299. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  300. package/build-module/number-control/index.js +1 -1
  301. package/build-module/number-control/index.js.map +1 -1
  302. package/build-module/panel/body.js +2 -2
  303. package/build-module/panel/body.js.map +1 -1
  304. package/build-module/popover/index.js +3 -3
  305. package/build-module/popover/index.js.map +1 -1
  306. package/build-module/popover/utils.js +6 -6
  307. package/build-module/popover/utils.js.map +1 -1
  308. package/build-module/radio-group/index.js +1 -1
  309. package/build-module/radio-group/index.js.map +1 -1
  310. package/build-module/range-control/styles/range-control-styles.js +29 -29
  311. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  312. package/build-module/sandbox/index.js +5 -5
  313. package/build-module/sandbox/index.js.map +1 -1
  314. package/build-module/sandbox/index.native.js +1 -1
  315. package/build-module/sandbox/index.native.js.map +1 -1
  316. package/build-module/select-control/index.js +1 -1
  317. package/build-module/select-control/index.js.map +1 -1
  318. package/build-module/select-control/styles/select-control-styles.js +5 -5
  319. package/build-module/select-control/styles/select-control-styles.js.map +1 -1
  320. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  321. package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
  322. package/build-module/slot-fill/bubbles-virtually/slot.js +1 -1
  323. package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
  324. package/build-module/slot-fill/fill.js +1 -1
  325. package/build-module/slot-fill/fill.js.map +1 -1
  326. package/build-module/slot-fill/provider.js +1 -1
  327. package/build-module/slot-fill/provider.js.map +1 -1
  328. package/build-module/snackbar/index.js +1 -1
  329. package/build-module/snackbar/index.js.map +1 -1
  330. package/build-module/snackbar/list.js +1 -1
  331. package/build-module/snackbar/list.js.map +1 -1
  332. package/build-module/style-provider/index.js +2 -2
  333. package/build-module/style-provider/index.js.map +1 -1
  334. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -2
  335. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  336. package/build-module/toggle-group-control/toggle-group-control-option/component.js +1 -4
  337. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  338. package/build-module/toggle-group-control/toggle-group-control-option/styles.js +11 -17
  339. package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  340. package/build-module/toolbar/index.js +1 -1
  341. package/build-module/toolbar/index.js.map +1 -1
  342. package/build-module/tooltip/index.js +3 -3
  343. package/build-module/tooltip/index.js.map +1 -1
  344. package/build-module/tooltip/index.native.js +7 -7
  345. package/build-module/tooltip/index.native.js.map +1 -1
  346. package/build-module/tree-grid/index.js +4 -1
  347. package/build-module/tree-grid/index.js.map +1 -1
  348. package/build-module/truncate/utils.js +1 -1
  349. package/build-module/truncate/utils.js.map +1 -1
  350. package/build-module/ui/context/context-connect.js +9 -16
  351. package/build-module/ui/context/context-connect.js.map +1 -1
  352. package/build-module/ui/context/context-system-provider.js +2 -2
  353. package/build-module/ui/context/context-system-provider.js.map +1 -1
  354. package/build-module/ui/context/index.js.map +1 -1
  355. package/build-module/ui/utils/colors.js +2 -2
  356. package/build-module/ui/utils/colors.js.map +1 -1
  357. package/build-module/ui/utils/space.js +2 -2
  358. package/build-module/ui/utils/space.js.map +1 -1
  359. package/build-module/unit-control/index.js +39 -30
  360. package/build-module/unit-control/index.js.map +1 -1
  361. package/build-module/unit-control/index.native.js +5 -3
  362. package/build-module/unit-control/index.native.js.map +1 -1
  363. package/build-module/unit-control/unit-select-control.js +1 -1
  364. package/build-module/unit-control/unit-select-control.js.map +1 -1
  365. package/build-module/unit-control/utils.js +92 -100
  366. package/build-module/unit-control/utils.js.map +1 -1
  367. package/build-module/utils/breakpoint-values.js +1 -1
  368. package/build-module/utils/breakpoint-values.js.map +1 -1
  369. package/build-module/utils/colors-values.js +1 -1
  370. package/build-module/utils/colors-values.js.map +1 -1
  371. package/build-style/style-rtl.css +8 -0
  372. package/build-style/style.css +8 -0
  373. package/build-types/base-field/hook.d.ts +2 -1
  374. package/build-types/base-field/hook.d.ts.map +1 -1
  375. package/build-types/card/card/hook.d.ts +2 -1
  376. package/build-types/card/card/hook.d.ts.map +1 -1
  377. package/build-types/card/card-body/hook.d.ts +2 -1
  378. package/build-types/card/card-body/hook.d.ts.map +1 -1
  379. package/build-types/card/card-divider/hook.d.ts +2 -2
  380. package/build-types/card/card-footer/hook.d.ts +2 -1
  381. package/build-types/card/card-footer/hook.d.ts.map +1 -1
  382. package/build-types/card/card-header/hook.d.ts +2 -1
  383. package/build-types/card/card-header/hook.d.ts.map +1 -1
  384. package/build-types/card/card-media/hook.d.ts +2 -1
  385. package/build-types/card/card-media/hook.d.ts.map +1 -1
  386. package/build-types/color-picker/styles.d.ts +2 -2
  387. package/build-types/confirm-dialog/component.d.ts +8 -0
  388. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  389. package/build-types/confirm-dialog/types.d.ts +2 -0
  390. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  391. package/build-types/divider/component.d.ts +2 -2
  392. package/build-types/divider/component.d.ts.map +1 -1
  393. package/build-types/divider/stories/index.d.ts +10 -0
  394. package/build-types/divider/stories/index.d.ts.map +1 -0
  395. package/build-types/divider/types.d.ts +1 -1
  396. package/build-types/divider/types.d.ts.map +1 -1
  397. package/build-types/elevation/hook.d.ts +2 -1
  398. package/build-types/elevation/hook.d.ts.map +1 -1
  399. package/build-types/flex/flex/hook.d.ts +2 -1
  400. package/build-types/flex/flex/hook.d.ts.map +1 -1
  401. package/build-types/flex/flex-block/hook.d.ts +2 -1
  402. package/build-types/flex/flex-block/hook.d.ts.map +1 -1
  403. package/build-types/flex/flex-item/hook.d.ts +2 -1
  404. package/build-types/flex/flex-item/hook.d.ts.map +1 -1
  405. package/build-types/flyout/flyout/hook.d.ts +2 -1
  406. package/build-types/flyout/flyout/hook.d.ts.map +1 -1
  407. package/build-types/grid/hook.d.ts +2 -1
  408. package/build-types/grid/hook.d.ts.map +1 -1
  409. package/build-types/h-stack/hook.d.ts +3 -2
  410. package/build-types/h-stack/hook.d.ts.map +1 -1
  411. package/build-types/heading/component.d.ts +3 -3
  412. package/build-types/heading/component.d.ts.map +1 -1
  413. package/build-types/heading/hook.d.ts +2 -1
  414. package/build-types/heading/hook.d.ts.map +1 -1
  415. package/build-types/heading/stories/index.d.ts +12 -0
  416. package/build-types/heading/stories/index.d.ts.map +1 -0
  417. package/build-types/input-control/index.d.ts +1 -1
  418. package/build-types/input-control/index.d.ts.map +1 -1
  419. package/build-types/input-control/input-field.d.ts +1 -1
  420. package/build-types/input-control/input-field.d.ts.map +1 -1
  421. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  422. package/build-types/item-group/item/hook.d.ts +2 -1
  423. package/build-types/item-group/item/hook.d.ts.map +1 -1
  424. package/build-types/item-group/item-group/hook.d.ts +2 -1
  425. package/build-types/item-group/item-group/hook.d.ts.map +1 -1
  426. package/build-types/navigator/navigator-back-button/hook.d.ts +2 -1
  427. package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
  428. package/build-types/navigator/navigator-button/hook.d.ts +2 -1
  429. package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
  430. package/build-types/number-control/styles/number-control-styles.d.ts +1 -1
  431. package/build-types/scrollable/hook.d.ts +2 -1
  432. package/build-types/scrollable/hook.d.ts.map +1 -1
  433. package/build-types/select-control/index.d.ts +1 -1
  434. package/build-types/select-control/index.d.ts.map +1 -1
  435. package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
  436. package/build-types/spacer/hook.d.ts +2 -1
  437. package/build-types/spacer/hook.d.ts.map +1 -1
  438. package/build-types/surface/hook.d.ts +2 -1
  439. package/build-types/surface/hook.d.ts.map +1 -1
  440. package/build-types/text/hook.d.ts +2 -1
  441. package/build-types/text/hook.d.ts.map +1 -1
  442. package/build-types/text/types.d.ts +1 -2
  443. package/build-types/text/types.d.ts.map +1 -1
  444. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  445. package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts +0 -4
  446. package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
  447. package/build-types/tools-panel/tools-panel/hook.d.ts +2 -1
  448. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  449. package/build-types/tools-panel/tools-panel-header/hook.d.ts +2 -1
  450. package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
  451. package/build-types/tools-panel/tools-panel-item/hook.d.ts +2 -1
  452. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  453. package/build-types/truncate/hook.d.ts +2 -1
  454. package/build-types/truncate/hook.d.ts.map +1 -1
  455. package/build-types/ui/context/context-connect.d.ts +18 -16
  456. package/build-types/ui/context/context-connect.d.ts.map +1 -1
  457. package/build-types/ui/context/index.d.ts +4 -4
  458. package/build-types/ui/context/index.d.ts.map +1 -1
  459. package/build-types/ui/context/wordpress-component.d.ts +1 -0
  460. package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
  461. package/build-types/ui/control-group/hook.d.ts +2 -1
  462. package/build-types/ui/control-group/hook.d.ts.map +1 -1
  463. package/build-types/ui/control-label/hook.d.ts +2 -1
  464. package/build-types/ui/control-label/hook.d.ts.map +1 -1
  465. package/build-types/ui/form-group/use-form-group.d.ts +6 -4
  466. package/build-types/ui/form-group/use-form-group.d.ts.map +1 -1
  467. package/build-types/unit-control/index.d.ts +3 -3
  468. package/build-types/unit-control/index.d.ts.map +1 -1
  469. package/build-types/unit-control/types.d.ts +4 -6
  470. package/build-types/unit-control/types.d.ts.map +1 -1
  471. package/build-types/unit-control/utils.d.ts +47 -38
  472. package/build-types/unit-control/utils.d.ts.map +1 -1
  473. package/build-types/v-stack/hook.d.ts +2 -1
  474. package/build-types/v-stack/hook.d.ts.map +1 -1
  475. package/package.json +18 -18
  476. package/src/alignment-matrix-control/utils.js +1 -1
  477. package/src/angle-picker-control/angle-circle.js +1 -1
  478. package/src/animation/index.js +0 -1
  479. package/src/autocomplete/get-default-use-items.js +3 -3
  480. package/src/base-field/hook.js +1 -1
  481. package/src/box-control/icon.js +1 -1
  482. package/src/box-control/index.js +5 -5
  483. package/src/box-control/test/index.js +27 -7
  484. package/src/box-control/utils.js +13 -9
  485. package/src/button/index.js +5 -5
  486. package/src/button/index.native.js +7 -7
  487. package/src/button/style.scss +1 -0
  488. package/src/color-palette/style.scss +1 -0
  489. package/src/color-picker/color-display.tsx +1 -1
  490. package/src/color-picker/styles.ts +1 -1
  491. package/src/color-picker/test/index.js +1 -1
  492. package/src/combobox-control/index.js +1 -1
  493. package/src/combobox-control/style.scss +1 -0
  494. package/src/confirm-dialog/README.md +56 -45
  495. package/src/confirm-dialog/component.tsx +4 -2
  496. package/src/confirm-dialog/stories/index.js +19 -0
  497. package/src/confirm-dialog/test/index.js +28 -0
  498. package/src/confirm-dialog/types.ts +2 -0
  499. package/src/date-time/style.scss +4 -0
  500. package/src/date-time/time.js +16 -5
  501. package/src/dimension-control/test/index.test.js +1 -1
  502. package/src/disabled/test/index.js +1 -1
  503. package/src/divider/component.tsx +3 -3
  504. package/src/divider/stories/index.tsx +70 -0
  505. package/src/divider/types.ts +3 -1
  506. package/src/draggable/index.js +3 -3
  507. package/src/draggable/stories/index.js +1 -1
  508. package/src/flyout/flyout/README.md +1 -1
  509. package/src/flyout/test/index.js +1 -1
  510. package/src/focal-point-picker/index.native.js +7 -7
  511. package/src/focal-point-picker/tooltip/index.native.js +1 -1
  512. package/src/font-size-picker/README.md +1 -2
  513. package/src/font-size-picker/index.js +1 -1
  514. package/src/font-size-picker/stories/index.js +87 -108
  515. package/src/font-size-picker/test/index.js +0 -2
  516. package/src/form-token-field/index.js +6 -6
  517. package/src/form-token-field/style.scss +1 -0
  518. package/src/form-token-field/suggestions-list.js +2 -2
  519. package/src/form-token-field/test/index.js +6 -6
  520. package/src/heading/component.tsx +4 -4
  521. package/src/heading/hook.ts +1 -1
  522. package/src/heading/stories/index.tsx +37 -0
  523. package/src/higher-order/with-filters/test/index.js +1 -1
  524. package/src/higher-order/with-focus-outside/test/index.js +1 -1
  525. package/src/higher-order/with-notices/index.js +1 -1
  526. package/src/higher-order/with-notices/test/index.js +3 -3
  527. package/src/index.js +4 -4
  528. package/src/index.native.js +4 -4
  529. package/src/input-control/input-base.tsx +1 -1
  530. package/src/input-control/input-field.tsx +12 -9
  531. package/src/input-control/styles/input-control-styles.tsx +1 -0
  532. package/src/input-control/test/index.js +4 -4
  533. package/src/isolated-event-container/index.js +1 -1
  534. package/src/item-group/test/index.js +0 -1
  535. package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +4 -4
  536. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -1
  537. package/src/mobile/bottom-sheet/cell.native.js +1 -1
  538. package/src/mobile/bottom-sheet/index.native.js +11 -11
  539. package/src/mobile/bottom-sheet/link-cell.native.js +1 -1
  540. package/src/mobile/bottom-sheet/link-suggestion-item-cell.native.js +1 -1
  541. package/src/mobile/bottom-sheet/nav-bar/back-button.native.js +1 -1
  542. package/src/mobile/global-styles-context/utils.native.js +10 -10
  543. package/src/mobile/gradient/index.native.js +2 -2
  544. package/src/mobile/html-text-input/container.ios.js +3 -3
  545. package/src/mobile/html-text-input/index.native.js +1 -1
  546. package/src/mobile/html-text-input/test/index.native.js +14 -14
  547. package/src/mobile/image/index.native.js +1 -1
  548. package/src/mobile/image/style.native.scss +1 -0
  549. package/src/mobile/keyboard-aware-flat-list/index.android.js +1 -1
  550. package/src/mobile/keyboard-aware-flat-list/index.ios.js +2 -2
  551. package/src/mobile/link-picker/index.native.js +3 -3
  552. package/src/mobile/link-picker/link-picker-results.native.js +8 -8
  553. package/src/mobile/link-settings/image-link-destinations-screen.native.js +2 -2
  554. package/src/mobile/link-settings/index.native.js +1 -2
  555. package/src/mobile/link-settings/test/edit.native.js +15 -15
  556. package/src/modal/aria-helper.js +1 -1
  557. package/src/modal/index.js +2 -2
  558. package/src/navigable-container/container.js +2 -2
  559. package/src/navigable-container/tabbable.js +1 -1
  560. package/src/navigable-container/test/menu.js +5 -5
  561. package/src/navigable-container/test/tabbable.js +2 -2
  562. package/src/navigation/item/index.js +1 -1
  563. package/src/navigation/menu/index.js +1 -1
  564. package/src/navigation/stories/controlled-state.js +2 -2
  565. package/src/navigator/navigator-provider/component.tsx +1 -1
  566. package/src/navigator/navigator-screen/component.tsx +2 -2
  567. package/src/navigator/test/index.js +18 -19
  568. package/src/navigator/types.ts +1 -1
  569. package/src/number-control/index.js +1 -1
  570. package/src/panel/body.js +2 -2
  571. package/src/popover/index.js +3 -3
  572. package/src/popover/utils.js +6 -6
  573. package/src/radio-group/index.js +1 -1
  574. package/src/range-control/stories/index.js +1 -1
  575. package/src/range-control/styles/range-control-styles.js +1 -1
  576. package/src/range-control/test/index.js +2 -2
  577. package/src/sandbox/index.js +5 -5
  578. package/src/sandbox/index.native.js +1 -1
  579. package/src/select-control/index.tsx +1 -1
  580. package/src/select-control/styles/select-control-styles.ts +1 -0
  581. package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
  582. package/src/slot-fill/bubbles-virtually/slot.js +1 -2
  583. package/src/slot-fill/fill.js +1 -1
  584. package/src/slot-fill/provider.js +1 -1
  585. package/src/snackbar/index.js +1 -1
  586. package/src/snackbar/list.js +1 -1
  587. package/src/style-provider/index.js +2 -2
  588. package/src/tab-panel/test/index.js +1 -1
  589. package/src/text/test/index.js +2 -2
  590. package/src/text/types.ts +6 -8
  591. package/src/text-highlight/test/index.js +4 -4
  592. package/src/toggle-control/test/index.js +3 -3
  593. package/src/toggle-group-control/test/__snapshots__/index.js.snap +1 -27
  594. package/src/toggle-group-control/toggle-group-control/component.tsx +2 -2
  595. package/src/toggle-group-control/toggle-group-control-option/component.tsx +1 -4
  596. package/src/toggle-group-control/toggle-group-control-option/styles.ts +1 -12
  597. package/src/toolbar/index.js +1 -1
  598. package/src/toolbar-group/test/index.js +2 -2
  599. package/src/tooltip/index.js +3 -3
  600. package/src/tooltip/index.native.js +7 -7
  601. package/src/tooltip/test/index.js +2 -2
  602. package/src/tooltip/test/index.native.js +2 -2
  603. package/src/tree-grid/README.md +1 -1
  604. package/src/tree-grid/index.js +4 -0
  605. package/src/tree-grid/test/__snapshots__/index.js.snap +1 -1
  606. package/src/tree-grid/test/index.js +128 -52
  607. package/src/truncate/utils.js +1 -1
  608. package/src/ui/context/{context-connect.js → context-connect.ts} +27 -16
  609. package/src/ui/context/context-system-provider.js +2 -2
  610. package/src/ui/context/{index.js → index.ts} +0 -0
  611. package/src/ui/context/wordpress-component.ts +1 -0
  612. package/src/ui/tooltip/test/index.js +4 -4
  613. package/src/ui/utils/colors.js +2 -2
  614. package/src/ui/utils/space.ts +2 -2
  615. package/src/unit-control/README.md +1 -1
  616. package/src/unit-control/index.native.js +5 -3
  617. package/src/unit-control/index.tsx +64 -35
  618. package/src/unit-control/test/index.js +102 -3
  619. package/src/unit-control/test/utils.js +56 -15
  620. package/src/unit-control/types.ts +5 -8
  621. package/src/unit-control/unit-select-control.tsx +1 -1
  622. package/src/unit-control/utils.ts +128 -125
  623. package/src/utils/breakpoint-values.js +1 -1
  624. package/src/utils/colors-values.js +1 -1
  625. package/src/utils/hooks/test/use-controlled-state.js +1 -1
  626. package/src/utils/hooks/test/use-controlled-value.js +3 -3
  627. package/src/utils/hooks/test/use-latest-ref.js +1 -1
  628. package/src/utils/test/math.js +2 -2
  629. package/src/utils/test/rtl.js +12 -12
  630. package/tsconfig.json +1 -1
  631. package/tsconfig.tsbuildinfo +1 -1
  632. package/src/divider/stories/index.js +0 -64
  633. package/src/heading/stories/index.js +0 -24
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/input-control/styles/input-control-styles.tsx"],"names":["rootFocusedStyles","isFocused","rootLabelPositionStyles","labelPosition","Root","Flex","containerDisabledStyles","disabled","backgroundColor","COLORS","ui","backgroundDisabled","background","containerMarginStyles","hideLabel","containerWidthStyles","__unstableInputWidth","flex","width","Container","disabledStyles","color","textDisabled","fontSizeStyles","inputSize","size","sizes","default","small","fontSize","fontSizeMobile","css","sizeStyles","height","lineHeight","minHeight","paddingLeft","paddingRight","style","dragStyles","isDragging","dragCursor","defaultArrowStyles","activeDragCursorStyles","Input","black","labelMargin","marginBottom","marginTop","marginRight","marginLeft","BaseLabel","Text","Label","props","LabelWrapper","FlexItem","backdropFocusedStyles","borderColor","borderFocus","border","boxShadow","borderDisabled","borderStyle","borderWidth","BackdropUI","Prefix","Suffix"],"mappings":";;;;;;;;;;;;;;;AAGA;;AAQA;;AACA;;AACA;;;;;;;;;;;;;;AAeA,MAAMA,iBAAiB,GAAG,SAAgC;AAAA,MAA9B;AAAEC,IAAAA;AAAF,GAA8B;AACzD,MAAK,CAAEA,SAAP,EAAmB,OAAO,EAAP;AAEnB;AACA,CAJD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAMC,uBAAuB,GAAG,SAAoC;AAAA,MAAlC;AAAEC,IAAAA;AAAF,GAAkC;;AACnE,UAASA,aAAT;AACC,SAAK,KAAL;AACC;;AAID,SAAK,QAAL;AACC;;AAID,SAAK,MAAL;AACC;;AAGD;AACC,aAAO,EAAP;AAhBF;AAkBA,CAnBD;;AAqBO,MAAMC,IAAI,GAAG,iCAAQC,UAAR;AAAA;AAAA;AAAA;AAAA;AAAA,EAAH,uDAIbL,iBAJa,OAKbE,uBALa,q8TAAV;;;AAQP,MAAMI,uBAAuB,GAAG,SAAoC;AAAA,MAAlC;AAAEC,IAAAA;AAAF,GAAkC;AACnE,QAAMC,eAAe,GAAGD,QAAQ,GAC7BE,cAAOC,EAAP,CAAUC,kBADmB,GAE7BF,cAAOC,EAAP,CAAUE,UAFb;AAIA,sBAAO,gBAAK;AAAEJ,IAAAA;AAAF,GAAL,6gUAAP;AACA,CAND,C,CAQA;;;;;;;;;;;;;AACA,MAAMK,qBAAqB,GAAG,UAAqC;AAAA,MAAnC;AAAEC,IAAAA;AAAF,GAAmC;AAClE,SAAOA,SAAS,WAAuC,IAAvD;AACA,CAFD;;;;;;;;;;;;AAIA,MAAMC,oBAAoB,GAAG,UAGN;AAA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AAW,EAAE,OAHF;AAIXC,IAAAA,WAAW,EAAE;AAJF,GAAL,2gUAAP;AAMA,CAtBD;;AAwBO,MAAMC,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,8IAalBR,qBAbkB,OAclB,gBAAK;AAAErB,EAAAA,WAAW,EAAE;AAAf,CAAL,CAdkB,s8TAAhB;;AAkBA,MAAM8B,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAZ;;AAKA,MAAMC,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAZ","sourcesContent":["/**\n * External dependencies\n */\nimport { css, SerializedStyles } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport type { CSSProperties, ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../ui/context';\nimport { Flex, FlexItem } from '../../flex';\nimport { Text } from '../../text';\nimport { COLORS, rtl } from '../../utils';\nimport type { LabelPosition, Size } from '../types';\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\nconst rootLabelPositionStyles = ( { labelPosition }: RootProps ) => {\n\tswitch ( labelPosition ) {\n\t\tcase 'top':\n\t\t\treturn css`\n\t\t\t\talign-items: flex-start;\n\t\t\t\tflex-direction: column;\n\t\t\t`;\n\t\tcase 'bottom':\n\t\t\treturn css`\n\t\t\t\talign-items: flex-start;\n\t\t\t\tflex-direction: column-reverse;\n\t\t\t`;\n\t\tcase 'edge':\n\t\t\treturn css`\n\t\t\t\tjustify-content: space-between;\n\t\t\t`;\n\t\tdefault:\n\t\t\treturn '';\n\t}\n};\n\nexport const Root = styled( Flex )< RootProps >`\n\tposition: relative;\n\tborder-radius: 2px;\n\tpadding-top: 0;\n\t${ rootFocusedStyles }\n\t${ rootLabelPositionStyles }\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\n// Normalizes the margins from the <Flex /> (components/ui/flex/) container.\nconst containerMarginStyles = ( { hideLabel }: ContainerProps ) => {\n\treturn hideLabel ? css( { margin: '0 !important' } ) : null;\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${ containerMarginStyles }\n\t${ containerWidthStyles }\n`;\n\ntype InputProps = {\n\tdisabled?: boolean;\n\tinputSize?: Size;\n\tisDragging?: boolean;\n\tdragCursor?: CSSProperties[ 'cursor' ];\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\nconst sizeStyles = ( { inputSize: size }: InputProps ) => {\n\tconst sizes = {\n\t\tdefault: {\n\t\t\theight: 30,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 30,\n\t\t\tpaddingLeft: 8,\n\t\t\tpaddingRight: 8,\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: 8,\n\t\t\tpaddingRight: 8,\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: 16,\n\t\t\tpaddingRight: 16,\n\t\t},\n\t};\n\n\tconst style = sizes[ size as Size ] || sizes.default;\n\n\treturn css( style );\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.black };\n\t\tdisplay: block;\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\n\t\t&::-webkit-input-placeholder {\n\t\t\tline-height: normal;\n\t\t}\n\t}\n`;\n\nconst labelMargin = ( {\n\tlabelPosition,\n}: {\n\tlabelPosition?: LabelPosition;\n} ) => {\n\tlet marginBottom = 8;\n\n\tif ( labelPosition === 'edge' || labelPosition === 'side' ) {\n\t\tmarginBottom = 0;\n\t}\n\n\treturn css( { marginTop: 0, marginRight: 0, marginBottom, marginLeft: 0 } );\n};\n\nconst BaseLabel = styled( Text )< { labelPosition?: LabelPosition } >`\n\t&&& {\n\t\tbox-sizing: border-box;\n\t\tcolor: currentColor;\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\t${ labelMargin }\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\n\tif ( isFocused ) {\n\t\tboxShadow = `0 0 0 1px ${ COLORS.ui.borderFocus } inset`;\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} );\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"]}
1
+ {"version":3,"sources":["@wordpress/components/src/input-control/styles/input-control-styles.tsx"],"names":["rootFocusedStyles","isFocused","rootLabelPositionStyles","labelPosition","Root","Flex","containerDisabledStyles","disabled","backgroundColor","COLORS","ui","backgroundDisabled","background","containerMarginStyles","hideLabel","containerWidthStyles","__unstableInputWidth","flex","width","Container","disabledStyles","color","textDisabled","fontSizeStyles","inputSize","size","sizes","default","small","fontSize","fontSizeMobile","css","sizeStyles","height","lineHeight","minHeight","paddingLeft","paddingRight","style","dragStyles","isDragging","dragCursor","defaultArrowStyles","activeDragCursorStyles","Input","black","labelMargin","marginBottom","marginTop","marginRight","marginLeft","BaseLabel","Text","Label","props","LabelWrapper","FlexItem","backdropFocusedStyles","borderColor","borderFocus","border","boxShadow","borderDisabled","borderStyle","borderWidth","BackdropUI","Prefix","Suffix"],"mappings":";;;;;;;;;;;;;;;AAGA;;AAQA;;AACA;;AACA;;;;;;;;;;;;;;AAeA,MAAMA,iBAAiB,GAAG,SAAgC;AAAA,MAA9B;AAAEC,IAAAA;AAAF,GAA8B;AACzD,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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAZ","sourcesContent":["/**\n * External dependencies\n */\nimport { css, SerializedStyles } from '@emotion/react';\nimport styled from '@emotion/styled';\nimport type { CSSProperties, ReactNode } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../ui/context';\nimport { Flex, FlexItem } from '../../flex';\nimport { Text } from '../../text';\nimport { COLORS, rtl } from '../../utils';\nimport type { LabelPosition, Size } from '../types';\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\nconst rootLabelPositionStyles = ( { labelPosition }: RootProps ) => {\n\tswitch ( labelPosition ) {\n\t\tcase 'top':\n\t\t\treturn css`\n\t\t\t\talign-items: flex-start;\n\t\t\t\tflex-direction: column;\n\t\t\t`;\n\t\tcase 'bottom':\n\t\t\treturn css`\n\t\t\t\talign-items: flex-start;\n\t\t\t\tflex-direction: column-reverse;\n\t\t\t`;\n\t\tcase 'edge':\n\t\t\treturn css`\n\t\t\t\tjustify-content: space-between;\n\t\t\t`;\n\t\tdefault:\n\t\t\treturn '';\n\t}\n};\n\nexport const Root = styled( Flex )< RootProps >`\n\tposition: relative;\n\tborder-radius: 2px;\n\tpadding-top: 0;\n\t${ rootFocusedStyles }\n\t${ rootLabelPositionStyles }\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\n// Normalizes the margins from the <Flex /> (components/ui/flex/) container.\nconst containerMarginStyles = ( { hideLabel }: ContainerProps ) => {\n\treturn hideLabel ? css( { margin: '0 !important' } ) : null;\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${ containerMarginStyles }\n\t${ containerWidthStyles }\n`;\n\ntype InputProps = {\n\tdisabled?: boolean;\n\tinputSize?: Size;\n\tisDragging?: boolean;\n\tdragCursor?: CSSProperties[ 'cursor' ];\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\nconst sizeStyles = ( { inputSize: size }: InputProps ) => {\n\tconst sizes = {\n\t\tdefault: {\n\t\t\theight: 30,\n\t\t\tlineHeight: 1,\n\t\t\tminHeight: 30,\n\t\t\tpaddingLeft: 8,\n\t\t\tpaddingRight: 8,\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: 8,\n\t\t\tpaddingRight: 8,\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: 16,\n\t\t\tpaddingRight: 16,\n\t\t},\n\t};\n\n\tconst style = sizes[ size as Size ] || sizes.default;\n\n\treturn css( style );\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.black };\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\n\t\t&::-webkit-input-placeholder {\n\t\t\tline-height: normal;\n\t\t}\n\t}\n`;\n\nconst labelMargin = ( {\n\tlabelPosition,\n}: {\n\tlabelPosition?: LabelPosition;\n} ) => {\n\tlet marginBottom = 8;\n\n\tif ( labelPosition === 'edge' || labelPosition === 'side' ) {\n\t\tmarginBottom = 0;\n\t}\n\n\treturn css( { marginTop: 0, marginRight: 0, marginBottom, marginLeft: 0 } );\n};\n\nconst BaseLabel = styled( Text )< { labelPosition?: LabelPosition } >`\n\t&&& {\n\t\tbox-sizing: border-box;\n\t\tcolor: currentColor;\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\t${ labelMargin }\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\n\tif ( isFocused ) {\n\t\tboxShadow = `0 0 0 1px ${ COLORS.ui.borderFocus } inset`;\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} );\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"]}
@@ -28,7 +28,7 @@ var _default = (0, _element.forwardRef)((_ref, ref) => {
28
28
  (0, _deprecated.default)('wp.components.IsolatedEventContainer', {
29
29
  since: '5.7'
30
30
  }); // Disable reason: this stops certain events from propagating outside of the component.
31
- // - onMouseDown is disabled as this can cause interactions with other DOM elements
31
+ // - onMouseDown is disabled as this can cause interactions with other DOM elements.
32
32
 
33
33
  /* eslint-disable jsx-a11y/no-static-element-interactions */
34
34
 
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/isolated-event-container/index.js"],"names":["stopPropagation","event","ref","children","props","since"],"mappings":";;;;;;;;;AAGA;;;;AACA;;AAJA;AACA;AACA;AAIA,SAASA,eAAT,CAA0BC,KAA1B,EAAkC;AACjCA,EAAAA,KAAK,CAACD,eAAN;AACA;;eAEc,yBAAY,OAA0BE,GAA1B,KAAmC;AAAA,MAAjC;AAAEC,IAAAA,QAAF;AAAY,OAAGC;AAAf,GAAiC;AAC7D,2BAAY,sCAAZ,EAAoD;AACnDC,IAAAA,KAAK,EAAE;AAD4C,GAApD,EAD6D,CAK7D;AACA;;AACA;;AACA,SACC,8DAAUD,KAAV;AAAkB,IAAA,GAAG,EAAGF,GAAxB;AAA8B,IAAA,WAAW,EAAGF;AAA5C,MACGG,QADH,CADD;AAKA;AACA,CAdc,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\nfunction stopPropagation( event ) {\n\tevent.stopPropagation();\n}\n\nexport default forwardRef( ( { children, ...props }, ref ) => {\n\tdeprecated( 'wp.components.IsolatedEventContainer', {\n\t\tsince: '5.7',\n\t} );\n\n\t// Disable reason: this stops certain events from propagating outside of the component.\n\t// - onMouseDown is disabled as this can cause interactions with other DOM elements\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<div { ...props } ref={ ref } onMouseDown={ stopPropagation }>\n\t\t\t{ children }\n\t\t</div>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n} );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/isolated-event-container/index.js"],"names":["stopPropagation","event","ref","children","props","since"],"mappings":";;;;;;;;;AAGA;;;;AACA;;AAJA;AACA;AACA;AAIA,SAASA,eAAT,CAA0BC,KAA1B,EAAkC;AACjCA,EAAAA,KAAK,CAACD,eAAN;AACA;;eAEc,yBAAY,OAA0BE,GAA1B,KAAmC;AAAA,MAAjC;AAAEC,IAAAA,QAAF;AAAY,OAAGC;AAAf,GAAiC;AAC7D,2BAAY,sCAAZ,EAAoD;AACnDC,IAAAA,KAAK,EAAE;AAD4C,GAApD,EAD6D,CAK7D;AACA;;AACA;;AACA,SACC,8DAAUD,KAAV;AAAkB,IAAA,GAAG,EAAGF,GAAxB;AAA8B,IAAA,WAAW,EAAGF;AAA5C,MACGG,QADH,CADD;AAKA;AACA,CAdc,C","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport deprecated from '@wordpress/deprecated';\n\nfunction stopPropagation( event ) {\n\tevent.stopPropagation();\n}\n\nexport default forwardRef( ( { children, ...props }, ref ) => {\n\tdeprecated( 'wp.components.IsolatedEventContainer', {\n\t\tsince: '5.7',\n\t} );\n\n\t// Disable reason: this stops certain events from propagating outside of the component.\n\t// - onMouseDown is disabled as this can cause interactions with other DOM elements.\n\t/* eslint-disable jsx-a11y/no-static-element-interactions */\n\treturn (\n\t\t<div { ...props } ref={ ref } onMouseDown={ stopPropagation }>\n\t\t\t{ children }\n\t\t</div>\n\t);\n\t/* eslint-enable jsx-a11y/no-static-element-interactions */\n} );\n"]}
@@ -25,18 +25,18 @@ if (_reactNative.Platform.OS === 'android' && _reactNative.UIManager.setLayoutAn
25
25
 
26
26
 
27
27
  const BottomSheetContext = (0, _element.createContext)({
28
- // Specifies whether content is currently scrolling
28
+ // Specifies whether content is currently scrolling.
29
29
  isBottomSheetContentScrolling: false,
30
- // Function called to enable scroll within bottom sheet
30
+ // Function called to enable scroll within bottom sheet.
31
31
  shouldEnableBottomSheetScroll: () => {},
32
32
  // Function called to enable/disable bottom sheet max height.
33
33
  // E.g. used to extend bottom sheet on full screen in ColorPicker,
34
34
  // which is helpful on small devices with set the largest font/display size.
35
35
  shouldEnableBottomSheetMaxHeight: () => {},
36
- // Callback that is called on closing bottom sheet
36
+ // Callback that is called on closing bottom sheet.
37
37
  onHandleClosingBottomSheet: () => {},
38
38
  // Android only: Function called to control android hardware back button functionality
39
- // Return true if the bottom-sheet default close action shouldn't be called
39
+ // Return true if the bottom-sheet default close action shouldn't be called.
40
40
  onHandleHardwareButtonPress: () => {},
41
41
  // Toggle full-screen styles and dimensions
42
42
  setIsFullScreen: () => {}
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/bottom-sheet-context.native.js"],"names":["Platform","OS","UIManager","setLayoutAnimationEnabledExperimental","BottomSheetContext","isBottomSheetContentScrolling","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","onHandleClosingBottomSheet","onHandleHardwareButtonPress","setIsFullScreen","Provider","BottomSheetProvider","Consumer","BottomSheetConsumer"],"mappings":";;;;;;;AAGA;;AAIA;;AAPA;AACA;AACA;;AAEA;AACA;AACA;AAGA;AACA;AACA,IACCA,sBAASC,EAAT,KAAgB,SAAhB,IACAC,uBAAUC,qCAFX,EAGE;AACDD,yBAAUC,qCAAV,CAAiD,IAAjD;AACA,C,CAED;AACA;;;AACO,MAAMC,kBAAkB,GAAG,4BAAe;AAChD;AACAC,EAAAA,6BAA6B,EAAE,KAFiB;AAGhD;AACAC,EAAAA,6BAA6B,EAAE,MAAM,CAAE,CAJS;AAKhD;AACA;AACA;AACAC,EAAAA,gCAAgC,EAAE,MAAM,CAAE,CARM;AAShD;AACAC,EAAAA,0BAA0B,EAAE,MAAM,CAAE,CAVY;AAWhD;AACA;AACAC,EAAAA,2BAA2B,EAAE,MAAM,CAAE,CAbW;AAchD;AACAC,EAAAA,eAAe,EAAE,MAAM,CAAE;AAfuB,CAAf,CAA3B;;AAkBA,MAAM;AACZC,EAAAA,QAAQ,EAAEC,mBADE;AAEZC,EAAAA,QAAQ,EAAEC;AAFE,IAGTV,kBAHG","sourcesContent":["/**\n * External dependencies\n */\nimport { Platform, UIManager } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\n// It's needed to set the following flags via UIManager\n// to have `LayoutAnimation` working on Android\nif (\n\tPlatform.OS === 'android' &&\n\tUIManager.setLayoutAnimationEnabledExperimental\n) {\n\tUIManager.setLayoutAnimationEnabledExperimental( true );\n}\n\n// Context in BottomSheet is necessary for controlling the\n// transition flow between subsheets and replacing a content inside them\nexport const BottomSheetContext = createContext( {\n\t// Specifies whether content is currently scrolling\n\tisBottomSheetContentScrolling: false,\n\t// Function called to enable scroll within bottom sheet\n\tshouldEnableBottomSheetScroll: () => {},\n\t// Function called to enable/disable bottom sheet max height.\n\t// E.g. used to extend bottom sheet on full screen in ColorPicker,\n\t// which is helpful on small devices with set the largest font/display size.\n\tshouldEnableBottomSheetMaxHeight: () => {},\n\t// Callback that is called on closing bottom sheet\n\tonHandleClosingBottomSheet: () => {},\n\t// Android only: Function called to control android hardware back button functionality\n\t// Return true if the bottom-sheet default close action shouldn't be called\n\tonHandleHardwareButtonPress: () => {},\n\t// Toggle full-screen styles and dimensions\n\tsetIsFullScreen: () => {},\n} );\n\nexport const {\n\tProvider: BottomSheetProvider,\n\tConsumer: BottomSheetConsumer,\n} = BottomSheetContext;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/bottom-sheet-context.native.js"],"names":["Platform","OS","UIManager","setLayoutAnimationEnabledExperimental","BottomSheetContext","isBottomSheetContentScrolling","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","onHandleClosingBottomSheet","onHandleHardwareButtonPress","setIsFullScreen","Provider","BottomSheetProvider","Consumer","BottomSheetConsumer"],"mappings":";;;;;;;AAGA;;AAIA;;AAPA;AACA;AACA;;AAEA;AACA;AACA;AAGA;AACA;AACA,IACCA,sBAASC,EAAT,KAAgB,SAAhB,IACAC,uBAAUC,qCAFX,EAGE;AACDD,yBAAUC,qCAAV,CAAiD,IAAjD;AACA,C,CAED;AACA;;;AACO,MAAMC,kBAAkB,GAAG,4BAAe;AAChD;AACAC,EAAAA,6BAA6B,EAAE,KAFiB;AAGhD;AACAC,EAAAA,6BAA6B,EAAE,MAAM,CAAE,CAJS;AAKhD;AACA;AACA;AACAC,EAAAA,gCAAgC,EAAE,MAAM,CAAE,CARM;AAShD;AACAC,EAAAA,0BAA0B,EAAE,MAAM,CAAE,CAVY;AAWhD;AACA;AACAC,EAAAA,2BAA2B,EAAE,MAAM,CAAE,CAbW;AAchD;AACAC,EAAAA,eAAe,EAAE,MAAM,CAAE;AAfuB,CAAf,CAA3B;;AAkBA,MAAM;AACZC,EAAAA,QAAQ,EAAEC,mBADE;AAEZC,EAAAA,QAAQ,EAAEC;AAFE,IAGTV,kBAHG","sourcesContent":["/**\n * External dependencies\n */\nimport { Platform, UIManager } from 'react-native';\n/**\n * WordPress dependencies\n */\nimport { createContext } from '@wordpress/element';\n\n// It's needed to set the following flags via UIManager\n// to have `LayoutAnimation` working on Android\nif (\n\tPlatform.OS === 'android' &&\n\tUIManager.setLayoutAnimationEnabledExperimental\n) {\n\tUIManager.setLayoutAnimationEnabledExperimental( true );\n}\n\n// Context in BottomSheet is necessary for controlling the\n// transition flow between subsheets and replacing a content inside them\nexport const BottomSheetContext = createContext( {\n\t// Specifies whether content is currently scrolling.\n\tisBottomSheetContentScrolling: false,\n\t// Function called to enable scroll within bottom sheet.\n\tshouldEnableBottomSheetScroll: () => {},\n\t// Function called to enable/disable bottom sheet max height.\n\t// E.g. used to extend bottom sheet on full screen in ColorPicker,\n\t// which is helpful on small devices with set the largest font/display size.\n\tshouldEnableBottomSheetMaxHeight: () => {},\n\t// Callback that is called on closing bottom sheet.\n\tonHandleClosingBottomSheet: () => {},\n\t// Android only: Function called to control android hardware back button functionality\n\t// Return true if the bottom-sheet default close action shouldn't be called.\n\tonHandleHardwareButtonPress: () => {},\n\t// Toggle full-screen styles and dimensions\n\tsetIsFullScreen: () => {},\n} );\n\nexport const {\n\tProvider: BottomSheetProvider,\n\tConsumer: BottomSheetConsumer,\n} = BottomSheetContext;\n"]}
@@ -86,7 +86,7 @@ function BottomSheetNavigationContainer(_ref2) {
86
86
  };
87
87
 
88
88
  const setHeight = (0, _element.useCallback)(height => {
89
- // The screen is fullHeight
89
+ // The screen is fullHeight.
90
90
  if (typeof height === 'string' && typeof height !== typeof currentHeight) {
91
91
  (0, _layoutAnimation.performLayoutAnimation)(ANIMATION_DURATION);
92
92
  setCurrentHeight(height);
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js"],"names":["AnimationSpec","animation","config","duration","easing","Easing","ease","fadeConfig","current","cardStyle","opacity","progress","options","transitionSpec","open","close","headerShown","gestureEnabled","cardStyleInterpolator","ANIMATION_DURATION","BottomSheetNavigationContainer","children","animate","main","theme","style","Stack","context","BottomSheetNavigationContext","currentHeight","setCurrentHeight","backgroundStyle","styles","background","backgroundDark","_theme","DefaultTheme","colors","backgroundColor","setHeight","height","Math","round","screens","Children","map","child","screen","name","otherProps","props","isNested"],"mappings":";;;;;;;;;AAUA;;;;AAPA;;AACA;;AACA;;AAeA;;AAKA;;AACA;;AAKA;;AA/BA;AACA;AACA;;AAKA;AACA;AACA;;AAaA;AACA;AACA;AASA,MAAMA,aAAa,GAAG;AACrBC,EAAAA,SAAS,EAAE,QADU;AAErBC,EAAAA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e,QAAAA,MAAM,EAAEX;AAAV,OAAT;AAAd,OACC,4BAAC,2DAAD;AACC,MAAA,KAAK,EAAG;AACPU,QAAAA,SADO;AAEPV,QAAAA;AAFO;AADT,OAMGN,IAAI,GACL,4BAAC,2BAAD;AAAqB,MAAA,KAAK,EAAGY;AAA7B,OACC,4BAAC,KAAD,CAAO,SAAP;AAAiB,MAAA,aAAa,EAAGvB;AAAjC,OACG+B,OADH,CADD,CADK,GAOL,4BAAC,KAAD,CAAO,SAAP;AAAiB,MAAA,aAAa,EAAG/B;AAAjC,OACG+B,OADH,CAbF,CADD,CADD;AAsBA,GAvBM,EAuBJ,CAAEd,aAAF,EAAiBM,MAAjB,CAvBI,CAAP;AAwBA;;eAEcf,8B","sourcesContent":["/**\n * External dependencies\n */\nimport { View, Easing } from 'react-native';\nimport { NavigationContainer, DefaultTheme } from '@react-navigation/native';\nimport { createStackNavigator } from '@react-navigation/stack';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tuseContext,\n\tuseMemo,\n\tuseCallback,\n\tChildren,\n\tuseRef,\n\tcloneElement,\n} from '@wordpress/element';\n\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { performLayoutAnimation } from '../../layout-animation';\nimport {\n\tBottomSheetNavigationContext,\n\tBottomSheetNavigationProvider,\n} from './bottom-sheet-navigation-context';\n\nimport styles from './styles.scss';\n\nconst AnimationSpec = {\n\tanimation: 'timing',\n\tconfig: {\n\t\tduration: 200,\n\t\teasing: Easing.ease,\n\t},\n};\n\nconst fadeConfig = ( { current } ) => {\n\treturn {\n\t\tcardStyle: {\n\t\t\topacity: current.progress,\n\t\t},\n\t};\n};\n\nconst options = {\n\ttransitionSpec: {\n\t\topen: AnimationSpec,\n\t\tclose: AnimationSpec,\n\t},\n\theaderShown: false,\n\tgestureEnabled: false,\n\tcardStyleInterpolator: fadeConfig,\n};\n\nconst ANIMATION_DURATION = 190;\n\nfunction BottomSheetNavigationContainer( {\n\tchildren,\n\tanimate,\n\tmain,\n\ttheme,\n\tstyle,\n} ) {\n\tconst Stack = useRef( createStackNavigator() ).current;\n\tconst context = useContext( BottomSheetNavigationContext );\n\tconst [ currentHeight, setCurrentHeight ] = useState(\n\t\tcontext.currentHeight || 1\n\t);\n\n\tconst backgroundStyle = usePreferredColorSchemeStyle(\n\t\tstyles.background,\n\t\tstyles.backgroundDark\n\t);\n\n\tconst _theme = theme || {\n\t\t...DefaultTheme,\n\t\tcolors: {\n\t\t\t...DefaultTheme.colors,\n\t\t\tbackground: backgroundStyle.backgroundColor,\n\t\t},\n\t};\n\n\tconst setHeight = useCallback(\n\t\t( height ) => {\n\t\t\t// The screen is fullHeight\n\t\t\tif (\n\t\t\t\ttypeof height === 'string' &&\n\t\t\t\ttypeof height !== typeof currentHeight\n\t\t\t) {\n\t\t\t\tperformLayoutAnimation( ANIMATION_DURATION );\n\t\t\t\tsetCurrentHeight( height );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\theight > 1 &&\n\t\t\t\tMath.round( height ) !== Math.round( currentHeight )\n\t\t\t) {\n\t\t\t\tif ( currentHeight === 1 ) {\n\t\t\t\t\tsetCurrentHeight( height );\n\t\t\t\t} else if ( animate ) {\n\t\t\t\t\tperformLayoutAnimation( ANIMATION_DURATION );\n\t\t\t\t\tsetCurrentHeight( height );\n\t\t\t\t} else {\n\t\t\t\t\tsetCurrentHeight( height );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[ currentHeight ]\n\t);\n\n\tconst screens = useMemo( () => {\n\t\treturn Children.map( children, ( child ) => {\n\t\t\tlet screen = child;\n\t\t\tconst { name, ...otherProps } = child.props;\n\t\t\tif ( ! main ) {\n\t\t\t\tscreen = cloneElement( child, {\n\t\t\t\t\t...child.props,\n\t\t\t\t\tisNested: true,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<Stack.Screen\n\t\t\t\t\tname={ name }\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\tchildren={ () => screen }\n\t\t\t\t/>\n\t\t\t);\n\t\t} );\n\t}, [ children ] );\n\n\treturn useMemo( () => {\n\t\treturn (\n\t\t\t<View style={ [ style, { height: currentHeight } ] }>\n\t\t\t\t<BottomSheetNavigationProvider\n\t\t\t\t\tvalue={ {\n\t\t\t\t\t\tsetHeight,\n\t\t\t\t\t\tcurrentHeight,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ main ? (\n\t\t\t\t\t\t<NavigationContainer theme={ _theme }>\n\t\t\t\t\t\t\t<Stack.Navigator screenOptions={ options }>\n\t\t\t\t\t\t\t\t{ screens }\n\t\t\t\t\t\t\t</Stack.Navigator>\n\t\t\t\t\t\t</NavigationContainer>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Stack.Navigator screenOptions={ options }>\n\t\t\t\t\t\t\t{ screens }\n\t\t\t\t\t\t</Stack.Navigator>\n\t\t\t\t\t) }\n\t\t\t\t</BottomSheetNavigationProvider>\n\t\t\t</View>\n\t\t);\n\t}, [ currentHeight, _theme ] );\n}\n\nexport default BottomSheetNavigationContainer;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js"],"names":["AnimationSpec","animation","config","duration","easing","Easing","ease","fadeConfig","current","cardStyle","opacity","progress","options","transitionSpec","open","close","headerShown","gestureEnabled","cardStyleInterpolator","ANIMATION_DURATION","BottomSheetNavigationContainer","children","animate","main","theme","style","Stack","context","BottomSheetNavigationContext","currentHeight","setCurrentHeight","backgroundStyle","styles","background","backgroundDark","_theme","DefaultTheme","colors","backgroundColor","setHeight","height","Math","round","screens","Children","map","child","screen","name","otherProps","props","isNested"],"mappings":";;;;;;;;;AAUA;;;;AAPA;;AACA;;AACA;;AAeA;;AAKA;;AACA;;AAKA;;AA/BA;AACA;AACA;;AAKA;AACA;AACA;;AAaA;AACA;AACA;AASA,MAAMA,aAAa,GAAG;AACr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AAA,KAAK,EAAG,CAAEI,KAAF,EAAS;AAAEe,QAAAA,MAAM,EAAEX;AAAV,OAAT;AAAd,OACC,4BAAC,2DAAD;AACC,MAAA,KAAK,EAAG;AACPU,QAAAA,SADO;AAEPV,QAAAA;AAFO;AADT,OAMGN,IAAI,GACL,4BAAC,2BAAD;AAAqB,MAAA,KAAK,EAAGY;AAA7B,OACC,4BAAC,KAAD,CAAO,SAAP;AAAiB,MAAA,aAAa,EAAGvB;AAAjC,OACG+B,OADH,CADD,CADK,GAOL,4BAAC,KAAD,CAAO,SAAP;AAAiB,MAAA,aAAa,EAAG/B;AAAjC,OACG+B,OADH,CAbF,CADD,CADD;AAsBA,GAvBM,EAuBJ,CAAEd,aAAF,EAAiBM,MAAjB,CAvBI,CAAP;AAwBA;;eAEcf,8B","sourcesContent":["/**\n * External dependencies\n */\nimport { View, Easing } from 'react-native';\nimport { NavigationContainer, DefaultTheme } from '@react-navigation/native';\nimport { createStackNavigator } from '@react-navigation/stack';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tuseState,\n\tuseContext,\n\tuseMemo,\n\tuseCallback,\n\tChildren,\n\tuseRef,\n\tcloneElement,\n} from '@wordpress/element';\n\nimport { usePreferredColorSchemeStyle } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { performLayoutAnimation } from '../../layout-animation';\nimport {\n\tBottomSheetNavigationContext,\n\tBottomSheetNavigationProvider,\n} from './bottom-sheet-navigation-context';\n\nimport styles from './styles.scss';\n\nconst AnimationSpec = {\n\tanimation: 'timing',\n\tconfig: {\n\t\tduration: 200,\n\t\teasing: Easing.ease,\n\t},\n};\n\nconst fadeConfig = ( { current } ) => {\n\treturn {\n\t\tcardStyle: {\n\t\t\topacity: current.progress,\n\t\t},\n\t};\n};\n\nconst options = {\n\ttransitionSpec: {\n\t\topen: AnimationSpec,\n\t\tclose: AnimationSpec,\n\t},\n\theaderShown: false,\n\tgestureEnabled: false,\n\tcardStyleInterpolator: fadeConfig,\n};\n\nconst ANIMATION_DURATION = 190;\n\nfunction BottomSheetNavigationContainer( {\n\tchildren,\n\tanimate,\n\tmain,\n\ttheme,\n\tstyle,\n} ) {\n\tconst Stack = useRef( createStackNavigator() ).current;\n\tconst context = useContext( BottomSheetNavigationContext );\n\tconst [ currentHeight, setCurrentHeight ] = useState(\n\t\tcontext.currentHeight || 1\n\t);\n\n\tconst backgroundStyle = usePreferredColorSchemeStyle(\n\t\tstyles.background,\n\t\tstyles.backgroundDark\n\t);\n\n\tconst _theme = theme || {\n\t\t...DefaultTheme,\n\t\tcolors: {\n\t\t\t...DefaultTheme.colors,\n\t\t\tbackground: backgroundStyle.backgroundColor,\n\t\t},\n\t};\n\n\tconst setHeight = useCallback(\n\t\t( height ) => {\n\t\t\t// The screen is fullHeight.\n\t\t\tif (\n\t\t\t\ttypeof height === 'string' &&\n\t\t\t\ttypeof height !== typeof currentHeight\n\t\t\t) {\n\t\t\t\tperformLayoutAnimation( ANIMATION_DURATION );\n\t\t\t\tsetCurrentHeight( height );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\theight > 1 &&\n\t\t\t\tMath.round( height ) !== Math.round( currentHeight )\n\t\t\t) {\n\t\t\t\tif ( currentHeight === 1 ) {\n\t\t\t\t\tsetCurrentHeight( height );\n\t\t\t\t} else if ( animate ) {\n\t\t\t\t\tperformLayoutAnimation( ANIMATION_DURATION );\n\t\t\t\t\tsetCurrentHeight( height );\n\t\t\t\t} else {\n\t\t\t\t\tsetCurrentHeight( height );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[ currentHeight ]\n\t);\n\n\tconst screens = useMemo( () => {\n\t\treturn Children.map( children, ( child ) => {\n\t\t\tlet screen = child;\n\t\t\tconst { name, ...otherProps } = child.props;\n\t\t\tif ( ! main ) {\n\t\t\t\tscreen = cloneElement( child, {\n\t\t\t\t\t...child.props,\n\t\t\t\t\tisNested: true,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t<Stack.Screen\n\t\t\t\t\tname={ name }\n\t\t\t\t\t{ ...otherProps }\n\t\t\t\t\tchildren={ () => screen }\n\t\t\t\t/>\n\t\t\t);\n\t\t} );\n\t}, [ children ] );\n\n\treturn useMemo( () => {\n\t\treturn (\n\t\t\t<View style={ [ style, { height: currentHeight } ] }>\n\t\t\t\t<BottomSheetNavigationProvider\n\t\t\t\t\tvalue={ {\n\t\t\t\t\t\tsetHeight,\n\t\t\t\t\t\tcurrentHeight,\n\t\t\t\t\t} }\n\t\t\t\t>\n\t\t\t\t\t{ main ? (\n\t\t\t\t\t\t<NavigationContainer theme={ _theme }>\n\t\t\t\t\t\t\t<Stack.Navigator screenOptions={ options }>\n\t\t\t\t\t\t\t\t{ screens }\n\t\t\t\t\t\t\t</Stack.Navigator>\n\t\t\t\t\t\t</NavigationContainer>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Stack.Navigator screenOptions={ options }>\n\t\t\t\t\t\t\t{ screens }\n\t\t\t\t\t\t</Stack.Navigator>\n\t\t\t\t\t) }\n\t\t\t\t</BottomSheetNavigationProvider>\n\t\t\t</View>\n\t\t);\n\t}, [ currentHeight, _theme ] );\n}\n\nexport default BottomSheetNavigationContainer;\n"]}
@@ -170,7 +170,7 @@ class BottomSheetCell extends _element.Component {
170
170
  };
171
171
 
172
172
  const separatorStyle = () => {
173
- //eslint-disable-next-line @wordpress/no-unused-vars-before-return
173
+ // eslint-disable-next-line @wordpress/no-unused-vars-before-return
174
174
  const defaultSeparatorStyle = this.props.getStylesFromColorScheme(_styles.default.separator, _styles.default.separatorDark);
175
175
  const cellSeparatorStyle = this.props.getStylesFromColorScheme(_styles.default.cellSeparator, _styles.default.cellSeparatorDark);
176
176
  const leftMarginStyle = { ...cellSeparatorStyle,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/cell.native.js"],"names":["isIOS","Platform","OS","BottomSheetCell","Component","constructor","props","arguments","state","isEditingValue","autoFocus","isScreenReaderEnabled","handleScreenReaderToggled","bind","isCurrent","componentDidUpdate","prevProps","prevState","_valueTextInput","focus","componentDidMount","a11yInfoChangeSubscription","AccessibilityInfo","addEventListener","then","setState","componentWillUnmount","remove","typeToKeyboardType","type","step","keyboardType","Math","abs","render","accessible","accessibilityLabel","accessibilityHint","accessibilityRole","disabled","activeOpacity","onPress","onLongPress","label","subLabel","value","valuePlaceholder","icon","leftAlign","iconStyle","labelStyle","valueStyle","cellContainerStyle","cellRowContainerStyle","onChangeValue","onSubmit","children","editable","isSelected","separatorType","style","getStylesFromColorScheme","customActionButton","borderless","help","valueProps","showValue","undefined","isValueEditable","cellLabelStyle","styles","cellLabel","cellTextDark","cellLabelCenteredStyle","cellLabelCentered","cellLabelLeftAlignNoIconStyle","cellLabelLeftAlignNoIcon","defaultMissingIconAndValue","defaultLabelStyle","defaultSubLabelStyleText","cellSubLabelText","cellSubLabelTextDark","drawSeparator","separatorStyle","drawTopSeparator","cellContainerStyles","cellContainer","rowContainerStyles","cellRowContainer","isInteractive","onCellPress","startEditing","finishEditing","defaultSeparatorStyle","separator","separatorDark","cellSeparatorStyle","cellSeparator","cellSeparatorDark","leftMarginStyle","platformStyles","separatorMarginLeft","getValueComponent","styleRTL","I18nManager","isRTL","cellValueRTL","cellValueStyle","cellValue","finalStyle","shouldShowPlaceholder","c","getAccessibilityLabel","iconStyleBase","iconDark","resetButtonStyle","resetButton","resetButtonDark","cellHelpStyle","cellHelpLabel","cellHelpLabelIOS","containerPointerEvents","title","handler","opacity","clipToBounds","cellRowIcon","color","labelIconSeparator","check","placeholderColor"],"mappings":";;;;;;;;;AAmBA;;;;AAhBA;;AASA;;AAKA;;AACA;;AAEA;;AACA;;AAKA;;AACA;;AACA;;AA5BA;AACA;AACA;;AAYA;AACA;AACA;;AAOA;AACA;AACA;AAKA,MAAMA,KAAK,GAAGC,sBAASC,EAAT,KAAgB,KAA9B;;AACA,MAAMC,eAAN,SAA8BC,kBAA9B,CAAwC;AACvCC,EAAAA,WA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UAAU,IACX,4BAAC,gBAAD;AACC,MAAA,IAAI,EAAGuE,YADR;AAEC,MAAA,IAAI,EAAG7B,oBAAe1C,UAAf,CAA0BqE;AAFlC,MAjEF,EAsEG7D,SAAS,IAAIoC,iBAAiB,EAtEjC,EAuEG9C,QAvEH,CAtBD,EA+FGQ,IAAI,IACL,4BAAC,iBAAD;AAAM,MAAA,KAAK,EAAG,CAAEsD,aAAF,EAAiBhD,gBAAO4D,gBAAxB;AAAd,OACGlE,IADH,CAhGF,EAoGG,CAAEoB,gBAAF,IAAsB,4BAAC,iBAAD;AAAM,MAAA,KAAK,EAAGD,cAAc;AAA5B,MApGzB,CADD;AAwGA;;AAjZsC;;eAoZzB,uCAA0BhF,eAA1B,C","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tTouchableOpacity,\n\tText,\n\tView,\n\tTextInput,\n\tI18nManager,\n\tAccessibilityInfo,\n\tPlatform,\n} from 'react-native';\nimport { isEmpty, get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\nimport { check } from '@wordpress/icons';\nimport { Component } from '@wordpress/element';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './styles.scss';\nimport platformStyles from './cellStyles.scss';\nimport TouchableRipple from './ripple';\n\nconst isIOS = Platform.OS === 'ios';\nclass BottomSheetCell extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tisEditingValue: props.autoFocus || false,\n\t\t\tisScreenReaderEnabled: false,\n\t\t};\n\n\t\tthis.handleScreenReaderToggled = this.handleScreenReaderToggled.bind(\n\t\t\tthis\n\t\t);\n\n\t\tthis.isCurrent = false;\n\t}\n\n\tcomponentDidUpdate( prevProps, prevState ) {\n\t\tif ( ! prevState.isEditingValue && this.state.isEditingValue ) {\n\t\t\tthis._valueTextInput.focus();\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.isCurrent = true;\n\t\tthis.a11yInfoChangeSubscription = AccessibilityInfo.addEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\tthis.handleScreenReaderToggled\n\t\t);\n\n\t\tAccessibilityInfo.isScreenReaderEnabled().then(\n\t\t\t( isScreenReaderEnabled ) => {\n\t\t\t\tif ( this.isCurrent ) {\n\t\t\t\t\tthis.setState( { isScreenReaderEnabled } );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.isCurrent = false;\n\t\tthis.a11yInfoChangeSubscription.remove();\n\t}\n\n\thandleScreenReaderToggled( isScreenReaderEnabled ) {\n\t\tthis.setState( { isScreenReaderEnabled } );\n\t}\n\n\ttypeToKeyboardType( type, step ) {\n\t\tlet keyboardType = `default`;\n\t\tif ( type === `number` ) {\n\t\t\tif ( step && Math.abs( step ) < 1 ) {\n\t\t\t\tkeyboardType = `decimal-pad`;\n\t\t\t} else {\n\t\t\t\tkeyboardType = `number-pad`;\n\t\t\t}\n\t\t}\n\t\treturn keyboardType;\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\taccessible,\n\t\t\taccessibilityLabel,\n\t\t\taccessibilityHint,\n\t\t\taccessibilityRole,\n\t\t\tdisabled = false,\n\t\t\tactiveOpacity,\n\t\t\tonPress,\n\t\t\tonLongPress,\n\t\t\tlabel,\n\t\t\tsubLabel,\n\t\t\tvalue,\n\t\t\tvaluePlaceholder = '',\n\t\t\ticon,\n\t\t\tleftAlign,\n\t\t\ticonStyle = {},\n\t\t\tlabelStyle = {},\n\t\t\tvalueStyle = {},\n\t\t\tcellContainerStyle = {},\n\t\t\tcellRowContainerStyle = {},\n\t\t\tonChangeValue,\n\t\t\tonSubmit,\n\t\t\tchildren,\n\t\t\teditable = true,\n\t\t\tisSelected = false,\n\t\t\tseparatorType,\n\t\t\tstyle = {},\n\t\t\tgetStylesFromColorScheme,\n\t\t\tcustomActionButton,\n\t\t\ttype,\n\t\t\tstep,\n\t\t\tborderless,\n\t\t\thelp,\n\t\t\t...valueProps\n\t\t} = this.props;\n\n\t\tconst showValue = value !== undefined;\n\t\tconst isValueEditable = editable && onChangeValue !== undefined;\n\t\tconst cellLabelStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabel,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst cellLabelCenteredStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabelCentered,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst cellLabelLeftAlignNoIconStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabelLeftAlignNoIcon,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst defaultMissingIconAndValue = leftAlign\n\t\t\t? cellLabelLeftAlignNoIconStyle\n\t\t\t: cellLabelCenteredStyle;\n\t\tconst defaultLabelStyle =\n\t\t\tshowValue || customActionButton || icon\n\t\t\t\t? cellLabelStyle\n\t\t\t\t: defaultMissingIconAndValue;\n\n\t\tconst defaultSubLabelStyleText = getStylesFromColorScheme(\n\t\t\tstyles.cellSubLabelText,\n\t\t\tstyles.cellSubLabelTextDark\n\t\t);\n\n\t\tconst drawSeparator =\n\t\t\t( separatorType && separatorType !== 'none' ) ||\n\t\t\tseparatorStyle === undefined;\n\t\tconst drawTopSeparator =\n\t\t\tdrawSeparator && separatorType === 'topFullWidth';\n\n\t\tconst cellContainerStyles = [\n\t\t\tstyles.cellContainer,\n\t\t\tcellContainerStyle,\n\t\t];\n\t\tconst rowContainerStyles = [\n\t\t\tstyles.cellRowContainer,\n\t\t\tcellRowContainerStyle,\n\t\t];\n\n\t\tconst isInteractive =\n\t\t\tisValueEditable ||\n\t\t\tonPress !== undefined ||\n\t\t\tonLongPress !== undefined;\n\n\t\tconst onCellPress = () => {\n\t\t\tif ( isValueEditable ) {\n\t\t\t\tstartEditing();\n\t\t\t} else if ( onPress !== undefined ) {\n\t\t\t\tonPress();\n\t\t\t}\n\t\t};\n\n\t\tconst finishEditing = () => {\n\t\t\tthis.setState( { isEditingValue: false } );\n\t\t};\n\n\t\tconst startEditing = () => {\n\t\t\tif ( this.state.isEditingValue === false ) {\n\t\t\t\tthis.setState( { isEditingValue: true } );\n\t\t\t}\n\t\t};\n\n\t\tconst separatorStyle = () => {\n\t\t\t//eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\t\tconst defaultSeparatorStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.separator,\n\t\t\t\tstyles.separatorDark\n\t\t\t);\n\t\t\tconst cellSeparatorStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.cellSeparator,\n\t\t\t\tstyles.cellSeparatorDark\n\t\t\t);\n\t\t\tconst leftMarginStyle = {\n\t\t\t\t...cellSeparatorStyle,\n\t\t\t\t...platformStyles.separatorMarginLeft,\n\t\t\t};\n\t\t\tswitch ( separatorType ) {\n\t\t\t\tcase 'leftMargin':\n\t\t\t\t\treturn leftMarginStyle;\n\t\t\t\tcase 'fullWidth':\n\t\t\t\tcase 'topFullWidth':\n\t\t\t\t\treturn defaultSeparatorStyle;\n\t\t\t\tcase 'none':\n\t\t\t\t\treturn undefined;\n\t\t\t\tcase undefined:\n\t\t\t\t\tif ( showValue && icon ) {\n\t\t\t\t\t\treturn leftMarginStyle;\n\t\t\t\t\t}\n\t\t\t\t\treturn defaultSeparatorStyle;\n\t\t\t}\n\t\t};\n\n\t\tconst getValueComponent = () => {\n\t\t\tconst styleRTL = I18nManager.isRTL && styles.cellValueRTL;\n\t\t\tconst cellValueStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.cellValue,\n\t\t\t\tstyles.cellTextDark\n\t\t\t);\n\t\t\tconst finalStyle = {\n\t\t\t\t...cellValueStyle,\n\t\t\t\t...valueStyle,\n\t\t\t\t...styleRTL,\n\t\t\t};\n\n\t\t\t// To be able to show the `middle` ellipsizeMode on editable cells\n\t\t\t// we show the TextInput just when the user wants to edit the value,\n\t\t\t// and the Text component to display it.\n\t\t\t// We also show the TextInput to display placeholder.\n\t\t\tconst shouldShowPlaceholder = isValueEditable && value === '';\n\t\t\treturn this.state.isEditingValue || shouldShowPlaceholder ? (\n\t\t\t\t<TextInput\n\t\t\t\t\tref={ ( c ) => ( this._valueTextInput = c ) }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tstyle={ finalStyle }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tplaceholder={ valuePlaceholder }\n\t\t\t\t\tplaceholderTextColor={ '#87a6bc' }\n\t\t\t\t\tonChangeText={ onChangeValue }\n\t\t\t\t\teditable={ isValueEditable }\n\t\t\t\t\tpointerEvents={\n\t\t\t\t\t\tthis.state.isEditingValue ? 'auto' : 'none'\n\t\t\t\t\t}\n\t\t\t\t\tonFocus={ startEditing }\n\t\t\t\t\tonBlur={ finishEditing }\n\t\t\t\t\tonSubmitEditing={ onSubmit }\n\t\t\t\t\tkeyboardType={ this.typeToKeyboardType( type, step ) }\n\t\t\t\t\t{ ...valueProps }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<Text\n\t\t\t\t\tstyle={ { ...cellValueStyle, ...valueStyle } }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tellipsizeMode={ 'middle' }\n\t\t\t\t>\n\t\t\t\t\t{ value }\n\t\t\t\t</Text>\n\t\t\t);\n\t\t};\n\n\t\tconst getAccessibilityLabel = () => {\n\t\t\tif ( accessible === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( accessibilityLabel || ! showValue ) {\n\t\t\t\treturn accessibilityLabel || label;\n\t\t\t}\n\n\t\t\tif ( isEmpty( value ) ) {\n\t\t\t\treturn isEmpty( help )\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: accessibility text. Empty state of a inline textinput cell. %s: The cell's title */\n\t\t\t\t\t\t\t_x( '%s. Empty', 'inline textinput cell' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t )\n\t\t\t\t\t: // Separating by ',' is necessary to make a pause on urls (non-capitalized text)\n\t\t\t\t\t sprintf(\n\t\t\t\t\t\t\t/* translators: accessibility text. Empty state of a inline textinput cell. %1: Cell title, %2: cell help. */\n\t\t\t\t\t\t\t_x( '%1$s, %2$s. Empty', 'inline textinput cell' ),\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\thelp\n\t\t\t\t\t );\n\t\t\t}\n\t\t\treturn isEmpty( help )\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. Inline textinput title and value.%1: Cell title, %2: cell value. */\n\t\t\t\t\t\t_x( '%1$s, %2$s', 'inline textinput cell' ),\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tvalue\n\t\t\t\t ) // Separating by ',' is necessary to make a pause on urls (non-capitalized text)\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. Inline textinput title, value and help text.%1: Cell title, %2: cell value, , %3: cell help. */\n\t\t\t\t\t\t_x( '%1$s, %2$s, %3$s', 'inline textinput cell' ),\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\thelp\n\t\t\t\t );\n\t\t};\n\n\t\tconst iconStyleBase = getStylesFromColorScheme(\n\t\t\tstyles.icon,\n\t\t\tstyles.iconDark\n\t\t);\n\t\tconst resetButtonStyle = getStylesFromColorScheme(\n\t\t\tstyles.resetButton,\n\t\t\tstyles.resetButtonDark\n\t\t);\n\t\tconst cellHelpStyle = [\n\t\t\tstyles.cellHelpLabel,\n\t\t\tisIOS && styles.cellHelpLabelIOS,\n\t\t];\n\t\tconst containerPointerEvents =\n\t\t\tthis.state.isScreenReaderEnabled && accessible ? 'none' : 'auto';\n\t\tconst { title, handler } = customActionButton || {};\n\n\t\tconst opacity =\n\t\t\tactiveOpacity !== undefined\n\t\t\t\t? activeOpacity\n\t\t\t\t: get( platformStyles, 'activeOpacity.opacity' );\n\n\t\treturn (\n\t\t\t<TouchableRipple\n\t\t\t\taccessible={\n\t\t\t\t\taccessible !== undefined\n\t\t\t\t\t\t? accessible\n\t\t\t\t\t\t: ! this.state.isEditingValue\n\t\t\t\t}\n\t\t\t\taccessibilityLabel={ getAccessibilityLabel() }\n\t\t\t\taccessibilityRole={ accessibilityRole || 'button' }\n\t\t\t\taccessibilityHint={\n\t\t\t\t\tisValueEditable\n\t\t\t\t\t\t? /* translators: accessibility text */\n\t\t\t\t\t\t __( 'Double tap to edit this value' )\n\t\t\t\t\t\t: accessibilityHint\n\t\t\t\t}\n\t\t\t\tdisabled={ disabled || ! isInteractive }\n\t\t\t\tactiveOpacity={ opacity }\n\t\t\t\tonPress={ onCellPress }\n\t\t\t\tonLongPress={ onLongPress }\n\t\t\t\tstyle={ [ styles.clipToBounds, style ] }\n\t\t\t\tborderless={ borderless }\n\t\t\t>\n\t\t\t\t{ drawTopSeparator && <View style={ separatorStyle() } /> }\n\t\t\t\t<View\n\t\t\t\t\tstyle={ cellContainerStyles }\n\t\t\t\t\tpointerEvents={ containerPointerEvents }\n\t\t\t\t>\n\t\t\t\t\t<View style={ rowContainerStyles }>\n\t\t\t\t\t\t<View style={ styles.cellRowContainer }>\n\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\t\tstyles.cellRowContainer,\n\t\t\t\t\t\t\t\t\t\tstyles.cellRowIcon,\n\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\t\t\tfill={\n\t\t\t\t\t\t\t\t\t\t\ticonStyle.color ||\n\t\t\t\t\t\t\t\t\t\t\ticonStyleBase.color\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t\t\t\t\t\t\tisPressed={ false }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\tplatformStyles.labelIconSeparator\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ subLabel && label && (\n\t\t\t\t\t\t\t\t<View>\n\t\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\t\t\tdefaultLabelStyle,\n\t\t\t\t\t\t\t\t\t\t\tlabelStyle,\n\t\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t<Text style={ defaultSubLabelStyleText }>\n\t\t\t\t\t\t\t\t\t\t{ subLabel }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! subLabel && label && (\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tstyle={ [ defaultLabelStyle, labelStyle ] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t{ customActionButton && (\n\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\tonPress={ handler }\n\t\t\t\t\t\t\t\taccessibilityRole={ 'button' }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Text style={ resetButtonStyle }>\n\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</View>\n\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\tfill={ platformStyles.isSelected.color }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showValue && getValueComponent() }\n\t\t\t\t\t{ children }\n\t\t\t\t</View>\n\t\t\t\t{ help && (\n\t\t\t\t\t<Text style={ [ cellHelpStyle, styles.placeholderColor ] }>\n\t\t\t\t\t\t{ help }\n\t\t\t\t\t</Text>\n\t\t\t\t) }\n\t\t\t\t{ ! drawTopSeparator && <View style={ separatorStyle() } /> }\n\t\t\t</TouchableRipple>\n\t\t);\n\t}\n}\n\nexport default withPreferredColorScheme( BottomSheetCell );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/cell.native.js"],"names":["isIOS","Platform","OS","BottomSheetCell","Component","constructor","props","arguments","state","isEditingValue","autoFocus","isScreenReaderEnabled","handleScreenReaderToggled","bind","isCurrent","componentDidUpdate","prevProps","prevState","_valueTextInput","focus","componentDidMount","a11yInfoChangeSubscription","AccessibilityInfo","addEventListener","then","setState","componentWillUnmount","remove","typeToKeyboardType","type","step","keyboardType","Math","abs","render","accessible","accessibilityLabel","accessibilityHint","accessibilityRole","disabled","activeOpacity","onPress","onLongPress","label","subLabel","value","valuePlaceholder","icon","leftAlign","iconStyle","labelStyle","valueStyle","cellContainerStyle","cellRowContainerStyle","onChangeValue","onSubmit","children","editable","isSelected","separatorType","style","getStylesFromColorScheme","customActionButton","borderless","help","valueProps","showValue","undefined","isValueEditable","cellLabelStyle","styles","cellLabel","cellTextDark","cellLabelCenteredStyle","cellLabelCentered","cellLabelLeftAlignNoIconStyle","cellLabelLeftAlignNoIcon","defaultMissingIconAndValue","defaultLabelStyle","defaultSubLabelStyleText","cellSubLabelText","cellSubLabelTextDark","drawSeparator","separatorStyle","drawTopSeparator","cellContainerStyles","cellContainer","rowContainerStyles","cellRowContainer","isInteractive","onCellPress","startEditing","finishEditing","defaultSeparatorStyle","separator","separatorDark","cellSeparatorStyle","cellSeparator","cellSeparatorDark","leftMarginStyle","platformStyles","separatorMarginLeft","getValueComponent","styleRTL","I18nManager","isRTL","cellValueRTL","cellValueStyle","cellValue","finalStyle","shouldShowPlaceholder","c","getAccessibilityLabel","iconStyleBase","iconDark","resetButtonStyle","resetButton","resetButtonDark","cellHelpStyle","cellHelpLabel","cellHelpLabelIOS","containerPointerEvents","title","handler","opacity","clipToBounds","cellRowIcon","color","labelIconSeparator","check","placeholderColor"],"mappings":";;;;;;;;;AAmBA;;;;AAhBA;;AASA;;AAKA;;AACA;;AAEA;;AACA;;AAKA;;AACA;;AACA;;AA5BA;AACA;AACA;;AAYA;AACA;AACA;;AAOA;AACA;AACA;AAKA,MAAMA,KAAK,GAAGC,sBAASC,EAAT,KAAgB,KAA9B;;AACA,MAAMC,eAAN,SAA8BC,kBAA9B,CAAwC;AACvCC,EAAAA,WAAW,CAAEC,KAAF,EAAU;AACpB,UAAO,GAAGC,SAAV;AACA,SAAKC,KAAL,GAAa;AACZC,MAAAA,cAAc,EAAEH,KAAK,CAACI,SAAN,IAAmB,KADvB;AAEZC,MAAAA,qBAAqB,EAAE;AAFX,KAAb;AAKA,SAAKC,yBAAL,GAAiC,KAAKA,yBAAL,CAA+BC,IAA/B,CAChC,IADgC,CAAjC;AAIA,SAAKC,SAAL,GAAiB,KAAjB;AACA;;AAEDC,EAAAA,kBAAkB,CAAEC,SAAF,EAAaC,SAAb,EAAyB;AAC1C,QAAK,CAAEA,SAAS,CAACR,cAAZ,IAA8B,KAAKD,KAAL,CAAWC,cAA9C,EAA+D;AAC9D,WAAKS,eAAL,CAAqBC,KAArB;AACA;AACD;;AAEDC,EAAAA,iBAAiB,GAAG;AACnB,SAAKN,SAAL,GAAiB,IAAjB;AACA,SAAKO,0BAAL,GAAkCC,+BAAkBC,gBAAlB,CACjC,qBADiC,EAEjC,KAAKX,yBAF4B,CAAlC;;AAKAU,mCAAkBX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,KAAK,EACJmD,oBAAe4B;AAFjB,MAhBD,CAFF,EAyBGpF,QAAQ,IAAID,KAAZ,IACD,4BAAC,iBAAD,QACC,4BAAC,iBAAD;AACC,MAAA,KAAK,EAAG,CACPmC,iBADO,EAEP5B,UAFO;AADT,OAMGP,KANH,CADD,EASC,4BAAC,iBAAD;AAAM,MAAA,KAAK,EAAGoC;AAAd,OACGnC,QADH,CATD,CA1BF,EAwCG,CAAEA,QAAF,IAAcD,KAAd,IACD,4BAAC,iBAAD;AACC,MAAA,KAAK,EAAG,CAAEmC,iBAAF,EAAqB5B,UAArB;AADT,OAGGP,KAHH,CAzCF,CADD,EAiDGmB,kBAAkB,IACnB,4BAAC,6BAAD;AACC,MAAA,OAAO,EAAG6D,OADX;AAEC,MAAA,iBAAiB,EAAG;AAFrB,OAIC,4BAAC,iBAAD;AAAM,MAAA,KAAK,EAAGR;AAAd,OACGO,KADH,CAJD,CAlDF,CAJD,EAgEGhE,UAAU,IACX,4BAAC,gBAAD;AACC,MAAA,IAAI,EAAGuE,YADR;AAEC,MAAA,IAAI,EAAG7B,oBAAe1C,UAAf,CAA0BqE;AAFlC,MAjEF,EAsEG7D,SAAS,IAAIoC,iBAAiB,EAtEjC,EAuEG9C,QAvEH,CAtBD,EA+FGQ,IAAI,IACL,4BAAC,iBAAD;AAAM,MAAA,KAAK,EAAG,CAAEsD,aAAF,EAAiBhD,gBAAO4D,gBAAxB;AAAd,OACGlE,IADH,CAhGF,EAoGG,CAAEoB,gBAAF,IAAsB,4BAAC,iBAAD;AAAM,MAAA,KAAK,EAAGD,cAAc;AAA5B,MApGzB,CADD;AAwGA;;AAjZsC;;eAoZzB,uCAA0BhF,eAA1B,C","sourcesContent":["/**\n * External dependencies\n */\nimport {\n\tTouchableOpacity,\n\tText,\n\tView,\n\tTextInput,\n\tI18nManager,\n\tAccessibilityInfo,\n\tPlatform,\n} from 'react-native';\nimport { isEmpty, get } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { Icon } from '@wordpress/components';\nimport { check } from '@wordpress/icons';\nimport { Component } from '@wordpress/element';\nimport { __, _x, sprintf } from '@wordpress/i18n';\nimport { withPreferredColorScheme } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport styles from './styles.scss';\nimport platformStyles from './cellStyles.scss';\nimport TouchableRipple from './ripple';\n\nconst isIOS = Platform.OS === 'ios';\nclass BottomSheetCell extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\t\tthis.state = {\n\t\t\tisEditingValue: props.autoFocus || false,\n\t\t\tisScreenReaderEnabled: false,\n\t\t};\n\n\t\tthis.handleScreenReaderToggled = this.handleScreenReaderToggled.bind(\n\t\t\tthis\n\t\t);\n\n\t\tthis.isCurrent = false;\n\t}\n\n\tcomponentDidUpdate( prevProps, prevState ) {\n\t\tif ( ! prevState.isEditingValue && this.state.isEditingValue ) {\n\t\t\tthis._valueTextInput.focus();\n\t\t}\n\t}\n\n\tcomponentDidMount() {\n\t\tthis.isCurrent = true;\n\t\tthis.a11yInfoChangeSubscription = AccessibilityInfo.addEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\tthis.handleScreenReaderToggled\n\t\t);\n\n\t\tAccessibilityInfo.isScreenReaderEnabled().then(\n\t\t\t( isScreenReaderEnabled ) => {\n\t\t\t\tif ( this.isCurrent ) {\n\t\t\t\t\tthis.setState( { isScreenReaderEnabled } );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n\tcomponentWillUnmount() {\n\t\tthis.isCurrent = false;\n\t\tthis.a11yInfoChangeSubscription.remove();\n\t}\n\n\thandleScreenReaderToggled( isScreenReaderEnabled ) {\n\t\tthis.setState( { isScreenReaderEnabled } );\n\t}\n\n\ttypeToKeyboardType( type, step ) {\n\t\tlet keyboardType = `default`;\n\t\tif ( type === `number` ) {\n\t\t\tif ( step && Math.abs( step ) < 1 ) {\n\t\t\t\tkeyboardType = `decimal-pad`;\n\t\t\t} else {\n\t\t\t\tkeyboardType = `number-pad`;\n\t\t\t}\n\t\t}\n\t\treturn keyboardType;\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\taccessible,\n\t\t\taccessibilityLabel,\n\t\t\taccessibilityHint,\n\t\t\taccessibilityRole,\n\t\t\tdisabled = false,\n\t\t\tactiveOpacity,\n\t\t\tonPress,\n\t\t\tonLongPress,\n\t\t\tlabel,\n\t\t\tsubLabel,\n\t\t\tvalue,\n\t\t\tvaluePlaceholder = '',\n\t\t\ticon,\n\t\t\tleftAlign,\n\t\t\ticonStyle = {},\n\t\t\tlabelStyle = {},\n\t\t\tvalueStyle = {},\n\t\t\tcellContainerStyle = {},\n\t\t\tcellRowContainerStyle = {},\n\t\t\tonChangeValue,\n\t\t\tonSubmit,\n\t\t\tchildren,\n\t\t\teditable = true,\n\t\t\tisSelected = false,\n\t\t\tseparatorType,\n\t\t\tstyle = {},\n\t\t\tgetStylesFromColorScheme,\n\t\t\tcustomActionButton,\n\t\t\ttype,\n\t\t\tstep,\n\t\t\tborderless,\n\t\t\thelp,\n\t\t\t...valueProps\n\t\t} = this.props;\n\n\t\tconst showValue = value !== undefined;\n\t\tconst isValueEditable = editable && onChangeValue !== undefined;\n\t\tconst cellLabelStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabel,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst cellLabelCenteredStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabelCentered,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst cellLabelLeftAlignNoIconStyle = getStylesFromColorScheme(\n\t\t\tstyles.cellLabelLeftAlignNoIcon,\n\t\t\tstyles.cellTextDark\n\t\t);\n\t\tconst defaultMissingIconAndValue = leftAlign\n\t\t\t? cellLabelLeftAlignNoIconStyle\n\t\t\t: cellLabelCenteredStyle;\n\t\tconst defaultLabelStyle =\n\t\t\tshowValue || customActionButton || icon\n\t\t\t\t? cellLabelStyle\n\t\t\t\t: defaultMissingIconAndValue;\n\n\t\tconst defaultSubLabelStyleText = getStylesFromColorScheme(\n\t\t\tstyles.cellSubLabelText,\n\t\t\tstyles.cellSubLabelTextDark\n\t\t);\n\n\t\tconst drawSeparator =\n\t\t\t( separatorType && separatorType !== 'none' ) ||\n\t\t\tseparatorStyle === undefined;\n\t\tconst drawTopSeparator =\n\t\t\tdrawSeparator && separatorType === 'topFullWidth';\n\n\t\tconst cellContainerStyles = [\n\t\t\tstyles.cellContainer,\n\t\t\tcellContainerStyle,\n\t\t];\n\t\tconst rowContainerStyles = [\n\t\t\tstyles.cellRowContainer,\n\t\t\tcellRowContainerStyle,\n\t\t];\n\n\t\tconst isInteractive =\n\t\t\tisValueEditable ||\n\t\t\tonPress !== undefined ||\n\t\t\tonLongPress !== undefined;\n\n\t\tconst onCellPress = () => {\n\t\t\tif ( isValueEditable ) {\n\t\t\t\tstartEditing();\n\t\t\t} else if ( onPress !== undefined ) {\n\t\t\t\tonPress();\n\t\t\t}\n\t\t};\n\n\t\tconst finishEditing = () => {\n\t\t\tthis.setState( { isEditingValue: false } );\n\t\t};\n\n\t\tconst startEditing = () => {\n\t\t\tif ( this.state.isEditingValue === false ) {\n\t\t\t\tthis.setState( { isEditingValue: true } );\n\t\t\t}\n\t\t};\n\n\t\tconst separatorStyle = () => {\n\t\t\t// eslint-disable-next-line @wordpress/no-unused-vars-before-return\n\t\t\tconst defaultSeparatorStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.separator,\n\t\t\t\tstyles.separatorDark\n\t\t\t);\n\t\t\tconst cellSeparatorStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.cellSeparator,\n\t\t\t\tstyles.cellSeparatorDark\n\t\t\t);\n\t\t\tconst leftMarginStyle = {\n\t\t\t\t...cellSeparatorStyle,\n\t\t\t\t...platformStyles.separatorMarginLeft,\n\t\t\t};\n\t\t\tswitch ( separatorType ) {\n\t\t\t\tcase 'leftMargin':\n\t\t\t\t\treturn leftMarginStyle;\n\t\t\t\tcase 'fullWidth':\n\t\t\t\tcase 'topFullWidth':\n\t\t\t\t\treturn defaultSeparatorStyle;\n\t\t\t\tcase 'none':\n\t\t\t\t\treturn undefined;\n\t\t\t\tcase undefined:\n\t\t\t\t\tif ( showValue && icon ) {\n\t\t\t\t\t\treturn leftMarginStyle;\n\t\t\t\t\t}\n\t\t\t\t\treturn defaultSeparatorStyle;\n\t\t\t}\n\t\t};\n\n\t\tconst getValueComponent = () => {\n\t\t\tconst styleRTL = I18nManager.isRTL && styles.cellValueRTL;\n\t\t\tconst cellValueStyle = this.props.getStylesFromColorScheme(\n\t\t\t\tstyles.cellValue,\n\t\t\t\tstyles.cellTextDark\n\t\t\t);\n\t\t\tconst finalStyle = {\n\t\t\t\t...cellValueStyle,\n\t\t\t\t...valueStyle,\n\t\t\t\t...styleRTL,\n\t\t\t};\n\n\t\t\t// To be able to show the `middle` ellipsizeMode on editable cells\n\t\t\t// we show the TextInput just when the user wants to edit the value,\n\t\t\t// and the Text component to display it.\n\t\t\t// We also show the TextInput to display placeholder.\n\t\t\tconst shouldShowPlaceholder = isValueEditable && value === '';\n\t\t\treturn this.state.isEditingValue || shouldShowPlaceholder ? (\n\t\t\t\t<TextInput\n\t\t\t\t\tref={ ( c ) => ( this._valueTextInput = c ) }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tstyle={ finalStyle }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tplaceholder={ valuePlaceholder }\n\t\t\t\t\tplaceholderTextColor={ '#87a6bc' }\n\t\t\t\t\tonChangeText={ onChangeValue }\n\t\t\t\t\teditable={ isValueEditable }\n\t\t\t\t\tpointerEvents={\n\t\t\t\t\t\tthis.state.isEditingValue ? 'auto' : 'none'\n\t\t\t\t\t}\n\t\t\t\t\tonFocus={ startEditing }\n\t\t\t\t\tonBlur={ finishEditing }\n\t\t\t\t\tonSubmitEditing={ onSubmit }\n\t\t\t\t\tkeyboardType={ this.typeToKeyboardType( type, step ) }\n\t\t\t\t\t{ ...valueProps }\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<Text\n\t\t\t\t\tstyle={ { ...cellValueStyle, ...valueStyle } }\n\t\t\t\t\tnumberOfLines={ 1 }\n\t\t\t\t\tellipsizeMode={ 'middle' }\n\t\t\t\t>\n\t\t\t\t\t{ value }\n\t\t\t\t</Text>\n\t\t\t);\n\t\t};\n\n\t\tconst getAccessibilityLabel = () => {\n\t\t\tif ( accessible === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( accessibilityLabel || ! showValue ) {\n\t\t\t\treturn accessibilityLabel || label;\n\t\t\t}\n\n\t\t\tif ( isEmpty( value ) ) {\n\t\t\t\treturn isEmpty( help )\n\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t/* translators: accessibility text. Empty state of a inline textinput cell. %s: The cell's title */\n\t\t\t\t\t\t\t_x( '%s. Empty', 'inline textinput cell' ),\n\t\t\t\t\t\t\tlabel\n\t\t\t\t\t )\n\t\t\t\t\t: // Separating by ',' is necessary to make a pause on urls (non-capitalized text)\n\t\t\t\t\t sprintf(\n\t\t\t\t\t\t\t/* translators: accessibility text. Empty state of a inline textinput cell. %1: Cell title, %2: cell help. */\n\t\t\t\t\t\t\t_x( '%1$s, %2$s. Empty', 'inline textinput cell' ),\n\t\t\t\t\t\t\tlabel,\n\t\t\t\t\t\t\thelp\n\t\t\t\t\t );\n\t\t\t}\n\t\t\treturn isEmpty( help )\n\t\t\t\t? sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. Inline textinput title and value.%1: Cell title, %2: cell value. */\n\t\t\t\t\t\t_x( '%1$s, %2$s', 'inline textinput cell' ),\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tvalue\n\t\t\t\t ) // Separating by ',' is necessary to make a pause on urls (non-capitalized text)\n\t\t\t\t: sprintf(\n\t\t\t\t\t\t/* translators: accessibility text. Inline textinput title, value and help text.%1: Cell title, %2: cell value, , %3: cell help. */\n\t\t\t\t\t\t_x( '%1$s, %2$s, %3$s', 'inline textinput cell' ),\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tvalue,\n\t\t\t\t\t\thelp\n\t\t\t\t );\n\t\t};\n\n\t\tconst iconStyleBase = getStylesFromColorScheme(\n\t\t\tstyles.icon,\n\t\t\tstyles.iconDark\n\t\t);\n\t\tconst resetButtonStyle = getStylesFromColorScheme(\n\t\t\tstyles.resetButton,\n\t\t\tstyles.resetButtonDark\n\t\t);\n\t\tconst cellHelpStyle = [\n\t\t\tstyles.cellHelpLabel,\n\t\t\tisIOS && styles.cellHelpLabelIOS,\n\t\t];\n\t\tconst containerPointerEvents =\n\t\t\tthis.state.isScreenReaderEnabled && accessible ? 'none' : 'auto';\n\t\tconst { title, handler } = customActionButton || {};\n\n\t\tconst opacity =\n\t\t\tactiveOpacity !== undefined\n\t\t\t\t? activeOpacity\n\t\t\t\t: get( platformStyles, 'activeOpacity.opacity' );\n\n\t\treturn (\n\t\t\t<TouchableRipple\n\t\t\t\taccessible={\n\t\t\t\t\taccessible !== undefined\n\t\t\t\t\t\t? accessible\n\t\t\t\t\t\t: ! this.state.isEditingValue\n\t\t\t\t}\n\t\t\t\taccessibilityLabel={ getAccessibilityLabel() }\n\t\t\t\taccessibilityRole={ accessibilityRole || 'button' }\n\t\t\t\taccessibilityHint={\n\t\t\t\t\tisValueEditable\n\t\t\t\t\t\t? /* translators: accessibility text */\n\t\t\t\t\t\t __( 'Double tap to edit this value' )\n\t\t\t\t\t\t: accessibilityHint\n\t\t\t\t}\n\t\t\t\tdisabled={ disabled || ! isInteractive }\n\t\t\t\tactiveOpacity={ opacity }\n\t\t\t\tonPress={ onCellPress }\n\t\t\t\tonLongPress={ onLongPress }\n\t\t\t\tstyle={ [ styles.clipToBounds, style ] }\n\t\t\t\tborderless={ borderless }\n\t\t\t>\n\t\t\t\t{ drawTopSeparator && <View style={ separatorStyle() } /> }\n\t\t\t\t<View\n\t\t\t\t\tstyle={ cellContainerStyles }\n\t\t\t\t\tpointerEvents={ containerPointerEvents }\n\t\t\t\t>\n\t\t\t\t\t<View style={ rowContainerStyles }>\n\t\t\t\t\t\t<View style={ styles.cellRowContainer }>\n\t\t\t\t\t\t\t{ icon && (\n\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\t\tstyles.cellRowContainer,\n\t\t\t\t\t\t\t\t\t\tstyles.cellRowIcon,\n\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\ticon={ icon }\n\t\t\t\t\t\t\t\t\t\tsize={ 24 }\n\t\t\t\t\t\t\t\t\t\tfill={\n\t\t\t\t\t\t\t\t\t\t\ticonStyle.color ||\n\t\t\t\t\t\t\t\t\t\t\ticonStyleBase.color\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tstyle={ iconStyle }\n\t\t\t\t\t\t\t\t\t\tisPressed={ false }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t<View\n\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\tplatformStyles.labelIconSeparator\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ subLabel && label && (\n\t\t\t\t\t\t\t\t<View>\n\t\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\t\tstyle={ [\n\t\t\t\t\t\t\t\t\t\t\tdefaultLabelStyle,\n\t\t\t\t\t\t\t\t\t\t\tlabelStyle,\n\t\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t\t<Text style={ defaultSubLabelStyleText }>\n\t\t\t\t\t\t\t\t\t\t{ subLabel }\n\t\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t{ ! subLabel && label && (\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tstyle={ [ defaultLabelStyle, labelStyle ] }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{ label }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t{ customActionButton && (\n\t\t\t\t\t\t\t<TouchableOpacity\n\t\t\t\t\t\t\t\tonPress={ handler }\n\t\t\t\t\t\t\t\taccessibilityRole={ 'button' }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Text style={ resetButtonStyle }>\n\t\t\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t\t</TouchableOpacity>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</View>\n\t\t\t\t\t{ isSelected && (\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\ticon={ check }\n\t\t\t\t\t\t\tfill={ platformStyles.isSelected.color }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t\t{ showValue && getValueComponent() }\n\t\t\t\t\t{ children }\n\t\t\t\t</View>\n\t\t\t\t{ help && (\n\t\t\t\t\t<Text style={ [ cellHelpStyle, styles.placeholderColor ] }>\n\t\t\t\t\t\t{ help }\n\t\t\t\t\t</Text>\n\t\t\t\t) }\n\t\t\t\t{ ! drawTopSeparator && <View style={ separatorStyle() } /> }\n\t\t\t</TouchableRipple>\n\t\t);\n\t}\n}\n\nexport default withPreferredColorScheme( BottomSheetCell );\n"]}
@@ -143,9 +143,9 @@ class BottomSheet extends _element.Component {
143
143
 
144
144
  if (duration && easing) {
145
145
  // This layout animation is the same as the React Native's KeyboardAvoidingView component.
146
- // Reference: https://github.com/facebook/react-native/blob/266b21baf35e052ff28120f79c06c4f6dddc51a9/Libraries/Components/Keyboard/KeyboardAvoidingView.js#L119-L128
146
+ // Reference: https://github.com/facebook/react-native/blob/266b21baf35e052ff28120f79c06c4f6dddc51a9/Libraries/Components/Keyboard/KeyboardAvoidingView.js#L119-L128.
147
147
  const animationConfig = {
148
- // We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m
148
+ // We have to pass the duration equal to minimal accepted duration defined here: RCTLayoutAnimation.m.
149
149
  duration: duration > 10 ? duration : 10,
150
150
  type: _reactNative.LayoutAnimation.Types[easing] || 'keyboard'
151
151
  };
@@ -172,7 +172,7 @@ class BottomSheet extends _element.Component {
172
172
  // preexisting bug: https://git.io/JMPCV
173
173
  // this.performRegularLayoutAnimation( {
174
174
  // useLastLayoutAnimation: false,
175
- // } );
175
+ // } );.
176
176
  }
177
177
  }
178
178
 
@@ -206,7 +206,7 @@ class BottomSheet extends _element.Component {
206
206
  }
207
207
 
208
208
  this.dimensionsChangeSubscription = _reactNative.Dimensions.addEventListener('change', this.onDimensionsChange); // 'Will' keyboard events are not available on Android.
209
- // Reference: https://reactnative.dev/docs/0.61/keyboard#addlistener
209
+ // Reference: https://reactnative.dev/docs/0.61/keyboard#addlistener.
210
210
 
211
211
  this.keyboardShowListener = _reactNative.Keyboard.addListener(_reactNative.Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', this.keyboardShow);
212
212
  this.keyboardHideListener = _reactNative.Keyboard.addListener(_reactNative.Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', this.keyboardHide);
@@ -262,14 +262,14 @@ class BottomSheet extends _element.Component {
262
262
  const {
263
263
  safeAreaBottomInset
264
264
  } = this.state;
265
- const statusBarHeight = _reactNative.Platform.OS === 'android' ? _reactNative.StatusBar.currentHeight : 0; // `maxHeight` when modal is opened along with a keyboard
265
+ const statusBarHeight = _reactNative.Platform.OS === 'android' ? _reactNative.StatusBar.currentHeight : 0; // `maxHeight` when modal is opened along with a keyboard.
266
266
 
267
- const maxHeightWithOpenKeyboard = 0.95 * (_reactNative.Dimensions.get('window').height - this.keyboardHeight - statusBarHeight - this.headerHeight); // In landscape orientation, set `maxHeight` to ~96% of the height
267
+ const maxHeightWithOpenKeyboard = 0.95 * (_reactNative.Dimensions.get('window').height - this.keyboardHeight - statusBarHeight - this.headerHeight); // In landscape orientation, set `maxHeight` to ~96% of the height.
268
268
 
269
269
  if (width > height) {
270
270
  this.setState({
271
271
  maxHeight: Math.min(0.96 * height - this.headerHeight, maxHeightWithOpenKeyboard)
272
- }); // In portrait orientation, set `maxHeight` to ~59% of the height
272
+ }); // In portrait orientation, set `maxHeight` to ~59% of the height.
273
273
  } else {
274
274
  this.setState({
275
275
  maxHeight: Math.min(height * 0.59 - safeAreaBottomInset - this.headerHeight, maxHeightWithOpenKeyboard)
@@ -469,7 +469,7 @@ class BottomSheet extends _element.Component {
469
469
  const panResponder = _reactNative.PanResponder.create({
470
470
  onMoveShouldSetPanResponder: (evt, gestureState) => {
471
471
  // 'swiping-to-close' option is temporarily and partially disabled
472
- // on Android ( swipe / drag is still available in the top most area - near drag indicator)
472
+ // on Android ( swipe / drag is still available in the top most area - near drag indicator).
473
473
  if (_reactNative.Platform.OS === 'ios') {
474
474
  // Activates swipe down over child Touchables if the swipe is long enough.
475
475
  // With this we can adjust sensibility on the swipe vs tap gestures.
@@ -496,7 +496,7 @@ class BottomSheet extends _element.Component {
496
496
  listStyle = {
497
497
  maxHeight
498
498
  }; // Allow setting a "static" height of the bottom sheet
499
- // by settting the min height to the max height.
499
+ // by setting the min height to the max height.
500
500
 
501
501
  if (this.props.setMinHeightToMaxHeight) {
502
502
  listStyle.minHeight = maxHeight;
@@ -534,10 +534,10 @@ class BottomSheet extends _element.Component {
534
534
  }));
535
535
 
536
536
  const showDragIndicator = () => {
537
- // if iOS or not fullscreen show the drag indicator
537
+ // If iOS or not fullscreen show the drag indicator.
538
538
  if (_reactNative.Platform.OS === 'ios' || !this.state.isFullScreen) {
539
539
  return true;
540
- } // Otherwise check the allowDragIndicator
540
+ } // Otherwise check the allowDragIndicator.
541
541
 
542
542
 
543
543
  return this.props.allowDragIndicator;
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/index.native.js"],"names":["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","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","bottomSheetHeader","flex","separator","showDragIndicator","allowDragIndicator","bottomModal","undefined","panHandlers","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","borderColor","marginTop","backgroundFullScreen","testID","dragIndicator","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","isBottomSheetContentScrolling","getWidth","maxWidth","ThemedBottomSheet","Button","Cell","SubSheet","BottomSheetSubSheet","NavBar","CyclePickerCell","PickerCell","SwitchCell","RangeCell","ColorCell","LinkCell","LinkSuggestionItemCell","RadioCell","NavigationScreen","NavigationContainer"],"mappings":";;;;;;;;;AAuBA;;;;AApBA;;AAYA;;AACA;;AACA;;AAKA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AA7CA;AACA;AACA;;AAiBA;AACA;AACA;;AAKA;AACA;AACA;AAmBA,MAAMA,wBAAwB,GAAGC,6BAAgBC,OAAhB,CAAwBC,aAAzD;;AAEA,MAAMC,WAAN,SAA0BC,kBAA1B,CAAoC;AACnCC,EAAAA,WAAW,GAAG;AACb,UAAO,GAAGC,SAAV;AACA,SAAKC,sBAAL,GAA8B,KAAKA,sBAAL,CAA4BC,IAA5B,CAAkC,IAAlC,CAA9B;AACA,SAAKC,QAAL,GAAgB,KAAKA,QAAL,CAAcD,IAAd,CAAoB,IAApB,CAAhB;AACA,SAAKE,WAAL,GAAmB,KAAKA,WAAL,CAAiBF,IAAjB,CAAuB,IAAvB,CAAnB;AACA,SAAKG,oBAAL,GAA4B,KAAKA,oBAAL,CAA0BH,IAA1B,CAAgC,IAAhC,CAA5B;AACA,SAAKI,SAAL,GAAiB,KAAKA,SA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BAA3C;AACAZ,iBAAiB,CAACa,SAAlB,GAA8BA,kBAA9B;AACAb,iBAAiB,CAACc,gBAAlB,GAAqCA,yBAArC;AACAd,iBAAiB,CAACe,mBAAlB,GAAwCA,4BAAxC;eAEef,iB","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';\nimport { omit } from 'lodash';\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 = this.onShouldSetBottomSheetMaxHeight.bind(\n\t\t\tthis\n\t\t);\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 = this.onHandleClosingBottomSheet.bind(\n\t\t\tthis\n\t\t);\n\t\tthis.onHardwareButtonPress = this.onHardwareButtonPress.bind( this );\n\t\tthis.onHandleHardwareButtonPress = this.onHandleHardwareButtonPress.bind(\n\t\t\tthis\n\t\t);\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://git.io/JMPCV\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\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//\ton 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 settting the min height to the max height.\n\t\t\tif ( this.props.setMinHeightToMaxHeight ) {\n\t\t\t\tlistStyle.minHeight = maxHeight;\n\t\t\t}\n\t\t}\n\n\t\tconst listProps = {\n\t\t\tdisableScrollViewPanResponder: true,\n\t\t\tbounces,\n\t\t\tonScroll: this.onScroll,\n\t\t\tonScrollBeginDrag: this.onScrollBeginDrag,\n\t\t\tonScrollEndDrag: this.onScrollEndDrag,\n\t\t\tscrollEventThrottle: 16,\n\t\t\tcontentContainerStyle: [\n\t\t\t\tstyles.content,\n\t\t\t\thideHeader && styles.emptyHeader,\n\t\t\t\tcontentStyle,\n\t\t\t\tisFullScreen && { flexGrow: 1 },\n\t\t\t],\n\t\t\tstyle: listStyle,\n\t\t\tsafeAreaBottomInset,\n\t\t\tscrollEnabled,\n\t\t\tautomaticallyAdjustContentInsets: false,\n\t\t};\n\n\t\tconst WrapperView = hasNavigation ? View : ScrollView;\n\n\t\tconst getHeader = () => (\n\t\t\t<>\n\t\t\t\t{ header || (\n\t\t\t\t\t<View style={ styles.bottomSheetHeader }>\n\t\t\t\t\t\t<View style={ styles.flex }>{ leftButton }</View>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tstyle={ bottomSheetHeaderTitleStyle }\n\t\t\t\t\t\t\tmaxFontSizeMultiplier={ 3 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<View style={ styles.flex }>{ rightButton }</View>\n\t\t\t\t\t</View>\n\t\t\t\t) }\n\t\t\t\t{ withHeaderSeparator && <View style={ styles.separator } /> }\n\t\t\t</>\n\t\t);\n\n\t\tconst showDragIndicator = () => {\n\t\t\t// if iOS or not fullscreen show the drag indicator\n\t\t\tif ( Platform.OS === 'ios' || ! this.state.isFullScreen ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Otherwise check the allowDragIndicator\n\t\t\treturn this.props.allowDragIndicator;\n\t\t};\n\n\t\treturn (\n\t\t\t<Modal\n\t\t\t\tisVisible={ isVisible }\n\t\t\t\tstyle={ styles.bottomModal }\n\t\t\t\tanimationInTiming={ 400 }\n\t\t\t\tanimationOutTiming={ 300 }\n\t\t\t\tbackdropTransitionInTiming={ 50 }\n\t\t\t\tbackdropTransitionOutTiming={ 50 }\n\t\t\t\tbackdropOpacity={ 0.2 }\n\t\t\t\tonBackdropPress={ this.onCloseBottomSheet }\n\t\t\t\tonBackButtonPress={ this.onHardwareButtonPress }\n\t\t\t\tonSwipeComplete={ this.onCloseBottomSheet }\n\t\t\t\tonDismiss={ Platform.OS === 'ios' ? this.onDismiss : undefined }\n\t\t\t\tonModalHide={\n\t\t\t\t\tPlatform.OS === 'android' ? this.onDismiss : undefined\n\t\t\t\t}\n\t\t\t\tswipeDirection=\"down\"\n\t\t\t\tonMoveShouldSetResponder={\n\t\t\t\t\tscrollEnabled &&\n\t\t\t\t\tpanResponder.panHandlers.onMoveShouldSetResponder\n\t\t\t\t}\n\t\t\t\tonMoveShouldSetResponderCapture={\n\t\t\t\t\tscrollEnabled &&\n\t\t\t\t\tpanResponder.panHandlers.onMoveShouldSetResponderCapture\n\t\t\t\t}\n\t\t\t\tonAccessibilityEscape={ this.onCloseBottomSheet }\n\t\t\t\t// We need to prevent overwriting the onDismiss prop,\n\t\t\t\t// for this reason it is excluded from the rest object.\n\t\t\t\t{ ...omit( rest, 'onDismiss' ) }\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: this\n\t\t\t\t\t\t\t\t\t.onShouldEnableScroll,\n\t\t\t\t\t\t\t\tshouldEnableBottomSheetMaxHeight: this\n\t\t\t\t\t\t\t\t\t.onShouldSetBottomSheetMaxHeight,\n\t\t\t\t\t\t\t\tisBottomSheetContentScrolling: isScrolling,\n\t\t\t\t\t\t\t\tonHandleClosingBottomSheet: this\n\t\t\t\t\t\t\t\t\t.onHandleClosingBottomSheet,\n\t\t\t\t\t\t\t\tonHandleHardwareButtonPress: this\n\t\t\t\t\t\t\t\t\t.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} }\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"]}
1
+ {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/index.native.js"],"names":["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","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","bottomSheetHeader","flex","separator","showDragIndicator","allowDragIndicator","bottomModal","undefined","panHandlers","onMoveShouldSetResponder","onMoveShouldSetResponderCapture","borderColor","marginTop","backgroundFullScreen","testID","dragIndicator","shouldEnableBottomSheetScroll","shouldEnableBottomSheetMaxHeight","isBottomSheetContentScrolling","getWidth","maxWidth","ThemedBottomSheet","Button","Cell","SubSheet","BottomSheetSubSheet","NavBar","CyclePickerCell","PickerCell","SwitchCell","RangeCell","Col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CA7BD,CADD;AAmGA;;AA5iBkC;;AA+iBpC,SAASgE,QAAT,GAAoB;AACnB,SAAO9E,IAAI,CAACC,GAAL,CACNrB,wBAAWe,GAAX,CAAgB,QAAhB,EAA2BD,KADrB,EAENqB,gBAAOsB,UAAP,CAAkB0C,QAFZ,CAAP;AAIA;;AAED,MAAMC,iBAAiB,GAAG,uCAA0BxK,WAA1B,CAA1B;AAEAwK,iBAAiB,CAACF,QAAlB,GAA6BA,QAA7B;AACAE,iBAAiB,CAACC,MAAlB,GAA2BA,eAA3B;AACAD,iBAAiB,CAACE,IAAlB,GAAyBA,aAAzB;AACAF,iBAAiB,CAACG,QAAlB,GAA6BC,iBAA7B;AACAJ,iBAAiB,CAACK,MAAlB,GAA2BA,eAA3B;AACAL,iBAAiB,CAACM,eAAlB,GAAoCA,wBAApC;AACAN,iBAAiB,CAACO,UAAlB,GAA+BA,mBAA/B;AACAP,iBAAiB,CAACQ,UAAlB,GAA+BA,mBAA/B;AACAR,iBAAiB,CAACS,SAAlB,GAA8BA,kBAA9B;AACAT,iBAAiB,CAACU,SAAlB,GAA8BA,kBAA9B;AACAV,iBAAiB,CAACW,QAAlB,GAA6BA,iBAA7B;AACAX,iBAAiB,CAACY,sBAAlB,GAA2CA,+BAA3C;AACAZ,iBAAiB,CAACa,SAAlB,GAA8BA,kBAA9B;AACAb,iBAAiB,CAACc,gBAAlB,GAAqCA,yBAArC;AACAd,iBAAiB,CAACe,mBAAlB,GAAwCA,4BAAxC;eAEef,iB","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';\nimport { omit } from 'lodash';\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 = this.onShouldSetBottomSheetMaxHeight.bind(\n\t\t\tthis\n\t\t);\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 = this.onHandleClosingBottomSheet.bind(\n\t\t\tthis\n\t\t);\n\t\tthis.onHardwareButtonPress = this.onHardwareButtonPress.bind( this );\n\t\tthis.onHandleHardwareButtonPress = this.onHandleHardwareButtonPress.bind(\n\t\t\tthis\n\t\t);\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://git.io/JMPCV\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\t...rest\n\t\t} = this.props;\n\t\tconst {\n\t\t\tmaxHeight,\n\t\t\tbounces,\n\t\t\tsafeAreaBottomInset,\n\t\t\tsafeAreaTopInset,\n\t\t\tisScrolling,\n\t\t\tscrollEnabled,\n\t\t\tisMaxHeightSet,\n\t\t\tisFullScreen,\n\t\t} = this.state;\n\n\t\tconst panResponder = PanResponder.create( {\n\t\t\tonMoveShouldSetPanResponder: ( evt, gestureState ) => {\n\t\t\t\t// 'swiping-to-close' option is temporarily and partially disabled\n\t\t\t\t// on Android ( swipe / drag is still available in the top most area - near drag indicator).\n\t\t\t\tif ( Platform.OS === 'ios' ) {\n\t\t\t\t\t// Activates swipe down over child Touchables if the swipe is long enough.\n\t\t\t\t\t// With this we can adjust sensibility on the swipe vs tap gestures.\n\t\t\t\t\tif ( gestureState.dy > 3 && ! bounces ) {\n\t\t\t\t\t\tgestureState.dy = 0;\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t},\n\t\t} );\n\n\t\tconst backgroundStyle = getStylesFromColorScheme(\n\t\t\tstyles.background,\n\t\t\tstyles.backgroundDark\n\t\t);\n\n\t\tconst bottomSheetHeaderTitleStyle = getStylesFromColorScheme(\n\t\t\tstyles.bottomSheetHeaderTitle,\n\t\t\tstyles.bottomSheetHeaderTitleDark\n\t\t);\n\n\t\tlet listStyle = {};\n\t\tif ( isFullScreen ) {\n\t\t\tlistStyle = { flexGrow: 1, flexShrink: 1 };\n\t\t} else if ( isMaxHeightSet ) {\n\t\t\tlistStyle = { maxHeight };\n\n\t\t\t// Allow setting a \"static\" height of the bottom sheet\n\t\t\t// by setting the min height to the max height.\n\t\t\tif ( this.props.setMinHeightToMaxHeight ) {\n\t\t\t\tlistStyle.minHeight = maxHeight;\n\t\t\t}\n\t\t}\n\n\t\tconst listProps = {\n\t\t\tdisableScrollViewPanResponder: true,\n\t\t\tbounces,\n\t\t\tonScroll: this.onScroll,\n\t\t\tonScrollBeginDrag: this.onScrollBeginDrag,\n\t\t\tonScrollEndDrag: this.onScrollEndDrag,\n\t\t\tscrollEventThrottle: 16,\n\t\t\tcontentContainerStyle: [\n\t\t\t\tstyles.content,\n\t\t\t\thideHeader && styles.emptyHeader,\n\t\t\t\tcontentStyle,\n\t\t\t\tisFullScreen && { flexGrow: 1 },\n\t\t\t],\n\t\t\tstyle: listStyle,\n\t\t\tsafeAreaBottomInset,\n\t\t\tscrollEnabled,\n\t\t\tautomaticallyAdjustContentInsets: false,\n\t\t};\n\n\t\tconst WrapperView = hasNavigation ? View : ScrollView;\n\n\t\tconst getHeader = () => (\n\t\t\t<>\n\t\t\t\t{ header || (\n\t\t\t\t\t<View style={ styles.bottomSheetHeader }>\n\t\t\t\t\t\t<View style={ styles.flex }>{ leftButton }</View>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tstyle={ bottomSheetHeaderTitleStyle }\n\t\t\t\t\t\t\tmaxFontSizeMultiplier={ 3 }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ title }\n\t\t\t\t\t\t</Text>\n\t\t\t\t\t\t<View style={ styles.flex }>{ rightButton }</View>\n\t\t\t\t\t</View>\n\t\t\t\t) }\n\t\t\t\t{ withHeaderSeparator && <View style={ styles.separator } /> }\n\t\t\t</>\n\t\t);\n\n\t\tconst showDragIndicator = () => {\n\t\t\t// If iOS or not fullscreen show the drag indicator.\n\t\t\tif ( Platform.OS === 'ios' || ! this.state.isFullScreen ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// Otherwise check the allowDragIndicator.\n\t\t\treturn this.props.allowDragIndicator;\n\t\t};\n\n\t\treturn (\n\t\t\t<Modal\n\t\t\t\tisVisible={ isVisible }\n\t\t\t\tstyle={ styles.bottomModal }\n\t\t\t\tanimationInTiming={ 400 }\n\t\t\t\tanimationOutTiming={ 300 }\n\t\t\t\tbackdropTransitionInTiming={ 50 }\n\t\t\t\tbackdropTransitionOutTiming={ 50 }\n\t\t\t\tbackdropOpacity={ 0.2 }\n\t\t\t\tonBackdropPress={ this.onCloseBottomSheet }\n\t\t\t\tonBackButtonPress={ this.onHardwareButtonPress }\n\t\t\t\tonSwipeComplete={ this.onCloseBottomSheet }\n\t\t\t\tonDismiss={ Platform.OS === 'ios' ? this.onDismiss : undefined }\n\t\t\t\tonModalHide={\n\t\t\t\t\tPlatform.OS === 'android' ? this.onDismiss : undefined\n\t\t\t\t}\n\t\t\t\tswipeDirection=\"down\"\n\t\t\t\tonMoveShouldSetResponder={\n\t\t\t\t\tscrollEnabled &&\n\t\t\t\t\tpanResponder.panHandlers.onMoveShouldSetResponder\n\t\t\t\t}\n\t\t\t\tonMoveShouldSetResponderCapture={\n\t\t\t\t\tscrollEnabled &&\n\t\t\t\t\tpanResponder.panHandlers.onMoveShouldSetResponderCapture\n\t\t\t\t}\n\t\t\t\tonAccessibilityEscape={ this.onCloseBottomSheet }\n\t\t\t\t// We need to prevent overwriting the onDismiss prop,\n\t\t\t\t// for this reason it is excluded from the rest object.\n\t\t\t\t{ ...omit( rest, 'onDismiss' ) }\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: this\n\t\t\t\t\t\t\t\t\t.onShouldEnableScroll,\n\t\t\t\t\t\t\t\tshouldEnableBottomSheetMaxHeight: this\n\t\t\t\t\t\t\t\t\t.onShouldSetBottomSheetMaxHeight,\n\t\t\t\t\t\t\t\tisBottomSheetContentScrolling: isScrolling,\n\t\t\t\t\t\t\t\tonHandleClosingBottomSheet: this\n\t\t\t\t\t\t\t\t\t.onHandleClosingBottomSheet,\n\t\t\t\t\t\t\t\tonHandleHardwareButtonPress: this\n\t\t\t\t\t\t\t\t\t.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} }\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"]}
@@ -37,7 +37,7 @@ function LinkCell(_ref) {
37
37
  } = _ref;
38
38
  return (0, _element.createElement)(_cell.default, {
39
39
  icon: showIcon && _icons.link,
40
- label: (0, _i18n.__)('Link to') // since this is not actually editable, we treat value as a placeholder
40
+ label: (0, _i18n.__)('Link to') // Since this is not actually editable, we treat value as a placeholder.
41
41
  ,
42
42
  value: valueMask || value || (0, _i18n.__)('Search or type URL'),
43
43
  valueStyle: !!(value || valueMask) ? undefined : placeholderColor,