@wordpress/components 19.2.1-next.33ec3857e2.0 → 19.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (748) hide show
  1. package/CHANGELOG.md +54 -1
  2. package/CONTRIBUTING.md +1 -1
  3. package/LICENSE.md +1 -1
  4. package/README.md +8 -4
  5. package/build/base-control/index.js +2 -3
  6. package/build/base-control/index.js.map +1 -1
  7. package/build/base-control/styles/base-control-styles.js +23 -13
  8. package/build/base-control/styles/base-control-styles.js.map +1 -1
  9. package/build/base-field/hook.js +1 -1
  10. package/build/base-field/hook.js.map +1 -1
  11. package/build/box-control/styles/box-control-styles.js +9 -9
  12. package/build/box-control/styles/box-control-styles.js.map +1 -1
  13. package/build/button/deprecated.js +2 -1
  14. package/build/button/deprecated.js.map +1 -1
  15. package/build/button/index.js +2 -1
  16. package/build/button/index.js.map +1 -1
  17. package/build/card/card/component.js +1 -1
  18. package/build/card/card/component.js.map +1 -1
  19. package/build/card/card/hook.js +1 -1
  20. package/build/card/card/hook.js.map +1 -1
  21. package/build/card/card-body/hook.js +1 -1
  22. package/build/card/card-body/hook.js.map +1 -1
  23. package/build/card/card-divider/hook.js +1 -1
  24. package/build/card/card-divider/hook.js.map +1 -1
  25. package/build/card/card-footer/hook.js +1 -1
  26. package/build/card/card-footer/hook.js.map +1 -1
  27. package/build/card/card-header/hook.js +1 -1
  28. package/build/card/card-header/hook.js.map +1 -1
  29. package/build/card/card-media/hook.js +1 -1
  30. package/build/card/card-media/hook.js.map +1 -1
  31. package/build/circular-option-picker/index.js +2 -0
  32. package/build/circular-option-picker/index.js.map +1 -1
  33. package/build/color-indicator/index.js +2 -0
  34. package/build/color-indicator/index.js.map +1 -1
  35. package/build/color-palette/index.js +4 -7
  36. package/build/color-palette/index.js.map +1 -1
  37. package/build/color-palette/index.native.js +4 -2
  38. package/build/color-palette/index.native.js.map +1 -1
  39. package/build/color-picker/color-display.js.map +1 -1
  40. package/build/color-picker/color-input.js.map +1 -1
  41. package/build/color-picker/component.js +2 -5
  42. package/build/color-picker/component.js.map +1 -1
  43. package/build/color-picker/use-deprecated-props.js +2 -0
  44. package/build/color-picker/use-deprecated-props.js.map +1 -1
  45. package/build/confirm-dialog/component.js +10 -6
  46. package/build/confirm-dialog/component.js.map +1 -1
  47. package/build/confirm-dialog/styles.js +30 -0
  48. package/build/confirm-dialog/styles.js.map +1 -0
  49. package/build/custom-gradient-bar/control-points.js +1 -2
  50. package/build/custom-gradient-bar/control-points.js.map +1 -1
  51. package/build/custom-select-control/index.js +10 -2
  52. package/build/custom-select-control/index.js.map +1 -1
  53. package/build/date-time/time.js +1 -1
  54. package/build/date-time/time.js.map +1 -1
  55. package/build/divider/component.js.map +1 -1
  56. package/build/dropdown/index.js +3 -3
  57. package/build/dropdown/index.js.map +1 -1
  58. package/build/elevation/hook.js +5 -5
  59. package/build/elevation/hook.js.map +1 -1
  60. package/build/external-link/styles/external-link-styles.js +5 -5
  61. package/build/external-link/styles/external-link-styles.js.map +1 -1
  62. package/build/flex/flex/hook.js +4 -4
  63. package/build/flex/flex/hook.js.map +1 -1
  64. package/build/form-token-field/suggestions-list.js +75 -81
  65. package/build/form-token-field/suggestions-list.js.map +1 -1
  66. package/build/grid/hook.js +2 -2
  67. package/build/grid/hook.js.map +1 -1
  68. package/build/heading/component.js +0 -1
  69. package/build/heading/component.js.map +1 -1
  70. package/build/icon/index.js +0 -1
  71. package/build/icon/index.js.map +1 -1
  72. package/build/input-control/index.js.map +1 -1
  73. package/build/input-control/input-base.js +0 -1
  74. package/build/input-control/input-base.js.map +1 -1
  75. package/build/input-control/input-field.js.map +1 -1
  76. package/build/input-control/reducer/actions.js +0 -1
  77. package/build/input-control/reducer/actions.js.map +1 -1
  78. package/build/input-control/reducer/reducer.js.map +1 -1
  79. package/build/input-control/reducer/state.js +0 -1
  80. package/build/input-control/reducer/state.js.map +1 -1
  81. package/build/input-control/styles/input-control-styles.js +32 -30
  82. package/build/input-control/styles/input-control-styles.js.map +1 -1
  83. package/build/item-group/item/component.js +0 -1
  84. package/build/item-group/item/component.js.map +1 -1
  85. package/build/item-group/item/hook.js +1 -2
  86. package/build/item-group/item/hook.js.map +1 -1
  87. package/build/item-group/item-group/component.js +0 -1
  88. package/build/item-group/item-group/component.js.map +1 -1
  89. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js +3 -1
  90. package/build/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  91. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +4 -12
  92. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  93. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +23 -5
  94. package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  95. package/build/mobile/bottom-sheet/cell.native.js +3 -5
  96. package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
  97. package/build/mobile/bottom-sheet/index.native.js +16 -16
  98. package/build/mobile/bottom-sheet/index.native.js.map +1 -1
  99. package/build/mobile/bottom-sheet/range-text-input.native.js +2 -3
  100. package/build/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  101. package/build/mobile/color-settings/index.native.js +2 -0
  102. package/build/mobile/color-settings/index.native.js.map +1 -1
  103. package/build/mobile/color-settings/palette.screen.native.js +5 -0
  104. package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
  105. package/build/mobile/color-settings/utils.native.js +9 -3
  106. package/build/mobile/color-settings/utils.native.js.map +1 -1
  107. package/build/mobile/keyboard-avoiding-view/index.ios.js +6 -8
  108. package/build/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  109. package/build/mobile/link-picker/index.native.js +3 -1
  110. package/build/mobile/link-picker/index.native.js.map +1 -1
  111. package/build/mobile/link-picker/link-picker-screen.native.js +18 -5
  112. package/build/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  113. package/build/mobile/link-settings/index.native.js +3 -1
  114. package/build/mobile/link-settings/index.native.js.map +1 -1
  115. package/build/mobile/readable-content-view/index.native.js +2 -2
  116. package/build/mobile/readable-content-view/index.native.js.map +1 -1
  117. package/build/mobile/utils/use-is-floating-keyboard.native.js +2 -2
  118. package/build/mobile/utils/use-is-floating-keyboard.native.js.map +1 -1
  119. package/build/mobile/utils/use-unit-converter-to-mobile.native.js +7 -3
  120. package/build/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  121. package/build/modal/index.js +1 -12
  122. package/build/modal/index.js.map +1 -1
  123. package/build/navigator/context.js +5 -1
  124. package/build/navigator/context.js.map +1 -1
  125. package/build/navigator/navigator-provider/component.js +42 -22
  126. package/build/navigator/navigator-provider/component.js.map +1 -1
  127. package/build/navigator/navigator-screen/component.js +57 -29
  128. package/build/navigator/navigator-screen/component.js.map +1 -1
  129. package/build/navigator/use-navigator.js +8 -8
  130. package/build/navigator/use-navigator.js.map +1 -1
  131. package/build/notice/index.native.js +2 -2
  132. package/build/notice/index.native.js.map +1 -1
  133. package/build/palette-edit/index.js +39 -30
  134. package/build/palette-edit/index.js.map +1 -1
  135. package/build/palette-edit/styles.js +11 -13
  136. package/build/palette-edit/styles.js.map +1 -1
  137. package/build/placeholder/index.js +4 -4
  138. package/build/placeholder/index.js.map +1 -1
  139. package/build/range-control/styles/range-control-styles.js +29 -29
  140. package/build/range-control/styles/range-control-styles.js.map +1 -1
  141. package/build/resizable-box/index.js.map +1 -1
  142. package/build/resizable-box/resize-tooltip/index.js.map +1 -1
  143. package/build/resizable-box/resize-tooltip/label.js +0 -1
  144. package/build/resizable-box/resize-tooltip/label.js.map +1 -1
  145. package/build/sandbox/index.native.js +5 -5
  146. package/build/sandbox/index.native.js.map +1 -1
  147. package/build/scrollable/hook.js +1 -1
  148. package/build/scrollable/hook.js.map +1 -1
  149. package/build/select-control/index.js.map +1 -1
  150. package/build/slot-fill/bubbles-virtually/fill.js +11 -2
  151. package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
  152. package/build/spacer/component.js +0 -1
  153. package/build/spacer/component.js.map +1 -1
  154. package/build/spinner/index.js +44 -5
  155. package/build/spinner/index.js.map +1 -1
  156. package/build/spinner/index.native.js +4 -2
  157. package/build/spinner/index.native.js.map +1 -1
  158. package/build/spinner/styles.js +56 -0
  159. package/build/spinner/styles.js.map +1 -0
  160. package/build/surface/hook.js +1 -1
  161. package/build/surface/hook.js.map +1 -1
  162. package/build/text/get-line-height.js +0 -1
  163. package/build/text/get-line-height.js.map +1 -1
  164. package/build/text/hook.js +5 -5
  165. package/build/text/hook.js.map +1 -1
  166. package/build/tip/index.js +4 -8
  167. package/build/tip/index.js.map +1 -1
  168. package/build/toggle-group-control/toggle-group-control/component.js +2 -12
  169. package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
  170. package/build/toggle-group-control/toggle-group-control/styles.js +3 -14
  171. package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  172. package/build/toggle-group-control/toggle-group-control-option/component.js +0 -1
  173. package/build/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  174. package/build/toggle-group-control/toggle-group-control-option/styles.js +8 -8
  175. package/build/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  176. package/build/tools-panel/styles.js +10 -10
  177. package/build/tools-panel/styles.js.map +1 -1
  178. package/build/tools-panel/tools-panel/component.js +0 -1
  179. package/build/tools-panel/tools-panel/component.js.map +1 -1
  180. package/build/tools-panel/tools-panel/hook.js +51 -44
  181. package/build/tools-panel/tools-panel/hook.js.map +1 -1
  182. package/build/tools-panel/tools-panel-header/component.js +0 -1
  183. package/build/tools-panel/tools-panel-header/component.js.map +1 -1
  184. package/build/tools-panel/tools-panel-header/hook.js +3 -3
  185. package/build/tools-panel/tools-panel-header/hook.js.map +1 -1
  186. package/build/tools-panel/tools-panel-item/component.js +0 -1
  187. package/build/tools-panel/tools-panel-item/component.js.map +1 -1
  188. package/build/tools-panel/tools-panel-item/hook.js +17 -9
  189. package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
  190. package/build/tree-grid/index.js +19 -10
  191. package/build/tree-grid/index.js.map +1 -1
  192. package/build/truncate/hook.js +2 -2
  193. package/build/truncate/hook.js.map +1 -1
  194. package/build/ui/shortcut/component.js +0 -1
  195. package/build/ui/shortcut/component.js.map +1 -1
  196. package/build/ui/utils/font-size.js +0 -1
  197. package/build/ui/utils/font-size.js.map +1 -1
  198. package/build/ui/utils/get-valid-children.js +0 -1
  199. package/build/ui/utils/get-valid-children.js.map +1 -1
  200. package/build/unit-control/index.js +0 -1
  201. package/build/unit-control/index.js.map +1 -1
  202. package/build/unit-control/unit-select-control.js.map +1 -1
  203. package/build/utils/colors-values.js +6 -3
  204. package/build/utils/colors-values.js.map +1 -1
  205. package/build/utils/config-values.js +1 -4
  206. package/build/utils/config-values.js.map +1 -1
  207. package/build/utils/hooks/use-combined-ref.js.map +1 -1
  208. package/build/utils/hooks/use-latest-ref.js +0 -1
  209. package/build/utils/hooks/use-latest-ref.js.map +1 -1
  210. package/build/z-stack/component.js +0 -1
  211. package/build/z-stack/component.js.map +1 -1
  212. package/build-module/base-control/index.js +3 -4
  213. package/build-module/base-control/index.js.map +1 -1
  214. package/build-module/base-control/styles/base-control-styles.js +20 -12
  215. package/build-module/base-control/styles/base-control-styles.js.map +1 -1
  216. package/build-module/base-field/hook.js +1 -1
  217. package/build-module/base-field/hook.js.map +1 -1
  218. package/build-module/box-control/styles/box-control-styles.js +9 -9
  219. package/build-module/box-control/styles/box-control-styles.js.map +1 -1
  220. package/build-module/button/deprecated.js +2 -1
  221. package/build-module/button/deprecated.js.map +1 -1
  222. package/build-module/button/index.js +2 -1
  223. package/build-module/button/index.js.map +1 -1
  224. package/build-module/card/card/component.js +1 -1
  225. package/build-module/card/card/component.js.map +1 -1
  226. package/build-module/card/card/hook.js +1 -1
  227. package/build-module/card/card/hook.js.map +1 -1
  228. package/build-module/card/card-body/hook.js +1 -1
  229. package/build-module/card/card-body/hook.js.map +1 -1
  230. package/build-module/card/card-divider/hook.js +1 -1
  231. package/build-module/card/card-divider/hook.js.map +1 -1
  232. package/build-module/card/card-footer/hook.js +1 -1
  233. package/build-module/card/card-footer/hook.js.map +1 -1
  234. package/build-module/card/card-header/hook.js +1 -1
  235. package/build-module/card/card-header/hook.js.map +1 -1
  236. package/build-module/card/card-media/hook.js +1 -1
  237. package/build-module/card/card-media/hook.js.map +1 -1
  238. package/build-module/circular-option-picker/index.js +1 -0
  239. package/build-module/circular-option-picker/index.js.map +1 -1
  240. package/build-module/color-indicator/index.js +1 -0
  241. package/build-module/color-indicator/index.js.map +1 -1
  242. package/build-module/color-palette/index.js +4 -8
  243. package/build-module/color-palette/index.js.map +1 -1
  244. package/build-module/color-palette/index.native.js +4 -2
  245. package/build-module/color-palette/index.native.js.map +1 -1
  246. package/build-module/color-picker/color-display.js.map +1 -1
  247. package/build-module/color-picker/color-input.js.map +1 -1
  248. package/build-module/color-picker/component.js +2 -4
  249. package/build-module/color-picker/component.js.map +1 -1
  250. package/build-module/color-picker/use-deprecated-props.js +3 -2
  251. package/build-module/color-picker/use-deprecated-props.js.map +1 -1
  252. package/build-module/confirm-dialog/component.js +6 -3
  253. package/build-module/confirm-dialog/component.js.map +1 -1
  254. package/build-module/confirm-dialog/styles.js +25 -0
  255. package/build-module/confirm-dialog/styles.js.map +1 -0
  256. package/build-module/custom-gradient-bar/control-points.js +2 -3
  257. package/build-module/custom-gradient-bar/control-points.js.map +1 -1
  258. package/build-module/custom-select-control/index.js +11 -2
  259. package/build-module/custom-select-control/index.js.map +1 -1
  260. package/build-module/date-time/time.js +1 -1
  261. package/build-module/date-time/time.js.map +1 -1
  262. package/build-module/divider/component.js +1 -1
  263. package/build-module/divider/component.js.map +1 -1
  264. package/build-module/dropdown/index.js +3 -3
  265. package/build-module/dropdown/index.js.map +1 -1
  266. package/build-module/elevation/hook.js +5 -5
  267. package/build-module/elevation/hook.js.map +1 -1
  268. package/build-module/external-link/styles/external-link-styles.js +5 -5
  269. package/build-module/external-link/styles/external-link-styles.js.map +1 -1
  270. package/build-module/flex/flex/hook.js +4 -4
  271. package/build-module/flex/flex/hook.js.map +1 -1
  272. package/build-module/form-token-field/suggestions-list.js +73 -79
  273. package/build-module/form-token-field/suggestions-list.js.map +1 -1
  274. package/build-module/grid/hook.js +2 -2
  275. package/build-module/grid/hook.js.map +1 -1
  276. package/build-module/heading/component.js +0 -1
  277. package/build-module/heading/component.js.map +1 -1
  278. package/build-module/icon/index.js +0 -1
  279. package/build-module/icon/index.js.map +1 -1
  280. package/build-module/input-control/index.js +1 -1
  281. package/build-module/input-control/index.js.map +1 -1
  282. package/build-module/input-control/input-base.js +0 -1
  283. package/build-module/input-control/input-base.js.map +1 -1
  284. package/build-module/input-control/input-field.js +1 -1
  285. package/build-module/input-control/input-field.js.map +1 -1
  286. package/build-module/input-control/reducer/actions.js +0 -1
  287. package/build-module/input-control/reducer/actions.js.map +1 -1
  288. package/build-module/input-control/reducer/reducer.js +1 -1
  289. package/build-module/input-control/reducer/reducer.js.map +1 -1
  290. package/build-module/input-control/reducer/state.js +0 -1
  291. package/build-module/input-control/reducer/state.js.map +1 -1
  292. package/build-module/input-control/styles/input-control-styles.js +32 -30
  293. package/build-module/input-control/styles/input-control-styles.js.map +1 -1
  294. package/build-module/item-group/item/component.js +0 -1
  295. package/build-module/item-group/item/component.js.map +1 -1
  296. package/build-module/item-group/item/hook.js +1 -2
  297. package/build-module/item-group/item/hook.js.map +1 -1
  298. package/build-module/item-group/item-group/component.js +0 -1
  299. package/build-module/item-group/item-group/component.js.map +1 -1
  300. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js +3 -1
  301. package/build-module/mobile/bottom-sheet/bottom-sheet-context.native.js.map +1 -1
  302. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +5 -13
  303. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
  304. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +23 -5
  305. package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
  306. package/build-module/mobile/bottom-sheet/cell.native.js +3 -3
  307. package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
  308. package/build-module/mobile/bottom-sheet/index.native.js +16 -13
  309. package/build-module/mobile/bottom-sheet/index.native.js.map +1 -1
  310. package/build-module/mobile/bottom-sheet/range-text-input.native.js +2 -2
  311. package/build-module/mobile/bottom-sheet/range-text-input.native.js.map +1 -1
  312. package/build-module/mobile/color-settings/index.native.js +2 -0
  313. package/build-module/mobile/color-settings/index.native.js.map +1 -1
  314. package/build-module/mobile/color-settings/palette.screen.native.js +5 -0
  315. package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
  316. package/build-module/mobile/color-settings/utils.native.js +7 -3
  317. package/build-module/mobile/color-settings/utils.native.js.map +1 -1
  318. package/build-module/mobile/keyboard-avoiding-view/index.ios.js +6 -6
  319. package/build-module/mobile/keyboard-avoiding-view/index.ios.js.map +1 -1
  320. package/build-module/mobile/link-picker/index.native.js +2 -1
  321. package/build-module/mobile/link-picker/index.native.js.map +1 -1
  322. package/build-module/mobile/link-picker/link-picker-screen.native.js +13 -5
  323. package/build-module/mobile/link-picker/link-picker-screen.native.js.map +1 -1
  324. package/build-module/mobile/link-settings/index.native.js +2 -1
  325. package/build-module/mobile/link-settings/index.native.js.map +1 -1
  326. package/build-module/mobile/readable-content-view/index.native.js +2 -2
  327. package/build-module/mobile/readable-content-view/index.native.js.map +1 -1
  328. package/build-module/mobile/utils/use-is-floating-keyboard.native.js +2 -2
  329. package/build-module/mobile/utils/use-is-floating-keyboard.native.js.map +1 -1
  330. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js +7 -3
  331. package/build-module/mobile/utils/use-unit-converter-to-mobile.native.js.map +1 -1
  332. package/build-module/modal/index.js +1 -11
  333. package/build-module/modal/index.js.map +1 -1
  334. package/build-module/navigator/context.js +5 -1
  335. package/build-module/navigator/context.js.map +1 -1
  336. package/build-module/navigator/navigator-provider/component.js +43 -24
  337. package/build-module/navigator/navigator-provider/component.js.map +1 -1
  338. package/build-module/navigator/navigator-screen/component.js +57 -32
  339. package/build-module/navigator/navigator-screen/component.js.map +1 -1
  340. package/build-module/navigator/use-navigator.js +8 -8
  341. package/build-module/navigator/use-navigator.js.map +1 -1
  342. package/build-module/notice/index.native.js +2 -2
  343. package/build-module/notice/index.native.js.map +1 -1
  344. package/build-module/palette-edit/index.js +38 -30
  345. package/build-module/palette-edit/index.js.map +1 -1
  346. package/build-module/palette-edit/styles.js +11 -12
  347. package/build-module/palette-edit/styles.js.map +1 -1
  348. package/build-module/placeholder/index.js +4 -4
  349. package/build-module/placeholder/index.js.map +1 -1
  350. package/build-module/range-control/styles/range-control-styles.js +29 -29
  351. package/build-module/range-control/styles/range-control-styles.js.map +1 -1
  352. package/build-module/resizable-box/index.js.map +1 -1
  353. package/build-module/resizable-box/resize-tooltip/index.js +3 -3
  354. package/build-module/resizable-box/resize-tooltip/index.js.map +1 -1
  355. package/build-module/resizable-box/resize-tooltip/label.js +0 -1
  356. package/build-module/resizable-box/resize-tooltip/label.js.map +1 -1
  357. package/build-module/sandbox/index.native.js +5 -5
  358. package/build-module/sandbox/index.native.js.map +1 -1
  359. package/build-module/scrollable/hook.js +1 -1
  360. package/build-module/scrollable/hook.js.map +1 -1
  361. package/build-module/select-control/index.js.map +1 -1
  362. package/build-module/slot-fill/bubbles-virtually/fill.js +11 -2
  363. package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
  364. package/build-module/spacer/component.js +0 -1
  365. package/build-module/spacer/component.js.map +1 -1
  366. package/build-module/spinner/index.js +40 -5
  367. package/build-module/spinner/index.js.map +1 -1
  368. package/build-module/spinner/index.native.js +4 -2
  369. package/build-module/spinner/index.native.js.map +1 -1
  370. package/build-module/spinner/styles.js +49 -0
  371. package/build-module/spinner/styles.js.map +1 -0
  372. package/build-module/surface/hook.js +1 -1
  373. package/build-module/surface/hook.js.map +1 -1
  374. package/build-module/text/get-line-height.js +0 -1
  375. package/build-module/text/get-line-height.js.map +1 -1
  376. package/build-module/text/hook.js +5 -5
  377. package/build-module/text/hook.js.map +1 -1
  378. package/build-module/tip/index.js +4 -8
  379. package/build-module/tip/index.js.map +1 -1
  380. package/build-module/toggle-group-control/toggle-group-control/component.js +2 -10
  381. package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
  382. package/build-module/toggle-group-control/toggle-group-control/styles.js +3 -11
  383. package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
  384. package/build-module/toggle-group-control/toggle-group-control-option/component.js +0 -1
  385. package/build-module/toggle-group-control/toggle-group-control-option/component.js.map +1 -1
  386. package/build-module/toggle-group-control/toggle-group-control-option/styles.js +8 -8
  387. package/build-module/toggle-group-control/toggle-group-control-option/styles.js.map +1 -1
  388. package/build-module/tools-panel/styles.js +10 -10
  389. package/build-module/tools-panel/styles.js.map +1 -1
  390. package/build-module/tools-panel/tools-panel/component.js +0 -1
  391. package/build-module/tools-panel/tools-panel/component.js.map +1 -1
  392. package/build-module/tools-panel/tools-panel/hook.js +52 -45
  393. package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
  394. package/build-module/tools-panel/tools-panel-header/component.js +0 -1
  395. package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
  396. package/build-module/tools-panel/tools-panel-header/hook.js +3 -3
  397. package/build-module/tools-panel/tools-panel-header/hook.js.map +1 -1
  398. package/build-module/tools-panel/tools-panel-item/component.js +0 -1
  399. package/build-module/tools-panel/tools-panel-item/component.js.map +1 -1
  400. package/build-module/tools-panel/tools-panel-item/hook.js +17 -9
  401. package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
  402. package/build-module/tree-grid/index.js +18 -10
  403. package/build-module/tree-grid/index.js.map +1 -1
  404. package/build-module/truncate/hook.js +2 -2
  405. package/build-module/truncate/hook.js.map +1 -1
  406. package/build-module/ui/shortcut/component.js +0 -1
  407. package/build-module/ui/shortcut/component.js.map +1 -1
  408. package/build-module/ui/utils/font-size.js +0 -1
  409. package/build-module/ui/utils/font-size.js.map +1 -1
  410. package/build-module/ui/utils/get-valid-children.js +0 -1
  411. package/build-module/ui/utils/get-valid-children.js.map +1 -1
  412. package/build-module/unit-control/index.js +0 -1
  413. package/build-module/unit-control/index.js.map +1 -1
  414. package/build-module/unit-control/unit-select-control.js +1 -2
  415. package/build-module/unit-control/unit-select-control.js.map +1 -1
  416. package/build-module/utils/colors-values.js +6 -3
  417. package/build-module/utils/colors-values.js.map +1 -1
  418. package/build-module/utils/config-values.js +1 -4
  419. package/build-module/utils/config-values.js.map +1 -1
  420. package/build-module/utils/hooks/use-combined-ref.js +0 -1
  421. package/build-module/utils/hooks/use-combined-ref.js.map +1 -1
  422. package/build-module/utils/hooks/use-latest-ref.js +0 -1
  423. package/build-module/utils/hooks/use-latest-ref.js.map +1 -1
  424. package/build-module/z-stack/component.js +0 -1
  425. package/build-module/z-stack/component.js.map +1 -1
  426. package/build-style/style-rtl.css +22 -6
  427. package/build-style/style.css +22 -6
  428. package/build-types/base-control/index.d.ts.map +1 -1
  429. package/build-types/base-control/styles/base-control-styles.d.ts +4 -0
  430. package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
  431. package/build-types/button/index.d.ts.map +1 -1
  432. package/build-types/card/types.d.ts.map +1 -1
  433. package/build-types/circular-option-picker/index.d.ts +31 -0
  434. package/build-types/circular-option-picker/index.d.ts.map +1 -0
  435. package/build-types/color-palette/index.d.ts +16 -0
  436. package/build-types/color-palette/index.d.ts.map +1 -0
  437. package/build-types/color-palette/styles.d.ts +8 -0
  438. package/build-types/color-palette/styles.d.ts.map +1 -0
  439. package/build-types/color-picker/color-display.d.ts +14 -0
  440. package/build-types/color-picker/color-display.d.ts.map +1 -0
  441. package/build-types/color-picker/color-input.d.ts +14 -0
  442. package/build-types/color-picker/color-input.d.ts.map +1 -0
  443. package/build-types/color-picker/component.d.ts +11 -0
  444. package/build-types/color-picker/component.d.ts.map +1 -0
  445. package/build-types/color-picker/hex-input.d.ts +13 -0
  446. package/build-types/color-picker/hex-input.d.ts.map +1 -0
  447. package/build-types/color-picker/hsl-input.d.ts +13 -0
  448. package/build-types/color-picker/hsl-input.d.ts.map +1 -0
  449. package/build-types/color-picker/index.d.ts +5 -0
  450. package/build-types/color-picker/index.d.ts.map +1 -0
  451. package/build-types/color-picker/input-with-slider.d.ts +12 -0
  452. package/build-types/color-picker/input-with-slider.d.ts.map +1 -0
  453. package/build-types/color-picker/legacy-adapter.d.ts +6 -0
  454. package/build-types/color-picker/legacy-adapter.d.ts.map +1 -0
  455. package/build-types/color-picker/picker.d.ts +10 -0
  456. package/build-types/color-picker/picker.d.ts.map +1 -0
  457. package/build-types/color-picker/rgb-input.d.ts +13 -0
  458. package/build-types/color-picker/rgb-input.d.ts.map +1 -0
  459. package/build-types/color-picker/styles.d.ts +76 -0
  460. package/build-types/color-picker/styles.d.ts.map +1 -0
  461. package/build-types/color-picker/types.d.ts +2 -0
  462. package/build-types/color-picker/types.d.ts.map +1 -0
  463. package/build-types/color-picker/use-deprecated-props.d.ts +49 -0
  464. package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -0
  465. package/build-types/confirm-dialog/component.d.ts +11 -14
  466. package/build-types/confirm-dialog/component.d.ts.map +1 -1
  467. package/build-types/confirm-dialog/styles.d.ts +10 -0
  468. package/build-types/confirm-dialog/styles.d.ts.map +1 -0
  469. package/build-types/confirm-dialog/types.d.ts.map +1 -1
  470. package/build-types/divider/component.d.ts.map +1 -1
  471. package/build-types/dropdown/index.d.ts +1 -13
  472. package/build-types/dropdown/index.d.ts.map +1 -1
  473. package/build-types/elevation/hook.d.ts.map +1 -1
  474. package/build-types/elevation/types.d.ts.map +1 -1
  475. package/build-types/flex/flex/hook.d.ts.map +1 -1
  476. package/build-types/flex/types.d.ts.map +1 -1
  477. package/build-types/flyout/types.d.ts.map +1 -1
  478. package/build-types/grid/hook.d.ts.map +1 -1
  479. package/build-types/grid/types.d.ts.map +1 -1
  480. package/build-types/h-stack/hook.d.ts +1 -1
  481. package/build-types/h-stack/hook.d.ts.map +1 -1
  482. package/build-types/h-stack/types.d.ts.map +1 -1
  483. package/build-types/heading/component.d.ts.map +1 -1
  484. package/build-types/higher-order/with-focus-outside/index.d.ts +1 -1
  485. package/build-types/icon/index.d.ts.map +1 -1
  486. package/build-types/input-control/index.d.ts.map +1 -1
  487. package/build-types/input-control/input-base.d.ts.map +1 -1
  488. package/build-types/input-control/input-field.d.ts.map +1 -1
  489. package/build-types/input-control/reducer/actions.d.ts.map +1 -1
  490. package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
  491. package/build-types/input-control/reducer/state.d.ts.map +1 -1
  492. package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
  493. package/build-types/input-control/types.d.ts.map +1 -1
  494. package/build-types/item-group/item/component.d.ts.map +1 -1
  495. package/build-types/item-group/item/hook.d.ts.map +1 -1
  496. package/build-types/item-group/item-group/component.d.ts.map +1 -1
  497. package/build-types/navigator/context.d.ts.map +1 -1
  498. package/build-types/navigator/navigator-provider/component.d.ts +16 -17
  499. package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
  500. package/build-types/navigator/navigator-screen/component.d.ts +16 -16
  501. package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
  502. package/build-types/navigator/types.d.ts +10 -9
  503. package/build-types/navigator/types.d.ts.map +1 -1
  504. package/build-types/resizable-box/index.d.ts +1 -1
  505. package/build-types/resizable-box/index.d.ts.map +1 -1
  506. package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
  507. package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
  508. package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
  509. package/build-types/select-control/index.d.ts +3 -2
  510. package/build-types/select-control/index.d.ts.map +1 -1
  511. package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
  512. package/build-types/spacer/component.d.ts.map +1 -1
  513. package/build-types/spacer/types.d.ts.map +1 -1
  514. package/build-types/spinner/index.d.ts +18 -1
  515. package/build-types/spinner/index.d.ts.map +1 -1
  516. package/build-types/spinner/styles.d.ts +13 -0
  517. package/build-types/spinner/styles.d.ts.map +1 -0
  518. package/build-types/surface/hook.d.ts.map +1 -1
  519. package/build-types/text/get-line-height.d.ts.map +1 -1
  520. package/build-types/text/hook.d.ts.map +1 -1
  521. package/build-types/text/types.d.ts.map +1 -1
  522. package/build-types/tip/index.d.ts.map +1 -1
  523. package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
  524. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +0 -5
  525. package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
  526. package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
  527. package/build-types/toggle-group-control/toggle-group-control-option/styles.d.ts.map +1 -1
  528. package/build-types/toggle-group-control/types.d.ts +1 -7
  529. package/build-types/toggle-group-control/types.d.ts.map +1 -1
  530. package/build-types/tools-panel/styles.d.ts.map +1 -1
  531. package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
  532. package/build-types/tools-panel/tools-panel/hook.d.ts +8 -4
  533. package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
  534. package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
  535. package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
  536. package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
  537. package/build-types/tools-panel/types.d.ts +14 -0
  538. package/build-types/tools-panel/types.d.ts.map +1 -1
  539. package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
  540. package/build-types/ui/control-group/types.d.ts.map +1 -1
  541. package/build-types/ui/form-group/types.d.ts.map +1 -1
  542. package/build-types/ui/shortcut/component.d.ts.map +1 -1
  543. package/build-types/ui/tooltip/types.d.ts.map +1 -1
  544. package/build-types/ui/utils/font-size.d.ts.map +1 -1
  545. package/build-types/ui/utils/get-valid-children.d.ts.map +1 -1
  546. package/build-types/unit-control/index.d.ts +3 -2
  547. package/build-types/unit-control/index.d.ts.map +1 -1
  548. package/build-types/unit-control/types.d.ts +2 -1
  549. package/build-types/unit-control/types.d.ts.map +1 -1
  550. package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
  551. package/build-types/utils/colors-values.d.ts +1 -0
  552. package/build-types/utils/colors-values.d.ts.map +1 -1
  553. package/build-types/utils/config-values.d.ts +1 -5
  554. package/build-types/utils/config-values.d.ts.map +1 -1
  555. package/build-types/utils/hooks/use-combined-ref.d.ts.map +1 -1
  556. package/build-types/utils/hooks/use-latest-ref.d.ts.map +1 -1
  557. package/build-types/v-stack/types.d.ts.map +1 -1
  558. package/build-types/z-stack/component.d.ts.map +1 -1
  559. package/package.json +20 -17
  560. package/src/base-control/index.js +11 -2
  561. package/src/base-control/styles/base-control-styles.js +10 -1
  562. package/src/base-field/hook.js +1 -1
  563. package/src/box-control/styles/box-control-styles.js +1 -1
  564. package/src/button/deprecated.js +1 -0
  565. package/src/button/index.js +1 -0
  566. package/src/card/card/component.js +1 -1
  567. package/src/card/card/hook.js +1 -1
  568. package/src/card/card-body/hook.js +1 -1
  569. package/src/card/card-divider/hook.js +1 -1
  570. package/src/card/card-footer/hook.js +1 -1
  571. package/src/card/card-header/hook.js +1 -1
  572. package/src/card/card-media/hook.js +1 -1
  573. package/src/card/types.ts +0 -1
  574. package/src/circular-option-picker/index.js +1 -0
  575. package/src/color-indicator/README.md +28 -0
  576. package/src/color-indicator/index.js +2 -0
  577. package/src/color-indicator/style.scss +1 -1
  578. package/src/color-palette/index.js +7 -8
  579. package/src/color-palette/index.native.js +2 -0
  580. package/src/color-palette/style.scss +11 -3
  581. package/src/color-palette/test/__snapshots__/index.js.snap +0 -1
  582. package/src/color-picker/README.md +1 -1
  583. package/src/color-picker/color-display.tsx +1 -1
  584. package/src/color-picker/color-input.tsx +1 -1
  585. package/src/color-picker/component.tsx +3 -4
  586. package/src/color-picker/use-deprecated-props.ts +2 -1
  587. package/src/combobox-control/stories/index.js +6 -2
  588. package/src/combobox-control/style.scss +2 -2
  589. package/src/confirm-dialog/component.tsx +7 -4
  590. package/src/confirm-dialog/stories/index.js +5 -2
  591. package/src/confirm-dialog/styles.ts +18 -0
  592. package/src/confirm-dialog/types.ts +0 -1
  593. package/src/custom-gradient-bar/control-points.js +2 -3
  594. package/src/custom-gradient-picker/style.scss +0 -1
  595. package/src/custom-select-control/index.js +13 -1
  596. package/src/custom-select-control/stories/index.js +27 -0
  597. package/src/custom-select-control/test/index.js +46 -0
  598. package/src/date-time/README.md +4 -4
  599. package/src/date-time/test/time.js +2 -2
  600. package/src/date-time/time.js +2 -2
  601. package/src/dimension-control/README.md +2 -0
  602. package/src/divider/component.tsx +0 -1
  603. package/src/dropdown/index.js +14 -13
  604. package/src/elevation/hook.js +1 -0
  605. package/src/elevation/types.ts +0 -1
  606. package/src/external-link/styles/external-link-styles.js +3 -3
  607. package/src/flex/flex/hook.js +1 -0
  608. package/src/flex/types.ts +0 -1
  609. package/src/flyout/types.ts +0 -1
  610. package/src/form-token-field/style.scss +1 -1
  611. package/src/form-token-field/suggestions-list.js +109 -120
  612. package/src/form-token-field/test/index.js +4 -2
  613. package/src/gradient-picker/README.md +94 -0
  614. package/src/grid/hook.js +1 -0
  615. package/src/grid/types.ts +0 -1
  616. package/src/h-stack/types.ts +0 -1
  617. package/src/heading/component.tsx +0 -1
  618. package/src/icon/index.tsx +0 -1
  619. package/src/input-control/index.tsx +0 -1
  620. package/src/input-control/input-base.tsx +0 -1
  621. package/src/input-control/input-field.tsx +0 -1
  622. package/src/input-control/reducer/actions.ts +0 -1
  623. package/src/input-control/reducer/reducer.ts +0 -1
  624. package/src/input-control/reducer/state.ts +0 -1
  625. package/src/input-control/styles/input-control-styles.tsx +7 -7
  626. package/src/input-control/types.ts +0 -1
  627. package/src/item-group/item/component.tsx +0 -1
  628. package/src/item-group/item/hook.ts +1 -2
  629. package/src/item-group/item-group/component.tsx +0 -1
  630. package/src/item-group/stories/index.js +2 -2
  631. package/src/mobile/bottom-sheet/bottom-sheet-context.native.js +2 -0
  632. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +8 -14
  633. package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +33 -3
  634. package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +162 -0
  635. package/src/mobile/bottom-sheet/cell.native.js +8 -6
  636. package/src/mobile/bottom-sheet/index.native.js +24 -14
  637. package/src/mobile/bottom-sheet/link-suggestion-styles.native.scss +3 -0
  638. package/src/mobile/bottom-sheet/range-text-input.native.js +5 -2
  639. package/src/mobile/bottom-sheet/styles.native.scss +4 -0
  640. package/src/mobile/bottom-sheet/test/index.native.js +24 -0
  641. package/src/mobile/color-settings/index.native.js +2 -0
  642. package/src/mobile/color-settings/palette.screen.native.js +5 -0
  643. package/src/mobile/color-settings/utils.native.js +8 -3
  644. package/src/mobile/html-text-input/test/index.native.js +34 -35
  645. package/src/mobile/keyboard-avoiding-view/index.ios.js +12 -9
  646. package/src/mobile/link-picker/index.native.js +2 -1
  647. package/src/mobile/link-picker/link-picker-screen.native.js +13 -5
  648. package/src/mobile/link-settings/index.native.js +2 -1
  649. package/src/mobile/link-settings/test/edit.native.js +172 -236
  650. package/src/mobile/link-settings/test/link-settings-navigation.native.js +97 -0
  651. package/src/mobile/readable-content-view/index.native.js +5 -2
  652. package/src/mobile/utils/use-is-floating-keyboard.native.js +2 -5
  653. package/src/mobile/utils/use-unit-converter-to-mobile.native.js +11 -3
  654. package/src/modal/index.js +1 -10
  655. package/src/navigator/context.ts +5 -1
  656. package/src/navigator/navigator-provider/README.md +30 -20
  657. package/src/navigator/navigator-provider/component.tsx +69 -25
  658. package/src/navigator/navigator-screen/component.tsx +71 -34
  659. package/src/navigator/stories/index.js +26 -13
  660. package/src/navigator/test/index.js +167 -32
  661. package/src/navigator/types.ts +11 -11
  662. package/src/navigator/use-navigator.ts +4 -4
  663. package/src/notice/index.native.js +5 -2
  664. package/src/palette-edit/index.js +115 -75
  665. package/src/palette-edit/styles.js +22 -3
  666. package/src/placeholder/index.js +8 -6
  667. package/src/placeholder/style.scss +12 -0
  668. package/src/placeholder/test/index.js +18 -1
  669. package/src/range-control/styles/range-control-styles.js +1 -1
  670. package/src/resizable-box/index.tsx +0 -1
  671. package/src/resizable-box/resize-tooltip/index.tsx +1 -2
  672. package/src/resizable-box/resize-tooltip/label.tsx +0 -1
  673. package/src/sandbox/index.native.js +8 -5
  674. package/src/scrollable/hook.js +1 -1
  675. package/src/scrollable/stories/index.js +6 -3
  676. package/src/select-control/README.md +2 -2
  677. package/src/select-control/index.tsx +3 -2
  678. package/src/select-control/stories/index.js +1 -1
  679. package/src/slot-fill/bubbles-virtually/fill.js +12 -1
  680. package/src/spacer/component.tsx +0 -1
  681. package/src/spacer/types.ts +0 -1
  682. package/src/spinner/README.md +10 -10
  683. package/src/spinner/index.js +42 -3
  684. package/src/spinner/index.native.js +7 -2
  685. package/src/spinner/stories/index.js +36 -3
  686. package/src/spinner/styles.js +47 -0
  687. package/src/surface/hook.js +1 -0
  688. package/src/text/get-line-height.ts +0 -1
  689. package/src/text/hook.js +1 -0
  690. package/src/text/types.ts +0 -1
  691. package/src/tip/index.js +2 -4
  692. package/src/toggle-group-control/test/__snapshots__/index.js.snap +25 -27
  693. package/src/toggle-group-control/toggle-group-control/component.tsx +1 -12
  694. package/src/toggle-group-control/toggle-group-control/styles.ts +0 -14
  695. package/src/toggle-group-control/toggle-group-control-option/component.tsx +0 -1
  696. package/src/toggle-group-control/toggle-group-control-option/styles.ts +1 -3
  697. package/src/toggle-group-control/types.ts +1 -9
  698. package/src/tools-panel/stories/index.js +21 -1
  699. package/src/tools-panel/stories/tools-panel-with-item-group-slot.js +244 -0
  700. package/src/tools-panel/styles.ts +1 -3
  701. package/src/tools-panel/test/__snapshots__/index.js.snap +219 -0
  702. package/src/tools-panel/test/index.js +218 -20
  703. package/src/tools-panel/tools-panel/README.md +3 -2
  704. package/src/tools-panel/tools-panel/component.tsx +0 -1
  705. package/src/tools-panel/tools-panel/hook.ts +164 -97
  706. package/src/tools-panel/tools-panel-header/component.tsx +0 -1
  707. package/src/tools-panel/tools-panel-header/hook.ts +3 -3
  708. package/src/tools-panel/tools-panel-item/component.tsx +0 -1
  709. package/src/tools-panel/tools-panel-item/hook.ts +39 -8
  710. package/src/tools-panel/types.ts +14 -1
  711. package/src/tooltip/test/index.native.js +3 -1
  712. package/src/tree-grid/index.js +157 -126
  713. package/src/truncate/hook.js +1 -1
  714. package/src/ui/README.md +1 -1
  715. package/src/ui/context/wordpress-component.ts +0 -1
  716. package/src/ui/control-group/types.ts +0 -1
  717. package/src/ui/form-group/types.ts +0 -1
  718. package/src/ui/shortcut/component.tsx +0 -1
  719. package/src/ui/tooltip/types.ts +0 -1
  720. package/src/ui/utils/font-size.ts +0 -1
  721. package/src/ui/utils/get-valid-children.ts +0 -1
  722. package/src/unit-control/index.tsx +0 -1
  723. package/src/unit-control/types.ts +2 -2
  724. package/src/unit-control/unit-select-control.tsx +0 -1
  725. package/src/utils/colors-values.js +4 -3
  726. package/src/utils/config-values.js +1 -5
  727. package/src/utils/hooks/stories/use-cx.js +121 -44
  728. package/src/utils/hooks/use-combined-ref.ts +0 -1
  729. package/src/utils/hooks/use-latest-ref.ts +0 -1
  730. package/src/v-stack/types.ts +0 -1
  731. package/src/z-stack/component.tsx +0 -1
  732. package/tsconfig.json +3 -0
  733. package/tsconfig.tsbuildinfo +1 -1
  734. package/build/spinner/styles/spinner-styles.js +0 -40
  735. package/build/spinner/styles/spinner-styles.js.map +0 -1
  736. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -90
  737. package/build/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
  738. package/build-module/spinner/styles/spinner-styles.js +0 -28
  739. package/build-module/spinner/styles/spinner-styles.js.map +0 -1
  740. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js +0 -86
  741. package/build-module/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.js.map +0 -1
  742. package/build-types/spinner/styles/spinner-styles.d.ts +0 -5
  743. package/build-types/spinner/styles/spinner-styles.d.ts.map +0 -1
  744. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts +0 -9
  745. package/build-types/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.d.ts.map +0 -1
  746. package/src/spinner/styles/spinner-styles.js +0 -47
  747. package/src/toggle-group-control/toggle-group-control/toggle-group-control-backdrop.tsx +0 -86
  748. package/src/ui/visually-hidden/README.md +0 -21
@@ -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","labelPadding","paddingBottom","paddingTop","BaseLabel","Text","Label","props","LabelWrapper","FlexItem","backdropFocusedStyles","borderColor","borderFocus","border","boxShadow","borderDisabled","borderStyle","borderWidth","BackdropUI","Prefix","Suffix"],"mappings":";;;;;;;;;;;;;;;AAGA;;AASA;;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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AAAA;AAAA;AAAA;AAAA,EAAH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;;;AASP,MAAMC,qBAAqB,GAAG,UAGU;AAAA,MAHR;AAC/BhD,IAAAA,QAD+B;AAE/BN,IAAAA;AAF+B,GAGQ;AACvC,MAAIuD,WAAW,GAAGvD,SAAS,GAAGQ,cAAOC,EAAP,CAAU+C,WAAb,GAA2BhD,cAAOC,EAAP,CAAUgD,MAAhE;AAEA,MAAIC,SAAJ;;AAEA,MAAK1D,SAAL,EAAiB;AAChB0D,IAAAA,SAAS,GAAI,aAAalD,cAAOC,EAAP,CAAU+C,WAAa,QAAjD;AACA;;AAED,MAAKlD,QAAL,EAAgB;AACfiD,IAAAA,WAAW,GAAG/C,cAAOC,EAAP,CAAUkD,cAAxB;AACA;;AAED,sBAAO,gBAAK;AACXD,IAAAA,SADW;AAEXH,IAAAA,WAFW;AAGXK,IAAAA,WAAW,EAAE,OAHF;AAIXC,IAAAA,WAAW,EAAE;AAJF,GAAL,ugUAAP;AAMA,CAtBD;;AAwBO,MAAMC,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,8IAalBR,qBAbkB,OAclB,gBAAK;AAAEnB,EAAAA,WAAW,EAAE;AAAf,CAAL,CAdkB,k8TAAhB;;AAkBA,MAAM4B,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';\n// eslint-disable-next-line no-restricted-imports\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 labelPadding = ( {\n\tlabelPosition,\n}: {\n\tlabelPosition?: LabelPosition;\n} ) => {\n\tlet paddingBottom = 4;\n\n\tif ( labelPosition === 'edge' || labelPosition === 'side' ) {\n\t\tpaddingBottom = 0;\n\t}\n\n\treturn css( { paddingTop: 0, paddingBottom } );\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\tmargin: 0;\n\t\tmax-width: 100%;\n\t\tz-index: 1;\n\n\t\t${ labelPadding }\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,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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,EAAP,CAAUiD,WAAa,QAAjD;AACA;;AAED,MAAKpD,QAAL,EAAgB;AACfmD,IAAAA,WAAW,GAAGjD,cAAOC,EAAP,CAAUoD,cAAxB;AACA;;AAED,sBAAO,gBAAK;AACXD,IAAAA,SADW;AAEXH,IAAAA,WAFW;AAGXK,IAAAA,WAAW,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"]}
@@ -20,7 +20,6 @@ var _view = require("../../view");
20
20
  /**
21
21
  * External dependencies
22
22
  */
23
- // eslint-disable-next-line no-restricted-imports
24
23
 
25
24
  /**
26
25
  * Internal dependencies
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/item-group/item/component.tsx"],"names":["Item","props","forwardedRef","role","wrapperClassName","otherProps"],"mappings":";;;;;;;;;;;;;AAUA;;AACA;;AACA;;AAZA;AACA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,IAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,gBAAR;AAA0B,OAAGC;AAA7B,MAA4C,mBAASJ,KAAT,CAAlD;AAEA,SACC;AAAK,IAAA,IAAI,EAAGE,IAAZ;AAAmB,IAAA,SAAS,EAAGC;AAA/B,KACC,4BAAC,UAAD,6BAAWC,UAAX;AAAwB,IAAA,GAAG,EAAGH;AAA9B,KADD,CADD;AAKA;;eAEc,6BAAgBF,IAAhB,EAAsB,MAAtB,C","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { Ref } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { ItemProps } from '../types';\nimport { useItem } from './hook';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { View } from '../../view';\n\nfunction Item(\n\tprops: WordPressComponentProps< ItemProps, 'div' >,\n\tforwardedRef: Ref< any >\n) {\n\tconst { role, wrapperClassName, ...otherProps } = useItem( props );\n\n\treturn (\n\t\t<div role={ role } className={ wrapperClassName }>\n\t\t\t<View { ...otherProps } ref={ forwardedRef } />\n\t\t</div>\n\t);\n}\n\nexport default contextConnect( Item, 'Item' );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/item-group/item/component.tsx"],"names":["Item","props","forwardedRef","role","wrapperClassName","otherProps"],"mappings":";;;;;;;;;;;;;AASA;;AACA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;AAMA,SAASA,IAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAM;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,gBAAR;AAA0B,OAAGC;AAA7B,MAA4C,mBAASJ,KAAT,CAAlD;AAEA,SACC;AAAK,IAAA,IAAI,EAAGE,IAAZ;AAAmB,IAAA,SAAS,EAAGC;AAA/B,KACC,4BAAC,UAAD,6BAAWC,UAAX;AAAwB,IAAA,GAAG,EAAGH;AAA9B,KADD,CADD;AAKA;;eAEc,6BAAgBF,IAAhB,EAAsB,MAAtB,C","sourcesContent":["/**\n * External dependencies\n */\nimport type { Ref } from 'react';\n\n/**\n * Internal dependencies\n */\nimport type { ItemProps } from '../types';\nimport { useItem } from './hook';\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { View } from '../../view';\n\nfunction Item(\n\tprops: WordPressComponentProps< ItemProps, 'div' >,\n\tforwardedRef: Ref< any >\n) {\n\tconst { role, wrapperClassName, ...otherProps } = useItem( props );\n\n\treturn (\n\t\t<div role={ role } className={ wrapperClassName }>\n\t\t\t<View { ...otherProps } ref={ forwardedRef } />\n\t\t</div>\n\t);\n}\n\nexport default contextConnect( Item, 'Item' );\n"]}
@@ -22,7 +22,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
22
22
  /**
23
23
  * External dependencies
24
24
  */
25
- // eslint-disable-next-line no-restricted-imports
26
25
 
27
26
  /**
28
27
  * WordPress dependencies
@@ -47,7 +46,7 @@ function useItem(props) {
47
46
  const size = sizeProp || contextSize;
48
47
  const as = asProp || (typeof onClick !== 'undefined' ? 'button' : 'div');
49
48
  const cx = (0, _useCx.useCx)();
50
- const classes = (0, _element.useMemo)(() => cx(as === 'button' && styles.unstyledButton, styles.itemSizes[size] || styles.itemSizes.medium, styles.item, spacedAround && styles.spacedAround, className), [as, className, size, spacedAround]);
49
+ const classes = (0, _element.useMemo)(() => cx(as === 'button' && styles.unstyledButton, styles.itemSizes[size] || styles.itemSizes.medium, styles.item, spacedAround && styles.spacedAround, className), [as, className, cx, size, spacedAround]);
51
50
  const wrapperClassName = cx(styles.itemWrapper);
52
51
  return {
53
52
  as,
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/item-group/item/hook.ts"],"names":["useItem","props","as","asProp","className","onClick","role","size","sizeProp","otherProps","spacedAround","contextSize","cx","classes","styles","unstyledButton","itemSizes","medium","item","wrapperClassName","itemWrapper"],"mappings":";;;;;;;AASA;;AAKA;;AACA;;AACA;;AACA;;;;;;AAjBA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AAOO,SAASA,OAAT,CAAkBC,KAAlB,EAAuE;AAC7E,QAAM;AACLC,IAAAA,EAAE,EAAEC,MADC;AAELC,IAAAA,SAFK;AAGLC,IAAAA,OAHK;AAILC,IAAAA,IAAI,GAAG,UAJF;AAKLC,IAAAA,IAAI,EAAEC,QALD;AAML,OAAGC;AANE,MAOF,+BAAkBR,KAAlB,EAAyB,MAAzB,CAPJ;AASA,QAAM;AAAES,IAAAA,YAAF;AAAgBH,IAAAA,IAAI,EAAEI;AAAtB,MAAsC,oCAA5C;AAEA,QAAMJ,IAAI,GAAGC,QAAQ,IAAIG,WAAzB;AAEA,QAAMT,EAAE,GACPC,MAAM,KACF,OAAOE,OAAP,KAAmB,WAAnB,GACD,QADC,GAED,KAHG,CADP;AAMA,QAAMO,EAAE,GAAG,mBAAX;AAEA,QAAMC,OAAO,GAAG,sBACf,MACCD,EAAE,CACDV,EAAE,KAAK,QAAP,IAAmBY,MAAM,CAACC,cADzB,EAEDD,MAAM,CAACE,SAAP,CAAkBT,IAAlB,KAA4BO,MAAM,CAACE,SAAP,CAAiBC,MAF5C,EAGDH,MAAM,CAACI,IAHN,EAIDR,YAAY,IAAII,MAAM,CAACJ,YAJtB,EAKDN,SALC,CAFY,EASf,CAAEF,EAAF,EAAME,SAAN,EAAiBG,IAAjB,EAAuBG,YAAvB,CATe,CAAhB;AAYA,QAAMS,gBAAgB,GAAGP,EAAE,CAAEE,MAAM,CAACM,WAAT,CAA3B;AAEA,SAAO;AACNlB,IAAAA,EADM;AAENE,IAAAA,SAAS,EAAES,OAFL;AAGNR,IAAAA,OAHM;AAINc,IAAAA,gBAJM;AAKNb,IAAAA,IALM;AAMN,OAAGG;AANG,GAAP;AAQA","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { ElementType } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useItemGroupContext } from '../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { ItemProps } from '../types';\n\nexport function useItem( props: WordPressComponentProps< ItemProps, 'div' > ) {\n\tconst {\n\t\tas: asProp,\n\t\tclassName,\n\t\tonClick,\n\t\trole = 'listitem',\n\t\tsize: sizeProp,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Item' );\n\n\tconst { spacedAround, size: contextSize } = useItemGroupContext();\n\n\tconst size = sizeProp || contextSize;\n\n\tconst as =\n\t\tasProp ||\n\t\t( ( typeof onClick !== 'undefined'\n\t\t\t? 'button'\n\t\t\t: 'div' ) as ElementType );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tas === 'button' && styles.unstyledButton,\n\t\t\t\tstyles.itemSizes[ size ] || styles.itemSizes.medium,\n\t\t\t\tstyles.item,\n\t\t\t\tspacedAround && styles.spacedAround,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ as, className, size, spacedAround ]\n\t);\n\n\tconst wrapperClassName = cx( styles.itemWrapper );\n\n\treturn {\n\t\tas,\n\t\tclassName: classes,\n\t\tonClick,\n\t\twrapperClassName,\n\t\trole,\n\t\t...otherProps,\n\t};\n}\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/item-group/item/hook.ts"],"names":["useItem","props","as","asProp","className","onClick","role","size","sizeProp","otherProps","spacedAround","contextSize","cx","classes","styles","unstyledButton","itemSizes","medium","item","wrapperClassName","itemWrapper"],"mappings":";;;;;;;AAQA;;AAKA;;AACA;;AACA;;AACA;;;;;;AAhBA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AAOO,SAASA,OAAT,CAAkBC,KAAlB,EAAuE;AAC7E,QAAM;AACLC,IAAAA,EAAE,EAAEC,MADC;AAELC,IAAAA,SAFK;AAGLC,IAAAA,OAHK;AAILC,IAAAA,IAAI,GAAG,UAJF;AAKLC,IAAAA,IAAI,EAAEC,QALD;AAML,OAAGC;AANE,MAOF,+BAAkBR,KAAlB,EAAyB,MAAzB,CAPJ;AASA,QAAM;AAAES,IAAAA,YAAF;AAAgBH,IAAAA,IAAI,EAAEI;AAAtB,MAAsC,oCAA5C;AAEA,QAAMJ,IAAI,GAAGC,QAAQ,IAAIG,WAAzB;AAEA,QAAMT,EAAE,GACPC,MAAM,KACF,OAAOE,OAAP,KAAmB,WAAnB,GACD,QADC,GAED,KAHG,CADP;AAMA,QAAMO,EAAE,GAAG,mBAAX;AAEA,QAAMC,OAAO,GAAG,sBACf,MACCD,EAAE,CACDV,EAAE,KAAK,QAAP,IAAmBY,MAAM,CAACC,cADzB,EAEDD,MAAM,CAACE,SAAP,CAAkBT,IAAlB,KAA4BO,MAAM,CAACE,SAAP,CAAiBC,MAF5C,EAGDH,MAAM,CAACI,IAHN,EAIDR,YAAY,IAAII,MAAM,CAACJ,YAJtB,EAKDN,SALC,CAFY,EASf,CAAEF,EAAF,EAAME,SAAN,EAAiBQ,EAAjB,EAAqBL,IAArB,EAA2BG,YAA3B,CATe,CAAhB;AAYA,QAAMS,gBAAgB,GAAGP,EAAE,CAAEE,MAAM,CAACM,WAAT,CAA3B;AAEA,SAAO;AACNlB,IAAAA,EADM;AAENE,IAAAA,SAAS,EAAES,OAFL;AAGNR,IAAAA,OAHM;AAINc,IAAAA,gBAJM;AAKNb,IAAAA,IALM;AAMN,OAAGG;AANG,GAAP;AAQA","sourcesContent":["/**\n * External dependencies\n */\nimport type { ElementType } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { useContextSystem, WordPressComponentProps } from '../../ui/context';\nimport * as styles from '../styles';\nimport { useItemGroupContext } from '../context';\nimport { useCx } from '../../utils/hooks/use-cx';\nimport type { ItemProps } from '../types';\n\nexport function useItem( props: WordPressComponentProps< ItemProps, 'div' > ) {\n\tconst {\n\t\tas: asProp,\n\t\tclassName,\n\t\tonClick,\n\t\trole = 'listitem',\n\t\tsize: sizeProp,\n\t\t...otherProps\n\t} = useContextSystem( props, 'Item' );\n\n\tconst { spacedAround, size: contextSize } = useItemGroupContext();\n\n\tconst size = sizeProp || contextSize;\n\n\tconst as =\n\t\tasProp ||\n\t\t( ( typeof onClick !== 'undefined'\n\t\t\t? 'button'\n\t\t\t: 'div' ) as ElementType );\n\n\tconst cx = useCx();\n\n\tconst classes = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tas === 'button' && styles.unstyledButton,\n\t\t\t\tstyles.itemSizes[ size ] || styles.itemSizes.medium,\n\t\t\t\tstyles.item,\n\t\t\t\tspacedAround && styles.spacedAround,\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ as, className, cx, size, spacedAround ]\n\t);\n\n\tconst wrapperClassName = cx( styles.itemWrapper );\n\n\treturn {\n\t\tas,\n\t\tclassName: classes,\n\t\tonClick,\n\t\twrapperClassName,\n\t\trole,\n\t\t...otherProps,\n\t};\n}\n"]}
@@ -22,7 +22,6 @@ var _view = require("../../view");
22
22
  /**
23
23
  * External dependencies
24
24
  */
25
- // eslint-disable-next-line no-restricted-imports
26
25
 
27
26
  /**
28
27
  * Internal dependencies
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/item-group/item-group/component.tsx"],"names":["ItemGroup","props","forwardedRef","isBordered","isSeparated","size","sizeProp","otherProps","contextSize","spacedAround","contextValue"],"mappings":";;;;;;;;;;;;;AASA;;AACA;;AACA;;AACA;;AAZA;AACA;AACA;AACA;;AAGA;AACA;AACA;AAOA,SAASA,SAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAM;AACLC,IAAAA,UADK;AAELC,IAAAA,WAFK;AAGLC,IAAAA,IAAI,EAAEC,QAHD;AAIL,OAAGC;AAJE,MAKF,wBAAcN,KAAd,CALJ;AAOA,QAAM;AAAEI,IAAAA,IAAI,EAAEG;AAAR,MAAwB,oCAA9B;AAEA,QAAMC,YAAY,GAAG,CAAEN,UAAF,IAAgB,CAAEC,WAAvC;AACA,QAAMC,IAAI,GAAGC,QAAQ,IAAIE,WAAzB;AAEA,QAAME,YAAY,GAAG;AACpBD,IAAAA,YADoB;AAEpBJ,IAAAA;AAFoB,GAArB;AAKA,SACC,4BAAC,0BAAD,CAAkB,QAAlB;AAA2B,IAAA,KAAK,EAAGK;AAAnC,KACC,4BAAC,UAAD,6BAAWH,UAAX;AAAwB,IAAA,GAAG,EAAGL;AAA9B,KADD,CADD;AAKA;;eAEc,6BAAgBF,SAAhB,EAA2B,WAA3B,C","sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport type { Ref } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useItemGroup } from './hook';\nimport { ItemGroupContext, useItemGroupContext } from '../context';\nimport { View } from '../../view';\nimport type { ItemGroupProps } from '../types';\n\nfunction ItemGroup(\n\tprops: WordPressComponentProps< ItemGroupProps, 'div' >,\n\tforwardedRef: Ref< any >\n) {\n\tconst {\n\t\tisBordered,\n\t\tisSeparated,\n\t\tsize: sizeProp,\n\t\t...otherProps\n\t} = useItemGroup( props );\n\n\tconst { size: contextSize } = useItemGroupContext();\n\n\tconst spacedAround = ! isBordered && ! isSeparated;\n\tconst size = sizeProp || contextSize;\n\n\tconst contextValue = {\n\t\tspacedAround,\n\t\tsize,\n\t};\n\n\treturn (\n\t\t<ItemGroupContext.Provider value={ contextValue }>\n\t\t\t<View { ...otherProps } ref={ forwardedRef } />\n\t\t</ItemGroupContext.Provider>\n\t);\n}\n\nexport default contextConnect( ItemGroup, 'ItemGroup' );\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/item-group/item-group/component.tsx"],"names":["ItemGroup","props","forwardedRef","isBordered","isSeparated","size","sizeProp","otherProps","contextSize","spacedAround","contextValue"],"mappings":";;;;;;;;;;;;;AAQA;;AACA;;AACA;;AACA;;AAXA;AACA;AACA;;AAGA;AACA;AACA;AAOA,SAASA,SAAT,CACCC,KADD,EAECC,YAFD,EAGE;AACD,QAAM;AACLC,IAAAA,UADK;AAELC,IAAAA,WAFK;AAGLC,IAAAA,IAAI,EAAEC,QAHD;AAIL,OAAGC;AAJE,MAKF,wBAAcN,KAAd,CALJ;AAOA,QAAM;AAAEI,IAAAA,IAAI,EAAEG;AAAR,MAAwB,oCAA9B;AAEA,QAAMC,YAAY,GAAG,CAAEN,UAAF,IAAgB,CAAEC,WAAvC;AACA,QAAMC,IAAI,GAAGC,QAAQ,IAAIE,WAAzB;AAEA,QAAME,YAAY,GAAG;AACpBD,IAAAA,YADoB;AAEpBJ,IAAAA;AAFoB,GAArB;AAKA,SACC,4BAAC,0BAAD,CAAkB,QAAlB;AAA2B,IAAA,KAAK,EAAGK;AAAnC,KACC,4BAAC,UAAD,6BAAWH,UAAX;AAAwB,IAAA,GAAG,EAAGL;AAA9B,KADD,CADD;AAKA;;eAEc,6BAAgBF,SAAhB,EAA2B,WAA3B,C","sourcesContent":["/**\n * External dependencies\n */\nimport type { Ref } from 'react';\n\n/**\n * Internal dependencies\n */\nimport { contextConnect, WordPressComponentProps } from '../../ui/context';\nimport { useItemGroup } from './hook';\nimport { ItemGroupContext, useItemGroupContext } from '../context';\nimport { View } from '../../view';\nimport type { ItemGroupProps } from '../types';\n\nfunction ItemGroup(\n\tprops: WordPressComponentProps< ItemGroupProps, 'div' >,\n\tforwardedRef: Ref< any >\n) {\n\tconst {\n\t\tisBordered,\n\t\tisSeparated,\n\t\tsize: sizeProp,\n\t\t...otherProps\n\t} = useItemGroup( props );\n\n\tconst { size: contextSize } = useItemGroupContext();\n\n\tconst spacedAround = ! isBordered && ! isSeparated;\n\tconst size = sizeProp || contextSize;\n\n\tconst contextValue = {\n\t\tspacedAround,\n\t\tsize,\n\t};\n\n\treturn (\n\t\t<ItemGroupContext.Provider value={ contextValue }>\n\t\t\t<View { ...otherProps } ref={ forwardedRef } />\n\t\t</ItemGroupContext.Provider>\n\t);\n}\n\nexport default contextConnect( ItemGroup, 'ItemGroup' );\n"]}
@@ -37,7 +37,9 @@ const BottomSheetContext = (0, _element.createContext)({
37
37
  onHandleClosingBottomSheet: () => {},
38
38
  // Android only: Function called to control android hardware back button functionality
39
39
  // Return true if the bottom-sheet default close action shouldn't be called
40
- onHandleHardwareButtonPress: () => {}
40
+ onHandleHardwareButtonPress: () => {},
41
+ // Toggle full-screen styles and dimensions
42
+ setIsFullScreen: () => {}
41
43
  });
42
44
  exports.BottomSheetContext = BottomSheetContext;
43
45
  const {
@@ -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","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;AAbW,CAAf,CAA3B;;AAgBA,MAAM;AACZC,EAAAA,QAAQ,EAAEC,mBADE;AAEZC,EAAAA,QAAQ,EAAEC;AAFE,IAGTT,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} );\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,22 +86,14 @@ function BottomSheetNavigationContainer(_ref2) {
86
86
  };
87
87
 
88
88
  const setHeight = (0, _element.useCallback)(height => {
89
- // The screen is fullHeight or changing from fullScreen to the default mode
90
- if (typeof currentHeight === 'string' && typeof height !== 'string' || typeof height === 'string') {
91
- // Animating the opacity for the initial modal results in the backdrop
92
- // provided by react-native-modal to never transition from transparent
93
- // to partially opaque black. The core issue was not idenfited, but it
94
- // may relate to the experimental state of LayoutAnimation for Android.
95
- // https://reactnative.dev/docs/layoutanimation
96
- if (!_element.Platform.isAndroid || currentHeight !== 1) {
97
- (0, _layoutAnimation.performLayoutAnimation)(ANIMATION_DURATION);
98
- }
99
-
89
+ // The screen is fullHeight
90
+ if (typeof height === 'string' && typeof height !== typeof currentHeight) {
91
+ (0, _layoutAnimation.performLayoutAnimation)(ANIMATION_DURATION);
100
92
  setCurrentHeight(height);
101
93
  return;
102
94
  }
103
95
 
104
- if (height > 1) {
96
+ if (height > 1 && Math.round(height) !== Math.round(currentHeight)) {
105
97
  if (currentHeight === 1) {
106
98
  setCurrentHeight(height);
107
99
  } else if (animate) {
@@ -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","Platform","isAndroid","screens","Children","map","child","screen","name","otherProps","props","isNested"],"mappings":";;;;;;;;;AAUA;;;;AAPA;;AACA;;AACA;;AAgBA;;AAKA;;AACA;;AAKA;;AAhCA;AACA;AACA;;AAKA;AACA;AACA;;AAcA;AACA;AACA;AASA,MAAMA,aAAa,GAAG;AACrBC,EAAAA,SAAS,EAAE,QADU;AAErBC,EAAAA,MAAM,EAAE;AACPC,IAAAA,QAAQ,EAAE,GADH;AAEPC,IAAAA,MAAM,EAAEC,oB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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\tPlatform,\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 or changing from fullScreen to the default mode\n\t\t\tif (\n\t\t\t\t( typeof currentHeight === 'string' &&\n\t\t\t\t\ttypeof height !== 'string' ) ||\n\t\t\t\ttypeof height === 'string'\n\t\t\t) {\n\t\t\t\t// Animating the opacity for the initial modal results in the backdrop\n\t\t\t\t// provided by react-native-modal to never transition from transparent\n\t\t\t\t// to partially opaque black. The core issue was not idenfited, but it\n\t\t\t\t// may relate to the experimental state of LayoutAnimation for Android.\n\t\t\t\t// https://reactnative.dev/docs/layoutanimation\n\t\t\t\tif ( ! Platform.isAndroid || currentHeight !== 1 ) {\n\t\t\t\t\tperformLayoutAnimation( ANIMATION_DURATION );\n\t\t\t\t}\n\t\t\t\tsetCurrentHeight( height );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( height > 1 ) {\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;AACrBC,EAAAA,SAAS,EAAE,QADU;AAErBC,EAAAA,MAAM,EAAE;AACPC,IAAAA,QAAQ,EAAE,GADH;AAEPC,IAAAA,MAAM,EAAEC,oBAAOC;AAFR;AAFa,CAAtB;;AAQA,MAAMC,UAAU,GAAG,QAAmB;AAAA,MAAjB;AAAEC,IAAAA;AAAF,GAAiB;AACrC,SAAO;AACNC,IAAAA,SAAS,EAAE;AACVC,MAAAA,OAAO,EAAEF,OAAO,CAACG;AADP;AADL,GAAP;AAKA,CAND;;AAQA,MAAMC,OAAO,GAAG;AACfC,EAAAA,cAAc,EAAE;AACfC,IAAAA,IAAI,EAAEd,aADS;AAEfe,IAAAA,KAAK,EAAEf;AAFQ,GADD;AAKfgB,EAAAA,WAAW,EAAE,KALE;AAMfC,EAAAA,cAAc,EAAE,KAND;AAOfC,EAAAA,qBAAqB,EAAEX;AAPR,CAAhB;AAUA,MAAMY,kBAAkB,GAAG,GAA3B;;AAEA,SAASC,8BAAT,QAMI;AAAA,MANqC;AACxCC,IAAAA,QADwC;AAExCC,IAAAA,OAFwC;AAGxCC,IAAAA,IAHwC;AAIxCC,IAAAA,KAJwC;AAKxCC,IAAAA;AALwC,GAMrC;AACH,QAAMC,KAAK,GAAG,qBAAQ,kCAAR,EAAiClB,OAA/C;AACA,QAAMmB,OAAO,GAAG,yBAAYC,0DAAZ,CAAhB;AACA,QAAM,CAAEC,aAAF,EAAiBC,gBAAjB,IAAsC,uBAC3CH,OAAO,CAACE,aAAR,IAAyB,CADkB,CAA5C;AAIA,QAAME,eAAe,GAAG,2CACvBC,gBAAOC,UADgB,EAEvBD,gBAAOE,cAFgB,CAAxB;;AA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,QAAA,IAAI,EAAGH;AADR,SAEMC,UAFN;AAGC,QAAA,QAAQ,EAAG,MAAMF;AAHlB,SADD;AAOA,KAhBM,CAAP;AAiBA,GAlBe,EAkBb,CAAE1B,QAAF,CAlBa,CAAhB;AAoBA,SAAO,sBAAS,MAAM;AACrB,WACC,4BAAC,iBAAD;AAAM,MAAA,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"]}
@@ -37,7 +37,8 @@ const BottomSheetNavigationScreen = _ref => {
37
37
  children,
38
38
  fullScreen,
39
39
  isScrollable,
40
- isNested
40
+ isNested,
41
+ name
41
42
  } = _ref;
42
43
  const navigation = (0, _native.useNavigation)();
43
44
  const heightRef = (0, _element.useRef)({
@@ -66,7 +67,22 @@ const BottomSheetNavigationScreen = _ref => {
66
67
  onHandleHardwareButtonPress(null);
67
68
  return false;
68
69
  });
69
-
70
+ /**
71
+ * TODO: onHandleHardwareButtonPress stores a single value, which means
72
+ * future invocations from sibling screens can replace the callback for
73
+ * the currently active screen. Currently, the empty dependency array
74
+ * passed to useCallback here is what prevents erroneous callback
75
+ * replacements, but leveraging memoization to achieve this is brittle and
76
+ * explicitly discouraged in the React documentation.
77
+ * https://reactjs.org/docs/hooks-reference.html#usememo
78
+ *
79
+ * Ideally, we refactor onHandleHardwareButtonPress to manage multiple
80
+ * callbacks triggered based upon which screen is currently active.
81
+ *
82
+ * Related: https://git.io/JD2no
83
+ */
84
+ }, []));
85
+ (0, _native.useFocusEffect)((0, _element.useCallback)(() => {
70
86
  if (fullScreen) {
71
87
  setHeight('100%');
72
88
  setIsFullScreen(true);
@@ -76,7 +92,7 @@ const BottomSheetNavigationScreen = _ref => {
76
92
  }
77
93
 
78
94
  return () => {};
79
- }, []));
95
+ }, [setHeight]));
80
96
 
81
97
  const onLayout = _ref2 => {
82
98
  let {
@@ -99,11 +115,13 @@ const BottomSheetNavigationScreen = _ref => {
99
115
 
100
116
  return (0, _element.useMemo)(() => {
101
117
  return isScrollable || isNested ? (0, _element.createElement)(_reactNative.View, {
102
- onLayout: onLayout
118
+ onLayout: onLayout,
119
+ testID: `navigation-screen-${name}`
103
120
  }, children) : (0, _element.createElement)(_reactNative.ScrollView, listProps, (0, _element.createElement)(_reactNative.TouchableHighlight, {
104
121
  accessible: false
105
122
  }, (0, _element.createElement)(_reactNative.View, {
106
- onLayout: onLayout
123
+ onLayout: onLayout,
124
+ testID: `navigation-screen-${name}`
107
125
  }, children, !isNested && (0, _element.createElement)(_reactNative.View, {
108
126
  style: {
109
127
  height: safeAreaBottomInset || _styles.default.scrollableContent.paddingBottom
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js"],"names":["BottomSheetNavigationScreen","children","fullScreen","isScrollable","isNested","navigation","heightRef","maxHeight","isFocused","onHandleHardwareButtonPress","shouldEnableBottomSheetMaxHeight","setIsFullScreen","listProps","safeAreaBottomInset","BottomSheetContext","setHeight","BottomSheetNavigationContext","setHeightDebounce","canGoBack","goBack","current","onLayout","nativeEvent","height","layout","styles","scrollableContent","paddingBottom"],"mappings":";;;;;;;;;AAgBA;;AAbA;;AAKA;;AACA;;AAKA;;AAOA;;AACA;;AAtBA;AACA;AACA;;AASA;AACA;AACA;;AAKA;AACA;AACA;AAIA,MAAMA,2BAA2B,GAAG,QAK7B;AAAA,MAL+B;AACrCC,IAAAA,QADqC;AAErCC,IAAAA,UAFqC;AAGrCC,IAAAA,YAHqC;AAIrCC,IAAAA;AAJqC,GAK/B;AACN,QAAMC,UAAU,GAAG,4BAAnB;AACA,QAAMC,SAAS,GAAG,qBAAQ;AAAEC,IAAAA,SAAS,EAAE;AAAb,GAAR,CAAlB;AACA,QAAMC,SAAS,GAAG,2BAAlB;AACA,QAAM;AACLC,IAAAA,2BADK;AAELC,IAAAA,gCAFK;AAGLC,IAAAA,eAHK;AAILC,IAAAA,SAJK;AAKLC,IAAAA;AALK,MAMF,yBAAYC,8BAAZ,CANJ;AAQA,QAAM;AAAEC,IAAAA;AAAF,MAAgB,yBAAYC,0DAAZ,CAAtB;AAEA,QAAMC,iBAAiB,GAAG,0BAAa,sBAAUF,SAAV,EAAqB,EAArB,CAAb,EAAwC,CACjEA,SADiE,CAAxC,CAA1B;AAIA,8BACC,0BAAa,MAAM;AAClBN,IAAAA,2BAA2B,CAAE,MAAM;AAClC,UAAKJ,UAAU,CAACa,SAAX,EAAL,EAA8B;AAC7BR,QAAAA,gCAAgC,CAAE,IAAF,CAAhC;AACAL,QAAAA,UAAU,CAACc,MAAX;AACA,eAAO,IAAP;AACA;;AACDV,MAAAA,2BAA2B,CAAE,IAAF,CAA3B;AACA,aAAO,KAAP;AACA,KAR0B,CAA3B;;AASA,QAAKP,UAAL,EAAkB;AACjBa,MAAAA,SAAS,CAAE,MAAF,CAAT;AACAJ,MAAAA,eAAe,CAA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Content":["/**\n * External dependencies\n */\nimport {\n\tuseIsFocused,\n\tuseNavigation,\n\tuseFocusEffect,\n} from '@react-navigation/native';\nimport { View, ScrollView, TouchableHighlight } from 'react-native';\nimport { debounce } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { BottomSheetContext } from '@wordpress/components';\n\nimport { useRef, useCallback, useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { BottomSheetNavigationContext } from './bottom-sheet-navigation-context';\nimport styles from './styles.scss';\n\nconst BottomSheetNavigationScreen = ( {\n\tchildren,\n\tfullScreen,\n\tisScrollable,\n\tisNested,\n} ) => {\n\tconst navigation = useNavigation();\n\tconst heightRef = useRef( { maxHeight: 0 } );\n\tconst isFocused = useIsFocused();\n\tconst {\n\t\tonHandleHardwareButtonPress,\n\t\tshouldEnableBottomSheetMaxHeight,\n\t\tsetIsFullScreen,\n\t\tlistProps,\n\t\tsafeAreaBottomInset,\n\t} = useContext( BottomSheetContext );\n\n\tconst { setHeight } = useContext( BottomSheetNavigationContext );\n\n\tconst setHeightDebounce = useCallback( debounce( setHeight, 10 ), [\n\t\tsetHeight,\n\t] );\n\n\tuseFocusEffect(\n\t\tuseCallback( () => {\n\t\t\tonHandleHardwareButtonPress( () => {\n\t\t\t\tif ( navigation.canGoBack() ) {\n\t\t\t\t\tshouldEnableBottomSheetMaxHeight( true );\n\t\t\t\t\tnavigation.goBack();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tonHandleHardwareButtonPress( null );\n\t\t\t\treturn false;\n\t\t\t} );\n\t\t\tif ( fullScreen ) {\n\t\t\t\tsetHeight( '100%' );\n\t\t\t\tsetIsFullScreen( true );\n\t\t\t} else if ( heightRef.current.maxHeight !== 0 ) {\n\t\t\t\tsetIsFullScreen( false );\n\t\t\t\tsetHeight( heightRef.current.maxHeight );\n\t\t\t}\n\t\t\treturn () => {};\n\t\t}, [] )\n\t);\n\tconst onLayout = ( { nativeEvent } ) => {\n\t\tif ( fullScreen ) {\n\t\t\treturn;\n\t\t}\n\t\tconst { height } = nativeEvent.layout;\n\n\t\tif ( heightRef.current.maxHeight !== height && isFocused ) {\n\t\t\theightRef.current.maxHeight = height;\n\t\t\tsetHeightDebounce( height );\n\t\t}\n\t};\n\treturn useMemo( () => {\n\t\treturn isScrollable || isNested ? (\n\t\t\t<View onLayout={ onLayout }>{ children }</View>\n\t\t) : (\n\t\t\t<ScrollView { ...listProps }>\n\t\t\t\t<TouchableHighlight accessible={ false }>\n\t\t\t\t\t<View onLayout={ onLayout }>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t{ ! isNested && (\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</View>\n\t\t\t\t</TouchableHighlight>\n\t\t\t</ScrollView>\n\t\t);\n\t}, [ children, isFocused, safeAreaBottomInset, listProps ] );\n};\n\nexport default BottomSheetNavigationScreen;\n"]}
1
+ {"version":3,"sources":["@wordpress/components/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js"],"names":["BottomSheetNavigationScreen","children","fullScreen","isScrollable","isNested","name","navigation","heightRef","maxHeight","isFocused","onHandleHardwareButtonPress","shouldEnableBottomSheetMaxHeight","setIsFullScreen","listProps","safeAreaBottomInset","BottomSheetContext","setHeight","BottomSheetNavigationContext","setHeightDebounce","canGoBack","goBack","current","onLayout","nativeEvent","height","layout","styles","scrollableContent","paddingBottom"],"mappings":";;;;;;;;;AAgBA;;AAbA;;AAKA;;AACA;;AAKA;;AAOA;;AACA;;AAtBA;AACA;AACA;;AASA;AACA;AACA;;AAKA;AACA;AACA;AAIA,MAAMA,2BAA2B,GAAG,QAM7B;AAAA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ffect,\n} from '@react-navigation/native';\nimport { View, ScrollView, TouchableHighlight } from 'react-native';\nimport { debounce } from 'lodash';\n\n/**\n * WordPress dependencies\n */\nimport { BottomSheetContext } from '@wordpress/components';\n\nimport { useRef, useCallback, useContext, useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport { BottomSheetNavigationContext } from './bottom-sheet-navigation-context';\nimport styles from './styles.scss';\n\nconst BottomSheetNavigationScreen = ( {\n\tchildren,\n\tfullScreen,\n\tisScrollable,\n\tisNested,\n\tname,\n} ) => {\n\tconst navigation = useNavigation();\n\tconst heightRef = useRef( { maxHeight: 0 } );\n\tconst isFocused = useIsFocused();\n\tconst {\n\t\tonHandleHardwareButtonPress,\n\t\tshouldEnableBottomSheetMaxHeight,\n\t\tsetIsFullScreen,\n\t\tlistProps,\n\t\tsafeAreaBottomInset,\n\t} = useContext( BottomSheetContext );\n\n\tconst { setHeight } = useContext( BottomSheetNavigationContext );\n\n\tconst setHeightDebounce = useCallback( debounce( setHeight, 10 ), [\n\t\tsetHeight,\n\t] );\n\n\tuseFocusEffect(\n\t\tuseCallback( () => {\n\t\t\tonHandleHardwareButtonPress( () => {\n\t\t\t\tif ( navigation.canGoBack() ) {\n\t\t\t\t\tshouldEnableBottomSheetMaxHeight( true );\n\t\t\t\t\tnavigation.goBack();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tonHandleHardwareButtonPress( null );\n\t\t\t\treturn false;\n\t\t\t} );\n\t\t\t/**\n\t\t\t * TODO: onHandleHardwareButtonPress stores a single value, which means\n\t\t\t * future invocations from sibling screens can replace the callback for\n\t\t\t * the currently active screen. Currently, the empty dependency array\n\t\t\t * passed to useCallback here is what prevents erroneous callback\n\t\t\t * replacements, but leveraging memoization to achieve this is brittle and\n\t\t\t * explicitly discouraged in the React documentation.\n\t\t\t * https://reactjs.org/docs/hooks-reference.html#usememo\n\t\t\t *\n\t\t\t * Ideally, we refactor onHandleHardwareButtonPress to manage multiple\n\t\t\t * callbacks triggered based upon which screen is currently active.\n\t\t\t *\n\t\t\t * Related: https://git.io/JD2no\n\t\t\t */\n\t\t}, [] )\n\t);\n\n\tuseFocusEffect(\n\t\tuseCallback( () => {\n\t\t\tif ( fullScreen ) {\n\t\t\t\tsetHeight( '100%' );\n\t\t\t\tsetIsFullScreen( true );\n\t\t\t} else if ( heightRef.current.maxHeight !== 0 ) {\n\t\t\t\tsetIsFullScreen( false );\n\t\t\t\tsetHeight( heightRef.current.maxHeight );\n\t\t\t}\n\t\t\treturn () => {};\n\t\t}, [ setHeight ] )\n\t);\n\n\tconst onLayout = ( { nativeEvent } ) => {\n\t\tif ( fullScreen ) {\n\t\t\treturn;\n\t\t}\n\t\tconst { height } = nativeEvent.layout;\n\n\t\tif ( heightRef.current.maxHeight !== height && isFocused ) {\n\t\t\theightRef.current.maxHeight = height;\n\t\t\tsetHeightDebounce( height );\n\t\t}\n\t};\n\n\treturn useMemo( () => {\n\t\treturn isScrollable || isNested ? (\n\t\t\t<View\n\t\t\t\tonLayout={ onLayout }\n\t\t\t\ttestID={ `navigation-screen-${ name }` }\n\t\t\t>\n\t\t\t\t{ children }\n\t\t\t</View>\n\t\t) : (\n\t\t\t<ScrollView { ...listProps }>\n\t\t\t\t<TouchableHighlight accessible={ false }>\n\t\t\t\t\t<View\n\t\t\t\t\t\tonLayout={ onLayout }\n\t\t\t\t\t\ttestID={ `navigation-screen-${ name }` }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t{ ! isNested && (\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</View>\n\t\t\t\t</TouchableHighlight>\n\t\t\t</ScrollView>\n\t\t);\n\t}, [ children, isFocused, safeAreaBottomInset, listProps ] );\n};\n\nexport default BottomSheetNavigationScreen;\n"]}
@@ -61,8 +61,7 @@ class BottomSheetCell extends _element.Component {
61
61
 
62
62
  componentDidMount() {
63
63
  this.isCurrent = true;
64
-
65
- _reactNative.AccessibilityInfo.addEventListener('screenReaderChanged', this.handleScreenReaderToggled);
64
+ this.a11yInfoChangeSubscription = _reactNative.AccessibilityInfo.addEventListener('screenReaderChanged', this.handleScreenReaderToggled);
66
65
 
67
66
  _reactNative.AccessibilityInfo.isScreenReaderEnabled().then(isScreenReaderEnabled => {
68
67
  if (this.isCurrent) {
@@ -75,8 +74,7 @@ class BottomSheetCell extends _element.Component {
75
74
 
76
75
  componentWillUnmount() {
77
76
  this.isCurrent = false;
78
-
79
- _reactNative.AccessibilityInfo.removeEventListener('screenReaderChanged', this.handleScreenReaderToggled);
77
+ this.a11yInfoChangeSubscription.remove();
80
78
  }
81
79
 
82
80
  handleScreenReaderToggled(isScreenReaderEnabled) {
@@ -292,7 +290,7 @@ class BottomSheetCell extends _element.Component {
292
290
  }, (0, _element.createElement)(_reactNative.View, {
293
291
  style: _styles.default.cellRowContainer
294
292
  }, icon && (0, _element.createElement)(_reactNative.View, {
295
- style: _styles.default.cellRowContainer
293
+ style: [_styles.default.cellRowContainer, _styles.default.cellRowIcon]
296
294
  }, (0, _element.createElement)(_components.Icon, {
297
295
  icon: icon,
298
296
  size: 24,
@@ -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","AccessibilityInfo","addEventListener","then","setState","componentWillUnmount","removeEventListener","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","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,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O2D,gBAAxB;AAAd,OACGjE,IADH,CA3FF,EA+FG,CAAEoB,gBAAF,IAAsB,4BAAC,iBAAD;AAAM,MAAA,KAAK,EAAGD,cAAc;AAA5B,MA/FzB,CADD;AAmGA;;AA/YsC;;eAkZzB,uCAA0B/E,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\tAccessibilityInfo.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\tAccessibilityInfo.removeEventListener(\n\t\t\t'screenReaderChanged',\n\t\t\tthis.handleScreenReaderToggled\n\t\t);\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 style={ styles.cellRowContainer }>\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;;AAK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,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"]}
@@ -166,10 +166,13 @@ class BottomSheet extends _element.Component {
166
166
  });
167
167
 
168
168
  this.lastLayoutAnimation = layoutAnimation;
169
- } else {
170
- this.performRegularLayoutAnimation({
171
- useLastLayoutAnimation: false
172
- });
169
+ } else {// TODO: Reinstate animations, possibly replacing `LayoutAnimation` with
170
+ // more nuanced `Animated` usage or replacing our custom `BottomSheet`
171
+ // with `@gorhom/bottom-sheet`. This animation was disabled to avoid a
172
+ // preexisting bug: https://git.io/JMPCV
173
+ // this.performRegularLayoutAnimation( {
174
+ // useLastLayoutAnimation: false,
175
+ // } );
173
176
  }
174
177
  }
175
178
 
@@ -202,10 +205,9 @@ class BottomSheet extends _element.Component {
202
205
  });
203
206
  }
204
207
 
205
- _reactNative.Dimensions.addEventListener('change', this.onDimensionsChange); // 'Will' keyboard events are not available on Android.
208
+ this.dimensionsChangeSubscription = _reactNative.Dimensions.addEventListener('change', this.onDimensionsChange); // 'Will' keyboard events are not available on Android.
206
209
  // Reference: https://reactnative.dev/docs/0.61/keyboard#addlistener
207
210
 
208
-
209
211
  this.keyboardShowListener = _reactNative.Keyboard.addListener(_reactNative.Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', this.keyboardShow);
210
212
  this.keyboardHideListener = _reactNative.Keyboard.addListener(_reactNative.Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide', this.keyboardHide);
211
213
  this.safeAreaEventSubscription = _reactNativeSafeArea.default.addEventListener('safeAreaInsetsForRootViewDidChange', this.onSafeAreaInsetsUpdate);
@@ -213,8 +215,7 @@ class BottomSheet extends _element.Component {
213
215
  }
214
216
 
215
217
  componentWillUnmount() {
216
- _reactNative.Dimensions.removeEventListener('change', this.onDimensionsChange);
217
-
218
+ this.dimensionsChangeSubscription.remove();
218
219
  this.keyboardShowListener.remove();
219
220
  this.keyboardHideListener.remove();
220
221
 
@@ -228,8 +229,6 @@ class BottomSheet extends _element.Component {
228
229
 
229
230
  this.safeAreaEventSubscription.remove();
230
231
  this.safeAreaEventSubscription = null;
231
-
232
- _reactNativeSafeArea.default.removeEventListener('safeAreaInsetsForRootViewDidChange', this.onSafeAreaInsetsUpdate);
233
232
  }
234
233
 
235
234
  onSafeAreaInsetsUpdate(result) {
@@ -265,15 +264,15 @@ class BottomSheet extends _element.Component {
265
264
  } = this.state;
266
265
  const statusBarHeight = _reactNative.Platform.OS === 'android' ? _reactNative.StatusBar.currentHeight : 0; // `maxHeight` when modal is opened along with a keyboard
267
266
 
268
- const maxHeightWithOpenKeyboard = 0.95 * (_reactNative.Dimensions.get('window').height - this.keyboardHeight - statusBarHeight - this.headerHeight); // On horizontal mode `maxHeight` has to be set on 90% of width
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
269
268
 
270
269
  if (width > height) {
271
270
  this.setState({
272
- maxHeight: Math.min(0.9 * height, maxHeightWithOpenKeyboard)
273
- }); // On vertical mode `maxHeight` has to be set on 50% of width
271
+ maxHeight: Math.min(0.96 * height - this.headerHeight, maxHeightWithOpenKeyboard)
272
+ }); // In portrait orientation, set `maxHeight` to ~59% of the height
274
273
  } else {
275
274
  this.setState({
276
- maxHeight: Math.min(height / 2 - safeAreaBottomInset, maxHeightWithOpenKeyboard)
275
+ maxHeight: Math.min(height * 0.59 - safeAreaBottomInset - this.headerHeight, maxHeightWithOpenKeyboard)
277
276
  });
278
277
  }
279
278
  }
@@ -294,7 +293,7 @@ class BottomSheet extends _element.Component {
294
293
  } = nativeEvent.layout; // The layout animation should only be triggered if the header
295
294
  // height has changed after being mounted.
296
295
 
297
- if (this.headerHeight !== 0 && height !== this.headerHeight) {
296
+ if (this.headerHeight !== 0 && Math.round(height) !== Math.round(this.headerHeight)) {
298
297
  this.performRegularLayoutAnimation({
299
298
  useLastLayoutAnimation: true
300
299
  });
@@ -575,7 +574,8 @@ class BottomSheet extends _element.Component {
575
574
  keyboardVerticalOffset: -safeAreaBottomInset
576
575
  }, (0, _element.createElement)(_reactNative.View, {
577
576
  style: _styles.default.header,
578
- onLayout: this.onHeaderLayout
577
+ onLayout: this.onHeaderLayout,
578
+ testID: `${rest.testID || 'bottom-sheet'}-header`
579
579
  }, showDragIndicator() && (0, _element.createElement)(_reactNative.View, {
580
580
  style: _styles.default.dragIndicator
581
581
  }), !hideHeader && getHeader()), (0, _element.createElement)(WrapperView, hasNavigation ? {